idmission-web-sdk 2.1.49 → 2.1.50
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/CompositeWizard.d.ts +2 -11
- package/dist/{contexts/GuideOrientationContext.d.ts → components/GuideOrientationContextProvider.d.ts} +6 -2
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +3 -0
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +3 -0
- package/dist/components/customer_flows/IdValidation.d.ts +3 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts +3 -0
- package/dist/components/guide_images/backToFront.d.ts +2 -0
- package/dist/components/guide_images/byUrl.d.ts +4 -0
- package/dist/components/guide_images/defaults.d.ts +36 -0
- package/dist/components/guide_images/index.d.ts +6 -0
- package/dist/components/guide_images/merge.d.ts +2 -0
- package/dist/components/guide_images/orientation.d.ts +1 -0
- package/dist/components/guide_images/types.d.ts +14 -0
- package/dist/components/guide_images/useGuideImages.d.ts +2 -0
- package/dist/components/id_capture/FlipIdPrompt.d.ts +3 -8
- package/dist/components/id_capture/IdCapture.d.ts +1 -6
- package/dist/components/id_capture/IdCaptureFitGuide.d.ts +4 -4
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +4 -14
- package/dist/components/id_capture/IdCaptureGuides.d.ts +4 -6
- package/dist/components/id_capture/IdCaptureWizard.d.ts +5 -7
- package/dist/components/video_id/IdVideoCapture.d.ts +4 -6
- package/dist/components/video_id/IdVideoCaptureFlipIdPrompt.d.ts +3 -6
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +3 -6
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +4 -3
- package/dist/sdk2.cjs.development.js +585 -533
- 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 +585 -533
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +585 -533
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/GuideOrientationProvider.d.ts +0 -4
package/dist/sdk2.esm.js
CHANGED
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.1.
|
|
207
|
+
var webSdkVersion = '2.1.50';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -6881,8 +6881,6 @@ var GuidanceMessage = styled.div(templateObject_2$u || (templateObject_2$u = __m
|
|
|
6881
6881
|
});
|
|
6882
6882
|
var templateObject_1$C, templateObject_2$u;
|
|
6883
6883
|
|
|
6884
|
-
var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
|
|
6885
|
-
|
|
6886
6884
|
function OverrideWrongDocumentTypeGuidanceDialog(_a) {
|
|
6887
6885
|
var _b = _a.classNames,
|
|
6888
6886
|
classNames = _b === void 0 ? {} : _b,
|
|
@@ -6935,32 +6933,30 @@ var IdCapture = function IdCapture(_a) {
|
|
|
6935
6933
|
guidanceMessage = _a.guidanceMessage,
|
|
6936
6934
|
guidanceSatisfied = _a.guidanceSatisfied,
|
|
6937
6935
|
onCapture = _a.onCapture,
|
|
6938
|
-
_l = _a.
|
|
6939
|
-
|
|
6940
|
-
_m = _a.
|
|
6941
|
-
|
|
6942
|
-
_o = _a.
|
|
6943
|
-
|
|
6944
|
-
_p = _a.
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
_s =
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
state = _u[0],
|
|
6956
|
-
dispatch = _u[1];
|
|
6936
|
+
_l = _a.classNames,
|
|
6937
|
+
classNames = _l === void 0 ? {} : _l,
|
|
6938
|
+
_m = _a.colors,
|
|
6939
|
+
colors = _m === void 0 ? {} : _m,
|
|
6940
|
+
_o = _a.verbiage,
|
|
6941
|
+
rawVerbiage = _o === void 0 ? {} : _o,
|
|
6942
|
+
_p = _a.debugMode,
|
|
6943
|
+
debugMode = _p === void 0 ? false : _p;
|
|
6944
|
+
var _q = useResizeObserver(),
|
|
6945
|
+
ref = _q.ref,
|
|
6946
|
+
_r = _q.width,
|
|
6947
|
+
width = _r === void 0 ? 1 : _r,
|
|
6948
|
+
_s = _q.height,
|
|
6949
|
+
height = _s === void 0 ? 1 : _s;
|
|
6950
|
+
var _t = useIdCaptureState(),
|
|
6951
|
+
state = _t[0],
|
|
6952
|
+
dispatch = _t[1];
|
|
6957
6953
|
var cameraRef = useContext(CameraStateContext).cameraRef;
|
|
6958
|
-
var
|
|
6959
|
-
modelsReady =
|
|
6960
|
-
setThresholds =
|
|
6961
|
-
detectionTime =
|
|
6962
|
-
focusPredictionTime =
|
|
6963
|
-
getBestFrame =
|
|
6954
|
+
var _u = useContext(IdCaptureModelsContext),
|
|
6955
|
+
modelsReady = _u.ready,
|
|
6956
|
+
setThresholds = _u.setThresholds,
|
|
6957
|
+
detectionTime = _u.detectionTime,
|
|
6958
|
+
focusPredictionTime = _u.focusPredictionTime,
|
|
6959
|
+
getBestFrame = _u.getBestFrame;
|
|
6964
6960
|
useEffect(function () {
|
|
6965
6961
|
setThresholds(thresholds);
|
|
6966
6962
|
}, [thresholds, setThresholds]);
|
|
@@ -7025,8 +7021,6 @@ var IdCapture = function IdCapture(_a) {
|
|
|
7025
7021
|
});
|
|
7026
7022
|
}, 0);
|
|
7027
7023
|
}, [dispatch, getBestFrame, onCapture, shouldCapture, state.captureStartedAt, state.requestedDocumentType]);
|
|
7028
|
-
assets.portraitGuidesImageUrl || (assets.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"));
|
|
7029
|
-
assets.landscapeGuidesImageUrl || (assets.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
7030
7024
|
var theme = useTheme();
|
|
7031
7025
|
colors.guideBoxUnsatisfiedColor || (colors.guideBoxUnsatisfiedColor = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.unsatisfiedColor) !== null && _d !== void 0 ? _d : 'white');
|
|
7032
7026
|
colors.guideBoxSatisfiedColor || (colors.guideBoxSatisfiedColor = (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.satisfiedColor) !== null && _g !== void 0 ? _g : 'green');
|
|
@@ -7084,6 +7078,8 @@ var timeSince = function timeSince(t) {
|
|
|
7084
7078
|
return Math.abs(new Date().getTime() - t.getTime());
|
|
7085
7079
|
};
|
|
7086
7080
|
|
|
7081
|
+
var DEFAULT_CDN_URL = 'https://websdk-cdn-dev.idmission.com/assets';
|
|
7082
|
+
|
|
7087
7083
|
var CameraAccessDeniedOverlay = function CameraAccessDeniedOverlay(_a) {
|
|
7088
7084
|
var _b;
|
|
7089
7085
|
var _c = _a.assets,
|
|
@@ -8185,21 +8181,6 @@ function resetCanvasDimensions(canvas) {
|
|
|
8185
8181
|
canvas.style.height = '0';
|
|
8186
8182
|
}
|
|
8187
8183
|
|
|
8188
|
-
var GuideOrientationContext = /*#__PURE__*/createContext({
|
|
8189
|
-
orientation: 'landscape',
|
|
8190
|
-
wrapperWidth: 1,
|
|
8191
|
-
wrapperHeight: 1,
|
|
8192
|
-
wrapperAspectRatio: 0,
|
|
8193
|
-
imageAspectRatio: 0,
|
|
8194
|
-
wrapperRef: null,
|
|
8195
|
-
setDimensions: function setDimensions() {
|
|
8196
|
-
return null;
|
|
8197
|
-
},
|
|
8198
|
-
onImageLoaded: function onImageLoaded() {
|
|
8199
|
-
return null;
|
|
8200
|
-
}
|
|
8201
|
-
});
|
|
8202
|
-
|
|
8203
8184
|
var IdCardGuideImageContainer = styled(IdCardBorder)(templateObject_1$u || (templateObject_1$u = __makeTemplateObject(["\n position: relative;\n ", "\n box-sizing: border-box;\n"], ["\n position: relative;\n ", "\n box-sizing: border-box;\n"])), function (props) {
|
|
8204
8185
|
return props.$isVisible ? '' : 'opacity: 0;';
|
|
8205
8186
|
});
|
|
@@ -8358,10 +8339,114 @@ var IdCardBorderRect = styled.rect(templateObject_5$9 || (templateObject_5$9 = _
|
|
|
8358
8339
|
});
|
|
8359
8340
|
var templateObject_1$u, templateObject_2$o, templateObject_3$k, templateObject_4$e, templateObject_5$9;
|
|
8360
8341
|
|
|
8342
|
+
var defaultIdCaptureGuideImages = {
|
|
8343
|
+
portrait: {
|
|
8344
|
+
SHOW_ID_FRONT: {
|
|
8345
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"),
|
|
8346
|
+
width: 386,
|
|
8347
|
+
height: 573
|
|
8348
|
+
},
|
|
8349
|
+
SHOW_ID_BACK: {
|
|
8350
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"),
|
|
8351
|
+
width: 386,
|
|
8352
|
+
height: 573
|
|
8353
|
+
},
|
|
8354
|
+
SHOW_PASSPORT: {
|
|
8355
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-Borderless.svg"),
|
|
8356
|
+
width: 386,
|
|
8357
|
+
height: 573
|
|
8358
|
+
}
|
|
8359
|
+
},
|
|
8360
|
+
landscape: {
|
|
8361
|
+
SHOW_ID_FRONT: {
|
|
8362
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"),
|
|
8363
|
+
width: 573,
|
|
8364
|
+
height: 386
|
|
8365
|
+
},
|
|
8366
|
+
SHOW_ID_BACK: {
|
|
8367
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"),
|
|
8368
|
+
width: 573,
|
|
8369
|
+
height: 386
|
|
8370
|
+
},
|
|
8371
|
+
SHOW_PASSPORT: {
|
|
8372
|
+
url: "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-Borderless.svg"),
|
|
8373
|
+
width: 573,
|
|
8374
|
+
height: 386
|
|
8375
|
+
}
|
|
8376
|
+
}
|
|
8377
|
+
};
|
|
8378
|
+
|
|
8379
|
+
function isObject(item) {
|
|
8380
|
+
return !!item && typeof item === 'object' && !Array.isArray(item);
|
|
8381
|
+
}
|
|
8382
|
+
function mergeDeep(target, source) {
|
|
8383
|
+
var output = Object.assign({}, target);
|
|
8384
|
+
if (isObject(target) && isObject(source)) {
|
|
8385
|
+
Object.keys(source).forEach(function (key) {
|
|
8386
|
+
var _a, _b;
|
|
8387
|
+
var keyT = key;
|
|
8388
|
+
if (isObject(source[keyT])) {
|
|
8389
|
+
if (!(keyT in target)) Object.assign(output, (_a = {}, _a[keyT] = source[keyT], _a));else {
|
|
8390
|
+
// @ts-expect-error TS2345
|
|
8391
|
+
output[keyT] = mergeDeep(target[keyT], source[keyT]);
|
|
8392
|
+
}
|
|
8393
|
+
} else {
|
|
8394
|
+
Object.assign(output, (_b = {}, _b[keyT] = source[keyT], _b));
|
|
8395
|
+
}
|
|
8396
|
+
});
|
|
8397
|
+
}
|
|
8398
|
+
return output;
|
|
8399
|
+
}
|
|
8400
|
+
|
|
8401
|
+
function useGuideImagesByUrl(images) {
|
|
8402
|
+
return useMemo(function () {
|
|
8403
|
+
return Object.fromEntries(Object.values(images).flatMap(function (v) {
|
|
8404
|
+
return Object.values(v);
|
|
8405
|
+
}).map(function (v) {
|
|
8406
|
+
return [v.url, v];
|
|
8407
|
+
}));
|
|
8408
|
+
}, [images]);
|
|
8409
|
+
}
|
|
8410
|
+
|
|
8411
|
+
function useGuideImages(userSuppliedImages) {
|
|
8412
|
+
return useMemo(function () {
|
|
8413
|
+
warnAboutImagesMissingDimensions(userSuppliedImages);
|
|
8414
|
+
return mergeDeep(defaultIdCaptureGuideImages, userSuppliedImages);
|
|
8415
|
+
}, [userSuppliedImages]);
|
|
8416
|
+
}
|
|
8417
|
+
function warnAboutImagesMissingDimensions(userSuppliedImages) {
|
|
8418
|
+
Object.values(userSuppliedImages).forEach(function (images) {
|
|
8419
|
+
Object.values(images).forEach(function (image) {
|
|
8420
|
+
if (image.url && (!image.width || !image.height)) {
|
|
8421
|
+
warn("The image ".concat(image.url, " is missing width and/or height. This will cause the image scaling issues in Safari. Please provide the width and height of the image."));
|
|
8422
|
+
}
|
|
8423
|
+
});
|
|
8424
|
+
});
|
|
8425
|
+
}
|
|
8426
|
+
|
|
8427
|
+
function useImagesWithBackToFront(userSuppliedImages, isBackToFront) {
|
|
8428
|
+
var images = useGuideImages(userSuppliedImages);
|
|
8429
|
+
return useMemo(function () {
|
|
8430
|
+
if (!isBackToFront) return images;
|
|
8431
|
+
var _images = structuredClone(images);
|
|
8432
|
+
var temp = _images.portrait.SHOW_ID_FRONT;
|
|
8433
|
+
_images.portrait.SHOW_ID_FRONT = _images.portrait.SHOW_ID_BACK;
|
|
8434
|
+
_images.portrait.SHOW_ID_BACK = temp;
|
|
8435
|
+
var temp2 = _images.landscape.SHOW_ID_FRONT;
|
|
8436
|
+
_images.landscape.SHOW_ID_FRONT = _images.landscape.SHOW_ID_BACK;
|
|
8437
|
+
_images.landscape.SHOW_ID_BACK = temp2;
|
|
8438
|
+
return _images;
|
|
8439
|
+
}, [images, isBackToFront]);
|
|
8440
|
+
}
|
|
8441
|
+
|
|
8442
|
+
function getOrientation(allowPortraitOnMobile) {
|
|
8443
|
+
return allowPortraitOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
8444
|
+
}
|
|
8445
|
+
|
|
8361
8446
|
var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
8362
8447
|
var _b;
|
|
8363
|
-
var _c = _a.
|
|
8364
|
-
|
|
8448
|
+
var _c = _a.idCaptureGuideImages,
|
|
8449
|
+
idCaptureGuideImages = _c === void 0 ? defaultIdCaptureGuideImages : _c,
|
|
8365
8450
|
_d = _a.classNames,
|
|
8366
8451
|
classNames = _d === void 0 ? {} : _d,
|
|
8367
8452
|
borderWidth = _a.borderWidth,
|
|
@@ -8369,8 +8454,6 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8369
8454
|
borderRadius = _a.borderRadius,
|
|
8370
8455
|
imageStyle = _a.imageStyle;
|
|
8371
8456
|
var cameraRef = useContext(CameraStateContext).cameraRef;
|
|
8372
|
-
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
8373
|
-
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
8374
8457
|
var isMirrored = !((_b = cameraRef.current) === null || _b === void 0 ? void 0 : _b.isRearFacing);
|
|
8375
8458
|
var _e = useState(1),
|
|
8376
8459
|
transitionTime = _e[0],
|
|
@@ -8409,7 +8492,7 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8409
8492
|
"$transitionTime": transitionTime,
|
|
8410
8493
|
"$isVisible": true
|
|
8411
8494
|
}, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
|
|
8412
|
-
src:
|
|
8495
|
+
src: idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
8413
8496
|
className: classNames.frontImage,
|
|
8414
8497
|
alt: "",
|
|
8415
8498
|
style: imageStyle
|
|
@@ -8423,7 +8506,7 @@ var IdVideoCaptureFlipIdPrompt = function IdVideoCaptureFlipIdPrompt(_a) {
|
|
|
8423
8506
|
"$transitionTime": transitionTime,
|
|
8424
8507
|
"$isVisible": true
|
|
8425
8508
|
}, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
|
|
8426
|
-
src:
|
|
8509
|
+
src: idCaptureGuideImages.landscape.SHOW_ID_BACK.url,
|
|
8427
8510
|
className: classNames.backImage,
|
|
8428
8511
|
alt: "",
|
|
8429
8512
|
style: imageStyle
|
|
@@ -8436,43 +8519,84 @@ var FlipImageContainer = styled(IdCardGuideImageContainer)(templateObject_1$t ||
|
|
|
8436
8519
|
});
|
|
8437
8520
|
var templateObject_1$t;
|
|
8438
8521
|
|
|
8522
|
+
var GuideOrientationContext = /*#__PURE__*/createContext({
|
|
8523
|
+
orientation: 'landscape',
|
|
8524
|
+
wrapperWidth: 1,
|
|
8525
|
+
wrapperHeight: 1,
|
|
8526
|
+
wrapperAspectRatio: 0,
|
|
8527
|
+
imageAspectRatio: 0,
|
|
8528
|
+
wrapperRef: null,
|
|
8529
|
+
setDimensions: function setDimensions() {
|
|
8530
|
+
return null;
|
|
8531
|
+
},
|
|
8532
|
+
onImageLoaded: function onImageLoaded() {
|
|
8533
|
+
return null;
|
|
8534
|
+
}
|
|
8535
|
+
});
|
|
8536
|
+
function GuideOrientationContextProvider(_a) {
|
|
8537
|
+
var children = _a.children;
|
|
8538
|
+
var setDimensions = useState({
|
|
8539
|
+
width: 1,
|
|
8540
|
+
height: 1
|
|
8541
|
+
})[1];
|
|
8542
|
+
var _b = useState(1),
|
|
8543
|
+
imageAspectRatio = _b[0],
|
|
8544
|
+
setImageAspectRatio = _b[1];
|
|
8545
|
+
var _c = useResizeObserver(),
|
|
8546
|
+
wrapperRef = _c.ref,
|
|
8547
|
+
_d = _c.width,
|
|
8548
|
+
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
8549
|
+
_e = _c.height,
|
|
8550
|
+
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
8551
|
+
var wrapperAspectRatio = useMemo(function () {
|
|
8552
|
+
return wrapperWidth / wrapperHeight;
|
|
8553
|
+
}, [wrapperHeight, wrapperWidth]);
|
|
8554
|
+
var onImageLoaded = useCallback(function (e) {
|
|
8555
|
+
var img = e.target;
|
|
8556
|
+
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
8557
|
+
}, []);
|
|
8558
|
+
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
8559
|
+
var value = useMemo(function () {
|
|
8560
|
+
return {
|
|
8561
|
+
orientation: orientation,
|
|
8562
|
+
wrapperWidth: wrapperWidth,
|
|
8563
|
+
wrapperHeight: wrapperHeight,
|
|
8564
|
+
wrapperAspectRatio: wrapperAspectRatio,
|
|
8565
|
+
imageAspectRatio: imageAspectRatio,
|
|
8566
|
+
setDimensions: setDimensions,
|
|
8567
|
+
wrapperRef: wrapperRef,
|
|
8568
|
+
onImageLoaded: onImageLoaded
|
|
8569
|
+
};
|
|
8570
|
+
}, [imageAspectRatio, onImageLoaded, setDimensions, wrapperAspectRatio, wrapperHeight, wrapperRef, wrapperWidth]);
|
|
8571
|
+
return /*#__PURE__*/React__default.createElement(GuideOrientationContext.Provider, {
|
|
8572
|
+
value: value
|
|
8573
|
+
}, children);
|
|
8574
|
+
}
|
|
8575
|
+
function useGuideOrientationContext() {
|
|
8576
|
+
var ctx = useContext(GuideOrientationContext);
|
|
8577
|
+
if (!ctx) throw new Error('useGuideOrientationContext cannot be used without GuideOrientationContextProvider');
|
|
8578
|
+
return ctx;
|
|
8579
|
+
}
|
|
8580
|
+
|
|
8439
8581
|
var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
// padding: userSuppliedPadding,
|
|
8443
|
-
// imagePadding: userSuppliedImagePadding,
|
|
8582
|
+
var _b = _a.images,
|
|
8583
|
+
images = _b === void 0 ? defaultIdCaptureGuideImages : _b,
|
|
8444
8584
|
width = _a.width,
|
|
8445
8585
|
height = _a.height,
|
|
8446
|
-
|
|
8447
|
-
borderWidth =
|
|
8448
|
-
|
|
8449
|
-
borderColor =
|
|
8450
|
-
|
|
8451
|
-
borderRadius =
|
|
8452
|
-
|
|
8453
|
-
isMirrored =
|
|
8454
|
-
|
|
8455
|
-
portraitGuidesOnMobile =
|
|
8456
|
-
_g = _a.assets,
|
|
8457
|
-
assets = _g === void 0 ? {} : _g,
|
|
8586
|
+
_c = _a.borderWidth,
|
|
8587
|
+
borderWidth = _c === void 0 ? 20 : _c,
|
|
8588
|
+
_d = _a.borderColor,
|
|
8589
|
+
borderColor = _d === void 0 ? 'white' : _d,
|
|
8590
|
+
_e = _a.borderRadius,
|
|
8591
|
+
borderRadius = _e === void 0 ? 25 : _e,
|
|
8592
|
+
_f = _a.isMirrored,
|
|
8593
|
+
isMirrored = _f === void 0 ? false : _f,
|
|
8594
|
+
_g = _a.portraitGuidesOnMobile,
|
|
8595
|
+
portraitGuidesOnMobile = _g === void 0 ? true : _g,
|
|
8458
8596
|
_h = _a.classNames,
|
|
8459
8597
|
classNames = _h === void 0 ? {} : _h;
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
assets.idCardBackPortraitImageUrl || (assets.idCardBackPortraitImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"));
|
|
8463
|
-
assets.idCardBackLandscapeImageUrl || (assets.idCardBackLandscapeImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
8464
|
-
// const instruction = useVerbiage(
|
|
8465
|
-
// verbiage.instructionText,
|
|
8466
|
-
// 'Please flip your ID card...',
|
|
8467
|
-
// )
|
|
8468
|
-
// const padding =
|
|
8469
|
-
// (userSuppliedPadding ?? isMobile())
|
|
8470
|
-
// ? (theme.idCapture?.guideBox?.mobilePadding ?? 0)
|
|
8471
|
-
// : (theme.idCapture?.guideBox?.desktopPadding ?? 50)
|
|
8472
|
-
var onImageLoaded = useContext(GuideOrientationContext).onImageLoaded;
|
|
8473
|
-
var orientation = portraitGuidesOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
8474
|
-
// const imagePadding =
|
|
8475
|
-
// userSuppliedImagePadding ?? theme.idCapture?.guideBox?.imagePadding ?? 0
|
|
8598
|
+
var onImageLoaded = useGuideOrientationContext().onImageLoaded;
|
|
8599
|
+
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
8476
8600
|
var _j = useState(1),
|
|
8477
8601
|
transitionTime = _j[0],
|
|
8478
8602
|
setTransitionTime = _j[1];
|
|
@@ -8510,10 +8634,9 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8510
8634
|
"$transitionTime": transitionTime,
|
|
8511
8635
|
"$isVisible": true
|
|
8512
8636
|
}, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
|
|
8513
|
-
src: orientation === 'portrait' ? assets.idCardFrontPortraitImageUrl : assets.idCardFrontLandscapeImageUrl,
|
|
8514
8637
|
alt: "",
|
|
8638
|
+
src: images[orientation].SHOW_ID_FRONT.url,
|
|
8515
8639
|
className: classNames.frontImage,
|
|
8516
|
-
// $padding={imagePadding}
|
|
8517
8640
|
onLoad: onImageLoaded,
|
|
8518
8641
|
width: width,
|
|
8519
8642
|
height: height
|
|
@@ -8527,10 +8650,9 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8527
8650
|
"$transitionTime": transitionTime,
|
|
8528
8651
|
"$isVisible": true
|
|
8529
8652
|
}, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
|
|
8530
|
-
src: orientation === 'portrait' ? assets.idCardBackPortraitImageUrl : assets.idCardBackLandscapeImageUrl,
|
|
8531
8653
|
alt: "",
|
|
8654
|
+
src: images[orientation].SHOW_ID_BACK.url,
|
|
8532
8655
|
className: classNames.backImage,
|
|
8533
|
-
// $padding={imagePadding}
|
|
8534
8656
|
width: width,
|
|
8535
8657
|
height: height
|
|
8536
8658
|
})));
|
|
@@ -8538,108 +8660,80 @@ var FlipIdPrompt = function FlipIdPrompt(_a) {
|
|
|
8538
8660
|
|
|
8539
8661
|
var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
8540
8662
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
8541
|
-
var _p
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
classNames = _u === void 0 ? {} : _u,
|
|
8546
|
-
_v = _a.width,
|
|
8547
|
-
width = _v === void 0 ? 0 : _v,
|
|
8548
|
-
_w = _a.height,
|
|
8549
|
-
height = _w === void 0 ? 0 : _w,
|
|
8663
|
+
var _p = _a.classNames,
|
|
8664
|
+
classNames = _p === void 0 ? {} : _p,
|
|
8665
|
+
_q = _a.images,
|
|
8666
|
+
userSuppliedImages = _q === void 0 ? defaultIdCaptureGuideImages : _q,
|
|
8550
8667
|
userSuppliedPadding = _a.padding,
|
|
8551
8668
|
userSuppliedImagePadding = _a.imagePadding,
|
|
8552
|
-
|
|
8553
|
-
imageVisible =
|
|
8669
|
+
_r = _a.imageVisible,
|
|
8670
|
+
imageVisible = _r === void 0 ? true : _r,
|
|
8554
8671
|
borderWidth = _a.borderWidth,
|
|
8555
8672
|
borderColor = _a.borderColor,
|
|
8556
|
-
|
|
8557
|
-
idCardBorderWidth =
|
|
8558
|
-
|
|
8559
|
-
idCardBorderColor =
|
|
8673
|
+
_s = _a.idCardBorderWidth,
|
|
8674
|
+
idCardBorderWidth = _s === void 0 ? '2.5%' : _s,
|
|
8675
|
+
_t = _a.idCardBorderColor,
|
|
8676
|
+
idCardBorderColor = _t === void 0 ? 'white' : _t,
|
|
8560
8677
|
maskColor = _a.maskColor,
|
|
8561
|
-
|
|
8562
|
-
isMirrored =
|
|
8563
|
-
|
|
8564
|
-
isBackToFront =
|
|
8565
|
-
|
|
8566
|
-
portraitGuidesOnMobile =
|
|
8567
|
-
|
|
8568
|
-
instruction =
|
|
8569
|
-
|
|
8570
|
-
requestedAction =
|
|
8571
|
-
|
|
8572
|
-
progress =
|
|
8573
|
-
|
|
8574
|
-
status =
|
|
8678
|
+
_u = _a.isMirrored,
|
|
8679
|
+
isMirrored = _u === void 0 ? false : _u,
|
|
8680
|
+
_v = _a.isBackToFront,
|
|
8681
|
+
isBackToFront = _v === void 0 ? false : _v,
|
|
8682
|
+
_w = _a.portraitGuidesOnMobile,
|
|
8683
|
+
portraitGuidesOnMobile = _w === void 0 ? true : _w,
|
|
8684
|
+
_x = _a.instruction,
|
|
8685
|
+
instruction = _x === void 0 ? '' : _x,
|
|
8686
|
+
_y = _a.requestedAction,
|
|
8687
|
+
requestedAction = _y === void 0 ? 'SHOW_ID_FRONT' : _y,
|
|
8688
|
+
_z = _a.progress,
|
|
8689
|
+
progress = _z === void 0 ? 0 : _z,
|
|
8690
|
+
_0 = _a.status,
|
|
8691
|
+
status = _0 === void 0 ? 'ready' : _0,
|
|
8575
8692
|
onClick = _a.onClick;
|
|
8576
|
-
var
|
|
8577
|
-
wrapperRef =
|
|
8578
|
-
wrapperWidth =
|
|
8579
|
-
wrapperHeight =
|
|
8580
|
-
imageAspectRatio =
|
|
8581
|
-
wrapperAspectRatio =
|
|
8582
|
-
guideOrientationOnImageLoaded =
|
|
8583
|
-
setDimensions =
|
|
8584
|
-
var
|
|
8585
|
-
state =
|
|
8586
|
-
dispatch =
|
|
8587
|
-
function onImageLoaded(e) {
|
|
8588
|
-
guideOrientationOnImageLoaded(e);
|
|
8589
|
-
var img = e.target;
|
|
8590
|
-
dispatch({
|
|
8591
|
-
type: 'guideImageLoaded',
|
|
8592
|
-
payload: {
|
|
8593
|
-
width: img.naturalWidth,
|
|
8594
|
-
height: img.naturalHeight
|
|
8595
|
-
}
|
|
8596
|
-
});
|
|
8597
|
-
}
|
|
8693
|
+
var _1 = useGuideOrientationContext(),
|
|
8694
|
+
wrapperRef = _1.wrapperRef,
|
|
8695
|
+
wrapperWidth = _1.wrapperWidth,
|
|
8696
|
+
wrapperHeight = _1.wrapperHeight,
|
|
8697
|
+
imageAspectRatio = _1.imageAspectRatio,
|
|
8698
|
+
wrapperAspectRatio = _1.wrapperAspectRatio,
|
|
8699
|
+
guideOrientationOnImageLoaded = _1.onImageLoaded,
|
|
8700
|
+
setDimensions = _1.setDimensions;
|
|
8701
|
+
var _2 = useIdCaptureState(),
|
|
8702
|
+
state = _2[0],
|
|
8703
|
+
dispatch = _2[1];
|
|
8598
8704
|
var theme = useTheme();
|
|
8599
8705
|
if (borderWidth === undefined) borderWidth = (_d = (_c = (_b = theme.idCapture) === null || _b === void 0 ? void 0 : _b.guideBox) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 4;
|
|
8600
|
-
if (width == 0) width = wrapperWidth;
|
|
8601
|
-
if (height == 0) height = wrapperHeight;
|
|
8602
8706
|
useEffect(function () {
|
|
8603
8707
|
setDimensions({
|
|
8604
|
-
width:
|
|
8605
|
-
height:
|
|
8708
|
+
width: wrapperWidth,
|
|
8709
|
+
height: wrapperHeight
|
|
8606
8710
|
});
|
|
8607
|
-
}, [
|
|
8711
|
+
}, [setDimensions, wrapperHeight, wrapperWidth]);
|
|
8608
8712
|
var padding = userSuppliedPadding !== null && userSuppliedPadding !== void 0 ? userSuppliedPadding : isMobile() ? (_g = (_f = (_e = theme.idCapture) === null || _e === void 0 ? void 0 : _e.guideBox) === null || _f === void 0 ? void 0 : _f.mobilePadding) !== null && _g !== void 0 ? _g : 0 : (_k = (_j = (_h = theme.idCapture) === null || _h === void 0 ? void 0 : _h.guideBox) === null || _j === void 0 ? void 0 : _j.desktopPadding) !== null && _k !== void 0 ? _k : 50;
|
|
8609
8713
|
var paddingAndBorderPx = padding * 2 + borderWidth * 2;
|
|
8610
|
-
var images =
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
SHOW_ID_BACK: assets.idCardBackPortraitImageUrl,
|
|
8615
|
-
SHOW_PASSPORT: assets.passportPortraitImageUrl
|
|
8616
|
-
},
|
|
8617
|
-
landscape: {
|
|
8618
|
-
SHOW_ID_FRONT: assets.idCardFrontLandscapeImageUrl,
|
|
8619
|
-
FLIP_ID: assets.idCardFrontLandscapeImageUrl,
|
|
8620
|
-
SHOW_ID_BACK: assets.idCardBackLandscapeImageUrl,
|
|
8621
|
-
SHOW_PASSPORT: assets.passportLandscapeImageUrl
|
|
8622
|
-
}
|
|
8623
|
-
};
|
|
8624
|
-
if (isBackToFront) {
|
|
8625
|
-
var temp = images.portrait.SHOW_ID_FRONT;
|
|
8626
|
-
images.portrait.SHOW_ID_FRONT = images.portrait.SHOW_ID_BACK;
|
|
8627
|
-
images.portrait.SHOW_ID_BACK = temp;
|
|
8628
|
-
var temp2 = images.landscape.SHOW_ID_FRONT;
|
|
8629
|
-
images.landscape.SHOW_ID_FRONT = images.landscape.SHOW_ID_BACK;
|
|
8630
|
-
images.landscape.SHOW_ID_BACK = temp2;
|
|
8631
|
-
}
|
|
8632
|
-
var orientation = portraitGuidesOnMobile && window.innerWidth < window.innerHeight ? 'portrait' : 'landscape';
|
|
8633
|
-
var imgSrc = images[orientation][requestedAction];
|
|
8634
|
-
assets.flipIdPrompt || (assets.flipIdPrompt = {});
|
|
8635
|
-
(_p = assets.flipIdPrompt).idCardFrontPortraitImageUrl || (_p.idCardFrontPortraitImageUrl = images.portrait.SHOW_ID_FRONT);
|
|
8636
|
-
(_q = assets.flipIdPrompt).idCardFrontLandscapeImageUrl || (_q.idCardFrontLandscapeImageUrl = images.landscape.SHOW_ID_FRONT);
|
|
8637
|
-
(_r = assets.flipIdPrompt).idCardBackPortraitImageUrl || (_r.idCardBackPortraitImageUrl = images.portrait.SHOW_ID_BACK);
|
|
8638
|
-
(_s = assets.flipIdPrompt).idCardBackLandscapeImageUrl || (_s.idCardBackLandscapeImageUrl = images.landscape.SHOW_ID_BACK);
|
|
8714
|
+
var images = useImagesWithBackToFront(userSuppliedImages, isBackToFront);
|
|
8715
|
+
var imagesByUrl = useGuideImagesByUrl(images);
|
|
8716
|
+
var orientation = getOrientation(portraitGuidesOnMobile);
|
|
8717
|
+
var currentImage = images[orientation][requestedAction === 'FLIP_ID' ? 'SHOW_ID_FRONT' : requestedAction];
|
|
8639
8718
|
var imagePadding = (_o = userSuppliedImagePadding !== null && userSuppliedImagePadding !== void 0 ? userSuppliedImagePadding : (_m = (_l = theme.idCapture) === null || _l === void 0 ? void 0 : _l.guideBox) === null || _m === void 0 ? void 0 : _m.imagePadding) !== null && _o !== void 0 ? _o : 50;
|
|
8640
8719
|
var imageWidth = state.guideRectWidth - imagePadding * 2;
|
|
8641
8720
|
var imageHeight = state.guideRectHeight - imagePadding * 2;
|
|
8642
8721
|
var centerRegionMinWidth = imageAspectRatio >= wrapperAspectRatio ? wrapperWidth - paddingAndBorderPx : undefined;
|
|
8722
|
+
var onImageLoaded = useCallback(function (e) {
|
|
8723
|
+
var _a, _b;
|
|
8724
|
+
guideOrientationOnImageLoaded(e);
|
|
8725
|
+
var img = e.currentTarget;
|
|
8726
|
+
var imageByUrl = imagesByUrl[img.src];
|
|
8727
|
+
var width = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth;
|
|
8728
|
+
var height = (_b = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _b !== void 0 ? _b : img.naturalHeight;
|
|
8729
|
+
dispatch({
|
|
8730
|
+
type: 'guideImageLoaded',
|
|
8731
|
+
payload: {
|
|
8732
|
+
width: width,
|
|
8733
|
+
height: height
|
|
8734
|
+
}
|
|
8735
|
+
});
|
|
8736
|
+
}, [dispatch, guideOrientationOnImageLoaded, imagesByUrl]);
|
|
8643
8737
|
return /*#__PURE__*/React__default.createElement(StyledPageContainer, {
|
|
8644
8738
|
ref: wrapperRef,
|
|
8645
8739
|
onClick: onClick,
|
|
@@ -8676,8 +8770,8 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8676
8770
|
borderColor: idCardBorderColor,
|
|
8677
8771
|
"$isVisible": requestedAction !== 'FLIP_ID'
|
|
8678
8772
|
}, /*#__PURE__*/React__default.createElement(IdCardGuideImage, {
|
|
8679
|
-
src: imgSrc,
|
|
8680
8773
|
alt: "",
|
|
8774
|
+
src: currentImage.url,
|
|
8681
8775
|
onLoad: onImageLoaded,
|
|
8682
8776
|
className: classNames.image,
|
|
8683
8777
|
"$isInvisible": !imageVisible,
|
|
@@ -8685,11 +8779,11 @@ var IdCaptureGuideOverlay = function IdCaptureGuideOverlay(_a) {
|
|
|
8685
8779
|
width: imageWidth,
|
|
8686
8780
|
height: imageHeight
|
|
8687
8781
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__default.createElement(FlipIdPrompt, {
|
|
8782
|
+
images: images,
|
|
8688
8783
|
borderWidth: idCardBorderWidth,
|
|
8689
8784
|
borderColor: idCardBorderColor,
|
|
8690
8785
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
8691
8786
|
isMirrored: isMirrored,
|
|
8692
|
-
assets: assets.flipIdPrompt,
|
|
8693
8787
|
classNames: classNames.flipIdPrompt,
|
|
8694
8788
|
width: imageWidth,
|
|
8695
8789
|
height: imageHeight
|
|
@@ -8727,7 +8821,7 @@ var GuideRegion = styled.div(templateObject_4$d || (templateObject_4$d = __makeT
|
|
|
8727
8821
|
return props.$minHeight ? "min-height: ".concat(props.$minHeight, "px;") : "";
|
|
8728
8822
|
});
|
|
8729
8823
|
var Spacer = styled(GuideRegion)(templateObject_5$8 || (templateObject_5$8 = __makeTemplateObject(["\n display: block;\n width: auto;\n"], ["\n display: block;\n width: auto;\n"])));
|
|
8730
|
-
var GuideCenterRegion = styled.div(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n ", "\n ", "\n
|
|
8824
|
+
var GuideCenterRegion = styled.div(templateObject_6$7 || (templateObject_6$7 = __makeTemplateObject(["\n ", "\n ", "\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"], ["\n ", "\n ", "\n box-sizing: border-box;\n display: flex;\n flex: 1;\n max-height: 100%;\n height: 100%;\n"])), function (props) {
|
|
8731
8825
|
return props.$minWidth ? "min-width: ".concat(props.$minWidth, "px;") : "";
|
|
8732
8826
|
}, function (props) {
|
|
8733
8827
|
return props.$isMirrored ? 'transform: scaleX(-1);' : '';
|
|
@@ -8765,8 +8859,8 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
8765
8859
|
status = _u === void 0 ? 'ready' : _u,
|
|
8766
8860
|
_v = _a.progress,
|
|
8767
8861
|
progress = _v === void 0 ? 0 : _v,
|
|
8768
|
-
_w = _a.
|
|
8769
|
-
|
|
8862
|
+
_w = _a.images,
|
|
8863
|
+
images = _w === void 0 ? defaultIdCaptureGuideImages : _w,
|
|
8770
8864
|
_x = _a.classNames,
|
|
8771
8865
|
classNames = _x === void 0 ? {} : _x;
|
|
8772
8866
|
var _y = useIdCaptureState(),
|
|
@@ -8875,7 +8969,7 @@ var IdCaptureFitGuide = function IdCaptureFitGuide(_a) {
|
|
|
8875
8969
|
isBackToFront: isBackToFront,
|
|
8876
8970
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
8877
8971
|
instruction: instruction,
|
|
8878
|
-
|
|
8972
|
+
images: images,
|
|
8879
8973
|
classNames: classNames,
|
|
8880
8974
|
imageVisible: imageVisible,
|
|
8881
8975
|
requestedAction: requestedAction,
|
|
@@ -8903,8 +8997,8 @@ function IdCaptureGuides(_a) {
|
|
|
8903
8997
|
requestedAction = _h === void 0 ? 'SHOW_ID_FRONT' : _h,
|
|
8904
8998
|
_j = _a.isBackToFront,
|
|
8905
8999
|
isBackToFront = _j === void 0 ? false : _j,
|
|
8906
|
-
_k = _a.
|
|
8907
|
-
|
|
9000
|
+
_k = _a.images,
|
|
9001
|
+
images = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
8908
9002
|
_l = _a.classNames,
|
|
8909
9003
|
classNames = _l === void 0 ? {} : _l,
|
|
8910
9004
|
_m = _a.colors,
|
|
@@ -8919,10 +9013,8 @@ function IdCaptureGuides(_a) {
|
|
|
8919
9013
|
captureFailedText: 'Capture failed!'
|
|
8920
9014
|
});
|
|
8921
9015
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, guideType === 'overlay' && ( /*#__PURE__*/React__default.createElement(IdCaptureGuideOverlay, {
|
|
8922
|
-
|
|
9016
|
+
images: images,
|
|
8923
9017
|
classNames: classNames,
|
|
8924
|
-
width: state.pageWidth,
|
|
8925
|
-
height: state.pageHeight,
|
|
8926
9018
|
status: status,
|
|
8927
9019
|
progress: progress,
|
|
8928
9020
|
instruction: state.captureFailed ? verbiage.captureFailedText : state.capturing ? verbiage === null || verbiage === void 0 ? void 0 : verbiage.capturingText : verbiage.instructionText,
|
|
@@ -8930,7 +9022,7 @@ function IdCaptureGuides(_a) {
|
|
|
8930
9022
|
borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor,
|
|
8931
9023
|
imageVisible: requestedAction === 'FLIP_ID' || !state.idCardFrontDetectionThresholdMet || !state.documentInBounds || state.documentTooClose
|
|
8932
9024
|
})), guideType === 'fit' && ( /*#__PURE__*/React__default.createElement(IdCaptureFitGuide, {
|
|
8933
|
-
|
|
9025
|
+
images: images,
|
|
8934
9026
|
classNames: classNames,
|
|
8935
9027
|
requestedAction: requestedAction,
|
|
8936
9028
|
status: status,
|
|
@@ -9900,76 +9992,77 @@ function ScalingCameraFeed() {
|
|
|
9900
9992
|
|
|
9901
9993
|
var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
9902
9994
|
var _b, _c, _d, _e, _f, _g;
|
|
9903
|
-
var _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
9904
9995
|
var onSuccess = _a.onSuccess,
|
|
9905
9996
|
onExitCapture = _a.onExitCapture,
|
|
9906
9997
|
onUserCancel = _a.onUserCancel,
|
|
9907
|
-
|
|
9908
|
-
loadingOverlayMode =
|
|
9998
|
+
_h = _a.loadingOverlayMode,
|
|
9999
|
+
loadingOverlayMode = _h === void 0 ? 'default' : _h,
|
|
9909
10000
|
customOverlayContent = _a.customOverlayContent,
|
|
9910
10001
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
9911
10002
|
precapturedDocuments = _a.precapturedDocuments,
|
|
9912
|
-
|
|
9913
|
-
captureRequirement =
|
|
9914
|
-
|
|
9915
|
-
separateIdCardCaptureSequence =
|
|
9916
|
-
|
|
9917
|
-
thresholds =
|
|
9918
|
-
|
|
9919
|
-
skipSuccessScreen =
|
|
10003
|
+
_j = _a.captureRequirement,
|
|
10004
|
+
captureRequirement = _j === void 0 ? 'idCardOrPassport' : _j,
|
|
10005
|
+
_k = _a.separateIdCardCaptureSequence,
|
|
10006
|
+
separateIdCardCaptureSequence = _k === void 0 ? false : _k,
|
|
10007
|
+
_l = _a.thresholds,
|
|
10008
|
+
thresholds = _l === void 0 ? defaultIdCaptureThresholds : _l,
|
|
10009
|
+
_m = _a.skipSuccessScreen,
|
|
10010
|
+
skipSuccessScreen = _m === void 0 ? false : _m,
|
|
9920
10011
|
instructions = _a.instructions,
|
|
9921
|
-
|
|
9922
|
-
releaseCameraAccessOnExit =
|
|
9923
|
-
|
|
9924
|
-
guideType =
|
|
9925
|
-
|
|
9926
|
-
portraitGuidesOnMobile =
|
|
9927
|
-
|
|
9928
|
-
rotateLoadingOverlayImageWhenPortrait =
|
|
9929
|
-
|
|
9930
|
-
silentFallback =
|
|
9931
|
-
|
|
9932
|
-
forceFallbackMode =
|
|
9933
|
-
|
|
9934
|
-
allowIdCardBackToFrontCapture =
|
|
9935
|
-
|
|
9936
|
-
enableOverrideWrongDocumentTypeDialog =
|
|
9937
|
-
|
|
9938
|
-
allowOverrideWrongDocumentTypeAfterMs =
|
|
9939
|
-
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
|
|
9945
|
-
|
|
9946
|
-
|
|
9947
|
-
|
|
9948
|
-
|
|
9949
|
-
|
|
9950
|
-
|
|
9951
|
-
|
|
9952
|
-
|
|
9953
|
-
|
|
9954
|
-
|
|
9955
|
-
|
|
9956
|
-
|
|
9957
|
-
|
|
9958
|
-
|
|
9959
|
-
|
|
9960
|
-
|
|
9961
|
-
|
|
9962
|
-
|
|
9963
|
-
|
|
9964
|
-
|
|
9965
|
-
|
|
9966
|
-
|
|
9967
|
-
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
10012
|
+
_o = _a.releaseCameraAccessOnExit,
|
|
10013
|
+
releaseCameraAccessOnExit = _o === void 0 ? true : _o,
|
|
10014
|
+
_p = _a.guideType,
|
|
10015
|
+
guideType = _p === void 0 ? 'fit' : _p,
|
|
10016
|
+
_q = _a.portraitGuidesOnMobile,
|
|
10017
|
+
portraitGuidesOnMobile = _q === void 0 ? true : _q,
|
|
10018
|
+
_r = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
10019
|
+
rotateLoadingOverlayImageWhenPortrait = _r === void 0 ? true : _r,
|
|
10020
|
+
_s = _a.silentFallback,
|
|
10021
|
+
silentFallback = _s === void 0 ? false : _s,
|
|
10022
|
+
_t = _a.forceFallbackMode,
|
|
10023
|
+
forceFallbackMode = _t === void 0 ? false : _t,
|
|
10024
|
+
_u = _a.allowIdCardBackToFrontCapture,
|
|
10025
|
+
allowIdCardBackToFrontCapture = _u === void 0 ? false : _u,
|
|
10026
|
+
_v = _a.enableOverrideWrongDocumentTypeDialog,
|
|
10027
|
+
enableOverrideWrongDocumentTypeDialog = _v === void 0 ? false : _v,
|
|
10028
|
+
_w = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
10029
|
+
allowOverrideWrongDocumentTypeAfterMs = _w === void 0 ? 8000 : _w,
|
|
10030
|
+
_x = _a.guideImages,
|
|
10031
|
+
guideImages = _x === void 0 ? defaultIdCaptureGuideImages : _x,
|
|
10032
|
+
_y = _a.assets,
|
|
10033
|
+
assets = _y === void 0 ? {} : _y,
|
|
10034
|
+
_z = _a.classNames,
|
|
10035
|
+
classNames = _z === void 0 ? {} : _z,
|
|
10036
|
+
_0 = _a.colors,
|
|
10037
|
+
colors = _0 === void 0 ? {} : _0,
|
|
10038
|
+
_1 = _a.verbiage,
|
|
10039
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
10040
|
+
_2 = _a.debugMode,
|
|
10041
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
10042
|
+
var _3 = useIdCaptureState(),
|
|
10043
|
+
state = _3[0],
|
|
10044
|
+
dispatch = _3[1];
|
|
10045
|
+
var _4 = useContext(CameraStateContext),
|
|
10046
|
+
cameraAccessDenied = _4.cameraAccessDenied,
|
|
10047
|
+
requestCameraAccess = _4.requestCameraAccess,
|
|
10048
|
+
releaseCameraAccess = _4.releaseCameraAccess;
|
|
10049
|
+
var _5 = useState(false),
|
|
10050
|
+
overlayDismissed = _5[0],
|
|
10051
|
+
setOverlayDismissed = _5[1];
|
|
10052
|
+
var _6 = useContext(SubmissionContext),
|
|
10053
|
+
submissionStatus = _6.submissionStatus,
|
|
10054
|
+
setIdFrontImage = _6.setIdFrontImage,
|
|
10055
|
+
setIdBackImage = _6.setIdBackImage,
|
|
10056
|
+
setPassportImage = _6.setPassportImage,
|
|
10057
|
+
logIdFrontCaptureAttempt = _6.logIdFrontCaptureAttempt,
|
|
10058
|
+
logIdBackCaptureAttempt = _6.logIdBackCaptureAttempt;
|
|
10059
|
+
var _7 = useContext(IdCaptureModelsContext),
|
|
10060
|
+
start = _7.start,
|
|
10061
|
+
stop = _7.stop,
|
|
10062
|
+
onPredictionMade = _7.onPredictionMade,
|
|
10063
|
+
setRequiredDocumentType = _7.setRequiredDocumentType,
|
|
10064
|
+
modelError = _7.modelError,
|
|
10065
|
+
resetBestFrame = _7.resetBestFrame;
|
|
9973
10066
|
useEffect(function () {
|
|
9974
10067
|
dispatch({
|
|
9975
10068
|
type: 'configureWizard',
|
|
@@ -10061,9 +10154,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10061
10154
|
type: 'resetWizard'
|
|
10062
10155
|
});
|
|
10063
10156
|
}, [dispatch]);
|
|
10064
|
-
var
|
|
10065
|
-
attempt =
|
|
10066
|
-
setAttempt =
|
|
10157
|
+
var _8 = useState(0),
|
|
10158
|
+
attempt = _8[0],
|
|
10159
|
+
setAttempt = _8[1];
|
|
10067
10160
|
var onExit = useCallback(function () {
|
|
10068
10161
|
releaseCameraAccess();
|
|
10069
10162
|
setOverlayDismissed(false);
|
|
@@ -10089,27 +10182,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10089
10182
|
});
|
|
10090
10183
|
}
|
|
10091
10184
|
}, [cameraAccessDenied]);
|
|
10092
|
-
assets.idCardFront || (assets.idCardFront = {});
|
|
10093
|
-
(_h = assets.idCardFront).portraitGuidesImageUrl || (_h.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Portrait-Borderless.svg"));
|
|
10094
|
-
(_j = assets.idCardFront).landscapeGuidesImageUrl || (_j.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
10095
|
-
assets.idCardBack || (assets.idCardBack = {});
|
|
10096
|
-
(_k = assets.idCardBack).portraitGuidesImageUrl || (_k.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Portrait-Borderless.svg"));
|
|
10097
|
-
(_l = assets.idCardBack).landscapeGuidesImageUrl || (_l.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
10098
|
-
assets.passport || (assets.passport = {});
|
|
10099
|
-
(_m = assets.passport).portraitGuidesImageUrl || (_m.portraitGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Portrait-2.svg"));
|
|
10100
|
-
(_o = assets.passport).landscapeGuidesImageUrl || (_o.landscapeGuidesImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-Passport-Front-SVG-Landscape-2.svg"));
|
|
10101
|
-
assets.guides || (assets.guides = {});
|
|
10102
|
-
(_p = assets.guides).idCardFrontPortraitImageUrl || (_p.idCardFrontPortraitImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
10103
|
-
(_q = assets.guides).idCardFrontLandscapeImageUrl || (_q.idCardFrontLandscapeImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
10104
|
-
(_r = assets.guides).idCardBackPortraitImageUrl || (_r.idCardBackPortraitImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
10105
|
-
(_s = assets.guides).idCardBackLandscapeImageUrl || (_s.idCardBackLandscapeImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
10106
|
-
(_t = assets.guides).passportPortraitImageUrl || (_t.passportPortraitImageUrl = assets.passport.portraitGuidesImageUrl);
|
|
10107
|
-
(_u = assets.guides).passportLandscapeImageUrl || (_u.passportLandscapeImageUrl = assets.passport.landscapeGuidesImageUrl);
|
|
10108
|
-
(_v = assets.guides).flipIdPrompt || (_v.flipIdPrompt = {});
|
|
10109
|
-
(_w = assets.guides.flipIdPrompt).idCardFrontPortraitImageUrl || (_w.idCardFrontPortraitImageUrl = assets.idCardFront.portraitGuidesImageUrl);
|
|
10110
|
-
(_x = assets.guides.flipIdPrompt).idCardFrontLandscapeImageUrl || (_x.idCardFrontLandscapeImageUrl = assets.idCardFront.landscapeGuidesImageUrl);
|
|
10111
|
-
(_y = assets.guides.flipIdPrompt).idCardBackPortraitImageUrl || (_y.idCardBackPortraitImageUrl = assets.idCardBack.portraitGuidesImageUrl);
|
|
10112
|
-
(_z = assets.guides.flipIdPrompt).idCardBackLandscapeImageUrl || (_z.idCardBackLandscapeImageUrl = assets.idCardBack.landscapeGuidesImageUrl);
|
|
10113
10185
|
var idCaptureVerbiages = {
|
|
10114
10186
|
idCardFront: useTranslations(verbiage.idCardFront, {
|
|
10115
10187
|
instructionText: 'Scan the front of ID',
|
|
@@ -10123,7 +10195,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10123
10195
|
})
|
|
10124
10196
|
};
|
|
10125
10197
|
var theme = useTheme();
|
|
10126
|
-
var idCaptureAssets = assets[state.requestedDocumentType];
|
|
10127
10198
|
var idCaptureVerbiage = idCaptureVerbiages[state.requestedDocumentType];
|
|
10128
10199
|
useEffect(function () {
|
|
10129
10200
|
if (separateIdCardCaptureSequence) return;
|
|
@@ -10176,9 +10247,9 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10176
10247
|
});
|
|
10177
10248
|
});
|
|
10178
10249
|
}, [dispatch]);
|
|
10179
|
-
var
|
|
10180
|
-
progressStarted =
|
|
10181
|
-
setProgressStarted =
|
|
10250
|
+
var _9 = useState(false),
|
|
10251
|
+
progressStarted = _9[0],
|
|
10252
|
+
setProgressStarted = _9[1];
|
|
10182
10253
|
useEffect(function () {
|
|
10183
10254
|
if (state.captureState === 'capturing') {
|
|
10184
10255
|
setProgressStarted(false);
|
|
@@ -10208,7 +10279,6 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10208
10279
|
requiredDocumentType: state.requestedDocumentType,
|
|
10209
10280
|
thresholds: thresholds,
|
|
10210
10281
|
onCapture: onCapture,
|
|
10211
|
-
assets: idCaptureAssets,
|
|
10212
10282
|
classNames: classNames === null || classNames === void 0 ? void 0 : classNames.capture,
|
|
10213
10283
|
colors: colors,
|
|
10214
10284
|
verbiage: idCaptureVerbiage,
|
|
@@ -10220,7 +10290,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
10220
10290
|
progress: progressStarted && state.captureState === 'capturing' ? 1 : 0,
|
|
10221
10291
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
10222
10292
|
requestedAction: requestedAction,
|
|
10223
|
-
|
|
10293
|
+
images: guideImages,
|
|
10224
10294
|
classNames: classNames.guides,
|
|
10225
10295
|
colors: colors,
|
|
10226
10296
|
verbiage: idCaptureVerbiage,
|
|
@@ -12381,42 +12451,6 @@ var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
|
12381
12451
|
}));
|
|
12382
12452
|
};
|
|
12383
12453
|
|
|
12384
|
-
var GuideOrientationProvider = function GuideOrientationProvider(_a) {
|
|
12385
|
-
var children = _a.children;
|
|
12386
|
-
var setDimensions = useState({
|
|
12387
|
-
width: 1,
|
|
12388
|
-
height: 1
|
|
12389
|
-
})[1];
|
|
12390
|
-
var _b = useState(1),
|
|
12391
|
-
imageAspectRatio = _b[0],
|
|
12392
|
-
setImageAspectRatio = _b[1];
|
|
12393
|
-
var _c = useResizeObserver(),
|
|
12394
|
-
wrapperRef = _c.ref,
|
|
12395
|
-
_d = _c.width,
|
|
12396
|
-
wrapperWidth = _d === void 0 ? 1 : _d,
|
|
12397
|
-
_e = _c.height,
|
|
12398
|
-
wrapperHeight = _e === void 0 ? 1 : _e;
|
|
12399
|
-
var wrapperAspectRatio = wrapperWidth / wrapperHeight;
|
|
12400
|
-
var onImageLoaded = useCallback(function (e) {
|
|
12401
|
-
var img = e.target;
|
|
12402
|
-
setImageAspectRatio(img.naturalWidth / img.naturalHeight);
|
|
12403
|
-
}, []);
|
|
12404
|
-
var orientation = 'landscape'; //width > height ? 'landscape' : 'portrait'
|
|
12405
|
-
var value = {
|
|
12406
|
-
orientation: orientation,
|
|
12407
|
-
wrapperWidth: wrapperWidth,
|
|
12408
|
-
wrapperHeight: wrapperHeight,
|
|
12409
|
-
wrapperAspectRatio: wrapperAspectRatio,
|
|
12410
|
-
imageAspectRatio: imageAspectRatio,
|
|
12411
|
-
setDimensions: setDimensions,
|
|
12412
|
-
wrapperRef: wrapperRef,
|
|
12413
|
-
onImageLoaded: onImageLoaded
|
|
12414
|
-
};
|
|
12415
|
-
return /*#__PURE__*/React__default.createElement(GuideOrientationContext.Provider, {
|
|
12416
|
-
value: value
|
|
12417
|
-
}, children);
|
|
12418
|
-
};
|
|
12419
|
-
|
|
12420
12454
|
var SubmissionSuccess = function SubmissionSuccess() {
|
|
12421
12455
|
var _a = useContext(SubmissionContext),
|
|
12422
12456
|
submissionRequest = _a.submissionRequest,
|
|
@@ -13516,15 +13550,13 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13516
13550
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
13517
13551
|
_2 = _a.idCardCaptureProgress,
|
|
13518
13552
|
idCardCaptureProgress = _2 === void 0 ? 0 : _2,
|
|
13519
|
-
_3 = _a.
|
|
13520
|
-
|
|
13553
|
+
_3 = _a.idCardCaptureGuideImages,
|
|
13554
|
+
userSuppliedImages = _3 === void 0 ? defaultIdCaptureGuideImages : _3,
|
|
13521
13555
|
_4 = _a.classNames,
|
|
13522
13556
|
classNames = _4 === void 0 ? {} : _4,
|
|
13523
13557
|
_5 = _a.verbiage,
|
|
13524
13558
|
rawVerbiage = _5 === void 0 ? {} : _5;
|
|
13525
13559
|
var cameraRef = useContext(CameraStateContext).cameraRef;
|
|
13526
|
-
assets.frontImageUrl || (assets.frontImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Front-SVG-Landscape-Borderless.svg"));
|
|
13527
|
-
assets.backImageUrl || (assets.backImageUrl = "".concat(DEFAULT_CDN_URL, "/Shieldout-IDCard-Back-SVG-Landscape-Borderless.svg"));
|
|
13528
13560
|
var verbiage = useTranslations(rawVerbiage, {
|
|
13529
13561
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
13530
13562
|
idBackInstructionText: 'Display the back of your ID card...',
|
|
@@ -13543,14 +13575,19 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13543
13575
|
idCardGuideWidth = _7 === void 0 ? 0 : _7,
|
|
13544
13576
|
_8 = _6.height,
|
|
13545
13577
|
idCardGuideHeight = _8 === void 0 ? 0 : _8;
|
|
13578
|
+
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
13579
|
+
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
13546
13580
|
var _9 = useState(undefined),
|
|
13547
13581
|
aspectRatio = _9[0],
|
|
13548
13582
|
setAspectRatio = _9[1];
|
|
13549
|
-
|
|
13550
|
-
var _a;
|
|
13583
|
+
var onImageLoaded = useCallback(function (e) {
|
|
13584
|
+
var _a, _b, _c, _d;
|
|
13551
13585
|
var img = e.currentTarget;
|
|
13552
|
-
|
|
13553
|
-
|
|
13586
|
+
var imageByUrl = idCaptureGuideImagesByUrl[img.src];
|
|
13587
|
+
var naturalWidth = (_b = (_a = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.width) !== null && _a !== void 0 ? _a : img.naturalWidth) !== null && _b !== void 0 ? _b : 0;
|
|
13588
|
+
var naturalHeight = (_d = (_c = imageByUrl === null || imageByUrl === void 0 ? void 0 : imageByUrl.height) !== null && _c !== void 0 ? _c : img.naturalHeight) !== null && _d !== void 0 ? _d : 0;
|
|
13589
|
+
setAspectRatio(naturalHeight > 0 ? naturalWidth / naturalHeight : undefined);
|
|
13590
|
+
}, [idCaptureGuideImagesByUrl]);
|
|
13554
13591
|
var idCardImageStyle = useMemo(function () {
|
|
13555
13592
|
return {
|
|
13556
13593
|
maxWidth: idCardGuideWidth > 0 ? idCardGuideWidth : undefined,
|
|
@@ -13590,10 +13627,10 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
13590
13627
|
className: classNames.idCardGuideImage,
|
|
13591
13628
|
"$isMirrored": !((_t = cameraRef.current) === null || _t === void 0 ? void 0 : _t.isRearFacing),
|
|
13592
13629
|
style: idCardImageStyle,
|
|
13593
|
-
src: requestedAction === 'SHOW_ID_BACK' ?
|
|
13630
|
+
src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
13594
13631
|
onLoad: onImageLoaded
|
|
13595
13632
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__default.createElement(IdVideoCaptureFlipIdPrompt, {
|
|
13596
|
-
|
|
13633
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
13597
13634
|
classNames: classNames.flipIdPrompt,
|
|
13598
13635
|
borderWidth: idCardGuideBorderWidth,
|
|
13599
13636
|
borderColor: idCardGuideBorderColor,
|
|
@@ -13756,27 +13793,27 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
13756
13793
|
onExitCapture = _a.onExitCapture,
|
|
13757
13794
|
_y = _a.idCaptureModelsEnabled,
|
|
13758
13795
|
idCaptureModelsEnabled = _y === void 0 ? true : _y,
|
|
13759
|
-
_z = _a.
|
|
13760
|
-
|
|
13761
|
-
_0 = _a.
|
|
13762
|
-
|
|
13763
|
-
_1 = _a.
|
|
13764
|
-
|
|
13765
|
-
_2 = _a.
|
|
13766
|
-
|
|
13796
|
+
_z = _a.idCardCaptureGuideImages,
|
|
13797
|
+
idCardCaptureGuideImages = _z === void 0 ? defaultIdCaptureGuideImages : _z,
|
|
13798
|
+
_0 = _a.idCardFrontDelay,
|
|
13799
|
+
idCardFrontDelay = _0 === void 0 ? 1000 : _0,
|
|
13800
|
+
_1 = _a.videoIdCaptureThresholds,
|
|
13801
|
+
videoIdCaptureThresholds = _1 === void 0 ? defaultVideoIdCaptureThresholds : _1,
|
|
13802
|
+
_2 = _a.skipShowIdCardBack,
|
|
13803
|
+
skipShowIdCardBack = _2 === void 0 ? false : _2,
|
|
13804
|
+
_3 = _a.captureCountdownSeconds,
|
|
13805
|
+
captureCountdownSeconds = _3 === void 0 ? 3 : _3,
|
|
13767
13806
|
readTextPrompt = _a.readTextPrompt,
|
|
13768
|
-
|
|
13769
|
-
readTextTimeoutDurationMs =
|
|
13770
|
-
|
|
13771
|
-
readTextMinReadingMs =
|
|
13772
|
-
|
|
13773
|
-
disableFaceDetectionWhileAudioCapture =
|
|
13774
|
-
|
|
13775
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
13776
|
-
|
|
13777
|
-
mergeAVStreams =
|
|
13778
|
-
_8 = _a.assets,
|
|
13779
|
-
assets = _8 === void 0 ? {} : _8,
|
|
13807
|
+
_4 = _a.readTextTimeoutDurationMs,
|
|
13808
|
+
readTextTimeoutDurationMs = _4 === void 0 ? 15000 : _4,
|
|
13809
|
+
_5 = _a.readTextMinReadingMs,
|
|
13810
|
+
readTextMinReadingMs = _5 === void 0 ? 10000 : _5,
|
|
13811
|
+
_6 = _a.disableFaceDetectionWhileAudioCapture,
|
|
13812
|
+
disableFaceDetectionWhileAudioCapture = _6 === void 0 ? false : _6,
|
|
13813
|
+
_7 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
13814
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _7 === void 0 ? 2000 : _7,
|
|
13815
|
+
_8 = _a.mergeAVStreams,
|
|
13816
|
+
mergeAVStreams = _8 === void 0 ? false : _8,
|
|
13780
13817
|
_9 = _a.classNames,
|
|
13781
13818
|
classNames = _9 === void 0 ? {} : _9,
|
|
13782
13819
|
_10 = _a.colors,
|
|
@@ -14095,13 +14132,13 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
14095
14132
|
verbiage: rawVerbiage.readTextPrompt,
|
|
14096
14133
|
onComplete: stopRecording
|
|
14097
14134
|
})) : ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(IdVideoCaptureGuides, {
|
|
14098
|
-
assets: assets.guides,
|
|
14099
14135
|
classNames: classNames.guides,
|
|
14100
14136
|
verbiage: rawVerbiage.guides,
|
|
14101
14137
|
requestedAction: requestedAction,
|
|
14102
14138
|
satisfied: satisfied,
|
|
14103
14139
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
14104
14140
|
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
14141
|
+
idCardCaptureGuideImages: idCardCaptureGuideImages,
|
|
14105
14142
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
14106
14143
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|
|
14107
14144
|
}), debugMode && capturingId && ( /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ObjectDetectionDebugOverlayDiv, {
|
|
@@ -14271,7 +14308,7 @@ var AssetSelectorOption = styled.div(templateObject_3$4 || (templateObject_3$4 =
|
|
|
14271
14308
|
var templateObject_1$4, templateObject_2$4, templateObject_3$4;
|
|
14272
14309
|
|
|
14273
14310
|
var VideoIdWizard = function VideoIdWizard(_a) {
|
|
14274
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
14311
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
14275
14312
|
var onComplete = _a.onComplete,
|
|
14276
14313
|
onExitCapture = _a.onExitCapture,
|
|
14277
14314
|
onExitAfterFailure = _a.onExitAfterFailure,
|
|
@@ -14279,29 +14316,31 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14279
14316
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
14280
14317
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
14281
14318
|
onMicrophoneAccessDenied = _a.onMicrophoneAccessDenied,
|
|
14282
|
-
|
|
14283
|
-
idCaptureProps =
|
|
14284
|
-
|
|
14285
|
-
faceLivenessProps =
|
|
14286
|
-
|
|
14287
|
-
idCaptureModelsEnabled =
|
|
14288
|
-
|
|
14289
|
-
videoIdCaptureThresholds =
|
|
14319
|
+
_l = _a.idCaptureProps,
|
|
14320
|
+
idCaptureProps = _l === void 0 ? {} : _l,
|
|
14321
|
+
_m = _a.faceLivenessProps,
|
|
14322
|
+
faceLivenessProps = _m === void 0 ? {} : _m,
|
|
14323
|
+
_o = _a.idCaptureModelsEnabled,
|
|
14324
|
+
idCaptureModelsEnabled = _o === void 0 ? true : _o,
|
|
14325
|
+
_p = _a.videoIdCaptureThresholds,
|
|
14326
|
+
videoIdCaptureThresholds = _p === void 0 ? defaultVideoIdCaptureThresholds : _p,
|
|
14290
14327
|
readTextPrompt = _a.readTextPrompt,
|
|
14291
14328
|
readTextTimeoutDurationMs = _a.readTextTimeoutDurationMs,
|
|
14292
14329
|
readTextMinReadingMs = _a.readTextMinReadingMs,
|
|
14293
|
-
|
|
14294
|
-
skipIdCapture =
|
|
14295
|
-
|
|
14296
|
-
skipShowIdCardBack =
|
|
14297
|
-
|
|
14298
|
-
skipSuccessScreen =
|
|
14299
|
-
|
|
14300
|
-
idCaptureLoadingOverlayMode =
|
|
14330
|
+
_q = _a.skipIdCapture,
|
|
14331
|
+
skipIdCapture = _q === void 0 ? false : _q,
|
|
14332
|
+
_r = _a.skipShowIdCardBack,
|
|
14333
|
+
skipShowIdCardBack = _r === void 0 ? false : _r,
|
|
14334
|
+
_s = _a.skipSuccessScreen,
|
|
14335
|
+
skipSuccessScreen = _s === void 0 ? false : _s,
|
|
14336
|
+
_t = _a.idCaptureLoadingOverlayMode,
|
|
14337
|
+
idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
|
|
14301
14338
|
customOverlayContent = _a.customOverlayContent,
|
|
14302
14339
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
14303
|
-
|
|
14304
|
-
idCaptureGuideType =
|
|
14340
|
+
_u = _a.idCaptureGuideType,
|
|
14341
|
+
idCaptureGuideType = _u === void 0 ? 'fit' : _u,
|
|
14342
|
+
_v = _a.idCaptureGuideImages,
|
|
14343
|
+
idCaptureGuideImages = _v === void 0 ? defaultIdCaptureGuideImages : _v,
|
|
14305
14344
|
_w = _a.idCapturePortraitGuidesOnMobile,
|
|
14306
14345
|
idCapturePortraitGuidesOnMobile = _w === void 0 ? true : _w,
|
|
14307
14346
|
_x = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
@@ -14405,18 +14444,18 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14405
14444
|
onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
|
|
14406
14445
|
}, [onExitCapture]);
|
|
14407
14446
|
var faceLivenessGuides = useCallback(function (_a) {
|
|
14408
|
-
var _b, _c, _d, _e
|
|
14447
|
+
var _b, _c, _d, _e;
|
|
14409
14448
|
var status = _a.status;
|
|
14410
14449
|
return /*#__PURE__*/React__default.createElement(IdVideoCaptureGuides, {
|
|
14411
|
-
|
|
14412
|
-
classNames: (
|
|
14413
|
-
verbiage: (
|
|
14450
|
+
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
14451
|
+
classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
|
|
14452
|
+
verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
|
|
14414
14453
|
requestedAction: "VERIFY_LIVENESS",
|
|
14415
14454
|
faceGuideStatus: status,
|
|
14416
|
-
faceGuideBorderColor: status === 'success' ? (
|
|
14455
|
+
faceGuideBorderColor: status === 'success' ? (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesSatisfiedColor : (_e = colors.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guidesUnsatisfiedColor,
|
|
14417
14456
|
idCardGuideStatus: "disabled"
|
|
14418
14457
|
});
|
|
14419
|
-
}, [(_b =
|
|
14458
|
+
}, [(_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides, (_c = colors.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guidesSatisfiedColor, (_d = colors.idVideoCapture) === null || _d === void 0 ? void 0 : _d.guidesUnsatisfiedColor, idCaptureGuideImages, (_e = verbiage.idVideoCapture) === null || _e === void 0 ? void 0 : _e.guides]);
|
|
14420
14459
|
if (submissionStatus === SubmissionStatus.SUBMITTING) {
|
|
14421
14460
|
return /*#__PURE__*/React__default.createElement(PageContainer, {
|
|
14422
14461
|
className: "flex"
|
|
@@ -14434,8 +14473,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14434
14473
|
debugMode: debugMode
|
|
14435
14474
|
}, /*#__PURE__*/React__default.createElement(IdCaptureModelsProvider, {
|
|
14436
14475
|
autoStart: false,
|
|
14437
|
-
documentDetectionModelUrl: (
|
|
14438
|
-
focusModelUrl: (
|
|
14476
|
+
documentDetectionModelUrl: (_g = (_f = idCaptureProps.assets) === null || _f === void 0 ? void 0 : _f.documentDetectionModelUrl) !== null && _g !== void 0 ? _g : '',
|
|
14477
|
+
focusModelUrl: (_j = (_h = idCaptureProps.assets) === null || _h === void 0 ? void 0 : _h.focusModelUrl) !== null && _j !== void 0 ? _j : '',
|
|
14439
14478
|
onModelError: onIdCaptureModelError,
|
|
14440
14479
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs
|
|
14441
14480
|
}, /*#__PURE__*/React__default.createElement(SelfieGuidanceModelsProvider, {
|
|
@@ -14443,18 +14482,19 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14443
14482
|
onModelError: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onModelError,
|
|
14444
14483
|
modelLoadTimeoutMs: faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.modelLoadTimeoutMs
|
|
14445
14484
|
}, /*#__PURE__*/React__default.createElement(PageContainer, {
|
|
14446
|
-
className: "flex ".concat((
|
|
14485
|
+
className: "flex ".concat((_k = classNames.container) !== null && _k !== void 0 ? _k : '')
|
|
14447
14486
|
}, ['CHECKING_LIVENESS', 'CAPTURING_VIDEO'].includes(captureState) && /*#__PURE__*/React__default.createElement(CameraVideoTag, {
|
|
14448
14487
|
className: classNames.cameraFeed
|
|
14449
14488
|
}), function () {
|
|
14450
14489
|
switch (captureState) {
|
|
14451
14490
|
case 'CAPTURING_ID':
|
|
14452
|
-
return /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(
|
|
14491
|
+
return /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard, _assign({
|
|
14453
14492
|
key: "id-capture-".concat(attempt),
|
|
14454
14493
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
14455
14494
|
customOverlayContent: customOverlayContent,
|
|
14456
14495
|
onCustomOverlyDismissed: onCustomOverlyDismissed,
|
|
14457
|
-
silentFallback: silentFallback
|
|
14496
|
+
silentFallback: silentFallback,
|
|
14497
|
+
guideImages: idCaptureGuideImages
|
|
14458
14498
|
}, idCaptureProps, {
|
|
14459
14499
|
assets: assets.idCapture,
|
|
14460
14500
|
classNames: classNames.idCapture,
|
|
@@ -14504,6 +14544,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14504
14544
|
onRecordingFailed: onRecordingFailed,
|
|
14505
14545
|
onExitCapture: handleExitCapture,
|
|
14506
14546
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
14547
|
+
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
14507
14548
|
videoIdCaptureThresholds: videoIdCaptureThresholds,
|
|
14508
14549
|
skipShowIdCardBack: skipShowIdCardBack,
|
|
14509
14550
|
disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
|
|
@@ -14512,7 +14553,6 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14512
14553
|
readTextTimeoutDurationMs: readTextTimeoutDurationMs,
|
|
14513
14554
|
readTextMinReadingMs: readTextMinReadingMs,
|
|
14514
14555
|
mergeAVStreams: mergeAVStreams,
|
|
14515
|
-
assets: assets.idVideoCapture,
|
|
14516
14556
|
classNames: classNames.idVideoCapture,
|
|
14517
14557
|
colors: colors.idVideoCapture,
|
|
14518
14558
|
verbiage: verbiage.idVideoCapture,
|
|
@@ -14536,7 +14576,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
14536
14576
|
}()))));
|
|
14537
14577
|
};
|
|
14538
14578
|
|
|
14539
|
-
|
|
14579
|
+
function CompositeWizard(_a) {
|
|
14540
14580
|
var _b, _c, _d, _e, _f;
|
|
14541
14581
|
var userChecks = _a.checks,
|
|
14542
14582
|
_g = _a.idCaptureProps,
|
|
@@ -14692,7 +14732,7 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
14692
14732
|
focusModelUrl: (_f = (_e = idCaptureProps.assets) === null || _e === void 0 ? void 0 : _e.focusModelUrl) !== null && _f !== void 0 ? _f : '',
|
|
14693
14733
|
onModelError: idCaptureProps.onModelError,
|
|
14694
14734
|
modelLoadTimeoutMs: idCaptureProps.modelLoadTimeoutMs
|
|
14695
|
-
}, /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(
|
|
14735
|
+
}, /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationContextProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard, _assign({}, idCaptureProps, {
|
|
14696
14736
|
onSuccess: onIdCaptureSuccess
|
|
14697
14737
|
}))))));
|
|
14698
14738
|
case 'VideoIdCapture':
|
|
@@ -14747,7 +14787,7 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
14747
14787
|
default:
|
|
14748
14788
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
14749
14789
|
}
|
|
14750
|
-
}
|
|
14790
|
+
}
|
|
14751
14791
|
|
|
14752
14792
|
var noneTheme = {};
|
|
14753
14793
|
var defaultTheme = {
|
|
@@ -15014,20 +15054,22 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15014
15054
|
instructions = _a.instructions,
|
|
15015
15055
|
_h = _a.guideType,
|
|
15016
15056
|
guideType = _h === void 0 ? 'fit' : _h,
|
|
15017
|
-
_j = _a.
|
|
15018
|
-
|
|
15019
|
-
_k = _a.
|
|
15020
|
-
|
|
15021
|
-
_l = _a.
|
|
15022
|
-
|
|
15023
|
-
_m = _a.
|
|
15024
|
-
|
|
15025
|
-
_o = _a.
|
|
15026
|
-
|
|
15027
|
-
_p = _a.
|
|
15028
|
-
|
|
15029
|
-
_q = _a.
|
|
15030
|
-
|
|
15057
|
+
_j = _a.guideImages,
|
|
15058
|
+
guideImages = _j === void 0 ? defaultIdCaptureGuideImages : _j,
|
|
15059
|
+
_k = _a.portraitGuidesOnMobile,
|
|
15060
|
+
portraitGuidesOnMobile = _k === void 0 ? true : _k,
|
|
15061
|
+
_l = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
15062
|
+
rotateLoadingOverlayImageWhenPortrait = _l === void 0 ? true : _l,
|
|
15063
|
+
_m = _a.modelLoadTimeoutMs,
|
|
15064
|
+
modelLoadTimeoutMs = _m === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _m,
|
|
15065
|
+
_o = _a.forceFallbackMode,
|
|
15066
|
+
forceFallbackMode = _o === void 0 ? false : _o,
|
|
15067
|
+
_p = _a.allowIdCardBackToFrontCapture,
|
|
15068
|
+
allowIdCardBackToFrontCapture = _p === void 0 ? false : _p,
|
|
15069
|
+
_q = _a.enableOverrideWrongDocumentTypeDialog,
|
|
15070
|
+
enableOverrideWrongDocumentTypeDialog = _q === void 0 ? false : _q,
|
|
15071
|
+
_r = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
15072
|
+
allowOverrideWrongDocumentTypeAfterMs = _r === void 0 ? 8000 : _r,
|
|
15031
15073
|
onBeforeSubmit = _a.onBeforeSubmit,
|
|
15032
15074
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15033
15075
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15041,28 +15083,28 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15041
15083
|
onUserCancel = _a.onUserCancel,
|
|
15042
15084
|
onModelError = _a.onModelError,
|
|
15043
15085
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
15044
|
-
|
|
15045
|
-
theme =
|
|
15046
|
-
|
|
15047
|
-
assets =
|
|
15048
|
-
|
|
15049
|
-
classNames =
|
|
15050
|
-
|
|
15051
|
-
colors =
|
|
15052
|
-
|
|
15053
|
-
verbiage =
|
|
15054
|
-
|
|
15055
|
-
captureSignature =
|
|
15056
|
-
|
|
15057
|
-
captureSignatureVideo =
|
|
15058
|
-
|
|
15059
|
-
captureAdditionalDocuments =
|
|
15060
|
-
|
|
15061
|
-
geolocationEnabled =
|
|
15062
|
-
|
|
15063
|
-
geolocationRequired =
|
|
15064
|
-
|
|
15065
|
-
debugMode =
|
|
15086
|
+
_s = _a.theme,
|
|
15087
|
+
theme = _s === void 0 ? 'default' : _s,
|
|
15088
|
+
_t = _a.assets,
|
|
15089
|
+
assets = _t === void 0 ? {} : _t,
|
|
15090
|
+
_u = _a.classNames,
|
|
15091
|
+
classNames = _u === void 0 ? {} : _u,
|
|
15092
|
+
_v = _a.colors,
|
|
15093
|
+
colors = _v === void 0 ? {} : _v,
|
|
15094
|
+
_w = _a.verbiage,
|
|
15095
|
+
verbiage = _w === void 0 ? {} : _w,
|
|
15096
|
+
_x = _a.captureSignature,
|
|
15097
|
+
captureSignature = _x === void 0 ? false : _x,
|
|
15098
|
+
_y = _a.captureSignatureVideo,
|
|
15099
|
+
captureSignatureVideo = _y === void 0 ? false : _y,
|
|
15100
|
+
_z = _a.captureAdditionalDocuments,
|
|
15101
|
+
captureAdditionalDocuments = _z === void 0 ? [] : _z,
|
|
15102
|
+
_0 = _a.geolocationEnabled,
|
|
15103
|
+
geolocationEnabled = _0 === void 0 ? true : _0,
|
|
15104
|
+
_1 = _a.geolocationRequired,
|
|
15105
|
+
geolocationRequired = _1 === void 0 ? false : _1,
|
|
15106
|
+
_2 = _a.debugMode,
|
|
15107
|
+
debugMode = _2 === void 0 ? false : _2;
|
|
15066
15108
|
useLanguage(lang);
|
|
15067
15109
|
useDebugLogging(debugMode);
|
|
15068
15110
|
var idCaptureProps = useMemo(function () {
|
|
@@ -15082,6 +15124,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15082
15124
|
allowIdCardBackToFrontCapture: allowIdCardBackToFrontCapture,
|
|
15083
15125
|
instructions: instructions,
|
|
15084
15126
|
guideType: guideType,
|
|
15127
|
+
guideImages: guideImages,
|
|
15085
15128
|
portraitGuidesOnMobile: portraitGuidesOnMobile,
|
|
15086
15129
|
rotateLoadingOverlayImageWhenPortrait: rotateLoadingOverlayImageWhenPortrait,
|
|
15087
15130
|
modelLoadTimeoutMs: modelLoadTimeoutMs,
|
|
@@ -15093,7 +15136,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15093
15136
|
verbiage: verbiage,
|
|
15094
15137
|
debugMode: debugMode
|
|
15095
15138
|
};
|
|
15096
|
-
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15139
|
+
}, [onExitCapture, onUserCancel, onModelError, precapturedDocuments, idCaptureRequirement, separateIdCardCaptureSequence, idCaptureThresholds, skipSuccessScreen, loadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, forceFallbackMode, allowIdCardBackToFrontCapture, instructions, guideType, guideImages, portraitGuidesOnMobile, rotateLoadingOverlayImageWhenPortrait, modelLoadTimeoutMs, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, assets, classNames, colors, verbiage, debugMode]);
|
|
15097
15140
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
15098
15141
|
return {
|
|
15099
15142
|
documents: captureAdditionalDocuments,
|
|
@@ -15163,7 +15206,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
15163
15206
|
onResponseReceived: onResponseReceived,
|
|
15164
15207
|
geolocationEnabled: geolocationEnabled,
|
|
15165
15208
|
geolocationRequired: geolocationRequired
|
|
15166
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15209
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
15167
15210
|
checks: useMemo(function () {
|
|
15168
15211
|
return ['IdCapture'];
|
|
15169
15212
|
}, []),
|
|
@@ -15275,7 +15318,7 @@ var FaceValidation = function FaceValidation(_a) {
|
|
|
15275
15318
|
onBeforeLivenessCheck: onBeforeSubmit,
|
|
15276
15319
|
geolocationEnabled: geolocationEnabled,
|
|
15277
15320
|
geolocationRequired: geolocationRequired
|
|
15278
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15321
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
15279
15322
|
checks: useMemo(function () {
|
|
15280
15323
|
return ['FaceLiveness'];
|
|
15281
15324
|
}, []),
|
|
@@ -15329,20 +15372,22 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15329
15372
|
idCaptureInstructions = _a.idCaptureInstructions,
|
|
15330
15373
|
_j = _a.idCaptureGuideType,
|
|
15331
15374
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
15332
|
-
_k = _a.
|
|
15333
|
-
|
|
15334
|
-
_l = _a.
|
|
15335
|
-
|
|
15336
|
-
_m = _a.
|
|
15337
|
-
|
|
15338
|
-
_o = _a.
|
|
15339
|
-
|
|
15340
|
-
_p = _a.
|
|
15341
|
-
|
|
15342
|
-
_q = _a.
|
|
15343
|
-
|
|
15344
|
-
_r = _a.
|
|
15345
|
-
|
|
15375
|
+
_k = _a.idCaptureGuideImages,
|
|
15376
|
+
idCaptureGuideImages = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
15377
|
+
_l = _a.idCapturePortraitGuidesOnMobile,
|
|
15378
|
+
idCapturePortraitGuidesOnMobile = _l === void 0 ? true : _l,
|
|
15379
|
+
_m = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15380
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
15381
|
+
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
15382
|
+
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
15383
|
+
_p = _a.selfieCaptureModelLoadTimeoutMs,
|
|
15384
|
+
selfieCaptureModelLoadTimeoutMs = _p === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _p,
|
|
15385
|
+
_q = _a.allowIdCardBackToFrontCapture,
|
|
15386
|
+
allowIdCardBackToFrontCapture = _q === void 0 ? false : _q,
|
|
15387
|
+
_r = _a.enableOverrideWrongDocumentTypeDialog,
|
|
15388
|
+
enableOverrideWrongDocumentTypeDialog = _r === void 0 ? false : _r,
|
|
15389
|
+
_s = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
15390
|
+
allowOverrideWrongDocumentTypeAfterMs = _s === void 0 ? 8000 : _s,
|
|
15346
15391
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15347
15392
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
15348
15393
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
@@ -15359,28 +15404,28 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15359
15404
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
15360
15405
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
15361
15406
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
15362
|
-
|
|
15363
|
-
captureSignature =
|
|
15364
|
-
|
|
15365
|
-
captureSignatureVideo =
|
|
15366
|
-
|
|
15367
|
-
captureAdditionalDocuments =
|
|
15368
|
-
|
|
15369
|
-
theme =
|
|
15370
|
-
|
|
15371
|
-
assets =
|
|
15372
|
-
|
|
15373
|
-
classNames =
|
|
15374
|
-
|
|
15375
|
-
colors =
|
|
15376
|
-
|
|
15377
|
-
verbiage =
|
|
15378
|
-
|
|
15379
|
-
geolocationEnabled =
|
|
15380
|
-
|
|
15381
|
-
geolocationRequired =
|
|
15382
|
-
|
|
15383
|
-
debugMode =
|
|
15407
|
+
_t = _a.captureSignature,
|
|
15408
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
15409
|
+
_u = _a.captureSignatureVideo,
|
|
15410
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
15411
|
+
_v = _a.captureAdditionalDocuments,
|
|
15412
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
15413
|
+
_w = _a.theme,
|
|
15414
|
+
theme = _w === void 0 ? 'default' : _w,
|
|
15415
|
+
_x = _a.assets,
|
|
15416
|
+
assets = _x === void 0 ? {} : _x,
|
|
15417
|
+
_y = _a.classNames,
|
|
15418
|
+
classNames = _y === void 0 ? {} : _y,
|
|
15419
|
+
_z = _a.colors,
|
|
15420
|
+
colors = _z === void 0 ? {} : _z,
|
|
15421
|
+
_0 = _a.verbiage,
|
|
15422
|
+
verbiage = _0 === void 0 ? {} : _0,
|
|
15423
|
+
_1 = _a.geolocationEnabled,
|
|
15424
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
15425
|
+
_2 = _a.geolocationRequired,
|
|
15426
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
15427
|
+
_3 = _a.debugMode,
|
|
15428
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
15384
15429
|
useLanguage(lang);
|
|
15385
15430
|
useDebugLogging(debugMode);
|
|
15386
15431
|
var idCaptureProps = useMemo(function () {
|
|
@@ -15398,6 +15443,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15398
15443
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15399
15444
|
instructions: idCaptureInstructions,
|
|
15400
15445
|
guideType: idCaptureGuideType,
|
|
15446
|
+
guideImages: idCaptureGuideImages,
|
|
15401
15447
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
15402
15448
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15403
15449
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
@@ -15407,7 +15453,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15407
15453
|
skipSuccessScreen: skipSuccessScreen,
|
|
15408
15454
|
debugMode: debugMode
|
|
15409
15455
|
};
|
|
15410
|
-
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
15456
|
+
}, [onExitCapture, onUserCancel, onIdCaptureModelError, assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, precapturedDocuments, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, skipSuccessScreen, debugMode]);
|
|
15411
15457
|
var faceLivenessProps = useMemo(function () {
|
|
15412
15458
|
return {
|
|
15413
15459
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -15499,7 +15545,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
15499
15545
|
onResponseReceived: onResponseReceived,
|
|
15500
15546
|
geolocationEnabled: geolocationEnabled,
|
|
15501
15547
|
geolocationRequired: geolocationRequired
|
|
15502
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15548
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
15503
15549
|
checks: checks,
|
|
15504
15550
|
idCaptureProps: idCaptureProps,
|
|
15505
15551
|
faceLivenessProps: faceLivenessProps,
|
|
@@ -15560,20 +15606,22 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15560
15606
|
idCaptureInstructions = _a.idCaptureInstructions,
|
|
15561
15607
|
_j = _a.idCaptureGuideType,
|
|
15562
15608
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
15563
|
-
_k = _a.
|
|
15564
|
-
|
|
15565
|
-
_l = _a.
|
|
15566
|
-
|
|
15567
|
-
_m = _a.
|
|
15568
|
-
|
|
15569
|
-
_o = _a.
|
|
15570
|
-
|
|
15571
|
-
_p = _a.
|
|
15572
|
-
|
|
15573
|
-
_q = _a.
|
|
15574
|
-
|
|
15575
|
-
_r = _a.
|
|
15576
|
-
|
|
15609
|
+
_k = _a.idCaptureGuideImages,
|
|
15610
|
+
idCaptureGuideImages = _k === void 0 ? defaultIdCaptureGuideImages : _k,
|
|
15611
|
+
_l = _a.idCapturePortraitGuidesOnMobile,
|
|
15612
|
+
idCapturePortraitGuidesOnMobile = _l === void 0 ? true : _l,
|
|
15613
|
+
_m = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15614
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _m === void 0 ? true : _m,
|
|
15615
|
+
_o = _a.idCaptureModelLoadTimeoutMs,
|
|
15616
|
+
idCaptureModelLoadTimeoutMs = _o === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _o,
|
|
15617
|
+
_p = _a.selfieCaptureModelLoadTimeoutMs,
|
|
15618
|
+
selfieCaptureModelLoadTimeoutMs = _p === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _p,
|
|
15619
|
+
_q = _a.allowIdCardBackToFrontCapture,
|
|
15620
|
+
allowIdCardBackToFrontCapture = _q === void 0 ? false : _q,
|
|
15621
|
+
_r = _a.enableOverrideWrongDocumentTypeDialog,
|
|
15622
|
+
enableOverrideWrongDocumentTypeDialog = _r === void 0 ? false : _r,
|
|
15623
|
+
_s = _a.allowOverrideWrongDocumentTypeAfterMs,
|
|
15624
|
+
allowOverrideWrongDocumentTypeAfterMs = _s === void 0 ? 8000 : _s,
|
|
15577
15625
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
15578
15626
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
15579
15627
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -15589,28 +15637,28 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15589
15637
|
onIdCaptureModelError = _a.onIdCaptureModelError,
|
|
15590
15638
|
onSelfieCaptureModelError = _a.onSelfieCaptureModelError,
|
|
15591
15639
|
onCameraAccessDenied = _a.onCameraAccessDenied,
|
|
15592
|
-
|
|
15593
|
-
captureSignature =
|
|
15594
|
-
|
|
15595
|
-
captureSignatureVideo =
|
|
15596
|
-
|
|
15597
|
-
captureAdditionalDocuments =
|
|
15598
|
-
|
|
15599
|
-
theme =
|
|
15600
|
-
|
|
15601
|
-
assets =
|
|
15602
|
-
|
|
15603
|
-
classNames =
|
|
15604
|
-
|
|
15605
|
-
colors =
|
|
15606
|
-
|
|
15607
|
-
verbiage =
|
|
15608
|
-
|
|
15609
|
-
geolocationEnabled =
|
|
15610
|
-
|
|
15611
|
-
geolocationRequired =
|
|
15612
|
-
|
|
15613
|
-
debugMode =
|
|
15640
|
+
_t = _a.captureSignature,
|
|
15641
|
+
captureSignature = _t === void 0 ? false : _t,
|
|
15642
|
+
_u = _a.captureSignatureVideo,
|
|
15643
|
+
captureSignatureVideo = _u === void 0 ? false : _u,
|
|
15644
|
+
_v = _a.captureAdditionalDocuments,
|
|
15645
|
+
captureAdditionalDocuments = _v === void 0 ? [] : _v,
|
|
15646
|
+
_w = _a.theme,
|
|
15647
|
+
theme = _w === void 0 ? 'default' : _w,
|
|
15648
|
+
_x = _a.assets,
|
|
15649
|
+
assets = _x === void 0 ? {} : _x,
|
|
15650
|
+
_y = _a.classNames,
|
|
15651
|
+
classNames = _y === void 0 ? {} : _y,
|
|
15652
|
+
_z = _a.colors,
|
|
15653
|
+
colors = _z === void 0 ? {} : _z,
|
|
15654
|
+
_0 = _a.verbiage,
|
|
15655
|
+
verbiage = _0 === void 0 ? {} : _0,
|
|
15656
|
+
_1 = _a.geolocationEnabled,
|
|
15657
|
+
geolocationEnabled = _1 === void 0 ? true : _1,
|
|
15658
|
+
_2 = _a.geolocationRequired,
|
|
15659
|
+
geolocationRequired = _2 === void 0 ? false : _2,
|
|
15660
|
+
_3 = _a.debugMode,
|
|
15661
|
+
debugMode = _3 === void 0 ? false : _3;
|
|
15614
15662
|
useLanguage(lang);
|
|
15615
15663
|
useDebugLogging(debugMode);
|
|
15616
15664
|
var idCaptureProps = useMemo(function () {
|
|
@@ -15624,6 +15672,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15624
15672
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15625
15673
|
instructions: idCaptureInstructions,
|
|
15626
15674
|
guideType: idCaptureGuideType,
|
|
15675
|
+
guideImages: idCaptureGuideImages,
|
|
15627
15676
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
15628
15677
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15629
15678
|
modelLoadTimeoutMs: idCaptureModelLoadTimeoutMs,
|
|
@@ -15636,7 +15685,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15636
15685
|
skipSuccessScreen: skipSuccessScreen,
|
|
15637
15686
|
debugMode: debugMode
|
|
15638
15687
|
};
|
|
15639
|
-
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
15688
|
+
}, [assets.idCapture, classNames.idCapture, colors.idCapture, verbiage.idCapture, idCaptureRequirement, idCaptureThresholds, idCaptureLoadingOverlayMode, idCaptureInstructions, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, idCaptureModelLoadTimeoutMs, allowIdCardBackToFrontCapture, enableOverrideWrongDocumentTypeDialog, allowOverrideWrongDocumentTypeAfterMs, onExitCapture, onUserCancel, onIdCaptureModelError, skipSuccessScreen, debugMode]);
|
|
15640
15689
|
var faceLivenessProps = useMemo(function () {
|
|
15641
15690
|
return {
|
|
15642
15691
|
onExitCapture: onExitCapture,
|
|
@@ -15726,7 +15775,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
15726
15775
|
onResponseReceived: onResponseReceived,
|
|
15727
15776
|
geolocationEnabled: geolocationEnabled,
|
|
15728
15777
|
geolocationRequired: geolocationRequired
|
|
15729
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
15778
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
15730
15779
|
checks: useMemo(function () {
|
|
15731
15780
|
return ['IdCapture', 'FaceLiveness'];
|
|
15732
15781
|
}, []),
|
|
@@ -16920,7 +16969,7 @@ var SignatureKYC = function SignatureKYC(_a) {
|
|
|
16920
16969
|
onResponseReceived: onComplete,
|
|
16921
16970
|
geolocationEnabled: geolocationEnabled,
|
|
16922
16971
|
geolocationRequired: geolocationRequired
|
|
16923
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
16972
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
16924
16973
|
checks: useMemo(function () {
|
|
16925
16974
|
return ['VideoSignatureCapture'];
|
|
16926
16975
|
}, []),
|
|
@@ -17007,43 +17056,45 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17007
17056
|
onCustomOverlyDismissed = _a.onCustomOverlyDismissed,
|
|
17008
17057
|
_l = _a.idCaptureGuideType,
|
|
17009
17058
|
idCaptureGuideType = _l === void 0 ? 'fit' : _l,
|
|
17010
|
-
_m = _a.
|
|
17011
|
-
|
|
17012
|
-
_o = _a.
|
|
17013
|
-
|
|
17059
|
+
_m = _a.idCaptureGuideImages,
|
|
17060
|
+
idCaptureGuideImages = _m === void 0 ? defaultIdCaptureGuideImages : _m,
|
|
17061
|
+
_o = _a.idCapturePortraitGuidesOnMobile,
|
|
17062
|
+
idCapturePortraitGuidesOnMobile = _o === void 0 ? true : _o,
|
|
17063
|
+
_p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
17064
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
|
|
17014
17065
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
17015
|
-
|
|
17016
|
-
faceLivenessLoadingOverlayMode =
|
|
17017
|
-
|
|
17018
|
-
disableFaceDetectionWhileAudioCapture =
|
|
17019
|
-
|
|
17020
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
17021
|
-
|
|
17022
|
-
silentFallback =
|
|
17023
|
-
|
|
17024
|
-
mergeAVStreams =
|
|
17025
|
-
|
|
17026
|
-
theme =
|
|
17027
|
-
|
|
17028
|
-
assets =
|
|
17029
|
-
|
|
17030
|
-
classNames =
|
|
17031
|
-
|
|
17032
|
-
colors =
|
|
17033
|
-
|
|
17034
|
-
verbiage =
|
|
17035
|
-
|
|
17036
|
-
captureSignature =
|
|
17037
|
-
|
|
17038
|
-
captureSignatureVideo =
|
|
17039
|
-
|
|
17040
|
-
captureAdditionalDocuments =
|
|
17041
|
-
|
|
17042
|
-
geolocationEnabled =
|
|
17043
|
-
|
|
17044
|
-
geolocationRequired =
|
|
17045
|
-
|
|
17046
|
-
debugMode =
|
|
17066
|
+
_q = _a.faceLivenessLoadingOverlayMode,
|
|
17067
|
+
faceLivenessLoadingOverlayMode = _q === void 0 ? 'default' : _q,
|
|
17068
|
+
_r = _a.disableFaceDetectionWhileAudioCapture,
|
|
17069
|
+
disableFaceDetectionWhileAudioCapture = _r === void 0 ? false : _r,
|
|
17070
|
+
_s = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
17071
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _s === void 0 ? 2000 : _s,
|
|
17072
|
+
_t = _a.silentFallback,
|
|
17073
|
+
silentFallback = _t === void 0 ? false : _t,
|
|
17074
|
+
_u = _a.mergeAVStreams,
|
|
17075
|
+
mergeAVStreams = _u === void 0 ? false : _u,
|
|
17076
|
+
_v = _a.theme,
|
|
17077
|
+
theme = _v === void 0 ? 'default' : _v,
|
|
17078
|
+
_w = _a.assets,
|
|
17079
|
+
assets = _w === void 0 ? {} : _w,
|
|
17080
|
+
_x = _a.classNames,
|
|
17081
|
+
classNames = _x === void 0 ? {} : _x,
|
|
17082
|
+
_y = _a.colors,
|
|
17083
|
+
colors = _y === void 0 ? {} : _y,
|
|
17084
|
+
_z = _a.verbiage,
|
|
17085
|
+
verbiage = _z === void 0 ? {} : _z,
|
|
17086
|
+
_0 = _a.captureSignature,
|
|
17087
|
+
captureSignature = _0 === void 0 ? false : _0,
|
|
17088
|
+
_1 = _a.captureSignatureVideo,
|
|
17089
|
+
captureSignatureVideo = _1 === void 0 ? false : _1,
|
|
17090
|
+
_2 = _a.captureAdditionalDocuments,
|
|
17091
|
+
captureAdditionalDocuments = _2 === void 0 ? [] : _2,
|
|
17092
|
+
_3 = _a.geolocationEnabled,
|
|
17093
|
+
geolocationEnabled = _3 === void 0 ? true : _3,
|
|
17094
|
+
_4 = _a.geolocationRequired,
|
|
17095
|
+
geolocationRequired = _4 === void 0 ? false : _4,
|
|
17096
|
+
_5 = _a.debugMode,
|
|
17097
|
+
debugMode = _5 === void 0 ? false : _5;
|
|
17047
17098
|
useLanguage(lang);
|
|
17048
17099
|
useDebugLogging(debugMode);
|
|
17049
17100
|
var videoIdCaptureProps = useMemo(function () {
|
|
@@ -17065,6 +17116,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17065
17116
|
customOverlayContent: customOverlayContent,
|
|
17066
17117
|
onCustomOverlyDismissed: onCustomOverlyDismissed,
|
|
17067
17118
|
idCaptureGuideType: idCaptureGuideType,
|
|
17119
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
17068
17120
|
idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
17069
17121
|
idCaptureRotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
17070
17122
|
faceLivenessLoadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
@@ -17078,7 +17130,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17078
17130
|
verbiage: verbiage,
|
|
17079
17131
|
debugMode: debugMode
|
|
17080
17132
|
};
|
|
17081
|
-
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
17133
|
+
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onCustomOverlyDismissed, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
17082
17134
|
var additionalDocumentCaptureProps = useMemo(function () {
|
|
17083
17135
|
return {
|
|
17084
17136
|
documents: captureAdditionalDocuments,
|
|
@@ -17141,7 +17193,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
17141
17193
|
onResponseReceived: onComplete,
|
|
17142
17194
|
geolocationEnabled: geolocationEnabled,
|
|
17143
17195
|
geolocationRequired: geolocationRequired
|
|
17144
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
17196
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
17145
17197
|
checks: useMemo(function () {
|
|
17146
17198
|
return ['VideoIdCapture'];
|
|
17147
17199
|
}, []),
|
|
@@ -17300,7 +17352,7 @@ var CustomerBiometricsEnrollment = function CustomerBiometricsEnrollment(_a) {
|
|
|
17300
17352
|
onResponseReceived: onResponseReceived,
|
|
17301
17353
|
geolocationEnabled: geolocationEnabled,
|
|
17302
17354
|
geolocationRequired: geolocationRequired
|
|
17303
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
17355
|
+
}, /*#__PURE__*/React__default.createElement(CompositeWizard, {
|
|
17304
17356
|
checks: useMemo(function () {
|
|
17305
17357
|
return ['FaceLiveness'];
|
|
17306
17358
|
}, []),
|