idmission-web-sdk 2.3.59 → 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/submission/SubmissionProvider.d.ts.map +1 -1
- package/dist/components/submission/types.d.ts +2 -0
- package/dist/components/submission/types.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 +448 -318
- 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 +448 -318
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +448 -318
- 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
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.3.
|
|
214
|
+
var webSdkVersion = '2.3.61';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
var ButtonsRow$2 = styled.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"])));
|
|
460
460
|
var templateObject_1$R;
|
|
461
461
|
|
|
462
|
-
var GuidanceMessageContainerDiv = styled.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) {
|
|
462
|
+
var GuidanceMessageContainerDiv = styled.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) {
|
|
463
463
|
var $top = _a.$top;
|
|
464
464
|
return $top !== null && $top !== void 0 ? $top : '10%';
|
|
465
465
|
}, function (_a) {
|
|
@@ -472,33 +472,33 @@
|
|
|
472
472
|
if (!portalLocation) return element;
|
|
473
473
|
return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
|
|
474
474
|
};
|
|
475
|
-
var GuidanceMessage = styled.div(templateObject_2$
|
|
475
|
+
var GuidanceMessage = styled.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) {
|
|
476
476
|
var _a, _b, _c, _d, _e, _f;
|
|
477
|
-
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 : '
|
|
477
|
+
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';
|
|
478
478
|
}, function (props) {
|
|
479
479
|
var _a, _b, _c, _d, _e, _f;
|
|
480
480
|
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';
|
|
481
481
|
});
|
|
482
|
-
var templateObject_1$Q, templateObject_2$
|
|
482
|
+
var templateObject_1$Q, templateObject_2$I;
|
|
483
483
|
|
|
484
484
|
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"])));
|
|
485
|
-
var progressBarAnimation = styled.keyframes(templateObject_2$
|
|
486
|
-
var dualRingSpinnerAnimation = styled.keyframes(templateObject_3$
|
|
485
|
+
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"])));
|
|
486
|
+
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"])));
|
|
487
487
|
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"])));
|
|
488
|
-
var templateObject_1$P, templateObject_2$
|
|
488
|
+
var templateObject_1$P, templateObject_2$H, templateObject_3$u, templateObject_4$n;
|
|
489
489
|
|
|
490
490
|
var OverlayContainer = styled.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) {
|
|
491
491
|
return props.theme.background ? "".concat(props.theme.background) : "white";
|
|
492
492
|
}, function (props) {
|
|
493
493
|
return props.theme.textColor ? "color: ".concat(props.theme.textColor, ";") : "";
|
|
494
494
|
});
|
|
495
|
-
var OverlayInner$2 = styled.div(templateObject_2$
|
|
495
|
+
var OverlayInner$2 = styled.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) {
|
|
496
496
|
var _a;
|
|
497
497
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
498
498
|
}, function (props) {
|
|
499
499
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
500
500
|
});
|
|
501
|
-
var OverlayImageContainer = styled.div(templateObject_3$
|
|
501
|
+
var OverlayImageContainer = styled.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"])));
|
|
502
502
|
var OverlayImageRow = styled.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"])));
|
|
503
503
|
var GrayOverlayContainer = styled(OverlayContainer)(templateObject_5$e || (templateObject_5$e = __makeTemplateObject(["\n background: #f7f6fb;\n"], ["\n background: #f7f6fb;\n"])));
|
|
504
504
|
var ButtonsColumn = styled.div(templateObject_6$9 || (templateObject_6$9 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 15px 0;\n justify-content: center;\n margin-top: 24px;\n"])));
|
|
@@ -520,7 +520,7 @@
|
|
|
520
520
|
}, function (props) {
|
|
521
521
|
return props.theme.padding ? "box-sizing: border-box; padding: ".concat(props.theme.padding, ";") : "";
|
|
522
522
|
});
|
|
523
|
-
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n
|
|
523
|
+
var LoadingOverlayGuidanceMessage = styled(GuidanceMessage)(templateObject_11$1 || (templateObject_11$1 = __makeTemplateObject(["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"], ["\n padding: 16px 24px;\n margin-top: 16px;\n font-size: 18px;\n font-weight: bold;\n"])));
|
|
524
524
|
var LoadingOverlayImageContainer = styled(OverlayImageContainer)(templateObject_12$1 || (templateObject_12$1 = __makeTemplateObject(["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"], ["\n padding: 0;\n max-height: 100%;\n pointer-events: none;\n"])));
|
|
525
525
|
var LoadingOverlayProgressBarBackground = styled.div.attrs({
|
|
526
526
|
className: 'loading-overlay-progress-bar-background'
|
|
@@ -540,7 +540,7 @@
|
|
|
540
540
|
var LoadingOverlayProgressContainer = styled.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
541
541
|
var LoadingOverlayCustomLoadingGraphic = styled.img(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
542
542
|
var LoadingOverlayContinueButtonContainer = styled.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
543
|
-
var templateObject_1$O, templateObject_2$
|
|
543
|
+
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;
|
|
544
544
|
|
|
545
545
|
function _extends() {
|
|
546
546
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -2545,6 +2545,9 @@
|
|
|
2545
2545
|
if (clientRequestID) {
|
|
2546
2546
|
submissionRequest.additionalData.clientRequestID = clientRequestID;
|
|
2547
2547
|
}
|
|
2548
|
+
if (jobId) {
|
|
2549
|
+
submissionRequest.additionalData.jobID = jobId;
|
|
2550
|
+
}
|
|
2548
2551
|
if (documents.idFrontImage) {
|
|
2549
2552
|
submissionRequest.customerData.idData.idImageFront = documents.idFrontImage;
|
|
2550
2553
|
}
|
|
@@ -2642,7 +2645,7 @@
|
|
|
2642
2645
|
}
|
|
2643
2646
|
});
|
|
2644
2647
|
});
|
|
2645
|
-
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idBackIrImage, idBackUvImage, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idFrontIrImage, idFrontUvImage, idImageResolutionCheck, manualReviewRequired, needImmediateResponse, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
|
|
2648
|
+
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idBackIrImage, idBackUvImage, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idCardForFaceMatch, idData, idFrontCaptureAttempts, idFrontImage, idFrontIrImage, idFrontUvImage, idImageResolutionCheck, jobId, manualReviewRequired, needImmediateResponse, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksFireOnReviewURL, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters, webhooksURL]);
|
|
2646
2649
|
var defaultOnSubmit = React.useCallback(function () {
|
|
2647
2650
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
2648
2651
|
var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
|
|
@@ -2786,6 +2789,9 @@
|
|
|
2786
2789
|
if (clientRequestID) {
|
|
2787
2790
|
request.additionalData.clientRequestID = clientRequestID;
|
|
2788
2791
|
}
|
|
2792
|
+
if (jobId) {
|
|
2793
|
+
request.additionalData.jobID = jobId;
|
|
2794
|
+
}
|
|
2789
2795
|
if (idCardForFaceMatch) {
|
|
2790
2796
|
request.customerData.idData = {
|
|
2791
2797
|
idImageFront: idCardForFaceMatch
|
|
@@ -2813,7 +2819,7 @@
|
|
|
2813
2819
|
}
|
|
2814
2820
|
});
|
|
2815
2821
|
});
|
|
2816
|
-
}, [clientRequestID, documentServiceUrl, estimateAge, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, predictGender, selfieCaptureAttempts, uploadDocument, useDocumentServiceForLivenessChecks, webhooksStripSpecialCharacters]);
|
|
2822
|
+
}, [clientRequestID, documentServiceUrl, estimateAge, geolocationResult, idBackCaptureAttempts, idCardForFaceMatch, idFrontCaptureAttempts, jobId, predictGender, selfieCaptureAttempts, uploadDocument, useDocumentServiceForLivenessChecks, webhooksStripSpecialCharacters]);
|
|
2817
2823
|
var checkLiveness = React.useCallback(function (imageDataUrl) {
|
|
2818
2824
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
2819
2825
|
var request, host, endpoint, response, statusMessage, submissionResponse_3, e_2, err;
|
|
@@ -8106,6 +8112,7 @@
|
|
|
8106
8112
|
var templateObject_1$N;
|
|
8107
8113
|
|
|
8108
8114
|
function cropToShoulders(rawCanvas, cropCanvas, resizeCanvas, frame, face, quality, maxHeight) {
|
|
8115
|
+
var _a;
|
|
8109
8116
|
if (quality === void 0) {
|
|
8110
8117
|
quality = 0.92;
|
|
8111
8118
|
}
|
|
@@ -8122,10 +8129,14 @@
|
|
|
8122
8129
|
cropCanvas.height = frame.height;
|
|
8123
8130
|
cropCtx.drawImage(rawCanvas, 0, 0, cropCanvas.width, cropCanvas.height);
|
|
8124
8131
|
} else {
|
|
8125
|
-
var _a = face.box
|
|
8126
|
-
|
|
8127
|
-
|
|
8132
|
+
var _b = (_a = face === null || face === void 0 ? void 0 : face.box) !== null && _a !== void 0 ? _a : {
|
|
8133
|
+
xMin: 0,
|
|
8134
|
+
width: frame.width
|
|
8135
|
+
},
|
|
8136
|
+
xMin = _b.xMin,
|
|
8137
|
+
width = _b.width;
|
|
8128
8138
|
var desiredWidth = frame.height * 0.6;
|
|
8139
|
+
alert("this side! ".concat(desiredWidth, "x").concat(frame.height));
|
|
8129
8140
|
var faceCenterX = xMin + width / 2;
|
|
8130
8141
|
var xPos = Math.max(0, faceCenterX - desiredWidth / 2);
|
|
8131
8142
|
cropCanvas.width = desiredWidth;
|
|
@@ -8624,6 +8635,9 @@
|
|
|
8624
8635
|
clearTimeout(modelLoadTimeout);
|
|
8625
8636
|
setModelLoadState('warming');
|
|
8626
8637
|
setModelWarmingStartedAt(new Date().getTime());
|
|
8638
|
+
return [4 /*yield*/, testFaceDetectionAgainstKnownImage(model)];
|
|
8639
|
+
case 1:
|
|
8640
|
+
_b.sent();
|
|
8627
8641
|
_a = waitForVideoReady(videoRef), videoReady = _a[0], cancel = _a[1];
|
|
8628
8642
|
cancelled = false;
|
|
8629
8643
|
cancelVideoReady = function cancelVideoReady() {
|
|
@@ -8631,7 +8645,7 @@
|
|
|
8631
8645
|
cancel();
|
|
8632
8646
|
};
|
|
8633
8647
|
return [4 /*yield*/, videoReady];
|
|
8634
|
-
case
|
|
8648
|
+
case 2:
|
|
8635
8649
|
_b.sent();
|
|
8636
8650
|
if (cancelled) return [2 /*return*/];
|
|
8637
8651
|
model.detectForVideo(videoRef.current, performance.now());
|
|
@@ -8783,6 +8797,26 @@
|
|
|
8783
8797
|
faceIsStable: faceIsStable
|
|
8784
8798
|
};
|
|
8785
8799
|
}
|
|
8800
|
+
function testFaceDetectionAgainstKnownImage(detector) {
|
|
8801
|
+
return new Promise(function (resolve, reject) {
|
|
8802
|
+
var img = new Image();
|
|
8803
|
+
img.crossOrigin = 'anonymous';
|
|
8804
|
+
img.onload = function () {
|
|
8805
|
+
var prediction = detector.detectForVideo(img, performance.now());
|
|
8806
|
+
if (prediction.detections.length > 0) {
|
|
8807
|
+
debug('face detection test result', prediction.detections);
|
|
8808
|
+
resolve(void 0);
|
|
8809
|
+
} else {
|
|
8810
|
+
warn('face detection test failed');
|
|
8811
|
+
reject(new Error('testFaceDetectionAgainstKnownImage failed to predict'));
|
|
8812
|
+
}
|
|
8813
|
+
};
|
|
8814
|
+
img.onerror = function () {
|
|
8815
|
+
return reject(new Error('testFaceDetectionAgainstKnownImage failed to load image'));
|
|
8816
|
+
};
|
|
8817
|
+
img.src = "".concat(DEFAULT_CDN_URL, "/head-test.jpg");
|
|
8818
|
+
});
|
|
8819
|
+
}
|
|
8786
8820
|
|
|
8787
8821
|
var preloadModels = function preloadModels(_a) {
|
|
8788
8822
|
return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
@@ -14008,13 +14042,13 @@
|
|
|
14008
14042
|
}, messageText)));
|
|
14009
14043
|
}
|
|
14010
14044
|
var StyledOverlayInner$4 = styled(OverlayInner$2)(templateObject_1$M || (templateObject_1$M = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
14011
|
-
var StyledOverlayHeading = styled.h3(templateObject_2$
|
|
14045
|
+
var StyledOverlayHeading = styled.h3(templateObject_2$F || (templateObject_2$F = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
14012
14046
|
function useCameraStore(selector) {
|
|
14013
14047
|
var store = React.useContext(CameraStoreContext);
|
|
14014
14048
|
if (!store) throw new Error('useCameraStore cannot be used without Provider');
|
|
14015
14049
|
return useStore(store, selector);
|
|
14016
14050
|
}
|
|
14017
|
-
var templateObject_1$M, templateObject_2$
|
|
14051
|
+
var templateObject_1$M, templateObject_2$F;
|
|
14018
14052
|
|
|
14019
14053
|
var DocumentDetectionModelContext = /*#__PURE__*/React.createContext({
|
|
14020
14054
|
startDocumentDetection: function startDocumentDetection() {
|
|
@@ -15362,11 +15396,11 @@
|
|
|
15362
15396
|
return /*#__PURE__*/reactDom.createPortal(element, portalLocation);
|
|
15363
15397
|
}
|
|
15364
15398
|
var DebugStatsPaneDiv = styled.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"])));
|
|
15365
|
-
var ObjectDetectionDebugOverlayDiv = styled.div(templateObject_2$
|
|
15399
|
+
var ObjectDetectionDebugOverlayDiv = styled.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) {
|
|
15366
15400
|
var $flipX = _a.$flipX;
|
|
15367
15401
|
return $flipX ? 'transform: scaleX(-1);' : '';
|
|
15368
15402
|
});
|
|
15369
|
-
var ObjectDetectionDebugBox = styled.div(templateObject_3$
|
|
15403
|
+
var ObjectDetectionDebugBox = styled.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) {
|
|
15370
15404
|
var $color = _a.$color;
|
|
15371
15405
|
return $color !== null && $color !== void 0 ? $color : 'green';
|
|
15372
15406
|
}, function (_a) {
|
|
@@ -15573,7 +15607,7 @@
|
|
|
15573
15607
|
}
|
|
15574
15608
|
});
|
|
15575
15609
|
}
|
|
15576
|
-
var templateObject_1$L, templateObject_2$
|
|
15610
|
+
var templateObject_1$L, templateObject_2$E, templateObject_3$s, templateObject_4$l;
|
|
15577
15611
|
|
|
15578
15612
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
15579
15613
|
var _b = _a.classNames,
|
|
@@ -15613,11 +15647,11 @@
|
|
|
15613
15647
|
var _a, _b, _c;
|
|
15614
15648
|
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';
|
|
15615
15649
|
});
|
|
15616
|
-
var InnerContainer = styled.div(templateObject_2$
|
|
15617
|
-
var Message = styled.span(templateObject_3$
|
|
15650
|
+
var InnerContainer = styled.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"])));
|
|
15651
|
+
var Message = styled.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"])));
|
|
15618
15652
|
var ButtonContainer = styled.div(templateObject_4$k || (templateObject_4$k = __makeTemplateObject(["\n display: flex;\n margin-left: auto;\n"], ["\n display: flex;\n margin-left: auto;\n"])));
|
|
15619
15653
|
var Button$1 = styled(LoaderButton)(templateObject_5$d || (templateObject_5$d = __makeTemplateObject(["\n white-space: nowrap;\n margin: auto;\n"], ["\n white-space: nowrap;\n margin: auto;\n"])));
|
|
15620
|
-
var templateObject_1$K, templateObject_2$
|
|
15654
|
+
var templateObject_1$K, templateObject_2$D, templateObject_3$r, templateObject_4$k, templateObject_5$d;
|
|
15621
15655
|
|
|
15622
15656
|
// This is a simplified version of https://github.com/ZeeCoder/use-resize-observer.
|
|
15623
15657
|
// We have removed all options and made it compliant with React Compiler/React 19.
|
|
@@ -15946,12 +15980,12 @@
|
|
|
15946
15980
|
}, verbiage.retryBtnText)));
|
|
15947
15981
|
};
|
|
15948
15982
|
var StyledOverlayInner$3 = styled(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"])));
|
|
15949
|
-
var StyledOverlayImageContainer$1 = styled(OverlayImageContainer)(templateObject_2$
|
|
15950
|
-
var Description$4 = styled.p(templateObject_3$
|
|
15983
|
+
var StyledOverlayImageContainer$1 = styled(OverlayImageContainer)(templateObject_2$C || (templateObject_2$C = __makeTemplateObject(["\n flex-grow: 0;\n"], ["\n flex-grow: 0;\n"])));
|
|
15984
|
+
var Description$4 = styled.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"])));
|
|
15951
15985
|
var RetryButton$1 = styled(LoaderButton)(templateObject_4$j || (templateObject_4$j = __makeTemplateObject(["\n width: 200px;\n margin: 0 auto;\n"], ["\n width: 200px;\n margin: 0 auto;\n"])));
|
|
15952
|
-
var templateObject_1$J, templateObject_2$
|
|
15986
|
+
var templateObject_1$J, templateObject_2$C, templateObject_3$q, templateObject_4$j;
|
|
15953
15987
|
|
|
15954
|
-
var ExitCaptureStyledButton = styled.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:
|
|
15988
|
+
var ExitCaptureStyledButton = styled.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"])));
|
|
15955
15989
|
var ExitCaptureButton = function ExitCaptureButton(_a) {
|
|
15956
15990
|
var onClick = _a.onClick,
|
|
15957
15991
|
className = _a.className;
|
|
@@ -16471,20 +16505,20 @@
|
|
|
16471
16505
|
}))));
|
|
16472
16506
|
}
|
|
16473
16507
|
var LoadingGraphicWrapper = styled.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"])));
|
|
16474
|
-
var LoadingGraphicSvg = styled.svg(templateObject_2$
|
|
16508
|
+
var LoadingGraphicSvg = styled.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) {
|
|
16475
16509
|
return props.$frame > 1 ? 1 : props.$frame === 1 ? 1.25 : 0.75;
|
|
16476
16510
|
}, function (props) {
|
|
16477
16511
|
return props.$frame >= 5 ? 10 : 0;
|
|
16478
16512
|
}, function (props) {
|
|
16479
16513
|
return props.$borderColor;
|
|
16480
16514
|
});
|
|
16481
|
-
var LoadingGraphicCardGroup = styled.g(templateObject_3$
|
|
16515
|
+
var LoadingGraphicCardGroup = styled.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) {
|
|
16482
16516
|
return props.$offScreen ? '-500px' : '0';
|
|
16483
16517
|
});
|
|
16484
16518
|
var LoadingGraphicPhoneGroup = styled.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) {
|
|
16485
16519
|
return props.$offScreen ? '40px' : '0';
|
|
16486
16520
|
});
|
|
16487
|
-
var templateObject_1$H, templateObject_2$
|
|
16521
|
+
var templateObject_1$H, templateObject_2$B, templateObject_3$p, templateObject_4$i;
|
|
16488
16522
|
|
|
16489
16523
|
function LoadingListItemIndicator(_a) {
|
|
16490
16524
|
var _b = _a.state,
|
|
@@ -16539,9 +16573,11 @@
|
|
|
16539
16573
|
var ready = _a.ready,
|
|
16540
16574
|
modelLoadState = _a.modelLoadState,
|
|
16541
16575
|
modelLoadProgress = _a.modelLoadProgress,
|
|
16576
|
+
modelError = _a.modelError,
|
|
16542
16577
|
onLoadingStarted = _a.onLoadingStarted,
|
|
16543
16578
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16544
|
-
onLoadingCompleted = _a.onLoadingCompleted
|
|
16579
|
+
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16580
|
+
onLoadingFailed = _a.onLoadingFailed;
|
|
16545
16581
|
var onLoadingStartedRef = React.useRef(onLoadingStarted);
|
|
16546
16582
|
React.useEffect(function () {
|
|
16547
16583
|
onLoadingStartedRef.current = onLoadingStarted;
|
|
@@ -16554,6 +16590,10 @@
|
|
|
16554
16590
|
React.useEffect(function () {
|
|
16555
16591
|
onLoadingCompletedRef.current = onLoadingCompleted;
|
|
16556
16592
|
}, [onLoadingCompleted]);
|
|
16593
|
+
var onLoadingFailedRef = React.useRef(onLoadingFailed);
|
|
16594
|
+
React.useEffect(function () {
|
|
16595
|
+
onLoadingFailedRef.current = onLoadingFailed;
|
|
16596
|
+
}, [onLoadingFailed]);
|
|
16557
16597
|
var loadingStarted = modelLoadState !== 'not-started';
|
|
16558
16598
|
React.useEffect(function () {
|
|
16559
16599
|
var _a;
|
|
@@ -16569,6 +16609,12 @@
|
|
|
16569
16609
|
var _a;
|
|
16570
16610
|
if (ready) (_a = onLoadingCompletedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingCompletedRef);
|
|
16571
16611
|
}, [ready]);
|
|
16612
|
+
React.useEffect(function () {
|
|
16613
|
+
var _a;
|
|
16614
|
+
if (modelLoadState === 'error') {
|
|
16615
|
+
(_a = onLoadingFailedRef.current) === null || _a === void 0 ? void 0 : _a.call(onLoadingFailedRef, modelError !== null && modelError !== void 0 ? modelError : undefined);
|
|
16616
|
+
}
|
|
16617
|
+
}, [modelLoadState, modelError]);
|
|
16572
16618
|
}
|
|
16573
16619
|
|
|
16574
16620
|
var legacyInstructionImageUrl$1 = "".concat(DEFAULT_CDN_URL, "/WebSDK-Instruction-DL-Capture-3-Portrait.png");
|
|
@@ -16577,6 +16623,7 @@
|
|
|
16577
16623
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
16578
16624
|
onLoadingProgress = _a.onLoadingProgress,
|
|
16579
16625
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
16626
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
16580
16627
|
onDismissed = _a.onDismissed,
|
|
16581
16628
|
onUserCancel = _a.onUserCancel,
|
|
16582
16629
|
instructions = _a.instructions,
|
|
@@ -16597,7 +16644,8 @@
|
|
|
16597
16644
|
modelsReady = _o.ready,
|
|
16598
16645
|
modelLoadState = _o.modelLoadState,
|
|
16599
16646
|
modelDownloadProgress = _o.modelDownloadProgress,
|
|
16600
|
-
modelWarmingStartedAt = _o.modelWarmingStartedAt
|
|
16647
|
+
modelWarmingStartedAt = _o.modelWarmingStartedAt,
|
|
16648
|
+
modelError = _o.modelError;
|
|
16601
16649
|
var _p = useCameraStore(),
|
|
16602
16650
|
cameraReady = _p.cameraReady,
|
|
16603
16651
|
cameraAccessDenied = _p.cameraAccessDenied,
|
|
@@ -16641,9 +16689,11 @@
|
|
|
16641
16689
|
ready: ready,
|
|
16642
16690
|
modelLoadState: modelLoadState,
|
|
16643
16691
|
modelLoadProgress: modelLoadProgress,
|
|
16692
|
+
modelError: modelError,
|
|
16644
16693
|
onLoadingStarted: onLoadingStarted,
|
|
16645
16694
|
onLoadingProgress: onLoadingProgress,
|
|
16646
|
-
onLoadingCompleted: onLoadingCompleted
|
|
16695
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
16696
|
+
onLoadingFailed: onLoadingFailed
|
|
16647
16697
|
});
|
|
16648
16698
|
if (dismissed) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
16649
16699
|
if (cameraAccessDenied) {
|
|
@@ -16744,8 +16794,8 @@
|
|
|
16744
16794
|
var _a, _b, _c, _d;
|
|
16745
16795
|
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';
|
|
16746
16796
|
});
|
|
16747
|
-
var ContinuityCameraCheckboxContainer$1 = styled.div(templateObject_2$
|
|
16748
|
-
var ContinuityCameraCheckboxInner = styled(GuidanceMessage)(templateObject_3$
|
|
16797
|
+
var ContinuityCameraCheckboxContainer$1 = styled.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"])));
|
|
16798
|
+
var ContinuityCameraCheckboxInner = styled(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"])));
|
|
16749
16799
|
var ContinuityCameraCheckbox$1 = styled.input(templateObject_4$h || (templateObject_4$h = __makeTemplateObject(["\n margin: 0;\n"], ["\n margin: 0;\n"])));
|
|
16750
16800
|
var ButtonsRow$1 = styled(LoadingOverlayButtonsRow)(templateObject_5$c || (templateObject_5$c = __makeTemplateObject(["\n color: ", ";\n ", "\n"], ["\n color: ", ";\n ", "\n"])), function (props) {
|
|
16751
16801
|
var _a, _b, _c, _d;
|
|
@@ -16784,10 +16834,10 @@
|
|
|
16784
16834
|
var _a, _b, _c, _d;
|
|
16785
16835
|
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';
|
|
16786
16836
|
});
|
|
16787
|
-
var templateObject_1$G, templateObject_2$
|
|
16837
|
+
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;
|
|
16788
16838
|
|
|
16789
16839
|
var ContinuityCameraCheckboxContainer = styled.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"])));
|
|
16790
|
-
var ContinuityCameraCheckbox = styled.input(templateObject_2$
|
|
16840
|
+
var ContinuityCameraCheckbox = styled.input(templateObject_2$z || (templateObject_2$z = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
16791
16841
|
var IdCaptureLoadingOverlayLegacy = function IdCaptureLoadingOverlayLegacy(_a) {
|
|
16792
16842
|
var _b, _c, _d, _e;
|
|
16793
16843
|
var onDismissed = _a.onDismissed,
|
|
@@ -16908,7 +16958,7 @@
|
|
|
16908
16958
|
}
|
|
16909
16959
|
}, ready ? verbiage.continueText : modelsReady ? verbiage.cameraInitializingText : modelDownloadProgress >= 100 ? verbiage.modelsWarmingUpText : "".concat(verbiage.downloadingText, " (").concat(modelDownloadProgress, "%)"))));
|
|
16910
16960
|
};
|
|
16911
|
-
var templateObject_1$F, templateObject_2$
|
|
16961
|
+
var templateObject_1$F, templateObject_2$z;
|
|
16912
16962
|
|
|
16913
16963
|
var components$1 = {
|
|
16914
16964
|
"default": IdCaptureLoadingOverlayDefault,
|
|
@@ -16967,8 +17017,8 @@
|
|
|
16967
17017
|
};
|
|
16968
17018
|
|
|
16969
17019
|
var Card = styled.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"])));
|
|
16970
|
-
var FlexCard = styled(Card)(templateObject_2$
|
|
16971
|
-
var templateObject_1$E, templateObject_2$
|
|
17020
|
+
var FlexCard = styled(Card)(templateObject_2$y || (templateObject_2$y = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
17021
|
+
var templateObject_1$E, templateObject_2$y;
|
|
16972
17022
|
|
|
16973
17023
|
var imageDisplayOrder = ['idCardFront', 'idCardBack', 'passport', 'singlePage', 'idFrontIrImage', 'idBackIrImage', 'idFrontUvImage', 'idBackUvImage'];
|
|
16974
17024
|
var IdCaptureSuccess = function IdCaptureSuccess(_a) {
|
|
@@ -17031,12 +17081,12 @@
|
|
|
17031
17081
|
}, verbiage.retryText)))));
|
|
17032
17082
|
};
|
|
17033
17083
|
var Heading$a = styled.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"])));
|
|
17034
|
-
var ImagesContainer = styled(OverlayImageContainer)(templateObject_2$
|
|
17035
|
-
var ImageRow = styled(OverlayImageRow)(templateObject_3$
|
|
17084
|
+
var ImagesContainer = styled(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"])));
|
|
17085
|
+
var ImageRow = styled(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"])));
|
|
17036
17086
|
var ImageCol$1 = styled.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"])));
|
|
17037
17087
|
var StyledImage = styled(CapturedDocumentImg)(templateObject_5$b || (templateObject_5$b = __makeTemplateObject(["\n width: 100%;\n border-radius: 12px;\n"], ["\n width: 100%;\n border-radius: 12px;\n"])));
|
|
17038
17088
|
var DebugPre = styled.pre(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"], ["\n display: block;\n text-align: left;\n width: 100%;\n max-width: 100%;\n overflow-x: auto;\n"])));
|
|
17039
|
-
var templateObject_1$D, templateObject_2$
|
|
17089
|
+
var templateObject_1$D, templateObject_2$x, templateObject_3$n, templateObject_4$g, templateObject_5$b, templateObject_6$7;
|
|
17040
17090
|
|
|
17041
17091
|
function useShowSuccessScreen(skipSuccessScreen, successScreenReady, onDoneCallback) {
|
|
17042
17092
|
var _this = this;
|
|
@@ -17093,7 +17143,7 @@
|
|
|
17093
17143
|
}, function (props) {
|
|
17094
17144
|
return props.$isMobile ? props.$isLandscape ? 'height: 100%;' : 'width: 80%;' : props.$isLandscape ? 'height: 70%;' : 'width: 82%;';
|
|
17095
17145
|
});
|
|
17096
|
-
var IdCardGuideImage = styled.img(templateObject_2$
|
|
17146
|
+
var IdCardGuideImage = styled.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) {
|
|
17097
17147
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
17098
17148
|
}, function (props) {
|
|
17099
17149
|
return props.$isInvisible ? 'opacity: 0;' : '';
|
|
@@ -17243,7 +17293,7 @@
|
|
|
17243
17293
|
className: isProgressBar ? "idmSdkProgressBorder ".concat(progressPaused ? 'idmSdkProgressPaused' : '') : ''
|
|
17244
17294
|
}));
|
|
17245
17295
|
}
|
|
17246
|
-
var IdCardBorderContainer = styled.div(templateObject_3$
|
|
17296
|
+
var IdCardBorderContainer = styled.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);
|
|
17247
17297
|
var IdCardBorderInner = styled.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"])));
|
|
17248
17298
|
var SvgOverlay = styled.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"])));
|
|
17249
17299
|
var IdCardBorderRect = styled.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) {
|
|
@@ -17253,7 +17303,7 @@
|
|
|
17253
17303
|
var _a;
|
|
17254
17304
|
return (_a = props.$fillMode) !== null && _a !== void 0 ? _a : 'forwards';
|
|
17255
17305
|
});
|
|
17256
|
-
var templateObject_1$C, templateObject_2$
|
|
17306
|
+
var templateObject_1$C, templateObject_2$w, templateObject_3$m, templateObject_4$f, templateObject_5$a, templateObject_6$6;
|
|
17257
17307
|
|
|
17258
17308
|
var defaultIdCaptureGuideImages = {
|
|
17259
17309
|
portrait: {
|
|
@@ -17445,12 +17495,12 @@
|
|
|
17445
17495
|
var Wrapper$1 = styled.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) {
|
|
17446
17496
|
return props.$isLandscape ? 'height: 100%;' : 'height: 100%;';
|
|
17447
17497
|
});
|
|
17448
|
-
var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_2$
|
|
17498
|
+
var FlipImageContainer = styled(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) {
|
|
17449
17499
|
return props.$transitionTime;
|
|
17450
17500
|
}, function (props) {
|
|
17451
17501
|
return props.$transforms;
|
|
17452
17502
|
});
|
|
17453
|
-
var templateObject_1$B, templateObject_2$
|
|
17503
|
+
var templateObject_1$B, templateObject_2$v;
|
|
17454
17504
|
|
|
17455
17505
|
var GuideOrientationContext = /*#__PURE__*/React.createContext({
|
|
17456
17506
|
orientation: 'landscape',
|
|
@@ -17739,8 +17789,8 @@
|
|
|
17739
17789
|
}).join(' ');
|
|
17740
17790
|
};
|
|
17741
17791
|
var StyledPageContainer = styled.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"])));
|
|
17742
|
-
var GuidesContainer = styled.div(templateObject_2$
|
|
17743
|
-
var GuideCenterRow = styled.div(templateObject_3$
|
|
17792
|
+
var GuidesContainer = styled.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"])));
|
|
17793
|
+
var GuideCenterRow = styled.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"])));
|
|
17744
17794
|
var GuideRegion = styled.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) {
|
|
17745
17795
|
var _a, _b, _c, _d, _e;
|
|
17746
17796
|
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)';
|
|
@@ -17768,7 +17818,7 @@
|
|
|
17768
17818
|
var GuideCenterInner = styled.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) {
|
|
17769
17819
|
return props.$isLandscape ? 'height: 100%;' : 'width: 90%;';
|
|
17770
17820
|
});
|
|
17771
|
-
var templateObject_1$z, templateObject_2$
|
|
17821
|
+
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;
|
|
17772
17822
|
|
|
17773
17823
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
17774
17824
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -17912,8 +17962,8 @@
|
|
|
17912
17962
|
var CanvasWrapper$1 = styled.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) {
|
|
17913
17963
|
return props.$maskColor;
|
|
17914
17964
|
});
|
|
17915
|
-
var Canvas$1 = styled.canvas(templateObject_2$
|
|
17916
|
-
var templateObject_1$y, templateObject_2$
|
|
17965
|
+
var Canvas$1 = styled.canvas(templateObject_2$t || (templateObject_2$t = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
17966
|
+
var templateObject_1$y, templateObject_2$t;
|
|
17917
17967
|
|
|
17918
17968
|
function IdCaptureGuides(_a) {
|
|
17919
17969
|
var _b = _a.guideType,
|
|
@@ -17994,11 +18044,11 @@
|
|
|
17994
18044
|
var $color = _a.$color;
|
|
17995
18045
|
return $color !== null && $color !== void 0 ? $color : '#888';
|
|
17996
18046
|
}, dualRingSpinnerAnimation);
|
|
17997
|
-
var SpinnerPageContainer = styled.div(templateObject_2$
|
|
18047
|
+
var SpinnerPageContainer = styled.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"])));
|
|
17998
18048
|
function SpinnerPage() {
|
|
17999
18049
|
return /*#__PURE__*/React.createElement(SpinnerPageContainer, null, /*#__PURE__*/React.createElement(Spinner$1, null));
|
|
18000
18050
|
}
|
|
18001
|
-
var templateObject_1$x, templateObject_2$
|
|
18051
|
+
var templateObject_1$x, templateObject_2$s;
|
|
18002
18052
|
|
|
18003
18053
|
var IdCaptureImagePreview = function IdCaptureImagePreview(_a) {
|
|
18004
18054
|
var _b = _a.classNames,
|
|
@@ -18086,10 +18136,10 @@
|
|
|
18086
18136
|
})));
|
|
18087
18137
|
};
|
|
18088
18138
|
var StyledSpinner = styled(Spinner$1)(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"])));
|
|
18089
|
-
var ImagePreviewWrapper = styled.div(templateObject_2$
|
|
18090
|
-
var ImagePreviewText = styled.div(templateObject_3$
|
|
18139
|
+
var ImagePreviewWrapper = styled.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"])));
|
|
18140
|
+
var ImagePreviewText = styled.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"])));
|
|
18091
18141
|
var ImagePreviewImageWrapper = styled.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"])));
|
|
18092
|
-
var templateObject_1$w, templateObject_2$
|
|
18142
|
+
var templateObject_1$w, templateObject_2$r, templateObject_3$k, templateObject_4$d;
|
|
18093
18143
|
|
|
18094
18144
|
var documentCaptureInitialState = {
|
|
18095
18145
|
documents: [],
|
|
@@ -18438,8 +18488,8 @@
|
|
|
18438
18488
|
var CanvasWrapper = styled.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) {
|
|
18439
18489
|
return props.$maskColor;
|
|
18440
18490
|
});
|
|
18441
|
-
var Canvas = styled.canvas(templateObject_2$
|
|
18442
|
-
var templateObject_1$v, templateObject_2$
|
|
18491
|
+
var Canvas = styled.canvas(templateObject_2$q || (templateObject_2$q = __makeTemplateObject(["\n display: block;\n"], ["\n display: block;\n"])));
|
|
18492
|
+
var templateObject_1$v, templateObject_2$q;
|
|
18443
18493
|
|
|
18444
18494
|
var CameraFeedWrapper = styled.div(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (props) {
|
|
18445
18495
|
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;") : "";
|
|
@@ -18625,10 +18675,10 @@
|
|
|
18625
18675
|
}, !cameraReady ? verbiage.loadingBtnText : capturing ? verbiage.capturingBtnText : verbiage.captureBtnText))))));
|
|
18626
18676
|
};
|
|
18627
18677
|
var CaptureContainer = styled.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"])));
|
|
18628
|
-
var HeadingRow = styled.div(templateObject_2$
|
|
18678
|
+
var HeadingRow = styled.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) {
|
|
18629
18679
|
return props.$maskColor;
|
|
18630
18680
|
});
|
|
18631
|
-
var Heading$9 = styled.h1(templateObject_3$
|
|
18681
|
+
var Heading$9 = styled.h1(templateObject_3$j || (templateObject_3$j = __makeTemplateObject(["\n font-size: 22px;\n"], ["\n font-size: 22px;\n"])));
|
|
18632
18682
|
var FooterRow = styled.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) {
|
|
18633
18683
|
return props.$maskColor;
|
|
18634
18684
|
});
|
|
@@ -18638,7 +18688,7 @@
|
|
|
18638
18688
|
});
|
|
18639
18689
|
var StyledButtonsRow$8 = styled(ButtonsRow$2)(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n padding-top: 20px;\n"], ["\n padding-top: 20px;\n"])));
|
|
18640
18690
|
var PreviewImage = styled.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"])));
|
|
18641
|
-
var templateObject_1$s, templateObject_2$
|
|
18691
|
+
var templateObject_1$s, templateObject_2$p, templateObject_3$j, templateObject_4$c, templateObject_5$8, templateObject_6$4, templateObject_7$2;
|
|
18642
18692
|
|
|
18643
18693
|
var DocumentCaptureWizard = function DocumentCaptureWizard(_a) {
|
|
18644
18694
|
var onSuccess = _a.onSuccess,
|
|
@@ -18910,12 +18960,12 @@
|
|
|
18910
18960
|
}, verbiage.doneBtnText))))));
|
|
18911
18961
|
};
|
|
18912
18962
|
var StyledOverlayInner$2 = styled(OverlayInner$2)(templateObject_1$r || (templateObject_1$r = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
18913
|
-
var Heading$8 = styled.h3(templateObject_2$
|
|
18914
|
-
var Description$3 = styled.p(templateObject_3$
|
|
18963
|
+
var Heading$8 = styled.h3(templateObject_2$o || (templateObject_2$o = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
18964
|
+
var Description$3 = styled.p(templateObject_3$i || (templateObject_3$i = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
18915
18965
|
var Instruction = styled.p(templateObject_4$b || (templateObject_4$b = __makeTemplateObject(["\n font-weight: bold;\n"], ["\n font-weight: bold;\n"])));
|
|
18916
18966
|
var ImageCol = styled.div(templateObject_5$7 || (templateObject_5$7 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"], ["\n display: flex;\n justify-content: center;\n flex-grow: 1;\n flex-basis: 0;\n"])));
|
|
18917
18967
|
var StyledButtonsRow$7 = styled(ButtonsRow$2)(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
18918
|
-
var templateObject_1$r, templateObject_2$
|
|
18968
|
+
var templateObject_1$r, templateObject_2$o, templateObject_3$i, templateObject_4$b, templateObject_5$7, templateObject_6$3;
|
|
18919
18969
|
|
|
18920
18970
|
function ScalingCameraFeed() {
|
|
18921
18971
|
var _a = useIdCaptureStore(),
|
|
@@ -19271,8 +19321,8 @@
|
|
|
19271
19321
|
var _a;
|
|
19272
19322
|
return (_a = props.theme) === null || _a === void 0 ? void 0 : _a.fontFamily;
|
|
19273
19323
|
});
|
|
19274
|
-
var ScreenPanel = styled.div(templateObject_2$
|
|
19275
|
-
var SelectIdCardScreenPanel = styled(ScreenPanel)(templateObject_3$
|
|
19324
|
+
var ScreenPanel = styled.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"])));
|
|
19325
|
+
var SelectIdCardScreenPanel = styled(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"])));
|
|
19276
19326
|
var ScreenPanelHeading = styled.h3(templateObject_4$a || (templateObject_4$a = __makeTemplateObject(["\n margin: 0 0 30px;\n"], ["\n margin: 0 0 30px;\n"])));
|
|
19277
19327
|
var ScreenActionsBar = styled.div(templateObject_5$6 || (templateObject_5$6 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: end;\n gap: 20px;\n padding: 20px;\n width: 100%;\n box-sizing: border-box;\n border-top: 1px solid #ccc;\n\n @media (max-width: 600px) {\n justify-content: center;\n }\n"])));
|
|
19278
19328
|
var DashedSeparator = styled.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"])));
|
|
@@ -19556,13 +19606,14 @@
|
|
|
19556
19606
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
19557
19607
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
19558
19608
|
}
|
|
19559
|
-
var templateObject_1$q, templateObject_2$
|
|
19609
|
+
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;
|
|
19560
19610
|
|
|
19561
19611
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
19562
19612
|
var _b, _c, _d, _e, _f;
|
|
19563
19613
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
19564
19614
|
onLoadingProgress = _a.onLoadingProgress,
|
|
19565
19615
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
19616
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
19566
19617
|
onSuccess = _a.onSuccess,
|
|
19567
19618
|
onExitCapture = _a.onExitCapture,
|
|
19568
19619
|
onUserCancel = _a.onUserCancel,
|
|
@@ -19920,6 +19971,7 @@
|
|
|
19920
19971
|
onLoadingStarted: onLoadingStarted,
|
|
19921
19972
|
onLoadingProgress: onLoadingProgress,
|
|
19922
19973
|
onLoadingCompleted: onLoadingCompleted,
|
|
19974
|
+
onLoadingFailed: onLoadingFailed,
|
|
19923
19975
|
onDismissed: function onDismissed() {
|
|
19924
19976
|
setOverlayDismissed(true);
|
|
19925
19977
|
onLoadingOverlayDismissed === null || onLoadingOverlayDismissed === void 0 ? void 0 : onLoadingOverlayDismissed();
|
|
@@ -20334,8 +20386,8 @@
|
|
|
20334
20386
|
height: parentHeight
|
|
20335
20387
|
})));
|
|
20336
20388
|
}
|
|
20337
|
-
var AbsoluteSvg = styled.svg(templateObject_2$
|
|
20338
|
-
var RelativeSvgContainer = styled.div(templateObject_3$
|
|
20389
|
+
var AbsoluteSvg = styled.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"])));
|
|
20390
|
+
var RelativeSvgContainer = styled.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) {
|
|
20339
20391
|
return props.$verticalAlign === 'bottom' ? 'flex-end' : 'center';
|
|
20340
20392
|
});
|
|
20341
20393
|
function SelfieCaptureAnimatedMask(_a) {
|
|
@@ -20562,10 +20614,10 @@
|
|
|
20562
20614
|
status: status
|
|
20563
20615
|
}));
|
|
20564
20616
|
}
|
|
20565
|
-
var templateObject_1$p, templateObject_2$
|
|
20617
|
+
var templateObject_1$p, templateObject_2$m, templateObject_3$g;
|
|
20566
20618
|
|
|
20567
20619
|
var FaceCaptureGuideContainer = styled.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"])));
|
|
20568
|
-
var FaceCaptureGuideInner = styled.div(templateObject_2$
|
|
20620
|
+
var FaceCaptureGuideInner = styled.div(templateObject_2$l || (templateObject_2$l = __makeTemplateObject(["\n position: relative;\n height: 60%;\n"], ["\n position: relative;\n height: 60%;\n"])));
|
|
20569
20621
|
var FaceCaptureGuideOverlay = function FaceCaptureGuideOverlay(_a) {
|
|
20570
20622
|
var _b = _a.classNames,
|
|
20571
20623
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -20587,7 +20639,7 @@
|
|
|
20587
20639
|
verticalAlign: "center"
|
|
20588
20640
|
})));
|
|
20589
20641
|
};
|
|
20590
|
-
var templateObject_1$o, templateObject_2$
|
|
20642
|
+
var templateObject_1$o, templateObject_2$l;
|
|
20591
20643
|
|
|
20592
20644
|
var SelfieGuidanceModelsContext = /*#__PURE__*/React.createContext({
|
|
20593
20645
|
start: function start() {
|
|
@@ -20916,11 +20968,11 @@
|
|
|
20916
20968
|
}, !image ? invalidSelfie ? verbiage.retryButtonText : verbiage.captureBtnText : loading ? verbiage.doneBtnLoadingText : verbiage.doneBtnText)))));
|
|
20917
20969
|
};
|
|
20918
20970
|
var StyledOverlayInner$1 = styled(OverlayInner$2)(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n justify-content: center;\n"], ["\n justify-content: center;\n"])));
|
|
20919
|
-
var Heading$7 = styled.h3(templateObject_2$
|
|
20920
|
-
var Description$2 = styled.p(templateObject_3$
|
|
20971
|
+
var Heading$7 = styled.h3(templateObject_2$k || (templateObject_2$k = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
20972
|
+
var Description$2 = styled.p(templateObject_3$f || (templateObject_3$f = __makeTemplateObject(["\n margin-bottom: 8px;\n"], ["\n margin-bottom: 8px;\n"])));
|
|
20921
20973
|
var ImageContainer$6 = styled(OverlayImageContainer)(templateObject_4$9 || (templateObject_4$9 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
20922
20974
|
var StyledButtonsRow$6 = styled(ButtonsRow$2)(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n margin-top: 32px;\n"], ["\n margin-top: 32px;\n"])));
|
|
20923
|
-
var templateObject_1$n, templateObject_2$
|
|
20975
|
+
var templateObject_1$n, templateObject_2$k, templateObject_3$f, templateObject_4$9, templateObject_5$5;
|
|
20924
20976
|
|
|
20925
20977
|
var initialState$4 = {
|
|
20926
20978
|
busy: false,
|
|
@@ -20961,32 +21013,39 @@
|
|
|
20961
21013
|
guidanceMessage = _a.guidanceMessage,
|
|
20962
21014
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
20963
21015
|
guidesComponent = _a.guidesComponent,
|
|
20964
|
-
_d = _a.
|
|
20965
|
-
|
|
20966
|
-
_e = _a.
|
|
20967
|
-
|
|
20968
|
-
_f = _a.
|
|
20969
|
-
|
|
20970
|
-
_g = _a.
|
|
20971
|
-
|
|
20972
|
-
_h = _a.
|
|
20973
|
-
|
|
20974
|
-
|
|
20975
|
-
|
|
20976
|
-
|
|
20977
|
-
|
|
20978
|
-
_l =
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
20982
|
-
|
|
20983
|
-
|
|
20984
|
-
|
|
21016
|
+
_d = _a.allowManualSelfieCaptureOnLoadingError,
|
|
21017
|
+
allowManualSelfieCaptureOnLoadingError = _d === void 0 ? false : _d,
|
|
21018
|
+
_e = _a.shouldCapture,
|
|
21019
|
+
shouldCapture = _e === void 0 ? true : _e,
|
|
21020
|
+
_f = _a.classNames,
|
|
21021
|
+
classNames = _f === void 0 ? {} : _f,
|
|
21022
|
+
_g = _a.colors,
|
|
21023
|
+
colors = _g === void 0 ? {} : _g,
|
|
21024
|
+
_h = _a.verbiage,
|
|
21025
|
+
rawVerbiage = _h === void 0 ? {} : _h,
|
|
21026
|
+
_j = _a.debugMode,
|
|
21027
|
+
debugMode = _j === void 0 ? false : _j;
|
|
21028
|
+
var _k = useResizeObserver(),
|
|
21029
|
+
ref = _k.ref,
|
|
21030
|
+
_l = _k.width,
|
|
21031
|
+
width = _l === void 0 ? 1 : _l,
|
|
21032
|
+
_m = _k.height,
|
|
21033
|
+
height = _m === void 0 ? 1 : _m;
|
|
21034
|
+
var _o = React.useReducer(reducer$3, initialState$4),
|
|
21035
|
+
_p = _o[0],
|
|
21036
|
+
busy = _p.busy,
|
|
21037
|
+
prediction = _p.prediction,
|
|
21038
|
+
dispatch = _o[1];
|
|
20985
21039
|
var lastPredictionCanvas = React.useRef(null);
|
|
20986
|
-
var
|
|
20987
|
-
|
|
20988
|
-
|
|
20989
|
-
|
|
21040
|
+
var videoRef = useCameraStore(useShallow(function (state) {
|
|
21041
|
+
return {
|
|
21042
|
+
videoRef: state.videoRef
|
|
21043
|
+
};
|
|
21044
|
+
})).videoRef;
|
|
21045
|
+
var _q = useSelfieGuidanceModelsContext(),
|
|
21046
|
+
onPredictionMade = _q.onPredictionMade,
|
|
21047
|
+
canvasRef = _q.canvasRef,
|
|
21048
|
+
guidanceError = _q.error;
|
|
20990
21049
|
onPredictionMade(f(React.useCallback(function (prediction) {
|
|
20991
21050
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
20992
21051
|
return __generator(this, function (_a) {
|
|
@@ -21009,31 +21068,33 @@
|
|
|
21009
21068
|
onGuidanceNotSatisfied === null || onGuidanceNotSatisfied === void 0 ? void 0 : onGuidanceNotSatisfied();
|
|
21010
21069
|
}
|
|
21011
21070
|
}, [onGuidanceNotSatisfied, onGuidanceSatisfied, prediction === null || prediction === void 0 ? void 0 : prediction.faceReady]);
|
|
21071
|
+
var doCapture = React.useCallback(function () {
|
|
21072
|
+
var _a;
|
|
21073
|
+
dispatch({
|
|
21074
|
+
type: 'captureStarted'
|
|
21075
|
+
});
|
|
21076
|
+
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
21077
|
+
var frame = lastPredictionCanvas.current;
|
|
21078
|
+
if (!frame) return;
|
|
21079
|
+
var ctx = frame.getContext('2d');
|
|
21080
|
+
if (!ctx) return;
|
|
21081
|
+
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
21082
|
+
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);
|
|
21083
|
+
clearCanvas(frame);
|
|
21084
|
+
dispatch({
|
|
21085
|
+
type: 'captureCompleted'
|
|
21086
|
+
});
|
|
21087
|
+
}, [onSelfieCaptureStarted, onSelfieCaptured, prediction]);
|
|
21012
21088
|
React.useEffect(function () {
|
|
21013
21089
|
if (!(prediction === null || prediction === void 0 ? void 0 : prediction.faceReady)) return;
|
|
21014
|
-
var timer = setTimeout(
|
|
21015
|
-
dispatch({
|
|
21016
|
-
type: 'captureStarted'
|
|
21017
|
-
});
|
|
21018
|
-
onSelfieCaptureStarted === null || onSelfieCaptureStarted === void 0 ? void 0 : onSelfieCaptureStarted();
|
|
21019
|
-
var frame = lastPredictionCanvas.current;
|
|
21020
|
-
if (!frame) return;
|
|
21021
|
-
var ctx = frame.getContext('2d');
|
|
21022
|
-
if (!ctx) return;
|
|
21023
|
-
var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
|
|
21024
|
-
onSelfieCaptured === null || onSelfieCaptured === void 0 ? void 0 : onSelfieCaptured(imageData, prediction.face);
|
|
21025
|
-
clearCanvas(frame);
|
|
21026
|
-
dispatch({
|
|
21027
|
-
type: 'captureCompleted'
|
|
21028
|
-
});
|
|
21029
|
-
}, 100);
|
|
21090
|
+
var timer = setTimeout(doCapture, 100);
|
|
21030
21091
|
return function () {
|
|
21031
|
-
|
|
21092
|
+
return timer && clearTimeout(timer);
|
|
21032
21093
|
};
|
|
21033
|
-
}, [
|
|
21034
|
-
var
|
|
21035
|
-
timedOut =
|
|
21036
|
-
timeoutStartedAt =
|
|
21094
|
+
}, [doCapture, prediction]);
|
|
21095
|
+
var _r = useTimeout(timeoutDurationMs, onTimeout),
|
|
21096
|
+
timedOut = _r.timedOut,
|
|
21097
|
+
timeoutStartedAt = _r.timeoutStartedAt;
|
|
21037
21098
|
var debugScalingDetails = useDebugScalingDetails({
|
|
21038
21099
|
enabled: debugMode,
|
|
21039
21100
|
pageWidth: width,
|
|
@@ -21048,17 +21109,21 @@
|
|
|
21048
21109
|
guidanceMoveForwardText: 'Move forward...',
|
|
21049
21110
|
guidanceMoveToCenterText: 'Move to the center...',
|
|
21050
21111
|
guidanceNoFaceDetectedText: 'Waiting for face to be detected...',
|
|
21051
|
-
guidanceNotStableText: 'Please hold still...'
|
|
21112
|
+
guidanceNotStableText: 'Please hold still...',
|
|
21113
|
+
guidanceManualCaptureText: 'Position your face in the circle and click to capture.',
|
|
21114
|
+
manualCaptureBtnText: 'Capture'
|
|
21052
21115
|
});
|
|
21053
|
-
var
|
|
21116
|
+
var allowManualCapture = !!guidanceError && allowManualSelfieCaptureOnLoadingError;
|
|
21117
|
+
var satisfied = allowManualCapture || ((_b = prediction === null || prediction === void 0 ? void 0 : prediction.faceReady) !== null && _b !== void 0 ? _b : false);
|
|
21054
21118
|
if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
|
|
21055
|
-
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 : '');
|
|
21056
|
-
if (guidanceError) {
|
|
21119
|
+
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 : '');
|
|
21120
|
+
if (guidanceError && !allowManualSelfieCaptureOnLoadingError) {
|
|
21057
21121
|
return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
|
|
21058
21122
|
classNames: classNames.fallback
|
|
21059
21123
|
});
|
|
21060
21124
|
}
|
|
21061
21125
|
var GuidesComponent = guidesComponent !== null && guidesComponent !== void 0 ? guidesComponent : FaceCaptureGuideOverlay;
|
|
21126
|
+
var guidanceVariant = allowManualCapture ? 'default' : satisfied ? 'positive' : 'negative';
|
|
21062
21127
|
return /*#__PURE__*/React.createElement(Container$6, {
|
|
21063
21128
|
ref: ref,
|
|
21064
21129
|
className: classNames.container
|
|
@@ -21068,28 +21133,40 @@
|
|
|
21068
21133
|
classNames: classNames.guides,
|
|
21069
21134
|
status: satisfied ? 'processing' : 'ready'
|
|
21070
21135
|
}), !!guidanceMessage && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
21136
|
+
"$top": "12px",
|
|
21071
21137
|
className: classNames.guidanceMessageContainer
|
|
21072
21138
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
21073
|
-
"$variant":
|
|
21139
|
+
"$variant": guidanceVariant,
|
|
21074
21140
|
className: classNames.guidanceMessage
|
|
21075
21141
|
}, guidanceMessage))), debugMode && (prediction === null || prediction === void 0 ? void 0 : prediction.face) && ( /*#__PURE__*/React.createElement(ObjectDetectionDebugOverlayDiv, null, /*#__PURE__*/React.createElement(SelfieCaptureFaceDebugBox, {
|
|
21076
21142
|
face: prediction.face,
|
|
21077
21143
|
scaling: debugScalingDetails,
|
|
21078
21144
|
color: satisfied ? 'green' : 'red'
|
|
21079
|
-
}))), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React.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.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React.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.createElement(
|
|
21145
|
+
}))), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, camera ? ( /*#__PURE__*/React.createElement(React.Fragment, null, "\u2705 Camera: ", camera.label, " (", camera.width, "x", camera.height, ")")) : '❌ Camera not ready', /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? '✅' : '❌', " Face Detected", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? '✅' : '❌', " Face Centered", /*#__PURE__*/React.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.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? '✅' : '❌', " Face Looking Forward", /*#__PURE__*/React.createElement("br", null), !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) ? '✅' : '❌', " Face Is Stable", /*#__PURE__*/React.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.createElement(CaptureButtonContainer$1, null, /*#__PURE__*/React.createElement(CaptureButton$1, {
|
|
21146
|
+
disabled: !videoRef.current,
|
|
21147
|
+
onClick: function onClick() {
|
|
21148
|
+
var _a;
|
|
21149
|
+
// draw the current frame from videoRef to the canvas
|
|
21150
|
+
if (!lastPredictionCanvas.current || !videoRef.current) return;
|
|
21151
|
+
lastPredictionCanvas.current.width = videoRef.current.videoWidth;
|
|
21152
|
+
lastPredictionCanvas.current.height = videoRef.current.videoHeight;
|
|
21153
|
+
var ctx = (_a = lastPredictionCanvas.current) === null || _a === void 0 ? void 0 : _a.getContext('2d');
|
|
21154
|
+
if (!ctx) return;
|
|
21155
|
+
ctx.drawImage(videoRef.current, 0, 0);
|
|
21156
|
+
doCapture();
|
|
21157
|
+
}
|
|
21158
|
+
}, verbiage.manualCaptureBtnText))), /*#__PURE__*/React.createElement(ExitCaptureButton, {
|
|
21080
21159
|
onClick: onExit,
|
|
21081
21160
|
className: classNames.exitCaptureBtn
|
|
21082
21161
|
}));
|
|
21083
21162
|
};
|
|
21084
21163
|
var Container$6 = styled.div(templateObject_1$m || (templateObject_1$m = __makeTemplateObject(["\n width: 100%;\n height: 100%;\n"], ["\n width: 100%;\n height: 100%;\n"])));
|
|
21085
|
-
var
|
|
21164
|
+
var CaptureButtonContainer$1 = styled.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"])));
|
|
21165
|
+
var CaptureButton$1 = styled(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"])));
|
|
21166
|
+
var templateObject_1$m, templateObject_2$j, templateObject_3$e;
|
|
21086
21167
|
|
|
21087
21168
|
var initialState$3 = {
|
|
21088
|
-
frame: null,
|
|
21089
|
-
face: null,
|
|
21090
21169
|
requestState: 'CAPTURING',
|
|
21091
|
-
requestError: null,
|
|
21092
|
-
imageUrl: null,
|
|
21093
21170
|
faceLive: false,
|
|
21094
21171
|
eyeCoveringDetected: false,
|
|
21095
21172
|
maskDetected: false,
|
|
@@ -21098,7 +21175,6 @@
|
|
|
21098
21175
|
timesLivenessCheckFailed: 0
|
|
21099
21176
|
};
|
|
21100
21177
|
var reducer$2 = function reducer(state, action) {
|
|
21101
|
-
var _a, _b;
|
|
21102
21178
|
switch (action.type) {
|
|
21103
21179
|
case 'resetLivenessCheck':
|
|
21104
21180
|
return _assign(_assign({}, initialState$3), {
|
|
@@ -21133,12 +21209,12 @@
|
|
|
21133
21209
|
});
|
|
21134
21210
|
case 'livenessChecked':
|
|
21135
21211
|
{
|
|
21136
|
-
var
|
|
21137
|
-
|
|
21138
|
-
statusCode =
|
|
21139
|
-
statusMessage =
|
|
21140
|
-
errorData =
|
|
21141
|
-
resultData =
|
|
21212
|
+
var _a = action.payload.response,
|
|
21213
|
+
_b = _a.status,
|
|
21214
|
+
statusCode = _b.statusCode,
|
|
21215
|
+
statusMessage = _b.statusMessage,
|
|
21216
|
+
errorData = _b.errorData,
|
|
21217
|
+
resultData = _a.resultData;
|
|
21142
21218
|
if (statusCode !== '000') {
|
|
21143
21219
|
return _assign(_assign({}, state), {
|
|
21144
21220
|
requestState: 'ERROR',
|
|
@@ -21159,8 +21235,8 @@
|
|
|
21159
21235
|
timesLivenessCheckFailed += 1;
|
|
21160
21236
|
}
|
|
21161
21237
|
return _assign(_assign({}, state), {
|
|
21162
|
-
frame:
|
|
21163
|
-
face:
|
|
21238
|
+
frame: action.payload.frame,
|
|
21239
|
+
face: action.payload.face,
|
|
21164
21240
|
imageUrl: action.payload.imageUrl,
|
|
21165
21241
|
requestState: requestState,
|
|
21166
21242
|
faceLive: faceLive,
|
|
@@ -21198,23 +21274,25 @@
|
|
|
21198
21274
|
silentFallback = _h === void 0 ? false : _h,
|
|
21199
21275
|
guidesComponent = _a.guidesComponent,
|
|
21200
21276
|
disableCapturePreview = _a.disableCapturePreview,
|
|
21201
|
-
_j = _a.
|
|
21202
|
-
|
|
21203
|
-
_k = _a.
|
|
21204
|
-
|
|
21205
|
-
_l = _a.
|
|
21206
|
-
|
|
21277
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
21278
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
21279
|
+
_k = _a.classNames,
|
|
21280
|
+
classNames = _k === void 0 ? {} : _k,
|
|
21281
|
+
_l = _a.colors,
|
|
21282
|
+
colors = _l === void 0 ? {} : _l,
|
|
21283
|
+
_m = _a.verbiage,
|
|
21284
|
+
rawVerbiage = _m === void 0 ? {} : _m,
|
|
21207
21285
|
debugMode = _a.debugMode;
|
|
21208
|
-
var
|
|
21209
|
-
checkLiveness =
|
|
21210
|
-
submissionError =
|
|
21286
|
+
var _o = React.useContext(SubmissionContext),
|
|
21287
|
+
checkLiveness = _o.checkLiveness,
|
|
21288
|
+
submissionError = _o.submissionError;
|
|
21211
21289
|
var modelError = useSelfieGuidanceModelsContext().error;
|
|
21212
|
-
var
|
|
21213
|
-
state =
|
|
21214
|
-
dispatch =
|
|
21215
|
-
var
|
|
21216
|
-
imageUrl =
|
|
21217
|
-
setImageUrl =
|
|
21290
|
+
var _p = React.useReducer(reducer$2, initialState$3),
|
|
21291
|
+
state = _p[0],
|
|
21292
|
+
dispatch = _p[1];
|
|
21293
|
+
var _q = React.useState(null),
|
|
21294
|
+
imageUrl = _q[0],
|
|
21295
|
+
setImageUrl = _q[1];
|
|
21218
21296
|
var rawCanvas = React.useRef(null);
|
|
21219
21297
|
var cropCanvas = React.useRef(null);
|
|
21220
21298
|
var resizeCanvas = React.useRef(null);
|
|
@@ -21240,7 +21318,7 @@
|
|
|
21240
21318
|
var isPassed = state.requestState === 'PASSED';
|
|
21241
21319
|
React.useEffect(function checkLivenessIfPossible() {
|
|
21242
21320
|
var _this = this;
|
|
21243
|
-
if (!frame || !
|
|
21321
|
+
if (!frame || !isReady || submissionError) return;
|
|
21244
21322
|
dispatch({
|
|
21245
21323
|
type: 'livenessChecking'
|
|
21246
21324
|
});
|
|
@@ -21379,7 +21457,7 @@
|
|
|
21379
21457
|
});
|
|
21380
21458
|
}, []);
|
|
21381
21459
|
var initialDelayOver = useTimeout(initialCaptureDelayMs).timedOut;
|
|
21382
|
-
if (modelError) {
|
|
21460
|
+
if (modelError && !allowManualSelfieCaptureOnLoadingError) {
|
|
21383
21461
|
return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
|
|
21384
21462
|
key: state.timesLivenessCheckFailed,
|
|
21385
21463
|
onFinished: onFallbackImageCaptured,
|
|
@@ -21406,6 +21484,7 @@
|
|
|
21406
21484
|
onGuidanceSatisfied: onGuidanceSatisfied,
|
|
21407
21485
|
onGuidanceNotSatisfied: onGuidanceNotSatisfied,
|
|
21408
21486
|
guidesComponent: guidesByRequestState,
|
|
21487
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
21409
21488
|
classNames: classNames,
|
|
21410
21489
|
colors: colors,
|
|
21411
21490
|
verbiage: rawVerbiage,
|
|
@@ -21672,35 +21751,39 @@
|
|
|
21672
21751
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
21673
21752
|
onLoadingProgress = _a.onLoadingProgress,
|
|
21674
21753
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
21754
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
21675
21755
|
onDismissed = _a.onDismissed,
|
|
21676
21756
|
onUserCancel = _a.onUserCancel,
|
|
21677
21757
|
customOverlayContent = _a.customOverlayContent,
|
|
21678
21758
|
_d = _a.waitForIdCaptureModels,
|
|
21679
21759
|
waitForIdCaptureModels = _d === void 0 ? false : _d,
|
|
21680
|
-
_e = _a.
|
|
21681
|
-
|
|
21682
|
-
_f = _a.
|
|
21683
|
-
|
|
21684
|
-
_g = _a.
|
|
21685
|
-
|
|
21686
|
-
_h = _a.
|
|
21687
|
-
|
|
21760
|
+
_e = _a.allowManualSelfieCaptureOnLoadingError,
|
|
21761
|
+
allowManualSelfieCaptureOnLoadingError = _e === void 0 ? false : _e,
|
|
21762
|
+
_f = _a.assets,
|
|
21763
|
+
assets = _f === void 0 ? {} : _f,
|
|
21764
|
+
_g = _a.classNames,
|
|
21765
|
+
classNames = _g === void 0 ? {} : _g,
|
|
21766
|
+
_h = _a.colors,
|
|
21767
|
+
colors = _h === void 0 ? {} : _h,
|
|
21768
|
+
_j = _a.verbiage,
|
|
21769
|
+
rawVerbiage = _j === void 0 ? {} : _j;
|
|
21688
21770
|
var sessionCheckState = useAuthContext()[0].sessionCheckState;
|
|
21689
21771
|
var sessionReady = sessionCheckState === 'PASSED';
|
|
21690
|
-
var
|
|
21772
|
+
var _k = useCameraStore(useShallow(function (state) {
|
|
21691
21773
|
return {
|
|
21692
21774
|
cameraReady: state.cameraReady,
|
|
21693
21775
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
21694
21776
|
microphoneAccessDenied: state.microphoneAccessDenied
|
|
21695
21777
|
};
|
|
21696
21778
|
})),
|
|
21697
|
-
cameraReady =
|
|
21698
|
-
cameraAccessDenied =
|
|
21699
|
-
microphoneAccessDenied =
|
|
21700
|
-
var
|
|
21701
|
-
modelLoadState =
|
|
21702
|
-
modelDownloadProgress =
|
|
21703
|
-
modelWarmingStartedAt =
|
|
21779
|
+
cameraReady = _k.cameraReady,
|
|
21780
|
+
cameraAccessDenied = _k.cameraAccessDenied,
|
|
21781
|
+
microphoneAccessDenied = _k.microphoneAccessDenied;
|
|
21782
|
+
var _l = useSelfieGuidanceModelsContext(),
|
|
21783
|
+
modelLoadState = _l.modelLoadState,
|
|
21784
|
+
modelDownloadProgress = _l.modelDownloadProgress,
|
|
21785
|
+
modelWarmingStartedAt = _l.modelWarmingStartedAt,
|
|
21786
|
+
modelError = _l.error;
|
|
21704
21787
|
var idCaptureModelsContext = React.useContext(IdCaptureModelsContext);
|
|
21705
21788
|
var theme = styled.useTheme();
|
|
21706
21789
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -21716,9 +21799,9 @@
|
|
|
21716
21799
|
modelsReadyText: 'Guided capture experience ready',
|
|
21717
21800
|
sessionCheckingText: 'Authenticating...'
|
|
21718
21801
|
});
|
|
21719
|
-
var
|
|
21720
|
-
headingTextIndex =
|
|
21721
|
-
setHeadingTextIndex =
|
|
21802
|
+
var _m = React.useState(0),
|
|
21803
|
+
headingTextIndex = _m[0],
|
|
21804
|
+
setHeadingTextIndex = _m[1];
|
|
21722
21805
|
var headingText = [verbiage.headingText, verbiage.removeEyeCoveringsText, verbiage.avoidExcessiveBacklightingText][headingTextIndex];
|
|
21723
21806
|
React.useEffect(function () {
|
|
21724
21807
|
setInterval(function () {
|
|
@@ -21729,20 +21812,29 @@
|
|
|
21729
21812
|
}, []);
|
|
21730
21813
|
var timeSinceWarmingStarted = modelWarmingStartedAt ? new Date().getTime() - modelWarmingStartedAt : 0;
|
|
21731
21814
|
var warmingProgress = timeSinceWarmingStarted / 5000.0;
|
|
21732
|
-
var
|
|
21815
|
+
var _o = React.useState(false),
|
|
21816
|
+
overrideModelsReady = _o[0],
|
|
21817
|
+
setOverrideModelsReady = _o[1];
|
|
21818
|
+
var onLoadingFailedCallback = React.useCallback(function (error) {
|
|
21819
|
+
setOverrideModelsReady(allowManualSelfieCaptureOnLoadingError);
|
|
21820
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
21821
|
+
}, [onLoadingFailed, allowManualSelfieCaptureOnLoadingError]);
|
|
21822
|
+
var allModelsReady = overrideModelsReady || modelLoadState === 'ready' && (!waitForIdCaptureModels || (idCaptureModelsContext === null || idCaptureModelsContext === void 0 ? void 0 : idCaptureModelsContext.ready));
|
|
21733
21823
|
var ready = sessionReady && allModelsReady && cameraReady;
|
|
21734
21824
|
var modelLoadProgress = allModelsReady ? 100 : modelDownloadProgress * 0.5 + warmingProgress * 49.0;
|
|
21735
21825
|
useLoadProgressHooks({
|
|
21736
21826
|
ready: ready,
|
|
21737
21827
|
modelLoadState: modelLoadState,
|
|
21738
21828
|
modelLoadProgress: modelLoadProgress,
|
|
21829
|
+
modelError: modelError,
|
|
21739
21830
|
onLoadingStarted: onLoadingStarted,
|
|
21740
21831
|
onLoadingProgress: onLoadingProgress,
|
|
21741
|
-
onLoadingCompleted: onLoadingCompleted
|
|
21832
|
+
onLoadingCompleted: onLoadingCompleted,
|
|
21833
|
+
onLoadingFailed: onLoadingFailedCallback
|
|
21742
21834
|
});
|
|
21743
|
-
var
|
|
21744
|
-
dismissed =
|
|
21745
|
-
setDismissed =
|
|
21835
|
+
var _p = React.useState(false),
|
|
21836
|
+
dismissed = _p[0],
|
|
21837
|
+
setDismissed = _p[1];
|
|
21746
21838
|
if (dismissed) return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
21747
21839
|
if (cameraAccessDenied) {
|
|
21748
21840
|
return /*#__PURE__*/React.createElement(CameraAccessDeniedOverlay, {
|
|
@@ -21883,6 +21975,7 @@
|
|
|
21883
21975
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
21884
21976
|
onLoadingProgress = _a.onLoadingProgress,
|
|
21885
21977
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
21978
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
21886
21979
|
onComplete = _a.onComplete,
|
|
21887
21980
|
onSuccess = _a.onSuccess,
|
|
21888
21981
|
onFailure = _a.onFailure,
|
|
@@ -21916,49 +22009,51 @@
|
|
|
21916
22009
|
waitForIdCaptureModels = _m === void 0 ? false : _m,
|
|
21917
22010
|
guidesComponent = _a.guidesComponent,
|
|
21918
22011
|
disableCapturePreview = _a.disableCapturePreview,
|
|
21919
|
-
_o = _a.
|
|
21920
|
-
|
|
21921
|
-
_p = _a.
|
|
21922
|
-
|
|
21923
|
-
_q = _a.
|
|
21924
|
-
|
|
21925
|
-
_r = _a.
|
|
21926
|
-
|
|
21927
|
-
_s = _a.
|
|
21928
|
-
|
|
21929
|
-
_t = _a.
|
|
21930
|
-
|
|
21931
|
-
|
|
21932
|
-
|
|
21933
|
-
|
|
21934
|
-
|
|
21935
|
-
|
|
21936
|
-
|
|
22012
|
+
_o = _a.allowManualSelfieCaptureOnLoadingError,
|
|
22013
|
+
allowManualSelfieCaptureOnLoadingError = _o === void 0 ? false : _o,
|
|
22014
|
+
_p = _a.assets,
|
|
22015
|
+
assets = _p === void 0 ? {} : _p,
|
|
22016
|
+
_q = _a.classNames,
|
|
22017
|
+
classNames = _q === void 0 ? {} : _q,
|
|
22018
|
+
_r = _a.colors,
|
|
22019
|
+
colors = _r === void 0 ? {} : _r,
|
|
22020
|
+
_s = _a.verbiage,
|
|
22021
|
+
verbiage = _s === void 0 ? {} : _s,
|
|
22022
|
+
_t = _a.debugMode,
|
|
22023
|
+
debugMode = _t === void 0 ? false : _t,
|
|
22024
|
+
_u = _a.showLoadingOverlay,
|
|
22025
|
+
showLoadingOverlay = _u === void 0 ? true : _u;
|
|
22026
|
+
var _v = useSubmissionContext(),
|
|
22027
|
+
submissionResponse = _v.submissionResponse,
|
|
22028
|
+
livenessCheckRequest = _v.livenessCheckRequest,
|
|
22029
|
+
setSelfieImage = _v.setSelfieImage,
|
|
22030
|
+
logSelfieCaptureAttempt = _v.logSelfieCaptureAttempt;
|
|
22031
|
+
var _w = useCameraStore(useShallow(function (state) {
|
|
21937
22032
|
return {
|
|
21938
22033
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
21939
22034
|
requestCameraAccess: state.requestCameraAccess,
|
|
21940
22035
|
releaseCameraAccess: state.releaseCameraAccess
|
|
21941
22036
|
};
|
|
21942
22037
|
})),
|
|
21943
|
-
cameraAccessDenied =
|
|
21944
|
-
requestCameraAccess =
|
|
21945
|
-
releaseCameraAccess =
|
|
21946
|
-
var
|
|
21947
|
-
faceCropImageUrl =
|
|
21948
|
-
setFaceCropImageUrl =
|
|
21949
|
-
var
|
|
21950
|
-
retryCount =
|
|
21951
|
-
setRetryCount =
|
|
21952
|
-
var
|
|
21953
|
-
captureState =
|
|
21954
|
-
setCaptureState =
|
|
22038
|
+
cameraAccessDenied = _w.cameraAccessDenied,
|
|
22039
|
+
requestCameraAccess = _w.requestCameraAccess,
|
|
22040
|
+
releaseCameraAccess = _w.releaseCameraAccess;
|
|
22041
|
+
var _x = React.useState(''),
|
|
22042
|
+
faceCropImageUrl = _x[0],
|
|
22043
|
+
setFaceCropImageUrl = _x[1];
|
|
22044
|
+
var _y = React.useState(0),
|
|
22045
|
+
retryCount = _y[0],
|
|
22046
|
+
setRetryCount = _y[1];
|
|
22047
|
+
var _z = React.useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
22048
|
+
captureState = _z[0],
|
|
22049
|
+
setCaptureState = _z[1];
|
|
21955
22050
|
var captureStartedAt = React.useRef();
|
|
21956
22051
|
var operationStartedAt = React.useRef();
|
|
21957
22052
|
var livenessScore = React.useRef();
|
|
21958
|
-
var
|
|
21959
|
-
start =
|
|
21960
|
-
stop =
|
|
21961
|
-
selfieGuidanceCanvasRef =
|
|
22053
|
+
var _0 = useSelfieGuidanceModelsContext(),
|
|
22054
|
+
start = _0.start,
|
|
22055
|
+
stop = _0.stop,
|
|
22056
|
+
selfieGuidanceCanvasRef = _0.canvasRef;
|
|
21962
22057
|
React.useEffect(function () {
|
|
21963
22058
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
21964
22059
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -22041,9 +22136,9 @@
|
|
|
22041
22136
|
}
|
|
22042
22137
|
onDenied === null || onDenied === void 0 ? void 0 : onDenied(submissionResponse, livenessCheckRequest);
|
|
22043
22138
|
}, [allowLivenessFailure, onDenied, submissionResponse, livenessCheckRequest]);
|
|
22044
|
-
var
|
|
22045
|
-
attempt =
|
|
22046
|
-
setAttempt =
|
|
22139
|
+
var _1 = React.useState(0),
|
|
22140
|
+
attempt = _1[0],
|
|
22141
|
+
setAttempt = _1[1];
|
|
22047
22142
|
var onExitCallback = React.useCallback(function () {
|
|
22048
22143
|
setAttempt(function (n) {
|
|
22049
22144
|
return n + 1;
|
|
@@ -22111,6 +22206,7 @@
|
|
|
22111
22206
|
silentFallback: silentFallback,
|
|
22112
22207
|
guidesComponent: guidesComponent,
|
|
22113
22208
|
disableCapturePreview: disableCapturePreview,
|
|
22209
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
22114
22210
|
classNames: classNames.capture,
|
|
22115
22211
|
colors: colors,
|
|
22116
22212
|
verbiage: verbiage,
|
|
@@ -22153,9 +22249,11 @@
|
|
|
22153
22249
|
onLoadingStarted: onLoadingStarted,
|
|
22154
22250
|
onLoadingProgress: onLoadingProgress,
|
|
22155
22251
|
onLoadingCompleted: onLoadingCompleted,
|
|
22252
|
+
onLoadingFailed: onLoadingFailed,
|
|
22156
22253
|
onUserCancel: onUserCancel,
|
|
22157
22254
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
22158
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
22255
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
22256
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
22159
22257
|
})));
|
|
22160
22258
|
};
|
|
22161
22259
|
function FaceLivenessWizardWithProviders(_a) {
|
|
@@ -23879,8 +23977,6 @@
|
|
|
23879
23977
|
setTimeout(startHeadTracking, 1);
|
|
23880
23978
|
return stopHeadTracking;
|
|
23881
23979
|
}, [startHeadTracking, stopHeadTracking]);
|
|
23882
|
-
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
23883
|
-
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
23884
23980
|
var verbiage = useTranslations(rawVerbiage, {
|
|
23885
23981
|
guidanceMessageText: 'Please sign the box below'
|
|
23886
23982
|
});
|
|
@@ -23928,7 +24024,7 @@
|
|
|
23928
24024
|
ref: ref,
|
|
23929
24025
|
className: classNames.container
|
|
23930
24026
|
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
23931
|
-
"$top": "
|
|
24027
|
+
"$top": "12px",
|
|
23932
24028
|
className: classNames.guidanceMessageContainer
|
|
23933
24029
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
23934
24030
|
className: classNames.guidanceMessage,
|
|
@@ -24018,6 +24114,7 @@
|
|
|
24018
24114
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
24019
24115
|
onLoadingProgress = _a.onLoadingProgress,
|
|
24020
24116
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
24117
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
24021
24118
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
24022
24119
|
onCapture = _a.onCapture,
|
|
24023
24120
|
onUserCancel = _a.onUserCancel,
|
|
@@ -24036,43 +24133,45 @@
|
|
|
24036
24133
|
initialCaptureDelayMs = _g === void 0 ? 1000 : _g,
|
|
24037
24134
|
_h = _a.silentFallback,
|
|
24038
24135
|
silentFallback = _h === void 0 ? false : _h,
|
|
24136
|
+
_j = _a.allowManualSelfieCaptureOnLoadingError,
|
|
24137
|
+
allowManualSelfieCaptureOnLoadingError = _j === void 0 ? false : _j,
|
|
24039
24138
|
guidanceMessage = _a.guidanceMessage,
|
|
24040
24139
|
guidesComponent = _a.guidesComponent,
|
|
24041
|
-
|
|
24042
|
-
assets =
|
|
24043
|
-
|
|
24044
|
-
classNames =
|
|
24045
|
-
|
|
24046
|
-
colors =
|
|
24047
|
-
|
|
24048
|
-
verbiage =
|
|
24049
|
-
|
|
24050
|
-
debugMode =
|
|
24051
|
-
var
|
|
24052
|
-
setSelfieImage =
|
|
24053
|
-
logSelfieCaptureAttempt =
|
|
24054
|
-
var
|
|
24140
|
+
_k = _a.assets,
|
|
24141
|
+
assets = _k === void 0 ? {} : _k,
|
|
24142
|
+
_l = _a.classNames,
|
|
24143
|
+
classNames = _l === void 0 ? {} : _l,
|
|
24144
|
+
_m = _a.colors,
|
|
24145
|
+
colors = _m === void 0 ? {} : _m,
|
|
24146
|
+
_o = _a.verbiage,
|
|
24147
|
+
verbiage = _o === void 0 ? {} : _o,
|
|
24148
|
+
_p = _a.debugMode,
|
|
24149
|
+
debugMode = _p === void 0 ? false : _p;
|
|
24150
|
+
var _q = useSubmissionContext(),
|
|
24151
|
+
setSelfieImage = _q.setSelfieImage,
|
|
24152
|
+
logSelfieCaptureAttempt = _q.logSelfieCaptureAttempt;
|
|
24153
|
+
var _r = useCameraStore(useShallow(function (state) {
|
|
24055
24154
|
return {
|
|
24056
24155
|
cameraAccessDenied: state.cameraAccessDenied,
|
|
24057
24156
|
requestCameraAccess: state.requestCameraAccess,
|
|
24058
24157
|
releaseCameraAccess: state.releaseCameraAccess
|
|
24059
24158
|
};
|
|
24060
24159
|
})),
|
|
24061
|
-
cameraAccessDenied =
|
|
24062
|
-
requestCameraAccess =
|
|
24063
|
-
releaseCameraAccess =
|
|
24064
|
-
var
|
|
24065
|
-
captureState =
|
|
24066
|
-
setCaptureState =
|
|
24160
|
+
cameraAccessDenied = _r.cameraAccessDenied,
|
|
24161
|
+
requestCameraAccess = _r.requestCameraAccess,
|
|
24162
|
+
releaseCameraAccess = _r.releaseCameraAccess;
|
|
24163
|
+
var _s = React.useState(showLoadingOverlay ? 'LOADING' : 'CAPTURING'),
|
|
24164
|
+
captureState = _s[0],
|
|
24165
|
+
setCaptureState = _s[1];
|
|
24067
24166
|
var rawCanvas = React.useRef(null);
|
|
24068
24167
|
var cropCanvas = React.useRef(null);
|
|
24069
24168
|
var resizeCanvas = React.useRef(null);
|
|
24070
24169
|
var captureStartedAt = React.useRef();
|
|
24071
24170
|
var operationStartedAt = React.useRef();
|
|
24072
|
-
var
|
|
24073
|
-
start =
|
|
24074
|
-
stop =
|
|
24075
|
-
modelError =
|
|
24171
|
+
var _t = useSelfieGuidanceModelsContext(),
|
|
24172
|
+
start = _t.start,
|
|
24173
|
+
stop = _t.stop,
|
|
24174
|
+
modelError = _t.error;
|
|
24076
24175
|
React.useEffect(function () {
|
|
24077
24176
|
if (precapturedDocuments === null || precapturedDocuments === void 0 ? void 0 : precapturedDocuments.selfie) {
|
|
24078
24177
|
setSelfieImage(precapturedDocuments.selfie.imageData);
|
|
@@ -24120,9 +24219,9 @@
|
|
|
24120
24219
|
status: status
|
|
24121
24220
|
}));
|
|
24122
24221
|
}, [captureState, guidesComponent]);
|
|
24123
|
-
var
|
|
24124
|
-
attempt =
|
|
24125
|
-
setAttempt =
|
|
24222
|
+
var _u = React.useState(0),
|
|
24223
|
+
attempt = _u[0],
|
|
24224
|
+
setAttempt = _u[1];
|
|
24126
24225
|
var onExitCallback = React.useCallback(function () {
|
|
24127
24226
|
setAttempt(function (n) {
|
|
24128
24227
|
return n + 1;
|
|
@@ -24141,6 +24240,9 @@
|
|
|
24141
24240
|
}
|
|
24142
24241
|
}, [cameraAccessDenied]);
|
|
24143
24242
|
var initialDelayOver = useTimeout(initialCaptureDelayMs, undefined, undefined, undefined, captureState === 'CAPTURING').timedOut;
|
|
24243
|
+
var onLoadingFailedCallback = React.useCallback(function (error) {
|
|
24244
|
+
return onLoadingFailed === null || onLoadingFailed === void 0 ? void 0 : onLoadingFailed(error);
|
|
24245
|
+
}, [onLoadingFailed]);
|
|
24144
24246
|
if (modelError) {
|
|
24145
24247
|
return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
|
|
24146
24248
|
onFinished: onFallbackImageCaptured,
|
|
@@ -24165,6 +24267,7 @@
|
|
|
24165
24267
|
guidanceMessage: guidanceMessage,
|
|
24166
24268
|
guidanceSatisfied: guidanceMessage ? false : undefined,
|
|
24167
24269
|
guidesComponent: guidesByRequestState,
|
|
24270
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
24168
24271
|
classNames: classNames.capture,
|
|
24169
24272
|
colors: colors.capture,
|
|
24170
24273
|
verbiage: verbiage.capture,
|
|
@@ -24180,9 +24283,11 @@
|
|
|
24180
24283
|
onLoadingStarted: onLoadingStarted,
|
|
24181
24284
|
onLoadingProgress: onLoadingProgress,
|
|
24182
24285
|
onLoadingCompleted: onLoadingCompleted,
|
|
24286
|
+
onLoadingFailed: onLoadingFailedCallback,
|
|
24183
24287
|
onUserCancel: onUserCancel,
|
|
24184
24288
|
onDismissed: onLoadingOverlayDismissedCallback,
|
|
24185
|
-
waitForIdCaptureModels: waitForIdCaptureModels
|
|
24289
|
+
waitForIdCaptureModels: waitForIdCaptureModels,
|
|
24290
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError
|
|
24186
24291
|
})));
|
|
24187
24292
|
}
|
|
24188
24293
|
|
|
@@ -24192,6 +24297,7 @@
|
|
|
24192
24297
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
24193
24298
|
onLoadingProgress = _a.onLoadingProgress,
|
|
24194
24299
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
24300
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
24195
24301
|
onSelfieCaptured = _a.onSelfieCaptured,
|
|
24196
24302
|
onComplete = _a.onComplete,
|
|
24197
24303
|
onVideoCaptured = _a.onVideoCaptured,
|
|
@@ -24220,39 +24326,41 @@
|
|
|
24220
24326
|
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
24221
24327
|
_l = _a.skipLivenessValidation,
|
|
24222
24328
|
skipLivenessValidation = _l === void 0 ? false : _l,
|
|
24329
|
+
_m = _a.allowManualSelfieCaptureOnLoadingError,
|
|
24330
|
+
allowManualSelfieCaptureOnLoadingError = _m === void 0 ? false : _m,
|
|
24223
24331
|
faceLivenessProps = _a.faceLivenessProps,
|
|
24224
24332
|
guidesComponent = _a.guidesComponent,
|
|
24225
|
-
|
|
24226
|
-
assets =
|
|
24227
|
-
|
|
24228
|
-
classNames =
|
|
24229
|
-
|
|
24230
|
-
colors =
|
|
24231
|
-
|
|
24232
|
-
verbiage =
|
|
24233
|
-
|
|
24234
|
-
debugMode =
|
|
24235
|
-
var
|
|
24236
|
-
selfieImage =
|
|
24237
|
-
setSelfieImage =
|
|
24238
|
-
setSignatureData =
|
|
24239
|
-
setSignatureVideoUrl =
|
|
24240
|
-
logSelfieCaptureAttempt =
|
|
24241
|
-
uploadDocument =
|
|
24333
|
+
_o = _a.assets,
|
|
24334
|
+
assets = _o === void 0 ? {} : _o,
|
|
24335
|
+
_p = _a.classNames,
|
|
24336
|
+
classNames = _p === void 0 ? {} : _p,
|
|
24337
|
+
_q = _a.colors,
|
|
24338
|
+
colors = _q === void 0 ? {} : _q,
|
|
24339
|
+
_r = _a.verbiage,
|
|
24340
|
+
verbiage = _r === void 0 ? {} : _r,
|
|
24341
|
+
_s = _a.debugMode,
|
|
24342
|
+
debugMode = _s === void 0 ? false : _s;
|
|
24343
|
+
var _t = useSubmissionContext(),
|
|
24344
|
+
selfieImage = _t.selfieImage,
|
|
24345
|
+
setSelfieImage = _t.setSelfieImage,
|
|
24346
|
+
setSignatureData = _t.setSignatureData,
|
|
24347
|
+
setSignatureVideoUrl = _t.setSignatureVideoUrl,
|
|
24348
|
+
logSelfieCaptureAttempt = _t.logSelfieCaptureAttempt,
|
|
24349
|
+
uploadDocument = _t.uploadDocument;
|
|
24242
24350
|
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
24243
24351
|
return {
|
|
24244
24352
|
cameraAccessDenied: state.cameraAccessDenied
|
|
24245
24353
|
};
|
|
24246
24354
|
})).cameraAccessDenied;
|
|
24247
|
-
var
|
|
24248
|
-
captureState =
|
|
24249
|
-
setCaptureState =
|
|
24355
|
+
var _u = React.useState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS'),
|
|
24356
|
+
captureState = _u[0],
|
|
24357
|
+
setCaptureState = _u[1];
|
|
24250
24358
|
var operationStartedAt = React.useRef();
|
|
24251
24359
|
var captureStartedAt = React.useRef();
|
|
24252
24360
|
var captureEndedAt = React.useRef();
|
|
24253
|
-
var
|
|
24254
|
-
start =
|
|
24255
|
-
stop =
|
|
24361
|
+
var _v = useSelfieGuidanceModelsContext(),
|
|
24362
|
+
start = _v.start,
|
|
24363
|
+
stop = _v.stop;
|
|
24256
24364
|
React.useEffect(function () {
|
|
24257
24365
|
operationStartedAt.current = new Date();
|
|
24258
24366
|
}, []);
|
|
@@ -24296,9 +24404,9 @@
|
|
|
24296
24404
|
filetype: 'image/jpeg'
|
|
24297
24405
|
}).then(onSelfieCaptured);
|
|
24298
24406
|
}, [logCaptureMetadata, onSelfieCaptured, setSelfieImage, uploadDocument]);
|
|
24299
|
-
var
|
|
24300
|
-
signatureImageUrl =
|
|
24301
|
-
setSignatureImageUrl =
|
|
24407
|
+
var _w = React.useState(null),
|
|
24408
|
+
signatureImageUrl = _w[0],
|
|
24409
|
+
setSignatureImageUrl = _w[1];
|
|
24302
24410
|
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
24303
24411
|
setSignatureData(signatureData);
|
|
24304
24412
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -24306,17 +24414,17 @@
|
|
|
24306
24414
|
setCaptureState('SUCCESS');
|
|
24307
24415
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
24308
24416
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
24309
|
-
var
|
|
24310
|
-
showLoadingOverlay =
|
|
24311
|
-
setShowLoadingOverlay =
|
|
24417
|
+
var _x = React.useState(true),
|
|
24418
|
+
showLoadingOverlay = _x[0],
|
|
24419
|
+
setShowLoadingOverlay = _x[1];
|
|
24312
24420
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
24313
24421
|
setShowLoadingOverlay(false);
|
|
24314
24422
|
setCaptureState(skipLivenessValidation ? 'CAPTURING_SELFIE' : 'CHECKING_LIVENESS');
|
|
24315
24423
|
useVideoSignatureStore.getState().clearRecordedData();
|
|
24316
24424
|
}, [skipLivenessValidation]);
|
|
24317
|
-
var
|
|
24318
|
-
attempt =
|
|
24319
|
-
setAttempt =
|
|
24425
|
+
var _y = React.useState(0),
|
|
24426
|
+
attempt = _y[0],
|
|
24427
|
+
setAttempt = _y[1];
|
|
24320
24428
|
var onRetry = React.useCallback(function () {
|
|
24321
24429
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
24322
24430
|
setAttempt(function (n) {
|
|
@@ -24376,6 +24484,7 @@
|
|
|
24376
24484
|
onLoadingStarted: onLoadingStarted,
|
|
24377
24485
|
onLoadingProgress: onLoadingProgress,
|
|
24378
24486
|
onLoadingCompleted: onLoadingCompleted,
|
|
24487
|
+
onLoadingFailed: onLoadingFailed,
|
|
24379
24488
|
onSuccess: onFaceCaptureSuccess,
|
|
24380
24489
|
onExitCapture: onExitCapture,
|
|
24381
24490
|
onUserCancel: onUserCancel,
|
|
@@ -24384,6 +24493,7 @@
|
|
|
24384
24493
|
showLoadingOverlay: showLoadingOverlay,
|
|
24385
24494
|
customOverlayContent: customOverlayContent,
|
|
24386
24495
|
loadingOverlayMode: loadingOverlayMode,
|
|
24496
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
24387
24497
|
guidesComponent: resolvedGuidesComponent,
|
|
24388
24498
|
assets: assets.faceLiveness,
|
|
24389
24499
|
classNames: classNames.faceLiveness,
|
|
@@ -24399,6 +24509,7 @@
|
|
|
24399
24509
|
onLoadingStarted: onLoadingStarted,
|
|
24400
24510
|
onLoadingProgress: onLoadingProgress,
|
|
24401
24511
|
onLoadingCompleted: onLoadingCompleted,
|
|
24512
|
+
onLoadingFailed: onLoadingFailed,
|
|
24402
24513
|
onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
|
|
24403
24514
|
onCapture: onSelfieCapture,
|
|
24404
24515
|
onUserCancel: onUserCancel,
|
|
@@ -24406,6 +24517,7 @@
|
|
|
24406
24517
|
showLoadingOverlay: showLoadingOverlay,
|
|
24407
24518
|
customOverlayContent: customOverlayContent,
|
|
24408
24519
|
loadingOverlayMode: loadingOverlayMode,
|
|
24520
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
24409
24521
|
guidesComponent: resolvedGuidesComponent,
|
|
24410
24522
|
assets: assets.faceLiveness,
|
|
24411
24523
|
classNames: classNames.faceLiveness,
|
|
@@ -25374,6 +25486,7 @@
|
|
|
25374
25486
|
onLoadingStarted = _a.onLoadingStarted,
|
|
25375
25487
|
onLoadingProgress = _a.onLoadingProgress,
|
|
25376
25488
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
25489
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
25377
25490
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
25378
25491
|
_t = _a.idDocumentType,
|
|
25379
25492
|
idDocumentType = _t === void 0 ? 'idCardOrPassport' : _t,
|
|
@@ -25535,6 +25648,7 @@
|
|
|
25535
25648
|
onLoadingStarted: onLoadingStarted,
|
|
25536
25649
|
onLoadingProgress: onLoadingProgress,
|
|
25537
25650
|
onLoadingCompleted: onLoadingCompleted,
|
|
25651
|
+
onLoadingFailed: onLoadingFailed,
|
|
25538
25652
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
25539
25653
|
silentFallback: silentFallback,
|
|
25540
25654
|
guideImages: idCaptureGuideImages
|
|
@@ -25562,6 +25676,7 @@
|
|
|
25562
25676
|
onLoadingStarted: onLoadingStarted,
|
|
25563
25677
|
onLoadingProgress: onLoadingProgress,
|
|
25564
25678
|
onLoadingCompleted: onLoadingCompleted,
|
|
25679
|
+
onLoadingFailed: onLoadingFailed,
|
|
25565
25680
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
25566
25681
|
silentFallback: silentFallback
|
|
25567
25682
|
}, faceLivenessProps, {
|
|
@@ -25912,7 +26027,7 @@
|
|
|
25912
26027
|
},
|
|
25913
26028
|
guidanceMessages: {
|
|
25914
26029
|
"default": {
|
|
25915
|
-
backgroundColor: '
|
|
26030
|
+
backgroundColor: 'white',
|
|
25916
26031
|
textColor: 'black'
|
|
25917
26032
|
},
|
|
25918
26033
|
positive: {
|
|
@@ -26146,6 +26261,7 @@
|
|
|
26146
26261
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26147
26262
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26148
26263
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26264
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26149
26265
|
onAuthError = _a.onAuthError,
|
|
26150
26266
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
26151
26267
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
@@ -26192,6 +26308,7 @@
|
|
|
26192
26308
|
onLoadingStarted: onLoadingStarted,
|
|
26193
26309
|
onLoadingProgress: onLoadingProgress,
|
|
26194
26310
|
onLoadingCompleted: onLoadingCompleted,
|
|
26311
|
+
onLoadingFailed: onLoadingFailed,
|
|
26195
26312
|
onExitCapture: onExitCapture,
|
|
26196
26313
|
onUserCancel: onUserCancel,
|
|
26197
26314
|
onModelError: onModelError,
|
|
@@ -26223,7 +26340,7 @@
|
|
|
26223
26340
|
verbiage: verbiage,
|
|
26224
26341
|
debugMode: debugMode
|
|
26225
26342
|
};
|
|
26226
|
-
}, [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]);
|
|
26343
|
+
}, [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]);
|
|
26227
26344
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
26228
26345
|
return {
|
|
26229
26346
|
documents: captureAdditionalDocuments,
|
|
@@ -26356,6 +26473,7 @@
|
|
|
26356
26473
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26357
26474
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26358
26475
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26476
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26359
26477
|
onAuthError = _a.onAuthError,
|
|
26360
26478
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26361
26479
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -26396,6 +26514,7 @@
|
|
|
26396
26514
|
onLoadingStarted: onLoadingStarted,
|
|
26397
26515
|
onLoadingProgress: onLoadingProgress,
|
|
26398
26516
|
onLoadingCompleted: onLoadingCompleted,
|
|
26517
|
+
onLoadingFailed: onLoadingFailed,
|
|
26399
26518
|
onComplete: onComplete,
|
|
26400
26519
|
onSuccess: onApproved,
|
|
26401
26520
|
onDenied: onDenied,
|
|
@@ -26409,7 +26528,7 @@
|
|
|
26409
26528
|
verbiage: verbiage,
|
|
26410
26529
|
debugMode: debugMode
|
|
26411
26530
|
};
|
|
26412
|
-
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
26531
|
+
}, [assets, classNames, colors, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onApproved, onComplete, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage]);
|
|
26413
26532
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
26414
26533
|
sessionId: sessionId,
|
|
26415
26534
|
authUrl: authUrl,
|
|
@@ -26536,6 +26655,7 @@
|
|
|
26536
26655
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26537
26656
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26538
26657
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26658
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26539
26659
|
onAuthError = _a.onAuthError,
|
|
26540
26660
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26541
26661
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -26584,6 +26704,7 @@
|
|
|
26584
26704
|
onLoadingStarted: onLoadingStarted,
|
|
26585
26705
|
onLoadingProgress: onLoadingProgress,
|
|
26586
26706
|
onLoadingCompleted: onLoadingCompleted,
|
|
26707
|
+
onLoadingFailed: onLoadingFailed,
|
|
26587
26708
|
onExitCapture: onExitCapture,
|
|
26588
26709
|
onUserCancel: onUserCancel,
|
|
26589
26710
|
onModelError: onIdCaptureModelError,
|
|
@@ -26611,12 +26732,13 @@
|
|
|
26611
26732
|
skipSuccessScreen: skipSuccessScreen,
|
|
26612
26733
|
debugMode: debugMode
|
|
26613
26734
|
};
|
|
26614
|
-
}, [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]);
|
|
26735
|
+
}, [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]);
|
|
26615
26736
|
var faceLivenessProps = React.useMemo(function () {
|
|
26616
26737
|
return {
|
|
26617
26738
|
onLoadingStarted: onLoadingStarted,
|
|
26618
26739
|
onLoadingProgress: onLoadingProgress,
|
|
26619
26740
|
onLoadingCompleted: onLoadingCompleted,
|
|
26741
|
+
onLoadingFailed: onLoadingFailed,
|
|
26620
26742
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
26621
26743
|
initialCaptureDelayMs: faceLivenessInitialCaptureDelayMs,
|
|
26622
26744
|
timeoutDurationMs: faceLivenessTimeoutDurationMs,
|
|
@@ -26634,7 +26756,7 @@
|
|
|
26634
26756
|
verbiage: verbiage.faceLiveness,
|
|
26635
26757
|
debugMode: debugMode
|
|
26636
26758
|
};
|
|
26637
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26759
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onDenied, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26638
26760
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
26639
26761
|
return {
|
|
26640
26762
|
documents: captureAdditionalDocuments,
|
|
@@ -26814,6 +26936,7 @@
|
|
|
26814
26936
|
onLoadingStarted = _a.onLoadingStarted,
|
|
26815
26937
|
onLoadingProgress = _a.onLoadingProgress,
|
|
26816
26938
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
26939
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
26817
26940
|
onAuthError = _a.onAuthError,
|
|
26818
26941
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
26819
26942
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -26864,6 +26987,7 @@
|
|
|
26864
26987
|
onLoadingStarted: onLoadingStarted,
|
|
26865
26988
|
onLoadingProgress: onLoadingProgress,
|
|
26866
26989
|
onLoadingCompleted: onLoadingCompleted,
|
|
26990
|
+
onLoadingFailed: onLoadingFailed,
|
|
26867
26991
|
assets: assets.idCapture,
|
|
26868
26992
|
classNames: classNames.idCapture,
|
|
26869
26993
|
colors: colors.idCapture,
|
|
@@ -26891,12 +27015,13 @@
|
|
|
26891
27015
|
skipSuccessScreen: skipSuccessScreen,
|
|
26892
27016
|
debugMode: debugMode
|
|
26893
27017
|
};
|
|
26894
|
-
}, [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]);
|
|
27018
|
+
}, [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]);
|
|
26895
27019
|
var faceLivenessProps = React.useMemo(function () {
|
|
26896
27020
|
return {
|
|
26897
27021
|
onLoadingStarted: onLoadingStarted,
|
|
26898
27022
|
onLoadingProgress: onLoadingProgress,
|
|
26899
27023
|
onLoadingCompleted: onLoadingCompleted,
|
|
27024
|
+
onLoadingFailed: onLoadingFailed,
|
|
26900
27025
|
onExitCapture: onExitCapture,
|
|
26901
27026
|
onExitAfterFailure: onExitAfterFailure,
|
|
26902
27027
|
onUserCancel: onUserCancel,
|
|
@@ -26913,7 +27038,7 @@
|
|
|
26913
27038
|
verbiage: verbiage.faceLiveness,
|
|
26914
27039
|
debugMode: debugMode
|
|
26915
27040
|
};
|
|
26916
|
-
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
27041
|
+
}, [onLoadingCompleted, onLoadingProgress, onLoadingStarted, onLoadingFailed, assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, faceLivenessInitialCaptureDelayMs, faceLivenessLoadingOverlayMode, faceLivenessTimeoutDurationMs, onExitAfterFailure, onExitCapture, onSelfieCaptureModelError, onUserCancel, precapturedDocuments, selfieCaptureModelLoadTimeoutMs, skipSuccessScreen, verbiage.faceLiveness]);
|
|
26917
27042
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
26918
27043
|
return _assign({
|
|
26919
27044
|
onExitCapture: onExitCapture,
|
|
@@ -27033,11 +27158,7 @@
|
|
|
27033
27158
|
|
|
27034
27159
|
var ALLOWED_RETRIES$3 = 0;
|
|
27035
27160
|
var initialState$1 = {
|
|
27036
|
-
frame: null,
|
|
27037
|
-
face: null,
|
|
27038
|
-
imageUrl: null,
|
|
27039
27161
|
requestState: 'CAPTURING',
|
|
27040
|
-
requestError: null,
|
|
27041
27162
|
unverifiedTimes: 0
|
|
27042
27163
|
};
|
|
27043
27164
|
var reducer$1 = function reducer(state, action) {
|
|
@@ -27128,7 +27249,7 @@
|
|
|
27128
27249
|
submissionError = _j.submissionError,
|
|
27129
27250
|
selfieImage = _j.selfieImage,
|
|
27130
27251
|
setSelfieImage = _j.setSelfieImage;
|
|
27131
|
-
var _k = React.useState(
|
|
27252
|
+
var _k = React.useState(),
|
|
27132
27253
|
imageUrl = _k[0],
|
|
27133
27254
|
setImageUrl = _k[1];
|
|
27134
27255
|
var rawCanvas = React.useRef(null);
|
|
@@ -27148,9 +27269,7 @@
|
|
|
27148
27269
|
if (!frame || !face || submissionError) return;
|
|
27149
27270
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
27150
27271
|
setImageUrl(imageUrl);
|
|
27151
|
-
dataUrlToBase64(imageUrl).then(
|
|
27152
|
-
setSelfieImage(img);
|
|
27153
|
-
});
|
|
27272
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
27154
27273
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
27155
27274
|
React.useEffect(function () {
|
|
27156
27275
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -27332,6 +27451,7 @@
|
|
|
27332
27451
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
27333
27452
|
onLoadingProgress = _a.onLoadingProgress,
|
|
27334
27453
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27454
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
27335
27455
|
onComplete = _a.onComplete,
|
|
27336
27456
|
onCustomerMatched = _a.onCustomerMatched,
|
|
27337
27457
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -27480,6 +27600,7 @@
|
|
|
27480
27600
|
onLoadingStarted: onLoadingStarted,
|
|
27481
27601
|
onLoadingProgress: onLoadingProgress,
|
|
27482
27602
|
onLoadingCompleted: onLoadingCompleted,
|
|
27603
|
+
onLoadingFailed: onLoadingFailed,
|
|
27483
27604
|
onUserCancel: onUserCancel,
|
|
27484
27605
|
onDismissed: function onDismissed() {
|
|
27485
27606
|
return setCaptureState('CAPTURING');
|
|
@@ -27527,6 +27648,7 @@
|
|
|
27527
27648
|
onLoadingStarted = _a.onLoadingStarted,
|
|
27528
27649
|
onLoadingProgress = _a.onLoadingProgress,
|
|
27529
27650
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
27651
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
27530
27652
|
onAuthError = _a.onAuthError,
|
|
27531
27653
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
27532
27654
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -27600,6 +27722,7 @@
|
|
|
27600
27722
|
onLoadingStarted: onLoadingStarted,
|
|
27601
27723
|
onLoadingProgress: onLoadingProgress,
|
|
27602
27724
|
onLoadingCompleted: onLoadingCompleted,
|
|
27725
|
+
onLoadingFailed: onLoadingFailed,
|
|
27603
27726
|
onComplete: onComplete,
|
|
27604
27727
|
onCustomerMatched: onCustomerMatched,
|
|
27605
27728
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -27619,11 +27742,7 @@
|
|
|
27619
27742
|
|
|
27620
27743
|
var ALLOWED_RETRIES$1 = 0;
|
|
27621
27744
|
var initialState = {
|
|
27622
|
-
frame: null,
|
|
27623
|
-
face: null,
|
|
27624
|
-
imageUrl: null,
|
|
27625
27745
|
requestState: 'CAPTURING',
|
|
27626
|
-
requestError: null,
|
|
27627
27746
|
notFoundTimes: 0
|
|
27628
27747
|
};
|
|
27629
27748
|
var reducer = function reducer(state, action) {
|
|
@@ -27710,7 +27829,7 @@
|
|
|
27710
27829
|
submissionError = _j.submissionError,
|
|
27711
27830
|
selfieImage = _j.selfieImage,
|
|
27712
27831
|
setSelfieImage = _j.setSelfieImage;
|
|
27713
|
-
var _k = React.useState(
|
|
27832
|
+
var _k = React.useState(),
|
|
27714
27833
|
imageUrl = _k[0],
|
|
27715
27834
|
setImageUrl = _k[1];
|
|
27716
27835
|
var rawCanvas = React.useRef(null);
|
|
@@ -27732,9 +27851,7 @@
|
|
|
27732
27851
|
if (!frame || !face || submissionError) return;
|
|
27733
27852
|
var imageUrl = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face);
|
|
27734
27853
|
setImageUrl(imageUrl);
|
|
27735
|
-
dataUrlToBase64(imageUrl).then(
|
|
27736
|
-
setSelfieImage(img);
|
|
27737
|
-
});
|
|
27854
|
+
dataUrlToBase64(imageUrl).then(setSelfieImage);
|
|
27738
27855
|
}, [face, frame, setSelfieImage, submissionError]);
|
|
27739
27856
|
React.useEffect(function () {
|
|
27740
27857
|
if (!isReady || !selfieImage || submissionError) return;
|
|
@@ -27916,6 +28033,7 @@
|
|
|
27916
28033
|
var onLoadingStarted = _a.onLoadingStarted,
|
|
27917
28034
|
onLoadingProgress = _a.onLoadingProgress,
|
|
27918
28035
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28036
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
27919
28037
|
onComplete = _a.onComplete,
|
|
27920
28038
|
onCustomerMatched = _a.onCustomerMatched,
|
|
27921
28039
|
onCustomerNotMatched = _a.onCustomerNotMatched,
|
|
@@ -28064,6 +28182,7 @@
|
|
|
28064
28182
|
onLoadingStarted: onLoadingStarted,
|
|
28065
28183
|
onLoadingProgress: onLoadingProgress,
|
|
28066
28184
|
onLoadingCompleted: onLoadingCompleted,
|
|
28185
|
+
onLoadingFailed: onLoadingFailed,
|
|
28067
28186
|
onUserCancel: onUserCancel,
|
|
28068
28187
|
onDismissed: function onDismissed() {
|
|
28069
28188
|
setCaptureState('CAPTURING');
|
|
@@ -28104,6 +28223,7 @@
|
|
|
28104
28223
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28105
28224
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28106
28225
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28226
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28107
28227
|
onAuthError = _a.onAuthError,
|
|
28108
28228
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28109
28229
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28182,6 +28302,7 @@
|
|
|
28182
28302
|
onLoadingStarted: onLoadingStarted,
|
|
28183
28303
|
onLoadingProgress: onLoadingProgress,
|
|
28184
28304
|
onLoadingCompleted: onLoadingCompleted,
|
|
28305
|
+
onLoadingFailed: onLoadingFailed,
|
|
28185
28306
|
onComplete: onComplete,
|
|
28186
28307
|
onCustomerMatched: onCustomerMatched,
|
|
28187
28308
|
onCustomerNotMatched: onCustomerNotMatched,
|
|
@@ -28216,6 +28337,7 @@
|
|
|
28216
28337
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28217
28338
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28218
28339
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28340
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28219
28341
|
onAuthError = _a.onAuthError,
|
|
28220
28342
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28221
28343
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28256,16 +28378,18 @@
|
|
|
28256
28378
|
faceLivenessProps = _a.faceLivenessProps,
|
|
28257
28379
|
_o = _a.skipLivenessValidation,
|
|
28258
28380
|
skipLivenessValidation = _o === void 0 ? false : _o,
|
|
28381
|
+
_p = _a.allowManualSelfieCaptureOnLoadingError,
|
|
28382
|
+
allowManualSelfieCaptureOnLoadingError = _p === void 0 ? false : _p,
|
|
28259
28383
|
guidesComponent = _a.guidesComponent,
|
|
28260
|
-
|
|
28261
|
-
theme =
|
|
28384
|
+
_q = _a.theme,
|
|
28385
|
+
theme = _q === void 0 ? 'default' : _q,
|
|
28262
28386
|
classNames = _a.classNames,
|
|
28263
28387
|
colors = _a.colors,
|
|
28264
28388
|
verbiage = _a.verbiage,
|
|
28265
28389
|
geolocationEnabled = _a.geolocationEnabled,
|
|
28266
28390
|
geolocationRequired = _a.geolocationRequired,
|
|
28267
|
-
|
|
28268
|
-
debugMode =
|
|
28391
|
+
_r = _a.debugMode,
|
|
28392
|
+
debugMode = _r === void 0 ? false : _r;
|
|
28269
28393
|
useLanguage(lang);
|
|
28270
28394
|
useDebugLogging(debugMode);
|
|
28271
28395
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
@@ -28308,6 +28432,7 @@
|
|
|
28308
28432
|
onLoadingStarted: onLoadingStarted,
|
|
28309
28433
|
onLoadingProgress: onLoadingProgress,
|
|
28310
28434
|
onLoadingCompleted: onLoadingCompleted,
|
|
28435
|
+
onLoadingFailed: onLoadingFailed,
|
|
28311
28436
|
onSelfieCaptured: onSelfieCaptured,
|
|
28312
28437
|
customOverlayContent: customOverlayContent,
|
|
28313
28438
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
@@ -28323,6 +28448,7 @@
|
|
|
28323
28448
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
28324
28449
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
28325
28450
|
skipLivenessValidation: skipLivenessValidation,
|
|
28451
|
+
allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
|
|
28326
28452
|
guidesComponent: guidesComponent,
|
|
28327
28453
|
classNames: classNames,
|
|
28328
28454
|
colors: colors,
|
|
@@ -28331,7 +28457,7 @@
|
|
|
28331
28457
|
onModelError: onModelError,
|
|
28332
28458
|
onUserCancel: onUserCancel
|
|
28333
28459
|
};
|
|
28334
|
-
}, [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])
|
|
28460
|
+
}, [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])
|
|
28335
28461
|
})))));
|
|
28336
28462
|
};
|
|
28337
28463
|
|
|
@@ -28372,6 +28498,7 @@
|
|
|
28372
28498
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28373
28499
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28374
28500
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28501
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28375
28502
|
onAuthError = _a.onAuthError,
|
|
28376
28503
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28377
28504
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28460,6 +28587,7 @@
|
|
|
28460
28587
|
onLoadingStarted: onLoadingStarted,
|
|
28461
28588
|
onLoadingProgress: onLoadingProgress,
|
|
28462
28589
|
onLoadingCompleted: onLoadingCompleted,
|
|
28590
|
+
onLoadingFailed: onLoadingFailed,
|
|
28463
28591
|
idCaptureProps: idCaptureProps,
|
|
28464
28592
|
faceLivenessProps: faceLivenessProps,
|
|
28465
28593
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
@@ -28492,7 +28620,7 @@
|
|
|
28492
28620
|
verbiage: verbiage,
|
|
28493
28621
|
debugMode: debugMode
|
|
28494
28622
|
};
|
|
28495
|
-
}, [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]);
|
|
28623
|
+
}, [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]);
|
|
28496
28624
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
28497
28625
|
return {
|
|
28498
28626
|
documents: captureAdditionalDocuments,
|
|
@@ -28619,6 +28747,7 @@
|
|
|
28619
28747
|
onLoadingStarted = _a.onLoadingStarted,
|
|
28620
28748
|
onLoadingProgress = _a.onLoadingProgress,
|
|
28621
28749
|
onLoadingCompleted = _a.onLoadingCompleted,
|
|
28750
|
+
onLoadingFailed = _a.onLoadingFailed,
|
|
28622
28751
|
onAuthError = _a.onAuthError,
|
|
28623
28752
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
28624
28753
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -28665,6 +28794,7 @@
|
|
|
28665
28794
|
onLoadingStarted: onLoadingStarted,
|
|
28666
28795
|
onLoadingProgress: onLoadingProgress,
|
|
28667
28796
|
onLoadingCompleted: onLoadingCompleted,
|
|
28797
|
+
onLoadingFailed: onLoadingFailed,
|
|
28668
28798
|
onExitCapture: onExitCapture,
|
|
28669
28799
|
onUserCancel: onUserCancel,
|
|
28670
28800
|
onExitAfterFailure: onExitAfterFailure,
|
|
@@ -28680,7 +28810,7 @@
|
|
|
28680
28810
|
verbiage: verbiage.faceLiveness,
|
|
28681
28811
|
debugMode: debugMode
|
|
28682
28812
|
};
|
|
28683
|
-
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
28813
|
+
}, [assets.faceLiveness, classNames.faceLiveness, colors.faceLiveness, debugMode, initialCaptureDelayMs, loadingOverlayMode, modelLoadTimeoutMs, onExitAfterFailure, onExitCapture, onLoadingCompleted, onLoadingFailed, onLoadingProgress, onLoadingStarted, onModelError, onUserCancel, skipSuccessScreen, timeoutDurationMs, verbiage.faceLiveness]);
|
|
28684
28814
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
28685
28815
|
return {
|
|
28686
28816
|
documents: captureAdditionalDocuments,
|