idmission-web-sdk 2.3.6 → 2.3.8
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/components/common/overlay.d.ts +12 -4
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +6 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +6 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdentification.d.ts +6 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +6 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +6 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +6 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +6 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +6 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +6 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +4 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +4 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +4 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
- package/dist/components/id_capture/DocumentDetectionModelProvider.d.ts +3 -1
- package/dist/components/id_capture/DocumentDetectionModelProvider.d.ts.map +1 -1
- package/dist/components/id_capture/FocusModelProvider.d.ts +3 -1
- package/dist/components/id_capture/FocusModelProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +2 -2
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts +3 -0
- package/dist/components/id_capture/IdCaptureModelsProvider.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +4 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +3 -0
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +3 -0
- package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +4 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/models/DocumentDetection.d.ts +3 -0
- package/dist/lib/models/DocumentDetection.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts +3 -0
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/Focus.d.ts +3 -0
- package/dist/lib/models/Focus.d.ts.map +1 -1
- package/dist/lib/models/helpers.d.ts +1 -0
- package/dist/lib/models/helpers.d.ts.map +1 -1
- package/dist/lib/models/loadProgressHooks.d.ts +10 -0
- package/dist/lib/models/loadProgressHooks.d.ts.map +1 -0
- package/dist/sdk2.cjs.development.js +349 -117
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +349 -117
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +349 -117
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.3.
|
|
207
|
+
var webSdkVersion = '2.3.8';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -475,8 +475,8 @@ var OverlayInner$2 = styled.div(templateObject_2$D || (templateObject_2$D = __ma
|
|
|
475
475
|
var OverlayImageContainer = styled.div(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"], ["\n position: relative;\n display: flex;\n flex-grow: 1;\n padding-bottom: 25px;\n overflow: hidden;\n\n & > img,\n & > svg {\n margin: 0 auto;\n width: max-content;\n max-width: 100%;\n max-height: 100%;\n aspect-ratio: initial;\n object-fit: contain;\n display: block;\n }\n"])));
|
|
476
476
|
var OverlayImageRow = styled.div(templateObject_4$l || (templateObject_4$l = __makeTemplateObject(["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"], ["\n display: flex;\n margin: auto;\n\n & > div {\n max-height: calc(100% - 320px);\n\n & > img {\n width: 100%;\n max-height: 100%;\n height: auto;\n object-fit: contain;\n }\n }\n"])));
|
|
477
477
|
var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
478
|
-
var ButtonsColumn = styled.div(templateObject_6$
|
|
479
|
-
var WideButton = styled(LoaderButton)(templateObject_7$
|
|
478
|
+
var ButtonsColumn = styled.div(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
479
|
+
var WideButton = styled(LoaderButton)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n width: 100%;\n border-radius: 30px;\n"], ["\n width: 100%;\n border-radius: 30px;\n"])));
|
|
480
480
|
var WideBorderButton = styled(WideButton)(templateObject_8$4 || (templateObject_8$4 = __makeTemplateObject(["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"], ["\n color: ", ";\n background: ", ";\n border: 1px solid\n ", ";\n box-sizing: border-box;\n"])), function (props) {
|
|
481
481
|
var _a, _b;
|
|
482
482
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.textColor) !== null && _b !== void 0 ? _b : 'black';
|
|
@@ -487,8 +487,8 @@ var WideBorderButton = styled(WideButton)(templateObject_8$4 || (templateObject_
|
|
|
487
487
|
var _a, _b;
|
|
488
488
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.borderColor) !== null && _b !== void 0 ? _b : 'var(--idm-color-secondary-500)';
|
|
489
489
|
});
|
|
490
|
-
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$
|
|
491
|
-
var LoadingOverlayHeader = styled.div(templateObject_10$
|
|
490
|
+
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"])));
|
|
491
|
+
var LoadingOverlayHeader = styled.div(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"])), function (props) {
|
|
492
492
|
var _a;
|
|
493
493
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
494
494
|
}, function (props) {
|
|
@@ -496,17 +496,25 @@ var LoadingOverlayHeader = styled.div(templateObject_10$2 || (templateObject_10$
|
|
|
496
496
|
});
|
|
497
497
|
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])));
|
|
498
498
|
var LoadingOverlayImageContainer = styled(OverlayImageContainer)(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"], ["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"])));
|
|
499
|
-
var LoadingOverlayProgressBarBackground = styled.div(
|
|
500
|
-
|
|
499
|
+
var LoadingOverlayProgressBarBackground = styled.div.attrs({
|
|
500
|
+
className: 'loading-overlay-progress-bar-background'
|
|
501
|
+
})(templateObject_13$1 || (templateObject_13$1 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
502
|
+
var LoadingOverlayProgressBar = styled.span.attrs({
|
|
503
|
+
className: 'loading-overlay-progress-bar'
|
|
504
|
+
})(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n"], ["\n display: block;\n width: ", "%;\n height: 100%;\n left: 0;\n top: 0;\n position: absolute;\n"])), function (props) {
|
|
501
505
|
return props.$progress;
|
|
502
506
|
});
|
|
503
|
-
var LoadingOverlayProgressIndicator = styled.span(
|
|
507
|
+
var LoadingOverlayProgressIndicator = styled.span.attrs({
|
|
508
|
+
className: 'loading-overlay-progress-indicator'
|
|
509
|
+
})(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n display: block;\n height: 100%;\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n display: block;\n height: 100%;\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation);
|
|
504
510
|
var LoadingOverlayButtonsRow = styled(ButtonsRow$2)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n min-height: 100px;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 15px 25px;\n min-height: 100px;\n width: 100%;\n box-sizing: border-box;\n position: relative;\n"])));
|
|
505
511
|
var LoadingOverlayLoadingListContainer = styled.div(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n position: relative;\n z-index: 2;\n"], ["\n display: flex;\n position: relative;\n z-index: 2;\n"])));
|
|
506
512
|
var LoadingOverlayLoadingList = styled.ul(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"], ["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"])));
|
|
507
513
|
var LoadingOverlayLoadingListItem = styled.li(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"], ["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"])));
|
|
508
514
|
var LoadingOverlayProgressContainer = styled.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
509
|
-
var
|
|
515
|
+
var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
516
|
+
var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
517
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$9, templateObject_7$6, templateObject_8$4, templateObject_9$3, templateObject_10$1, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22;
|
|
510
518
|
|
|
511
519
|
var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
|
|
512
520
|
var accessBlockedImageUrl = _a.accessBlockedImageUrl;
|
|
@@ -2472,19 +2480,23 @@ function useLoadFocusModel(_a) {
|
|
|
2472
2480
|
videoRef = _a.videoRef,
|
|
2473
2481
|
_d = _a.shouldLoadModels,
|
|
2474
2482
|
shouldLoadModels = _d === void 0 ? true : _d;
|
|
2475
|
-
var _e = useState(
|
|
2476
|
-
|
|
2477
|
-
|
|
2483
|
+
var _e = useState('not-started'),
|
|
2484
|
+
modelLoadState = _e[0],
|
|
2485
|
+
setModelLoadState = _e[1];
|
|
2478
2486
|
var _f = useState(0),
|
|
2479
2487
|
modelDownloadProgress = _f[0],
|
|
2480
2488
|
setModelDownloadProgress = _f[1];
|
|
2481
2489
|
var _g = useState(null),
|
|
2482
|
-
|
|
2483
|
-
|
|
2490
|
+
modelWarmingStartedAt = _g[0],
|
|
2491
|
+
setModelWarmingStartedAt = _g[1];
|
|
2492
|
+
var _h = useState(null),
|
|
2493
|
+
modelError = _h[0],
|
|
2494
|
+
setModelError = _h[1];
|
|
2484
2495
|
useEffect(function loadModel() {
|
|
2485
2496
|
var _this = this;
|
|
2486
2497
|
if (!shouldLoadModels) return;
|
|
2487
|
-
|
|
2498
|
+
setModelLoadState('downloading');
|
|
2499
|
+
setModelWarmingStartedAt(null);
|
|
2488
2500
|
function handleDownloadProgress(event) {
|
|
2489
2501
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
2490
2502
|
}
|
|
@@ -2501,6 +2513,8 @@ function useLoadFocusModel(_a) {
|
|
|
2501
2513
|
case 0:
|
|
2502
2514
|
setModelDownloadProgress(100);
|
|
2503
2515
|
clearTimeout(modelLoadTimeout);
|
|
2516
|
+
setModelLoadState('warming');
|
|
2517
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
2504
2518
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2505
2519
|
cancelled = false;
|
|
2506
2520
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2513,7 +2527,7 @@ function useLoadFocusModel(_a) {
|
|
|
2513
2527
|
setTimeout(function () {
|
|
2514
2528
|
if (cancelled) return;
|
|
2515
2529
|
loadedModel.classifyForVideo(videoRef.current, performance.now());
|
|
2516
|
-
|
|
2530
|
+
setModelLoadState('ready');
|
|
2517
2531
|
}, 500);
|
|
2518
2532
|
return [2 /*return*/];
|
|
2519
2533
|
}
|
|
@@ -2521,6 +2535,7 @@ function useLoadFocusModel(_a) {
|
|
|
2521
2535
|
});
|
|
2522
2536
|
})["catch"](function (e) {
|
|
2523
2537
|
setModelError(e);
|
|
2538
|
+
setModelLoadState('error');
|
|
2524
2539
|
})["finally"](function () {
|
|
2525
2540
|
clearTimeout(modelLoadTimeout);
|
|
2526
2541
|
});
|
|
@@ -2535,11 +2550,15 @@ function useLoadFocusModel(_a) {
|
|
|
2535
2550
|
useEffect(function handleModelError() {
|
|
2536
2551
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
2537
2552
|
}, [modelError, onModelError]);
|
|
2538
|
-
return {
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2553
|
+
return useMemo(function () {
|
|
2554
|
+
return {
|
|
2555
|
+
ready: modelLoadState === 'ready',
|
|
2556
|
+
modelLoadState: modelLoadState,
|
|
2557
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
2558
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
2559
|
+
modelError: modelError
|
|
2560
|
+
};
|
|
2561
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
2543
2562
|
}
|
|
2544
2563
|
var lastFocusPredictionAt = 0;
|
|
2545
2564
|
var lastFocusPredictionTime = 0;
|
|
@@ -2631,18 +2650,22 @@ function useLoadFaceDetector(_a) {
|
|
|
2631
2650
|
_b = _a.modelLoadTimeoutMs,
|
|
2632
2651
|
modelLoadTimeoutMs = _b === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _b,
|
|
2633
2652
|
videoRef = _a.videoRef;
|
|
2634
|
-
var _c = useState(
|
|
2635
|
-
|
|
2636
|
-
|
|
2653
|
+
var _c = useState('not-started'),
|
|
2654
|
+
modelLoadState = _c[0],
|
|
2655
|
+
setModelLoadState = _c[1];
|
|
2637
2656
|
var _d = useState(0),
|
|
2638
2657
|
modelDownloadProgress = _d[0],
|
|
2639
2658
|
setModelDownloadProgress = _d[1];
|
|
2640
2659
|
var _e = useState(null),
|
|
2641
|
-
|
|
2642
|
-
|
|
2660
|
+
modelWarmingStartedAt = _e[0],
|
|
2661
|
+
setModelWarmingStartedAt = _e[1];
|
|
2662
|
+
var _f = useState(null),
|
|
2663
|
+
modelError = _f[0],
|
|
2664
|
+
setModelError = _f[1];
|
|
2643
2665
|
useEffect(function loadModel() {
|
|
2644
2666
|
var _this = this;
|
|
2645
|
-
|
|
2667
|
+
setModelLoadState('downloading');
|
|
2668
|
+
setModelWarmingStartedAt(null);
|
|
2646
2669
|
var modelLoadTimeout = setTimeout(function () {
|
|
2647
2670
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
2648
2671
|
}, modelLoadTimeoutMs);
|
|
@@ -2659,6 +2682,8 @@ function useLoadFaceDetector(_a) {
|
|
|
2659
2682
|
case 0:
|
|
2660
2683
|
setModelDownloadProgress(100);
|
|
2661
2684
|
clearTimeout(modelLoadTimeout);
|
|
2685
|
+
setModelLoadState('warming');
|
|
2686
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
2662
2687
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2663
2688
|
cancelled = false;
|
|
2664
2689
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2670,13 +2695,14 @@ function useLoadFaceDetector(_a) {
|
|
|
2670
2695
|
_b.sent();
|
|
2671
2696
|
if (cancelled) return [2 /*return*/];
|
|
2672
2697
|
model.detectForVideo(videoRef.current, performance.now());
|
|
2673
|
-
|
|
2698
|
+
setModelLoadState('ready');
|
|
2674
2699
|
return [2 /*return*/];
|
|
2675
2700
|
}
|
|
2676
2701
|
});
|
|
2677
2702
|
});
|
|
2678
2703
|
})["catch"](function (e) {
|
|
2679
2704
|
setModelError(e);
|
|
2705
|
+
setModelLoadState('error');
|
|
2680
2706
|
})["finally"](function () {
|
|
2681
2707
|
clearTimeout(modelLoadTimeout);
|
|
2682
2708
|
});
|
|
@@ -2691,11 +2717,15 @@ function useLoadFaceDetector(_a) {
|
|
|
2691
2717
|
useEffect(function handleModelError() {
|
|
2692
2718
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
2693
2719
|
}, [modelError, onModelError]);
|
|
2694
|
-
return {
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2720
|
+
return useMemo(function () {
|
|
2721
|
+
return {
|
|
2722
|
+
ready: modelLoadState === 'ready',
|
|
2723
|
+
modelLoadState: modelLoadState,
|
|
2724
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
2725
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
2726
|
+
modelError: modelError
|
|
2727
|
+
};
|
|
2728
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
2699
2729
|
}
|
|
2700
2730
|
var lastFaceDetectionAt = 0;
|
|
2701
2731
|
var lastFaceDetectionTime = 0;
|
|
@@ -3137,19 +3167,23 @@ function useLoadDocumentDetector(_a) {
|
|
|
3137
3167
|
scoreThreshold = _e === void 0 ? defaultDocumentDetectionScoreThreshold : _e,
|
|
3138
3168
|
onModelError = _a.onModelError,
|
|
3139
3169
|
videoRef = _a.videoRef;
|
|
3140
|
-
var _f = useState(
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
var _g = useState(
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
var _h = useState(
|
|
3147
|
-
|
|
3148
|
-
|
|
3170
|
+
var _f = useState('not-started'),
|
|
3171
|
+
modelLoadState = _f[0],
|
|
3172
|
+
setModelLoadState = _f[1];
|
|
3173
|
+
var _g = useState(null),
|
|
3174
|
+
modelWarmingStartedAt = _g[0],
|
|
3175
|
+
setModelWarmingStartedAt = _g[1];
|
|
3176
|
+
var _h = useState(0),
|
|
3177
|
+
modelDownloadProgress = _h[0],
|
|
3178
|
+
setModelDownloadProgress = _h[1];
|
|
3179
|
+
var _j = useState(null),
|
|
3180
|
+
modelError = _j[0],
|
|
3181
|
+
setModelError = _j[1];
|
|
3149
3182
|
useEffect(function loadModel() {
|
|
3150
3183
|
var _this = this;
|
|
3151
3184
|
if (!shouldLoadModels) return;
|
|
3152
|
-
|
|
3185
|
+
setModelLoadState('downloading');
|
|
3186
|
+
setModelWarmingStartedAt(null);
|
|
3153
3187
|
function handleDownloadProgress(event) {
|
|
3154
3188
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
3155
3189
|
}
|
|
@@ -3165,6 +3199,8 @@ function useLoadDocumentDetector(_a) {
|
|
|
3165
3199
|
switch (_b.label) {
|
|
3166
3200
|
case 0:
|
|
3167
3201
|
setModelDownloadProgress(100);
|
|
3202
|
+
setModelLoadState('warming');
|
|
3203
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
3168
3204
|
clearTimeout(modelLoadTimeout);
|
|
3169
3205
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
3170
3206
|
cancelled = false;
|
|
@@ -3178,7 +3214,7 @@ function useLoadDocumentDetector(_a) {
|
|
|
3178
3214
|
setTimeout(function () {
|
|
3179
3215
|
if (cancelled) return;
|
|
3180
3216
|
model.detectForVideo(videoRef.current, performance.now());
|
|
3181
|
-
|
|
3217
|
+
setModelLoadState('ready');
|
|
3182
3218
|
}, 500);
|
|
3183
3219
|
return [2 /*return*/];
|
|
3184
3220
|
}
|
|
@@ -3186,6 +3222,7 @@ function useLoadDocumentDetector(_a) {
|
|
|
3186
3222
|
});
|
|
3187
3223
|
})["catch"](function (e) {
|
|
3188
3224
|
setModelError(e);
|
|
3225
|
+
setModelLoadState('error');
|
|
3189
3226
|
})["finally"](function () {
|
|
3190
3227
|
clearTimeout(modelLoadTimeout);
|
|
3191
3228
|
});
|
|
@@ -3200,12 +3237,16 @@ function useLoadDocumentDetector(_a) {
|
|
|
3200
3237
|
useEffect(function handleModelError() {
|
|
3201
3238
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
3202
3239
|
}, [modelError, onModelError]);
|
|
3203
|
-
return {
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3240
|
+
return useMemo(function () {
|
|
3241
|
+
return {
|
|
3242
|
+
ready: modelLoadState === 'ready',
|
|
3243
|
+
modelLoadState: modelLoadState,
|
|
3244
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
3245
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
3246
|
+
modelError: modelError,
|
|
3247
|
+
setModelError: setModelError
|
|
3248
|
+
};
|
|
3249
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
3209
3250
|
}
|
|
3210
3251
|
function makeDocumentDetectorPrediction(frame) {
|
|
3211
3252
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -5169,8 +5210,9 @@ var DocumentDetectionModelContext = /*#__PURE__*/createContext({
|
|
|
5169
5210
|
loadDocumentDetectionModel: function loadDocumentDetectionModel() {
|
|
5170
5211
|
return null;
|
|
5171
5212
|
},
|
|
5172
|
-
|
|
5213
|
+
documentDetectionModelState: 'not-started',
|
|
5173
5214
|
documentDetectionModelDownloadProgress: 0,
|
|
5215
|
+
documentDetectionModelWarmingStartedAt: null,
|
|
5174
5216
|
documentDetectionModelError: null,
|
|
5175
5217
|
onDocumentDetected: function onDocumentDetected() {
|
|
5176
5218
|
return null;
|
|
@@ -5243,7 +5285,9 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5243
5285
|
shouldLoadModels: shouldLoadModels
|
|
5244
5286
|
}),
|
|
5245
5287
|
ready = _q.ready,
|
|
5288
|
+
modelLoadState = _q.modelLoadState,
|
|
5246
5289
|
modelDownloadProgress = _q.modelDownloadProgress,
|
|
5290
|
+
modelWarmingStartedAt = _q.modelWarmingStartedAt,
|
|
5247
5291
|
modelError = _q.modelError,
|
|
5248
5292
|
setModelError = _q.setModelError;
|
|
5249
5293
|
var _r = useFrameLoop(useCallback(function (frameId, timeRunning) {
|
|
@@ -5310,7 +5354,8 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5310
5354
|
startDocumentDetection: start,
|
|
5311
5355
|
stopDocumentDetection: stop,
|
|
5312
5356
|
loadDocumentDetectionModel: load,
|
|
5313
|
-
|
|
5357
|
+
documentDetectionModelState: modelLoadState,
|
|
5358
|
+
documentDetectionModelWarmingStartedAt: modelWarmingStartedAt,
|
|
5314
5359
|
documentDetectionModelError: modelError,
|
|
5315
5360
|
documentDetectionModelDownloadProgress: modelDownloadProgress,
|
|
5316
5361
|
onDocumentDetected: onDocumentDetected,
|
|
@@ -5322,7 +5367,7 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5322
5367
|
documentDetectionLastPredictionCanvas: lastPredictionCanvas,
|
|
5323
5368
|
clearDocumentDetectionLastPredictionCanvas: clearDocumentDetectionLastPredictionCanvas
|
|
5324
5369
|
};
|
|
5325
|
-
}, [start, stop, load,
|
|
5370
|
+
}, [start, stop, load, modelLoadState, modelWarmingStartedAt, modelError, modelDownloadProgress, onDocumentDetected, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
5326
5371
|
return /*#__PURE__*/React.createElement(DocumentDetectionModelContext.Provider, {
|
|
5327
5372
|
value: value
|
|
5328
5373
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -5335,8 +5380,9 @@ var FocusModelContext = /*#__PURE__*/createContext({
|
|
|
5335
5380
|
loadFocusModel: function loadFocusModel() {
|
|
5336
5381
|
return null;
|
|
5337
5382
|
},
|
|
5338
|
-
|
|
5383
|
+
focusModelState: 'not-started',
|
|
5339
5384
|
focusModelDownloadProgress: 0,
|
|
5385
|
+
focusModelWarmingStartedAt: null,
|
|
5340
5386
|
focusModelError: null,
|
|
5341
5387
|
focusThresholds: {},
|
|
5342
5388
|
setFocusThresholds: function setFocusThresholds() {
|
|
@@ -5378,7 +5424,9 @@ function FocusModelProvider(_a) {
|
|
|
5378
5424
|
shouldLoadModels: shouldLoadModels
|
|
5379
5425
|
}),
|
|
5380
5426
|
ready = _h.ready,
|
|
5427
|
+
modelLoadState = _h.modelLoadState,
|
|
5381
5428
|
modelDownloadProgress = _h.modelDownloadProgress,
|
|
5429
|
+
modelWarmingStartedAt = _h.modelWarmingStartedAt,
|
|
5382
5430
|
modelError = _h.modelError;
|
|
5383
5431
|
var makeFocusPrediction = useCallback(function (imageData, box) {
|
|
5384
5432
|
if (!ready) return null;
|
|
@@ -5390,15 +5438,16 @@ function FocusModelProvider(_a) {
|
|
|
5390
5438
|
var value = useMemo(function () {
|
|
5391
5439
|
return {
|
|
5392
5440
|
loadFocusModel: load,
|
|
5393
|
-
|
|
5441
|
+
focusModelState: modelLoadState,
|
|
5394
5442
|
focusModelDownloadProgress: modelDownloadProgress,
|
|
5443
|
+
focusModelWarmingStartedAt: modelWarmingStartedAt,
|
|
5395
5444
|
focusModelError: modelError,
|
|
5396
5445
|
makeFocusPrediction: makeFocusPrediction,
|
|
5397
5446
|
focusPredictionTime: lastFocusPredictionTime,
|
|
5398
5447
|
focusThresholds: focusThresholds,
|
|
5399
5448
|
setFocusThresholds: setFocusThresholds
|
|
5400
5449
|
};
|
|
5401
|
-
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError,
|
|
5450
|
+
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError, modelLoadState, modelWarmingStartedAt]);
|
|
5402
5451
|
return /*#__PURE__*/React__default.createElement(FocusModelContext.Provider, {
|
|
5403
5452
|
value: value
|
|
5404
5453
|
}, /*#__PURE__*/React__default.createElement(InvisibleCanvas, {
|
|
@@ -5463,6 +5512,8 @@ var IdCaptureModelsContext = /*#__PURE__*/createContext({
|
|
|
5463
5512
|
return null;
|
|
5464
5513
|
},
|
|
5465
5514
|
modelDownloadProgress: 0,
|
|
5515
|
+
modelLoadState: 'not-started',
|
|
5516
|
+
modelWarmingStartedAt: null,
|
|
5466
5517
|
modelError: null,
|
|
5467
5518
|
thresholds: defaultIdCaptureThresholds,
|
|
5468
5519
|
setThresholds: function setThresholds() {
|
|
@@ -5497,8 +5548,9 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5497
5548
|
_b = _a.allowSinglePageIdCapture,
|
|
5498
5549
|
allowSinglePageIdCapture = _b === void 0 ? false : _b;
|
|
5499
5550
|
var _c = useContext(DocumentDetectionModelContext),
|
|
5500
|
-
|
|
5551
|
+
documentDetectionModelState = _c.documentDetectionModelState,
|
|
5501
5552
|
documentDetectionModelDownloadProgress = _c.documentDetectionModelDownloadProgress,
|
|
5553
|
+
documentDetectionModelWarmingStartedAt = _c.documentDetectionModelWarmingStartedAt,
|
|
5502
5554
|
startDocumentDetection = _c.startDocumentDetection,
|
|
5503
5555
|
stopDocumentDetection = _c.stopDocumentDetection,
|
|
5504
5556
|
loadDocumentDetectionModel = _c.loadDocumentDetectionModel,
|
|
@@ -5513,8 +5565,9 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5513
5565
|
documentDetectionModelError = _c.documentDetectionModelError;
|
|
5514
5566
|
var _d = useContext(FocusModelContext),
|
|
5515
5567
|
loadFocusModel = _d.loadFocusModel,
|
|
5516
|
-
|
|
5568
|
+
focusModelState = _d.focusModelState,
|
|
5517
5569
|
focusModelDownloadProgress = _d.focusModelDownloadProgress,
|
|
5570
|
+
focusModelWarmingStartedAt = _d.focusModelWarmingStartedAt,
|
|
5518
5571
|
makeFocusPrediction = _d.makeFocusPrediction,
|
|
5519
5572
|
focusThresholds = _d.focusThresholds,
|
|
5520
5573
|
setFocusThresholds = _d.setFocusThresholds,
|
|
@@ -5622,10 +5675,17 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5622
5675
|
loadDocumentDetectionModel();
|
|
5623
5676
|
loadFocusModel();
|
|
5624
5677
|
}, [loadDocumentDetectionModel, loadFocusModel]);
|
|
5678
|
+
var ready = documentDetectionModelState === 'ready' && focusModelState === 'ready';
|
|
5679
|
+
var modelLoadState = ready ? 'ready' : documentDetectionModelState === 'warming' || focusModelState === 'warming' ? 'warming' : focusModelState === 'downloading' || documentDetectionModelState === 'downloading' ? 'downloading' : 'not-started';
|
|
5680
|
+
var modelWarmingStartedAt = !documentDetectionModelWarmingStartedAt && !focusModelWarmingStartedAt ? null : Math.min.apply(Math, [documentDetectionModelWarmingStartedAt, focusModelWarmingStartedAt].filter(function (v) {
|
|
5681
|
+
return v !== null;
|
|
5682
|
+
}));
|
|
5625
5683
|
var value = useMemo(function () {
|
|
5626
5684
|
return {
|
|
5627
|
-
ready:
|
|
5685
|
+
ready: ready,
|
|
5628
5686
|
modelDownloadProgress: (documentDetectionModelDownloadProgress + focusModelDownloadProgress) / 2,
|
|
5687
|
+
modelLoadState: modelLoadState,
|
|
5688
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
5629
5689
|
modelError: modelError,
|
|
5630
5690
|
start: startDocumentDetection,
|
|
5631
5691
|
stop: stopDocumentDetection,
|
|
@@ -5643,7 +5703,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5643
5703
|
requiredDocumentType: requiredDocumentType,
|
|
5644
5704
|
setRequiredDocumentType: setRequiredDocumentType
|
|
5645
5705
|
};
|
|
5646
|
-
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress,
|
|
5706
|
+
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress, focusModelDownloadProgress, focusPredictionTime, getBestFrame, load, modelLoadState, modelError, modelWarmingStartedAt, onPredictionMade, ready, requiredDocumentType, resetBestFrame, setDocumentDetectionBoundaries, setThresholds, startDocumentDetection, stopDocumentDetection, thresholds]);
|
|
5647
5707
|
return /*#__PURE__*/React__default.createElement(IdCaptureModelsContext.Provider, {
|
|
5648
5708
|
value: value
|
|
5649
5709
|
}, /*#__PURE__*/React__default.createElement(InvisibleCanvas, {
|
|
@@ -7283,10 +7343,49 @@ function LoadingListItemIndicator(_a) {
|
|
|
7283
7343
|
}))))));
|
|
7284
7344
|
}
|
|
7285
7345
|
|
|
7346
|
+
function useLoadProgressHooks(_a) {
|
|
7347
|
+
var ready = _a.ready,
|
|
7348
|
+
modelLoadState = _a.modelLoadState,
|
|
7349
|
+
modelLoadProgress = _a.modelLoadProgress,
|
|
7350
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
7351
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
7352
|
+
onLoadingCompleted = _a.onLoadingCompleted;
|
|
7353
|
+
var onLoadingStartedRef = useRef(onLoadingStarted);
|
|
7354
|
+
useEffect(function () {
|
|
7355
|
+
onLoadingStartedRef.current = onLoadingStarted;
|
|
7356
|
+
}, [onLoadingStarted]);
|
|
7357
|
+
var onLoadingProgressRef = useRef(onLoadingProgress);
|
|
7358
|
+
useEffect(function () {
|
|
7359
|
+
onLoadingProgressRef.current = onLoadingProgress;
|
|
7360
|
+
}, [onLoadingProgress]);
|
|
7361
|
+
var onLoadingCompletedRef = useRef(onLoadingCompleted);
|
|
7362
|
+
useEffect(function () {
|
|
7363
|
+
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
7364
|
+
}, [onLoadingCompleted]);
|
|
7365
|
+
var loadingStarted = modelLoadState !== 'not-started';
|
|
7366
|
+
useEffect(function () {
|
|
7367
|
+
var _a;
|
|
7368
|
+
if (loadingStarted) (_a = onLoadingStartedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingStartedRef);
|
|
7369
|
+
}, [loadingStarted]);
|
|
7370
|
+
useEffect(function () {
|
|
7371
|
+
var _a;
|
|
7372
|
+
if (modelLoadProgress > 0) {
|
|
7373
|
+
(_a = onLoadingProgressRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingProgressRef, modelLoadProgress);
|
|
7374
|
+
}
|
|
7375
|
+
}, [modelLoadProgress]);
|
|
7376
|
+
useEffect(function () {
|
|
7377
|
+
var _a;
|
|
7378
|
+
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
7379
|
+
}, [ready]);
|
|
7380
|
+
}
|
|
7381
|
+
|
|
7286
7382
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
7287
7383
|
var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
|
|
7288
7384
|
var _b, _c, _d, _e, _f, _g;
|
|
7289
|
-
var
|
|
7385
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
7386
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
7387
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7388
|
+
onDismissed = _a.onDismissed,
|
|
7290
7389
|
onUserCancel = _a.onUserCancel,
|
|
7291
7390
|
instructions = _a.instructions,
|
|
7292
7391
|
_h = _a.rotateImage,
|
|
@@ -7304,7 +7403,9 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7304
7403
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
7305
7404
|
var _o = useIdCaptureModelsContext(),
|
|
7306
7405
|
modelsReady = _o.ready,
|
|
7307
|
-
|
|
7406
|
+
modelLoadState = _o.modelLoadState,
|
|
7407
|
+
modelDownloadProgress = _o.modelDownloadProgress,
|
|
7408
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt;
|
|
7308
7409
|
var _p = useCameraStore(),
|
|
7309
7410
|
cameraReady = _p.cameraReady,
|
|
7310
7411
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -7315,6 +7416,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7315
7416
|
setDismissed = _q[1];
|
|
7316
7417
|
var theme = useTheme();
|
|
7317
7418
|
assets.instructionImageUrl || (assets.instructionImageUrl = legacyInstructionImageUrl$1);
|
|
7419
|
+
var hasCustomInstructionGraphic = assets.instructionImageUrl !== legacyInstructionImageUrl$1;
|
|
7318
7420
|
var verbiage = useTranslations(rawVerbiage, {
|
|
7319
7421
|
headingText: 'Use your device camera to capture your ID',
|
|
7320
7422
|
useContinuityCameraText: 'Use your iPhone as a webcam',
|
|
@@ -7340,6 +7442,17 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7340
7442
|
};
|
|
7341
7443
|
}, [ready]);
|
|
7342
7444
|
var imageRef = useRef(null);
|
|
7445
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
7446
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
7447
|
+
var modelLoadProgress = modelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
7448
|
+
useLoadProgressHooks({
|
|
7449
|
+
ready: ready,
|
|
7450
|
+
modelLoadState: modelLoadState,
|
|
7451
|
+
modelLoadProgress: modelLoadProgress,
|
|
7452
|
+
onLoadingStarted: onLoadingStarted,
|
|
7453
|
+
onLoadingProgress: onLoadingProgress,
|
|
7454
|
+
onLoadingCompleted: onLoadingCompleted
|
|
7455
|
+
});
|
|
7343
7456
|
if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
7344
7457
|
if (cameraAccessDenied) {
|
|
7345
7458
|
return /*#__PURE__*/React__default.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -7369,7 +7482,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7369
7482
|
className: classNames.heading
|
|
7370
7483
|
}, verbiage.headingText)), /*#__PURE__*/React__default.createElement(LoadingOverlayImageContainer, {
|
|
7371
7484
|
className: classNames.imageContainer
|
|
7372
|
-
},
|
|
7485
|
+
}, hasCustomInstructionGraphic ? ( /*#__PURE__*/React__default.createElement(LoadingOverlayCustomLoadingGraphic, {
|
|
7373
7486
|
ref: imageRef,
|
|
7374
7487
|
alt: verbiage.headingText,
|
|
7375
7488
|
src: assets.instructionImageUrl,
|
|
@@ -7399,7 +7512,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7399
7512
|
}, /*#__PURE__*/React__default.createElement(ProgressBarBackground$1, {
|
|
7400
7513
|
className: classNames.progressBackground
|
|
7401
7514
|
}), /*#__PURE__*/React__default.createElement(LoadingOverlayProgressBar, {
|
|
7402
|
-
"$progress":
|
|
7515
|
+
"$progress": modelLoadProgress,
|
|
7403
7516
|
className: classNames.progressBar
|
|
7404
7517
|
}, /*#__PURE__*/React__default.createElement(ProgressIndicator$1, {
|
|
7405
7518
|
className: classNames.progressIndicator
|
|
@@ -7417,7 +7530,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7417
7530
|
}, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
|
|
7418
7531
|
className: classNames.loadingListItemIndicator,
|
|
7419
7532
|
state: sessionReady && modelsReady ? 'done' : 'running'
|
|
7420
|
-
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText :
|
|
7533
|
+
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelLoadState === 'downloading' ? "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)") : modelLoadState === 'warming' ? verbiage.modelsWarmingUpText : verbiage.modelsReadyText))), /*#__PURE__*/React__default.createElement(LoadingOverlayContinueButtonContainer, {
|
|
7421
7534
|
className: classNames.continueBtnContainer
|
|
7422
7535
|
}, (ready || ((_g = (_f = theme.idCapture) === null || _f === void 0 ? void 0 : _f.loadingOverlay) === null || _g === void 0 ? void 0 : _g.displayDisabledContinueBtn)) && ( /*#__PURE__*/React__default.createElement(ContinueButton$1, {
|
|
7423
7536
|
autoFocus: true,
|
|
@@ -7440,8 +7553,8 @@ var OverlayInner$1 = styled(LoadingOverlayInner)(templateObject_1$E || (template
|
|
|
7440
7553
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.textColor) !== null && _d !== void 0 ? _d : 'black';
|
|
7441
7554
|
});
|
|
7442
7555
|
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n position: absolute;\n bottom: 120px;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n bottom: 120px;\n width: 100%;\n display: flex;\n"])));
|
|
7443
|
-
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])));
|
|
7444
|
-
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n margin
|
|
7556
|
+
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"], ["\n display: flex;\n gap: 8px;\n align-items: center;\n padding: 12px 18px;\n margin: 0 auto;\n font-size: 14px;\n font-weight: bold;\n background: white;\n box-shadow:\n 0 1px 3px 0 rgb(0 0 0 / 0.1),\n 0 1px 2px -1px rgb(0 0 0 / 0.1);\n"])));
|
|
7557
|
+
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$g || (templateObject_4$g = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
7445
7558
|
var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
7446
7559
|
var _a, _b, _c, _d;
|
|
7447
7560
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarTextColor) !== null && _d !== void 0 ? _d : 'white';
|
|
@@ -7449,17 +7562,18 @@ var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templ
|
|
|
7449
7562
|
var _a, _b, _c, _d, _e, _f;
|
|
7450
7563
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
7451
7564
|
});
|
|
7452
|
-
var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$
|
|
7565
|
+
var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templateObject_6$8 || (templateObject_6$8 = __makeTemplateObject(["\n background: ", ";\n opacity: ", ";\n"], ["\n background: ", ";\n opacity: ", ";\n"])), function (props) {
|
|
7453
7566
|
var _a, _b, _c, _d;
|
|
7454
7567
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
7455
7568
|
}, function (props) {
|
|
7456
7569
|
var _a, _b, _c, _d;
|
|
7457
7570
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarBackgroundOpacity) !== null && _d !== void 0 ? _d : 0.75;
|
|
7458
7571
|
});
|
|
7459
|
-
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$
|
|
7460
|
-
var
|
|
7461
|
-
|
|
7462
|
-
|
|
7572
|
+
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$5 || (templateObject_7$5 = __makeTemplateObject(["\n background: ", ";\n"], ["\n background: ", ";\n"])), function (props) {
|
|
7573
|
+
var _a, _b, _c, _d;
|
|
7574
|
+
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-primary-500)';
|
|
7575
|
+
});
|
|
7576
|
+
var ContinueButton$1 = styled(LoaderButton)(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"])), function (props) {
|
|
7463
7577
|
var _a, _b, _c, _d, _e, _f;
|
|
7464
7578
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
7465
7579
|
}, function (props) {
|
|
@@ -7478,7 +7592,7 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObje
|
|
|
7478
7592
|
var _a, _b, _c, _d;
|
|
7479
7593
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
7480
7594
|
});
|
|
7481
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$
|
|
7595
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$8, templateObject_7$5, templateObject_8$3;
|
|
7482
7596
|
|
|
7483
7597
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
7484
7598
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -7729,8 +7843,8 @@ var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$u || (templ
|
|
|
7729
7843
|
var ImageRow = styled(OverlayImageRow)(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"], ["\n max-width: 100%;\n flex-direction: column;\n position: relative;\n width: 100%;\n"])));
|
|
7730
7844
|
var ImageCol$1 = styled.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"], ["\n width: 450px;\n max-width: 100%;\n max-height: none !important;\n"])));
|
|
7731
7845
|
var StyledImage = styled(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
7732
|
-
var DebugPre = styled.pre(templateObject_6$
|
|
7733
|
-
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$
|
|
7846
|
+
var DebugPre = styled.pre(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
|
|
7847
|
+
var templateObject_1$B, templateObject_2$u, templateObject_3$l, templateObject_4$f, templateObject_5$b, templateObject_6$7;
|
|
7734
7848
|
|
|
7735
7849
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
7736
7850
|
var _this = this;
|
|
@@ -8421,12 +8535,12 @@ var GuideRegion = styled.div(templateObject_4$d || (templateObject_4$d = __makeT
|
|
|
8421
8535
|
return props.$minHeight ? "min-height: ".concat(props.$minHeight, "px;") : "";
|
|
8422
8536
|
});
|
|
8423
8537
|
var Spacer = styled(GuideRegion)(templateObject_5$9 || (templateObject_5$9 = __makeTemplateObject(["\n display: block;\n width: auto;\n"], ["\n display: block;\n width: auto;\n"])));
|
|
8424
|
-
var GuideCenterRegion = styled.div(templateObject_6$
|
|
8538
|
+
var GuideCenterRegion = styled.div(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n ", "\n ", "\n transform-style: preserve-3d;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"], ["\n ", "\n ", "\n transform-style: preserve-3d;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"])), function (props) {
|
|
8425
8539
|
return props.$minWidth ? "min-width: ".concat(props.$minWidth, "px;") : "";
|
|
8426
8540
|
}, function (props) {
|
|
8427
8541
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
8428
8542
|
});
|
|
8429
|
-
var GuideCenterBorder = styled.div(templateObject_7$
|
|
8543
|
+
var GuideCenterBorder = styled.div(templateObject_7$4 || (templateObject_7$4 = __makeTemplateObject(["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"], ["\n box-sizing: border-box;\n border: ", ";\n display: flex;\n flex: 1;\n justify-content: center;\n max-height: 100%;\n min-height: 0;\n position: relative;\n ", "\n"])), function (props) {
|
|
8430
8544
|
var _a, _b;
|
|
8431
8545
|
return "".concat((_a = props.$borderWidth) !== null && _a !== void 0 ? _a : 4, "px solid ").concat((_b = props.$borderColor) !== null && _b !== void 0 ? _b : 'white');
|
|
8432
8546
|
}, function (props) {
|
|
@@ -8434,7 +8548,7 @@ var GuideCenterBorder = styled.div(templateObject_7$5 || (templateObject_7$5 = _
|
|
|
8434
8548
|
});
|
|
8435
8549
|
var GuideText = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
|
|
8436
8550
|
var GuideCenterInner = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
|
|
8437
|
-
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$
|
|
8551
|
+
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$6, templateObject_7$4, templateObject_8$2, templateObject_9$2;
|
|
8438
8552
|
|
|
8439
8553
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
8440
8554
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -9306,9 +9420,9 @@ var Instructions = styled.div(templateObject_5$8 || (templateObject_5$8 = __make
|
|
|
9306
9420
|
var _a, _b, _c;
|
|
9307
9421
|
return (_c = (_b = (_a = props.theme.documentCapture) === null || _a === void 0 ? void 0 : _a.instructions) === null || _b === void 0 ? void 0 : _b.maxHeight) !== null && _c !== void 0 ? _c : '8rem';
|
|
9308
9422
|
});
|
|
9309
|
-
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$
|
|
9310
|
-
var PreviewImage = styled.img(templateObject_7$
|
|
9311
|
-
var templateObject_1$r, templateObject_2$n, templateObject_3$h, templateObject_4$b, templateObject_5$8, templateObject_6$
|
|
9423
|
+
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$5 || (templateObject_6$5 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
9424
|
+
var PreviewImage = styled.img(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
9425
|
+
var templateObject_1$r, templateObject_2$n, templateObject_3$h, templateObject_4$b, templateObject_5$8, templateObject_6$5, templateObject_7$3;
|
|
9312
9426
|
|
|
9313
9427
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
9314
9428
|
var onSuccess = _a.onSuccess,
|
|
@@ -9584,8 +9698,8 @@ var Heading$8 = styled.h3(templateObject_2$m || (templateObject_2$m = __makeTemp
|
|
|
9584
9698
|
var Description$3 = styled.p(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
9585
9699
|
var Instruction = styled.p(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
9586
9700
|
var ImageCol = styled.div(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"])));
|
|
9587
|
-
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$
|
|
9588
|
-
var templateObject_1$q, templateObject_2$m, templateObject_3$g, templateObject_4$a, templateObject_5$7, templateObject_6$
|
|
9701
|
+
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
9702
|
+
var templateObject_1$q, templateObject_2$m, templateObject_3$g, templateObject_4$a, templateObject_5$7, templateObject_6$4;
|
|
9589
9703
|
|
|
9590
9704
|
function ScalingCameraFeed() {
|
|
9591
9705
|
var _a = useIdCaptureStore(),
|
|
@@ -9945,8 +10059,8 @@ var ScreenPanel = styled.div(templateObject_2$l || (templateObject_2$l = __makeT
|
|
|
9945
10059
|
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n background: white;\n padding: 80px 0;\n\n @media (max-height: 1000px) {\n padding: 40px 0;\n }\n"], ["\n background: white;\n padding: 80px 0;\n\n @media (max-height: 1000px) {\n padding: 40px 0;\n }\n"])));
|
|
9946
10060
|
var ScreenPanelHeading = styled.h3(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
9947
10061
|
var ScreenActionsBar = styled.div(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"])));
|
|
9948
|
-
var DashedSeparator = styled.div(templateObject_6$
|
|
9949
|
-
var OrWrapper = styled.div(templateObject_7$
|
|
10062
|
+
var DashedSeparator = styled.div(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
10063
|
+
var OrWrapper = styled.div(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
9950
10064
|
var UploadIdBackHelpText = styled.p(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"], ["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"])));
|
|
9951
10065
|
var Button = styled(WideBorderButton)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"], ["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"])));
|
|
9952
10066
|
var Modal = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
|
|
@@ -10226,17 +10340,20 @@ function humanFileSize(bytes, si, dp) {
|
|
|
10226
10340
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
10227
10341
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
10228
10342
|
}
|
|
10229
|
-
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$
|
|
10343
|
+
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$3, templateObject_7$2, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
10230
10344
|
|
|
10231
10345
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
10232
10346
|
var _b, _c, _d, _e, _f;
|
|
10233
|
-
var
|
|
10347
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
10348
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
10349
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
10350
|
+
onSuccess = _a.onSuccess,
|
|
10234
10351
|
onExitCapture = _a.onExitCapture,
|
|
10235
10352
|
onUserCancel = _a.onUserCancel,
|
|
10353
|
+
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
10236
10354
|
_g = _a.loadingOverlayMode,
|
|
10237
10355
|
loadingOverlayMode = _g === void 0 ? 'default' : _g,
|
|
10238
10356
|
customOverlayContent = _a.customOverlayContent,
|
|
10239
|
-
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
10240
10357
|
precapturedDocuments = _a.precapturedDocuments,
|
|
10241
10358
|
_h = _a.captureRequirement,
|
|
10242
10359
|
captureRequirement = _h === void 0 ? 'idCardOrPassport' : _h,
|
|
@@ -10582,6 +10699,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10582
10699
|
colors: colors.loadingOverlay,
|
|
10583
10700
|
verbiage: verbiage.loadingOverlay,
|
|
10584
10701
|
onUserCancel: onUserCancel,
|
|
10702
|
+
onLoadingStarted: onLoadingStarted,
|
|
10703
|
+
onLoadingProgress: onLoadingProgress,
|
|
10704
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
10585
10705
|
onDismissed: function onDismissed() {
|
|
10586
10706
|
setOverlayDismissed(true);
|
|
10587
10707
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -11239,6 +11359,8 @@ var SelfieGuidanceModelsContext = /*#__PURE__*/createContext({
|
|
|
11239
11359
|
},
|
|
11240
11360
|
ready: false,
|
|
11241
11361
|
error: null,
|
|
11362
|
+
modelLoadState: 'not-started',
|
|
11363
|
+
modelWarmingStartedAt: null,
|
|
11242
11364
|
modelDownloadProgress: 0
|
|
11243
11365
|
});
|
|
11244
11366
|
function SelfieGuidanceModelsProvider(_a) {
|
|
@@ -11270,7 +11392,9 @@ function SelfieGuidanceModelsProvider(_a) {
|
|
|
11270
11392
|
videoRef: videoRef
|
|
11271
11393
|
}),
|
|
11272
11394
|
ready = _f.ready,
|
|
11395
|
+
modelLoadState = _f.modelLoadState,
|
|
11273
11396
|
modelDownloadProgress = _f.modelDownloadProgress,
|
|
11397
|
+
modelWarmingStartedAt = _f.modelWarmingStartedAt,
|
|
11274
11398
|
modelError = _f.modelError;
|
|
11275
11399
|
var _g = useFrameLoop(useCallback(function () {
|
|
11276
11400
|
return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -11332,9 +11456,11 @@ function SelfieGuidanceModelsProvider(_a) {
|
|
|
11332
11456
|
canvasRef: canvasRef,
|
|
11333
11457
|
onPredictionMade: onPredictionMade,
|
|
11334
11458
|
error: modelError,
|
|
11335
|
-
modelDownloadProgress: modelDownloadProgress
|
|
11459
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
11460
|
+
modelLoadState: modelLoadState,
|
|
11461
|
+
modelWarmingStartedAt: modelWarmingStartedAt
|
|
11336
11462
|
};
|
|
11337
|
-
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress]);
|
|
11463
|
+
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress, modelLoadState, modelWarmingStartedAt]);
|
|
11338
11464
|
return /*#__PURE__*/React.createElement(SelfieGuidanceModelsContext.Provider, {
|
|
11339
11465
|
value: value
|
|
11340
11466
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -12301,7 +12427,10 @@ var templateObject_1$h, templateObject_2$e;
|
|
|
12301
12427
|
var legacyInstructionImageUrl = "".concat(DEFAULT_CDN_URL, "/Selfie-Image-1.png");
|
|
12302
12428
|
var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDefault(_a) {
|
|
12303
12429
|
var _b, _c;
|
|
12304
|
-
var
|
|
12430
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
12431
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
12432
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12433
|
+
onDismissed = _a.onDismissed,
|
|
12305
12434
|
onUserCancel = _a.onUserCancel,
|
|
12306
12435
|
customOverlayContent = _a.customOverlayContent,
|
|
12307
12436
|
_d = _a.waitForIdCaptureModels,
|
|
@@ -12327,8 +12456,9 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12327
12456
|
cameraAccessDenied = _j.cameraAccessDenied,
|
|
12328
12457
|
microphoneAccessDenied = _j.microphoneAccessDenied;
|
|
12329
12458
|
var _k = useSelfieGuidanceModelsContext(),
|
|
12330
|
-
|
|
12331
|
-
modelDownloadProgress = _k.modelDownloadProgress
|
|
12459
|
+
modelLoadState = _k.modelLoadState,
|
|
12460
|
+
modelDownloadProgress = _k.modelDownloadProgress,
|
|
12461
|
+
modelWarmingStartedAt = _k.modelWarmingStartedAt;
|
|
12332
12462
|
var idCaptureModelsContext = useContext(IdCaptureModelsContext);
|
|
12333
12463
|
var theme = useTheme();
|
|
12334
12464
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -12355,6 +12485,19 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12355
12485
|
});
|
|
12356
12486
|
}, 3000);
|
|
12357
12487
|
}, []);
|
|
12488
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
12489
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
12490
|
+
var allModelsReady = modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
12491
|
+
var ready = sessionReady && allModelsReady && cameraReady;
|
|
12492
|
+
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
12493
|
+
useLoadProgressHooks({
|
|
12494
|
+
ready: ready,
|
|
12495
|
+
modelLoadState: modelLoadState,
|
|
12496
|
+
modelLoadProgress: modelLoadProgress,
|
|
12497
|
+
onLoadingStarted: onLoadingStarted,
|
|
12498
|
+
onLoadingProgress: onLoadingProgress,
|
|
12499
|
+
onLoadingCompleted: onLoadingCompleted
|
|
12500
|
+
});
|
|
12358
12501
|
var _m = useState(false),
|
|
12359
12502
|
dismissed = _m[0],
|
|
12360
12503
|
setDismissed = _m[1];
|
|
@@ -12375,8 +12518,6 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12375
12518
|
verbiage: rawVerbiage.microphoneAccessDenied
|
|
12376
12519
|
});
|
|
12377
12520
|
}
|
|
12378
|
-
var allModelsReady = modelsReady && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
12379
|
-
var ready = sessionReady && allModelsReady && cameraReady;
|
|
12380
12521
|
return /*#__PURE__*/React__default.createElement(OverlayContainer, {
|
|
12381
12522
|
className: classNames.container
|
|
12382
12523
|
}, /*#__PURE__*/React__default.createElement(OverlayInner, {
|
|
@@ -12390,7 +12531,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12390
12531
|
className: classNames.heading
|
|
12391
12532
|
}, headingText)), /*#__PURE__*/React__default.createElement(LoadingOverlayImageContainer, {
|
|
12392
12533
|
className: classNames.imageContainer
|
|
12393
|
-
}, (assets === null || assets === void 0 ? void 0 : assets.instructionImageUrl) && assets.instructionImageUrl !== legacyInstructionImageUrl ? ( /*#__PURE__*/React__default.createElement(
|
|
12534
|
+
}, (assets === null || assets === void 0 ? void 0 : assets.instructionImageUrl) && assets.instructionImageUrl !== legacyInstructionImageUrl ? ( /*#__PURE__*/React__default.createElement(LoadingOverlayCustomLoadingGraphic, {
|
|
12394
12535
|
className: classNames.image,
|
|
12395
12536
|
alt: verbiage.headingText,
|
|
12396
12537
|
src: assets.instructionImageUrl
|
|
@@ -12403,7 +12544,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12403
12544
|
}, /*#__PURE__*/React__default.createElement(ProgressBarBackground, {
|
|
12404
12545
|
className: classNames.progressBackground
|
|
12405
12546
|
}), /*#__PURE__*/React__default.createElement(LoadingOverlayProgressBar, {
|
|
12406
|
-
"$progress":
|
|
12547
|
+
"$progress": modelLoadProgress,
|
|
12407
12548
|
className: classNames.progressBar
|
|
12408
12549
|
}, /*#__PURE__*/React__default.createElement(ProgressIndicator, {
|
|
12409
12550
|
className: classNames.progressIndicator
|
|
@@ -12421,7 +12562,7 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12421
12562
|
}, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
|
|
12422
12563
|
className: classNames.loadingListItemIndicator,
|
|
12423
12564
|
state: sessionReady && allModelsReady ? 'done' : 'running'
|
|
12424
|
-
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(
|
|
12565
|
+
}), !sessionReady ? verbiage.sessionCheckingText : allModelsReady ? verbiage.modelsReadyText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)")))), /*#__PURE__*/React__default.createElement(LoadingOverlayContinueButtonContainer, {
|
|
12425
12566
|
className: classNames.continueBtnContainer
|
|
12426
12567
|
}, (ready || ((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.displayDisabledContinueBtn)) && ( /*#__PURE__*/React__default.createElement(ContinueButton, {
|
|
12427
12568
|
autoFocus: true,
|
|
@@ -12461,9 +12602,7 @@ var ProgressIndicator = styled(LoadingOverlayProgressIndicator)(templateObject_4
|
|
|
12461
12602
|
var _a, _b, _c, _d;
|
|
12462
12603
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-positive-600)';
|
|
12463
12604
|
});
|
|
12464
|
-
var
|
|
12465
|
-
var ContinueButtonContainer = styled.div(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
12466
|
-
var ContinueButton = styled(LoaderButton)(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
12605
|
+
var ContinueButton = styled(LoaderButton)(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n box-shadow: none;\n }\n"])), function (props) {
|
|
12467
12606
|
var _a, _b, _c, _d, _e, _f;
|
|
12468
12607
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.selfieCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
12469
12608
|
}, function (props) {
|
|
@@ -12482,7 +12621,7 @@ var ContinueButton = styled(LoaderButton)(templateObject_7$2 || (templateObject_
|
|
|
12482
12621
|
var _a, _b, _c, _d;
|
|
12483
12622
|
return (_d = (_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.selfieCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.continueBtnBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
12484
12623
|
});
|
|
12485
|
-
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4
|
|
12624
|
+
var templateObject_1$g, templateObject_2$d, templateObject_3$b, templateObject_4$6, templateObject_5$4;
|
|
12486
12625
|
|
|
12487
12626
|
var components = {
|
|
12488
12627
|
"default": SelfieCaptureLoadingOverlayDefault,
|
|
@@ -12499,7 +12638,10 @@ var SelfieCaptureLoadingOverlay = function SelfieCaptureLoadingOverlay(_a) {
|
|
|
12499
12638
|
|
|
12500
12639
|
var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
12501
12640
|
var _b;
|
|
12502
|
-
var
|
|
12641
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
12642
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
12643
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12644
|
+
onComplete = _a.onComplete,
|
|
12503
12645
|
onSuccess = _a.onSuccess,
|
|
12504
12646
|
onFailure = _a.onFailure,
|
|
12505
12647
|
onTimeout = _a.onTimeout,
|
|
@@ -12766,6 +12908,9 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12766
12908
|
classNames: classNames.loadingOverlay,
|
|
12767
12909
|
colors: colors.loadingOverlay,
|
|
12768
12910
|
verbiage: verbiage.loadingOverlay,
|
|
12911
|
+
onLoadingStarted: onLoadingStarted,
|
|
12912
|
+
onLoadingProgress: onLoadingProgress,
|
|
12913
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
12769
12914
|
onUserCancel: onUserCancel,
|
|
12770
12915
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
12771
12916
|
waitForIdCaptureModels: waitForIdCaptureModels
|
|
@@ -13854,7 +13999,10 @@ var StyledVideo$1 = styled.video(templateObject_1$9 || (templateObject_1$9 = __m
|
|
|
13854
13999
|
var templateObject_1$9;
|
|
13855
14000
|
|
|
13856
14001
|
var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
13857
|
-
var
|
|
14002
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
14003
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
14004
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14005
|
+
onComplete = _a.onComplete,
|
|
13858
14006
|
onVideoCaptured = _a.onVideoCaptured,
|
|
13859
14007
|
onRetryClicked = _a.onRetryClicked,
|
|
13860
14008
|
onExitCapture = _a.onExitCapture,
|
|
@@ -14006,6 +14154,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14006
14154
|
return /*#__PURE__*/React__default.createElement(FaceLivenessWizard, _assign({
|
|
14007
14155
|
key: "face-liveness-".concat(attempt)
|
|
14008
14156
|
}, faceLivenessProps, {
|
|
14157
|
+
onLoadingStarted: onLoadingStarted,
|
|
14158
|
+
onLoadingProgress: onLoadingProgress,
|
|
14159
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
14009
14160
|
onSuccess: onFaceCaptureSuccess,
|
|
14010
14161
|
onExitCapture: onExitCapture,
|
|
14011
14162
|
onUserCancel: onUserCancel,
|
|
@@ -14951,6 +15102,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14951
15102
|
_s = _a.idCaptureLoadingOverlayMode,
|
|
14952
15103
|
idCaptureLoadingOverlayMode = _s === void 0 ? 'default' : _s,
|
|
14953
15104
|
customOverlayContent = _a.customOverlayContent,
|
|
15105
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
15106
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
15107
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14954
15108
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
14955
15109
|
_t = _a.idDocumentType,
|
|
14956
15110
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -15108,6 +15262,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15108
15262
|
key: "id-capture-".concat(attempt),
|
|
15109
15263
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15110
15264
|
customOverlayContent: customOverlayContent,
|
|
15265
|
+
onLoadingStarted: onLoadingStarted,
|
|
15266
|
+
onLoadingProgress: onLoadingProgress,
|
|
15267
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15111
15268
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15112
15269
|
silentFallback: silentFallback,
|
|
15113
15270
|
guideImages: idCaptureGuideImages
|
|
@@ -15132,6 +15289,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15132
15289
|
key: "face-liveness-".concat(attempt),
|
|
15133
15290
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
15134
15291
|
customOverlayContent: customOverlayContent,
|
|
15292
|
+
onLoadingStarted: onLoadingStarted,
|
|
15293
|
+
onLoadingProgress: onLoadingProgress,
|
|
15294
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15135
15295
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15136
15296
|
silentFallback: silentFallback
|
|
15137
15297
|
}, faceLivenessProps, {
|
|
@@ -15730,6 +15890,9 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15730
15890
|
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
15731
15891
|
_u = _a.allowUploadingDocumentsFromStorage,
|
|
15732
15892
|
allowUploadingDocumentsFromStorage = _u === void 0 ? false : _u,
|
|
15893
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
15894
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
15895
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15733
15896
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
15734
15897
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15735
15898
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15771,6 +15934,9 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15771
15934
|
useDebugLogging(debugMode);
|
|
15772
15935
|
var idCaptureProps = useMemo(function () {
|
|
15773
15936
|
return {
|
|
15937
|
+
onLoadingStarted: onLoadingStarted,
|
|
15938
|
+
onLoadingProgress: onLoadingProgress,
|
|
15939
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15774
15940
|
onExitCapture: onExitCapture,
|
|
15775
15941
|
onUserCancel: onUserCancel,
|
|
15776
15942
|
onModelError: onModelError,
|
|
@@ -15800,7 +15966,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15800
15966
|
verbiage: verbiage,
|
|
15801
15967
|
debugMode: debugMode
|
|
15802
15968
|
};
|
|
15803
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15969
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15804
15970
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
15805
15971
|
return {
|
|
15806
15972
|
documents: captureAdditionalDocuments,
|
|
@@ -15929,6 +16095,9 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15929
16095
|
_h = _a.skipSuccessScreen,
|
|
15930
16096
|
skipSuccessScreen = _h === void 0 ? false : _h,
|
|
15931
16097
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
16098
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16099
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16100
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15932
16101
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15933
16102
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
15934
16103
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -15965,6 +16134,9 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15965
16134
|
timeoutDurationMs: timeoutDurationMs,
|
|
15966
16135
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
15967
16136
|
skipSuccessScreen: skipSuccessScreen,
|
|
16137
|
+
onLoadingStarted: onLoadingStarted,
|
|
16138
|
+
onLoadingProgress: onLoadingProgress,
|
|
16139
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15968
16140
|
onComplete: onComplete,
|
|
15969
16141
|
onSuccess: onApproved,
|
|
15970
16142
|
onDenied: onDenied,
|
|
@@ -15978,7 +16150,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15978
16150
|
verbiage: verbiage,
|
|
15979
16151
|
debugMode: debugMode
|
|
15980
16152
|
};
|
|
15981
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16153
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
15982
16154
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
15983
16155
|
sessionId: sessionId,
|
|
15984
16156
|
authUrl: authUrl
|
|
@@ -16101,6 +16273,9 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16101
16273
|
enableOverrideWrongDocumentTypeDialog = _w === void 0 ? false : _w,
|
|
16102
16274
|
_x = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
16103
16275
|
allowOverrideWrongDocumentTypeAfterMs = _x === void 0 ? 8000 : _x,
|
|
16276
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16277
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16278
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16104
16279
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16105
16280
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
16106
16281
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -16145,6 +16320,9 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16145
16320
|
useDebugLogging(debugMode);
|
|
16146
16321
|
var idCaptureProps = useMemo(function () {
|
|
16147
16322
|
return {
|
|
16323
|
+
onLoadingStarted: onLoadingStarted,
|
|
16324
|
+
onLoadingProgress: onLoadingProgress,
|
|
16325
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16148
16326
|
onExitCapture: onExitCapture,
|
|
16149
16327
|
onUserCancel: onUserCancel,
|
|
16150
16328
|
onModelError: onIdCaptureModelError,
|
|
@@ -16172,9 +16350,12 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16172
16350
|
skipSuccessScreen: skipSuccessScreen,
|
|
16173
16351
|
debugMode: debugMode
|
|
16174
16352
|
};
|
|
16175
|
-
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
|
|
16353
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureAllowUploadingDocumentsFromStorage, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, idCaptureForceFallbackMode, separateIdCardCaptureSequence, skipSuccessScreen, debugMode]);
|
|
16176
16354
|
var faceLivenessProps = useMemo(function () {
|
|
16177
16355
|
return {
|
|
16356
|
+
onLoadingStarted: onLoadingStarted,
|
|
16357
|
+
onLoadingProgress: onLoadingProgress,
|
|
16358
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16178
16359
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
16179
16360
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
16180
16361
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -16192,7 +16373,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16192
16373
|
verbiage: verbiage.faceLiveness,
|
|
16193
16374
|
debugMode: debugMode
|
|
16194
16375
|
};
|
|
16195
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16376
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16196
16377
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
16197
16378
|
return {
|
|
16198
16379
|
documents: captureAdditionalDocuments,
|
|
@@ -16368,6 +16549,9 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16368
16549
|
allowUploadingDocumentsFromStorage = _w === void 0 ? false : _w,
|
|
16369
16550
|
_x = _a.separateIdCardCaptureSequence,
|
|
16370
16551
|
separateIdCardCaptureSequence = _x === void 0 ? false : _x,
|
|
16552
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
16553
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
16554
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16371
16555
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16372
16556
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
16373
16557
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -16414,6 +16598,9 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16414
16598
|
useDebugLogging(debugMode);
|
|
16415
16599
|
var idCaptureProps = useMemo(function () {
|
|
16416
16600
|
return {
|
|
16601
|
+
onLoadingStarted: onLoadingStarted,
|
|
16602
|
+
onLoadingProgress: onLoadingProgress,
|
|
16603
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16417
16604
|
assets: assets.idCapture,
|
|
16418
16605
|
classNames: classNames.idCapture,
|
|
16419
16606
|
colors: colors.idCapture,
|
|
@@ -16441,9 +16628,12 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16441
16628
|
skipSuccessScreen: skipSuccessScreen,
|
|
16442
16629
|
debugMode: debugMode
|
|
16443
16630
|
};
|
|
16444
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
16631
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, idCaptureForceFallbackMode, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, allowUploadingDocumentsFromStorage, separateIdCardCaptureSequence, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
16445
16632
|
var faceLivenessProps = useMemo(function () {
|
|
16446
16633
|
return {
|
|
16634
|
+
onLoadingStarted: onLoadingStarted,
|
|
16635
|
+
onLoadingProgress: onLoadingProgress,
|
|
16636
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16447
16637
|
onExitCapture: onExitCapture,
|
|
16448
16638
|
onExitAfterFailure: onExitAfterFailure,
|
|
16449
16639
|
onUserCancel: onUserCancel,
|
|
@@ -16460,7 +16650,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16460
16650
|
verbiage: verbiage.faceLiveness,
|
|
16461
16651
|
debugMode: debugMode
|
|
16462
16652
|
};
|
|
16463
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16653
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16464
16654
|
var videoIdCaptureProps = useMemo(function () {
|
|
16465
16655
|
return _assign({
|
|
16466
16656
|
onExitCapture: onExitCapture,
|
|
@@ -16875,7 +17065,10 @@ var templateObject_1$2, templateObject_2$2, templateObject_3$2;
|
|
|
16875
17065
|
|
|
16876
17066
|
var ALLOWED_RETRIES$2 = 2;
|
|
16877
17067
|
var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
16878
|
-
var
|
|
17068
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
17069
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17070
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17071
|
+
onComplete = _a.onComplete,
|
|
16879
17072
|
onCustomerMatched = _a.onCustomerMatched,
|
|
16880
17073
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
16881
17074
|
onExitCapture = _a.onExitCapture,
|
|
@@ -17005,7 +17198,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17005
17198
|
onExitAfterFailure === null || onExitAfterFailure === void 0 ? void 0 : onExitAfterFailure();
|
|
17006
17199
|
},
|
|
17007
17200
|
onRetryClick: function onRetryClick() {
|
|
17008
|
-
setAttempt(function (n) {
|
|
17201
|
+
return setAttempt(function (n) {
|
|
17009
17202
|
return n + 1;
|
|
17010
17203
|
});
|
|
17011
17204
|
}
|
|
@@ -17020,9 +17213,12 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17020
17213
|
classNames: classNames.loadingOverlay,
|
|
17021
17214
|
colors: colors.loadingOverlay,
|
|
17022
17215
|
verbiage: verbiage.loadingOverlay,
|
|
17216
|
+
onLoadingStarted: onLoadingStarted,
|
|
17217
|
+
onLoadingProgress: onLoadingProgress,
|
|
17218
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17023
17219
|
onUserCancel: onUserCancel,
|
|
17024
17220
|
onDismissed: function onDismissed() {
|
|
17025
|
-
setCaptureState('CAPTURING');
|
|
17221
|
+
return setCaptureState('CAPTURING');
|
|
17026
17222
|
}
|
|
17027
17223
|
}));
|
|
17028
17224
|
};
|
|
@@ -17064,6 +17260,9 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17064
17260
|
classNames = _a.classNames,
|
|
17065
17261
|
colors = _a.colors,
|
|
17066
17262
|
verbiage = _a.verbiage,
|
|
17263
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
17264
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17265
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17067
17266
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17068
17267
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17069
17268
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17132,6 +17331,9 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17132
17331
|
}, /*#__PURE__*/React__default.createElement(SdkPage, {
|
|
17133
17332
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container
|
|
17134
17333
|
}, /*#__PURE__*/React__default.createElement(CustomerVerificationWizard, {
|
|
17334
|
+
onLoadingStarted: onLoadingStarted,
|
|
17335
|
+
onLoadingProgress: onLoadingProgress,
|
|
17336
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17135
17337
|
onComplete: onComplete,
|
|
17136
17338
|
onCustomerMatched: onCustomerMatched,
|
|
17137
17339
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -17445,7 +17647,10 @@ var templateObject_1, templateObject_2, templateObject_3;
|
|
|
17445
17647
|
|
|
17446
17648
|
var ALLOWED_RETRIES = 2;
|
|
17447
17649
|
var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
17448
|
-
var
|
|
17650
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
17651
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17652
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17653
|
+
onComplete = _a.onComplete,
|
|
17449
17654
|
onCustomerMatched = _a.onCustomerMatched,
|
|
17450
17655
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
17451
17656
|
onExitCapture = _a.onExitCapture,
|
|
@@ -17590,6 +17795,9 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
17590
17795
|
classNames: classNames.loadingOverlay,
|
|
17591
17796
|
colors: colors.loadingOverlay,
|
|
17592
17797
|
verbiage: verbiage.loadingOverlay,
|
|
17798
|
+
onLoadingStarted: onLoadingStarted,
|
|
17799
|
+
onLoadingProgress: onLoadingProgress,
|
|
17800
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17593
17801
|
onUserCancel: onUserCancel,
|
|
17594
17802
|
onDismissed: function onDismissed() {
|
|
17595
17803
|
setCaptureState('CAPTURING');
|
|
@@ -17627,6 +17835,9 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
17627
17835
|
modelLoadTimeoutMs = _e === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _e,
|
|
17628
17836
|
_f = _a.skipSuccessScreen,
|
|
17629
17837
|
skipSuccessScreen = _f === void 0 ? false : _f,
|
|
17838
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
17839
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17840
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17630
17841
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17631
17842
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17632
17843
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17700,6 +17911,9 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
17700
17911
|
}, /*#__PURE__*/React__default.createElement(SdkPage, {
|
|
17701
17912
|
className: classNames === null || classNames === void 0 ? void 0 : classNames.container
|
|
17702
17913
|
}, /*#__PURE__*/React__default.createElement(CustomerIdentificationWizard, {
|
|
17914
|
+
onLoadingStarted: onLoadingStarted,
|
|
17915
|
+
onLoadingProgress: onLoadingProgress,
|
|
17916
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17703
17917
|
onComplete: onComplete,
|
|
17704
17918
|
onCustomerMatched: onCustomerMatched,
|
|
17705
17919
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -17731,6 +17945,9 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17731
17945
|
documentServiceUrl = _a.documentServiceUrl,
|
|
17732
17946
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
17733
17947
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
17948
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
17949
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
17950
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17734
17951
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17735
17952
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17736
17953
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17810,6 +18027,9 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17810
18027
|
onCameraTamperingDetected: onCameraTamperingDetected,
|
|
17811
18028
|
videoSignatureCaptureProps: useMemo(function () {
|
|
17812
18029
|
return {
|
|
18030
|
+
onLoadingStarted: onLoadingStarted,
|
|
18031
|
+
onLoadingProgress: onLoadingProgress,
|
|
18032
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17813
18033
|
customOverlayContent: customOverlayContent,
|
|
17814
18034
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
17815
18035
|
loadingOverlayMode: loadingOverlayMode,
|
|
@@ -17828,7 +18048,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17828
18048
|
onModelError: onModelError,
|
|
17829
18049
|
onUserCancel: onUserCancel
|
|
17830
18050
|
};
|
|
17831
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
18051
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17832
18052
|
})))));
|
|
17833
18053
|
};
|
|
17834
18054
|
|
|
@@ -17866,6 +18086,9 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17866
18086
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
17867
18087
|
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
17868
18088
|
useDocumentServiceForLivenessChecks = _a.useDocumentServiceForLivenessChecks,
|
|
18089
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
18090
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
18091
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17869
18092
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17870
18093
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
17871
18094
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -17950,6 +18173,9 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17950
18173
|
useDebugLogging(debugMode);
|
|
17951
18174
|
var videoIdCaptureProps = useMemo(function () {
|
|
17952
18175
|
return {
|
|
18176
|
+
onLoadingStarted: onLoadingStarted,
|
|
18177
|
+
onLoadingProgress: onLoadingProgress,
|
|
18178
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
17953
18179
|
idCaptureProps: idCaptureProps,
|
|
17954
18180
|
faceLivenessProps: faceLivenessProps,
|
|
17955
18181
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -17982,7 +18208,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17982
18208
|
verbiage: verbiage,
|
|
17983
18209
|
debugMode: debugMode
|
|
17984
18210
|
};
|
|
17985
|
-
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
18211
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
17986
18212
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
17987
18213
|
return {
|
|
17988
18214
|
documents: captureAdditionalDocuments,
|
|
@@ -18105,6 +18331,9 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18105
18331
|
modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
|
|
18106
18332
|
_g = _a.skipSuccessScreen,
|
|
18107
18333
|
skipSuccessScreen = _g === void 0 ? false : _g,
|
|
18334
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
18335
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
18336
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18108
18337
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18109
18338
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
18110
18339
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -18147,6 +18376,9 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18147
18376
|
useDebugLogging(debugMode);
|
|
18148
18377
|
var faceLivenessProps = useMemo(function () {
|
|
18149
18378
|
return {
|
|
18379
|
+
onLoadingStarted: onLoadingStarted,
|
|
18380
|
+
onLoadingProgress: onLoadingProgress,
|
|
18381
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
18150
18382
|
onExitCapture: onExitCapture,
|
|
18151
18383
|
onUserCancel: onUserCancel,
|
|
18152
18384
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -18162,7 +18394,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18162
18394
|
verbiage: verbiage.faceLiveness,
|
|
18163
18395
|
debugMode: debugMode
|
|
18164
18396
|
};
|
|
18165
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18397
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18166
18398
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
18167
18399
|
return {
|
|
18168
18400
|
documents: captureAdditionalDocuments,
|