idmission-web-sdk 2.3.87 → 2.3.89

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.
Files changed (42) hide show
  1. package/dist/components/customer_flows/SignatureKYC.d.ts +6 -0
  2. package/dist/components/customer_flows/SignatureKYC.d.ts.map +1 -1
  3. package/dist/components/selfie_capture/SelfieCapture.d.ts +4 -0
  4. package/dist/components/selfie_capture/SelfieCapture.d.ts.map +1 -1
  5. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts +4 -1
  6. package/dist/components/selfie_capture/SelfieGuidanceModelsProvider.d.ts.map +1 -1
  7. package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts +3 -0
  8. package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
  9. package/dist/lib/locales/de.d.ts +1 -0
  10. package/dist/lib/locales/de.d.ts.map +1 -1
  11. package/dist/lib/locales/es.d.ts +1 -0
  12. package/dist/lib/locales/es.d.ts.map +1 -1
  13. package/dist/lib/locales/fr.d.ts +1 -0
  14. package/dist/lib/locales/fr.d.ts.map +1 -1
  15. package/dist/lib/locales/index.d.ts +8 -0
  16. package/dist/lib/locales/index.d.ts.map +1 -1
  17. package/dist/lib/locales/it.d.ts +1 -0
  18. package/dist/lib/locales/it.d.ts.map +1 -1
  19. package/dist/lib/locales/ja.d.ts +1 -0
  20. package/dist/lib/locales/ja.d.ts.map +1 -1
  21. package/dist/lib/locales/pt.d.ts +1 -0
  22. package/dist/lib/locales/pt.d.ts.map +1 -1
  23. package/dist/lib/locales/ru.d.ts +1 -0
  24. package/dist/lib/locales/ru.d.ts.map +1 -1
  25. package/dist/lib/locales/zh.d.ts +1 -0
  26. package/dist/lib/locales/zh.d.ts.map +1 -1
  27. package/dist/lib/models/FaceDetection.d.ts +9 -1
  28. package/dist/lib/models/FaceDetection.d.ts.map +1 -1
  29. package/dist/lib/utils/lighting.d.ts +19 -0
  30. package/dist/lib/utils/lighting.d.ts.map +1 -0
  31. package/dist/sdk2.cjs.development.js +167 -14
  32. package/dist/sdk2.cjs.development.js.map +1 -1
  33. package/dist/sdk2.cjs.production.js +1 -1
  34. package/dist/sdk2.cjs.production.js.map +1 -1
  35. package/dist/sdk2.esm.js +167 -14
  36. package/dist/sdk2.esm.js.map +1 -1
  37. package/dist/sdk2.umd.development.js +167 -14
  38. package/dist/sdk2.umd.development.js.map +1 -1
  39. package/dist/sdk2.umd.production.js +1 -1
  40. package/dist/sdk2.umd.production.js.map +1 -1
  41. package/dist/version.d.ts +1 -1
  42. package/package.json +1 -1
@@ -211,7 +211,7 @@
211
211
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
212
212
  };
213
213
 
214
- var webSdkVersion = '2.3.87';
214
+ var webSdkVersion = '2.3.89';
215
215
 
