idmission-web-sdk 2.1.13 → 2.1.15
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/components/camera/CameraVideoTag.d.ts +4 -4
- package/dist/components/common/ButtonsRow.d.ts +1 -274
- package/dist/components/common/CapturedDocumentImg.d.ts +2 -2
- package/dist/components/common/ExitCaptureButton.d.ts +3 -284
- package/dist/components/common/GuidanceMessage.d.ts +9 -9
- package/dist/components/common/InvisibleCanvas.d.ts +1 -276
- package/dist/components/common/Page.d.ts +9 -9
- package/dist/components/common/debug.d.ts +14 -285
- package/dist/components/common/overlay.d.ts +19 -826
- package/dist/components/common/signature.d.ts +6 -1090
- package/dist/components/common/spinner.d.ts +5 -6
- package/dist/components/customer_flows/CustomerIdAndBiometricsEnrollment.d.ts +6 -2
- package/dist/components/customer_flows/IdAndFaceValidation.d.ts +6 -2
- package/dist/components/customer_flows/IdValidation.d.ts +6 -2
- package/dist/components/customer_flows/VideoIdValidation.d.ts +6 -2
- package/dist/components/document_capture/DocumentCaptureStateProvider.d.ts +7 -10
- package/dist/components/id_capture/IdCaptureGuideOverlay.d.ts +27 -1108
- package/dist/components/id_capture/IdCaptureLoadingOverlay.d.ts +1 -1
- package/dist/components/id_capture/IdCaptureSuccess.d.ts +1 -272
- package/dist/components/selfie_capture/SelfieCaptureLoadingOverlay.d.ts +1 -1
- package/dist/components/submission/SessionValidationErrorOverlay.d.ts +1 -1
- package/dist/components/submission/SessionValidationFailedOverlay.d.ts +1 -1
- package/dist/components/submission/SubmissionProvider.d.ts +4 -2
- package/dist/components/video_id/IdVideoCaptureGuides.d.ts +8 -547
- package/dist/contexts/SubmissionContext.d.ts +17 -0
- package/dist/lib/camera/CameraFeedWrapper.d.ts +2 -3
- package/dist/lib/models/DocumentDetection.d.ts +0 -1
- package/dist/lib/models/FaceDetection.d.ts +0 -1
- package/dist/lib/models/Focus.d.ts +0 -1
- package/dist/lib/models/preloadModels.d.ts +3 -3
- package/dist/sdk2.esm.js +2661 -416
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +25749 -17818
- 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/dist/stories/Components/FaceLiveness/Capture.stories.d.ts +1 -1
- package/dist/stories/Components/HighPerformanceObjectDetection/Minimal.stories.d.ts +2 -2
- package/dist/stories/Components/IdCapture/LicenseBackCapture.stories.d.ts +1 -1
- package/dist/stories/Components/IdCapture/LicenseFrontCapture.stories.d.ts +1 -1
- package/dist/stories/Components/IdCapture/PassportCapture.stories.d.ts +1 -1
- package/dist/stories/Components/IdCapture/Wizard.stories.d.ts +1 -1
- package/dist/stories/CustomerFlows/CustomerBiometricsEnrollment.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/CustomerIdAndBiometricsEnrollment.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/CustomerIdentification.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/CustomerVerification.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/FaceValidation.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/IdAndFaceValidation.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/SignatureKYC.stories.d.ts +0 -1
- package/dist/stories/CustomerFlows/VideoIdValidation.stories.d.ts +0 -1
- package/dist/stories/Experiments/Camera.stories.d.ts +1 -1
- package/dist/stories/Experiments/CameraEnumerationTool.stories.d.ts +1 -1
- package/dist/stories/Experiments/MultiCamera.stories.d.ts +1 -1
- package/dist/stories/Experiments/MultiStreamVideoCapture.stories.d.ts +1 -1
- package/dist/stories/Experiments/VideoCapture.stories.d.ts +1 -1
- package/dist/stories/utils/test_photos/cat1.d.ts +3 -3
- package/dist/stories/utils/test_photos/cat2.d.ts +3 -3
- package/dist/stories/utils/test_photos/cat3.d.ts +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +32 -50
- package/dist/sdk2.cjs.development.js +0 -14166
- package/dist/sdk2.cjs.development.js.map +0 -1
- package/dist/sdk2.cjs.production.js +0 -2
- package/dist/sdk2.cjs.production.js.map +0 -1
package/dist/sdk2.esm.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __awaiter, __generator, __makeTemplateObject, __extends, __assign, __spreadArray, __rest } from 'tslib';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import React__default, { forwardRef, useState, useEffect, useRef, useContext, createContext, useReducer, useCallback, useMemo, useLayoutEffect } from 'react';
|
|
4
3
|
import * as ReactDOM from 'react-dom/client';
|
|
@@ -14,7 +13,198 @@ import LanguageDetector from 'i18next-browser-languagedetector';
|
|
|
14
13
|
import i18n from 'i18next';
|
|
15
14
|
import SignatureCanvas from 'react-signature-canvas';
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
/******************************************************************************
|
|
17
|
+
Copyright (c) Microsoft Corporation.
|
|
18
|
+
|
|
19
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
+
purpose with or without fee is hereby granted.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
+
***************************************************************************** */
|
|
30
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
31
|
+
|
|
32
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
33
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
34
|
+
__proto__: []
|
|
35
|
+
} instanceof Array && function (d, b) {
|
|
36
|
+
d.__proto__ = b;
|
|
37
|
+
} || function (d, b) {
|
|
38
|
+
for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
|
|
39
|
+
};
|
|
40
|
+
return _extendStatics(d, b);
|
|
41
|
+
};
|
|
42
|
+
function __extends(d, b) {
|
|
43
|
+
if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
44
|
+
_extendStatics(d, b);
|
|
45
|
+
function __() {
|
|
46
|
+
this.constructor = d;
|
|
47
|
+
}
|
|
48
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
49
|
+
}
|
|
50
|
+
var _assign = function __assign() {
|
|
51
|
+
_assign = Object.assign || function __assign(t) {
|
|
52
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
53
|
+
s = arguments[i];
|
|
54
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
};
|
|
58
|
+
return _assign.apply(this, arguments);
|
|
59
|
+
};
|
|
60
|
+
function __rest(s, e) {
|
|
61
|
+
var t = {};
|
|
62
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
63
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
64
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
65
|
+
}
|
|
66
|
+
return t;
|
|
67
|
+
}
|
|
68
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
69
|
+
function adopt(value) {
|
|
70
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
71
|
+
resolve(value);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
75
|
+
function fulfilled(value) {
|
|
76
|
+
try {
|
|
77
|
+
step(generator.next(value));
|
|
78
|
+
} catch (e) {
|
|
79
|
+
reject(e);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function rejected(value) {
|
|
83
|
+
try {
|
|
84
|
+
step(generator["throw"](value));
|
|
85
|
+
} catch (e) {
|
|
86
|
+
reject(e);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function step(result) {
|
|
90
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
91
|
+
}
|
|
92
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function __generator(thisArg, body) {
|
|
96
|
+
var _ = {
|
|
97
|
+
label: 0,
|
|
98
|
+
sent: function sent() {
|
|
99
|
+
if (t[0] & 1) throw t[1];
|
|
100
|
+
return t[1];
|
|
101
|
+
},
|
|
102
|
+
trys: [],
|
|
103
|
+
ops: []
|
|
104
|
+
},
|
|
105
|
+
f,
|
|
106
|
+
y,
|
|
107
|
+
t,
|
|
108
|
+
g;
|
|
109
|
+
return g = {
|
|
110
|
+
next: verb(0),
|
|
111
|
+
"throw": verb(1),
|
|
112
|
+
"return": verb(2)
|
|
113
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
114
|
+
return this;
|
|
115
|
+
}), g;
|
|
116
|
+
function verb(n) {
|
|
117
|
+
return function (v) {
|
|
118
|
+
return step([n, v]);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function step(op) {
|
|
122
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
123
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
124
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
125
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
126
|
+
switch (op[0]) {
|
|
127
|
+
case 0:
|
|
128
|
+
case 1:
|
|
129
|
+
t = op;
|
|
130
|
+
break;
|
|
131
|
+
case 4:
|
|
132
|
+
_.label++;
|
|
133
|
+
return {
|
|
134
|
+
value: op[1],
|
|
135
|
+
done: false
|
|
136
|
+
};
|
|
137
|
+
case 5:
|
|
138
|
+
_.label++;
|
|
139
|
+
y = op[1];
|
|
140
|
+
op = [0];
|
|
141
|
+
continue;
|
|
142
|
+
case 7:
|
|
143
|
+
op = _.ops.pop();
|
|
144
|
+
_.trys.pop();
|
|
145
|
+
continue;
|
|
146
|
+
default:
|
|
147
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
148
|
+
_ = 0;
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
151
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
152
|
+
_.label = op[1];
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
156
|
+
_.label = t[1];
|
|
157
|
+
t = op;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
if (t && _.label < t[2]) {
|
|
161
|
+
_.label = t[2];
|
|
162
|
+
_.ops.push(op);
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
if (t[2]) _.ops.pop();
|
|
166
|
+
_.trys.pop();
|
|
167
|
+
continue;
|
|
168
|
+
}
|
|
169
|
+
op = body.call(thisArg, _);
|
|
170
|
+
} catch (e) {
|
|
171
|
+
op = [6, e];
|
|
172
|
+
y = 0;
|
|
173
|
+
} finally {
|
|
174
|
+
f = t = 0;
|
|
175
|
+
}
|
|
176
|
+
if (op[0] & 5) throw op[1];
|
|
177
|
+
return {
|
|
178
|
+
value: op[0] ? op[1] : void 0,
|
|
179
|
+
done: true
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
function __spreadArray(to, from, pack) {
|
|
184
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
185
|
+
if (ar || !(i in from)) {
|
|
186
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
187
|
+
ar[i] = from[i];
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
191
|
+
}
|
|
192
|
+
function __makeTemplateObject(cooked, raw) {
|
|
193
|
+
if (Object.defineProperty) {
|
|
194
|
+
Object.defineProperty(cooked, "raw", {
|
|
195
|
+
value: raw
|
|
196
|
+
});
|
|
197
|
+
} else {
|
|
198
|
+
cooked.raw = raw;
|
|
199
|
+
}
|
|
200
|
+
return cooked;
|
|
201
|
+
}
|
|
202
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
203
|
+
var e = new Error(message);
|
|
204
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
var webSdkVersion = '2.1.15';
|
|
18
208
|
|
|
19
209
|
function getPlatform() {
|
|
20
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -93,23 +283,7 @@ var submissionHosts = {
|
|
|
93
283
|
prod: 'https://api.idmission.com',
|
|
94
284
|
demo: 'https://apidemo.idmission.com'
|
|
95
285
|
};
|
|
96
|
-
function parseJwt(token) {
|
|
97
|
-
var base64Url = token.split('.')[1];
|
|
98
|
-
var base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
|
|
99
|
-
var jsonPayload = decodeURIComponent(window.atob(base64).split('').map(function (c) {
|
|
100
|
-
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
|
101
|
-
}).join(''));
|
|
102
|
-
return JSON.parse(jsonPayload);
|
|
103
|
-
}
|
|
104
286
|
function determineSubmissionHost(environment, token) {
|
|
105
|
-
if (token) {
|
|
106
|
-
switch (parseJwt(token)['iss']) {
|
|
107
|
-
case 'https://auth.idmission.com/auth/realms/identity':
|
|
108
|
-
return submissionHosts.prod;
|
|
109
|
-
case 'https://demoauth.idmission.com/auth/realms/identity':
|
|
110
|
-
return submissionHosts.demo;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
287
|
var host = submissionHosts[environment];
|
|
114
288
|
if (!host) throw new Error("unrecognized SubmissionEnvironment ".concat(environment));
|
|
115
289
|
return host;
|
|
@@ -591,23 +765,23 @@ var initialState$5 = {
|
|
|
591
765
|
};
|
|
592
766
|
var AuthStateContext = /*#__PURE__*/createContext(initialState$5);
|
|
593
767
|
var AuthDispatchContext = /*#__PURE__*/createContext(function () {});
|
|
594
|
-
var reducer$
|
|
768
|
+
var reducer$4 = function reducer(state, action) {
|
|
595
769
|
switch (action.type) {
|
|
596
770
|
case 'setSessionId':
|
|
597
|
-
return
|
|
771
|
+
return _assign(_assign({}, state), {
|
|
598
772
|
sessionId: action.payload
|
|
599
773
|
});
|
|
600
774
|
case 'setCheckState':
|
|
601
|
-
return
|
|
775
|
+
return _assign(_assign({}, state), {
|
|
602
776
|
sessionCheckState: action.payload
|
|
603
777
|
});
|
|
604
778
|
case 'setError':
|
|
605
|
-
return
|
|
779
|
+
return _assign(_assign({}, state), {
|
|
606
780
|
sessionCheckState: 'ERROR',
|
|
607
781
|
authError: action.payload
|
|
608
782
|
});
|
|
609
783
|
case 'retry':
|
|
610
|
-
return
|
|
784
|
+
return _assign(_assign({}, state), {
|
|
611
785
|
sessionCheckState: 'READY',
|
|
612
786
|
authError: undefined,
|
|
613
787
|
sessionId: undefined
|
|
@@ -621,7 +795,7 @@ function useAuthReducer(authUrl, sessionId) {
|
|
|
621
795
|
if (authUrl === void 0) {
|
|
622
796
|
authUrl = defaultAuthUrl;
|
|
623
797
|
}
|
|
624
|
-
var _a = useReducer(reducer$
|
|
798
|
+
var _a = useReducer(reducer$4, _assign(_assign({}, initialState$5), {
|
|
625
799
|
authUrl: authUrl
|
|
626
800
|
})),
|
|
627
801
|
state = _a[0],
|
|
@@ -915,6 +1089,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
915
1089
|
enrollmentId = _a.enrollmentId,
|
|
916
1090
|
personalData = _a.personalData,
|
|
917
1091
|
cardData = _a.cardData,
|
|
1092
|
+
idData = _a.idData,
|
|
918
1093
|
_d = _a.bypassAgeValidation,
|
|
919
1094
|
bypassAgeValidation = _d === void 0 ? false : _d,
|
|
920
1095
|
_e = _a.bypassNameMatching,
|
|
@@ -949,6 +1124,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
949
1124
|
webhooksSendProcessedImages = _t === void 0 ? false : _t,
|
|
950
1125
|
_u = _a.webhooksFireOnReview,
|
|
951
1126
|
webhooksFireOnReview = _u === void 0 ? false : _u,
|
|
1127
|
+
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
952
1128
|
precapturedDocuments = _a.precapturedDocuments,
|
|
953
1129
|
_v = _a.documentServiceUrl,
|
|
954
1130
|
documentServiceUrl = _v === void 0 ? defaultDocumentServiceUrl : _v,
|
|
@@ -1122,11 +1298,11 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1122
1298
|
}, [onBeforeDocumentUpload, documentServiceUrl, sessionId, onDocumentUploadProgress, onDocumentUploaded, onDocumentUploadFailed]);
|
|
1123
1299
|
var buildSubmissionPayload = useCallback(function () {
|
|
1124
1300
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1125
|
-
function uploadIfPossible(
|
|
1126
|
-
|
|
1127
|
-
filetype
|
|
1128
|
-
|
|
1129
|
-
|
|
1301
|
+
function uploadIfPossible(src_1, filename_1) {
|
|
1302
|
+
return __awaiter(this, arguments, void 0, function (src, filename, filetype) {
|
|
1303
|
+
if (filetype === void 0) {
|
|
1304
|
+
filetype = 'image/jpeg';
|
|
1305
|
+
}
|
|
1130
1306
|
return __generator(this, function (_a) {
|
|
1131
1307
|
switch (_a.label) {
|
|
1132
1308
|
case 0:
|
|
@@ -1212,11 +1388,11 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1212
1388
|
merchantId: 0
|
|
1213
1389
|
},
|
|
1214
1390
|
customerData: {
|
|
1215
|
-
idData: {
|
|
1391
|
+
idData: _assign({
|
|
1216
1392
|
idType: 'NSP',
|
|
1217
1393
|
idCountry: 'NSP',
|
|
1218
1394
|
idState: ''
|
|
1219
|
-
}
|
|
1395
|
+
}, idData)
|
|
1220
1396
|
},
|
|
1221
1397
|
additionalData: {
|
|
1222
1398
|
uniqueRequestId: new Date().getTime().toString(),
|
|
@@ -1233,7 +1409,8 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1233
1409
|
verifyDataWithHost: verifyIdWithExternalDatabases ? 'Y' : 'N',
|
|
1234
1410
|
idBackImageRequired: idBackImageRequired ? 'Y' : 'N',
|
|
1235
1411
|
stripSpecialCharacters: webhooksStripSpecialCharacters ? 'Y' : 'N',
|
|
1236
|
-
idImageResolutionCheck: idImageResolutionCheck ? 'Y' : 'N'
|
|
1412
|
+
idImageResolutionCheck: idImageResolutionCheck ? 'Y' : 'N',
|
|
1413
|
+
customerDataMatchConfig: customerDataMatchConfig
|
|
1237
1414
|
}
|
|
1238
1415
|
};
|
|
1239
1416
|
if (clientRequestID) {
|
|
@@ -1285,8 +1462,8 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1285
1462
|
}
|
|
1286
1463
|
if (additionalDocuments) {
|
|
1287
1464
|
submissionRequest.customerData.additionalDocuments = additionalDocuments.map(function (d) {
|
|
1288
|
-
return
|
|
1289
|
-
additionalDocument: JSON.stringify(
|
|
1465
|
+
return _assign(_assign({}, d), {
|
|
1466
|
+
additionalDocument: JSON.stringify(_assign(_assign({}, d.additionalDocument), {
|
|
1290
1467
|
uniqueId: submissionRequest.additionalData.uniqueRequestId
|
|
1291
1468
|
}))
|
|
1292
1469
|
});
|
|
@@ -1325,7 +1502,7 @@ var SubmissionProvider = function SubmissionProvider(_a) {
|
|
|
1325
1502
|
}
|
|
1326
1503
|
});
|
|
1327
1504
|
});
|
|
1328
|
-
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idFrontCaptureAttempts, idFrontImage, idImageResolutionCheck, manualReviewRequired, needImmediateResponse, onBeforeSubmit, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters]);
|
|
1505
|
+
}, [additionalDocuments, bypassAgeValidation, bypassNameMatching, cardData, clientRequestID, companyId, customerDataMatchConfig, deduplicationEnabled, deduplicationSynchronous, documentServiceUrl, enrollmentId, expectedAudioText, geolocationResult, idBackCaptureAttempts, idBackImage, idBackImageRequired, idCaptureVideoAudioStartsAt, idCaptureVideoAudioUrl, idCaptureVideoIdBackImage, idCaptureVideoIdFrontImage, idCaptureVideoUrl, idData, idFrontCaptureAttempts, idFrontImage, idImageResolutionCheck, manualReviewRequired, needImmediateResponse, onBeforeSubmit, passportImage, personalData, selfieCaptureAttempts, selfieImage, signatureData, signatureVideoUrl, uploadDocument, verifyIdWithExternalDatabases, webhooksClientTraceId, webhooksEnabled, webhooksFireOnReview, webhooksSendInputImages, webhooksSendProcessedImages, webhooksStripSpecialCharacters]);
|
|
1329
1506
|
var defaultOnSubmit = useCallback(function () {
|
|
1330
1507
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
1331
1508
|
var submissionResponse_1, payload, host, endpoint, response, statusMessage, submissionResponse_2, e_1, err;
|
|
@@ -1659,12 +1836,12 @@ function clearCanvas(canvas) {
|
|
|
1659
1836
|
}
|
|
1660
1837
|
var templateObject_1$C;
|
|
1661
1838
|
|
|
1662
|
-
function listAvailableCameras(
|
|
1663
|
-
|
|
1664
|
-
requestMicAccess = false;
|
|
1665
|
-
}
|
|
1666
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1839
|
+
function listAvailableCameras(facingMode_1) {
|
|
1840
|
+
return __awaiter(this, arguments, void 0, function (facingMode, requestMicAccess) {
|
|
1667
1841
|
var cameraEnumerationStream, videoDevices;
|
|
1842
|
+
if (requestMicAccess === void 0) {
|
|
1843
|
+
requestMicAccess = false;
|
|
1844
|
+
}
|
|
1668
1845
|
return __generator(this, function (_a) {
|
|
1669
1846
|
switch (_a.label) {
|
|
1670
1847
|
case 0:
|
|
@@ -1852,9 +2029,9 @@ function usePreferredCaptureDevice(_a) {
|
|
|
1852
2029
|
// I am not a huge fan of getUserMedia's design -- you need to call it twice in order
|
|
1853
2030
|
// to select the "best" camera for your application's purposes.
|
|
1854
2031
|
var requestCameraAccess = useCallback(function chooseFromAvailableCameras() {
|
|
1855
|
-
var _a, _b;
|
|
1856
2032
|
return __awaiter(this, void 0, void 0, function () {
|
|
1857
2033
|
var availableCameras, selectedCamera, platform_1, iphoneContinuityCamera, e_1;
|
|
2034
|
+
var _a, _b;
|
|
1858
2035
|
return __generator(this, function (_c) {
|
|
1859
2036
|
switch (_c.label) {
|
|
1860
2037
|
case 0:
|
|
@@ -2330,7 +2507,7 @@ var initialModelCapabilities = {
|
|
|
2330
2507
|
networkSpeed: 0,
|
|
2331
2508
|
networkTestTime: 0
|
|
2332
2509
|
};
|
|
2333
|
-
var modelCapabilities =
|
|
2510
|
+
var modelCapabilities = _assign({}, initialModelCapabilities);
|
|
2334
2511
|
function probeModelCapabilities() {
|
|
2335
2512
|
return __awaiter(this, void 0, void 0, function () {
|
|
2336
2513
|
var error_1, error_2;
|
|
@@ -2385,15 +2562,15 @@ function probeModelCapabilities() {
|
|
|
2385
2562
|
});
|
|
2386
2563
|
});
|
|
2387
2564
|
}
|
|
2388
|
-
function loadTinyModel(
|
|
2389
|
-
|
|
2390
|
-
delegate = 'GPU';
|
|
2391
|
-
}
|
|
2392
|
-
if (maxTime === void 0) {
|
|
2393
|
-
maxTime = 10000;
|
|
2394
|
-
}
|
|
2395
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
2565
|
+
function loadTinyModel() {
|
|
2566
|
+
return __awaiter(this, arguments, void 0, function (delegate, maxTime) {
|
|
2396
2567
|
var modelAssetPath, startedAt, e_1, time, speedMbps, model, _a, _b, emptyFrame;
|
|
2568
|
+
if (delegate === void 0) {
|
|
2569
|
+
delegate = 'GPU';
|
|
2570
|
+
}
|
|
2571
|
+
if (maxTime === void 0) {
|
|
2572
|
+
maxTime = 10000;
|
|
2573
|
+
}
|
|
2397
2574
|
return __generator(this, function (_c) {
|
|
2398
2575
|
switch (_c.label) {
|
|
2399
2576
|
case 0:
|
|
@@ -2623,294 +2800,2341 @@ function cropIfNecessary(imageData, cropCanvas, rotateCanvas, box) {
|
|
|
2623
2800
|
|
|
2624
2801
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2625
2802
|
|
|
2626
|
-
(function(){
|
|
2627
|
-
|
|
2628
|
-
Copyright The Closure Library Authors.
|
|
2629
|
-
SPDX-License-Identifier: Apache-2.0
|
|
2630
|
-
*/
|
|
2631
|
-
var x;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}var ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a};
|
|
2632
|
-
function ca(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof commonjsGlobal&&commonjsGlobal];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");}var y=ca(this);function B(a,b){if(b)a:{var c=y;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e];}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b});}}
|
|
2633
|
-
B("Symbol",function(a){function b(g){if(this instanceof b)throw new TypeError("Symbol is not a constructor");return new c(d+(g||"")+"_"+e++,g)}function c(g,f){this.g=g;ba(this,"description",{configurable:!0,writable:!0,value:f});}if(a)return a;c.prototype.toString=function(){return this.g};var d="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",e=0;return b});
|
|
2634
|
-
B("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=y[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return da(aa(this))}});}return a});function da(a){a={next:a};a[Symbol.iterator]=function(){return this};return a}
|
|
2635
|
-
function C(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function D(a){if(!(a instanceof Array)){a=C(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c;}return a}var ea="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},fa;
|
|
2636
|
-
if("function"==typeof Object.setPrototypeOf)fa=Object.setPrototypeOf;else {var ha;a:{var ia={a:!0},ja={};try{ja.__proto__=ia;ha=ja.a;break a}catch(a){}ha=!1;}fa=ha?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null;}var ka=fa;
|
|
2637
|
-
function E(a,b){a.prototype=ea(b.prototype);a.prototype.constructor=a;if(ka)ka(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d);}else a[c]=b[c];a.na=b.prototype;}function la(){this.l=!1;this.i=null;this.h=void 0;this.g=1;this.u=this.o=0;this.j=null;}function ma(a){if(a.l)throw new TypeError("Generator is already running");a.l=!0;}la.prototype.s=function(a){this.h=a;};
|
|
2638
|
-
function na(a,b){a.j={da:b,ea:!0};a.g=a.o||a.u;}la.prototype.return=function(a){this.j={return:a};this.g=this.u;};function G(a,b,c){a.g=c;return {value:b}}function oa(a){this.g=new la;this.h=a;}function pa(a,b){ma(a.g);var c=a.g.i;if(c)return qa(a,"return"in c?c["return"]:function(d){return {value:d,done:!0}},b,a.g.return);a.g.return(b);return H(a)}
|
|
2639
|
-
function qa(a,b,c,d){try{var e=b.call(a.g.i,c);if(!(e instanceof Object))throw new TypeError("Iterator result "+e+" is not an object");if(!e.done)return a.g.l=!1,e;var g=e.value;}catch(f){return a.g.i=null,na(a.g,f),H(a)}a.g.i=null;d.call(a.g,g);return H(a)}function H(a){for(;a.g.g;)try{var b=a.h(a.g);if(b)return a.g.l=!1,{value:b.value,done:!1}}catch(c){a.g.h=void 0,na(a.g,c);}a.g.l=!1;if(a.g.j){b=a.g.j;a.g.j=null;if(b.ea)throw b.da;return {value:b.return,done:!0}}return {value:void 0,done:!0}}
|
|
2640
|
-
function ra(a){this.next=function(b){ma(a.g);a.g.i?b=qa(a,a.g.i.next,b,a.g.s):(a.g.s(b),b=H(a));return b};this.throw=function(b){ma(a.g);a.g.i?b=qa(a,a.g.i["throw"],b,a.g.s):(na(a.g,b),b=H(a));return b};this.return=function(b){return pa(a,b)};this[Symbol.iterator]=function(){return this};}function sa(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function g(f){f.done?d(f.value):Promise.resolve(f.value).then(b,c).then(g,e);}g(a.next());})}
|
|
2641
|
-
function J(a){return sa(new ra(new oa(a)))}
|
|
2642
|
-
B("Promise",function(a){function b(f){this.h=0;this.i=void 0;this.g=[];this.s=!1;var h=this.j();try{f(h.resolve,h.reject);}catch(k){h.reject(k);}}function c(){this.g=null;}function d(f){return f instanceof b?f:new b(function(h){h(f);})}if(a)return a;c.prototype.h=function(f){if(null==this.g){this.g=[];var h=this;this.i(function(){h.l();});}this.g.push(f);};var e=y.setTimeout;c.prototype.i=function(f){e(f,0);};c.prototype.l=function(){for(;this.g&&this.g.length;){var f=this.g;this.g=[];for(var h=0;h<f.length;++h){var k=
|
|
2643
|
-
f[h];f[h]=null;try{k();}catch(l){this.j(l);}}}this.g=null;};c.prototype.j=function(f){this.i(function(){throw f;});};b.prototype.j=function(){function f(l){return function(m){k||(k=!0,l.call(h,m));}}var h=this,k=!1;return {resolve:f(this.D),reject:f(this.l)}};b.prototype.D=function(f){if(f===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(f instanceof b)this.H(f);else {a:switch(typeof f){case "object":var h=null!=f;break a;case "function":h=!0;break a;default:h=!1;}h?this.A(f):this.o(f);}};
|
|
2644
|
-
b.prototype.A=function(f){var h=void 0;try{h=f.then;}catch(k){this.l(k);return}"function"==typeof h?this.I(h,f):this.o(f);};b.prototype.l=function(f){this.u(2,f);};b.prototype.o=function(f){this.u(1,f);};b.prototype.u=function(f,h){if(0!=this.h)throw Error("Cannot settle("+f+", "+h+"): Promise already settled in state"+this.h);this.h=f;this.i=h;2===this.h&&this.G();this.B();};b.prototype.G=function(){var f=this;e(function(){if(f.C()){var h=y.console;"undefined"!==typeof h&&h.error(f.i);}},1);};b.prototype.C=
|
|
2645
|
-
function(){if(this.s)return !1;var f=y.CustomEvent,h=y.Event,k=y.dispatchEvent;if("undefined"===typeof k)return !0;"function"===typeof f?f=new f("unhandledrejection",{cancelable:!0}):"function"===typeof h?f=new h("unhandledrejection",{cancelable:!0}):(f=y.document.createEvent("CustomEvent"),f.initCustomEvent("unhandledrejection",!1,!0,f));f.promise=this;f.reason=this.i;return k(f)};b.prototype.B=function(){if(null!=this.g){for(var f=0;f<this.g.length;++f)g.h(this.g[f]);this.g=null;}};var g=new c;b.prototype.H=
|
|
2646
|
-
function(f){var h=this.j();f.M(h.resolve,h.reject);};b.prototype.I=function(f,h){var k=this.j();try{f.call(h,k.resolve,k.reject);}catch(l){k.reject(l);}};b.prototype.then=function(f,h){function k(p,n){return "function"==typeof p?function(r){try{l(p(r));}catch(t){m(t);}}:n}var l,m,q=new b(function(p,n){l=p;m=n;});this.M(k(f,l),k(h,m));return q};b.prototype.catch=function(f){return this.then(void 0,f)};b.prototype.M=function(f,h){function k(){switch(l.h){case 1:f(l.i);break;case 2:h(l.i);break;default:throw Error("Unexpected state: "+
|
|
2647
|
-
l.h);}}var l=this;null==this.g?g.h(k):this.g.push(k);this.s=!0;};b.resolve=d;b.reject=function(f){return new b(function(h,k){k(f);})};b.race=function(f){return new b(function(h,k){for(var l=C(f),m=l.next();!m.done;m=l.next())d(m.value).M(h,k);})};b.all=function(f){var h=C(f),k=h.next();return k.done?d([]):new b(function(l,m){function q(r){return function(t){p[r]=t;n--;0==n&&l(p);}}var p=[],n=0;do p.push(void 0),n++,d(k.value).M(q(p.length-1),m),k=h.next();while(!k.done)})};return b});
|
|
2648
|
-
function ta(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var g=c++;return {value:b(g,a[g]),done:!1}}d=!0;return {done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e}var ua="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e]);}return a};B("Object.assign",function(a){return a||ua});
|
|
2649
|
-
B("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});B("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return !0}return !1}});
|
|
2650
|
-
B("String.prototype.includes",function(a){return a?a:function(b,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype.includes must not be a regular expression");return -1!==this.indexOf(b,c||0)}});B("Array.prototype.keys",function(a){return a?a:function(){return ta(this,function(b){return b})}});var va=this||self;
|
|
2651
|
-
function K(a,b){a=a.split(".");var c=va;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b;}function L(){throw Error("Invalid UTF8");}function wa(a,b){b=String.fromCharCode.apply(null,b);return null==a?b:a+b}var xa,ya="undefined"!==typeof TextDecoder,za,Aa="undefined"!==typeof TextEncoder;var Ba={},M=null;function Ca(a){var b;void 0===b&&(b=0);Da();b=Ba[b];for(var c=Array(Math.floor(a.length/3)),d=b[64]||"",e=0,g=0;e<a.length-2;e+=3){var f=a[e],h=a[e+1],k=a[e+2],l=b[f>>2];f=b[(f&3)<<4|h>>4];h=b[(h&15)<<2|k>>6];k=b[k&63];c[g++]=l+f+h+k;}l=0;k=d;switch(a.length-e){case 2:l=a[e+1],k=b[(l&15)<<2]||d;case 1:a=a[e],c[g]=b[a>>2]+b[(a&3)<<4|l>>4]+k+d;}return c.join("")}
|
|
2652
|
-
function Ea(a){var b=a.length,c=3*b/4;c%3?c=Math.floor(c):-1!="=.".indexOf(a[b-1])&&(c=-1!="=.".indexOf(a[b-2])?c-2:c-1);var d=new Uint8Array(c),e=0;Fa(a,function(g){d[e++]=g;});return e!==c?d.subarray(0,e):d}
|
|
2653
|
-
function Fa(a,b){function c(k){for(;d<a.length;){var l=a.charAt(d++),m=M[l];if(null!=m)return m;if(!/^[\s\xa0]*$/.test(l))throw Error("Unknown base64 encoding at char: "+l);}return k}Da();for(var d=0;;){var e=c(-1),g=c(0),f=c(64),h=c(64);if(64===h&&-1===e)break;b(e<<2|g>>4);64!=f&&(b(g<<4&240|f>>2),64!=h&&b(f<<6&192|h));}}
|
|
2654
|
-
function Da(){if(!M){M={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],c=0;5>c;c++){var d=a.concat(b[c].split(""));Ba[c]=d;for(var e=0;e<d.length;e++){var g=d[e];void 0===M[g]&&(M[g]=e);}}}}var Ga="function"===typeof Uint8Array;function Ha(a){return Ga&&null!=a&&a instanceof Uint8Array}var Ia;function Ja(a){this.L=a;if(null!==a&&0===a.length)throw Error("ByteString should be constructed with non-empty values");}var Ka="function"===typeof Uint8Array.prototype.slice,N=0,O=0;
|
|
2655
|
-
function La(a,b){if(a.constructor===Uint8Array)return a;if(a.constructor===ArrayBuffer)return new Uint8Array(a);if(a.constructor===Array)return new Uint8Array(a);if(a.constructor===String)return Ea(a);if(a.constructor===Ja){if(!b&&(b=a.L)&&b.constructor===Uint8Array)return b;b=a.L;b=null==b||Ha(b)?b:"string"===typeof b?Ea(b):null;return (a=a.L=b)?new Uint8Array(a):Ia||(Ia=new Uint8Array(0))}if(a instanceof Uint8Array)return new Uint8Array(a.buffer,a.byteOffset,a.byteLength);throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, or Array of numbers");
|
|
2656
|
-
}function Ma(a,b){return Error("Invalid wire type: "+a+" (at position "+b+")")}function Na(){return Error("Failed to read varint, encoding is invalid.")}function Oa(a,b){b=void 0===b?{}:b;b=void 0===b.v?!1:b.v;this.h=null;this.g=this.i=this.j=0;this.v=b;a&&Pa(this,a);}function Pa(a,b){a.h=La(b,a.v);a.j=0;a.i=a.h.length;a.g=a.j;}Oa.prototype.reset=function(){this.g=this.j;};function P(a){if(a.g>a.i)throw Error("Tried to read past the end of the data "+a.g+" > "+a.i);}
|
|
2657
|
-
function Q(a){var b=a.h,c=b[a.g],d=c&127;if(128>c)return a.g+=1,P(a),d;c=b[a.g+1];d|=(c&127)<<7;if(128>c)return a.g+=2,P(a),d;c=b[a.g+2];d|=(c&127)<<14;if(128>c)return a.g+=3,P(a),d;c=b[a.g+3];d|=(c&127)<<21;if(128>c)return a.g+=4,P(a),d;c=b[a.g+4];a.g+=5;d|=(c&15)<<28;if(128>c)return P(a),d;if(128<=b[a.g++]&&128<=b[a.g++]&&128<=b[a.g++]&&128<=b[a.g++]&&128<=b[a.g++])throw Na();P(a);return d}var Qa=[];function Ra(){this.g=[];}Ra.prototype.length=function(){return this.g.length};Ra.prototype.end=function(){var a=this.g;this.g=[];return a};function S(a,b){for(;127<b;)a.g.push(b&127|128),b>>>=7;a.g.push(b);}function Sa(a){var b={},c=void 0===b.W?!1:b.W;this.l={v:void 0===b.v?!1:b.v};this.W=c;b=this.l;Qa.length?(c=Qa.pop(),b&&(c.v=b.v),a&&Pa(c,a),a=c):a=new Oa(a,b);this.g=a;this.j=this.g.g;this.h=this.i=-1;}Sa.prototype.reset=function(){this.g.reset();this.j=this.g.g;this.h=this.i=-1;};function Ta(a){var b=a.g;if(b.g==b.i)return !1;a.j=a.g.g;var c=Q(a.g)>>>0;b=c>>>3;c&=7;if(!(0<=c&&5>=c))throw Ma(c,a.j);if(1>b)throw Error("Invalid field number: "+b+" (at position "+a.j+")");a.i=b;a.h=c;return !0}
|
|
2658
|
-
function Ua(a){switch(a.h){case 0:if(0!=a.h)Ua(a);else a:{a=a.g;for(var b=a.g,c=b+10;b<c;)if(0===(a.h[b++]&128)){a.g=b;P(a);break a}throw Na();}break;case 1:a=a.g;a.g+=8;P(a);break;case 2:2!=a.h?Ua(a):(b=Q(a.g)>>>0,a=a.g,a.g+=b,P(a));break;case 5:a=a.g;a.g+=4;P(a);break;case 3:b=a.i;do{if(!Ta(a))throw Error("Unmatched start-group tag: stream EOF");if(4==a.h){if(a.i!=b)throw Error("Unmatched end-group tag");break}Ua(a);}while(1);break;default:throw Ma(a.h,a.j);}}var Va=[];function Wa(){this.i=[];this.h=0;this.g=new Ra;}function T(a,b){0!==b.length&&(a.i.push(b),a.h+=b.length);}function Xa(a,b){if(b=b.ba){T(a,a.g.end());for(var c=0;c<b.length;c++)T(a,b[c]);}}var U="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol(void 0):void 0;function Ya(a,b){Object.isFrozen(a)||(U?a[U]|=b:void 0!==a.N?a.N|=b:Object.defineProperties(a,{N:{value:b,configurable:!0,writable:!0,enumerable:!1}}));}function Za(a){var b;U?b=a[U]:b=a.N;return null==b?0:b}function $a(a){Ya(a,1);return a}function ab(a){return Array.isArray(a)?!!(Za(a)&2):!1}function bb(a){if(!Array.isArray(a))throw Error("cannot mark non-array as immutable");Ya(a,2);}function cb(a){return null!==a&&"object"===typeof a&&!Array.isArray(a)&&a.constructor===Object}var db=Object.freeze($a([]));function eb(a){if(ab(a.m))throw Error("Cannot mutate an immutable Message");}var fb="undefined"!=typeof Symbol&&"undefined"!=typeof Symbol.hasInstance;function gb(a){return {value:a,configurable:!1,writable:!1,enumerable:!1}}function V(a,b,c){return -1===b?null:b>=a.i?a.g?a.g[b]:void 0:(void 0===c?0:c)&&a.g&&(c=a.g[b],null!=c)?c:a.m[b+a.h]}function W(a,b,c,d){d=void 0===d?!1:d;eb(a);b<a.i&&!d?a.m[b+a.h]=c:(a.g||(a.g=a.m[a.i+a.h]={}))[b]=c;}function hb(a,b,c,d){c=void 0===c?!0:c;d=void 0===d?!1:d;var e=V(a,b,d);null==e&&(e=db);if(ab(a.m))c&&(bb(e),Object.freeze(e));else if(e===db||ab(e))e=$a(e.slice()),W(a,b,e,d);return e}function X(a,b,c){a=V(a,b);a=null==a?a:+a;return null==a?void 0===c?0:c:a}
|
|
2659
|
-
function ib(a,b,c,d){a.j||(a.j={});var e=ab(a.m),g=a.j[c];if(!g){d=hb(a,c,!0,void 0===d?!1:d);g=[];e=e||ab(d);for(var f=0;f<d.length;f++)g[f]=new b(d[f]),e&&bb(g[f].m);e&&(bb(g),Object.freeze(g));a.j[c]=g;}return g}function jb(a,b,c,d,e){var g=void 0===g?!1:g;eb(a);g=ib(a,c,b,g);c=d?d:new c;a=hb(a,b);void 0!=e?(g.splice(e,0,c),a.splice(e,0,c.m)):(g.push(c),a.push(c.m));return c}function kb(a,b){a=V(a,b);return null==a?0:a}function lb(a,b){a=V(a,b);return null==a?"":a}function mb(a){switch(typeof a){case "number":return isFinite(a)?a:String(a);case "object":if(a&&!Array.isArray(a)){if(Ha(a))return Ca(a);if(a instanceof Ja){var b=a.L;b=null==b||"string"===typeof b?b:Ga&&b instanceof Uint8Array?Ca(b):null;return (a.L=b)||""}}}return a}function nb(a){var b=ob;b=void 0===b?pb:b;return qb(a,b)}function rb(a,b){if(null!=a){if(Array.isArray(a))a=qb(a,b);else if(cb(a)){var c={},d;for(d in a)c[d]=rb(a[d],b);a=c;}else a=b(a);return a}}function qb(a,b){for(var c=a.slice(),d=0;d<c.length;d++)c[d]=rb(c[d],b);Array.isArray(a)&&Za(a)&1&&$a(c);return c}function ob(a){if(a&&"object"==typeof a&&a.toJSON)return a.toJSON();a=mb(a);return Array.isArray(a)?nb(a):a}function pb(a){return Ha(a)?new Uint8Array(a):a}function sb(a,b,c){a||(a=tb);tb=null;var d=this.constructor.h;a||(a=d?[d]:[]);this.h=(d?0:-1)-(this.constructor.g||0);this.j=void 0;this.m=a;a:{d=this.m.length;a=d-1;if(d&&(d=this.m[a],cb(d))){this.i=a-this.h;this.g=d;break a}void 0!==b&&-1<b?(this.i=Math.max(b,a+1-this.h),this.g=void 0):this.i=Number.MAX_VALUE;}if(c)for(b=0;b<c.length;b++)if(a=c[b],a<this.i)a+=this.h,(d=this.m[a])?Array.isArray(d)&&$a(d):this.m[a]=db;else {d=this.g||(this.g=this.m[this.i+this.h]={});var e=d[a];e?Array.isArray(e)&&
|
|
2660
|
-
$a(e):d[a]=db;}}sb.prototype.toJSON=function(){return nb(this.m)};sb.prototype.toString=function(){return this.m.toString()};var tb;function ub(){sb.apply(this,arguments);}E(ub,sb);if(fb){var vb={};Object.defineProperties(ub,(vb[Symbol.hasInstance]=gb(function(){throw Error("Cannot perform instanceof checks for MutableMessage");}),vb));}function wb(a,b,c){if(c){var d={},e;for(e in c){var g=c[e],f=g.ha;f||(d.F=g.la||g.fa.P,g.aa?(d.U=xb(g.aa),f=function(h){return function(k,l,m){return h.F(k,l,m,h.U)}}(d)):g.ca?(d.T=yb(g.X.g,g.ca),f=function(h){return function(k,l,m){return h.F(k,l,m,h.T)}}(d)):f=d.F,g.ha=f);f(b,a,g.X);d={F:d.F,U:d.U,T:d.T};}}Xa(b,a);}var zb=Symbol();function Ab(a,b,c){return a[zb]||(a[zb]=function(d,e){return b(d,e,c)})}
|
|
2661
|
-
function Bb(a){var b=a[zb];if(!b){var c=Cb(a);b=function(d,e){return Db(d,e,c)};a[zb]=b;}return b}function Eb(a){var b=a.aa;if(b)return Bb(b);if(b=a.ka)return Ab(a.X.g,b,a.ca)}function Fb(a){var b=Eb(a),c=a.X,d=a.fa.O;return b?function(e,g){return d(e,g,c,b)}:function(e,g){return d(e,g,c)}}
|
|
2662
|
-
function Gb(a,b,c,d,e,g){a=a();var f=0;a.length&&"number"!==typeof a[0]&&(c(b,a[0]),f++);for(;f<a.length;){c=a[f++];for(var h=f+1;h<a.length&&"number"!==typeof a[h];)h++;var k=a[f++];h-=f;switch(h){case 0:d(b,c,k);break;case 1:d(b,c,k,a[f++]);break;case 2:e(b,c,k,a[f++],a[f++]);break;case 3:h=a[f++];var l=a[f++],m=a[f++];Array.isArray(m)?e(b,c,k,h,l,m):g(b,c,k,h,l,m);break;case 4:g(b,c,k,a[f++],a[f++],a[f++],a[f++]);break;default:throw Error("unexpected number of binary field arguments: "+h);}}return b}
|
|
2663
|
-
var Hb=Symbol();function xb(a){var b=a[Hb];if(!b){var c=Ib(a);b=function(d,e){return Jb(d,e,c)};a[Hb]=b;}return b}function yb(a,b){var c=a[Hb];c||(c=function(d,e){return wb(d,e,b)},a[Hb]=c);return c}var Kb=Symbol();function Lb(a,b){a.push(b);}function Mb(a,b,c){a.push(b,c.P);}function Nb(a,b,c,d,e){var g=xb(e),f=c.P;a.push(b,function(h,k,l){return f(h,k,l,d,g)});}function Ob(a,b,c,d,e,g){var f=yb(d,g),h=c.P;a.push(b,function(k,l,m){return h(k,l,m,d,f)});}
|
|
2664
|
-
function Ib(a){var b=a[Kb];return b?b:Gb(a,a[Kb]=[],Lb,Mb,Nb,Ob)}var Pb=Symbol();function Qb(a,b){a[0]=b;}function Rb(a,b,c,d){var e=c.O;a[b]=d?function(g,f,h){return e(g,f,h,d)}:e;}function Sb(a,b,c,d,e,g){var f=c.O,h=Bb(e);a[b]=function(k,l,m){return f(k,l,m,d,h,g)};}function Tb(a,b,c,d,e,g,f){var h=c.O,k=Ab(d,e,g);a[b]=function(l,m,q){return h(l,m,q,d,k,f)};}function Cb(a){var b=a[Pb];return b?b:Gb(a,a[Pb]={},Qb,Rb,Sb,Tb)}
|
|
2665
|
-
function Db(a,b,c){for(;Ta(b)&&4!=b.h;){var d=b.i,e=c[d];if(!e){var g=c[0];g&&(g=g[d])&&(e=c[d]=Fb(g));}if(!e||!e(b,a,d))if(e=b,d=a,g=e.j,Ua(e),!e.W){var f=e.g.h;e=e.g.g;e=g===e?Ia||(Ia=new Uint8Array(0)):Ka?f.slice(g,e):new Uint8Array(f.subarray(g,e));(g=d.ba)?g.push(e):d.ba=[e];}}return a}
|
|
2666
|
-
function Ub(a,b,c){if(Va.length){var d=Va.pop();a&&(Pa(d.g,a),d.i=-1,d.h=-1);a=d;}else a=new Sa(a);try{return Db(new b,a,Cb(c))}finally{b=a.g,b.h=null,b.j=0,b.i=0,b.g=0,b.v=!1,a.i=-1,a.h=-1,100>Va.length&&Va.push(a);}}function Jb(a,b,c){for(var d=c.length,e=1==d%2,g=e?1:0;g<d;g+=2)(0, c[g+1])(b,a,c[g]);wb(a,b,e?c[0]:void 0);}function Vb(a,b){var c=new Wa;Jb(a,c,Ib(b));T(c,c.g.end());a=new Uint8Array(c.h);b=c.i;for(var d=b.length,e=0,g=0;g<d;g++){var f=b[g];a.set(f,e);e+=f.length;}c.i=[a];return a}
|
|
2667
|
-
function Wb(a,b){return {O:a,P:b}}
|
|
2668
|
-
var Y=Wb(function(a,b,c){if(5!==a.h)return !1;a=a.g;var d=a.h[a.g];var e=a.h[a.g+1];var g=a.h[a.g+2],f=a.h[a.g+3];a.g+=4;P(a);e=(d<<0|e<<8|g<<16|f<<24)>>>0;a=2*(e>>31)+1;d=e>>>23&255;e&=8388607;W(b,c,255==d?e?NaN:Infinity*a:0==d?a*Math.pow(2,-149)*e:a*Math.pow(2,d-150)*(e+Math.pow(2,23)));return !0},function(a,b,c){b=V(b,c);if(null!=b){S(a.g,8*c+5);a=a.g;var d=b;d=(c=0>d?1:0)?-d:d;0===d?0<1/d?N=O=0:(O=0,N=2147483648):isNaN(d)?(O=0,N=2147483647):3.4028234663852886E38<d?(O=0,N=(c<<31|2139095040)>>>0):
|
|
2669
|
-
1.1754943508222875E-38>d?(d=Math.round(d/Math.pow(2,-149)),O=0,N=(c<<31|d)>>>0):(b=Math.floor(Math.log(d)/Math.LN2),d*=Math.pow(2,-b),d=Math.round(8388608*d),16777216<=d&&++b,O=0,N=(c<<31|b+127<<23|d&8388607)>>>0);c=N;a.g.push(c>>>0&255);a.g.push(c>>>8&255);a.g.push(c>>>16&255);a.g.push(c>>>24&255);}}),Xb=Wb(function(a,b,c){if(0!==a.h)return !1;for(var d=a.g,e=128,g=0,f=a=0;4>f&&128<=e;f++)e=d.h[d.g++],P(d),g|=(e&127)<<7*f;128<=e&&(e=d.h[d.g++],P(d),g|=(e&127)<<28,a|=(e&127)>>4);if(128<=e)for(f=0;5>
|
|
2670
|
-
f&&128<=e;f++)e=d.h[d.g++],P(d),a|=(e&127)<<7*f+3;if(128>e){d=g>>>0;e=a>>>0;if(a=e&2147483648)d=~d+1>>>0,e=~e>>>0,0==d&&(e=e+1>>>0);d=4294967296*e+(d>>>0);}else throw Na();W(b,c,a?-d:d);return !0},function(a,b,c){b=V(b,c);if(null!=b&&null!=b){S(a.g,8*c);a=a.g;var d=b;c=0>d;d=Math.abs(d);b=d>>>0;d=Math.floor((d-b)/4294967296);d>>>=0;c&&(d=~d>>>0,b=(~b>>>0)+1,4294967295<b&&(b=0,d++,4294967295<d&&(d=0)));N=b;O=d;c=N;for(b=O;0<b||127<c;)a.g.push(c&127|128),c=(c>>>7|b<<25)>>>0,b>>>=7;a.g.push(c);}}),Yb=Wb(function(a,
|
|
2671
|
-
b,c){if(0!==a.h)return !1;W(b,c,Q(a.g));return !0},function(a,b,c){b=V(b,c);if(null!=b&&null!=b)if(S(a.g,8*c),a=a.g,c=b,0<=c)S(a,c);else {for(b=0;9>b;b++)a.g.push(c&127|128),c>>=7;a.g.push(1);}}),Zb=Wb(function(a,b,c){if(2!==a.h)return !1;var d=Q(a.g)>>>0;a=a.g;var e=a.g;a.g+=d;P(a);a=a.h;var g;if(ya)(g=xa)||(g=xa=new TextDecoder("utf-8",{fatal:!0})),g=g.decode(a.subarray(e,e+d));else {d=e+d;for(var f=[],h=null,k,l,m;e<d;)k=a[e++],128>k?f.push(k):224>k?e>=d?L():(l=a[e++],194>k||128!==(l&192)?(e--,L()):
|
|
2672
|
-
f.push((k&31)<<6|l&63)):240>k?e>=d-1?L():(l=a[e++],128!==(l&192)||224===k&&160>l||237===k&&160<=l||128!==((g=a[e++])&192)?(e--,L()):f.push((k&15)<<12|(l&63)<<6|g&63)):244>=k?e>=d-2?L():(l=a[e++],128!==(l&192)||0!==(k<<28)+(l-144)>>30||128!==((g=a[e++])&192)||128!==((m=a[e++])&192)?(e--,L()):(k=(k&7)<<18|(l&63)<<12|(g&63)<<6|m&63,k-=65536,f.push((k>>10&1023)+55296,(k&1023)+56320))):L(),8192<=f.length&&(h=wa(h,f),f.length=0);g=wa(h,f);}W(b,c,g);return !0},function(a,b,c){b=V(b,c);if(null!=b){var d=!1;
|
|
2673
|
-
d=void 0===d?!1:d;if(Aa){if(d&&/(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/.test(b))throw Error("Found an unpaired surrogate");b=(za||(za=new TextEncoder)).encode(b);}else {for(var e=0,g=new Uint8Array(3*b.length),f=0;f<b.length;f++){var h=b.charCodeAt(f);if(128>h)g[e++]=h;else {if(2048>h)g[e++]=h>>6|192;else {if(55296<=h&&57343>=h){if(56319>=h&&f<b.length){var k=b.charCodeAt(++f);if(56320<=k&&57343>=k){h=1024*(h-55296)+k-56320+65536;g[e++]=h>>18|240;g[e++]=h>>12&63|128;
|
|
2674
|
-
g[e++]=h>>6&63|128;g[e++]=h&63|128;continue}else f--;}if(d)throw Error("Found an unpaired surrogate");h=65533;}g[e++]=h>>12|224;g[e++]=h>>6&63|128;}g[e++]=h&63|128;}}b=g.subarray(0,e);}S(a.g,8*c+2);S(a.g,b.length);T(a,a.g.end());T(a,b);}}),$b=Wb(function(a,b,c,d,e){if(2!==a.h)return !1;b=jb(b,c,d);c=a.g.i;d=Q(a.g)>>>0;var g=a.g.g+d,f=g-c;0>=f&&(a.g.i=g,e(b,a),f=g-a.g.g);if(f)throw Error("Message parsing ended unexpectedly. Expected to read "+(d+" bytes, instead read "+(d-f)+" bytes, either the data ended unexpectedly or the message misreported its own length"));
|
|
2675
|
-
a.g.g=g;a.g.i=c;return !0},function(a,b,c,d,e){b=ib(b,d,c);if(null!=b)for(d=0;d<b.length;d++){var g=a;S(g.g,8*c+2);var f=g.g.end();T(g,f);f.push(g.h);g=f;e(b[d],a);f=a;var h=g.pop();for(h=f.h+f.g.length()-h;127<h;)g.push(h&127|128),h>>>=7,f.h++;g.push(h);f.h++;}});function Z(){ub.apply(this,arguments);}E(Z,ub);if(fb){var ac={};Object.defineProperties(Z,(ac[Symbol.hasInstance]=gb(Object[Symbol.hasInstance]),ac));}function bc(a){Z.call(this,a);}E(bc,Z);function cc(){return [1,Yb,2,Y,3,Zb,4,Zb]}function dc(a){Z.call(this,a,-1,ec);}E(dc,Z);dc.prototype.addClassification=function(a,b){jb(this,1,bc,a,b);return this};function fc(){return [1,$b,bc,cc]}var ec=[1];function gc(a){Z.call(this,a);}E(gc,Z);function hc(){return [1,Y,2,Y,3,Y,4,Y,5,Y]}function ic(a){Z.call(this,a,-1,jc);}E(ic,Z);function kc(){return [1,$b,gc,hc]}var jc=[1];function lc(a){Z.call(this,a);}E(lc,Z);function mc(){return [1,Y,2,Y,3,Y,4,Y,5,Y,6,Xb]}var nc=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308]],oc=[[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,
|
|
2676
|
-
385],[385,384],[384,398],[398,362]],pc=[[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336]],qc=[[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133]],rc=[[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107]],sc=[[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],
|
|
2677
|
-
[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],tc=[].concat(D(nc),D(oc),D(pc),D(qc),D(rc),D(sc));function uc(a,b,c){c=a.createShader(0===c?a.VERTEX_SHADER:a.FRAGMENT_SHADER);a.shaderSource(c,b);a.compileShader(c);if(!a.getShaderParameter(c,a.COMPILE_STATUS))throw Error("Could not compile WebGL shader.\n\n"+a.getShaderInfoLog(c));return c}function vc(a){return ib(a,bc,1).map(function(b){return {index:kb(b,1),ga:X(b,2),label:null!=V(b,3)?lb(b,3):void 0,displayName:null!=V(b,4)?lb(b,4):void 0}})}function wc(a){return {x:X(a,1),y:X(a,2),z:X(a,3),visibility:null!=V(a,4)?X(a,4):void 0}}function xc(a,b){this.h=a;this.g=b;this.l=0;}
|
|
2678
|
-
function yc(a,b,c){zc(a,b);if("function"===typeof a.g.canvas.transferToImageBitmap)return Promise.resolve(a.g.canvas.transferToImageBitmap());if(c)return Promise.resolve(a.g.canvas);if("function"===typeof createImageBitmap)return createImageBitmap(a.g.canvas);void 0===a.i&&(a.i=document.createElement("canvas"));return new Promise(function(d){a.i.height=a.g.canvas.height;a.i.width=a.g.canvas.width;a.i.getContext("2d",{}).drawImage(a.g.canvas,0,0,a.g.canvas.width,a.g.canvas.height);d(a.i);})}
|
|
2679
|
-
function zc(a,b){var c=a.g;if(void 0===a.o){var d=uc(c,"\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }",0),e=uc(c,"\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D sampler0;\n void main(){\n gl_FragColor = texture2D(sampler0, vTex);\n }",1),g=c.createProgram();c.attachShader(g,d);c.attachShader(g,e);c.linkProgram(g);if(!c.getProgramParameter(g,c.LINK_STATUS))throw Error("Could not compile WebGL program.\n\n"+
|
|
2680
|
-
c.getProgramInfoLog(g));d=a.o=g;c.useProgram(d);e=c.getUniformLocation(d,"sampler0");a.j={K:c.getAttribLocation(d,"aVertex"),J:c.getAttribLocation(d,"aTex"),ma:e};a.u=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a.u);c.enableVertexAttribArray(a.j.K);c.vertexAttribPointer(a.j.K,2,c.FLOAT,!1,0,0);c.bufferData(c.ARRAY_BUFFER,new Float32Array([-1,-1,-1,1,1,1,1,-1]),c.STATIC_DRAW);c.bindBuffer(c.ARRAY_BUFFER,null);a.s=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,a.s);c.enableVertexAttribArray(a.j.J);c.vertexAttribPointer(a.j.J,
|
|
2681
|
-
2,c.FLOAT,!1,0,0);c.bufferData(c.ARRAY_BUFFER,new Float32Array([0,1,0,0,1,0,1,1]),c.STATIC_DRAW);c.bindBuffer(c.ARRAY_BUFFER,null);c.uniform1i(e,0);}d=a.j;c.useProgram(a.o);c.canvas.width=b.width;c.canvas.height=b.height;c.viewport(0,0,b.width,b.height);c.activeTexture(c.TEXTURE0);a.h.bindTexture2d(b.glName);c.enableVertexAttribArray(d.K);c.bindBuffer(c.ARRAY_BUFFER,a.u);c.vertexAttribPointer(d.K,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(d.J);c.bindBuffer(c.ARRAY_BUFFER,a.s);c.vertexAttribPointer(d.J,
|
|
2682
|
-
2,c.FLOAT,!1,0,0);c.bindFramebuffer(c.DRAW_FRAMEBUFFER?c.DRAW_FRAMEBUFFER:c.FRAMEBUFFER,null);c.clearColor(0,0,0,0);c.clear(c.COLOR_BUFFER_BIT);c.colorMask(!0,!0,!0,!0);c.drawArrays(c.TRIANGLE_FAN,0,4);c.disableVertexAttribArray(d.K);c.disableVertexAttribArray(d.J);c.bindBuffer(c.ARRAY_BUFFER,null);a.h.bindTexture2d(0);}function Ac(a){this.g=a;}var Bc=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);function Cc(a,b){return b+a}function Dc(a,b){window[a]=b;}function Ec(a){var b=document.createElement("script");b.setAttribute("src",a);b.setAttribute("crossorigin","anonymous");return new Promise(function(c){b.addEventListener("load",function(){c();},!1);b.addEventListener("error",function(){c();},!1);document.body.appendChild(b);})}
|
|
2683
|
-
function Fc(){return J(function(a){switch(a.g){case 1:return a.o=2,G(a,WebAssembly.instantiate(Bc),4);case 4:a.g=3;a.o=0;break;case 2:return a.o=0,a.j=null,a.return(!1);case 3:return a.return(!0)}})}
|
|
2684
|
-
function Gc(a){this.g=a;this.listeners={};this.j={};this.H={};this.o={};this.u={};this.I=this.s=this.Z=!0;this.D=Promise.resolve();this.Y="";this.C={};this.locateFile=a&&a.locateFile||Cc;if("object"===typeof window)var b=window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/";else if("undefined"!==typeof location)b=location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/";else throw Error("solutions can only be loaded on a web page or in a web worker");
|
|
2685
|
-
this.$=b;if(a.options){b=C(Object.keys(a.options));for(var c=b.next();!c.done;c=b.next()){c=c.value;var d=a.options[c].default;void 0!==d&&(this.j[c]="function"===typeof d?d():d);}}}x=Gc.prototype;x.close=function(){this.i&&this.i.delete();return Promise.resolve()};
|
|
2686
|
-
function Hc(a){var b,c,d,e,g,f,h,k,l,m,q;return J(function(p){switch(p.g){case 1:if(!a.Z)return p.return();b=void 0===a.g.files?[]:"function"===typeof a.g.files?a.g.files(a.j):a.g.files;return G(p,Fc(),2);case 2:c=p.h;if("object"===typeof window)return Dc("createMediapipeSolutionsWasm",{locateFile:a.locateFile}),Dc("createMediapipeSolutionsPackedAssets",{locateFile:a.locateFile}),f=b.filter(function(n){return void 0!==n.data}),h=b.filter(function(n){return void 0===n.data}),k=Promise.all(f.map(function(n){var r=
|
|
2687
|
-
Ic(a,n.url);if(void 0!==n.path){var t=n.path;r=r.then(function(w){a.overrideFile(t,w);return Promise.resolve(w)});}return r})),l=Promise.all(h.map(function(n){return void 0===n.simd||n.simd&&c||!n.simd&&!c?Ec(a.locateFile(n.url,a.$)):Promise.resolve()})).then(function(){var n,r,t;return J(function(w){if(1==w.g)return n=window.createMediapipeSolutionsWasm,r=window.createMediapipeSolutionsPackedAssets,t=a,G(w,n(r),2);t.h=w.h;w.g=0;})}),m=function(){return J(function(n){a.g.graph&&a.g.graph.url?n=G(n,
|
|
2688
|
-
Ic(a,a.g.graph.url),0):(n.g=0,n=void 0);return n})}(),G(p,Promise.all([l,k,m]),7);if("function"!==typeof importScripts)throw Error("solutions can only be loaded on a web page or in a web worker");d=b.filter(function(n){return void 0===n.simd||n.simd&&c||!n.simd&&!c}).map(function(n){return a.locateFile(n.url,a.$)});importScripts.apply(null,D(d));e=a;return G(p,createMediapipeSolutionsWasm(Module),6);case 6:e.h=p.h;a.l=new OffscreenCanvas(1,1);a.h.canvas=a.l;g=a.h.GL.createContext(a.l,{antialias:!1,
|
|
2689
|
-
alpha:!1,ja:"undefined"!==typeof WebGL2RenderingContext?2:1});a.h.GL.makeContextCurrent(g);p.g=4;break;case 7:a.l=document.createElement("canvas");q=a.l.getContext("webgl2",{});if(!q&&(q=a.l.getContext("webgl",{}),!q))return alert("Failed to create WebGL canvas context when passing video frame."),p.return();a.G=q;a.h.canvas=a.l;a.h.createContext(a.l,!0,!0,{});case 4:a.i=new a.h.SolutionWasm,a.Z=!1,p.g=0;}})}
|
|
2690
|
-
function Jc(a){var b,c,d,e,g,f,h,k;return J(function(l){if(1==l.g){if(a.g.graph&&a.g.graph.url&&a.Y===a.g.graph.url)return l.return();a.s=!0;if(!a.g.graph||!a.g.graph.url){l.g=2;return}a.Y=a.g.graph.url;return G(l,Ic(a,a.g.graph.url),3)}2!=l.g&&(b=l.h,a.i.loadGraph(b));c=C(Object.keys(a.C));for(d=c.next();!d.done;d=c.next())e=d.value,a.i.overrideFile(e,a.C[e]);a.C={};if(a.g.listeners)for(g=C(a.g.listeners),f=g.next();!f.done;f=g.next())h=f.value,Kc(a,h);k=a.j;a.j={};a.setOptions(k);l.g=0;})}
|
|
2691
|
-
x.reset=function(){var a=this;return J(function(b){a.i&&(a.i.reset(),a.o={},a.u={});b.g=0;})};
|
|
2692
|
-
x.setOptions=function(a,b){var c=this;if(b=b||this.g.options){for(var d=[],e=[],g={},f=C(Object.keys(a)),h=f.next();!h.done;g={R:g.R,S:g.S},h=f.next()){var k=h.value;k in this.j&&this.j[k]===a[k]||(this.j[k]=a[k],h=b[k],void 0!==h&&(h.onChange&&(g.R=h.onChange,g.S=a[k],d.push(function(l){return function(){var m;return J(function(q){if(1==q.g)return G(q,l.R(l.S),2);m=q.h;!0===m&&(c.s=!0);q.g=0;})}}(g))),h.graphOptionXref&&(k={valueNumber:1===h.type?a[k]:0,valueBoolean:0===h.type?a[k]:!1,valueString:2===
|
|
2693
|
-
h.type?a[k]:""},h=Object.assign(Object.assign(Object.assign({},{calculatorName:"",calculatorIndex:0}),h.graphOptionXref),k),e.push(h))));}if(0!==d.length||0!==e.length)this.s=!0,this.B=(void 0===this.B?[]:this.B).concat(e),this.A=(void 0===this.A?[]:this.A).concat(d);}};
|
|
2694
|
-
function Lc(a){var b,c,d,e,g,f,h;return J(function(k){switch(k.g){case 1:if(!a.s)return k.return();if(!a.A){k.g=2;break}b=C(a.A);c=b.next();case 3:if(c.done){k.g=5;break}d=c.value;return G(k,d(),4);case 4:c=b.next();k.g=3;break;case 5:a.A=void 0;case 2:if(a.B){e=new a.h.GraphOptionChangeRequestList;g=C(a.B);for(f=g.next();!f.done;f=g.next())h=f.value,e.push_back(h);a.i.changeOptions(e);e.delete();a.B=void 0;}a.s=!1;k.g=0;}})}
|
|
2695
|
-
x.initialize=function(){var a=this;return J(function(b){return 1==b.g?G(b,Hc(a),2):3!=b.g?G(b,Jc(a),3):G(b,Lc(a),0)})};function Ic(a,b){var c,d;return J(function(e){if(b in a.H)return e.return(a.H[b]);c=a.locateFile(b,"");d=fetch(c).then(function(g){return g.arrayBuffer()});a.H[b]=d;return e.return(d)})}x.overrideFile=function(a,b){this.i?this.i.overrideFile(a,b):this.C[a]=b;};x.clearOverriddenFiles=function(){this.C={};this.i&&this.i.clearOverriddenFiles();};
|
|
2696
|
-
x.send=function(a,b){var c=this,d,e,g,f,h,k,l,m,q;return J(function(p){switch(p.g){case 1:if(!c.g.inputs)return p.return();d=1E3*(void 0===b||null===b?performance.now():b);return G(p,c.D,2);case 2:return G(p,c.initialize(),3);case 3:e=new c.h.PacketDataList;g=C(Object.keys(a));for(f=g.next();!f.done;f=g.next())if(h=f.value,k=c.g.inputs[h]){a:{var n=a[h];switch(k.type){case "video":var r=c.o[k.stream];r||(r=new xc(c.h,c.G),c.o[k.stream]=r);0===r.l&&(r.l=r.h.createTexture());if("undefined"!==typeof HTMLVideoElement&&
|
|
2697
|
-
n instanceof HTMLVideoElement){var t=n.videoWidth;var w=n.videoHeight;}else "undefined"!==typeof HTMLImageElement&&n instanceof HTMLImageElement?(t=n.naturalWidth,w=n.naturalHeight):(t=n.width,w=n.height);w={glName:r.l,width:t,height:w};t=r.g;t.canvas.width=w.width;t.canvas.height=w.height;t.activeTexture(t.TEXTURE0);r.h.bindTexture2d(r.l);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n);r.h.bindTexture2d(0);r=w;break a;case "detections":r=c.o[k.stream];r||(r=new Ac(c.h),c.o[k.stream]=r);
|
|
2698
|
-
r.data||(r.data=new r.g.DetectionListData);r.data.reset(n.length);for(w=0;w<n.length;++w){t=n[w];var v=r.data,A=v.setBoundingBox,I=w;var F=t.boundingBox;var u=new lc;W(u,1,F.xCenter);W(u,2,F.yCenter);W(u,3,F.height);W(u,4,F.width);W(u,5,F.rotation);W(u,6,F.rectId);F=Vb(u,mc);A.call(v,I,F);if(t.landmarks)for(v=0;v<t.landmarks.length;++v){u=t.landmarks[v];var z=u.visibility?!0:!1;A=r.data;I=A.addNormalizedLandmark;F=w;u=Object.assign(Object.assign({},u),{visibility:z?u.visibility:0});z=new gc;W(z,1,
|
|
2699
|
-
u.x);W(z,2,u.y);W(z,3,u.z);u.visibility&&W(z,4,u.visibility);u=Vb(z,hc);I.call(A,F,u);}if(t.V)for(v=0;v<t.V.length;++v)A=r.data,I=A.addClassification,F=w,u=t.V[v],z=new bc,W(z,2,u.ga),u.index&&W(z,1,u.index),u.label&&W(z,3,u.label),u.displayName&&W(z,4,u.displayName),u=Vb(z,cc),I.call(A,F,u);}r=r.data;break a;default:r={};}}l=r;m=k.stream;switch(k.type){case "video":e.pushTexture2d(Object.assign(Object.assign({},l),{stream:m,timestamp:d}));break;case "detections":q=l;q.stream=m;q.timestamp=d;e.pushDetectionList(q);
|
|
2700
|
-
break;default:throw Error("Unknown input config type: '"+k.type+"'");}}c.i.send(e);return G(p,c.D,4);case 4:e.delete(),p.g=0;}})};
|
|
2701
|
-
function Mc(a,b,c){var d,e,g,f,h,k,l,m,q,p,n,r,t,w;return J(function(v){switch(v.g){case 1:if(!c)return v.return(b);d={};e=0;g=C(Object.keys(c));for(f=g.next();!f.done;f=g.next())h=f.value,k=c[h],"string"!==typeof k&&"texture"===k.type&&void 0!==b[k.stream]&&++e;1<e&&(a.I=!1);l=C(Object.keys(c));f=l.next();case 2:if(f.done){v.g=4;break}m=f.value;q=c[m];if("string"===typeof q)return t=d,w=m,G(v,Nc(a,m,b[q]),14);p=b[q.stream];if("detection_list"===q.type){if(p){var A=p.getRectList();for(var I=p.getLandmarksList(),
|
|
2702
|
-
F=p.getClassificationsList(),u=[],z=0;z<A.size();++z){var R=Ub(A.get(z),lc,mc);R={boundingBox:{xCenter:X(R,1),yCenter:X(R,2),height:X(R,3),width:X(R,4),rotation:X(R,5,0),rectId:kb(R,6)},landmarks:ib(Ub(I.get(z),ic,kc),gc,1).map(wc),V:vc(Ub(F.get(z),dc,fc))};u.push(R);}A=u;}else A=[];d[m]=A;v.g=7;break}if("proto_list"===q.type){if(p){A=Array(p.size());for(I=0;I<p.size();I++)A[I]=p.get(I);p.delete();}else A=[];d[m]=A;v.g=7;break}if(void 0===p){v.g=3;break}if("float_list"===q.type){d[m]=p;v.g=7;break}if("proto"===
|
|
2703
|
-
q.type){d[m]=p;v.g=7;break}if("texture"!==q.type)throw Error("Unknown output config type: '"+q.type+"'");n=a.u[m];n||(n=new xc(a.h,a.G),a.u[m]=n);return G(v,yc(n,p,a.I),13);case 13:r=v.h,d[m]=r;case 7:q.transform&&d[m]&&(d[m]=q.transform(d[m]));v.g=3;break;case 14:t[w]=v.h;case 3:f=l.next();v.g=2;break;case 4:return v.return(d)}})}
|
|
2704
|
-
function Nc(a,b,c){var d;return J(function(e){return "number"===typeof c||c instanceof Uint8Array||c instanceof a.h.Uint8BlobList?e.return(c):c instanceof a.h.Texture2dDataOut?(d=a.u[b],d||(d=new xc(a.h,a.G),a.u[b]=d),e.return(yc(d,c,a.I))):e.return(void 0)})}
|
|
2705
|
-
function Kc(a,b){for(var c=b.name||"$",d=[].concat(D(b.wants)),e=new a.h.StringList,g=C(b.wants),f=g.next();!f.done;f=g.next())e.push_back(f.value);g=a.h.PacketListener.implement({onResults:function(h){for(var k={},l=0;l<b.wants.length;++l)k[d[l]]=h.get(l);var m=a.listeners[c];m&&(a.D=Mc(a,k,b.outs).then(function(q){q=m(q);for(var p=0;p<b.wants.length;++p){var n=k[d[p]];"object"===typeof n&&n.hasOwnProperty&&n.hasOwnProperty("delete")&&n.delete();}q&&(a.D=q);}));}});a.i.attachMultiListener(e,g);e.delete();}
|
|
2706
|
-
x.onResults=function(a,b){this.listeners[b||"$"]=a;};K("Solution",Gc);K("OptionType",{BOOL:0,NUMBER:1,ia:2,0:"BOOL",1:"NUMBER",2:"STRING"});function Oc(a){var b=this;a=a||{};var c={url:"face_detection_short.binarypb"},d={type:1,graphOptionXref:{calculatorType:"TensorsToDetectionsCalculator",calculatorName:"facedetectionshortrangegpu__facedetectionshortrangecommon__TensorsToDetectionsCalculator",fieldName:"min_score_thresh"}};this.g=new Gc({locateFile:a.locateFile,files:[{data:!0,url:"face_detection_short.binarypb"},{data:!0,url:"face_detection_short_range.tflite"},{simd:!0,url:"face_detection_solution_simd_wasm_bin.js"},{simd:!1,url:"face_detection_solution_wasm_bin.js"}],
|
|
2707
|
-
graph:c,listeners:[{wants:["detections","image_transformed"],outs:{image:"image_transformed",detections:{type:"detection_list",stream:"detections"}}}],inputs:{image:{type:"video",stream:"input_frames_gpu"}},options:{useCpuInference:{type:0,graphOptionXref:{calculatorType:"InferenceCalculator",fieldName:"use_cpu_inference"},default:"object"!==typeof window||void 0===window.navigator?!1:"iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform)||navigator.userAgent.includes("Mac")&&
|
|
2708
|
-
"ontouchend"in document},selfieMode:{type:0,graphOptionXref:{calculatorType:"GlScalerCalculator",calculatorIndex:1,fieldName:"flip_horizontal"}},model:{type:0,onChange:function(e){var g,f,h,k,l,m;return J(function(q){switch(q.g){case 1:g="short"===e?["face_detection_short_range.tflite"]:["face_detection_full_range_sparse.tflite"],f=C(g),h=f.next();case 2:if(h.done){q.g=4;break}k=h.value;l="third_party/mediapipe/modules/face_detection/"+k;return G(q,Ic(b.g,k),5);case 5:m=q.h;b.g.overrideFile(l,m);
|
|
2709
|
-
h=f.next();q.g=2;break;case 4:return c.url="short"===e?"face_detection_short.binarypb":"face_detection_full.binarypb",d.graphOptionXref.calculatorName="short"===e?"facedetectionshortrangegpu__facedetectionshortrangecommon__TensorsToDetectionsCalculator":"facedetectionfullrangegpu__facedetectionfullrangecommon__TensorsToDetectionsCalculator",q.return(!0)}})}},minDetectionConfidence:d}});}x=Oc.prototype;x.close=function(){this.g.close();return Promise.resolve()};x.onResults=function(a){this.g.onResults(a);};
|
|
2710
|
-
x.initialize=function(){var a=this;return J(function(b){return G(b,a.g.initialize(),0)})};x.reset=function(){this.g.reset();};x.send=function(a){var b=this;return J(function(c){return G(c,b.g.send(a),0)})};x.setOptions=function(a){this.g.setOptions(a);};K("FaceDetection",Oc);K("FACEDETECTION_LIPS",nc);K("FACEDETECTION_LEFT_EYE",oc);K("FACEDETECTION_LEFT_EYEBROW",pc);K("FACEDETECTION_RIGHT_EYE",qc);K("FACEDETECTION_RIGHT_EYEBROW",rc);K("FACEDETECTION_FACE_OVAL",sc);K("FACEDETECTION_CONTOURS",tc);
|
|
2711
|
-
K("FACEDETECTION_TESSELATION",[[127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],
|
|
2712
|
-
[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],
|
|
2713
|
-
[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],
|
|
2714
|
-
[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],
|
|
2715
|
-
[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],
|
|
2716
|
-
[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,
|
|
2717
|
-
172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],
|
|
2718
|
-
[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,
|
|
2719
|
-
82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,
|
|
2720
|
-
83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],
|
|
2721
|
-
[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,
|
|
2722
|
-
233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],
|
|
2723
|
-
[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],
|
|
2724
|
-
[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,
|
|
2725
|
-
419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],
|
|
2726
|
-
[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],
|
|
2727
|
-
[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,
|
|
2728
|
-
369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],
|
|
2729
|
-
[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],
|
|
2730
|
-
[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,
|
|
2731
|
-
426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,
|
|
2732
|
-
262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],
|
|
2733
|
-
[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,
|
|
2734
|
-
444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],
|
|
2735
|
-
[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],
|
|
2736
|
-
[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,
|
|
2737
|
-
30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],
|
|
2738
|
-
[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,
|
|
2739
|
-
146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,
|
|
2740
|
-
28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,
|
|
2741
|
-
168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],
|
|
2742
|
-
[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],
|
|
2743
|
-
[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,
|
|
2744
|
-
36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],
|
|
2745
|
-
[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,
|
|
2746
|
-
232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,
|
|
2747
|
-
174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],
|
|
2748
|
-
[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],
|
|
2749
|
-
[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],
|
|
2750
|
-
[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,
|
|
2751
|
-
352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],
|
|
2752
|
-
[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,
|
|
2753
|
-
329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,
|
|
2754
|
-
396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],
|
|
2755
|
-
[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],
|
|
2756
|
-
[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,
|
|
2757
|
-
287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],
|
|
2758
|
-
[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,
|
|
2759
|
-
343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]]);K("VERSION","0.4.1646425229");}).call(commonjsGlobal);
|
|
2803
|
+
(function () {
|
|
2760
2804
|
|
|
2761
|
-
var
|
|
2762
|
-
|
|
2763
|
-
var
|
|
2764
|
-
function
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2805
|
+
var x;
|
|
2806
|
+
function aa(a) {
|
|
2807
|
+
var b = 0;
|
|
2808
|
+
return function () {
|
|
2809
|
+
return b < a.length ? {
|
|
2810
|
+
done: !1,
|
|
2811
|
+
value: a[b++]
|
|
2812
|
+
} : {
|
|
2813
|
+
done: !0
|
|
2814
|
+
};
|
|
2815
|
+
};
|
|
2816
|
+
}
|
|
2817
|
+
var ba = "function" == typeof Object.defineProperties ? Object.defineProperty : function (a, b, c) {
|
|
2818
|
+
if (a == Array.prototype || a == Object.prototype) return a;
|
|
2819
|
+
a[b] = c.value;
|
|
2820
|
+
return a;
|
|
2821
|
+
};
|
|
2822
|
+
function ca(a) {
|
|
2823
|
+
a = ["object" == typeof globalThis && globalThis, a, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof commonjsGlobal && commonjsGlobal];
|
|
2824
|
+
for (var b = 0; b < a.length; ++b) {
|
|
2825
|
+
var c = a[b];
|
|
2826
|
+
if (c && c.Math == Math) return c;
|
|
2827
|
+
}
|
|
2828
|
+
throw Error("Cannot find global object");
|
|
2829
|
+
}
|
|
2830
|
+
var y = ca(this);
|
|
2831
|
+
function B(a, b) {
|
|
2832
|
+
if (b) a: {
|
|
2833
|
+
var c = y;
|
|
2834
|
+
a = a.split(".");
|
|
2835
|
+
for (var d = 0; d < a.length - 1; d++) {
|
|
2836
|
+
var e = a[d];
|
|
2837
|
+
if (!(e in c)) break a;
|
|
2838
|
+
c = c[e];
|
|
2790
2839
|
}
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
var _c = useState(false),
|
|
2800
|
-
ready = _c[0],
|
|
2801
|
-
setReady = _c[1];
|
|
2802
|
-
var _d = useState(0),
|
|
2803
|
-
modelDownloadProgress = _d[0],
|
|
2804
|
-
setModelDownloadProgress = _d[1];
|
|
2805
|
-
var _e = useState(null),
|
|
2806
|
-
modelError = _e[0],
|
|
2807
|
-
setModelError = _e[1];
|
|
2808
|
-
var videoRef = useContext(CameraStateContext).videoRef;
|
|
2809
|
-
useEffect(function loadModel() {
|
|
2810
|
-
var _this = this;
|
|
2811
|
-
setReady(false);
|
|
2812
|
-
var modelLoadTimeout = setTimeout(function () {
|
|
2813
|
-
setModelError(new Error('Model loading time limit exceeded.'));
|
|
2814
|
-
}, modelLoadTimeoutMs);
|
|
2815
|
-
function handleDownloadProgress(event) {
|
|
2816
|
-
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
2840
|
+
a = a[a.length - 1];
|
|
2841
|
+
d = c[a];
|
|
2842
|
+
b = b(d);
|
|
2843
|
+
b != d && null != b && ba(c, a, {
|
|
2844
|
+
configurable: !0,
|
|
2845
|
+
writable: !0,
|
|
2846
|
+
value: b
|
|
2847
|
+
});
|
|
2817
2848
|
}
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
model.detectForVideo(videoRef.current, performance.now());
|
|
2831
|
-
setReady(true);
|
|
2832
|
-
return [2 /*return*/];
|
|
2833
|
-
}
|
|
2834
|
-
});
|
|
2849
|
+
}
|
|
2850
|
+
B("Symbol", function (a) {
|
|
2851
|
+
function b(g) {
|
|
2852
|
+
if (this instanceof b) throw new TypeError("Symbol is not a constructor");
|
|
2853
|
+
return new c(d + (g || "") + "_" + e++, g);
|
|
2854
|
+
}
|
|
2855
|
+
function c(g, f) {
|
|
2856
|
+
this.g = g;
|
|
2857
|
+
ba(this, "description", {
|
|
2858
|
+
configurable: !0,
|
|
2859
|
+
writable: !0,
|
|
2860
|
+
value: f
|
|
2835
2861
|
});
|
|
2836
|
-
}
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
});
|
|
2841
|
-
return function () {
|
|
2842
|
-
clearTimeout(modelLoadTimeout);
|
|
2843
|
-
document.removeEventListener('idmission.preloadProgress.faceDetection', handleDownloadProgress);
|
|
2862
|
+
}
|
|
2863
|
+
if (a) return a;
|
|
2864
|
+
c.prototype.toString = function () {
|
|
2865
|
+
return this.g;
|
|
2844
2866
|
};
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
}
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2867
|
+
var d = "jscomp_symbol_" + (1E9 * Math.random() >>> 0) + "_",
|
|
2868
|
+
e = 0;
|
|
2869
|
+
return b;
|
|
2870
|
+
});
|
|
2871
|
+
B("Symbol.iterator", function (a) {
|
|
2872
|
+
if (a) return a;
|
|
2873
|
+
a = Symbol("Symbol.iterator");
|
|
2874
|
+
for (var b = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), c = 0; c < b.length; c++) {
|
|
2875
|
+
var d = y[b[c]];
|
|
2876
|
+
"function" === typeof d && "function" != typeof d.prototype[a] && ba(d.prototype, a, {
|
|
2877
|
+
configurable: !0,
|
|
2878
|
+
writable: !0,
|
|
2879
|
+
value: function value() {
|
|
2880
|
+
return da(aa(this));
|
|
2881
|
+
}
|
|
2882
|
+
});
|
|
2883
|
+
}
|
|
2884
|
+
return a;
|
|
2885
|
+
});
|
|
2886
|
+
function da(a) {
|
|
2887
|
+
a = {
|
|
2888
|
+
next: a
|
|
2889
|
+
};
|
|
2890
|
+
a[Symbol.iterator] = function () {
|
|
2891
|
+
return this;
|
|
2892
|
+
};
|
|
2893
|
+
return a;
|
|
2894
|
+
}
|
|
2895
|
+
function C(a) {
|
|
2896
|
+
var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator];
|
|
2897
|
+
return b ? b.call(a) : {
|
|
2898
|
+
next: aa(a)
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
function D(a) {
|
|
2902
|
+
if (!(a instanceof Array)) {
|
|
2903
|
+
a = C(a);
|
|
2904
|
+
for (var b, c = []; !(b = a.next()).done;) c.push(b.value);
|
|
2905
|
+
a = c;
|
|
2906
|
+
}
|
|
2907
|
+
return a;
|
|
2908
|
+
}
|
|
2909
|
+
var ea = "function" == typeof Object.create ? Object.create : function (a) {
|
|
2910
|
+
function b() {}
|
|
2911
|
+
b.prototype = a;
|
|
2912
|
+
return new b();
|
|
2913
|
+
},
|
|
2914
|
+
fa;
|
|
2915
|
+
if ("function" == typeof Object.setPrototypeOf) fa = Object.setPrototypeOf;else {
|
|
2916
|
+
var ha;
|
|
2917
|
+
a: {
|
|
2918
|
+
var ia = {
|
|
2919
|
+
a: !0
|
|
2920
|
+
},
|
|
2921
|
+
ja = {};
|
|
2922
|
+
try {
|
|
2923
|
+
ja.__proto__ = ia;
|
|
2924
|
+
ha = ja.a;
|
|
2925
|
+
break a;
|
|
2926
|
+
} catch (a) {}
|
|
2927
|
+
ha = !1;
|
|
2928
|
+
}
|
|
2929
|
+
fa = ha ? function (a, b) {
|
|
2930
|
+
a.__proto__ = b;
|
|
2931
|
+
if (a.__proto__ !== b) throw new TypeError(a + " is not extensible");
|
|
2932
|
+
return a;
|
|
2933
|
+
} : null;
|
|
2934
|
+
}
|
|
2935
|
+
var ka = fa;
|
|
2936
|
+
function E(a, b) {
|
|
2937
|
+
a.prototype = ea(b.prototype);
|
|
2938
|
+
a.prototype.constructor = a;
|
|
2939
|
+
if (ka) ka(a, b);else for (var c in b) if ("prototype" != c) if (Object.defineProperties) {
|
|
2940
|
+
var d = Object.getOwnPropertyDescriptor(b, c);
|
|
2941
|
+
d && Object.defineProperty(a, c, d);
|
|
2942
|
+
} else a[c] = b[c];
|
|
2943
|
+
a.na = b.prototype;
|
|
2944
|
+
}
|
|
2945
|
+
function la() {
|
|
2946
|
+
this.l = !1;
|
|
2947
|
+
this.i = null;
|
|
2948
|
+
this.h = void 0;
|
|
2949
|
+
this.g = 1;
|
|
2950
|
+
this.u = this.o = 0;
|
|
2951
|
+
this.j = null;
|
|
2952
|
+
}
|
|
2953
|
+
function ma(a) {
|
|
2954
|
+
if (a.l) throw new TypeError("Generator is already running");
|
|
2955
|
+
a.l = !0;
|
|
2956
|
+
}
|
|
2957
|
+
la.prototype.s = function (a) {
|
|
2958
|
+
this.h = a;
|
|
2854
2959
|
};
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2960
|
+
function na(a, b) {
|
|
2961
|
+
a.j = {
|
|
2962
|
+
da: b,
|
|
2963
|
+
ea: !0
|
|
2964
|
+
};
|
|
2965
|
+
a.g = a.o || a.u;
|
|
2966
|
+
}
|
|
2967
|
+
la.prototype["return"] = function (a) {
|
|
2968
|
+
this.j = {
|
|
2969
|
+
"return": a
|
|
2970
|
+
};
|
|
2971
|
+
this.g = this.u;
|
|
2972
|
+
};
|
|
2973
|
+
function G(a, b, c) {
|
|
2974
|
+
a.g = c;
|
|
2859
2975
|
return {
|
|
2860
|
-
|
|
2861
|
-
keypoints: d.keypoints.map(function (k) {
|
|
2862
|
-
var _a;
|
|
2863
|
-
return __assign(__assign({}, k), {
|
|
2864
|
-
x: k.x * imageData.width,
|
|
2865
|
-
y: k.y * imageData.height,
|
|
2866
|
-
name: (_a = k.label) !== null && _a !== void 0 ? _a : ''
|
|
2867
|
-
});
|
|
2868
|
-
})
|
|
2976
|
+
value: b
|
|
2869
2977
|
};
|
|
2870
|
-
}
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
}
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
return
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2978
|
+
}
|
|
2979
|
+
function oa(a) {
|
|
2980
|
+
this.g = new la();
|
|
2981
|
+
this.h = a;
|
|
2982
|
+
}
|
|
2983
|
+
function pa(a, b) {
|
|
2984
|
+
ma(a.g);
|
|
2985
|
+
var c = a.g.i;
|
|
2986
|
+
if (c) return qa(a, "return" in c ? c["return"] : function (d) {
|
|
2987
|
+
return {
|
|
2988
|
+
value: d,
|
|
2989
|
+
done: !0
|
|
2990
|
+
};
|
|
2991
|
+
}, b, a.g["return"]);
|
|
2992
|
+
a.g["return"](b);
|
|
2993
|
+
return H(a);
|
|
2994
|
+
}
|
|
2995
|
+
function qa(a, b, c, d) {
|
|
2996
|
+
try {
|
|
2997
|
+
var e = b.call(a.g.i, c);
|
|
2998
|
+
if (!(e instanceof Object)) throw new TypeError("Iterator result " + e + " is not an object");
|
|
2999
|
+
if (!e.done) return a.g.l = !1, e;
|
|
3000
|
+
var g = e.value;
|
|
3001
|
+
} catch (f) {
|
|
3002
|
+
return a.g.i = null, na(a.g, f), H(a);
|
|
3003
|
+
}
|
|
3004
|
+
a.g.i = null;
|
|
3005
|
+
d.call(a.g, g);
|
|
3006
|
+
return H(a);
|
|
3007
|
+
}
|
|
3008
|
+
function H(a) {
|
|
3009
|
+
for (; a.g.g;) try {
|
|
3010
|
+
var b = a.h(a.g);
|
|
3011
|
+
if (b) return a.g.l = !1, {
|
|
3012
|
+
value: b.value,
|
|
3013
|
+
done: !1
|
|
3014
|
+
};
|
|
3015
|
+
} catch (c) {
|
|
3016
|
+
a.g.h = void 0, na(a.g, c);
|
|
3017
|
+
}
|
|
3018
|
+
a.g.l = !1;
|
|
3019
|
+
if (a.g.j) {
|
|
3020
|
+
b = a.g.j;
|
|
3021
|
+
a.g.j = null;
|
|
3022
|
+
if (b.ea) throw b.da;
|
|
3023
|
+
return {
|
|
3024
|
+
value: b["return"],
|
|
3025
|
+
done: !0
|
|
3026
|
+
};
|
|
3027
|
+
}
|
|
3028
|
+
return {
|
|
3029
|
+
value: void 0,
|
|
3030
|
+
done: !0
|
|
3031
|
+
};
|
|
3032
|
+
}
|
|
3033
|
+
function ra(a) {
|
|
3034
|
+
this.next = function (b) {
|
|
3035
|
+
ma(a.g);
|
|
3036
|
+
a.g.i ? b = qa(a, a.g.i.next, b, a.g.s) : (a.g.s(b), b = H(a));
|
|
3037
|
+
return b;
|
|
3038
|
+
};
|
|
3039
|
+
this["throw"] = function (b) {
|
|
3040
|
+
ma(a.g);
|
|
3041
|
+
a.g.i ? b = qa(a, a.g.i["throw"], b, a.g.s) : (na(a.g, b), b = H(a));
|
|
3042
|
+
return b;
|
|
3043
|
+
};
|
|
3044
|
+
this["return"] = function (b) {
|
|
3045
|
+
return pa(a, b);
|
|
3046
|
+
};
|
|
3047
|
+
this[Symbol.iterator] = function () {
|
|
3048
|
+
return this;
|
|
3049
|
+
};
|
|
3050
|
+
}
|
|
3051
|
+
function sa(a) {
|
|
3052
|
+
function b(d) {
|
|
3053
|
+
return a.next(d);
|
|
3054
|
+
}
|
|
3055
|
+
function c(d) {
|
|
3056
|
+
return a["throw"](d);
|
|
3057
|
+
}
|
|
3058
|
+
return new Promise(function (d, e) {
|
|
3059
|
+
function g(f) {
|
|
3060
|
+
f.done ? d(f.value) : Promise.resolve(f.value).then(b, c).then(g, e);
|
|
2905
3061
|
}
|
|
3062
|
+
g(a.next());
|
|
2906
3063
|
});
|
|
2907
|
-
}
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
3064
|
+
}
|
|
3065
|
+
function J(a) {
|
|
3066
|
+
return sa(new ra(new oa(a)));
|
|
3067
|
+
}
|
|
3068
|
+
B("Promise", function (a) {
|
|
3069
|
+
function b(f) {
|
|
3070
|
+
this.h = 0;
|
|
3071
|
+
this.i = void 0;
|
|
3072
|
+
this.g = [];
|
|
3073
|
+
this.s = !1;
|
|
3074
|
+
var h = this.j();
|
|
3075
|
+
try {
|
|
3076
|
+
f(h.resolve, h.reject);
|
|
3077
|
+
} catch (k) {
|
|
3078
|
+
h.reject(k);
|
|
3079
|
+
}
|
|
3080
|
+
}
|
|
3081
|
+
function c() {
|
|
3082
|
+
this.g = null;
|
|
3083
|
+
}
|
|
3084
|
+
function d(f) {
|
|
3085
|
+
return f instanceof b ? f : new b(function (h) {
|
|
3086
|
+
h(f);
|
|
3087
|
+
});
|
|
3088
|
+
}
|
|
3089
|
+
if (a) return a;
|
|
3090
|
+
c.prototype.h = function (f) {
|
|
3091
|
+
if (null == this.g) {
|
|
3092
|
+
this.g = [];
|
|
3093
|
+
var h = this;
|
|
3094
|
+
this.i(function () {
|
|
3095
|
+
h.l();
|
|
3096
|
+
});
|
|
3097
|
+
}
|
|
3098
|
+
this.g.push(f);
|
|
3099
|
+
};
|
|
3100
|
+
var e = y.setTimeout;
|
|
3101
|
+
c.prototype.i = function (f) {
|
|
3102
|
+
e(f, 0);
|
|
3103
|
+
};
|
|
3104
|
+
c.prototype.l = function () {
|
|
3105
|
+
for (; this.g && this.g.length;) {
|
|
3106
|
+
var f = this.g;
|
|
3107
|
+
this.g = [];
|
|
3108
|
+
for (var h = 0; h < f.length; ++h) {
|
|
3109
|
+
var k = f[h];
|
|
3110
|
+
f[h] = null;
|
|
3111
|
+
try {
|
|
3112
|
+
k();
|
|
3113
|
+
} catch (l) {
|
|
3114
|
+
this.j(l);
|
|
3115
|
+
}
|
|
3116
|
+
}
|
|
3117
|
+
}
|
|
3118
|
+
this.g = null;
|
|
3119
|
+
};
|
|
3120
|
+
c.prototype.j = function (f) {
|
|
3121
|
+
this.i(function () {
|
|
3122
|
+
throw f;
|
|
3123
|
+
});
|
|
3124
|
+
};
|
|
3125
|
+
b.prototype.j = function () {
|
|
3126
|
+
function f(l) {
|
|
3127
|
+
return function (m) {
|
|
3128
|
+
k || (k = !0, l.call(h, m));
|
|
3129
|
+
};
|
|
3130
|
+
}
|
|
3131
|
+
var h = this,
|
|
3132
|
+
k = !1;
|
|
3133
|
+
return {
|
|
3134
|
+
resolve: f(this.D),
|
|
3135
|
+
reject: f(this.l)
|
|
3136
|
+
};
|
|
3137
|
+
};
|
|
3138
|
+
b.prototype.D = function (f) {
|
|
3139
|
+
if (f === this) this.l(new TypeError("A Promise cannot resolve to itself"));else if (f instanceof b) this.H(f);else {
|
|
3140
|
+
a: switch (typeof f) {
|
|
3141
|
+
case "object":
|
|
3142
|
+
var h = null != f;
|
|
3143
|
+
break a;
|
|
3144
|
+
case "function":
|
|
3145
|
+
h = !0;
|
|
3146
|
+
break a;
|
|
3147
|
+
default:
|
|
3148
|
+
h = !1;
|
|
3149
|
+
}
|
|
3150
|
+
h ? this.A(f) : this.o(f);
|
|
3151
|
+
}
|
|
3152
|
+
};
|
|
3153
|
+
b.prototype.A = function (f) {
|
|
3154
|
+
var h = void 0;
|
|
3155
|
+
try {
|
|
3156
|
+
h = f.then;
|
|
3157
|
+
} catch (k) {
|
|
3158
|
+
this.l(k);
|
|
3159
|
+
return;
|
|
3160
|
+
}
|
|
3161
|
+
"function" == typeof h ? this.I(h, f) : this.o(f);
|
|
3162
|
+
};
|
|
3163
|
+
b.prototype.l = function (f) {
|
|
3164
|
+
this.u(2, f);
|
|
3165
|
+
};
|
|
3166
|
+
b.prototype.o = function (f) {
|
|
3167
|
+
this.u(1, f);
|
|
3168
|
+
};
|
|
3169
|
+
b.prototype.u = function (f, h) {
|
|
3170
|
+
if (0 != this.h) throw Error("Cannot settle(" + f + ", " + h + "): Promise already settled in state" + this.h);
|
|
3171
|
+
this.h = f;
|
|
3172
|
+
this.i = h;
|
|
3173
|
+
2 === this.h && this.G();
|
|
3174
|
+
this.B();
|
|
3175
|
+
};
|
|
3176
|
+
b.prototype.G = function () {
|
|
3177
|
+
var f = this;
|
|
3178
|
+
e(function () {
|
|
3179
|
+
if (f.C()) {
|
|
3180
|
+
var h = y.console;
|
|
3181
|
+
"undefined" !== typeof h && h.error(f.i);
|
|
3182
|
+
}
|
|
3183
|
+
}, 1);
|
|
3184
|
+
};
|
|
3185
|
+
b.prototype.C = function () {
|
|
3186
|
+
if (this.s) return !1;
|
|
3187
|
+
var f = y.CustomEvent,
|
|
3188
|
+
h = y.Event,
|
|
3189
|
+
k = y.dispatchEvent;
|
|
3190
|
+
if ("undefined" === typeof k) return !0;
|
|
3191
|
+
"function" === typeof f ? f = new f("unhandledrejection", {
|
|
3192
|
+
cancelable: !0
|
|
3193
|
+
}) : "function" === typeof h ? f = new h("unhandledrejection", {
|
|
3194
|
+
cancelable: !0
|
|
3195
|
+
}) : (f = y.document.createEvent("CustomEvent"), f.initCustomEvent("unhandledrejection", !1, !0, f));
|
|
3196
|
+
f.promise = this;
|
|
3197
|
+
f.reason = this.i;
|
|
3198
|
+
return k(f);
|
|
3199
|
+
};
|
|
3200
|
+
b.prototype.B = function () {
|
|
3201
|
+
if (null != this.g) {
|
|
3202
|
+
for (var f = 0; f < this.g.length; ++f) g.h(this.g[f]);
|
|
3203
|
+
this.g = null;
|
|
3204
|
+
}
|
|
3205
|
+
};
|
|
3206
|
+
var g = new c();
|
|
3207
|
+
b.prototype.H = function (f) {
|
|
3208
|
+
var h = this.j();
|
|
3209
|
+
f.M(h.resolve, h.reject);
|
|
3210
|
+
};
|
|
3211
|
+
b.prototype.I = function (f, h) {
|
|
3212
|
+
var k = this.j();
|
|
3213
|
+
try {
|
|
3214
|
+
f.call(h, k.resolve, k.reject);
|
|
3215
|
+
} catch (l) {
|
|
3216
|
+
k.reject(l);
|
|
3217
|
+
}
|
|
3218
|
+
};
|
|
3219
|
+
b.prototype.then = function (f, h) {
|
|
3220
|
+
function k(p, n) {
|
|
3221
|
+
return "function" == typeof p ? function (r) {
|
|
3222
|
+
try {
|
|
3223
|
+
l(p(r));
|
|
3224
|
+
} catch (t) {
|
|
3225
|
+
m(t);
|
|
3226
|
+
}
|
|
3227
|
+
} : n;
|
|
3228
|
+
}
|
|
3229
|
+
var l,
|
|
3230
|
+
m,
|
|
3231
|
+
q = new b(function (p, n) {
|
|
3232
|
+
l = p;
|
|
3233
|
+
m = n;
|
|
3234
|
+
});
|
|
3235
|
+
this.M(k(f, l), k(h, m));
|
|
3236
|
+
return q;
|
|
3237
|
+
};
|
|
3238
|
+
b.prototype["catch"] = function (f) {
|
|
3239
|
+
return this.then(void 0, f);
|
|
3240
|
+
};
|
|
3241
|
+
b.prototype.M = function (f, h) {
|
|
3242
|
+
function k() {
|
|
3243
|
+
switch (l.h) {
|
|
3244
|
+
case 1:
|
|
3245
|
+
f(l.i);
|
|
3246
|
+
break;
|
|
3247
|
+
case 2:
|
|
3248
|
+
h(l.i);
|
|
3249
|
+
break;
|
|
3250
|
+
default:
|
|
3251
|
+
throw Error("Unexpected state: " + l.h);
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
var l = this;
|
|
3255
|
+
null == this.g ? g.h(k) : this.g.push(k);
|
|
3256
|
+
this.s = !0;
|
|
3257
|
+
};
|
|
3258
|
+
b.resolve = d;
|
|
3259
|
+
b.reject = function (f) {
|
|
3260
|
+
return new b(function (h, k) {
|
|
3261
|
+
k(f);
|
|
3262
|
+
});
|
|
3263
|
+
};
|
|
3264
|
+
b.race = function (f) {
|
|
3265
|
+
return new b(function (h, k) {
|
|
3266
|
+
for (var l = C(f), m = l.next(); !m.done; m = l.next()) d(m.value).M(h, k);
|
|
3267
|
+
});
|
|
3268
|
+
};
|
|
3269
|
+
b.all = function (f) {
|
|
3270
|
+
var h = C(f),
|
|
3271
|
+
k = h.next();
|
|
3272
|
+
return k.done ? d([]) : new b(function (l, m) {
|
|
3273
|
+
function q(r) {
|
|
3274
|
+
return function (t) {
|
|
3275
|
+
p[r] = t;
|
|
3276
|
+
n--;
|
|
3277
|
+
0 == n && l(p);
|
|
3278
|
+
};
|
|
3279
|
+
}
|
|
3280
|
+
var p = [],
|
|
3281
|
+
n = 0;
|
|
3282
|
+
do p.push(void 0), n++, d(k.value).M(q(p.length - 1), m), k = h.next(); while (!k.done);
|
|
3283
|
+
});
|
|
3284
|
+
};
|
|
3285
|
+
return b;
|
|
3286
|
+
});
|
|
3287
|
+
function ta(a, b) {
|
|
3288
|
+
a instanceof String && (a += "");
|
|
3289
|
+
var c = 0,
|
|
3290
|
+
d = !1,
|
|
3291
|
+
e = {
|
|
3292
|
+
next: function next() {
|
|
3293
|
+
if (!d && c < a.length) {
|
|
3294
|
+
var g = c++;
|
|
3295
|
+
return {
|
|
3296
|
+
value: b(g, a[g]),
|
|
3297
|
+
done: !1
|
|
3298
|
+
};
|
|
3299
|
+
}
|
|
3300
|
+
d = !0;
|
|
3301
|
+
return {
|
|
3302
|
+
done: !0,
|
|
3303
|
+
value: void 0
|
|
3304
|
+
};
|
|
3305
|
+
}
|
|
3306
|
+
};
|
|
3307
|
+
e[Symbol.iterator] = function () {
|
|
3308
|
+
return e;
|
|
3309
|
+
};
|
|
3310
|
+
return e;
|
|
3311
|
+
}
|
|
3312
|
+
var ua = "function" == typeof Object.assign ? Object.assign : function (a, b) {
|
|
3313
|
+
for (var c = 1; c < arguments.length; c++) {
|
|
3314
|
+
var d = arguments[c];
|
|
3315
|
+
if (d) for (var e in d) Object.prototype.hasOwnProperty.call(d, e) && (a[e] = d[e]);
|
|
3316
|
+
}
|
|
3317
|
+
return a;
|
|
3318
|
+
};
|
|
3319
|
+
B("Object.assign", function (a) {
|
|
3320
|
+
return a || ua;
|
|
3321
|
+
});
|
|
3322
|
+
B("Object.is", function (a) {
|
|
3323
|
+
return a ? a : function (b, c) {
|
|
3324
|
+
return b === c ? 0 !== b || 1 / b === 1 / c : b !== b && c !== c;
|
|
3325
|
+
};
|
|
3326
|
+
});
|
|
3327
|
+
B("Array.prototype.includes", function (a) {
|
|
3328
|
+
return a ? a : function (b, c) {
|
|
3329
|
+
var d = this;
|
|
3330
|
+
d instanceof String && (d = String(d));
|
|
3331
|
+
var e = d.length;
|
|
3332
|
+
c = c || 0;
|
|
3333
|
+
for (0 > c && (c = Math.max(c + e, 0)); c < e; c++) {
|
|
3334
|
+
var g = d[c];
|
|
3335
|
+
if (g === b || Object.is(g, b)) return !0;
|
|
3336
|
+
}
|
|
3337
|
+
return !1;
|
|
3338
|
+
};
|
|
3339
|
+
});
|
|
3340
|
+
B("String.prototype.includes", function (a) {
|
|
3341
|
+
return a ? a : function (b, c) {
|
|
3342
|
+
if (null == this) throw new TypeError("The 'this' value for String.prototype.includes must not be null or undefined");
|
|
3343
|
+
if (b instanceof RegExp) throw new TypeError("First argument to String.prototype.includes must not be a regular expression");
|
|
3344
|
+
return -1 !== this.indexOf(b, c || 0);
|
|
3345
|
+
};
|
|
3346
|
+
});
|
|
3347
|
+
B("Array.prototype.keys", function (a) {
|
|
3348
|
+
return a ? a : function () {
|
|
3349
|
+
return ta(this, function (b) {
|
|
3350
|
+
return b;
|
|
3351
|
+
});
|
|
3352
|
+
};
|
|
3353
|
+
});
|
|
3354
|
+
var va = this || self;
|
|
3355
|
+
function K(a, b) {
|
|
3356
|
+
a = a.split(".");
|
|
3357
|
+
var c = va;
|
|
3358
|
+
a[0] in c || "undefined" == typeof c.execScript || c.execScript("var " + a[0]);
|
|
3359
|
+
for (var d; a.length && (d = a.shift());) a.length || void 0 === b ? c[d] && c[d] !== Object.prototype[d] ? c = c[d] : c = c[d] = {} : c[d] = b;
|
|
3360
|
+
}
|
|
3361
|
+
function L() {
|
|
3362
|
+
throw Error("Invalid UTF8");
|
|
3363
|
+
}
|
|
3364
|
+
function wa(a, b) {
|
|
3365
|
+
b = String.fromCharCode.apply(null, b);
|
|
3366
|
+
return null == a ? b : a + b;
|
|
3367
|
+
}
|
|
3368
|
+
var xa,
|
|
3369
|
+
ya = "undefined" !== typeof TextDecoder,
|
|
3370
|
+
za,
|
|
3371
|
+
Aa = "undefined" !== typeof TextEncoder;
|
|
3372
|
+
var Ba = {},
|
|
3373
|
+
M = null;
|
|
3374
|
+
function Ca(a) {
|
|
3375
|
+
var b;
|
|
3376
|
+
void 0 === b && (b = 0);
|
|
3377
|
+
Da();
|
|
3378
|
+
b = Ba[b];
|
|
3379
|
+
for (var c = Array(Math.floor(a.length / 3)), d = b[64] || "", e = 0, g = 0; e < a.length - 2; e += 3) {
|
|
3380
|
+
var f = a[e],
|
|
3381
|
+
h = a[e + 1],
|
|
3382
|
+
k = a[e + 2],
|
|
3383
|
+
l = b[f >> 2];
|
|
3384
|
+
f = b[(f & 3) << 4 | h >> 4];
|
|
3385
|
+
h = b[(h & 15) << 2 | k >> 6];
|
|
3386
|
+
k = b[k & 63];
|
|
3387
|
+
c[g++] = l + f + h + k;
|
|
3388
|
+
}
|
|
3389
|
+
l = 0;
|
|
3390
|
+
k = d;
|
|
3391
|
+
switch (a.length - e) {
|
|
3392
|
+
case 2:
|
|
3393
|
+
l = a[e + 1], k = b[(l & 15) << 2] || d;
|
|
3394
|
+
case 1:
|
|
3395
|
+
a = a[e], c[g] = b[a >> 2] + b[(a & 3) << 4 | l >> 4] + k + d;
|
|
3396
|
+
}
|
|
3397
|
+
return c.join("");
|
|
3398
|
+
}
|
|
3399
|
+
function Ea(a) {
|
|
3400
|
+
var b = a.length,
|
|
3401
|
+
c = 3 * b / 4;
|
|
3402
|
+
c % 3 ? c = Math.floor(c) : -1 != "=.".indexOf(a[b - 1]) && (c = -1 != "=.".indexOf(a[b - 2]) ? c - 2 : c - 1);
|
|
3403
|
+
var d = new Uint8Array(c),
|
|
3404
|
+
e = 0;
|
|
3405
|
+
Fa(a, function (g) {
|
|
3406
|
+
d[e++] = g;
|
|
3407
|
+
});
|
|
3408
|
+
return e !== c ? d.subarray(0, e) : d;
|
|
3409
|
+
}
|
|
3410
|
+
function Fa(a, b) {
|
|
3411
|
+
function c(k) {
|
|
3412
|
+
for (; d < a.length;) {
|
|
3413
|
+
var l = a.charAt(d++),
|
|
3414
|
+
m = M[l];
|
|
3415
|
+
if (null != m) return m;
|
|
3416
|
+
if (!/^[\s\xa0]*$/.test(l)) throw Error("Unknown base64 encoding at char: " + l);
|
|
3417
|
+
}
|
|
3418
|
+
return k;
|
|
3419
|
+
}
|
|
3420
|
+
Da();
|
|
3421
|
+
for (var d = 0;;) {
|
|
3422
|
+
var e = c(-1),
|
|
3423
|
+
g = c(0),
|
|
3424
|
+
f = c(64),
|
|
3425
|
+
h = c(64);
|
|
3426
|
+
if (64 === h && -1 === e) break;
|
|
3427
|
+
b(e << 2 | g >> 4);
|
|
3428
|
+
64 != f && (b(g << 4 & 240 | f >> 2), 64 != h && b(f << 6 & 192 | h));
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3431
|
+
function Da() {
|
|
3432
|
+
if (!M) {
|
|
3433
|
+
M = {};
|
|
3434
|
+
for (var a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), b = ["+/=", "+/", "-_=", "-_.", "-_"], c = 0; 5 > c; c++) {
|
|
3435
|
+
var d = a.concat(b[c].split(""));
|
|
3436
|
+
Ba[c] = d;
|
|
3437
|
+
for (var e = 0; e < d.length; e++) {
|
|
3438
|
+
var g = d[e];
|
|
3439
|
+
void 0 === M[g] && (M[g] = e);
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
}
|
|
3444
|
+
var Ga = "function" === typeof Uint8Array;
|
|
3445
|
+
function Ha(a) {
|
|
3446
|
+
return Ga && null != a && a instanceof Uint8Array;
|
|
3447
|
+
}
|
|
3448
|
+
var Ia;
|
|
3449
|
+
function Ja(a) {
|
|
3450
|
+
this.L = a;
|
|
3451
|
+
if (null !== a && 0 === a.length) throw Error("ByteString should be constructed with non-empty values");
|
|
3452
|
+
}
|
|
3453
|
+
var Ka = "function" === typeof Uint8Array.prototype.slice,
|
|
3454
|
+
N = 0,
|
|
3455
|
+
O = 0;
|
|
3456
|
+
function La(a, b) {
|
|
3457
|
+
if (a.constructor === Uint8Array) return a;
|
|
3458
|
+
if (a.constructor === ArrayBuffer) return new Uint8Array(a);
|
|
3459
|
+
if (a.constructor === Array) return new Uint8Array(a);
|
|
3460
|
+
if (a.constructor === String) return Ea(a);
|
|
3461
|
+
if (a.constructor === Ja) {
|
|
3462
|
+
if (!b && (b = a.L) && b.constructor === Uint8Array) return b;
|
|
3463
|
+
b = a.L;
|
|
3464
|
+
b = null == b || Ha(b) ? b : "string" === typeof b ? Ea(b) : null;
|
|
3465
|
+
return (a = a.L = b) ? new Uint8Array(a) : Ia || (Ia = new Uint8Array(0));
|
|
3466
|
+
}
|
|
3467
|
+
if (a instanceof Uint8Array) return new Uint8Array(a.buffer, a.byteOffset, a.byteLength);
|
|
3468
|
+
throw Error("Type not convertible to a Uint8Array, expected a Uint8Array, an ArrayBuffer, a base64 encoded string, or Array of numbers");
|
|
3469
|
+
}
|
|
3470
|
+
function Ma(a, b) {
|
|
3471
|
+
return Error("Invalid wire type: " + a + " (at position " + b + ")");
|
|
3472
|
+
}
|
|
3473
|
+
function Na() {
|
|
3474
|
+
return Error("Failed to read varint, encoding is invalid.");
|
|
3475
|
+
}
|
|
3476
|
+
function Oa(a, b) {
|
|
3477
|
+
b = void 0 === b ? {} : b;
|
|
3478
|
+
b = void 0 === b.v ? !1 : b.v;
|
|
3479
|
+
this.h = null;
|
|
3480
|
+
this.g = this.i = this.j = 0;
|
|
3481
|
+
this.v = b;
|
|
3482
|
+
a && Pa(this, a);
|
|
3483
|
+
}
|
|
3484
|
+
function Pa(a, b) {
|
|
3485
|
+
a.h = La(b, a.v);
|
|
3486
|
+
a.j = 0;
|
|
3487
|
+
a.i = a.h.length;
|
|
3488
|
+
a.g = a.j;
|
|
3489
|
+
}
|
|
3490
|
+
Oa.prototype.reset = function () {
|
|
3491
|
+
this.g = this.j;
|
|
3492
|
+
};
|
|
3493
|
+
function P(a) {
|
|
3494
|
+
if (a.g > a.i) throw Error("Tried to read past the end of the data " + a.g + " > " + a.i);
|
|
3495
|
+
}
|
|
3496
|
+
function Q(a) {
|
|
3497
|
+
var b = a.h,
|
|
3498
|
+
c = b[a.g],
|
|
3499
|
+
d = c & 127;
|
|
3500
|
+
if (128 > c) return a.g += 1, P(a), d;
|
|
3501
|
+
c = b[a.g + 1];
|
|
3502
|
+
d |= (c & 127) << 7;
|
|
3503
|
+
if (128 > c) return a.g += 2, P(a), d;
|
|
3504
|
+
c = b[a.g + 2];
|
|
3505
|
+
d |= (c & 127) << 14;
|
|
3506
|
+
if (128 > c) return a.g += 3, P(a), d;
|
|
3507
|
+
c = b[a.g + 3];
|
|
3508
|
+
d |= (c & 127) << 21;
|
|
3509
|
+
if (128 > c) return a.g += 4, P(a), d;
|
|
3510
|
+
c = b[a.g + 4];
|
|
3511
|
+
a.g += 5;
|
|
3512
|
+
d |= (c & 15) << 28;
|
|
3513
|
+
if (128 > c) return P(a), d;
|
|
3514
|
+
if (128 <= b[a.g++] && 128 <= b[a.g++] && 128 <= b[a.g++] && 128 <= b[a.g++] && 128 <= b[a.g++]) throw Na();
|
|
3515
|
+
P(a);
|
|
3516
|
+
return d;
|
|
3517
|
+
}
|
|
3518
|
+
var Qa = [];
|
|
3519
|
+
function Ra() {
|
|
3520
|
+
this.g = [];
|
|
3521
|
+
}
|
|
3522
|
+
Ra.prototype.length = function () {
|
|
3523
|
+
return this.g.length;
|
|
3524
|
+
};
|
|
3525
|
+
Ra.prototype.end = function () {
|
|
3526
|
+
var a = this.g;
|
|
3527
|
+
this.g = [];
|
|
3528
|
+
return a;
|
|
3529
|
+
};
|
|
3530
|
+
function S(a, b) {
|
|
3531
|
+
for (; 127 < b;) a.g.push(b & 127 | 128), b >>>= 7;
|
|
3532
|
+
a.g.push(b);
|
|
3533
|
+
}
|
|
3534
|
+
function Sa(a) {
|
|
3535
|
+
var b = {},
|
|
3536
|
+
c = void 0 === b.W ? !1 : b.W;
|
|
3537
|
+
this.l = {
|
|
3538
|
+
v: void 0 === b.v ? !1 : b.v
|
|
3539
|
+
};
|
|
3540
|
+
this.W = c;
|
|
3541
|
+
b = this.l;
|
|
3542
|
+
Qa.length ? (c = Qa.pop(), b && (c.v = b.v), a && Pa(c, a), a = c) : a = new Oa(a, b);
|
|
3543
|
+
this.g = a;
|
|
3544
|
+
this.j = this.g.g;
|
|
3545
|
+
this.h = this.i = -1;
|
|
3546
|
+
}
|
|
3547
|
+
Sa.prototype.reset = function () {
|
|
3548
|
+
this.g.reset();
|
|
3549
|
+
this.j = this.g.g;
|
|
3550
|
+
this.h = this.i = -1;
|
|
3551
|
+
};
|
|
3552
|
+
function Ta(a) {
|
|
3553
|
+
var b = a.g;
|
|
3554
|
+
if (b.g == b.i) return !1;
|
|
3555
|
+
a.j = a.g.g;
|
|
3556
|
+
var c = Q(a.g) >>> 0;
|
|
3557
|
+
b = c >>> 3;
|
|
3558
|
+
c &= 7;
|
|
3559
|
+
if (!(0 <= c && 5 >= c)) throw Ma(c, a.j);
|
|
3560
|
+
if (1 > b) throw Error("Invalid field number: " + b + " (at position " + a.j + ")");
|
|
3561
|
+
a.i = b;
|
|
3562
|
+
a.h = c;
|
|
3563
|
+
return !0;
|
|
3564
|
+
}
|
|
3565
|
+
function Ua(a) {
|
|
3566
|
+
switch (a.h) {
|
|
3567
|
+
case 0:
|
|
3568
|
+
if (0 != a.h) Ua(a);else a: {
|
|
3569
|
+
a = a.g;
|
|
3570
|
+
for (var b = a.g, c = b + 10; b < c;) if (0 === (a.h[b++] & 128)) {
|
|
3571
|
+
a.g = b;
|
|
3572
|
+
P(a);
|
|
3573
|
+
break a;
|
|
3574
|
+
}
|
|
3575
|
+
throw Na();
|
|
3576
|
+
}
|
|
3577
|
+
break;
|
|
3578
|
+
case 1:
|
|
3579
|
+
a = a.g;
|
|
3580
|
+
a.g += 8;
|
|
3581
|
+
P(a);
|
|
3582
|
+
break;
|
|
3583
|
+
case 2:
|
|
3584
|
+
2 != a.h ? Ua(a) : (b = Q(a.g) >>> 0, a = a.g, a.g += b, P(a));
|
|
3585
|
+
break;
|
|
3586
|
+
case 5:
|
|
3587
|
+
a = a.g;
|
|
3588
|
+
a.g += 4;
|
|
3589
|
+
P(a);
|
|
3590
|
+
break;
|
|
3591
|
+
case 3:
|
|
3592
|
+
b = a.i;
|
|
3593
|
+
do {
|
|
3594
|
+
if (!Ta(a)) throw Error("Unmatched start-group tag: stream EOF");
|
|
3595
|
+
if (4 == a.h) {
|
|
3596
|
+
if (a.i != b) throw Error("Unmatched end-group tag");
|
|
3597
|
+
break;
|
|
3598
|
+
}
|
|
3599
|
+
Ua(a);
|
|
3600
|
+
} while (1);
|
|
3601
|
+
break;
|
|
3602
|
+
default:
|
|
3603
|
+
throw Ma(a.h, a.j);
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
var Va = [];
|
|
3607
|
+
function Wa() {
|
|
3608
|
+
this.i = [];
|
|
3609
|
+
this.h = 0;
|
|
3610
|
+
this.g = new Ra();
|
|
3611
|
+
}
|
|
3612
|
+
function T(a, b) {
|
|
3613
|
+
0 !== b.length && (a.i.push(b), a.h += b.length);
|
|
3614
|
+
}
|
|
3615
|
+
function Xa(a, b) {
|
|
3616
|
+
if (b = b.ba) {
|
|
3617
|
+
T(a, a.g.end());
|
|
3618
|
+
for (var c = 0; c < b.length; c++) T(a, b[c]);
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
var U = "function" === typeof Symbol && "symbol" === typeof Symbol() ? Symbol(void 0) : void 0;
|
|
3622
|
+
function Ya(a, b) {
|
|
3623
|
+
Object.isFrozen(a) || (U ? a[U] |= b : void 0 !== a.N ? a.N |= b : Object.defineProperties(a, {
|
|
3624
|
+
N: {
|
|
3625
|
+
value: b,
|
|
3626
|
+
configurable: !0,
|
|
3627
|
+
writable: !0,
|
|
3628
|
+
enumerable: !1
|
|
3629
|
+
}
|
|
3630
|
+
}));
|
|
3631
|
+
}
|
|
3632
|
+
function Za(a) {
|
|
3633
|
+
var b;
|
|
3634
|
+
U ? b = a[U] : b = a.N;
|
|
3635
|
+
return null == b ? 0 : b;
|
|
3636
|
+
}
|
|
3637
|
+
function $a(a) {
|
|
3638
|
+
Ya(a, 1);
|
|
3639
|
+
return a;
|
|
3640
|
+
}
|
|
3641
|
+
function ab(a) {
|
|
3642
|
+
return Array.isArray(a) ? !!(Za(a) & 2) : !1;
|
|
3643
|
+
}
|
|
3644
|
+
function bb(a) {
|
|
3645
|
+
if (!Array.isArray(a)) throw Error("cannot mark non-array as immutable");
|
|
3646
|
+
Ya(a, 2);
|
|
3647
|
+
}
|
|
3648
|
+
function cb(a) {
|
|
3649
|
+
return null !== a && "object" === typeof a && !Array.isArray(a) && a.constructor === Object;
|
|
3650
|
+
}
|
|
3651
|
+
var db = Object.freeze($a([]));
|
|
3652
|
+
function eb(a) {
|
|
3653
|
+
if (ab(a.m)) throw Error("Cannot mutate an immutable Message");
|
|
3654
|
+
}
|
|
3655
|
+
var fb = "undefined" != typeof Symbol && "undefined" != typeof Symbol.hasInstance;
|
|
3656
|
+
function gb(a) {
|
|
3657
|
+
return {
|
|
3658
|
+
value: a,
|
|
3659
|
+
configurable: !1,
|
|
3660
|
+
writable: !1,
|
|
3661
|
+
enumerable: !1
|
|
3662
|
+
};
|
|
3663
|
+
}
|
|
3664
|
+
function V(a, b, c) {
|
|
3665
|
+
return -1 === b ? null : b >= a.i ? a.g ? a.g[b] : void 0 : (void 0 === c ? 0 : c) && a.g && (c = a.g[b], null != c) ? c : a.m[b + a.h];
|
|
3666
|
+
}
|
|
3667
|
+
function W(a, b, c, d) {
|
|
3668
|
+
d = void 0 === d ? !1 : d;
|
|
3669
|
+
eb(a);
|
|
3670
|
+
b < a.i && !d ? a.m[b + a.h] = c : (a.g || (a.g = a.m[a.i + a.h] = {}))[b] = c;
|
|
3671
|
+
}
|
|
3672
|
+
function hb(a, b, c, d) {
|
|
3673
|
+
c = void 0 === c ? !0 : c;
|
|
3674
|
+
d = void 0 === d ? !1 : d;
|
|
3675
|
+
var e = V(a, b, d);
|
|
3676
|
+
null == e && (e = db);
|
|
3677
|
+
if (ab(a.m)) c && (bb(e), Object.freeze(e));else if (e === db || ab(e)) e = $a(e.slice()), W(a, b, e, d);
|
|
3678
|
+
return e;
|
|
3679
|
+
}
|
|
3680
|
+
function X(a, b, c) {
|
|
3681
|
+
a = V(a, b);
|
|
3682
|
+
a = null == a ? a : +a;
|
|
3683
|
+
return null == a ? void 0 === c ? 0 : c : a;
|
|
3684
|
+
}
|
|
3685
|
+
function ib(a, b, c, d) {
|
|
3686
|
+
a.j || (a.j = {});
|
|
3687
|
+
var e = ab(a.m),
|
|
3688
|
+
g = a.j[c];
|
|
3689
|
+
if (!g) {
|
|
3690
|
+
d = hb(a, c, !0, void 0 === d ? !1 : d);
|
|
3691
|
+
g = [];
|
|
3692
|
+
e = e || ab(d);
|
|
3693
|
+
for (var f = 0; f < d.length; f++) g[f] = new b(d[f]), e && bb(g[f].m);
|
|
3694
|
+
e && (bb(g), Object.freeze(g));
|
|
3695
|
+
a.j[c] = g;
|
|
3696
|
+
}
|
|
3697
|
+
return g;
|
|
3698
|
+
}
|
|
3699
|
+
function jb(a, b, c, d, e) {
|
|
3700
|
+
var g = void 0 === g ? !1 : g;
|
|
3701
|
+
eb(a);
|
|
3702
|
+
g = ib(a, c, b, g);
|
|
3703
|
+
c = d ? d : new c();
|
|
3704
|
+
a = hb(a, b);
|
|
3705
|
+
void 0 != e ? (g.splice(e, 0, c), a.splice(e, 0, c.m)) : (g.push(c), a.push(c.m));
|
|
3706
|
+
return c;
|
|
3707
|
+
}
|
|
3708
|
+
function kb(a, b) {
|
|
3709
|
+
a = V(a, b);
|
|
3710
|
+
return null == a ? 0 : a;
|
|
3711
|
+
}
|
|
3712
|
+
function lb(a, b) {
|
|
3713
|
+
a = V(a, b);
|
|
3714
|
+
return null == a ? "" : a;
|
|
3715
|
+
}
|
|
3716
|
+
function mb(a) {
|
|
3717
|
+
switch (typeof a) {
|
|
3718
|
+
case "number":
|
|
3719
|
+
return isFinite(a) ? a : String(a);
|
|
3720
|
+
case "object":
|
|
3721
|
+
if (a && !Array.isArray(a)) {
|
|
3722
|
+
if (Ha(a)) return Ca(a);
|
|
3723
|
+
if (a instanceof Ja) {
|
|
3724
|
+
var b = a.L;
|
|
3725
|
+
b = null == b || "string" === typeof b ? b : Ga && b instanceof Uint8Array ? Ca(b) : null;
|
|
3726
|
+
return (a.L = b) || "";
|
|
3727
|
+
}
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
return a;
|
|
3731
|
+
}
|
|
3732
|
+
function nb(a) {
|
|
3733
|
+
var b = ob;
|
|
3734
|
+
b = void 0 === b ? pb : b;
|
|
3735
|
+
return qb(a, b);
|
|
3736
|
+
}
|
|
3737
|
+
function rb(a, b) {
|
|
3738
|
+
if (null != a) {
|
|
3739
|
+
if (Array.isArray(a)) a = qb(a, b);else if (cb(a)) {
|
|
3740
|
+
var c = {},
|
|
3741
|
+
d;
|
|
3742
|
+
for (d in a) c[d] = rb(a[d], b);
|
|
3743
|
+
a = c;
|
|
3744
|
+
} else a = b(a);
|
|
3745
|
+
return a;
|
|
3746
|
+
}
|
|
3747
|
+
}
|
|
3748
|
+
function qb(a, b) {
|
|
3749
|
+
for (var c = a.slice(), d = 0; d < c.length; d++) c[d] = rb(c[d], b);
|
|
3750
|
+
Array.isArray(a) && Za(a) & 1 && $a(c);
|
|
3751
|
+
return c;
|
|
3752
|
+
}
|
|
3753
|
+
function ob(a) {
|
|
3754
|
+
if (a && "object" == typeof a && a.toJSON) return a.toJSON();
|
|
3755
|
+
a = mb(a);
|
|
3756
|
+
return Array.isArray(a) ? nb(a) : a;
|
|
3757
|
+
}
|
|
3758
|
+
function pb(a) {
|
|
3759
|
+
return Ha(a) ? new Uint8Array(a) : a;
|
|
3760
|
+
}
|
|
3761
|
+
function sb(a, b, c) {
|
|
3762
|
+
a || (a = tb);
|
|
3763
|
+
tb = null;
|
|
3764
|
+
var d = this.constructor.h;
|
|
3765
|
+
a || (a = d ? [d] : []);
|
|
3766
|
+
this.h = (d ? 0 : -1) - (this.constructor.g || 0);
|
|
3767
|
+
this.j = void 0;
|
|
3768
|
+
this.m = a;
|
|
3769
|
+
a: {
|
|
3770
|
+
d = this.m.length;
|
|
3771
|
+
a = d - 1;
|
|
3772
|
+
if (d && (d = this.m[a], cb(d))) {
|
|
3773
|
+
this.i = a - this.h;
|
|
3774
|
+
this.g = d;
|
|
3775
|
+
break a;
|
|
3776
|
+
}
|
|
3777
|
+
void 0 !== b && -1 < b ? (this.i = Math.max(b, a + 1 - this.h), this.g = void 0) : this.i = Number.MAX_VALUE;
|
|
3778
|
+
}
|
|
3779
|
+
if (c) for (b = 0; b < c.length; b++) if (a = c[b], a < this.i) a += this.h, (d = this.m[a]) ? Array.isArray(d) && $a(d) : this.m[a] = db;else {
|
|
3780
|
+
d = this.g || (this.g = this.m[this.i + this.h] = {});
|
|
3781
|
+
var e = d[a];
|
|
3782
|
+
e ? Array.isArray(e) && $a(e) : d[a] = db;
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
sb.prototype.toJSON = function () {
|
|
3786
|
+
return nb(this.m);
|
|
3787
|
+
};
|
|
3788
|
+
sb.prototype.toString = function () {
|
|
3789
|
+
return this.m.toString();
|
|
3790
|
+
};
|
|
3791
|
+
var tb;
|
|
3792
|
+
function ub() {
|
|
3793
|
+
sb.apply(this, arguments);
|
|
3794
|
+
}
|
|
3795
|
+
E(ub, sb);
|
|
3796
|
+
if (fb) {
|
|
3797
|
+
var vb = {};
|
|
3798
|
+
Object.defineProperties(ub, (vb[Symbol.hasInstance] = gb(function () {
|
|
3799
|
+
throw Error("Cannot perform instanceof checks for MutableMessage");
|
|
3800
|
+
}), vb));
|
|
3801
|
+
}
|
|
3802
|
+
function wb(a, b, c) {
|
|
3803
|
+
if (c) {
|
|
3804
|
+
var d = {},
|
|
3805
|
+
e;
|
|
3806
|
+
for (e in c) {
|
|
3807
|
+
var g = c[e],
|
|
3808
|
+
f = g.ha;
|
|
3809
|
+
f || (d.F = g.la || g.fa.P, g.aa ? (d.U = xb(g.aa), f = function (h) {
|
|
3810
|
+
return function (k, l, m) {
|
|
3811
|
+
return h.F(k, l, m, h.U);
|
|
3812
|
+
};
|
|
3813
|
+
}(d)) : g.ca ? (d.T = yb(g.X.g, g.ca), f = function (h) {
|
|
3814
|
+
return function (k, l, m) {
|
|
3815
|
+
return h.F(k, l, m, h.T);
|
|
3816
|
+
};
|
|
3817
|
+
}(d)) : f = d.F, g.ha = f);
|
|
3818
|
+
f(b, a, g.X);
|
|
3819
|
+
d = {
|
|
3820
|
+
F: d.F,
|
|
3821
|
+
U: d.U,
|
|
3822
|
+
T: d.T
|
|
3823
|
+
};
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
Xa(b, a);
|
|
3827
|
+
}
|
|
3828
|
+
var zb = Symbol();
|
|
3829
|
+
function Ab(a, b, c) {
|
|
3830
|
+
return a[zb] || (a[zb] = function (d, e) {
|
|
3831
|
+
return b(d, e, c);
|
|
3832
|
+
});
|
|
3833
|
+
}
|
|
3834
|
+
function Bb(a) {
|
|
3835
|
+
var b = a[zb];
|
|
3836
|
+
if (!b) {
|
|
3837
|
+
var c = Cb(a);
|
|
3838
|
+
b = function b(d, e) {
|
|
3839
|
+
return Db(d, e, c);
|
|
3840
|
+
};
|
|
3841
|
+
a[zb] = b;
|
|
3842
|
+
}
|
|
3843
|
+
return b;
|
|
3844
|
+
}
|
|
3845
|
+
function Eb(a) {
|
|
3846
|
+
var b = a.aa;
|
|
3847
|
+
if (b) return Bb(b);
|
|
3848
|
+
if (b = a.ka) return Ab(a.X.g, b, a.ca);
|
|
3849
|
+
}
|
|
3850
|
+
function Fb(a) {
|
|
3851
|
+
var b = Eb(a),
|
|
3852
|
+
c = a.X,
|
|
3853
|
+
d = a.fa.O;
|
|
3854
|
+
return b ? function (e, g) {
|
|
3855
|
+
return d(e, g, c, b);
|
|
3856
|
+
} : function (e, g) {
|
|
3857
|
+
return d(e, g, c);
|
|
3858
|
+
};
|
|
3859
|
+
}
|
|
3860
|
+
function Gb(a, b, c, d, e, g) {
|
|
3861
|
+
a = a();
|
|
3862
|
+
var f = 0;
|
|
3863
|
+
a.length && "number" !== typeof a[0] && (c(b, a[0]), f++);
|
|
3864
|
+
for (; f < a.length;) {
|
|
3865
|
+
c = a[f++];
|
|
3866
|
+
for (var h = f + 1; h < a.length && "number" !== typeof a[h];) h++;
|
|
3867
|
+
var k = a[f++];
|
|
3868
|
+
h -= f;
|
|
3869
|
+
switch (h) {
|
|
3870
|
+
case 0:
|
|
3871
|
+
d(b, c, k);
|
|
3872
|
+
break;
|
|
3873
|
+
case 1:
|
|
3874
|
+
d(b, c, k, a[f++]);
|
|
3875
|
+
break;
|
|
3876
|
+
case 2:
|
|
3877
|
+
e(b, c, k, a[f++], a[f++]);
|
|
3878
|
+
break;
|
|
3879
|
+
case 3:
|
|
3880
|
+
h = a[f++];
|
|
3881
|
+
var l = a[f++],
|
|
3882
|
+
m = a[f++];
|
|
3883
|
+
Array.isArray(m) ? e(b, c, k, h, l, m) : g(b, c, k, h, l, m);
|
|
3884
|
+
break;
|
|
3885
|
+
case 4:
|
|
3886
|
+
g(b, c, k, a[f++], a[f++], a[f++], a[f++]);
|
|
3887
|
+
break;
|
|
3888
|
+
default:
|
|
3889
|
+
throw Error("unexpected number of binary field arguments: " + h);
|
|
3890
|
+
}
|
|
3891
|
+
}
|
|
3892
|
+
return b;
|
|
3893
|
+
}
|
|
3894
|
+
var Hb = Symbol();
|
|
3895
|
+
function xb(a) {
|
|
3896
|
+
var b = a[Hb];
|
|
3897
|
+
if (!b) {
|
|
3898
|
+
var c = Ib(a);
|
|
3899
|
+
b = function b(d, e) {
|
|
3900
|
+
return Jb(d, e, c);
|
|
3901
|
+
};
|
|
3902
|
+
a[Hb] = b;
|
|
3903
|
+
}
|
|
3904
|
+
return b;
|
|
3905
|
+
}
|
|
3906
|
+
function yb(a, b) {
|
|
3907
|
+
var c = a[Hb];
|
|
3908
|
+
c || (c = function c(d, e) {
|
|
3909
|
+
return wb(d, e, b);
|
|
3910
|
+
}, a[Hb] = c);
|
|
3911
|
+
return c;
|
|
3912
|
+
}
|
|
3913
|
+
var Kb = Symbol();
|
|
3914
|
+
function Lb(a, b) {
|
|
3915
|
+
a.push(b);
|
|
3916
|
+
}
|
|
3917
|
+
function Mb(a, b, c) {
|
|
3918
|
+
a.push(b, c.P);
|
|
3919
|
+
}
|
|
3920
|
+
function Nb(a, b, c, d, e) {
|
|
3921
|
+
var g = xb(e),
|
|
3922
|
+
f = c.P;
|
|
3923
|
+
a.push(b, function (h, k, l) {
|
|
3924
|
+
return f(h, k, l, d, g);
|
|
3925
|
+
});
|
|
3926
|
+
}
|
|
3927
|
+
function Ob(a, b, c, d, e, g) {
|
|
3928
|
+
var f = yb(d, g),
|
|
3929
|
+
h = c.P;
|
|
3930
|
+
a.push(b, function (k, l, m) {
|
|
3931
|
+
return h(k, l, m, d, f);
|
|
3932
|
+
});
|
|
3933
|
+
}
|
|
3934
|
+
function Ib(a) {
|
|
3935
|
+
var b = a[Kb];
|
|
3936
|
+
return b ? b : Gb(a, a[Kb] = [], Lb, Mb, Nb, Ob);
|
|
3937
|
+
}
|
|
3938
|
+
var Pb = Symbol();
|
|
3939
|
+
function Qb(a, b) {
|
|
3940
|
+
a[0] = b;
|
|
3941
|
+
}
|
|
3942
|
+
function Rb(a, b, c, d) {
|
|
3943
|
+
var e = c.O;
|
|
3944
|
+
a[b] = d ? function (g, f, h) {
|
|
3945
|
+
return e(g, f, h, d);
|
|
3946
|
+
} : e;
|
|
3947
|
+
}
|
|
3948
|
+
function Sb(a, b, c, d, e, g) {
|
|
3949
|
+
var f = c.O,
|
|
3950
|
+
h = Bb(e);
|
|
3951
|
+
a[b] = function (k, l, m) {
|
|
3952
|
+
return f(k, l, m, d, h, g);
|
|
3953
|
+
};
|
|
3954
|
+
}
|
|
3955
|
+
function Tb(a, b, c, d, e, g, f) {
|
|
3956
|
+
var h = c.O,
|
|
3957
|
+
k = Ab(d, e, g);
|
|
3958
|
+
a[b] = function (l, m, q) {
|
|
3959
|
+
return h(l, m, q, d, k, f);
|
|
3960
|
+
};
|
|
3961
|
+
}
|
|
3962
|
+
function Cb(a) {
|
|
3963
|
+
var b = a[Pb];
|
|
3964
|
+
return b ? b : Gb(a, a[Pb] = {}, Qb, Rb, Sb, Tb);
|
|
3965
|
+
}
|
|
3966
|
+
function Db(a, b, c) {
|
|
3967
|
+
for (; Ta(b) && 4 != b.h;) {
|
|
3968
|
+
var d = b.i,
|
|
3969
|
+
e = c[d];
|
|
3970
|
+
if (!e) {
|
|
3971
|
+
var g = c[0];
|
|
3972
|
+
g && (g = g[d]) && (e = c[d] = Fb(g));
|
|
3973
|
+
}
|
|
3974
|
+
if (!e || !e(b, a, d)) if (e = b, d = a, g = e.j, Ua(e), !e.W) {
|
|
3975
|
+
var f = e.g.h;
|
|
3976
|
+
e = e.g.g;
|
|
3977
|
+
e = g === e ? Ia || (Ia = new Uint8Array(0)) : Ka ? f.slice(g, e) : new Uint8Array(f.subarray(g, e));
|
|
3978
|
+
(g = d.ba) ? g.push(e) : d.ba = [e];
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
return a;
|
|
3982
|
+
}
|
|
3983
|
+
function Ub(a, b, c) {
|
|
3984
|
+
if (Va.length) {
|
|
3985
|
+
var d = Va.pop();
|
|
3986
|
+
a && (Pa(d.g, a), d.i = -1, d.h = -1);
|
|
3987
|
+
a = d;
|
|
3988
|
+
} else a = new Sa(a);
|
|
3989
|
+
try {
|
|
3990
|
+
return Db(new b(), a, Cb(c));
|
|
3991
|
+
} finally {
|
|
3992
|
+
b = a.g, b.h = null, b.j = 0, b.i = 0, b.g = 0, b.v = !1, a.i = -1, a.h = -1, 100 > Va.length && Va.push(a);
|
|
3993
|
+
}
|
|
3994
|
+
}
|
|
3995
|
+
function Jb(a, b, c) {
|
|
3996
|
+
for (var d = c.length, e = 1 == d % 2, g = e ? 1 : 0; g < d; g += 2) (0, c[g + 1])(b, a, c[g]);
|
|
3997
|
+
wb(a, b, e ? c[0] : void 0);
|
|
3998
|
+
}
|
|
3999
|
+
function Vb(a, b) {
|
|
4000
|
+
var c = new Wa();
|
|
4001
|
+
Jb(a, c, Ib(b));
|
|
4002
|
+
T(c, c.g.end());
|
|
4003
|
+
a = new Uint8Array(c.h);
|
|
4004
|
+
b = c.i;
|
|
4005
|
+
for (var d = b.length, e = 0, g = 0; g < d; g++) {
|
|
4006
|
+
var f = b[g];
|
|
4007
|
+
a.set(f, e);
|
|
4008
|
+
e += f.length;
|
|
4009
|
+
}
|
|
4010
|
+
c.i = [a];
|
|
4011
|
+
return a;
|
|
4012
|
+
}
|
|
4013
|
+
function Wb(a, b) {
|
|
4014
|
+
return {
|
|
4015
|
+
O: a,
|
|
4016
|
+
P: b
|
|
4017
|
+
};
|
|
4018
|
+
}
|
|
4019
|
+
var Y = Wb(function (a, b, c) {
|
|
4020
|
+
if (5 !== a.h) return !1;
|
|
4021
|
+
a = a.g;
|
|
4022
|
+
var d = a.h[a.g];
|
|
4023
|
+
var e = a.h[a.g + 1];
|
|
4024
|
+
var g = a.h[a.g + 2],
|
|
4025
|
+
f = a.h[a.g + 3];
|
|
4026
|
+
a.g += 4;
|
|
4027
|
+
P(a);
|
|
4028
|
+
e = (d << 0 | e << 8 | g << 16 | f << 24) >>> 0;
|
|
4029
|
+
a = 2 * (e >> 31) + 1;
|
|
4030
|
+
d = e >>> 23 & 255;
|
|
4031
|
+
e &= 8388607;
|
|
4032
|
+
W(b, c, 255 == d ? e ? NaN : Infinity * a : 0 == d ? a * Math.pow(2, -149) * e : a * Math.pow(2, d - 150) * (e + Math.pow(2, 23)));
|
|
4033
|
+
return !0;
|
|
4034
|
+
}, function (a, b, c) {
|
|
4035
|
+
b = V(b, c);
|
|
4036
|
+
if (null != b) {
|
|
4037
|
+
S(a.g, 8 * c + 5);
|
|
4038
|
+
a = a.g;
|
|
4039
|
+
var d = b;
|
|
4040
|
+
d = (c = 0 > d ? 1 : 0) ? -d : d;
|
|
4041
|
+
0 === d ? 0 < 1 / d ? N = O = 0 : (O = 0, N = 2147483648) : isNaN(d) ? (O = 0, N = 2147483647) : 3.4028234663852886E38 < d ? (O = 0, N = (c << 31 | 2139095040) >>> 0) : 1.1754943508222875E-38 > d ? (d = Math.round(d / Math.pow(2, -149)), O = 0, N = (c << 31 | d) >>> 0) : (b = Math.floor(Math.log(d) / Math.LN2), d *= Math.pow(2, -b), d = Math.round(8388608 * d), 16777216 <= d && ++b, O = 0, N = (c << 31 | b + 127 << 23 | d & 8388607) >>> 0);
|
|
4042
|
+
c = N;
|
|
4043
|
+
a.g.push(c >>> 0 & 255);
|
|
4044
|
+
a.g.push(c >>> 8 & 255);
|
|
4045
|
+
a.g.push(c >>> 16 & 255);
|
|
4046
|
+
a.g.push(c >>> 24 & 255);
|
|
4047
|
+
}
|
|
4048
|
+
}),
|
|
4049
|
+
Xb = Wb(function (a, b, c) {
|
|
4050
|
+
if (0 !== a.h) return !1;
|
|
4051
|
+
for (var d = a.g, e = 128, g = 0, f = a = 0; 4 > f && 128 <= e; f++) e = d.h[d.g++], P(d), g |= (e & 127) << 7 * f;
|
|
4052
|
+
128 <= e && (e = d.h[d.g++], P(d), g |= (e & 127) << 28, a |= (e & 127) >> 4);
|
|
4053
|
+
if (128 <= e) for (f = 0; 5 > f && 128 <= e; f++) e = d.h[d.g++], P(d), a |= (e & 127) << 7 * f + 3;
|
|
4054
|
+
if (128 > e) {
|
|
4055
|
+
d = g >>> 0;
|
|
4056
|
+
e = a >>> 0;
|
|
4057
|
+
if (a = e & 2147483648) d = ~d + 1 >>> 0, e = ~e >>> 0, 0 == d && (e = e + 1 >>> 0);
|
|
4058
|
+
d = 4294967296 * e + (d >>> 0);
|
|
4059
|
+
} else throw Na();
|
|
4060
|
+
W(b, c, a ? -d : d);
|
|
4061
|
+
return !0;
|
|
4062
|
+
}, function (a, b, c) {
|
|
4063
|
+
b = V(b, c);
|
|
4064
|
+
if (null != b && null != b) {
|
|
4065
|
+
S(a.g, 8 * c);
|
|
4066
|
+
a = a.g;
|
|
4067
|
+
var d = b;
|
|
4068
|
+
c = 0 > d;
|
|
4069
|
+
d = Math.abs(d);
|
|
4070
|
+
b = d >>> 0;
|
|
4071
|
+
d = Math.floor((d - b) / 4294967296);
|
|
4072
|
+
d >>>= 0;
|
|
4073
|
+
c && (d = ~d >>> 0, b = (~b >>> 0) + 1, 4294967295 < b && (b = 0, d++, 4294967295 < d && (d = 0)));
|
|
4074
|
+
N = b;
|
|
4075
|
+
O = d;
|
|
4076
|
+
c = N;
|
|
4077
|
+
for (b = O; 0 < b || 127 < c;) a.g.push(c & 127 | 128), c = (c >>> 7 | b << 25) >>> 0, b >>>= 7;
|
|
4078
|
+
a.g.push(c);
|
|
4079
|
+
}
|
|
4080
|
+
}),
|
|
4081
|
+
Yb = Wb(function (a, b, c) {
|
|
4082
|
+
if (0 !== a.h) return !1;
|
|
4083
|
+
W(b, c, Q(a.g));
|
|
4084
|
+
return !0;
|
|
4085
|
+
}, function (a, b, c) {
|
|
4086
|
+
b = V(b, c);
|
|
4087
|
+
if (null != b && null != b) if (S(a.g, 8 * c), a = a.g, c = b, 0 <= c) S(a, c);else {
|
|
4088
|
+
for (b = 0; 9 > b; b++) a.g.push(c & 127 | 128), c >>= 7;
|
|
4089
|
+
a.g.push(1);
|
|
4090
|
+
}
|
|
4091
|
+
}),
|
|
4092
|
+
Zb = Wb(function (a, b, c) {
|
|
4093
|
+
if (2 !== a.h) return !1;
|
|
4094
|
+
var d = Q(a.g) >>> 0;
|
|
4095
|
+
a = a.g;
|
|
4096
|
+
var e = a.g;
|
|
4097
|
+
a.g += d;
|
|
4098
|
+
P(a);
|
|
4099
|
+
a = a.h;
|
|
4100
|
+
var g;
|
|
4101
|
+
if (ya) (g = xa) || (g = xa = new TextDecoder("utf-8", {
|
|
4102
|
+
fatal: !0
|
|
4103
|
+
})), g = g.decode(a.subarray(e, e + d));else {
|
|
4104
|
+
d = e + d;
|
|
4105
|
+
for (var f = [], h = null, k, l, m; e < d;) k = a[e++], 128 > k ? f.push(k) : 224 > k ? e >= d ? L() : (l = a[e++], 194 > k || 128 !== (l & 192) ? (e--, L()) : f.push((k & 31) << 6 | l & 63)) : 240 > k ? e >= d - 1 ? L() : (l = a[e++], 128 !== (l & 192) || 224 === k && 160 > l || 237 === k && 160 <= l || 128 !== ((g = a[e++]) & 192) ? (e--, L()) : f.push((k & 15) << 12 | (l & 63) << 6 | g & 63)) : 244 >= k ? e >= d - 2 ? L() : (l = a[e++], 128 !== (l & 192) || 0 !== (k << 28) + (l - 144) >> 30 || 128 !== ((g = a[e++]) & 192) || 128 !== ((m = a[e++]) & 192) ? (e--, L()) : (k = (k & 7) << 18 | (l & 63) << 12 | (g & 63) << 6 | m & 63, k -= 65536, f.push((k >> 10 & 1023) + 55296, (k & 1023) + 56320))) : L(), 8192 <= f.length && (h = wa(h, f), f.length = 0);
|
|
4106
|
+
g = wa(h, f);
|
|
4107
|
+
}
|
|
4108
|
+
W(b, c, g);
|
|
4109
|
+
return !0;
|
|
4110
|
+
}, function (a, b, c) {
|
|
4111
|
+
b = V(b, c);
|
|
4112
|
+
if (null != b) {
|
|
4113
|
+
var d = !1;
|
|
4114
|
+
d = void 0 === d ? !1 : d;
|
|
4115
|
+
if (Aa) {
|
|
4116
|
+
if (d && /(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/.test(b)) throw Error("Found an unpaired surrogate");
|
|
4117
|
+
b = (za || (za = new TextEncoder())).encode(b);
|
|
4118
|
+
} else {
|
|
4119
|
+
for (var e = 0, g = new Uint8Array(3 * b.length), f = 0; f < b.length; f++) {
|
|
4120
|
+
var h = b.charCodeAt(f);
|
|
4121
|
+
if (128 > h) g[e++] = h;else {
|
|
4122
|
+
if (2048 > h) g[e++] = h >> 6 | 192;else {
|
|
4123
|
+
if (55296 <= h && 57343 >= h) {
|
|
4124
|
+
if (56319 >= h && f < b.length) {
|
|
4125
|
+
var k = b.charCodeAt(++f);
|
|
4126
|
+
if (56320 <= k && 57343 >= k) {
|
|
4127
|
+
h = 1024 * (h - 55296) + k - 56320 + 65536;
|
|
4128
|
+
g[e++] = h >> 18 | 240;
|
|
4129
|
+
g[e++] = h >> 12 & 63 | 128;
|
|
4130
|
+
g[e++] = h >> 6 & 63 | 128;
|
|
4131
|
+
g[e++] = h & 63 | 128;
|
|
4132
|
+
continue;
|
|
4133
|
+
} else f--;
|
|
4134
|
+
}
|
|
4135
|
+
if (d) throw Error("Found an unpaired surrogate");
|
|
4136
|
+
h = 65533;
|
|
4137
|
+
}
|
|
4138
|
+
g[e++] = h >> 12 | 224;
|
|
4139
|
+
g[e++] = h >> 6 & 63 | 128;
|
|
4140
|
+
}
|
|
4141
|
+
g[e++] = h & 63 | 128;
|
|
4142
|
+
}
|
|
4143
|
+
}
|
|
4144
|
+
b = g.subarray(0, e);
|
|
4145
|
+
}
|
|
4146
|
+
S(a.g, 8 * c + 2);
|
|
4147
|
+
S(a.g, b.length);
|
|
4148
|
+
T(a, a.g.end());
|
|
4149
|
+
T(a, b);
|
|
4150
|
+
}
|
|
4151
|
+
}),
|
|
4152
|
+
$b = Wb(function (a, b, c, d, e) {
|
|
4153
|
+
if (2 !== a.h) return !1;
|
|
4154
|
+
b = jb(b, c, d);
|
|
4155
|
+
c = a.g.i;
|
|
4156
|
+
d = Q(a.g) >>> 0;
|
|
4157
|
+
var g = a.g.g + d,
|
|
4158
|
+
f = g - c;
|
|
4159
|
+
0 >= f && (a.g.i = g, e(b, a), f = g - a.g.g);
|
|
4160
|
+
if (f) throw Error("Message parsing ended unexpectedly. Expected to read " + (d + " bytes, instead read " + (d - f) + " bytes, either the data ended unexpectedly or the message misreported its own length"));
|
|
4161
|
+
a.g.g = g;
|
|
4162
|
+
a.g.i = c;
|
|
4163
|
+
return !0;
|
|
4164
|
+
}, function (a, b, c, d, e) {
|
|
4165
|
+
b = ib(b, d, c);
|
|
4166
|
+
if (null != b) for (d = 0; d < b.length; d++) {
|
|
4167
|
+
var g = a;
|
|
4168
|
+
S(g.g, 8 * c + 2);
|
|
4169
|
+
var f = g.g.end();
|
|
4170
|
+
T(g, f);
|
|
4171
|
+
f.push(g.h);
|
|
4172
|
+
g = f;
|
|
4173
|
+
e(b[d], a);
|
|
4174
|
+
f = a;
|
|
4175
|
+
var h = g.pop();
|
|
4176
|
+
for (h = f.h + f.g.length() - h; 127 < h;) g.push(h & 127 | 128), h >>>= 7, f.h++;
|
|
4177
|
+
g.push(h);
|
|
4178
|
+
f.h++;
|
|
4179
|
+
}
|
|
4180
|
+
});
|
|
4181
|
+
function Z() {
|
|
4182
|
+
ub.apply(this, arguments);
|
|
4183
|
+
}
|
|
4184
|
+
E(Z, ub);
|
|
4185
|
+
if (fb) {
|
|
4186
|
+
var ac = {};
|
|
4187
|
+
Object.defineProperties(Z, (ac[Symbol.hasInstance] = gb(Object[Symbol.hasInstance]), ac));
|
|
4188
|
+
}
|
|
4189
|
+
function bc(a) {
|
|
4190
|
+
Z.call(this, a);
|
|
4191
|
+
}
|
|
4192
|
+
E(bc, Z);
|
|
4193
|
+
function cc() {
|
|
4194
|
+
return [1, Yb, 2, Y, 3, Zb, 4, Zb];
|
|
4195
|
+
}
|
|
4196
|
+
function dc(a) {
|
|
4197
|
+
Z.call(this, a, -1, ec);
|
|
4198
|
+
}
|
|
4199
|
+
E(dc, Z);
|
|
4200
|
+
dc.prototype.addClassification = function (a, b) {
|
|
4201
|
+
jb(this, 1, bc, a, b);
|
|
4202
|
+
return this;
|
|
4203
|
+
};
|
|
4204
|
+
function fc() {
|
|
4205
|
+
return [1, $b, bc, cc];
|
|
4206
|
+
}
|
|
4207
|
+
var ec = [1];
|
|
4208
|
+
function gc(a) {
|
|
4209
|
+
Z.call(this, a);
|
|
4210
|
+
}
|
|
4211
|
+
E(gc, Z);
|
|
4212
|
+
function hc() {
|
|
4213
|
+
return [1, Y, 2, Y, 3, Y, 4, Y, 5, Y];
|
|
4214
|
+
}
|
|
4215
|
+
function ic(a) {
|
|
4216
|
+
Z.call(this, a, -1, jc);
|
|
4217
|
+
}
|
|
4218
|
+
E(ic, Z);
|
|
4219
|
+
function kc() {
|
|
4220
|
+
return [1, $b, gc, hc];
|
|
4221
|
+
}
|
|
4222
|
+
var jc = [1];
|
|
4223
|
+
function lc(a) {
|
|
4224
|
+
Z.call(this, a);
|
|
4225
|
+
}
|
|
4226
|
+
E(lc, Z);
|
|
4227
|
+
function mc() {
|
|
4228
|
+
return [1, Y, 2, Y, 3, Y, 4, Y, 5, Y, 6, Xb];
|
|
4229
|
+
}
|
|
4230
|
+
var nc = [[61, 146], [146, 91], [91, 181], [181, 84], [84, 17], [17, 314], [314, 405], [405, 321], [321, 375], [375, 291], [61, 185], [185, 40], [40, 39], [39, 37], [37, 0], [0, 267], [267, 269], [269, 270], [270, 409], [409, 291], [78, 95], [95, 88], [88, 178], [178, 87], [87, 14], [14, 317], [317, 402], [402, 318], [318, 324], [324, 308], [78, 191], [191, 80], [80, 81], [81, 82], [82, 13], [13, 312], [312, 311], [311, 310], [310, 415], [415, 308]],
|
|
4231
|
+
oc = [[263, 249], [249, 390], [390, 373], [373, 374], [374, 380], [380, 381], [381, 382], [382, 362], [263, 466], [466, 388], [388, 387], [387, 386], [386, 385], [385, 384], [384, 398], [398, 362]],
|
|
4232
|
+
pc = [[276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]],
|
|
4233
|
+
qc = [[33, 7], [7, 163], [163, 144], [144, 145], [145, 153], [153, 154], [154, 155], [155, 133], [33, 246], [246, 161], [161, 160], [160, 159], [159, 158], [158, 157], [157, 173], [173, 133]],
|
|
4234
|
+
rc = [[46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]],
|
|
4235
|
+
sc = [[10, 338], [338, 297], [297, 332], [332, 284], [284, 251], [251, 389], [389, 356], [356, 454], [454, 323], [323, 361], [361, 288], [288, 397], [397, 365], [365, 379], [379, 378], [378, 400], [400, 377], [377, 152], [152, 148], [148, 176], [176, 149], [149, 150], [150, 136], [136, 172], [172, 58], [58, 132], [132, 93], [93, 234], [234, 127], [127, 162], [162, 21], [21, 54], [54, 103], [103, 67], [67, 109], [109, 10]],
|
|
4236
|
+
tc = [].concat(D(nc), D(oc), D(pc), D(qc), D(rc), D(sc));
|
|
4237
|
+
function uc(a, b, c) {
|
|
4238
|
+
c = a.createShader(0 === c ? a.VERTEX_SHADER : a.FRAGMENT_SHADER);
|
|
4239
|
+
a.shaderSource(c, b);
|
|
4240
|
+
a.compileShader(c);
|
|
4241
|
+
if (!a.getShaderParameter(c, a.COMPILE_STATUS)) throw Error("Could not compile WebGL shader.\n\n" + a.getShaderInfoLog(c));
|
|
4242
|
+
return c;
|
|
4243
|
+
}
|
|
4244
|
+
function vc(a) {
|
|
4245
|
+
return ib(a, bc, 1).map(function (b) {
|
|
4246
|
+
return {
|
|
4247
|
+
index: kb(b, 1),
|
|
4248
|
+
ga: X(b, 2),
|
|
4249
|
+
label: null != V(b, 3) ? lb(b, 3) : void 0,
|
|
4250
|
+
displayName: null != V(b, 4) ? lb(b, 4) : void 0
|
|
4251
|
+
};
|
|
4252
|
+
});
|
|
4253
|
+
}
|
|
4254
|
+
function wc(a) {
|
|
4255
|
+
return {
|
|
4256
|
+
x: X(a, 1),
|
|
4257
|
+
y: X(a, 2),
|
|
4258
|
+
z: X(a, 3),
|
|
4259
|
+
visibility: null != V(a, 4) ? X(a, 4) : void 0
|
|
4260
|
+
};
|
|
4261
|
+
}
|
|
4262
|
+
function xc(a, b) {
|
|
4263
|
+
this.h = a;
|
|
4264
|
+
this.g = b;
|
|
4265
|
+
this.l = 0;
|
|
4266
|
+
}
|
|
4267
|
+
function yc(a, b, c) {
|
|
4268
|
+
zc(a, b);
|
|
4269
|
+
if ("function" === typeof a.g.canvas.transferToImageBitmap) return Promise.resolve(a.g.canvas.transferToImageBitmap());
|
|
4270
|
+
if (c) return Promise.resolve(a.g.canvas);
|
|
4271
|
+
if ("function" === typeof createImageBitmap) return createImageBitmap(a.g.canvas);
|
|
4272
|
+
void 0 === a.i && (a.i = document.createElement("canvas"));
|
|
4273
|
+
return new Promise(function (d) {
|
|
4274
|
+
a.i.height = a.g.canvas.height;
|
|
4275
|
+
a.i.width = a.g.canvas.width;
|
|
4276
|
+
a.i.getContext("2d", {}).drawImage(a.g.canvas, 0, 0, a.g.canvas.width, a.g.canvas.height);
|
|
4277
|
+
d(a.i);
|
|
4278
|
+
});
|
|
4279
|
+
}
|
|
4280
|
+
function zc(a, b) {
|
|
4281
|
+
var c = a.g;
|
|
4282
|
+
if (void 0 === a.o) {
|
|
4283
|
+
var d = uc(c, "\n attribute vec2 aVertex;\n attribute vec2 aTex;\n varying vec2 vTex;\n void main(void) {\n gl_Position = vec4(aVertex, 0.0, 1.0);\n vTex = aTex;\n }", 0),
|
|
4284
|
+
e = uc(c, "\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D sampler0;\n void main(){\n gl_FragColor = texture2D(sampler0, vTex);\n }", 1),
|
|
4285
|
+
g = c.createProgram();
|
|
4286
|
+
c.attachShader(g, d);
|
|
4287
|
+
c.attachShader(g, e);
|
|
4288
|
+
c.linkProgram(g);
|
|
4289
|
+
if (!c.getProgramParameter(g, c.LINK_STATUS)) throw Error("Could not compile WebGL program.\n\n" + c.getProgramInfoLog(g));
|
|
4290
|
+
d = a.o = g;
|
|
4291
|
+
c.useProgram(d);
|
|
4292
|
+
e = c.getUniformLocation(d, "sampler0");
|
|
4293
|
+
a.j = {
|
|
4294
|
+
K: c.getAttribLocation(d, "aVertex"),
|
|
4295
|
+
J: c.getAttribLocation(d, "aTex"),
|
|
4296
|
+
ma: e
|
|
4297
|
+
};
|
|
4298
|
+
a.u = c.createBuffer();
|
|
4299
|
+
c.bindBuffer(c.ARRAY_BUFFER, a.u);
|
|
4300
|
+
c.enableVertexAttribArray(a.j.K);
|
|
4301
|
+
c.vertexAttribPointer(a.j.K, 2, c.FLOAT, !1, 0, 0);
|
|
4302
|
+
c.bufferData(c.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), c.STATIC_DRAW);
|
|
4303
|
+
c.bindBuffer(c.ARRAY_BUFFER, null);
|
|
4304
|
+
a.s = c.createBuffer();
|
|
4305
|
+
c.bindBuffer(c.ARRAY_BUFFER, a.s);
|
|
4306
|
+
c.enableVertexAttribArray(a.j.J);
|
|
4307
|
+
c.vertexAttribPointer(a.j.J, 2, c.FLOAT, !1, 0, 0);
|
|
4308
|
+
c.bufferData(c.ARRAY_BUFFER, new Float32Array([0, 1, 0, 0, 1, 0, 1, 1]), c.STATIC_DRAW);
|
|
4309
|
+
c.bindBuffer(c.ARRAY_BUFFER, null);
|
|
4310
|
+
c.uniform1i(e, 0);
|
|
4311
|
+
}
|
|
4312
|
+
d = a.j;
|
|
4313
|
+
c.useProgram(a.o);
|
|
4314
|
+
c.canvas.width = b.width;
|
|
4315
|
+
c.canvas.height = b.height;
|
|
4316
|
+
c.viewport(0, 0, b.width, b.height);
|
|
4317
|
+
c.activeTexture(c.TEXTURE0);
|
|
4318
|
+
a.h.bindTexture2d(b.glName);
|
|
4319
|
+
c.enableVertexAttribArray(d.K);
|
|
4320
|
+
c.bindBuffer(c.ARRAY_BUFFER, a.u);
|
|
4321
|
+
c.vertexAttribPointer(d.K, 2, c.FLOAT, !1, 0, 0);
|
|
4322
|
+
c.enableVertexAttribArray(d.J);
|
|
4323
|
+
c.bindBuffer(c.ARRAY_BUFFER, a.s);
|
|
4324
|
+
c.vertexAttribPointer(d.J, 2, c.FLOAT, !1, 0, 0);
|
|
4325
|
+
c.bindFramebuffer(c.DRAW_FRAMEBUFFER ? c.DRAW_FRAMEBUFFER : c.FRAMEBUFFER, null);
|
|
4326
|
+
c.clearColor(0, 0, 0, 0);
|
|
4327
|
+
c.clear(c.COLOR_BUFFER_BIT);
|
|
4328
|
+
c.colorMask(!0, !0, !0, !0);
|
|
4329
|
+
c.drawArrays(c.TRIANGLE_FAN, 0, 4);
|
|
4330
|
+
c.disableVertexAttribArray(d.K);
|
|
4331
|
+
c.disableVertexAttribArray(d.J);
|
|
4332
|
+
c.bindBuffer(c.ARRAY_BUFFER, null);
|
|
4333
|
+
a.h.bindTexture2d(0);
|
|
4334
|
+
}
|
|
4335
|
+
function Ac(a) {
|
|
4336
|
+
this.g = a;
|
|
4337
|
+
}
|
|
4338
|
+
var Bc = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0, 0, 3, 2, 1, 0, 10, 9, 1, 7, 0, 65, 0, 253, 15, 26, 11]);
|
|
4339
|
+
function Cc(a, b) {
|
|
4340
|
+
return b + a;
|
|
4341
|
+
}
|
|
4342
|
+
function Dc(a, b) {
|
|
4343
|
+
window[a] = b;
|
|
4344
|
+
}
|
|
4345
|
+
function Ec(a) {
|
|
4346
|
+
var b = document.createElement("script");
|
|
4347
|
+
b.setAttribute("src", a);
|
|
4348
|
+
b.setAttribute("crossorigin", "anonymous");
|
|
4349
|
+
return new Promise(function (c) {
|
|
4350
|
+
b.addEventListener("load", function () {
|
|
4351
|
+
c();
|
|
4352
|
+
}, !1);
|
|
4353
|
+
b.addEventListener("error", function () {
|
|
4354
|
+
c();
|
|
4355
|
+
}, !1);
|
|
4356
|
+
document.body.appendChild(b);
|
|
4357
|
+
});
|
|
4358
|
+
}
|
|
4359
|
+
function Fc() {
|
|
4360
|
+
return J(function (a) {
|
|
4361
|
+
switch (a.g) {
|
|
4362
|
+
case 1:
|
|
4363
|
+
return a.o = 2, G(a, WebAssembly.instantiate(Bc), 4);
|
|
4364
|
+
case 4:
|
|
4365
|
+
a.g = 3;
|
|
4366
|
+
a.o = 0;
|
|
4367
|
+
break;
|
|
4368
|
+
case 2:
|
|
4369
|
+
return a.o = 0, a.j = null, a["return"](!1);
|
|
4370
|
+
case 3:
|
|
4371
|
+
return a["return"](!0);
|
|
4372
|
+
}
|
|
4373
|
+
});
|
|
4374
|
+
}
|
|
4375
|
+
function Gc(a) {
|
|
4376
|
+
this.g = a;
|
|
4377
|
+
this.listeners = {};
|
|
4378
|
+
this.j = {};
|
|
4379
|
+
this.H = {};
|
|
4380
|
+
this.o = {};
|
|
4381
|
+
this.u = {};
|
|
4382
|
+
this.I = this.s = this.Z = !0;
|
|
4383
|
+
this.D = Promise.resolve();
|
|
4384
|
+
this.Y = "";
|
|
4385
|
+
this.C = {};
|
|
4386
|
+
this.locateFile = a && a.locateFile || Cc;
|
|
4387
|
+
if ("object" === typeof window) var b = window.location.pathname.toString().substring(0, window.location.pathname.toString().lastIndexOf("/")) + "/";else if ("undefined" !== typeof location) b = location.pathname.toString().substring(0, location.pathname.toString().lastIndexOf("/")) + "/";else throw Error("solutions can only be loaded on a web page or in a web worker");
|
|
4388
|
+
this.$ = b;
|
|
4389
|
+
if (a.options) {
|
|
4390
|
+
b = C(Object.keys(a.options));
|
|
4391
|
+
for (var c = b.next(); !c.done; c = b.next()) {
|
|
4392
|
+
c = c.value;
|
|
4393
|
+
var d = a.options[c]["default"];
|
|
4394
|
+
void 0 !== d && (this.j[c] = "function" === typeof d ? d() : d);
|
|
4395
|
+
}
|
|
4396
|
+
}
|
|
4397
|
+
}
|
|
4398
|
+
x = Gc.prototype;
|
|
4399
|
+
x.close = function () {
|
|
4400
|
+
this.i && this.i["delete"]();
|
|
4401
|
+
return Promise.resolve();
|
|
4402
|
+
};
|
|
4403
|
+
function Hc(a) {
|
|
4404
|
+
var b, c, d, e, g, f, h, k, l, m, q;
|
|
4405
|
+
return J(function (p) {
|
|
4406
|
+
switch (p.g) {
|
|
4407
|
+
case 1:
|
|
4408
|
+
if (!a.Z) return p["return"]();
|
|
4409
|
+
b = void 0 === a.g.files ? [] : "function" === typeof a.g.files ? a.g.files(a.j) : a.g.files;
|
|
4410
|
+
return G(p, Fc(), 2);
|
|
4411
|
+
case 2:
|
|
4412
|
+
c = p.h;
|
|
4413
|
+
if ("object" === typeof window) return Dc("createMediapipeSolutionsWasm", {
|
|
4414
|
+
locateFile: a.locateFile
|
|
4415
|
+
}), Dc("createMediapipeSolutionsPackedAssets", {
|
|
4416
|
+
locateFile: a.locateFile
|
|
4417
|
+
}), f = b.filter(function (n) {
|
|
4418
|
+
return void 0 !== n.data;
|
|
4419
|
+
}), h = b.filter(function (n) {
|
|
4420
|
+
return void 0 === n.data;
|
|
4421
|
+
}), k = Promise.all(f.map(function (n) {
|
|
4422
|
+
var r = Ic(a, n.url);
|
|
4423
|
+
if (void 0 !== n.path) {
|
|
4424
|
+
var t = n.path;
|
|
4425
|
+
r = r.then(function (w) {
|
|
4426
|
+
a.overrideFile(t, w);
|
|
4427
|
+
return Promise.resolve(w);
|
|
4428
|
+
});
|
|
4429
|
+
}
|
|
4430
|
+
return r;
|
|
4431
|
+
})), l = Promise.all(h.map(function (n) {
|
|
4432
|
+
return void 0 === n.simd || n.simd && c || !n.simd && !c ? Ec(a.locateFile(n.url, a.$)) : Promise.resolve();
|
|
4433
|
+
})).then(function () {
|
|
4434
|
+
var n, r, t;
|
|
4435
|
+
return J(function (w) {
|
|
4436
|
+
if (1 == w.g) return n = window.createMediapipeSolutionsWasm, r = window.createMediapipeSolutionsPackedAssets, t = a, G(w, n(r), 2);
|
|
4437
|
+
t.h = w.h;
|
|
4438
|
+
w.g = 0;
|
|
4439
|
+
});
|
|
4440
|
+
}), m = function () {
|
|
4441
|
+
return J(function (n) {
|
|
4442
|
+
a.g.graph && a.g.graph.url ? n = G(n, Ic(a, a.g.graph.url), 0) : (n.g = 0, n = void 0);
|
|
4443
|
+
return n;
|
|
4444
|
+
});
|
|
4445
|
+
}(), G(p, Promise.all([l, k, m]), 7);
|
|
4446
|
+
if ("function" !== typeof importScripts) throw Error("solutions can only be loaded on a web page or in a web worker");
|
|
4447
|
+
d = b.filter(function (n) {
|
|
4448
|
+
return void 0 === n.simd || n.simd && c || !n.simd && !c;
|
|
4449
|
+
}).map(function (n) {
|
|
4450
|
+
return a.locateFile(n.url, a.$);
|
|
4451
|
+
});
|
|
4452
|
+
importScripts.apply(null, D(d));
|
|
4453
|
+
e = a;
|
|
4454
|
+
return G(p, createMediapipeSolutionsWasm(Module), 6);
|
|
4455
|
+
case 6:
|
|
4456
|
+
e.h = p.h;
|
|
4457
|
+
a.l = new OffscreenCanvas(1, 1);
|
|
4458
|
+
a.h.canvas = a.l;
|
|
4459
|
+
g = a.h.GL.createContext(a.l, {
|
|
4460
|
+
antialias: !1,
|
|
4461
|
+
alpha: !1,
|
|
4462
|
+
ja: "undefined" !== typeof WebGL2RenderingContext ? 2 : 1
|
|
4463
|
+
});
|
|
4464
|
+
a.h.GL.makeContextCurrent(g);
|
|
4465
|
+
p.g = 4;
|
|
4466
|
+
break;
|
|
4467
|
+
case 7:
|
|
4468
|
+
a.l = document.createElement("canvas");
|
|
4469
|
+
q = a.l.getContext("webgl2", {});
|
|
4470
|
+
if (!q && (q = a.l.getContext("webgl", {}), !q)) return alert("Failed to create WebGL canvas context when passing video frame."), p["return"]();
|
|
4471
|
+
a.G = q;
|
|
4472
|
+
a.h.canvas = a.l;
|
|
4473
|
+
a.h.createContext(a.l, !0, !0, {});
|
|
4474
|
+
case 4:
|
|
4475
|
+
a.i = new a.h.SolutionWasm(), a.Z = !1, p.g = 0;
|
|
4476
|
+
}
|
|
4477
|
+
});
|
|
4478
|
+
}
|
|
4479
|
+
function Jc(a) {
|
|
4480
|
+
var b, c, d, e, g, f, h, k;
|
|
4481
|
+
return J(function (l) {
|
|
4482
|
+
if (1 == l.g) {
|
|
4483
|
+
if (a.g.graph && a.g.graph.url && a.Y === a.g.graph.url) return l["return"]();
|
|
4484
|
+
a.s = !0;
|
|
4485
|
+
if (!a.g.graph || !a.g.graph.url) {
|
|
4486
|
+
l.g = 2;
|
|
4487
|
+
return;
|
|
4488
|
+
}
|
|
4489
|
+
a.Y = a.g.graph.url;
|
|
4490
|
+
return G(l, Ic(a, a.g.graph.url), 3);
|
|
4491
|
+
}
|
|
4492
|
+
2 != l.g && (b = l.h, a.i.loadGraph(b));
|
|
4493
|
+
c = C(Object.keys(a.C));
|
|
4494
|
+
for (d = c.next(); !d.done; d = c.next()) e = d.value, a.i.overrideFile(e, a.C[e]);
|
|
4495
|
+
a.C = {};
|
|
4496
|
+
if (a.g.listeners) for (g = C(a.g.listeners), f = g.next(); !f.done; f = g.next()) h = f.value, Kc(a, h);
|
|
4497
|
+
k = a.j;
|
|
4498
|
+
a.j = {};
|
|
4499
|
+
a.setOptions(k);
|
|
4500
|
+
l.g = 0;
|
|
4501
|
+
});
|
|
4502
|
+
}
|
|
4503
|
+
x.reset = function () {
|
|
4504
|
+
var a = this;
|
|
4505
|
+
return J(function (b) {
|
|
4506
|
+
a.i && (a.i.reset(), a.o = {}, a.u = {});
|
|
4507
|
+
b.g = 0;
|
|
4508
|
+
});
|
|
4509
|
+
};
|
|
4510
|
+
x.setOptions = function (a, b) {
|
|
4511
|
+
var c = this;
|
|
4512
|
+
if (b = b || this.g.options) {
|
|
4513
|
+
for (var d = [], e = [], g = {}, f = C(Object.keys(a)), h = f.next(); !h.done; g = {
|
|
4514
|
+
R: g.R,
|
|
4515
|
+
S: g.S
|
|
4516
|
+
}, h = f.next()) {
|
|
4517
|
+
var k = h.value;
|
|
4518
|
+
k in this.j && this.j[k] === a[k] || (this.j[k] = a[k], h = b[k], void 0 !== h && (h.onChange && (g.R = h.onChange, g.S = a[k], d.push(function (l) {
|
|
4519
|
+
return function () {
|
|
4520
|
+
var m;
|
|
4521
|
+
return J(function (q) {
|
|
4522
|
+
if (1 == q.g) return G(q, l.R(l.S), 2);
|
|
4523
|
+
m = q.h;
|
|
4524
|
+
!0 === m && (c.s = !0);
|
|
4525
|
+
q.g = 0;
|
|
4526
|
+
});
|
|
4527
|
+
};
|
|
4528
|
+
}(g))), h.graphOptionXref && (k = {
|
|
4529
|
+
valueNumber: 1 === h.type ? a[k] : 0,
|
|
4530
|
+
valueBoolean: 0 === h.type ? a[k] : !1,
|
|
4531
|
+
valueString: 2 === h.type ? a[k] : ""
|
|
4532
|
+
}, h = Object.assign(Object.assign(Object.assign({}, {
|
|
4533
|
+
calculatorName: "",
|
|
4534
|
+
calculatorIndex: 0
|
|
4535
|
+
}), h.graphOptionXref), k), e.push(h))));
|
|
4536
|
+
}
|
|
4537
|
+
if (0 !== d.length || 0 !== e.length) this.s = !0, this.B = (void 0 === this.B ? [] : this.B).concat(e), this.A = (void 0 === this.A ? [] : this.A).concat(d);
|
|
4538
|
+
}
|
|
4539
|
+
};
|
|
4540
|
+
function Lc(a) {
|
|
4541
|
+
var b, c, d, e, g, f, h;
|
|
4542
|
+
return J(function (k) {
|
|
4543
|
+
switch (k.g) {
|
|
4544
|
+
case 1:
|
|
4545
|
+
if (!a.s) return k["return"]();
|
|
4546
|
+
if (!a.A) {
|
|
4547
|
+
k.g = 2;
|
|
4548
|
+
break;
|
|
4549
|
+
}
|
|
4550
|
+
b = C(a.A);
|
|
4551
|
+
c = b.next();
|
|
4552
|
+
case 3:
|
|
4553
|
+
if (c.done) {
|
|
4554
|
+
k.g = 5;
|
|
4555
|
+
break;
|
|
4556
|
+
}
|
|
4557
|
+
d = c.value;
|
|
4558
|
+
return G(k, d(), 4);
|
|
4559
|
+
case 4:
|
|
4560
|
+
c = b.next();
|
|
4561
|
+
k.g = 3;
|
|
4562
|
+
break;
|
|
4563
|
+
case 5:
|
|
4564
|
+
a.A = void 0;
|
|
4565
|
+
case 2:
|
|
4566
|
+
if (a.B) {
|
|
4567
|
+
e = new a.h.GraphOptionChangeRequestList();
|
|
4568
|
+
g = C(a.B);
|
|
4569
|
+
for (f = g.next(); !f.done; f = g.next()) h = f.value, e.push_back(h);
|
|
4570
|
+
a.i.changeOptions(e);
|
|
4571
|
+
e["delete"]();
|
|
4572
|
+
a.B = void 0;
|
|
4573
|
+
}
|
|
4574
|
+
a.s = !1;
|
|
4575
|
+
k.g = 0;
|
|
4576
|
+
}
|
|
4577
|
+
});
|
|
4578
|
+
}
|
|
4579
|
+
x.initialize = function () {
|
|
4580
|
+
var a = this;
|
|
4581
|
+
return J(function (b) {
|
|
4582
|
+
return 1 == b.g ? G(b, Hc(a), 2) : 3 != b.g ? G(b, Jc(a), 3) : G(b, Lc(a), 0);
|
|
4583
|
+
});
|
|
4584
|
+
};
|
|
4585
|
+
function Ic(a, b) {
|
|
4586
|
+
var c, d;
|
|
4587
|
+
return J(function (e) {
|
|
4588
|
+
if (b in a.H) return e["return"](a.H[b]);
|
|
4589
|
+
c = a.locateFile(b, "");
|
|
4590
|
+
d = fetch(c).then(function (g) {
|
|
4591
|
+
return g.arrayBuffer();
|
|
4592
|
+
});
|
|
4593
|
+
a.H[b] = d;
|
|
4594
|
+
return e["return"](d);
|
|
4595
|
+
});
|
|
4596
|
+
}
|
|
4597
|
+
x.overrideFile = function (a, b) {
|
|
4598
|
+
this.i ? this.i.overrideFile(a, b) : this.C[a] = b;
|
|
4599
|
+
};
|
|
4600
|
+
x.clearOverriddenFiles = function () {
|
|
4601
|
+
this.C = {};
|
|
4602
|
+
this.i && this.i.clearOverriddenFiles();
|
|
4603
|
+
};
|
|
4604
|
+
x.send = function (a, b) {
|
|
4605
|
+
var c = this,
|
|
4606
|
+
d,
|
|
4607
|
+
e,
|
|
4608
|
+
g,
|
|
4609
|
+
f,
|
|
4610
|
+
h,
|
|
4611
|
+
k,
|
|
4612
|
+
l,
|
|
4613
|
+
m,
|
|
4614
|
+
q;
|
|
4615
|
+
return J(function (p) {
|
|
4616
|
+
switch (p.g) {
|
|
4617
|
+
case 1:
|
|
4618
|
+
if (!c.g.inputs) return p["return"]();
|
|
4619
|
+
d = 1E3 * (void 0 === b || null === b ? performance.now() : b);
|
|
4620
|
+
return G(p, c.D, 2);
|
|
4621
|
+
case 2:
|
|
4622
|
+
return G(p, c.initialize(), 3);
|
|
4623
|
+
case 3:
|
|
4624
|
+
e = new c.h.PacketDataList();
|
|
4625
|
+
g = C(Object.keys(a));
|
|
4626
|
+
for (f = g.next(); !f.done; f = g.next()) if (h = f.value, k = c.g.inputs[h]) {
|
|
4627
|
+
a: {
|
|
4628
|
+
var n = a[h];
|
|
4629
|
+
switch (k.type) {
|
|
4630
|
+
case "video":
|
|
4631
|
+
var r = c.o[k.stream];
|
|
4632
|
+
r || (r = new xc(c.h, c.G), c.o[k.stream] = r);
|
|
4633
|
+
0 === r.l && (r.l = r.h.createTexture());
|
|
4634
|
+
if ("undefined" !== typeof HTMLVideoElement && n instanceof HTMLVideoElement) {
|
|
4635
|
+
var t = n.videoWidth;
|
|
4636
|
+
var w = n.videoHeight;
|
|
4637
|
+
} else "undefined" !== typeof HTMLImageElement && n instanceof HTMLImageElement ? (t = n.naturalWidth, w = n.naturalHeight) : (t = n.width, w = n.height);
|
|
4638
|
+
w = {
|
|
4639
|
+
glName: r.l,
|
|
4640
|
+
width: t,
|
|
4641
|
+
height: w
|
|
4642
|
+
};
|
|
4643
|
+
t = r.g;
|
|
4644
|
+
t.canvas.width = w.width;
|
|
4645
|
+
t.canvas.height = w.height;
|
|
4646
|
+
t.activeTexture(t.TEXTURE0);
|
|
4647
|
+
r.h.bindTexture2d(r.l);
|
|
4648
|
+
t.texImage2D(t.TEXTURE_2D, 0, t.RGBA, t.RGBA, t.UNSIGNED_BYTE, n);
|
|
4649
|
+
r.h.bindTexture2d(0);
|
|
4650
|
+
r = w;
|
|
4651
|
+
break a;
|
|
4652
|
+
case "detections":
|
|
4653
|
+
r = c.o[k.stream];
|
|
4654
|
+
r || (r = new Ac(c.h), c.o[k.stream] = r);
|
|
4655
|
+
r.data || (r.data = new r.g.DetectionListData());
|
|
4656
|
+
r.data.reset(n.length);
|
|
4657
|
+
for (w = 0; w < n.length; ++w) {
|
|
4658
|
+
t = n[w];
|
|
4659
|
+
var v = r.data,
|
|
4660
|
+
A = v.setBoundingBox,
|
|
4661
|
+
I = w;
|
|
4662
|
+
var F = t.boundingBox;
|
|
4663
|
+
var u = new lc();
|
|
4664
|
+
W(u, 1, F.xCenter);
|
|
4665
|
+
W(u, 2, F.yCenter);
|
|
4666
|
+
W(u, 3, F.height);
|
|
4667
|
+
W(u, 4, F.width);
|
|
4668
|
+
W(u, 5, F.rotation);
|
|
4669
|
+
W(u, 6, F.rectId);
|
|
4670
|
+
F = Vb(u, mc);
|
|
4671
|
+
A.call(v, I, F);
|
|
4672
|
+
if (t.landmarks) for (v = 0; v < t.landmarks.length; ++v) {
|
|
4673
|
+
u = t.landmarks[v];
|
|
4674
|
+
var z = u.visibility ? !0 : !1;
|
|
4675
|
+
A = r.data;
|
|
4676
|
+
I = A.addNormalizedLandmark;
|
|
4677
|
+
F = w;
|
|
4678
|
+
u = Object.assign(Object.assign({}, u), {
|
|
4679
|
+
visibility: z ? u.visibility : 0
|
|
4680
|
+
});
|
|
4681
|
+
z = new gc();
|
|
4682
|
+
W(z, 1, u.x);
|
|
4683
|
+
W(z, 2, u.y);
|
|
4684
|
+
W(z, 3, u.z);
|
|
4685
|
+
u.visibility && W(z, 4, u.visibility);
|
|
4686
|
+
u = Vb(z, hc);
|
|
4687
|
+
I.call(A, F, u);
|
|
4688
|
+
}
|
|
4689
|
+
if (t.V) for (v = 0; v < t.V.length; ++v) A = r.data, I = A.addClassification, F = w, u = t.V[v], z = new bc(), W(z, 2, u.ga), u.index && W(z, 1, u.index), u.label && W(z, 3, u.label), u.displayName && W(z, 4, u.displayName), u = Vb(z, cc), I.call(A, F, u);
|
|
4690
|
+
}
|
|
4691
|
+
r = r.data;
|
|
4692
|
+
break a;
|
|
4693
|
+
default:
|
|
4694
|
+
r = {};
|
|
4695
|
+
}
|
|
4696
|
+
}
|
|
4697
|
+
l = r;
|
|
4698
|
+
m = k.stream;
|
|
4699
|
+
switch (k.type) {
|
|
4700
|
+
case "video":
|
|
4701
|
+
e.pushTexture2d(Object.assign(Object.assign({}, l), {
|
|
4702
|
+
stream: m,
|
|
4703
|
+
timestamp: d
|
|
4704
|
+
}));
|
|
4705
|
+
break;
|
|
4706
|
+
case "detections":
|
|
4707
|
+
q = l;
|
|
4708
|
+
q.stream = m;
|
|
4709
|
+
q.timestamp = d;
|
|
4710
|
+
e.pushDetectionList(q);
|
|
4711
|
+
break;
|
|
4712
|
+
default:
|
|
4713
|
+
throw Error("Unknown input config type: '" + k.type + "'");
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4716
|
+
c.i.send(e);
|
|
4717
|
+
return G(p, c.D, 4);
|
|
4718
|
+
case 4:
|
|
4719
|
+
e["delete"](), p.g = 0;
|
|
4720
|
+
}
|
|
4721
|
+
});
|
|
4722
|
+
};
|
|
4723
|
+
function Mc(a, b, c) {
|
|
4724
|
+
var d, e, g, f, h, k, l, m, q, p, n, r, t, w;
|
|
4725
|
+
return J(function (v) {
|
|
4726
|
+
switch (v.g) {
|
|
4727
|
+
case 1:
|
|
4728
|
+
if (!c) return v["return"](b);
|
|
4729
|
+
d = {};
|
|
4730
|
+
e = 0;
|
|
4731
|
+
g = C(Object.keys(c));
|
|
4732
|
+
for (f = g.next(); !f.done; f = g.next()) h = f.value, k = c[h], "string" !== typeof k && "texture" === k.type && void 0 !== b[k.stream] && ++e;
|
|
4733
|
+
1 < e && (a.I = !1);
|
|
4734
|
+
l = C(Object.keys(c));
|
|
4735
|
+
f = l.next();
|
|
4736
|
+
case 2:
|
|
4737
|
+
if (f.done) {
|
|
4738
|
+
v.g = 4;
|
|
4739
|
+
break;
|
|
4740
|
+
}
|
|
4741
|
+
m = f.value;
|
|
4742
|
+
q = c[m];
|
|
4743
|
+
if ("string" === typeof q) return t = d, w = m, G(v, Nc(a, m, b[q]), 14);
|
|
4744
|
+
p = b[q.stream];
|
|
4745
|
+
if ("detection_list" === q.type) {
|
|
4746
|
+
if (p) {
|
|
4747
|
+
var A = p.getRectList();
|
|
4748
|
+
for (var I = p.getLandmarksList(), F = p.getClassificationsList(), u = [], z = 0; z < A.size(); ++z) {
|
|
4749
|
+
var R = Ub(A.get(z), lc, mc);
|
|
4750
|
+
R = {
|
|
4751
|
+
boundingBox: {
|
|
4752
|
+
xCenter: X(R, 1),
|
|
4753
|
+
yCenter: X(R, 2),
|
|
4754
|
+
height: X(R, 3),
|
|
4755
|
+
width: X(R, 4),
|
|
4756
|
+
rotation: X(R, 5, 0),
|
|
4757
|
+
rectId: kb(R, 6)
|
|
4758
|
+
},
|
|
4759
|
+
landmarks: ib(Ub(I.get(z), ic, kc), gc, 1).map(wc),
|
|
4760
|
+
V: vc(Ub(F.get(z), dc, fc))
|
|
4761
|
+
};
|
|
4762
|
+
u.push(R);
|
|
4763
|
+
}
|
|
4764
|
+
A = u;
|
|
4765
|
+
} else A = [];
|
|
4766
|
+
d[m] = A;
|
|
4767
|
+
v.g = 7;
|
|
4768
|
+
break;
|
|
4769
|
+
}
|
|
4770
|
+
if ("proto_list" === q.type) {
|
|
4771
|
+
if (p) {
|
|
4772
|
+
A = Array(p.size());
|
|
4773
|
+
for (I = 0; I < p.size(); I++) A[I] = p.get(I);
|
|
4774
|
+
p["delete"]();
|
|
4775
|
+
} else A = [];
|
|
4776
|
+
d[m] = A;
|
|
4777
|
+
v.g = 7;
|
|
4778
|
+
break;
|
|
4779
|
+
}
|
|
4780
|
+
if (void 0 === p) {
|
|
4781
|
+
v.g = 3;
|
|
4782
|
+
break;
|
|
4783
|
+
}
|
|
4784
|
+
if ("float_list" === q.type) {
|
|
4785
|
+
d[m] = p;
|
|
4786
|
+
v.g = 7;
|
|
4787
|
+
break;
|
|
4788
|
+
}
|
|
4789
|
+
if ("proto" === q.type) {
|
|
4790
|
+
d[m] = p;
|
|
4791
|
+
v.g = 7;
|
|
4792
|
+
break;
|
|
4793
|
+
}
|
|
4794
|
+
if ("texture" !== q.type) throw Error("Unknown output config type: '" + q.type + "'");
|
|
4795
|
+
n = a.u[m];
|
|
4796
|
+
n || (n = new xc(a.h, a.G), a.u[m] = n);
|
|
4797
|
+
return G(v, yc(n, p, a.I), 13);
|
|
4798
|
+
case 13:
|
|
4799
|
+
r = v.h, d[m] = r;
|
|
4800
|
+
case 7:
|
|
4801
|
+
q.transform && d[m] && (d[m] = q.transform(d[m]));
|
|
4802
|
+
v.g = 3;
|
|
4803
|
+
break;
|
|
4804
|
+
case 14:
|
|
4805
|
+
t[w] = v.h;
|
|
4806
|
+
case 3:
|
|
4807
|
+
f = l.next();
|
|
4808
|
+
v.g = 2;
|
|
4809
|
+
break;
|
|
4810
|
+
case 4:
|
|
4811
|
+
return v["return"](d);
|
|
4812
|
+
}
|
|
4813
|
+
});
|
|
4814
|
+
}
|
|
4815
|
+
function Nc(a, b, c) {
|
|
4816
|
+
var d;
|
|
4817
|
+
return J(function (e) {
|
|
4818
|
+
return "number" === typeof c || c instanceof Uint8Array || c instanceof a.h.Uint8BlobList ? e["return"](c) : c instanceof a.h.Texture2dDataOut ? (d = a.u[b], d || (d = new xc(a.h, a.G), a.u[b] = d), e["return"](yc(d, c, a.I))) : e["return"](void 0);
|
|
4819
|
+
});
|
|
4820
|
+
}
|
|
4821
|
+
function Kc(a, b) {
|
|
4822
|
+
for (var c = b.name || "$", d = [].concat(D(b.wants)), e = new a.h.StringList(), g = C(b.wants), f = g.next(); !f.done; f = g.next()) e.push_back(f.value);
|
|
4823
|
+
g = a.h.PacketListener.implement({
|
|
4824
|
+
onResults: function onResults(h) {
|
|
4825
|
+
for (var k = {}, l = 0; l < b.wants.length; ++l) k[d[l]] = h.get(l);
|
|
4826
|
+
var m = a.listeners[c];
|
|
4827
|
+
m && (a.D = Mc(a, k, b.outs).then(function (q) {
|
|
4828
|
+
q = m(q);
|
|
4829
|
+
for (var p = 0; p < b.wants.length; ++p) {
|
|
4830
|
+
var n = k[d[p]];
|
|
4831
|
+
"object" === typeof n && n.hasOwnProperty && n.hasOwnProperty("delete") && n["delete"]();
|
|
4832
|
+
}
|
|
4833
|
+
q && (a.D = q);
|
|
4834
|
+
}));
|
|
4835
|
+
}
|
|
4836
|
+
});
|
|
4837
|
+
a.i.attachMultiListener(e, g);
|
|
4838
|
+
e["delete"]();
|
|
4839
|
+
}
|
|
4840
|
+
x.onResults = function (a, b) {
|
|
4841
|
+
this.listeners[b || "$"] = a;
|
|
4842
|
+
};
|
|
4843
|
+
K("Solution", Gc);
|
|
4844
|
+
K("OptionType", {
|
|
4845
|
+
BOOL: 0,
|
|
4846
|
+
NUMBER: 1,
|
|
4847
|
+
ia: 2,
|
|
4848
|
+
0: "BOOL",
|
|
4849
|
+
1: "NUMBER",
|
|
4850
|
+
2: "STRING"
|
|
4851
|
+
});
|
|
4852
|
+
function Oc(a) {
|
|
4853
|
+
var b = this;
|
|
4854
|
+
a = a || {};
|
|
4855
|
+
var c = {
|
|
4856
|
+
url: "face_detection_short.binarypb"
|
|
4857
|
+
},
|
|
4858
|
+
d = {
|
|
4859
|
+
type: 1,
|
|
4860
|
+
graphOptionXref: {
|
|
4861
|
+
calculatorType: "TensorsToDetectionsCalculator",
|
|
4862
|
+
calculatorName: "facedetectionshortrangegpu__facedetectionshortrangecommon__TensorsToDetectionsCalculator",
|
|
4863
|
+
fieldName: "min_score_thresh"
|
|
4864
|
+
}
|
|
4865
|
+
};
|
|
4866
|
+
this.g = new Gc({
|
|
4867
|
+
locateFile: a.locateFile,
|
|
4868
|
+
files: [{
|
|
4869
|
+
data: !0,
|
|
4870
|
+
url: "face_detection_short.binarypb"
|
|
4871
|
+
}, {
|
|
4872
|
+
data: !0,
|
|
4873
|
+
url: "face_detection_short_range.tflite"
|
|
4874
|
+
}, {
|
|
4875
|
+
simd: !0,
|
|
4876
|
+
url: "face_detection_solution_simd_wasm_bin.js"
|
|
4877
|
+
}, {
|
|
4878
|
+
simd: !1,
|
|
4879
|
+
url: "face_detection_solution_wasm_bin.js"
|
|
4880
|
+
}],
|
|
4881
|
+
graph: c,
|
|
4882
|
+
listeners: [{
|
|
4883
|
+
wants: ["detections", "image_transformed"],
|
|
4884
|
+
outs: {
|
|
4885
|
+
image: "image_transformed",
|
|
4886
|
+
detections: {
|
|
4887
|
+
type: "detection_list",
|
|
4888
|
+
stream: "detections"
|
|
4889
|
+
}
|
|
4890
|
+
}
|
|
4891
|
+
}],
|
|
4892
|
+
inputs: {
|
|
4893
|
+
image: {
|
|
4894
|
+
type: "video",
|
|
4895
|
+
stream: "input_frames_gpu"
|
|
4896
|
+
}
|
|
4897
|
+
},
|
|
4898
|
+
options: {
|
|
4899
|
+
useCpuInference: {
|
|
4900
|
+
type: 0,
|
|
4901
|
+
graphOptionXref: {
|
|
4902
|
+
calculatorType: "InferenceCalculator",
|
|
4903
|
+
fieldName: "use_cpu_inference"
|
|
4904
|
+
},
|
|
4905
|
+
"default": "object" !== typeof window || void 0 === window.navigator ? !1 : "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document
|
|
4906
|
+
},
|
|
4907
|
+
selfieMode: {
|
|
4908
|
+
type: 0,
|
|
4909
|
+
graphOptionXref: {
|
|
4910
|
+
calculatorType: "GlScalerCalculator",
|
|
4911
|
+
calculatorIndex: 1,
|
|
4912
|
+
fieldName: "flip_horizontal"
|
|
4913
|
+
}
|
|
4914
|
+
},
|
|
4915
|
+
model: {
|
|
4916
|
+
type: 0,
|
|
4917
|
+
onChange: function onChange(e) {
|
|
4918
|
+
var g, f, h, k, l, m;
|
|
4919
|
+
return J(function (q) {
|
|
4920
|
+
switch (q.g) {
|
|
4921
|
+
case 1:
|
|
4922
|
+
g = "short" === e ? ["face_detection_short_range.tflite"] : ["face_detection_full_range_sparse.tflite"], f = C(g), h = f.next();
|
|
4923
|
+
case 2:
|
|
4924
|
+
if (h.done) {
|
|
4925
|
+
q.g = 4;
|
|
4926
|
+
break;
|
|
4927
|
+
}
|
|
4928
|
+
k = h.value;
|
|
4929
|
+
l = "third_party/mediapipe/modules/face_detection/" + k;
|
|
4930
|
+
return G(q, Ic(b.g, k), 5);
|
|
4931
|
+
case 5:
|
|
4932
|
+
m = q.h;
|
|
4933
|
+
b.g.overrideFile(l, m);
|
|
4934
|
+
h = f.next();
|
|
4935
|
+
q.g = 2;
|
|
4936
|
+
break;
|
|
4937
|
+
case 4:
|
|
4938
|
+
return c.url = "short" === e ? "face_detection_short.binarypb" : "face_detection_full.binarypb", d.graphOptionXref.calculatorName = "short" === e ? "facedetectionshortrangegpu__facedetectionshortrangecommon__TensorsToDetectionsCalculator" : "facedetectionfullrangegpu__facedetectionfullrangecommon__TensorsToDetectionsCalculator", q["return"](!0);
|
|
4939
|
+
}
|
|
4940
|
+
});
|
|
4941
|
+
}
|
|
4942
|
+
},
|
|
4943
|
+
minDetectionConfidence: d
|
|
4944
|
+
}
|
|
4945
|
+
});
|
|
4946
|
+
}
|
|
4947
|
+
x = Oc.prototype;
|
|
4948
|
+
x.close = function () {
|
|
4949
|
+
this.g.close();
|
|
4950
|
+
return Promise.resolve();
|
|
4951
|
+
};
|
|
4952
|
+
x.onResults = function (a) {
|
|
4953
|
+
this.g.onResults(a);
|
|
4954
|
+
};
|
|
4955
|
+
x.initialize = function () {
|
|
4956
|
+
var a = this;
|
|
4957
|
+
return J(function (b) {
|
|
4958
|
+
return G(b, a.g.initialize(), 0);
|
|
4959
|
+
});
|
|
4960
|
+
};
|
|
4961
|
+
x.reset = function () {
|
|
4962
|
+
this.g.reset();
|
|
4963
|
+
};
|
|
4964
|
+
x.send = function (a) {
|
|
4965
|
+
var b = this;
|
|
4966
|
+
return J(function (c) {
|
|
4967
|
+
return G(c, b.g.send(a), 0);
|
|
4968
|
+
});
|
|
4969
|
+
};
|
|
4970
|
+
x.setOptions = function (a) {
|
|
4971
|
+
this.g.setOptions(a);
|
|
4972
|
+
};
|
|
4973
|
+
K("FaceDetection", Oc);
|
|
4974
|
+
K("FACEDETECTION_LIPS", nc);
|
|
4975
|
+
K("FACEDETECTION_LEFT_EYE", oc);
|
|
4976
|
+
K("FACEDETECTION_LEFT_EYEBROW", pc);
|
|
4977
|
+
K("FACEDETECTION_RIGHT_EYE", qc);
|
|
4978
|
+
K("FACEDETECTION_RIGHT_EYEBROW", rc);
|
|
4979
|
+
K("FACEDETECTION_FACE_OVAL", sc);
|
|
4980
|
+
K("FACEDETECTION_CONTOURS", tc);
|
|
4981
|
+
K("FACEDETECTION_TESSELATION", [[127, 34], [34, 139], [139, 127], [11, 0], [0, 37], [37, 11], [232, 231], [231, 120], [120, 232], [72, 37], [37, 39], [39, 72], [128, 121], [121, 47], [47, 128], [232, 121], [121, 128], [128, 232], [104, 69], [69, 67], [67, 104], [175, 171], [171, 148], [148, 175], [118, 50], [50, 101], [101, 118], [73, 39], [39, 40], [40, 73], [9, 151], [151, 108], [108, 9], [48, 115], [115, 131], [131, 48], [194, 204], [204, 211], [211, 194], [74, 40], [40, 185], [185, 74], [80, 42], [42, 183], [183, 80], [40, 92], [92, 186], [186, 40], [230, 229], [229, 118], [118, 230], [202, 212], [212, 214], [214, 202], [83, 18], [18, 17], [17, 83], [76, 61], [61, 146], [146, 76], [160, 29], [29, 30], [30, 160], [56, 157], [157, 173], [173, 56], [106, 204], [204, 194], [194, 106], [135, 214], [214, 192], [192, 135], [203, 165], [165, 98], [98, 203], [21, 71], [71, 68], [68, 21], [51, 45], [45, 4], [4, 51], [144, 24], [24, 23], [23, 144], [77, 146], [146, 91], [91, 77], [205, 50], [50, 187], [187, 205], [201, 200], [200, 18], [18, 201], [91, 106], [106, 182], [182, 91], [90, 91], [91, 181], [181, 90], [85, 84], [84, 17], [17, 85], [206, 203], [203, 36], [36, 206], [148, 171], [171, 140], [140, 148], [92, 40], [40, 39], [39, 92], [193, 189], [189, 244], [244, 193], [159, 158], [158, 28], [28, 159], [247, 246], [246, 161], [161, 247], [236, 3], [3, 196], [196, 236], [54, 68], [68, 104], [104, 54], [193, 168], [168, 8], [8, 193], [117, 228], [228, 31], [31, 117], [189, 193], [193, 55], [55, 189], [98, 97], [97, 99], [99, 98], [126, 47], [47, 100], [100, 126], [166, 79], [79, 218], [218, 166], [155, 154], [154, 26], [26, 155], [209, 49], [49, 131], [131, 209], [135, 136], [136, 150], [150, 135], [47, 126], [126, 217], [217, 47], [223, 52], [52, 53], [53, 223], [45, 51], [51, 134], [134, 45], [211, 170], [170, 140], [140, 211], [67, 69], [69, 108], [108, 67], [43, 106], [106, 91], [91, 43], [230, 119], [119, 120], [120, 230], [226, 130], [130, 247], [247, 226], [63, 53], [53, 52], [52, 63], [238, 20], [20, 242], [242, 238], [46, 70], [70, 156], [156, 46], [78, 62], [62, 96], [96, 78], [46, 53], [53, 63], [63, 46], [143, 34], [34, 227], [227, 143], [123, 117], [117, 111], [111, 123], [44, 125], [125, 19], [19, 44], [236, 134], [134, 51], [51, 236], [216, 206], [206, 205], [205, 216], [154, 153], [153, 22], [22, 154], [39, 37], [37, 167], [167, 39], [200, 201], [201, 208], [208, 200], [36, 142], [142, 100], [100, 36], [57, 212], [212, 202], [202, 57], [20, 60], [60, 99], [99, 20], [28, 158], [158, 157], [157, 28], [35, 226], [226, 113], [113, 35], [160, 159], [159, 27], [27, 160], [204, 202], [202, 210], [210, 204], [113, 225], [225, 46], [46, 113], [43, 202], [202, 204], [204, 43], [62, 76], [76, 77], [77, 62], [137, 123], [123, 116], [116, 137], [41, 38], [38, 72], [72, 41], [203, 129], [129, 142], [142, 203], [64, 98], [98, 240], [240, 64], [49, 102], [102, 64], [64, 49], [41, 73], [73, 74], [74, 41], [212, 216], [216, 207], [207, 212], [42, 74], [74, 184], [184, 42], [169, 170], [170, 211], [211, 169], [170, 149], [149, 176], [176, 170], [105, 66], [66, 69], [69, 105], [122, 6], [6, 168], [168, 122], [123, 147], [147, 187], [187, 123], [96, 77], [77, 90], [90, 96], [65, 55], [55, 107], [107, 65], [89, 90], [90, 180], [180, 89], [101, 100], [100, 120], [120, 101], [63, 105], [105, 104], [104, 63], [93, 137], [137, 227], [227, 93], [15, 86], [86, 85], [85, 15], [129, 102], [102, 49], [49, 129], [14, 87], [87, 86], [86, 14], [55, 8], [8, 9], [9, 55], [100, 47], [47, 121], [121, 100], [145, 23], [23, 22], [22, 145], [88, 89], [89, 179], [179, 88], [6, 122], [122, 196], [196, 6], [88, 95], [95, 96], [96, 88], [138, 172], [172, 136], [136, 138], [215, 58], [58, 172], [172, 215], [115, 48], [48, 219], [219, 115], [42, 80], [80, 81], [81, 42], [195, 3], [3, 51], [51, 195], [43, 146], [146, 61], [61, 43], [171, 175], [175, 199], [199, 171], [81, 82], [82, 38], [38, 81], [53, 46], [46, 225], [225, 53], [144, 163], [163, 110], [110, 144], [52, 65], [65, 66], [66, 52], [229, 228], [228, 117], [117, 229], [34, 127], [127, 234], [234, 34], [107, 108], [108, 69], [69, 107], [109, 108], [108, 151], [151, 109], [48, 64], [64, 235], [235, 48], [62, 78], [78, 191], [191, 62], [129, 209], [209, 126], [126, 129], [111, 35], [35, 143], [143, 111], [117, 123], [123, 50], [50, 117], [222, 65], [65, 52], [52, 222], [19, 125], [125, 141], [141, 19], [221, 55], [55, 65], [65, 221], [3, 195], [195, 197], [197, 3], [25, 7], [7, 33], [33, 25], [220, 237], [237, 44], [44, 220], [70, 71], [71, 139], [139, 70], [122, 193], [193, 245], [245, 122], [247, 130], [130, 33], [33, 247], [71, 21], [21, 162], [162, 71], [170, 169], [169, 150], [150, 170], [188, 174], [174, 196], [196, 188], [216, 186], [186, 92], [92, 216], [2, 97], [97, 167], [167, 2], [141, 125], [125, 241], [241, 141], [164, 167], [167, 37], [37, 164], [72, 38], [38, 12], [12, 72], [38, 82], [82, 13], [13, 38], [63, 68], [68, 71], [71, 63], [226, 35], [35, 111], [111, 226], [101, 50], [50, 205], [205, 101], [206, 92], [92, 165], [165, 206], [209, 198], [198, 217], [217, 209], [165, 167], [167, 97], [97, 165], [220, 115], [115, 218], [218, 220], [133, 112], [112, 243], [243, 133], [239, 238], [238, 241], [241, 239], [214, 135], [135, 169], [169, 214], [190, 173], [173, 133], [133, 190], [171, 208], [208, 32], [32, 171], [125, 44], [44, 237], [237, 125], [86, 87], [87, 178], [178, 86], [85, 86], [86, 179], [179, 85], [84, 85], [85, 180], [180, 84], [83, 84], [84, 181], [181, 83], [201, 83], [83, 182], [182, 201], [137, 93], [93, 132], [132, 137], [76, 62], [62, 183], [183, 76], [61, 76], [76, 184], [184, 61], [57, 61], [61, 185], [185, 57], [212, 57], [57, 186], [186, 212], [214, 207], [207, 187], [187, 214], [34, 143], [143, 156], [156, 34], [79, 239], [239, 237], [237, 79], [123, 137], [137, 177], [177, 123], [44, 1], [1, 4], [4, 44], [201, 194], [194, 32], [32, 201], [64, 102], [102, 129], [129, 64], [213, 215], [215, 138], [138, 213], [59, 166], [166, 219], [219, 59], [242, 99], [99, 97], [97, 242], [2, 94], [94, 141], [141, 2], [75, 59], [59, 235], [235, 75], [24, 110], [110, 228], [228, 24], [25, 130], [130, 226], [226, 25], [23, 24], [24, 229], [229, 23], [22, 23], [23, 230], [230, 22], [26, 22], [22, 231], [231, 26], [112, 26], [26, 232], [232, 112], [189, 190], [190, 243], [243, 189], [221, 56], [56, 190], [190, 221], [28, 56], [56, 221], [221, 28], [27, 28], [28, 222], [222, 27], [29, 27], [27, 223], [223, 29], [30, 29], [29, 224], [224, 30], [247, 30], [30, 225], [225, 247], [238, 79], [79, 20], [20, 238], [166, 59], [59, 75], [75, 166], [60, 75], [75, 240], [240, 60], [147, 177], [177, 215], [215, 147], [20, 79], [79, 166], [166, 20], [187, 147], [147, 213], [213, 187], [112, 233], [233, 244], [244, 112], [233, 128], [128, 245], [245, 233], [128, 114], [114, 188], [188, 128], [114, 217], [217, 174], [174, 114], [131, 115], [115, 220], [220, 131], [217, 198], [198, 236], [236, 217], [198, 131], [131, 134], [134, 198], [177, 132], [132, 58], [58, 177], [143, 35], [35, 124], [124, 143], [110, 163], [163, 7], [7, 110], [228, 110], [110, 25], [25, 228], [356, 389], [389, 368], [368, 356], [11, 302], [302, 267], [267, 11], [452, 350], [350, 349], [349, 452], [302, 303], [303, 269], [269, 302], [357, 343], [343, 277], [277, 357], [452, 453], [453, 357], [357, 452], [333, 332], [332, 297], [297, 333], [175, 152], [152, 377], [377, 175], [347, 348], [348, 330], [330, 347], [303, 304], [304, 270], [270, 303], [9, 336], [336, 337], [337, 9], [278, 279], [279, 360], [360, 278], [418, 262], [262, 431], [431, 418], [304, 408], [408, 409], [409, 304], [310, 415], [415, 407], [407, 310], [270, 409], [409, 410], [410, 270], [450, 348], [348, 347], [347, 450], [422, 430], [430, 434], [434, 422], [313, 314], [314, 17], [17, 313], [306, 307], [307, 375], [375, 306], [387, 388], [388, 260], [260, 387], [286, 414], [414, 398], [398, 286], [335, 406], [406, 418], [418, 335], [364, 367], [367, 416], [416, 364], [423, 358], [358, 327], [327, 423], [251, 284], [284, 298], [298, 251], [281, 5], [5, 4], [4, 281], [373, 374], [374, 253], [253, 373], [307, 320], [320, 321], [321, 307], [425, 427], [427, 411], [411, 425], [421, 313], [313, 18], [18, 421], [321, 405], [405, 406], [406, 321], [320, 404], [404, 405], [405, 320], [315, 16], [16, 17], [17, 315], [426, 425], [425, 266], [266, 426], [377, 400], [400, 369], [369, 377], [322, 391], [391, 269], [269, 322], [417, 465], [465, 464], [464, 417], [386, 257], [257, 258], [258, 386], [466, 260], [260, 388], [388, 466], [456, 399], [399, 419], [419, 456], [284, 332], [332, 333], [333, 284], [417, 285], [285, 8], [8, 417], [346, 340], [340, 261], [261, 346], [413, 441], [441, 285], [285, 413], [327, 460], [460, 328], [328, 327], [355, 371], [371, 329], [329, 355], [392, 439], [439, 438], [438, 392], [382, 341], [341, 256], [256, 382], [429, 420], [420, 360], [360, 429], [364, 394], [394, 379], [379, 364], [277, 343], [343, 437], [437, 277], [443, 444], [444, 283], [283, 443], [275, 440], [440, 363], [363, 275], [431, 262], [262, 369], [369, 431], [297, 338], [338, 337], [337, 297], [273, 375], [375, 321], [321, 273], [450, 451], [451, 349], [349, 450], [446, 342], [342, 467], [467, 446], [293, 334], [334, 282], [282, 293], [458, 461], [461, 462], [462, 458], [276, 353], [353, 383], [383, 276], [308, 324], [324, 325], [325, 308], [276, 300], [300, 293], [293, 276], [372, 345], [345, 447], [447, 372], [352, 345], [345, 340], [340, 352], [274, 1], [1, 19], [19, 274], [456, 248], [248, 281], [281, 456], [436, 427], [427, 425], [425, 436], [381, 256], [256, 252], [252, 381], [269, 391], [391, 393], [393, 269], [200, 199], [199, 428], [428, 200], [266, 330], [330, 329], [329, 266], [287, 273], [273, 422], [422, 287], [250, 462], [462, 328], [328, 250], [258, 286], [286, 384], [384, 258], [265, 353], [353, 342], [342, 265], [387, 259], [259, 257], [257, 387], [424, 431], [431, 430], [430, 424], [342, 353], [353, 276], [276, 342], [273, 335], [335, 424], [424, 273], [292, 325], [325, 307], [307, 292], [366, 447], [447, 345], [345, 366], [271, 303], [303, 302], [302, 271], [423, 266], [266, 371], [371, 423], [294, 455], [455, 460], [460, 294], [279, 278], [278, 294], [294, 279], [271, 272], [272, 304], [304, 271], [432, 434], [434, 427], [427, 432], [272, 407], [407, 408], [408, 272], [394, 430], [430, 431], [431, 394], [395, 369], [369, 400], [400, 395], [334, 333], [333, 299], [299, 334], [351, 417], [417, 168], [168, 351], [352, 280], [280, 411], [411, 352], [325, 319], [319, 320], [320, 325], [295, 296], [296, 336], [336, 295], [319, 403], [403, 404], [404, 319], [330, 348], [348, 349], [349, 330], [293, 298], [298, 333], [333, 293], [323, 454], [454, 447], [447, 323], [15, 16], [16, 315], [315, 15], [358, 429], [429, 279], [279, 358], [14, 15], [15, 316], [316, 14], [285, 336], [336, 9], [9, 285], [329, 349], [349, 350], [350, 329], [374, 380], [380, 252], [252, 374], [318, 402], [402, 403], [403, 318], [6, 197], [197, 419], [419, 6], [318, 319], [319, 325], [325, 318], [367, 364], [364, 365], [365, 367], [435, 367], [367, 397], [397, 435], [344, 438], [438, 439], [439, 344], [272, 271], [271, 311], [311, 272], [195, 5], [5, 281], [281, 195], [273, 287], [287, 291], [291, 273], [396, 428], [428, 199], [199, 396], [311, 271], [271, 268], [268, 311], [283, 444], [444, 445], [445, 283], [373, 254], [254, 339], [339, 373], [282, 334], [334, 296], [296, 282], [449, 347], [347, 346], [346, 449], [264, 447], [447, 454], [454, 264], [336, 296], [296, 299], [299, 336], [338, 10], [10, 151], [151, 338], [278, 439], [439, 455], [455, 278], [292, 407], [407, 415], [415, 292], [358, 371], [371, 355], [355, 358], [340, 345], [345, 372], [372, 340], [346, 347], [347, 280], [280, 346], [442, 443], [443, 282], [282, 442], [19, 94], [94, 370], [370, 19], [441, 442], [442, 295], [295, 441], [248, 419], [419, 197], [197, 248], [263, 255], [255, 359], [359, 263], [440, 275], [275, 274], [274, 440], [300, 383], [383, 368], [368, 300], [351, 412], [412, 465], [465, 351], [263, 467], [467, 466], [466, 263], [301, 368], [368, 389], [389, 301], [395, 378], [378, 379], [379, 395], [412, 351], [351, 419], [419, 412], [436, 426], [426, 322], [322, 436], [2, 164], [164, 393], [393, 2], [370, 462], [462, 461], [461, 370], [164, 0], [0, 267], [267, 164], [302, 11], [11, 12], [12, 302], [268, 12], [12, 13], [13, 268], [293, 300], [300, 301], [301, 293], [446, 261], [261, 340], [340, 446], [330, 266], [266, 425], [425, 330], [426, 423], [423, 391], [391, 426], [429, 355], [355, 437], [437, 429], [391, 327], [327, 326], [326, 391], [440, 457], [457, 438], [438, 440], [341, 382], [382, 362], [362, 341], [459, 457], [457, 461], [461, 459], [434, 430], [430, 394], [394, 434], [414, 463], [463, 362], [362, 414], [396, 369], [369, 262], [262, 396], [354, 461], [461, 457], [457, 354], [316, 403], [403, 402], [402, 316], [315, 404], [404, 403], [403, 315], [314, 405], [405, 404], [404, 314], [313, 406], [406, 405], [405, 313], [421, 418], [418, 406], [406, 421], [366, 401], [401, 361], [361, 366], [306, 408], [408, 407], [407, 306], [291, 409], [409, 408], [408, 291], [287, 410], [410, 409], [409, 287], [432, 436], [436, 410], [410, 432], [434, 416], [416, 411], [411, 434], [264, 368], [368, 383], [383, 264], [309, 438], [438, 457], [457, 309], [352, 376], [376, 401], [401, 352], [274, 275], [275, 4], [4, 274], [421, 428], [428, 262], [262, 421], [294, 327], [327, 358], [358, 294], [433, 416], [416, 367], [367, 433], [289, 455], [455, 439], [439, 289], [462, 370], [370, 326], [326, 462], [2, 326], [326, 370], [370, 2], [305, 460], [460, 455], [455, 305], [254, 449], [449, 448], [448, 254], [255, 261], [261, 446], [446, 255], [253, 450], [450, 449], [449, 253], [252, 451], [451, 450], [450, 252], [256, 452], [452, 451], [451, 256], [341, 453], [453, 452], [452, 341], [413, 464], [464, 463], [463, 413], [441, 413], [413, 414], [414, 441], [258, 442], [442, 441], [441, 258], [257, 443], [443, 442], [442, 257], [259, 444], [444, 443], [443, 259], [260, 445], [445, 444], [444, 260], [467, 342], [342, 445], [445, 467], [459, 458], [458, 250], [250, 459], [289, 392], [392, 290], [290, 289], [290, 328], [328, 460], [460, 290], [376, 433], [433, 435], [435, 376], [250, 290], [290, 392], [392, 250], [411, 416], [416, 433], [433, 411], [341, 463], [463, 464], [464, 341], [453, 464], [464, 465], [465, 453], [357, 465], [465, 412], [412, 357], [343, 412], [412, 399], [399, 343], [360, 363], [363, 440], [440, 360], [437, 399], [399, 456], [456, 437], [420, 456], [456, 363], [363, 420], [401, 435], [435, 288], [288, 401], [372, 383], [383, 353], [353, 372], [339, 255], [255, 249], [249, 339], [448, 261], [261, 255], [255, 448], [133, 243], [243, 190], [190, 133], [133, 155], [155, 112], [112, 133], [33, 246], [246, 247], [247, 33], [33, 130], [130, 25], [25, 33], [398, 384], [384, 286], [286, 398], [362, 398], [398, 414], [414, 362], [362, 463], [463, 341], [341, 362], [263, 359], [359, 467], [467, 263], [263, 249], [249, 255], [255, 263], [466, 467], [467, 260], [260, 466], [75, 60], [60, 166], [166, 75], [238, 239], [239, 79], [79, 238], [162, 127], [127, 139], [139, 162], [72, 11], [11, 37], [37, 72], [121, 232], [232, 120], [120, 121], [73, 72], [72, 39], [39, 73], [114, 128], [128, 47], [47, 114], [233, 232], [232, 128], [128, 233], [103, 104], [104, 67], [67, 103], [152, 175], [175, 148], [148, 152], [119, 118], [118, 101], [101, 119], [74, 73], [73, 40], [40, 74], [107, 9], [9, 108], [108, 107], [49, 48], [48, 131], [131, 49], [32, 194], [194, 211], [211, 32], [184, 74], [74, 185], [185, 184], [191, 80], [80, 183], [183, 191], [185, 40], [40, 186], [186, 185], [119, 230], [230, 118], [118, 119], [210, 202], [202, 214], [214, 210], [84, 83], [83, 17], [17, 84], [77, 76], [76, 146], [146, 77], [161, 160], [160, 30], [30, 161], [190, 56], [56, 173], [173, 190], [182, 106], [106, 194], [194, 182], [138, 135], [135, 192], [192, 138], [129, 203], [203, 98], [98, 129], [54, 21], [21, 68], [68, 54], [5, 51], [51, 4], [4, 5], [145, 144], [144, 23], [23, 145], [90, 77], [77, 91], [91, 90], [207, 205], [205, 187], [187, 207], [83, 201], [201, 18], [18, 83], [181, 91], [91, 182], [182, 181], [180, 90], [90, 181], [181, 180], [16, 85], [85, 17], [17, 16], [205, 206], [206, 36], [36, 205], [176, 148], [148, 140], [140, 176], [165, 92], [92, 39], [39, 165], [245, 193], [193, 244], [244, 245], [27, 159], [159, 28], [28, 27], [30, 247], [247, 161], [161, 30], [174, 236], [236, 196], [196, 174], [103, 54], [54, 104], [104, 103], [55, 193], [193, 8], [8, 55], [111, 117], [117, 31], [31, 111], [221, 189], [189, 55], [55, 221], [240, 98], [98, 99], [99, 240], [142, 126], [126, 100], [100, 142], [219, 166], [166, 218], [218, 219], [112, 155], [155, 26], [26, 112], [198, 209], [209, 131], [131, 198], [169, 135], [135, 150], [150, 169], [114, 47], [47, 217], [217, 114], [224, 223], [223, 53], [53, 224], [220, 45], [45, 134], [134, 220], [32, 211], [211, 140], [140, 32], [109, 67], [67, 108], [108, 109], [146, 43], [43, 91], [91, 146], [231, 230], [230, 120], [120, 231], [113, 226], [226, 247], [247, 113], [105, 63], [63, 52], [52, 105], [241, 238], [238, 242], [242, 241], [124, 46], [46, 156], [156, 124], [95, 78], [78, 96], [96, 95], [70, 46], [46, 63], [63, 70], [116, 143], [143, 227], [227, 116], [116, 123], [123, 111], [111, 116], [1, 44], [44, 19], [19, 1], [3, 236], [236, 51], [51, 3], [207, 216], [216, 205], [205, 207], [26, 154], [154, 22], [22, 26], [165, 39], [39, 167], [167, 165], [199, 200], [200, 208], [208, 199], [101, 36], [36, 100], [100, 101], [43, 57], [57, 202], [202, 43], [242, 20], [20, 99], [99, 242], [56, 28], [28, 157], [157, 56], [124, 35], [35, 113], [113, 124], [29, 160], [160, 27], [27, 29], [211, 204], [204, 210], [210, 211], [124, 113], [113, 46], [46, 124], [106, 43], [43, 204], [204, 106], [96, 62], [62, 77], [77, 96], [227, 137], [137, 116], [116, 227], [73, 41], [41, 72], [72, 73], [36, 203], [203, 142], [142, 36], [235, 64], [64, 240], [240, 235], [48, 49], [49, 64], [64, 48], [42, 41], [41, 74], [74, 42], [214, 212], [212, 207], [207, 214], [183, 42], [42, 184], [184, 183], [210, 169], [169, 211], [211, 210], [140, 170], [170, 176], [176, 140], [104, 105], [105, 69], [69, 104], [193, 122], [122, 168], [168, 193], [50, 123], [123, 187], [187, 50], [89, 96], [96, 90], [90, 89], [66, 65], [65, 107], [107, 66], [179, 89], [89, 180], [180, 179], [119, 101], [101, 120], [120, 119], [68, 63], [63, 104], [104, 68], [234, 93], [93, 227], [227, 234], [16, 15], [15, 85], [85, 16], [209, 129], [129, 49], [49, 209], [15, 14], [14, 86], [86, 15], [107, 55], [55, 9], [9, 107], [120, 100], [100, 121], [121, 120], [153, 145], [145, 22], [22, 153], [178, 88], [88, 179], [179, 178], [197, 6], [6, 196], [196, 197], [89, 88], [88, 96], [96, 89], [135, 138], [138, 136], [136, 135], [138, 215], [215, 172], [172, 138], [218, 115], [115, 219], [219, 218], [41, 42], [42, 81], [81, 41], [5, 195], [195, 51], [51, 5], [57, 43], [43, 61], [61, 57], [208, 171], [171, 199], [199, 208], [41, 81], [81, 38], [38, 41], [224, 53], [53, 225], [225, 224], [24, 144], [144, 110], [110, 24], [105, 52], [52, 66], [66, 105], [118, 229], [229, 117], [117, 118], [227, 34], [34, 234], [234, 227], [66, 107], [107, 69], [69, 66], [10, 109], [109, 151], [151, 10], [219, 48], [48, 235], [235, 219], [183, 62], [62, 191], [191, 183], [142, 129], [129, 126], [126, 142], [116, 111], [111, 143], [143, 116], [118, 117], [117, 50], [50, 118], [223, 222], [222, 52], [52, 223], [94, 19], [19, 141], [141, 94], [222, 221], [221, 65], [65, 222], [196, 3], [3, 197], [197, 196], [45, 220], [220, 44], [44, 45], [156, 70], [70, 139], [139, 156], [188, 122], [122, 245], [245, 188], [139, 71], [71, 162], [162, 139], [149, 170], [170, 150], [150, 149], [122, 188], [188, 196], [196, 122], [206, 216], [216, 92], [92, 206], [164, 2], [2, 167], [167, 164], [242, 141], [141, 241], [241, 242], [0, 164], [164, 37], [37, 0], [11, 72], [72, 12], [12, 11], [12, 38], [38, 13], [13, 12], [70, 63], [63, 71], [71, 70], [31, 226], [226, 111], [111, 31], [36, 101], [101, 205], [205, 36], [203, 206], [206, 165], [165, 203], [126, 209], [209, 217], [217, 126], [98, 165], [165, 97], [97, 98], [237, 220], [220, 218], [218, 237], [237, 239], [239, 241], [241, 237], [210, 214], [214, 169], [169, 210], [140, 171], [171, 32], [32, 140], [241, 125], [125, 237], [237, 241], [179, 86], [86, 178], [178, 179], [180, 85], [85, 179], [179, 180], [181, 84], [84, 180], [180, 181], [182, 83], [83, 181], [181, 182], [194, 201], [201, 182], [182, 194], [177, 137], [137, 132], [132, 177], [184, 76], [76, 183], [183, 184], [185, 61], [61, 184], [184, 185], [186, 57], [57, 185], [185, 186], [216, 212], [212, 186], [186, 216], [192, 214], [214, 187], [187, 192], [139, 34], [34, 156], [156, 139], [218, 79], [79, 237], [237, 218], [147, 123], [123, 177], [177, 147], [45, 44], [44, 4], [4, 45], [208, 201], [201, 32], [32, 208], [98, 64], [64, 129], [129, 98], [192, 213], [213, 138], [138, 192], [235, 59], [59, 219], [219, 235], [141, 242], [242, 97], [97, 141], [97, 2], [2, 141], [141, 97], [240, 75], [75, 235], [235, 240], [229, 24], [24, 228], [228, 229], [31, 25], [25, 226], [226, 31], [230, 23], [23, 229], [229, 230], [231, 22], [22, 230], [230, 231], [232, 26], [26, 231], [231, 232], [233, 112], [112, 232], [232, 233], [244, 189], [189, 243], [243, 244], [189, 221], [221, 190], [190, 189], [222, 28], [28, 221], [221, 222], [223, 27], [27, 222], [222, 223], [224, 29], [29, 223], [223, 224], [225, 30], [30, 224], [224, 225], [113, 247], [247, 225], [225, 113], [99, 60], [60, 240], [240, 99], [213, 147], [147, 215], [215, 213], [60, 20], [20, 166], [166, 60], [192, 187], [187, 213], [213, 192], [243, 112], [112, 244], [244, 243], [244, 233], [233, 245], [245, 244], [245, 128], [128, 188], [188, 245], [188, 114], [114, 174], [174, 188], [134, 131], [131, 220], [220, 134], [174, 217], [217, 236], [236, 174], [236, 198], [198, 134], [134, 236], [215, 177], [177, 58], [58, 215], [156, 143], [143, 124], [124, 156], [25, 110], [110, 7], [7, 25], [31, 228], [228, 25], [25, 31], [264, 356], [356, 368], [368, 264], [0, 11], [11, 267], [267, 0], [451, 452], [452, 349], [349, 451], [267, 302], [302, 269], [269, 267], [350, 357], [357, 277], [277, 350], [350, 452], [452, 357], [357, 350], [299, 333], [333, 297], [297, 299], [396, 175], [175, 377], [377, 396], [280, 347], [347, 330], [330, 280], [269, 303], [303, 270], [270, 269], [151, 9], [9, 337], [337, 151], [344, 278], [278, 360], [360, 344], [424, 418], [418, 431], [431, 424], [270, 304], [304, 409], [409, 270], [272, 310], [310, 407], [407, 272], [322, 270], [270, 410], [410, 322], [449, 450], [450, 347], [347, 449], [432, 422], [422, 434], [434, 432], [18, 313], [313, 17], [17, 18], [291, 306], [306, 375], [375, 291], [259, 387], [387, 260], [260, 259], [424, 335], [335, 418], [418, 424], [434, 364], [364, 416], [416, 434], [391, 423], [423, 327], [327, 391], [301, 251], [251, 298], [298, 301], [275, 281], [281, 4], [4, 275], [254, 373], [373, 253], [253, 254], [375, 307], [307, 321], [321, 375], [280, 425], [425, 411], [411, 280], [200, 421], [421, 18], [18, 200], [335, 321], [321, 406], [406, 335], [321, 320], [320, 405], [405, 321], [314, 315], [315, 17], [17, 314], [423, 426], [426, 266], [266, 423], [396, 377], [377, 369], [369, 396], [270, 322], [322, 269], [269, 270], [413, 417], [417, 464], [464, 413], [385, 386], [386, 258], [258, 385], [248, 456], [456, 419], [419, 248], [298, 284], [284, 333], [333, 298], [168, 417], [417, 8], [8, 168], [448, 346], [346, 261], [261, 448], [417, 413], [413, 285], [285, 417], [326, 327], [327, 328], [328, 326], [277, 355], [355, 329], [329, 277], [309, 392], [392, 438], [438, 309], [381, 382], [382, 256], [256, 381], [279, 429], [429, 360], [360, 279], [365, 364], [364, 379], [379, 365], [355, 277], [277, 437], [437, 355], [282, 443], [443, 283], [283, 282], [281, 275], [275, 363], [363, 281], [395, 431], [431, 369], [369, 395], [299, 297], [297, 337], [337, 299], [335, 273], [273, 321], [321, 335], [348, 450], [450, 349], [349, 348], [359, 446], [446, 467], [467, 359], [283, 293], [293, 282], [282, 283], [250, 458], [458, 462], [462, 250], [300, 276], [276, 383], [383, 300], [292, 308], [308, 325], [325, 292], [283, 276], [276, 293], [293, 283], [264, 372], [372, 447], [447, 264], [346, 352], [352, 340], [340, 346], [354, 274], [274, 19], [19, 354], [363, 456], [456, 281], [281, 363], [426, 436], [436, 425], [425, 426], [380, 381], [381, 252], [252, 380], [267, 269], [269, 393], [393, 267], [421, 200], [200, 428], [428, 421], [371, 266], [266, 329], [329, 371], [432, 287], [287, 422], [422, 432], [290, 250], [250, 328], [328, 290], [385, 258], [258, 384], [384, 385], [446, 265], [265, 342], [342, 446], [386, 387], [387, 257], [257, 386], [422, 424], [424, 430], [430, 422], [445, 342], [342, 276], [276, 445], [422, 273], [273, 424], [424, 422], [306, 292], [292, 307], [307, 306], [352, 366], [366, 345], [345, 352], [268, 271], [271, 302], [302, 268], [358, 423], [423, 371], [371, 358], [327, 294], [294, 460], [460, 327], [331, 279], [279, 294], [294, 331], [303, 271], [271, 304], [304, 303], [436, 432], [432, 427], [427, 436], [304, 272], [272, 408], [408, 304], [395, 394], [394, 431], [431, 395], [378, 395], [395, 400], [400, 378], [296, 334], [334, 299], [299, 296], [6, 351], [351, 168], [168, 6], [376, 352], [352, 411], [411, 376], [307, 325], [325, 320], [320, 307], [285, 295], [295, 336], [336, 285], [320, 319], [319, 404], [404, 320], [329, 330], [330, 349], [349, 329], [334, 293], [293, 333], [333, 334], [366, 323], [323, 447], [447, 366], [316, 15], [15, 315], [315, 316], [331, 358], [358, 279], [279, 331], [317, 14], [14, 316], [316, 317], [8, 285], [285, 9], [9, 8], [277, 329], [329, 350], [350, 277], [253, 374], [374, 252], [252, 253], [319, 318], [318, 403], [403, 319], [351, 6], [6, 419], [419, 351], [324, 318], [318, 325], [325, 324], [397, 367], [367, 365], [365, 397], [288, 435], [435, 397], [397, 288], [278, 344], [344, 439], [439, 278], [310, 272], [272, 311], [311, 310], [248, 195], [195, 281], [281, 248], [375, 273], [273, 291], [291, 375], [175, 396], [396, 199], [199, 175], [312, 311], [311, 268], [268, 312], [276, 283], [283, 445], [445, 276], [390, 373], [373, 339], [339, 390], [295, 282], [282, 296], [296, 295], [448, 449], [449, 346], [346, 448], [356, 264], [264, 454], [454, 356], [337, 336], [336, 299], [299, 337], [337, 338], [338, 151], [151, 337], [294, 278], [278, 455], [455, 294], [308, 292], [292, 415], [415, 308], [429, 358], [358, 355], [355, 429], [265, 340], [340, 372], [372, 265], [352, 346], [346, 280], [280, 352], [295, 442], [442, 282], [282, 295], [354, 19], [19, 370], [370, 354], [285, 441], [441, 295], [295, 285], [195, 248], [248, 197], [197, 195], [457, 440], [440, 274], [274, 457], [301, 300], [300, 368], [368, 301], [417, 351], [351, 465], [465, 417], [251, 301], [301, 389], [389, 251], [394, 395], [395, 379], [379, 394], [399, 412], [412, 419], [419, 399], [410, 436], [436, 322], [322, 410], [326, 2], [2, 393], [393, 326], [354, 370], [370, 461], [461, 354], [393, 164], [164, 267], [267, 393], [268, 302], [302, 12], [12, 268], [312, 268], [268, 13], [13, 312], [298, 293], [293, 301], [301, 298], [265, 446], [446, 340], [340, 265], [280, 330], [330, 425], [425, 280], [322, 426], [426, 391], [391, 322], [420, 429], [429, 437], [437, 420], [393, 391], [391, 326], [326, 393], [344, 440], [440, 438], [438, 344], [458, 459], [459, 461], [461, 458], [364, 434], [434, 394], [394, 364], [428, 396], [396, 262], [262, 428], [274, 354], [354, 457], [457, 274], [317, 316], [316, 402], [402, 317], [316, 315], [315, 403], [403, 316], [315, 314], [314, 404], [404, 315], [314, 313], [313, 405], [405, 314], [313, 421], [421, 406], [406, 313], [323, 366], [366, 361], [361, 323], [292, 306], [306, 407], [407, 292], [306, 291], [291, 408], [408, 306], [291, 287], [287, 409], [409, 291], [287, 432], [432, 410], [410, 287], [427, 434], [434, 411], [411, 427], [372, 264], [264, 383], [383, 372], [459, 309], [309, 457], [457, 459], [366, 352], [352, 401], [401, 366], [1, 274], [274, 4], [4, 1], [418, 421], [421, 262], [262, 418], [331, 294], [294, 358], [358, 331], [435, 433], [433, 367], [367, 435], [392, 289], [289, 439], [439, 392], [328, 462], [462, 326], [326, 328], [94, 2], [2, 370], [370, 94], [289, 305], [305, 455], [455, 289], [339, 254], [254, 448], [448, 339], [359, 255], [255, 446], [446, 359], [254, 253], [253, 449], [449, 254], [253, 252], [252, 450], [450, 253], [252, 256], [256, 451], [451, 252], [256, 341], [341, 452], [452, 256], [414, 413], [413, 463], [463, 414], [286, 441], [441, 414], [414, 286], [286, 258], [258, 441], [441, 286], [258, 257], [257, 442], [442, 258], [257, 259], [259, 443], [443, 257], [259, 260], [260, 444], [444, 259], [260, 467], [467, 445], [445, 260], [309, 459], [459, 250], [250, 309], [305, 289], [289, 290], [290, 305], [305, 290], [290, 460], [460, 305], [401, 376], [376, 435], [435, 401], [309, 250], [250, 392], [392, 309], [376, 411], [411, 433], [433, 376], [453, 341], [341, 464], [464, 453], [357, 453], [453, 465], [465, 357], [343, 357], [357, 412], [412, 343], [437, 343], [343, 399], [399, 437], [344, 360], [360, 440], [440, 344], [420, 437], [437, 456], [456, 420], [360, 420], [420, 363], [363, 360], [361, 401], [401, 288], [288, 361], [265, 372], [372, 353], [353, 265], [390, 339], [339, 249], [249, 390], [339, 448], [448, 255], [255, 339]]);
|
|
4982
|
+
K("VERSION", "0.4.1646425229");
|
|
4983
|
+
}).call(commonjsGlobal);
|
|
4984
|
+
|
|
4985
|
+
var defaultFaceDetectorModelPath = 'https://websdk-cdn-dev.idmission.com/assets/models/blazeface20240207/blaze_face_short_range.tflite';
|
|
4986
|
+
var defaultSelfieCaptureModelLoadTimeoutMs = 45000;
|
|
4987
|
+
var detector;
|
|
4988
|
+
function loadFaceDetector() {
|
|
4989
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4990
|
+
var _a, _b;
|
|
4991
|
+
return __generator(this, function (_c) {
|
|
4992
|
+
switch (_c.label) {
|
|
4993
|
+
case 0:
|
|
4994
|
+
if (detector) return [2 /*return*/, detector];
|
|
4995
|
+
return [4 /*yield*/, preloadFaceDetectorDependencies()];
|
|
4996
|
+
case 1:
|
|
4997
|
+
_c.sent();
|
|
4998
|
+
if (modelCapabilities.delegate === 'NONE') {
|
|
4999
|
+
throw new Error('No available delegate for face detector.');
|
|
5000
|
+
}
|
|
5001
|
+
_b = (_a = FaceDetector).createFromOptions;
|
|
5002
|
+
return [4 /*yield*/, FilesetResolver.forVisionTasks(visionTasksBasePath)];
|
|
5003
|
+
case 2:
|
|
5004
|
+
return [4 /*yield*/, _b.apply(_a, [_c.sent(), {
|
|
5005
|
+
baseOptions: {
|
|
5006
|
+
modelAssetPath: defaultFaceDetectorModelPath,
|
|
5007
|
+
delegate: modelCapabilities.delegate
|
|
5008
|
+
},
|
|
5009
|
+
runningMode: 'VIDEO'
|
|
5010
|
+
}])];
|
|
5011
|
+
case 3:
|
|
5012
|
+
detector = _c.sent();
|
|
5013
|
+
return [2 /*return*/, detector];
|
|
5014
|
+
}
|
|
5015
|
+
});
|
|
5016
|
+
});
|
|
5017
|
+
}
|
|
5018
|
+
function useLoadFaceDetector(_a) {
|
|
5019
|
+
var onModelError = _a.onModelError,
|
|
5020
|
+
_b = _a.modelLoadTimeoutMs,
|
|
5021
|
+
modelLoadTimeoutMs = _b === void 0 ? defaultSelfieCaptureModelLoadTimeoutMs : _b;
|
|
5022
|
+
var detector = useRef(null);
|
|
5023
|
+
var _c = useState(false),
|
|
5024
|
+
ready = _c[0],
|
|
5025
|
+
setReady = _c[1];
|
|
5026
|
+
var _d = useState(0),
|
|
5027
|
+
modelDownloadProgress = _d[0],
|
|
5028
|
+
setModelDownloadProgress = _d[1];
|
|
5029
|
+
var _e = useState(null),
|
|
5030
|
+
modelError = _e[0],
|
|
5031
|
+
setModelError = _e[1];
|
|
5032
|
+
var videoRef = useContext(CameraStateContext).videoRef;
|
|
5033
|
+
useEffect(function loadModel() {
|
|
5034
|
+
var _this = this;
|
|
5035
|
+
setReady(false);
|
|
5036
|
+
var modelLoadTimeout = setTimeout(function () {
|
|
5037
|
+
setModelError(new Error('Model loading time limit exceeded.'));
|
|
5038
|
+
}, modelLoadTimeoutMs);
|
|
5039
|
+
function handleDownloadProgress(event) {
|
|
5040
|
+
setModelDownloadProgress(progressToPercentage(event.detail));
|
|
5041
|
+
}
|
|
5042
|
+
document.addEventListener('idmission.preloadProgress.faceDetection', handleDownloadProgress);
|
|
5043
|
+
loadFaceDetector().then(function (model) {
|
|
5044
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
5045
|
+
return __generator(this, function (_a) {
|
|
5046
|
+
switch (_a.label) {
|
|
5047
|
+
case 0:
|
|
5048
|
+
detector.current = model;
|
|
5049
|
+
setModelDownloadProgress(100);
|
|
5050
|
+
clearTimeout(modelLoadTimeout);
|
|
5051
|
+
return [4 /*yield*/, waitForVideoReady(videoRef)];
|
|
5052
|
+
case 1:
|
|
5053
|
+
_a.sent();
|
|
5054
|
+
model.detectForVideo(videoRef.current, performance.now());
|
|
5055
|
+
setReady(true);
|
|
5056
|
+
return [2 /*return*/];
|
|
5057
|
+
}
|
|
5058
|
+
});
|
|
5059
|
+
});
|
|
5060
|
+
})["catch"](function (e) {
|
|
5061
|
+
setModelError(e);
|
|
5062
|
+
})["finally"](function () {
|
|
5063
|
+
clearTimeout(modelLoadTimeout);
|
|
5064
|
+
});
|
|
5065
|
+
return function () {
|
|
5066
|
+
clearTimeout(modelLoadTimeout);
|
|
5067
|
+
document.removeEventListener('idmission.preloadProgress.faceDetection', handleDownloadProgress);
|
|
5068
|
+
};
|
|
5069
|
+
}, [modelLoadTimeoutMs, videoRef]);
|
|
5070
|
+
useEffect(function handleModelError() {
|
|
5071
|
+
modelError && (onModelError === null || onModelError === void 0 ? void 0 : onModelError(modelError));
|
|
5072
|
+
}, [modelError, onModelError]);
|
|
5073
|
+
return {
|
|
5074
|
+
detector: detector,
|
|
5075
|
+
ready: ready,
|
|
5076
|
+
modelDownloadProgress: modelDownloadProgress,
|
|
5077
|
+
modelError: modelError
|
|
5078
|
+
};
|
|
5079
|
+
}
|
|
5080
|
+
function makeFaceDetectorPrediction(model, imageData) {
|
|
5081
|
+
var prediction = model.detectForVideo(imageData, performance.now());
|
|
5082
|
+
var faces = prediction.detections.map(function (d) {
|
|
5083
|
+
return {
|
|
5084
|
+
box: convertBoundingBox(d.boundingBox),
|
|
5085
|
+
keypoints: d.keypoints.map(function (k) {
|
|
5086
|
+
var _a;
|
|
5087
|
+
return _assign(_assign({}, k), {
|
|
5088
|
+
x: k.x * imageData.width,
|
|
5089
|
+
y: k.y * imageData.height,
|
|
5090
|
+
name: (_a = k.label) !== null && _a !== void 0 ? _a : ''
|
|
5091
|
+
});
|
|
5092
|
+
})
|
|
5093
|
+
};
|
|
5094
|
+
});
|
|
5095
|
+
return _assign(_assign({}, prediction), {
|
|
5096
|
+
faces: faces
|
|
5097
|
+
});
|
|
5098
|
+
}
|
|
5099
|
+
|
|
5100
|
+
var preloadModels = function preloadModels(_a) {
|
|
5101
|
+
return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
5102
|
+
var preloadTasks;
|
|
5103
|
+
var _c = _b.documentDetectionModel,
|
|
5104
|
+
documentDetectionModel = _c === void 0 ? true : _c,
|
|
5105
|
+
_d = _b.focusModel,
|
|
5106
|
+
focusModel = _d === void 0 ? true : _d,
|
|
5107
|
+
_e = _b.faceDetectionModel,
|
|
5108
|
+
faceDetectionModel = _e === void 0 ? true : _e;
|
|
5109
|
+
return __generator(this, function (_f) {
|
|
5110
|
+
switch (_f.label) {
|
|
5111
|
+
case 0:
|
|
5112
|
+
return [4 /*yield*/, probeModelCapabilities()];
|
|
5113
|
+
case 1:
|
|
5114
|
+
_f.sent();
|
|
5115
|
+
preloadTasks = [];
|
|
5116
|
+
if (documentDetectionModel) {
|
|
5117
|
+
preloadTasks.push(preloadDocumentDetectorDependencies);
|
|
5118
|
+
}
|
|
5119
|
+
if (focusModel) {
|
|
5120
|
+
preloadTasks.push(preloadFocusModelDependencies);
|
|
5121
|
+
}
|
|
5122
|
+
if (faceDetectionModel) {
|
|
5123
|
+
preloadTasks.push(preloadFaceDetectorDependencies);
|
|
5124
|
+
}
|
|
5125
|
+
return [4 /*yield*/, Promise.all(preloadTasks)];
|
|
5126
|
+
case 2:
|
|
5127
|
+
_f.sent();
|
|
5128
|
+
return [2 /*return*/];
|
|
5129
|
+
}
|
|
5130
|
+
});
|
|
5131
|
+
});
|
|
5132
|
+
};
|
|
5133
|
+
var progressByUrl = {};
|
|
5134
|
+
var progressByUseCase = {
|
|
5135
|
+
visionRuntime: {
|
|
5136
|
+
loaded: 0,
|
|
5137
|
+
total: 0
|
|
2914
5138
|
},
|
|
2915
5139
|
documentDetection: {
|
|
2916
5140
|
loaded: 0,
|
|
@@ -3120,15 +5344,15 @@ var documentTypeDisplayNames = {
|
|
|
3120
5344
|
none: 'None'
|
|
3121
5345
|
};
|
|
3122
5346
|
var detectors = {};
|
|
3123
|
-
function loadDocumentDetector(
|
|
3124
|
-
|
|
3125
|
-
modelAssetPath = defaultDocumentDetectorModelPath;
|
|
3126
|
-
}
|
|
3127
|
-
if (scoreThreshold === void 0) {
|
|
3128
|
-
scoreThreshold = defaultDocumentDetectionScoreThreshold;
|
|
3129
|
-
}
|
|
3130
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
5347
|
+
function loadDocumentDetector() {
|
|
5348
|
+
return __awaiter(this, arguments, void 0, function (modelAssetPath, scoreThreshold) {
|
|
3131
5349
|
var id, _a, _b, _c, _d;
|
|
5350
|
+
if (modelAssetPath === void 0) {
|
|
5351
|
+
modelAssetPath = defaultDocumentDetectorModelPath;
|
|
5352
|
+
}
|
|
5353
|
+
if (scoreThreshold === void 0) {
|
|
5354
|
+
scoreThreshold = defaultDocumentDetectionScoreThreshold;
|
|
5355
|
+
}
|
|
3132
5356
|
return __generator(this, function (_e) {
|
|
3133
5357
|
switch (_e.label) {
|
|
3134
5358
|
case 0:
|
|
@@ -3239,7 +5463,7 @@ function makeDocumentDetectorPrediction(detector, frame) {
|
|
|
3239
5463
|
time = new Date().getTime() - startedAt.getTime();
|
|
3240
5464
|
frameWidth = frame.width;
|
|
3241
5465
|
frameHeight = frame.height;
|
|
3242
|
-
return [2 /*return*/,
|
|
5466
|
+
return [2 /*return*/, _assign(_assign({}, prediction), {
|
|
3243
5467
|
time: time,
|
|
3244
5468
|
frameWidth: frameWidth,
|
|
3245
5469
|
frameHeight: frameHeight
|
|
@@ -3732,7 +5956,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
3732
5956
|
requiredDocumentType = _e[0],
|
|
3733
5957
|
setRequiredDocumentType = _e[1];
|
|
3734
5958
|
var thresholds = useMemo(function () {
|
|
3735
|
-
return
|
|
5959
|
+
return _assign(_assign({}, documentDetectionThresholds), {
|
|
3736
5960
|
focus: focusThresholds
|
|
3737
5961
|
});
|
|
3738
5962
|
}, [documentDetectionThresholds, focusThresholds]);
|
|
@@ -3775,7 +5999,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
3775
5999
|
});
|
|
3776
6000
|
}
|
|
3777
6001
|
}
|
|
3778
|
-
(_f = onPredictionHandler.current) === null || _f === void 0 ? void 0 : _f.call(onPredictionHandler,
|
|
6002
|
+
(_f = onPredictionHandler.current) === null || _f === void 0 ? void 0 : _f.call(onPredictionHandler, _assign(_assign({}, prediction), {
|
|
3779
6003
|
focusScore: focusScore,
|
|
3780
6004
|
focusPredictionTime: focusPredictionTime,
|
|
3781
6005
|
focusThresholdMet: focusThresholdMet
|
|
@@ -3794,7 +6018,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
3794
6018
|
}, []);
|
|
3795
6019
|
var getBestFrame = useCallback(function () {
|
|
3796
6020
|
if (!bestFrameDetails || !bestPredictionCanvas.current) return null;
|
|
3797
|
-
return
|
|
6021
|
+
return _assign(_assign({}, bestFrameDetails), {
|
|
3798
6022
|
canvas: bestPredictionCanvas.current
|
|
3799
6023
|
});
|
|
3800
6024
|
}, [bestFrameDetails]);
|
|
@@ -3842,7 +6066,7 @@ function IdCaptureModelsProviderInner(_a) {
|
|
|
3842
6066
|
function IdCaptureModelsProvider(_a) {
|
|
3843
6067
|
var children = _a.children,
|
|
3844
6068
|
props = __rest(_a, ["children"]);
|
|
3845
|
-
return /*#__PURE__*/React__default.createElement(DocumentDetectionModelProvider,
|
|
6069
|
+
return /*#__PURE__*/React__default.createElement(DocumentDetectionModelProvider, _assign({}, props), /*#__PURE__*/React__default.createElement(FocusModelProvider, _assign({}, props), /*#__PURE__*/React__default.createElement(IdCaptureModelsProviderInner, _assign({}, props), children)));
|
|
3846
6070
|
}
|
|
3847
6071
|
|
|
3848
6072
|
var CapturedDocumentTypeValues = ['idCardFront', 'idCardBack', 'passport', 'selfie'];
|
|
@@ -3912,7 +6136,7 @@ var initialState$4 = {
|
|
|
3912
6136
|
};
|
|
3913
6137
|
var IdCaptureStateContext = /*#__PURE__*/createContext(initialState$4);
|
|
3914
6138
|
var IdCaptureDispatchContext = /*#__PURE__*/createContext(function () {});
|
|
3915
|
-
var
|
|
6139
|
+
var _reducer = function reducer(state, action) {
|
|
3916
6140
|
var _a, _b;
|
|
3917
6141
|
switch (action.type) {
|
|
3918
6142
|
case 'configureWizard':
|
|
@@ -3920,7 +6144,7 @@ var reducer$4 = function reducer(state, action) {
|
|
|
3920
6144
|
var _c = action.payload,
|
|
3921
6145
|
captureRequirement = _c.captureRequirement,
|
|
3922
6146
|
precapturedDocuments = _c.precapturedDocuments;
|
|
3923
|
-
var newState =
|
|
6147
|
+
var newState = _assign(_assign({}, state), {
|
|
3924
6148
|
captureRequirement: captureRequirement
|
|
3925
6149
|
});
|
|
3926
6150
|
if (captureRequirement === 'idCardBack') newState.requestedDocumentType = 'idCardBack';
|
|
@@ -3931,7 +6155,7 @@ var reducer$4 = function reducer(state, action) {
|
|
|
3931
6155
|
var payload = precapturedDocuments[k];
|
|
3932
6156
|
if (payload) {
|
|
3933
6157
|
newState.requestedDocumentType = k;
|
|
3934
|
-
newState =
|
|
6158
|
+
newState = _reducer(newState, {
|
|
3935
6159
|
type: 'documentCaptured',
|
|
3936
6160
|
payload: payload
|
|
3937
6161
|
});
|
|
@@ -3942,11 +6166,11 @@ var reducer$4 = function reducer(state, action) {
|
|
|
3942
6166
|
return newState;
|
|
3943
6167
|
}
|
|
3944
6168
|
case 'setRequiredDocumentType':
|
|
3945
|
-
return
|
|
6169
|
+
return _assign(_assign({}, state), {
|
|
3946
6170
|
requiredDocumentType: action.payload
|
|
3947
6171
|
});
|
|
3948
6172
|
case 'redrawRequested':
|
|
3949
|
-
return
|
|
6173
|
+
return _assign(_assign({}, state), {
|
|
3950
6174
|
redrawing: true,
|
|
3951
6175
|
guideRectX: 0,
|
|
3952
6176
|
guideRectY: 0,
|
|
@@ -3955,7 +6179,7 @@ var reducer$4 = function reducer(state, action) {
|
|
|
3955
6179
|
guideRectOffsetTop: 0
|
|
3956
6180
|
});
|
|
3957
6181
|
case 'redrawInProgress':
|
|
3958
|
-
return
|
|
6182
|
+
return _assign(_assign({}, state), {
|
|
3959
6183
|
redrawing: false,
|
|
3960
6184
|
guideRectX: 0,
|
|
3961
6185
|
guideRectY: 0,
|
|
@@ -3964,13 +6188,13 @@ var reducer$4 = function reducer(state, action) {
|
|
|
3964
6188
|
guideRectOffsetTop: 0
|
|
3965
6189
|
});
|
|
3966
6190
|
case 'redrawCompleted':
|
|
3967
|
-
return
|
|
6191
|
+
return _assign(_assign(_assign({}, state), action.payload), {
|
|
3968
6192
|
initialDrawComplete: true
|
|
3969
6193
|
});
|
|
3970
6194
|
case 'pageRendered':
|
|
3971
|
-
return
|
|
6195
|
+
return _assign(_assign({}, state), action.payload);
|
|
3972
6196
|
case 'guideImageLoaded':
|
|
3973
|
-
return
|
|
6197
|
+
return _assign(_assign({}, state), {
|
|
3974
6198
|
guideImageWidth: action.payload.width,
|
|
3975
6199
|
guideImageHeight: action.payload.height
|
|
3976
6200
|
});
|
|
@@ -4018,7 +6242,7 @@ var reducer$4 = function reducer(state, action) {
|
|
|
4018
6242
|
requestedDocumentType = 'idCardFront' in state.capturedDocuments ? 'idCardBack' : 'idCardFront';
|
|
4019
6243
|
}
|
|
4020
6244
|
}
|
|
4021
|
-
return
|
|
6245
|
+
return _assign(_assign({}, state), {
|
|
4022
6246
|
videoWidth: frameWidth,
|
|
4023
6247
|
videoHeight: frameHeight,
|
|
4024
6248
|
detectedObjects: detectedObjects,
|
|
@@ -4046,37 +6270,37 @@ var reducer$4 = function reducer(state, action) {
|
|
|
4046
6270
|
frameCaptureRate: frameCaptureRate
|
|
4047
6271
|
});
|
|
4048
6272
|
case 'captureStarted':
|
|
4049
|
-
return
|
|
6273
|
+
return _assign(_assign({}, state), {
|
|
4050
6274
|
captureStartedAt: new Date(),
|
|
4051
6275
|
capturing: false,
|
|
4052
6276
|
captureFailed: false
|
|
4053
6277
|
});
|
|
4054
6278
|
case 'capturing':
|
|
4055
|
-
return
|
|
6279
|
+
return _assign(_assign({}, state), {
|
|
4056
6280
|
capturing: true,
|
|
4057
6281
|
captureFailed: false
|
|
4058
6282
|
});
|
|
4059
6283
|
case 'captured':
|
|
4060
|
-
return
|
|
6284
|
+
return _assign(_assign({}, state), {
|
|
4061
6285
|
capturing: false,
|
|
4062
6286
|
captureFailed: false
|
|
4063
6287
|
});
|
|
4064
6288
|
case 'frameCaptured':
|
|
4065
|
-
return
|
|
6289
|
+
return _assign(_assign({}, state), {
|
|
4066
6290
|
imageUrl: action.payload.imageUrl
|
|
4067
6291
|
});
|
|
4068
6292
|
case 'captureFailed':
|
|
4069
|
-
return
|
|
6293
|
+
return _assign(_assign({}, state), {
|
|
4070
6294
|
capturing: false,
|
|
4071
6295
|
captureFailed: true
|
|
4072
6296
|
});
|
|
4073
6297
|
case 'documentCaptured':
|
|
4074
6298
|
{
|
|
4075
|
-
var newState_1 =
|
|
6299
|
+
var newState_1 = _assign(_assign({}, state), {
|
|
4076
6300
|
capturing: false,
|
|
4077
6301
|
captureFailed: false,
|
|
4078
6302
|
goodFramesCount: 0,
|
|
4079
|
-
capturedDocuments:
|
|
6303
|
+
capturedDocuments: _assign(_assign({}, state.capturedDocuments), (_a = {}, _a[action.payload.documentType] = action.payload, _a))
|
|
4080
6304
|
});
|
|
4081
6305
|
var remainingRequirements = requiredDocumentsForOption[state.captureRequirement].filter(function (v) {
|
|
4082
6306
|
return !(v in newState_1.capturedDocuments);
|
|
@@ -4105,8 +6329,8 @@ var reducer$4 = function reducer(state, action) {
|
|
|
4105
6329
|
}
|
|
4106
6330
|
case 'documentCapturedManually':
|
|
4107
6331
|
{
|
|
4108
|
-
var newState_2 =
|
|
4109
|
-
capturedDocuments:
|
|
6332
|
+
var newState_2 = _assign(_assign({}, state), {
|
|
6333
|
+
capturedDocuments: _assign(_assign({}, state.capturedDocuments), (_b = {}, _b[state.requestedDocumentType] = _assign(_assign({}, action.payload), {
|
|
4110
6334
|
width: 0,
|
|
4111
6335
|
height: 0
|
|
4112
6336
|
}), _b))
|
|
@@ -4137,18 +6361,18 @@ var reducer$4 = function reducer(state, action) {
|
|
|
4137
6361
|
return newState_2;
|
|
4138
6362
|
}
|
|
4139
6363
|
case 'flipRequestCompleted':
|
|
4140
|
-
return
|
|
6364
|
+
return _assign(_assign({}, state), {
|
|
4141
6365
|
captureState: 'capturing'
|
|
4142
6366
|
});
|
|
4143
6367
|
case 'resetWizard':
|
|
4144
|
-
return
|
|
6368
|
+
return _assign({}, initialState$4);
|
|
4145
6369
|
default:
|
|
4146
6370
|
return state;
|
|
4147
6371
|
}
|
|
4148
6372
|
};
|
|
4149
6373
|
var IdCaptureStateProvider = function IdCaptureStateProvider(_a) {
|
|
4150
6374
|
var children = _a.children;
|
|
4151
|
-
var _b = useReducer(
|
|
6375
|
+
var _b = useReducer(_reducer, initialState$4),
|
|
4152
6376
|
state = _b[0],
|
|
4153
6377
|
dispatch = _b[1];
|
|
4154
6378
|
var onResize = useDebouncedCallback(function () {
|
|
@@ -4549,9 +6773,9 @@ function useTranslations(verbiage, fallbacks) {
|
|
|
4549
6773
|
t = _a.t,
|
|
4550
6774
|
i18n = _a.i18n;
|
|
4551
6775
|
return useMemo(function () {
|
|
4552
|
-
return
|
|
6776
|
+
return _assign(_assign({}, verbiage), Object.keys(fallbacks).reduce(function (result, key) {
|
|
4553
6777
|
var _a;
|
|
4554
|
-
return
|
|
6778
|
+
return _assign(_assign({}, result), (_a = {}, _a[key] = evaluateVerbiage(t, i18n.language, verbiage === null || verbiage === void 0 ? void 0 : verbiage[key], fallbacks[key]), _a));
|
|
4555
6779
|
}, {}));
|
|
4556
6780
|
}, [fallbacks, i18n.language, t, verbiage]);
|
|
4557
6781
|
}
|
|
@@ -4564,7 +6788,7 @@ var GuidanceMessageContainerDiv = styled.div(templateObject_1$A || (templateObje
|
|
|
4564
6788
|
return $bottom ? "bottom: ".concat($bottom, ";") : "";
|
|
4565
6789
|
});
|
|
4566
6790
|
var GuidanceMessageContainer = function GuidanceMessageContainer(props) {
|
|
4567
|
-
var element = /*#__PURE__*/React__default.createElement(GuidanceMessageContainerDiv,
|
|
6791
|
+
var element = /*#__PURE__*/React__default.createElement(GuidanceMessageContainerDiv, _assign({}, props));
|
|
4568
6792
|
var portalLocation = document.getElementById('idmission-above-guides-content');
|
|
4569
6793
|
if (!portalLocation) return element;
|
|
4570
6794
|
return /*#__PURE__*/createPortal(element, portalLocation);
|
|
@@ -4828,7 +7052,7 @@ var templateObject_1$x;
|
|
|
4828
7052
|
|
|
4829
7053
|
function IdCaptureLoadingGraphic(props) {
|
|
4830
7054
|
var isMobile = window.innerHeight > window.innerWidth;
|
|
4831
|
-
return isMobile ? ( /*#__PURE__*/React__default.createElement(IdCaptureLoadingGraphicMobile,
|
|
7055
|
+
return isMobile ? ( /*#__PURE__*/React__default.createElement(IdCaptureLoadingGraphicMobile, _assign({}, props))) : ( /*#__PURE__*/React__default.createElement(IdCaptureLoadingGraphicDesktop, _assign({}, props)));
|
|
4832
7056
|
}
|
|
4833
7057
|
function IdCaptureLoadingGraphicDesktop(_a) {
|
|
4834
7058
|
var _b, _c, _d, _e, _f, _g;
|
|
@@ -5637,7 +7861,7 @@ var IdCaptureLoadingOverlay = function IdCaptureLoadingOverlay(_a) {
|
|
|
5637
7861
|
mode = _c === void 0 ? 'default' : _c,
|
|
5638
7862
|
props = __rest(_a, ["mode"]);
|
|
5639
7863
|
var Component = (_b = components$1[mode]) !== null && _b !== void 0 ? _b : components$1["default"];
|
|
5640
|
-
return /*#__PURE__*/React__default.createElement(Component,
|
|
7864
|
+
return /*#__PURE__*/React__default.createElement(Component, _assign({}, props));
|
|
5641
7865
|
};
|
|
5642
7866
|
|
|
5643
7867
|
var CapturedDocumentImg = function CapturedDocumentImg(_a) {
|
|
@@ -6334,7 +8558,7 @@ function IdCaptureGuides(_a) {
|
|
|
6334
8558
|
var _d = _a.guideType,
|
|
6335
8559
|
guideType = _d === void 0 ? 'fit' : _d,
|
|
6336
8560
|
_e = _a.portraitGuidesOnMobile,
|
|
6337
|
-
portraitGuidesOnMobile = _e === void 0 ?
|
|
8561
|
+
portraitGuidesOnMobile = _e === void 0 ? true : _e,
|
|
6338
8562
|
_f = _a.requestingFlip,
|
|
6339
8563
|
requestingFlip = _f === void 0 ? false : _f,
|
|
6340
8564
|
_g = _a.flipIdPromptAssets,
|
|
@@ -6492,14 +8716,14 @@ var documentCaptureStateReducer = function documentCaptureStateReducer(state, ac
|
|
|
6492
8716
|
var _a, _b, _c, _d, _e;
|
|
6493
8717
|
switch (action.type) {
|
|
6494
8718
|
case 'setDocuments':
|
|
6495
|
-
return
|
|
8719
|
+
return _assign(_assign({}, state), {
|
|
6496
8720
|
documents: action.payload,
|
|
6497
8721
|
currentDocumentIndex: 0
|
|
6498
8722
|
});
|
|
6499
8723
|
case 'setHooks':
|
|
6500
|
-
return
|
|
8724
|
+
return _assign(_assign({}, state), action.payload);
|
|
6501
8725
|
case 'redrawRequested':
|
|
6502
|
-
return
|
|
8726
|
+
return _assign(_assign({}, state), {
|
|
6503
8727
|
redrawing: true,
|
|
6504
8728
|
rectX: 0,
|
|
6505
8729
|
rectY: 0,
|
|
@@ -6508,7 +8732,7 @@ var documentCaptureStateReducer = function documentCaptureStateReducer(state, ac
|
|
|
6508
8732
|
rectOffsetTop: 0
|
|
6509
8733
|
});
|
|
6510
8734
|
case 'redrawInProgress':
|
|
6511
|
-
return
|
|
8735
|
+
return _assign(_assign({}, state), {
|
|
6512
8736
|
redrawing: false,
|
|
6513
8737
|
rectX: 0,
|
|
6514
8738
|
rectY: 0,
|
|
@@ -6517,16 +8741,16 @@ var documentCaptureStateReducer = function documentCaptureStateReducer(state, ac
|
|
|
6517
8741
|
rectOffsetTop: 0
|
|
6518
8742
|
});
|
|
6519
8743
|
case 'redrawCompleted':
|
|
6520
|
-
return
|
|
8744
|
+
return _assign(_assign(_assign({}, state), action.payload), {
|
|
6521
8745
|
initialDrawComplete: true
|
|
6522
8746
|
});
|
|
6523
8747
|
case 'captureRequested':
|
|
6524
|
-
return
|
|
8748
|
+
return _assign(_assign({}, state), {
|
|
6525
8749
|
capturing: true
|
|
6526
8750
|
});
|
|
6527
8751
|
case 'captureCompleted':
|
|
6528
8752
|
{
|
|
6529
|
-
var newState =
|
|
8753
|
+
var newState = _assign(_assign({}, state), {
|
|
6530
8754
|
capturing: false
|
|
6531
8755
|
});
|
|
6532
8756
|
var index = state.currentDocumentIndex;
|
|
@@ -6537,7 +8761,7 @@ var documentCaptureStateReducer = function documentCaptureStateReducer(state, ac
|
|
|
6537
8761
|
}
|
|
6538
8762
|
case 'retryCapture':
|
|
6539
8763
|
{
|
|
6540
|
-
var newState =
|
|
8764
|
+
var newState = _assign({}, state);
|
|
6541
8765
|
var index = state.currentDocumentIndex;
|
|
6542
8766
|
newState.documents[index].content = undefined;
|
|
6543
8767
|
newState.documents[index].contentUrl = undefined;
|
|
@@ -6545,14 +8769,14 @@ var documentCaptureStateReducer = function documentCaptureStateReducer(state, ac
|
|
|
6545
8769
|
}
|
|
6546
8770
|
case 'uploadStarted':
|
|
6547
8771
|
{
|
|
6548
|
-
var newState =
|
|
8772
|
+
var newState = _assign({}, state);
|
|
6549
8773
|
var index = state.currentDocumentIndex;
|
|
6550
8774
|
newState.documents[index].uploadState = 'in_progress';
|
|
6551
8775
|
return newState;
|
|
6552
8776
|
}
|
|
6553
8777
|
case 'uploadCompleted':
|
|
6554
8778
|
{
|
|
6555
|
-
var newState =
|
|
8779
|
+
var newState = _assign({}, state);
|
|
6556
8780
|
var index = state.currentDocumentIndex;
|
|
6557
8781
|
newState.documents[index].documentId = action.payload.documentId;
|
|
6558
8782
|
newState.documents[index].uploadState = 'succeeded';
|
|
@@ -6567,7 +8791,7 @@ var documentCaptureStateReducer = function documentCaptureStateReducer(state, ac
|
|
|
6567
8791
|
}
|
|
6568
8792
|
case 'uploadFailed':
|
|
6569
8793
|
{
|
|
6570
|
-
var newState =
|
|
8794
|
+
var newState = _assign({}, state);
|
|
6571
8795
|
var index = state.currentDocumentIndex;
|
|
6572
8796
|
newState.documents[index].uploadState = 'failed';
|
|
6573
8797
|
return newState;
|
|
@@ -6631,7 +8855,7 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
|
|
|
6631
8855
|
}, [uploadDocument]);
|
|
6632
8856
|
useEffect(function () {
|
|
6633
8857
|
var resolvedDocuments = (documents === null || documents === void 0 ? void 0 : documents.length) ? documents.map(function (d) {
|
|
6634
|
-
return
|
|
8858
|
+
return _assign(_assign({
|
|
6635
8859
|
title: 'Document Capture',
|
|
6636
8860
|
aspectRatio: aspectRatio,
|
|
6637
8861
|
cameraFeedMode: 'snapToGuides',
|
|
@@ -6712,7 +8936,7 @@ var DocumentCaptureStateProvider = function DocumentCaptureStateProvider(_a) {
|
|
|
6712
8936
|
}
|
|
6713
8937
|
}, [cameraRef, state.capturing, videoTag]);
|
|
6714
8938
|
var stateWithActions = useMemo(function () {
|
|
6715
|
-
return
|
|
8939
|
+
return _assign(_assign({}, state), {
|
|
6716
8940
|
uploadCapturedDocument: uploadCapturedDocument
|
|
6717
8941
|
});
|
|
6718
8942
|
}, [state, uploadCapturedDocument]);
|
|
@@ -7293,7 +9517,7 @@ var IdCaptureWizard = function IdCaptureWizard(_a) {
|
|
|
7293
9517
|
_z = _a.guideType,
|
|
7294
9518
|
guideType = _z === void 0 ? 'fit' : _z,
|
|
7295
9519
|
_0 = _a.portraitGuidesOnMobile,
|
|
7296
|
-
portraitGuidesOnMobile = _0 === void 0 ?
|
|
9520
|
+
portraitGuidesOnMobile = _0 === void 0 ? true : _0,
|
|
7297
9521
|
_1 = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
7298
9522
|
rotateLoadingOverlayImageWhenPortrait = _1 === void 0 ? true : _1,
|
|
7299
9523
|
_2 = _a.silentFallback,
|
|
@@ -7953,7 +10177,7 @@ var initialState$3 = {
|
|
|
7953
10177
|
var reducer$3 = function reducer(state, action) {
|
|
7954
10178
|
switch (action.type) {
|
|
7955
10179
|
case 'configure':
|
|
7956
|
-
return
|
|
10180
|
+
return _assign(_assign({}, state), action.payload);
|
|
7957
10181
|
case 'facesDetected':
|
|
7958
10182
|
{
|
|
7959
10183
|
var faces = action.payload.faces;
|
|
@@ -7991,7 +10215,7 @@ var reducer$3 = function reducer(state, action) {
|
|
|
7991
10215
|
} else if (!state.faceReady) {
|
|
7992
10216
|
faceReadyAt = new Date();
|
|
7993
10217
|
}
|
|
7994
|
-
return
|
|
10218
|
+
return _assign(_assign({}, state), {
|
|
7995
10219
|
faces: faces,
|
|
7996
10220
|
faceNotCentered: faceNotCentered,
|
|
7997
10221
|
faceLookingAway: faceLookingAway,
|
|
@@ -8161,7 +10385,7 @@ var reducer$2 = function reducer(state, action) {
|
|
|
8161
10385
|
{
|
|
8162
10386
|
var allowedStates = ['CAPTURING', 'FAILED', 'ERROR'];
|
|
8163
10387
|
if (allowedStates.includes(state.requestState)) {
|
|
8164
|
-
return
|
|
10388
|
+
return _assign(_assign({}, state), {
|
|
8165
10389
|
requestState: 'CAPTURED',
|
|
8166
10390
|
frame: action.payload.frame,
|
|
8167
10391
|
face: action.payload.face
|
|
@@ -8171,7 +10395,7 @@ var reducer$2 = function reducer(state, action) {
|
|
|
8171
10395
|
}
|
|
8172
10396
|
}
|
|
8173
10397
|
case 'livenessChecking':
|
|
8174
|
-
return
|
|
10398
|
+
return _assign(_assign({}, state), {
|
|
8175
10399
|
requestState: 'IN_PROGRESS'
|
|
8176
10400
|
});
|
|
8177
10401
|
case 'livenessChecked':
|
|
@@ -8183,7 +10407,7 @@ var reducer$2 = function reducer(state, action) {
|
|
|
8183
10407
|
errorData = _d.errorData,
|
|
8184
10408
|
resultData = _c.resultData;
|
|
8185
10409
|
if (statusCode !== '000') {
|
|
8186
|
-
return
|
|
10410
|
+
return _assign(_assign({}, state), {
|
|
8187
10411
|
requestState: 'ERROR',
|
|
8188
10412
|
requestError: new Error("".concat(statusMessage, ": ").concat(errorData))
|
|
8189
10413
|
});
|
|
@@ -8201,7 +10425,7 @@ var reducer$2 = function reducer(state, action) {
|
|
|
8201
10425
|
} else {
|
|
8202
10426
|
timesLivenessCheckFailed += 1;
|
|
8203
10427
|
}
|
|
8204
|
-
return
|
|
10428
|
+
return _assign(_assign({}, state), {
|
|
8205
10429
|
frame: (_a = action.payload.frame) !== null && _a !== void 0 ? _a : null,
|
|
8206
10430
|
face: (_b = action.payload.face) !== null && _b !== void 0 ? _b : null,
|
|
8207
10431
|
imageUrl: action.payload.imageUrl,
|
|
@@ -8215,7 +10439,7 @@ var reducer$2 = function reducer(state, action) {
|
|
|
8215
10439
|
});
|
|
8216
10440
|
}
|
|
8217
10441
|
case 'livenessCheckFailed':
|
|
8218
|
-
return
|
|
10442
|
+
return _assign(_assign({}, state), {
|
|
8219
10443
|
requestState: 'ERROR',
|
|
8220
10444
|
requestError: action.payload.error
|
|
8221
10445
|
});
|
|
@@ -8281,7 +10505,7 @@ var FaceLivenessCapture = function FaceLivenessCapture(_a) {
|
|
|
8281
10505
|
switch (_b.label) {
|
|
8282
10506
|
case 0:
|
|
8283
10507
|
_b.trys.push([0, 3,, 4]);
|
|
8284
|
-
imageUrl_1 = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face, 0.92,
|
|
10508
|
+
imageUrl_1 = cropToShoulders(rawCanvas.current, cropCanvas.current, resizeCanvas.current, frame, face, 0.92, 600);
|
|
8285
10509
|
setImageUrl(imageUrl_1);
|
|
8286
10510
|
_a = checkLiveness;
|
|
8287
10511
|
return [4 /*yield*/, dataUrlToBase64(imageUrl_1)];
|
|
@@ -9072,7 +11296,7 @@ var SelfieCaptureLoadingOverlay = function SelfieCaptureLoadingOverlay(_a) {
|
|
|
9072
11296
|
mode = _c === void 0 ? 'default' : _c,
|
|
9073
11297
|
props = __rest(_a, ["mode"]);
|
|
9074
11298
|
var Component = (_b = components[mode]) !== null && _b !== void 0 ? _b : components["default"];
|
|
9075
|
-
return /*#__PURE__*/React__default.createElement(Component,
|
|
11299
|
+
return /*#__PURE__*/React__default.createElement(Component, _assign({}, props));
|
|
9076
11300
|
};
|
|
9077
11301
|
|
|
9078
11302
|
var FaceLivenessWizard = function FaceLivenessWizard(_a) {
|
|
@@ -11023,7 +13247,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
11023
13247
|
_q = _a.idCaptureGuideType,
|
|
11024
13248
|
idCaptureGuideType = _q === void 0 ? 'fit' : _q,
|
|
11025
13249
|
_r = _a.idCapturePortraitGuidesOnMobile,
|
|
11026
|
-
idCapturePortraitGuidesOnMobile = _r === void 0 ?
|
|
13250
|
+
idCapturePortraitGuidesOnMobile = _r === void 0 ? true : _r,
|
|
11027
13251
|
_s = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
11028
13252
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _s === void 0 ? true : _s,
|
|
11029
13253
|
_t = _a.idCaptureModelLoadTimeoutMs,
|
|
@@ -11156,7 +13380,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
11156
13380
|
}), function () {
|
|
11157
13381
|
switch (captureState) {
|
|
11158
13382
|
case 'CAPTURING_ID':
|
|
11159
|
-
return /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard,
|
|
13383
|
+
return /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard, _assign({
|
|
11160
13384
|
key: "id-capture-".concat(attempt),
|
|
11161
13385
|
loadingOverlayMode: idCaptureLoadingOverlayMode,
|
|
11162
13386
|
silentFallback: silentFallback
|
|
@@ -11176,7 +13400,7 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
11176
13400
|
debugMode: debugMode
|
|
11177
13401
|
}))));
|
|
11178
13402
|
case 'CHECKING_LIVENESS':
|
|
11179
|
-
return /*#__PURE__*/React__default.createElement(FaceLivenessWizard,
|
|
13403
|
+
return /*#__PURE__*/React__default.createElement(FaceLivenessWizard, _assign({
|
|
11180
13404
|
key: "face-liveness-".concat(attempt),
|
|
11181
13405
|
loadingOverlayMode: faceLivenessLoadingOverlayMode,
|
|
11182
13406
|
silentFallback: silentFallback
|
|
@@ -11392,11 +13616,11 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
11392
13616
|
focusModelUrl: (_f = (_e = idCaptureProps.assets) === null || _e === void 0 ? void 0 : _e.focusModelUrl) !== null && _f !== void 0 ? _f : '',
|
|
11393
13617
|
onModelError: idCaptureProps.onModelError,
|
|
11394
13618
|
modelLoadTimeoutMs: idCaptureProps.modelLoadTimeoutMs
|
|
11395
|
-
}, /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard,
|
|
13619
|
+
}, /*#__PURE__*/React__default.createElement(IdCaptureStateProvider, null, /*#__PURE__*/React__default.createElement(GuideOrientationProvider, null, /*#__PURE__*/React__default.createElement(IdCaptureWizard, _assign({}, idCaptureProps, {
|
|
11396
13620
|
onSuccess: onIdCaptureSuccess
|
|
11397
13621
|
}))))));
|
|
11398
13622
|
case 'VideoIdCapture':
|
|
11399
|
-
return /*#__PURE__*/React__default.createElement(VideoIdWizard,
|
|
13623
|
+
return /*#__PURE__*/React__default.createElement(VideoIdWizard, _assign({}, videoIdCaptureProps, {
|
|
11400
13624
|
onComplete: onVideoIdCaptureComplete,
|
|
11401
13625
|
onCameraAccessDenied: onCameraAccessDenied,
|
|
11402
13626
|
onMicrophoneAccessDenied: onMicrophoneAccessDenied
|
|
@@ -11413,11 +13637,11 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
11413
13637
|
autoStart: false,
|
|
11414
13638
|
onModelError: faceLivenessProps.onModelError,
|
|
11415
13639
|
modelLoadTimeoutMs: faceLivenessProps.modelLoadTimeoutMs
|
|
11416
|
-
}, /*#__PURE__*/React__default.createElement(FaceLivenessWizard,
|
|
13640
|
+
}, /*#__PURE__*/React__default.createElement(FaceLivenessWizard, _assign({}, faceLivenessProps, {
|
|
11417
13641
|
onComplete: onFaceLivenessComplete
|
|
11418
13642
|
}))));
|
|
11419
13643
|
case 'SignatureCapture':
|
|
11420
|
-
return /*#__PURE__*/React__default.createElement(SignatureCapture,
|
|
13644
|
+
return /*#__PURE__*/React__default.createElement(SignatureCapture, _assign({}, signatureCaptureProps, {
|
|
11421
13645
|
onAccept: onSignatureCaptureSuccess
|
|
11422
13646
|
}));
|
|
11423
13647
|
case 'VideoSignatureCapture':
|
|
@@ -11435,12 +13659,12 @@ var CompositeWizardComponent = function CompositeWizardComponent(_a) {
|
|
|
11435
13659
|
throttleMs: 250,
|
|
11436
13660
|
onModelError: videoSignatureCaptureProps.onModelError,
|
|
11437
13661
|
modelLoadTimeoutMs: videoSignatureCaptureProps.modelLoadTimeoutMs
|
|
11438
|
-
}, /*#__PURE__*/React__default.createElement(VideoSignatureWizard,
|
|
13662
|
+
}, /*#__PURE__*/React__default.createElement(VideoSignatureWizard, _assign({}, videoSignatureCaptureProps, {
|
|
11439
13663
|
onComplete: onVideoSignatureComplete,
|
|
11440
13664
|
onRetryClicked: onVideoSignatureRetry
|
|
11441
13665
|
}))));
|
|
11442
13666
|
case 'AdditionalDocumentCapture':
|
|
11443
|
-
return /*#__PURE__*/React__default.createElement(AdditionalDocumentCaptureWizard,
|
|
13667
|
+
return /*#__PURE__*/React__default.createElement(AdditionalDocumentCaptureWizard, _assign({}, additionalDocumentCaptureProps, {
|
|
11444
13668
|
documents: documents,
|
|
11445
13669
|
onComplete: onAdditionalDocumentCaptureComplete
|
|
11446
13670
|
}));
|
|
@@ -11466,6 +13690,7 @@ var defaultTheme = {
|
|
|
11466
13690
|
'400': '#52b4ff',
|
|
11467
13691
|
'500': '#2a91ff',
|
|
11468
13692
|
'600': '#0d6efd',
|
|
13693
|
+
// default
|
|
11469
13694
|
'700': '#0c5ae9',
|
|
11470
13695
|
'800': '#1149bc',
|
|
11471
13696
|
'900': '#144194',
|
|
@@ -11478,6 +13703,7 @@ var defaultTheme = {
|
|
|
11478
13703
|
'300': '#b0b0b0',
|
|
11479
13704
|
'400': '#888888',
|
|
11480
13705
|
'500': '#666666',
|
|
13706
|
+
// default
|
|
11481
13707
|
'600': '#5d5d5d',
|
|
11482
13708
|
'700': '#4f4f4f',
|
|
11483
13709
|
'800': '#454545',
|
|
@@ -11492,6 +13718,7 @@ var defaultTheme = {
|
|
|
11492
13718
|
'400': '#4fd4ad',
|
|
11493
13719
|
'500': '#1cb090',
|
|
11494
13720
|
'600': '#16a085',
|
|
13721
|
+
// default
|
|
11495
13722
|
'700': '#147160',
|
|
11496
13723
|
'800': '#155a4f',
|
|
11497
13724
|
'900': '#164b42',
|
|
@@ -11504,6 +13731,7 @@ var defaultTheme = {
|
|
|
11504
13731
|
'300': '#fda4af',
|
|
11505
13732
|
'400': '#fb7185',
|
|
11506
13733
|
'500': '#f43f5e',
|
|
13734
|
+
// default
|
|
11507
13735
|
'600': '#e11d48',
|
|
11508
13736
|
'700': '#be123c',
|
|
11509
13737
|
'800': '#9f1239',
|
|
@@ -11516,6 +13744,7 @@ var defaultTheme = {
|
|
|
11516
13744
|
'200': '#f6cdb2',
|
|
11517
13745
|
'300': '#f0ab81',
|
|
11518
13746
|
'400': '#ea8557',
|
|
13747
|
+
// default
|
|
11519
13748
|
'500': '#e35e2c',
|
|
11520
13749
|
'600': '#d54621',
|
|
11521
13750
|
'700': '#b1341d',
|
|
@@ -11681,6 +13910,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
11681
13910
|
bypassNameMatching = _a.bypassNameMatching,
|
|
11682
13911
|
personalData = _a.personalData,
|
|
11683
13912
|
cardData = _a.cardData,
|
|
13913
|
+
idData = _a.idData,
|
|
11684
13914
|
webhooksEnabled = _a.webhooksEnabled,
|
|
11685
13915
|
webhooksClientTraceId = _a.webhooksClientTraceId,
|
|
11686
13916
|
webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
|
|
@@ -11688,6 +13918,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
11688
13918
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
11689
13919
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
11690
13920
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
13921
|
+
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
11691
13922
|
precapturedDocuments = _a.precapturedDocuments,
|
|
11692
13923
|
_c = _a.loadingOverlayMode,
|
|
11693
13924
|
loadingOverlayMode = _c === void 0 ? 'default' : _c,
|
|
@@ -11703,7 +13934,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
11703
13934
|
_h = _a.guideType,
|
|
11704
13935
|
guideType = _h === void 0 ? 'fit' : _h,
|
|
11705
13936
|
_j = _a.portraitGuidesOnMobile,
|
|
11706
|
-
portraitGuidesOnMobile = _j === void 0 ?
|
|
13937
|
+
portraitGuidesOnMobile = _j === void 0 ? true : _j,
|
|
11707
13938
|
_k = _a.rotateLoadingOverlayImageWhenPortrait,
|
|
11708
13939
|
rotateLoadingOverlayImageWhenPortrait = _k === void 0 ? true : _k,
|
|
11709
13940
|
_l = _a.modelLoadTimeoutMs,
|
|
@@ -11819,6 +14050,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
11819
14050
|
bypassNameMatching: bypassNameMatching,
|
|
11820
14051
|
personalData: personalData,
|
|
11821
14052
|
cardData: cardData,
|
|
14053
|
+
idData: idData,
|
|
11822
14054
|
webhooksEnabled: webhooksEnabled,
|
|
11823
14055
|
webhooksClientTraceId: webhooksClientTraceId,
|
|
11824
14056
|
webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
|
|
@@ -11826,6 +14058,7 @@ var IdValidation = function IdValidation(_a) {
|
|
|
11826
14058
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
11827
14059
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
11828
14060
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
14061
|
+
customerDataMatchConfig: customerDataMatchConfig,
|
|
11829
14062
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
11830
14063
|
onDocumentUploadProgress: onDocumentUploadProgress,
|
|
11831
14064
|
onDocumentUploaded: onDocumentUploaded,
|
|
@@ -11976,6 +14209,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
11976
14209
|
bypassNameMatching = _a.bypassNameMatching,
|
|
11977
14210
|
personalData = _a.personalData,
|
|
11978
14211
|
cardData = _a.cardData,
|
|
14212
|
+
idData = _a.idData,
|
|
11979
14213
|
webhooksEnabled = _a.webhooksEnabled,
|
|
11980
14214
|
webhooksClientTraceId = _a.webhooksClientTraceId,
|
|
11981
14215
|
webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
|
|
@@ -11983,6 +14217,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
11983
14217
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
11984
14218
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
11985
14219
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
14220
|
+
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
11986
14221
|
precapturedDocuments = _a.precapturedDocuments,
|
|
11987
14222
|
_c = _a.idCaptureLoadingOverlayMode,
|
|
11988
14223
|
idCaptureLoadingOverlayMode = _c === void 0 ? 'default' : _c,
|
|
@@ -12000,7 +14235,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
12000
14235
|
_j = _a.idCaptureGuideType,
|
|
12001
14236
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
12002
14237
|
_k = _a.idCapturePortraitGuidesOnMobile,
|
|
12003
|
-
idCapturePortraitGuidesOnMobile = _k === void 0 ?
|
|
14238
|
+
idCapturePortraitGuidesOnMobile = _k === void 0 ? true : _k,
|
|
12004
14239
|
_l = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
12005
14240
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _l === void 0 ? true : _l,
|
|
12006
14241
|
_m = _a.idCaptureModelLoadTimeoutMs,
|
|
@@ -12140,6 +14375,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
12140
14375
|
bypassNameMatching: bypassNameMatching,
|
|
12141
14376
|
personalData: personalData,
|
|
12142
14377
|
cardData: cardData,
|
|
14378
|
+
idData: idData,
|
|
12143
14379
|
webhooksEnabled: webhooksEnabled,
|
|
12144
14380
|
webhooksClientTraceId: webhooksClientTraceId,
|
|
12145
14381
|
webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
|
|
@@ -12147,6 +14383,7 @@ var IdAndFaceValidation = function IdAndFaceValidation(_a) {
|
|
|
12147
14383
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
12148
14384
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
12149
14385
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
14386
|
+
customerDataMatchConfig: customerDataMatchConfig,
|
|
12150
14387
|
precapturedDocuments: precapturedDocuments,
|
|
12151
14388
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
12152
14389
|
onDocumentUploadProgress: onDocumentUploadProgress,
|
|
@@ -12193,6 +14430,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
12193
14430
|
bypassNameMatching = _a.bypassNameMatching,
|
|
12194
14431
|
personalData = _a.personalData,
|
|
12195
14432
|
cardData = _a.cardData,
|
|
14433
|
+
idData = _a.idData,
|
|
12196
14434
|
deduplicationEnabled = _a.deduplicationEnabled,
|
|
12197
14435
|
deduplicationSynchronous = _a.deduplicationSynchronous,
|
|
12198
14436
|
webhooksEnabled = _a.webhooksEnabled,
|
|
@@ -12202,6 +14440,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
12202
14440
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
12203
14441
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
12204
14442
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
14443
|
+
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
12205
14444
|
_c = _a.idCaptureLoadingOverlayMode,
|
|
12206
14445
|
idCaptureLoadingOverlayMode = _c === void 0 ? 'default' : _c,
|
|
12207
14446
|
_d = _a.idCaptureRequirement,
|
|
@@ -12218,7 +14457,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
12218
14457
|
_j = _a.idCaptureGuideType,
|
|
12219
14458
|
idCaptureGuideType = _j === void 0 ? 'fit' : _j,
|
|
12220
14459
|
_k = _a.idCapturePortraitGuidesOnMobile,
|
|
12221
|
-
idCapturePortraitGuidesOnMobile = _k === void 0 ?
|
|
14460
|
+
idCapturePortraitGuidesOnMobile = _k === void 0 ? true : _k,
|
|
12222
14461
|
_l = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
12223
14462
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _l === void 0 ? true : _l,
|
|
12224
14463
|
_m = _a.idCaptureModelLoadTimeoutMs,
|
|
@@ -12354,6 +14593,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
12354
14593
|
bypassNameMatching: bypassNameMatching,
|
|
12355
14594
|
personalData: personalData,
|
|
12356
14595
|
cardData: cardData,
|
|
14596
|
+
idData: idData,
|
|
12357
14597
|
deduplicationEnabled: deduplicationEnabled,
|
|
12358
14598
|
deduplicationSynchronous: deduplicationSynchronous,
|
|
12359
14599
|
webhooksEnabled: webhooksEnabled,
|
|
@@ -12363,6 +14603,7 @@ var CustomerIdAndBiometricsEnrollment = function CustomerIdAndBiometricsEnrollme
|
|
|
12363
14603
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
12364
14604
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
12365
14605
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
14606
|
+
customerDataMatchConfig: customerDataMatchConfig,
|
|
12366
14607
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
12367
14608
|
onDocumentUploadProgress: onDocumentUploadProgress,
|
|
12368
14609
|
onDocumentUploaded: onDocumentUploaded,
|
|
@@ -12403,7 +14644,7 @@ var reducer$1 = function reducer(state, action) {
|
|
|
12403
14644
|
{
|
|
12404
14645
|
var allowedStates = ['CAPTURING', 'ERROR'];
|
|
12405
14646
|
if (allowedStates.includes(state.requestState)) {
|
|
12406
|
-
return
|
|
14647
|
+
return _assign(_assign({}, state), {
|
|
12407
14648
|
requestState: 'CAPTURED',
|
|
12408
14649
|
frame: action.payload.frame,
|
|
12409
14650
|
face: action.payload.face
|
|
@@ -12413,7 +14654,7 @@ var reducer$1 = function reducer(state, action) {
|
|
|
12413
14654
|
}
|
|
12414
14655
|
}
|
|
12415
14656
|
case 'verifying':
|
|
12416
|
-
return
|
|
14657
|
+
return _assign(_assign({}, state), {
|
|
12417
14658
|
requestState: 'VERIFYING',
|
|
12418
14659
|
imageUrl: action.payload.imageUrl
|
|
12419
14660
|
});
|
|
@@ -12426,7 +14667,7 @@ var reducer$1 = function reducer(state, action) {
|
|
|
12426
14667
|
errorData = _b.errorData,
|
|
12427
14668
|
resultData = _a.resultData;
|
|
12428
14669
|
if (statusCode !== '000') {
|
|
12429
|
-
return
|
|
14670
|
+
return _assign(_assign({}, state), {
|
|
12430
14671
|
requestState: 'ERROR',
|
|
12431
14672
|
requestError: new Error("".concat(statusMessage, ": ").concat(errorData))
|
|
12432
14673
|
});
|
|
@@ -12444,13 +14685,13 @@ var reducer$1 = function reducer(state, action) {
|
|
|
12444
14685
|
requestState = 'REJECTED';
|
|
12445
14686
|
}
|
|
12446
14687
|
}
|
|
12447
|
-
return
|
|
14688
|
+
return _assign(_assign({}, state), {
|
|
12448
14689
|
requestState: requestState,
|
|
12449
14690
|
unverifiedTimes: unverifiedTimes
|
|
12450
14691
|
});
|
|
12451
14692
|
}
|
|
12452
14693
|
case 'verificationFailed':
|
|
12453
|
-
return
|
|
14694
|
+
return _assign(_assign({}, state), {
|
|
12454
14695
|
requestState: 'ERROR',
|
|
12455
14696
|
requestError: action.payload.error
|
|
12456
14697
|
});
|
|
@@ -12963,7 +15204,7 @@ var reducer = function reducer(state, action) {
|
|
|
12963
15204
|
{
|
|
12964
15205
|
var allowedStates = ['CAPTURING', 'ERROR'];
|
|
12965
15206
|
if (allowedStates.includes(state.requestState)) {
|
|
12966
|
-
return
|
|
15207
|
+
return _assign(_assign({}, state), {
|
|
12967
15208
|
requestState: 'CAPTURED',
|
|
12968
15209
|
frame: action.payload.frame,
|
|
12969
15210
|
face: action.payload.face
|
|
@@ -12973,7 +15214,7 @@ var reducer = function reducer(state, action) {
|
|
|
12973
15214
|
}
|
|
12974
15215
|
}
|
|
12975
15216
|
case 'identifying':
|
|
12976
|
-
return
|
|
15217
|
+
return _assign(_assign({}, state), {
|
|
12977
15218
|
requestState: 'IDENTIFYING',
|
|
12978
15219
|
imageUrl: action.payload.imageUrl
|
|
12979
15220
|
});
|
|
@@ -12986,7 +15227,7 @@ var reducer = function reducer(state, action) {
|
|
|
12986
15227
|
errorData = _b.errorData,
|
|
12987
15228
|
resultData = _a.resultData;
|
|
12988
15229
|
if (statusCode !== '000') {
|
|
12989
|
-
return
|
|
15230
|
+
return _assign(_assign({}, state), {
|
|
12990
15231
|
requestState: 'ERROR',
|
|
12991
15232
|
requestError: new Error("".concat(statusMessage, ": ").concat(errorData))
|
|
12992
15233
|
});
|
|
@@ -13002,13 +15243,13 @@ var reducer = function reducer(state, action) {
|
|
|
13002
15243
|
} else {
|
|
13003
15244
|
requestState = 'NOT_FOUND';
|
|
13004
15245
|
}
|
|
13005
|
-
return
|
|
15246
|
+
return _assign(_assign({}, state), {
|
|
13006
15247
|
requestState: requestState,
|
|
13007
15248
|
notFoundTimes: notFoundTimes
|
|
13008
15249
|
});
|
|
13009
15250
|
}
|
|
13010
15251
|
case 'identificationFailed':
|
|
13011
|
-
return
|
|
15252
|
+
return _assign(_assign({}, state), {
|
|
13012
15253
|
requestState: 'ERROR',
|
|
13013
15254
|
requestError: action.payload.error
|
|
13014
15255
|
});
|
|
@@ -13605,6 +15846,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
13605
15846
|
bypassNameMatching = _a.bypassNameMatching,
|
|
13606
15847
|
personalData = _a.personalData,
|
|
13607
15848
|
cardData = _a.cardData,
|
|
15849
|
+
idData = _a.idData,
|
|
13608
15850
|
webhooksEnabled = _a.webhooksEnabled,
|
|
13609
15851
|
webhooksClientTraceId = _a.webhooksClientTraceId,
|
|
13610
15852
|
webhooksStripSpecialCharacters = _a.webhooksStripSpecialCharacters,
|
|
@@ -13612,6 +15854,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
13612
15854
|
webhooksSendProcessedImages = _a.webhooksSendProcessedImages,
|
|
13613
15855
|
webhooksFireOnReview = _a.webhooksFireOnReview,
|
|
13614
15856
|
sendBase64DocumentsInSwaggerProxy = _a.sendBase64DocumentsInSwaggerProxy,
|
|
15857
|
+
customerDataMatchConfig = _a.customerDataMatchConfig,
|
|
13615
15858
|
onBeforeDocumentUpload = _a.onBeforeDocumentUpload,
|
|
13616
15859
|
onDocumentUploadProgress = _a.onDocumentUploadProgress,
|
|
13617
15860
|
onDocumentUploaded = _a.onDocumentUploaded,
|
|
@@ -13646,7 +15889,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
13646
15889
|
_l = _a.idCaptureGuideType,
|
|
13647
15890
|
idCaptureGuideType = _l === void 0 ? 'fit' : _l,
|
|
13648
15891
|
_m = _a.idCapturePortraitGuidesOnMobile,
|
|
13649
|
-
idCapturePortraitGuidesOnMobile = _m === void 0 ?
|
|
15892
|
+
idCapturePortraitGuidesOnMobile = _m === void 0 ? true : _m,
|
|
13650
15893
|
_o = _a.idCaptureRotateLoadingOverlayImageWhenPortrait,
|
|
13651
15894
|
idCaptureRotateLoadingOverlayImageWhenPortrait = _o === void 0 ? true : _o,
|
|
13652
15895
|
idCardForFaceMatch = _a.idCardForFaceMatch,
|
|
@@ -13758,6 +16001,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
13758
16001
|
bypassNameMatching: bypassNameMatching,
|
|
13759
16002
|
personalData: personalData,
|
|
13760
16003
|
cardData: cardData,
|
|
16004
|
+
idData: idData,
|
|
13761
16005
|
webhooksEnabled: webhooksEnabled,
|
|
13762
16006
|
webhooksClientTraceId: webhooksClientTraceId,
|
|
13763
16007
|
webhooksStripSpecialCharacters: webhooksStripSpecialCharacters,
|
|
@@ -13765,6 +16009,7 @@ var VideoIdValidation = function VideoIdValidation(_a) {
|
|
|
13765
16009
|
webhooksSendProcessedImages: webhooksSendProcessedImages,
|
|
13766
16010
|
webhooksFireOnReview: webhooksFireOnReview,
|
|
13767
16011
|
sendBase64DocumentsInSwaggerProxy: sendBase64DocumentsInSwaggerProxy,
|
|
16012
|
+
customerDataMatchConfig: customerDataMatchConfig,
|
|
13768
16013
|
idCardForFaceMatch: idCardForFaceMatch,
|
|
13769
16014
|
onBeforeDocumentUpload: onBeforeDocumentUpload,
|
|
13770
16015
|
onDocumentUploadProgress: onDocumentUploadProgress,
|
|
@@ -14049,7 +16294,7 @@ function renderComponent(Component, targetElement, options) {
|
|
|
14049
16294
|
options = targetElement;
|
|
14050
16295
|
targetElement = undefined;
|
|
14051
16296
|
}
|
|
14052
|
-
return renderElement( /*#__PURE__*/React__default.createElement(Component,
|
|
16297
|
+
return renderElement( /*#__PURE__*/React__default.createElement(Component, _assign({}, options)), targetElement);
|
|
14053
16298
|
}
|
|
14054
16299
|
var renderIdValidation = function renderIdValidation(optionsOrTargetElement, options) {
|
|
14055
16300
|
return renderComponent(IdValidation, optionsOrTargetElement, options);
|