idmission-web-sdk 2.3.5 → 2.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/common/SelfieProgressPreview.d.ts +3 -3
- package/dist/components/common/SelfieProgressPreview.d.ts.map +1 -1
- package/dist/components/customer_flows/SignatureKYC.d.ts +3 -5
- package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
- package/dist/components/fallback_flows/SelfieCapture.d.ts +1 -1
- package/dist/components/fallback_flows/SelfieCapture.d.ts.map +1 -1
- package/dist/components/id_capture/IdCapture.d.ts +1 -1
- package/dist/components/id_capture/IdCapture.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +2 -2
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts.map +1 -1
- package/dist/components/id_capture/IdCaptureOrUploadScreen.d.ts.map +1 -1
- package/dist/components/read_text_prompt/ReadTextPrompt.d.ts +2 -2
- package/dist/components/read_text_prompt/ReadTextPrompt.d.ts.map +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts +1 -1
- package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts +6 -5
- package/dist/components/video_signature_capture/VideoSignatureCapture.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts +10 -7
- package/dist/components/video_signature_capture/VideoSignatureGuides.d.ts.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +5 -4
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/locales/index.d.ts +5 -4
- package/dist/lib/locales/index.d.ts.map +1 -1
- package/dist/lib/locales/render.d.ts +3 -0
- package/dist/lib/locales/render.d.ts.map +1 -0
- package/dist/sdk2.cjs.development.js +159 -139
- 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 +159 -139
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +159 -139
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -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.6';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -494,7 +494,7 @@
|
|
|
494
494
|
var _a, _b;
|
|
495
495
|
return (_b = (_a = props.colors) === null || _a === void 0 ? void 0 : _a.borderColor) !== null && _b !== void 0 ? _b : 'var(--idm-color-secondary-500)';
|
|
496
496
|
});
|
|
497
|
-
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$
|
|
497
|
+
var LoadingOverlayInner = styled(OverlayInner$2)(templateObject_9$4 || (templateObject_9$4 = __makeTemplateObject(["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"], ["\n position: relative;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 0;\n"])));
|
|
498
498
|
var LoadingOverlayHeader = styled.div(templateObject_10$2 || (templateObject_10$2 = __makeTemplateObject(["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"], ["\n text-align: ", ";\n display: flex;\n flex-direction: column;\n flex-wrap: nowrap;\n ", "\n padding-bottom: 0;\n"])), function (props) {
|
|
499
499
|
var _a;
|
|
500
500
|
return (_a = props.theme.textAlign) !== null && _a !== void 0 ? _a : 'center';
|
|
@@ -513,7 +513,7 @@
|
|
|
513
513
|
var LoadingOverlayLoadingList = styled.ul(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"], ["\n display: block;\n margin: auto;\n list-style: none;\n padding: 0;\n"])));
|
|
514
514
|
var LoadingOverlayLoadingListItem = styled.li(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"], ["\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 1.25rem 2px 0;\n line-height: 1rem;\n"])));
|
|
515
515
|
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"])));
|
|
516
|
-
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$7, templateObject_8$4, templateObject_9$
|
|
516
|
+
var templateObject_1$M, templateObject_2$D, templateObject_3$r, templateObject_4$l, templateObject_5$e, templateObject_6$a, templateObject_7$7, templateObject_8$4, templateObject_9$4, templateObject_10$2, templateObject_11$1, templateObject_12$1, templateObject_13$1, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20;
|
|
517
517
|
|
|
518
518
|
function _extends() {
|
|
519
519
|
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
@@ -13372,6 +13372,12 @@
|
|
|
13372
13372
|
"We're sorry, but it looks like the camera is being tampered with. Please check your device and try again by reloading the page.": '很抱歉,看起來相機被篡改了。請檢查您的設備並重新載入頁面。'
|
|
13373
13373
|
};
|
|
13374
13374
|
|
|
13375
|
+
function renderVerbiage(verbiage) {
|
|
13376
|
+
if (typeof verbiage === 'string') return /*#__PURE__*/React.createElement(React.Fragment, null, verbiage);
|
|
13377
|
+
var Verbiage = verbiage;
|
|
13378
|
+
return /*#__PURE__*/React.createElement(Verbiage, null);
|
|
13379
|
+
}
|
|
13380
|
+
|
|
13375
13381
|
var resources = {
|
|
13376
13382
|
en: {
|
|
13377
13383
|
translation: en
|
|
@@ -13426,11 +13432,12 @@
|
|
|
13426
13432
|
};
|
|
13427
13433
|
function evaluateVerbiage(t, currentLanguage, verbiage, fallback) {
|
|
13428
13434
|
if (typeof verbiage === 'string') return verbiage;
|
|
13435
|
+
if (typeof verbiage === 'function') return renderVerbiage(verbiage);
|
|
13429
13436
|
if (typeof verbiage === 'object') {
|
|
13430
13437
|
var translations = verbiage;
|
|
13431
|
-
if (translations[currentLanguage]) return translations[currentLanguage];
|
|
13438
|
+
if (translations[currentLanguage]) return renderVerbiage(translations[currentLanguage]);
|
|
13432
13439
|
var nonLocaleLang = currentLanguage.split('-')[0];
|
|
13433
|
-
if (translations[nonLocaleLang]) return translations[nonLocaleLang];
|
|
13440
|
+
if (translations[nonLocaleLang]) return renderVerbiage(translations[nonLocaleLang]);
|
|
13434
13441
|
}
|
|
13435
13442
|
return t(fallback);
|
|
13436
13443
|
}
|
|
@@ -16589,7 +16596,7 @@
|
|
|
16589
16596
|
});
|
|
16590
16597
|
var ProgressIndicator$1 = styled(LoadingOverlayProgressIndicator)(templateObject_7$6 || (templateObject_7$6 = __makeTemplateObject(["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"], ["\n animation: ", " 3s ease-in-out;\n animation-fill-mode: both;\n"])), progressBarAnimation);
|
|
16591
16598
|
var CustomLoadingGraphic$1 = styled.img(templateObject_8$3 || (templateObject_8$3 = __makeTemplateObject(["\n transform-style: preserve-3d;\n"], ["\n transform-style: preserve-3d;\n"])));
|
|
16592
|
-
var ContinueButtonContainer$1 = styled.div(templateObject_9$
|
|
16599
|
+
var ContinueButtonContainer$1 = styled.div(templateObject_9$3 || (templateObject_9$3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
16593
16600
|
var ContinueButton$1 = styled(LoaderButton)(templateObject_10$1 || (templateObject_10$1 = __makeTemplateObject(["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"], ["\n margin: auto;\n white-space: nowrap;\n ", "\n ", "\n \n &:focus-visible {\n ", "\n box-shadow: none;\n }\n\n &.disabled {\n background: ", ";\n color: ", ";\n border: ", ";\n }\n"])), function (props) {
|
|
16594
16601
|
var _a, _b, _c, _d, _e, _f;
|
|
16595
16602
|
return ((_c = (_b = (_a = props.theme) === null || _a === void 0 ? void 0 : _a.idCapture) === null || _b === void 0 ? void 0 : _b.loadingOverlay) === null || _c === void 0 ? void 0 : _c.progressBarFontSize) ? "font-size: ".concat((_f = (_e = (_d = props.theme) === null || _d === void 0 ? void 0 : _d.idCapture) === null || _e === void 0 ? void 0 : _e.loadingOverlay) === null || _f === void 0 ? void 0 : _f.progressBarFontSize, ";") : '';
|
|
@@ -16609,7 +16616,7 @@
|
|
|
16609
16616
|
var _a, _b, _c, _d;
|
|
16610
16617
|
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';
|
|
16611
16618
|
});
|
|
16612
|
-
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$
|
|
16619
|
+
var templateObject_1$E, templateObject_2$x, templateObject_3$m, templateObject_4$g, templateObject_5$c, templateObject_6$9, templateObject_7$6, templateObject_8$3, templateObject_9$3, templateObject_10$1;
|
|
16613
16620
|
|
|
16614
16621
|
var ContinuityCameraCheckboxContainer = styled.div(templateObject_1$D || (templateObject_1$D = __makeTemplateObject(["\n margin-top: 15px;\n margin-bottom: 15px;\n"], ["\n margin-top: 15px;\n margin-bottom: 15px;\n"])));
|
|
16615
16622
|
var ContinuityCameraCheckbox = styled.input(templateObject_2$w || (templateObject_2$w = __makeTemplateObject(["\n margin-right: 8px;\n"], ["\n margin-right: 8px;\n"])));
|
|
@@ -17475,7 +17482,7 @@
|
|
|
17475
17482
|
"$maskColor": maskColor,
|
|
17476
17483
|
"$minHeight": padding,
|
|
17477
17484
|
className: regionClsx(classNames, 'Top')
|
|
17478
|
-
}, instruction
|
|
17485
|
+
}, !!instruction && ( /*#__PURE__*/React.createElement(GuideText, {
|
|
17479
17486
|
className: classNames.guideText
|
|
17480
17487
|
}, instruction))), /*#__PURE__*/React.createElement(GuideCenterRow, {
|
|
17481
17488
|
className: classNames.centerRow
|
|
@@ -17526,7 +17533,7 @@
|
|
|
17526
17533
|
"$maskColor": maskColor,
|
|
17527
17534
|
"$minHeight": padding,
|
|
17528
17535
|
className: regionClsx(classNames, 'Bottom')
|
|
17529
|
-
}, instruction
|
|
17536
|
+
}, !!instruction && ( /*#__PURE__*/React.createElement(GuideText, {
|
|
17530
17537
|
style: {
|
|
17531
17538
|
opacity: 0
|
|
17532
17539
|
}
|
|
@@ -17564,8 +17571,8 @@
|
|
|
17564
17571
|
return props.$padding ? "padding: ".concat(props.$padding, "px;") : '';
|
|
17565
17572
|
});
|
|
17566
17573
|
var GuideText = styled.span(templateObject_8$2 || (templateObject_8$2 = __makeTemplateObject(["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"], ["\n align-content: center;\n margin-top: 12px;\n margin-bottom: 12px;\n"])));
|
|
17567
|
-
var GuideCenterInner = styled.div(templateObject_9$
|
|
17568
|
-
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$
|
|
17574
|
+
var GuideCenterInner = styled.div(templateObject_9$2 || (templateObject_9$2 = __makeTemplateObject(["\n position: relative;\n margin: auto;\n"], ["\n position: relative;\n margin: auto;\n"])));
|
|
17575
|
+
var templateObject_1$y, templateObject_2$s, templateObject_3$j, templateObject_4$d, templateObject_5$9, templateObject_6$7, templateObject_7$5, templateObject_8$2, templateObject_9$2;
|
|
17569
17576
|
|
|
17570
17577
|
var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
17571
17578
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
@@ -19079,7 +19086,7 @@
|
|
|
19079
19086
|
var DashedSeparator = styled.div(templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n width: 100%;\n height: 0;\n border-top: 2px solid #606060;\n border-top-style: dashed;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
19080
19087
|
var OrWrapper = styled.div(templateObject_7$3 || (templateObject_7$3 = __makeTemplateObject(["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n color: #323232;\n font-weight: bold;\n background: white;\n border-radius: 50%;\n top: -2px;\n position: relative;\n width: 60px;\n height: 60px;\n display: flex;\n align-items: center;\n justify-content: center;\n"])));
|
|
19081
19088
|
var UploadIdBackHelpText = styled.p(templateObject_8$1 || (templateObject_8$1 = __makeTemplateObject(["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"], ["\n color: #323232;\n font-style: italic;\n margin: 30px 0 0;\n"])));
|
|
19082
|
-
var Button = styled(WideBorderButton)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"], ["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"])));
|
|
19089
|
+
var Button = styled(WideBorderButton)(templateObject_9$1 || (templateObject_9$1 = __makeTemplateObject(["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"], ["\n width: auto;\n font-weight: 500;\n padding-left: 40px;\n padding-right: 40px;\n transition: background-color 0.3s ease;\n background-color: #ffffff;\n white-space: nowrap;\n\n &:disabled,\n &.disabled {\n background-color: #f1f1f1 !important;\n border-color: #dbdbdb !important;\n color: #323232 !important;\n }\n\n &:hover {\n filter: none;\n background-color: #fafafa !important;\n }\n"])));
|
|
19083
19090
|
var Modal = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 10000;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
|
|
19084
19091
|
var Dialog = styled.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"], ["\n width: 100%;\n max-width: 500px;\n height: 100%;\n max-height: 600px;\n background: white;\n border-radius: 25px;\n overflow: auto;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);\n font-family: ", ";\n //margin: 25px;\n"])), function (props) {
|
|
19085
19092
|
var _a;
|
|
@@ -19357,7 +19364,7 @@
|
|
|
19357
19364
|
} while (Math.round(Math.abs(bytes) * r) / r >= thresh && u < units.length - 1);
|
|
19358
19365
|
return bytes.toFixed(dp) + ' ' + units[u];
|
|
19359
19366
|
}
|
|
19360
|
-
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
19367
|
+
var templateObject_1$p, templateObject_2$l, templateObject_3$f, templateObject_4$9, templateObject_5$6, templateObject_6$4, templateObject_7$3, templateObject_8$1, templateObject_9$1, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
|
|
19361
19368
|
|
|
19362
19369
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
19363
19370
|
var _b, _c, _d, _e, _f;
|
|
@@ -20830,7 +20837,7 @@
|
|
|
20830
20837
|
}), /*#__PURE__*/React.createElement(GuidesComponent, {
|
|
20831
20838
|
classNames: classNames.guides,
|
|
20832
20839
|
status: satisfied ? 'processing' : 'ready'
|
|
20833
|
-
}), guidanceMessage
|
|
20840
|
+
}), !!guidanceMessage && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
20834
20841
|
className: classNames.guidanceMessageContainer
|
|
20835
20842
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
20836
20843
|
"$variant": satisfied ? 'positive' : 'negative',
|
|
@@ -21171,7 +21178,7 @@
|
|
|
21171
21178
|
guidesComponent: guidesByRequestState,
|
|
21172
21179
|
classNames: classNames,
|
|
21173
21180
|
colors: colors,
|
|
21174
|
-
verbiage:
|
|
21181
|
+
verbiage: rawVerbiage,
|
|
21175
21182
|
debugMode: debugMode
|
|
21176
21183
|
}), debugMode && !disableCapturePreview && imageUrl && ( /*#__PURE__*/React.createElement(SelfieProgressPreview, {
|
|
21177
21184
|
classNames: classNames.imagePreview,
|
|
@@ -23436,8 +23443,6 @@
|
|
|
23436
23443
|
onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
|
|
23437
23444
|
_d = _a.minSignaturePadPoints,
|
|
23438
23445
|
minSignaturePadPoints = _d === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _d,
|
|
23439
|
-
signaturePadEmptyContent = _a.signaturePadEmptyContent,
|
|
23440
|
-
headTrackingUnsatisfiedContent = _a.headTrackingUnsatisfiedContent,
|
|
23441
23446
|
_e = _a.headTrackingSatisfied,
|
|
23442
23447
|
headTrackingSatisfied = _e === void 0 ? true : _e,
|
|
23443
23448
|
_f = _a.classNames,
|
|
@@ -23458,6 +23463,8 @@
|
|
|
23458
23463
|
signatureValid = _l[0],
|
|
23459
23464
|
setSignatureValid = _l[1];
|
|
23460
23465
|
var verbiage = useTranslations(rawVerbiage, {
|
|
23466
|
+
signaturePadEmptyText: '',
|
|
23467
|
+
headTrackingUnsatisfiedText: '',
|
|
23461
23468
|
clearSignatureBtnText: 'Clear',
|
|
23462
23469
|
acceptSignatureBtnText: 'Accept'
|
|
23463
23470
|
});
|
|
@@ -23471,9 +23478,13 @@
|
|
|
23471
23478
|
var isSigning = requestedAction === 'CAPTURE_SIGNATURE';
|
|
23472
23479
|
var canClear = isSigning && !signaturePadEmpty;
|
|
23473
23480
|
var canSubmit = isSigning && signatureValid && headTrackingSatisfied;
|
|
23474
|
-
var
|
|
23475
|
-
|
|
23476
|
-
|
|
23481
|
+
var _m = React.useState(false),
|
|
23482
|
+
emptyContentDismissed = _m[0],
|
|
23483
|
+
setEmptyContentDismissed = _m[1];
|
|
23484
|
+
var displayEmptyState = requestedAction === 'CAPTURE_SIGNATURE' && signaturePadEmpty && !emptyContentDismissed;
|
|
23485
|
+
React.useEffect(function () {
|
|
23486
|
+
if (signaturePadEmpty) setEmptyContentDismissed(false);
|
|
23487
|
+
}, [signaturePadEmpty]);
|
|
23477
23488
|
return /*#__PURE__*/React.createElement(Container$3, {
|
|
23478
23489
|
className: classNames.container
|
|
23479
23490
|
}, /*#__PURE__*/React.createElement(Inner$1, {
|
|
@@ -23509,11 +23520,18 @@
|
|
|
23509
23520
|
});
|
|
23510
23521
|
setSignatureValid(points.length >= minSignaturePadPoints);
|
|
23511
23522
|
}
|
|
23512
|
-
}), !headTrackingSatisfied &&
|
|
23513
|
-
className: classNames.
|
|
23514
|
-
},
|
|
23515
|
-
className: classNames.
|
|
23516
|
-
},
|
|
23523
|
+
}), !headTrackingSatisfied && !!verbiage.headTrackingUnsatisfiedText ? ( /*#__PURE__*/React.createElement(SignaturePadContentContainer, {
|
|
23524
|
+
className: classNames.headTrackingUnsatisfiedContentContainer
|
|
23525
|
+
}, /*#__PURE__*/React.createElement(SignaturePadContentInner, {
|
|
23526
|
+
className: classNames.headTrackingUnsatisfiedContentInner
|
|
23527
|
+
}, verbiage.headTrackingUnsatisfiedText))) : displayEmptyState && !!verbiage.signaturePadEmptyText && ( /*#__PURE__*/React.createElement(SignaturePadContentContainer, {
|
|
23528
|
+
className: classNames.emptyContentContainer,
|
|
23529
|
+
onClick: function onClick() {
|
|
23530
|
+
return setEmptyContentDismissed(true);
|
|
23531
|
+
}
|
|
23532
|
+
}, /*#__PURE__*/React.createElement(SignaturePadContentInner, {
|
|
23533
|
+
className: classNames.emptyContentInner
|
|
23534
|
+
}, verbiage.signaturePadEmptyText)))), /*#__PURE__*/React.createElement(SignatureButtonsContainer, {
|
|
23517
23535
|
className: classNames.signatureButtonsRow
|
|
23518
23536
|
}, /*#__PURE__*/React.createElement(LoaderButton, {
|
|
23519
23537
|
variant: "secondary",
|
|
@@ -23549,13 +23567,15 @@
|
|
|
23549
23567
|
return props.$headTrackingUnsatisfied ? 'pointer-events: none;' : '';
|
|
23550
23568
|
});
|
|
23551
23569
|
var AcceptBtn = styled(LoaderButton)(templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
|
|
23552
|
-
var SignaturePadContentContainer = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n
|
|
23570
|
+
var SignaturePadContentContainer = styled.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));
|
|
23571
|
+
var SignaturePadContentInner = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n pointer-events: none;\n color: ", ";\n"])), function (props) {
|
|
23553
23572
|
var _a, _b, _c;
|
|
23554
23573
|
return (_c = (_b = (_a = props.theme.signatureCapture) === null || _a === void 0 ? void 0 : _a.canvas) === null || _b === void 0 ? void 0 : _b.emptyTextColor) !== null && _c !== void 0 ? _c : 'black';
|
|
23555
23574
|
});
|
|
23556
|
-
var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$3, templateObject_5$3, templateObject_6$2, templateObject_7$1, templateObject_8;
|
|
23575
|
+
var templateObject_1$b, templateObject_2$9, templateObject_3$8, templateObject_4$3, templateObject_5$3, templateObject_6$2, templateObject_7$1, templateObject_8, templateObject_9;
|
|
23557
23576
|
|
|
23558
23577
|
var DEFAULT_MIN_SIGNATURE_PAD_POINTS = 10;
|
|
23578
|
+
var DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE = 0.01;
|
|
23559
23579
|
var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
23560
23580
|
var onVideoCaptured = _a.onVideoCaptured,
|
|
23561
23581
|
onFaceNotDetected = _a.onFaceNotDetected,
|
|
@@ -23565,38 +23585,38 @@
|
|
|
23565
23585
|
guidesComponent = _a.guidesComponent,
|
|
23566
23586
|
_c = _a.minSignaturePadPoints,
|
|
23567
23587
|
minSignaturePadPoints = _c === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _c,
|
|
23568
|
-
|
|
23569
|
-
|
|
23570
|
-
|
|
23571
|
-
classNames =
|
|
23572
|
-
|
|
23573
|
-
colors =
|
|
23574
|
-
|
|
23575
|
-
rawVerbiage =
|
|
23576
|
-
|
|
23577
|
-
debugMode =
|
|
23578
|
-
var
|
|
23588
|
+
_d = _a.headTrackingBoundaryPercentage,
|
|
23589
|
+
headTrackingBoundaryPercentage = _d === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _d,
|
|
23590
|
+
_e = _a.classNames,
|
|
23591
|
+
classNames = _e === void 0 ? {} : _e,
|
|
23592
|
+
_f = _a.colors,
|
|
23593
|
+
colors = _f === void 0 ? {} : _f,
|
|
23594
|
+
_g = _a.verbiage,
|
|
23595
|
+
rawVerbiage = _g === void 0 ? {} : _g,
|
|
23596
|
+
_h = _a.debugMode,
|
|
23597
|
+
debugMode = _h === void 0 ? false : _h;
|
|
23598
|
+
var _j = useCameraStore(useShallow(function (state) {
|
|
23579
23599
|
return {
|
|
23580
23600
|
camera: state.camera,
|
|
23581
23601
|
videoWidth: state.videoWidth,
|
|
23582
23602
|
videoHeight: state.videoHeight
|
|
23583
23603
|
};
|
|
23584
23604
|
})),
|
|
23585
|
-
camera =
|
|
23586
|
-
videoWidth =
|
|
23587
|
-
videoHeight =
|
|
23588
|
-
var
|
|
23589
|
-
onPredictionMade =
|
|
23590
|
-
start =
|
|
23591
|
-
stop =
|
|
23592
|
-
var
|
|
23593
|
-
signatureData =
|
|
23594
|
-
signatureDataUrl =
|
|
23595
|
-
signatureVideoData =
|
|
23596
|
-
startRecording =
|
|
23597
|
-
stopRecording =
|
|
23598
|
-
clearRecordedData =
|
|
23599
|
-
isRecording =
|
|
23605
|
+
camera = _j.camera,
|
|
23606
|
+
videoWidth = _j.videoWidth,
|
|
23607
|
+
videoHeight = _j.videoHeight;
|
|
23608
|
+
var _k = useSelfieGuidanceModelsContext(),
|
|
23609
|
+
onPredictionMade = _k.onPredictionMade,
|
|
23610
|
+
start = _k.start,
|
|
23611
|
+
stop = _k.stop;
|
|
23612
|
+
var _l = useVideoSignatureContext(),
|
|
23613
|
+
signatureData = _l.signatureData,
|
|
23614
|
+
signatureDataUrl = _l.signatureDataUrl,
|
|
23615
|
+
signatureVideoData = _l.signatureVideoData,
|
|
23616
|
+
startRecording = _l.startRecording,
|
|
23617
|
+
stopRecording = _l.stopRecording,
|
|
23618
|
+
clearRecordedData = _l.clearRecordedData,
|
|
23619
|
+
isRecording = _l.isRecording;
|
|
23600
23620
|
React.useEffect(function () {
|
|
23601
23621
|
startRecording();
|
|
23602
23622
|
return stopRecording;
|
|
@@ -23615,31 +23635,31 @@
|
|
|
23615
23635
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
|
|
23616
23636
|
}
|
|
23617
23637
|
}, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
|
|
23618
|
-
var
|
|
23619
|
-
headTrackingSatisfied =
|
|
23620
|
-
setHeadTrackingSatisfied =
|
|
23621
|
-
var
|
|
23622
|
-
lastFace =
|
|
23623
|
-
setLastFace =
|
|
23624
|
-
var
|
|
23625
|
-
numFramesWithoutFaces =
|
|
23626
|
-
setNumFramesWithoutFaces =
|
|
23627
|
-
onPredictionMade(f(function (_a) {
|
|
23638
|
+
var _m = React.useState(true),
|
|
23639
|
+
headTrackingSatisfied = _m[0],
|
|
23640
|
+
setHeadTrackingSatisfied = _m[1];
|
|
23641
|
+
var _o = React.useState(null),
|
|
23642
|
+
lastFace = _o[0],
|
|
23643
|
+
setLastFace = _o[1];
|
|
23644
|
+
var _p = React.useState(0),
|
|
23645
|
+
numFramesWithoutFaces = _p[0],
|
|
23646
|
+
setNumFramesWithoutFaces = _p[1];
|
|
23647
|
+
onPredictionMade(f(React.useCallback(function (_a) {
|
|
23628
23648
|
var face = _a.face;
|
|
23629
23649
|
if (!camera) return;
|
|
23630
|
-
var nearBoundary = (face === null || face === void 0 ? void 0 : face.box.xMin) < videoWidth *
|
|
23650
|
+
var nearBoundary = (face === null || face === void 0 ? void 0 : face.box.xMin) < videoWidth * headTrackingBoundaryPercentage || (face === null || face === void 0 ? void 0 : face.box.xMax) > videoWidth * (1 - headTrackingBoundaryPercentage) || (face === null || face === void 0 ? void 0 : face.box.yMin) < videoHeight * headTrackingBoundaryPercentage || (face === null || face === void 0 ? void 0 : face.box.yMax) > videoHeight * (1 - headTrackingBoundaryPercentage);
|
|
23631
23651
|
setLastFace(face);
|
|
23632
23652
|
setHeadTrackingSatisfied(!!face && !nearBoundary);
|
|
23633
23653
|
setNumFramesWithoutFaces(face ? 0 : function (n) {
|
|
23634
23654
|
return n + 1;
|
|
23635
23655
|
});
|
|
23636
|
-
}, 16));
|
|
23637
|
-
var
|
|
23638
|
-
ref =
|
|
23639
|
-
|
|
23640
|
-
width =
|
|
23641
|
-
|
|
23642
|
-
height =
|
|
23656
|
+
}, [camera, headTrackingBoundaryPercentage, videoHeight, videoWidth]), 16));
|
|
23657
|
+
var _q = useResizeObserver(),
|
|
23658
|
+
ref = _q.ref,
|
|
23659
|
+
_r = _q.width,
|
|
23660
|
+
width = _r === void 0 ? 1 : _r,
|
|
23661
|
+
_s = _q.height,
|
|
23662
|
+
height = _s === void 0 ? 1 : _s;
|
|
23643
23663
|
var debugScalingDetails = useDebugScalingDetails({
|
|
23644
23664
|
enabled: debugMode,
|
|
23645
23665
|
pageWidth: width,
|
|
@@ -23654,7 +23674,7 @@
|
|
|
23654
23674
|
return /*#__PURE__*/React.createElement(Container$2, {
|
|
23655
23675
|
ref: ref,
|
|
23656
23676
|
className: classNames.container
|
|
23657
|
-
}, verbiage.guidanceMessageText && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
23677
|
+
}, !!verbiage.guidanceMessageText && ( /*#__PURE__*/React.createElement(GuidanceMessageContainer, {
|
|
23658
23678
|
"$top": "10%",
|
|
23659
23679
|
className: classNames.guidanceMessageContainer
|
|
23660
23680
|
}, /*#__PURE__*/React.createElement(GuidanceMessage, {
|
|
@@ -23664,11 +23684,10 @@
|
|
|
23664
23684
|
}, verbiage.guidanceMessageText))), /*#__PURE__*/React.createElement(GuidesComponent, {
|
|
23665
23685
|
status: "success",
|
|
23666
23686
|
key: "video-signature-guides-".concat(headTrackingSatisfied ? 'satisfied' : 'unsatisfied'),
|
|
23667
|
-
classNames: classNames.videoSignatureGuidesClassNames,
|
|
23668
23687
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
23669
|
-
signaturePadEmptyContent: signaturePadEmptyContent,
|
|
23670
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
23671
23688
|
headTrackingSatisfied: headTrackingSatisfied,
|
|
23689
|
+
classNames: classNames.guides,
|
|
23690
|
+
verbiage: rawVerbiage.guides,
|
|
23672
23691
|
onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? function () {
|
|
23673
23692
|
return setTimeout(clearRecordedData, 100);
|
|
23674
23693
|
} : undefined
|
|
@@ -23756,43 +23775,43 @@
|
|
|
23756
23775
|
captureAudio = _d === void 0 ? false : _d,
|
|
23757
23776
|
_e = _a.minSignaturePadPoints,
|
|
23758
23777
|
minSignaturePadPoints = _e === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _e,
|
|
23759
|
-
|
|
23760
|
-
|
|
23761
|
-
|
|
23762
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
23763
|
-
|
|
23764
|
-
restartVideoOnSignaturePadCleared =
|
|
23778
|
+
_f = _a.headTrackingBoundaryPercentage,
|
|
23779
|
+
headTrackingBoundaryPercentage = _f === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _f,
|
|
23780
|
+
_g = _a.allowSignatureAfterLivenessCheckFailure,
|
|
23781
|
+
allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
|
|
23782
|
+
_h = _a.restartVideoOnSignaturePadCleared,
|
|
23783
|
+
restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
|
|
23765
23784
|
faceLivenessProps = _a.faceLivenessProps,
|
|
23766
|
-
|
|
23767
|
-
assets =
|
|
23768
|
-
|
|
23769
|
-
classNames =
|
|
23770
|
-
|
|
23771
|
-
colors =
|
|
23772
|
-
|
|
23773
|
-
verbiage =
|
|
23774
|
-
|
|
23775
|
-
debugMode =
|
|
23776
|
-
var
|
|
23777
|
-
selfieImage =
|
|
23778
|
-
setSelfieImage =
|
|
23779
|
-
setSignatureData =
|
|
23780
|
-
setSignatureVideoUrl =
|
|
23781
|
-
logSelfieCaptureAttempt =
|
|
23785
|
+
_j = _a.assets,
|
|
23786
|
+
assets = _j === void 0 ? {} : _j,
|
|
23787
|
+
_k = _a.classNames,
|
|
23788
|
+
classNames = _k === void 0 ? {} : _k,
|
|
23789
|
+
_l = _a.colors,
|
|
23790
|
+
colors = _l === void 0 ? {} : _l,
|
|
23791
|
+
_m = _a.verbiage,
|
|
23792
|
+
verbiage = _m === void 0 ? {} : _m,
|
|
23793
|
+
_o = _a.debugMode,
|
|
23794
|
+
debugMode = _o === void 0 ? false : _o;
|
|
23795
|
+
var _p = React.useContext(SubmissionContext),
|
|
23796
|
+
selfieImage = _p.selfieImage,
|
|
23797
|
+
setSelfieImage = _p.setSelfieImage,
|
|
23798
|
+
setSignatureData = _p.setSignatureData,
|
|
23799
|
+
setSignatureVideoUrl = _p.setSignatureVideoUrl,
|
|
23800
|
+
logSelfieCaptureAttempt = _p.logSelfieCaptureAttempt;
|
|
23782
23801
|
var cameraAccessDenied = useCameraStore(useShallow(function (state) {
|
|
23783
23802
|
return {
|
|
23784
23803
|
cameraAccessDenied: state.cameraAccessDenied
|
|
23785
23804
|
};
|
|
23786
23805
|
})).cameraAccessDenied;
|
|
23787
|
-
var
|
|
23788
|
-
captureState =
|
|
23789
|
-
setCaptureState =
|
|
23806
|
+
var _q = React.useState('CHECKING_LIVENESS'),
|
|
23807
|
+
captureState = _q[0],
|
|
23808
|
+
setCaptureState = _q[1];
|
|
23790
23809
|
var operationStartedAt = React.useRef();
|
|
23791
23810
|
var captureStartedAt = React.useRef();
|
|
23792
23811
|
var captureEndedAt = React.useRef();
|
|
23793
|
-
var
|
|
23794
|
-
start =
|
|
23795
|
-
stop =
|
|
23812
|
+
var _r = useSelfieGuidanceModelsContext(),
|
|
23813
|
+
start = _r.start,
|
|
23814
|
+
stop = _r.stop;
|
|
23796
23815
|
React.useEffect(function () {
|
|
23797
23816
|
operationStartedAt.current = new Date();
|
|
23798
23817
|
}, []);
|
|
@@ -23828,9 +23847,9 @@
|
|
|
23828
23847
|
setSelfieImage(selfieFromRequest);
|
|
23829
23848
|
}
|
|
23830
23849
|
}, [logCaptureMetadata, onFaceLivenessSuccessProp, selfieImage, setSelfieImage]);
|
|
23831
|
-
var
|
|
23832
|
-
signatureImageUrl =
|
|
23833
|
-
setSignatureImageUrl =
|
|
23850
|
+
var _s = React.useState(null),
|
|
23851
|
+
signatureImageUrl = _s[0],
|
|
23852
|
+
setSignatureImageUrl = _s[1];
|
|
23834
23853
|
var onSignatureCaptureCompleted = React.useCallback(function (videoData, signatureData, signatureImageData) {
|
|
23835
23854
|
setSignatureData(signatureData);
|
|
23836
23855
|
setSignatureVideoUrl(URL.createObjectURL(videoData));
|
|
@@ -23838,16 +23857,16 @@
|
|
|
23838
23857
|
setCaptureState('SUCCESS');
|
|
23839
23858
|
onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(videoData, signatureData, signatureImageData);
|
|
23840
23859
|
}, [onVideoCaptured, setSignatureData, setSignatureVideoUrl]);
|
|
23841
|
-
var
|
|
23842
|
-
showLoadingOverlay =
|
|
23843
|
-
setShowLoadingOverlay =
|
|
23860
|
+
var _t = React.useState(true),
|
|
23861
|
+
showLoadingOverlay = _t[0],
|
|
23862
|
+
setShowLoadingOverlay = _t[1];
|
|
23844
23863
|
var onSignatureCaptureFacesNotDetected = React.useCallback(function () {
|
|
23845
23864
|
setShowLoadingOverlay(false);
|
|
23846
23865
|
setCaptureState('CHECKING_LIVENESS');
|
|
23847
23866
|
}, []);
|
|
23848
|
-
var
|
|
23849
|
-
attempt =
|
|
23850
|
-
setAttempt =
|
|
23867
|
+
var _u = React.useState(0),
|
|
23868
|
+
attempt = _u[0],
|
|
23869
|
+
setAttempt = _u[1];
|
|
23851
23870
|
var onRetry = React.useCallback(function () {
|
|
23852
23871
|
onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
|
|
23853
23872
|
setAttempt(function (n) {
|
|
@@ -23866,11 +23885,11 @@
|
|
|
23866
23885
|
}, [cameraAccessDenied]);
|
|
23867
23886
|
var guidesComponent = React.useCallback(function (props) {
|
|
23868
23887
|
return /*#__PURE__*/React.createElement(VideoSignatureWizardGuides, _assign({}, props, {
|
|
23869
|
-
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.
|
|
23870
|
-
|
|
23871
|
-
|
|
23888
|
+
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.guides,
|
|
23889
|
+
verbiage: verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides,
|
|
23890
|
+
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
|
|
23872
23891
|
}));
|
|
23873
|
-
}, [classNames === null || classNames === void 0 ? void 0 : classNames.
|
|
23892
|
+
}, [classNames === null || classNames === void 0 ? void 0 : classNames.guides, restartVideoOnSignaturePadCleared, verbiage === null || verbiage === void 0 ? void 0 : verbiage.guides]);
|
|
23874
23893
|
var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
|
|
23875
23894
|
var onExitAfterFailure = React.useCallback(function (resp, req) {
|
|
23876
23895
|
onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
|
|
@@ -23915,8 +23934,7 @@
|
|
|
23915
23934
|
onFaceNotDetected: onSignatureCaptureFacesNotDetected,
|
|
23916
23935
|
onExit: onExitCapture,
|
|
23917
23936
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
23918
|
-
|
|
23919
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
23937
|
+
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
23920
23938
|
restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
|
|
23921
23939
|
guidesComponent: guidesComponent,
|
|
23922
23940
|
classNames: classNames,
|
|
@@ -24115,8 +24133,7 @@
|
|
|
24115
24133
|
var templateObject_1$8, templateObject_2$8, templateObject_3$7, templateObject_4$2, templateObject_5$2, templateObject_6$1, templateObject_7;
|
|
24116
24134
|
|
|
24117
24135
|
var ReadTextPrompt = function ReadTextPrompt(_a) {
|
|
24118
|
-
var
|
|
24119
|
-
onComplete = _a.onComplete,
|
|
24136
|
+
var onComplete = _a.onComplete,
|
|
24120
24137
|
_b = _a.durationMs,
|
|
24121
24138
|
durationMs = _b === void 0 ? 15000 : _b,
|
|
24122
24139
|
_c = _a.minReadingMs,
|
|
@@ -24125,13 +24142,13 @@
|
|
|
24125
24142
|
classNames = _d === void 0 ? {} : _d,
|
|
24126
24143
|
_e = _a.verbiage,
|
|
24127
24144
|
rawVerbiage = _e === void 0 ? {} : _e;
|
|
24128
|
-
text = useVerbiage(text, '');
|
|
24129
24145
|
var countdownTimeoutRef = React.useRef(undefined);
|
|
24130
24146
|
var _f = React.useState(durationMs / 1000),
|
|
24131
24147
|
countdownRemaining = _f[0],
|
|
24132
24148
|
setCountdownRemaining = _f[1];
|
|
24133
24149
|
var verbiage = useTranslations(rawVerbiage, {
|
|
24134
24150
|
headingText: 'Please read the following text aloud',
|
|
24151
|
+
promptText: '',
|
|
24135
24152
|
doneBtnText: 'Done'
|
|
24136
24153
|
});
|
|
24137
24154
|
var manualCountdown = React.useCallback(function (remainingTime) {
|
|
@@ -24169,7 +24186,7 @@
|
|
|
24169
24186
|
className: classNames.heading
|
|
24170
24187
|
}, verbiage.headingText), /*#__PURE__*/React.createElement(ReadTextPromptText, {
|
|
24171
24188
|
className: classNames.prompt
|
|
24172
|
-
},
|
|
24189
|
+
}, verbiage.promptText), /*#__PURE__*/React.createElement(ReadTextPromptButtonsRow, {
|
|
24173
24190
|
className: classNames.buttonsRow
|
|
24174
24191
|
}, /*#__PURE__*/React.createElement(ReadTextPromptTimeRemaining, {
|
|
24175
24192
|
className: classNames.timeRemaining
|
|
@@ -24610,18 +24627,22 @@
|
|
|
24610
24627
|
});
|
|
24611
24628
|
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
|
|
24612
24629
|
var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
|
|
24630
|
+
var readTextPromptVerbiage = React.useMemo(function () {
|
|
24631
|
+
return _assign({
|
|
24632
|
+
promptText: readTextPrompt
|
|
24633
|
+
}, rawVerbiage.readTextPrompt);
|
|
24634
|
+
}, [rawVerbiage.readTextPrompt, readTextPrompt]);
|
|
24613
24635
|
return /*#__PURE__*/React.createElement(Container, {
|
|
24614
24636
|
ref: ref,
|
|
24615
24637
|
className: classNames.container
|
|
24616
24638
|
}, /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
24617
24639
|
ref: photoCanvas
|
|
24618
24640
|
}), requestedAction === 'READ_TEXT' ? ( /*#__PURE__*/React.createElement(ReadTextPrompt, {
|
|
24619
|
-
text: readTextPrompt,
|
|
24620
24641
|
startedAt: timeoutStartedAt || undefined,
|
|
24621
24642
|
durationMs: readTextTimeoutDurationMs,
|
|
24622
24643
|
minReadingMs: readTextMinReadingMs,
|
|
24623
24644
|
classNames: classNames.readTextPrompt,
|
|
24624
|
-
verbiage:
|
|
24645
|
+
verbiage: readTextPromptVerbiage,
|
|
24625
24646
|
onComplete: stopRecording
|
|
24626
24647
|
})) : ( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IdVideoCaptureGuides, {
|
|
24627
24648
|
classNames: classNames.guides,
|
|
@@ -27639,24 +27660,24 @@
|
|
|
27639
27660
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
27640
27661
|
_f = _a.minSignaturePadPoints,
|
|
27641
27662
|
minSignaturePadPoints = _f === void 0 ? DEFAULT_MIN_SIGNATURE_PAD_POINTS : _f,
|
|
27642
|
-
|
|
27643
|
-
|
|
27644
|
-
|
|
27645
|
-
modelLoadTimeoutMs =
|
|
27646
|
-
|
|
27647
|
-
allowSignatureAfterLivenessCheckFailure =
|
|
27648
|
-
|
|
27649
|
-
restartVideoOnSignaturePadCleared =
|
|
27663
|
+
_g = _a.headTrackingBoundaryPercentage,
|
|
27664
|
+
headTrackingBoundaryPercentage = _g === void 0 ? DEFAULT_HEAD_TRACKING_BOUNDARY_PERCENTAGE : _g,
|
|
27665
|
+
_h = _a.modelLoadTimeoutMs,
|
|
27666
|
+
modelLoadTimeoutMs = _h === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _h,
|
|
27667
|
+
_j = _a.allowSignatureAfterLivenessCheckFailure,
|
|
27668
|
+
allowSignatureAfterLivenessCheckFailure = _j === void 0 ? false : _j,
|
|
27669
|
+
_k = _a.restartVideoOnSignaturePadCleared,
|
|
27670
|
+
restartVideoOnSignaturePadCleared = _k === void 0 ? true : _k,
|
|
27650
27671
|
faceLivenessProps = _a.faceLivenessProps,
|
|
27651
|
-
|
|
27652
|
-
theme =
|
|
27672
|
+
_l = _a.theme,
|
|
27673
|
+
theme = _l === void 0 ? 'default' : _l,
|
|
27653
27674
|
classNames = _a.classNames,
|
|
27654
27675
|
colors = _a.colors,
|
|
27655
27676
|
verbiage = _a.verbiage,
|
|
27656
27677
|
geolocationEnabled = _a.geolocationEnabled,
|
|
27657
27678
|
geolocationRequired = _a.geolocationRequired,
|
|
27658
|
-
|
|
27659
|
-
debugMode =
|
|
27679
|
+
_m = _a.debugMode,
|
|
27680
|
+
debugMode = _m === void 0 ? false : _m;
|
|
27660
27681
|
useLanguage(lang);
|
|
27661
27682
|
useDebugLogging(debugMode);
|
|
27662
27683
|
return /*#__PURE__*/React.createElement(AuthProvider, {
|
|
@@ -27701,8 +27722,7 @@
|
|
|
27701
27722
|
skipSuccessScreen: skipSuccessScreen,
|
|
27702
27723
|
captureAudio: captureAudio,
|
|
27703
27724
|
minSignaturePadPoints: minSignaturePadPoints,
|
|
27704
|
-
|
|
27705
|
-
headTrackingUnsatisfiedContent: headTrackingUnsatisfiedContent,
|
|
27725
|
+
headTrackingBoundaryPercentage: headTrackingBoundaryPercentage,
|
|
27706
27726
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
27707
27727
|
faceLivenessProps: faceLivenessProps,
|
|
27708
27728
|
allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
|
|
@@ -27714,7 +27734,7 @@
|
|
|
27714
27734
|
onModelError: onModelError,
|
|
27715
27735
|
onUserCancel: onUserCancel
|
|
27716
27736
|
};
|
|
27717
|
-
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints,
|
|
27737
|
+
}, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingBoundaryPercentage, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
|
|
27718
27738
|
})))));
|
|
27719
27739
|
};
|
|
27720
27740
|
|