idmission-web-sdk 2.6.3-changeset-release-develop-c045c91 → 2.6.3-changeset-release-develop-eac763c

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/index.d.ts CHANGED
@@ -11274,7 +11274,7 @@ declare global {
11274
11274
  var IDmissionSDK: IDmissionSDK;
11275
11275
  }
11276
11276
 
11277
- declare const webSdkVersion = "2.6.3-changeset-release-develop-c045c91";
11277
+ declare const webSdkVersion = "2.6.3-changeset-release-develop-eac763c";
11278
11278
 
11279
11279
  /**
11280
11280
  * sdk2's imperative handle on the video-signature capture screen
package/dist/props.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "GENERATED by scripts/propsManifest.mjs at build time. Each customer flow's props, read off dist/index.d.ts.",
3
3
  "schemaVersion": 1,
4
- "version": "2.6.3-changeset-release-develop-c045c91",
4
+ "version": "2.6.3-changeset-release-develop-eac763c",
5
5
  "components": {
6
6
  "IdValidation": {
7
7
  "description": "Render a fullscreen ID capture component that instructs the user to\nphotograph both sides of their ID card, or the full page of their passport.",
@@ -457,17 +457,17 @@ function _iterableToArrayLimit(r, l) {
457
457
  }
458
458
  }
459
459
 
460
- function _arrayLikeToArray$v(r, a) {
460
+ function _arrayLikeToArray$w(r, a) {
461
461
  (null == a || a > r.length) && (a = r.length);
462
462
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
463
463
  return n;
464
464
  }
465
465
 
466
- function _unsupportedIterableToArray$v(r, a) {
466
+ function _unsupportedIterableToArray$w(r, a) {
467
467
  if (r) {
468
- if ("string" == typeof r) return _arrayLikeToArray$v(r, a);
468
+ if ("string" == typeof r) return _arrayLikeToArray$w(r, a);
469
469
  var t = {}.toString.call(r).slice(8, -1);
470
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$v(r, a) : void 0;
470
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$w(r, a) : void 0;
471
471
  }
472
472
  }
473
473
 
@@ -476,11 +476,11 @@ function _nonIterableRest() {
476
476
  }
477
477
 
478
478
  function _slicedToArray(r, e) {
479
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$v(r, e) || _nonIterableRest();
479
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray$w(r, e) || _nonIterableRest();
480
480
  }
481
481
 
482
482
  function _arrayWithoutHoles(r) {
483
- if (Array.isArray(r)) return _arrayLikeToArray$v(r);
483
+ if (Array.isArray(r)) return _arrayLikeToArray$w(r);
484
484
  }
485
485
 
486
486
  function _iterableToArray(r) {
@@ -492,7 +492,7 @@ function _nonIterableSpread() {
492
492
  }
493
493
 
494
494
  function _toConsumableArray(r) {
495
- return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$v(r) || _nonIterableSpread();
495
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$w(r) || _nonIterableSpread();
496
496
  }
497
497
 
498
498
  var webSdkCoreVersion = '0.5.1';
@@ -1267,9 +1267,9 @@ var attemptStatuses = ["active", "completed", "failed", "superseded", "disposed"
1267
1267
  ({
1268
1268
  workflowMilestones: [].concat(_toConsumableArray(workflowMilestones), ["task-completed"])});
1269
1269
 
1270
- function _createForOfIteratorHelperLoose$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1271
- function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$u(r, a) : void 0; } }
1272
- function _arrayLikeToArray$u(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1270
+ function _createForOfIteratorHelperLoose$v(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$v(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1271
+ function _unsupportedIterableToArray$v(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$v(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$v(r, a) : void 0; } }
1272
+ function _arrayLikeToArray$v(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1273
1273
  var maximumBytes = 32 * 1024;
1274
1274
  var maximumTime = 86400000;
1275
1275
  var uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
@@ -1337,7 +1337,7 @@ function validateSnapshot(report) {
1337
1337
  unique(report.phaseTotals.map(function (total) {
1338
1338
  return total.phase;
1339
1339
  }));
1340
- for (var _iterator = _createForOfIteratorHelperLoose$u(report.phaseTotals), _step; !(_step = _iterator()).done;) {
1340
+ for (var _iterator = _createForOfIteratorHelperLoose$v(report.phaseTotals), _step; !(_step = _iterator()).done;) {
1341
1341
  var _total4 = _step.value;
1342
1342
  requireValid(member(phases, _total4.phase) && integer(_total4.completions, 1000000) && _total4.completions <= _total4.duration.entries);
1343
1343
  durationValid(_total4.duration);
@@ -1359,7 +1359,7 @@ function validateSnapshot(report) {
1359
1359
  requireValid(report.recentTransitions.length <= 32);
1360
1360
  var index = 0;
1361
1361
  var atMs = 0;
1362
- for (var _iterator2 = _createForOfIteratorHelperLoose$u(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
1362
+ for (var _iterator2 = _createForOfIteratorHelperLoose$v(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
1363
1363
  var transition = _step2.value;
1364
1364
  requireValid(member(transitionKinds, transition.kind));
1365
1365
  requireValid(integer(transition.index, 1000000) && transition.index > index && integer(transition.atMs) && transition.atMs >= atMs && transition.atMs <= report.elapsedMs);
@@ -1383,12 +1383,12 @@ function validateSnapshot(report) {
1383
1383
  unique(report.controllerGuidanceTotals.map(function (total) {
1384
1384
  return JSON.stringify([total.phase, total.guidance]);
1385
1385
  }));
1386
- for (var _iterator3 = _createForOfIteratorHelperLoose$u(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
1386
+ for (var _iterator3 = _createForOfIteratorHelperLoose$v(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
1387
1387
  var _total2 = _step3.value;
1388
1388
  durationValid(_total2.duration);
1389
1389
  exposureValid(_total2.phase, _total2.exposure);
1390
1390
  }
1391
- for (var _iterator4 = _createForOfIteratorHelperLoose$u(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
1391
+ for (var _iterator4 = _createForOfIteratorHelperLoose$v(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
1392
1392
  var _total3 = _step4.value;
1393
1393
  durationValid(_total3.duration);
1394
1394
  guidanceValid(_total3.phase, _total3.guidance, false);
@@ -1422,7 +1422,7 @@ function encodeProgressBatch(batch) {
1422
1422
  requireValid(batch.schemaVersion === 1 && batch.sdkVersion.length > 0 && batch.sdkVersion.length <= 32 && batch.sessionId.length > 0 && uuidPattern.test(batch.producerId) && integer(batch.sentAtUnixMs, Number.MAX_SAFE_INTEGER));
1423
1423
  var reports = [];
1424
1424
  var dropped = [];
1425
- for (var _iterator5 = _createForOfIteratorHelperLoose$u(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
1425
+ for (var _iterator5 = _createForOfIteratorHelperLoose$v(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
1426
1426
  var report = _step5.value;
1427
1427
  try {
1428
1428
  validateSnapshot(report);
@@ -1451,9 +1451,9 @@ function encodeProgressBatch(batch) {
1451
1451
  };
1452
1452
  }
1453
1453
 
1454
- function _createForOfIteratorHelperLoose$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1455
- function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$t(r, a) : void 0; } }
1456
- function _arrayLikeToArray$t(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1454
+ function _createForOfIteratorHelperLoose$u(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$u(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1455
+ function _unsupportedIterableToArray$u(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$u(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$u(r, a) : void 0; } }
1456
+ function _arrayLikeToArray$u(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
1457
1457
  /** Visible time without progress in a capture phase that arms a stream. */
