idmission-web-sdk 2.3.5 → 2.3.7
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/SelfieProgressPreview.d.ts +3 -3
- package/dist/components/common/SelfieProgressPreview.d.ts.map +1 -1
- package/dist/components/common/overlay.d.ts +10 -4
- package/dist/components/common/overlay.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 +3 -5
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/fallback_flows/SelfieCapture.d.ts +1 -1
- package/dist/components/fallback_flows/SelfieCapture.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/IdCapture.d.ts +1 -1
- package/dist/components/id_capture/IdCapture.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +2 -2
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.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/IdCaptureOrUploadScreen.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/read_text_prompt/ReadTextPrompt.d.ts +2 -2
- package/dist/components/read_text_prompt/ReadTextPrompt.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCapture.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/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts +6 -5
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts +10 -7
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +5 -4
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/locales/index.d.ts +5 -4
- package/dist/lib/locales/index.d.ts.map +1 -1
- package/dist/lib/locales/render.d.ts +3 -0
- package/dist/lib/locales/render.d.ts.map +1 -0
- 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/sdk2.cjs.development.js +339 -206
- 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 +339 -206
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +339 -206
- 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 +3 -3
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.7';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -487,7 +487,7 @@ 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$
|
|
490
|
+
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$4 || (templateObject_9$4 = __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
491
|
var LoadingOverlayHeader = styled.div(templateObject_10$2 || (templateObject_10$2 = __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';
|
|
@@ -496,17 +496,23 @@ 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 templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$7, templateObject_8$4, templateObject_9$
|
|
515
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$7, templateObject_8$4, templateObject_9$4, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20;
|
|
510
516
|
|
|
511
517
|
var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
|
|
512
518
|
var accessBlockedImageUrl = _a.accessBlockedImageUrl;
|
|
@@ -2472,19 +2478,23 @@ function useLoadFocusModel(_a) {
|
|
|
2472
2478
|
videoRef = _a.videoRef,
|
|
2473
2479
|
_d = _a.shouldLoadModels,
|
|
2474
2480
|
shouldLoadModels = _d === void 0 ? true : _d;
|
|
2475
|
-
var _e = useState(
|
|
2476
|
-
|
|
2477
|
-
|
|
2481
|
+
var _e = useState('not-started'),
|
|
2482
|
+
modelLoadState = _e[0],
|
|
2483
|
+
setModelLoadState = _e[1];
|
|
2478
2484
|
var _f = useState(0),
|
|
2479
2485
|
modelDownloadProgress = _f[0],
|
|
2480
2486
|
setModelDownloadProgress = _f[1];
|
|
2481
2487
|
var _g = useState(null),
|
|
2482
|
-
|
|
2483
|
-
|
|
2488
|
+
modelWarmingStartedAt = _g[0],
|
|
2489
|
+
setModelWarmingStartedAt = _g[1];
|
|
2490
|
+
var _h = useState(null),
|
|
2491
|
+
modelError = _h[0],
|
|
2492
|
+
setModelError = _h[1];
|
|
2484
2493
|
useEffect(function loadModel() {
|
|
2485
2494
|
var _this = this;
|
|
2486
2495
|
if (!shouldLoadModels) return;
|
|
2487
|
-
|
|
2496
|
+
setModelLoadState('downloading');
|
|
2497
|
+
setModelWarmingStartedAt(null);
|
|
2488
2498
|
function handleDownloadProgress(event) {
|
|
2489
2499
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
2490
2500
|
}
|
|
@@ -2501,6 +2511,8 @@ function useLoadFocusModel(_a) {
|
|
|
2501
2511
|
case 0:
|
|
2502
2512
|
setModelDownloadProgress(100);
|
|
2503
2513
|
clearTimeout(modelLoadTimeout);
|
|
2514
|
+
setModelLoadState('warming');
|
|
2515
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
2504
2516
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2505
2517
|
cancelled = false;
|
|
2506
2518
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2513,7 +2525,7 @@ function useLoadFocusModel(_a) {
|
|
|
2513
2525
|
setTimeout(function () {
|
|
2514
2526
|
if (cancelled) return;
|
|
2515
2527
|
loadedModel.classifyForVideo(videoRef.current, performance.now());
|
|
2516
|
-
|
|
2528
|
+
setModelLoadState('ready');
|
|
2517
2529
|
}, 500);
|
|
2518
2530
|
return [2 /*return*/];
|
|
2519
2531
|
}
|
|
@@ -2521,6 +2533,7 @@ function useLoadFocusModel(_a) {
|
|
|
2521
2533
|
});
|
|
2522
2534
|
})["catch"](function (e) {
|
|
2523
2535
|
setModelError(e);
|
|
2536
|
+
setModelLoadState('error');
|
|
2524
2537
|
})["finally"](function () {
|
|
2525
2538
|
clearTimeout(modelLoadTimeout);
|
|
2526
2539
|
});
|
|
@@ -2535,11 +2548,15 @@ function useLoadFocusModel(_a) {
|
|
|
2535
2548
|
useEffect(function handleModelError() {
|
|
2536
2549
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
2537
2550
|
}, [modelError, onModelError]);
|
|
2538
|
-
return {
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2551
|
+
return useMemo(function () {
|
|
2552
|
+
return {
|
|
2553
|
+
ready: modelLoadState === 'ready',
|
|
2554
|
+
modelLoadState: modelLoadState,
|
|
2555
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
2556
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
2557
|
+
modelError: modelError
|
|
2558
|
+
};
|
|
2559
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
2543
2560
|
}
|
|
2544
2561
|
var lastFocusPredictionAt = 0;
|
|
2545
2562
|
var lastFocusPredictionTime = 0;
|
|
@@ -2631,18 +2648,22 @@ function useLoadFaceDetector(_a) {
|
|
|
2631
2648
|
_b = _a.modelLoadTimeoutMs,
|
|
2632
2649
|
modelLoadTimeoutMs = _b === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _b,
|
|
2633
2650
|
videoRef = _a.videoRef;
|
|
2634
|
-
var _c = useState(
|
|
2635
|
-
|
|
2636
|
-
|
|
2651
|
+
var _c = useState('not-started'),
|
|
2652
|
+
modelLoadState = _c[0],
|
|
2653
|
+
setModelLoadState = _c[1];
|
|
2637
2654
|
var _d = useState(0),
|
|
2638
2655
|
modelDownloadProgress = _d[0],
|
|
2639
2656
|
setModelDownloadProgress = _d[1];
|
|
2640
2657
|
var _e = useState(null),
|
|
2641
|
-
|
|
2642
|
-
|
|
2658
|
+
modelWarmingStartedAt = _e[0],
|
|
2659
|
+
setModelWarmingStartedAt = _e[1];
|
|
2660
|
+
var _f = useState(null),
|
|
2661
|
+
modelError = _f[0],
|
|
2662
|
+
setModelError = _f[1];
|
|
2643
2663
|
useEffect(function loadModel() {
|
|
2644
2664
|
var _this = this;
|
|
2645
|
-
|
|
2665
|
+
setModelLoadState('downloading');
|
|
2666
|
+
setModelWarmingStartedAt(null);
|
|
2646
2667
|
var modelLoadTimeout = setTimeout(function () {
|
|
2647
2668
|
setModelError(new Error('Model loading time limit exceeded.'));
|
|
2648
2669
|
}, modelLoadTimeoutMs);
|
|
@@ -2659,6 +2680,8 @@ function useLoadFaceDetector(_a) {
|
|
|
2659
2680
|
case 0:
|
|
2660
2681
|
setModelDownloadProgress(100);
|
|
2661
2682
|
clearTimeout(modelLoadTimeout);
|
|
2683
|
+
setModelLoadState('warming');
|
|
2684
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
2662
2685
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2663
2686
|
cancelled = false;
|
|
2664
2687
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2670,13 +2693,14 @@ function useLoadFaceDetector(_a) {
|
|
|
2670
2693
|
_b.sent();
|
|
2671
2694
|
if (cancelled) return [2 /*return*/];
|
|
2672
2695
|
model.detectForVideo(videoRef.current, performance.now());
|
|
2673
|
-
|
|
2696
|
+
setModelLoadState('ready');
|
|
2674
2697
|
return [2 /*return*/];
|
|
2675
2698
|
}
|
|
2676
2699
|
});
|
|
2677
2700
|
});
|
|
2678
2701
|
})["catch"](function (e) {
|
|
2679
2702
|
setModelError(e);
|
|
2703
|
+
setModelLoadState('error');
|
|
2680
2704
|
})["finally"](function () {
|
|
2681
2705
|
clearTimeout(modelLoadTimeout);
|
|
2682
2706
|
});
|
|
@@ -2691,11 +2715,15 @@ function useLoadFaceDetector(_a) {
|
|
|
2691
2715
|
useEffect(function handleModelError() {
|
|
2692
2716
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
2693
2717
|
}, [modelError, onModelError]);
|
|
2694
|
-
return {
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2718
|
+
return useMemo(function () {
|
|
2719
|
+
return {
|
|
2720
|
+
ready: modelLoadState === 'ready',
|
|
2721
|
+
modelLoadState: modelLoadState,
|
|
2722
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
2723
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
2724
|
+
modelError: modelError
|
|
2725
|
+
};
|
|
2726
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
2699
2727
|
}
|
|
2700
2728
|
var lastFaceDetectionAt = 0;
|
|
2701
2729
|
var lastFaceDetectionTime = 0;
|
|
@@ -3137,19 +3165,23 @@ function useLoadDocumentDetector(_a) {
|
|
|
3137
3165
|
scoreThreshold = _e === void 0 ? defaultDocumentDetectionScoreThreshold : _e,
|
|
3138
3166
|
onModelError = _a.onModelError,
|
|
3139
3167
|
videoRef = _a.videoRef;
|
|
3140
|
-
var _f = useState(
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
var _g = useState(
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
var _h = useState(
|
|
3147
|
-
|
|
3148
|
-
|
|
3168
|
+
var _f = useState('not-started'),
|
|
3169
|
+
modelLoadState = _f[0],
|
|
3170
|
+
setModelLoadState = _f[1];
|
|
3171
|
+
var _g = useState(null),
|
|
3172
|
+
modelWarmingStartedAt = _g[0],
|
|
3173
|
+
setModelWarmingStartedAt = _g[1];
|
|
3174
|
+
var _h = useState(0),
|
|
3175
|
+
modelDownloadProgress = _h[0],
|
|
3176
|
+
setModelDownloadProgress = _h[1];
|
|
3177
|
+
var _j = useState(null),
|
|
3178
|
+
modelError = _j[0],
|
|
3179
|
+
setModelError = _j[1];
|
|
3149
3180
|
useEffect(function loadModel() {
|
|
3150
3181
|
var _this = this;
|
|
3151
3182
|
if (!shouldLoadModels) return;
|
|
3152
|
-
|
|
3183
|
+
setModelLoadState('downloading');
|
|
3184
|
+
setModelWarmingStartedAt(null);
|
|
3153
3185
|
function handleDownloadProgress(event) {
|
|
3154
3186
|
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
3155
3187
|
}
|
|
@@ -3165,6 +3197,8 @@ function useLoadDocumentDetector(_a) {
|
|
|
3165
3197
|
switch (_b.label) {
|
|
3166
3198
|
case 0:
|
|
3167
3199
|
setModelDownloadProgress(100);
|
|
3200
|
+
setModelLoadState('warming');
|
|
3201
|
+
setModelWarmingStartedAt(new Date().getTime());
|
|
3168
3202
|
clearTimeout(modelLoadTimeout);
|
|
3169
3203
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
3170
3204
|
cancelled = false;
|
|
@@ -3178,7 +3212,7 @@ function useLoadDocumentDetector(_a) {
|
|
|
3178
3212
|
setTimeout(function () {
|
|
3179
3213
|
if (cancelled) return;
|
|
3180
3214
|
model.detectForVideo(videoRef.current, performance.now());
|
|
3181
|
-
|
|
3215
|
+
setModelLoadState('ready');
|
|
3182
3216
|
}, 500);
|
|
3183
3217
|
return [2 /*return*/];
|
|
3184
3218
|
}
|
|
@@ -3186,6 +3220,7 @@ function useLoadDocumentDetector(_a) {
|
|
|
3186
3220
|
});
|
|
3187
3221
|
})["catch"](function (e) {
|
|
3188
3222
|
setModelError(e);
|
|
3223
|
+
setModelLoadState('error');
|
|
3189
3224
|
})["finally"](function () {
|
|
3190
3225
|
clearTimeout(modelLoadTimeout);
|
|
3191
3226
|
});
|
|
@@ -3200,12 +3235,16 @@ function useLoadDocumentDetector(_a) {
|
|
|
3200
3235
|
useEffect(function handleModelError() {
|
|
3201
3236
|
if (modelError) onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError);
|
|
3202
3237
|
}, [modelError, onModelError]);
|
|
3203
|
-
return {
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3238
|
+
return useMemo(function () {
|
|
3239
|
+
return {
|
|
3240
|
+
ready: modelLoadState === 'ready',
|
|
3241
|
+
modelLoadState: modelLoadState,
|
|
3242
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
3243
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
3244
|
+
modelError: modelError,
|
|
3245
|
+
setModelError: setModelError
|
|
3246
|
+
};
|
|
3247
|
+
}, [modelLoadState, modelDownloadProgress, modelWarmingStartedAt, modelError]);
|
|
3209
3248
|
}
|
|
3210
3249
|
function makeDocumentDetectorPrediction(frame) {
|
|
3211
3250
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -4612,6 +4651,12 @@ var zh = {
|
|
|
4612
4651
|
"We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": '很抱歉,看起來相機被篡改了。請檢查您的設備並重新載入頁面。'
|
|
4613
4652
|
};
|
|
4614
4653
|
|
|
4654
|
+
function renderVerbiage(verbiage) {
|
|
4655
|
+
if (typeof verbiage === 'string') return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, verbiage);
|
|
4656
|
+
var Verbiage = verbiage;
|
|
4657
|
+
return /*#__PURE__*/React__default.createElement(Verbiage, null);
|
|
4658
|
+
}
|
|
4659
|
+
|
|
4615
4660
|
var resources = {
|
|
4616
4661
|
en: {
|
|
4617
4662
|
translation: en
|
|
@@ -4666,11 +4711,12 @@ var useLanguage = function useLanguage(lang) {
|
|
|
4666
4711
|
};
|
|
4667
4712
|
function evaluateVerbiage(t, currentLanguage, verbiage, fallback) {
|
|
4668
4713
|
if (typeof verbiage === 'string') return verbiage;
|
|
4714
|
+
if (typeof verbiage === 'function') return renderVerbiage(verbiage);
|
|
4669
4715
|
if (typeof verbiage === 'object') {
|
|
4670
4716
|
var translations = verbiage;
|
|
4671
|
-
if (translations[currentLanguage]) return translations[currentLanguage];
|
|
4717
|
+
if (translations[currentLanguage]) return renderVerbiage(translations[currentLanguage]);
|
|
4672
4718
|
var nonLocaleLang = currentLanguage.split('-')[0];
|
|
4673
|
-
if (translations[nonLocaleLang]) return translations[nonLocaleLang];
|
|
4719
|
+
if (translations[nonLocaleLang]) return renderVerbiage(translations[nonLocaleLang]);
|
|
4674
4720
|
}
|
|
4675
4721
|
return t(fallback);
|
|
4676
4722
|
}
|
|
@@ -5162,8 +5208,9 @@ var DocumentDetectionModelContext = /*#__PURE__*/createContext({
|
|
|
5162
5208
|
loadDocumentDetectionModel: function loadDocumentDetectionModel() {
|
|
5163
5209
|
return null;
|
|
5164
5210
|
},
|
|
5165
|
-
|
|
5211
|
+
documentDetectionModelState: 'not-started',
|
|
5166
5212
|
documentDetectionModelDownloadProgress: 0,
|
|
5213
|
+
documentDetectionModelWarmingStartedAt: null,
|
|
5167
5214
|
documentDetectionModelError: null,
|
|
5168
5215
|
onDocumentDetected: function onDocumentDetected() {
|
|
5169
5216
|
return null;
|
|
@@ -5236,7 +5283,9 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5236
5283
|
shouldLoadModels: shouldLoadModels
|
|
5237
5284
|
}),
|
|
5238
5285
|
ready = _q.ready,
|
|
5286
|
+
modelLoadState = _q.modelLoadState,
|
|
5239
5287
|
modelDownloadProgress = _q.modelDownloadProgress,
|
|
5288
|
+
modelWarmingStartedAt = _q.modelWarmingStartedAt,
|
|
5240
5289
|
modelError = _q.modelError,
|
|
5241
5290
|
setModelError = _q.setModelError;
|
|
5242
5291
|
var _r = useFrameLoop(useCallback(function (frameId, timeRunning) {
|
|
@@ -5303,7 +5352,8 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5303
5352
|
startDocumentDetection: start,
|
|
5304
5353
|
stopDocumentDetection: stop,
|
|
5305
5354
|
loadDocumentDetectionModel: load,
|
|
5306
|
-
|
|
5355
|
+
documentDetectionModelState: modelLoadState,
|
|
5356
|
+
documentDetectionModelWarmingStartedAt: modelWarmingStartedAt,
|
|
5307
5357
|
documentDetectionModelError: modelError,
|
|
5308
5358
|
documentDetectionModelDownloadProgress: modelDownloadProgress,
|
|
5309
5359
|
onDocumentDetected: onDocumentDetected,
|
|
@@ -5315,7 +5365,7 @@ function DocumentDetectionModelProvider(_a) {
|
|
|
5315
5365
|
documentDetectionLastPredictionCanvas: lastPredictionCanvas,
|
|
5316
5366
|
clearDocumentDetectionLastPredictionCanvas: clearDocumentDetectionLastPredictionCanvas
|
|
5317
5367
|
};
|
|
5318
|
-
}, [start, stop, load,
|
|
5368
|
+
}, [start, stop, load, modelLoadState, modelWarmingStartedAt, modelError, modelDownloadProgress, onDocumentDetected, documentDetectionThresholds, documentDetectionBoundaries, clearDocumentDetectionLastPredictionCanvas]);
|
|
5319
5369
|
return /*#__PURE__*/React.createElement(DocumentDetectionModelContext.Provider, {
|
|
5320
5370
|
value: value
|
|
5321
5371
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -5328,8 +5378,9 @@ var FocusModelContext = /*#__PURE__*/createContext({
|
|
|
5328
5378
|
loadFocusModel: function loadFocusModel() {
|
|
5329
5379
|
return null;
|
|
5330
5380
|
},
|
|
5331
|
-
|
|
5381
|
+
focusModelState: 'not-started',
|
|
5332
5382
|
focusModelDownloadProgress: 0,
|
|
5383
|
+
focusModelWarmingStartedAt: null,
|
|
5333
5384
|
focusModelError: null,
|
|
5334
5385
|
focusThresholds: {},
|
|
5335
5386
|
setFocusThresholds: function setFocusThresholds() {
|
|
@@ -5371,7 +5422,9 @@ function FocusModelProvider(_a) {
|
|
|
5371
5422
|
shouldLoadModels: shouldLoadModels
|
|
5372
5423
|
}),
|
|
5373
5424
|
ready = _h.ready,
|
|
5425
|
+
modelLoadState = _h.modelLoadState,
|
|
5374
5426
|
modelDownloadProgress = _h.modelDownloadProgress,
|
|
5427
|
+
modelWarmingStartedAt = _h.modelWarmingStartedAt,
|
|
5375
5428
|
modelError = _h.modelError;
|
|
5376
5429
|
var makeFocusPrediction = useCallback(function (imageData, box) {
|
|
5377
5430
|
if (!ready) return null;
|
|
@@ -5383,15 +5436,16 @@ function FocusModelProvider(_a) {
|
|
|
5383
5436
|
var value = useMemo(function () {
|
|
5384
5437
|
return {
|
|
5385
5438
|
loadFocusModel: load,
|
|
5386
|
-
|
|
5439
|
+
focusModelState: modelLoadState,
|
|
5387
5440
|
focusModelDownloadProgress: modelDownloadProgress,
|
|
5441
|
+
focusModelWarmingStartedAt: modelWarmingStartedAt,
|
|
5388
5442
|
focusModelError: modelError,
|
|
5389
5443
|
makeFocusPrediction: makeFocusPrediction,
|
|
5390
5444
|
focusPredictionTime: lastFocusPredictionTime,
|
|
5391
5445
|
focusThresholds: focusThresholds,
|
|
5392
5446
|
setFocusThresholds: setFocusThresholds
|
|
5393
5447
|
};
|
|
5394
|
-
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError,
|
|
5448
|
+
}, [focusThresholds, load, makeFocusPrediction, modelDownloadProgress, modelError, modelLoadState, modelWarmingStartedAt]);
|
|
5395
5449
|
return /*#__PURE__*/React__default.createElement(FocusModelContext.Provider, {
|
|
5396
5450
|
value: value
|
|
5397
5451
|
}, /*#__PURE__*/React__default.createElement(InvisibleCanvas, {
|
|
@@ -5456,6 +5510,8 @@ var IdCaptureModelsContext = /*#__PURE__*/createContext({
|
|
|
5456
5510
|
return null;
|
|
5457
5511
|
},
|
|
5458
5512
|
modelDownloadProgress: 0,
|
|
5513
|
+
modelLoadState: 'not-started',
|
|
5514
|
+
modelWarmingStartedAt: null,
|
|
5459
5515
|
modelError: null,
|
|
5460
5516
|
thresholds: defaultIdCaptureThresholds,
|
|
5461
5517
|
setThresholds: function setThresholds() {
|
|
@@ -5490,8 +5546,9 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5490
5546
|
_b = _a.allowSinglePageIdCapture,
|
|
5491
5547
|
allowSinglePageIdCapture = _b === void 0 ? false : _b;
|
|
5492
5548
|
var _c = useContext(DocumentDetectionModelContext),
|
|
5493
|
-
|
|
5549
|
+
documentDetectionModelState = _c.documentDetectionModelState,
|
|
5494
5550
|
documentDetectionModelDownloadProgress = _c.documentDetectionModelDownloadProgress,
|
|
5551
|
+
documentDetectionModelWarmingStartedAt = _c.documentDetectionModelWarmingStartedAt,
|
|
5495
5552
|
startDocumentDetection = _c.startDocumentDetection,
|
|
5496
5553
|
stopDocumentDetection = _c.stopDocumentDetection,
|
|
5497
5554
|
loadDocumentDetectionModel = _c.loadDocumentDetectionModel,
|
|
@@ -5506,8 +5563,9 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5506
5563
|
documentDetectionModelError = _c.documentDetectionModelError;
|
|
5507
5564
|
var _d = useContext(FocusModelContext),
|
|
5508
5565
|
loadFocusModel = _d.loadFocusModel,
|
|
5509
|
-
|
|
5566
|
+
focusModelState = _d.focusModelState,
|
|
5510
5567
|
focusModelDownloadProgress = _d.focusModelDownloadProgress,
|
|
5568
|
+
focusModelWarmingStartedAt = _d.focusModelWarmingStartedAt,
|
|
5511
5569
|
makeFocusPrediction = _d.makeFocusPrediction,
|
|
5512
5570
|
focusThresholds = _d.focusThresholds,
|
|
5513
5571
|
setFocusThresholds = _d.setFocusThresholds,
|
|
@@ -5615,10 +5673,17 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5615
5673
|
loadDocumentDetectionModel();
|
|
5616
5674
|
loadFocusModel();
|
|
5617
5675
|
}, [loadDocumentDetectionModel, loadFocusModel]);
|
|
5676
|
+
var ready = documentDetectionModelState === 'ready' && focusModelState === 'ready';
|
|
5677
|
+
var modelLoadState = ready ? 'ready' : documentDetectionModelState === 'warming' || focusModelState === 'warming' ? 'warming' : focusModelState === 'downloading' || documentDetectionModelState === 'downloading' ? 'downloading' : 'not-started';
|
|
5678
|
+
var modelWarmingStartedAt = !documentDetectionModelWarmingStartedAt && !focusModelWarmingStartedAt ? null : Math.min.apply(Math, [documentDetectionModelWarmingStartedAt, focusModelWarmingStartedAt].filter(function (v) {
|
|
5679
|
+
return v !== null;
|
|
5680
|
+
}));
|
|
5618
5681
|
var value = useMemo(function () {
|
|
5619
5682
|
return {
|
|
5620
|
-
ready:
|
|
5683
|
+
ready: ready,
|
|
5621
5684
|
modelDownloadProgress: (documentDetectionModelDownloadProgress + focusModelDownloadProgress) / 2,
|
|
5685
|
+
modelLoadState: modelLoadState,
|
|
5686
|
+
modelWarmingStartedAt: modelWarmingStartedAt,
|
|
5622
5687
|
modelError: modelError,
|
|
5623
5688
|
start: startDocumentDetection,
|
|
5624
5689
|
stop: stopDocumentDetection,
|
|
@@ -5636,7 +5701,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
5636
5701
|
requiredDocumentType: requiredDocumentType,
|
|
5637
5702
|
setRequiredDocumentType: setRequiredDocumentType
|
|
5638
5703
|
};
|
|
5639
|
-
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress,
|
|
5704
|
+
}, [detectionTime, documentDetectionBoundaries, documentDetectionModelDownloadProgress, focusModelDownloadProgress, focusPredictionTime, getBestFrame, load, modelLoadState, modelError, modelWarmingStartedAt, onPredictionMade, ready, requiredDocumentType, resetBestFrame, setDocumentDetectionBoundaries, setThresholds, startDocumentDetection, stopDocumentDetection, thresholds]);
|
|
5640
5705
|
return /*#__PURE__*/React__default.createElement(IdCaptureModelsContext.Provider, {
|
|
5641
5706
|
value: value
|
|
5642
5707
|
}, /*#__PURE__*/React__default.createElement(InvisibleCanvas, {
|
|
@@ -7279,7 +7344,10 @@ function LoadingListItemIndicator(_a) {
|
|
|
7279
7344
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
7280
7345
|
var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a) {
|
|
7281
7346
|
var _b, _c, _d, _e, _f, _g;
|
|
7282
|
-
var
|
|
7347
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
7348
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
7349
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7350
|
+
onDismissed = _a.onDismissed,
|
|
7283
7351
|
onUserCancel = _a.onUserCancel,
|
|
7284
7352
|
instructions = _a.instructions,
|
|
7285
7353
|
_h = _a.rotateImage,
|
|
@@ -7297,7 +7365,9 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7297
7365
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
7298
7366
|
var _o = useIdCaptureModelsContext(),
|
|
7299
7367
|
modelsReady = _o.ready,
|
|
7300
|
-
|
|
7368
|
+
modelLoadState = _o.modelLoadState,
|
|
7369
|
+
modelDownloadProgress = _o.modelDownloadProgress,
|
|
7370
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt;
|
|
7301
7371
|
var _p = useCameraStore(),
|
|
7302
7372
|
cameraReady = _p.cameraReady,
|
|
7303
7373
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -7320,11 +7390,27 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7320
7390
|
pleaseWaitText: 'Please wait...',
|
|
7321
7391
|
sessionCheckingText: 'Authenticating...'
|
|
7322
7392
|
});
|
|
7393
|
+
var onLoadingStartedRef = useRef(onLoadingStarted);
|
|
7394
|
+
useEffect(function () {
|
|
7395
|
+
onLoadingStartedRef.current = onLoadingStarted;
|
|
7396
|
+
}, [onLoadingStarted]);
|
|
7397
|
+
var onLoadingProgressRef = useRef(onLoadingProgress);
|
|
7398
|
+
useEffect(function () {
|
|
7399
|
+
onLoadingProgressRef.current = onLoadingProgress;
|
|
7400
|
+
}, [onLoadingProgress]);
|
|
7401
|
+
var onLoadingCompletedRef = useRef(onLoadingCompleted);
|
|
7402
|
+
useEffect(function () {
|
|
7403
|
+
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
7404
|
+
}, [onLoadingCompleted]);
|
|
7323
7405
|
var ready = sessionReady && modelsReady && cameraReady;
|
|
7324
7406
|
useEffect(function () {
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7407
|
+
var _a;
|
|
7408
|
+
if (ready) {
|
|
7409
|
+
(_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
7410
|
+
return function () {
|
|
7411
|
+
return null;
|
|
7412
|
+
};
|
|
7413
|
+
}
|
|
7328
7414
|
var t = setTimeout(function () {
|
|
7329
7415
|
return setDismissed(false);
|
|
7330
7416
|
}, 500);
|
|
@@ -7333,6 +7419,19 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7333
7419
|
};
|
|
7334
7420
|
}, [ready]);
|
|
7335
7421
|
var imageRef = useRef(null);
|
|
7422
|
+
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
7423
|
+
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
7424
|
+
var modelLoadProgress = modelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
7425
|
+
useEffect(function () {
|
|
7426
|
+
var _a;
|
|
7427
|
+
(_a = onLoadingStartedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingStartedRef);
|
|
7428
|
+
}, []);
|
|
7429
|
+
useEffect(function () {
|
|
7430
|
+
var _a;
|
|
7431
|
+
if (modelLoadProgress > 0) {
|
|
7432
|
+
(_a = onLoadingProgressRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingProgressRef, modelLoadProgress);
|
|
7433
|
+
}
|
|
7434
|
+
}, [modelLoadProgress]);
|
|
7336
7435
|
if (dismissed) return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
7337
7436
|
if (cameraAccessDenied) {
|
|
7338
7437
|
return /*#__PURE__*/React__default.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -7392,7 +7491,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7392
7491
|
}, /*#__PURE__*/React__default.createElement(ProgressBarBackground$1, {
|
|
7393
7492
|
className: classNames.progressBackground
|
|
7394
7493
|
}), /*#__PURE__*/React__default.createElement(LoadingOverlayProgressBar, {
|
|
7395
|
-
"$progress":
|
|
7494
|
+
"$progress": modelLoadProgress,
|
|
7396
7495
|
className: classNames.progressBar
|
|
7397
7496
|
}, /*#__PURE__*/React__default.createElement(ProgressIndicator$1, {
|
|
7398
7497
|
className: classNames.progressIndicator
|
|
@@ -7410,7 +7509,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7410
7509
|
}, /*#__PURE__*/React__default.createElement(LoadingListItemIndicator, {
|
|
7411
7510
|
className: classNames.loadingListItemIndicator,
|
|
7412
7511
|
state: sessionReady && modelsReady ? 'done' : 'running'
|
|
7413
|
-
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText :
|
|
7512
|
+
}), !sessionReady ? verbiage.sessionCheckingText : modelsReady ? verbiage.modelsReadyText : modelLoadState === 'downloading' ? "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)") : modelLoadState === 'warming' ? verbiage.modelsWarmingUpText : verbiage.modelsReadyText))), /*#__PURE__*/React__default.createElement(ContinueButtonContainer$1, {
|
|
7414
7513
|
className: classNames.continueBtnContainer
|
|
7415
7514
|
}, (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, {
|
|
7416
7515
|
autoFocus: true,
|
|
@@ -7449,9 +7548,12 @@ var ProgressBarBackground$1 = styled(LoadingOverlayProgressBarBackground)(templa
|
|
|
7449
7548
|
var _a, _b, _c, _d;
|
|
7450
7549
|
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;
|
|
7451
7550
|
});
|
|
7452
|
-
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation)
|
|
7551
|
+
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n background: ", ";\n"], ["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n background: ", ";\n"])), progressBarAnimation, function (props) {
|
|
7552
|
+
var _a, _b, _c, _d;
|
|
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.progressBarIndicatorColor) !== null && _d !== void 0 ? _d : 'var(--idm-color-primary-500)';
|
|
7554
|
+
});
|
|
7453
7555
|
var CustomLoadingGraphic$1 = styled.img(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
7454
|
-
var ContinueButtonContainer$1 = styled.div(templateObject_9$
|
|
7556
|
+
var ContinueButtonContainer$1 = styled.div(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
7455
7557
|
var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObject_10$1 = __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) {
|
|
7456
7558
|
var _a, _b, _c, _d, _e, _f;
|
|
7457
7559
|
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, ";") : '';
|
|
@@ -7471,7 +7573,7 @@ var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObje
|
|
|
7471
7573
|
var _a, _b, _c, _d;
|
|
7472
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.continueBtnDisabledBorder) !== null && _d !== void 0 ? _d : 'none';
|
|
7473
7575
|
});
|
|
7474
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$
|
|
7576
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$1;
|
|
7475
7577
|
|
|
7476
7578
|
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"])));
|
|
7477
7579
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -8337,7 +8439,7 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8337
8439
|
"$maskColor": maskColor,
|
|
8338
8440
|
"$minHeight": padding,
|
|
8339
8441
|
className: regionClsx(classNames, 'Top')
|
|
8340
|
-
}, instruction
|
|
8442
|
+
}, !!instruction && ( /*#__PURE__*/React__default.createElement(GuideText, {
|
|
8341
8443
|
className: classNames.guideText
|
|
8342
8444
|
}, instruction))), /*#__PURE__*/React__default.createElement(GuideCenterRow, {
|
|
8343
8445
|
className: classNames.centerRow
|
|
@@ -8388,7 +8490,7 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8388
8490
|
"$maskColor": maskColor,
|
|
8389
8491
|
"$minHeight": padding,
|
|
8390
8492
|
className: regionClsx(classNames, 'Bottom')
|
|
8391
|
-
}, instruction
|
|
8493
|
+
}, !!instruction && ( /*#__PURE__*/React__default.createElement(GuideText, {
|
|
8392
8494
|
style: {
|
|
8393
8495
|
opacity: 0
|
|
8394
8496
|
}
|
|
@@ -8426,8 +8528,8 @@ var GuideCenterBorder = styled.div(templateObject_7$5 || (templateObject_7$5 = _
|
|
|
8426
8528
|
return props.$padding ? "padding: ".concat(props.$padding, "px;") : '';
|
|
8427
8529
|
});
|
|
8428
8530
|
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"])));
|
|
8429
|
-
var GuideCenterInner = styled.div(templateObject_9$
|
|
8430
|
-
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$
|
|
8531
|
+
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"])));
|
|
8532
|
+
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$2;
|
|
8431
8533
|
|
|
8432
8534
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
8433
8535
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -9941,7 +10043,7 @@ var ScreenActionsBar = styled.div(templateObject_5$6 || (templateObject_5$6 = __
|
|
|
9941
10043
|
var DashedSeparator = styled.div(templateObject_6$4 || (templateObject_6$4 = __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"])));
|
|
9942
10044
|
var OrWrapper = styled.div(templateObject_7$3 || (templateObject_7$3 = __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"])));
|
|
9943
10045
|
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"])));
|
|
9944
|
-
var Button = styled(WideBorderButton)(templateObject_9 || (templateObject_9 = __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"])));
|
|
10046
|
+
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"])));
|
|
9945
10047
|
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"])));
|
|
9946
10048
|
var Dialog = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"], ["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"])), function (props) {
|
|
9947
10049
|
var _a;
|
|
@@ -10219,17 +10321,20 @@ function humanFileSize(bytes, si, dp) {
|
|
|
10219
10321
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
10220
10322
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
10221
10323
|
}
|
|
10222
|
-
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
10324
|
+
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
10223
10325
|
|
|
10224
10326
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
10225
10327
|
var _b, _c, _d, _e, _f;
|
|
10226
|
-
var
|
|
10328
|
+
var onLoadingStarted = _a.onLoadingStarted,
|
|
10329
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
10330
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
10331
|
+
onSuccess = _a.onSuccess,
|
|
10227
10332
|
onExitCapture = _a.onExitCapture,
|
|
10228
10333
|
onUserCancel = _a.onUserCancel,
|
|
10334
|
+
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
10229
10335
|
_g = _a.loadingOverlayMode,
|
|
10230
10336
|
loadingOverlayMode = _g === void 0 ? 'default' : _g,
|
|
10231
10337
|
customOverlayContent = _a.customOverlayContent,
|
|
10232
|
-
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
10233
10338
|
precapturedDocuments = _a.precapturedDocuments,
|
|
10234
10339
|
_h = _a.captureRequirement,
|
|
10235
10340
|
captureRequirement = _h === void 0 ? 'idCardOrPassport' : _h,
|
|
@@ -10575,6 +10680,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10575
10680
|
colors: colors.loadingOverlay,
|
|
10576
10681
|
verbiage: verbiage.loadingOverlay,
|
|
10577
10682
|
onUserCancel: onUserCancel,
|
|
10683
|
+
onLoadingStarted: onLoadingStarted,
|
|
10684
|
+
onLoadingProgress: onLoadingProgress,
|
|
10685
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
10578
10686
|
onDismissed: function onDismissed() {
|
|
10579
10687
|
setOverlayDismissed(true);
|
|
10580
10688
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -11232,6 +11340,8 @@ var SelfieGuidanceModelsContext = /*#__PURE__*/createContext({
|
|
|
11232
11340
|
},
|
|
11233
11341
|
ready: false,
|
|
11234
11342
|
error: null,
|
|
11343
|
+
modelLoadState: 'not-started',
|
|
11344
|
+
modelWarmingStartedAt: null,
|
|
11235
11345
|
modelDownloadProgress: 0
|
|
11236
11346
|
});
|
|
11237
11347
|
function SelfieGuidanceModelsProvider(_a) {
|
|
@@ -11263,7 +11373,9 @@ function SelfieGuidanceModelsProvider(_a) {
|
|
|
11263
11373
|
videoRef: videoRef
|
|
11264
11374
|
}),
|
|
11265
11375
|
ready = _f.ready,
|
|
11376
|
+
modelLoadState = _f.modelLoadState,
|
|
11266
11377
|
modelDownloadProgress = _f.modelDownloadProgress,
|
|
11378
|
+
modelWarmingStartedAt = _f.modelWarmingStartedAt,
|
|
11267
11379
|
modelError = _f.modelError;
|
|
11268
11380
|
var _g = useFrameLoop(useCallback(function () {
|
|
11269
11381
|
return __awaiter(_this, void 0, void 0, function () {
|
|
@@ -11325,9 +11437,11 @@ function SelfieGuidanceModelsProvider(_a) {
|
|
|
11325
11437
|
canvasRef: canvasRef,
|
|
11326
11438
|
onPredictionMade: onPredictionMade,
|
|
11327
11439
|
error: modelError,
|
|
11328
|
-
modelDownloadProgress: modelDownloadProgress
|
|
11440
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
11441
|
+
modelLoadState: modelLoadState,
|
|
11442
|
+
modelWarmingStartedAt: modelWarmingStartedAt
|
|
11329
11443
|
};
|
|
11330
|
-
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress]);
|
|
11444
|
+
}, [start, stop, ready, onPredictionMade, modelError, modelDownloadProgress, modelLoadState, modelWarmingStartedAt]);
|
|
11331
11445
|
return /*#__PURE__*/React.createElement(SelfieGuidanceModelsContext.Provider, {
|
|
11332
11446
|
value: value
|
|
11333
11447
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
@@ -11692,7 +11806,7 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11692
11806
|
}), /*#__PURE__*/React__default.createElement(GuidesComponent, {
|
|
11693
11807
|
classNames: classNames.guides,
|
|
11694
11808
|
status: satisfied ? 'processing' : 'ready'
|
|
11695
|
-
}), guidanceMessage
|
|
11809
|
+
}), !!guidanceMessage && ( /*#__PURE__*/React__default.createElement(GuidanceMessageContainer, {
|
|
11696
11810
|
className: classNames.guidanceMessageContainer
|
|
11697
11811
|
}, /*#__PURE__*/React__default.createElement(GuidanceMessage, {
|
|
11698
11812
|
"$variant": satisfied ? 'positive' : 'negative',
|
|
@@ -12033,7 +12147,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12033
12147
|
guidesComponent: guidesByRequestState,
|
|
12034
12148
|
classNames: classNames,
|
|
12035
12149
|
colors: colors,
|
|
12036
|
-
verbiage:
|
|
12150
|
+
verbiage: rawVerbiage,
|
|
12037
12151
|
debugMode: debugMode
|
|
12038
12152
|
}), debugMode && !disableCapturePreview && imageUrl && ( /*#__PURE__*/React__default.createElement(SelfieProgressPreview, {
|
|
12039
12153
|
classNames: classNames.imagePreview,
|
|
@@ -13530,8 +13644,6 @@ function VideoSignatureGuides(_a) {
|
|
|
13530
13644
|
onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
|
|
13531
13645
|
_d = _a.minSignaturePadPoints,
|
|
13532
13646
|
minSignaturePadPoints = _d === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _d,
|
|
13533
|
-
signaturePadEmptyContent = _a.signaturePadEmptyContent,
|
|
13534
|
-
headTrackingUnsatisfiedContent = _a.headTrackingUnsatisfiedContent,
|
|
13535
13647
|
_e = _a.headTrackingSatisfied,
|
|
13536
13648
|
headTrackingSatisfied = _e === void 0 ? true : _e,
|
|
13537
13649
|
_f = _a.classNames,
|
|
@@ -13552,6 +13664,8 @@ function VideoSignatureGuides(_a) {
|
|
|
13552
13664
|
signatureValid = _l[0],
|
|
13553
13665
|
setSignatureValid = _l[1];
|
|
13554
13666
|
var verbiage = useTranslations(rawVerbiage, {
|
|
13667
|
+
signaturePadEmptyText: '',
|
|
13668
|
+
headTrackingUnsatisfiedText: '',
|
|
13555
13669
|
clearSignatureBtnText: 'Clear',
|
|
13556
13670
|
acceptSignatureBtnText: 'Accept'
|
|
13557
13671
|
});
|
|
@@ -13565,9 +13679,13 @@ function VideoSignatureGuides(_a) {
|
|
|
13565
13679
|
var isSigning = requestedAction === 'CAPTURE_SIGNATURE';
|
|
13566
13680
|
var canClear = isSigning && !signaturePadEmpty;
|
|
13567
13681
|
var canSubmit = isSigning && signatureValid && headTrackingSatisfied;
|
|
13568
|
-
var
|
|
13569
|
-
|
|
13570
|
-
|
|
13682
|
+
var _m = useState(false),
|
|
13683
|
+
emptyContentDismissed = _m[0],
|
|
13684
|
+
setEmptyContentDismissed = _m[1];
|
|
13685
|
+
var displayEmptyState = requestedAction === 'CAPTURE_SIGNATURE' && signaturePadEmpty && !emptyContentDismissed;
|
|
13686
|
+
useEffect(function () {
|
|
13687
|
+
if (signaturePadEmpty) setEmptyContentDismissed(false);
|
|
13688
|
+
}, [signaturePadEmpty]);
|
|
13571
13689
|
return /*#__PURE__*/React__default.createElement(Container$3, {
|
|
13572
13690
|
className: classNames.container
|
|
13573
13691
|
}, /*#__PURE__*/React__default.createElement(Inner$1, {
|
|
@@ -13603,11 +13721,18 @@ function VideoSignatureGuides(_a) {
|
|
|
13603
13721
|
});
|
|
13604
13722
|
setSignatureValid(points.length >= minSignaturePadPoints);
|
|
13605
13723
|
}
|
|
13606
|
-
}), !headTrackingSatisfied &&
|
|
13607
|
-
className: classNames.
|
|
13608
|
-
},
|
|
13609
|
-
className: classNames.
|
|
13610
|
-
},
|
|
13724
|
+
}), !headTrackingSatisfied && !!verbiage.headTrackingUnsatisfiedText ? ( /*#__PURE__*/React__default.createElement(SignaturePadContentContainer, {
|
|
13725
|
+
className: classNames.headTrackingUnsatisfiedContentContainer
|
|
13726
|
+
}, /*#__PURE__*/React__default.createElement(SignaturePadContentInner, {
|
|
13727
|
+
className: classNames.headTrackingUnsatisfiedContentInner
|
|
13728
|
+
}, verbiage.headTrackingUnsatisfiedText))) : displayEmptyState && !!verbiage.signaturePadEmptyText && ( /*#__PURE__*/React__default.createElement(SignaturePadContentContainer, {
|
|
13729
|
+
className: classNames.emptyContentContainer,
|
|
13730
|
+
onClick: function onClick() {
|
|
13731
|
+
return setEmptyContentDismissed(true);
|
|
13732
|
+
}
|
|
13733
|
+
}, /*#__PURE__*/React__default.createElement(SignaturePadContentInner, {
|
|
13734
|
+
className: classNames.emptyContentInner
|
|
13735
|
+
}, verbiage.signaturePadEmptyText)))), /*#__PURE__*/React__default.createElement(SignatureButtonsContainer, {
|
|
13611
13736
|
className: classNames.signatureButtonsRow
|
|
13612
13737
|
}, /*#__PURE__*/React__default.createElement(LoaderButton, {
|
|
13613
13738
|
variant: "secondary",
|
|
@@ -13643,13 +13768,15 @@ var SignatureCanvasContainer = styled.div(templateObject_6$2 || (templateObject_
|
|
|
13643
13768
|
return props.$headTrackingUnsatisfied ? 'pointer-events: none;' : '';
|
|
13644
13769
|
});
|
|
13645
13770
|
var AcceptBtn = styled(LoaderButton)(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
|
|
13646
|
-
var SignaturePadContentContainer = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n
|
|
13771
|
+
var SignaturePadContentContainer = styled.div(templateObject_8 || (templateObject_8 = __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"])));
|
|
13772
|
+
var SignaturePadContentInner = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"])), function (props) {
|
|
13647
13773
|
var _a, _b, _c;
|
|
13648
13774
|
return (_c = (_b = (_a = props.theme.signatureCapture) === null || _a === void 0 ? void 0 : _a.canvas) === null || _b === void 0 ? void 0 : _b.emptyTextColor) !== null && _c !== void 0 ? _c : 'black';
|
|
13649
13775
|
});
|
|
13650
|
-
var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$3, templateObject_5$3, templateObject_6$2, templateObject_7$1, templateObject_8;
|
|
13776
|
+
var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$3, templateObject_5$3, templateObject_6$2, templateObject_7$1, templateObject_8, templateObject_9;
|
|
13651
13777
|
|
|
13652
13778
|
var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
|
|
13779
|
+
var DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE = 0.01;
|
|
13653
13780
|
var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
13654
13781
|
var onVideoCaptured = _a.onVideoCaptured,
|
|
13655
13782
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
@@ -13659,38 +13786,38 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13659
13786
|
guidesComponent = _a.guidesComponent,
|
|
13660
13787
|
_c = _a.minSignaturePadPoints,
|
|
13661
13788
|
minSignaturePadPoints = _c === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _c,
|
|
13662
|
-
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
classNames =
|
|
13666
|
-
|
|
13667
|
-
colors =
|
|
13668
|
-
|
|
13669
|
-
rawVerbiage =
|
|
13670
|
-
|
|
13671
|
-
debugMode =
|
|
13672
|
-
var
|
|
13789
|
+
_d = _a.headTrackingBoundaryPercentage,
|
|
13790
|
+
headTrackingBoundaryPercentage = _d === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _d,
|
|
13791
|
+
_e = _a.classNames,
|
|
13792
|
+
classNames = _e === void 0 ? {} : _e,
|
|
13793
|
+
_f = _a.colors,
|
|
13794
|
+
colors = _f === void 0 ? {} : _f,
|
|
13795
|
+
_g = _a.verbiage,
|
|
13796
|
+
rawVerbiage = _g === void 0 ? {} : _g,
|
|
13797
|
+
_h = _a.debugMode,
|
|
13798
|
+
debugMode = _h === void 0 ? false : _h;
|
|
13799
|
+
var _j = useCameraStore(useShallow(function (state) {
|
|
13673
13800
|
return {
|
|
13674
13801
|
camera: state.camera,
|
|
13675
13802
|
videoWidth: state.videoWidth,
|
|
13676
13803
|
videoHeight: state.videoHeight
|
|
13677
13804
|
};
|
|
13678
13805
|
})),
|
|
13679
|
-
camera =
|
|
13680
|
-
videoWidth =
|
|
13681
|
-
videoHeight =
|
|
13682
|
-
var
|
|
13683
|
-
onPredictionMade =
|
|
13684
|
-
start =
|
|
13685
|
-
stop =
|
|
13686
|
-
var
|
|
13687
|
-
signatureData =
|
|
13688
|
-
signatureDataUrl =
|
|
13689
|
-
signatureVideoData =
|
|
13690
|
-
startRecording =
|
|
13691
|
-
stopRecording =
|
|
13692
|
-
clearRecordedData =
|
|
13693
|
-
isRecording =
|
|
13806
|
+
camera = _j.camera,
|
|
13807
|
+
videoWidth = _j.videoWidth,
|
|
13808
|
+
videoHeight = _j.videoHeight;
|
|
13809
|
+
var _k = useSelfieGuidanceModelsContext(),
|
|
13810
|
+
onPredictionMade = _k.onPredictionMade,
|
|
13811
|
+
start = _k.start,
|
|
13812
|
+
stop = _k.stop;
|
|
13813
|
+
var _l = useVideoSignatureContext(),
|
|
13814
|
+
signatureData = _l.signatureData,
|
|
13815
|
+
signatureDataUrl = _l.signatureDataUrl,
|
|
13816
|
+
signatureVideoData = _l.signatureVideoData,
|
|
13817
|
+
startRecording = _l.startRecording,
|
|
13818
|
+
stopRecording = _l.stopRecording,
|
|
13819
|
+
clearRecordedData = _l.clearRecordedData,
|
|
13820
|
+
isRecording = _l.isRecording;
|
|
13694
13821
|
useEffect(function () {
|
|
13695
13822
|
startRecording();
|
|
13696
13823
|
return stopRecording;
|
|
@@ -13709,31 +13836,31 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13709
13836
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
13710
13837
|
}
|
|
13711
13838
|
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
13712
|
-
var
|
|
13713
|
-
headTrackingSatisfied =
|
|
13714
|
-
setHeadTrackingSatisfied =
|
|
13715
|
-
var
|
|
13716
|
-
lastFace =
|
|
13717
|
-
setLastFace =
|
|
13718
|
-
var
|
|
13719
|
-
numFramesWithoutFaces =
|
|
13720
|
-
setNumFramesWithoutFaces =
|
|
13721
|
-
onPredictionMade(useThrottledCallback(function (_a) {
|
|
13839
|
+
var _m = useState(true),
|
|
13840
|
+
headTrackingSatisfied = _m[0],
|
|
13841
|
+
setHeadTrackingSatisfied = _m[1];
|
|
13842
|
+
var _o = useState(null),
|
|
13843
|
+
lastFace = _o[0],
|
|
13844
|
+
setLastFace = _o[1];
|
|
13845
|
+
var _p = useState(0),
|
|
13846
|
+
numFramesWithoutFaces = _p[0],
|
|
13847
|
+
setNumFramesWithoutFaces = _p[1];
|
|
13848
|
+
onPredictionMade(useThrottledCallback(useCallback(function (_a) {
|
|
13722
13849
|
var face = _a.face;
|
|
13723
13850
|
if (!camera) return;
|
|
13724
|
-
var nearBoundary = (face === null || face === void 0 ? void 0 : face.box.xMin) < videoWidth *
|
|
13851
|
+
var nearBoundary = (face === null || face === void 0 ? void 0 : face.box.xMin) < videoWidth * headTrackingBoundaryPercentage || (face === null || face === void 0 ? void 0 : face.box.xMax) > videoWidth * (1 - headTrackingBoundaryPercentage) || (face === null || face === void 0 ? void 0 : face.box.yMin) < videoHeight * headTrackingBoundaryPercentage || (face === null || face === void 0 ? void 0 : face.box.yMax) > videoHeight * (1 - headTrackingBoundaryPercentage);
|
|
13725
13852
|
setLastFace(face);
|
|
13726
13853
|
setHeadTrackingSatisfied(!!face && !nearBoundary);
|
|
13727
13854
|
setNumFramesWithoutFaces(face ? 0 : function (n) {
|
|
13728
13855
|
return n + 1;
|
|
13729
13856
|
});
|
|
13730
|
-
}, 16));
|
|
13731
|
-
var
|
|
13732
|
-
ref =
|
|
13733
|
-
|
|
13734
|
-
width =
|
|
13735
|
-
|
|
13736
|
-
height =
|
|
13857
|
+
}, [camera, headTrackingBoundaryPercentage, videoHeight, videoWidth]), 16));
|
|
13858
|
+
var _q = useResizeObserver(),
|
|
13859
|
+
ref = _q.ref,
|
|
13860
|
+
_r = _q.width,
|
|
13861
|
+
width = _r === void 0 ? 1 : _r,
|
|
13862
|
+
_s = _q.height,
|
|
13863
|
+
height = _s === void 0 ? 1 : _s;
|
|
13737
13864
|
var debugScalingDetails = useDebugScalingDetails({
|
|
13738
13865
|
enabled: debugMode,
|
|
13739
13866
|
pageWidth: width,
|
|
@@ -13748,7 +13875,7 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13748
13875
|
return /*#__PURE__*/React__default.createElement(Container$2, {
|
|
13749
13876
|
ref: ref,
|
|
13750
13877
|
className: classNames.container
|
|
13751
|
-
}, verbiage.guidanceMessageText && ( /*#__PURE__*/React__default.createElement(GuidanceMessageContainer, {
|
|
13878
|
+
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React__default.createElement(GuidanceMessageContainer, {
|
|
13752
13879
|
"$top": "10%",
|
|
13753
13880
|
className: classNames.guidanceMessageContainer
|
|
13754
13881
|
}, /*#__PURE__*/React__default.createElement(GuidanceMessage, {
|
|
@@ -13758,11 +13885,10 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13758
13885
|
}, verbiage.guidanceMessageText))), /*#__PURE__*/React__default.createElement(GuidesComponent, {
|
|
13759
13886
|
status: "success",
|
|
13760
13887
|
key: "video-signature-guides-".concat(headTrackingSatisfied ? 'satisfied' : 'unsatisfied'),
|
|
13761
|
-
classNames: classNames.videoSignatureGuidesClassNames,
|
|
13762
13888
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
13763
|
-
signaturePadEmptyContent: signaturePadEmptyContent,
|
|
13764
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
13765
13889
|
headTrackingSatisfied: headTrackingSatisfied,
|
|
13890
|
+
classNames: classNames.guides,
|
|
13891
|
+
verbiage: rawVerbiage.guides,
|
|
13766
13892
|
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
13767
13893
|
return setTimeout(clearRecordedData, 100);
|
|
13768
13894
|
} : undefined
|
|
@@ -13850,43 +13976,43 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13850
13976
|
captureAudio = _d === void 0 ? false : _d,
|
|
13851
13977
|
_e = _a.minSignaturePadPoints,
|
|
13852
13978
|
minSignaturePadPoints = _e === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _e,
|
|
13853
|
-
|
|
13854
|
-
|
|
13855
|
-
|
|
13856
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
13857
|
-
|
|
13858
|
-
restartVideoOnSignaturePadCleared =
|
|
13979
|
+
_f = _a.headTrackingBoundaryPercentage,
|
|
13980
|
+
headTrackingBoundaryPercentage = _f === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _f,
|
|
13981
|
+
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
13982
|
+
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
13983
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
13984
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
13859
13985
|
faceLivenessProps = _a.faceLivenessProps,
|
|
13860
|
-
|
|
13861
|
-
assets =
|
|
13862
|
-
|
|
13863
|
-
classNames =
|
|
13864
|
-
|
|
13865
|
-
colors =
|
|
13866
|
-
|
|
13867
|
-
verbiage =
|
|
13868
|
-
|
|
13869
|
-
debugMode =
|
|
13870
|
-
var
|
|
13871
|
-
selfieImage =
|
|
13872
|
-
setSelfieImage =
|
|
13873
|
-
setSignatureData =
|
|
13874
|
-
setSignatureVideoUrl =
|
|
13875
|
-
logSelfieCaptureAttempt =
|
|
13986
|
+
_j = _a.assets,
|
|
13987
|
+
assets = _j === void 0 ? {} : _j,
|
|
13988
|
+
_k = _a.classNames,
|
|
13989
|
+
classNames = _k === void 0 ? {} : _k,
|
|
13990
|
+
_l = _a.colors,
|
|
13991
|
+
colors = _l === void 0 ? {} : _l,
|
|
13992
|
+
_m = _a.verbiage,
|
|
13993
|
+
verbiage = _m === void 0 ? {} : _m,
|
|
13994
|
+
_o = _a.debugMode,
|
|
13995
|
+
debugMode = _o === void 0 ? false : _o;
|
|
13996
|
+
var _p = useContext(SubmissionContext),
|
|
13997
|
+
selfieImage = _p.selfieImage,
|
|
13998
|
+
setSelfieImage = _p.setSelfieImage,
|
|
13999
|
+
setSignatureData = _p.setSignatureData,
|
|
14000
|
+
setSignatureVideoUrl = _p.setSignatureVideoUrl,
|
|
14001
|
+
logSelfieCaptureAttempt = _p.logSelfieCaptureAttempt;
|
|
13876
14002
|
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
13877
14003
|
return {
|
|
13878
14004
|
cameraAccessDenied: state.cameraAccessDenied
|
|
13879
14005
|
};
|
|
13880
14006
|
})).cameraAccessDenied;
|
|
13881
|
-
var
|
|
13882
|
-
captureState =
|
|
13883
|
-
setCaptureState =
|
|
14007
|
+
var _q = useState('CHECKING_LIVENESS'),
|
|
14008
|
+
captureState = _q[0],
|
|
14009
|
+
setCaptureState = _q[1];
|
|
13884
14010
|
var operationStartedAt = useRef();
|
|
13885
14011
|
var captureStartedAt = useRef();
|
|
13886
14012
|
var captureEndedAt = useRef();
|
|
13887
|
-
var
|
|
13888
|
-
start =
|
|
13889
|
-
stop =
|
|
14013
|
+
var _r = useSelfieGuidanceModelsContext(),
|
|
14014
|
+
start = _r.start,
|
|
14015
|
+
stop = _r.stop;
|
|
13890
14016
|
useEffect(function () {
|
|
13891
14017
|
operationStartedAt.current = new Date();
|
|
13892
14018
|
}, []);
|
|
@@ -13922,9 +14048,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13922
14048
|
setSelfieImage(selfieFromRequest);
|
|
13923
14049
|
}
|
|
13924
14050
|
}, [logCaptureMetadata, onFaceLivenessSuccessProp, selfieImage, setSelfieImage]);
|
|
13925
|
-
var
|
|
13926
|
-
signatureImageUrl =
|
|
13927
|
-
setSignatureImageUrl =
|
|
14051
|
+
var _s = useState(null),
|
|
14052
|
+
signatureImageUrl = _s[0],
|
|
14053
|
+
setSignatureImageUrl = _s[1];
|
|
13928
14054
|
var onSignatureCaptureCompleted = useCallback(function (videoData, signatureData, signatureImageData) {
|
|
13929
14055
|
setSignatureData(signatureData);
|
|
13930
14056
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -13932,16 +14058,16 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13932
14058
|
setCaptureState('SUCCESS');
|
|
13933
14059
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
13934
14060
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
13935
|
-
var
|
|
13936
|
-
showLoadingOverlay =
|
|
13937
|
-
setShowLoadingOverlay =
|
|
14061
|
+
var _t = useState(true),
|
|
14062
|
+
showLoadingOverlay = _t[0],
|
|
14063
|
+
setShowLoadingOverlay = _t[1];
|
|
13938
14064
|
var onSignatureCaptureFacesNotDetected = useCallback(function () {
|
|
13939
14065
|
setShowLoadingOverlay(false);
|
|
13940
14066
|
setCaptureState('CHECKING_LIVENESS');
|
|
13941
14067
|
}, []);
|
|
13942
|
-
var
|
|
13943
|
-
attempt =
|
|
13944
|
-
setAttempt =
|
|
14068
|
+
var _u = useState(0),
|
|
14069
|
+
attempt = _u[0],
|
|
14070
|
+
setAttempt = _u[1];
|
|
13945
14071
|
var onRetry = useCallback(function () {
|
|
13946
14072
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
13947
14073
|
setAttempt(function (n) {
|
|
@@ -13960,11 +14086,11 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
13960
14086
|
}, [cameraAccessDenied]);
|
|
13961
14087
|
var guidesComponent = useCallback(function (props) {
|
|
13962
14088
|
return /*#__PURE__*/React__default.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
13963
|
-
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.
|
|
13964
|
-
|
|
13965
|
-
|
|
14089
|
+
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.guides,
|
|
14090
|
+
verbiage: verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides,
|
|
14091
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
13966
14092
|
}));
|
|
13967
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.
|
|
14093
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.guides, restartVideoOnSignaturePadCleared, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
|
|
13968
14094
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
13969
14095
|
var onExitAfterFailure = useCallback(function (resp, req) {
|
|
13970
14096
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -14009,8 +14135,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14009
14135
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
14010
14136
|
onExit: onExitCapture,
|
|
14011
14137
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
14012
|
-
|
|
14013
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
14138
|
+
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
14014
14139
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
14015
14140
|
guidesComponent: guidesComponent,
|
|
14016
14141
|
classNames: classNames,
|
|
@@ -14209,8 +14334,7 @@ var IdCardGuideInstructions = styled(GuidanceMessage)(templateObject_7 || (templ
|
|
|
14209
14334
|
var templateObject_1$8, templateObject_2$8, templateObject_3$7, templateObject_4$2, templateObject_5$2, templateObject_6$1, templateObject_7;
|
|
14210
14335
|
|
|
14211
14336
|
var ReadTextPrompt = function ReadTextPrompt(_a) {
|
|
14212
|
-
var
|
|
14213
|
-
onComplete = _a.onComplete,
|
|
14337
|
+
var onComplete = _a.onComplete,
|
|
14214
14338
|
_b = _a.durationMs,
|
|
14215
14339
|
durationMs = _b === void 0 ? 15000 : _b,
|
|
14216
14340
|
_c = _a.minReadingMs,
|
|
@@ -14219,13 +14343,13 @@ var ReadTextPrompt = function ReadTextPrompt(_a) {
|
|
|
14219
14343
|
classNames = _d === void 0 ? {} : _d,
|
|
14220
14344
|
_e = _a.verbiage,
|
|
14221
14345
|
rawVerbiage = _e === void 0 ? {} : _e;
|
|
14222
|
-
text = useVerbiage(text, '');
|
|
14223
14346
|
var countdownTimeoutRef = useRef(undefined);
|
|
14224
14347
|
var _f = useState(durationMs / 1000),
|
|
14225
14348
|
countdownRemaining = _f[0],
|
|
14226
14349
|
setCountdownRemaining = _f[1];
|
|
14227
14350
|
var verbiage = useTranslations(rawVerbiage, {
|
|
14228
14351
|
headingText: 'Please read the following text aloud',
|
|
14352
|
+
promptText: '',
|
|
14229
14353
|
doneBtnText: 'Done'
|
|
14230
14354
|
});
|
|
14231
14355
|
var manualCountdown = useCallback(function (remainingTime) {
|
|
@@ -14263,7 +14387,7 @@ var ReadTextPrompt = function ReadTextPrompt(_a) {
|
|
|
14263
14387
|
className: classNames.heading
|
|
14264
14388
|
}, verbiage.headingText), /*#__PURE__*/React__default.createElement(ReadTextPromptText, {
|
|
14265
14389
|
className: classNames.prompt
|
|
14266
|
-
},
|
|
14390
|
+
}, verbiage.promptText), /*#__PURE__*/React__default.createElement(ReadTextPromptButtonsRow, {
|
|
14267
14391
|
className: classNames.buttonsRow
|
|
14268
14392
|
}, /*#__PURE__*/React__default.createElement(ReadTextPromptTimeRemaining, {
|
|
14269
14393
|
className: classNames.timeRemaining
|
|
@@ -14704,18 +14828,22 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14704
14828
|
});
|
|
14705
14829
|
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
|
|
14706
14830
|
var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
|
|
14831
|
+
var readTextPromptVerbiage = useMemo(function () {
|
|
14832
|
+
return _assign({
|
|
14833
|
+
promptText: readTextPrompt
|
|
14834
|
+
}, rawVerbiage.readTextPrompt);
|
|
14835
|
+
}, [rawVerbiage.readTextPrompt, readTextPrompt]);
|
|
14707
14836
|
return /*#__PURE__*/React__default.createElement(Container, {
|
|
14708
14837
|
ref: ref,
|
|
14709
14838
|
className: classNames.container
|
|
14710
14839
|
}, /*#__PURE__*/React__default.createElement(InvisibleCanvas, {
|
|
14711
14840
|
ref: photoCanvas
|
|
14712
14841
|
}), requestedAction === 'READ_TEXT' ? ( /*#__PURE__*/React__default.createElement(ReadTextPrompt, {
|
|
14713
|
-
text: readTextPrompt,
|
|
14714
14842
|
startedAt: timeoutStartedAt || undefined,
|
|
14715
14843
|
durationMs: readTextTimeoutDurationMs,
|
|
14716
14844
|
minReadingMs: readTextMinReadingMs,
|
|
14717
14845
|
classNames: classNames.readTextPrompt,
|
|
14718
|
-
verbiage:
|
|
14846
|
+
verbiage: readTextPromptVerbiage,
|
|
14719
14847
|
onComplete: stopRecording
|
|
14720
14848
|
})) : ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IdVideoCaptureGuides, {
|
|
14721
14849
|
classNames: classNames.guides,
|
|
@@ -15709,6 +15837,9 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15709
15837
|
allowOverrideWrongDocumentTypeAfterMs = _t === void 0 ? 8000 : _t,
|
|
15710
15838
|
_u = _a.allowUploadingDocumentsFromStorage,
|
|
15711
15839
|
allowUploadingDocumentsFromStorage = _u === void 0 ? false : _u,
|
|
15840
|
+
onLoadingStarted = _a.onLoadingStarted,
|
|
15841
|
+
onLoadingProgress = _a.onLoadingProgress,
|
|
15842
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15712
15843
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
15713
15844
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15714
15845
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15750,6 +15881,9 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15750
15881
|
useDebugLogging(debugMode);
|
|
15751
15882
|
var idCaptureProps = useMemo(function () {
|
|
15752
15883
|
return {
|
|
15884
|
+
onLoadingStarted: onLoadingStarted,
|
|
15885
|
+
onLoadingProgress: onLoadingProgress,
|
|
15886
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
15753
15887
|
onExitCapture: onExitCapture,
|
|
15754
15888
|
onUserCancel: onUserCancel,
|
|
15755
15889
|
onModelError: onModelError,
|
|
@@ -15779,7 +15913,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15779
15913
|
verbiage: verbiage,
|
|
15780
15914
|
debugMode: debugMode
|
|
15781
15915
|
};
|
|
15782
|
-
}, [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]);
|
|
15916
|
+
}, [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]);
|
|
15783
15917
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
15784
15918
|
return {
|
|
15785
15919
|
documents: captureAdditionalDocuments,
|
|
@@ -17733,24 +17867,24 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17733
17867
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
17734
17868
|
_f = _a.minSignaturePadPoints,
|
|
17735
17869
|
minSignaturePadPoints = _f === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _f,
|
|
17736
|
-
|
|
17737
|
-
|
|
17738
|
-
|
|
17739
|
-
modelLoadTimeoutMs =
|
|
17740
|
-
|
|
17741
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
17742
|
-
|
|
17743
|
-
restartVideoOnSignaturePadCleared =
|
|
17870
|
+
_g = _a.headTrackingBoundaryPercentage,
|
|
17871
|
+
headTrackingBoundaryPercentage = _g === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _g,
|
|
17872
|
+
_h = _a.modelLoadTimeoutMs,
|
|
17873
|
+
modelLoadTimeoutMs = _h === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _h,
|
|
17874
|
+
_j = _a.allowSignatureAfterLivenessCheckFailure,
|
|
17875
|
+
allowSignatureAfterLivenessCheckFailure = _j === void 0 ? false : _j,
|
|
17876
|
+
_k = _a.restartVideoOnSignaturePadCleared,
|
|
17877
|
+
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
17744
17878
|
faceLivenessProps = _a.faceLivenessProps,
|
|
17745
|
-
|
|
17746
|
-
theme =
|
|
17879
|
+
_l = _a.theme,
|
|
17880
|
+
theme = _l === void 0 ? 'default' : _l,
|
|
17747
17881
|
classNames = _a.classNames,
|
|
17748
17882
|
colors = _a.colors,
|
|
17749
17883
|
verbiage = _a.verbiage,
|
|
17750
17884
|
geolocationEnabled = _a.geolocationEnabled,
|
|
17751
17885
|
geolocationRequired = _a.geolocationRequired,
|
|
17752
|
-
|
|
17753
|
-
debugMode =
|
|
17886
|
+
_m = _a.debugMode,
|
|
17887
|
+
debugMode = _m === void 0 ? false : _m;
|
|
17754
17888
|
useLanguage(lang);
|
|
17755
17889
|
useDebugLogging(debugMode);
|
|
17756
17890
|
return /*#__PURE__*/React__default.createElement(AuthProvider, {
|
|
@@ -17795,8 +17929,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17795
17929
|
skipSuccessScreen: skipSuccessScreen,
|
|
17796
17930
|
captureAudio: captureAudio,
|
|
17797
17931
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
17798
|
-
|
|
17799
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
17932
|
+
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
17800
17933
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
17801
17934
|
faceLivenessProps: faceLivenessProps,
|
|
17802
17935
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
@@ -17808,7 +17941,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
17808
17941
|
onModelError: onModelError,
|
|
17809
17942
|
onUserCancel: onUserCancel
|
|
17810
17943
|
};
|
|
17811
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints,
|
|
17944
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
17812
17945
|
})))));
|
|
17813
17946
|
};
|
|
17814
17947
|
|