idmission-web-sdk 2.6.3-changeset-release-develop-52641d0 → 2.6.3-changeset-release-develop-a0d6141
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 +70 -9
- package/dist/props.json +5 -5
- package/dist/sdk2.cjs.development.js +194 -45
- 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 +194 -45
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +194 -45
- 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
package/dist/index.d.ts
CHANGED
|
@@ -1178,6 +1178,57 @@ type DocumentCaptureInput = {
|
|
|
1178
1178
|
content?: Blob;
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
|
+
type DocumentCaptureGuideOverlayClassNames = {
|
|
1182
|
+
container?: string;
|
|
1183
|
+
};
|
|
1184
|
+
|
|
1185
|
+
type DocumentCaptureViewClassNames = {
|
|
1186
|
+
cameraFeedWrapper?: string;
|
|
1187
|
+
cameraFeed?: string;
|
|
1188
|
+
previewImage?: string;
|
|
1189
|
+
captureContainer?: string;
|
|
1190
|
+
headingRow?: string;
|
|
1191
|
+
heading?: string;
|
|
1192
|
+
guideOverlay?: DocumentCaptureGuideOverlayClassNames;
|
|
1193
|
+
footerRow?: string;
|
|
1194
|
+
instructions?: string;
|
|
1195
|
+
tamperMessage?: string;
|
|
1196
|
+
buttonsRow?: string;
|
|
1197
|
+
retryCameraAccessBtn?: string;
|
|
1198
|
+
retryCaptureBtn?: string;
|
|
1199
|
+
uploadBtn?: string;
|
|
1200
|
+
uploadProgressBtn?: string;
|
|
1201
|
+
captureBtn?: string;
|
|
1202
|
+
autoCaptureGuidance?: string;
|
|
1203
|
+
manualCaptureHint?: string;
|
|
1204
|
+
reviewContainer?: string;
|
|
1205
|
+
reviewCard?: string;
|
|
1206
|
+
reviewHeading?: string;
|
|
1207
|
+
};
|
|
1208
|
+
type DocumentCaptureViewVerbiage = {
|
|
1209
|
+
headingText?: CustomerSuppliedVerbiage;
|
|
1210
|
+
loadingBtnText?: CustomerSuppliedVerbiage;
|
|
1211
|
+
retryCameraAccessBtnText?: CustomerSuppliedVerbiage;
|
|
1212
|
+
exitBtnText?: CustomerSuppliedVerbiage;
|
|
1213
|
+
tamperingText?: CustomerSuppliedVerbiage;
|
|
1214
|
+
captureBtnText?: CustomerSuppliedVerbiage;
|
|
1215
|
+
capturingBtnText?: CustomerSuppliedVerbiage;
|
|
1216
|
+
retryCaptureBtnText?: CustomerSuppliedVerbiage;
|
|
1217
|
+
uploadBtnText?: CustomerSuppliedVerbiage;
|
|
1218
|
+
uploadingBtnText?: CustomerSuppliedVerbiage;
|
|
1219
|
+
retryUploadBtnText?: CustomerSuppliedVerbiage;
|
|
1220
|
+
successBtnText?: CustomerSuppliedVerbiage;
|
|
1221
|
+
autoCaptureNoDocumentText?: CustomerSuppliedVerbiage;
|
|
1222
|
+
autoCaptureTooCloseText?: CustomerSuppliedVerbiage;
|
|
1223
|
+
autoCaptureTooFarText?: CustomerSuppliedVerbiage;
|
|
1224
|
+
autoCaptureNotStableText?: CustomerSuppliedVerbiage;
|
|
1225
|
+
autoCaptureOutOfFocusText?: CustomerSuppliedVerbiage;
|
|
1226
|
+
autoCaptureHoldStillText?: CustomerSuppliedVerbiage;
|
|
1227
|
+
manualCaptureHintText?: CustomerSuppliedVerbiage;
|
|
1228
|
+
reviewHeadingText?: CustomerSuppliedVerbiage;
|
|
1229
|
+
reviewImageAltText?: CustomerSuppliedVerbiage;
|
|
1230
|
+
};
|
|
1231
|
+
|
|
1181
1232
|
type Color = {
|
|
1182
1233
|
'50': string;
|
|
1183
1234
|
'100': string;
|
|
@@ -9925,11 +9976,21 @@ type DocumentCaptureProps = CompatSessionProps & CompatSubmissionIdProps & Compa
|
|
|
9925
9976
|
cameraFeedMode?: CameraFeedMode;
|
|
9926
9977
|
instructions?: ReactNode;
|
|
9927
9978
|
/** Class names for the component's inner elements, keyed as in 2.x
|
|
9928
|
-
* (`DocumentCaptureClassNames`)
|
|
9929
|
-
|
|
9930
|
-
|
|
9931
|
-
|
|
9979
|
+
* (`DocumentCaptureClassNames`), plus the 3.0 view's own keys. Keys marked
|
|
9980
|
+
* deprecated have no effect in 3.0. */
|
|
9981
|
+
classNames?: DocumentCaptureClassNames & ForwardedDocumentViewClassNames;
|
|
9982
|
+
/** Verbiage overrides: the 2.x keys plus the 3.0 view's own keys. */
|
|
9983
|
+
verbiage?: DocumentCaptureVerbiage & ForwardedDocumentViewVerbiage;
|
|
9932
9984
|
};
|
|
9985
|
+
/**
|
|
9986
|
+
* The `DocumentCaptureView` keys `DocumentCapture` forwards untouched: its
|
|
9987
|
+
* mapper spreads the whole `classNames` and `verbiage` bags into the view, so
|
|
9988
|
+
* the view's own keys (the auto-capture guidance copy, for one) work here too.
|
|
9989
|
+
* The tamper-message keys are left out because the mapper always sets them
|
|
9990
|
+
* from the 2.x tamper seal.
|
|
9991
|
+
*/
|
|
9992
|
+
type ForwardedDocumentViewClassNames = Omit<DocumentCaptureViewClassNames, 'tamperMessage'>;
|
|
9993
|
+
type ForwardedDocumentViewVerbiage = Omit<DocumentCaptureViewVerbiage, 'tamperingText'>;
|
|
9933
9994
|
/** The prop surface both customer-match flows share. */
|
|
9934
9995
|
type CompatCustomerMatchProps = CompatSessionProps & CompatSubmissionIdProps & CompatSubmissionFlagProps & CompatWebhookProps & CompatUploadCallbackProps & CompatLoadingCallbackProps & CompatCameraProps & CompatCaptureExitProps & CompatChromeProps & CompatFaceCaptureProps & CompatEyesOpenProps & {
|
|
9935
9996
|
children?: ReactNode;
|
|
@@ -11162,8 +11223,8 @@ declare const renderDocumentCapture: (optionsOrTargetElement: TargetElement | (C
|
|
|
11162
11223
|
aspectRatio?: number;
|
|
11163
11224
|
cameraFeedMode?: CameraFeedMode;
|
|
11164
11225
|
instructions?: ReactNode;
|
|
11165
|
-
classNames?: DocumentCaptureClassNames;
|
|
11166
|
-
verbiage?: DocumentCaptureVerbiage;
|
|
11226
|
+
classNames?: DocumentCaptureClassNames & ForwardedDocumentViewClassNames;
|
|
11227
|
+
verbiage?: DocumentCaptureVerbiage & ForwardedDocumentViewVerbiage;
|
|
11167
11228
|
}), options?: (CompatSessionProps & CompatSubmissionIdProps & CompatUploadCallbackProps & CompatCameraProps & CompatCaptureExitProps & CompatChromeProps & {
|
|
11168
11229
|
children?: ReactNode;
|
|
11169
11230
|
useDocumentServiceForLivenessChecks?: boolean;
|
|
@@ -11174,8 +11235,8 @@ declare const renderDocumentCapture: (optionsOrTargetElement: TargetElement | (C
|
|
|
11174
11235
|
aspectRatio?: number;
|
|
11175
11236
|
cameraFeedMode?: CameraFeedMode;
|
|
11176
11237
|
instructions?: ReactNode;
|
|
11177
|
-
classNames?: DocumentCaptureClassNames;
|
|
11178
|
-
verbiage?: DocumentCaptureVerbiage;
|
|
11238
|
+
classNames?: DocumentCaptureClassNames & ForwardedDocumentViewClassNames;
|
|
11239
|
+
verbiage?: DocumentCaptureVerbiage & ForwardedDocumentViewVerbiage;
|
|
11179
11240
|
}) | undefined) => Element | DocumentFragment;
|
|
11180
11241
|
|
|
11181
11242
|
type IDmissionSDK = {
|
|
@@ -11213,7 +11274,7 @@ declare global {
|
|
|
11213
11274
|
var IDmissionSDK: IDmissionSDK;
|
|
11214
11275
|
}
|
|
11215
11276
|
|
|
11216
|
-
declare const webSdkVersion = "2.6.3-changeset-release-develop-
|
|
11277
|
+
declare const webSdkVersion = "2.6.3-changeset-release-develop-a0d6141";
|
|
11217
11278
|
|
|
11218
11279
|
/**
|
|
11219
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-
|
|
4
|
+
"version": "2.6.3-changeset-release-develop-a0d6141",
|
|
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.",
|
|
@@ -3375,15 +3375,15 @@
|
|
|
3375
3375
|
},
|
|
3376
3376
|
{
|
|
3377
3377
|
"name": "classNames",
|
|
3378
|
-
"type": "DocumentCaptureClassNames",
|
|
3378
|
+
"type": "DocumentCaptureClassNames & ForwardedDocumentViewClassNames",
|
|
3379
3379
|
"required": false,
|
|
3380
|
-
"description": "Class names for the component's inner elements, keyed as in 2.x\n(`DocumentCaptureClassNames`). Keys marked
|
|
3380
|
+
"description": "Class names for the component's inner elements, keyed as in 2.x\n(`DocumentCaptureClassNames`), plus the 3.0 view's own keys. Keys marked\ndeprecated have no effect in 3.0."
|
|
3381
3381
|
},
|
|
3382
3382
|
{
|
|
3383
3383
|
"name": "verbiage",
|
|
3384
|
-
"type": "DocumentCaptureVerbiage",
|
|
3384
|
+
"type": "DocumentCaptureVerbiage & ForwardedDocumentViewVerbiage",
|
|
3385
3385
|
"required": false,
|
|
3386
|
-
"description": "
|
|
3386
|
+
"description": "Verbiage overrides: the 2.x keys plus the 3.0 view's own keys."
|
|
3387
3387
|
}
|
|
3388
3388
|
]
|
|
3389
3389
|
},
|
|
@@ -1454,6 +1454,15 @@ function encodeProgressBatch(batch) {
|
|
|
1454
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
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
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; }
|
|
1457
|
+
/** Visible time without progress in a capture phase that arms a stream. */
|
|
1458
|
+
var stallMs = 20000;
|
|
1459
|
+
var capturePhases = new Set(["id-front", "id-back", "passport", "selfie", "signature"]);
|
|
1460
|
+
/**
|
|
1461
|
+
* Milestones that show the person is getting somewhere. Detection,
|
|
1462
|
+
* camera/model readiness, guidance, upload and validation deliberately don't
|
|
1463
|
+
* count: the document detector fires readily, and uploads aren't captures.
|
|
1464
|
+
*/
|
|
1465
|
+
var progressMilestones = new Set(["document-captured", "selfie-captured", "challenge-completed", "capture-completed", "capture-skipped", "recording-started", "first-recording-chunk", "drawing-started"]);
|
|
1457
1466
|
var taskOpeners = new WeakMap();
|
|
1458
1467
|
var inertObserver = {
|
|
1459
1468
|
observe: function observe() {},
|
|
@@ -1522,6 +1531,7 @@ function createSessionActor(options, deps) {
|
|
|
1522
1531
|
if (delay === void 0) {
|
|
1523
1532
|
delay = 0;
|
|
1524
1533
|
}
|
|
1534
|
+
if (!stream.armed) return;
|
|
1525
1535
|
var report = snapshotAt(stream.state, deps.now(), ++sequence, reason);
|
|
1526
1536
|
if (report.attemptStatus !== "active") {
|
|
1527
1537
|
var existing = terminal.findIndex(function (item) {
|
|
@@ -1653,10 +1663,16 @@ function createSessionActor(options, deps) {
|
|
|
1653
1663
|
}
|
|
1654
1664
|
return result.batch;
|
|
1655
1665
|
}
|
|
1656
|
-
function authorizedReports(queued, deadline) {
|
|
1666
|
+
function authorizedReports(queued, deadline, admits) {
|
|
1667
|
+
if (admits === void 0) {
|
|
1668
|
+
admits = function admits(context) {
|
|
1669
|
+
var _contexts$get;
|
|
1670
|
+
return ((_contexts$get = contexts.get(context)) == null ? void 0 : _contexts$get.kind) === "enabled";
|
|
1671
|
+
};
|
|
1672
|
+
}
|
|
1657
1673
|
var ready = queued.filter(function (report) {
|
|
1658
|
-
var
|
|
1659
|
-
return (
|
|
1674
|
+
var _due$get2;
|
|
1675
|
+
return admits(report.context) && ((_due$get2 = due.get(report.sequence)) != null ? _due$get2 : 0) <= deadline;
|
|
1660
1676
|
});
|
|
1661
1677
|
return ready.filter(function (report) {
|
|
1662
1678
|
var _ready$;
|
|
@@ -1713,7 +1729,7 @@ function createSessionActor(options, deps) {
|
|
|
1713
1729
|
}
|
|
1714
1730
|
function _pump() {
|
|
1715
1731
|
_pump = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
1716
|
-
var queued, authorizing, sending, unresolved, _result, outgoing, result, _iterator11, _step11, report, _iterator12, _step12, _report, _iterator13, _step13, _report2;
|
|
1732
|
+
var queued, authorizing, sending, unresolved, _contexts$get8, _result, outgoing, result, _iterator11, _step11, report, _iterator12, _step12, _report, _contexts$get9, _iterator13, _step13, _report2;
|
|
1717
1733
|
return _regeneratorRuntime.wrap(function (_context2) {
|
|
1718
1734
|
while (1) switch (_context2.prev = _context2.next) {
|
|
1719
1735
|
case 0:
|
|
@@ -1739,15 +1755,15 @@ function createSessionActor(options, deps) {
|
|
|
1739
1755
|
sending = null;
|
|
1740
1756
|
_context2.prev = 3;
|
|
1741
1757
|
if (frozen) {
|
|
1742
|
-
_context2.next =
|
|
1758
|
+
_context2.next = 11;
|
|
1743
1759
|
break;
|
|
1744
1760
|
}
|
|
1745
1761
|
unresolved = queued.find(function (report) {
|
|
1746
|
-
var _contexts$
|
|
1747
|
-
return !contexts.has(report.context) || ((_contexts$
|
|
1762
|
+
var _contexts$get7;
|
|
1763
|
+
return !contexts.has(report.context) || ((_contexts$get7 = contexts.get(report.context)) == null ? void 0 : _contexts$get7.kind) === "temporary";
|
|
1748
1764
|
});
|
|
1749
1765
|
if (!unresolved) {
|
|
1750
|
-
_context2.next =
|
|
1766
|
+
_context2.next = 9;
|
|
1751
1767
|
break;
|
|
1752
1768
|
}
|
|
1753
1769
|
authorizing = unresolved.context;
|
|
@@ -1770,44 +1786,50 @@ function createSessionActor(options, deps) {
|
|
|
1770
1786
|
stop();
|
|
1771
1787
|
return _context2.abrupt("return");
|
|
1772
1788
|
case 6:
|
|
1773
|
-
if (!(
|
|
1789
|
+
if (!(((_contexts$get8 = contexts.get(unresolved.context)) == null ? void 0 : _contexts$get8.kind) === "disabled")) {
|
|
1774
1790
|
_context2.next = 7;
|
|
1775
1791
|
break;
|
|
1776
1792
|
}
|
|
1793
|
+
return _context2.abrupt("return");
|
|
1794
|
+
case 7:
|
|
1795
|
+
if (!(_result.kind === "temporary")) {
|
|
1796
|
+
_context2.next = 8;
|
|
1797
|
+
break;
|
|
1798
|
+
}
|
|
1777
1799
|
backoff(_result);
|
|
1778
1800
|
failedEligibility(unresolved.context);
|
|
1779
1801
|
return _context2.abrupt("return");
|
|
1780
|
-
case
|
|
1802
|
+
case 8:
|
|
1781
1803
|
eligibilityRetries["delete"](unresolved.context);
|
|
1782
1804
|
contexts.set(unresolved.context, _result);
|
|
1783
1805
|
if (_result.kind === "disabled") disable(unresolved.context);
|
|
1784
1806
|
failureStreak = 0;
|
|
1785
1807
|
return _context2.abrupt("return");
|
|
1786
|
-
case
|
|
1808
|
+
case 9:
|
|
1787
1809
|
frozen = batch(authorizedReports(queued, deps.now()));
|
|
1788
1810
|
retries = 0;
|
|
1789
1811
|
if (frozen) {
|
|
1790
|
-
_context2.next =
|
|
1812
|
+
_context2.next = 10;
|
|
1791
1813
|
break;
|
|
1792
1814
|
}
|
|
1793
1815
|
return _context2.abrupt("return");
|
|
1794
|
-
case 9:
|
|
1795
|
-
removeReports(frozen.reports);
|
|
1796
1816
|
case 10:
|
|
1817
|
+
removeReports(frozen.reports);
|
|
1818
|
+
case 11:
|
|
1797
1819
|
outgoing = frozen;
|
|
1798
1820
|
sending = outgoing;
|
|
1799
|
-
_context2.next =
|
|
1821
|
+
_context2.next = 12;
|
|
1800
1822
|
return request(function (signal) {
|
|
1801
1823
|
return deps.transport.send(outgoing, signal);
|
|
1802
1824
|
});
|
|
1803
|
-
case
|
|
1825
|
+
case 12:
|
|
1804
1826
|
result = _context2.sent;
|
|
1805
1827
|
if (!(disposed || frozen !== sending)) {
|
|
1806
|
-
_context2.next =
|
|
1828
|
+
_context2.next = 13;
|
|
1807
1829
|
break;
|
|
1808
1830
|
}
|
|
1809
1831
|
return _context2.abrupt("return");
|
|
1810
|
-
case
|
|
1832
|
+
case 13:
|
|
1811
1833
|
if (result.kind === "unsupported") {
|
|
1812
1834
|
stop();
|
|
1813
1835
|
} else if (result.kind === "committed") {
|
|
@@ -1831,17 +1853,23 @@ function createSessionActor(options, deps) {
|
|
|
1831
1853
|
frozen = null;
|
|
1832
1854
|
}
|
|
1833
1855
|
}
|
|
1834
|
-
_context2.next =
|
|
1856
|
+
_context2.next = 17;
|
|
1835
1857
|
break;
|
|
1836
|
-
case
|
|
1837
|
-
_context2.prev =
|
|
1858
|
+
case 14:
|
|
1859
|
+
_context2.prev = 14;
|
|
1838
1860
|
_context2["catch"](3);
|
|
1839
1861
|
if (!(disposed || sending && frozen !== sending)) {
|
|
1840
|
-
_context2.next =
|
|
1862
|
+
_context2.next = 15;
|
|
1841
1863
|
break;
|
|
1842
1864
|
}
|
|
1843
1865
|
return _context2.abrupt("return");
|
|
1844
|
-
case
|
|
1866
|
+
case 15:
|
|
1867
|
+
if (!(authorizing && ((_contexts$get9 = contexts.get(authorizing)) == null ? void 0 : _contexts$get9.kind) === "disabled")) {
|
|
1868
|
+
_context2.next = 16;
|
|
1869
|
+
break;
|
|
1870
|
+
}
|
|
1871
|
+
return _context2.abrupt("return");
|
|
1872
|
+
case 16:
|
|
1845
1873
|
backoff({});
|
|
1846
1874
|
if (authorizing) failedEligibility(authorizing);
|
|
1847
1875
|
if (frozen && ++retries > 3) {
|
|
@@ -1852,23 +1880,30 @@ function createSessionActor(options, deps) {
|
|
|
1852
1880
|
if (emergency === frozen) emergency = null;
|
|
1853
1881
|
frozen = null;
|
|
1854
1882
|
}
|
|
1855
|
-
case
|
|
1856
|
-
_context2.prev =
|
|
1883
|
+
case 17:
|
|
1884
|
+
_context2.prev = 17;
|
|
1857
1885
|
busy = false;
|
|
1858
1886
|
refreshReadyAt();
|
|
1859
1887
|
schedule();
|
|
1860
|
-
return _context2.finish(
|
|
1861
|
-
case
|
|
1888
|
+
return _context2.finish(17);
|
|
1889
|
+
case 18:
|
|
1862
1890
|
case "end":
|
|
1863
1891
|
return _context2.stop();
|
|
1864
1892
|
}
|
|
1865
|
-
}, _callee2, null, [[3,
|
|
1893
|
+
}, _callee2, null, [[3, 14, 17, 18]]);
|
|
1866
1894
|
}));
|
|
1867
1895
|
return _pump.apply(this, arguments);
|
|
1868
1896
|
}
|
|
1869
1897
|
function emergencyFlush() {
|
|
1870
1898
|
if (emergency || disposed || deps.now() < backoffUntil) return;
|
|
1871
|
-
|
|
1899
|
+
// A stream can arm for the first time as the page hides or the session
|
|
1900
|
+
// ends, before any eligibility round trip. Portal authorizes and binds
|
|
1901
|
+
// each report inline, so the last-chance batch includes unresolved
|
|
1902
|
+
// contexts too; only disabled ones stay out.
|
|
1903
|
+
var reports = authorizedReports([].concat(terminal, _toConsumableArray(pending.values())), Infinity, function (context) {
|
|
1904
|
+
var _contexts$get2;
|
|
1905
|
+
return ((_contexts$get2 = contexts.get(context)) == null ? void 0 : _contexts$get2.kind) !== "disabled";
|
|
1906
|
+
});
|
|
1872
1907
|
if (!reports.length) return;
|
|
1873
1908
|
var sending = batch(reports);
|
|
1874
1909
|
if (!sending) return;
|
|
@@ -1879,13 +1914,18 @@ function createSessionActor(options, deps) {
|
|
|
1879
1914
|
removeReports(sending.reports);
|
|
1880
1915
|
if (result.confirmation) void result.confirmation.then(function (outcome) {
|
|
1881
1916
|
guard$2(function () {
|
|
1882
|
-
if (disposed
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
})) return;
|
|
1917
|
+
if (disposed) return;
|
|
1918
|
+
// Missing routes stop the root even if a context was denied
|
|
1919
|
+
// while this beacon was unconfirmed.
|
|
1886
1920
|
if (outcome.kind === "unsupported") {
|
|
1887
1921
|
stop();
|
|
1888
|
-
|
|
1922
|
+
return;
|
|
1923
|
+
}
|
|
1924
|
+
if (sending.reports.some(function (report) {
|
|
1925
|
+
var _contexts$get3;
|
|
1926
|
+
return ((_contexts$get3 = contexts.get(report.context)) == null ? void 0 : _contexts$get3.kind) === "disabled";
|
|
1927
|
+
})) return;
|
|
1928
|
+
if (outcome.kind === "committed") {
|
|
1889
1929
|
if (emergency === sending) emergency = null;
|
|
1890
1930
|
} else if (outcome.kind === "permanent") {
|
|
1891
1931
|
for (var _iterator8 = _createForOfIteratorHelperLoose$t(sending.reports), _step8; !(_step8 = _iterator8()).done;) {
|
|
@@ -1898,8 +1938,8 @@ function createSessionActor(options, deps) {
|
|
|
1898
1938
|
}, function () {
|
|
1899
1939
|
return guard$2(function () {
|
|
1900
1940
|
if (disposed || sending.reports.some(function (report) {
|
|
1901
|
-
var _contexts$
|
|
1902
|
-
return ((_contexts$
|
|
1941
|
+
var _contexts$get4;
|
|
1942
|
+
return ((_contexts$get4 = contexts.get(report.context)) == null ? void 0 : _contexts$get4.kind) === "disabled";
|
|
1903
1943
|
})) return;
|
|
1904
1944
|
backoff({});
|
|
1905
1945
|
schedule();
|
|
@@ -1918,6 +1958,43 @@ function createSessionActor(options, deps) {
|
|
|
1918
1958
|
}
|
|
1919
1959
|
return report;
|
|
1920
1960
|
}
|
|
1961
|
+
/** Visible milliseconds until an unarmed stream stalls, or null outside capture. */
|
|
1962
|
+
function untilStall(stream, report) {
|
|
1963
|
+
if (report.lane !== "sdk" || !report.current) return null;
|
|
1964
|
+
if (!capturePhases.has(report.current.phase)) return null;
|
|
1965
|
+
var stalled = Math.min(report.current.phaseRunVisibleMs, report.visibleMs - stream.progressVisibleMs);
|
|
1966
|
+
return stallMs - stalled;
|
|
1967
|
+
}
|
|
1968
|
+
function arm(stream, report) {
|
|
1969
|
+
var _report$current$phase, _report$current, _report$current$phase2, _report$current2;
|
|
1970
|
+
stream.armed = true;
|
|
1971
|
+
var run = (_report$current$phase = (_report$current = report.current) == null ? void 0 : _report$current.phaseRunVisibleMs) != null ? _report$current$phase : 0;
|
|
1972
|
+
stream.checkpointPhase = (_report$current$phase2 = (_report$current2 = report.current) == null ? void 0 : _report$current2.phaseEntryOrdinal) != null ? _report$current$phase2 : -1;
|
|
1973
|
+
stream.checkpoint = nextCheckpointAfter(run);
|
|
1974
|
+
stream.lastValuableVisibleMs = report.visibleMs;
|
|
1975
|
+
enqueue(stream, "checkpoint");
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Arms a stream whose stall already elapsed. Runs before anything that could
|
|
1979
|
+
* erase it (progress, leaving the phase, retry, close, hiding), because a
|
|
1980
|
+
* busy main thread can delay the tick that would otherwise arm it.
|
|
1981
|
+
*/
|
|
1982
|
+
function armIfStalled(stream) {
|
|
1983
|
+
if (stream.armed || stream.disposed) return;
|
|
1984
|
+
var report = snapshotAt(stream.state, deps.now(), sequence, "checkpoint");
|
|
1985
|
+
if (!report.current || report.current.ended) return;
|
|
1986
|
+
var remaining = untilStall(stream, report);
|
|
1987
|
+
if (remaining !== null && remaining <= 0) arm(stream, report);
|
|
1988
|
+
}
|
|
1989
|
+
/** Whether a progress milestone count rose, including recorder-derived ones. */
|
|
1990
|
+
function madeProgress(previous, next) {
|
|
1991
|
+
var before = previous.report.milestones;
|
|
1992
|
+
var after = next.report.milestones;
|
|
1993
|
+
return _toConsumableArray(progressMilestones).some(function (code) {
|
|
1994
|
+
var _after$code, _before$code;
|
|
1995
|
+
return ((_after$code = after[code]) != null ? _after$code : 0) > ((_before$code = before[code]) != null ? _before$code : 0);
|
|
1996
|
+
});
|
|
1997
|
+
}
|
|
1921
1998
|
function tick() {
|
|
1922
1999
|
if (disposed || visibility === "hidden") return;
|
|
1923
2000
|
for (var _iterator9 = _createForOfIteratorHelperLoose$t(streams), _step9; !(_step9 = _iterator9()).done;) {
|
|
@@ -1928,6 +2005,10 @@ function createSessionActor(options, deps) {
|
|
|
1928
2005
|
close(stream, "disposed");
|
|
1929
2006
|
continue;
|
|
1930
2007
|
}
|
|
2008
|
+
if (!stream.armed) {
|
|
2009
|
+
armIfStalled(stream);
|
|
2010
|
+
continue;
|
|
2011
|
+
}
|
|
1931
2012
|
if (report.current.phaseRunVisibleMs >= stream.checkpoint) {
|
|
1932
2013
|
enqueue(stream, "checkpoint");
|
|
1933
2014
|
var next = nextCheckpointAfter(report.current.phaseRunVisibleMs);
|
|
@@ -1951,6 +2032,11 @@ function createSessionActor(options, deps) {
|
|
|
1951
2032
|
var stream = _step0.value;
|
|
1952
2033
|
var report = prepareDeadline(stream);
|
|
1953
2034
|
if (!(report != null && report.current)) continue;
|
|
2035
|
+
if (!stream.armed) {
|
|
2036
|
+
var remaining = untilStall(stream, report);
|
|
2037
|
+
if (remaining !== null) delay = Math.min(delay, Math.max(1, remaining));
|
|
2038
|
+
continue;
|
|
2039
|
+
}
|
|
1954
2040
|
delay = Math.min(delay, Math.max(1, stream.checkpoint - report.current.phaseRunVisibleMs));
|
|
1955
2041
|
if (report.lane === "sdk" && report.current.exposure.kind === "displayed") delay = Math.min(delay, Math.max(1, 15000 - report.current.guidanceRunVisibleMs, 20000 - (report.visibleMs - stream.lastValuableVisibleMs)));
|
|
1956
2042
|
}
|
|
@@ -1959,8 +2045,8 @@ function createSessionActor(options, deps) {
|
|
|
1959
2045
|
}, delay);
|
|
1960
2046
|
}
|
|
1961
2047
|
function open(lane, context) {
|
|
1962
|
-
var _contexts$
|
|
1963
|
-
if (disposed || ((_contexts$
|
|
2048
|
+
var _contexts$get5;
|
|
2049
|
+
if (disposed || ((_contexts$get5 = contexts.get(context)) == null ? void 0 : _contexts$get5.kind) === "disabled" || streams.size >= 8) return null;
|
|
1964
2050
|
var stream = {
|
|
1965
2051
|
state: createRecorder({
|
|
1966
2052
|
lane: lane,
|
|
@@ -1975,6 +2061,8 @@ function createSessionActor(options, deps) {
|
|
|
1975
2061
|
checkpoint: 20000,
|
|
1976
2062
|
checkpointPhase: -1,
|
|
1977
2063
|
lastValuableVisibleMs: -2e4,
|
|
2064
|
+
progressVisibleMs: 0,
|
|
2065
|
+
armed: deps.reporting === "always",
|
|
1978
2066
|
disposed: false
|
|
1979
2067
|
};
|
|
1980
2068
|
streams.add(stream);
|
|
@@ -1982,6 +2070,7 @@ function createSessionActor(options, deps) {
|
|
|
1982
2070
|
}
|
|
1983
2071
|
function close(stream, status) {
|
|
1984
2072
|
if (stream.disposed) return;
|
|
2073
|
+
armIfStalled(stream);
|
|
1985
2074
|
if (stream.state.report.attemptStatus === "active") {
|
|
1986
2075
|
stream.state = endAttempt(stream.state, status, deps.now());
|
|
1987
2076
|
enqueue(stream, status === "disposed" ? "dispose" : "completion");
|
|
@@ -2014,16 +2103,19 @@ function createSessionActor(options, deps) {
|
|
|
2014
2103
|
});
|
|
2015
2104
|
stream.checkpointPhase = -1;
|
|
2016
2105
|
stream.lastValuableVisibleMs = -2e4;
|
|
2106
|
+
stream.progressVisibleMs = 0;
|
|
2017
2107
|
}
|
|
2018
2108
|
function _observe(stream, observation) {
|
|
2019
2109
|
if (disposed || stream.disposed) return;
|
|
2110
|
+
armIfStalled(stream);
|
|
2020
2111
|
var previous = stream.state;
|
|
2021
2112
|
stream.state = reduceObservation(previous, observation, deps.now());
|
|
2113
|
+
if (madeProgress(previous, stream.state)) stream.progressVisibleMs = snapshotAt(stream.state, deps.now(), sequence, "milestone").visibleMs;
|
|
2022
2114
|
if (observation.kind === "phase") {
|
|
2023
2115
|
if (stream.state.phaseIndex !== previous.phaseIndex) enqueue(stream, "phase-change");
|
|
2024
2116
|
} else if (observation.kind === "milestone") enqueue(stream, observation.code === "operation-entered" ? "entry" : "milestone", observation.code === "operation-entered" ? 0 : 250);else if (observation.kind === "failure") enqueue(stream, "failure", 250);else if (["phase-completed", "flow-completed", "completed"].includes(observation.kind)) enqueue(stream, "completion");
|
|
2025
2117
|
var valuable = snapshotAt(stream.state, deps.now(), sequence, "valuable-state");
|
|
2026
|
-
if (valuable.lane === "sdk" && valuableStateDue(valuable, stream.lastValuableVisibleMs, stream.state.guidanceChanges)) {
|
|
2118
|
+
if (stream.armed && valuable.lane === "sdk" && valuableStateDue(valuable, stream.lastValuableVisibleMs, stream.state.guidanceChanges)) {
|
|
2027
2119
|
stream.lastValuableVisibleMs = valuable.visibleMs;
|
|
2028
2120
|
enqueue(stream, "valuable-state");
|
|
2029
2121
|
}
|
|
@@ -2036,6 +2128,7 @@ function createSessionActor(options, deps) {
|
|
|
2036
2128
|
for (var _iterator1 = _createForOfIteratorHelperLoose$t(streams), _step1; !(_step1 = _iterator1()).done;) {
|
|
2037
2129
|
var stream = _step1.value;
|
|
2038
2130
|
if (stream.state.report.attemptStatus !== "active") continue;
|
|
2131
|
+
armIfStalled(stream);
|
|
2039
2132
|
stream.state = reduceObservation(stream.state, {
|
|
2040
2133
|
kind: "visibility",
|
|
2041
2134
|
visibility: next
|
|
@@ -2049,8 +2142,8 @@ function createSessionActor(options, deps) {
|
|
|
2049
2142
|
return {
|
|
2050
2143
|
task: function task(context) {
|
|
2051
2144
|
try {
|
|
2052
|
-
var _contexts$
|
|
2053
|
-
if (disposed || !context || new TextEncoder().encode(context).length > 2048 || ((_contexts$
|
|
2145
|
+
var _contexts$get6;
|
|
2146
|
+
if (disposed || !context || new TextEncoder().encode(context).length > 2048 || ((_contexts$get6 = contexts.get(context)) == null ? void 0 : _contexts$get6.kind) === "disabled") return inertTask;
|
|
2054
2147
|
if (!contexts.has(context)) {
|
|
2055
2148
|
if (contexts.size >= 16) return inertTask;
|
|
2056
2149
|
contexts.set(context, {
|
|
@@ -48491,7 +48584,7 @@ function mapCustomerIdAndBiometricsEnrollmentProps(props, ctx) {
|
|
|
48491
48584
|
});
|
|
48492
48585
|
}
|
|
48493
48586
|
|
|
48494
|
-
var webSdkVersion = '2.6.3-changeset-release-develop-
|
|
48587
|
+
var webSdkVersion = '2.6.3-changeset-release-develop-a0d6141';
|
|
48495
48588
|
|
|
48496
48589
|
// GENERATED by scripts/styleBagTypes.mjs from
|
|
48497
48590
|
// src/__fixtures__/sdk2StyleBags.json and the mapper sweep — do not
|
|
@@ -51004,6 +51097,59 @@ function isBag(value) {
|
|
|
51004
51097
|
var proto = Object.getPrototypeOf(value);
|
|
51005
51098
|
return proto === null || Object.getPrototypeOf(proto) === null;
|
|
51006
51099
|
}
|
|
51100
|
+
/**
|
|
51101
|
+
* Top-level style keys a flow forwards to its 3.0 view beyond the 2.x paths,
|
|
51102
|
+
* so the 2.x check below must not call them typos. `satisfies` keeps each list
|
|
51103
|
+
* in step with the type it mirrors.
|
|
51104
|
+
*/
|
|
51105
|
+
var FORWARDED_STYLE_KEYS = {
|
|
51106
|
+
DocumentCapture: {
|
|
51107
|
+
classNames: {
|
|
51108
|
+
cameraFeedWrapper: true,
|
|
51109
|
+
cameraFeed: true,
|
|
51110
|
+
previewImage: true,
|
|
51111
|
+
captureContainer: true,
|
|
51112
|
+
headingRow: true,
|
|
51113
|
+
heading: true,
|
|
51114
|
+
guideOverlay: true,
|
|
51115
|
+
footerRow: true,
|
|
51116
|
+
instructions: true,
|
|
51117
|
+
buttonsRow: true,
|
|
51118
|
+
retryCameraAccessBtn: true,
|
|
51119
|
+
retryCaptureBtn: true,
|
|
51120
|
+
uploadBtn: true,
|
|
51121
|
+
uploadProgressBtn: true,
|
|
51122
|
+
captureBtn: true,
|
|
51123
|
+
autoCaptureGuidance: true,
|
|
51124
|
+
manualCaptureHint: true,
|
|
51125
|
+
reviewContainer: true,
|
|
51126
|
+
reviewCard: true,
|
|
51127
|
+
reviewHeading: true
|
|
51128
|
+
},
|
|
51129
|
+
verbiage: {
|
|
51130
|
+
headingText: true,
|
|
51131
|
+
loadingBtnText: true,
|
|
51132
|
+
retryCameraAccessBtnText: true,
|
|
51133
|
+
exitBtnText: true,
|
|
51134
|
+
captureBtnText: true,
|
|
51135
|
+
capturingBtnText: true,
|
|
51136
|
+
retryCaptureBtnText: true,
|
|
51137
|
+
uploadBtnText: true,
|
|
51138
|
+
uploadingBtnText: true,
|
|
51139
|
+
retryUploadBtnText: true,
|
|
51140
|
+
successBtnText: true,
|
|
51141
|
+
autoCaptureNoDocumentText: true,
|
|
51142
|
+
autoCaptureTooCloseText: true,
|
|
51143
|
+
autoCaptureTooFarText: true,
|
|
51144
|
+
autoCaptureNotStableText: true,
|
|
51145
|
+
autoCaptureOutOfFocusText: true,
|
|
51146
|
+
autoCaptureHoldStillText: true,
|
|
51147
|
+
manualCaptureHintText: true,
|
|
51148
|
+
reviewHeadingText: true,
|
|
51149
|
+
reviewImageAltText: true
|
|
51150
|
+
}
|
|
51151
|
+
}
|
|
51152
|
+
};
|
|
51007
51153
|
/**
|
|
51008
51154
|
* Warns once per page load for each style-bag key the caller set that 2.x
|
|
51009
51155
|
* never had — a typo a type checker would have caught, which plain-JS
|
|
@@ -51013,22 +51159,25 @@ function isBag(value) {
|
|
|
51013
51159
|
* is reported too, since nothing reads it.
|
|
51014
51160
|
*/
|
|
51015
51161
|
function reportStyleKeys(flow, props) {
|
|
51162
|
+
var _a;
|
|
51016
51163
|
if (getLogLevel() < LogLevel.Warn) return;
|
|
51017
51164
|
var drops = STYLE_BAG_DROPS[flow] || {};
|
|
51018
51165
|
var _loop_1 = function _loop_1(bag) {
|
|
51019
51166
|
if (!hasOwn.call(STYLE_BAG_KEYS, bag)) return "continue";
|
|
51020
|
-
var
|
|
51021
|
-
flows =
|
|
51022
|
-
aliases =
|
|
51167
|
+
var _b = STYLE_BAG_KEYS[bag],
|
|
51168
|
+
flows = _b.flows,
|
|
51169
|
+
aliases = _b.aliases;
|
|
51023
51170
|
var bagValue = props[bag];
|
|
51024
51171
|
if (!hasOwn.call(flows, flow) || !isBag(bagValue)) return "continue";
|
|
51025
51172
|
var bagDrops = drops[bag] || {};
|
|
51173
|
+
var forwarded = ((_a = FORWARDED_STYLE_KEYS[flow]) === null || _a === void 0 ? void 0 : _a[bag]) || {};
|
|
51026
51174
|
var _walk = function walk(value, alias, prefix) {
|
|
51027
51175
|
var keys = aliases[alias];
|
|
51028
51176
|
for (var key in value) {
|
|
51029
51177
|
if (!hasOwn.call(value, key) || value[key] === undefined) continue;
|
|
51030
51178
|
var path = prefix + key;
|
|
51031
51179
|
if (!hasOwn.call(keys, key)) {
|
|
51180
|
+
if (prefix === '' && hasOwn.call(forwarded, key)) continue;
|
|
51032
51181
|
report(flow, bag + '.' + path, 'is not a 2.x `' + bag + '` key, so it has no effect.');
|
|
51033
51182
|
} else if (hasOwn.call(bagDrops, path)) {
|
|
51034
51183
|
report(flow, bag + '.' + path, 'has no effect in 3.0: ' + NO_EFFECT[bagDrops[path]]);
|