idmission-web-sdk 2.2.151 → 2.2.152

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.
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.2.151';
214
+ var webSdkVersion = '2.2.152';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -9831,12 +9831,9 @@
9831
9831
  }, [preferFrontFacingCamera, preferIphoneContinuityCamera]);
9832
9832
  React.useEffect(function () {
9833
9833
  var _a;
9834
- if (!requireMicrophoneAccess) return;
9835
- (_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().requestMicrophoneAccess();
9836
- return function () {
9837
- var _a;
9838
- return (_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().releaseMicrophoneAccess();
9839
- };
9834
+ if (requireMicrophoneAccess) {
9835
+ (_a = store.current) === null || _a === void 0 ? void 0 : _a.getState().requestMicrophoneAccess();
9836
+ }
9840
9837
  }, [requireMicrophoneAccess]);
9841
9838
  React.useEffect(function () {
9842
9839
  return function () {
@@ -22940,18 +22937,25 @@
22940
22937
  processAudio();
22941
22938
  }
22942
22939
  }, [audioRecordingIntentionallyStopped, audioRecordingStopped, processAudio]);
22943
- return {
22944
- isRecordingVideo: isRecordingVideo,
22945
- isRecordingAudio: isRecordingAudio,
22946
- startRecordingVideo: startRecordingVideo,
22947
- startRecordingAudio: startRecordingAudio,
22948
- stopRecordingVideo: stopRecordingVideo,
22949
- stopRecordingAudio: stopRecordingAudio,
22950
- videoRecordingUnintentionallyStopped: videoRecordingStopped && !videoRecordingIntentionallyStopped,
22951
- audioRecordingUnintentionallyStopped: audioRecordingStopped && !audioRecordingIntentionallyStopped,
22952
- videoUrl: videoUrl,
22953
- audioUrl: audioUrl
22954
- };
22940
+ var clearRecordedData = React.useCallback(function () {
22941
+ videoChunks.current = [];
22942
+ audioChunks.current = [];
22943
+ }, []);
22944
+ return React.useMemo(function () {
22945
+ return {
22946
+ isRecordingVideo: isRecordingVideo,
22947
+ isRecordingAudio: isRecordingAudio,
22948
+ startRecordingVideo: startRecordingVideo,
22949
+ startRecordingAudio: startRecordingAudio,
22950
+ stopRecordingVideo: stopRecordingVideo,
22951
+ stopRecordingAudio: stopRecordingAudio,
22952
+ clearRecordedData: clearRecordedData,
22953
+ videoRecordingUnintentionallyStopped: videoRecordingStopped && !videoRecordingIntentionallyStopped,
22954
+ audioRecordingUnintentionallyStopped: audioRecordingStopped && !audioRecordingIntentionallyStopped,
22955
+ videoUrl: videoUrl,
22956
+ audioUrl: audioUrl
22957
+ };
22958
+ }, [audioRecordingIntentionallyStopped, audioRecordingStopped, audioUrl, clearRecordedData, isRecordingAudio, isRecordingVideo, startRecordingAudio, startRecordingVideo, stopRecordingAudio, stopRecordingVideo, videoRecordingIntentionallyStopped, videoRecordingStopped, videoUrl]);
22955
22959
  };
22956
22960
 
22957
22961
  var videoSignatureInitialState = {
@@ -22961,6 +22965,10 @@
22961
22965
  stopRecording: function stopRecording() {
22962
22966
  return null;
22963
22967
  },
22968
+ clearRecordedData: function clearRecordedData() {
22969
+ return null;
22970
+ },
22971
+ isRecording: false,
22964
22972
  signatureData: null,
22965
22973
  signatureDataUrl: null,
22966
22974
  signatureVideoData: null,
@@ -23004,17 +23012,28 @@
23004
23012
  startRecordingVideo = _k.startRecordingVideo,
23005
23013
  stopRecordingVideo = _k.stopRecordingVideo,
23006
23014
  startRecordingAudio = _k.startRecordingAudio,
23007
- stopRecordingAudio = _k.stopRecordingAudio;
23015
+ stopRecordingAudio = _k.stopRecordingAudio,
23016
+ clearRecordedVideoData = _k.clearRecordedData;
23008
23017
  var outputCanvas = React.useRef(null);
23009
23018
  var recordingLock = React.useRef(false);
23019
+ var onRecordingStopped = React.useRef(function () {});
23010
23020
  var _l = React.useState(false),
23011
23021
  isRecording = _l[0],
23012
23022
  setIsRecording = _l[1];
23013
23023
  var startRecording = React.useCallback(function () {
23014
- setIsRecording(true);
23024
+ return setIsRecording(true);
23015
23025
  }, []);
23016
23026
  var stopRecording = React.useCallback(function () {
23027
+ return setIsRecording(false);
23028
+ }, []);
23029
+ var clearRecordedData = React.useCallback(function () {
23030
+ var _a;
23031
+ recordingLock.current = false;
23032
+ onRecordingStopped.current = function () {
23033
+ return setIsRecording(true);
23034
+ };
23017
23035
  setIsRecording(false);
23036
+ (_a = signatureRecorder.current) === null || _a === void 0 ? void 0 : _a.stop();
23018
23037
  }, []);
23019
23038
  React.useEffect(function () {
23020
23039
  if (!isRecording) return;
@@ -23040,6 +23059,8 @@
23040
23059
  _b.sent();
23041
23060
  _b.label = 2;
23042
23061
  case 2:
23062
+ recordedChunks.current = [];
23063
+ clearRecordedVideoData();
23043
23064
  startRecordingVideo();
23044
23065
  if (captureAudio) startRecordingAudio();
23045
23066
  stream = outputCanvas.current.captureStream(24 /* fps */);
@@ -23064,13 +23085,14 @@
23064
23085
  });
23065
23086
  setSignatureVideoData(blob);
23066
23087
  setSignatureVideoUrl(URL.createObjectURL(blob));
23088
+ onRecordingStopped.current();
23067
23089
  };
23068
23090
  return [2 /*return*/];
23069
23091
  }