216
216
  function getPlatform() {
217
217
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -8800,14 +8800,29 @@
8800
8800
  // we found that the bounding box ends at the brow and misses the forehead. this ratio represents how much we should extend the box to include the forehead.
8801
8801
  _k = _a.noseTrackingThreshold,
8802
8802
  // we found that the bounding box ends at the brow and misses the forehead. this ratio represents how much we should extend the box to include the forehead.
8803
- noseTrackingThreshold = _k === void 0 ? 0.2 : _k;
8803
+ noseTrackingThreshold = _k === void 0 ? 0.2 : _k,
8804
+ // this represents the maximum distance that the nose can be from the center of the face box -- 20% of the face box width or height
8805
+ minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
8806
+ minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
8807
+ minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold,
8808
+ brightness = _a.brightness,
8809
+ range = _a.range,
8810
+ variance = _a.variance;
8804
8811
  var face = faces[0];
8805
8812
  var faceNotDetected = faces.length === 0;
8806
8813
  var faceNotCentered = false,
8807
8814
  faceLookingAway = false,
8808
8815
  faceTooClose = false,
8809
- faceTooFar = false;
8810
- if (face) {
8816
+ faceTooFar = false,
8817
+ faceVisibilityTooLow = false;
8818
+ var hasAnyThreshold = minCaptureBrightnessThreshold !== undefined || minCaptureRangeThreshold !== undefined || minCaptureVarianceThreshold !== undefined;
8819
+ if (hasAnyThreshold) {
8820
+ var tooDark = minCaptureBrightnessThreshold !== undefined && brightness !== undefined && brightness < minCaptureBrightnessThreshold;
8821
+ var tooLowRange = minCaptureRangeThreshold !== undefined && range !== undefined && range < minCaptureRangeThreshold;
8822
+ var tooLowVariance = minCaptureVarianceThreshold !== undefined && variance !== undefined && variance < minCaptureVarianceThreshold;
8823
+ faceVisibilityTooLow = !!(tooDark || tooLowRange || tooLowVariance);
8824
+ }
8825
+ if (face && !faceVisibilityTooLow) {
8811
8826
  // calculate frame centroids
8812
8827
  var frameCX = videoWidth / 2;
8813
8828
  var frameCY = videoHeight / 2;
@@ -8846,7 +8861,7 @@
8846
8861
  }
8847
8862
  var faceIsStable = false,
8848
8863
  noseIsStable = false;
8849
- if (faceInGuides) {
8864
+ if (faceInGuides && !faceVisibilityTooLow) {
8850
8865
  var framesNeeded = Math.max(Math.ceil(average(framesNeededSamples$1)), 5);
8851
8866
  trackFace(face, framesNeeded, videoWidth, videoHeight);
8852
8867
  faceIsStable = lastNFaces.length >= framesNeeded && !lastNFacePairs.some(function (pair) {
@@ -8856,7 +8871,7 @@
8856
8871
  return pair.distance > noseDistanceThreshold;
8857
8872
  });
8858
8873
  }
8859
- var faceReady = faceInGuides && faceIsStable && noseIsStable;
8874
+ var faceReady = faceInGuides && faceIsStable && noseIsStable && !faceVisibilityTooLow;
8860
8875
  return {
8861
8876
  face: face,
8862
8877
  faceNotDetected: faceNotDetected,
@@ -8867,7 +8882,8 @@
8867
8882
  faceReady: faceReady,
8868
8883
  faceReadyAt: faceReady ? new Date() : null,
8869
8884
  faceIsStable: faceIsStable,
8870
- noseIsStable: noseIsStable
8885
+ noseIsStable: noseIsStable,
8886
+ faceVisibilityTooLow: faceVisibilityTooLow
8871
8887
  };
8872
8888
  }
8873
8889
  function testFaceDetectionAgainstKnownImage(detector) {
@@ -12599,6 +12615,7 @@
12599
12615
  'Move forward...': 'Hay que moverse hacia adelante...',
12600
12616
  'Move to the center...': 'Hay que moverse hacia el centro...',
12601
12617
  'Waiting for face to be detected...': 'Esperando que se detecte la cara...',
12618
+ 'Improve lighting conditions...': 'Hay que buscar mejor iluminación...',
12602
12619
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Hay que quitarse lo que cubre los ojos (lentes, parche, etc.)...',
12603
12620
  'Please remove your head coverings (hat scarf etc.)...': 'Hay que quitarse lo que cubre la cabeza (gorra, mascada, etc.)...',
12604
12621
  'Please remove your mask...': 'Hay que quitarse el cubrebocas...',
@@ -12730,6 +12747,7 @@
12730
12747
  'Move forward...': 'Nach vorne bewegen...',
12731
12748
  'Move to the center...': 'In die Mitte bewegen...',
12732
12749
  'Waiting for face to be detected...': 'Warte auf die Gesichtserkennung...',
12750
+ 'Improve lighting conditions...': 'Beleuchtungsbedingungen verbessern...',
12733
12751
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Bitte Augenbedeckung entfernen (Sonnenbrille, Augenklappe usw.)...',
12734
12752
  'Please remove your head coverings (hat scarf etc.)...': 'Bitte Kopfbedeckung abnehmen (Mütze, Schal usw.)...',
12735
12753
  'Please remove your mask...': 'Bitte Maske ablegen...',
@@ -12861,6 +12879,7 @@
12861
12879
  'Move forward...': 'Avancez...',
12862
12880
  'Move to the center...': 'Déplacez-vous vers le centre...',
12863
12881
  'Waiting for face to be detected...': 'En attente de détection du visage...',
12882
+ 'Improve lighting conditions...': "Améliorer les conditions d'éclairage...",
12864
12883
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Veuillez retirer ce qui recouvre vos yeux (lunettes de soleil, cache-œil, etc.)...',
12865
12884
  'Please remove your head coverings (hat scarf etc.)...': 'Veuillez retirer vos couvre-chefs (chapeau, foulard, etc.)...',
12866
12885
  'Please remove your mask...': 'Veuillez retirer votre masque...',
@@ -12992,6 +13011,7 @@
12992
13011
  'Move forward...': 'Spostarsi più vicino...',
12993
13012
  'Move to the center...': 'Spostarsi al centro...',
12994
13013
  'Waiting for face to be detected...': 'In attesa che venga rilevato il volto...',
13014
+ 'Improve lighting conditions...': 'Migliorare le condizioni di illuminazione...',
12995
13015
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Rimuovere tutto ciò che copre gli occhi (occhiali da sole, bende, ecc.)...',
12996
13016
  'Please remove your head coverings (hat scarf etc.)...': 'Rimuovere tutto ciò che ricopre il capo (cappello, sciarpa, ecc.)...',
12997
13017
  'Please remove your mask...': 'Rimuovere la mascherina...',
@@ -13123,6 +13143,7 @@
13123
13143
  'Move forward...': '近づいてください…',
13124
13144
  'Move to the center...': '中央へ移動してください…',
13125
13145
  'Waiting for face to be detected...': '顔が検出されるのを待っています…',
13146
+ 'Improve lighting conditions...': '照明条件を改善してください…',
13126
13147
  'Please remove your eye coverings (sunglasses eye patch etc.)...': '目を覆うもの(サングラスや眼帯など)を取り外してください…',
13127
13148
  'Please remove your head coverings (hat scarf etc.)...': '頭を覆うもの(帽子やスカーフなど)を取り外してください…',
13128
13149
  'Please remove your mask...': 'マスクを取り外してください…',
@@ -13254,6 +13275,7 @@
13254
13275
  'Move forward...': 'Mover para frente...',
13255
13276
  'Move to the center...': 'Mover para o centro...',
13256
13277
  'Waiting for face to be detected...': 'Aguardando a detecção de rosto...',
13278
+ 'Improve lighting conditions...': 'Melhore as condições de iluminação...',
13257
13279
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Por favor, remova as coberturas dos olhos (óculos de sol, tapa-olho, etc.)...',
13258
13280
  'Please remove your head coverings (hat scarf etc.)...': 'Por favor, remova as coberturas da cabeça (chapéu, cachecol, etc.)...',
13259
13281
  'Please remove your mask...': 'Por favor, remova sua máscara...',
@@ -13385,6 +13407,7 @@
13385
13407
  'Move forward...': 'Подвиньтесь вперед…',
13386
13408
  'Move to the center...': 'Переместите к центру…',
13387
13409
  'Waiting for face to be detected...': 'Ожидание обнаружения лица…',
13410
+ 'Improve lighting conditions...': 'Улучшите условия освещения…',
13388
13411
  'Please remove your eye coverings (sunglasses eye patch etc.)...': 'Снимите предметы, закрывающие глаза (солнцезащитные очки, повязку и т.д.)…',
13389
13412
  'Please remove your head coverings (hat scarf etc.)...': 'Снимите предметы, покрывающие голову (шапку, шарф и т.д.)…',
13390
13413
  'Please remove your mask...': 'Снимите маску…',
@@ -13516,6 +13539,7 @@
13516
13539
  'Move forward...': '請前進...',
13517
13540
  'Move to the center...': '請移至中心...',
13518
13541
  'Waiting for face to be detected...': '正在等待臉部辨識...',
13542
+ 'Improve lighting conditions...': '改善照明條件...',
13519
13543
  'Please remove your eye coverings (sunglasses eye patch etc.)...': '請取下眼睛遮蓋物(太陽眼鏡、眼罩等)...',
13520
13544
  'Please remove your head coverings (hat scarf etc.)...': '請取下頭部遮蓋物(帽子、圍巾等)...',
13521
13545
  'Please remove your mask...': '請脫下口罩...',
@@ -20773,6 +20797,110 @@
20773
20797
  };
20774
20798
  var templateObject_1$n, templateObject_2$l;
20775
20799
 
20800
+ function detectBrightnessAndContrast(frame, brightnessAverager) {
20801
+ var ctx = frame.getContext('2d');
20802
+ if (!ctx || frame.width === 0 || frame.height === 0) return {};
20803
+ var imageData = ctx.getImageData(0, 0, frame.width, frame.height);
20804
+ var pixels = imageData.data; // This is already Uint8ClampedArray
20805
+ var width = frame.width;
20806
+ var sampleResolution = 10;
20807
+ var xStep = Math.max(1, Math.floor(width / sampleResolution));
20808
+ var yStep = Math.max(1, Math.floor(frame.height / sampleResolution));
20809
+ var brightness = 0;
20810
+ var brightnessForVariance = 0;
20811
+ var minBrightness = Infinity;
20812
+ var maxBrightness = -Infinity;
20813
+ var iterations = 0;
20814
+ for (var y = Math.floor(yStep / 2); y < frame.height; y += yStep) {
20815
+ for (var x = Math.floor(xStep / 2); x < width; x += xStep) {
20816
+ var pixelIndex = (y * width + x) * 4;
20817
+ var r = pixels[pixelIndex];
20818
+ var g = pixels[pixelIndex + 1];
20819
+ var b = pixels[pixelIndex + 2];
20820
+ // https://en.wikipedia.org/wiki/Relative_luminance
20821
+ // pixels are represented by 4 channels/bytes, thus a step of 4
20822
+ // the luminance formula is: 0.2126 * R + 0.7152 * G + 0.0722 * B (alpha is not used in this formula)
20823
+ var luminance = r * 0.2126 + g * 0.7152 + b * 0.0722;
20824
+ brightness += luminance;
20825
+ brightnessForVariance += luminance * luminance;
20826
+ minBrightness = Math.min(minBrightness, luminance);
20827
+ maxBrightness = Math.max(maxBrightness, luminance);
20828
+ iterations++;
20829
+ }
20830
+ }
20831
+ var _a = brightnessAverager(brightness / iterations),
20832
+ avg = _a.avg,
20833
+ isFull = _a.isFull;
20834
+ var range = maxBrightness - minBrightness;
20835
+ var variance = brightnessForVariance / iterations - Math.pow(brightness / iterations, 2);
20836
+ return {
20837
+ brightness: isFull ? avg : undefined,
20838
+ range: isFull ? range : undefined,
20839
+ variance: isFull ? variance : undefined
20840
+ };
20841
+ }
20842
+ function createRunningAvgFIFO(capacity) {
20843
+ var cap = capacity | 0;
20844
+ var buf = new Float64Array(cap);
20845
+ var head = 0; // next write index
20846
+ var count = 0; // how many valid items (<= cap)
20847
+ var sum = 0;
20848
+ return {
20849
+ add: function add(x) {
20850
+ if (count === cap) {
20851
+ sum -= buf[head];
20852
+ } else {
20853
+ count++;
20854
+ }
20855
+ buf[head] = x;
20856
+ sum += x;
20857
+ head = head + 1 === cap ? 0 : head + 1;
20858
+ return {
20859
+ avg: sum / count,
20860
+ isFull: count === cap
20861
+ };
20862
+ },
20863
+ avg: function avg() {
20864
+ return count ? sum / count : 0;
20865
+ },
20866
+ size: function size() {
20867
+ return count;
20868
+ },
20869
+ clear: function clear() {
20870
+ head = 0;
20871
+ count = 0;
20872
+ sum = 0;
20873
+ },
20874
+ isFull: function isFull() {
20875
+ return count === cap;
20876
+ }
20877
+ };
20878
+ }
20879
+ function useRunningAvg(capacity) {
20880
+ var fifoRef = React.useRef();
20881
+ if (!fifoRef.current) fifoRef.current = createRunningAvgFIFO(capacity);
20882
+ React.useEffect(function () {
20883
+ fifoRef.current = createRunningAvgFIFO(capacity);
20884
+ }, [capacity]);
20885
+ return {
20886
+ addToAverage: function addToAverage(x) {
20887
+ return fifoRef.current.add(x);
20888
+ },
20889
+ average: function average() {
20890
+ return fifoRef.current.avg();
20891
+ },
20892
+ size: function size() {
20893
+ return fifoRef.current.size();
20894
+ },
20895
+ isFull: function isFull() {
20896
+ return fifoRef.current.isFull();
20897
+ },
20898
+ clear: function clear() {
20899
+ return fifoRef.current.clear();
20900
+ }
20901
+ };
20902
+ }
20903
+
20776
20904
  var SelfieGuidanceModelsContext = /*#__PURE__*/React.createContext({
20777
20905
  start: function start() {
20778
20906
  return null;
@@ -20802,7 +20930,10 @@
20802
20930
  _c = _a.modelLoadTimeoutMs,
20803
20931
  modelLoadTimeoutMs = _c === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _c,
20804
20932
  _d = _a.requireVerticalFaceCentering,
20805
- requireVerticalFaceCentering = _d === void 0 ? true : _d;
20933
+ requireVerticalFaceCentering = _d === void 0 ? true : _d,
20934
+ minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
20935
+ minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
20936
+ minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold;
20806
20937
  var _e = useCameraStore(useShallow(function (state) {
20807
20938
  return {
20808
20939
  videoRef: state.videoRef,
@@ -20815,6 +20946,7 @@
20815
20946
  cameraReady = _e.cameraReady;
20816
20947
  var canvasRef = React.useRef(null);
20817
20948
  var onPredictionHandler = React.useRef();
20949
+ var addToAverage = useRunningAvg(5).addToAverage;
20818
20950
  var _f = useLoadFaceDetector({
20819
20951
  onModelError: onModelError,
20820
20952
  modelLoadTimeoutMs: modelLoadTimeoutMs,
@@ -20827,7 +20959,7 @@
20827
20959
  modelError = _f.modelError;
20828
20960
  var _g = useFrameLoop(React.useCallback(function () {
20829
20961
  return __awaiter(_this, void 0, void 0, function () {
20830
- var vw, vh, ctx, prediction, processed, e_1;
20962
+ var vw, vh, ctx, thresholdsProvided, brightnessResults, brightness, range, variance, prediction, processed, e_1;
20831
20963
  var _a, _b;
20832
20964
  return __generator(this, function (_c) {
20833
20965
  switch (_c.label) {
@@ -20845,12 +20977,23 @@
20845
20977
  _c.label = 1;
20846
20978
  case 1:
20847
20979
  _c.trys.push([1, 3,, 4]);
20980
+ thresholdsProvided = minCaptureBrightnessThreshold !== undefined || minCaptureRangeThreshold !== undefined || minCaptureVarianceThreshold !== undefined;
20981
+ brightnessResults = thresholdsProvided ? detectBrightnessAndContrast(canvasRef.current, addToAverage) : undefined;
20982
+ brightness = brightnessResults === null || brightnessResults === void 0 ? void 0 : brightnessResults.brightness;
20983
+ range = brightnessResults === null || brightnessResults === void 0 ? void 0 : brightnessResults.range;
20984
+ variance = brightnessResults === null || brightnessResults === void 0 ? void 0 : brightnessResults.variance;
20848
20985
  prediction = makeFaceDetectorPrediction(canvasRef.current);
20849
20986
  processed = processFaceDetectorPrediction({
20850
20987
  faces: (_a = prediction === null || prediction === void 0 ? void 0 : prediction.faces) !== null && _a !== void 0 ? _a : [],
20851
20988
  videoWidth: vw,
20852
20989
  videoHeight: vh,
20853
- requireVerticalFaceCentering: requireVerticalFaceCentering
20990
+ requireVerticalFaceCentering: requireVerticalFaceCentering,
20991
+ minCaptureBrightnessThreshold: minCaptureBrightnessThreshold,
20992
+ minCaptureRangeThreshold: minCaptureRangeThreshold,
20993
+ minCaptureVarianceThreshold: minCaptureVarianceThreshold,
20994
+ brightness: brightness,
20995
+ range: range,
20996
+ variance: variance
20854
20997
  });
20855
20998
  setLastFaceDetectionAt(new Date().getTime());
20856
20999
  // setLastPrediction(processed)
@@ -20868,7 +21011,7 @@
20868
21011
  }
20869
21012
  });
20870
21013
  });
20871
- }, [cameraReady, modelError, ready, requireVerticalFaceCentering, videoLoaded, videoRef]), {
21014
+ }, [cameraReady, modelError, ready, requireVerticalFaceCentering, videoLoaded, videoRef, addToAverage, minCaptureBrightnessThreshold, minCaptureRangeThreshold, minCaptureVarianceThreshold]), {
20872
21015
  throttleMs: throttleMs,
20873
21016
  autoStart: autoStart
20874
21017
  }),
@@ -21241,6 +21384,7 @@
21241
21384
  guidanceMoveForwardText: 'Move forward...',
21242
21385
  guidanceMoveToCenterText: 'Move to the center...',
21243
21386
  guidanceNoFaceDetectedText: 'Waiting for face to be detected...',
21387
+ guidanceVisibilityTooLowText: 'Improve lighting conditions...',
21244
21388
  guidanceNotStableText: 'Please hold still...',
21245
21389
  guidanceManualCaptureText: 'Position your face in the circle and click to capture.',
21246
21390
  manualCaptureBtnText: 'Capture'
@@ -21248,7 +21392,7 @@
21248
21392
  var allowManualCapture = !!guidanceError && allowManualSelfieCaptureOnLoadingError;
21249
21393
  var satisfied = allowManualCapture || ((_b = prediction === null || prediction === void 0 ? void 0 : prediction.faceReady) !== null && _b !== void 0 ? _b : false);
21250
21394
  if (typeof guidanceSatisfied === 'boolean') satisfied = guidanceSatisfied;
21251
- guidanceMessage || (guidanceMessage = allowManualCapture ? verbiage.guidanceManualCaptureText : satisfied ? verbiage.guidanceHoldStillText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) || !(prediction === null || prediction === void 0 ? void 0 : prediction.noseIsStable) ? verbiage.guidanceNotStableText : '');
21395
+ guidanceMessage || (guidanceMessage = allowManualCapture ? verbiage.guidanceManualCaptureText : satisfied ? verbiage.guidanceHoldStillText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceVisibilityTooLow) ? verbiage.guidanceVisibilityTooLowText : !prediction || (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotDetected) ? verbiage.guidanceNoFaceDetectedText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceNotCentered) ? verbiage.guidanceMoveToCenterText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceLookingAway) ? verbiage.guidanceLookStraightText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooClose) ? verbiage.guidanceMoveBackText : (prediction === null || prediction === void 0 ? void 0 : prediction.faceTooFar) ? verbiage.guidanceMoveForwardText : !(prediction === null || prediction === void 0 ? void 0 : prediction.faceIsStable) || !(prediction === null || prediction === void 0 ? void 0 : prediction.noseIsStable) ? verbiage.guidanceNotStableText : '');
21252
21396
  if (guidanceError && !allowManualSelfieCaptureOnLoadingError) {
21253
21397
  return /*#__PURE__*/React.createElement(SelfieCaptureFallback, {
21254
21398
  classNames: classNames.fallback
@@ -24916,7 +25060,10 @@
24916
25060
  throttleMs: 250,
24917
25061
  onModelError: props.onModelError,
24918
25062
  modelLoadTimeoutMs: props.modelLoadTimeoutMs,
24919
- requireVerticalFaceCentering: false
25063
+ requireVerticalFaceCentering: false,
25064
+ minCaptureBrightnessThreshold: props.minCaptureBrightnessThreshold,
25065
+ minCaptureRangeThreshold: props.minCaptureRangeThreshold,
25066
+ minCaptureVarianceThreshold: props.minCaptureVarianceThreshold
24920
25067
  }, /*#__PURE__*/React.createElement(VideoSignatureWizard, _assign({}, props, {
24921
25068
  onRetryClicked: onRetryClicked
24922
25069
  }))));
@@ -28667,6 +28814,9 @@
28667
28814
  guidesComponent = _a.guidesComponent,
28668
28815
  _q = _a.showFaceGuideThenSignaturePad,
28669
28816
  showFaceGuideThenSignaturePad = _q === void 0 ? false : _q,
28817
+ minCaptureBrightnessThreshold = _a.minCaptureBrightnessThreshold,
28818
+ minCaptureRangeThreshold = _a.minCaptureRangeThreshold,
28819
+ minCaptureVarianceThreshold = _a.minCaptureVarianceThreshold,
28670
28820
  _r = _a.theme,
28671
28821
  theme = _r === void 0 ? 'default' : _r,
28672
28822
  classNames = _a.classNames,
@@ -28737,6 +28887,9 @@
28737
28887
  allowManualSelfieCaptureOnLoadingError: allowManualSelfieCaptureOnLoadingError,
28738
28888
  guidesComponent: guidesComponent,
28739
28889
  showFaceGuideThenSignaturePad: showFaceGuideThenSignaturePad,
28890
+ minCaptureBrightnessThreshold: minCaptureBrightnessThreshold,
28891
+ minCaptureRangeThreshold: minCaptureRangeThreshold,
28892
+ minCaptureVarianceThreshold: minCaptureVarianceThreshold,
28740
28893
  classNames: classNames,
28741
28894
  colors: colors,
28742
28895
  debugMode: debugMode,
@@ -28744,7 +28897,7 @@
28744
28897
  onModelError: onModelError,
28745
28898
  onUserCancel: onUserCancel
28746
28899
  };
28747
- }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
28900
+ }, [onLoadingStarted, onLoadingProgress, onLoadingCompleted, onLoadingFailed, onSelfieCaptured, customOverlayContent, onLoadingOverlayDismissed, loadingOverlayMode, skipSuccessScreen, captureAudio, minSignaturePadPoints, headTrackingDisabled, headTrackingBoundaryPercentage, headTrackingBoundaryType, modelLoadTimeoutMs, faceLivenessProps, allowSignatureAfterLivenessCheckFailure, restartVideoOnSignaturePadCleared, skipLivenessValidation, allowManualSelfieCaptureOnLoadingError, guidesComponent, showFaceGuideThenSignaturePad, minCaptureBrightnessThreshold, minCaptureRangeThreshold, minCaptureVarianceThreshold, classNames, colors, debugMode, verbiage, onModelError, onUserCancel])
28748
28901
  })))));
28749
28902
  };
28750
28903