1458
1458
  var stallMs = 20000;
1459
1459
  var capturePhases = new Set(["id-front", "id-back", "passport", "selfie", "signature"]);
@@ -1516,7 +1516,7 @@ function createSessionActor(options, deps) {
1516
1516
  var due = new Map();
1517
1517
  var eligibilityRetries = new Map();
1518
1518
  function dropped(report) {
1519
- for (var _iterator = _createForOfIteratorHelperLoose$t(streams), _step; !(_step = _iterator()).done;) {
1519
+ for (var _iterator = _createForOfIteratorHelperLoose$u(streams), _step; !(_step = _iterator()).done;) {
1520
1520
  var stream = _step.value;
1521
1521
  if (stream.state.report.streamId === report.streamId) stream.state = _extends({}, stream.state, {
1522
1522
  report: _extends({}, stream.state.report, {
@@ -1561,7 +1561,7 @@ function createSessionActor(options, deps) {
1561
1561
  var retained = new Set(queued.map(function (report) {
1562
1562
  return report.sequence;
1563
1563
  }));
1564
- for (var _iterator2 = _createForOfIteratorHelperLoose$t(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
1564
+ for (var _iterator2 = _createForOfIteratorHelperLoose$u(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
1565
1565
  var _sequence = _step2.value;
1566
1566
  if (!retained.has(_sequence)) due["delete"](_sequence);
1567
1567
  }
@@ -1574,7 +1574,7 @@ function createSessionActor(options, deps) {
1574
1574
  var keys = new Set(reports.map(function (report) {
1575
1575
  return report.sequence;
1576
1576
  }));
1577
- for (var _iterator3 = _createForOfIteratorHelperLoose$t(pending), _step3; !(_step3 = _iterator3()).done;) {
1577
+ for (var _iterator3 = _createForOfIteratorHelperLoose$u(pending), _step3; !(_step3 = _iterator3()).done;) {
1578
1578
  var _step3$value = _slicedToArray(_step3.value, 2),
1579
1579
  key = _step3$value[0],
1580
1580
  report = _step3$value[1];
@@ -1598,14 +1598,14 @@ function createSessionActor(options, deps) {
1598
1598
  if ((_emergency = emergency) != null && _emergency.reports.some(function (report) {
1599
1599
  return report.context === context;
1600
1600
  })) emergency = null;
1601
- for (var _iterator4 = _createForOfIteratorHelperLoose$t(pending), _step4; !(_step4 = _iterator4()).done;) {
1601
+ for (var _iterator4 = _createForOfIteratorHelperLoose$u(pending), _step4; !(_step4 = _iterator4()).done;) {
1602
1602
  var _step4$value = _slicedToArray(_step4.value, 2),
1603
1603
  key = _step4$value[0],
1604
1604
  report = _step4$value[1];
1605
1605
  if (report.context === context) pending["delete"](key);
1606
1606
  }
1607
1607
  for (var i = terminal.length - 1; i >= 0; i--) if (terminal[i].context === context) terminal.splice(i, 1);
1608
- for (var _iterator5 = _createForOfIteratorHelperLoose$t(streams), _step5; !(_step5 = _iterator5()).done;) {
1608
+ for (var _iterator5 = _createForOfIteratorHelperLoose$u(streams), _step5; !(_step5 = _iterator5()).done;) {
1609
1609
  var stream = _step5.value;
1610
1610
  if (stream.state.report.context === context) {
1611
1611
  stream.disposed = true;
@@ -1634,7 +1634,7 @@ function createSessionActor(options, deps) {
1634
1634
  unsubscribe();
1635
1635
  cancelTimer == null || cancelTimer();
1636
1636
  cancelRequest == null || cancelRequest();
1637
- for (var _iterator6 = _createForOfIteratorHelperLoose$t(streams), _step6; !(_step6 = _iterator6()).done;) {
1637
+ for (var _iterator6 = _createForOfIteratorHelperLoose$u(streams), _step6; !(_step6 = _iterator6()).done;) {
1638
1638
  var stream = _step6.value;
1639
1639
  stream.disposed = true;
1640
1640
  }
@@ -1656,7 +1656,7 @@ function createSessionActor(options, deps) {
1656
1656
  sentAtUnixMs: Math.floor(deps.unixMs()),
1657
1657
  reports: reports
1658
1658
  });
1659
- for (var _iterator7 = _createForOfIteratorHelperLoose$t(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
1659
+ for (var _iterator7 = _createForOfIteratorHelperLoose$u(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
1660
1660
  var report = _step7.value;
1661
1661
  dropped(report);
1662
1662
  removeReports([report]);
@@ -1838,14 +1838,14 @@ function createSessionActor(options, deps) {
1838
1838
  retries = 0;
1839
1839
  failureStreak = 0;
1840
1840
  } else if (result.kind === "permanent") {
1841
- for (_iterator11 = _createForOfIteratorHelperLoose$t(sending.reports); !(_step11 = _iterator11()).done;) {
1841
+ for (_iterator11 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step11 = _iterator11()).done;) {
1842
1842
  report = _step11.value;
1843
1843
  disable(report.context);
1844
1844
  }
1845
1845
  } else {
1846
1846
  backoff(result);
1847
1847
  if (++retries > 3) {
1848
- for (_iterator12 = _createForOfIteratorHelperLoose$t(sending.reports); !(_step12 = _iterator12()).done;) {
1848
+ for (_iterator12 = _createForOfIteratorHelperLoose$u(sending.reports); !(_step12 = _iterator12()).done;) {
1849
1849
  _report = _step12.value;
1850
1850
  dropped(_report);
1851
1851
  }
@@ -1873,7 +1873,7 @@ function createSessionActor(options, deps) {
1873
1873
  backoff({});
1874
1874
  if (authorizing) failedEligibility(authorizing);
1875
1875
  if (frozen && ++retries > 3) {
1876
- for (_iterator13 = _createForOfIteratorHelperLoose$t(frozen.reports); !(_step13 = _iterator13()).done;) {
1876
+ for (_iterator13 = _createForOfIteratorHelperLoose$u(frozen.reports); !(_step13 = _iterator13()).done;) {
1877
1877
  _report2 = _step13.value;
1878
1878
  dropped(_report2);
1879
1879
  }
@@ -1928,7 +1928,7 @@ function createSessionActor(options, deps) {
1928
1928
  if (outcome.kind === "committed") {
1929
1929
  if (emergency === sending) emergency = null;
1930
1930
  } else if (outcome.kind === "permanent") {
1931
- for (var _iterator8 = _createForOfIteratorHelperLoose$t(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
1931
+ for (var _iterator8 = _createForOfIteratorHelperLoose$u(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
1932
1932
  var report = _step8.value;
1933
1933
  disable(report.context);
1934
1934
  }
@@ -1997,7 +1997,7 @@ function createSessionActor(options, deps) {
1997
1997
  }
1998
1998
  function tick() {
1999
1999
  if (disposed || visibility === "hidden") return;
2000
- for (var _iterator9 = _createForOfIteratorHelperLoose$t(streams), _step9; !(_step9 = _iterator9()).done;) {
2000
+ for (var _iterator9 = _createForOfIteratorHelperLoose$u(streams), _step9; !(_step9 = _iterator9()).done;) {
2001
2001
  var stream = _step9.value;
2002
2002
  var report = prepareDeadline(stream);
2003
2003
  if (!(report != null && report.current)) continue;
@@ -2028,7 +2028,7 @@ function createSessionActor(options, deps) {
2028
2028
  if (disposed || visibility === "hidden") return;
2029
2029
  var delay = Infinity;
2030
2030
  if (!busy && (pending.size || terminal.length || frozen || emergency)) delay = Math.max(0, deliveryReadyAt() - deps.now());
2031
- for (var _iterator0 = _createForOfIteratorHelperLoose$t(streams), _step0; !(_step0 = _iterator0()).done;) {
2031
+ for (var _iterator0 = _createForOfIteratorHelperLoose$u(streams), _step0; !(_step0 = _iterator0()).done;) {
2032
2032
  var stream = _step0.value;
2033
2033
  var report = prepareDeadline(stream);
2034
2034
  if (!(report != null && report.current)) continue;
@@ -2125,7 +2125,7 @@ function createSessionActor(options, deps) {
2125
2125
  return guard$2(function () {
2126
2126
  if (disposed || next === visibility) return;
2127
2127
  visibility = next;
2128
- for (var _iterator1 = _createForOfIteratorHelperLoose$t(streams), _step1; !(_step1 = _iterator1()).done;) {
2128
+ for (var _iterator1 = _createForOfIteratorHelperLoose$u(streams), _step1; !(_step1 = _iterator1()).done;) {
2129
2129
  var stream = _step1.value;
2130
2130
  if (stream.state.report.attemptStatus !== "active") continue;
2131
2131
  armIfStalled(stream);
@@ -2167,7 +2167,7 @@ function createSessionActor(options, deps) {
2167
2167
  if (taskDisposed) return;
2168
2168
  taskDisposed = true;
2169
2169
  if (workflowStream) close(workflowStream, "disposed");
2170
- for (var _iterator10 = _createForOfIteratorHelperLoose$t(captures), _step10; !(_step10 = _iterator10()).done;) {
2170
+ for (var _iterator10 = _createForOfIteratorHelperLoose$u(captures), _step10; !(_step10 = _iterator10()).done;) {
2171
2171
  var capture = _step10.value;
2172
2172
  capture.dispose();
2173
2173
  }
@@ -3562,9 +3562,9 @@ function blobToB64(blob) {
3562
3562
  });
3563
3563
  }
3564
3564
 
3565
- function _createForOfIteratorHelperLoose$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3566
- function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$s(r, a) : void 0; } }
3567
- function _arrayLikeToArray$s(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3565
+ function _createForOfIteratorHelperLoose$t(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$t(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3566
+ function _unsupportedIterableToArray$t(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$t(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$t(r, a) : void 0; } }
3567
+ function _arrayLikeToArray$t(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
3568
3568
  /**
3569
3569
  * Parser for AAMVA (American Association of Motor Vehicle Administrators)
3570
3570
  * PDF417 barcode data found on US and Canadian driver's licenses.
@@ -3826,7 +3826,7 @@ function parseAAMVABarcode(rawData) {
3826
3826
  DAD: false
3827
3827
  };
3828
3828
  var daaValue = null;
3829
- for (var _iterator = _createForOfIteratorHelperLoose$s(lines), _step; !(_step = _iterator()).done;) {
3829
+ for (var _iterator = _createForOfIteratorHelperLoose$t(lines), _step; !(_step = _iterator()).done;) {
3830
3830
  var line = _step.value;
3831
3831
  var match = line.match(fieldRegex);
3832
3832
  if (match) {
@@ -3867,7 +3867,7 @@ function parseAAMVABarcode(rawData) {
3867
3867
  result.fields.push(field);
3868
3868
  }
3869
3869
  };
3870
- for (var _iterator2 = _createForOfIteratorHelperLoose$s(daaFields), _step2; !(_step2 = _iterator2()).done;) {
3870
+ for (var _iterator2 = _createForOfIteratorHelperLoose$t(daaFields), _step2; !(_step2 = _iterator2()).done;) {
3871
3871
  _loop();
3872
3872
  }
3873
3873
  }
@@ -5937,6 +5937,131 @@ function useLatestCallbacks(config) {
5937
5937
  })[0];
5938
5938
  }
5939
5939
 
5940
+ // Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
5941
+ // try/catch) and guide_images/useGuideImages.ts (warn, for the
5942
+ // missing-dimensions warning). Trimmed transform vs sdk2's
5943
+ // lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
5944
+ // "no TS enum" convention, plan.md Global Constraints); numeric ordering
5945
+ // (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
5946
+ // LogLevel.X` comparisons behave identically.
5947
+ var noop = function noop() {};
5948
+ var debug = function debug() {
5949
+ return (noop).apply(void 0, arguments);
5950
+ }; // eslint-disable-line no-console
5951
+ var log = function log() {
5952
+ return (noop).apply(void 0, arguments);
5953
+ }; // eslint-disable-line no-console
5954
+ var warn = function warn() {
5955
+ return (console.warn ).apply(void 0, arguments);
5956
+ }; // eslint-disable-line no-console
5957
+ var error = function error() {
5958
+ return (console.error ).apply(void 0, arguments);
5959
+ }; // eslint-disable-line no-console
5960
+
5961
+ function _createForOfIteratorHelperLoose$s(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (t) return (t = t.call(r)).next.bind(t); if (Array.isArray(r) || (t = _unsupportedIterableToArray$s(r)) || e) { t && (r = t); var o = 0; return function () { return o >= r.length ? { done: true } : { done: false, value: r[o++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
5962
+ function _unsupportedIterableToArray$s(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$s(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$s(r, a) : void 0; } }
5963
+ function _arrayLikeToArray$s(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5964
+ /**
5965
+ * True unless the host bundle was built for production.
5966
+ *
5967
+ * Follows the `"development"` convention that React and mainstream
5968
+ * bundlers use, and that `websdk-compat`'s rollup build defines. Read inside a
5969
+ * `try` because unbundled ESM has no `process`; that case counts as
5970
+ * production, so a missing define never adds console output.
5971
+ */
5972
+ function isDevelopment() {
5973
+ try {
5974
+ return "development" !== 'production';
5975
+ } catch (_unused) {
5976
+ return false;
5977
+ }
5978
+ }
5979
+ /**
5980
+ * Plain objects and arrays are compared field by field, so an inline literal
5981
+ * rebuilt every render with the same values is not a change. Anything else
5982
+ * (class instances, DOM nodes, blobs) is compared by identity.
5983
+ */
5984
+ function isPlainContainer(value) {
5985
+ if (Array.isArray(value)) return true;
5986
+ if (typeof value !== 'object' || value === null) return false;
5987
+ var prototype = Object.getPrototypeOf(value);
5988
+ return prototype === Object.prototype || prototype === null;
5989
+ }
5990
+ /**
5991
+ * Callbacks the flows wrap with `useLatestCallbacks`: a bag's own top-level
5992
+ * functions and those of its `liveness` sub-bag. Replacing or removing one of
5993
+ * these is live. Any other function (such as `io.acquireCamera`) is a
5994
+ * controller dependency fixed at mount, so it compares by identity.
5995
+ */
5996
+ var LIVE_CALLBACK_PATH = /^[^.[\]]+(\.liveness)?\.[^.[\]]+$/;
5997
+ /**
5998
+ * Every leaf whose value differs between `before` and `after`.
5999
+ *
6000
+ * A live callback's new implementation, or its removal, is not reported. A
6001
+ * callback ADDED after mount is, because only callbacks present at mount are
6002
+ * wrapped. An absent field and an explicit `undefined` are the same value.
6003
+ */
6004
+ function mountOnlyChanges(before, after, path) {
6005
+ if (Object.is(before, after)) return [];
6006
+ if (typeof before === 'function' && (typeof after === 'function' || after === undefined) && LIVE_CALLBACK_PATH.test(path)) {
6007
+ return [];
6008
+ }
6009
+ if (!isPlainContainer(before) || !isPlainContainer(after) || Array.isArray(before) !== Array.isArray(after)) {
6010
+ return [{
6011
+ path: path,
6012
+ before: before,
6013
+ after: after
6014
+ }];
6015
+ }
6016
+ var keys = new Set([].concat(_toConsumableArray(Object.keys(before)), _toConsumableArray(Object.keys(after))));
6017
+ return _toConsumableArray(keys).flatMap(function (key) {
6018
+ return mountOnlyChanges(before[key], after[key], Array.isArray(before) ? path + "[" + key + "]" : path + "." + key);
6019
+ });
6020
+ }
6021
+ /**
6022
+ * Whether a value is small and safe enough to print. Long strings are left
6023
+ * out: capture bags can carry image data (`precapturedDocuments`), which is
6024
+ * both personal data and too large to be useful in a warning.
6025
+ */
6026
+ var isPrintable = function isPrintable(value) {
6027
+ return value === null || value === undefined || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string' && value.length <= 64;
6028
+ };
6029
+ var describe = function describe(value) {
6030
+ return typeof value === 'string' ? JSON.stringify(value) : String(value);
6031
+ };
6032
+ /**
6033
+ * In development builds, warns once per input path when a value in `inputs`
6034
+ * differs from its value at mount. Does nothing in production.
6035
+ *
6036
+ * `owner` names the component or hook in the message, and `remedy` finishes
6037
+ * the sentence "To change it, …". Pass only inputs that really are mount-only:
6038
+ * a live input passed here would warn about a change that did take effect.
6039
+ */
6040
+ function useMountOnlyWarnings(owner, remedy, inputs) {
6041
+ var mounted = React.useRef(inputs);
6042
+ var warned = React.useRef(new Set());
6043
+ React.useEffect(function () {
6044
+ if (!isDevelopment()) return;
6045
+ for (var _i = 0, _Object$entries = Object.entries(inputs); _i < _Object$entries.length; _i++) {
6046
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
6047
+ name = _Object$entries$_i[0],
6048
+ value = _Object$entries$_i[1];
6049
+ for (var _iterator = _createForOfIteratorHelperLoose$s(mountOnlyChanges(mounted.current[name], value, name)), _step; !(_step = _iterator()).done;) {
6050
+ var _step$value = _step.value,
6051
+ path = _step$value.path,
6052
+ before = _step$value.before,
6053
+ after = _step$value.after;
6054
+ if (warned.current.has(path)) continue;
6055
+ warned.current.add(path);
6056
+ var values = isPrintable(before) && isPrintable(after) ? " (" + describe(before) + " \u2192 " + describe(after) + ")" : '';
6057
+ warn("[" + owner + "] `" + path + "` changed after mount" + values + " and was ignored: " + (owner + " reads it once, at mount. To change it, " + remedy + "."));
6058
+ }
6059
+ }
6060
+ });
6061
+ }
6062
+ /** The `remedy` every flow gives for a changed capture-bag field. */
6063
+ var FLOW_MOUNT_ONLY_REMEDY = 'remount the flow with a React `key`, or pass your own controller';
6064
+
5940
6065
  var useIsomorphicLayoutEffect$1 = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
5941
6066
  /**
5942
6067
  * Uploads documents to the IDmission document service, one independent call
@@ -8522,27 +8647,6 @@ function evaluateIsMobile$1(nav) {
8522
8647
  return false;
8523
8648
  }
8524
8649
 
8525
- // Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
8526
- // try/catch) and guide_images/useGuideImages.ts (warn, for the
8527
- // missing-dimensions warning). Trimmed transform vs sdk2's
8528
- // lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
8529
- // "no TS enum" convention, plan.md Global Constraints); numeric ordering
8530
- // (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
8531
- // LogLevel.X` comparisons behave identically.
8532
- var noop = function noop() {};
8533
- var debug = function debug() {
8534
- return (noop).apply(void 0, arguments);
8535
- }; // eslint-disable-line no-console
8536
- var log = function log() {
8537
- return (noop).apply(void 0, arguments);
8538
- }; // eslint-disable-line no-console
8539
- var warn = function warn() {
8540
- return (console.warn ).apply(void 0, arguments);
8541
- }; // eslint-disable-line no-console
8542
- var error = function error() {
8543
- return (console.error ).apply(void 0, arguments);
8544
- }; // eslint-disable-line no-console
8545
-
8546
8650
  var _excluded$g = ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress", "guideBoxDisabled"],
8547
8651
  _excluded2$5 = ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "isProgressBar", "scaleBorderRadius"];
8548
8652
  var _templateObject$T, _templateObject2$L, _templateObject3$B, _templateObject4$w, _templateObject5$r, _templateObject6$j, _templateObject7$g;
@@ -40658,6 +40762,10 @@ function IdValidationFlow(_ref) {
40658
40762
  onSubmitted = _ref.onSubmitted,
40659
40763
  children = _ref.children,
40660
40764
  callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$8);
40765
+ useMountOnlyWarnings('IdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
40766
+ capture: capture,
40767
+ signatureCapture: signatureCapture
40768
+ });
40661
40769
  // Config callbacks follow the latest render; see useLatestCallbacks.
40662
40770
  var latestCapture = useLatestCallbacks(capture);
40663
40771
  var latestSignatureCapture = useLatestCallbacks(signatureCapture);
@@ -40817,6 +40925,9 @@ function FaceValidationFlow(_ref) {
40817
40925
  children = _ref.children;
40818
40926
  var checkLivenessOptions = capture.checkLivenessOptions,
40819
40927
  controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded$7);
40928
+ useMountOnlyWarnings('FaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
40929
+ capture: controllerCapture
40930
+ });
40820
40931
  // Config callbacks follow the latest render; see useLatestCallbacks.
40821
40932
  var latestCapture = useLatestCallbacks(controllerCapture);
40822
40933
  var latestLiveness = useLatestCallbacks(controllerCapture.liveness);
@@ -40938,6 +41049,11 @@ function IdAndFaceValidationFlow(_ref) {
40938
41049
  callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$6);
40939
41050
  var checkLivenessOptions = faceCapture.checkLivenessOptions,
40940
41051
  selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$3);
41052
+ useMountOnlyWarnings('IdAndFaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
41053
+ faceCapture: selfieCaptureConfig,
41054
+ idCapture: idCapture,
41055
+ signatureCapture: signatureCapture
41056
+ });
40941
41057
  // Config callbacks follow the latest render; see useLatestCallbacks.
40942
41058
  var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
40943
41059
  var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
@@ -41198,6 +41314,10 @@ function SignatureKYCFlow(_ref) {
41198
41314
  onCaptureError = _ref.onCaptureError;
41199
41315
  var checkLivenessOptions = faceCapture.checkLivenessOptions,
41200
41316
  selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded$5);
41317
+ useMountOnlyWarnings('SignatureKYCFlow', FLOW_MOUNT_ONLY_REMEDY, {
41318
+ faceCapture: selfieCaptureConfig,
41319
+ signatureCapture: signatureCapture
41320
+ });
41201
41321
  // Config callbacks follow the latest render; see useLatestCallbacks.
41202
41322
  var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
41203
41323
  var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
@@ -41559,6 +41679,12 @@ function VideoIdValidationFlow(_ref) {
41559
41679
  callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$4);
41560
41680
  var checkLivenessOptions = faceCapture.checkLivenessOptions,
41561
41681
  selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$2);
41682
+ useMountOnlyWarnings('VideoIdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
41683
+ faceCapture: selfieCaptureConfig,
41684
+ idCapture: idCapture,
41685
+ capture: capture,
41686
+ signatureCapture: signatureCapture
41687
+ });
41562
41688
  // Config callbacks follow the latest render; see useLatestCallbacks.
41563
41689
  var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
41564
41690
  var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
@@ -44547,60 +44673,6 @@ function toDocumentCaptureInput(document) {
44547
44673
  };
44548
44674
  }
44549
44675
 
44550
- // Makes the mount-time-only `autoCapture` contract audible (#351).
44551
- //
44552
- // `DocumentCaptureFlow` builds its controller inside `useState(() => …)` from
44553
- // `documentsRef.current`, and `documentCapture/controller.ts` has no
44554
- // reconfigure path — so `autoCapture` is read once, at mount, and every later
44555
- // change is ignored. A reconfigure path was ruled against: it is real surface
44556
- // on a controller that has none today, bought to serve a race the consumer can
44557
- // simply not have (AMEX's `DocumentCaptureScreen` should gate on `flagsLoaded`,
44558
- // not just `sessionLoaded`).
44559
- //
44560
- // The SILENCE is the expensive half. All four of this repo's cascade-default
44561
- // incidents were "the value was quietly wrong and nothing said so", and this
44562
- // one has the same shape: a capture screen that mounts before the flags land
44563
- // has auto-capture off for that applicant's whole session, with no error and
44564
- // no log. The field-visible half of the same ruling is
44565
- // `autoCaptureStatus: 'disabled:lateFlag'` on the capture metadata.
44566
- /**
44567
- * A comparable summary of what auto-capture each document asked for.
44568
- *
44569
- * Resolved rather than compared raw, so a caller who re-spreads an equivalent
44570
- * bag every render (`autoCapture: {}`, or `{ minScore: undefined }`) does not
44571
- * trip the warning — only a change that would actually have configured the
44572
- * engine differently does.
44573
- *
44574
- * PRESENCE is preserved as `null` rather than folded into the resolved
44575
- * defaults, because `undefined` -> `{}` is precisely the late-flag race this
44576
- * exists to catch, and resolving both would make them identical.
44577
- */
44578
- function autoCaptureSignature(documents) {
44579
- return JSON.stringify(documents.map(function (document) {
44580
- return document.autoCapture ? resolveAutoCapture(document.autoCapture, undefined) : null;
44581
- }));
44582
- }
44583
- /**
44584
- * Warn once if `documents`' auto-capture configuration changes after mount.
44585
- *
44586
- * Warns rather than reconfigures: the change genuinely has no effect, and a
44587
- * caller who cannot see that is the failure mode.
44588
- */
44589
- function useAutoCaptureMountGuard(documents) {
44590
- var mounted = React.useRef(null);
44591
- var warned = React.useRef(false);
44592
- var signature = autoCaptureSignature(documents);
44593
- React.useEffect(function () {
44594
- if (mounted.current === null) {
44595
- mounted.current = signature;
44596
- return;
44597
- }
44598
- if (warned.current || signature === mounted.current) return;
44599
- warned.current = true;
44600
- warn('[DocumentCaptureFlow] `autoCapture` changed after mount and has been ' + 'ignored: the controller is built once and has no reconfigure path. ' + 'Mount this flow only once the value is known — if it comes from a ' + 'feature flag, gate the screen on the flags having loaded, not just ' + 'the session.');
44601
- }, [signature]);
44602
- }
44603
-
44604
44676
  function buildDocumentCaptureStep(controller, view, sessionReady) {
44605
44677
  if (view === void 0) {
44606
44678
  view = {};
@@ -44649,15 +44721,16 @@ function DocumentCaptureFlow(_ref) {
44649
44721
  // props without being torn down and rebuilt on every render.
44650
44722
  var documentsRef = React.useRef(documents);
44651
44723
  documentsRef.current = documents;
44652
- // `autoCapture` is mount-time-only and the controller has no reconfigure
44653
- // path, so a late change is ignored — loudly rather than silently (#351).
44654
- useAutoCaptureMountGuard(documents);
44655
44724
  var capturedRef = React.useRef(onDocumentCaptured);
44656
44725
  capturedRef.current = onDocumentCaptured;
44657
44726
  var uploadedRef = React.useRef(onDocumentUploaded);
44658
44727
  uploadedRef.current = onDocumentUploaded;
44659
44728
  var completeRef = React.useRef(onComplete);
44660
44729
  completeRef.current = onComplete;
44730
+ useMountOnlyWarnings('DocumentCaptureFlow', FLOW_MOUNT_ONLY_REMEDY, {
44731
+ capture: capture,
44732
+ documents: documents.map(toDocumentCaptureInput)
44733
+ });
44661
44734
  // Config callbacks follow the latest render; see useLatestCallbacks.
44662
44735
  var latestCapture = useLatestCallbacks(capture);
44663
44736
  var _useState = React.useState(function () {
@@ -44798,6 +44871,10 @@ function CustomerBiometricsEnrollmentFlow(_ref) {
44798
44871
  callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$2);
44799
44872
  var checkLivenessOptions = faceCapture.checkLivenessOptions,
44800
44873
  selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$1);
44874
+ useMountOnlyWarnings('CustomerBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
44875
+ faceCapture: selfieCaptureConfig,
44876
+ signatureCapture: signatureCapture
44877
+ });
44801
44878
  // Config callbacks follow the latest render; see useLatestCallbacks.
44802
44879
  var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
44803
44880
  var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
@@ -44998,6 +45075,12 @@ function CustomerIdAndBiometricsEnrollmentFlow(_ref) {
44998
45075
  var preparing = useTranslations(undefined, PREPARING_FALLBACKS);
44999
45076
  var checkLivenessOptions = faceCapture.checkLivenessOptions,
45000
45077
  selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2);
45078
+ useMountOnlyWarnings('CustomerIdAndBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
45079
+ faceCapture: selfieCaptureConfig,
45080
+ idCapture: idCapture,
45081
+ signatureCapture: signatureCapture,
45082
+ videoIdCapture: videoIdCapture
45083
+ });
45001
45084
  // Config callbacks follow the latest render; see useLatestCallbacks.
45002
45085
  var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
45003
45086
  var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
@@ -45920,6 +46003,9 @@ function CustomerMatchFlow(_ref) {
45920
46003
  onExitAfterFailure = _ref.onExitAfterFailure;
45921
46004
  var checkLivenessOptions = capture.checkLivenessOptions,
45922
46005
  controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded);
46006
+ useMountOnlyWarnings(variant === 'identification' ? 'CustomerIdentificationFlow' : 'CustomerVerificationFlow', FLOW_MOUNT_ONLY_REMEDY, {
46007
+ capture: controllerCapture
46008
+ });
45923
46009
  // Config callbacks follow the latest render; see useLatestCallbacks.
45924
46010
  var latestCapture = useLatestCallbacks(controllerCapture);
45925
46011
  // These flows drive the live-check themselves, per capture, and read its
@@ -48601,7 +48687,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
48601
48687
  });
48602
48688
  }
48603
48689
 
48604
- var webSdkVersion = '2.6.3-changeset-release-develop-c045c91';
48690
+ var webSdkVersion = '2.6.3-changeset-release-develop-eac763c';
48605
48691
 
48606
48692
  // GENERATED by scripts/styleBagTypes.mjs from
48607
48693
  // src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not