23070
23092
  });
23071
23093
  });
23072
23094
  })();
23073
- }, [audioStream, captureAudio, isRecording, startRecordingAudio, startRecordingVideo]);
23095
+ }, [audioStream, captureAudio, clearRecordedVideoData, isRecording, startRecordingAudio, startRecordingVideo]);
23074
23096
  var animationFrame = React.useRef(0);
23075
23097
  React.useEffect(function () {
23076
23098
  if (!signaturePad.current || !videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
@@ -23127,8 +23149,10 @@
23127
23149
  }, [stopRecordingAudio, stopRecordingVideo]);
23128
23150
  var value = React.useMemo(function () {
23129
23151
  return {
23152
+ isRecording: isRecording,
23130
23153
  startRecording: startRecording,
23131
23154
  stopRecording: stopRecording,
23155
+ clearRecordedData: clearRecordedData,
23132
23156
  signaturePad: signaturePad,
23133
23157
  signatureData: signatureData,
23134
23158
  signatureDataUrl: signatureDataUrl,
@@ -23136,7 +23160,7 @@
23136
23160
  signatureVideoUrl: signatureVideoUrl,
23137
23161
  onAcceptClicked: onAcceptClicked
23138
23162
  };
23139
- }, [onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
23163
+ }, [clearRecordedData, isRecording, onAcceptClicked, signatureData, signatureDataUrl, signatureVideoData, signatureVideoUrl, startRecording, stopRecording]);
23140
23164
  return /*#__PURE__*/React.createElement(VideoSignatureContext.Provider, {
23141
23165
  value: value
23142
23166
  }, children, /*#__PURE__*/React.createElement(InvisibleCanvas, {
@@ -23158,6 +23182,7 @@
23158
23182
  faceGuideStatus = _c === void 0 ? 'success' : _c,
23159
23183
  faceGuideBorderWidth = _a.faceGuideBorderWidth,
23160
23184
  faceGuideBorderColor = _a.faceGuideBorderColor,
23185
+ onClearSignaturePadClicked = _a.onClearSignaturePadClicked,
23161
23186
  _d = _a.classNames,
23162
23187
  classNames = _d === void 0 ? {} : _d,
23163
23188
  _e = _a.verbiage,
@@ -23219,6 +23244,7 @@
23219
23244
  var _a, _b;
23220
23245
  (_a = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _a === void 0 ? void 0 : _a.clear();
23221
23246
  setIsSignaturePadEmpty(!!((_b = signaturePad === null || signaturePad === void 0 ? void 0 : signaturePad.current) === null || _b === void 0 ? void 0 : _b.isEmpty()));
23247
+ onClearSignaturePadClicked === null || onClearSignaturePadClicked === void 0 ? void 0 : onClearSignaturePadClicked();
23222
23248
  },
23223
23249
  disabled: requestedAction === 'VERIFY_LIVENESS',
23224
23250
  finished: true
@@ -23249,30 +23275,32 @@
23249
23275
  var onVideoCaptured = _a.onVideoCaptured,
23250
23276
  onFaceNotDetected = _a.onFaceNotDetected,
23251
23277
  onExit = _a.onExit,
23278
+ _c = _a.restartVideoOnSignaturePadCleared,
23279
+ restartVideoOnSignaturePadCleared = _c === void 0 ? true : _c,
23252
23280
  guidesComponent = _a.guidesComponent,
23253
- _c = _a.classNames,
23254
- classNames = _c === void 0 ? {} : _c,
23255
- _d = _a.colors,
23256
- colors = _d === void 0 ? {} : _d,
23257
- _e = _a.verbiage,
23258
- rawVerbiage = _e === void 0 ? {} : _e,
23259
- _f = _a.debugMode,
23260
- debugMode = _f === void 0 ? false : _f;
23281
+ _d = _a.classNames,
23282
+ classNames = _d === void 0 ? {} : _d,
23283
+ _e = _a.colors,
23284
+ colors = _e === void 0 ? {} : _e,
23285
+ _f = _a.verbiage,
23286
+ rawVerbiage = _f === void 0 ? {} : _f,
23287
+ _g = _a.debugMode,
23288
+ debugMode = _g === void 0 ? false : _g;
23261
23289
  var camera = useCameraStore(function (state) {
23262
23290
  return state.camera;
23263
23291
  });
23264
23292
  var onPredictionMade = React.useContext(SelfieGuidanceModelsContext).onPredictionMade;
23265
- var _g = useVideoSignatureContext(),
23266
- signatureData = _g.signatureData,
23267
- signatureDataUrl = _g.signatureDataUrl,
23268
- signatureVideoData = _g.signatureVideoData,
23269
- startRecording = _g.startRecording,
23270
- stopRecording = _g.stopRecording;
23293
+ var _h = useVideoSignatureContext(),
23294
+ signatureData = _h.signatureData,
23295
+ signatureDataUrl = _h.signatureDataUrl,
23296
+ signatureVideoData = _h.signatureVideoData,
23297
+ startRecording = _h.startRecording,
23298
+ stopRecording = _h.stopRecording,
23299
+ clearRecordedData = _h.clearRecordedData,
23300
+ isRecording = _h.isRecording;
23271
23301
  React.useEffect(function () {
23272
23302
  startRecording();
23273
- return function () {
23274
- stopRecording();
23275
- };
23303
+ return stopRecording;
23276
23304
  }, [startRecording, stopRecording]);
23277
23305
  colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
23278
23306
  colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
@@ -23284,9 +23312,9 @@
23284
23312
  onVideoCaptured === null || onVideoCaptured === void 0 ? void 0 : onVideoCaptured(signatureVideoData, signatureData, signatureDataUrl);
23285
23313
  }
23286
23314
  }, [onVideoCaptured, signatureData, signatureDataUrl, signatureVideoData]);
23287
- var _h = React.useState(0),
23288
- numFramesWithoutFaces = _h[0],
23289
- setNumFramesWithoutFaces = _h[1];
23315
+ var _j = React.useState(0),
23316
+ numFramesWithoutFaces = _j[0],
23317
+ setNumFramesWithoutFaces = _j[1];
23290
23318
  React.useEffect(function () {
23291
23319
  onPredictionMade(function (_a) {
23292
23320
  var face = _a.face;
@@ -23311,9 +23339,10 @@
23311
23339
  "$background": colors.guidanceMessageBackgroundColor,
23312
23340
  "$textColor": colors.guidanceMessageTextColor
23313
23341
  }, verbiage.guidanceMessageText))), /*#__PURE__*/React.createElement(GuidesComponent, {
23342
+ status: "success",
23314
23343
  classNames: classNames.videoSignatureGuidesClassNames,
23315
- status: "success"
23316
- }), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, "Video: ", camera === null || camera === void 0 ? void 0 : camera.width, "x", camera === null || camera === void 0 ? void 0 : camera.height)), /*#__PURE__*/React.createElement(ExitCaptureButton, {
23344
+ onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? clearRecordedData : undefined
23345
+ }), debugMode && ( /*#__PURE__*/React.createElement(DebugStatsPane, null, "Video: ", camera === null || camera === void 0 ? void 0 : camera.width, "x", camera === null || camera === void 0 ? void 0 : camera.height, /*#__PURE__*/React.createElement("br", null), "Recording: ", isRecording ? 'true' : 'false')), /*#__PURE__*/React.createElement(ExitCaptureButton, {
23317
23346
  onClick: onExit,
23318
23347
  className: classNames.exitCaptureBtn
23319
23348
  }));
