idmission-web-sdk 2.3.60 → 2.3.61
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/GuidanceMessage.d.ts.map +1 -1
- package/dist/components/common/overlay.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerIdentification.d.ts +2 -0
- package/dist/components/customer_flows/CustomerIdentification.d.ts.map +1 -1
- package/dist/components/customer_flows/CustomerVerification.d.ts +2 -0
- package/dist/components/customer_flows/CustomerVerification.d.ts.map +1 -1
- package/dist/components/customer_flows/FaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/FaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/IdValidation.d.ts +2 -0
- package/dist/components/customer_flows/IdValidation.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +4 -0
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationCapture.d.ts.map +1 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts +2 -1
- package/dist/components/customer_identification/CustomerIdentificationWizard.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationCapture.d.ts.map +1 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts +2 -1
- package/dist/components/customer_verification/CustomerVerificationWizard.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts +2 -1
- package/dist/components/face_liveness/FaceLivenessCapture.d.ts.map +1 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts +3 -1
- package/dist/components/face_liveness/FaceLivenessWizard.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -0
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureLoadingOverlayDefault.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts +2 -1
- package/dist/components/id_capture/IdCaptureWizard.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts +5 -2
- package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +2 -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/SelfieCaptureWizard.d.ts +3 -1
- package/dist/components/selfie_capture/SelfieCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +3 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/models/FaceDetection.d.ts.map +1 -1
- package/dist/lib/models/loadProgressHooks.d.ts +3 -1
- package/dist/lib/models/loadProgressHooks.d.ts.map +1 -1
- package/dist/lib/utils/cropping.d.ts +1 -1
- package/dist/lib/utils/cropping.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +440 -316
- 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 +440 -316
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +440 -316
- 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
|
@@ -236,7 +236,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
236
236
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
237
237
|
};
|
|
238
238
|
|
|
239
|
-
var webSdkVersion = '2.3.
|
|
239
|
+
var webSdkVersion = '2.3.61';
|
|
240
240
|
|
|
241
241
|
function getPlatform() {
|
|
242
242
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -484,7 +484,7 @@ var templateObject_1$S;
|
|
|
484
484
|
var ButtonsRow$2 = styled__default.default.div(templateObject_1$R || (templateObject_1$R = __makeTemplateObject(["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"], ["\n display: flex;\n gap: 0 15px;\n justify-content: center;\n text-align: left;\n"])));
|
|
485
485
|
var templateObject_1$R;
|
|
486
486
|
|
|
487
|
-
var GuidanceMessageContainerDiv = styled__default.default.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n"])), function (_a) {
|
|
487
|
+
var GuidanceMessageContainerDiv = styled__default.default.div(templateObject_1$Q || (templateObject_1$Q = __makeTemplateObject(["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n padding: 0 10%;\n box-sizing: border-box;\n"], ["\n position: absolute;\n top: calc(", ");\n ", "\n font-weight: bold;\n width: 100%;\n display: flex;\n padding: 0 10%;\n box-sizing: border-box;\n"])), function (_a) {
|
|
488
488
|
var $top = _a.$top;
|
|
489
489
|
return $top !== null && $top !== void 0 ? $top : '10%';
|
|
490
490
|
}, function (_a) {
|
|
@@ -497,33 +497,33 @@ var GuidanceMessageContainer = function GuidanceMessageContainer(props) {
|
|
|
497
497
|
if (!portalLocation) return element;
|
|
498
498
|
return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
|
|
499
499
|
};
|
|
500
|
-
var GuidanceMessage = styled__default.default.div(templateObject_2$
|
|
500
|
+
var GuidanceMessage = styled__default.default.div(templateObject_2$I || (templateObject_2$I = __makeTemplateObject(["\n margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\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 margin-left: auto;\n margin-right: auto;\n background: ", ";\n color: ", ";\n border-radius: 8px;\n z-index: 10001;\n padding: 16px 24px;\n font-size: 18px;\n font-weight: bold;\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"])), function (props) {
|
|
501
501
|
var _a, _b, _c, _d, _e, _f;
|
|
502
|
-
return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : '
|
|
502
|
+
return (_f = (_a = props.$background) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.backgroundColor) !== null && _f !== void 0 ? _f : 'white';
|
|
503
503
|
}, function (props) {
|
|
504
504
|
var _a, _b, _c, _d, _e, _f;
|
|
505
505
|
return (_f = (_a = props.$textColor) !== null && _a !== void 0 ? _a : (_e = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.guidanceMessages) === null || _c === void 0 ? void 0 : _c[(_d = props.$variant) !== null && _d !== void 0 ? _d : 'default']) === null || _e === void 0 ? void 0 : _e.textColor) !== null && _f !== void 0 ? _f : 'black';
|
|
506
506
|
});
|
|
507
|
-
var templateObject_1$Q, templateObject_2$
|
|
507
|
+
var templateObject_1$Q, templateObject_2$I;
|
|
508
508
|
|
|
509
509
|
var wavesAnimation = styled.keyframes(templateObject_1$P || (templateObject_1$P = __makeTemplateObject(["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"], ["\n 0% {\n opacity: 0;\n transform: scale3d(1, 1, 1);\n }\n 80% {\n opacity: 1;\n }\n 100% {\n transform: scale3d(2, 2, 1);\n opacity: 0;\n }\n"])));
|
|
510
|
-
var progressBarAnimation = styled.keyframes(templateObject_2$
|
|
511
|
-
var dualRingSpinnerAnimation = styled.keyframes(templateObject_3$
|
|
510
|
+
var progressBarAnimation = styled.keyframes(templateObject_2$H || (templateObject_2$H = __makeTemplateObject(["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"], ["\n 0% {\n width: 0;\n }\n 100% {\n width: 100%;\n }\n"])));
|
|
511
|
+
var dualRingSpinnerAnimation = styled.keyframes(templateObject_3$u || (templateObject_3$u = __makeTemplateObject(["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"], ["\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n"])));
|
|
512
512
|
var progressBorderAnimation = styled.keyframes(templateObject_4$n || (templateObject_4$n = __makeTemplateObject(["\n to {\n stroke-dashoffset: 0;\n }\n"], ["\n to {\n stroke-dashoffset: 0;\n }\n"])));
|
|
513
|
-
var templateObject_1$P, templateObject_2$
|
|
513
|
+
var templateObject_1$P, templateObject_2$H, templateObject_3$u, templateObject_4$n;
|
|
514
514
|
|
|
515
515
|
var OverlayContainer = styled__default.default.div(templateObject_1$O || (templateObject_1$O = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: column;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ", ";\n ", "\n\n z-index: 10000;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n\n display: flex;\n flex-direction: column;\n\n overflow-x: hidden;\n overflow-y: auto;\n\n background: ", ";\n ", "\n\n z-index: 10000;\n"])), function (props) {
|
|
516
516
|
return props.theme.background ? "".concat(props.theme.background) : "white";
|
|
517
517
|
}, function (props) {
|
|
518
518
|
return props.theme.textColor ? "color: ".concat(props.theme.textColor, ";") : "";
|
|
519
519
|
});
|
|
520
|
-
var OverlayInner$2 = styled__default.default.div(templateObject_2$
|
|
520
|
+
var OverlayInner$2 = styled__default.default.div(templateObject_2$G || (templateObject_2$G = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n width: 100%;\n height: 100%;\n ", "\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n width: 100%;\n height: 100%;\n ", "\n"])), function (props) {
|
|
521
521
|
var _a;
|
|
522
522
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
523
523
|
}, function (props) {
|
|
524
524
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
525
525
|
});
|
|
526
|
-
var OverlayImageContainer = styled__default.default.div(templateObject_3$
|
|
526
|
+
var OverlayImageContainer = styled__default.default.div(templateObject_3$t || (templateObject_3$t = __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"])));
|
|
527
527
|
var OverlayImageRow = styled__default.default.div(templateObject_4$m || (templateObject_4$m = __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"])));
|
|
528
528
|
var GrayOverlayContainer = styled__default.default(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
529
529
|
var ButtonsColumn = styled__default.default.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"])));
|
|
@@ -545,7 +545,7 @@ var LoadingOverlayHeader = styled__default.default.div(templateObject_10$1 || (t
|
|
|
545
545
|
}, function (props) {
|
|
546
546
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
547
547
|
});
|
|
548
|
-
var LoadingOverlayGuidanceMessage = styled__default.default(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
|
|
548
|
+
var LoadingOverlayGuidanceMessage = styled__default.default(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"], ["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"])));
|
|
549
549
|
var LoadingOverlayImageContainer = styled__default.default(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"])));
|
|
550
550
|
var LoadingOverlayProgressBarBackground = styled__default.default.div.attrs({
|
|
551
551
|
className: 'loading-overlay-progress-bar-background'
|
|
@@ -565,7 +565,7 @@ var LoadingOverlayLoadingListItem = styled__default.default.li(templateObject_19
|
|
|
565
565
|
var LoadingOverlayProgressContainer = styled__default.default.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"])));
|
|
566
566
|
var LoadingOverlayCustomLoadingGraphic = styled__default.default.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
567
567
|
var LoadingOverlayContinueButtonContainer = styled__default.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
568
|
-
var templateObject_1$O, templateObject_2$
|
|
568
|
+
var templateObject_1$O, templateObject_2$G, templateObject_3$t, templateObject_4$m, templateObject_5$e, templateObject_6$9, templateObject_7$5, templateObject_8$4, templateObject_9$2, 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;
|
|
569
569
|
|
|
570
570
|
var GeolocationAccessDeniedOverlay = function GeolocationAccessDeniedOverlay(_a) {
|
|
571
571
|
var accessBlockedImageUrl = _a.accessBlockedImageUrl;
|
|
@@ -2239,6 +2239,7 @@ function clearCanvas(canvas) {
|
|
|
2239
2239
|
var templateObject_1$N;
|
|
2240
2240
|
|
|
2241
2241
|
function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quality, maxHeight) {
|
|
2242
|
+
var _a;
|
|
2242
2243
|
if (quality === void 0) {
|
|
2243
2244
|
quality = 0.92;
|
|
2244
2245
|
}
|
|
@@ -2255,10 +2256,14 @@ function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quali
|
|
|
2255
2256
|
cropCanvas.height = frame.height;
|
|
2256
2257
|
cropCtx.drawImage(rawCanvas, 0, 0, cropCanvas.width, cropCanvas.height);
|
|
2257
2258
|
} else {
|
|
2258
|
-
var _a = face.box
|
|
2259
|
-
|
|
2260
|
-
|
|
2259
|
+
var _b = (_a = face === null || face === void 0 ? void 0 : face.box) !== null && _a !== void 0 ? _a : {
|
|
2260
|
+
xMin: 0,
|
|
2261
|
+
width: frame.width
|
|
2262
|
+
},
|
|
2263
|
+
xMin = _b.xMin,
|
|
2264
|
+
width = _b.width;
|
|
2261
2265
|
var desiredWidth = frame.height * 0.6;
|
|
2266
|
+
alert("this side! ".concat(desiredWidth, "x").concat(frame.height));
|
|
2262
2267
|
var faceCenterX = xMin + width / 2;
|
|
2263
2268
|
var xPos = Math.max(0, faceCenterX - desiredWidth / 2);
|
|
2264
2269
|
cropCanvas.width = desiredWidth;
|
|
@@ -2757,6 +2762,9 @@ function useLoadFaceDetector(_a) {
|
|
|
2757
2762
|
clearTimeout(modelLoadTimeout);
|
|
2758
2763
|
setModelLoadState('warming');
|
|
2759
2764
|
setModelWarmingStartedAt(new Date().getTime());
|
|
2765
|
+
return [4 /*yield*/, testFaceDetectionAgainstKnownImage(model)];
|
|
2766
|
+
case 1:
|
|
2767
|
+
_b.sent();
|
|
2760
2768
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
2761
2769
|
cancelled = false;
|
|
2762
2770
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -2764,7 +2772,7 @@ function useLoadFaceDetector(_a) {
|
|
|
2764
2772
|
cancel();
|
|
2765
2773
|
};
|
|
2766
2774
|
return [4 /*yield*/, videoReady];
|
|
2767
|
-
case
|
|
2775
|
+
case 2:
|
|
2768
2776
|
_b.sent();
|
|
2769
2777
|
if (cancelled) return [2 /*return*/];
|
|
2770
2778
|
model.detectForVideo(videoRef.current, performance.now());
|
|
@@ -2916,6 +2924,26 @@ function processFaceDetectorPrediction(_a) {
|
|
|
2916
2924
|
faceIsStable: faceIsStable
|
|
2917
2925
|
};
|
|
2918
2926
|
}
|
|
2927
|
+
function testFaceDetectionAgainstKnownImage(detector) {
|
|
2928
|
+
return new Promise(function (resolve, reject) {
|
|
2929
|
+
var img = new Image();
|
|
2930
|
+
img.crossOrigin = 'anonymous';
|
|
2931
|
+
img.onload = function () {
|
|
2932
|
+
var prediction = detector.detectForVideo(img, performance.now());
|
|
2933
|
+
if (prediction.detections.length > 0) {
|
|
2934
|
+
debug('face detection test result', prediction.detections);
|
|
2935
|
+
resolve(void 0);
|
|
2936
|
+
} else {
|
|
2937
|
+
warn('face detection test failed');
|
|
2938
|
+
reject(new Error('testFaceDetectionAgainstKnownImage failed to predict'));
|
|
2939
|
+
}
|
|
2940
|
+
};
|
|
2941
|
+
img.onerror = function () {
|
|
2942
|
+
return reject(new Error('testFaceDetectionAgainstKnownImage failed to load image'));
|
|
2943
|
+
};
|
|
2944
|
+
img.src = "".concat(DEFAULT_CDN_URL, "/head-test.jpg");
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2919
2947
|
|
|
2920
2948
|
var preloadModels = function preloadModels(_a) {
|
|
2921
2949
|
return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -5286,13 +5314,13 @@ function CameraTamperSeal(_a) {
|
|
|
5286
5314
|
}, messageText)));
|
|
5287
5315
|
}
|
|
5288
5316
|
var StyledOverlayInner$4 = styled__default.default(OverlayInner$2)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
5289
|
-
var StyledOverlayHeading = styled__default.default.h3(templateObject_2$
|
|
5317
|
+
var StyledOverlayHeading = styled__default.default.h3(templateObject_2$F || (templateObject_2$F = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
5290
5318
|
function useCameraStore(selector) {
|
|
5291
5319
|
var store = React.useContext(CameraStoreContext);
|
|
5292
5320
|
if (!store) throw new Error('useCameraStore cannot be used without Provider');
|
|
5293
5321
|
return zustand.useStore(store, selector);
|
|
5294
5322
|
}
|
|
5295
|
-
var templateObject_1$M, templateObject_2$
|
|
5323
|
+
var templateObject_1$M, templateObject_2$F;
|
|
5296
5324
|
|
|
5297
5325
|
var DocumentDetectionModelContext = /*#__PURE__*/React.createContext({
|
|
5298
5326
|
startDocumentDetection: function startDocumentDetection() {
|
|
@@ -6277,11 +6305,11 @@ function DebugStatsPane(_a) {
|
|
|
6277
6305
|
return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
|
|
6278
6306
|
}
|
|
6279
6307
|
var DebugStatsPaneDiv = styled__default.default.span(templateObject_1$L || (templateObject_1$L = __makeTemplateObject(["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"], ["\n font-size: 16px;\n font-family: monospace;\n position: absolute;\n left: 20px;\n bottom: 20px;\n margin-right: 20px;\n padding: 8px;\n color: limegreen;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10002;\n pointer-events: none;\n"])));
|
|
6280
|
-
var ObjectDetectionDebugOverlayDiv = styled__default.default.div(templateObject_2$
|
|
6308
|
+
var ObjectDetectionDebugOverlayDiv = styled__default.default.div(templateObject_2$E || (templateObject_2$E = __makeTemplateObject(["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"], ["\n position: absolute;\n z-index: 1001;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n max-width: 100%;\n max-height: 100%;\n overflow: hidden;\n pointer-events: none;\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
|
|
6281
6309
|
var $flipX = _a.$flipX;
|
|
6282
6310
|
return $flipX ? 'transform: scaleX(-1);' : '';
|
|
6283
6311
|
});
|
|
6284
|
-
var ObjectDetectionDebugBox = styled__default.default.div(templateObject_3$
|
|
6312
|
+
var ObjectDetectionDebugBox = styled__default.default.div(templateObject_3$s || (templateObject_3$s = __makeTemplateObject(["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"], ["\n font: 10px monospace;\n position: absolute;\n border: 3px solid ", ";\n color: ", ";\n ", "\n transform-style: preserve-3d;\n"])), function (_a) {
|
|
6285
6313
|
var $color = _a.$color;
|
|
6286
6314
|
return $color !== null && $color !== void 0 ? $color : 'green';
|
|
6287
6315
|
}, function (_a) {
|
|
@@ -6488,7 +6516,7 @@ function SelfieCaptureFaceKeypoint(_a) {
|
|
|
6488
6516
|
}
|
|
6489
6517
|
});
|
|
6490
6518
|
}
|
|
6491
|
-
var templateObject_1$L, templateObject_2$
|
|
6519
|
+
var templateObject_1$L, templateObject_2$E, templateObject_3$s, templateObject_4$l;
|
|
6492
6520
|
|
|
6493
6521
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
6494
6522
|
var _b = _a.classNames,
|
|
@@ -6528,11 +6556,11 @@ var Container$7 = styled__default.default.div(templateObject_1$K || (templateObj
|
|
|
6528
6556
|
var _a, _b, _c;
|
|
6529
6557
|
return (_c = (_b = (_a = props.theme.idCapture) === null || _a === void 0 ? void 0 : _a.overrideWrongDocumentTypeGuidance) === null || _b === void 0 ? void 0 : _b.textColor) !== null && _c !== void 0 ? _c : 'black';
|
|
6530
6558
|
});
|
|
6531
|
-
var InnerContainer = styled__default.default.div(templateObject_2$
|
|
6532
|
-
var Message = styled__default.default.span(templateObject_3$
|
|
6559
|
+
var InnerContainer = styled__default.default.div(templateObject_2$D || (templateObject_2$D = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: row;\n padding: 16px 24px;\n margin: auto 0;\n width: 100%;\n"])));
|
|
6560
|
+
var Message = styled__default.default.span(templateObject_3$r || (templateObject_3$r = __makeTemplateObject(["\n display: block;\n margin: auto 12px auto 0;\n"], ["\n display: block;\n margin: auto 12px auto 0;\n"])));
|
|
6533
6561
|
var ButtonContainer = styled__default.default.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n display: flex;\n margin-left: auto;\n"], ["\n display: flex;\n margin-left: auto;\n"])));
|
|
6534
6562
|
var Button$1 = styled__default.default(LoaderButton)(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n white-space: nowrap;\n margin: auto;\n"], ["\n white-space: nowrap;\n margin: auto;\n"])));
|
|
6535
|
-
var templateObject_1$K, templateObject_2$
|
|
6563
|
+
var templateObject_1$K, templateObject_2$D, templateObject_3$r, templateObject_4$k, templateObject_5$d;
|
|
6536
6564
|
|
|
6537
6565
|
// This is a simplified version of https://github.com/ZeeCoder/use-resize-observer.
|
|
6538
6566
|
// We have removed all options and made it compliant with React Compiler/React 19.
|
|
@@ -6846,12 +6874,12 @@ var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
|
|
|
6846
6874
|
}, verbiage.retryBtnText)));
|
|
6847
6875
|
};
|
|
6848
6876
|
var StyledOverlayInner$3 = styled__default.default(OverlayInner$2)(templateObject_1$J || (templateObject_1$J = __makeTemplateObject(["\n max-width: 500px;\n height: auto;\n margin: auto;\n"], ["\n max-width: 500px;\n height: auto;\n margin: auto;\n"])));
|
|
6849
|
-
var StyledOverlayImageContainer$1 = styled__default.default(OverlayImageContainer)(templateObject_2$
|
|
6850
|
-
var Description$4 = styled__default.default.p(templateObject_3$
|
|
6877
|
+
var StyledOverlayImageContainer$1 = styled__default.default(OverlayImageContainer)(templateObject_2$C || (templateObject_2$C = __makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
|
|
6878
|
+
var Description$4 = styled__default.default.p(templateObject_3$q || (templateObject_3$q = __makeTemplateObject(["\n line-height: 1.5;\n margin-bottom: 50px;\n"], ["\n line-height: 1.5;\n margin-bottom: 50px;\n"])));
|
|
6851
6879
|
var RetryButton$1 = styled__default.default(LoaderButton)(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
|
|
6852
|
-
var templateObject_1$J, templateObject_2$
|
|
6880
|
+
var templateObject_1$J, templateObject_2$C, templateObject_3$q, templateObject_4$j;
|
|
6853
6881
|
|
|
6854
|
-
var ExitCaptureStyledButton = styled__default.default.button(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index:
|
|
6882
|
+
var ExitCaptureStyledButton = styled__default.default.button(templateObject_1$I || (templateObject_1$I = __makeTemplateObject(["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 10002;\n border: none;\n border-radius: 4px;\n background: var(--idm-color-secondary-200);\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"], ["\n position: absolute;\n top: 12px;\n right: 12px;\n font-size: 20px;\n width: 32px;\n height: 32px;\n font-family: monospace;\n z-index: 10002;\n border: none;\n border-radius: 4px;\n background: var(--idm-color-secondary-200);\n cursor: pointer;\n padding: 8px;\n box-sizing: border-box;\n display: flex;\n\n &:hover {\n background: #ddd;\n }\n\n & > svg {\n margin: 0;\n padding: 0;\n box-sizing: border-box;\n }\n"])));
|
|
6855
6883
|
var ExitCaptureButton = function ExitCaptureButton(_a) {
|
|
6856
6884
|
var onClick = _a.onClick,
|
|
6857
6885
|
className = _a.className;
|
|
@@ -7371,20 +7399,20 @@ function IdCaptureLoadingGraphicMobile(_a) {
|
|
|
7371
7399
|
}))));
|
|
7372
7400
|
}
|
|
7373
7401
|
var LoadingGraphicWrapper = styled__default.default.div(templateObject_1$H || (templateObject_1$H = __makeTemplateObject(["\n display: flex;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n width: 100%;\n height: 100%;\n"])));
|
|
7374
|
-
var LoadingGraphicSvg = styled__default.default.svg(templateObject_2$
|
|
7402
|
+
var LoadingGraphicSvg = styled__default.default.svg(templateObject_2$B || (templateObject_2$B = __makeTemplateObject(["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n max-height: 80%;\n max-width: 80%;\n"], ["\n margin: auto;\n transform: scale(\n ", "\n );\n transform-style: preserve-3d;\n transition:\n transform 0.2s linear,\n border-width 0.2s linear;\n border: ", "px solid\n ", ";\n max-height: 80%;\n max-width: 80%;\n"])), function (props) {
|
|
7375
7403
|
return props.$frame > 1 ? 1 : props.$frame === 1 ? 1.25 : 0.75;
|
|
7376
7404
|
}, function (props) {
|
|
7377
7405
|
return props.$frame >= 5 ? 10 : 0;
|
|
7378
7406
|
}, function (props) {
|
|
7379
7407
|
return props.$borderColor;
|
|
7380
7408
|
});
|
|
7381
|
-
var LoadingGraphicCardGroup = styled__default.default.g(templateObject_3$
|
|
7409
|
+
var LoadingGraphicCardGroup = styled__default.default.g(templateObject_3$p || (templateObject_3$p = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
|
|
7382
7410
|
return props.$offScreen ? '-500px' : '0';
|
|
7383
7411
|
});
|
|
7384
7412
|
var LoadingGraphicPhoneGroup = styled__default.default.g(templateObject_4$i || (templateObject_4$i = __makeTemplateObject(["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"], ["\n transform: translate(", ", 0);\n transform-style: preserve-3d;\n transition: transform 0.3s linear;\n"])), function (props) {
|
|
7385
7413
|
return props.$offScreen ? '40px' : '0';
|
|
7386
7414
|
});
|
|
7387
|
-
var templateObject_1$H, templateObject_2$
|
|
7415
|
+
var templateObject_1$H, templateObject_2$B, templateObject_3$p, templateObject_4$i;
|
|
7388
7416
|
|
|
7389
7417
|
function LoadingListItemIndicator(_a) {
|
|
7390
7418
|
var _b = _a.state,
|
|
@@ -7439,9 +7467,11 @@ function useLoadProgressHooks(_a) {
|
|
|
7439
7467
|
var ready = _a.ready,
|
|
7440
7468
|
modelLoadState = _a.modelLoadState,
|
|
7441
7469
|
modelLoadProgress = _a.modelLoadProgress,
|
|
7470
|
+
modelError = _a.modelError,
|
|
7442
7471
|
onLoadingStarted = _a.onLoadingStarted,
|
|
7443
7472
|
onLoadingProgress = _a.onLoadingProgress,
|
|
7444
|
-
onLoadingCompleted = _a.onLoadingCompleted
|
|
7473
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7474
|
+
onLoadingFailed = _a.onLoadingFailed;
|
|
7445
7475
|
var onLoadingStartedRef = React.useRef(onLoadingStarted);
|
|
7446
7476
|
React.useEffect(function () {
|
|
7447
7477
|
onLoadingStartedRef.current = onLoadingStarted;
|
|
@@ -7454,6 +7484,10 @@ function useLoadProgressHooks(_a) {
|
|
|
7454
7484
|
React.useEffect(function () {
|
|
7455
7485
|
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
7456
7486
|
}, [onLoadingCompleted]);
|
|
7487
|
+
var onLoadingFailedRef = React.useRef(onLoadingFailed);
|
|
7488
|
+
React.useEffect(function () {
|
|
7489
|
+
onLoadingFailedRef.current = onLoadingFailed;
|
|
7490
|
+
}, [onLoadingFailed]);
|
|
7457
7491
|
var loadingStarted = modelLoadState !== 'not-started';
|
|
7458
7492
|
React.useEffect(function () {
|
|
7459
7493
|
var _a;
|
|
@@ -7469,6 +7503,12 @@ function useLoadProgressHooks(_a) {
|
|
|
7469
7503
|
var _a;
|
|
7470
7504
|
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
7471
7505
|
}, [ready]);
|
|
7506
|
+
React.useEffect(function () {
|
|
7507
|
+
var _a;
|
|
7508
|
+
if (modelLoadState === 'error') {
|
|
7509
|
+
(_a = onLoadingFailedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingFailedRef, modelError !== null && modelError !== void 0 ? modelError : undefined);
|
|
7510
|
+
}
|
|
7511
|
+
}, [modelLoadState, modelError]);
|
|
7472
7512
|
}
|
|
7473
7513
|
|
|
7474
7514
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
@@ -7477,6 +7517,7 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7477
7517
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
7478
7518
|
onLoadingProgress = _a.onLoadingProgress,
|
|
7479
7519
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
7520
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
7480
7521
|
onDismissed = _a.onDismissed,
|
|
7481
7522
|
onUserCancel = _a.onUserCancel,
|
|
7482
7523
|
instructions = _a.instructions,
|
|
@@ -7497,7 +7538,8 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7497
7538
|
modelsReady = _o.ready,
|
|
7498
7539
|
modelLoadState = _o.modelLoadState,
|
|
7499
7540
|
modelDownloadProgress = _o.modelDownloadProgress,
|
|
7500
|
-
modelWarmingStartedAt = _o.modelWarmingStartedAt
|
|
7541
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt,
|
|
7542
|
+
modelError = _o.modelError;
|
|
7501
7543
|
var _p = useCameraStore(),
|
|
7502
7544
|
cameraReady = _p.cameraReady,
|
|
7503
7545
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -7541,9 +7583,11 @@ var IdCaptureLoadingOverlayDefault = function IdCaptureLoadingOverlayDefault(_a)
|
|
|
7541
7583
|
ready: ready,
|
|
7542
7584
|
modelLoadState: modelLoadState,
|
|
7543
7585
|
modelLoadProgress: modelLoadProgress,
|
|
7586
|
+
modelError: modelError,
|
|
7544
7587
|
onLoadingStarted: onLoadingStarted,
|
|
7545
7588
|
onLoadingProgress: onLoadingProgress,
|
|
7546
|
-
onLoadingCompleted: onLoadingCompleted
|
|
7589
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
7590
|
+
onLoadingFailed: onLoadingFailed
|
|
7547
7591
|
});
|
|
7548
7592
|
if (dismissed) return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null);
|
|
7549
7593
|
if (cameraAccessDenied) {
|
|
@@ -7644,8 +7688,8 @@ var OverlayInner$1 = styled__default.default(LoadingOverlayInner)(templateObject
|
|
|
7644
7688
|
var _a, _b, _c, _d;
|
|
7645
7689
|
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';
|
|
7646
7690
|
});
|
|
7647
|
-
var ContinuityCameraCheckboxContainer$1 = styled__default.default.div(templateObject_2$
|
|
7648
|
-
var ContinuityCameraCheckboxInner = styled__default.default(GuidanceMessage)(templateObject_3$
|
|
7691
|
+
var ContinuityCameraCheckboxContainer$1 = styled__default.default.div(templateObject_2$A || (templateObject_2$A = __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"])));
|
|
7692
|
+
var ContinuityCameraCheckboxInner = styled__default.default(GuidanceMessage)(templateObject_3$o || (templateObject_3$o = __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"])));
|
|
7649
7693
|
var ContinuityCameraCheckbox$1 = styled__default.default.input(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
7650
7694
|
var ButtonsRow$1 = styled__default.default(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
7651
7695
|
var _a, _b, _c, _d;
|
|
@@ -7684,10 +7728,10 @@ var ContinueButton$1 = styled__default.default(LoaderButton)(templateObject_8$3
|
|
|
7684
7728
|
var _a, _b, _c, _d;
|
|
7685
7729
|
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';
|
|
7686
7730
|
});
|
|
7687
|
-
var templateObject_1$G, templateObject_2$
|
|
7731
|
+
var templateObject_1$G, templateObject_2$A, templateObject_3$o, templateObject_4$h, templateObject_5$c, templateObject_6$8, templateObject_7$4, templateObject_8$3;
|
|
7688
7732
|
|
|
7689
7733
|
var ContinuityCameraCheckboxContainer = styled__default.default.div(templateObject_1$F || (templateObject_1$F = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
7690
|
-
var ContinuityCameraCheckbox = styled__default.default.input(templateObject_2$
|
|
7734
|
+
var ContinuityCameraCheckbox = styled__default.default.input(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
7691
7735
|
var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
|
|
7692
7736
|
var _b, _c, _d, _e;
|
|
7693
7737
|
var onDismissed = _a.onDismissed,
|
|
@@ -7808,7 +7852,7 @@ var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
|
|
|
7808
7852
|
}
|
|
7809
7853
|
}, ready ? verbiage.continueText : modelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)"))));
|
|
7810
7854
|
};
|
|
7811
|
-
var templateObject_1$F, templateObject_2$
|
|
7855
|
+
var templateObject_1$F, templateObject_2$z;
|
|
7812
7856
|
|
|
7813
7857
|
var components$1 = {
|
|
7814
7858
|
"default": IdCaptureLoadingOverlayDefault,
|
|
@@ -7867,8 +7911,8 @@ var CapturedDocumentImg = function CapturedDocumentImg(_a) {
|
|
|
7867
7911
|
};
|
|
7868
7912
|
|
|
7869
7913
|
var Card = styled__default.default.div(templateObject_1$E || (templateObject_1$E = __makeTemplateObject(["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100% - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"], ["\n background: white;\n border-radius: 8px;\n padding: 24px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);\n margin: auto;\n max-width: min(500px, 100% - 48px);\n max-height: 100%;\n overflow: auto;\n box-sizing: border-box;\n"])));
|
|
7870
|
-
var FlexCard = styled__default.default(Card)(templateObject_2$
|
|
7871
|
-
var templateObject_1$E, templateObject_2$
|
|
7914
|
+
var FlexCard = styled__default.default(Card)(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
7915
|
+
var templateObject_1$E, templateObject_2$y;
|
|
7872
7916
|
|
|
7873
7917
|
var imageDisplayOrder = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'idFrontIrImage', 'idBackIrImage', 'idFrontUvImage', 'idBackUvImage'];
|
|
7874
7918
|
var IdCaptureSuccess = function IdCaptureSuccess(_a) {
|
|
@@ -7931,12 +7975,12 @@ var IdCaptureSuccess = function IdCaptureSuccess(_a) {
|
|
|
7931
7975
|
}, verbiage.retryText)))));
|
|
7932
7976
|
};
|
|
7933
7977
|
var Heading$a = styled__default.default.h1(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"], ["\n font-size: 1.5rem;\n margin-top: 0;\n margin-bottom: 1.5rem;\n"])));
|
|
7934
|
-
var ImagesContainer = styled__default.default(OverlayImageContainer)(templateObject_2$
|
|
7935
|
-
var ImageRow = styled__default.default(OverlayImageRow)(templateObject_3$
|
|
7978
|
+
var ImagesContainer = styled__default.default(OverlayImageContainer)(templateObject_2$x || (templateObject_2$x = __makeTemplateObject(["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"], ["\n flex-grow: 1;\n overflow-y: auto;\n padding-bottom: 0;\n max-width: 100%;\n"])));
|
|
7979
|
+
var ImageRow = styled__default.default(OverlayImageRow)(templateObject_3$n || (templateObject_3$n = __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"])));
|
|
7936
7980
|
var ImageCol$1 = styled__default.default.div(templateObject_4$g || (templateObject_4$g = __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"])));
|
|
7937
7981
|
var StyledImage = styled__default.default(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
7938
7982
|
var DebugPre = styled__default.default.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"])));
|
|
7939
|
-
var templateObject_1$D, templateObject_2$
|
|
7983
|
+
var templateObject_1$D, templateObject_2$x, templateObject_3$n, templateObject_4$g, templateObject_5$b, templateObject_6$7;
|
|
7940
7984
|
|
|
7941
7985
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
7942
7986
|
var _this = this;
|
|
@@ -7993,7 +8037,7 @@ var IdCardGuideImageContainer = styled__default.default(IdCardBorder)(templateOb
|
|
|
7993
8037
|
}, function (props) {
|
|
7994
8038
|
return props.$isMobile ? props.$isLandscape ? 'height: 100%;' : 'width: 80%;' : props.$isLandscape ? 'height: 70%;' : 'width: 82%;';
|
|
7995
8039
|
});
|
|
7996
|
-
var IdCardGuideImage = styled__default.default.img(templateObject_2$
|
|
8040
|
+
var IdCardGuideImage = styled__default.default.img(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"], ["\n max-height: 100%;\n transform-style: preserve-3d;\n ", "\n ", "\n"])), function (props) {
|
|
7997
8041
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
7998
8042
|
}, function (props) {
|
|
7999
8043
|
return props.$isInvisible ? 'opacity: 0;' : '';
|
|
@@ -8143,7 +8187,7 @@ function IdCardBorderSvg(_a) {
|
|
|
8143
8187
|
className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
|
|
8144
8188
|
}));
|
|
8145
8189
|
}
|
|
8146
|
-
var IdCardBorderContainer = styled__default.default.div(templateObject_3$
|
|
8190
|
+
var IdCardBorderContainer = styled__default.default.div(templateObject_3$m || (templateObject_3$m = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n display: flex;\n position: relative;\n margin: auto;\n\n & .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(3) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(4) {\n animation-delay: 1.33s;\n }\n }\n"], ["\n align-items: center;\n justify-content: center;\n display: flex;\n position: relative;\n margin: auto;\n\n & .idmSdkWaves {\n position: absolute;\n animation: ", " 2s ease-out infinite;\n transform-style: preserve-3d;\n\n &:nth-child(3) {\n animation-delay: 0.66s;\n }\n\n &:nth-child(4) {\n animation-delay: 1.33s;\n }\n }\n"])), wavesAnimation);
|
|
8147
8191
|
var IdCardBorderInner = styled__default.default.div(templateObject_4$f || (templateObject_4$f = __makeTemplateObject(["\n max-height: 100%;\n max-width: 100%;\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n"], ["\n max-height: 100%;\n max-width: 100%;\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n"])));
|
|
8148
8192
|
var SvgOverlay = styled__default.default.svg(templateObject_5$a || (templateObject_5$a = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n"])));
|
|
8149
8193
|
var IdCardBorderRect = styled__default.default.rect(templateObject_6$6 || (templateObject_6$6 = __makeTemplateObject(["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"], ["\n &.idmSdkProgressBorder {\n animation: ", " ", "\n ", ";\n }\n\n &.idmSdkProgressPaused {\n animation-play-state: paused;\n }\n"])), progressBorderAnimation, function (props) {
|
|
@@ -8153,7 +8197,7 @@ var IdCardBorderRect = styled__default.default.rect(templateObject_6$6 || (templ
|
|
|
8153
8197
|
var _a;
|
|
8154
8198
|
return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
|
|
8155
8199
|
});
|
|
8156
|
-
var templateObject_1$C, templateObject_2$
|
|
8200
|
+
var templateObject_1$C, templateObject_2$w, templateObject_3$m, templateObject_4$f, templateObject_5$a, templateObject_6$6;
|
|
8157
8201
|
|
|
8158
8202
|
var defaultIdCaptureGuideImages = {
|
|
8159
8203
|
portrait: {
|
|
@@ -8345,12 +8389,12 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8345
8389
|
var Wrapper$1 = styled__default.default.div(templateObject_1$B || (templateObject_1$B = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n ", "\n\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])), function (props) {
|
|
8346
8390
|
return props.$isLandscape ? 'height: 100%;' : 'height: 100%;';
|
|
8347
8391
|
});
|
|
8348
|
-
var FlipImageContainer = styled__default.default(IdCardGuideImageContainer)(templateObject_2$
|
|
8392
|
+
var FlipImageContainer = styled__default.default(IdCardGuideImageContainer)(templateObject_2$v || (templateObject_2$v = __makeTemplateObject(["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n height: 100%; // todo: branch between desktop and mobile\n"], ["\n backface-visibility: hidden;\n transition: transform ", "s;\n transform: ", ";\n transform-style: preserve-3d;\n position: absolute;\n display: block;\n top: 0;\n height: 100%; // todo: branch between desktop and mobile\n"])), function (props) {
|
|
8349
8393
|
return props.$transitionTime;
|
|
8350
8394
|
}, function (props) {
|
|
8351
8395
|
return props.$transforms;
|
|
8352
8396
|
});
|
|
8353
|
-
var templateObject_1$B, templateObject_2$
|
|
8397
|
+
var templateObject_1$B, templateObject_2$v;
|
|
8354
8398
|
|
|
8355
8399
|
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
8356
8400
|
orientation: 'landscape',
|
|
@@ -8639,8 +8683,8 @@ var regionClsx = function regionClsx(classNames, which) {
|
|
|
8639
8683
|
}).join(' ');
|
|
8640
8684
|
};
|
|
8641
8685
|
var StyledPageContainer = styled__default.default.div(templateObject_1$z || (templateObject_1$z = __makeTemplateObject(["\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1000;\n overflow: hidden;\n"], ["\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 1000;\n overflow: hidden;\n"])));
|
|
8642
|
-
var GuidesContainer = styled__default.default.div(templateObject_2$
|
|
8643
|
-
var GuideCenterRow = styled__default.default.div(templateObject_3$
|
|
8686
|
+
var GuidesContainer = styled__default.default.div(templateObject_2$u || (templateObject_2$u = __makeTemplateObject(["\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n"])));
|
|
8687
|
+
var GuideCenterRow = styled__default.default.div(templateObject_3$l || (templateObject_3$l = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"], ["\n position: relative;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-items: center;\n box-sizing: border-box;\n max-width: 100%;\n max-height: 100%;\n min-height: 0;\n flex: 1;\n"])));
|
|
8644
8688
|
var GuideRegion = styled__default.default.div(templateObject_4$e || (templateObject_4$e = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n justify-content: end;\n width: 100%;\n position: relative;\n z-index: 1000;\n background: ", ";\n color: ", ";\n text-align: center;\n ", "\n ", "\n"])), function (props) {
|
|
8645
8689
|
var _a, _b, _c, _d, _e;
|
|
8646
8690
|
return (_e = (_a = props.$maskColor) !== null && _a !== void 0 ? _a : (_d = (_c = (_b = props.theme) === null || _b === void 0 ? void 0 : _b.idCapture) === null || _c === void 0 ? void 0 : _c.guideOverlay) === null || _d === void 0 ? void 0 : _d.backgroundColor) !== null && _e !== void 0 ? _e : 'rgba(0, 0, 0, 0.5)';
|
|
@@ -8668,7 +8712,7 @@ var GuideText = styled__default.default.span(templateObject_8$2 || (templateObje
|
|
|
8668
8712
|
var GuideCenterInner = styled__default.default.div(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n position: relative;\n top: 0;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n position: relative;\n top: 0;\n margin: auto;\n ", "\n max-height: 100%;\n max-width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (props) {
|
|
8669
8713
|
return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
|
|
8670
8714
|
});
|
|
8671
|
-
var templateObject_1$z, templateObject_2$
|
|
8715
|
+
var templateObject_1$z, templateObject_2$u, templateObject_3$l, templateObject_4$e, templateObject_5$9, templateObject_6$5, templateObject_7$3, templateObject_8$2, templateObject_9$1;
|
|
8672
8716
|
|
|
8673
8717
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
8674
8718
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -8812,8 +8856,8 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
8812
8856
|
var CanvasWrapper$1 = styled__default.default.div(templateObject_1$y || (templateObject_1$y = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n z-index: -1;\n"])), function (props) {
|
|
8813
8857
|
return props.$maskColor;
|
|
8814
8858
|
});
|
|
8815
|
-
var Canvas$1 = styled__default.default.canvas(templateObject_2$
|
|
8816
|
-
var templateObject_1$y, templateObject_2$
|
|
8859
|
+
var Canvas$1 = styled__default.default.canvas(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
8860
|
+
var templateObject_1$y, templateObject_2$t;
|
|
8817
8861
|
|
|
8818
8862
|
function IdCaptureGuides(_a) {
|
|
8819
8863
|
var _b = _a.guideType,
|
|
@@ -8894,11 +8938,11 @@ var Spinner = styled__default.default.div(templateObject_1$x || (templateObject_
|
|
|
8894
8938
|
var $color = _a.$color;
|
|
8895
8939
|
return $color !== null && $color !== void 0 ? $color : '#888';
|
|
8896
8940
|
}, dualRingSpinnerAnimation);
|
|
8897
|
-
var SpinnerPageContainer = styled__default.default.div(templateObject_2$
|
|
8941
|
+
var SpinnerPageContainer = styled__default.default.div(templateObject_2$s || (templateObject_2$s = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"])));
|
|
8898
8942
|
function SpinnerPage() {
|
|
8899
8943
|
return /*#__PURE__*/React__namespace.default.createElement(SpinnerPageContainer, null, /*#__PURE__*/React__namespace.default.createElement(Spinner, null));
|
|
8900
8944
|
}
|
|
8901
|
-
var templateObject_1$x, templateObject_2$
|
|
8945
|
+
var templateObject_1$x, templateObject_2$s;
|
|
8902
8946
|
|
|
8903
8947
|
var IdCaptureImagePreview = function IdCaptureImagePreview(_a) {
|
|
8904
8948
|
var _b = _a.classNames,
|
|
@@ -8986,10 +9030,10 @@ var SelfieProgressPreview = function SelfieProgressPreview(_a) {
|
|
|
8986
9030
|
})));
|
|
8987
9031
|
};
|
|
8988
9032
|
var StyledSpinner = styled__default.default(Spinner)(templateObject_1$w || (templateObject_1$w = __makeTemplateObject(["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"], ["\n position: relative;\n top: 4px;\n left: -3px;\n margin: 0 3px 0 -12px;\n"])));
|
|
8989
|
-
var ImagePreviewWrapper = styled__default.default.div(templateObject_2$
|
|
8990
|
-
var ImagePreviewText = styled__default.default.div(templateObject_3$
|
|
9033
|
+
var ImagePreviewWrapper = styled__default.default.div(templateObject_2$r || (templateObject_2$r = __makeTemplateObject(["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"], ["\n position: absolute;\n display: flex;\n flex-direction: column;\n height: 33%;\n bottom: 12px;\n right: 12px;\n"])));
|
|
9034
|
+
var ImagePreviewText = styled__default.default.div(templateObject_3$k || (templateObject_3$k = __makeTemplateObject(["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"], ["\n display: block;\n position: absolute;\n top: -32px;\n font:\n 14px -apple-system,\n BlinkMacSystemFont,\n 'Segoe UI',\n Roboto,\n Helvetica,\n Arial,\n sans-serif,\n 'Apple Color Emoji',\n 'Segoe UI Emoji',\n 'Segoe UI Symbol';\n color: white;\n text-align: center;\n margin: 0 auto;\n width: 100%;\n"])));
|
|
8991
9035
|
var ImagePreviewImageWrapper = styled__default.default.div(templateObject_4$d || (templateObject_4$d = __makeTemplateObject(["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"], ["\n position: relative;\n height: calc(100% - 8px);\n padding: 4px;\n border-radius: 4px;\n background: white;\n\n & > img {\n border-radius: 4px;\n width: auto;\n max-height: 100%;\n }\n"])));
|
|
8992
|
-
var templateObject_1$w, templateObject_2$
|
|
9036
|
+
var templateObject_1$w, templateObject_2$r, templateObject_3$k, templateObject_4$d;
|
|
8993
9037
|
|
|
8994
9038
|
var documentCaptureInitialState = {
|
|
8995
9039
|
documents: [],
|
|
@@ -9338,8 +9382,8 @@ var DocumentCaptureGuideOverlay = function DocumentCaptureGuideOverlay(_a) {
|
|
|
9338
9382
|
var CanvasWrapper = styled__default.default.div(templateObject_1$v || (templateObject_1$v = __makeTemplateObject(["\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"], ["\n flex-grow: 1;\n background-clip: padding-box;\n box-shadow: inset 0 0 0 2px ", ";\n"])), function (props) {
|
|
9339
9383
|
return props.$maskColor;
|
|
9340
9384
|
});
|
|
9341
|
-
var Canvas = styled__default.default.canvas(templateObject_2$
|
|
9342
|
-
var templateObject_1$v, templateObject_2$
|
|
9385
|
+
var Canvas = styled__default.default.canvas(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
9386
|
+
var templateObject_1$v, templateObject_2$q;
|
|
9343
9387
|
|
|
9344
9388
|
var CameraFeedWrapper = styled__default.default.div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
9345
9389
|
return props.$mode === 'snapToGuides' ? "display: flex;\n position: absolute;\n left: ".concat(props.$x, "px;\n top: ").concat(props.$y, "px;\n width: ").concat(props.$w, "px;\n height: ").concat(props.$h, "px;") : "";
|
|
@@ -9525,10 +9569,10 @@ var DocumentCaptureScreen = function DocumentCaptureScreen(_a) {
|
|
|
9525
9569
|
}, !cameraReady ? verbiage.loadingBtnText : capturing ? verbiage.capturingBtnText : verbiage.captureBtnText))))));
|
|
9526
9570
|
};
|
|
9527
9571
|
var CaptureContainer = styled__default.default.div(templateObject_1$s || (templateObject_1$s = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
9528
|
-
var HeadingRow = styled__default.default.div(templateObject_2$
|
|
9572
|
+
var HeadingRow = styled__default.default.div(templateObject_2$p || (templateObject_2$p = __makeTemplateObject(["\n background: ", ";\n text-align: center;\n color: white;\n"], ["\n background: ", ";\n text-align: center;\n color: white;\n"])), function (props) {
|
|
9529
9573
|
return props.$maskColor;
|
|
9530
9574
|
});
|
|
9531
|
-
var Heading$9 = styled__default.default.h1(templateObject_3$
|
|
9575
|
+
var Heading$9 = styled__default.default.h1(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n font-size: 22px;\n"], ["\n font-size: 22px;\n"])));
|
|
9532
9576
|
var FooterRow = styled__default.default.div(templateObject_4$c || (templateObject_4$c = __makeTemplateObject(["\n background: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 0 20px 20px;\n height: auto;\n color: white;\n"], ["\n background: ", ";\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 0 20px 20px;\n height: auto;\n color: white;\n"])), function (props) {
|
|
9533
9577
|
return props.$maskColor;
|
|
9534
9578
|
});
|
|
@@ -9538,7 +9582,7 @@ var Instructions = styled__default.default.div(templateObject_5$8 || (templateOb
|
|
|
9538
9582
|
});
|
|
9539
9583
|
var StyledButtonsRow$8 = styled__default.default(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
9540
9584
|
var PreviewImage = styled__default.default.img(templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"], ["\n width: 100%;\n height: 100%;\n object-fit: cover;\n"])));
|
|
9541
|
-
var templateObject_1$s, templateObject_2$
|
|
9585
|
+
var templateObject_1$s, templateObject_2$p, templateObject_3$j, templateObject_4$c, templateObject_5$8, templateObject_6$4, templateObject_7$2;
|
|
9542
9586
|
|
|
9543
9587
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
9544
9588
|
var onSuccess = _a.onSuccess,
|
|
@@ -9810,12 +9854,12 @@ var IdCaptureFallback = function IdCaptureFallback(_a) {
|
|
|
9810
9854
|
}, verbiage.doneBtnText))))));
|
|
9811
9855
|
};
|
|
9812
9856
|
var StyledOverlayInner$2 = styled__default.default(OverlayInner$2)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
9813
|
-
var Heading$8 = styled__default.default.h3(templateObject_2$
|
|
9814
|
-
var Description$3 = styled__default.default.p(templateObject_3$
|
|
9857
|
+
var Heading$8 = styled__default.default.h3(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
9858
|
+
var Description$3 = styled__default.default.p(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
9815
9859
|
var Instruction = styled__default.default.p(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
9816
9860
|
var ImageCol = styled__default.default.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"])));
|
|
9817
9861
|
var StyledButtonsRow$7 = styled__default.default(ButtonsRow$2)(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
9818
|
-
var templateObject_1$r, templateObject_2$
|
|
9862
|
+
var templateObject_1$r, templateObject_2$o, templateObject_3$i, templateObject_4$b, templateObject_5$7, templateObject_6$3;
|
|
9819
9863
|
|
|
9820
9864
|
function ScalingCameraFeed() {
|
|
9821
9865
|
var _a = useIdCaptureStore(),
|
|
@@ -10171,8 +10215,8 @@ var ScreenContainer = styled__default.default.div(templateObject_1$q || (templat
|
|
|
10171
10215
|
var _a;
|
|
10172
10216
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
10173
10217
|
});
|
|
10174
|
-
var ScreenPanel = styled__default.default.div(templateObject_2$
|
|
10175
|
-
var SelectIdCardScreenPanel = styled__default.default(ScreenPanel)(templateObject_3$
|
|
10218
|
+
var ScreenPanel = styled__default.default.div(templateObject_2$n || (templateObject_2$n = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n flex-grow: 1;\n background: #f7f6fb;\n box-sizing: border-box;\n padding: 40px;\n"], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n flex-grow: 1;\n background: #f7f6fb;\n box-sizing: border-box;\n padding: 40px;\n"])));
|
|
10219
|
+
var SelectIdCardScreenPanel = styled__default.default(ScreenPanel)(templateObject_3$h || (templateObject_3$h = __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"])));
|
|
10176
10220
|
var ScreenPanelHeading = styled__default.default.h3(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
10177
10221
|
var ScreenActionsBar = styled__default.default.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"])));
|
|
10178
10222
|
var DashedSeparator = styled__default.default.div(templateObject_6$2 || (templateObject_6$2 = __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"])));
|
|
@@ -10456,13 +10500,14 @@ function humanFileSize(bytes, si, dp) {
|
|
|
10456
10500
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
10457
10501
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
10458
10502
|
}
|
|
10459
|
-
var templateObject_1$q, templateObject_2$
|
|
10503
|
+
var templateObject_1$q, templateObject_2$n, templateObject_3$h, templateObject_4$a, templateObject_5$6, templateObject_6$2, templateObject_7$1, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
10460
10504
|
|
|
10461
10505
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
10462
10506
|
var _b, _c, _d, _e, _f;
|
|
10463
10507
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
10464
10508
|
onLoadingProgress = _a.onLoadingProgress,
|
|
10465
10509
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
10510
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
10466
10511
|
onSuccess = _a.onSuccess,
|
|
10467
10512
|
onExitCapture = _a.onExitCapture,
|
|
10468
10513
|
onUserCancel = _a.onUserCancel,
|
|
@@ -10820,6 +10865,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10820
10865
|
onLoadingStarted: onLoadingStarted,
|
|
10821
10866
|
onLoadingProgress: onLoadingProgress,
|
|
10822
10867
|
onLoadingCompleted: onLoadingCompleted,
|
|
10868
|
+
onLoadingFailed: onLoadingFailed,
|
|
10823
10869
|
onDismissed: function onDismissed() {
|
|
10824
10870
|
setOverlayDismissed(true);
|
|
10825
10871
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -11234,8 +11280,8 @@ function HeadGuide(_a) {
|
|
|
11234
11280
|
height: parentHeight
|
|
11235
11281
|
})));
|
|
11236
11282
|
}
|
|
11237
|
-
var AbsoluteSvg = styled__default.default.svg(templateObject_2$
|
|
11238
|
-
var RelativeSvgContainer = styled__default.default.div(templateObject_3$
|
|
11283
|
+
var AbsoluteSvg = styled__default.default.svg(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n"], ["\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n"])));
|
|
11284
|
+
var RelativeSvgContainer = styled__default.default.div(templateObject_3$g || (templateObject_3$g = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n align-items: ", ";\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n align-items: ", ";\n"])), function (props) {
|
|
11239
11285
|
return props.$verticalAlign === 'bottom' ? 'flex-end' : 'center';
|
|
11240
11286
|
});
|
|
11241
11287
|
function SelfieCaptureAnimatedMask(_a) {
|
|
@@ -11462,10 +11508,10 @@ function SelfieCaptureAnimatedMaskWithStatus(_a) {
|
|
|
11462
11508
|
status: status
|
|
11463
11509
|
}));
|
|
11464
11510
|
}
|
|
11465
|
-
var templateObject_1$p, templateObject_2$
|
|
11511
|
+
var templateObject_1$p, templateObject_2$m, templateObject_3$g;
|
|
11466
11512
|
|
|
11467
11513
|
var FaceCaptureGuideContainer = styled__default.default.div(templateObject_1$o || (templateObject_1$o = __makeTemplateObject(["\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n"], ["\n position: absolute;\n z-index: 1000;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 40px;\n box-sizing: border-box;\n"])));
|
|
11468
|
-
var FaceCaptureGuideInner = styled__default.default.div(templateObject_2$
|
|
11514
|
+
var FaceCaptureGuideInner = styled__default.default.div(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n position: relative;\n height: 60%;\n"], ["\n position: relative;\n height: 60%;\n"])));
|
|
11469
11515
|
var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
|
|
11470
11516
|
var _b = _a.classNames,
|
|
11471
11517
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -11487,7 +11533,7 @@ var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
|
|
|
11487
11533
|
verticalAlign: "center"
|
|
11488
11534
|
})));
|
|
11489
11535
|
};
|
|
11490
|
-
var templateObject_1$o, templateObject_2$
|
|
11536
|
+
var templateObject_1$o, templateObject_2$l;
|
|
11491
11537
|
|
|
11492
11538
|
var SelfieGuidanceModelsContext = /*#__PURE__*/React.createContext({
|
|
11493
11539
|
start: function start() {
|
|
@@ -11816,11 +11862,11 @@ var SelfieCaptureFallback = function SelfieCaptureFallback(_a) {
|
|
|
11816
11862
|
}, !image ? invalidSelfie ? verbiage.retryButtonText : verbiage.captureBtnText : loading ? verbiage.doneBtnLoadingText : verbiage.doneBtnText)))));
|
|
11817
11863
|
};
|
|
11818
11864
|
var StyledOverlayInner$1 = styled__default.default(OverlayInner$2)(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
11819
|
-
var Heading$7 = styled__default.default.h3(templateObject_2$
|
|
11820
|
-
var Description$2 = styled__default.default.p(templateObject_3$
|
|
11865
|
+
var Heading$7 = styled__default.default.h3(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
11866
|
+
var Description$2 = styled__default.default.p(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
11821
11867
|
var ImageContainer$6 = styled__default.default(OverlayImageContainer)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
11822
11868
|
var StyledButtonsRow$6 = styled__default.default(ButtonsRow$2)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
11823
|
-
var templateObject_1$n, templateObject_2$
|
|
11869
|
+
var templateObject_1$n, templateObject_2$k, templateObject_3$f, templateObject_4$9, templateObject_5$5;
|
|
11824
11870
|
|
|
11825
11871
|
var initialState$4 = {
|
|
11826
11872
|
busy: false,
|
|
@@ -11861,32 +11907,39 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11861
11907
|
guidanceMessage = _a.guidanceMessage,
|
|
11862
11908
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
11863
11909
|
guidesComponent = _a.guidesComponent,
|
|
11864
|
-
_d = _a.
|
|
11865
|
-
|
|
11866
|
-
_e = _a.
|
|
11867
|
-
|
|
11868
|
-
_f = _a.
|
|
11869
|
-
|
|
11870
|
-
_g = _a.
|
|
11871
|
-
|
|
11872
|
-
_h = _a.
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
_l =
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11910
|
+
_d = _a.allowManualSelfieCaptureOnLoadingError,
|
|
11911
|
+
allowManualSelfieCaptureOnLoadingError = _d === void 0 ? false : _d,
|
|
11912
|
+
_e = _a.shouldCapture,
|
|
11913
|
+
shouldCapture = _e === void 0 ? true : _e,
|
|
11914
|
+
_f = _a.classNames,
|
|
11915
|
+
classNames = _f === void 0 ? {} : _f,
|
|
11916
|
+
_g = _a.colors,
|
|
11917
|
+
colors = _g === void 0 ? {} : _g,
|
|
11918
|
+
_h = _a.verbiage,
|
|
11919
|
+
rawVerbiage = _h === void 0 ? {} : _h,
|
|
11920
|
+
_j = _a.debugMode,
|
|
11921
|
+
debugMode = _j === void 0 ? false : _j;
|
|
11922
|
+
var _k = useResizeObserver(),
|
|
11923
|
+
ref = _k.ref,
|
|
11924
|
+
_l = _k.width,
|
|
11925
|
+
width = _l === void 0 ? 1 : _l,
|
|
11926
|
+
_m = _k.height,
|
|
11927
|
+
height = _m === void 0 ? 1 : _m;
|
|
11928
|
+
var _o = React.useReducer(reducer$3, initialState$4),
|
|
11929
|
+
_p = _o[0],
|
|
11930
|
+
busy = _p.busy,
|
|
11931
|
+
prediction = _p.prediction,
|
|
11932
|
+
dispatch = _o[1];
|
|
11885
11933
|
var lastPredictionCanvas = React.useRef(null);
|
|
11886
|
-
var
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11934
|
+
var videoRef = useCameraStore(shallow.useShallow(function (state) {
|
|
11935
|
+
return {
|
|
11936
|
+
videoRef: state.videoRef
|
|
11937
|
+
};
|
|
11938
|
+
})).videoRef;
|
|
11939
|
+
var _q = useSelfieGuidanceModelsContext(),
|
|
11940
|
+
onPredictionMade = _q.onPredictionMade,
|
|
11941
|
+
canvasRef = _q.canvasRef,
|
|
11942
|
+
guidanceError = _q.error;
|
|
11890
11943
|
onPredictionMade(useDebounce.useThrottledCallback(React.useCallback(function (prediction) {
|
|
11891
11944
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
11892
11945
|
return __generator(this, function (_a) {
|
|
@@ -11909,31 +11962,33 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11909
11962
|
onGuidanceNotSatisfied === null || onGuidanceNotSatisfied === void 0 ? void 0 : onGuidanceNotSatisfied();
|
|
11910
11963
|
}
|
|
11911
11964
|
}, [onGuidanceNotSatisfied, onGuidanceSatisfied, prediction === null || prediction === void 0 ? void 0 : prediction.faceReady]);
|
|
11965
|
+
var doCapture = React.useCallback(function () {
|
|
11966
|
+
var _a;
|
|
11967
|
+
dispatch({
|
|
11968
|
+
type: 'captureStarted'
|
|
11969
|
+
});
|
|
11970
|
+
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
11971
|
+
var frame = lastPredictionCanvas.current;
|
|
11972
|
+
if (!frame) return;
|
|
11973
|
+
var ctx = frame.getContext('2d');
|
|
11974
|
+
if (!ctx) return;
|
|
11975
|
+
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
11976
|
+
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, (_a = prediction === null || prediction === void 0 ? void 0 : prediction.face) !== null && _a !== void 0 ? _a : undefined);
|
|
11977
|
+
clearCanvas(frame);
|
|
11978
|
+
dispatch({
|
|
11979
|
+
type: 'captureCompleted'
|
|
11980
|
+
});
|
|
11981
|
+
}, [onSelfieCaptureStarted, onSelfieCaptured, prediction]);
|
|
11912
11982
|
React.useEffect(function () {
|
|
11913
11983
|
if (!(prediction === null || prediction === void 0 ? void 0 : prediction.faceReady)) return;
|
|
11914
|
-
var timer = setTimeout(
|
|
11915
|
-
dispatch({
|
|
11916
|
-
type: 'captureStarted'
|
|
11917
|
-
});
|
|
11918
|
-
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
11919
|
-
var frame = lastPredictionCanvas.current;
|
|
11920
|
-
if (!frame) return;
|
|
11921
|
-
var ctx = frame.getContext('2d');
|
|
11922
|
-
if (!ctx) return;
|
|
11923
|
-
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
11924
|
-
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, prediction.face);
|
|
11925
|
-
clearCanvas(frame);
|
|
11926
|
-
dispatch({
|
|
11927
|
-
type: 'captureCompleted'
|
|
11928
|
-
});
|
|
11929
|
-
}, 100);
|
|
11984
|
+
var timer = setTimeout(doCapture, 100);
|
|
11930
11985
|
return function () {
|
|
11931
|
-
|
|
11986
|
+
return timer && clearTimeout(timer);
|
|
11932
11987
|
};
|
|
11933
|
-
}, [
|
|
11934
|
-
var
|
|
11935
|
-
timedOut =
|
|
11936
|
-
timeoutStartedAt =
|
|
11988
|
+
}, [doCapture, prediction]);
|
|
11989
|
+
var _r = useTimeout(timeoutDurationMs, onTimeout),
|
|
11990
|
+
timedOut = _r.timedOut,
|
|
11991
|
+
timeoutStartedAt = _r.timeoutStartedAt;
|
|
11937
11992
|
var debugScalingDetails = useDebugScalingDetails({
|
|
11938
11993
|
enabled: debugMode,
|
|
11939
11994
|
pageWidth: width,
|
|
@@ -11948,17 +12003,21 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11948
12003
|
guidanceMoveForwardText: 'Move forward...',
|
|
11949
12004
|
guidanceMoveToCenterText: 'Move to the center...',
|
|
11950
12005
|
guidanceNoFaceDetectedText: 'Waiting for face to be detected...',
|
|
11951
|
-
guidanceNotStableText: 'Please hold still...'
|
|
12006
|
+
guidanceNotStableText: 'Please hold still...',
|
|
12007
|
+
guidanceManualCaptureText: 'Position your face in the circle and click to capture.',
|
|
12008
|
+
manualCaptureBtnText: 'Capture'
|
|
11952
12009
|
});
|
|
11953
|
-
var
|
|
12010
|
+
var allowManualCapture = !!guidanceError && allowManualSelfieCaptureOnLoadingError;
|
|
12011
|
+
var satisfied = allowManualCapture || ((_b = prediction === null || prediction === void 0 ? void 0 : prediction.faceReady) !== null && _b !== void 0 ? _b : false);
|
|
11954
12012
|
if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
|
|
11955
|
-
guidanceMessage || (guidanceMessage = satisfied ? verbiage.guidanceHoldStillText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? verbiage.guidanceNotStableText : '');
|
|
11956
|
-
if (guidanceError) {
|
|
12013
|
+
guidanceMessage || (guidanceMessage = allowManualCapture ? verbiage.guidanceManualCaptureText : satisfied ? verbiage.guidanceHoldStillText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? verbiage.guidanceNotStableText : '');
|
|
12014
|
+
if (guidanceError && !allowManualSelfieCaptureOnLoadingError) {
|
|
11957
12015
|
return /*#__PURE__*/React__namespace.default.createElement(SelfieCaptureFallback, {
|
|
11958
12016
|
classNames: classNames.fallback
|
|
11959
12017
|
});
|
|
11960
12018
|
}
|
|
11961
12019
|
var GuidesComponent = guidesComponent !== null && guidesComponent !== void 0 ? guidesComponent : FaceCaptureGuideOverlay;
|
|
12020
|
+
var guidanceVariant = allowManualCapture ? 'default' : satisfied ? 'positive' : 'negative';
|
|
11962
12021
|
return /*#__PURE__*/React__namespace.default.createElement(Container$6, {
|
|
11963
12022
|
ref: ref,
|
|
11964
12023
|
className: classNames.container
|
|
@@ -11968,28 +12027,40 @@ var SelfieCapture = function SelfieCapture(_a) {
|
|
|
11968
12027
|
classNames: classNames.guides,
|
|
11969
12028
|
status: satisfied ? 'processing' : 'ready'
|
|
11970
12029
|
}), !!guidanceMessage && ( /*#__PURE__*/React__namespace.default.createElement(GuidanceMessageContainer, {
|
|
12030
|
+
"$top": "12px",
|
|
11971
12031
|
className: classNames.guidanceMessageContainer
|
|
11972
12032
|
}, /*#__PURE__*/React__namespace.default.createElement(GuidanceMessage, {
|
|
11973
|
-
"$variant":
|
|
12033
|
+
"$variant": guidanceVariant,
|
|
11974
12034
|
className: classNames.guidanceMessage
|
|
11975
12035
|
}, guidanceMessage))), debugMode && (prediction === null || prediction === void 0 ? void 0 : prediction.face) && ( /*#__PURE__*/React__namespace.default.createElement(ObjectDetectionDebugOverlayDiv, null, /*#__PURE__*/React__namespace.default.createElement(SelfieCaptureFaceDebugBox, {
|
|
11976
12036
|
face: prediction.face,
|
|
11977
12037
|
scaling: debugScalingDetails,
|
|
11978
12038
|
color: satisfied ? 'green' : 'red'
|
|
11979
|
-
}))), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) && !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? '✅' : '❌', ' ', "Face", ' ', (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? 'Too Close' : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? 'Too Far' : 'Distance Correct', /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React__namespace.default.createElement("br", null), !timedOut ? '✅' : '❌', " Time Remaining:", ' ', Math.max(0, timeoutDurationMs - (new Date().getTime() - (timeoutStartedAt !== null && timeoutStartedAt !== void 0 ? timeoutStartedAt : new Date()).getTime())), "ms")), /*#__PURE__*/React__namespace.default.createElement(
|
|
12039
|
+
}))), debugMode && ( /*#__PURE__*/React__namespace.default.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) && !(prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? '✅' : '❌', ' ', "Face", ' ', (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? 'Too Close' : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? 'Too Far' : 'Distance Correct', /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React__namespace.default.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React__namespace.default.createElement("br", null), !timedOut ? '✅' : '❌', " Time Remaining:", ' ', Math.max(0, timeoutDurationMs - (new Date().getTime() - (timeoutStartedAt !== null && timeoutStartedAt !== void 0 ? timeoutStartedAt : new Date()).getTime())), "ms")), allowManualCapture && ( /*#__PURE__*/React__namespace.default.createElement(CaptureButtonContainer$1, null, /*#__PURE__*/React__namespace.default.createElement(CaptureButton$1, {
|
|
12040
|
+
disabled: !videoRef.current,
|
|
12041
|
+
onClick: function onClick() {
|
|
12042
|
+
var _a;
|
|
12043
|
+
// draw the current frame from videoRef to the canvas
|
|
12044
|
+
if (!lastPredictionCanvas.current || !videoRef.current) return;
|
|
12045
|
+
lastPredictionCanvas.current.width = videoRef.current.videoWidth;
|
|
12046
|
+
lastPredictionCanvas.current.height = videoRef.current.videoHeight;
|
|
12047
|
+
var ctx = (_a = lastPredictionCanvas.current) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
12048
|
+
if (!ctx) return;
|
|
12049
|
+
ctx.drawImage(videoRef.current, 0, 0);
|
|
12050
|
+
doCapture();
|
|
12051
|
+
}
|
|
12052
|
+
}, verbiage.manualCaptureBtnText))), /*#__PURE__*/React__namespace.default.createElement(ExitCaptureButton, {
|
|
11980
12053
|
onClick: onExit,
|
|
11981
12054
|
className: classNames.exitCaptureBtn
|
|
11982
12055
|
}));
|
|
11983
12056
|
};
|
|
11984
12057
|
var Container$6 = styled__default.default.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
11985
|
-
var
|
|
12058
|
+
var CaptureButtonContainer$1 = styled__default.default.div(templateObject_2$j || (templateObject_2$j = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n width: 100%;\n display: flex;\n z-index: 100000;\n box-sizing: border-box;\n padding: 0 12px 12px;\n"], ["\n position: absolute;\n bottom: 0;\n width: 100%;\n display: flex;\n z-index: 100000;\n box-sizing: border-box;\n padding: 0 12px 12px;\n"])));
|
|
12059
|
+
var CaptureButton$1 = styled__default.default(LoaderButton)(templateObject_3$e || (templateObject_3$e = __makeTemplateObject(["\n margin: 0 auto;\n width: 100%;\n border-radius: 30px;\n"], ["\n margin: 0 auto;\n width: 100%;\n border-radius: 30px;\n"])));
|
|
12060
|
+
var templateObject_1$m, templateObject_2$j, templateObject_3$e;
|
|
11986
12061
|
|
|
11987
12062
|
var initialState$3 = {
|
|
11988
|
-
frame: null,
|
|
11989
|
-
face: null,
|
|
11990
12063
|
requestState: 'CAPTURING',
|
|
11991
|
-
requestError: null,
|
|
11992
|
-
imageUrl: null,
|
|
11993
12064
|
faceLive: false,
|
|
11994
12065
|
eyeCoveringDetected: false,
|
|
11995
12066
|
maskDetected: false,
|
|
@@ -11998,7 +12069,6 @@ var initialState$3 = {
|
|
|
11998
12069
|
timesLivenessCheckFailed: 0
|
|
11999
12070
|
};
|
|
12000
12071
|
var reducer$2 = function reducer(state, action) {
|
|
12001
|
-
var _a, _b;
|
|
12002
12072
|
switch (action.type) {
|
|
12003
12073
|
case 'resetLivenessCheck':
|
|
12004
12074
|
return _assign(_assign({}, initialState$3), {
|
|
@@ -12033,12 +12103,12 @@ var reducer$2 = function reducer(state, action) {
|
|
|
12033
12103
|
});
|
|
12034
12104
|
case 'livenessChecked':
|
|
12035
12105
|
{
|
|
12036
|
-
var
|
|
12037
|
-
|
|
12038
|
-
statusCode =
|
|
12039
|
-
statusMessage =
|
|
12040
|
-
errorData =
|
|
12041
|
-
resultData =
|
|
12106
|
+
var _a = action.payload.response,
|
|
12107
|
+
_b = _a.status,
|
|
12108
|
+
statusCode = _b.statusCode,
|
|
12109
|
+
statusMessage = _b.statusMessage,
|
|
12110
|
+
errorData = _b.errorData,
|
|
12111
|
+
resultData = _a.resultData;
|
|
12042
12112
|
if (statusCode !== '000') {
|
|
12043
12113
|
return _assign(_assign({}, state), {
|
|
12044
12114
|
requestState: 'ERROR',
|
|
@@ -12059,8 +12129,8 @@ var reducer$2 = function reducer(state, action) {
|
|
|
12059
12129
|
timesLivenessCheckFailed += 1;
|
|
12060
12130
|
}
|
|
12061
12131
|
return _assign(_assign({}, state), {
|
|
12062
|
-
frame:
|
|
12063
|
-
face:
|
|
12132
|
+
frame: action.payload.frame,
|
|
12133
|
+
face: action.payload.face,
|
|
12064
12134
|
imageUrl: action.payload.imageUrl,
|
|
12065
12135
|
requestState: requestState,
|
|
12066
12136
|
faceLive: faceLive,
|
|
@@ -12098,23 +12168,25 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12098
12168
|
silentFallback = _h === void 0 ? false : _h,
|
|
12099
12169
|
guidesComponent = _a.guidesComponent,
|
|
12100
12170
|
disableCapturePreview = _a.disableCapturePreview,
|
|
12101
|
-
_j = _a.
|
|
12102
|
-
|
|
12103
|
-
_k = _a.
|
|
12104
|
-
|
|
12105
|
-
_l = _a.
|
|
12106
|
-
|
|
12171
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
12172
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
12173
|
+
_k = _a.classNames,
|
|
12174
|
+
classNames = _k === void 0 ? {} : _k,
|
|
12175
|
+
_l = _a.colors,
|
|
12176
|
+
colors = _l === void 0 ? {} : _l,
|
|
12177
|
+
_m = _a.verbiage,
|
|
12178
|
+
rawVerbiage = _m === void 0 ? {} : _m,
|
|
12107
12179
|
debugMode = _a.debugMode;
|
|
12108
|
-
var
|
|
12109
|
-
checkLiveness =
|
|
12110
|
-
submissionError =
|
|
12180
|
+
var _o = React.useContext(SubmissionContext),
|
|
12181
|
+
checkLiveness = _o.checkLiveness,
|
|
12182
|
+
submissionError = _o.submissionError;
|
|
12111
12183
|
var modelError = useSelfieGuidanceModelsContext().error;
|
|
12112
|
-
var
|
|
12113
|
-
state =
|
|
12114
|
-
dispatch =
|
|
12115
|
-
var
|
|
12116
|
-
imageUrl =
|
|
12117
|
-
setImageUrl =
|
|
12184
|
+
var _p = React.useReducer(reducer$2, initialState$3),
|
|
12185
|
+
state = _p[0],
|
|
12186
|
+
dispatch = _p[1];
|
|
12187
|
+
var _q = React.useState(null),
|
|
12188
|
+
imageUrl = _q[0],
|
|
12189
|
+
setImageUrl = _q[1];
|
|
12118
12190
|
var rawCanvas = React.useRef(null);
|
|
12119
12191
|
var cropCanvas = React.useRef(null);
|
|
12120
12192
|
var resizeCanvas = React.useRef(null);
|
|
@@ -12140,7 +12212,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12140
12212
|
var isPassed = state.requestState === 'PASSED';
|
|
12141
12213
|
React.useEffect(function checkLivenessIfPossible() {
|
|
12142
12214
|
var _this = this;
|
|
12143
|
-
if (!frame || !
|
|
12215
|
+
if (!frame || !isReady || submissionError) return;
|
|
12144
12216
|
dispatch({
|
|
12145
12217
|
type: 'livenessChecking'
|
|
12146
12218
|
});
|
|
@@ -12279,7 +12351,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12279
12351
|
});
|
|
12280
12352
|
}, []);
|
|
12281
12353
|
var initialDelayOver = useTimeout(initialCaptureDelayMs).timedOut;
|
|
12282
|
-
if (modelError) {
|
|
12354
|
+
if (modelError && !allowManualSelfieCaptureOnLoadingError) {
|
|
12283
12355
|
return /*#__PURE__*/React__namespace.default.createElement(SelfieCaptureFallback, {
|
|
12284
12356
|
key: state.timesLivenessCheckFailed,
|
|
12285
12357
|
onFinished: onFallbackImageCaptured,
|
|
@@ -12306,6 +12378,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
12306
12378
|
onGuidanceSatisfied: onGuidanceSatisfied,
|
|
12307
12379
|
onGuidanceNotSatisfied: onGuidanceNotSatisfied,
|
|
12308
12380
|
guidesComponent: guidesByRequestState,
|
|
12381
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
12309
12382
|
classNames: classNames,
|
|
12310
12383
|
colors: colors,
|
|
12311
12384
|
verbiage: rawVerbiage,
|
|
@@ -12572,35 +12645,39 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12572
12645
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
12573
12646
|
onLoadingProgress = _a.onLoadingProgress,
|
|
12574
12647
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12648
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
12575
12649
|
onDismissed = _a.onDismissed,
|
|
12576
12650
|
onUserCancel = _a.onUserCancel,
|
|
12577
12651
|
customOverlayContent = _a.customOverlayContent,
|
|
12578
12652
|
_d = _a.waitForIdCaptureModels,
|
|
12579
12653
|
waitForIdCaptureModels = _d === void 0 ? false : _d,
|
|
12580
|
-
_e = _a.
|
|
12581
|
-
|
|
12582
|
-
_f = _a.
|
|
12583
|
-
|
|
12584
|
-
_g = _a.
|
|
12585
|
-
|
|
12586
|
-
_h = _a.
|
|
12587
|
-
|
|
12654
|
+
_e = _a.allowManualSelfieCaptureOnLoadingError,
|
|
12655
|
+
allowManualSelfieCaptureOnLoadingError = _e === void 0 ? false : _e,
|
|
12656
|
+
_f = _a.assets,
|
|
12657
|
+
assets = _f === void 0 ? {} : _f,
|
|
12658
|
+
_g = _a.classNames,
|
|
12659
|
+
classNames = _g === void 0 ? {} : _g,
|
|
12660
|
+
_h = _a.colors,
|
|
12661
|
+
colors = _h === void 0 ? {} : _h,
|
|
12662
|
+
_j = _a.verbiage,
|
|
12663
|
+
rawVerbiage = _j === void 0 ? {} : _j;
|
|
12588
12664
|
var sessionCheckState = useAuthContext()[0].sessionCheckState;
|
|
12589
12665
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
12590
|
-
var
|
|
12666
|
+
var _k = useCameraStore(shallow.useShallow(function (state) {
|
|
12591
12667
|
return {
|
|
12592
12668
|
cameraReady: state.cameraReady,
|
|
12593
12669
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
12594
12670
|
microphoneAccessDenied: state.microphoneAccessDenied
|
|
12595
12671
|
};
|
|
12596
12672
|
})),
|
|
12597
|
-
cameraReady =
|
|
12598
|
-
cameraAccessDenied =
|
|
12599
|
-
microphoneAccessDenied =
|
|
12600
|
-
var
|
|
12601
|
-
modelLoadState =
|
|
12602
|
-
modelDownloadProgress =
|
|
12603
|
-
modelWarmingStartedAt =
|
|
12673
|
+
cameraReady = _k.cameraReady,
|
|
12674
|
+
cameraAccessDenied = _k.cameraAccessDenied,
|
|
12675
|
+
microphoneAccessDenied = _k.microphoneAccessDenied;
|
|
12676
|
+
var _l = useSelfieGuidanceModelsContext(),
|
|
12677
|
+
modelLoadState = _l.modelLoadState,
|
|
12678
|
+
modelDownloadProgress = _l.modelDownloadProgress,
|
|
12679
|
+
modelWarmingStartedAt = _l.modelWarmingStartedAt,
|
|
12680
|
+
modelError = _l.error;
|
|
12604
12681
|
var idCaptureModelsContext = React.useContext(IdCaptureModelsContext);
|
|
12605
12682
|
var theme = styled.useTheme();
|
|
12606
12683
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -12616,9 +12693,9 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12616
12693
|
modelsReadyText: 'Guided capture experience ready',
|
|
12617
12694
|
sessionCheckingText: 'Authenticating...'
|
|
12618
12695
|
});
|
|
12619
|
-
var
|
|
12620
|
-
headingTextIndex =
|
|
12621
|
-
setHeadingTextIndex =
|
|
12696
|
+
var _m = React.useState(0),
|
|
12697
|
+
headingTextIndex = _m[0],
|
|
12698
|
+
setHeadingTextIndex = _m[1];
|
|
12622
12699
|
var headingText = [verbiage.headingText, verbiage.removeEyeCoveringsText, verbiage.avoidExcessiveBacklightingText][headingTextIndex];
|
|
12623
12700
|
React.useEffect(function () {
|
|
12624
12701
|
setInterval(function () {
|
|
@@ -12629,20 +12706,29 @@ var SelfieCaptureLoadingOverlayDefault = function SelfieCaptureLoadingOverlayDef
|
|
|
12629
12706
|
}, []);
|
|
12630
12707
|
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
12631
12708
|
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
12632
|
-
var
|
|
12709
|
+
var _o = React.useState(false),
|
|
12710
|
+
overrideModelsReady = _o[0],
|
|
12711
|
+
setOverrideModelsReady = _o[1];
|
|
12712
|
+
var onLoadingFailedCallback = React.useCallback(function (error) {
|
|
12713
|
+
setOverrideModelsReady(allowManualSelfieCaptureOnLoadingError);
|
|
12714
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
12715
|
+
}, [onLoadingFailed, allowManualSelfieCaptureOnLoadingError]);
|
|
12716
|
+
var allModelsReady = overrideModelsReady || modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
12633
12717
|
var ready = sessionReady && allModelsReady && cameraReady;
|
|
12634
12718
|
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
12635
12719
|
useLoadProgressHooks({
|
|
12636
12720
|
ready: ready,
|
|
12637
12721
|
modelLoadState: modelLoadState,
|
|
12638
12722
|
modelLoadProgress: modelLoadProgress,
|
|
12723
|
+
modelError: modelError,
|
|
12639
12724
|
onLoadingStarted: onLoadingStarted,
|
|
12640
12725
|
onLoadingProgress: onLoadingProgress,
|
|
12641
|
-
onLoadingCompleted: onLoadingCompleted
|
|
12726
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
12727
|
+
onLoadingFailed: onLoadingFailedCallback
|
|
12642
12728
|
});
|
|
12643
|
-
var
|
|
12644
|
-
dismissed =
|
|
12645
|
-
setDismissed =
|
|
12729
|
+
var _p = React.useState(false),
|
|
12730
|
+
dismissed = _p[0],
|
|
12731
|
+
setDismissed = _p[1];
|
|
12646
12732
|
if (dismissed) return /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null);
|
|
12647
12733
|
if (cameraAccessDenied) {
|
|
12648
12734
|
return /*#__PURE__*/React__namespace.default.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -12783,6 +12869,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12783
12869
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
12784
12870
|
onLoadingProgress = _a.onLoadingProgress,
|
|
12785
12871
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
12872
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
12786
12873
|
onComplete = _a.onComplete,
|
|
12787
12874
|
onSuccess = _a.onSuccess,
|
|
12788
12875
|
onFailure = _a.onFailure,
|
|
@@ -12816,49 +12903,51 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12816
12903
|
waitForIdCaptureModels = _m === void 0 ? false : _m,
|
|
12817
12904
|
guidesComponent = _a.guidesComponent,
|
|
12818
12905
|
disableCapturePreview = _a.disableCapturePreview,
|
|
12819
|
-
_o = _a.
|
|
12820
|
-
|
|
12821
|
-
_p = _a.
|
|
12822
|
-
|
|
12823
|
-
_q = _a.
|
|
12824
|
-
|
|
12825
|
-
_r = _a.
|
|
12826
|
-
|
|
12827
|
-
_s = _a.
|
|
12828
|
-
|
|
12829
|
-
_t = _a.
|
|
12830
|
-
|
|
12831
|
-
|
|
12832
|
-
|
|
12833
|
-
|
|
12834
|
-
|
|
12835
|
-
|
|
12836
|
-
|
|
12906
|
+
_o = _a.allowManualSelfieCaptureOnLoadingError,
|
|
12907
|
+
allowManualSelfieCaptureOnLoadingError = _o === void 0 ? false : _o,
|
|
12908
|
+
_p = _a.assets,
|
|
12909
|
+
assets = _p === void 0 ? {} : _p,
|
|
12910
|
+
_q = _a.classNames,
|
|
12911
|
+
classNames = _q === void 0 ? {} : _q,
|
|
12912
|
+
_r = _a.colors,
|
|
12913
|
+
colors = _r === void 0 ? {} : _r,
|
|
12914
|
+
_s = _a.verbiage,
|
|
12915
|
+
verbiage = _s === void 0 ? {} : _s,
|
|
12916
|
+
_t = _a.debugMode,
|
|
12917
|
+
debugMode = _t === void 0 ? false : _t,
|
|
12918
|
+
_u = _a.showLoadingOverlay,
|
|
12919
|
+
showLoadingOverlay = _u === void 0 ? true : _u;
|
|
12920
|
+
var _v = useSubmissionContext(),
|
|
12921
|
+
submissionResponse = _v.submissionResponse,
|
|
12922
|
+
livenessCheckRequest = _v.livenessCheckRequest,
|
|
12923
|
+
setSelfieImage = _v.setSelfieImage,
|
|
12924
|
+
logSelfieCaptureAttempt = _v.logSelfieCaptureAttempt;
|
|
12925
|
+
var _w = useCameraStore(shallow.useShallow(function (state) {
|
|
12837
12926
|
return {
|
|
12838
12927
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
12839
12928
|
requestCameraAccess: state.requestCameraAccess,
|
|
12840
12929
|
releaseCameraAccess: state.releaseCameraAccess
|
|
12841
12930
|
};
|
|
12842
12931
|
})),
|
|
12843
|
-
cameraAccessDenied =
|
|
12844
|
-
requestCameraAccess =
|
|
12845
|
-
releaseCameraAccess =
|
|
12846
|
-
var
|
|
12847
|
-
faceCropImageUrl =
|
|
12848
|
-
setFaceCropImageUrl =
|
|
12849
|
-
var
|
|
12850
|
-
retryCount =
|
|
12851
|
-
setRetryCount =
|
|
12852
|
-
var
|
|
12853
|
-
captureState =
|
|
12854
|
-
setCaptureState =
|
|
12932
|
+
cameraAccessDenied = _w.cameraAccessDenied,
|
|
12933
|
+
requestCameraAccess = _w.requestCameraAccess,
|
|
12934
|
+
releaseCameraAccess = _w.releaseCameraAccess;
|
|
12935
|
+
var _x = React.useState(''),
|
|
12936
|
+
faceCropImageUrl = _x[0],
|
|
12937
|
+
setFaceCropImageUrl = _x[1];
|
|
12938
|
+
var _y = React.useState(0),
|
|
12939
|
+
retryCount = _y[0],
|
|
12940
|
+
setRetryCount = _y[1];
|
|
12941
|
+
var _z = React.useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
12942
|
+
captureState = _z[0],
|
|
12943
|
+
setCaptureState = _z[1];
|
|
12855
12944
|
var captureStartedAt = React.useRef();
|
|
12856
12945
|
var operationStartedAt = React.useRef();
|
|
12857
12946
|
var livenessScore = React.useRef();
|
|
12858
|
-
var
|
|
12859
|
-
start =
|
|
12860
|
-
stop =
|
|
12861
|
-
selfieGuidanceCanvasRef =
|
|
12947
|
+
var _0 = useSelfieGuidanceModelsContext(),
|
|
12948
|
+
start = _0.start,
|
|
12949
|
+
stop = _0.stop,
|
|
12950
|
+
selfieGuidanceCanvasRef = _0.canvasRef;
|
|
12862
12951
|
React.useEffect(function () {
|
|
12863
12952
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
12864
12953
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -12941,9 +13030,9 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12941
13030
|
}
|
|
12942
13031
|
onDenied === null || onDenied === void 0 ? void 0 : onDenied(submissionResponse, livenessCheckRequest);
|
|
12943
13032
|
}, [allowLivenessFailure, onDenied, submissionResponse, livenessCheckRequest]);
|
|
12944
|
-
var
|
|
12945
|
-
attempt =
|
|
12946
|
-
setAttempt =
|
|
13033
|
+
var _1 = React.useState(0),
|
|
13034
|
+
attempt = _1[0],
|
|
13035
|
+
setAttempt = _1[1];
|
|
12947
13036
|
var onExitCallback = React.useCallback(function () {
|
|
12948
13037
|
setAttempt(function (n) {
|
|
12949
13038
|
return n + 1;
|
|
@@ -13011,6 +13100,7 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
13011
13100
|
silentFallback: silentFallback,
|
|
13012
13101
|
guidesComponent: guidesComponent,
|
|
13013
13102
|
disableCapturePreview: disableCapturePreview,
|
|
13103
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
13014
13104
|
classNames: classNames.capture,
|
|
13015
13105
|
colors: colors,
|
|
13016
13106
|
verbiage: verbiage,
|
|
@@ -13053,9 +13143,11 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
13053
13143
|
onLoadingStarted: onLoadingStarted,
|
|
13054
13144
|
onLoadingProgress: onLoadingProgress,
|
|
13055
13145
|
onLoadingCompleted: onLoadingCompleted,
|
|
13146
|
+
onLoadingFailed: onLoadingFailed,
|
|
13056
13147
|
onUserCancel: onUserCancel,
|
|
13057
13148
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
13058
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
13149
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
13150
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
13059
13151
|
})));
|
|
13060
13152
|
};
|
|
13061
13153
|
function FaceLivenessWizardWithProviders(_a) {
|
|
@@ -14011,8 +14103,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
14011
14103
|
setTimeout(startHeadTracking, 1);
|
|
14012
14104
|
return stopHeadTracking;
|
|
14013
14105
|
}, [startHeadTracking, stopHeadTracking]);
|
|
14014
|
-
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
14015
|
-
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
14016
14106
|
var verbiage = useTranslations(rawVerbiage, {
|
|
14017
14107
|
guidanceMessageText: 'Please sign the box below'
|
|
14018
14108
|
});
|
|
@@ -14060,7 +14150,7 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
14060
14150
|
ref: ref,
|
|
14061
14151
|
className: classNames.container
|
|
14062
14152
|
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React__namespace.default.createElement(GuidanceMessageContainer, {
|
|
14063
|
-
"$top": "
|
|
14153
|
+
"$top": "12px",
|
|
14064
14154
|
className: classNames.guidanceMessageContainer
|
|
14065
14155
|
}, /*#__PURE__*/React__namespace.default.createElement(GuidanceMessage, {
|
|
14066
14156
|
className: classNames.guidanceMessage,
|
|
@@ -14150,6 +14240,7 @@ function SelfieCaptureWizard(_a) {
|
|
|
14150
14240
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
14151
14241
|
onLoadingProgress = _a.onLoadingProgress,
|
|
14152
14242
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14243
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
14153
14244
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
14154
14245
|
onCapture = _a.onCapture,
|
|
14155
14246
|
onUserCancel = _a.onUserCancel,
|
|
@@ -14168,43 +14259,45 @@ function SelfieCaptureWizard(_a) {
|
|
|
14168
14259
|
initialCaptureDelayMs = _g === void 0 ? 1000 : _g,
|
|
14169
14260
|
_h = _a.silentFallback,
|
|
14170
14261
|
silentFallback = _h === void 0 ? false : _h,
|
|
14262
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
14263
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
14171
14264
|
guidanceMessage = _a.guidanceMessage,
|
|
14172
14265
|
guidesComponent = _a.guidesComponent,
|
|
14173
|
-
|
|
14174
|
-
assets =
|
|
14175
|
-
|
|
14176
|
-
classNames =
|
|
14177
|
-
|
|
14178
|
-
colors =
|
|
14179
|
-
|
|
14180
|
-
verbiage =
|
|
14181
|
-
|
|
14182
|
-
debugMode =
|
|
14183
|
-
var
|
|
14184
|
-
setSelfieImage =
|
|
14185
|
-
logSelfieCaptureAttempt =
|
|
14186
|
-
var
|
|
14266
|
+
_k = _a.assets,
|
|
14267
|
+
assets = _k === void 0 ? {} : _k,
|
|
14268
|
+
_l = _a.classNames,
|
|
14269
|
+
classNames = _l === void 0 ? {} : _l,
|
|
14270
|
+
_m = _a.colors,
|
|
14271
|
+
colors = _m === void 0 ? {} : _m,
|
|
14272
|
+
_o = _a.verbiage,
|
|
14273
|
+
verbiage = _o === void 0 ? {} : _o,
|
|
14274
|
+
_p = _a.debugMode,
|
|
14275
|
+
debugMode = _p === void 0 ? false : _p;
|
|
14276
|
+
var _q = useSubmissionContext(),
|
|
14277
|
+
setSelfieImage = _q.setSelfieImage,
|
|
14278
|
+
logSelfieCaptureAttempt = _q.logSelfieCaptureAttempt;
|
|
14279
|
+
var _r = useCameraStore(shallow.useShallow(function (state) {
|
|
14187
14280
|
return {
|
|
14188
14281
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
14189
14282
|
requestCameraAccess: state.requestCameraAccess,
|
|
14190
14283
|
releaseCameraAccess: state.releaseCameraAccess
|
|
14191
14284
|
};
|
|
14192
14285
|
})),
|
|
14193
|
-
cameraAccessDenied =
|
|
14194
|
-
requestCameraAccess =
|
|
14195
|
-
releaseCameraAccess =
|
|
14196
|
-
var
|
|
14197
|
-
captureState =
|
|
14198
|
-
setCaptureState =
|
|
14286
|
+
cameraAccessDenied = _r.cameraAccessDenied,
|
|
14287
|
+
requestCameraAccess = _r.requestCameraAccess,
|
|
14288
|
+
releaseCameraAccess = _r.releaseCameraAccess;
|
|
14289
|
+
var _s = React.useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
14290
|
+
captureState = _s[0],
|
|
14291
|
+
setCaptureState = _s[1];
|
|
14199
14292
|
var rawCanvas = React.useRef(null);
|
|
14200
14293
|
var cropCanvas = React.useRef(null);
|
|
14201
14294
|
var resizeCanvas = React.useRef(null);
|
|
14202
14295
|
var captureStartedAt = React.useRef();
|
|
14203
14296
|
var operationStartedAt = React.useRef();
|
|
14204
|
-
var
|
|
14205
|
-
start =
|
|
14206
|
-
stop =
|
|
14207
|
-
modelError =
|
|
14297
|
+
var _t = useSelfieGuidanceModelsContext(),
|
|
14298
|
+
start = _t.start,
|
|
14299
|
+
stop = _t.stop,
|
|
14300
|
+
modelError = _t.error;
|
|
14208
14301
|
React.useEffect(function () {
|
|
14209
14302
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
14210
14303
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -14252,9 +14345,9 @@ function SelfieCaptureWizard(_a) {
|
|
|
14252
14345
|
status: status
|
|
14253
14346
|
}));
|
|
14254
14347
|
}, [captureState, guidesComponent]);
|
|
14255
|
-
var
|
|
14256
|
-
attempt =
|
|
14257
|
-
setAttempt =
|
|
14348
|
+
var _u = React.useState(0),
|
|
14349
|
+
attempt = _u[0],
|
|
14350
|
+
setAttempt = _u[1];
|
|
14258
14351
|
var onExitCallback = React.useCallback(function () {
|
|
14259
14352
|
setAttempt(function (n) {
|
|
14260
14353
|
return n + 1;
|
|
@@ -14273,6 +14366,9 @@ function SelfieCaptureWizard(_a) {
|
|
|
14273
14366
|
}
|
|
14274
14367
|
}, [cameraAccessDenied]);
|
|
14275
14368
|
var initialDelayOver = useTimeout(initialCaptureDelayMs, undefined, undefined, undefined, captureState === 'CAPTURING').timedOut;
|
|
14369
|
+
var onLoadingFailedCallback = React.useCallback(function (error) {
|
|
14370
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
14371
|
+
}, [onLoadingFailed]);
|
|
14276
14372
|
if (modelError) {
|
|
14277
14373
|
return /*#__PURE__*/React__namespace.default.createElement(SelfieCaptureFallback, {
|
|
14278
14374
|
onFinished: onFallbackImageCaptured,
|
|
@@ -14297,6 +14393,7 @@ function SelfieCaptureWizard(_a) {
|
|
|
14297
14393
|
guidanceMessage: guidanceMessage,
|
|
14298
14394
|
guidanceSatisfied: guidanceMessage ? false : undefined,
|
|
14299
14395
|
guidesComponent: guidesByRequestState,
|
|
14396
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
14300
14397
|
classNames: classNames.capture,
|
|
14301
14398
|
colors: colors.capture,
|
|
14302
14399
|
verbiage: verbiage.capture,
|
|
@@ -14312,9 +14409,11 @@ function SelfieCaptureWizard(_a) {
|
|
|
14312
14409
|
onLoadingStarted: onLoadingStarted,
|
|
14313
14410
|
onLoadingProgress: onLoadingProgress,
|
|
14314
14411
|
onLoadingCompleted: onLoadingCompleted,
|
|
14412
|
+
onLoadingFailed: onLoadingFailedCallback,
|
|
14315
14413
|
onUserCancel: onUserCancel,
|
|
14316
14414
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
14317
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
14415
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
14416
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
14318
14417
|
})));
|
|
14319
14418
|
}
|
|
14320
14419
|
|
|
@@ -14324,6 +14423,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14324
14423
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
14325
14424
|
onLoadingProgress = _a.onLoadingProgress,
|
|
14326
14425
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
14426
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
14327
14427
|
onSelfieCaptured = _a.onSelfieCaptured,
|
|
14328
14428
|
onComplete = _a.onComplete,
|
|
14329
14429
|
onVideoCaptured = _a.onVideoCaptured,
|
|
@@ -14352,39 +14452,41 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14352
14452
|
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
14353
14453
|
_l = _a.skipLivenessValidation,
|
|
14354
14454
|
skipLivenessValidation = _l === void 0 ? false : _l,
|
|
14455
|
+
_m = _a.allowManualSelfieCaptureOnLoadingError,
|
|
14456
|
+
allowManualSelfieCaptureOnLoadingError = _m === void 0 ? false : _m,
|
|
14355
14457
|
faceLivenessProps = _a.faceLivenessProps,
|
|
14356
14458
|
guidesComponent = _a.guidesComponent,
|
|
14357
|
-
|
|
14358
|
-
assets =
|
|
14359
|
-
|
|
14360
|
-
classNames =
|
|
14361
|
-
|
|
14362
|
-
colors =
|
|
14363
|
-
|
|
14364
|
-
verbiage =
|
|
14365
|
-
|
|
14366
|
-
debugMode =
|
|
14367
|
-
var
|
|
14368
|
-
selfieImage =
|
|
14369
|
-
setSelfieImage =
|
|
14370
|
-
setSignatureData =
|
|
14371
|
-
setSignatureVideoUrl =
|
|
14372
|
-
logSelfieCaptureAttempt =
|
|
14373
|
-
uploadDocument =
|
|
14459
|
+
_o = _a.assets,
|
|
14460
|
+
assets = _o === void 0 ? {} : _o,
|
|
14461
|
+
_p = _a.classNames,
|
|
14462
|
+
classNames = _p === void 0 ? {} : _p,
|
|
14463
|
+
_q = _a.colors,
|
|
14464
|
+
colors = _q === void 0 ? {} : _q,
|
|
14465
|
+
_r = _a.verbiage,
|
|
14466
|
+
verbiage = _r === void 0 ? {} : _r,
|
|
14467
|
+
_s = _a.debugMode,
|
|
14468
|
+
debugMode = _s === void 0 ? false : _s;
|
|
14469
|
+
var _t = useSubmissionContext(),
|
|
14470
|
+
selfieImage = _t.selfieImage,
|
|
14471
|
+
setSelfieImage = _t.setSelfieImage,
|
|
14472
|
+
setSignatureData = _t.setSignatureData,
|
|
14473
|
+
setSignatureVideoUrl = _t.setSignatureVideoUrl,
|
|
14474
|
+
logSelfieCaptureAttempt = _t.logSelfieCaptureAttempt,
|
|
14475
|
+
uploadDocument = _t.uploadDocument;
|
|
14374
14476
|
var cameraAccessDenied = useCameraStore(shallow.useShallow(function (state) {
|
|
14375
14477
|
return {
|
|
14376
14478
|
cameraAccessDenied: state.cameraAccessDenied
|
|
14377
14479
|
};
|
|
14378
14480
|
})).cameraAccessDenied;
|
|
14379
|
-
var
|
|
14380
|
-
captureState =
|
|
14381
|
-
setCaptureState =
|
|
14481
|
+
var _u = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
|
|
14482
|
+
captureState = _u[0],
|
|
14483
|
+
setCaptureState = _u[1];
|
|
14382
14484
|
var operationStartedAt = React.useRef();
|
|
14383
14485
|
var captureStartedAt = React.useRef();
|
|
14384
14486
|
var captureEndedAt = React.useRef();
|
|
14385
|
-
var
|
|
14386
|
-
start =
|
|
14387
|
-
stop =
|
|
14487
|
+
var _v = useSelfieGuidanceModelsContext(),
|
|
14488
|
+
start = _v.start,
|
|
14489
|
+
stop = _v.stop;
|
|
14388
14490
|
React.useEffect(function () {
|
|
14389
14491
|
operationStartedAt.current = new Date();
|
|
14390
14492
|
}, []);
|
|
@@ -14428,9 +14530,9 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14428
14530
|
filetype: 'image/jpeg'
|
|
14429
14531
|
}).then(onSelfieCaptured);
|
|
14430
14532
|
}, [logCaptureMetadata, onSelfieCaptured, setSelfieImage, uploadDocument]);
|
|
14431
|
-
var
|
|
14432
|
-
signatureImageUrl =
|
|
14433
|
-
setSignatureImageUrl =
|
|
14533
|
+
var _w = React.useState(null),
|
|
14534
|
+
signatureImageUrl = _w[0],
|
|
14535
|
+
setSignatureImageUrl = _w[1];
|
|
14434
14536
|
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
14435
14537
|
setSignatureData(signatureData);
|
|
14436
14538
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -14438,17 +14540,17 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14438
14540
|
setCaptureState('SUCCESS');
|
|
14439
14541
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
14440
14542
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
14441
|
-
var
|
|
14442
|
-
showLoadingOverlay =
|
|
14443
|
-
setShowLoadingOverlay =
|
|
14543
|
+
var _x = React.useState(true),
|
|
14544
|
+
showLoadingOverlay = _x[0],
|
|
14545
|
+
setShowLoadingOverlay = _x[1];
|
|
14444
14546
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
14445
14547
|
setShowLoadingOverlay(false);
|
|
14446
14548
|
setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
|
|
14447
14549
|
useVideoSignatureStore.getState().clearRecordedData();
|
|
14448
14550
|
}, [skipLivenessValidation]);
|
|
14449
|
-
var
|
|
14450
|
-
attempt =
|
|
14451
|
-
setAttempt =
|
|
14551
|
+
var _y = React.useState(0),
|
|
14552
|
+
attempt = _y[0],
|
|
14553
|
+
setAttempt = _y[1];
|
|
14452
14554
|
var onRetry = React.useCallback(function () {
|
|
14453
14555
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
14454
14556
|
setAttempt(function (n) {
|
|
@@ -14508,6 +14610,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14508
14610
|
onLoadingStarted: onLoadingStarted,
|
|
14509
14611
|
onLoadingProgress: onLoadingProgress,
|
|
14510
14612
|
onLoadingCompleted: onLoadingCompleted,
|
|
14613
|
+
onLoadingFailed: onLoadingFailed,
|
|
14511
14614
|
onSuccess: onFaceCaptureSuccess,
|
|
14512
14615
|
onExitCapture: onExitCapture,
|
|
14513
14616
|
onUserCancel: onUserCancel,
|
|
@@ -14516,6 +14619,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14516
14619
|
showLoadingOverlay: showLoadingOverlay,
|
|
14517
14620
|
customOverlayContent: customOverlayContent,
|
|
14518
14621
|
loadingOverlayMode: loadingOverlayMode,
|
|
14622
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
14519
14623
|
guidesComponent: resolvedGuidesComponent,
|
|
14520
14624
|
assets: assets.faceLiveness,
|
|
14521
14625
|
classNames: classNames.faceLiveness,
|
|
@@ -14531,6 +14635,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14531
14635
|
onLoadingStarted: onLoadingStarted,
|
|
14532
14636
|
onLoadingProgress: onLoadingProgress,
|
|
14533
14637
|
onLoadingCompleted: onLoadingCompleted,
|
|
14638
|
+
onLoadingFailed: onLoadingFailed,
|
|
14534
14639
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
14535
14640
|
onCapture: onSelfieCapture,
|
|
14536
14641
|
onUserCancel: onUserCancel,
|
|
@@ -14538,6 +14643,7 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14538
14643
|
showLoadingOverlay: showLoadingOverlay,
|
|
14539
14644
|
customOverlayContent: customOverlayContent,
|
|
14540
14645
|
loadingOverlayMode: loadingOverlayMode,
|
|
14646
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
14541
14647
|
guidesComponent: resolvedGuidesComponent,
|
|
14542
14648
|
assets: assets.faceLiveness,
|
|
14543
14649
|
classNames: classNames.faceLiveness,
|
|
@@ -15506,6 +15612,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15506
15612
|
onLoadingStarted = _a.onLoadingStarted,
|
|
15507
15613
|
onLoadingProgress = _a.onLoadingProgress,
|
|
15508
15614
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
15615
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
15509
15616
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
15510
15617
|
_t = _a.idDocumentType,
|
|
15511
15618
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -15667,6 +15774,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15667
15774
|
onLoadingStarted: onLoadingStarted,
|
|
15668
15775
|
onLoadingProgress: onLoadingProgress,
|
|
15669
15776
|
onLoadingCompleted: onLoadingCompleted,
|
|
15777
|
+
onLoadingFailed: onLoadingFailed,
|
|
15670
15778
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15671
15779
|
silentFallback: silentFallback,
|
|
15672
15780
|
guideImages: idCaptureGuideImages
|
|
@@ -15694,6 +15802,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15694
15802
|
onLoadingStarted: onLoadingStarted,
|
|
15695
15803
|
onLoadingProgress: onLoadingProgress,
|
|
15696
15804
|
onLoadingCompleted: onLoadingCompleted,
|
|
15805
|
+
onLoadingFailed: onLoadingFailed,
|
|
15697
15806
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15698
15807
|
silentFallback: silentFallback
|
|
15699
15808
|
}, faceLivenessProps, {
|
|
@@ -16044,7 +16153,7 @@ var defaultTheme = {
|
|
|
16044
16153
|
},
|
|
16045
16154
|
guidanceMessages: {
|
|
16046
16155
|
"default": {
|
|
16047
|
-
backgroundColor: '
|
|
16156
|
+
backgroundColor: 'white',
|
|
16048
16157
|
textColor: 'black'
|
|
16049
16158
|
},
|
|
16050
16159
|
positive: {
|
|
@@ -16278,6 +16387,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
16278
16387
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16279
16388
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16280
16389
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16390
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16281
16391
|
onAuthError = _a.onAuthError,
|
|
16282
16392
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
16283
16393
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
@@ -16324,6 +16434,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
16324
16434
|
onLoadingStarted: onLoadingStarted,
|
|
16325
16435
|
onLoadingProgress: onLoadingProgress,
|
|
16326
16436
|
onLoadingCompleted: onLoadingCompleted,
|
|
16437
|
+
onLoadingFailed: onLoadingFailed,
|
|
16327
16438
|
onExitCapture: onExitCapture,
|
|
16328
16439
|
onUserCancel: onUserCancel,
|
|
16329
16440
|
onModelError: onModelError,
|
|
@@ -16355,7 +16466,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
16355
16466
|
verbiage: verbiage,
|
|
16356
16467
|
debugMode: debugMode
|
|
16357
16468
|
};
|
|
16358
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onExitCapture, onUserCancel, onModelError, onDocumentCaptured, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, silentFallback, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
16469
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onExitCapture, onUserCancel, onModelError, onDocumentCaptured, precapturedDocuments, idCaptureRequirement, allowSinglePageIdCapture, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, forceFallbackMode, silentFallback, allowIdCardBackToFrontCapture, allowUploadingDocumentsFromStorage, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
16359
16470
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
16360
16471
|
return {
|
|
16361
16472
|
documents: captureAdditionalDocuments,
|
|
@@ -16488,6 +16599,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16488
16599
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16489
16600
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16490
16601
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16602
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16491
16603
|
onAuthError = _a.onAuthError,
|
|
16492
16604
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16493
16605
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -16528,6 +16640,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16528
16640
|
onLoadingStarted: onLoadingStarted,
|
|
16529
16641
|
onLoadingProgress: onLoadingProgress,
|
|
16530
16642
|
onLoadingCompleted: onLoadingCompleted,
|
|
16643
|
+
onLoadingFailed: onLoadingFailed,
|
|
16531
16644
|
onComplete: onComplete,
|
|
16532
16645
|
onSuccess: onApproved,
|
|
16533
16646
|
onDenied: onDenied,
|
|
@@ -16541,7 +16654,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
16541
16654
|
verbiage: verbiage,
|
|
16542
16655
|
debugMode: debugMode
|
|
16543
16656
|
};
|
|
16544
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16657
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
16545
16658
|
return /*#__PURE__*/React__namespace.default.createElement(AuthProvider, {
|
|
16546
16659
|
sessionId: sessionId,
|
|
16547
16660
|
authUrl: authUrl,
|
|
@@ -16668,6 +16781,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16668
16781
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16669
16782
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16670
16783
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16784
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16671
16785
|
onAuthError = _a.onAuthError,
|
|
16672
16786
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16673
16787
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -16716,6 +16830,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16716
16830
|
onLoadingStarted: onLoadingStarted,
|
|
16717
16831
|
onLoadingProgress: onLoadingProgress,
|
|
16718
16832
|
onLoadingCompleted: onLoadingCompleted,
|
|
16833
|
+
onLoadingFailed: onLoadingFailed,
|
|
16719
16834
|
onExitCapture: onExitCapture,
|
|
16720
16835
|
onUserCancel: onUserCancel,
|
|
16721
16836
|
onModelError: onIdCaptureModelError,
|
|
@@ -16743,12 +16858,13 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16743
16858
|
skipSuccessScreen: skipSuccessScreen,
|
|
16744
16859
|
debugMode: debugMode
|
|
16745
16860
|
};
|
|
16746
|
-
}, [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]);
|
|
16861
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, 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]);
|
|
16747
16862
|
var faceLivenessProps = React.useMemo(function () {
|
|
16748
16863
|
return {
|
|
16749
16864
|
onLoadingStarted: onLoadingStarted,
|
|
16750
16865
|
onLoadingProgress: onLoadingProgress,
|
|
16751
16866
|
onLoadingCompleted: onLoadingCompleted,
|
|
16867
|
+
onLoadingFailed: onLoadingFailed,
|
|
16752
16868
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
16753
16869
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
16754
16870
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -16766,7 +16882,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
16766
16882
|
verbiage: verbiage.faceLiveness,
|
|
16767
16883
|
debugMode: debugMode
|
|
16768
16884
|
};
|
|
16769
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16885
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
16770
16886
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
16771
16887
|
return {
|
|
16772
16888
|
documents: captureAdditionalDocuments,
|
|
@@ -16946,6 +17062,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16946
17062
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16947
17063
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16948
17064
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17065
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16949
17066
|
onAuthError = _a.onAuthError,
|
|
16950
17067
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
16951
17068
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -16996,6 +17113,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
16996
17113
|
onLoadingStarted: onLoadingStarted,
|
|
16997
17114
|
onLoadingProgress: onLoadingProgress,
|
|
16998
17115
|
onLoadingCompleted: onLoadingCompleted,
|
|
17116
|
+
onLoadingFailed: onLoadingFailed,
|
|
16999
17117
|
assets: assets.idCapture,
|
|
17000
17118
|
classNames: classNames.idCapture,
|
|
17001
17119
|
colors: colors.idCapture,
|
|
@@ -17023,12 +17141,13 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
17023
17141
|
skipSuccessScreen: skipSuccessScreen,
|
|
17024
17142
|
debugMode: debugMode
|
|
17025
17143
|
};
|
|
17026
|
-
}, [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]);
|
|
17144
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, 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]);
|
|
17027
17145
|
var faceLivenessProps = React.useMemo(function () {
|
|
17028
17146
|
return {
|
|
17029
17147
|
onLoadingStarted: onLoadingStarted,
|
|
17030
17148
|
onLoadingProgress: onLoadingProgress,
|
|
17031
17149
|
onLoadingCompleted: onLoadingCompleted,
|
|
17150
|
+
onLoadingFailed: onLoadingFailed,
|
|
17032
17151
|
onExitCapture: onExitCapture,
|
|
17033
17152
|
onExitAfterFailure: onExitAfterFailure,
|
|
17034
17153
|
onUserCancel: onUserCancel,
|
|
@@ -17045,7 +17164,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
17045
17164
|
verbiage: verbiage.faceLiveness,
|
|
17046
17165
|
debugMode: debugMode
|
|
17047
17166
|
};
|
|
17048
|
-
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
17167
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
17049
17168
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
17050
17169
|
return _assign({
|
|
17051
17170
|
onExitCapture: onExitCapture,
|
|
@@ -17165,11 +17284,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
17165
17284
|
|
|
17166
17285
|
var ALLOWED_RETRIES$3 = 0;
|
|
17167
17286
|
var initialState$1 = {
|
|
17168
|
-
frame: null,
|
|
17169
|
-
face: null,
|
|
17170
|
-
imageUrl: null,
|
|
17171
17287
|
requestState: 'CAPTURING',
|
|
17172
|
-
requestError: null,
|
|
17173
17288
|
unverifiedTimes: 0
|
|
17174
17289
|
};
|
|
17175
17290
|
var reducer$1 = function reducer(state, action) {
|
|
@@ -17260,7 +17375,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
|
|
|
17260
17375
|
submissionError = _j.submissionError,
|
|
17261
17376
|
selfieImage = _j.selfieImage,
|
|
17262
17377
|
setSelfieImage = _j.setSelfieImage;
|
|
17263
|
-
var _k = React.useState(
|
|
17378
|
+
var _k = React.useState(),
|
|
17264
17379
|
imageUrl = _k[0],
|
|
17265
17380
|
setImageUrl = _k[1];
|
|
17266
17381
|
var rawCanvas = React.useRef(null);
|
|
@@ -17280,9 +17395,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
|
|
|
17280
17395
|
if (!frame || !face || submissionError) return;
|
|
17281
17396
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
17282
17397
|
setImageUrl(imageUrl);
|
|
17283
|
-
dataUrlToBase64(imageUrl).then(
|
|
17284
|
-
setSelfieImage(img);
|
|
17285
|
-
});
|
|
17398
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
17286
17399
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
17287
17400
|
React.useEffect(function () {
|
|
17288
17401
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -17464,6 +17577,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17464
17577
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
17465
17578
|
onLoadingProgress = _a.onLoadingProgress,
|
|
17466
17579
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17580
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
17467
17581
|
onComplete = _a.onComplete,
|
|
17468
17582
|
onCustomerMatched = _a.onCustomerMatched,
|
|
17469
17583
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -17612,6 +17726,7 @@ var CustomerVerificationWizard = function CustomerVerificationWizard(_a) {
|
|
|
17612
17726
|
onLoadingStarted: onLoadingStarted,
|
|
17613
17727
|
onLoadingProgress: onLoadingProgress,
|
|
17614
17728
|
onLoadingCompleted: onLoadingCompleted,
|
|
17729
|
+
onLoadingFailed: onLoadingFailed,
|
|
17615
17730
|
onUserCancel: onUserCancel,
|
|
17616
17731
|
onDismissed: function onDismissed() {
|
|
17617
17732
|
return setCaptureState('CAPTURING');
|
|
@@ -17659,6 +17774,7 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17659
17774
|
onLoadingStarted = _a.onLoadingStarted,
|
|
17660
17775
|
onLoadingProgress = _a.onLoadingProgress,
|
|
17661
17776
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
17777
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
17662
17778
|
onAuthError = _a.onAuthError,
|
|
17663
17779
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
17664
17780
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -17732,6 +17848,7 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17732
17848
|
onLoadingStarted: onLoadingStarted,
|
|
17733
17849
|
onLoadingProgress: onLoadingProgress,
|
|
17734
17850
|
onLoadingCompleted: onLoadingCompleted,
|
|
17851
|
+
onLoadingFailed: onLoadingFailed,
|
|
17735
17852
|
onComplete: onComplete,
|
|
17736
17853
|
onCustomerMatched: onCustomerMatched,
|
|
17737
17854
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -17751,11 +17868,7 @@ var CustomerVerification = function CustomerVerification(_a) {
|
|
|
17751
17868
|
|
|
17752
17869
|
var ALLOWED_RETRIES$1 = 0;
|
|
17753
17870
|
var initialState = {
|
|
17754
|
-
frame: null,
|
|
17755
|
-
face: null,
|
|
17756
|
-
imageUrl: null,
|
|
17757
17871
|
requestState: 'CAPTURING',
|
|
17758
|
-
requestError: null,
|
|
17759
17872
|
notFoundTimes: 0
|
|
17760
17873
|
};
|
|
17761
17874
|
var reducer = function reducer(state, action) {
|
|
@@ -17842,7 +17955,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
|
|
|
17842
17955
|
submissionError = _j.submissionError,
|
|
17843
17956
|
selfieImage = _j.selfieImage,
|
|
17844
17957
|
setSelfieImage = _j.setSelfieImage;
|
|
17845
|
-
var _k = React.useState(
|
|
17958
|
+
var _k = React.useState(),
|
|
17846
17959
|
imageUrl = _k[0],
|
|
17847
17960
|
setImageUrl = _k[1];
|
|
17848
17961
|
var rawCanvas = React.useRef(null);
|
|
@@ -17864,9 +17977,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
|
|
|
17864
17977
|
if (!frame || !face || submissionError) return;
|
|
17865
17978
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
17866
17979
|
setImageUrl(imageUrl);
|
|
17867
|
-
dataUrlToBase64(imageUrl).then(
|
|
17868
|
-
setSelfieImage(img);
|
|
17869
|
-
});
|
|
17980
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
17870
17981
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
17871
17982
|
React.useEffect(function () {
|
|
17872
17983
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -18048,6 +18159,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
18048
18159
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
18049
18160
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18050
18161
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18162
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18051
18163
|
onComplete = _a.onComplete,
|
|
18052
18164
|
onCustomerMatched = _a.onCustomerMatched,
|
|
18053
18165
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -18196,6 +18308,7 @@ var CustomerIdentificationWizard = function CustomerIdentificationWizard(_a) {
|
|
|
18196
18308
|
onLoadingStarted: onLoadingStarted,
|
|
18197
18309
|
onLoadingProgress: onLoadingProgress,
|
|
18198
18310
|
onLoadingCompleted: onLoadingCompleted,
|
|
18311
|
+
onLoadingFailed: onLoadingFailed,
|
|
18199
18312
|
onUserCancel: onUserCancel,
|
|
18200
18313
|
onDismissed: function onDismissed() {
|
|
18201
18314
|
setCaptureState('CAPTURING');
|
|
@@ -18236,6 +18349,7 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
18236
18349
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18237
18350
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18238
18351
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18352
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18239
18353
|
onAuthError = _a.onAuthError,
|
|
18240
18354
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18241
18355
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18314,6 +18428,7 @@ var CustomerIdentification = function CustomerIdentification(_a) {
|
|
|
18314
18428
|
onLoadingStarted: onLoadingStarted,
|
|
18315
18429
|
onLoadingProgress: onLoadingProgress,
|
|
18316
18430
|
onLoadingCompleted: onLoadingCompleted,
|
|
18431
|
+
onLoadingFailed: onLoadingFailed,
|
|
18317
18432
|
onComplete: onComplete,
|
|
18318
18433
|
onCustomerMatched: onCustomerMatched,
|
|
18319
18434
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -18348,6 +18463,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18348
18463
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18349
18464
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18350
18465
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18466
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18351
18467
|
onAuthError = _a.onAuthError,
|
|
18352
18468
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18353
18469
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18388,16 +18504,18 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18388
18504
|
faceLivenessProps = _a.faceLivenessProps,
|
|
18389
18505
|
_o = _a.skipLivenessValidation,
|
|
18390
18506
|
skipLivenessValidation = _o === void 0 ? false : _o,
|
|
18507
|
+
_p = _a.allowManualSelfieCaptureOnLoadingError,
|
|
18508
|
+
allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
|
|
18391
18509
|
guidesComponent = _a.guidesComponent,
|
|
18392
|
-
|
|
18393
|
-
theme =
|
|
18510
|
+
_q = _a.theme,
|
|
18511
|
+
theme = _q === void 0 ? 'default' : _q,
|
|
18394
18512
|
classNames = _a.classNames,
|
|
18395
18513
|
colors = _a.colors,
|
|
18396
18514
|
verbiage = _a.verbiage,
|
|
18397
18515
|
geolocationEnabled = _a.geolocationEnabled,
|
|
18398
18516
|
geolocationRequired = _a.geolocationRequired,
|
|
18399
|
-
|
|
18400
|
-
debugMode =
|
|
18517
|
+
_r = _a.debugMode,
|
|
18518
|
+
debugMode = _r === void 0 ? false : _r;
|
|
18401
18519
|
useLanguage(lang);
|
|
18402
18520
|
useDebugLogging(debugMode);
|
|
18403
18521
|
return /*#__PURE__*/React__namespace.default.createElement(AuthProvider, {
|
|
@@ -18440,6 +18558,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18440
18558
|
onLoadingStarted: onLoadingStarted,
|
|
18441
18559
|
onLoadingProgress: onLoadingProgress,
|
|
18442
18560
|
onLoadingCompleted: onLoadingCompleted,
|
|
18561
|
+
onLoadingFailed: onLoadingFailed,
|
|
18443
18562
|
onSelfieCaptured: onSelfieCaptured,
|
|
18444
18563
|
customOverlayContent: customOverlayContent,
|
|
18445
18564
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
@@ -18455,6 +18574,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18455
18574
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
18456
18575
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
18457
18576
|
skipLivenessValidation: skipLivenessValidation,
|
|
18577
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
18458
18578
|
guidesComponent: guidesComponent,
|
|
18459
18579
|
classNames: classNames,
|
|
18460
18580
|
colors: colors,
|
|
@@ -18463,7 +18583,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
18463
18583
|
onModelError: onModelError,
|
|
18464
18584
|
onUserCancel: onUserCancel
|
|
18465
18585
|
};
|
|
18466
|
-
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
18586
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
18467
18587
|
})))));
|
|
18468
18588
|
};
|
|
18469
18589
|
|
|
@@ -18504,6 +18624,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18504
18624
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18505
18625
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18506
18626
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18627
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18507
18628
|
onAuthError = _a.onAuthError,
|
|
18508
18629
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18509
18630
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18592,6 +18713,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18592
18713
|
onLoadingStarted: onLoadingStarted,
|
|
18593
18714
|
onLoadingProgress: onLoadingProgress,
|
|
18594
18715
|
onLoadingCompleted: onLoadingCompleted,
|
|
18716
|
+
onLoadingFailed: onLoadingFailed,
|
|
18595
18717
|
idCaptureProps: idCaptureProps,
|
|
18596
18718
|
faceLivenessProps: faceLivenessProps,
|
|
18597
18719
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -18624,7 +18746,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
18624
18746
|
verbiage: verbiage,
|
|
18625
18747
|
debugMode: debugMode
|
|
18626
18748
|
};
|
|
18627
|
-
}, [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]);
|
|
18749
|
+
}, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, 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]);
|
|
18628
18750
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
18629
18751
|
return {
|
|
18630
18752
|
documents: captureAdditionalDocuments,
|
|
@@ -18751,6 +18873,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18751
18873
|
onLoadingStarted = _a.onLoadingStarted,
|
|
18752
18874
|
onLoadingProgress = _a.onLoadingProgress,
|
|
18753
18875
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
18876
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
18754
18877
|
onAuthError = _a.onAuthError,
|
|
18755
18878
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
18756
18879
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -18797,6 +18920,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18797
18920
|
onLoadingStarted: onLoadingStarted,
|
|
18798
18921
|
onLoadingProgress: onLoadingProgress,
|
|
18799
18922
|
onLoadingCompleted: onLoadingCompleted,
|
|
18923
|
+
onLoadingFailed: onLoadingFailed,
|
|
18800
18924
|
onExitCapture: onExitCapture,
|
|
18801
18925
|
onUserCancel: onUserCancel,
|
|
18802
18926
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -18812,7 +18936,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
18812
18936
|
verbiage: verbiage.faceLiveness,
|
|
18813
18937
|
debugMode: debugMode
|
|
18814
18938
|
};
|
|
18815
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18939
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
18816
18940
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
18817
18941
|
return {
|
|
18818
18942
|
documents: captureAdditionalDocuments,
|