idmission-web-sdk 2.2.51 → 2.2.53
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/customer_flows/VideoIdValidation.d.ts +2 -0
- package/dist/components/customer_flows/VideoIdValidation.d.ts.map +1 -1
- package/dist/components/video_id/Action.d.ts +2 -0
- package/dist/components/video_id/Action.d.ts.map +1 -0
- package/dist/components/video_id/IdVideoCapture.d.ts +5 -3
- package/dist/components/video_id/IdVideoCapture.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +6 -4
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts.map +1 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts +2 -1
- package/dist/components/video_id/IdVideoCaptureWizard.d.ts.map +1 -1
- package/dist/lib/locales/es/translation.d.ts +1 -0
- package/dist/lib/locales/es/translation.d.ts.map +1 -1
- package/dist/lib/locales/index.d.ts +1 -0
- package/dist/lib/locales/index.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +282 -243
- 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 +282 -243
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +282 -243
- 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
|
@@ -234,7 +234,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
234
234
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
235
235
|
};
|
|
236
236
|
|
|
237
|
-
var webSdkVersion = '2.2.
|
|
237
|
+
var webSdkVersion = '2.2.53';
|
|
238
238
|
|
|
239
239
|
function getPlatform() {
|
|
240
240
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -4916,6 +4916,7 @@ var esTranslation = {
|
|
|
4916
4916
|
'Performing facial recognition, please hold still...': 'Realizando el reconocimiento facial, por favor no te muevas',
|
|
4917
4917
|
'Display the front of your ID card...': 'Hay que mostrar el frente de la identificación...',
|
|
4918
4918
|
'Display the back of your ID card...': 'Hay que mostrar el reverso de la identificación...',
|
|
4919
|
+
'Display the ID page of your passport...': 'Hay que mostrar el página de datos del pasaporte...',
|
|
4919
4920
|
'Please move your face to the center...': 'Por favor, hay que mover la cabeza hacia el centro...',
|
|
4920
4921
|
'Searching for ID card...': 'Localizando la identificación...',
|
|
4921
4922
|
'Please read the following text aloud': 'Hay que leer el siguiente texto en voz alta',
|
|
@@ -11736,49 +11737,52 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11736
11737
|
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
|
|
11737
11738
|
var _z = _a.requestedAction,
|
|
11738
11739
|
requestedAction = _z === void 0 ? 'SHOW_ID_FRONT' : _z,
|
|
11739
|
-
_0 = _a.
|
|
11740
|
-
|
|
11741
|
-
_1 = _a.
|
|
11742
|
-
|
|
11740
|
+
_0 = _a.idDocumentType,
|
|
11741
|
+
idDocumentType = _0 === void 0 ? 'idCard' : _0,
|
|
11742
|
+
_1 = _a.satisfied,
|
|
11743
|
+
satisfied = _1 === void 0 ? false : _1,
|
|
11744
|
+
_2 = _a.faceGuideStatus,
|
|
11745
|
+
faceGuideStatus = _2 === void 0 ? 'success' : _2,
|
|
11743
11746
|
faceGuideBorderWidth = _a.faceGuideBorderWidth,
|
|
11744
11747
|
faceGuideBorderColor = _a.faceGuideBorderColor,
|
|
11745
|
-
|
|
11746
|
-
idCardGuideStatus =
|
|
11748
|
+
_3 = _a.idCardGuideStatus,
|
|
11749
|
+
idCardGuideStatus = _3 === void 0 ? 'ready' : _3,
|
|
11747
11750
|
idCardGuideBorderWidth = _a.idCardGuideBorderWidth,
|
|
11748
11751
|
idCardGuideBorderColor = _a.idCardGuideBorderColor,
|
|
11749
11752
|
idCardCaptureProgress = _a.idCardCaptureProgress,
|
|
11750
|
-
|
|
11751
|
-
userSuppliedImages =
|
|
11752
|
-
|
|
11753
|
-
classNames =
|
|
11754
|
-
|
|
11755
|
-
rawVerbiage =
|
|
11753
|
+
_4 = _a.idCaptureGuideImages,
|
|
11754
|
+
userSuppliedImages = _4 === void 0 ? defaultIdCaptureGuideImages : _4,
|
|
11755
|
+
_5 = _a.classNames,
|
|
11756
|
+
classNames = _5 === void 0 ? {} : _5,
|
|
11757
|
+
_6 = _a.verbiage,
|
|
11758
|
+
rawVerbiage = _6 === void 0 ? {} : _6;
|
|
11756
11759
|
var isRearFacing = useCameraStore(function (state) {
|
|
11757
11760
|
return state.isRearFacing;
|
|
11758
11761
|
});
|
|
11759
11762
|
var verbiage = useTranslations(rawVerbiage, {
|
|
11760
11763
|
idFrontInstructionText: 'Display the front of your ID card...',
|
|
11761
11764
|
idBackInstructionText: 'Display the back of your ID card...',
|
|
11765
|
+
passportInstructionText: 'Display the ID page of your passport...',
|
|
11762
11766
|
flipIdInstructionText: 'Please flip your ID card...',
|
|
11763
11767
|
verifyLivenessInstructionText: 'Performing facial recognition, please hold still...'
|
|
11764
11768
|
});
|
|
11765
|
-
var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
|
|
11769
|
+
var instructionText = requestedAction === 'VERIFY_LIVENESS' ? verbiage.verifyLivenessInstructionText : requestedAction === 'SHOW_PASSPORT' ? verbiage.passportInstructionText : requestedAction === 'SHOW_ID_FRONT' ? verbiage.idFrontInstructionText : requestedAction === 'FLIP_ID' ? verbiage.flipIdInstructionText : verbiage.idBackInstructionText;
|
|
11766
11770
|
var theme = styled.useTheme();
|
|
11767
11771
|
if (faceGuideBorderWidth === undefined) faceGuideBorderWidth = (_d = (_c = (_b = theme.idVideoCapture) === null || _b === void 0 ? void 0 : _b.faceGuides) === null || _c === void 0 ? void 0 : _c.borderWidth) !== null && _d !== void 0 ? _d : 5;
|
|
11768
11772
|
if (faceGuideBorderColor === undefined) faceGuideBorderColor = (_j = satisfied ? (_f = (_e = theme.idVideoCapture) === null || _e === void 0 ? void 0 : _e.faceGuides) === null || _f === void 0 ? void 0 : _f.satisfiedColor : (_h = (_g = theme.idVideoCapture) === null || _g === void 0 ? void 0 : _g.faceGuides) === null || _h === void 0 ? void 0 : _h.unsatisfiedColor) !== null && _j !== void 0 ? _j : '#D6DCE7';
|
|
11769
11773
|
if (idCardGuideBorderWidth === undefined) idCardGuideBorderWidth = (_m = (_l = (_k = theme.idVideoCapture) === null || _k === void 0 ? void 0 : _k.idCardGuides) === null || _l === void 0 ? void 0 : _l.borderWidth) !== null && _m !== void 0 ? _m : 20;
|
|
11770
11774
|
if (idCardGuideBorderColor === undefined) idCardGuideBorderColor = (_s = satisfied ? (_p = (_o = theme.idVideoCapture) === null || _o === void 0 ? void 0 : _o.idCardGuides) === null || _p === void 0 ? void 0 : _p.satisfiedColor : (_r = (_q = theme.idVideoCapture) === null || _q === void 0 ? void 0 : _q.idCardGuides) === null || _r === void 0 ? void 0 : _r.unsatisfiedColor) !== null && _s !== void 0 ? _s : '#D6DCE7';
|
|
11771
|
-
var
|
|
11772
|
-
idCardGuideRef =
|
|
11773
|
-
|
|
11774
|
-
idCardGuideWidth =
|
|
11775
|
-
|
|
11776
|
-
idCardGuideHeight =
|
|
11775
|
+
var _7 = useResizeObserver__default.default(),
|
|
11776
|
+
idCardGuideRef = _7.ref,
|
|
11777
|
+
_8 = _7.width,
|
|
11778
|
+
idCardGuideWidth = _8 === void 0 ? 0 : _8,
|
|
11779
|
+
_9 = _7.height,
|
|
11780
|
+
idCardGuideHeight = _9 === void 0 ? 0 : _9;
|
|
11777
11781
|
var idCaptureGuideImages = useGuideImages(userSuppliedImages);
|
|
11778
11782
|
var idCaptureGuideImagesByUrl = useGuideImagesByUrl(idCaptureGuideImages);
|
|
11779
|
-
var
|
|
11780
|
-
aspectRatio =
|
|
11781
|
-
setAspectRatio =
|
|
11783
|
+
var _10 = React.useState(undefined),
|
|
11784
|
+
aspectRatio = _10[0],
|
|
11785
|
+
setAspectRatio = _10[1];
|
|
11782
11786
|
var onImageLoaded = React.useCallback(function (e) {
|
|
11783
11787
|
var _a, _b, _c, _d;
|
|
11784
11788
|
var img = e.currentTarget;
|
|
@@ -11827,7 +11831,7 @@ var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
|
|
|
11827
11831
|
className: classNames.idCardGuideImage,
|
|
11828
11832
|
"$isMirrored": !isRearFacing,
|
|
11829
11833
|
style: idCardImageStyle,
|
|
11830
|
-
src: requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
11834
|
+
src: idDocumentType === 'passport' ? idCaptureGuideImages.landscape.SHOW_PASSPORT.url : requestedAction === 'SHOW_ID_BACK' ? idCaptureGuideImages.landscape.SHOW_ID_BACK.url : idCaptureGuideImages.landscape.SHOW_ID_FRONT.url,
|
|
11831
11835
|
onLoad: onImageLoaded
|
|
11832
11836
|
})), requestedAction === 'FLIP_ID' && ( /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureFlipIdPrompt, {
|
|
11833
11837
|
idCaptureGuideImages: idCaptureGuideImages,
|
|
@@ -11962,7 +11966,7 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
11962
11966
|
detection: {
|
|
11963
11967
|
idCardFront: 0.4,
|
|
11964
11968
|
idCardBack: 0.5,
|
|
11965
|
-
passport:
|
|
11969
|
+
passport: 0.3
|
|
11966
11970
|
},
|
|
11967
11971
|
focus: {
|
|
11968
11972
|
idCardFront: {
|
|
@@ -11980,7 +11984,8 @@ var defaultVideoIdCaptureThresholds = {
|
|
|
11980
11984
|
},
|
|
11981
11985
|
goodFrames: {
|
|
11982
11986
|
idCardFront: 1,
|
|
11983
|
-
idCardBack: 1
|
|
11987
|
+
idCardBack: 1,
|
|
11988
|
+
passport: 1
|
|
11984
11989
|
},
|
|
11985
11990
|
flipShortcutThreshold: 0.7
|
|
11986
11991
|
};
|
|
@@ -11994,91 +11999,93 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
11994
11999
|
onExitCapture = _a.onExitCapture,
|
|
11995
12000
|
_w = _a.idCaptureModelsEnabled,
|
|
11996
12001
|
idCaptureModelsEnabled = _w === void 0 ? true : _w,
|
|
11997
|
-
_x = _a.
|
|
11998
|
-
|
|
11999
|
-
_y = _a.
|
|
12000
|
-
|
|
12001
|
-
_z = _a.
|
|
12002
|
-
|
|
12003
|
-
_0 = _a.
|
|
12004
|
-
|
|
12005
|
-
_1 = _a.
|
|
12006
|
-
|
|
12002
|
+
_x = _a.idDocumentType,
|
|
12003
|
+
idDocumentType = _x === void 0 ? 'idCard' : _x,
|
|
12004
|
+
_y = _a.idCaptureGuideImages,
|
|
12005
|
+
idCaptureGuideImages = _y === void 0 ? defaultIdCaptureGuideImages : _y,
|
|
12006
|
+
_z = _a.idCardFrontDelay,
|
|
12007
|
+
idCardFrontDelay = _z === void 0 ? 1000 : _z,
|
|
12008
|
+
_0 = _a.videoIdCaptureThresholds,
|
|
12009
|
+
videoIdCaptureThresholds = _0 === void 0 ? defaultVideoIdCaptureThresholds : _0,
|
|
12010
|
+
_1 = _a.skipShowIdCardBack,
|
|
12011
|
+
skipShowIdCardBack = _1 === void 0 ? false : _1,
|
|
12012
|
+
_2 = _a.captureCountdownSeconds,
|
|
12013
|
+
captureCountdownSeconds = _2 === void 0 ? 3 : _2,
|
|
12007
12014
|
readTextPrompt = _a.readTextPrompt,
|
|
12008
|
-
|
|
12009
|
-
readTextTimeoutDurationMs =
|
|
12010
|
-
|
|
12011
|
-
readTextMinReadingMs =
|
|
12012
|
-
|
|
12013
|
-
disableFaceDetectionWhileAudioCapture =
|
|
12014
|
-
|
|
12015
|
-
disableFaceDetectionWhileAudioCaptureMsDelay =
|
|
12016
|
-
|
|
12017
|
-
mergeAVStreams =
|
|
12018
|
-
|
|
12019
|
-
classNames =
|
|
12020
|
-
|
|
12021
|
-
colors =
|
|
12022
|
-
|
|
12023
|
-
rawVerbiage =
|
|
12024
|
-
|
|
12025
|
-
debugMode =
|
|
12026
|
-
var
|
|
12027
|
-
ref =
|
|
12028
|
-
|
|
12029
|
-
width =
|
|
12030
|
-
|
|
12031
|
-
height =
|
|
12032
|
-
var
|
|
12033
|
-
camera =
|
|
12034
|
-
videoRef =
|
|
12035
|
-
videoLoaded =
|
|
12036
|
-
cameraReady =
|
|
12037
|
-
microphoneReady =
|
|
12038
|
-
audioStream =
|
|
12039
|
-
isRearFacing =
|
|
12040
|
-
releaseCameraAccess =
|
|
12041
|
-
var
|
|
12042
|
-
detectedObjects =
|
|
12043
|
-
setDetectedObjects =
|
|
12044
|
-
var
|
|
12045
|
-
face =
|
|
12046
|
-
setFace =
|
|
12047
|
-
var
|
|
12048
|
-
idModelsReady =
|
|
12049
|
-
startIdModels =
|
|
12050
|
-
stopIdModels =
|
|
12051
|
-
onIdPredictionMade =
|
|
12052
|
-
setThresholds =
|
|
12053
|
-
setDocumentDetectionBoundaries =
|
|
12054
|
-
bestFrameDetails =
|
|
12055
|
-
resetBestFrame =
|
|
12056
|
-
idModelError =
|
|
12057
|
-
var
|
|
12058
|
-
videoStartsAt =
|
|
12059
|
-
setVideoStartsAt =
|
|
12060
|
-
var
|
|
12061
|
-
setIdCaptureVideoAudioStartsAt =
|
|
12062
|
-
setExpectedAudioText =
|
|
12063
|
-
var
|
|
12064
|
-
startSelfieGuidance =
|
|
12065
|
-
stopSelfieGuidance =
|
|
12066
|
-
onSelfiePredictionMade =
|
|
12067
|
-
selfieModelError =
|
|
12068
|
-
var
|
|
12069
|
-
isRecordingVideo =
|
|
12070
|
-
startRecordingVideo =
|
|
12071
|
-
startRecordingAudio =
|
|
12072
|
-
stopRecordingVideo =
|
|
12073
|
-
stopRecordingAudio =
|
|
12074
|
-
videoRecordingUnintentionallyStopped =
|
|
12075
|
-
audioRecordingUnintentionallyStopped =
|
|
12076
|
-
videoUrl =
|
|
12077
|
-
audioUrl =
|
|
12015
|
+
_3 = _a.readTextTimeoutDurationMs,
|
|
12016
|
+
readTextTimeoutDurationMs = _3 === void 0 ? 15000 : _3,
|
|
12017
|
+
_4 = _a.readTextMinReadingMs,
|
|
12018
|
+
readTextMinReadingMs = _4 === void 0 ? 10000 : _4,
|
|
12019
|
+
_5 = _a.disableFaceDetectionWhileAudioCapture,
|
|
12020
|
+
disableFaceDetectionWhileAudioCapture = _5 === void 0 ? false : _5,
|
|
12021
|
+
_6 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
12022
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _6 === void 0 ? 2000 : _6,
|
|
12023
|
+
_7 = _a.mergeAVStreams,
|
|
12024
|
+
mergeAVStreams = _7 === void 0 ? false : _7,
|
|
12025
|
+
_8 = _a.classNames,
|
|
12026
|
+
classNames = _8 === void 0 ? {} : _8,
|
|
12027
|
+
_9 = _a.colors,
|
|
12028
|
+
colors = _9 === void 0 ? {} : _9,
|
|
12029
|
+
_10 = _a.verbiage,
|
|
12030
|
+
rawVerbiage = _10 === void 0 ? {} : _10,
|
|
12031
|
+
_11 = _a.debugMode,
|
|
12032
|
+
debugMode = _11 === void 0 ? false : _11;
|
|
12033
|
+
var _12 = useResizeObserver__default.default(),
|
|
12034
|
+
ref = _12.ref,
|
|
12035
|
+
_13 = _12.width,
|
|
12036
|
+
width = _13 === void 0 ? 1 : _13,
|
|
12037
|
+
_14 = _12.height,
|
|
12038
|
+
height = _14 === void 0 ? 1 : _14;
|
|
12039
|
+
var _15 = useCameraStore(),
|
|
12040
|
+
camera = _15.camera,
|
|
12041
|
+
videoRef = _15.videoRef,
|
|
12042
|
+
videoLoaded = _15.videoLoaded,
|
|
12043
|
+
cameraReady = _15.cameraReady,
|
|
12044
|
+
microphoneReady = _15.microphoneReady,
|
|
12045
|
+
audioStream = _15.audioStream,
|
|
12046
|
+
isRearFacing = _15.isRearFacing,
|
|
12047
|
+
releaseCameraAccess = _15.releaseCameraAccess;
|
|
12048
|
+
var _16 = React.useState([]),
|
|
12049
|
+
detectedObjects = _16[0],
|
|
12050
|
+
setDetectedObjects = _16[1];
|
|
12051
|
+
var _17 = React.useState(null),
|
|
12052
|
+
face = _17[0],
|
|
12053
|
+
setFace = _17[1];
|
|
12054
|
+
var _18 = React.useContext(IdCaptureModelsContext),
|
|
12055
|
+
idModelsReady = _18.ready,
|
|
12056
|
+
startIdModels = _18.start,
|
|
12057
|
+
stopIdModels = _18.stop,
|
|
12058
|
+
onIdPredictionMade = _18.onPredictionMade,
|
|
12059
|
+
setThresholds = _18.setThresholds,
|
|
12060
|
+
setDocumentDetectionBoundaries = _18.setDocumentDetectionBoundaries,
|
|
12061
|
+
bestFrameDetails = _18.bestFrameDetails,
|
|
12062
|
+
resetBestFrame = _18.resetBestFrame,
|
|
12063
|
+
idModelError = _18.modelError;
|
|
12064
|
+
var _19 = React.useState(null),
|
|
12065
|
+
videoStartsAt = _19[0],
|
|
12066
|
+
setVideoStartsAt = _19[1];
|
|
12067
|
+
var _20 = React.useContext(SubmissionContext),
|
|
12068
|
+
setIdCaptureVideoAudioStartsAt = _20.setIdCaptureVideoAudioStartsAt,
|
|
12069
|
+
setExpectedAudioText = _20.setExpectedAudioText;
|
|
12070
|
+
var _21 = React.useContext(SelfieGuidanceModelsContext),
|
|
12071
|
+
startSelfieGuidance = _21.start,
|
|
12072
|
+
stopSelfieGuidance = _21.stop,
|
|
12073
|
+
onSelfiePredictionMade = _21.onPredictionMade,
|
|
12074
|
+
selfieModelError = _21.error;
|
|
12075
|
+
var _22 = useVideoRecorder(camera, audioStream, mergeAVStreams),
|
|
12076
|
+
isRecordingVideo = _22.isRecordingVideo,
|
|
12077
|
+
startRecordingVideo = _22.startRecordingVideo,
|
|
12078
|
+
startRecordingAudio = _22.startRecordingAudio,
|
|
12079
|
+
stopRecordingVideo = _22.stopRecordingVideo,
|
|
12080
|
+
stopRecordingAudio = _22.stopRecordingAudio,
|
|
12081
|
+
videoRecordingUnintentionallyStopped = _22.videoRecordingUnintentionallyStopped,
|
|
12082
|
+
audioRecordingUnintentionallyStopped = _22.audioRecordingUnintentionallyStopped,
|
|
12083
|
+
videoUrl = _22.videoUrl,
|
|
12084
|
+
audioUrl = _22.audioUrl;
|
|
12078
12085
|
var countdownTimeoutRef = React.useRef(undefined);
|
|
12079
|
-
var
|
|
12080
|
-
countdownRemaining =
|
|
12081
|
-
setCountdownRemaining =
|
|
12086
|
+
var _23 = React.useState(-1),
|
|
12087
|
+
countdownRemaining = _23[0],
|
|
12088
|
+
setCountdownRemaining = _23[1];
|
|
12082
12089
|
React.useEffect(function () {
|
|
12083
12090
|
if (!isRecordingVideo && !videoUrl) {
|
|
12084
12091
|
startRecordingVideo();
|
|
@@ -12098,9 +12105,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12098
12105
|
onRecordingFailed === null || onRecordingFailed === void 0 ? void 0 : onRecordingFailed();
|
|
12099
12106
|
}
|
|
12100
12107
|
}, [audioRecordingUnintentionallyStopped, microphoneReady, onRecordingFailed, readTextPrompt, videoRecordingUnintentionallyStopped]);
|
|
12101
|
-
var
|
|
12102
|
-
requestedAction =
|
|
12103
|
-
setRequestedAction =
|
|
12108
|
+
var _24 = React.useState(idDocumentType === 'idCard' ? 'SHOW_ID_FRONT' : 'SHOW_PASSPORT'),
|
|
12109
|
+
requestedAction = _24[0],
|
|
12110
|
+
setRequestedAction = _24[1];
|
|
12104
12111
|
var shouldRunIdModels = idCaptureModelsEnabled && videoLoaded && cameraReady && idModelsReady && !idModelError && requestedAction !== 'READ_TEXT' && (!readTextPrompt || microphoneReady);
|
|
12105
12112
|
React.useEffect(function startModelsWhenCapturing() {
|
|
12106
12113
|
if (!shouldRunIdModels) return;
|
|
@@ -12109,9 +12116,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12109
12116
|
return stopIdModels();
|
|
12110
12117
|
};
|
|
12111
12118
|
}, [shouldRunIdModels, startIdModels, stopIdModels]);
|
|
12119
|
+
var adjustedThresholds = React.useMemo(function () {
|
|
12120
|
+
if (idDocumentType === 'idCard') {
|
|
12121
|
+
return _assign(_assign({}, videoIdCaptureThresholds), {
|
|
12122
|
+
detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
|
|
12123
|
+
passport: 1
|
|
12124
|
+
})
|
|
12125
|
+
});
|
|
12126
|
+
} else {
|
|
12127
|
+
return _assign(_assign({}, videoIdCaptureThresholds), {
|
|
12128
|
+
detection: _assign(_assign({}, videoIdCaptureThresholds.detection), {
|
|
12129
|
+
idCardFront: 1,
|
|
12130
|
+
idCardBack: 1
|
|
12131
|
+
})
|
|
12132
|
+
});
|
|
12133
|
+
}
|
|
12134
|
+
}, [idDocumentType, videoIdCaptureThresholds]);
|
|
12112
12135
|
React.useEffect(function () {
|
|
12113
|
-
setThresholds(
|
|
12114
|
-
}, [requestedAction, setThresholds,
|
|
12136
|
+
setThresholds(adjustedThresholds);
|
|
12137
|
+
}, [requestedAction, setThresholds, adjustedThresholds]);
|
|
12115
12138
|
React.useEffect(function () {
|
|
12116
12139
|
setDocumentDetectionBoundaries({
|
|
12117
12140
|
top: 20,
|
|
@@ -12120,19 +12143,19 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12120
12143
|
bottom: 0
|
|
12121
12144
|
});
|
|
12122
12145
|
}, [setDocumentDetectionBoundaries]);
|
|
12123
|
-
var
|
|
12124
|
-
currentDetectionScore =
|
|
12125
|
-
setCurrentDetectionScore =
|
|
12126
|
-
var
|
|
12127
|
-
currentDetectedDocumentType =
|
|
12128
|
-
setCurrentDetectedDocumentType =
|
|
12129
|
-
var _26 = React.useState(0),
|
|
12130
|
-
currentFocusScore = _26[0],
|
|
12131
|
-
setCurrentFocusScore = _26[1];
|
|
12146
|
+
var _25 = React.useState(0),
|
|
12147
|
+
currentDetectionScore = _25[0],
|
|
12148
|
+
setCurrentDetectionScore = _25[1];
|
|
12149
|
+
var _26 = React.useState('none'),
|
|
12150
|
+
currentDetectedDocumentType = _26[0],
|
|
12151
|
+
setCurrentDetectedDocumentType = _26[1];
|
|
12132
12152
|
var _27 = React.useState(0),
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
var
|
|
12153
|
+
currentFocusScore = _27[0],
|
|
12154
|
+
setCurrentFocusScore = _27[1];
|
|
12155
|
+
var _28 = React.useState(0),
|
|
12156
|
+
goodFramesCount = _28[0],
|
|
12157
|
+
setGoodFramesCount = _28[1];
|
|
12158
|
+
var goodFramesThreshold = requestedAction === 'SHOW_PASSPORT' ? adjustedThresholds.goodFrames.passport : requestedAction === 'SHOW_ID_FRONT' ? adjustedThresholds.goodFrames.idCardFront : adjustedThresholds.goodFrames.idCardBack;
|
|
12136
12159
|
var goodFramesThresholdMet = goodFramesCount >= goodFramesThreshold;
|
|
12137
12160
|
React.useEffect(function () {
|
|
12138
12161
|
if (!idCaptureModelsEnabled || idModelError) return;
|
|
@@ -12141,9 +12164,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12141
12164
|
setCurrentDetectionScore(prediction.detectionScore);
|
|
12142
12165
|
setCurrentDetectedDocumentType(prediction.detectedDocumentType);
|
|
12143
12166
|
setCurrentFocusScore(prediction.focusScore);
|
|
12144
|
-
var detectionThresholdMet = requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
|
|
12167
|
+
var detectionThresholdMet = requestedAction === 'SHOW_PASSPORT' ? prediction.passportDetectionThresholdMet : requestedAction === 'SHOW_ID_FRONT' ? prediction.idCardFrontDetectionThresholdMet : prediction.idCardBackDetectionThresholdMet;
|
|
12145
12168
|
var isGoodFrame = detectionThresholdMet && prediction.focusThresholdMet;
|
|
12146
|
-
var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >=
|
|
12169
|
+
var shouldShortcutFlipAnimation = requestedAction === 'FLIP_ID' && isGoodFrame && prediction.idCardBackDetectionScore >= adjustedThresholds.flipShortcutThreshold;
|
|
12147
12170
|
if (shouldShortcutFlipAnimation) {
|
|
12148
12171
|
return setRequestedAction('SHOW_ID_BACK');
|
|
12149
12172
|
}
|
|
@@ -12151,16 +12174,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12151
12174
|
return n + 1;
|
|
12152
12175
|
} : 0);
|
|
12153
12176
|
});
|
|
12154
|
-
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction,
|
|
12155
|
-
var
|
|
12156
|
-
idFrontCaptureStartedAt =
|
|
12157
|
-
setFirstGoodFrameTime =
|
|
12177
|
+
}, [idCaptureModelsEnabled, onIdPredictionMade, idModelError, requestedAction, adjustedThresholds.flipShortcutThreshold]);
|
|
12178
|
+
var _29 = React.useState(null),
|
|
12179
|
+
idFrontCaptureStartedAt = _29[0],
|
|
12180
|
+
setFirstGoodFrameTime = _29[1];
|
|
12158
12181
|
React.useEffect(function () {
|
|
12159
12182
|
if (goodFramesCount === 1) setFirstGoodFrameTime(new Date().getTime());
|
|
12160
12183
|
}, [goodFramesCount]);
|
|
12161
|
-
var delaySatisfied =
|
|
12184
|
+
var delaySatisfied = !['SHOW_ID_FRONT', 'SHOW_PASSPORT'].includes(requestedAction) || idFrontCaptureStartedAt !== null && new Date().getTime() > idFrontCaptureStartedAt + idCardFrontDelay;
|
|
12162
12185
|
var translatedText = useVerbiage(readTextPrompt, '');
|
|
12163
|
-
var
|
|
12186
|
+
var onIdCaptureComplete = React.useCallback(function () {
|
|
12164
12187
|
var _a;
|
|
12165
12188
|
if (translatedText) {
|
|
12166
12189
|
setRequestedAction('READ_TEXT');
|
|
@@ -12175,16 +12198,16 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12175
12198
|
var frameHeight = (_e = (_d = videoRef.current) === null || _d === void 0 ? void 0 : _d.videoHeight) !== null && _e !== void 0 ? _e : 0;
|
|
12176
12199
|
var faceBox = face === null || face === void 0 ? void 0 : face.box;
|
|
12177
12200
|
var faceCentered = !faceBox || !frameWidth || faceBox.xMin > frameWidth * edgeBoundary && faceBox.yMin > frameHeight * edgeBoundary && faceBox.xMax < frameWidth * (1 - edgeBoundary) && faceBox.yMax < frameHeight * (1 - edgeBoundary);
|
|
12178
|
-
var
|
|
12179
|
-
countdownStartedAt =
|
|
12180
|
-
setCountdownStartedAt =
|
|
12201
|
+
var _30 = React.useState(),
|
|
12202
|
+
countdownStartedAt = _30[0],
|
|
12203
|
+
setCountdownStartedAt = _30[1];
|
|
12181
12204
|
var photoCanvas = React.useRef(null);
|
|
12182
12205
|
var frameLock = React.useRef(false);
|
|
12183
12206
|
var captureFrame = React.useCallback(function () {
|
|
12184
12207
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
12185
|
-
var frameBase64;
|
|
12186
|
-
return __generator(this, function (
|
|
12187
|
-
switch (
|
|
12208
|
+
var frameBase64, _a;
|
|
12209
|
+
return __generator(this, function (_b) {
|
|
12210
|
+
switch (_b.label) {
|
|
12188
12211
|
case 0:
|
|
12189
12212
|
if (frameLock.current) return [2 /*return*/];
|
|
12190
12213
|
frameLock.current = true;
|
|
@@ -12194,23 +12217,25 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12194
12217
|
frameLock.current = false;
|
|
12195
12218
|
return [2 /*return*/];
|
|
12196
12219
|
}
|
|
12197
|
-
|
|
12220
|
+
_b.label = 1;
|
|
12198
12221
|
case 1:
|
|
12199
|
-
|
|
12222
|
+
_b.trys.push([1,, 7, 8]);
|
|
12200
12223
|
if (!(requestedAction == 'SHOW_ID_FRONT')) return [3 /*break*/, 5];
|
|
12201
12224
|
if (onIdFrontImageCaptured) {
|
|
12202
12225
|
onIdFrontImageCaptured(frameBase64);
|
|
12203
12226
|
}
|
|
12204
12227
|
if (!skipShowIdCardBack) return [3 /*break*/, 4];
|
|
12205
|
-
|
|
12206
|
-
return [
|
|
12207
|
-
case 2:
|
|
12228
|
+
_a = skipShowIdCardBack === true;
|
|
12229
|
+
if (_a) return [3 /*break*/, 3];
|
|
12208
12230
|
return [4 /*yield*/, skipShowIdCardBack()];
|
|
12231
|
+
case 2:
|
|
12232
|
+
_a = _b.sent();
|
|
12233
|
+
_b.label = 3;
|
|
12209
12234
|
case 3:
|
|
12210
|
-
if (_a
|
|
12211
|
-
return [2 /*return*/,
|
|
12235
|
+
if (_a) {
|
|
12236
|
+
return [2 /*return*/, onIdCaptureComplete()];
|
|
12212
12237
|
}
|
|
12213
|
-
|
|
12238
|
+
_b.label = 4;
|
|
12214
12239
|
case 4:
|
|
12215
12240
|
setRequestedAction('FLIP_ID');
|
|
12216
12241
|
return [3 /*break*/, 6];
|
|
@@ -12219,9 +12244,14 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12219
12244
|
if (onIdBackImageCaptured) {
|
|
12220
12245
|
onIdBackImageCaptured(frameBase64);
|
|
12221
12246
|
}
|
|
12222
|
-
|
|
12247
|
+
onIdCaptureComplete();
|
|
12248
|
+
} else if (requestedAction == 'SHOW_PASSPORT') {
|
|
12249
|
+
if (onIdFrontImageCaptured) {
|
|
12250
|
+
onIdFrontImageCaptured(frameBase64);
|
|
12251
|
+
}
|
|
12252
|
+
onIdCaptureComplete();
|
|
12223
12253
|
}
|
|
12224
|
-
|
|
12254
|
+
_b.label = 6;
|
|
12225
12255
|
case 6:
|
|
12226
12256
|
return [3 /*break*/, 8];
|
|
12227
12257
|
case 7:
|
|
@@ -12241,7 +12271,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12241
12271
|
}
|
|
12242
12272
|
});
|
|
12243
12273
|
});
|
|
12244
|
-
}, [
|
|
12274
|
+
}, [onIdCaptureComplete, onIdBackImageCaptured, onIdFrontImageCaptured, requestedAction, resetBestFrame, skipShowIdCardBack, videoRef]);
|
|
12245
12275
|
var isFlipping = requestedAction === 'FLIP_ID';
|
|
12246
12276
|
React.useEffect(function () {
|
|
12247
12277
|
if (!isFlipping) return;
|
|
@@ -12300,9 +12330,9 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12300
12330
|
stopSelfieGuidance();
|
|
12301
12331
|
};
|
|
12302
12332
|
}, [startSelfieGuidance, stopSelfieGuidance]);
|
|
12303
|
-
var
|
|
12304
|
-
numFramesWithoutFaces =
|
|
12305
|
-
setNumFramesWithoutFaces =
|
|
12333
|
+
var _31 = React.useState(0),
|
|
12334
|
+
numFramesWithoutFaces = _31[0],
|
|
12335
|
+
setNumFramesWithoutFaces = _31[1];
|
|
12306
12336
|
onSelfiePredictionMade(useDebounce.useThrottledCallback(React.useCallback(function (_a) {
|
|
12307
12337
|
var face = _a.face;
|
|
12308
12338
|
if (selfieModelError) return;
|
|
@@ -12318,12 +12348,12 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12318
12348
|
}
|
|
12319
12349
|
}, [disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, numFramesWithoutFaces, onFaceNotDetected, timeoutStartedAt]);
|
|
12320
12350
|
var theme = styled.useTheme();
|
|
12321
|
-
var
|
|
12351
|
+
var _32 = useTranslations(rawVerbiage, {
|
|
12322
12352
|
faceNotCenteredText: 'Please move your face to the center...',
|
|
12323
12353
|
captureBtnText: 'Capture'
|
|
12324
12354
|
}),
|
|
12325
|
-
captureBtnText =
|
|
12326
|
-
faceNotCenteredText =
|
|
12355
|
+
captureBtnText = _32.captureBtnText,
|
|
12356
|
+
faceNotCenteredText = _32.faceNotCenteredText;
|
|
12327
12357
|
var debugScalingDetails = useDebugScalingDetails({
|
|
12328
12358
|
enabled: debugMode,
|
|
12329
12359
|
pageWidth: width,
|
|
@@ -12331,7 +12361,7 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12331
12361
|
videoWidth: (_g = (_f = videoRef.current) === null || _f === void 0 ? void 0 : _f.videoWidth) !== null && _g !== void 0 ? _g : 0,
|
|
12332
12362
|
videoHeight: (_j = (_h = videoRef.current) === null || _h === void 0 ? void 0 : _h.videoHeight) !== null && _j !== void 0 ? _j : 0
|
|
12333
12363
|
});
|
|
12334
|
-
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK'].includes(requestedAction);
|
|
12364
|
+
var capturingId = ['SHOW_ID_FRONT', 'SHOW_ID_BACK', 'SHOW_PASSPORT'].includes(requestedAction);
|
|
12335
12365
|
var guidanceText = !faceCentered ? faceNotCenteredText : undefined;
|
|
12336
12366
|
return /*#__PURE__*/React__namespace.default.createElement(PageContainer, {
|
|
12337
12367
|
ref: ref,
|
|
@@ -12350,10 +12380,11 @@ var IdVideoCapture = function IdVideoCapture(_a) {
|
|
|
12350
12380
|
classNames: classNames.guides,
|
|
12351
12381
|
verbiage: rawVerbiage.guides,
|
|
12352
12382
|
requestedAction: requestedAction,
|
|
12383
|
+
idDocumentType: idDocumentType,
|
|
12353
12384
|
satisfied: satisfied,
|
|
12354
12385
|
idCardGuideStatus: countdownStartedAt ? 'capturing' : 'ready',
|
|
12355
|
-
idCardCaptureProgress:
|
|
12356
|
-
|
|
12386
|
+
idCardCaptureProgress: countdownStartedAt ? 1 : 0,
|
|
12387
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12357
12388
|
faceGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor,
|
|
12358
12389
|
idCardGuideBorderColor: satisfied ? colors.guidesSatisfiedColor : colors.guidesUnsatisfiedColor
|
|
12359
12390
|
}), debugMode && capturingId && ( /*#__PURE__*/React__namespace.default.createElement(React__namespace.default.Fragment, null, /*#__PURE__*/React__namespace.default.createElement(ObjectDetectionDebugOverlayDiv, {
|
|
@@ -12548,49 +12579,51 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12548
12579
|
idCaptureLoadingOverlayMode = _t === void 0 ? 'default' : _t,
|
|
12549
12580
|
customOverlayContent = _a.customOverlayContent,
|
|
12550
12581
|
onLoadingOverlayDismissed = _a.onLoadingOverlayDismissed,
|
|
12551
|
-
_u = _a.
|
|
12552
|
-
|
|
12553
|
-
_v = _a.
|
|
12554
|
-
|
|
12555
|
-
_w = _a.
|
|
12556
|
-
|
|
12557
|
-
_x = _a.
|
|
12558
|
-
|
|
12559
|
-
_y = _a.
|
|
12560
|
-
|
|
12561
|
-
_z = _a.
|
|
12562
|
-
|
|
12563
|
-
_0 = _a.
|
|
12564
|
-
|
|
12565
|
-
_1 = _a.
|
|
12566
|
-
|
|
12567
|
-
_2 = _a.
|
|
12568
|
-
|
|
12569
|
-
_3 = _a.
|
|
12570
|
-
|
|
12571
|
-
_4 = _a.
|
|
12572
|
-
|
|
12573
|
-
_5 = _a.
|
|
12574
|
-
|
|
12575
|
-
_6 = _a.
|
|
12576
|
-
|
|
12577
|
-
_7 = _a.
|
|
12578
|
-
|
|
12579
|
-
_8 = _a.
|
|
12580
|
-
|
|
12581
|
-
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12582
|
+
_u = _a.idDocumentType,
|
|
12583
|
+
idDocumentType = _u === void 0 ? 'idCard' : _u,
|
|
12584
|
+
_v = _a.idCaptureGuideType,
|
|
12585
|
+
idCaptureGuideType = _v === void 0 ? 'fit' : _v,
|
|
12586
|
+
_w = _a.idCaptureGuideImages,
|
|
12587
|
+
idCaptureGuideImages = _w === void 0 ? defaultIdCaptureGuideImages : _w,
|
|
12588
|
+
_x = _a.idCapturePortraitGuidesOnMobile,
|
|
12589
|
+
idCapturePortraitGuidesOnMobile = _x === void 0 ? true : _x,
|
|
12590
|
+
_y = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
12591
|
+
idCaptureRotateLoadingOverlayImageWhenPortrait = _y === void 0 ? true : _y,
|
|
12592
|
+
_z = _a.idCaptureModelLoadTimeoutMs,
|
|
12593
|
+
idCaptureModelLoadTimeoutMs = _z === void 0 ? defaultDocumentDetectionModelLoadTimeoutMs : _z,
|
|
12594
|
+
_0 = _a.faceLivenessLoadingOverlayMode,
|
|
12595
|
+
faceLivenessLoadingOverlayMode = _0 === void 0 ? 'default' : _0,
|
|
12596
|
+
_1 = _a.disableFaceDetectionWhileAudioCapture,
|
|
12597
|
+
disableFaceDetectionWhileAudioCapture = _1 === void 0 ? true : _1,
|
|
12598
|
+
_2 = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
12599
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _2 === void 0 ? 2000 : _2,
|
|
12600
|
+
_3 = _a.silentFallback,
|
|
12601
|
+
silentFallback = _3 === void 0 ? false : _3,
|
|
12602
|
+
_4 = _a.mergeAVStreams,
|
|
12603
|
+
mergeAVStreams = _4 === void 0 ? false : _4,
|
|
12604
|
+
_5 = _a.assets,
|
|
12605
|
+
assets = _5 === void 0 ? {} : _5,
|
|
12606
|
+
_6 = _a.classNames,
|
|
12607
|
+
classNames = _6 === void 0 ? {} : _6,
|
|
12608
|
+
_7 = _a.colors,
|
|
12609
|
+
colors = _7 === void 0 ? {} : _7,
|
|
12610
|
+
_8 = _a.verbiage,
|
|
12611
|
+
verbiage = _8 === void 0 ? {} : _8,
|
|
12612
|
+
_9 = _a.debugMode,
|
|
12613
|
+
debugMode = _9 === void 0 ? false : _9;
|
|
12614
|
+
var _10 = React.useContext(SubmissionContext),
|
|
12615
|
+
submissionStatus = _10.submissionStatus,
|
|
12616
|
+
idCaptureVideoUrl = _10.idCaptureVideoUrl,
|
|
12617
|
+
idCaptureVideoAudioUrl = _10.idCaptureVideoAudioUrl,
|
|
12618
|
+
idCaptureVideoIdFrontImage = _10.idCaptureVideoIdFrontImage,
|
|
12619
|
+
idCaptureVideoIdBackImage = _10.idCaptureVideoIdBackImage,
|
|
12620
|
+
setIdCaptureVideoUrl = _10.setIdCaptureVideoUrl,
|
|
12621
|
+
setIdCaptureVideoIdFrontImage = _10.setIdCaptureVideoIdFrontImage,
|
|
12622
|
+
setIdCaptureVideoIdBackImage = _10.setIdCaptureVideoIdBackImage,
|
|
12623
|
+
setIdCaptureVideoAudioUrl = _10.setIdCaptureVideoAudioUrl;
|
|
12624
|
+
var _11 = React.useState('CAPTURING_ID'),
|
|
12625
|
+
captureState = _11[0],
|
|
12626
|
+
setCaptureState = _11[1];
|
|
12594
12627
|
React.useEffect(function () {
|
|
12595
12628
|
if (skipIdCapture && captureState === 'CAPTURING_ID') setCaptureState('CHECKING_LIVENESS');
|
|
12596
12629
|
}, [captureState, skipIdCapture]);
|
|
@@ -12621,9 +12654,9 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12621
12654
|
var onVideoCaptureFaceNotDetected = React.useCallback(function () {
|
|
12622
12655
|
setCaptureState('CHECKING_LIVENESS');
|
|
12623
12656
|
}, []);
|
|
12624
|
-
var
|
|
12625
|
-
attempt =
|
|
12626
|
-
setAttempt =
|
|
12657
|
+
var _12 = React.useState(0),
|
|
12658
|
+
attempt = _12[0],
|
|
12659
|
+
setAttempt = _12[1];
|
|
12627
12660
|
var userSuppliedExitAfterFailure = onExitAfterFailure !== null && onExitAfterFailure !== void 0 ? onExitAfterFailure : faceLivenessProps.onExitAfterFailure;
|
|
12628
12661
|
var onFaceCaptureExitAfterFailure = React.useCallback(function (resp, req) {
|
|
12629
12662
|
userSuppliedExitAfterFailure === null || userSuppliedExitAfterFailure === void 0 ? void 0 : userSuppliedExitAfterFailure(resp, req);
|
|
@@ -12658,10 +12691,11 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12658
12691
|
var _b, _c, _d, _e;
|
|
12659
12692
|
var status = _a.status;
|
|
12660
12693
|
return /*#__PURE__*/React__namespace.default.createElement(IdVideoCaptureGuides, {
|
|
12661
|
-
idCardCaptureGuideImages: idCaptureGuideImages,
|
|
12662
12694
|
classNames: (_b = classNames.idVideoCapture) === null || _b === void 0 ? void 0 : _b.guides,
|
|
12663
12695
|
verbiage: (_c = verbiage.idVideoCapture) === null || _c === void 0 ? void 0 : _c.guides,
|
|
12664
12696
|
requestedAction: "VERIFY_LIVENESS",
|
|
12697
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12698
|
+
idDocumentType: idDocumentType,
|
|
12665
12699
|
faceGuideStatus: status,
|
|
12666
12700
|
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,
|
|
12667
12701
|
idCardGuideStatus: "disabled"
|
|
@@ -12718,6 +12752,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12718
12752
|
guideType: idCaptureGuideType,
|
|
12719
12753
|
portraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
12720
12754
|
rotateLoadingOverlayImageWhenPortrait: idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
12755
|
+
captureRequirement: idDocumentType,
|
|
12721
12756
|
debugMode: debugMode
|
|
12722
12757
|
}))));
|
|
12723
12758
|
case 'CHECKING_LIVENESS':
|
|
@@ -12754,7 +12789,8 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
12754
12789
|
onRecordingFailed: onRecordingFailed,
|
|
12755
12790
|
onExitCapture: handleExitCapture,
|
|
12756
12791
|
idCaptureModelsEnabled: idCaptureModelsEnabled,
|
|
12757
|
-
|
|
12792
|
+
idCaptureGuideImages: idCaptureGuideImages,
|
|
12793
|
+
idDocumentType: idDocumentType,
|
|
12758
12794
|
videoIdCaptureThresholds: videoIdCaptureThresholds,
|
|
12759
12795
|
skipShowIdCardBack: skipShowIdCardBack,
|
|
12760
12796
|
disableFaceDetectionWhileAudioCapture: disableFaceDetectionWhileAudioCapture,
|
|
@@ -15295,40 +15331,42 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
15295
15331
|
_p = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
15296
15332
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _p === void 0 ? true : _p,
|
|
15297
15333
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
15298
|
-
_q = _a.
|
|
15299
|
-
|
|
15300
|
-
_r = _a.
|
|
15301
|
-
|
|
15302
|
-
_s = _a.
|
|
15303
|
-
|
|
15304
|
-
_t = _a.
|
|
15305
|
-
|
|
15306
|
-
_u = _a.
|
|
15307
|
-
|
|
15308
|
-
_v = _a.
|
|
15309
|
-
|
|
15310
|
-
_w = _a.
|
|
15311
|
-
|
|
15312
|
-
_x = _a.
|
|
15313
|
-
|
|
15314
|
-
_y = _a.
|
|
15315
|
-
|
|
15316
|
-
_z = _a.
|
|
15317
|
-
|
|
15318
|
-
_0 = _a.
|
|
15319
|
-
|
|
15320
|
-
_1 = _a.
|
|
15321
|
-
|
|
15322
|
-
_2 = _a.
|
|
15323
|
-
|
|
15324
|
-
_3 = _a.
|
|
15325
|
-
|
|
15326
|
-
_4 = _a.
|
|
15327
|
-
|
|
15328
|
-
_5 = _a.
|
|
15329
|
-
|
|
15330
|
-
_6 = _a.
|
|
15331
|
-
|
|
15334
|
+
_q = _a.idDocumentType,
|
|
15335
|
+
idDocumentType = _q === void 0 ? 'idCard' : _q,
|
|
15336
|
+
_r = _a.faceLivenessLoadingOverlayMode,
|
|
15337
|
+
faceLivenessLoadingOverlayMode = _r === void 0 ? 'default' : _r,
|
|
15338
|
+
_s = _a.disableFaceDetectionWhileAudioCapture,
|
|
15339
|
+
disableFaceDetectionWhileAudioCapture = _s === void 0 ? false : _s,
|
|
15340
|
+
_t = _a.disableFaceDetectionWhileAudioCaptureMsDelay,
|
|
15341
|
+
disableFaceDetectionWhileAudioCaptureMsDelay = _t === void 0 ? 2000 : _t,
|
|
15342
|
+
_u = _a.silentFallback,
|
|
15343
|
+
silentFallback = _u === void 0 ? false : _u,
|
|
15344
|
+
_v = _a.mergeAVStreams,
|
|
15345
|
+
mergeAVStreams = _v === void 0 ? false : _v,
|
|
15346
|
+
_w = _a.matchOnly,
|
|
15347
|
+
matchOnly = _w === void 0 ? false : _w,
|
|
15348
|
+
_x = _a.theme,
|
|
15349
|
+
theme = _x === void 0 ? 'default' : _x,
|
|
15350
|
+
_y = _a.assets,
|
|
15351
|
+
assets = _y === void 0 ? {} : _y,
|
|
15352
|
+
_z = _a.classNames,
|
|
15353
|
+
classNames = _z === void 0 ? {} : _z,
|
|
15354
|
+
_0 = _a.colors,
|
|
15355
|
+
colors = _0 === void 0 ? {} : _0,
|
|
15356
|
+
_1 = _a.verbiage,
|
|
15357
|
+
verbiage = _1 === void 0 ? {} : _1,
|
|
15358
|
+
_2 = _a.captureSignature,
|
|
15359
|
+
captureSignature = _2 === void 0 ? false : _2,
|
|
15360
|
+
_3 = _a.captureSignatureVideo,
|
|
15361
|
+
captureSignatureVideo = _3 === void 0 ? false : _3,
|
|
15362
|
+
_4 = _a.captureAdditionalDocuments,
|
|
15363
|
+
captureAdditionalDocuments = _4 === void 0 ? [] : _4,
|
|
15364
|
+
_5 = _a.geolocationEnabled,
|
|
15365
|
+
geolocationEnabled = _5 === void 0 ? true : _5,
|
|
15366
|
+
_6 = _a.geolocationRequired,
|
|
15367
|
+
geolocationRequired = _6 === void 0 ? false : _6,
|
|
15368
|
+
_7 = _a.debugMode,
|
|
15369
|
+
debugMode = _7 === void 0 ? false : _7;
|
|
15332
15370
|
useLanguage(lang);
|
|
15333
15371
|
useDebugLogging(debugMode);
|
|
15334
15372
|
var videoIdCaptureProps = React.useMemo(function () {
|
|
@@ -15349,6 +15387,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
15349
15387
|
idCaptureLoadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
15350
15388
|
customOverlayContent: customOverlayContent,
|
|
15351
15389
|
onLoadingOverlayDismissed: onLoadingOverlayDismissed,
|
|
15390
|
+
idDocumentType: idDocumentType,
|
|
15352
15391
|
idCaptureGuideType: idCaptureGuideType,
|
|
15353
15392
|
idCaptureGuideImages: idCaptureGuideImages,
|
|
15354
15393
|
idCapturePortraitGuidesOnMobile: idCapturePortraitGuidesOnMobile,
|
|
@@ -15364,7 +15403,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
15364
15403
|
verbiage: verbiage,
|
|
15365
15404
|
debugMode: debugMode
|
|
15366
15405
|
};
|
|
15367
|
-
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
15406
|
+
}, [idCaptureProps, faceLivenessProps, idCaptureModelsEnabled, videoIdCaptureThresholds, readTextPrompt, readTextTimeoutDurationMs, readTextMinReadingMs, onExitCapture, onExitAfterFailure, onUserCancel, skipSuccessScreen, skipIdCapture, skipShowIdCardBack, idCaptureLoadingOverlayMode, customOverlayContent, onLoadingOverlayDismissed, idDocumentType, idCaptureGuideType, idCaptureGuideImages, idCapturePortraitGuidesOnMobile, idCaptureRotateLoadingOverlayImageWhenPortrait, faceLivenessLoadingOverlayMode, disableFaceDetectionWhileAudioCapture, disableFaceDetectionWhileAudioCaptureMsDelay, silentFallback, mergeAVStreams, assets, classNames, colors, verbiage, debugMode]);
|
|
15368
15407
|
var additionalDocumentCaptureProps = React.useMemo(function () {
|
|
15369
15408
|
return {
|
|
15370
15409
|
documents: captureAdditionalDocuments,
|