@@ -23392,37 +23421,30 @@
23392
23421
  captureAudio = _e === void 0 ? false : _e,
23393
23422
  _f = _a.allowSignatureAfterLivenessCheckFailure,
23394
23423
  allowSignatureAfterLivenessCheckFailure = _f === void 0 ? false : _f,
23424
+ _g = _a.restartVideoOnSignaturePadCleared,
23425
+ restartVideoOnSignaturePadCleared = _g === void 0 ? true : _g,
23395
23426
  faceLivenessProps = _a.faceLivenessProps,
23396
- _g = _a.assets,
23397
- assets = _g === void 0 ? {} : _g,
23398
- _h = _a.classNames,
23399
- classNames = _h === void 0 ? {} : _h,
23400
- _j = _a.colors,
23401
- colors = _j === void 0 ? {} : _j,
23402
- _k = _a.verbiage,
23403
- verbiage = _k === void 0 ? {} : _k,
23404
- _l = _a.debugMode,
23405
- debugMode = _l === void 0 ? false : _l;
23406
- var _m = React.useContext(SubmissionContext),
23407
- selfieImage = _m.selfieImage,
23408
- setSelfieImage = _m.setSelfieImage,
23409
- setSignatureData = _m.setSignatureData,
23410
- setSignatureVideoUrl = _m.setSignatureVideoUrl,
23411
- logSelfieCaptureAttempt = _m.logSelfieCaptureAttempt;
23412
- var _o = useCameraStore(useShallow(function (state) {
23413
- return {
23414
- cameraAccessDenied: state.cameraAccessDenied,
23415
- requestCameraAccess: state.requestCameraAccess,
23416
- releaseCameraAccess: state.releaseCameraAccess,
23417
- requestMicrophoneAccess: state.requestMicrophoneAccess,
23418
- releaseMicrophoneAccess: state.releaseMicrophoneAccess
23419
- };
23420
- })),
23421
- cameraAccessDenied = _o.cameraAccessDenied,
23422
- requestCameraAccess = _o.requestCameraAccess,
23423
- releaseCameraAccess = _o.releaseCameraAccess,
23424
- requestMicrophoneAccess = _o.requestMicrophoneAccess,
23425
- releaseMicrophoneAccess = _o.releaseMicrophoneAccess;
23427
+ _h = _a.assets,
23428
+ assets = _h === void 0 ? {} : _h,
23429
+ _j = _a.classNames,
23430
+ classNames = _j === void 0 ? {} : _j,
23431
+ _k = _a.colors,
23432
+ colors = _k === void 0 ? {} : _k,
23433
+ _l = _a.verbiage,
23434
+ verbiage = _l === void 0 ? {} : _l,
23435
+ _m = _a.debugMode,
23436
+ debugMode = _m === void 0 ? false : _m;
23437
+ var _o = React.useContext(SubmissionContext),
23438
+ selfieImage = _o.selfieImage,
23439
+ setSelfieImage = _o.setSelfieImage,
23440
+ setSignatureData = _o.setSignatureData,
23441
+ setSignatureVideoUrl = _o.setSignatureVideoUrl,
23442
+ logSelfieCaptureAttempt = _o.logSelfieCaptureAttempt;
23443
+ var cameraAccessDenied = useCameraStore(useShallow(function (state) {
23444
+ return {
23445
+ cameraAccessDenied: state.cameraAccessDenied
23446
+ };
23447
+ })).cameraAccessDenied;
23426
23448
  var _p = React.useState('CHECKING_LIVENESS'),
