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 +1 -1
- package/dist/props.json +1 -1
- package/dist/sdk2.cjs.development.js +203 -117
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +203 -117
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +219 -133
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/package.json +1 -1
|
@@ -453,17 +453,17 @@
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
function _arrayLikeToArray$
|
|
456
|
+
function _arrayLikeToArray$C(r, a) {
|
|
457
457
|
(null == a || a > r.length) && (a = r.length);
|
|
458
458
|
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
459
459
|
return n;
|
|
460
460
|
}
|
|
461
461
|
|
|
462
|
-
function _unsupportedIterableToArray$
|
|
462
|
+
function _unsupportedIterableToArray$C(r, a) {
|
|
463
463
|
if (r) {
|
|
464
|
-
if ("string" == typeof r) return _arrayLikeToArray$
|
|
464
|
+
if ("string" == typeof r) return _arrayLikeToArray$C(r, a);
|
|
465
465
|
var t = {}.toString.call(r).slice(8, -1);
|
|
466
|
-
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$
|
|
466
|
+
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$C(r, a) : void 0;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
|
|
@@ -472,11 +472,11 @@
|
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
function _slicedToArray$1(r, e) {
|
|
475
|
-
return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$
|
|
475
|
+
return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$C(r, e) || _nonIterableRest$1();
|
|
476
476
|
}
|
|
477
477
|
|
|
478
478
|
function _arrayWithoutHoles(r) {
|
|
479
|
-
if (Array.isArray(r)) return _arrayLikeToArray$
|
|
479
|
+
if (Array.isArray(r)) return _arrayLikeToArray$C(r);
|
|
480
480
|
}
|
|
481
481
|
|
|
482
482
|
function _iterableToArray(r) {
|
|
@@ -488,7 +488,7 @@
|
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
function _toConsumableArray(r) {
|
|
491
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
491
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray$C(r) || _nonIterableSpread();
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
var webSdkCoreVersion = '0.5.1';
|
|
@@ -1263,9 +1263,9 @@
|
|
|
1263
1263
|
({
|
|
1264
1264
|
workflowMilestones: [].concat(_toConsumableArray(workflowMilestones), ["task-completed"])});
|
|
1265
1265
|
|
|
1266
|
-
function _createForOfIteratorHelperLoose$
|
|
1267
|
-
function _unsupportedIterableToArray$
|
|
1268
|
-
function _arrayLikeToArray$
|
|
1266
|
+
function _createForOfIteratorHelperLoose$A(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$B(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."); }
|
|
1267
|
+
function _unsupportedIterableToArray$B(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$B(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$B(r, a) : void 0; } }
|
|
1268
|
+
function _arrayLikeToArray$B(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; }
|
|
1269
1269
|
var maximumBytes = 32 * 1024;
|
|
1270
1270
|
var maximumTime = 86400000;
|
|
1271
1271
|
var uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
@@ -1333,7 +1333,7 @@
|
|
|
1333
1333
|
unique(report.phaseTotals.map(function (total) {
|
|
1334
1334
|
return total.phase;
|
|
1335
1335
|
}));
|
|
1336
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1336
|
+
for (var _iterator = _createForOfIteratorHelperLoose$A(report.phaseTotals), _step; !(_step = _iterator()).done;) {
|
|
1337
1337
|
var _total4 = _step.value;
|
|
1338
1338
|
requireValid(member(phases, _total4.phase) && integer(_total4.completions, 1000000) && _total4.completions <= _total4.duration.entries);
|
|
1339
1339
|
durationValid(_total4.duration);
|
|
@@ -1355,7 +1355,7 @@
|
|
|
1355
1355
|
requireValid(report.recentTransitions.length <= 32);
|
|
1356
1356
|
var index = 0;
|
|
1357
1357
|
var atMs = 0;
|
|
1358
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1358
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$A(report.recentTransitions), _step2; !(_step2 = _iterator2()).done;) {
|
|
1359
1359
|
var transition = _step2.value;
|
|
1360
1360
|
requireValid(member(transitionKinds, transition.kind));
|
|
1361
1361
|
requireValid(integer(transition.index, 1000000) && transition.index > index && integer(transition.atMs) && transition.atMs >= atMs && transition.atMs <= report.elapsedMs);
|
|
@@ -1379,12 +1379,12 @@
|
|
|
1379
1379
|
unique(report.controllerGuidanceTotals.map(function (total) {
|
|
1380
1380
|
return JSON.stringify([total.phase, total.guidance]);
|
|
1381
1381
|
}));
|
|
1382
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1382
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$A(report.guidanceTotals), _step3; !(_step3 = _iterator3()).done;) {
|
|
1383
1383
|
var _total2 = _step3.value;
|
|
1384
1384
|
durationValid(_total2.duration);
|
|
1385
1385
|
exposureValid(_total2.phase, _total2.exposure);
|
|
1386
1386
|
}
|
|
1387
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1387
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$A(report.controllerGuidanceTotals), _step4; !(_step4 = _iterator4()).done;) {
|
|
1388
1388
|
var _total3 = _step4.value;
|
|
1389
1389
|
durationValid(_total3.duration);
|
|
1390
1390
|
guidanceValid(_total3.phase, _total3.guidance, false);
|
|
@@ -1418,7 +1418,7 @@
|
|
|
1418
1418
|
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));
|
|
1419
1419
|
var reports = [];
|
|
1420
1420
|
var dropped = [];
|
|
1421
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1421
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$A(batch.reports), _step5; !(_step5 = _iterator5()).done;) {
|
|
1422
1422
|
var report = _step5.value;
|
|
1423
1423
|
try {
|
|
1424
1424
|
validateSnapshot(report);
|
|
@@ -1447,9 +1447,9 @@
|
|
|
1447
1447
|
};
|
|
1448
1448
|
}
|
|
1449
1449
|
|
|
1450
|
-
function _createForOfIteratorHelperLoose$
|
|
1451
|
-
function _unsupportedIterableToArray$
|
|
1452
|
-
function _arrayLikeToArray$
|
|
1450
|
+
function _createForOfIteratorHelperLoose$z(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$A(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."); }
|
|
1451
|
+
function _unsupportedIterableToArray$A(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$A(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$A(r, a) : void 0; } }
|
|
1452
|
+
function _arrayLikeToArray$A(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; }
|
|
1453
1453
|
/** Visible time without progress in a capture phase that arms a stream. */
|
|
1454
1454
|
var stallMs = 20000;
|
|
1455
1455
|
var capturePhases = new Set(["id-front", "id-back", "passport", "selfie", "signature"]);
|
|
@@ -1512,7 +1512,7 @@
|
|
|
1512
1512
|
var due = new Map();
|
|
1513
1513
|
var eligibilityRetries = new Map();
|
|
1514
1514
|
function dropped(report) {
|
|
1515
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
1515
|
+
for (var _iterator = _createForOfIteratorHelperLoose$z(streams), _step; !(_step = _iterator()).done;) {
|
|
1516
1516
|
var stream = _step.value;
|
|
1517
1517
|
if (stream.state.report.streamId === report.streamId) stream.state = _extends$1({}, stream.state, {
|
|
1518
1518
|
report: _extends$1({}, stream.state.report, {
|
|
@@ -1557,7 +1557,7 @@
|
|
|
1557
1557
|
var retained = new Set(queued.map(function (report) {
|
|
1558
1558
|
return report.sequence;
|
|
1559
1559
|
}));
|
|
1560
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
1560
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$z(due.keys()), _step2; !(_step2 = _iterator2()).done;) {
|
|
1561
1561
|
var _sequence = _step2.value;
|
|
1562
1562
|
if (!retained.has(_sequence)) due["delete"](_sequence);
|
|
1563
1563
|
}
|
|
@@ -1570,7 +1570,7 @@
|
|
|
1570
1570
|
var keys = new Set(reports.map(function (report) {
|
|
1571
1571
|
return report.sequence;
|
|
1572
1572
|
}));
|
|
1573
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose$
|
|
1573
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose$z(pending), _step3; !(_step3 = _iterator3()).done;) {
|
|
1574
1574
|
var _step3$value = _slicedToArray$1(_step3.value, 2),
|
|
1575
1575
|
key = _step3$value[0],
|
|
1576
1576
|
report = _step3$value[1];
|
|
@@ -1594,14 +1594,14 @@
|
|
|
1594
1594
|
if ((_emergency = emergency) != null && _emergency.reports.some(function (report) {
|
|
1595
1595
|
return report.context === context;
|
|
1596
1596
|
})) emergency = null;
|
|
1597
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose$
|
|
1597
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose$z(pending), _step4; !(_step4 = _iterator4()).done;) {
|
|
1598
1598
|
var _step4$value = _slicedToArray$1(_step4.value, 2),
|
|
1599
1599
|
key = _step4$value[0],
|
|
1600
1600
|
report = _step4$value[1];
|
|
1601
1601
|
if (report.context === context) pending["delete"](key);
|
|
1602
1602
|
}
|
|
1603
1603
|
for (var i = terminal.length - 1; i >= 0; i--) if (terminal[i].context === context) terminal.splice(i, 1);
|
|
1604
|
-
for (var _iterator5 = _createForOfIteratorHelperLoose$
|
|
1604
|
+
for (var _iterator5 = _createForOfIteratorHelperLoose$z(streams), _step5; !(_step5 = _iterator5()).done;) {
|
|
1605
1605
|
var stream = _step5.value;
|
|
1606
1606
|
if (stream.state.report.context === context) {
|
|
1607
1607
|
stream.disposed = true;
|
|
@@ -1630,7 +1630,7 @@
|
|
|
1630
1630
|
unsubscribe();
|
|
1631
1631
|
cancelTimer == null || cancelTimer();
|
|
1632
1632
|
cancelRequest == null || cancelRequest();
|
|
1633
|
-
for (var _iterator6 = _createForOfIteratorHelperLoose$
|
|
1633
|
+
for (var _iterator6 = _createForOfIteratorHelperLoose$z(streams), _step6; !(_step6 = _iterator6()).done;) {
|
|
1634
1634
|
var stream = _step6.value;
|
|
1635
1635
|
stream.disposed = true;
|
|
1636
1636
|
}
|
|
@@ -1652,7 +1652,7 @@
|
|
|
1652
1652
|
sentAtUnixMs: Math.floor(deps.unixMs()),
|
|
1653
1653
|
reports: reports
|
|
1654
1654
|
});
|
|
1655
|
-
for (var _iterator7 = _createForOfIteratorHelperLoose$
|
|
1655
|
+
for (var _iterator7 = _createForOfIteratorHelperLoose$z(result.dropped), _step7; !(_step7 = _iterator7()).done;) {
|
|
1656
1656
|
var report = _step7.value;
|
|
1657
1657
|
dropped(report);
|
|
1658
1658
|
removeReports([report]);
|
|
@@ -1834,14 +1834,14 @@
|
|
|
1834
1834
|
retries = 0;
|
|
1835
1835
|
failureStreak = 0;
|
|
1836
1836
|
} else if (result.kind === "permanent") {
|
|
1837
|
-
for (_iterator11 = _createForOfIteratorHelperLoose$
|
|
1837
|
+
for (_iterator11 = _createForOfIteratorHelperLoose$z(sending.reports); !(_step11 = _iterator11()).done;) {
|
|
1838
1838
|
report = _step11.value;
|
|
1839
1839
|
disable(report.context);
|
|
1840
1840
|
}
|
|
1841
1841
|
} else {
|
|
1842
1842
|
backoff(result);
|
|
1843
1843
|
if (++retries > 3) {
|
|
1844
|
-
for (_iterator12 = _createForOfIteratorHelperLoose$
|
|
1844
|
+
for (_iterator12 = _createForOfIteratorHelperLoose$z(sending.reports); !(_step12 = _iterator12()).done;) {
|
|
1845
1845
|
_report = _step12.value;
|
|
1846
1846
|
dropped(_report);
|
|
1847
1847
|
}
|
|
@@ -1869,7 +1869,7 @@
|
|
|
1869
1869
|
backoff({});
|
|
1870
1870
|
if (authorizing) failedEligibility(authorizing);
|
|
1871
1871
|
if (frozen && ++retries > 3) {
|
|
1872
|
-
for (_iterator13 = _createForOfIteratorHelperLoose$
|
|
1872
|
+
for (_iterator13 = _createForOfIteratorHelperLoose$z(frozen.reports); !(_step13 = _iterator13()).done;) {
|
|
1873
1873
|
_report2 = _step13.value;
|
|
1874
1874
|
dropped(_report2);
|
|
1875
1875
|
}
|
|
@@ -1924,7 +1924,7 @@
|
|
|
1924
1924
|
if (outcome.kind === "committed") {
|
|
1925
1925
|
if (emergency === sending) emergency = null;
|
|
1926
1926
|
} else if (outcome.kind === "permanent") {
|
|
1927
|
-
for (var _iterator8 = _createForOfIteratorHelperLoose$
|
|
1927
|
+
for (var _iterator8 = _createForOfIteratorHelperLoose$z(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
1928
1928
|
var report = _step8.value;
|
|
1929
1929
|
disable(report.context);
|
|
1930
1930
|
}
|
|
@@ -1993,7 +1993,7 @@
|
|
|
1993
1993
|
}
|
|
1994
1994
|
function tick() {
|
|
1995
1995
|
if (disposed || visibility === "hidden") return;
|
|
1996
|
-
for (var _iterator9 = _createForOfIteratorHelperLoose$
|
|
1996
|
+
for (var _iterator9 = _createForOfIteratorHelperLoose$z(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
1997
1997
|
var stream = _step9.value;
|
|
1998
1998
|
var report = prepareDeadline(stream);
|
|
1999
1999
|
if (!(report != null && report.current)) continue;
|
|
@@ -2024,7 +2024,7 @@
|
|
|
2024
2024
|
if (disposed || visibility === "hidden") return;
|
|
2025
2025
|
var delay = Infinity;
|
|
2026
2026
|
if (!busy && (pending.size || terminal.length || frozen || emergency)) delay = Math.max(0, deliveryReadyAt() - deps.now());
|
|
2027
|
-
for (var _iterator0 = _createForOfIteratorHelperLoose$
|
|
2027
|
+
for (var _iterator0 = _createForOfIteratorHelperLoose$z(streams), _step0; !(_step0 = _iterator0()).done;) {
|
|
2028
2028
|
var stream = _step0.value;
|
|
2029
2029
|
var report = prepareDeadline(stream);
|
|
2030
2030
|
if (!(report != null && report.current)) continue;
|
|
@@ -2121,7 +2121,7 @@
|
|
|
2121
2121
|
return guard$2(function () {
|
|
2122
2122
|
if (disposed || next === visibility) return;
|
|
2123
2123
|
visibility = next;
|
|
2124
|
-
for (var _iterator1 = _createForOfIteratorHelperLoose$
|
|
2124
|
+
for (var _iterator1 = _createForOfIteratorHelperLoose$z(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2125
2125
|
var stream = _step1.value;
|
|
2126
2126
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2127
2127
|
armIfStalled(stream);
|
|
@@ -2163,7 +2163,7 @@
|
|
|
2163
2163
|
if (taskDisposed) return;
|
|
2164
2164
|
taskDisposed = true;
|
|
2165
2165
|
if (workflowStream) close(workflowStream, "disposed");
|
|
2166
|
-
for (var _iterator10 = _createForOfIteratorHelperLoose$
|
|
2166
|
+
for (var _iterator10 = _createForOfIteratorHelperLoose$z(captures), _step10; !(_step10 = _iterator10()).done;) {
|
|
2167
2167
|
var capture = _step10.value;
|
|
2168
2168
|
capture.dispose();
|
|
2169
2169
|
}
|
|
@@ -3596,9 +3596,9 @@
|
|
|
3596
3596
|
});
|
|
3597
3597
|
}
|
|
3598
3598
|
|
|
3599
|
-
function _createForOfIteratorHelperLoose$
|
|
3600
|
-
function _unsupportedIterableToArray$
|
|
3601
|
-
function _arrayLikeToArray$
|
|
3599
|
+
function _createForOfIteratorHelperLoose$y(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$z(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."); }
|
|
3600
|
+
function _unsupportedIterableToArray$z(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$z(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$z(r, a) : void 0; } }
|
|
3601
|
+
function _arrayLikeToArray$z(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; }
|
|
3602
3602
|
/**
|
|
3603
3603
|
* Parser for AAMVA (American Association of Motor Vehicle Administrators)
|
|
3604
3604
|
* PDF417 barcode data found on US and Canadian driver's licenses.
|
|
@@ -3860,7 +3860,7 @@
|
|
|
3860
3860
|
DAD: false
|
|
3861
3861
|
};
|
|
3862
3862
|
var daaValue = null;
|
|
3863
|
-
for (var _iterator = _createForOfIteratorHelperLoose$
|
|
3863
|
+
for (var _iterator = _createForOfIteratorHelperLoose$y(lines), _step; !(_step = _iterator()).done;) {
|
|
3864
3864
|
var line = _step.value;
|
|
3865
3865
|
var match = line.match(fieldRegex);
|
|
3866
3866
|
if (match) {
|
|
@@ -3901,7 +3901,7 @@
|
|
|
3901
3901
|
result.fields.push(field);
|
|
3902
3902
|
}
|
|
3903
3903
|
};
|
|
3904
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose$
|
|
3904
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose$y(daaFields), _step2; !(_step2 = _iterator2()).done;) {
|
|
3905
3905
|
_loop();
|
|
3906
3906
|
}
|
|
3907
3907
|
}
|
|
@@ -6627,6 +6627,131 @@
|
|
|
6627
6627
|
})[0];
|
|
6628
6628
|
}
|
|
6629
6629
|
|
|
6630
|
+
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
6631
|
+
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
6632
|
+
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
6633
|
+
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
6634
|
+
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
6635
|
+
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
6636
|
+
// LogLevel.X` comparisons behave identically.
|
|
6637
|
+
var noop$1 = function noop() {};
|
|
6638
|
+
var debug = function debug() {
|
|
6639
|
+
return (noop$1).apply(void 0, arguments);
|
|
6640
|
+
}; // eslint-disable-line no-console
|
|
6641
|
+
var log = function log() {
|
|
6642
|
+
return (noop$1).apply(void 0, arguments);
|
|
6643
|
+
}; // eslint-disable-line no-console
|
|
6644
|
+
var warn$1 = function warn() {
|
|
6645
|
+
return (console.warn ).apply(void 0, arguments);
|
|
6646
|
+
}; // eslint-disable-line no-console
|
|
6647
|
+
var error = function error() {
|
|
6648
|
+
return (console.error ).apply(void 0, arguments);
|
|
6649
|
+
}; // eslint-disable-line no-console
|
|
6650
|
+
|
|
6651
|
+
function _createForOfIteratorHelperLoose$x(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$y(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."); }
|
|
6652
|
+
function _unsupportedIterableToArray$y(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray$y(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$y(r, a) : void 0; } }
|
|
6653
|
+
function _arrayLikeToArray$y(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; }
|
|
6654
|
+
/**
|
|
6655
|
+
* True unless the host bundle was built for production.
|
|
6656
|
+
*
|
|
6657
|
+
* Follows the `"development"` convention that React and mainstream
|
|
6658
|
+
* bundlers use, and that `websdk-compat`'s rollup build defines. Read inside a
|
|
6659
|
+
* `try` because unbundled ESM has no `process`; that case counts as
|
|
6660
|
+
* production, so a missing define never adds console output.
|
|
6661
|
+
*/
|
|
6662
|
+
function isDevelopment() {
|
|
6663
|
+
try {
|
|
6664
|
+
return "development" !== 'production';
|
|
6665
|
+
} catch (_unused) {
|
|
6666
|
+
return false;
|
|
6667
|
+
}
|
|
6668
|
+
}
|
|
6669
|
+
/**
|
|
6670
|
+
* Plain objects and arrays are compared field by field, so an inline literal
|
|
6671
|
+
* rebuilt every render with the same values is not a change. Anything else
|
|
6672
|
+
* (class instances, DOM nodes, blobs) is compared by identity.
|
|
6673
|
+
*/
|
|
6674
|
+
function isPlainContainer(value) {
|
|
6675
|
+
if (Array.isArray(value)) return true;
|
|
6676
|
+
if (typeof value !== 'object' || value === null) return false;
|
|
6677
|
+
var prototype = Object.getPrototypeOf(value);
|
|
6678
|
+
return prototype === Object.prototype || prototype === null;
|
|
6679
|
+
}
|
|
6680
|
+
/**
|
|
6681
|
+
* Callbacks the flows wrap with `useLatestCallbacks`: a bag's own top-level
|
|
6682
|
+
* functions and those of its `liveness` sub-bag. Replacing or removing one of
|
|
6683
|
+
* these is live. Any other function (such as `io.acquireCamera`) is a
|
|
6684
|
+
* controller dependency fixed at mount, so it compares by identity.
|
|
6685
|
+
*/
|
|
6686
|
+
var LIVE_CALLBACK_PATH = /^[^.[\]]+(\.liveness)?\.[^.[\]]+$/;
|
|
6687
|
+
/**
|
|
6688
|
+
* Every leaf whose value differs between `before` and `after`.
|
|
6689
|
+
*
|
|
6690
|
+
* A live callback's new implementation, or its removal, is not reported. A
|
|
6691
|
+
* callback ADDED after mount is, because only callbacks present at mount are
|
|
6692
|
+
* wrapped. An absent field and an explicit `undefined` are the same value.
|
|
6693
|
+
*/
|
|
6694
|
+
function mountOnlyChanges(before, after, path) {
|
|
6695
|
+
if (Object.is(before, after)) return [];
|
|
6696
|
+
if (typeof before === 'function' && (typeof after === 'function' || after === undefined) && LIVE_CALLBACK_PATH.test(path)) {
|
|
6697
|
+
return [];
|
|
6698
|
+
}
|
|
6699
|
+
if (!isPlainContainer(before) || !isPlainContainer(after) || Array.isArray(before) !== Array.isArray(after)) {
|
|
6700
|
+
return [{
|
|
6701
|
+
path: path,
|
|
6702
|
+
before: before,
|
|
6703
|
+
after: after
|
|
6704
|
+
}];
|
|
6705
|
+
}
|
|
6706
|
+
var keys = new Set([].concat(_toConsumableArray(Object.keys(before)), _toConsumableArray(Object.keys(after))));
|
|
6707
|
+
return _toConsumableArray(keys).flatMap(function (key) {
|
|
6708
|
+
return mountOnlyChanges(before[key], after[key], Array.isArray(before) ? path + "[" + key + "]" : path + "." + key);
|
|
6709
|
+
});
|
|
6710
|
+
}
|
|
6711
|
+
/**
|
|
6712
|
+
* Whether a value is small and safe enough to print. Long strings are left
|
|
6713
|
+
* out: capture bags can carry image data (`precapturedDocuments`), which is
|
|
6714
|
+
* both personal data and too large to be useful in a warning.
|
|
6715
|
+
*/
|
|
6716
|
+
var isPrintable = function isPrintable(value) {
|
|
6717
|
+
return value === null || value === undefined || typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string' && value.length <= 64;
|
|
6718
|
+
};
|
|
6719
|
+
var describe = function describe(value) {
|
|
6720
|
+
return typeof value === 'string' ? JSON.stringify(value) : String(value);
|
|
6721
|
+
};
|
|
6722
|
+
/**
|
|
6723
|
+
* In development builds, warns once per input path when a value in `inputs`
|
|
6724
|
+
* differs from its value at mount. Does nothing in production.
|
|
6725
|
+
*
|
|
6726
|
+
* `owner` names the component or hook in the message, and `remedy` finishes
|
|
6727
|
+
* the sentence "To change it, …". Pass only inputs that really are mount-only:
|
|
6728
|
+
* a live input passed here would warn about a change that did take effect.
|
|
6729
|
+
*/
|
|
6730
|
+
function useMountOnlyWarnings(owner, remedy, inputs) {
|
|
6731
|
+
var mounted = React.useRef(inputs);
|
|
6732
|
+
var warned = React.useRef(new Set());
|
|
6733
|
+
React.useEffect(function () {
|
|
6734
|
+
if (!isDevelopment()) return;
|
|
6735
|
+
for (var _i = 0, _Object$entries = Object.entries(inputs); _i < _Object$entries.length; _i++) {
|
|
6736
|
+
var _Object$entries$_i = _slicedToArray$1(_Object$entries[_i], 2),
|
|
6737
|
+
name = _Object$entries$_i[0],
|
|
6738
|
+
value = _Object$entries$_i[1];
|
|
6739
|
+
for (var _iterator = _createForOfIteratorHelperLoose$x(mountOnlyChanges(mounted.current[name], value, name)), _step; !(_step = _iterator()).done;) {
|
|
6740
|
+
var _step$value = _step.value,
|
|
6741
|
+
path = _step$value.path,
|
|
6742
|
+
before = _step$value.before,
|
|
6743
|
+
after = _step$value.after;
|
|
6744
|
+
if (warned.current.has(path)) continue;
|
|
6745
|
+
warned.current.add(path);
|
|
6746
|
+
var values = isPrintable(before) && isPrintable(after) ? " (" + describe(before) + " \u2192 " + describe(after) + ")" : '';
|
|
6747
|
+
warn$1("[" + owner + "] `" + path + "` changed after mount" + values + " and was ignored: " + (owner + " reads it once, at mount. To change it, " + remedy + "."));
|
|
6748
|
+
}
|
|
6749
|
+
}
|
|
6750
|
+
});
|
|
6751
|
+
}
|
|
6752
|
+
/** The `remedy` every flow gives for a changed capture-bag field. */
|
|
6753
|
+
var FLOW_MOUNT_ONLY_REMEDY = 'remount the flow with a React `key`, or pass your own controller';
|
|
6754
|
+
|
|
6630
6755
|
var useIsomorphicLayoutEffect$1 = typeof window === 'undefined' ? React.useEffect : React.useLayoutEffect;
|
|
6631
6756
|
/**
|
|
6632
6757
|
* Uploads documents to the IDmission document service, one independent call
|
|
@@ -6959,7 +7084,7 @@
|
|
|
6959
7084
|
}
|
|
6960
7085
|
|
|
6961
7086
|
function _toArray(r) {
|
|
6962
|
-
return _arrayWithHoles$1(r) || _iterableToArray(r) || _unsupportedIterableToArray$
|
|
7087
|
+
return _arrayWithHoles$1(r) || _iterableToArray(r) || _unsupportedIterableToArray$C(r) || _nonIterableRest$1();
|
|
6963
7088
|
}
|
|
6964
7089
|
|
|
6965
7090
|
function _createForOfIteratorHelperLoose$w(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$w(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."); }
|
|
@@ -9022,7 +9147,7 @@
|
|
|
9022
9147
|
}
|
|
9023
9148
|
return options;
|
|
9024
9149
|
};
|
|
9025
|
-
var noop
|
|
9150
|
+
var noop = function noop() {};
|
|
9026
9151
|
var loggerOwner;
|
|
9027
9152
|
var bindMemberFunctions = function bindMemberFunctions(inst) {
|
|
9028
9153
|
var mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
|
|
@@ -9167,7 +9292,7 @@
|
|
|
9167
9292
|
});
|
|
9168
9293
|
}
|
|
9169
9294
|
this.format = this.options.interpolation.format;
|
|
9170
|
-
if (!callback) callback = noop
|
|
9295
|
+
if (!callback) callback = noop;
|
|
9171
9296
|
if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
9172
9297
|
var codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
9173
9298
|
if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
|
|
@@ -9214,7 +9339,7 @@
|
|
|
9214
9339
|
_proto1.loadResources = function loadResources(language, callback) {
|
|
9215
9340
|
var _this22 = this;
|
|
9216
9341
|
if (callback === void 0) {
|
|
9217
|
-
callback = noop
|
|
9342
|
+
callback = noop;
|
|
9218
9343
|
}
|
|
9219
9344
|
var usedCallback = callback;
|
|
9220
9345
|
var usedLng = isString$1(language) ? language : this.language;
|
|
@@ -9270,7 +9395,7 @@
|
|
|
9270
9395
|
});
|
|
9271
9396
|
}
|
|
9272
9397
|
if (!ns) ns = this.options.ns;
|
|
9273
|
-
if (!callback) callback = noop
|
|
9398
|
+
if (!callback) callback = noop;
|
|
9274
9399
|
this.services.backendConnector.reload(lngs, ns, function (err) {
|
|
9275
9400
|
deferred.resolve();
|
|
9276
9401
|
callback(err);
|
|
@@ -9577,7 +9702,7 @@
|
|
|
9577
9702
|
options = {};
|
|
9578
9703
|
}
|
|
9579
9704
|
if (callback === void 0) {
|
|
9580
|
-
callback = noop
|
|
9705
|
+
callback = noop;
|
|
9581
9706
|
}
|
|
9582
9707
|
var forkResourceStore = options.forkResourceStore;
|
|
9583
9708
|
if (forkResourceStore) {
|
|
@@ -9661,7 +9786,7 @@
|
|
|
9661
9786
|
instance.loadNamespaces;
|
|
9662
9787
|
instance.loadLanguages;
|
|
9663
9788
|
|
|
9664
|
-
var warn
|
|
9789
|
+
var warn = function warn(i18n, code, msg, rest) {
|
|
9665
9790
|
var _i18n$services, _i18n$services2, _console;
|
|
9666
9791
|
var args = [msg, _extends({
|
|
9667
9792
|
code: code
|
|
@@ -9682,7 +9807,7 @@
|
|
|
9682
9807
|
var warnOnce = function warnOnce(i18n, code, msg, rest) {
|
|
9683
9808
|
if (isString(msg) && alreadyWarned[msg]) return;
|
|
9684
9809
|
if (isString(msg)) alreadyWarned[msg] = new Date();
|
|
9685
|
-
warn
|
|
9810
|
+
warn(i18n, code, msg, rest);
|
|
9686
9811
|
};
|
|
9687
9812
|
var loadedClb = function loadedClb(i18n, cb) {
|
|
9688
9813
|
return function () {
|
|
@@ -13238,27 +13363,6 @@
|
|
|
13238
13363
|
return false;
|
|
13239
13364
|
}
|
|
13240
13365
|
|
|
13241
|
-
// Ported dep of IdCaptureGuidesCommon.tsx (debug, for the SVG-length measure
|
|
13242
|
-
// try/catch) and guide_images/useGuideImages.ts (warn, for the
|
|
13243
|
-
// missing-dimensions warning). Trimmed transform vs sdk2's
|
|
13244
|
-
// lib/utils/logger.ts: `enum LogLevel` -> const-object + type (monorepo's
|
|
13245
|
-
// "no TS enum" convention, plan.md Global Constraints); numeric ordering
|
|
13246
|
-
// (Off < Error < Warn < Info < Debug) preserved exactly so the `logLevel >=
|
|
13247
|
-
// LogLevel.X` comparisons behave identically.
|
|
13248
|
-
var noop = function noop() {};
|
|
13249
|
-
var debug = function debug() {
|
|
13250
|
-
return (noop).apply(void 0, arguments);
|
|
13251
|
-
}; // eslint-disable-line no-console
|
|
13252
|
-
var log = function log() {
|
|
13253
|
-
return (noop).apply(void 0, arguments);
|
|
13254
|
-
}; // eslint-disable-line no-console
|
|
13255
|
-
var warn = function warn() {
|
|
13256
|
-
return (console.warn ).apply(void 0, arguments);
|
|
13257
|
-
}; // eslint-disable-line no-console
|
|
13258
|
-
var error = function error() {
|
|
13259
|
-
return (console.error ).apply(void 0, arguments);
|
|
13260
|
-
}; // eslint-disable-line no-console
|
|
13261
|
-
|
|
13262
13366
|
var _excluded$h = ["children", "status", "borderWidth", "borderRadius", "borderColor", "aspectRatio", "progress", "guideBoxDisabled"],
|
|
13263
13367
|
_excluded2$5 = ["borderRadius", "borderColor", "borderWidth", "borderOpacity", "progress", "isProgressBar", "scaleBorderRadius"];
|
|
13264
13368
|
var _templateObject$U, _templateObject2$M, _templateObject3$C, _templateObject4$x, _templateObject5$r, _templateObject6$j, _templateObject7$g;
|
|
@@ -13523,7 +13627,7 @@
|
|
|
13523
13627
|
Object.values(userSuppliedImages).forEach(function (images) {
|
|
13524
13628
|
Object.values(images).forEach(function (image) {
|
|
13525
13629
|
if (image.url && (!image.width || !image.height)) {
|
|
13526
|
-
warn("The image " + image.url + " is missing width and/or height. This will cause the image scaling issues in Safari. Please provide the width and height of the image.");
|
|
13630
|
+
warn$1("The image " + image.url + " is missing width and/or height. This will cause the image scaling issues in Safari. Please provide the width and height of the image.");
|
|
13527
13631
|
}
|
|
13528
13632
|
});
|
|
13529
13633
|
});
|
|
@@ -25921,7 +26025,7 @@
|
|
|
25921
26025
|
// `readFile` rejects on FileReader's error/abort. Swallowing it left
|
|
25922
26026
|
// an unhandled rejection and a user staring at a screen that silently
|
|
25923
26027
|
// did nothing; the retry is simply picking the file again.
|
|
25924
|
-
warn('[websdk-ui] the selected ID image could not be read', _t);
|
|
26028
|
+
warn$1('[websdk-ui] the selected ID image could not be read', _t);
|
|
25925
26029
|
setReadFailed(true);
|
|
25926
26030
|
case 5:
|
|
25927
26031
|
_context.prev = 5;
|
|
@@ -26088,7 +26192,7 @@
|
|
|
26088
26192
|
_t2 = _context["catch"](2);
|
|
26089
26193
|
// Same reasoning as the fallback screen's: an unhandled rejection and
|
|
26090
26194
|
// a silently empty upload slot is the worst of both.
|
|
26091
|
-
warn('[websdk-ui] the selected document could not be read', _t2);
|
|
26195
|
+
warn$1('[websdk-ui] the selected document could not be read', _t2);
|
|
26092
26196
|
setReadFailed(true);
|
|
26093
26197
|
case 5:
|
|
26094
26198
|
_context.prev = 5;
|
|
@@ -32222,7 +32326,7 @@
|
|
|
32222
32326
|
case 4:
|
|
32223
32327
|
_context.prev = 4;
|
|
32224
32328
|
_t = _context["catch"](2);
|
|
32225
|
-
warn('[websdk-ui] the selected selfie could not be read', _t);
|
|
32329
|
+
warn$1('[websdk-ui] the selected selfie could not be read', _t);
|
|
32226
32330
|
setReadFailed(true);
|
|
32227
32331
|
case 5:
|
|
32228
32332
|
case "end":
|
|
@@ -41365,7 +41469,7 @@
|
|
|
41365
41469
|
// Deliberately the UI package's own logger, per AGENTS.md. `debugMode`
|
|
41366
41470
|
// raises CORE's level, not this one, so routing through `debug()` here
|
|
41367
41471
|
// would silence the fallback in exactly the session that needs it.
|
|
41368
|
-
warn('[autoCapture] diagnostics log', text);
|
|
41472
|
+
warn$1('[autoCapture] diagnostics log', text);
|
|
41369
41473
|
setCopied(log.length + "f \u2192 console");
|
|
41370
41474
|
};
|
|
41371
41475
|
if (!((_navigator$clipboard = navigator.clipboard) != null && _navigator$clipboard.writeText)) {
|
|
@@ -43146,7 +43250,7 @@
|
|
|
43146
43250
|
_context.prev = 3;
|
|
43147
43251
|
_t = _context["catch"](1);
|
|
43148
43252
|
if (!cancelled) {
|
|
43149
|
-
warn("[AdditionalDocumentCaptureWizard] skip() rejected for \"" + current.name + "\"; showing the document", _t);
|
|
43253
|
+
warn$1("[AdditionalDocumentCaptureWizard] skip() rejected for \"" + current.name + "\"; showing the document", _t);
|
|
43150
43254
|
}
|
|
43151
43255
|
return _context.abrupt("return");
|
|
43152
43256
|
case 4:
|
|
@@ -46061,7 +46165,7 @@
|
|
|
46061
46165
|
if (shouldProceed) setIncluded(true);else onCompleteRef.current();
|
|
46062
46166
|
}, function (cause) {
|
|
46063
46167
|
if (!active) return;
|
|
46064
|
-
warn('[websdk-ui] signature stage decision rejected; capturing anyway', cause);
|
|
46168
|
+
warn$1('[websdk-ui] signature stage decision rejected; capturing anyway', cause);
|
|
46065
46169
|
setIncluded(true);
|
|
46066
46170
|
});
|
|
46067
46171
|
return function () {
|
|
@@ -47067,6 +47171,10 @@
|
|
|
47067
47171
|
onSubmitted = _ref.onSubmitted,
|
|
47068
47172
|
children = _ref.children,
|
|
47069
47173
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
47174
|
+
useMountOnlyWarnings('IdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47175
|
+
capture: capture,
|
|
47176
|
+
signatureCapture: signatureCapture
|
|
47177
|
+
});
|
|
47070
47178
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47071
47179
|
var latestCapture = useLatestCallbacks(capture);
|
|
47072
47180
|
var latestSignatureCapture = useLatestCallbacks(signatureCapture);
|
|
@@ -47226,6 +47334,9 @@
|
|
|
47226
47334
|
children = _ref.children;
|
|
47227
47335
|
var checkLivenessOptions = capture.checkLivenessOptions,
|
|
47228
47336
|
controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded$7);
|
|
47337
|
+
useMountOnlyWarnings('FaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47338
|
+
capture: controllerCapture
|
|
47339
|
+
});
|
|
47229
47340
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47230
47341
|
var latestCapture = useLatestCallbacks(controllerCapture);
|
|
47231
47342
|
var latestLiveness = useLatestCallbacks(controllerCapture.liveness);
|
|
@@ -47347,6 +47458,11 @@
|
|
|
47347
47458
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
47348
47459
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
47349
47460
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$3);
|
|
47461
|
+
useMountOnlyWarnings('IdAndFaceValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47462
|
+
faceCapture: selfieCaptureConfig,
|
|
47463
|
+
idCapture: idCapture,
|
|
47464
|
+
signatureCapture: signatureCapture
|
|
47465
|
+
});
|
|
47350
47466
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47351
47467
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
47352
47468
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -47607,6 +47723,10 @@
|
|
|
47607
47723
|
onCaptureError = _ref.onCaptureError;
|
|
47608
47724
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
47609
47725
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded$5);
|
|
47726
|
+
useMountOnlyWarnings('SignatureKYCFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
47727
|
+
faceCapture: selfieCaptureConfig,
|
|
47728
|
+
signatureCapture: signatureCapture
|
|
47729
|
+
});
|
|
47610
47730
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47611
47731
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
47612
47732
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -47968,6 +48088,12 @@
|
|
|
47968
48088
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$4);
|
|
47969
48089
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
47970
48090
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$2);
|
|
48091
|
+
useMountOnlyWarnings('VideoIdValidationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
48092
|
+
faceCapture: selfieCaptureConfig,
|
|
48093
|
+
idCapture: idCapture,
|
|
48094
|
+
capture: capture,
|
|
48095
|
+
signatureCapture: signatureCapture
|
|
48096
|
+
});
|
|
47971
48097
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
47972
48098
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
47973
48099
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -50956,60 +51082,6 @@
|
|
|
50956
51082
|
};
|
|
50957
51083
|
}
|
|
50958
51084
|
|
|
50959
|
-
// Makes the mount-time-only `autoCapture` contract audible (#351).
|
|
50960
|
-
//
|
|
50961
|
-
// `DocumentCaptureFlow` builds its controller inside `useState(() => …)` from
|
|
50962
|
-
// `documentsRef.current`, and `documentCapture/controller.ts` has no
|
|
50963
|
-
// reconfigure path — so `autoCapture` is read once, at mount, and every later
|
|
50964
|
-
// change is ignored. A reconfigure path was ruled against: it is real surface
|
|
50965
|
-
// on a controller that has none today, bought to serve a race the consumer can
|
|
50966
|
-
// simply not have (AMEX's `DocumentCaptureScreen` should gate on `flagsLoaded`,
|
|
50967
|
-
// not just `sessionLoaded`).
|
|
50968
|
-
//
|
|
50969
|
-
// The SILENCE is the expensive half. All four of this repo's cascade-default
|
|
50970
|
-
// incidents were "the value was quietly wrong and nothing said so", and this
|
|
50971
|
-
// one has the same shape: a capture screen that mounts before the flags land
|
|
50972
|
-
// has auto-capture off for that applicant's whole session, with no error and
|
|
50973
|
-
// no log. The field-visible half of the same ruling is
|
|
50974
|
-
// `autoCaptureStatus: 'disabled:lateFlag'` on the capture metadata.
|
|
50975
|
-
/**
|
|
50976
|
-
* A comparable summary of what auto-capture each document asked for.
|
|
50977
|
-
*
|
|
50978
|
-
* Resolved rather than compared raw, so a caller who re-spreads an equivalent
|
|
50979
|
-
* bag every render (`autoCapture: {}`, or `{ minScore: undefined }`) does not
|
|
50980
|
-
* trip the warning — only a change that would actually have configured the
|
|
50981
|
-
* engine differently does.
|
|
50982
|
-
*
|
|
50983
|
-
* PRESENCE is preserved as `null` rather than folded into the resolved
|
|
50984
|
-
* defaults, because `undefined` -> `{}` is precisely the late-flag race this
|
|
50985
|
-
* exists to catch, and resolving both would make them identical.
|
|
50986
|
-
*/
|
|
50987
|
-
function autoCaptureSignature(documents) {
|
|
50988
|
-
return JSON.stringify(documents.map(function (document) {
|
|
50989
|
-
return document.autoCapture ? resolveAutoCapture(document.autoCapture, undefined) : null;
|
|
50990
|
-
}));
|
|
50991
|
-
}
|
|
50992
|
-
/**
|
|
50993
|
-
* Warn once if `documents`' auto-capture configuration changes after mount.
|
|
50994
|
-
*
|
|
50995
|
-
* Warns rather than reconfigures: the change genuinely has no effect, and a
|
|
50996
|
-
* caller who cannot see that is the failure mode.
|
|
50997
|
-
*/
|
|
50998
|
-
function useAutoCaptureMountGuard(documents) {
|
|
50999
|
-
var mounted = React.useRef(null);
|
|
51000
|
-
var warned = React.useRef(false);
|
|
51001
|
-
var signature = autoCaptureSignature(documents);
|
|
51002
|
-
React.useEffect(function () {
|
|
51003
|
-
if (mounted.current === null) {
|
|
51004
|
-
mounted.current = signature;
|
|
51005
|
-
return;
|
|
51006
|
-
}
|
|
51007
|
-
if (warned.current || signature === mounted.current) return;
|
|
51008
|
-
warned.current = true;
|
|
51009
|
-
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.');
|
|
51010
|
-
}, [signature]);
|
|
51011
|
-
}
|
|
51012
|
-
|
|
51013
51085
|
function buildDocumentCaptureStep(controller, view, sessionReady) {
|
|
51014
51086
|
if (view === void 0) {
|
|
51015
51087
|
view = {};
|
|
@@ -51058,15 +51130,16 @@
|
|
|
51058
51130
|
// props without being torn down and rebuilt on every render.
|
|
51059
51131
|
var documentsRef = React.useRef(documents);
|
|
51060
51132
|
documentsRef.current = documents;
|
|
51061
|
-
// `autoCapture` is mount-time-only and the controller has no reconfigure
|
|
51062
|
-
// path, so a late change is ignored — loudly rather than silently (#351).
|
|
51063
|
-
useAutoCaptureMountGuard(documents);
|
|
51064
51133
|
var capturedRef = React.useRef(onDocumentCaptured);
|
|
51065
51134
|
capturedRef.current = onDocumentCaptured;
|
|
51066
51135
|
var uploadedRef = React.useRef(onDocumentUploaded);
|
|
51067
51136
|
uploadedRef.current = onDocumentUploaded;
|
|
51068
51137
|
var completeRef = React.useRef(onComplete);
|
|
51069
51138
|
completeRef.current = onComplete;
|
|
51139
|
+
useMountOnlyWarnings('DocumentCaptureFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
51140
|
+
capture: capture,
|
|
51141
|
+
documents: documents.map(toDocumentCaptureInput)
|
|
51142
|
+
});
|
|
51070
51143
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
51071
51144
|
var latestCapture = useLatestCallbacks(capture);
|
|
51072
51145
|
var _useState = React.useState(function () {
|
|
@@ -51207,6 +51280,10 @@
|
|
|
51207
51280
|
callbacks = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
51208
51281
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
51209
51282
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2$1);
|
|
51283
|
+
useMountOnlyWarnings('CustomerBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
51284
|
+
faceCapture: selfieCaptureConfig,
|
|
51285
|
+
signatureCapture: signatureCapture
|
|
51286
|
+
});
|
|
51210
51287
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
51211
51288
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
51212
51289
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -51407,6 +51484,12 @@
|
|
|
51407
51484
|
var preparing = useTranslations(undefined, PREPARING_FALLBACKS);
|
|
51408
51485
|
var checkLivenessOptions = faceCapture.checkLivenessOptions,
|
|
51409
51486
|
selfieCaptureConfig = _objectWithoutPropertiesLoose(faceCapture, _excluded2);
|
|
51487
|
+
useMountOnlyWarnings('CustomerIdAndBiometricsEnrollmentFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
51488
|
+
faceCapture: selfieCaptureConfig,
|
|
51489
|
+
idCapture: idCapture,
|
|
51490
|
+
signatureCapture: signatureCapture,
|
|
51491
|
+
videoIdCapture: videoIdCapture
|
|
51492
|
+
});
|
|
51410
51493
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
51411
51494
|
var latestSelfieCapture = useLatestCallbacks(selfieCaptureConfig);
|
|
51412
51495
|
var latestSelfieLiveness = useLatestCallbacks(selfieCaptureConfig.liveness);
|
|
@@ -51441,7 +51524,7 @@
|
|
|
51441
51524
|
if (!active) return;
|
|
51442
51525
|
// Same rule as the signature stage's rejected decision: fall back to
|
|
51443
51526
|
// the stage set the flow would run without the opt-in, and say so.
|
|
51444
|
-
warn('[websdk-ui] captureVideoId decision rejected; using ID + face liveness', cause);
|
|
51527
|
+
warn$1('[websdk-ui] captureVideoId decision rejected; using ID + face liveness', cause);
|
|
51445
51528
|
setUseVideoId(false);
|
|
51446
51529
|
});
|
|
51447
51530
|
return function () {
|
|
@@ -52329,6 +52412,9 @@
|
|
|
52329
52412
|
onExitAfterFailure = _ref.onExitAfterFailure;
|
|
52330
52413
|
var checkLivenessOptions = capture.checkLivenessOptions,
|
|
52331
52414
|
controllerCapture = _objectWithoutPropertiesLoose(capture, _excluded);
|
|
52415
|
+
useMountOnlyWarnings(variant === 'identification' ? 'CustomerIdentificationFlow' : 'CustomerVerificationFlow', FLOW_MOUNT_ONLY_REMEDY, {
|
|
52416
|
+
capture: controllerCapture
|
|
52417
|
+
});
|
|
52332
52418
|
// Config callbacks follow the latest render; see useLatestCallbacks.
|
|
52333
52419
|
var latestCapture = useLatestCallbacks(controllerCapture);
|
|
52334
52420
|
// These flows drive the live-check themselves, per capture, and read its
|
|
@@ -55010,7 +55096,7 @@
|
|
|
55010
55096
|
});
|
|
55011
55097
|
}
|
|
55012
55098
|
|
|
55013
|
-
var webSdkVersion = '2.6.3-changeset-release-develop-
|
|
55099
|
+
var webSdkVersion = '2.6.3-changeset-release-develop-eac763c';
|
|
55014
55100
|
|
|
55015
55101
|
// GENERATED by scripts/styleBagTypes.mjs from
|
|
55016
55102
|
// src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
|