idmission-web-sdk 1.0.96 → 1.0.98

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.
@@ -27,6 +27,8 @@ export type SubmissionRequest = {
27
27
  idData: {
28
28
  idImageFront?: string;
29
29
  idImageBack?: string;
30
+ videoIdImageFront?: string;
31
+ videoIdImageBack?: string;
30
32
  idType: 'NSP';
31
33
  idCountry: 'NSP';
32
34
  idState: '';
@@ -46,7 +46,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
46
46
  var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
47
47
  var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
48
48
 
49
- var webSdkVersion = '1.0.96';
49
+ var webSdkVersion = '1.0.98';
50
50
 
51
51
  function getPlatform() {
52
52
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -890,6 +890,12 @@ var SubmissionProvider = function SubmissionProvider(_a) {
890
890
  _b.videoData = _e.sent();
891
891
  _e.label = 4;
892
892
  case 4:
893
+ if (idCaptureVideoIdFrontImage) {
894
+ submissionRequest.customerData.idData.videoIdImageFront = idCaptureVideoIdFrontImage;
895
+ }
896
+ if (idCaptureVideoIdBackImage) {
897
+ submissionRequest.customerData.idData.videoIdImageBack = idCaptureVideoIdBackImage;
898
+ }
893
899
  attachMetadataToRequest(submissionRequest, {
894
900
  selfieCaptureAttempts: selfieCaptureAttempts,
895
901
  idFrontCaptureAttempts: idFrontCaptureAttempts,
@@ -9783,28 +9789,28 @@ var reducer$5 = function reducer(state, action) {
9783
9789
  }
9784
9790
  };
9785
9791
  var IdCapture = function IdCapture(_a) {
9786
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
9792
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
9787
9793
  var requiredDocumentType = _a.requiredDocumentType,
9788
- _m = _a.autoCaptureEnabled,
9789
- autoCaptureEnabled = _m === void 0 ? true : _m,
9790
- _o = _a.autoCaptureScoreThreshold,
9791
- autoCaptureScoreThreshold = _o === void 0 ? 0.8 : _o,
9792
- _p = _a.autoCaptureGoodFramesRequired,
9793
- autoCaptureGoodFramesRequired = _p === void 0 ? 3 : _p,
9794
- _q = _a.autoCaptureBarcodeRequired,
9795
- autoCaptureBarcodeRequired = _q === void 0 ? 'mobile' : _q,
9796
- _r = _a.mrzDetectionScoreThreshold,
9797
- mrzDetectionScoreThreshold = _r === void 0 ? 0.25 : _r,
9798
- _s = _a.passportPageDetectionThreshold,
9799
- passportPageDetectionThreshold = _s === void 0 ? 0.6 : _s,
9800
- _t = _a.pdf417DetectionThreshold,
9801
- pdf417DetectionThreshold = _t === void 0 ? 0.15 : _t,
9802
- _u = _a.focusScoreThreshold,
9803
- focusScoreThreshold = _u === void 0 ? 0.3 : _u,
9804
- _v = _a.barcodeScanningEnabled,
9805
- barcodeScanningEnabled = _v === void 0 ? true : _v,
9806
- _w = _a.maxBarcodeScanAttempts,
9807
- maxBarcodeScanAttempts = _w === void 0 ? 10 : _w,
9794
+ _p = _a.autoCaptureEnabled,
9795
+ autoCaptureEnabled = _p === void 0 ? true : _p,
9796
+ _q = _a.autoCaptureScoreThreshold,
9797
+ autoCaptureScoreThreshold = _q === void 0 ? 0.8 : _q,
9798
+ _r = _a.autoCaptureGoodFramesRequired,
9799
+ autoCaptureGoodFramesRequired = _r === void 0 ? 3 : _r,
9800
+ _s = _a.autoCaptureBarcodeRequired,
9801
+ autoCaptureBarcodeRequired = _s === void 0 ? 'mobile' : _s,
9802
+ _t = _a.mrzDetectionScoreThreshold,
9803
+ mrzDetectionScoreThreshold = _t === void 0 ? 0.25 : _t,
9804
+ _u = _a.passportPageDetectionThreshold,
9805
+ passportPageDetectionThreshold = _u === void 0 ? 0.6 : _u,
9806
+ _v = _a.pdf417DetectionThreshold,
9807
+ pdf417DetectionThreshold = _v === void 0 ? 0.15 : _v,
9808
+ _w = _a.focusScoreThreshold,
9809
+ focusScoreThreshold = _w === void 0 ? 0.3 : _w,
9810
+ _x = _a.barcodeScanningEnabled,
9811
+ barcodeScanningEnabled = _x === void 0 ? true : _x,
9812
+ _y = _a.maxBarcodeScanAttempts,
9813
+ maxBarcodeScanAttempts = _y === void 0 ? 10 : _y,
9808
9814
  guidanceMessage = _a.guidanceMessage,
9809
9815
  guidanceSatisfied = _a.guidanceSatisfied,
9810
9816
  onPrediction = _a.onPrediction,
@@ -9812,50 +9818,50 @@ var IdCapture = function IdCapture(_a) {
9812
9818
  onCapture = _a.onCapture,
9813
9819
  onExit = _a.onExit,
9814
9820
  processingScreen = _a.processingScreen,
9815
- _x = _a.processingDelay,
9816
- processingDelay = _x === void 0 ? 0 : _x,
9817
- _y = _a.assets,
9818
- assets = _y === void 0 ? {} : _y,
9819
- _z = _a.classNames,
9820
- classNames = _z === void 0 ? {} : _z,
9821
- _0 = _a.colors,
9822
- colors = _0 === void 0 ? {} : _0,
9823
- _1 = _a.verbiage,
9824
- rawVerbiage = _1 === void 0 ? {} : _1,
9825
- _2 = _a.debugMode,
9826
- debugMode = _2 === void 0 ? false : _2;
9827
- var _3 = useResizeObserver__default['default'](),
9828
- ref = _3.ref,
9829
- _4 = _3.width,
9830
- width = _4 === void 0 ? 1 : _4,
9831
- _5 = _3.height,
9832
- height = _5 === void 0 ? 1 : _5;
9833
- var _6 = React.useReducer(reducer$5, initialState$5),
9834
- state = _6[0],
9835
- dispatch = _6[1];
9836
- var _7 = React.useState(''),
9837
- imageURL = _7[0],
9838
- setImageURL = _7[1];
9839
- var _8 = React.useState(false),
9840
- processingFrame = _8[0],
9841
- setProcessingFrame = _8[1];
9842
- var _9 = React.useContext(CameraStateContext),
9843
- cameraRef = _9.cameraRef,
9844
- cameraReady = _9.cameraReady,
9845
- takePhoto = _9.takePhoto,
9846
- videoRef = _9.videoRef,
9847
- videoLoaded = _9.videoLoaded;
9821
+ _z = _a.processingDelay,
9822
+ processingDelay = _z === void 0 ? 0 : _z,
9823
+ _0 = _a.assets,
9824
+ assets = _0 === void 0 ? {} : _0,
9825
+ _1 = _a.classNames,
9826
+ classNames = _1 === void 0 ? {} : _1,
9827
+ _2 = _a.colors,
9828
+ colors = _2 === void 0 ? {} : _2,
9829
+ _3 = _a.verbiage,
9830
+ rawVerbiage = _3 === void 0 ? {} : _3,
9831
+ _4 = _a.debugMode,
9832
+ debugMode = _4 === void 0 ? false : _4;
9833
+ var _5 = useResizeObserver__default['default'](),
9834
+ ref = _5.ref,
9835
+ _6 = _5.width,
9836
+ width = _6 === void 0 ? 1 : _6,
9837
+ _7 = _5.height,
9838
+ height = _7 === void 0 ? 1 : _7;
9839
+ var _8 = React.useReducer(reducer$5, initialState$5),
9840
+ state = _8[0],
9841
+ dispatch = _8[1];
9842
+ var _9 = React.useState(''),
9843
+ imageURL = _9[0],
9844
+ setImageURL = _9[1];
9845
+ var _10 = React.useState(false),
9846
+ processingFrame = _10[0],
9847
+ setProcessingFrame = _10[1];
9848
+ var _11 = React.useContext(CameraStateContext),
9849
+ cameraRef = _11.cameraRef,
9850
+ cameraReady = _11.cameraReady,
9851
+ takePhoto = _11.takePhoto,
9852
+ videoRef = _11.videoRef,
9853
+ videoLoaded = _11.videoLoaded;
9848
9854
  var captureStartedAt = React.useRef();
9849
- var _10 = React.useContext(IdCaptureModelsContext),
9850
- modelsReady = _10.ready,
9851
- modelsWorking = _10.working,
9852
- setThresholds = _10.setThresholds,
9853
- makePrediction = _10.makePrediction,
9854
- onPredictionMade = _10.onPredictionMade,
9855
- detectionTime = _10.detectionTime,
9856
- focusPredictionTime = _10.focusPredictionTime,
9857
- getBestFrame = _10.getBestFrame,
9858
- resetBestFrame = _10.resetBestFrame;
9855
+ var _12 = React.useContext(IdCaptureModelsContext),
9856
+ modelsReady = _12.ready,
9857
+ modelsWorking = _12.working,
9858
+ setThresholds = _12.setThresholds,
9859
+ makePrediction = _12.makePrediction,
9860
+ onPredictionMade = _12.onPredictionMade,
9861
+ detectionTime = _12.detectionTime,
9862
+ focusPredictionTime = _12.focusPredictionTime,
9863
+ getBestFrame = _12.getBestFrame,
9864
+ resetBestFrame = _12.resetBestFrame;
9859
9865
  React.useEffect(function () {
9860
9866
  captureStartedAt.current = new Date();
9861
9867
  }, []);
@@ -9884,9 +9890,9 @@ var IdCapture = function IdCapture(_a) {
9884
9890
  React.useEffect(function () {
9885
9891
  shouldCaptureFrames.current = videoLoaded && cameraReady && modelsReady && !state.capturing && !state.captured;
9886
9892
  }, [cameraReady, state.captured, state.capturing, modelsReady, videoLoaded]);
9887
- var _11 = React.useState(null),
9888
- lastFrame = _11[0],
9889
- setLastFrame = _11[1];
9893
+ var _13 = React.useState(null),
9894
+ lastFrame = _13[0],
9895
+ setLastFrame = _13[1];
9890
9896
  React.useEffect(function () {
9891
9897
  if (!modelsReady || !cameraReady || !videoLoaded) return;
9892
9898
  animationFrame.current = requestAnimationFrame(function runFrame() {
@@ -10060,7 +10066,7 @@ var IdCapture = function IdCapture(_a) {
10060
10066
  if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
10061
10067
  guidanceMessage || (guidanceMessage = satisfied ? verbiage.guidanceSatisfiedText : !state.documentDetectionThresholdMet ? verbiage.guidanceNotDetectedText : !state.documentInBounds ? verbiage.guidanceNotCenteredText : !state.focusThresholdMet ? verbiage.guidanceTooBlurryText : '');
10062
10068
  if (processingFrame) {
10063
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, processingScreen, imageURL && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureImagePreview, {
10069
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, processingScreen, !((_k = (_j = theme.idCapture) === null || _j === void 0 ? void 0 : _j.capturePreview) === null || _k === void 0 ? void 0 : _k.disabled) && imageURL && ( /*#__PURE__*/React__default['default'].createElement(IdCaptureImagePreview, {
10064
10070
  classNames: classNames.imagePreview,
10065
10071
  text: verbiage.processingIdCardText,
10066
10072
  imageUrl: imageURL
@@ -10078,7 +10084,7 @@ var IdCapture = function IdCapture(_a) {
10078
10084
  }
10079
10085
  return /*#__PURE__*/React__default['default'].createElement(PageContainer, {
10080
10086
  ref: ref,
10081
- className: "flex ".concat((_j = classNames.container) !== null && _j !== void 0 ? _j : '')
10087
+ className: "flex ".concat((_l = classNames.container) !== null && _l !== void 0 ? _l : '')
10082
10088
  }, /*#__PURE__*/React__default['default'].createElement(DocumentCaptureGuideOverlay, {
10083
10089
  classNames: classNames.guides,
10084
10090
  width: width,
@@ -10086,7 +10092,7 @@ var IdCapture = function IdCapture(_a) {
10086
10092
  instruction: state.captureFailed ? verbiage.captureFailedText : state.capturing ? verbiage === null || verbiage === void 0 ? void 0 : verbiage.capturingText : verbiage.instructionText,
10087
10093
  portraitGuidesImageUrl: assets.portraitGuidesImageUrl,
10088
10094
  landscapeGuidesImageUrl: assets.landscapeGuidesImageUrl,
10089
- isMirrored: !((_k = cameraRef.current) === null || _k === void 0 ? void 0 : _k.isRearFacing),
10095
+ isMirrored: !((_m = cameraRef.current) === null || _m === void 0 ? void 0 : _m.isRearFacing),
10090
10096
  borderColor: state.isGoodFrame ? colors.guideBoxSatisfiedColor : colors.guideBoxUnsatisfiedColor
10091
10097
  }), guidanceMessage !== '' && ( /*#__PURE__*/React__default['default'].createElement(GuidanceMessageContainer, {
10092
10098
  "$top": "82.5vh",
@@ -10095,7 +10101,7 @@ var IdCapture = function IdCapture(_a) {
10095
10101
  "$variant": satisfied ? 'positive' : 'default',
10096
10102
  className: classNames.guidanceMessage
10097
10103
  }, guidanceMessage))), debugMode && state.detectedObjects.length > 0 && ( /*#__PURE__*/React__default['default'].createElement(ObjectDetectionDebugOverlay, {
10098
- "$flipX": !((_l = cameraRef.current) === null || _l === void 0 ? void 0 : _l.isRearFacing)
10104
+ "$flipX": !((_o = cameraRef.current) === null || _o === void 0 ? void 0 : _o.isRearFacing)
10099
10105
  }, state.detectedObjects.map(function (obj, i) {
10100
10106
  var _a;
10101
10107
  return /*#__PURE__*/React__default['default'].createElement(IdCaptureDetectedObjectDebugBox, {
@@ -11806,32 +11812,33 @@ var reducer$2 = function reducer(state, action) {
11806
11812
  }
11807
11813
  };
11808
11814
  var FaceLivenessCapture = function FaceLivenessCapture(_a) {
11809
- var _b;
11815
+ var _b, _c, _d;
11810
11816
  var onCapture = _a.onCapture,
11811
11817
  onSuccess = _a.onSuccess,
11812
11818
  onTimeout = _a.onTimeout,
11813
11819
  onExit = _a.onExit,
11814
- _c = _a.timeoutDurationMs,
11815
- timeoutDurationMs = _c === void 0 ? 15000 : _c,
11816
- _d = _a.classNames,
11817
- classNames = _d === void 0 ? {} : _d,
11818
- _e = _a.colors,
11819
- colors = _e === void 0 ? {} : _e,
11820
- _f = _a.verbiage,
11821
- rawVerbiage = _f === void 0 ? {} : _f,
11820
+ _e = _a.timeoutDurationMs,
11821
+ timeoutDurationMs = _e === void 0 ? 15000 : _e,
11822
+ _f = _a.classNames,
11823
+ classNames = _f === void 0 ? {} : _f,
11824
+ _g = _a.colors,
11825
+ colors = _g === void 0 ? {} : _g,
11826
+ _h = _a.verbiage,
11827
+ rawVerbiage = _h === void 0 ? {} : _h,
11822
11828
  debugMode = _a.debugMode;
11823
- var _g = React.useContext(SubmissionContext),
11824
- checkLiveness = _g.checkLiveness,
11825
- submissionError = _g.submissionError;
11829
+ var _j = React.useContext(SubmissionContext),
11830
+ checkLiveness = _j.checkLiveness,
11831
+ submissionError = _j.submissionError;
11826
11832
  var modelsError = React.useContext(HighPerformanceSelfieGuidanceModelsContext).error;
11827
- var _h = React.useReducer(reducer$2, initialState$2),
11828
- state = _h[0],
11829
- dispatch = _h[1];
11830
- var _j = React.useState(null),
11831
- imageUrl = _j[0],
11832
- setImageUrl = _j[1];
11833
+ var _k = React.useReducer(reducer$2, initialState$2),
11834
+ state = _k[0],
11835
+ dispatch = _k[1];
11836
+ var _l = React.useState(null),
11837
+ imageUrl = _l[0],
11838
+ setImageUrl = _l[1];
11833
11839
  var rawCanvas = React.useRef(null);
11834
11840
  var cropCanvas = React.useRef(null);
11841
+ var theme = styled.useTheme();
11835
11842
  var onSelfieCaptured = React.useCallback(function (frame, face) {
11836
11843
  onCapture === null || onCapture === void 0 ? void 0 : onCapture();
11837
11844
  dispatch({
@@ -11969,10 +11976,10 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
11969
11976
  colors: colors,
11970
11977
  verbiage: verbiage,
11971
11978
  debugMode: debugMode
11972
- }), imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
11979
+ }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
11973
11980
  classNames: classNames.imagePreview,
11974
11981
  imageUrl: imageUrl,
11975
- text: (_b = verbiage.progressPreviewText) !== null && _b !== void 0 ? _b : ''
11982
+ text: (_d = verbiage.progressPreviewText) !== null && _d !== void 0 ? _d : ''
11976
11983
  })));
11977
11984
  };
11978
11985
 
@@ -14943,34 +14950,35 @@ var reducer$1 = function reducer(state, action) {
14943
14950
  }
14944
14951
  };
14945
14952
  var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
14953
+ var _b, _c;
14946
14954
  var onCustomerMatched = _a.onCustomerMatched,
14947
14955
  onCustomerNotMatched = _a.onCustomerNotMatched,
14948
14956
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
14949
14957
  onExit = _a.onExit,
14950
14958
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
14951
- _b = _a.classNames,
14952
- classNames = _b === void 0 ? {} : _b,
14953
- _c = _a.colors,
14954
- colors = _c === void 0 ? {} : _c,
14955
- _d = _a.verbiage,
14956
- verbiage = _d === void 0 ? {} : _d,
14957
- _e = _a.debugMode,
14958
- debugMode = _e === void 0 ? false : _e;
14959
- var _f = React.useReducer(reducer$1, initialState$1),
14960
- state = _f[0],
14961
- dispatch = _f[1];
14959
+ _d = _a.classNames,
14960
+ classNames = _d === void 0 ? {} : _d,
14961
+ _e = _a.colors,
14962
+ colors = _e === void 0 ? {} : _e,
14963
+ _f = _a.verbiage,
14964
+ verbiage = _f === void 0 ? {} : _f,
14965
+ _g = _a.debugMode,
14966
+ debugMode = _g === void 0 ? false : _g;
14967
+ var _h = React.useReducer(reducer$1, initialState$1),
14968
+ state = _h[0],
14969
+ dispatch = _h[1];
14962
14970
  var frame = state.frame,
14963
14971
  face = state.face;
14964
- var _g = React.useContext(SubmissionContext),
14965
- submit = _g.submit,
14966
- submissionRequest = _g.submissionRequest,
14967
- submissionResponse = _g.submissionResponse,
14968
- submissionError = _g.submissionError,
14969
- selfieImage = _g.selfieImage,
14970
- setSelfieImage = _g.setSelfieImage;
14971
- var _h = React.useState(null),
14972
- imageUrl = _h[0],
14973
- setImageUrl = _h[1];
14972
+ var _j = React.useContext(SubmissionContext),
14973
+ submit = _j.submit,
14974
+ submissionRequest = _j.submissionRequest,
14975
+ submissionResponse = _j.submissionResponse,
14976
+ submissionError = _j.submissionError,
14977
+ selfieImage = _j.selfieImage,
14978
+ setSelfieImage = _j.setSelfieImage;
14979
+ var _k = React.useState(null),
14980
+ imageUrl = _k[0],
14981
+ setImageUrl = _k[1];
14974
14982
  var rawCanvas = React.useRef(null);
14975
14983
  var cropCanvas = React.useRef(null);
14976
14984
  var onSelfieCaptured = React.useCallback(function (frame, face) {
@@ -15043,6 +15051,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
15043
15051
  }, [onCustomerMatched, onCustomerNotMatched, state.requestState, submissionRequest, submissionResponse]);
15044
15052
  useTimeout(captureGuidanceTimeoutDurationMs, onCaptureGuidanceTimeout, ['VERIFIED', 'REJECTED'].includes(state.requestState), state.requestState === 'VERIFYING');
15045
15053
  var progressPreviewText = useVerbiage(verbiage.progressPreviewText, 'Processing...');
15054
+ var theme = styled.useTheme();
15046
15055
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
15047
15056
  ref: rawCanvas
15048
15057
  }), /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
@@ -15055,7 +15064,7 @@ var CustomerVerificationCapture = function CustomerVerificationCapture(_a) {
15055
15064
  colors: colors,
15056
15065
  verbiage: verbiage,
15057
15066
  debugMode: debugMode
15058
- }), imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15067
+ }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15059
15068
  imageUrl: imageUrl,
15060
15069
  text: progressPreviewText,
15061
15070
  classNames: classNames.imagePreview
@@ -15435,32 +15444,33 @@ var reducer = function reducer(state, action) {
15435
15444
  }
15436
15445
  };
15437
15446
  var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
15447
+ var _b, _c;
15438
15448
  var onCustomerMatched = _a.onCustomerMatched,
15439
15449
  onCustomerNotMatched = _a.onCustomerNotMatched,
15440
15450
  onCaptureGuidanceTimeout = _a.onCaptureGuidanceTimeout,
15441
15451
  onExit = _a.onExit,
15442
15452
  captureGuidanceTimeoutDurationMs = _a.captureGuidanceTimeoutDurationMs,
15443
- _b = _a.classNames,
15444
- classNames = _b === void 0 ? {} : _b,
15445
- _c = _a.colors,
15446
- colors = _c === void 0 ? {} : _c,
15447
- _d = _a.verbiage,
15448
- verbiage = _d === void 0 ? {} : _d,
15449
- _e = _a.debugMode,
15450
- debugMode = _e === void 0 ? false : _e;
15451
- var _f = React.useReducer(reducer, initialState),
15452
- state = _f[0],
15453
- dispatch = _f[1];
15454
- var _g = React.useContext(SubmissionContext),
15455
- submit = _g.submit,
15456
- submissionRequest = _g.submissionRequest,
15457
- submissionResponse = _g.submissionResponse,
15458
- submissionError = _g.submissionError,
15459
- selfieImage = _g.selfieImage,
15460
- setSelfieImage = _g.setSelfieImage;
15461
- var _h = React.useState(null),
15462
- imageUrl = _h[0],
15463
- setImageUrl = _h[1];
15453
+ _d = _a.classNames,
15454
+ classNames = _d === void 0 ? {} : _d,
15455
+ _e = _a.colors,
15456
+ colors = _e === void 0 ? {} : _e,
15457
+ _f = _a.verbiage,
15458
+ verbiage = _f === void 0 ? {} : _f,
15459
+ _g = _a.debugMode,
15460
+ debugMode = _g === void 0 ? false : _g;
15461
+ var _h = React.useReducer(reducer, initialState),
15462
+ state = _h[0],
15463
+ dispatch = _h[1];
15464
+ var _j = React.useContext(SubmissionContext),
15465
+ submit = _j.submit,
15466
+ submissionRequest = _j.submissionRequest,
15467
+ submissionResponse = _j.submissionResponse,
15468
+ submissionError = _j.submissionError,
15469
+ selfieImage = _j.selfieImage,
15470
+ setSelfieImage = _j.setSelfieImage;
15471
+ var _k = React.useState(null),
15472
+ imageUrl = _k[0],
15473
+ setImageUrl = _k[1];
15464
15474
  var rawCanvas = React.useRef(null);
15465
15475
  var cropCanvas = React.useRef(null);
15466
15476
  var onSelfieCaptured = React.useCallback(function (frame, face) {
@@ -15535,6 +15545,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
15535
15545
  }, [onCustomerMatched, onCustomerNotMatched, state.requestState, submissionRequest, submissionResponse]);
15536
15546
  useTimeout(captureGuidanceTimeoutDurationMs, onCaptureGuidanceTimeout, ['FOUND', 'NOT_FOUND'].includes(state.requestState), state.requestState === 'IDENTIFYING');
15537
15547
  var progressPreviewText = useVerbiage(verbiage.progressPreviewText, 'Processing...');
15548
+ var theme = styled.useTheme();
15538
15549
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
15539
15550
  ref: rawCanvas
15540
15551
  }), /*#__PURE__*/React__default['default'].createElement(InvisibleCanvas, {
@@ -15547,7 +15558,7 @@ var CustomerIdentificationCapture = function CustomerIdentificationCapture(_a) {
15547
15558
  colors: colors,
15548
15559
  verbiage: verbiage,
15549
15560
  debugMode: debugMode
15550
- }), imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15561
+ }), !((_c = (_b = theme.selfieCapture) === null || _b === void 0 ? void 0 : _b.capturePreview) === null || _c === void 0 ? void 0 : _c.disabled) && imageUrl && ( /*#__PURE__*/React__default['default'].createElement(SelfieProgressPreview, {
15551
15562
  text: progressPreviewText,
15552
15563
  imageUrl: imageUrl,
15553
15564
  classNames: classNames.imagePreview