23427
23449
  captureState = _p[0],
23428
23450
  setCaptureState = _p[1];
@@ -23483,21 +23505,13 @@
23483
23505
  var _s = React.useState(0),
23484
23506
  attempt = _s[0],
23485
23507
  setAttempt = _s[1];
23486
- var onExit = React.useCallback(function () {
23487
- releaseCameraAccess();
23488
- releaseMicrophoneAccess();
23508
+ var onRetry = React.useCallback(function () {
23509
+ onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
23489
23510
  setAttempt(function (n) {
23490
23511
  return n + 1;
23491
23512
  });
23492
23513
  setCaptureState('CHECKING_LIVENESS');
23493
- onExitCapture === null || onExitCapture === void 0 ? void 0 : onExitCapture();
23494
- void requestCameraAccess();
23495
- if (captureAudio) void requestMicrophoneAccess();
23496
- }, [captureAudio, onExitCapture, releaseCameraAccess, releaseMicrophoneAccess, requestCameraAccess, requestMicrophoneAccess]);
23497
- var onRetry = React.useCallback(function () {
23498
- onRetryClicked === null || onRetryClicked === void 0 ? void 0 : onRetryClicked();
23499
- onExit();
23500
- }, [onExit, onRetryClicked]);
23514
+ }, [onRetryClicked]);
23501
23515
  var showSuccessScreen = useShowSuccessScreen(skipSuccessScreen, captureState === 'SUCCESS', onComplete);
23502
23516
  React.useEffect(function () {
23503
23517
  if (cameraAccessDenied) {
@@ -23507,14 +23521,12 @@
23507
23521
  setCaptureState('CHECKING_LIVENESS');
23508
23522
  }
23509
23523
  }, [cameraAccessDenied]);
23510
- var guidesComponent = React.useCallback(function (_a) {
23511
- var status = _a.status;
23512
- return /*#__PURE__*/React.createElement(VideoSignatureGuides, {
23524
+ var guidesComponent = React.useCallback(function (props) {
23525
+ return /*#__PURE__*/React.createElement(VideoSignatureWizardGuides, _assign({}, props, {
23513
23526
  classNames: classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames,
23514
- faceGuideStatus: status,
23515
- requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS'
23516
- });
23517
- }, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames]);
23527
+ restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared
23528
+ }));
23529
+ }, [classNames === null || classNames === void 0 ? void 0 : classNames.videoSignatureGuidesClassNames, restartVideoOnSignaturePadCleared]);
23518
23530
  var onExitAfterFailureProp = faceLivenessProps === null || faceLivenessProps === void 0 ? void 0 : faceLivenessProps.onExitAfterFailure;
23519
23531
  var onExitAfterFailure = React.useCallback(function (resp, req) {
23520
23532
  onExitAfterFailureProp === null || onExitAfterFailureProp === void 0 ? void 0 : onExitAfterFailureProp(resp, req);
@@ -23540,7 +23552,7 @@
23540
23552
  key: "face-liveness-".concat(attempt)
23541
23553
  }, faceLivenessProps, {
23542
23554
  onSuccess: onFaceCaptureSuccess,
23543
- onExitCapture: onExit,
23555
+ onExitCapture: onExitCapture,
23544
23556
  onUserCancel: onUserCancel,
23545
23557
  onExitAfterFailure: onExitAfterFailure,
23546
23558
  onLoadingOverlayDismissed: onLoadingOverlayDismissedCallback,
@@ -23552,14 +23564,14 @@
23552
23564
  colors: colors.faceLiveness,
23553
23565
  verbiage: verbiage.faceLiveness,
23554
23566
  debugMode: debugMode,
23555
- releaseCameraAccessOnExit: false,
23556
23567
  renderCameraFeed: false
23557
23568
  }));
23558
23569
  case 'CAPTURING_SIGNATURE':
23559
23570
  return /*#__PURE__*/React.createElement(VideoSignatureCapture, {
23560
23571
  onVideoCaptured: onSignatureCaptureCompleted,
23561
23572
  onFaceNotDetected: onSignatureCaptureFacesNotDetected,
23562
- onExit: onExit,
23573
+ onExit: onExitCapture,
23574
+ restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
23563
23575
  guidesComponent: guidesComponent,
23564
23576
  classNames: classNames,
23565
23577
  colors: colors,
@@ -23581,6 +23593,49 @@
23581
23593
  }
23582
23594
  }()));
23583
23595
  };
23596
+ function VideoSignatureWizardGuides(_a) {
23597
+ var status = _a.status,
23598
+ classNames = _a.classNames,
23599
+ _b = _a.restartVideoOnSignaturePadCleared,
23600
+ restartVideoOnSignaturePadCleared = _b === void 0 ? true : _b;
23601
+ var clearRecordedData = useVideoSignatureContext().clearRecordedData;
23602
+ return /*#__PURE__*/React.createElement(VideoSignatureGuides, {
23603
+ classNames: classNames,
23604
+ faceGuideStatus: status,
23605
+ requestedAction: status === 'success' ? 'CAPTURE_SIGNATURE' : 'VERIFY_LIVENESS',
23606
+ onClearSignaturePadClicked: restartVideoOnSignaturePadCleared ? clearRecordedData : undefined
23607
+ });
23608
+ }
23609
+ var VideoSignatureWizardWithProviders = function VideoSignatureWizardWithProviders(props) {
23610
+ var _a = React.useState(0),
23611
+ attempts = _a[0],
23612
+ setAttempts = _a[1];
23613
+ var onRetryClickedProp = props.onRetryClicked;
23614
+ var onRetryClicked = React.useCallback(function () {
23615
+ setAttempts(function (n) {
23616
+ return n + 1;
23617
+ });
23618
+ onRetryClickedProp === null || onRetryClickedProp === void 0 ? void 0 : onRetryClickedProp();
23619
+ }, [onRetryClickedProp]);
23620
+ return /*#__PURE__*/React.createElement(CameraStoreProvider, {
23621
+ key: "camera-store-".concat(attempts),
23622
+ preferIphoneContinuityCamera: false,
23623
+ preferFrontFacingCamera: true,
23624
+ requireMicrophoneAccess: props.captureAudio,
23625
+ maxVideoWidth: 1280,
23626
+ maxFps: 30,
23627
+ onCameraAccessDenied: props.onCameraAccessDenied,
23628
+ onMicrophoneAccessDenied: props.onMicrophoneAccessDenied
23629
+ }, /*#__PURE__*/React.createElement(SelfieGuidanceModelsProvider, {
23630
+ autoStart: false,
23631
+ throttleMs: 250,
23632
+ onModelError: props.onModelError,
23633
+ modelLoadTimeoutMs: props.modelLoadTimeoutMs,
23634
+ requireVerticalFaceCentering: false
23635
+ }, /*#__PURE__*/React.createElement(VideoSignatureWizard, _assign({}, props, {
23636
+ onRetryClicked: onRetryClicked
23637
+ }))));
23638
+ };
23584
23639
 
23585
23640
  var IdVideoCaptureGuides = function IdVideoCaptureGuides(_a) {
23586
23641
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
@@ -24854,23 +24909,11 @@
24854
24909
  onAccept: onSignatureCaptureSuccess
24855
24910
  }));
24856
24911
  case 'VideoSignatureCapture':
24857
- return /*#__PURE__*/React.createElement(CameraStoreProvider, {
24858
- preferIphoneContinuityCamera: false,
24859
- preferFrontFacingCamera: true,
24860
- requireMicrophoneAccess: videoSignatureCaptureProps.captureAudio,
24861
- maxVideoWidth: 1280,
24862
- maxFps: 30,
24912
+ return /*#__PURE__*/React.createElement(VideoSignatureWizardWithProviders, _assign({}, videoSignatureCaptureProps, {
24913
+ onComplete: onVideoSignatureComplete,
24863
24914
  onCameraAccessDenied: onCameraAccessDenied,
24864
24915
  onMicrophoneAccessDenied: onMicrophoneAccessDenied
24865
- }, /*#__PURE__*/React.createElement(SelfieGuidanceModelsProvider, {
24866
- autoStart: false,
24867
- throttleMs: 250,
24868
- onModelError: videoSignatureCaptureProps.onModelError,
24869
- modelLoadTimeoutMs: videoSignatureCaptureProps.modelLoadTimeoutMs,
24870
- requireVerticalFaceCentering: false
24871
- }, /*#__PURE__*/React.createElement(VideoSignatureWizard, _assign({}, videoSignatureCaptureProps, {
24872
- onComplete: onVideoSignatureComplete
24873
- }))));
24916
+ }));
24874
24917
  case 'AdditionalDocumentCapture':
24875
24918
  return /*#__PURE__*/React.createElement(AdditionalDocumentCaptureWizard, _assign({}, additionalDocumentCaptureProps, {
24876
24919
  documents: documents,
@@ -27187,16 +27230,18 @@
27187
27230
  modelLoadTimeoutMs = _f === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _f,
27188
27231
  _g = _a.allowSignatureAfterLivenessCheckFailure,
27189
27232
  allowSignatureAfterLivenessCheckFailure = _g === void 0 ? false : _g,
27233
+ _h = _a.restartVideoOnSignaturePadCleared,
27234
+ restartVideoOnSignaturePadCleared = _h === void 0 ? true : _h,
27190
27235
  faceLivenessProps = _a.faceLivenessProps,
27191
- _h = _a.theme,
27192
- theme = _h === void 0 ? 'default' : _h,
27236
+ _j = _a.theme,
27237
+ theme = _j === void 0 ? 'default' : _j,
27193
27238
  classNames = _a.classNames,
27194
27239
  colors = _a.colors,
27195
27240
  verbiage = _a.verbiage,
27196
27241
  geolocationEnabled = _a.geolocationEnabled,
27197
27242
  geolocationRequired = _a.geolocationRequired,
27198
- _j = _a.debugMode,
27199
- debugMode = _j === void 0 ? false : _j;
27243
+ _k = _a.debugMode,
27244
+ debugMode = _k === void 0 ? false : _k;
27200
27245
  useLanguage(lang);
27201
27246
  useDebugLogging(debugMode);
27202
27247
  return /*#__PURE__*/React.createElement(AuthProvider, {
@@ -27240,6 +27285,7 @@
27240
27285
  modelLoadTimeoutMs: modelLoadTimeoutMs,
27241
27286
  faceLivenessProps: faceLivenessProps,
27242
27287
  allowSignatureAfterLivenessCheckFailure: allowSignatureAfterLivenessCheckFailure,
27288
+ restartVideoOnSignaturePadCleared: restartVideoOnSignaturePadCleared,
27243
27289
  classNames: classNames,
27244
27290
  colors: colors,
27245
27291
  debugMode: debugMode,
@@ -27247,7 +27293,7 @@
27247
27293
  onModelError: onModelError,
27248
27294
  onUserCancel: onUserCancel
27249
27295
  };
27250
- }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
27296
+ }, [customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
27251
27297
  }))));
27252
27298
  };
27253
27299