@tradalab/mediakit 1.4.0 → 2.1.0
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/README.md +360 -0
- package/dist/detect-worker.js +4825 -0
- package/dist/detect-worker.js.map +1 -0
- package/dist/index.d.ts +25 -3
- package/dist/index.js +242 -26
- package/dist/index.js.map +1 -1
- package/dist/mediakit.wasm +0 -0
- package/dist/worker.js +4109 -3211
- package/dist/worker.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,4825 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
// node_modules/.pnpm/@mediapipe+tasks-vision@1.1.1/node_modules/@mediapipe/tasks-vision/vision_bundle.mjs
|
|
4
|
+
var t = "undefined" != typeof self ? self : {};
|
|
5
|
+
function e(e2, r2) {
|
|
6
|
+
t: {
|
|
7
|
+
for (var n2 = ["CLOSURE_FLAGS"], i2 = t, s2 = 0; s2 < n2.length; s2++) if (null == (i2 = i2[n2[s2]])) {
|
|
8
|
+
n2 = null;
|
|
9
|
+
break t;
|
|
10
|
+
}
|
|
11
|
+
n2 = i2;
|
|
12
|
+
}
|
|
13
|
+
return null != (e2 = n2 && n2[e2]) ? e2 : r2;
|
|
14
|
+
}
|
|
15
|
+
function r(e2, r2) {
|
|
16
|
+
e2 = e2.split(".");
|
|
17
|
+
for (var n2, i2 = t; e2.length && (n2 = e2.shift()); ) e2.length || void 0 === r2 ? i2 = i2[n2] && i2[n2] !== Object.prototype[n2] ? i2[n2] : i2[n2] = {} : i2[n2] = r2;
|
|
18
|
+
}
|
|
19
|
+
function n() {
|
|
20
|
+
throw Error("Invalid UTF8");
|
|
21
|
+
}
|
|
22
|
+
function i(t2, e2) {
|
|
23
|
+
return e2 = String.fromCharCode.apply(null, e2), null == t2 ? e2 : t2 + e2;
|
|
24
|
+
}
|
|
25
|
+
var s;
|
|
26
|
+
var o;
|
|
27
|
+
var a = void 0;
|
|
28
|
+
var h = "undefined" != typeof TextDecoder;
|
|
29
|
+
var u = "undefined" != typeof TextEncoder;
|
|
30
|
+
function c(t2) {
|
|
31
|
+
if (u) t2 = (o ||= new TextEncoder()).encode(t2);
|
|
32
|
+
else {
|
|
33
|
+
let r2 = 0, n2 = new Uint8Array(3 * t2.length);
|
|
34
|
+
for (let i2 = 0; i2 < t2.length; i2++) {
|
|
35
|
+
var e2 = t2.charCodeAt(i2);
|
|
36
|
+
if (e2 < 128) n2[r2++] = e2;
|
|
37
|
+
else {
|
|
38
|
+
if (e2 < 2048) n2[r2++] = e2 >> 6 | 192;
|
|
39
|
+
else {
|
|
40
|
+
if (e2 >= 55296 && e2 <= 57343) {
|
|
41
|
+
if (e2 <= 56319 && i2 < t2.length) {
|
|
42
|
+
let s2 = t2.charCodeAt(++i2);
|
|
43
|
+
if (s2 >= 56320 && s2 <= 57343) {
|
|
44
|
+
e2 = 1024 * (e2 - 55296) + s2 - 56320 + 65536, n2[r2++] = e2 >> 18 | 240, n2[r2++] = e2 >> 12 & 63 | 128, n2[r2++] = e2 >> 6 & 63 | 128, n2[r2++] = 63 & e2 | 128;
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
i2--;
|
|
48
|
+
}
|
|
49
|
+
e2 = 65533;
|
|
50
|
+
}
|
|
51
|
+
n2[r2++] = e2 >> 12 | 224, n2[r2++] = e2 >> 6 & 63 | 128;
|
|
52
|
+
}
|
|
53
|
+
n2[r2++] = 63 & e2 | 128;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
t2 = r2 === n2.length ? n2 : n2.subarray(0, r2);
|
|
57
|
+
}
|
|
58
|
+
return t2;
|
|
59
|
+
}
|
|
60
|
+
function l(e2) {
|
|
61
|
+
t.setTimeout(() => {
|
|
62
|
+
throw e2;
|
|
63
|
+
}, 0);
|
|
64
|
+
}
|
|
65
|
+
var d = e(610401301, false);
|
|
66
|
+
var f = e(748402147, true);
|
|
67
|
+
function p() {
|
|
68
|
+
var e2 = t.navigator;
|
|
69
|
+
return e2 && (e2 = e2.userAgent) ? e2 : "";
|
|
70
|
+
}
|
|
71
|
+
var m;
|
|
72
|
+
var g = t.navigator;
|
|
73
|
+
function v(t2) {
|
|
74
|
+
return v[" "](t2), t2;
|
|
75
|
+
}
|
|
76
|
+
m = g && g.userAgentData || null, v[" "] = function() {
|
|
77
|
+
};
|
|
78
|
+
var _ = {};
|
|
79
|
+
var y = null;
|
|
80
|
+
function E(t2) {
|
|
81
|
+
var e2 = t2.length, r2 = 3 * e2 / 4;
|
|
82
|
+
r2 % 3 ? r2 = Math.floor(r2) : -1 != "=.".indexOf(t2[e2 - 1]) && (r2 = -1 != "=.".indexOf(t2[e2 - 2]) ? r2 - 2 : r2 - 1);
|
|
83
|
+
var n2 = new Uint8Array(r2), i2 = 0;
|
|
84
|
+
return (function(t3, e3) {
|
|
85
|
+
function r3(e4) {
|
|
86
|
+
for (; n3 < t3.length; ) {
|
|
87
|
+
let e5 = t3.charAt(n3++), r4 = y[e5];
|
|
88
|
+
if (null != r4) return r4;
|
|
89
|
+
if (!/^[\s\xa0]*$/.test(e5)) throw Error("Unknown base64 encoding at char: " + e5);
|
|
90
|
+
}
|
|
91
|
+
return e4;
|
|
92
|
+
}
|
|
93
|
+
A();
|
|
94
|
+
for (var n3 = 0; ; ) {
|
|
95
|
+
let t4 = r3(-1), n4 = r3(0), i3 = r3(64), s2 = r3(64);
|
|
96
|
+
if (64 === s2 && -1 === t4) break;
|
|
97
|
+
e3(t4 << 2 | n4 >> 4), 64 != i3 && (e3(n4 << 4 & 240 | i3 >> 2), 64 != s2 && e3(i3 << 6 & 192 | s2));
|
|
98
|
+
}
|
|
99
|
+
})(t2, function(t3) {
|
|
100
|
+
n2[i2++] = t3;
|
|
101
|
+
}), i2 !== r2 ? n2.subarray(0, i2) : n2;
|
|
102
|
+
}
|
|
103
|
+
function A() {
|
|
104
|
+
if (!y) {
|
|
105
|
+
y = {};
|
|
106
|
+
var t2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""), e2 = ["+/=", "+/", "-_=", "-_.", "-_"];
|
|
107
|
+
for (let r2 = 0; r2 < 5; r2++) {
|
|
108
|
+
let n2 = t2.concat(e2[r2].split(""));
|
|
109
|
+
_[r2] = n2;
|
|
110
|
+
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
111
|
+
let e3 = n2[t3];
|
|
112
|
+
void 0 === y[e3] && (y[e3] = t3);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
var w = "undefined" != typeof Uint8Array;
|
|
118
|
+
var T = !(!(!!d && (!!m && m.brands.length > 0)) && (-1 != p().indexOf("Trident") || -1 != p().indexOf("MSIE"))) && "function" == typeof btoa;
|
|
119
|
+
var b = /[-_.]/g;
|
|
120
|
+
var k = { "-": "+", _: "/", ".": "=" };
|
|
121
|
+
function S(t2) {
|
|
122
|
+
return k[t2] || "";
|
|
123
|
+
}
|
|
124
|
+
function L(t2) {
|
|
125
|
+
if (!T) return E(t2);
|
|
126
|
+
t2 = b.test(t2) ? t2.replace(b, S) : t2, t2 = atob(t2);
|
|
127
|
+
var e2 = new Uint8Array(t2.length);
|
|
128
|
+
for (let r2 = 0; r2 < t2.length; r2++) e2[r2] = t2.charCodeAt(r2);
|
|
129
|
+
return e2;
|
|
130
|
+
}
|
|
131
|
+
function x(t2) {
|
|
132
|
+
return w && null != t2 && t2 instanceof Uint8Array;
|
|
133
|
+
}
|
|
134
|
+
var R = {};
|
|
135
|
+
function I() {
|
|
136
|
+
return C ||= new N(null, R);
|
|
137
|
+
}
|
|
138
|
+
function F(t2) {
|
|
139
|
+
M(R);
|
|
140
|
+
var e2 = t2.h;
|
|
141
|
+
return null == (e2 = null == e2 || x(e2) ? e2 : "string" == typeof e2 ? L(e2) : null) ? e2 : t2.h = e2;
|
|
142
|
+
}
|
|
143
|
+
var C;
|
|
144
|
+
var N = class {
|
|
145
|
+
i() {
|
|
146
|
+
return new Uint8Array(F(this) || 0);
|
|
147
|
+
}
|
|
148
|
+
constructor(t2, e2) {
|
|
149
|
+
if (M(e2), this.h = t2, null != t2 && 0 === t2.length) throw Error("ByteString should be constructed with non-empty values");
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
function M(t2) {
|
|
153
|
+
if (t2 !== R) throw Error("illegal external caller");
|
|
154
|
+
}
|
|
155
|
+
function O(t2, e2) {
|
|
156
|
+
t2.__closure__error__context__984382 || (t2.__closure__error__context__984382 = {}), t2.__closure__error__context__984382.severity = e2;
|
|
157
|
+
}
|
|
158
|
+
var D = void 0;
|
|
159
|
+
function P(t2) {
|
|
160
|
+
return O(t2 = Error(t2), "warning"), t2;
|
|
161
|
+
}
|
|
162
|
+
function $(t2, e2) {
|
|
163
|
+
if (null != t2) {
|
|
164
|
+
var r2 = D ??= {}, n2 = r2[t2] || 0;
|
|
165
|
+
n2 >= e2 || (r2[t2] = n2 + 1, O(t2 = Error(), "incident"), l(t2));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function U() {
|
|
169
|
+
return "function" == typeof BigInt;
|
|
170
|
+
}
|
|
171
|
+
var B = "function" == typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol();
|
|
172
|
+
function j(t2, e2, r2 = false) {
|
|
173
|
+
return "function" == typeof Symbol && "symbol" == typeof /* @__PURE__ */ Symbol() ? r2 && Symbol.for && t2 ? Symbol.for(t2) : null != t2 ? Symbol(t2) : /* @__PURE__ */ Symbol() : e2;
|
|
174
|
+
}
|
|
175
|
+
var G;
|
|
176
|
+
var V = j("jas", void 0, true);
|
|
177
|
+
var H = j(void 0, "0di");
|
|
178
|
+
var K = j(void 0, "1oa");
|
|
179
|
+
var X = j(void 0, /* @__PURE__ */ Symbol());
|
|
180
|
+
var W = j(void 0, "0ub");
|
|
181
|
+
var z = j(void 0, "0ubs");
|
|
182
|
+
var Y = j(void 0, "0ubsb");
|
|
183
|
+
var q = j(void 0, "0actk");
|
|
184
|
+
var J = j("m_m", "lb", true);
|
|
185
|
+
var Z = j();
|
|
186
|
+
var Q = { Wa: { value: 0, configurable: true, writable: true, enumerable: false } };
|
|
187
|
+
var tt = Object.defineProperties;
|
|
188
|
+
var et = B ? V : "Wa";
|
|
189
|
+
var rt = [];
|
|
190
|
+
function nt(t2, e2) {
|
|
191
|
+
B || et in t2 || tt(t2, Q), t2[et] |= e2;
|
|
192
|
+
}
|
|
193
|
+
function it(t2, e2) {
|
|
194
|
+
B || et in t2 || tt(t2, Q), t2[et] = e2;
|
|
195
|
+
}
|
|
196
|
+
function st(t2) {
|
|
197
|
+
return nt(t2, 34), t2;
|
|
198
|
+
}
|
|
199
|
+
function ot(t2) {
|
|
200
|
+
return nt(t2, 8192), t2;
|
|
201
|
+
}
|
|
202
|
+
it(rt, 7), G = Object.freeze(rt);
|
|
203
|
+
var at = {};
|
|
204
|
+
function ht(t2) {
|
|
205
|
+
return null != t2 && t2[J] === at;
|
|
206
|
+
}
|
|
207
|
+
function ut(t2, e2) {
|
|
208
|
+
return void 0 === e2 ? t2.i !== ct && !!(2 & t2.B[et]) : !!(2 & e2) && t2.i !== ct;
|
|
209
|
+
}
|
|
210
|
+
var ct = {};
|
|
211
|
+
function lt(t2, e2) {
|
|
212
|
+
if (null != t2) {
|
|
213
|
+
if ("string" == typeof t2) t2 = t2 ? new N(t2, R) : I();
|
|
214
|
+
else if (t2.constructor !== N) if (x(t2)) t2 = t2.length ? new N(new Uint8Array(t2), R) : I();
|
|
215
|
+
else {
|
|
216
|
+
if (!e2) throw Error();
|
|
217
|
+
t2 = void 0;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return t2;
|
|
221
|
+
}
|
|
222
|
+
var dt = class {
|
|
223
|
+
constructor(t2, e2, r2) {
|
|
224
|
+
this.h = t2, this.i = e2, this.l = r2;
|
|
225
|
+
}
|
|
226
|
+
next() {
|
|
227
|
+
var t2 = this.h.next();
|
|
228
|
+
return t2.done || (t2.value = this.i.call(this.l, t2.value)), t2;
|
|
229
|
+
}
|
|
230
|
+
[Symbol.iterator]() {
|
|
231
|
+
return this;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
function ft(t2, e2, r2) {
|
|
235
|
+
var n2, i2 = 128 & e2 ? 0 : -1, s2 = t2.length;
|
|
236
|
+
(n2 = !!s2) && (n2 = null != (n2 = t2[s2 - 1]) && "object" == typeof n2 && n2.constructor === Object);
|
|
237
|
+
var o2 = s2 + (n2 ? -1 : 0);
|
|
238
|
+
for (e2 = 128 & e2 ? 1 : 0; e2 < o2; e2++) r2(e2 - i2, t2[e2]);
|
|
239
|
+
if (n2) {
|
|
240
|
+
t2 = t2[s2 - 1];
|
|
241
|
+
for (let e3 in t2) !isNaN(e3) && r2(+e3, t2[e3]);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
Object.freeze({});
|
|
245
|
+
var pt = {};
|
|
246
|
+
function mt(t2) {
|
|
247
|
+
return 128 & t2 ? pt : void 0;
|
|
248
|
+
}
|
|
249
|
+
function gt(t2) {
|
|
250
|
+
return t2.jb = true, t2;
|
|
251
|
+
}
|
|
252
|
+
var vt = gt((t2) => "number" == typeof t2);
|
|
253
|
+
var _t = gt((t2) => "string" == typeof t2);
|
|
254
|
+
var yt = gt((t2) => "boolean" == typeof t2);
|
|
255
|
+
var Et = "function" == typeof t.BigInt && "bigint" == typeof t.BigInt(0);
|
|
256
|
+
function At(t2) {
|
|
257
|
+
var e2 = t2;
|
|
258
|
+
if (_t(e2)) {
|
|
259
|
+
if (!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(e2)) throw Error(String(e2));
|
|
260
|
+
} else if (vt(e2) && !Number.isSafeInteger(e2)) throw Error(String(e2));
|
|
261
|
+
return Et ? BigInt(t2) : t2 = yt(t2) ? t2 ? "1" : "0" : _t(t2) ? t2.trim() || "0" : String(t2);
|
|
262
|
+
}
|
|
263
|
+
var wt = gt((t2) => Et ? t2 >= bt && t2 <= St : "-" === t2[0] ? Lt(t2, Tt) : Lt(t2, kt));
|
|
264
|
+
var Tt = Number.MIN_SAFE_INTEGER.toString();
|
|
265
|
+
var bt = Et ? BigInt(Number.MIN_SAFE_INTEGER) : void 0;
|
|
266
|
+
var kt = Number.MAX_SAFE_INTEGER.toString();
|
|
267
|
+
var St = Et ? BigInt(Number.MAX_SAFE_INTEGER) : void 0;
|
|
268
|
+
function Lt(t2, e2) {
|
|
269
|
+
if (t2.length > e2.length) return false;
|
|
270
|
+
if (t2.length < e2.length || t2 === e2) return true;
|
|
271
|
+
for (let r2 = 0; r2 < t2.length; r2++) {
|
|
272
|
+
let n2 = t2[r2], i2 = e2[r2];
|
|
273
|
+
if (n2 > i2) return false;
|
|
274
|
+
if (n2 < i2) return true;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
var xt;
|
|
278
|
+
var Rt = "function" == typeof Uint8Array.prototype.slice;
|
|
279
|
+
var It = 0;
|
|
280
|
+
var Ft = 0;
|
|
281
|
+
function Ct(t2) {
|
|
282
|
+
var e2 = t2 >>> 0;
|
|
283
|
+
It = e2, Ft = (t2 - e2) / 4294967296 >>> 0;
|
|
284
|
+
}
|
|
285
|
+
function Nt(t2) {
|
|
286
|
+
if (t2 < 0) {
|
|
287
|
+
Ct(-t2);
|
|
288
|
+
let [e2, r2] = Gt(It, Ft);
|
|
289
|
+
It = e2 >>> 0, Ft = r2 >>> 0;
|
|
290
|
+
} else Ct(t2);
|
|
291
|
+
}
|
|
292
|
+
function Mt(t2) {
|
|
293
|
+
var e2 = xt ||= new DataView(new ArrayBuffer(8));
|
|
294
|
+
e2.setFloat32(0, +t2, true), Ft = 0, It = e2.getUint32(0, true);
|
|
295
|
+
}
|
|
296
|
+
function Ot(t2, e2) {
|
|
297
|
+
var r2 = 4294967296 * e2 + (t2 >>> 0);
|
|
298
|
+
return Number.isSafeInteger(r2) ? r2 : $t(t2, e2);
|
|
299
|
+
}
|
|
300
|
+
function Dt(t2, e2) {
|
|
301
|
+
return At(U() ? BigInt.asUintN(64, (BigInt(e2 >>> 0) << BigInt(32)) + BigInt(t2 >>> 0)) : $t(t2, e2));
|
|
302
|
+
}
|
|
303
|
+
function Pt(t2, e2) {
|
|
304
|
+
return U() ? At(BigInt.asIntN(64, (BigInt.asUintN(32, BigInt(e2)) << BigInt(32)) + BigInt.asUintN(32, BigInt(t2)))) : At(Bt(t2, e2));
|
|
305
|
+
}
|
|
306
|
+
function $t(t2, e2) {
|
|
307
|
+
if (t2 >>>= 0, (e2 >>>= 0) <= 2097151) var r2 = "" + (4294967296 * e2 + t2);
|
|
308
|
+
else U() ? r2 = "" + (BigInt(e2) << BigInt(32) | BigInt(t2)) : (t2 = (16777215 & t2) + 6777216 * (r2 = 16777215 & (t2 >>> 24 | e2 << 8)) + 6710656 * (e2 = e2 >> 16 & 65535), r2 += 8147497 * e2, e2 *= 2, t2 >= 1e7 && (r2 += t2 / 1e7 >>> 0, t2 %= 1e7), r2 >= 1e7 && (e2 += r2 / 1e7 >>> 0, r2 %= 1e7), r2 = e2 + Ut(r2) + Ut(t2));
|
|
309
|
+
return r2;
|
|
310
|
+
}
|
|
311
|
+
function Ut(t2) {
|
|
312
|
+
return t2 = String(t2), "0000000".slice(t2.length) + t2;
|
|
313
|
+
}
|
|
314
|
+
function Bt(t2, e2) {
|
|
315
|
+
if (2147483648 & e2) if (U()) t2 = "" + (BigInt(0 | e2) << BigInt(32) | BigInt(t2 >>> 0));
|
|
316
|
+
else {
|
|
317
|
+
let [r2, n2] = Gt(t2, e2);
|
|
318
|
+
t2 = "-" + $t(r2, n2);
|
|
319
|
+
}
|
|
320
|
+
else t2 = $t(t2, e2);
|
|
321
|
+
return t2;
|
|
322
|
+
}
|
|
323
|
+
function jt(t2) {
|
|
324
|
+
if (t2.length < 16) Nt(Number(t2));
|
|
325
|
+
else if (U()) t2 = BigInt(t2), It = Number(t2 & BigInt(4294967295)) >>> 0, Ft = Number(t2 >> BigInt(32) & BigInt(4294967295));
|
|
326
|
+
else {
|
|
327
|
+
let e2 = +("-" === t2[0]);
|
|
328
|
+
Ft = It = 0;
|
|
329
|
+
let r2 = t2.length;
|
|
330
|
+
for (let n2 = e2, i2 = (r2 - e2) % 6 + e2; i2 <= r2; n2 = i2, i2 += 6) {
|
|
331
|
+
let e3 = Number(t2.slice(n2, i2));
|
|
332
|
+
Ft *= 1e6, (It = 1e6 * It + e3) >= 4294967296 && (Ft += Math.trunc(It / 4294967296), Ft >>>= 0, It >>>= 0);
|
|
333
|
+
}
|
|
334
|
+
if (e2) {
|
|
335
|
+
let [t3, e3] = Gt(It, Ft);
|
|
336
|
+
It = t3, Ft = e3;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function Gt(t2, e2) {
|
|
341
|
+
return e2 = ~e2, t2 ? t2 = 1 + ~t2 : e2 += 1, [t2, e2];
|
|
342
|
+
}
|
|
343
|
+
function Vt(t2) {
|
|
344
|
+
return Array.prototype.slice.call(t2);
|
|
345
|
+
}
|
|
346
|
+
var Ht = "function" == typeof BigInt ? BigInt.asIntN : void 0;
|
|
347
|
+
var Kt = "function" == typeof BigInt ? BigInt.asUintN : void 0;
|
|
348
|
+
var Xt = Number.isSafeInteger;
|
|
349
|
+
var Wt = Number.isFinite;
|
|
350
|
+
var zt = Math.trunc;
|
|
351
|
+
var Yt = At(0);
|
|
352
|
+
function qt(t2) {
|
|
353
|
+
if ("number" != typeof t2) throw Error(`Value of float/double field must be a number, found ${typeof t2}: ${t2}`);
|
|
354
|
+
return t2;
|
|
355
|
+
}
|
|
356
|
+
function Jt(t2) {
|
|
357
|
+
return null == t2 || "number" == typeof t2 ? t2 : "NaN" === t2 || "Infinity" === t2 || "-Infinity" === t2 ? Number(t2) : void 0;
|
|
358
|
+
}
|
|
359
|
+
function Zt(t2) {
|
|
360
|
+
if ("boolean" != typeof t2) {
|
|
361
|
+
var e2 = typeof t2;
|
|
362
|
+
throw Error(`Expected boolean but got ${"object" != e2 ? e2 : t2 ? Array.isArray(t2) ? "array" : e2 : "null"}: ${t2}`);
|
|
363
|
+
}
|
|
364
|
+
return t2;
|
|
365
|
+
}
|
|
366
|
+
var Qt = /^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;
|
|
367
|
+
function te(t2) {
|
|
368
|
+
switch (typeof t2) {
|
|
369
|
+
case "bigint":
|
|
370
|
+
return true;
|
|
371
|
+
case "number":
|
|
372
|
+
return Wt(t2);
|
|
373
|
+
case "string":
|
|
374
|
+
return Qt.test(t2);
|
|
375
|
+
default:
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
function ee(t2) {
|
|
380
|
+
if (null != t2) {
|
|
381
|
+
if (!Wt(t2)) throw P("enum");
|
|
382
|
+
t2 |= 0;
|
|
383
|
+
}
|
|
384
|
+
return t2;
|
|
385
|
+
}
|
|
386
|
+
function re(t2) {
|
|
387
|
+
if (null == t2) return t2;
|
|
388
|
+
if ("string" == typeof t2 && t2) t2 = +t2;
|
|
389
|
+
else if ("number" != typeof t2) return;
|
|
390
|
+
return Wt(t2) ? 0 | t2 : void 0;
|
|
391
|
+
}
|
|
392
|
+
function ne(t2) {
|
|
393
|
+
if (null == t2) return t2;
|
|
394
|
+
if ("string" == typeof t2 && t2) t2 = +t2;
|
|
395
|
+
else if ("number" != typeof t2) return;
|
|
396
|
+
return Wt(t2) ? t2 >>> 0 : void 0;
|
|
397
|
+
}
|
|
398
|
+
function ie(t2, e2) {
|
|
399
|
+
if (e2 ??= 1024, !te(t2)) throw P("int64");
|
|
400
|
+
var r2 = typeof t2;
|
|
401
|
+
switch (e2) {
|
|
402
|
+
case 512:
|
|
403
|
+
switch (r2) {
|
|
404
|
+
case "string":
|
|
405
|
+
return ce(t2);
|
|
406
|
+
case "bigint":
|
|
407
|
+
return String(Ht(64, t2));
|
|
408
|
+
default:
|
|
409
|
+
return ue(t2);
|
|
410
|
+
}
|
|
411
|
+
case 1024:
|
|
412
|
+
switch (r2) {
|
|
413
|
+
case "string":
|
|
414
|
+
return le(t2);
|
|
415
|
+
case "bigint":
|
|
416
|
+
return At(Ht(64, t2));
|
|
417
|
+
default:
|
|
418
|
+
return de(t2);
|
|
419
|
+
}
|
|
420
|
+
case 0:
|
|
421
|
+
switch (r2) {
|
|
422
|
+
case "string":
|
|
423
|
+
return ce(t2);
|
|
424
|
+
case "bigint":
|
|
425
|
+
return At(Ht(64, t2));
|
|
426
|
+
default:
|
|
427
|
+
return ae(t2);
|
|
428
|
+
}
|
|
429
|
+
default:
|
|
430
|
+
return (function(t3, e3 = `unexpected value ${t3}!`) {
|
|
431
|
+
throw Error(e3);
|
|
432
|
+
})(e2, "Unknown format requested type for int64");
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
function se(t2) {
|
|
436
|
+
var e2 = t2.length;
|
|
437
|
+
return ("-" === t2[0] ? e2 < 20 || 20 === e2 && t2 <= "-9223372036854775808" : e2 < 19 || 19 === e2 && t2 <= "9223372036854775807") ? t2 : (jt(t2), Bt(It, Ft));
|
|
438
|
+
}
|
|
439
|
+
function oe(t2) {
|
|
440
|
+
if ("-" === t2[0]) var e2 = false;
|
|
441
|
+
else e2 = (e2 = t2.length) < 20 || 20 === e2 && t2 <= "18446744073709551615";
|
|
442
|
+
return e2 ? t2 : (jt(t2), $t(It, Ft));
|
|
443
|
+
}
|
|
444
|
+
function ae(t2) {
|
|
445
|
+
if (t2 = zt(t2), !Xt(t2)) {
|
|
446
|
+
Nt(t2);
|
|
447
|
+
var e2 = It, r2 = Ft;
|
|
448
|
+
(t2 = 2147483648 & r2) && (r2 = ~r2 >>> 0, 0 == (e2 = 1 + ~e2 >>> 0) && (r2 = r2 + 1 >>> 0)), t2 = "number" == typeof (e2 = Ot(e2, r2)) ? t2 ? -e2 : e2 : t2 ? "-" + e2 : e2;
|
|
449
|
+
}
|
|
450
|
+
return t2;
|
|
451
|
+
}
|
|
452
|
+
function he(t2) {
|
|
453
|
+
return (t2 = zt(t2)) >= 0 && Xt(t2) || (Nt(t2), t2 = Ot(It, Ft)), t2;
|
|
454
|
+
}
|
|
455
|
+
function ue(t2) {
|
|
456
|
+
return t2 = zt(t2), Xt(t2) ? t2 = String(t2) : (Nt(t2), t2 = Bt(It, Ft)), t2;
|
|
457
|
+
}
|
|
458
|
+
function ce(t2) {
|
|
459
|
+
var e2 = zt(Number(t2));
|
|
460
|
+
return Xt(e2) ? String(e2) : (-1 !== (e2 = t2.indexOf(".")) && (t2 = t2.substring(0, e2)), se(t2));
|
|
461
|
+
}
|
|
462
|
+
function le(t2) {
|
|
463
|
+
var e2 = zt(Number(t2));
|
|
464
|
+
return Xt(e2) ? At(e2) : (-1 !== (e2 = t2.indexOf(".")) && (t2 = t2.substring(0, e2)), U() ? At(Ht(64, BigInt(t2))) : At(se(t2)));
|
|
465
|
+
}
|
|
466
|
+
function de(t2) {
|
|
467
|
+
return Xt(t2) ? At(ae(t2)) : At(ue(t2));
|
|
468
|
+
}
|
|
469
|
+
function fe(t2) {
|
|
470
|
+
var e2 = typeof t2;
|
|
471
|
+
return null == t2 ? t2 : "bigint" === e2 ? At(Ht(64, t2)) : te(t2) ? "string" === e2 ? le(t2) : de(t2) : void 0;
|
|
472
|
+
}
|
|
473
|
+
function pe(t2) {
|
|
474
|
+
if (null == t2) return t2;
|
|
475
|
+
var e2 = typeof t2;
|
|
476
|
+
if ("bigint" === e2) return String(Ht(64, t2));
|
|
477
|
+
if (te(t2)) {
|
|
478
|
+
if ("string" === e2) return ce(t2);
|
|
479
|
+
if ("number" === e2) return ae(t2);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function me(t2) {
|
|
483
|
+
if (null == t2 || "string" == typeof t2 || t2 instanceof N) return t2;
|
|
484
|
+
}
|
|
485
|
+
function ge(t2) {
|
|
486
|
+
if ("string" != typeof t2) throw Error();
|
|
487
|
+
return t2;
|
|
488
|
+
}
|
|
489
|
+
function ve(t2) {
|
|
490
|
+
if (null != t2 && "string" != typeof t2) throw Error();
|
|
491
|
+
return t2;
|
|
492
|
+
}
|
|
493
|
+
function _e(t2) {
|
|
494
|
+
return null == t2 || "string" == typeof t2 ? t2 : void 0;
|
|
495
|
+
}
|
|
496
|
+
function ye(t2, e2, r2, n2) {
|
|
497
|
+
return ht(t2) ? t2 : Array.isArray(t2) ? ((n2 = (r2 = 0 | t2[et]) | 32 & n2 | 2 & n2) !== r2 && it(t2, n2), new e2(t2)) : (r2 ? 2 & n2 ? ((t2 = e2[H]) || (st((t2 = new e2()).B), t2 = e2[H] = t2), e2 = t2) : e2 = new e2() : e2 = void 0, e2);
|
|
498
|
+
}
|
|
499
|
+
function Ee(t2, e2, r2) {
|
|
500
|
+
return null == (t2 = e2 ? ie(t2, 1024) : fe(t2)) ? r2 ? Yt : void 0 : t2;
|
|
501
|
+
}
|
|
502
|
+
function Ae(t2) {
|
|
503
|
+
return t2;
|
|
504
|
+
}
|
|
505
|
+
var we = {};
|
|
506
|
+
var Te = (function() {
|
|
507
|
+
try {
|
|
508
|
+
return v(new class extends Map {
|
|
509
|
+
constructor() {
|
|
510
|
+
super();
|
|
511
|
+
}
|
|
512
|
+
}()), false;
|
|
513
|
+
} catch {
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
516
|
+
})();
|
|
517
|
+
var be = class {
|
|
518
|
+
constructor() {
|
|
519
|
+
this.h = /* @__PURE__ */ new Map();
|
|
520
|
+
}
|
|
521
|
+
get(t2) {
|
|
522
|
+
return this.h.get(t2);
|
|
523
|
+
}
|
|
524
|
+
set(t2, e2) {
|
|
525
|
+
return this.h.set(t2, e2), this.size = this.h.size, this;
|
|
526
|
+
}
|
|
527
|
+
delete(t2) {
|
|
528
|
+
return t2 = this.h.delete(t2), this.size = this.h.size, t2;
|
|
529
|
+
}
|
|
530
|
+
clear() {
|
|
531
|
+
this.h.clear(), this.size = this.h.size;
|
|
532
|
+
}
|
|
533
|
+
has(t2) {
|
|
534
|
+
return this.h.has(t2);
|
|
535
|
+
}
|
|
536
|
+
entries() {
|
|
537
|
+
return this.h.entries();
|
|
538
|
+
}
|
|
539
|
+
keys() {
|
|
540
|
+
return this.h.keys();
|
|
541
|
+
}
|
|
542
|
+
values() {
|
|
543
|
+
return this.h.values();
|
|
544
|
+
}
|
|
545
|
+
forEach(t2, e2) {
|
|
546
|
+
return this.h.forEach(t2, e2);
|
|
547
|
+
}
|
|
548
|
+
[Symbol.iterator]() {
|
|
549
|
+
return this.entries();
|
|
550
|
+
}
|
|
551
|
+
};
|
|
552
|
+
var ke = Te ? (Object.setPrototypeOf(be.prototype, Map.prototype), Object.defineProperties(be.prototype, { size: { value: 0, configurable: true, enumerable: true, writable: true } }), be) : class extends Map {
|
|
553
|
+
constructor() {
|
|
554
|
+
super();
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
function Se(t2) {
|
|
558
|
+
return t2;
|
|
559
|
+
}
|
|
560
|
+
function Le(t2) {
|
|
561
|
+
if (2 & t2.N) throw Error("Cannot mutate an immutable Map");
|
|
562
|
+
}
|
|
563
|
+
var xe;
|
|
564
|
+
var Re = class extends ke {
|
|
565
|
+
constructor(t2, e2, r2 = Se, n2 = Se) {
|
|
566
|
+
super(), this.N = 0 | t2[et], this.O = e2, this.ca = r2, this.oa = this.O ? Ie : n2;
|
|
567
|
+
for (let i2 = 0; i2 < t2.length; i2++) {
|
|
568
|
+
let s2 = t2[i2], o2 = r2(s2[0], false, true), a2 = s2[1];
|
|
569
|
+
e2 ? void 0 === a2 && (a2 = null) : a2 = n2(s2[1], false, true, void 0, void 0, this.N), super.set(o2, a2);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
fa(t2) {
|
|
573
|
+
return ot(Array.from(super.entries(), t2));
|
|
574
|
+
}
|
|
575
|
+
clear() {
|
|
576
|
+
Le(this), super.clear();
|
|
577
|
+
}
|
|
578
|
+
delete(t2) {
|
|
579
|
+
return Le(this), super.delete(this.ca(t2, true, false));
|
|
580
|
+
}
|
|
581
|
+
entries() {
|
|
582
|
+
if (this.O) {
|
|
583
|
+
var t2 = super.keys();
|
|
584
|
+
t2 = new dt(t2, Fe, this);
|
|
585
|
+
} else t2 = super.entries();
|
|
586
|
+
return t2;
|
|
587
|
+
}
|
|
588
|
+
values() {
|
|
589
|
+
if (this.O) {
|
|
590
|
+
var t2 = super.keys();
|
|
591
|
+
t2 = new dt(t2, Re.prototype.get, this);
|
|
592
|
+
} else t2 = super.values();
|
|
593
|
+
return t2;
|
|
594
|
+
}
|
|
595
|
+
forEach(t2, e2) {
|
|
596
|
+
this.O ? super.forEach((r2, n2, i2) => {
|
|
597
|
+
t2.call(e2, i2.get(n2), n2, i2);
|
|
598
|
+
}) : super.forEach(t2, e2);
|
|
599
|
+
}
|
|
600
|
+
set(t2, e2) {
|
|
601
|
+
return Le(this), null == (t2 = this.ca(t2, true, false)) ? this : null == e2 ? (super.delete(t2), this) : super.set(t2, this.oa(e2, true, true, this.O, false, this.N));
|
|
602
|
+
}
|
|
603
|
+
hb(t2) {
|
|
604
|
+
var e2 = this.ca(t2[0], false, true);
|
|
605
|
+
t2 = t2[1], t2 = this.O ? void 0 === t2 ? null : t2 : this.oa(t2, false, true, void 0, false, this.N), super.set(e2, t2);
|
|
606
|
+
}
|
|
607
|
+
has(t2) {
|
|
608
|
+
return super.has(this.ca(t2, false, false));
|
|
609
|
+
}
|
|
610
|
+
get(t2) {
|
|
611
|
+
t2 = this.ca(t2, false, false);
|
|
612
|
+
var e2 = super.get(t2);
|
|
613
|
+
if (void 0 !== e2) {
|
|
614
|
+
var r2 = this.O;
|
|
615
|
+
return r2 ? ((r2 = this.oa(e2, false, true, r2, this.Ga, this.N)) !== e2 && super.set(t2, r2), r2) : e2;
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
[Symbol.iterator]() {
|
|
619
|
+
return this.entries();
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
function Ie(t2, e2, r2, n2, i2, s2) {
|
|
623
|
+
return t2 = ye(t2, n2, r2, s2), i2 && (t2 = Ze(t2)), t2;
|
|
624
|
+
}
|
|
625
|
+
function Fe(t2) {
|
|
626
|
+
return [t2, this.get(t2)];
|
|
627
|
+
}
|
|
628
|
+
function Ce() {
|
|
629
|
+
return xe ||= new Re(st([]), void 0, void 0, void 0, we);
|
|
630
|
+
}
|
|
631
|
+
function Ne(t2) {
|
|
632
|
+
return X ? t2[X] : void 0;
|
|
633
|
+
}
|
|
634
|
+
function Me(t2, e2) {
|
|
635
|
+
for (let r2 in t2) !isNaN(r2) && e2(t2, +r2, t2[r2]);
|
|
636
|
+
}
|
|
637
|
+
Re.prototype.toJSON = void 0;
|
|
638
|
+
var Oe;
|
|
639
|
+
var De;
|
|
640
|
+
var Pe;
|
|
641
|
+
var $e = class {
|
|
642
|
+
};
|
|
643
|
+
var Ue = { eb: true };
|
|
644
|
+
function Be(t2, e2) {
|
|
645
|
+
e2 < 100 || $(z, 1);
|
|
646
|
+
}
|
|
647
|
+
function je(t2, e2, r2, n2) {
|
|
648
|
+
var i2 = void 0 !== n2;
|
|
649
|
+
n2 = !!n2;
|
|
650
|
+
var s2, o2 = X;
|
|
651
|
+
!i2 && B && o2 && (s2 = t2[o2]) && Me(s2, Be), o2 = [];
|
|
652
|
+
var a2 = t2.length;
|
|
653
|
+
s2 = 4294967295;
|
|
654
|
+
var h2 = false, u2 = !!(64 & e2), c2 = u2 ? 128 & e2 ? 0 : -1 : void 0;
|
|
655
|
+
if (!(1 & e2)) {
|
|
656
|
+
var l2 = a2 && t2[a2 - 1];
|
|
657
|
+
null != l2 && "object" == typeof l2 && l2.constructor === Object ? s2 = --a2 : l2 = void 0, !u2 || 128 & e2 || i2 || (h2 = true, s2 = (Oe ?? Ae)(s2 - c2, c2, t2, l2, void 0) + c2);
|
|
658
|
+
}
|
|
659
|
+
e2 = void 0;
|
|
660
|
+
for (var d2 = 0; d2 < a2; d2++) {
|
|
661
|
+
let i3 = t2[d2];
|
|
662
|
+
if (null != i3 && null != (i3 = r2(i3, n2))) if (u2 && d2 >= s2) {
|
|
663
|
+
let t3 = d2 - c2;
|
|
664
|
+
(e2 ??= {})[t3] = i3;
|
|
665
|
+
} else o2[d2] = i3;
|
|
666
|
+
}
|
|
667
|
+
if (l2) for (let t3 in l2) {
|
|
668
|
+
if (null == (a2 = l2[t3]) || null == (a2 = r2(a2, n2))) continue;
|
|
669
|
+
let i3;
|
|
670
|
+
d2 = +t3, u2 && !Number.isNaN(d2) && (i3 = d2 + c2) < s2 ? o2[i3] = a2 : (e2 ??= {})[t3] = a2;
|
|
671
|
+
}
|
|
672
|
+
return e2 && (h2 ? o2.push(e2) : o2[s2] = e2), i2 && X && (t2 = Ne(t2)) && t2 instanceof $e && (o2[X] = (function(t3) {
|
|
673
|
+
var e3 = new $e();
|
|
674
|
+
return Me(t3, (t4, r3, n3) => {
|
|
675
|
+
e3[r3] = Vt(n3);
|
|
676
|
+
}), e3.la = t3.la, e3;
|
|
677
|
+
})(t2)), o2;
|
|
678
|
+
}
|
|
679
|
+
function Ge(t2) {
|
|
680
|
+
return t2[0] = Ve(t2[0]), t2[1] = Ve(t2[1]), t2;
|
|
681
|
+
}
|
|
682
|
+
function Ve(t2) {
|
|
683
|
+
switch (typeof t2) {
|
|
684
|
+
case "number":
|
|
685
|
+
return Number.isFinite(t2) ? t2 : "" + t2;
|
|
686
|
+
case "bigint":
|
|
687
|
+
return wt(t2) ? Number(t2) : "" + t2;
|
|
688
|
+
case "boolean":
|
|
689
|
+
return t2 ? 1 : 0;
|
|
690
|
+
case "object":
|
|
691
|
+
if (Array.isArray(t2)) {
|
|
692
|
+
var e2 = 0 | t2[et];
|
|
693
|
+
return 0 === t2.length && 1 & e2 ? void 0 : je(t2, e2, Ve);
|
|
694
|
+
}
|
|
695
|
+
if (ht(t2)) return He(t2);
|
|
696
|
+
if (t2 instanceof N) {
|
|
697
|
+
if (null == (e2 = t2.h)) t2 = "";
|
|
698
|
+
else if ("string" == typeof e2) t2 = e2;
|
|
699
|
+
else {
|
|
700
|
+
if (T) {
|
|
701
|
+
for (var r2 = "", n2 = 0, i2 = e2.length - 10240; n2 < i2; ) r2 += String.fromCharCode.apply(null, e2.subarray(n2, n2 += 10240));
|
|
702
|
+
r2 += String.fromCharCode.apply(null, n2 ? e2.subarray(n2) : e2), e2 = btoa(r2);
|
|
703
|
+
} else {
|
|
704
|
+
void 0 === r2 && (r2 = 0), A(), r2 = _[r2], n2 = Array(Math.floor(e2.length / 3)), i2 = r2[64] || "";
|
|
705
|
+
let t3 = 0, u2 = 0;
|
|
706
|
+
for (; t3 < e2.length - 2; t3 += 3) {
|
|
707
|
+
var s2 = e2[t3], o2 = e2[t3 + 1], a2 = e2[t3 + 2], h2 = r2[s2 >> 2];
|
|
708
|
+
s2 = r2[(3 & s2) << 4 | o2 >> 4], o2 = r2[(15 & o2) << 2 | a2 >> 6], a2 = r2[63 & a2], n2[u2++] = h2 + s2 + o2 + a2;
|
|
709
|
+
}
|
|
710
|
+
switch (h2 = 0, a2 = i2, e2.length - t3) {
|
|
711
|
+
case 2:
|
|
712
|
+
a2 = r2[(15 & (h2 = e2[t3 + 1])) << 2] || i2;
|
|
713
|
+
case 1:
|
|
714
|
+
e2 = e2[t3], n2[u2] = r2[e2 >> 2] + r2[(3 & e2) << 4 | h2 >> 4] + a2 + i2;
|
|
715
|
+
}
|
|
716
|
+
e2 = n2.join("");
|
|
717
|
+
}
|
|
718
|
+
t2 = t2.h = e2;
|
|
719
|
+
}
|
|
720
|
+
return t2;
|
|
721
|
+
}
|
|
722
|
+
return t2 instanceof Re ? t2 = 0 !== t2.size ? t2.fa(Ge) : void 0 : void 0;
|
|
723
|
+
}
|
|
724
|
+
return t2;
|
|
725
|
+
}
|
|
726
|
+
function He(t2) {
|
|
727
|
+
return je(t2 = t2.B, 0 | t2[et], Ve);
|
|
728
|
+
}
|
|
729
|
+
function Ke(t2, e2) {
|
|
730
|
+
return Xe(t2, e2[0], e2[1]);
|
|
731
|
+
}
|
|
732
|
+
function Xe(t2, e2, r2, n2 = 0) {
|
|
733
|
+
if (null == t2) {
|
|
734
|
+
var i2 = 32;
|
|
735
|
+
r2 ? (t2 = [r2], i2 |= 128) : t2 = [], e2 && (i2 = -16760833 & i2 | (1023 & e2) << 14);
|
|
736
|
+
} else {
|
|
737
|
+
if (!Array.isArray(t2)) throw Error("narr");
|
|
738
|
+
if (i2 = 0 | t2[et], f && 1 & i2) throw Error("rfarr");
|
|
739
|
+
if (2048 & i2 && !(2 & i2) && (function() {
|
|
740
|
+
if (f) throw Error("carr");
|
|
741
|
+
$(q, 5);
|
|
742
|
+
})(), 256 & i2) throw Error("farr");
|
|
743
|
+
if (64 & i2) return (i2 | n2) !== i2 && it(t2, i2 | n2), t2;
|
|
744
|
+
if (r2 && (i2 |= 128, r2 !== t2[0])) throw Error("mid");
|
|
745
|
+
t: {
|
|
746
|
+
i2 |= 64;
|
|
747
|
+
var s2 = (r2 = t2).length;
|
|
748
|
+
if (s2) {
|
|
749
|
+
var o2 = s2 - 1;
|
|
750
|
+
let t3 = r2[o2];
|
|
751
|
+
if (null != t3 && "object" == typeof t3 && t3.constructor === Object) {
|
|
752
|
+
if ((o2 -= e2 = 128 & i2 ? 0 : -1) >= 1024) throw Error("pvtlmt");
|
|
753
|
+
for (var a2 in t3) (s2 = +a2) < o2 && (r2[s2 + e2] = t3[a2], delete t3[a2]);
|
|
754
|
+
i2 = -16760833 & i2 | (1023 & o2) << 14;
|
|
755
|
+
break t;
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
if (e2) {
|
|
759
|
+
if ((a2 = Math.max(e2, s2 - (128 & i2 ? 0 : -1))) > 1024) throw Error("spvt");
|
|
760
|
+
i2 = -16760833 & i2 | (1023 & a2) << 14;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
return it(t2, 64 | i2 | n2), t2;
|
|
765
|
+
}
|
|
766
|
+
function We(t2, e2) {
|
|
767
|
+
if ("object" != typeof t2) return t2;
|
|
768
|
+
if (Array.isArray(t2)) {
|
|
769
|
+
var r2 = 0 | t2[et];
|
|
770
|
+
return 0 === t2.length && 1 & r2 ? void 0 : ze(t2, r2, e2);
|
|
771
|
+
}
|
|
772
|
+
if (ht(t2)) return qe(t2);
|
|
773
|
+
if (t2 instanceof Re) {
|
|
774
|
+
if (2 & (e2 = t2.N)) return t2;
|
|
775
|
+
if (!t2.size) return;
|
|
776
|
+
if (r2 = st(t2.fa()), t2.O) for (t2 = 0; t2 < r2.length; t2++) {
|
|
777
|
+
let n2 = r2[t2], i2 = n2[1];
|
|
778
|
+
i2 = null == i2 || "object" != typeof i2 ? void 0 : ht(i2) ? qe(i2) : Array.isArray(i2) ? ze(i2, 0 | i2[et], !!(32 & e2)) : void 0, n2[1] = i2;
|
|
779
|
+
}
|
|
780
|
+
return r2;
|
|
781
|
+
}
|
|
782
|
+
return t2 instanceof N ? t2 : void 0;
|
|
783
|
+
}
|
|
784
|
+
function ze(t2, e2, r2) {
|
|
785
|
+
return 2 & e2 || (!r2 || 4096 & e2 || 16 & e2 ? t2 = Je(t2, e2, false, r2 && !(16 & e2)) : (nt(t2, 34), 4 & e2 && Object.freeze(t2))), t2;
|
|
786
|
+
}
|
|
787
|
+
function Ye(t2, e2, r2) {
|
|
788
|
+
return t2 = new t2.constructor(e2), r2 && (t2.i = ct), t2.o = ct, t2;
|
|
789
|
+
}
|
|
790
|
+
function qe(t2) {
|
|
791
|
+
var e2 = t2.B, r2 = 0 | e2[et];
|
|
792
|
+
return ut(t2, r2) ? t2 : rr(t2, e2, r2) ? Ye(t2, e2) : Je(e2, r2);
|
|
793
|
+
}
|
|
794
|
+
function Je(t2, e2, r2, n2) {
|
|
795
|
+
return n2 ??= !!(34 & e2), t2 = je(t2, e2, We, n2), n2 = 32, r2 && (n2 |= 2), it(t2, e2 = 16769217 & e2 | n2), t2;
|
|
796
|
+
}
|
|
797
|
+
function Ze(t2) {
|
|
798
|
+
var e2 = t2.B, r2 = 0 | e2[et];
|
|
799
|
+
return ut(t2, r2) ? rr(t2, e2, r2) ? Ye(t2, e2, true) : new t2.constructor(Je(e2, r2, false)) : t2;
|
|
800
|
+
}
|
|
801
|
+
function Qe(t2) {
|
|
802
|
+
if (t2.i !== ct) return false;
|
|
803
|
+
var e2 = t2.B;
|
|
804
|
+
return nt(e2 = Je(e2, 0 | e2[et]), 2048), t2.B = e2, t2.i = void 0, t2.o = void 0, true;
|
|
805
|
+
}
|
|
806
|
+
function tr(t2) {
|
|
807
|
+
if (!Qe(t2) && ut(t2, 0 | t2.B[et])) throw Error();
|
|
808
|
+
}
|
|
809
|
+
function er(t2, e2) {
|
|
810
|
+
void 0 === e2 && (e2 = 0 | t2[et]), 32 & e2 && !(4096 & e2) && it(t2, 4096 | e2);
|
|
811
|
+
}
|
|
812
|
+
function rr(t2, e2, r2) {
|
|
813
|
+
return !!(2 & r2) || !(!(32 & r2) || 4096 & r2) && (it(e2, 2 | r2), t2.i = ct, true);
|
|
814
|
+
}
|
|
815
|
+
var nr = At(0);
|
|
816
|
+
var ir = {};
|
|
817
|
+
function sr(t2, e2, r2, n2) {
|
|
818
|
+
if (null !== (e2 = or(t2.B, e2, void 0, n2)) || r2 && t2.o !== ct) return e2;
|
|
819
|
+
}
|
|
820
|
+
function or(t2, e2, r2, n2) {
|
|
821
|
+
if (-1 === e2) return null;
|
|
822
|
+
var i2 = e2 + (r2 ? 0 : -1), s2 = t2.length - 1;
|
|
823
|
+
if (!(s2 < 1 + (r2 ? 0 : -1))) {
|
|
824
|
+
if (i2 >= s2) {
|
|
825
|
+
var o2 = t2[s2];
|
|
826
|
+
if (null != o2 && "object" == typeof o2 && o2.constructor === Object) {
|
|
827
|
+
r2 = o2[e2];
|
|
828
|
+
var a2 = true;
|
|
829
|
+
} else {
|
|
830
|
+
if (i2 !== s2) return;
|
|
831
|
+
r2 = o2;
|
|
832
|
+
}
|
|
833
|
+
} else r2 = t2[i2];
|
|
834
|
+
if (n2 && null != r2) {
|
|
835
|
+
if (null == (n2 = n2(r2))) return n2;
|
|
836
|
+
if (!Object.is(n2, r2)) return a2 ? o2[e2] = n2 : t2[i2] = n2, n2;
|
|
837
|
+
}
|
|
838
|
+
return r2;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
function ar(t2, e2, r2, n2) {
|
|
842
|
+
tr(t2);
|
|
843
|
+
var i2 = t2.B;
|
|
844
|
+
return hr(i2, 0 | i2[et], e2, r2, n2), t2;
|
|
845
|
+
}
|
|
846
|
+
function hr(t2, e2, r2, n2, i2) {
|
|
847
|
+
var s2 = r2 + (i2 ? 0 : -1), o2 = t2.length - 1;
|
|
848
|
+
if (o2 >= 1 + (i2 ? 0 : -1) && s2 >= o2) {
|
|
849
|
+
let i3 = t2[o2];
|
|
850
|
+
if (null != i3 && "object" == typeof i3 && i3.constructor === Object) return i3[r2] = n2, e2;
|
|
851
|
+
}
|
|
852
|
+
return s2 <= o2 ? (t2[s2] = n2, e2) : (void 0 !== n2 && (r2 >= (o2 = (e2 ??= 0 | t2[et]) >> 14 & 1023 || 536870912) ? null != n2 && (t2[o2 + (i2 ? 0 : -1)] = { [r2]: n2 }) : t2[s2] = n2), e2);
|
|
853
|
+
}
|
|
854
|
+
function ur(t2, e2) {
|
|
855
|
+
return ht(t2 = or(t2.B, e2)) || Array.isArray(t2);
|
|
856
|
+
}
|
|
857
|
+
function cr(t2, e2, r2) {
|
|
858
|
+
return ur(t2, e2 = Er(t2, r2) === e2 ? e2 : -1);
|
|
859
|
+
}
|
|
860
|
+
function lr(t2, e2, r2, n2, i2) {
|
|
861
|
+
var s2 = t2.B, o2 = 0 | s2[et];
|
|
862
|
+
n2 = ut(t2, o2) ? 1 : n2 || 4, i2 = !!i2 || 3 === n2, 2 === n2 && Qe(t2) && (o2 = 0 | (s2 = t2.B)[et]);
|
|
863
|
+
var a2 = (t2 = fr(s2, e2)) === G ? 7 : 0 | t2[et], h2 = pr(a2, o2), u2 = !(4 & h2);
|
|
864
|
+
if (u2) {
|
|
865
|
+
4 & h2 && (t2 = Vt(t2), a2 = 0, h2 = Cr(h2, o2), o2 = hr(s2, o2, e2, t2));
|
|
866
|
+
let n3 = 0, i3 = 0;
|
|
867
|
+
for (; n3 < t2.length; n3++) {
|
|
868
|
+
let e3 = r2(t2[n3]);
|
|
869
|
+
null != e3 && (t2[i3++] = e3);
|
|
870
|
+
}
|
|
871
|
+
i3 < n3 && (t2.length = i3), r2 = -513 & h2 | 4, h2 = r2 &= -1025, h2 &= -4097;
|
|
872
|
+
}
|
|
873
|
+
return h2 !== a2 && (it(t2, h2), 2 & h2 && Object.freeze(t2)), dr(t2, h2, s2, o2, e2, n2, u2, i2);
|
|
874
|
+
}
|
|
875
|
+
function dr(t2, e2, r2, n2, i2, s2, o2, a2) {
|
|
876
|
+
var h2 = e2;
|
|
877
|
+
return 1 === s2 || 4 === s2 && (2 & e2 || !(16 & e2) && 32 & n2) ? mr(e2) || ((e2 |= !t2.length || o2 && !(4096 & e2) || 32 & n2 && !(4096 & e2 || 16 & e2) ? 2 : 256) !== h2 && it(t2, e2), Object.freeze(t2)) : (2 === s2 && mr(e2) && (t2 = Vt(t2), h2 = 0, e2 = Cr(e2, n2), n2 = hr(r2, n2, i2, t2)), mr(e2) || (a2 || (e2 |= 16), e2 !== h2 && it(t2, e2))), 2 & e2 || !(4096 & e2 || 16 & e2) || er(r2, n2), t2;
|
|
878
|
+
}
|
|
879
|
+
function fr(t2, e2, r2) {
|
|
880
|
+
return t2 = or(t2, e2, r2), Array.isArray(t2) ? t2 : G;
|
|
881
|
+
}
|
|
882
|
+
function pr(t2, e2) {
|
|
883
|
+
return 2 & e2 && (t2 |= 2), 1 | t2;
|
|
884
|
+
}
|
|
885
|
+
function mr(t2) {
|
|
886
|
+
return !!(2 & t2) && !!(4 & t2) || !!(256 & t2);
|
|
887
|
+
}
|
|
888
|
+
function gr(t2) {
|
|
889
|
+
return lt(t2, true);
|
|
890
|
+
}
|
|
891
|
+
function vr(t2) {
|
|
892
|
+
t2 = Vt(t2);
|
|
893
|
+
for (let e2 = 0; e2 < t2.length; e2++) {
|
|
894
|
+
let r2 = t2[e2] = Vt(t2[e2]);
|
|
895
|
+
Array.isArray(r2[1]) && (r2[1] = st(r2[1]));
|
|
896
|
+
}
|
|
897
|
+
return ot(t2);
|
|
898
|
+
}
|
|
899
|
+
function _r(t2, e2, r2, n2) {
|
|
900
|
+
tr(t2), hr(t2 = t2.B, 0 | t2[et], e2, ("0" === n2 ? 0 === Number(r2) : r2 === n2) ? void 0 : r2);
|
|
901
|
+
}
|
|
902
|
+
function yr(t2, e2, r2) {
|
|
903
|
+
if (2 & e2) throw Error();
|
|
904
|
+
var n2 = mt(e2), i2 = fr(t2, r2, n2), s2 = i2 === G ? 7 : 0 | i2[et], o2 = pr(s2, e2);
|
|
905
|
+
return (2 & o2 || mr(o2) || 16 & o2) && (o2 === s2 || mr(o2) || it(i2, o2), i2 = Vt(i2), s2 = 0, o2 = Cr(o2, e2), hr(t2, e2, r2, i2, n2)), (o2 &= -13) !== s2 && it(i2, o2), i2;
|
|
906
|
+
}
|
|
907
|
+
function Er(t2, e2) {
|
|
908
|
+
return Tr(Ar(t2 = t2.B), t2, void 0, e2);
|
|
909
|
+
}
|
|
910
|
+
function Ar(t2) {
|
|
911
|
+
if (B) return t2[K] ?? (t2[K] = /* @__PURE__ */ new Map());
|
|
912
|
+
if (K in t2) return t2[K];
|
|
913
|
+
var e2 = /* @__PURE__ */ new Map();
|
|
914
|
+
return Object.defineProperty(t2, K, { value: e2 }), e2;
|
|
915
|
+
}
|
|
916
|
+
function wr(t2, e2, r2, n2, i2) {
|
|
917
|
+
var s2 = Ar(t2), o2 = Tr(s2, t2, e2, r2, i2);
|
|
918
|
+
return o2 !== n2 && (o2 && (e2 = hr(t2, e2, o2, void 0, i2)), s2.set(r2, n2)), e2;
|
|
919
|
+
}
|
|
920
|
+
function Tr(t2, e2, r2, n2, i2) {
|
|
921
|
+
var s2 = t2.get(n2);
|
|
922
|
+
if (null != s2) return s2;
|
|
923
|
+
s2 = 0;
|
|
924
|
+
for (let t3 = 0; t3 < n2.length; t3++) {
|
|
925
|
+
let o2 = n2[t3];
|
|
926
|
+
null != or(e2, o2, i2) && (0 !== s2 && (r2 = hr(e2, r2, s2, void 0, i2)), s2 = o2);
|
|
927
|
+
}
|
|
928
|
+
return t2.set(n2, s2), s2;
|
|
929
|
+
}
|
|
930
|
+
function br(t2, e2, r2) {
|
|
931
|
+
var n2 = 0 | t2[et], i2 = mt(n2), s2 = or(t2, r2, i2);
|
|
932
|
+
if (ht(s2)) {
|
|
933
|
+
if (!ut(s2)) return Qe(s2), s2.B;
|
|
934
|
+
var o2 = s2.B;
|
|
935
|
+
} else Array.isArray(s2) && (o2 = s2);
|
|
936
|
+
if (o2) {
|
|
937
|
+
let t3 = 0 | o2[et];
|
|
938
|
+
2 & t3 && (o2 = Je(o2, t3));
|
|
939
|
+
}
|
|
940
|
+
return (o2 = Ke(o2, e2)) !== s2 && hr(t2, n2, r2, o2, i2), o2;
|
|
941
|
+
}
|
|
942
|
+
function kr(t2, e2, r2, n2) {
|
|
943
|
+
var i2 = t2.B, s2 = 0 | i2[et];
|
|
944
|
+
if (e2 = (function(t3, e3, r3, n3, i3) {
|
|
945
|
+
var s3 = false;
|
|
946
|
+
if (null != (n3 = or(t3, n3, i3, (t4) => {
|
|
947
|
+
var n4 = ye(t4, r3, false, e3);
|
|
948
|
+
return s3 = n4 !== t4 && null != n4, n4;
|
|
949
|
+
}))) return s3 && !ut(n3) && er(t3, e3), n3;
|
|
950
|
+
})(i2, s2, e2, r2, n2), null == e2) return e2;
|
|
951
|
+
if (!ut(t2, s2 = 0 | i2[et])) {
|
|
952
|
+
let o2 = Ze(e2);
|
|
953
|
+
o2 !== e2 && (Qe(t2) && (s2 = 0 | (i2 = t2.B)[et]), er(i2, s2 = hr(i2, s2, r2, e2 = o2, n2)));
|
|
954
|
+
}
|
|
955
|
+
return e2;
|
|
956
|
+
}
|
|
957
|
+
function Sr(t2, e2, r2, n2, i2, s2, o2, a2) {
|
|
958
|
+
var h2 = ut(t2, r2);
|
|
959
|
+
s2 = h2 ? 1 : s2 || 4, o2 = !!o2 || 3 === s2, h2 = a2 && !h2, (2 === s2 || h2) && Qe(t2) && (r2 = 0 | (e2 = t2.B)[et]);
|
|
960
|
+
var u2 = (t2 = fr(e2, i2)) === G ? 7 : 0 | t2[et], c2 = pr(u2, r2);
|
|
961
|
+
if (a2 = !(4 & c2)) {
|
|
962
|
+
var l2 = t2, d2 = r2;
|
|
963
|
+
let e3 = !!(2 & c2);
|
|
964
|
+
e3 && (d2 |= 2);
|
|
965
|
+
let i3 = !e3, s3 = true, o3 = 0, a3 = 0;
|
|
966
|
+
for (; o3 < l2.length; o3++) {
|
|
967
|
+
let t3 = ye(l2[o3], n2, false, d2);
|
|
968
|
+
if (t3 instanceof n2) {
|
|
969
|
+
if (!e3) {
|
|
970
|
+
let e4 = ut(t3);
|
|
971
|
+
i3 &&= !e4, s3 &&= e4;
|
|
972
|
+
}
|
|
973
|
+
l2[a3++] = t3;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
a3 < o3 && (l2.length = a3), c2 |= 4, c2 = s3 ? -4097 & c2 : 4096 | c2, c2 = i3 ? 8 | c2 : -9 & c2;
|
|
977
|
+
}
|
|
978
|
+
if (c2 !== u2 && (it(t2, c2), 2 & c2 && Object.freeze(t2)), h2 && !(8 & c2 || !t2.length && (1 === s2 || 4 === s2 && (2 & c2 || !(16 & c2) && 32 & r2)))) {
|
|
979
|
+
for (mr(c2) && (t2 = Vt(t2), c2 = Cr(c2, r2), r2 = hr(e2, r2, i2, t2)), n2 = t2, h2 = c2, u2 = 0; u2 < n2.length; u2++) (l2 = n2[u2]) !== (c2 = Ze(l2)) && (n2[u2] = c2);
|
|
980
|
+
h2 |= 8, it(t2, c2 = h2 = n2.length ? 4096 | h2 : -4097 & h2);
|
|
981
|
+
}
|
|
982
|
+
return dr(t2, c2, e2, r2, i2, s2, a2, o2);
|
|
983
|
+
}
|
|
984
|
+
function Lr(t2, e2, r2) {
|
|
985
|
+
var n2 = t2.B;
|
|
986
|
+
return Sr(t2, n2, 0 | n2[et], e2, r2, void 0, false, true);
|
|
987
|
+
}
|
|
988
|
+
function xr(t2) {
|
|
989
|
+
return null == t2 && (t2 = void 0), t2;
|
|
990
|
+
}
|
|
991
|
+
function Rr(t2, e2, r2, n2, i2) {
|
|
992
|
+
return ar(t2, r2, n2 = xr(n2), i2), n2 && !ut(n2) && er(t2.B), t2;
|
|
993
|
+
}
|
|
994
|
+
function Ir(t2, e2, r2, n2) {
|
|
995
|
+
t: {
|
|
996
|
+
var i2 = n2 = xr(n2);
|
|
997
|
+
tr(t2);
|
|
998
|
+
let s2 = t2.B, o2 = 0 | s2[et];
|
|
999
|
+
if (null == i2) {
|
|
1000
|
+
let t3 = Ar(s2);
|
|
1001
|
+
if (Tr(t3, s2, o2, r2) !== e2) break t;
|
|
1002
|
+
t3.set(r2, 0);
|
|
1003
|
+
} else o2 = wr(s2, o2, r2, e2);
|
|
1004
|
+
hr(s2, o2, e2, i2);
|
|
1005
|
+
}
|
|
1006
|
+
return n2 && !ut(n2) && er(t2.B), t2;
|
|
1007
|
+
}
|
|
1008
|
+
function Fr(t2, e2, r2) {
|
|
1009
|
+
tr(t2);
|
|
1010
|
+
var n2 = t2.B, i2 = 0 | n2[et];
|
|
1011
|
+
if (null == r2) return hr(n2, i2, e2), t2;
|
|
1012
|
+
var s2 = r2 === G ? 7 : 0 | r2[et], o2 = s2, a2 = mr(s2), h2 = a2 || Object.isFrozen(r2), u2 = true, c2 = true;
|
|
1013
|
+
for (let t3 = 0; t3 < r2.length; t3++) {
|
|
1014
|
+
var l2 = r2[t3];
|
|
1015
|
+
a2 || (l2 = ut(l2), u2 &&= !l2, c2 &&= l2);
|
|
1016
|
+
}
|
|
1017
|
+
return a2 || (s2 = u2 ? 13 : 5, s2 = c2 ? -4097 & s2 : 4096 | s2), h2 && s2 === o2 || (r2 = Vt(r2), o2 = 0, s2 = Cr(s2, i2)), s2 !== o2 && it(r2, s2), i2 = hr(n2, i2, e2, r2), 2 & s2 || !(4096 & s2 || 16 & s2) || er(n2, i2), t2;
|
|
1018
|
+
}
|
|
1019
|
+
function Cr(t2, e2) {
|
|
1020
|
+
return -273 & (2 & e2 ? 2 | t2 : -3 & t2);
|
|
1021
|
+
}
|
|
1022
|
+
function Nr(t2, e2, r2, n2) {
|
|
1023
|
+
var i2 = n2;
|
|
1024
|
+
tr(t2), t2 = Sr(t2, n2 = t2.B, 0 | n2[et], r2, e2, 2, true), i2 = null != i2 ? i2 : new r2(), t2.push(i2), e2 = r2 = t2 === G ? 7 : 0 | t2[et], (i2 = ut(i2)) ? (r2 &= -9, 1 === t2.length && (r2 &= -4097)) : r2 |= 4096, r2 !== e2 && it(t2, r2), i2 || er(n2);
|
|
1025
|
+
}
|
|
1026
|
+
function Mr(t2, e2, r2) {
|
|
1027
|
+
return re(sr(t2, e2, r2));
|
|
1028
|
+
}
|
|
1029
|
+
function Or(t2, e2) {
|
|
1030
|
+
return sr(t2, e2, void 0, Jt) ?? 0;
|
|
1031
|
+
}
|
|
1032
|
+
function Dr(t2, e2, r2, n2) {
|
|
1033
|
+
return kr(t2, e2, r2 = Er(t2, n2) === r2 ? r2 : -1, void 0);
|
|
1034
|
+
}
|
|
1035
|
+
function Pr(t2, e2) {
|
|
1036
|
+
_r(t2, 3, null == e2 ? e2 : Zt(e2), false);
|
|
1037
|
+
}
|
|
1038
|
+
function $r(t2, e2, r2) {
|
|
1039
|
+
if (null != r2) {
|
|
1040
|
+
if ("number" != typeof r2) throw P("int32");
|
|
1041
|
+
if (!Wt(r2)) throw P("int32");
|
|
1042
|
+
r2 |= 0;
|
|
1043
|
+
}
|
|
1044
|
+
ar(t2, e2, r2);
|
|
1045
|
+
}
|
|
1046
|
+
function Ur(t2, e2, r2) {
|
|
1047
|
+
return ar(t2, e2, null == r2 ? r2 : ie(r2));
|
|
1048
|
+
}
|
|
1049
|
+
function Br(t2, e2, r2) {
|
|
1050
|
+
return ar(t2, e2, null == r2 ? r2 : (function(t3) {
|
|
1051
|
+
if (!te(t3)) throw P("uint64");
|
|
1052
|
+
switch (typeof t3) {
|
|
1053
|
+
case "string":
|
|
1054
|
+
var e3 = zt(Number(t3));
|
|
1055
|
+
return Xt(e3) && e3 >= 0 ? t3 = At(e3) : (-1 !== (e3 = t3.indexOf(".")) && (t3 = t3.substring(0, e3)), t3 = U() ? At(Kt(64, BigInt(t3))) : At(oe(t3))), t3;
|
|
1056
|
+
case "bigint":
|
|
1057
|
+
return At(Kt(64, t3));
|
|
1058
|
+
default:
|
|
1059
|
+
return Xt(t3) ? t3 = At(he(t3)) : ((t3 = zt(t3)) >= 0 && Xt(t3) ? t3 = String(t3) : (Nt(t3), t3 = $t(It, Ft)), t3 = At(t3)), t3;
|
|
1060
|
+
}
|
|
1061
|
+
})(r2));
|
|
1062
|
+
}
|
|
1063
|
+
function jr(t2, e2, r2) {
|
|
1064
|
+
ar(t2, e2, null == r2 ? r2 : qt(r2));
|
|
1065
|
+
}
|
|
1066
|
+
function Gr(t2, e2, r2) {
|
|
1067
|
+
_r(t2, e2, null == r2 ? r2 : qt(r2), 0);
|
|
1068
|
+
}
|
|
1069
|
+
function Vr(t2, e2, r2) {
|
|
1070
|
+
_r(t2, e2, ve(r2), "");
|
|
1071
|
+
}
|
|
1072
|
+
function Hr(t2, e2, r2) {
|
|
1073
|
+
{
|
|
1074
|
+
tr(t2);
|
|
1075
|
+
let o2 = t2.B, a2 = 0 | o2[et];
|
|
1076
|
+
if (null == r2) hr(o2, a2, e2);
|
|
1077
|
+
else {
|
|
1078
|
+
var n2 = t2 = r2 === G ? 7 : 0 | r2[et], i2 = mr(t2), s2 = i2 || Object.isFrozen(r2);
|
|
1079
|
+
for (i2 || (t2 = 0), s2 || (r2 = Vt(r2), n2 = 0, t2 = Cr(t2, a2), s2 = false), t2 |= 5, t2 |= (4 & t2 ? 512 & t2 ? 512 : 1024 & t2 ? 1024 : 0 : void 0) ?? 1024, i2 = 0; i2 < r2.length; i2++) {
|
|
1080
|
+
let e3 = r2[i2], o3 = ge(e3);
|
|
1081
|
+
Object.is(e3, o3) || (s2 && (r2 = Vt(r2), n2 = 0, t2 = Cr(t2, a2), s2 = false), r2[i2] = o3);
|
|
1082
|
+
}
|
|
1083
|
+
t2 !== n2 && (s2 && (r2 = Vt(r2), t2 = Cr(t2, a2)), it(r2, t2)), hr(o2, a2, e2, r2);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
function Kr(t2, e2, r2) {
|
|
1088
|
+
tr(t2), lr(t2, e2, _e, 2, true).push(ge(r2));
|
|
1089
|
+
}
|
|
1090
|
+
var Xr = class {
|
|
1091
|
+
constructor(t2, e2, r2) {
|
|
1092
|
+
if (this.buffer = t2, r2 && !e2) throw Error();
|
|
1093
|
+
this.h = e2;
|
|
1094
|
+
}
|
|
1095
|
+
};
|
|
1096
|
+
function Wr(t2, e2) {
|
|
1097
|
+
if ("string" == typeof t2) return new Xr(L(t2), e2);
|
|
1098
|
+
if (Array.isArray(t2)) return new Xr(new Uint8Array(t2), e2);
|
|
1099
|
+
if (t2.constructor === Uint8Array) return new Xr(t2, false);
|
|
1100
|
+
if (t2.constructor === ArrayBuffer) return t2 = new Uint8Array(t2), new Xr(t2, false);
|
|
1101
|
+
if (t2.constructor === N) return e2 = F(t2) || new Uint8Array(0), new Xr(e2, true, t2);
|
|
1102
|
+
if (t2 instanceof Uint8Array) return t2 = t2.constructor === Uint8Array ? t2 : new Uint8Array(t2.buffer, t2.byteOffset, t2.byteLength), new Xr(t2, false);
|
|
1103
|
+
throw Error();
|
|
1104
|
+
}
|
|
1105
|
+
function zr(t2, e2) {
|
|
1106
|
+
var r2 = 0, n2 = 0, i2 = 0, s2 = t2.i, o2 = t2.h;
|
|
1107
|
+
do {
|
|
1108
|
+
var a2 = s2[o2++];
|
|
1109
|
+
r2 |= (127 & a2) << i2, i2 += 7;
|
|
1110
|
+
} while (i2 < 32 && 128 & a2);
|
|
1111
|
+
if (i2 > 32) for (n2 |= (127 & a2) >> 4, i2 = 3; i2 < 32 && 128 & a2; i2 += 7) n2 |= (127 & (a2 = s2[o2++])) << i2;
|
|
1112
|
+
if (rn(t2, o2), !(128 & a2)) return e2(r2 >>> 0, n2 >>> 0);
|
|
1113
|
+
throw Error();
|
|
1114
|
+
}
|
|
1115
|
+
function Yr(t2) {
|
|
1116
|
+
for (var e2 = 0, r2 = t2.h, n2 = r2 + 10, i2 = t2.i; r2 < n2; ) {
|
|
1117
|
+
let n3 = i2[r2++];
|
|
1118
|
+
if (e2 |= n3, !(128 & n3)) return rn(t2, r2), !!(127 & e2);
|
|
1119
|
+
}
|
|
1120
|
+
throw Error();
|
|
1121
|
+
}
|
|
1122
|
+
function qr(t2) {
|
|
1123
|
+
var e2 = t2.i, r2 = t2.h, n2 = e2[r2++], i2 = 127 & n2;
|
|
1124
|
+
if (128 & n2 && (i2 |= (127 & (n2 = e2[r2++])) << 7, 128 & n2 && (i2 |= (127 & (n2 = e2[r2++])) << 14, 128 & n2 && (i2 |= (127 & (n2 = e2[r2++])) << 21, 128 & n2 && (i2 |= (n2 = e2[r2++]) << 28, 128 & n2 && 128 & e2[r2++] && 128 & e2[r2++] && 128 & e2[r2++] && 128 & e2[r2++] && 128 & e2[r2++]))))) throw Error();
|
|
1125
|
+
return rn(t2, r2), i2;
|
|
1126
|
+
}
|
|
1127
|
+
function Jr(t2) {
|
|
1128
|
+
return qr(t2) >>> 0;
|
|
1129
|
+
}
|
|
1130
|
+
function Zr(t2) {
|
|
1131
|
+
return zr(t2, Pt);
|
|
1132
|
+
}
|
|
1133
|
+
function Qr(t2) {
|
|
1134
|
+
var e2 = t2.i, r2 = t2.h, n2 = e2[r2], i2 = e2[r2 + 1], s2 = e2[r2 + 2];
|
|
1135
|
+
return e2 = e2[r2 + 3], rn(t2, t2.h + 4), (n2 | i2 << 8 | s2 << 16 | e2 << 24) >>> 0;
|
|
1136
|
+
}
|
|
1137
|
+
function tn(t2) {
|
|
1138
|
+
var e2 = Qr(t2);
|
|
1139
|
+
t2 = 2 * (e2 >> 31) + 1;
|
|
1140
|
+
var r2 = e2 >>> 23 & 255;
|
|
1141
|
+
return e2 &= 8388607, 255 == r2 ? e2 ? NaN : t2 * (1 / 0) : 0 == r2 ? 1401298464324817e-60 * t2 * e2 : t2 * Math.pow(2, r2 - 150) * (e2 + 8388608);
|
|
1142
|
+
}
|
|
1143
|
+
function en(t2) {
|
|
1144
|
+
return qr(t2);
|
|
1145
|
+
}
|
|
1146
|
+
function rn(t2, e2) {
|
|
1147
|
+
if (t2.h = e2, e2 > t2.l) throw Error();
|
|
1148
|
+
}
|
|
1149
|
+
function nn(t2, e2) {
|
|
1150
|
+
if (e2 < 0) throw Error();
|
|
1151
|
+
var r2 = t2.h;
|
|
1152
|
+
if ((e2 = r2 + e2) > t2.l) throw Error();
|
|
1153
|
+
return t2.h = e2, r2;
|
|
1154
|
+
}
|
|
1155
|
+
function sn(t2, e2) {
|
|
1156
|
+
if (0 == e2) return I();
|
|
1157
|
+
var r2 = nn(t2, e2);
|
|
1158
|
+
return t2.ga && t2.u ? r2 = t2.i.subarray(r2, r2 + e2) : (t2 = t2.i, r2 = r2 === (e2 = r2 + e2) ? new Uint8Array(0) : Rt ? t2.slice(r2, e2) : new Uint8Array(t2.subarray(r2, e2))), 0 == r2.length ? I() : new N(r2, R);
|
|
1159
|
+
}
|
|
1160
|
+
var on = class {
|
|
1161
|
+
constructor(t2, e2, r2, n2) {
|
|
1162
|
+
this.i = null, this.u = false, this.h = this.l = this.o = 0, this.init(t2, e2, r2, n2);
|
|
1163
|
+
}
|
|
1164
|
+
init(t2, e2, r2, { ga: n2 = false, na: i2 = false } = {}) {
|
|
1165
|
+
this.ga = n2, this.na = i2, t2 && (t2 = Wr(t2, this.na), this.i = t2.buffer, this.u = t2.h, this.o = e2 || 0, this.l = void 0 !== r2 ? this.o + r2 : this.i.length, this.h = this.o);
|
|
1166
|
+
}
|
|
1167
|
+
clear() {
|
|
1168
|
+
this.i = null, this.u = false, this.h = this.l = this.o = 0, this.ga = false;
|
|
1169
|
+
}
|
|
1170
|
+
};
|
|
1171
|
+
var an = [];
|
|
1172
|
+
var hn = 0;
|
|
1173
|
+
function un(t2, e2, r2, n2) {
|
|
1174
|
+
if (yn.length) {
|
|
1175
|
+
let i2 = yn.pop();
|
|
1176
|
+
return i2.A(n2), i2.h.init(t2, e2, r2, n2), i2;
|
|
1177
|
+
}
|
|
1178
|
+
return new _n(t2, e2, r2, n2);
|
|
1179
|
+
}
|
|
1180
|
+
function cn(t2) {
|
|
1181
|
+
t2.h.clear(), t2.l = -1, t2.i = -1, yn.length < 100 && yn.push(t2);
|
|
1182
|
+
}
|
|
1183
|
+
function ln(t2) {
|
|
1184
|
+
var e2 = t2.h;
|
|
1185
|
+
if (e2.h == e2.l) return false;
|
|
1186
|
+
t2.o = t2.h.h;
|
|
1187
|
+
var r2 = Jr(t2.h);
|
|
1188
|
+
if (e2 = r2 >>> 3, !((r2 &= 7) >= 0 && r2 <= 5)) throw Error();
|
|
1189
|
+
if (e2 < 1) throw Error();
|
|
1190
|
+
return t2.l = e2, t2.i = r2, true;
|
|
1191
|
+
}
|
|
1192
|
+
function dn(t2) {
|
|
1193
|
+
try {
|
|
1194
|
+
switch (t2.i) {
|
|
1195
|
+
case 0:
|
|
1196
|
+
0 != t2.i ? dn(t2) : Yr(t2.h);
|
|
1197
|
+
break;
|
|
1198
|
+
case 1:
|
|
1199
|
+
var e2 = t2.h;
|
|
1200
|
+
rn(e2, e2.h + 8);
|
|
1201
|
+
break;
|
|
1202
|
+
case 2:
|
|
1203
|
+
if (2 != t2.i) dn(t2);
|
|
1204
|
+
else {
|
|
1205
|
+
var r2 = Jr(t2.h), n2 = t2.h;
|
|
1206
|
+
rn(n2, n2.h + r2);
|
|
1207
|
+
}
|
|
1208
|
+
break;
|
|
1209
|
+
case 5:
|
|
1210
|
+
var i2 = t2.h;
|
|
1211
|
+
rn(i2, i2.h + 4);
|
|
1212
|
+
break;
|
|
1213
|
+
case 3:
|
|
1214
|
+
fn();
|
|
1215
|
+
let s2 = t2.l;
|
|
1216
|
+
try {
|
|
1217
|
+
for (; ; ) {
|
|
1218
|
+
if (!ln(t2)) throw Error();
|
|
1219
|
+
if (4 == t2.i) {
|
|
1220
|
+
if (t2.l != s2) throw Error();
|
|
1221
|
+
break;
|
|
1222
|
+
}
|
|
1223
|
+
dn(t2);
|
|
1224
|
+
}
|
|
1225
|
+
} catch (t3) {
|
|
1226
|
+
if (t3 instanceof RangeError) throw new SyntaxError();
|
|
1227
|
+
throw t3;
|
|
1228
|
+
} finally {
|
|
1229
|
+
hn > 0 && hn--;
|
|
1230
|
+
}
|
|
1231
|
+
break;
|
|
1232
|
+
default:
|
|
1233
|
+
throw Error();
|
|
1234
|
+
}
|
|
1235
|
+
} catch (t3) {
|
|
1236
|
+
if (t3 instanceof RangeError) throw new SyntaxError();
|
|
1237
|
+
throw t3;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
function fn() {
|
|
1241
|
+
if (hn >= 100) throw new SyntaxError();
|
|
1242
|
+
hn++;
|
|
1243
|
+
}
|
|
1244
|
+
function pn(t2, e2, r2) {
|
|
1245
|
+
var n2 = t2.h.l, i2 = Jr(t2.h), s2 = (i2 = t2.h.h + i2) - n2;
|
|
1246
|
+
if (s2 <= 0 && (t2.h.l = i2, r2(e2, t2, void 0, void 0, void 0), s2 = i2 - t2.h.h), s2) throw Error();
|
|
1247
|
+
return t2.h.h = i2, t2.h.l = n2, e2;
|
|
1248
|
+
}
|
|
1249
|
+
function mn(t2) {
|
|
1250
|
+
var e2 = Jr(t2.h), r2 = nn(t2 = t2.h, e2);
|
|
1251
|
+
if (t2 = t2.i, h) {
|
|
1252
|
+
var o2, u2 = t2;
|
|
1253
|
+
(o2 = s) || (o2 = s = new TextDecoder("utf-8", { fatal: true })), e2 = r2 + e2, u2 = 0 === r2 && e2 === u2.length ? u2 : u2.subarray(r2, e2);
|
|
1254
|
+
try {
|
|
1255
|
+
var c2 = o2.decode(u2);
|
|
1256
|
+
} catch (t3) {
|
|
1257
|
+
if (void 0 === a) {
|
|
1258
|
+
try {
|
|
1259
|
+
o2.decode(new Uint8Array([128]));
|
|
1260
|
+
} catch (t4) {
|
|
1261
|
+
}
|
|
1262
|
+
try {
|
|
1263
|
+
o2.decode(new Uint8Array([97])), a = true;
|
|
1264
|
+
} catch (t4) {
|
|
1265
|
+
a = false;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
throw !a && (s = void 0), t3;
|
|
1269
|
+
}
|
|
1270
|
+
} else {
|
|
1271
|
+
e2 = (c2 = r2) + e2, r2 = [];
|
|
1272
|
+
let s2, a2 = null;
|
|
1273
|
+
for (; c2 < e2; ) {
|
|
1274
|
+
var l2 = t2[c2++];
|
|
1275
|
+
l2 < 128 ? r2.push(l2) : l2 < 224 ? c2 >= e2 ? n() : (s2 = t2[c2++], l2 < 194 || 128 != (192 & s2) ? (c2--, n()) : r2.push((31 & l2) << 6 | 63 & s2)) : l2 < 240 ? c2 >= e2 - 1 ? n() : (s2 = t2[c2++], 128 != (192 & s2) || 224 === l2 && s2 < 160 || 237 === l2 && s2 >= 160 || 128 != (192 & (o2 = t2[c2++])) ? (c2--, n()) : r2.push((15 & l2) << 12 | (63 & s2) << 6 | 63 & o2)) : l2 <= 244 ? c2 >= e2 - 2 ? n() : (s2 = t2[c2++], 128 != (192 & s2) || s2 - 144 + (l2 << 28) >> 30 || 128 != (192 & (o2 = t2[c2++])) || 128 != (192 & (u2 = t2[c2++])) ? (c2--, n()) : (l2 = (7 & l2) << 18 | (63 & s2) << 12 | (63 & o2) << 6 | 63 & u2, l2 -= 65536, r2.push(55296 + (l2 >> 10 & 1023), 56320 + (1023 & l2)))) : n(), r2.length >= 8192 && (a2 = i(a2, r2), r2.length = 0);
|
|
1276
|
+
}
|
|
1277
|
+
c2 = i(a2, r2);
|
|
1278
|
+
}
|
|
1279
|
+
return c2;
|
|
1280
|
+
}
|
|
1281
|
+
function gn(t2) {
|
|
1282
|
+
var e2 = Jr(t2.h);
|
|
1283
|
+
return sn(t2.h, e2);
|
|
1284
|
+
}
|
|
1285
|
+
function vn(t2, e2, r2) {
|
|
1286
|
+
var n2 = Jr(t2.h);
|
|
1287
|
+
for (n2 = t2.h.h + n2; t2.h.h < n2; ) r2.push(e2(t2.h));
|
|
1288
|
+
}
|
|
1289
|
+
var _n = class {
|
|
1290
|
+
constructor(t2, e2, r2, n2) {
|
|
1291
|
+
if (an.length) {
|
|
1292
|
+
let i2 = an.pop();
|
|
1293
|
+
i2.init(t2, e2, r2, n2), t2 = i2;
|
|
1294
|
+
} else t2 = new on(t2, e2, r2, n2);
|
|
1295
|
+
this.h = t2, this.o = this.h.h, this.i = this.l = -1, this.A(n2);
|
|
1296
|
+
}
|
|
1297
|
+
A({ sa: t2 = false } = {}) {
|
|
1298
|
+
this.sa = t2;
|
|
1299
|
+
}
|
|
1300
|
+
};
|
|
1301
|
+
var yn = [];
|
|
1302
|
+
function En(t2) {
|
|
1303
|
+
return new Tn(4294967295 & t2, Math.floor(t2 / 4294967296));
|
|
1304
|
+
}
|
|
1305
|
+
function An(t2) {
|
|
1306
|
+
return t2 ? /^\d+$/.test(t2) ? (jt(t2), new Tn(It, Ft)) : null : wn ||= new Tn(0, 0);
|
|
1307
|
+
}
|
|
1308
|
+
var wn;
|
|
1309
|
+
var Tn = class {
|
|
1310
|
+
constructor(t2, e2) {
|
|
1311
|
+
this.i = t2 >>> 0, this.h = e2 >>> 0;
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
function bn(t2) {
|
|
1315
|
+
return new Mn(4294967295 & t2, Math.floor(t2 / 4294967296));
|
|
1316
|
+
}
|
|
1317
|
+
function kn(t2) {
|
|
1318
|
+
return t2 ? /^-?\d+$/.test(t2) ? (jt(t2), new Mn(It, Ft)) : null : Sn ||= new Mn(0, 0);
|
|
1319
|
+
}
|
|
1320
|
+
var Sn;
|
|
1321
|
+
var Ln;
|
|
1322
|
+
var xn;
|
|
1323
|
+
var Rn;
|
|
1324
|
+
var In;
|
|
1325
|
+
var Fn;
|
|
1326
|
+
var Cn;
|
|
1327
|
+
var Nn;
|
|
1328
|
+
var Mn = class {
|
|
1329
|
+
constructor(t2, e2) {
|
|
1330
|
+
this.i = t2 >>> 0, this.h = e2 >>> 0;
|
|
1331
|
+
}
|
|
1332
|
+
};
|
|
1333
|
+
function On(t2, e2, r2) {
|
|
1334
|
+
return "undefined" != typeof BigInt64Array ? (Cn || (Cn = new BigInt64Array(1), Nn = new Uint32Array(Cn.buffer), Cn[0] = BigInt(1), Fn = 1 === Nn[0]), Cn[0] = t2, new e2(Nn[t2 = Fn ? 0 : 1], Nn[1 - t2])) : (In || (Ln = BigInt(Number.MIN_SAFE_INTEGER), xn = BigInt(Number.MAX_SAFE_INTEGER), Rn = BigInt(4294967295), In = BigInt(32)), t2 >= Ln && t2 <= xn ? r2(Number(t2)) : (t2 = BigInt.asUintN(64, t2), new e2(Number(t2 & Rn), Number(t2 >> In))));
|
|
1335
|
+
}
|
|
1336
|
+
function Dn(t2, e2, r2) {
|
|
1337
|
+
for (; r2 > 0 || e2 > 127; ) t2.h.push(127 & e2 | 128), e2 = (e2 >>> 7 | r2 << 25) >>> 0, r2 >>>= 7;
|
|
1338
|
+
t2.h.push(e2);
|
|
1339
|
+
}
|
|
1340
|
+
function Pn(t2, e2) {
|
|
1341
|
+
for (; e2 > 127; ) t2.h.push(127 & e2 | 128), e2 >>>= 7;
|
|
1342
|
+
t2.h.push(e2);
|
|
1343
|
+
}
|
|
1344
|
+
function $n(t2, e2) {
|
|
1345
|
+
if (e2 >= 0) Pn(t2, e2);
|
|
1346
|
+
else {
|
|
1347
|
+
for (let r2 = 0; r2 < 9; r2++) t2.h.push(127 & e2 | 128), e2 >>= 7;
|
|
1348
|
+
t2.h.push(1);
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
function Un(t2, e2) {
|
|
1352
|
+
jt(e2), (function(t3) {
|
|
1353
|
+
var e3 = Ft >> 31;
|
|
1354
|
+
t3(It << 1 ^ e3, (Ft << 1 | It >>> 31) ^ e3);
|
|
1355
|
+
})((e3, r2) => {
|
|
1356
|
+
Dn(t2, e3 >>> 0, r2 >>> 0);
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
function Bn(t2, e2) {
|
|
1360
|
+
t2.h.push(e2 >>> 0 & 255), t2.h.push(e2 >>> 8 & 255), t2.h.push(e2 >>> 16 & 255), t2.h.push(e2 >>> 24 & 255);
|
|
1361
|
+
}
|
|
1362
|
+
var jn = class {
|
|
1363
|
+
constructor() {
|
|
1364
|
+
this.h = [];
|
|
1365
|
+
}
|
|
1366
|
+
length() {
|
|
1367
|
+
return this.h.length;
|
|
1368
|
+
}
|
|
1369
|
+
end() {
|
|
1370
|
+
var t2 = this.h;
|
|
1371
|
+
return this.h = [], t2;
|
|
1372
|
+
}
|
|
1373
|
+
};
|
|
1374
|
+
function Gn(t2, e2) {
|
|
1375
|
+
0 !== e2.length && (t2.l.push(e2), t2.i += e2.length);
|
|
1376
|
+
}
|
|
1377
|
+
function Vn(t2, e2, r2) {
|
|
1378
|
+
Pn(t2.h, 8 * e2 + r2);
|
|
1379
|
+
}
|
|
1380
|
+
function Hn(t2, e2) {
|
|
1381
|
+
return Vn(t2, e2, 2), e2 = t2.h.end(), Gn(t2, e2), e2.push(t2.i), e2;
|
|
1382
|
+
}
|
|
1383
|
+
function Kn(t2, e2) {
|
|
1384
|
+
var r2 = e2.pop();
|
|
1385
|
+
for (r2 = t2.i + t2.h.length() - r2; r2 > 127; ) e2.push(127 & r2 | 128), r2 >>>= 7, t2.i++;
|
|
1386
|
+
e2.push(r2), t2.i++;
|
|
1387
|
+
}
|
|
1388
|
+
function Xn(t2, e2, r2) {
|
|
1389
|
+
if (null != r2) switch (Vn(t2, e2, 0), typeof r2) {
|
|
1390
|
+
case "number":
|
|
1391
|
+
t2 = t2.h, Nt(r2), Dn(t2, It, Ft);
|
|
1392
|
+
break;
|
|
1393
|
+
case "bigint":
|
|
1394
|
+
r2 = On(r2, Mn, bn), Dn(t2.h, r2.i, r2.h);
|
|
1395
|
+
break;
|
|
1396
|
+
default:
|
|
1397
|
+
r2 = kn(r2), Dn(t2.h, r2.i, r2.h);
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
function Wn(t2, e2, r2) {
|
|
1401
|
+
Vn(t2, e2, 2), Pn(t2.h, r2.length), Gn(t2, t2.h.end()), Gn(t2, r2);
|
|
1402
|
+
}
|
|
1403
|
+
function zn(t2, e2, r2, n2) {
|
|
1404
|
+
null != r2 && (e2 = Hn(t2, e2), n2(r2, t2), Kn(t2, e2));
|
|
1405
|
+
}
|
|
1406
|
+
var Yn = class {
|
|
1407
|
+
constructor() {
|
|
1408
|
+
this.l = [], this.i = 0, this.h = new jn();
|
|
1409
|
+
}
|
|
1410
|
+
};
|
|
1411
|
+
function qn(t2) {
|
|
1412
|
+
if ("string" == typeof t2) kn(t2);
|
|
1413
|
+
}
|
|
1414
|
+
function Jn() {
|
|
1415
|
+
var t2 = class {
|
|
1416
|
+
constructor() {
|
|
1417
|
+
throw Error();
|
|
1418
|
+
}
|
|
1419
|
+
};
|
|
1420
|
+
return Object.setPrototypeOf(t2, t2.prototype), t2;
|
|
1421
|
+
}
|
|
1422
|
+
var Zn = Jn();
|
|
1423
|
+
var Qn = Jn();
|
|
1424
|
+
var ti = Jn();
|
|
1425
|
+
var ei = Jn();
|
|
1426
|
+
var ri = Jn();
|
|
1427
|
+
var ni = Jn();
|
|
1428
|
+
var ii = Jn();
|
|
1429
|
+
var si = Jn();
|
|
1430
|
+
var oi = Jn();
|
|
1431
|
+
var ai = Jn();
|
|
1432
|
+
var hi = Jn();
|
|
1433
|
+
var ui = Jn();
|
|
1434
|
+
function ci(t2, e2, r2) {
|
|
1435
|
+
var n2 = t2.B;
|
|
1436
|
+
X && X in n2 && (n2 = n2[X]) && delete n2[e2.h], e2.i ? e2.u(t2, e2.i, e2.h, r2, e2.l) : e2.u(t2, e2.h, r2, e2.l);
|
|
1437
|
+
}
|
|
1438
|
+
var li = class {
|
|
1439
|
+
constructor(t2, e2) {
|
|
1440
|
+
this.B = Xe(t2, e2, void 0, 2048);
|
|
1441
|
+
}
|
|
1442
|
+
toJSON() {
|
|
1443
|
+
return He(this);
|
|
1444
|
+
}
|
|
1445
|
+
u() {
|
|
1446
|
+
var t2 = Ma, e2 = this.B, r2 = t2.h, n2 = X;
|
|
1447
|
+
if (B && n2 && null != e2[n2]?.[r2] && $(W, 3), e2 = t2.h, Z && X && void 0 === Z && (n2 = (r2 = this.B)[X]) && (n2 = n2.la)) try {
|
|
1448
|
+
n2(r2, e2, Ue);
|
|
1449
|
+
} catch (t3) {
|
|
1450
|
+
l(t3);
|
|
1451
|
+
}
|
|
1452
|
+
return t2.i ? t2.o(this, t2.i, t2.h, t2.l) : t2.o(this, t2.h, t2.defaultValue, t2.l);
|
|
1453
|
+
}
|
|
1454
|
+
clone() {
|
|
1455
|
+
var t2 = this.B, e2 = 0 | t2[et];
|
|
1456
|
+
return rr(this, t2, e2) ? Ye(this, t2, true) : new this.constructor(Je(t2, e2, false));
|
|
1457
|
+
}
|
|
1458
|
+
};
|
|
1459
|
+
li.prototype[J] = at, li.prototype.toString = function() {
|
|
1460
|
+
return this.B.toString();
|
|
1461
|
+
};
|
|
1462
|
+
var di = class {
|
|
1463
|
+
constructor(t2, e2, r2) {
|
|
1464
|
+
this.h = t2, this.i = e2, t2 = Zn, this.l = !!t2 && r2 === t2 || false;
|
|
1465
|
+
}
|
|
1466
|
+
};
|
|
1467
|
+
function fi(t2, e2) {
|
|
1468
|
+
return new di(t2, e2, Zn);
|
|
1469
|
+
}
|
|
1470
|
+
function pi(t2, e2, r2, n2, i2) {
|
|
1471
|
+
zn(t2, r2, Si(e2, n2), i2);
|
|
1472
|
+
}
|
|
1473
|
+
var mi;
|
|
1474
|
+
var gi;
|
|
1475
|
+
var vi = fi(function(t2, e2, r2, n2, i2) {
|
|
1476
|
+
return 2 === t2.i && (pn(t2, br(e2, n2, r2), i2), true);
|
|
1477
|
+
}, pi);
|
|
1478
|
+
var _i = fi(function(t2, e2, r2, n2, i2) {
|
|
1479
|
+
return 2 === t2.i && (pn(t2, br(e2, n2, r2), i2), true);
|
|
1480
|
+
}, pi);
|
|
1481
|
+
var yi = /* @__PURE__ */ Symbol();
|
|
1482
|
+
var Ei = /* @__PURE__ */ Symbol();
|
|
1483
|
+
var Ai = /* @__PURE__ */ Symbol();
|
|
1484
|
+
var wi = /* @__PURE__ */ Symbol();
|
|
1485
|
+
var Ti = /* @__PURE__ */ Symbol();
|
|
1486
|
+
function bi(t2, e2, r2, n2) {
|
|
1487
|
+
var i2 = n2[t2];
|
|
1488
|
+
if (i2) return i2;
|
|
1489
|
+
(i2 = {}).Fa = n2, i2.da = (function(t3) {
|
|
1490
|
+
switch (typeof t3) {
|
|
1491
|
+
case "boolean":
|
|
1492
|
+
return De ||= [0, void 0, true];
|
|
1493
|
+
case "number":
|
|
1494
|
+
return t3 > 0 ? void 0 : 0 === t3 ? Pe ||= [0, void 0] : [-t3, void 0];
|
|
1495
|
+
case "string":
|
|
1496
|
+
return [0, t3];
|
|
1497
|
+
case "object":
|
|
1498
|
+
return t3;
|
|
1499
|
+
}
|
|
1500
|
+
})(n2[0]);
|
|
1501
|
+
var s2 = n2[1], o2 = 1;
|
|
1502
|
+
s2 && s2.constructor === Object && (i2.ja = s2, "function" == typeof (s2 = n2[++o2]) && (i2.xa = true, mi ??= s2, gi ??= n2[o2 + 1], s2 = n2[o2 += 2]));
|
|
1503
|
+
for (var a2 = {}; s2 && Array.isArray(s2) && s2.length && "number" == typeof s2[0] && s2[0] > 0; ) {
|
|
1504
|
+
for (var h2 = 0; h2 < s2.length; h2++) a2[s2[h2]] = s2;
|
|
1505
|
+
s2 = n2[++o2];
|
|
1506
|
+
}
|
|
1507
|
+
for (h2 = 1; void 0 !== s2; ) {
|
|
1508
|
+
let t3;
|
|
1509
|
+
"number" == typeof s2 && (h2 += s2, s2 = n2[++o2]);
|
|
1510
|
+
var u2 = void 0;
|
|
1511
|
+
if (s2 instanceof di ? t3 = s2 : (t3 = vi, o2--), t3?.l) {
|
|
1512
|
+
s2 = n2[++o2], u2 = n2;
|
|
1513
|
+
var c2 = o2;
|
|
1514
|
+
"function" == typeof s2 && (s2 = s2(), u2[c2] = s2), u2 = s2;
|
|
1515
|
+
}
|
|
1516
|
+
for (c2 = h2 + 1, "number" == typeof (s2 = n2[++o2]) && s2 < 0 && (c2 -= s2, s2 = n2[++o2]); h2 < c2; h2++) {
|
|
1517
|
+
let n3 = a2[h2];
|
|
1518
|
+
u2 ? r2(i2, h2, t3, u2, n3) : e2(i2, h2, t3, n3);
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
return n2[t2] = i2;
|
|
1522
|
+
}
|
|
1523
|
+
function ki(t2) {
|
|
1524
|
+
return Array.isArray(t2) ? t2[0] instanceof di ? t2 : [_i, t2] : [t2, void 0];
|
|
1525
|
+
}
|
|
1526
|
+
function Si(t2, e2) {
|
|
1527
|
+
return t2 instanceof li ? t2.B : Array.isArray(t2) ? Ke(t2, e2) : void 0;
|
|
1528
|
+
}
|
|
1529
|
+
function Li(t2, e2, r2, n2) {
|
|
1530
|
+
var i2 = r2.h;
|
|
1531
|
+
t2[e2] = n2 ? (t3, e3, r3) => i2(t3, e3, r3, n2) : i2;
|
|
1532
|
+
}
|
|
1533
|
+
function xi(t2, e2, r2, n2, i2) {
|
|
1534
|
+
var s2, o2, a2 = r2.h;
|
|
1535
|
+
t2[e2] = (t3, e3, r3) => a2(t3, e3, r3, o2 ||= bi(Ei, Li, xi, n2).da, s2 ||= Ri(n2), i2);
|
|
1536
|
+
}
|
|
1537
|
+
function Ri(t2) {
|
|
1538
|
+
var e2 = t2[Ai];
|
|
1539
|
+
if (null != e2) return e2;
|
|
1540
|
+
var r2 = bi(Ei, Li, xi, t2);
|
|
1541
|
+
return e2 = r2.xa ? (t3, e3) => mi(t3, e3, r2) : (t3, e3) => {
|
|
1542
|
+
t: {
|
|
1543
|
+
fn();
|
|
1544
|
+
try {
|
|
1545
|
+
for (; ln(e3) && 4 != e3.i; ) {
|
|
1546
|
+
let h3 = e3.l, u3 = r2[h3];
|
|
1547
|
+
if (null == u3) {
|
|
1548
|
+
let t4 = r2.ja;
|
|
1549
|
+
if (t4) {
|
|
1550
|
+
let e4 = t4[h3];
|
|
1551
|
+
if (e4) {
|
|
1552
|
+
let t5 = Fi(e4);
|
|
1553
|
+
null != t5 && (u3 = r2[h3] = t5);
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
if (null == u3 || !u3(e3, t3, h3)) {
|
|
1558
|
+
var n2 = e3;
|
|
1559
|
+
let r3 = n2.o;
|
|
1560
|
+
if (dn(n2), n2.sa) var i2 = void 0;
|
|
1561
|
+
else {
|
|
1562
|
+
let t4 = n2.h.h - r3;
|
|
1563
|
+
n2.h.h = r3, i2 = sn(n2.h, t4);
|
|
1564
|
+
}
|
|
1565
|
+
n2 = void 0;
|
|
1566
|
+
var s2 = t3, o2 = h3, a2 = i2;
|
|
1567
|
+
a2 && ((n2 = s2[X] ?? (s2[X] = new $e()))[o2] ?? (n2[o2] = [])).push(a2);
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
let u2 = Ne(t3);
|
|
1571
|
+
u2 && (u2.la = r2.Fa[Ti]);
|
|
1572
|
+
var h2 = true;
|
|
1573
|
+
break t;
|
|
1574
|
+
} catch (t4) {
|
|
1575
|
+
if (t4 instanceof RangeError) throw new SyntaxError();
|
|
1576
|
+
throw t4;
|
|
1577
|
+
} finally {
|
|
1578
|
+
hn > 0 && hn--;
|
|
1579
|
+
}
|
|
1580
|
+
h2 = void 0;
|
|
1581
|
+
}
|
|
1582
|
+
return h2;
|
|
1583
|
+
}, t2[Ai] = e2, t2[Ti] = Ii.bind(t2), e2;
|
|
1584
|
+
}
|
|
1585
|
+
function Ii(t2, e2, r2, n2) {
|
|
1586
|
+
var i2 = this[Ei], s2 = this[Ai], o2 = Ke(void 0, i2.da), a2 = Ne(t2);
|
|
1587
|
+
if (a2) {
|
|
1588
|
+
var h2 = false, u2 = i2.ja;
|
|
1589
|
+
if (u2) {
|
|
1590
|
+
if (i2 = (e3, r3, i3) => {
|
|
1591
|
+
if (0 !== i3.length) if (u2[r3]) for (let t3 of i3) {
|
|
1592
|
+
e3 = un(t3);
|
|
1593
|
+
try {
|
|
1594
|
+
h2 = true, s2(o2, e3);
|
|
1595
|
+
} finally {
|
|
1596
|
+
cn(e3);
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
else n2?.(t2, r3, i3);
|
|
1600
|
+
}, null == e2) Me(a2, i2);
|
|
1601
|
+
else if (null != a2) {
|
|
1602
|
+
let t3 = a2[e2];
|
|
1603
|
+
t3 && i2(a2, e2, t3);
|
|
1604
|
+
}
|
|
1605
|
+
if (h2) {
|
|
1606
|
+
let n3 = 0 | t2[et];
|
|
1607
|
+
if (2 & n3 && 2048 & n3 && !r2?.eb) throw Error();
|
|
1608
|
+
let i3 = mt(n3), s3 = (e3, s4) => {
|
|
1609
|
+
if (null != or(t2, e3, i3)) {
|
|
1610
|
+
if (1 === r2?.mb) return;
|
|
1611
|
+
throw Error();
|
|
1612
|
+
}
|
|
1613
|
+
null != s4 && (n3 = hr(t2, n3, e3, s4, i3)), delete a2[e3];
|
|
1614
|
+
};
|
|
1615
|
+
null == e2 ? ft(o2, 0 | o2[et], (t3, e3) => {
|
|
1616
|
+
s3(t3, e3);
|
|
1617
|
+
}) : s3(e2, or(o2, e2, i3));
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
function Fi(t2) {
|
|
1623
|
+
var e2 = (t2 = ki(t2))[0].h;
|
|
1624
|
+
if (t2 = t2[1]) {
|
|
1625
|
+
let r2 = Ri(t2), n2 = bi(Ei, Li, xi, t2).da;
|
|
1626
|
+
return (t3, i2, s2) => e2(t3, i2, s2, n2, r2);
|
|
1627
|
+
}
|
|
1628
|
+
return e2;
|
|
1629
|
+
}
|
|
1630
|
+
function Ci(t2, e2, r2) {
|
|
1631
|
+
t2[e2] = r2.i;
|
|
1632
|
+
}
|
|
1633
|
+
function Ni(t2, e2, r2, n2) {
|
|
1634
|
+
var i2, s2, o2 = r2.i;
|
|
1635
|
+
t2[e2] = (t3, e3, r3) => o2(t3, e3, r3, s2 ||= bi(yi, Ci, Ni, n2).da, i2 ||= Mi(n2));
|
|
1636
|
+
}
|
|
1637
|
+
function Mi(t2) {
|
|
1638
|
+
var e2 = t2[wi];
|
|
1639
|
+
if (!e2) {
|
|
1640
|
+
let r2 = bi(yi, Ci, Ni, t2);
|
|
1641
|
+
e2 = (t3, e3) => Oi(t3, e3, r2), t2[wi] = e2;
|
|
1642
|
+
}
|
|
1643
|
+
return e2;
|
|
1644
|
+
}
|
|
1645
|
+
function Oi(t2, e2, r2) {
|
|
1646
|
+
ft(t2, 0 | t2[et], (t3, n2) => {
|
|
1647
|
+
if (null != n2) {
|
|
1648
|
+
var i2 = (function(t4, e3) {
|
|
1649
|
+
var r3 = t4[e3];
|
|
1650
|
+
if (r3) return r3;
|
|
1651
|
+
if ((r3 = t4.ja) && (r3 = r3[e3])) {
|
|
1652
|
+
var n3 = (r3 = ki(r3))[0].i;
|
|
1653
|
+
if (r3 = r3[1]) {
|
|
1654
|
+
let e4 = Mi(r3), i3 = bi(yi, Ci, Ni, r3).da;
|
|
1655
|
+
r3 = t4.xa ? gi(i3, e4) : (t5, r4, s2) => n3(t5, r4, s2, i3, e4);
|
|
1656
|
+
} else r3 = n3;
|
|
1657
|
+
return t4[e3] = r3;
|
|
1658
|
+
}
|
|
1659
|
+
})(r2, t3);
|
|
1660
|
+
i2 ? i2(e2, n2, t3) : t3 < 500 || $(Y, 3);
|
|
1661
|
+
}
|
|
1662
|
+
}), (t2 = Ne(t2)) && Me(t2, (t3, r3, n2) => {
|
|
1663
|
+
for (Gn(e2, e2.h.end()), t3 = 0; t3 < n2.length; t3++) Gn(e2, F(n2[t3]) || new Uint8Array(0));
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
var Di = At(0);
|
|
1667
|
+
function Pi(t2, e2, r2) {
|
|
1668
|
+
if (Array.isArray(e2)) {
|
|
1669
|
+
var n2 = 0 | e2[et];
|
|
1670
|
+
if (4 & n2) return e2;
|
|
1671
|
+
for (var i2 = 0, s2 = 0; i2 < e2.length; i2++) {
|
|
1672
|
+
let r3 = t2(e2[i2]);
|
|
1673
|
+
null != r3 && (e2[s2++] = r3);
|
|
1674
|
+
}
|
|
1675
|
+
return s2 < i2 && (e2.length = s2), t2 = 1 | n2, r2 && (t2 = -1537 & t2 | 4), t2 !== n2 && it(e2, t2), r2 && 2 & t2 && Object.freeze(e2), e2;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
var $i = (t2, e2) => {
|
|
1679
|
+
var r2 = new Yn();
|
|
1680
|
+
Oi(t2.B, r2, bi(yi, Ci, Ni, e2)), Gn(r2, r2.h.end()), t2 = new Uint8Array(r2.i);
|
|
1681
|
+
var n2 = (e2 = r2.l).length, i2 = 0;
|
|
1682
|
+
for (let r3 = 0; r3 < n2; r3++) {
|
|
1683
|
+
let n3 = e2[r3];
|
|
1684
|
+
t2.set(n3, i2), i2 += n3.length;
|
|
1685
|
+
}
|
|
1686
|
+
return r2.l = [t2], t2;
|
|
1687
|
+
};
|
|
1688
|
+
function Ui(t2, e2, r2) {
|
|
1689
|
+
return new di(t2, e2, r2);
|
|
1690
|
+
}
|
|
1691
|
+
function Bi(t2, e2, r2) {
|
|
1692
|
+
return new di(t2, e2, r2);
|
|
1693
|
+
}
|
|
1694
|
+
function ji(t2, e2, r2) {
|
|
1695
|
+
hr(t2, 0 | t2[et], e2, r2, mt(0 | t2[et]));
|
|
1696
|
+
}
|
|
1697
|
+
var Gi = fi(function(t2, e2, r2, n2, i2) {
|
|
1698
|
+
if (2 !== t2.i) return false;
|
|
1699
|
+
if (t2 = Vt(t2 = pn(t2, Ke([void 0, void 0], n2), i2)), i2 = mt(n2 = 0 | e2[et]), 2 & n2) throw Error();
|
|
1700
|
+
var s2 = or(e2, r2, i2);
|
|
1701
|
+
if (s2 instanceof Re) 2 & s2.N ? ((s2 = s2.fa()).push(t2), hr(e2, n2, r2, s2, i2)) : s2.hb(t2);
|
|
1702
|
+
else if (Array.isArray(s2)) {
|
|
1703
|
+
var o2 = 0 | s2[et];
|
|
1704
|
+
8192 & o2 || it(s2, o2 |= 8192), 2 & o2 && hr(e2, n2, r2, s2 = vr(s2), i2), s2.push(t2);
|
|
1705
|
+
} else hr(e2, n2, r2, ot([t2]), i2);
|
|
1706
|
+
return true;
|
|
1707
|
+
}, function(t2, e2, r2, n2, i2) {
|
|
1708
|
+
if (e2 instanceof Re) e2.forEach((e3, s2) => {
|
|
1709
|
+
zn(t2, r2, Ke([s2, e3], n2), i2);
|
|
1710
|
+
});
|
|
1711
|
+
else if (Array.isArray(e2)) {
|
|
1712
|
+
for (let s2 = 0; s2 < e2.length; s2++) {
|
|
1713
|
+
let o2 = e2[s2];
|
|
1714
|
+
Array.isArray(o2) && zn(t2, r2, Ke(o2, n2), i2);
|
|
1715
|
+
}
|
|
1716
|
+
ot(e2);
|
|
1717
|
+
}
|
|
1718
|
+
});
|
|
1719
|
+
function Vi(t2, e2, r2) {
|
|
1720
|
+
null != (e2 = Jt(e2)) && (Vn(t2, r2, 5), t2 = t2.h, Mt(e2), Bn(t2, It));
|
|
1721
|
+
}
|
|
1722
|
+
function Hi(t2, e2, r2) {
|
|
1723
|
+
null != (e2 = pe(e2)) && (qn(e2), Xn(t2, r2, e2));
|
|
1724
|
+
}
|
|
1725
|
+
function Ki(t2, e2, r2) {
|
|
1726
|
+
null != (e2 = re(e2)) && null != e2 && (Vn(t2, r2, 0), $n(t2.h, e2));
|
|
1727
|
+
}
|
|
1728
|
+
function Xi(t2, e2, r2) {
|
|
1729
|
+
null != (e2 = null == e2 || "boolean" == typeof e2 ? e2 : "number" == typeof e2 ? !!e2 : void 0) && (Vn(t2, r2, 0), t2.h.h.push(e2 ? 1 : 0));
|
|
1730
|
+
}
|
|
1731
|
+
function Wi(t2, e2, r2) {
|
|
1732
|
+
null != (e2 = _e(e2)) && Wn(t2, r2, c(e2));
|
|
1733
|
+
}
|
|
1734
|
+
function zi(t2, e2, r2, n2, i2) {
|
|
1735
|
+
zn(t2, r2, Si(e2, n2), i2);
|
|
1736
|
+
}
|
|
1737
|
+
function Yi(t2, e2, r2) {
|
|
1738
|
+
null != (e2 = me(e2)) && Wn(t2, r2, Wr(e2, true).buffer);
|
|
1739
|
+
}
|
|
1740
|
+
function qi(t2, e2, r2) {
|
|
1741
|
+
null != (e2 = ne(e2)) && null != e2 && (Vn(t2, r2, 0), Pn(t2.h, e2));
|
|
1742
|
+
}
|
|
1743
|
+
function Ji(t2, e2, r2) {
|
|
1744
|
+
null != (e2 = re(e2)) && (e2 = parseInt(e2, 10), Vn(t2, r2, 0), $n(t2.h, e2));
|
|
1745
|
+
}
|
|
1746
|
+
function Zi(t2, e2, r2) {
|
|
1747
|
+
return (5 === t2.i || 2 === t2.i) && (e2 = yr(e2, 0 | e2[et], r2), 2 == t2.i ? vn(t2, tn, e2) : e2.push(tn(t2.h)), true);
|
|
1748
|
+
}
|
|
1749
|
+
function Qi(t2, e2, r2) {
|
|
1750
|
+
return 0 === t2.i && (ji(e2, r2, Zr(t2.h)), true);
|
|
1751
|
+
}
|
|
1752
|
+
function ts(t2, e2, r2) {
|
|
1753
|
+
return (0 === t2.i || 2 === t2.i) && (e2 = yr(e2, 0 | e2[et], r2), 2 == t2.i ? vn(t2, qr, e2) : e2.push(qr(t2.h)), true);
|
|
1754
|
+
}
|
|
1755
|
+
function es(t2, e2, r2) {
|
|
1756
|
+
return 2 === t2.i && (ji(e2, r2, (t2 = gn(t2)) === I() ? void 0 : t2), true);
|
|
1757
|
+
}
|
|
1758
|
+
var rs = Ui(function(t2, e2, r2) {
|
|
1759
|
+
if (1 !== t2.i) return false;
|
|
1760
|
+
var n2 = t2.h;
|
|
1761
|
+
t2 = Qr(n2);
|
|
1762
|
+
var i2 = Qr(n2);
|
|
1763
|
+
n2 = 2 * (i2 >> 31) + 1;
|
|
1764
|
+
var s2 = i2 >>> 20 & 2047;
|
|
1765
|
+
return t2 = 4294967296 * (1048575 & i2) + t2, ji(e2, r2, 2047 == s2 ? t2 ? NaN : n2 * (1 / 0) : 0 == s2 ? 5e-324 * n2 * t2 : n2 * Math.pow(2, s2 - 1075) * (t2 + 4503599627370496)), true;
|
|
1766
|
+
}, function(t2, e2, r2) {
|
|
1767
|
+
null != (e2 = Jt(e2)) && (Vn(t2, r2, 1), t2 = t2.h, (r2 = xt ||= new DataView(new ArrayBuffer(8))).setFloat64(0, +e2, true), It = r2.getUint32(0, true), Ft = r2.getUint32(4, true), Bn(t2, It), Bn(t2, Ft));
|
|
1768
|
+
}, ai);
|
|
1769
|
+
var ns = Ui(function(t2, e2, r2) {
|
|
1770
|
+
return 5 === t2.i && (ji(e2, r2, tn(t2.h)), true);
|
|
1771
|
+
}, Vi, oi);
|
|
1772
|
+
var is = Bi(Zi, function(t2, e2, r2) {
|
|
1773
|
+
if (null != (e2 = Pi(Jt, e2, true))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1774
|
+
var n2 = t2, i2 = r2, s2 = e2[o2];
|
|
1775
|
+
null != s2 && (Vn(n2, i2, 5), n2 = n2.h, Mt(s2), Bn(n2, It));
|
|
1776
|
+
}
|
|
1777
|
+
}, oi);
|
|
1778
|
+
var ss = Bi(Zi, function(t2, e2, r2) {
|
|
1779
|
+
if (null != (e2 = Pi(Jt, e2, true)) && e2.length) {
|
|
1780
|
+
Vn(t2, r2, 2), Pn(t2.h, 4 * e2.length);
|
|
1781
|
+
for (let n2 = 0; n2 < e2.length; n2++) r2 = t2.h, Mt(e2[n2]), Bn(r2, It);
|
|
1782
|
+
}
|
|
1783
|
+
}, oi);
|
|
1784
|
+
var os = Ui(function(t2, e2, r2) {
|
|
1785
|
+
return 5 === t2.i && (ji(e2, r2, 0 === (t2 = tn(t2.h)) ? void 0 : t2), true);
|
|
1786
|
+
}, Vi, oi);
|
|
1787
|
+
var as = Ui(function(t2, e2, r2) {
|
|
1788
|
+
return Qi(t2, e2, r2);
|
|
1789
|
+
}, Hi, ni);
|
|
1790
|
+
var hs = Ui(function(t2, e2, r2) {
|
|
1791
|
+
return Qi(t2, e2, r2);
|
|
1792
|
+
}, Hi, ni);
|
|
1793
|
+
var us = Bi(function(t2, e2, r2) {
|
|
1794
|
+
return 0 !== t2.i && 2 !== t2.i ? t2 = false : (e2 = yr(e2, 0 | e2[et], r2), 2 == t2.i ? vn(t2, Zr, e2) : e2.push(Zr(t2.h)), t2 = true), t2;
|
|
1795
|
+
}, function(t2, e2, r2) {
|
|
1796
|
+
if (null != (e2 = Pi(pe, e2, false))) for (let n2 = 0; n2 < e2.length; n2++) Xn(t2, r2, e2[n2]);
|
|
1797
|
+
}, ni);
|
|
1798
|
+
var cs = Ui(function(t2, e2, r2) {
|
|
1799
|
+
return 0 !== t2.i ? e2 = false : (ji(e2, r2, (t2 = Zr(t2.h)) === Di ? void 0 : t2), e2 = true), e2;
|
|
1800
|
+
}, Hi, ni);
|
|
1801
|
+
var ls = Ui(function(t2, e2, r2) {
|
|
1802
|
+
return 0 !== t2.i ? t2 = false : (ji(e2, r2, zr(t2.h, Dt)), t2 = true), t2;
|
|
1803
|
+
}, function(t2, e2, r2) {
|
|
1804
|
+
if (e2 = (function(t3) {
|
|
1805
|
+
if (null == t3) return t3;
|
|
1806
|
+
var e3 = typeof t3;
|
|
1807
|
+
if ("bigint" === e3) return String(Kt(64, t3));
|
|
1808
|
+
if (te(t3)) {
|
|
1809
|
+
if ("string" === e3) return e3 = zt(Number(t3)), Xt(e3) && e3 >= 0 ? t3 = String(e3) : (-1 !== (e3 = t3.indexOf(".")) && (t3 = t3.substring(0, e3)), t3 = oe(t3)), t3;
|
|
1810
|
+
if ("number" === e3) return he(t3);
|
|
1811
|
+
}
|
|
1812
|
+
})(e2), null != e2) {
|
|
1813
|
+
if ("string" == typeof e2) An(e2);
|
|
1814
|
+
if (null != e2) switch (Vn(t2, r2, 0), typeof e2) {
|
|
1815
|
+
case "number":
|
|
1816
|
+
t2 = t2.h, Nt(e2), Dn(t2, It, Ft);
|
|
1817
|
+
break;
|
|
1818
|
+
case "bigint":
|
|
1819
|
+
r2 = On(e2, Tn, En), Dn(t2.h, r2.i, r2.h);
|
|
1820
|
+
break;
|
|
1821
|
+
default:
|
|
1822
|
+
r2 = An(e2), Dn(t2.h, r2.i, r2.h);
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
}, ii);
|
|
1826
|
+
var ds = Ui(function(t2, e2, r2) {
|
|
1827
|
+
return 0 === t2.i && (ji(e2, r2, qr(t2.h)), true);
|
|
1828
|
+
}, Ki, ei);
|
|
1829
|
+
var fs = Bi(ts, function(t2, e2, r2) {
|
|
1830
|
+
if (null != (e2 = Pi(re, e2, true))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1831
|
+
var n2 = t2, i2 = r2, s2 = e2[o2];
|
|
1832
|
+
null != s2 && (Vn(n2, i2, 0), $n(n2.h, s2));
|
|
1833
|
+
}
|
|
1834
|
+
}, ei);
|
|
1835
|
+
var ps = Bi(ts, function(t2, e2, r2) {
|
|
1836
|
+
if (null != (e2 = Pi(re, e2, true)) && e2.length) {
|
|
1837
|
+
r2 = Hn(t2, r2);
|
|
1838
|
+
for (let r3 = 0; r3 < e2.length; r3++) $n(t2.h, e2[r3]);
|
|
1839
|
+
Kn(t2, r2);
|
|
1840
|
+
}
|
|
1841
|
+
}, ei);
|
|
1842
|
+
var ms = Ui(function(t2, e2, r2) {
|
|
1843
|
+
return 0 === t2.i && (ji(e2, r2, 0 === (t2 = qr(t2.h)) ? void 0 : t2), true);
|
|
1844
|
+
}, Ki, ei);
|
|
1845
|
+
var gs = Ui(function(t2, e2, r2) {
|
|
1846
|
+
return 0 === t2.i && (ji(e2, r2, Yr(t2.h)), true);
|
|
1847
|
+
}, Xi, Qn);
|
|
1848
|
+
var vs = Ui(function(t2, e2, r2) {
|
|
1849
|
+
return 0 === t2.i && (ji(e2, r2, false === (t2 = Yr(t2.h)) ? void 0 : t2), true);
|
|
1850
|
+
}, Xi, Qn);
|
|
1851
|
+
var _s = Bi(function(t2, e2, r2) {
|
|
1852
|
+
return 2 === t2.i && (t2 = mn(t2), yr(e2, 0 | e2[et], r2).push(t2), true);
|
|
1853
|
+
}, function(t2, e2, r2) {
|
|
1854
|
+
if (null != (e2 = Pi(_e, e2, true))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1855
|
+
var n2 = t2, i2 = r2, s2 = e2[o2];
|
|
1856
|
+
null != s2 && Wn(n2, i2, c(s2));
|
|
1857
|
+
}
|
|
1858
|
+
}, ti);
|
|
1859
|
+
var ys = Ui(function(t2, e2, r2) {
|
|
1860
|
+
return 2 === t2.i && (ji(e2, r2, "" === (t2 = mn(t2)) ? void 0 : t2), true);
|
|
1861
|
+
}, Wi, ti);
|
|
1862
|
+
var Es = Ui(function(t2, e2, r2) {
|
|
1863
|
+
return 2 === t2.i && (ji(e2, r2, mn(t2)), true);
|
|
1864
|
+
}, Wi, ti);
|
|
1865
|
+
var As = (function(t2, e2, r2 = Zn) {
|
|
1866
|
+
return new di(t2, e2, r2);
|
|
1867
|
+
})(function(t2, e2, r2, n2, i2) {
|
|
1868
|
+
return 2 === t2.i && (n2 = Ke(void 0, n2), yr(e2, 0 | e2[et], r2).push(n2), pn(t2, n2, i2), true);
|
|
1869
|
+
}, function(t2, e2, r2, n2, i2) {
|
|
1870
|
+
if (Array.isArray(e2)) {
|
|
1871
|
+
for (let s2 = 0; s2 < e2.length; s2++) zi(t2, e2[s2], r2, n2, i2);
|
|
1872
|
+
1 & (t2 = 0 | e2[et]) || it(e2, 1 | t2);
|
|
1873
|
+
}
|
|
1874
|
+
});
|
|
1875
|
+
var ws = fi(function(t2, e2, r2, n2, i2, s2) {
|
|
1876
|
+
if (2 !== t2.i) return false;
|
|
1877
|
+
var o2 = 0 | e2[et];
|
|
1878
|
+
return wr(e2, o2, s2, r2, mt(o2)), pn(t2, e2 = br(e2, n2, r2), i2), true;
|
|
1879
|
+
}, zi);
|
|
1880
|
+
var Ts = Ui(function(t2, e2, r2) {
|
|
1881
|
+
return 2 === t2.i && (ji(e2, r2, gn(t2)), true);
|
|
1882
|
+
}, Yi, hi);
|
|
1883
|
+
var bs = Bi(function(t2, e2, r2) {
|
|
1884
|
+
return 2 === t2.i && (t2 = gn(t2), yr(e2, 0 | e2[et], r2).push(t2), true);
|
|
1885
|
+
}, function(t2, e2, r2) {
|
|
1886
|
+
if (null != (e2 = Pi(me, e2, false))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1887
|
+
var n2 = t2, i2 = r2, s2 = e2[o2];
|
|
1888
|
+
null != s2 && Wn(n2, i2, Wr(s2, true).buffer);
|
|
1889
|
+
}
|
|
1890
|
+
}, hi);
|
|
1891
|
+
var ks = Ui(function(t2, e2, r2) {
|
|
1892
|
+
return 0 === t2.i && (ji(e2, r2, Jr(t2.h)), true);
|
|
1893
|
+
}, qi, ri);
|
|
1894
|
+
var Ss = Bi(function(t2, e2, r2) {
|
|
1895
|
+
return (0 === t2.i || 2 === t2.i) && (e2 = yr(e2, 0 | e2[et], r2), 2 == t2.i ? vn(t2, Jr, e2) : e2.push(Jr(t2.h)), true);
|
|
1896
|
+
}, function(t2, e2, r2) {
|
|
1897
|
+
if (null != (e2 = Pi(ne, e2, true))) for (let o2 = 0; o2 < e2.length; o2++) {
|
|
1898
|
+
var n2 = t2, i2 = r2, s2 = e2[o2];
|
|
1899
|
+
null != s2 && (Vn(n2, i2, 0), Pn(n2.h, s2));
|
|
1900
|
+
}
|
|
1901
|
+
}, ri);
|
|
1902
|
+
var Ls = Ui(function(t2, e2, r2) {
|
|
1903
|
+
return 0 === t2.i && (ji(e2, r2, 0 === (t2 = Jr(t2.h)) ? void 0 : t2), true);
|
|
1904
|
+
}, qi, ri);
|
|
1905
|
+
var xs = Ui(function(t2, e2, r2) {
|
|
1906
|
+
return 0 === t2.i && (ji(e2, r2, qr(t2.h)), true);
|
|
1907
|
+
}, Ji, ui);
|
|
1908
|
+
var Rs = Ui(function(t2, e2, r2) {
|
|
1909
|
+
return 0 === t2.i && (ji(e2, r2, 0 === (t2 = qr(t2.h)) ? void 0 : t2), true);
|
|
1910
|
+
}, Ji, ui);
|
|
1911
|
+
var Is = Ui(function(t2, e2, r2) {
|
|
1912
|
+
return 0 !== t2.i ? t2 = false : (ji(e2, r2, (function(t3) {
|
|
1913
|
+
return zr(t3, (t4, e3) => {
|
|
1914
|
+
var r3 = -(1 & t4);
|
|
1915
|
+
return Pt(t4 = (t4 >>> 1 | e3 << 31) ^ r3, e3 >>> 1 ^ r3);
|
|
1916
|
+
});
|
|
1917
|
+
})(t2.h)), t2 = true), t2;
|
|
1918
|
+
}, function(t2, e2, r2) {
|
|
1919
|
+
if (null != (e2 = pe(e2)) && (qn(e2), null != e2)) switch (Vn(t2, r2, 0), typeof e2) {
|
|
1920
|
+
case "number":
|
|
1921
|
+
t2 = t2.h, e2 = (r2 = e2) < 0, Ct(r2 = 2 * Math.abs(r2)), r2 = It;
|
|
1922
|
+
let n2 = Ft;
|
|
1923
|
+
e2 && (0 == r2 ? 0 == n2 ? n2 = r2 = 4294967295 : (n2--, r2 = 4294967295) : r2--), Dn(t2, It = r2, Ft = n2);
|
|
1924
|
+
break;
|
|
1925
|
+
case "bigint":
|
|
1926
|
+
t2 = t2.h, e2 = e2 << BigInt(1) ^ e2 >> BigInt(63), It = Number(BigInt.asUintN(32, e2)), Ft = Number(BigInt.asUintN(32, e2 >> BigInt(32))), Dn(t2, It, Ft);
|
|
1927
|
+
break;
|
|
1928
|
+
default:
|
|
1929
|
+
Un(t2.h, e2);
|
|
1930
|
+
}
|
|
1931
|
+
}, si);
|
|
1932
|
+
var Fs = class {
|
|
1933
|
+
constructor(t2, e2) {
|
|
1934
|
+
var r2 = so;
|
|
1935
|
+
this.h = t2, this.i = e2, this.o = kr, this.u = Rr, this.defaultValue = void 0, this.l = null != r2.kb ? pt : void 0;
|
|
1936
|
+
}
|
|
1937
|
+
register() {
|
|
1938
|
+
v(this);
|
|
1939
|
+
}
|
|
1940
|
+
};
|
|
1941
|
+
function Cs(t2, e2) {
|
|
1942
|
+
return new Fs(t2, e2);
|
|
1943
|
+
}
|
|
1944
|
+
function Ns(t2, e2) {
|
|
1945
|
+
return (r2, n2) => {
|
|
1946
|
+
t: {
|
|
1947
|
+
let s2 = { na: true };
|
|
1948
|
+
n2 && Object.assign(s2, n2), r2 = un(r2, void 0, void 0, s2);
|
|
1949
|
+
try {
|
|
1950
|
+
let n3 = new t2(), s3 = n3.B;
|
|
1951
|
+
Ri(e2)(s3, r2);
|
|
1952
|
+
var i2 = n3;
|
|
1953
|
+
break t;
|
|
1954
|
+
} catch (t3) {
|
|
1955
|
+
if (t3 instanceof RangeError) throw new SyntaxError();
|
|
1956
|
+
throw t3;
|
|
1957
|
+
} finally {
|
|
1958
|
+
cn(r2);
|
|
1959
|
+
}
|
|
1960
|
+
i2 = void 0;
|
|
1961
|
+
}
|
|
1962
|
+
return i2;
|
|
1963
|
+
};
|
|
1964
|
+
}
|
|
1965
|
+
function Ms(t2) {
|
|
1966
|
+
return (e2) => $i(e2, t2);
|
|
1967
|
+
}
|
|
1968
|
+
function Os(t2) {
|
|
1969
|
+
return function() {
|
|
1970
|
+
return $i(this, t2);
|
|
1971
|
+
};
|
|
1972
|
+
}
|
|
1973
|
+
var Ds = [0, Ts, bs, gs, Es];
|
|
1974
|
+
var Ps = [0, ys, [0, Rs, [0, cs, ms], Rs, -1, [0, xs], Rs, -1], Ui(es, Yi, hi)];
|
|
1975
|
+
var $s;
|
|
1976
|
+
var Us = class extends li {
|
|
1977
|
+
constructor(t2) {
|
|
1978
|
+
super(t2);
|
|
1979
|
+
}
|
|
1980
|
+
};
|
|
1981
|
+
var Bs = [0, ys, Ui(es, function(t2, e2, r2) {
|
|
1982
|
+
if (null != e2) {
|
|
1983
|
+
if (e2 instanceof li) {
|
|
1984
|
+
let n2 = e2.nb;
|
|
1985
|
+
return void (n2 ? (e2 = n2(e2), null != e2 && Wn(t2, r2, Wr(e2, true).buffer)) : $(Y, 3));
|
|
1986
|
+
}
|
|
1987
|
+
if (Array.isArray(e2)) return void $(Y, 3);
|
|
1988
|
+
}
|
|
1989
|
+
Yi(t2, e2, r2);
|
|
1990
|
+
}, hi)];
|
|
1991
|
+
var js = [0, 1, [0, 12, ds, 10, gs], [0, 7, [0, ds, -1]]];
|
|
1992
|
+
var Gs = globalThis.trustedTypes;
|
|
1993
|
+
var Vs = class {
|
|
1994
|
+
constructor(t2) {
|
|
1995
|
+
this.h = t2;
|
|
1996
|
+
}
|
|
1997
|
+
toString() {
|
|
1998
|
+
return this.h + "";
|
|
1999
|
+
}
|
|
2000
|
+
};
|
|
2001
|
+
function Hs(t2) {
|
|
2002
|
+
var e2;
|
|
2003
|
+
return void 0 === $s && ($s = (function() {
|
|
2004
|
+
var t3 = null;
|
|
2005
|
+
if (!Gs) return t3;
|
|
2006
|
+
try {
|
|
2007
|
+
let e3 = (t4) => t4;
|
|
2008
|
+
t3 = Gs.createPolicy("goog#html", { createHTML: e3, createScript: e3, createScriptURL: e3 });
|
|
2009
|
+
} catch (t4) {
|
|
2010
|
+
}
|
|
2011
|
+
return t3;
|
|
2012
|
+
})()), t2 = (e2 = $s) ? e2.createScriptURL(t2) : t2, new Vs(t2);
|
|
2013
|
+
}
|
|
2014
|
+
function Ks(t2, ...e2) {
|
|
2015
|
+
if (0 === e2.length) return Hs(t2[0]);
|
|
2016
|
+
var r2 = t2[0];
|
|
2017
|
+
for (let n2 = 0; n2 < e2.length; n2++) r2 += encodeURIComponent(e2[n2]) + t2[n2 + 1];
|
|
2018
|
+
return Hs(r2);
|
|
2019
|
+
}
|
|
2020
|
+
var Xs = [0, ds, xs, gs, -1, ps, xs, -1, gs, -1];
|
|
2021
|
+
var Ws = [0, xs, -1, gs];
|
|
2022
|
+
var zs = class extends li {
|
|
2023
|
+
constructor(t2) {
|
|
2024
|
+
super(t2);
|
|
2025
|
+
}
|
|
2026
|
+
};
|
|
2027
|
+
var Ys = [0, gs, Es, gs, xs, -1, Bi(function(t2, e2, r2) {
|
|
2028
|
+
return (0 === t2.i || 2 === t2.i) && (e2 = yr(e2, 0 | e2[et], r2), 2 == t2.i ? vn(t2, en, e2) : e2.push(qr(t2.h)), true);
|
|
2029
|
+
}, function(t2, e2, r2) {
|
|
2030
|
+
if (null != (e2 = Pi(re, e2, true)) && e2.length) {
|
|
2031
|
+
r2 = Hn(t2, r2);
|
|
2032
|
+
for (let r3 = 0; r3 < e2.length; r3++) $n(t2.h, e2[r3]);
|
|
2033
|
+
Kn(t2, r2);
|
|
2034
|
+
}
|
|
2035
|
+
}, ui), Es, -1, [0, gs, -1], xs, gs, -1, Ws];
|
|
2036
|
+
var qs = class extends li {
|
|
2037
|
+
constructor(t2) {
|
|
2038
|
+
super(t2);
|
|
2039
|
+
}
|
|
2040
|
+
};
|
|
2041
|
+
var Js = class extends li {
|
|
2042
|
+
constructor(t2) {
|
|
2043
|
+
super(t2);
|
|
2044
|
+
}
|
|
2045
|
+
};
|
|
2046
|
+
var Zs = class extends li {
|
|
2047
|
+
constructor(t2) {
|
|
2048
|
+
super(t2);
|
|
2049
|
+
}
|
|
2050
|
+
h() {
|
|
2051
|
+
return ur(this, 9);
|
|
2052
|
+
}
|
|
2053
|
+
};
|
|
2054
|
+
var Qs = [0, 3, gs, -1, 2, [0, [2], ds, ws, [0, ks]], [0, xs, gs, xs, gs, xs, 4, [0, gs, Es, -1, gs], xs, gs, -1], [0, [3, 4], Es, -1, ws, [0, ds], ws, [0, xs, -1]], [0], Es, gs];
|
|
2055
|
+
var to = [0, Es, -2];
|
|
2056
|
+
var eo = class extends li {
|
|
2057
|
+
constructor(t2) {
|
|
2058
|
+
super(t2);
|
|
2059
|
+
}
|
|
2060
|
+
};
|
|
2061
|
+
var ro = [0];
|
|
2062
|
+
var no = class extends li {
|
|
2063
|
+
constructor(t2) {
|
|
2064
|
+
super(t2);
|
|
2065
|
+
}
|
|
2066
|
+
};
|
|
2067
|
+
var io = [0, ds, gs, 1, gs, -4];
|
|
2068
|
+
var so = class extends li {
|
|
2069
|
+
constructor(t2) {
|
|
2070
|
+
super(t2, 2);
|
|
2071
|
+
}
|
|
2072
|
+
};
|
|
2073
|
+
var oo = {};
|
|
2074
|
+
oo[336783863] = [0, Es, gs, -1, ds, [0, [1, 2, 3, 4, 5, 6, 7, 8, 9], ws, ro, ws, Ys, ws, to, ws, io, ws, Xs, ws, [0, Es, -2], ws, [0, Es, xs], ws, Qs, ws, Ws], [0, Es], gs, [0, [1, 3], [2, 4], ws, [0, ps], -1, ws, [0, _s], -1, As, [0, Es, -1]], Es];
|
|
2075
|
+
var ao = [0, cs, -1, vs, -3, cs, ps, ys, ms, cs, -1, vs, ms, vs, -2, ys];
|
|
2076
|
+
function ho(t2, e2) {
|
|
2077
|
+
Kr(t2, 3, e2);
|
|
2078
|
+
}
|
|
2079
|
+
function uo(t2, e2) {
|
|
2080
|
+
Kr(t2, 4, e2);
|
|
2081
|
+
}
|
|
2082
|
+
var co = class extends li {
|
|
2083
|
+
constructor(t2) {
|
|
2084
|
+
super(t2, 500);
|
|
2085
|
+
}
|
|
2086
|
+
A(t2) {
|
|
2087
|
+
return Rr(this, 0, 7, t2);
|
|
2088
|
+
}
|
|
2089
|
+
};
|
|
2090
|
+
var lo = [-1, {}];
|
|
2091
|
+
var fo = [0, Es, 1, lo];
|
|
2092
|
+
var po = [0, Es, _s, lo];
|
|
2093
|
+
function mo(t2, e2) {
|
|
2094
|
+
Nr(t2, 1, co, e2);
|
|
2095
|
+
}
|
|
2096
|
+
function go(t2, e2) {
|
|
2097
|
+
Kr(t2, 10, e2);
|
|
2098
|
+
}
|
|
2099
|
+
function vo(t2, e2) {
|
|
2100
|
+
Kr(t2, 15, e2);
|
|
2101
|
+
}
|
|
2102
|
+
var _o = class extends li {
|
|
2103
|
+
constructor(t2) {
|
|
2104
|
+
super(t2, 500);
|
|
2105
|
+
}
|
|
2106
|
+
A(t2) {
|
|
2107
|
+
return Rr(this, 0, 1001, t2);
|
|
2108
|
+
}
|
|
2109
|
+
};
|
|
2110
|
+
var yo = [-500, As, [-500, ys, -1, _s, -3, [-2, oo, gs], As, Bs, ms, -1, fo, po, As, [0, ys, vs], ys, ao, ms, _s, 987, _s], 4, As, [-500, Es, -1, [-1, {}], 998, Es], As, [-500, Es, _s, -1, [-2, {}, gs], 997, _s, -1], ms, As, [-500, Es, _s, lo, 998, _s], _s, ms, fo, po, As, [0, ys, -1, lo], _s, -2, ao, ys, -1, vs, [0, vs, Ls], 978, lo, As, Bs];
|
|
2111
|
+
_o.prototype.h = Os(yo);
|
|
2112
|
+
var Eo = Ns(_o, yo);
|
|
2113
|
+
var Ao = class extends li {
|
|
2114
|
+
constructor(t2) {
|
|
2115
|
+
super(t2);
|
|
2116
|
+
}
|
|
2117
|
+
};
|
|
2118
|
+
var wo = class extends li {
|
|
2119
|
+
constructor(t2) {
|
|
2120
|
+
super(t2);
|
|
2121
|
+
}
|
|
2122
|
+
h() {
|
|
2123
|
+
return Lr(this, Ao, 1);
|
|
2124
|
+
}
|
|
2125
|
+
};
|
|
2126
|
+
var To = [0, As, [0, ds, ns, Es, -1]];
|
|
2127
|
+
var bo = Ns(wo, To);
|
|
2128
|
+
var ko = class extends li {
|
|
2129
|
+
constructor(t2) {
|
|
2130
|
+
super(t2);
|
|
2131
|
+
}
|
|
2132
|
+
};
|
|
2133
|
+
var So = class extends li {
|
|
2134
|
+
constructor(t2) {
|
|
2135
|
+
super(t2);
|
|
2136
|
+
}
|
|
2137
|
+
};
|
|
2138
|
+
var Lo = class extends li {
|
|
2139
|
+
constructor(t2) {
|
|
2140
|
+
super(t2);
|
|
2141
|
+
}
|
|
2142
|
+
l() {
|
|
2143
|
+
return kr(this, ko, 2);
|
|
2144
|
+
}
|
|
2145
|
+
h() {
|
|
2146
|
+
return Lr(this, So, 5);
|
|
2147
|
+
}
|
|
2148
|
+
};
|
|
2149
|
+
var xo = Ns(class extends li {
|
|
2150
|
+
constructor(t2) {
|
|
2151
|
+
super(t2);
|
|
2152
|
+
}
|
|
2153
|
+
}, [0, _s, ps, ss, [0, xs, [0, ds, -3], [0, ns, -3], [0, ds, -1, [0, As, [0, ds, -2]]], As, [0, ns, -1, Es, ns]], Es, -1, hs, As, [0, ds, ns], _s, hs]);
|
|
2154
|
+
var Ro = class extends li {
|
|
2155
|
+
constructor(t2) {
|
|
2156
|
+
super(t2);
|
|
2157
|
+
}
|
|
2158
|
+
};
|
|
2159
|
+
var Io = Ns(class extends li {
|
|
2160
|
+
constructor(t2) {
|
|
2161
|
+
super(t2);
|
|
2162
|
+
}
|
|
2163
|
+
}, [0, As, [0, ns, -4]]);
|
|
2164
|
+
var Fo = class extends li {
|
|
2165
|
+
constructor(t2) {
|
|
2166
|
+
super(t2);
|
|
2167
|
+
}
|
|
2168
|
+
};
|
|
2169
|
+
var Co = Ns(class extends li {
|
|
2170
|
+
constructor(t2) {
|
|
2171
|
+
super(t2);
|
|
2172
|
+
}
|
|
2173
|
+
}, [0, As, [0, ns, -4]]);
|
|
2174
|
+
var No = class extends li {
|
|
2175
|
+
constructor(t2) {
|
|
2176
|
+
super(t2);
|
|
2177
|
+
}
|
|
2178
|
+
};
|
|
2179
|
+
var Mo = [0, ds, -1, ss, xs];
|
|
2180
|
+
var Oo = class extends li {
|
|
2181
|
+
constructor(t2) {
|
|
2182
|
+
super(t2);
|
|
2183
|
+
}
|
|
2184
|
+
};
|
|
2185
|
+
Oo.prototype.h = Os([0, ns, -4, hs]);
|
|
2186
|
+
var Do = class extends li {
|
|
2187
|
+
constructor(t2) {
|
|
2188
|
+
super(t2);
|
|
2189
|
+
}
|
|
2190
|
+
};
|
|
2191
|
+
var Po = Ns(class extends li {
|
|
2192
|
+
constructor(t2) {
|
|
2193
|
+
super(t2);
|
|
2194
|
+
}
|
|
2195
|
+
}, [0, As, [0, 1, ds, Es, To], hs]);
|
|
2196
|
+
var $o = class extends li {
|
|
2197
|
+
constructor(t2) {
|
|
2198
|
+
super(t2);
|
|
2199
|
+
}
|
|
2200
|
+
};
|
|
2201
|
+
var Uo = class extends li {
|
|
2202
|
+
constructor(t2) {
|
|
2203
|
+
super(t2);
|
|
2204
|
+
}
|
|
2205
|
+
h() {
|
|
2206
|
+
var t2 = sr(this, 1, void 0, gr);
|
|
2207
|
+
return null == t2 ? I() : t2;
|
|
2208
|
+
}
|
|
2209
|
+
};
|
|
2210
|
+
var Bo = class extends li {
|
|
2211
|
+
constructor(t2) {
|
|
2212
|
+
super(t2);
|
|
2213
|
+
}
|
|
2214
|
+
};
|
|
2215
|
+
var jo = [1, 2];
|
|
2216
|
+
var Go = Ns(class extends li {
|
|
2217
|
+
constructor(t2) {
|
|
2218
|
+
super(t2);
|
|
2219
|
+
}
|
|
2220
|
+
}, [0, As, [0, jo, ws, [0, ss], ws, [0, Ts], ds, Es], hs]);
|
|
2221
|
+
var Vo = class extends li {
|
|
2222
|
+
constructor(t2) {
|
|
2223
|
+
super(t2);
|
|
2224
|
+
}
|
|
2225
|
+
};
|
|
2226
|
+
var Ho = [0, Es, ds, ns, _s, -1];
|
|
2227
|
+
var Ko = class extends li {
|
|
2228
|
+
constructor(t2) {
|
|
2229
|
+
super(t2);
|
|
2230
|
+
}
|
|
2231
|
+
};
|
|
2232
|
+
var Xo = [0, gs, -1];
|
|
2233
|
+
var Wo = class extends li {
|
|
2234
|
+
constructor(t2) {
|
|
2235
|
+
super(t2);
|
|
2236
|
+
}
|
|
2237
|
+
h() {
|
|
2238
|
+
return cr(this, 2, zo);
|
|
2239
|
+
}
|
|
2240
|
+
l() {
|
|
2241
|
+
return Dr(this, Zs, 6, zo);
|
|
2242
|
+
}
|
|
2243
|
+
};
|
|
2244
|
+
var zo = [1, 2, 3, 4, 5, 6];
|
|
2245
|
+
var Yo = class extends li {
|
|
2246
|
+
constructor(t2) {
|
|
2247
|
+
super(t2);
|
|
2248
|
+
}
|
|
2249
|
+
h() {
|
|
2250
|
+
return null != sr(this, 1, void 0, gr);
|
|
2251
|
+
}
|
|
2252
|
+
l() {
|
|
2253
|
+
return null != _e(sr(this, 2));
|
|
2254
|
+
}
|
|
2255
|
+
};
|
|
2256
|
+
var qo = class extends li {
|
|
2257
|
+
constructor(t2) {
|
|
2258
|
+
super(t2);
|
|
2259
|
+
}
|
|
2260
|
+
};
|
|
2261
|
+
var Jo = [0, Ts, Es, [0, ds, hs, -1], [0, ls, hs]];
|
|
2262
|
+
var Zo = [0, Jo, gs, [0, zo, ws, io, ws, Ys, ws, Xs, ws, ro, ws, to, ws, Qs], xs];
|
|
2263
|
+
var Qo = Ms(Zo);
|
|
2264
|
+
var ta = class extends li {
|
|
2265
|
+
constructor(t2) {
|
|
2266
|
+
super(t2);
|
|
2267
|
+
}
|
|
2268
|
+
};
|
|
2269
|
+
var ea = [0, Zo, ns, -1, ds];
|
|
2270
|
+
var ra = Cs(502141897, ta);
|
|
2271
|
+
oo[502141897] = ea;
|
|
2272
|
+
var na = Ns(class extends li {
|
|
2273
|
+
constructor(t2) {
|
|
2274
|
+
super(t2);
|
|
2275
|
+
}
|
|
2276
|
+
}, [0, [0, xs, -1, is, Ss], Mo]);
|
|
2277
|
+
var ia = class extends li {
|
|
2278
|
+
constructor(t2) {
|
|
2279
|
+
super(t2);
|
|
2280
|
+
}
|
|
2281
|
+
};
|
|
2282
|
+
var sa = class extends li {
|
|
2283
|
+
constructor(t2) {
|
|
2284
|
+
super(t2);
|
|
2285
|
+
}
|
|
2286
|
+
};
|
|
2287
|
+
var oa = [0, Zo, ns, [0, Zo], gs];
|
|
2288
|
+
var aa = Cs(508968150, sa);
|
|
2289
|
+
oo[508968150] = [0, Zo, ea, oa, ns, [0, [0, Jo]]], oo[508968149] = oa;
|
|
2290
|
+
var ha = class extends li {
|
|
2291
|
+
constructor(t2) {
|
|
2292
|
+
super(t2);
|
|
2293
|
+
}
|
|
2294
|
+
l() {
|
|
2295
|
+
return kr(this, Vo, 2);
|
|
2296
|
+
}
|
|
2297
|
+
h() {
|
|
2298
|
+
ar(this, 2);
|
|
2299
|
+
}
|
|
2300
|
+
};
|
|
2301
|
+
var ua = [0, Zo, Ho];
|
|
2302
|
+
oo[478825465] = ua;
|
|
2303
|
+
var ca = class extends li {
|
|
2304
|
+
constructor(t2) {
|
|
2305
|
+
super(t2);
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
var la = class extends li {
|
|
2309
|
+
constructor(t2) {
|
|
2310
|
+
super(t2);
|
|
2311
|
+
}
|
|
2312
|
+
};
|
|
2313
|
+
var da = class extends li {
|
|
2314
|
+
constructor(t2) {
|
|
2315
|
+
super(t2);
|
|
2316
|
+
}
|
|
2317
|
+
};
|
|
2318
|
+
var fa = class extends li {
|
|
2319
|
+
constructor(t2) {
|
|
2320
|
+
super(t2);
|
|
2321
|
+
}
|
|
2322
|
+
};
|
|
2323
|
+
var pa = class extends li {
|
|
2324
|
+
constructor(t2) {
|
|
2325
|
+
super(t2);
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
var ma = [0, Zo, [0, Zo], ua, -1];
|
|
2329
|
+
var ga = [0, Zo, ns, ds];
|
|
2330
|
+
var va = [0, Zo, ns];
|
|
2331
|
+
var _a = [0, Zo, ga, va, ns];
|
|
2332
|
+
var ya = Cs(479097054, pa);
|
|
2333
|
+
oo[479097054] = [0, Zo, _a, ma], oo[463370452] = ma, oo[464864288] = ga;
|
|
2334
|
+
var Ea = Cs(462713202, fa);
|
|
2335
|
+
oo[462713202] = _a, oo[474472470] = va;
|
|
2336
|
+
var Aa = class extends li {
|
|
2337
|
+
constructor(t2) {
|
|
2338
|
+
super(t2);
|
|
2339
|
+
}
|
|
2340
|
+
};
|
|
2341
|
+
var wa = class extends li {
|
|
2342
|
+
constructor(t2) {
|
|
2343
|
+
super(t2);
|
|
2344
|
+
}
|
|
2345
|
+
};
|
|
2346
|
+
var Ta = class extends li {
|
|
2347
|
+
constructor(t2) {
|
|
2348
|
+
super(t2);
|
|
2349
|
+
}
|
|
2350
|
+
};
|
|
2351
|
+
var ba = class extends li {
|
|
2352
|
+
constructor(t2) {
|
|
2353
|
+
super(t2);
|
|
2354
|
+
}
|
|
2355
|
+
};
|
|
2356
|
+
var ka = [0, Zo, ns, -1, ds];
|
|
2357
|
+
var Sa = [0, Zo, ns, gs];
|
|
2358
|
+
ba.prototype.h = Os([0, Zo, va, [0, Zo], ea, oa, ka, Sa]);
|
|
2359
|
+
var La = class extends li {
|
|
2360
|
+
constructor(t2) {
|
|
2361
|
+
super(t2);
|
|
2362
|
+
}
|
|
2363
|
+
};
|
|
2364
|
+
var xa = Cs(456383383, La);
|
|
2365
|
+
oo[456383383] = [0, Zo, Ho];
|
|
2366
|
+
var Ra = class extends li {
|
|
2367
|
+
constructor(t2) {
|
|
2368
|
+
super(t2);
|
|
2369
|
+
}
|
|
2370
|
+
};
|
|
2371
|
+
var Ia = Cs(476348187, Ra);
|
|
2372
|
+
oo[476348187] = [0, Zo, Xo];
|
|
2373
|
+
var Fa = class extends li {
|
|
2374
|
+
constructor(t2) {
|
|
2375
|
+
super(t2);
|
|
2376
|
+
}
|
|
2377
|
+
};
|
|
2378
|
+
var Ca = class extends li {
|
|
2379
|
+
constructor(t2) {
|
|
2380
|
+
super(t2);
|
|
2381
|
+
}
|
|
2382
|
+
};
|
|
2383
|
+
var Na = [0, xs, -1];
|
|
2384
|
+
var Ma = Cs(458105876, class extends li {
|
|
2385
|
+
constructor(t2) {
|
|
2386
|
+
super(t2);
|
|
2387
|
+
}
|
|
2388
|
+
h() {
|
|
2389
|
+
var t2 = this.B, e2 = 0 | t2[et], r2 = ut(this, e2);
|
|
2390
|
+
return t2 = (function(t3, e3, r3, n2) {
|
|
2391
|
+
var i2 = Ca;
|
|
2392
|
+
!n2 && Qe(t3) && (r3 = 0 | (e3 = t3.B)[et]);
|
|
2393
|
+
var s2 = or(e3, 2);
|
|
2394
|
+
if (t3 = false, null == s2) {
|
|
2395
|
+
if (n2) return Ce();
|
|
2396
|
+
s2 = [];
|
|
2397
|
+
} else if (s2.constructor === Re) {
|
|
2398
|
+
if (!(2 & s2.N) || n2) return s2;
|
|
2399
|
+
s2 = s2.fa();
|
|
2400
|
+
} else Array.isArray(s2) ? t3 = !!(2 & s2[et]) : s2 = [];
|
|
2401
|
+
if (n2) {
|
|
2402
|
+
if (!s2.length) return Ce();
|
|
2403
|
+
t3 || (t3 = true, st(s2));
|
|
2404
|
+
} else t3 && (t3 = false, ot(s2), s2 = vr(s2));
|
|
2405
|
+
return !t3 && 32 & r3 && nt(s2, 32), r3 = hr(e3, r3, 2, n2 = new Re(s2, i2, Ee, void 0)), t3 || er(e3, r3), n2;
|
|
2406
|
+
})(this, t2, e2, r2), !r2 && Ca && (t2.Ga = true), t2;
|
|
2407
|
+
}
|
|
2408
|
+
});
|
|
2409
|
+
oo[458105876] = [0, Na, Gi, [true, hs, [0, Es, -1, _s]], [0, ps, gs, xs], gs];
|
|
2410
|
+
var Oa = class extends li {
|
|
2411
|
+
constructor(t2) {
|
|
2412
|
+
super(t2);
|
|
2413
|
+
}
|
|
2414
|
+
};
|
|
2415
|
+
var Da = Cs(458105758, Oa);
|
|
2416
|
+
oo[458105758] = [0, Zo, Es, Na];
|
|
2417
|
+
var Pa = class extends li {
|
|
2418
|
+
constructor(t2) {
|
|
2419
|
+
super(t2);
|
|
2420
|
+
}
|
|
2421
|
+
};
|
|
2422
|
+
var $a = class extends li {
|
|
2423
|
+
constructor(t2) {
|
|
2424
|
+
super(t2);
|
|
2425
|
+
}
|
|
2426
|
+
};
|
|
2427
|
+
var Ua = class extends li {
|
|
2428
|
+
constructor(t2) {
|
|
2429
|
+
super(t2);
|
|
2430
|
+
}
|
|
2431
|
+
};
|
|
2432
|
+
var Ba = Ms([0, As, [0, Rs, As, [0, os, -1], vs]]);
|
|
2433
|
+
var ja = class extends li {
|
|
2434
|
+
constructor(t2) {
|
|
2435
|
+
super(t2);
|
|
2436
|
+
}
|
|
2437
|
+
};
|
|
2438
|
+
var Ga = [0, os, -1, vs];
|
|
2439
|
+
var Va = class extends li {
|
|
2440
|
+
constructor(t2) {
|
|
2441
|
+
super(t2);
|
|
2442
|
+
}
|
|
2443
|
+
};
|
|
2444
|
+
var Ha = class extends li {
|
|
2445
|
+
constructor(t2) {
|
|
2446
|
+
super(t2);
|
|
2447
|
+
}
|
|
2448
|
+
};
|
|
2449
|
+
var Ka = [1, 2];
|
|
2450
|
+
Ha.prototype.h = Os([0, Ka, ws, Ga, ws, [0, As, Ga]]);
|
|
2451
|
+
var Xa = class extends li {
|
|
2452
|
+
constructor(t2) {
|
|
2453
|
+
super(t2);
|
|
2454
|
+
}
|
|
2455
|
+
};
|
|
2456
|
+
var Wa = Cs(443442058, Xa);
|
|
2457
|
+
oo[443442058] = [0, Zo, Es, ds, ns, _s, -1, gs, ns], oo[514774813] = ka;
|
|
2458
|
+
var za = class extends li {
|
|
2459
|
+
constructor(t2) {
|
|
2460
|
+
super(t2);
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
var Ya = Cs(516587230, za);
|
|
2464
|
+
function qa(t2, e2) {
|
|
2465
|
+
return e2 = e2 ? e2.clone() : new Vo(), void 0 !== t2.displayNamesLocale ? ar(e2, 1, ve(t2.displayNamesLocale)) : void 0 === t2.displayNamesLocale && ar(e2, 1), void 0 !== t2.maxResults ? $r(e2, 2, t2.maxResults) : "maxResults" in t2 && ar(e2, 2), void 0 !== t2.scoreThreshold ? jr(e2, 3, t2.scoreThreshold) : "scoreThreshold" in t2 && ar(e2, 3), void 0 !== t2.categoryAllowlist ? Hr(e2, 4, t2.categoryAllowlist) : "categoryAllowlist" in t2 && ar(e2, 4), void 0 !== t2.categoryDenylist ? Hr(e2, 5, t2.categoryDenylist) : "categoryDenylist" in t2 && ar(e2, 5), e2;
|
|
2466
|
+
}
|
|
2467
|
+
function Ja(t2) {
|
|
2468
|
+
var e2 = Number(t2);
|
|
2469
|
+
return Number.isSafeInteger(e2) ? e2 : String(t2);
|
|
2470
|
+
}
|
|
2471
|
+
function Za(t2, e2 = -1, r2 = "") {
|
|
2472
|
+
return { categories: t2.map((t3) => ({ index: Mr(t3, 1) ?? 0 ?? -1, score: Or(t3, 2) ?? 0, categoryName: _e(sr(t3, 3)) ?? "" ?? "", displayName: _e(sr(t3, 4)) ?? "" ?? "" })), headIndex: e2, headName: r2 };
|
|
2473
|
+
}
|
|
2474
|
+
function Qa(t2) {
|
|
2475
|
+
var e2 = { classifications: Lr(t2, Do, 1).map((t3) => Za(kr(t3, wo, 4)?.h() ?? [], Mr(t3, 2) ?? 0, _e(sr(t3, 3)) ?? "")) };
|
|
2476
|
+
return null != (function(t3) {
|
|
2477
|
+
return null == t3 ? t3 : "bigint" == typeof t3 ? (wt(t3) ? t3 = Number(t3) : (t3 = Ht(64, t3), t3 = wt(t3) ? Number(t3) : String(t3)), t3) : te(t3) ? "number" == typeof t3 ? ae(t3) : ce(t3) : void 0;
|
|
2478
|
+
})(sr(t2, 2, void 0, fe)) && (e2.timestampMs = Ja(sr(t2, 2, void 0, fe) ?? nr)), e2;
|
|
2479
|
+
}
|
|
2480
|
+
function th(t2) {
|
|
2481
|
+
var e2 = lr(t2, 3, Jt), r2 = lr(t2, 2, re), n2 = lr(t2, 1, _e), i2 = lr(t2, 9, _e), s2 = { categories: [], keypoints: [] };
|
|
2482
|
+
for (let t3 = 0; t3 < e2.length; t3++) s2.categories.push({ score: e2[t3], index: r2[t3] ?? -1, categoryName: n2[t3] ?? "", displayName: i2[t3] ?? "" });
|
|
2483
|
+
if ((e2 = kr(t2, Lo, 4)?.l()) && (s2.boundingBox = { originX: Mr(e2, 1, ir) ?? 0, originY: Mr(e2, 2, ir) ?? 0, width: Mr(e2, 3, ir) ?? 0, height: Mr(e2, 4, ir) ?? 0, angle: 0 }), kr(t2, Lo, 4)?.h().length) for (let e3 of kr(t2, Lo, 4).h()) s2.keypoints.push({ x: sr(e3, 1, ir, Jt) ?? 0, y: sr(e3, 2, ir, Jt) ?? 0, score: sr(e3, 4, ir, Jt) ?? 0, label: _e(sr(e3, 3, ir)) ?? "" });
|
|
2484
|
+
return s2;
|
|
2485
|
+
}
|
|
2486
|
+
function eh(t2) {
|
|
2487
|
+
var e2 = [];
|
|
2488
|
+
for (let r2 of Lr(t2, Fo, 1)) t2 = { x: Or(r2, 1) ?? 0, y: Or(r2, 2) ?? 0, z: Or(r2, 3) ?? 0, visibility: Or(r2, 4) ?? 0 }, null != sr(r2, 5, void 0, Jt) && (t2.presence = Or(r2, 5) ?? 0), e2.push(t2);
|
|
2489
|
+
return e2;
|
|
2490
|
+
}
|
|
2491
|
+
function rh(t2) {
|
|
2492
|
+
var e2 = [];
|
|
2493
|
+
for (let r2 of Lr(t2, Ro, 1)) t2 = { x: Or(r2, 1) ?? 0, y: Or(r2, 2) ?? 0, z: Or(r2, 3) ?? 0, visibility: Or(r2, 4) ?? 0 }, null != sr(r2, 5, void 0, Jt) && (t2.presence = Or(r2, 5) ?? 0), e2.push(t2);
|
|
2494
|
+
return e2;
|
|
2495
|
+
}
|
|
2496
|
+
function nh(t2) {
|
|
2497
|
+
return Array.from(t2, (t3) => t3 > 127 ? t3 - 256 : t3);
|
|
2498
|
+
}
|
|
2499
|
+
function ih(t2, e2) {
|
|
2500
|
+
if (t2.length !== e2.length) throw Error(`Cannot compute cosine similarity between embeddings of different sizes (${t2.length} vs. ${e2.length}).`);
|
|
2501
|
+
var r2 = 0, n2 = 0, i2 = 0;
|
|
2502
|
+
for (let s2 = 0; s2 < t2.length; s2++) r2 += t2[s2] * e2[s2], n2 += t2[s2] * t2[s2], i2 += e2[s2] * e2[s2];
|
|
2503
|
+
if (n2 <= 0 || i2 <= 0) throw Error("Cannot compute cosine similarity on embedding with 0 norm.");
|
|
2504
|
+
return r2 / Math.sqrt(n2 * i2);
|
|
2505
|
+
}
|
|
2506
|
+
oo[516587230] = [0, Zo, ka, Sa, ns], oo[518928384] = Sa;
|
|
2507
|
+
var sh;
|
|
2508
|
+
var oh = new Uint8Array([0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11]);
|
|
2509
|
+
async function ah(t2) {
|
|
2510
|
+
if (t2) return true;
|
|
2511
|
+
if (void 0 === sh) try {
|
|
2512
|
+
await WebAssembly.instantiate(oh), sh = true;
|
|
2513
|
+
} catch {
|
|
2514
|
+
sh = false;
|
|
2515
|
+
}
|
|
2516
|
+
return sh;
|
|
2517
|
+
}
|
|
2518
|
+
async function hh(t2, e2, r2) {
|
|
2519
|
+
return { wasmLoaderPath: `${e2}/${t2}_${r2 = `wasm${r2 ? "_module" : ""}${await ah(r2) ? "" : "_nosimd"}_internal`}.js`, wasmBinaryPath: `${e2}/${t2}_${r2}.wasm` };
|
|
2520
|
+
}
|
|
2521
|
+
var uh = class {
|
|
2522
|
+
};
|
|
2523
|
+
function ch(t2) {
|
|
2524
|
+
return ar(new lh(), 1, ee(t2));
|
|
2525
|
+
}
|
|
2526
|
+
uh.forVisionTasks = function(t2, e2 = false) {
|
|
2527
|
+
return hh("vision", t2 ?? Ks``, e2);
|
|
2528
|
+
}, uh.forLiteRtLmTextTasks = function(t2, e2 = false) {
|
|
2529
|
+
return hh("litertlm_text", t2 ?? Ks``, e2);
|
|
2530
|
+
}, uh.forTextTasks = function(t2, e2 = false) {
|
|
2531
|
+
return hh("text", t2 ?? Ks``, e2);
|
|
2532
|
+
}, uh.forRetrievalTasks = function(t2, e2 = false) {
|
|
2533
|
+
return hh("retrieval", t2 ?? Ks``, e2);
|
|
2534
|
+
}, uh.forGenAiTasks = function(t2, e2 = false) {
|
|
2535
|
+
return hh("genai", t2 ?? Ks``, e2);
|
|
2536
|
+
}, uh.forDecisionTasks = function(t2, e2 = false) {
|
|
2537
|
+
return hh("decision", t2 ?? Ks``, e2);
|
|
2538
|
+
}, uh.forAudioTasks = function(t2, e2 = false) {
|
|
2539
|
+
return hh("audio", t2 ?? Ks``, e2);
|
|
2540
|
+
}, uh.isSimdSupported = function(t2 = false) {
|
|
2541
|
+
return ah(t2);
|
|
2542
|
+
};
|
|
2543
|
+
var lh = class extends li {
|
|
2544
|
+
constructor(t2) {
|
|
2545
|
+
super(t2);
|
|
2546
|
+
}
|
|
2547
|
+
};
|
|
2548
|
+
var dh = class extends li {
|
|
2549
|
+
constructor(t2) {
|
|
2550
|
+
super(t2);
|
|
2551
|
+
}
|
|
2552
|
+
};
|
|
2553
|
+
var fh = [0, xs, 2, ls, -2, hs, As, [0, xs, hs]];
|
|
2554
|
+
var ph = class extends li {
|
|
2555
|
+
constructor(t2) {
|
|
2556
|
+
super(t2);
|
|
2557
|
+
}
|
|
2558
|
+
};
|
|
2559
|
+
var mh = class extends li {
|
|
2560
|
+
constructor(t2) {
|
|
2561
|
+
super(t2);
|
|
2562
|
+
}
|
|
2563
|
+
};
|
|
2564
|
+
function gh(t2, e2) {
|
|
2565
|
+
return ar(t2, 1, ee(e2));
|
|
2566
|
+
}
|
|
2567
|
+
function vh(t2, e2) {
|
|
2568
|
+
return ar(t2, 2, ee(e2));
|
|
2569
|
+
}
|
|
2570
|
+
var _h = class extends li {
|
|
2571
|
+
constructor(t2) {
|
|
2572
|
+
super(t2);
|
|
2573
|
+
}
|
|
2574
|
+
};
|
|
2575
|
+
var yh = [3, 4, 5, 6, 7];
|
|
2576
|
+
var Eh = class extends li {
|
|
2577
|
+
constructor(t2) {
|
|
2578
|
+
super(t2);
|
|
2579
|
+
}
|
|
2580
|
+
};
|
|
2581
|
+
var Ah = class extends li {
|
|
2582
|
+
constructor(t2) {
|
|
2583
|
+
super(t2);
|
|
2584
|
+
}
|
|
2585
|
+
};
|
|
2586
|
+
Ah.prototype.h = Os([0, [0, xs, Es, -3, xs], [0, yh, xs, -1, ws, [0, xs, Es, ls], ws, fh, ws, [0, 1, fh], ws, [0, xs], ws, [0, xs, Es, ls]]]);
|
|
2587
|
+
var wh = class {
|
|
2588
|
+
constructor() {
|
|
2589
|
+
this.h = "undefined" != typeof AbortController;
|
|
2590
|
+
}
|
|
2591
|
+
async send(t2, e2, r2) {
|
|
2592
|
+
var n2 = this.h ? new AbortController() : void 0, i2 = n2 && t2.ma > 0 ? setTimeout(() => {
|
|
2593
|
+
n2.abort();
|
|
2594
|
+
}, t2.ma) : void 0;
|
|
2595
|
+
try {
|
|
2596
|
+
let i3 = await fetch(t2.url, { method: t2.cb, headers: { ...t2.bb }, ...t2.body && { body: t2.body }, ...t2.withCredentials && { credentials: "include" }, signal: t2.ma && n2 ? n2.signal : null });
|
|
2597
|
+
200 === i3.status ? e2?.(await i3.text()) : r2?.(i3.status);
|
|
2598
|
+
} catch (t3) {
|
|
2599
|
+
if ("AbortError" === t3?.name) r2?.(408);
|
|
2600
|
+
else r2?.(400);
|
|
2601
|
+
} finally {
|
|
2602
|
+
clearTimeout(i2);
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
var Th = class extends li {
|
|
2607
|
+
constructor(t2) {
|
|
2608
|
+
super(t2, 37);
|
|
2609
|
+
}
|
|
2610
|
+
};
|
|
2611
|
+
var bh = [-4, {}, js, xs, Ps];
|
|
2612
|
+
var kh = [0, Es, xs, 1, Es, -1, xs, 1, xs, 1, hs];
|
|
2613
|
+
var Sh = [0, xs, Es, -2];
|
|
2614
|
+
var Lh = [0, Es, xs];
|
|
2615
|
+
var xh = [0, Es, xs];
|
|
2616
|
+
var Rh = [0, gs, -3];
|
|
2617
|
+
var Ih = [0, xs, Es, -1, hs, ds, -1, Es, -5, As, [0, Es, -4], -1, gs, [0, gs, -3], xs];
|
|
2618
|
+
var Fh = class extends li {
|
|
2619
|
+
constructor(t2) {
|
|
2620
|
+
super(t2, 19);
|
|
2621
|
+
}
|
|
2622
|
+
};
|
|
2623
|
+
var Ch = Ms([-19, {}, [0, xs, 1, [0, Es, -6, hs, ds, Es, -1, hs], 1, [0, Es, 1, Es, -5], Es, -1, [0, xs, Es, -8], [0, Es, -3], [0, Es, xs, Es, -2], [0, Es, -1, xs, Es, -1, xs, Es, -1, [0, As, [0, Es, -1], gs, Es, -5], [0, xs, gs, ds, -2]], hs, [0, Es, -3, hs, ds, Es, -1], [0, xs, Es, -1], [0, Es, -9], [0, Es, -6, xs, Es, 1, Es, gs, xs, -1, gs, Es, -2, xs, Es, xs, Es, ds, -1], 1, [0, xs], 1, [0, Es, -4], 1, kh, [0, [1, 2, 3, 4, 5, 6], ws, kh, ws, Lh, ws, xh, ws, [0, xs], ws, Ih, ws, Sh], Lh, xh, Ih, [0, [0, xs, Es, -1, hs, ds, -1, Es, -4, As, [0, Es, -4], -1, 1, Rh], [0, xs, Es, -1, hs, ds, -1, Es, -4, Rh]], Sh, [0, Es, [0, ds, -3, xs], xs, -2, [0, ds, -1], gs], 4, [0, Es, xs, Es, -1, hs, xs, Es, -1, xs, ds, -1]], xs, As, [-37, {}, as, Es, As, [0, Es, -1], Ts, 1, Ts, [0, _s, -1, fs, us, -1], Es, [0, ds, Es, -1], gs, ds, hs, Es, -1, Is, Ds, as, Ts, xs, fs, hs, -1, [0, xs, -1], Es, gs, Es, ps, Es, -1, rs, 1, rs, bh, gs, [0, xs, [0, ns, ds, -2], [0, ns]], [0, xs, hs]], as, bs, Es, -1, as, xs, -1, [0, gs, -1, xs, gs], [0, hs, -1, Es], [0, as, gs, hs], hs, 1, ks, 1, bh]);
|
|
2624
|
+
var Nh = class {
|
|
2625
|
+
constructor(t2) {
|
|
2626
|
+
this.i = [], this.o = new wh(), this.l = t2 ?? "", this.h = setInterval(() => {
|
|
2627
|
+
this.flush();
|
|
2628
|
+
}, 6e4);
|
|
2629
|
+
}
|
|
2630
|
+
close() {
|
|
2631
|
+
void 0 !== this.h && (clearInterval(this.h), this.h = void 0), this.flush();
|
|
2632
|
+
}
|
|
2633
|
+
flush(t2, e2) {
|
|
2634
|
+
if (this.error) e2?.("net-send-failed");
|
|
2635
|
+
else if (0 === this.i.length) t2?.();
|
|
2636
|
+
else {
|
|
2637
|
+
var r2 = this.i;
|
|
2638
|
+
this.i = [], r2 = (function(t3) {
|
|
2639
|
+
var e3 = new Fh();
|
|
2640
|
+
return Fr(e3 = ar(e3, 2, ee(1786)), 3, t3);
|
|
2641
|
+
})(r2), r2 = Ch(r2), this.o.send({ url: "https://odml.pa.googleapis.com/v1/log", cb: "POST", ma: 1e4, body: r2, ib: 2, bb: { "Content-Type": "application/x-protobuf", "x-goog-api-key": this.l }, withCredentials: false }, () => {
|
|
2642
|
+
t2?.();
|
|
2643
|
+
}, (t3) => {
|
|
2644
|
+
this.error = Error(`Logging failed with HTTP error: ${t3}`), this.i = [], void 0 !== this.h && (clearInterval(this.h), this.h = void 0), e2?.("net-send-failed", t3);
|
|
2645
|
+
});
|
|
2646
|
+
}
|
|
2647
|
+
}
|
|
2648
|
+
};
|
|
2649
|
+
var Mh = class {
|
|
2650
|
+
constructor() {
|
|
2651
|
+
this.ba = this.V = this.Y = this.S = this.W = this.U = this.R = 0;
|
|
2652
|
+
}
|
|
2653
|
+
};
|
|
2654
|
+
function Oh(t2, e2) {
|
|
2655
|
+
var r2 = new Ah();
|
|
2656
|
+
r2 = Rr(r2, 0, 1, t2.C), r2 = Rr(r2, 0, 2, e2), e2 = ar(e2 = new Th(), 6, lt(r2 = r2.h(), false)), (t2 = t2.m).error || t2.i.push(e2);
|
|
2657
|
+
}
|
|
2658
|
+
function Dh(t2, e2) {
|
|
2659
|
+
var r2 = { R: e2.R - t2.l.R, U: e2.U - t2.l.U, W: e2.W - t2.l.W, S: e2.S - t2.l.S, Y: e2.Y - t2.l.Y, V: e2.V, ba: e2.ba }, n2 = vh(gh(new _h(), t2.D), 1);
|
|
2660
|
+
r2 = Ph(t2, r2), Oh(t2, n2 = Ir(n2, 4, yh, r2)), t2.l = e2;
|
|
2661
|
+
}
|
|
2662
|
+
function Ph(t2, e2) {
|
|
2663
|
+
var r2 = new dh();
|
|
2664
|
+
return t2 = Br(t2 = Ur(t2 = ar(r2, 1, ee(t2.F)), 7, e2.S), 5, e2.V), t2 = Br(t2, 6, e2.ba), e2.W > 0 && Br(t2, 4, e2.Y / e2.W), 0 !== e2.R && (r2 = Ur(r2 = ch(3), 2, e2.R), Nr(t2, 8, lh, r2)), 0 !== e2.U && (e2 = Ur(r2 = ch(4), 2, e2.U), Nr(t2, 8, lh, e2)), t2;
|
|
2665
|
+
}
|
|
2666
|
+
var $h = class {
|
|
2667
|
+
constructor(t2, e2, r2) {
|
|
2668
|
+
this.v = performance.now(), this.o = performance.now(), this.i = /* @__PURE__ */ new Map(), this.u = 0, this.h = new Mh(), this.l = new Mh(), this.m = new Nh(r2), this.D = (function(t3) {
|
|
2669
|
+
switch (t3) {
|
|
2670
|
+
case "AudioClassifier":
|
|
2671
|
+
return 4;
|
|
2672
|
+
case "AudioEmbedder":
|
|
2673
|
+
return 5;
|
|
2674
|
+
case "TextClassifier":
|
|
2675
|
+
return 6;
|
|
2676
|
+
case "TextEmbedder":
|
|
2677
|
+
return 7;
|
|
2678
|
+
case "GestureRecognizer":
|
|
2679
|
+
return 8;
|
|
2680
|
+
case "HandDetector":
|
|
2681
|
+
return 9;
|
|
2682
|
+
case "HandLandmarker":
|
|
2683
|
+
return 10;
|
|
2684
|
+
case "ImageClassifier":
|
|
2685
|
+
return 11;
|
|
2686
|
+
case "ImageEmbedder":
|
|
2687
|
+
return 12;
|
|
2688
|
+
case "ImageSegmenter":
|
|
2689
|
+
return 13;
|
|
2690
|
+
case "ObjectDetector":
|
|
2691
|
+
return 14;
|
|
2692
|
+
case "FaceDetector":
|
|
2693
|
+
return 15;
|
|
2694
|
+
case "FaceLandmarker":
|
|
2695
|
+
return 16;
|
|
2696
|
+
case "InteractiveSegmenter":
|
|
2697
|
+
case "InteractiveSegmenterLegacy":
|
|
2698
|
+
return 18;
|
|
2699
|
+
case "HolisticLandmarker":
|
|
2700
|
+
return 20;
|
|
2701
|
+
case "LlmInference":
|
|
2702
|
+
return 21;
|
|
2703
|
+
case "LanguageDetector":
|
|
2704
|
+
return 22;
|
|
2705
|
+
case "PoseLandmarker":
|
|
2706
|
+
return 23;
|
|
2707
|
+
case "UniversalEmbedder":
|
|
2708
|
+
return 28;
|
|
2709
|
+
case "SemanticRetriever":
|
|
2710
|
+
return 29;
|
|
2711
|
+
case "DecisionMaker":
|
|
2712
|
+
return 30;
|
|
2713
|
+
case "TextSummarizer":
|
|
2714
|
+
return 26;
|
|
2715
|
+
case "TextProofreader":
|
|
2716
|
+
return 27;
|
|
2717
|
+
case "AudioTranscriber":
|
|
2718
|
+
return 31;
|
|
2719
|
+
default:
|
|
2720
|
+
return 0;
|
|
2721
|
+
}
|
|
2722
|
+
})(t2), this.F = (function(t3) {
|
|
2723
|
+
switch (t3) {
|
|
2724
|
+
case "IMAGE":
|
|
2725
|
+
return 11;
|
|
2726
|
+
case "VIDEO":
|
|
2727
|
+
return 12;
|
|
2728
|
+
case "LIVE_STREAM":
|
|
2729
|
+
return 13;
|
|
2730
|
+
case "AUDIO_CLIPS":
|
|
2731
|
+
return 14;
|
|
2732
|
+
case "AUDIO_STREAM":
|
|
2733
|
+
return 15;
|
|
2734
|
+
default:
|
|
2735
|
+
return 10;
|
|
2736
|
+
}
|
|
2737
|
+
})(e2), t2 = new Eh(), "undefined" == typeof window ? e2 = 0 : (e2 = navigator.userAgent, e2 = /Android/i.test(e2) ? 1 : /iPhone|iPad|iPod/i.test(e2) ? 2 : /Windows/i.test(e2) ? 5 : /Macintosh/i.test(e2) ? 4 : /Linux/i.test(e2) ? 3 : 0), t2 = ar(t2, 1, ee(e2)), t2 = ar(t2, 2, ve("")), t2 = ar(t2, 3, ve("")), t2 = ar(t2, 4, ve("1.1.1")), t2 = ar(t2, 5, ve("")), this.C = ar(t2, 6, ee(4));
|
|
2738
|
+
}
|
|
2739
|
+
za() {
|
|
2740
|
+
var t2 = new mh();
|
|
2741
|
+
t2 = Br(t2 = ar(t2, 1, ee(this.F)), 3, performance.now() - this.v), Oh(this, t2 = Ir(vh(gh(new _h(), this.D), 0), 3, yh, t2)), this.o = performance.now();
|
|
2742
|
+
}
|
|
2743
|
+
Aa(t2) {
|
|
2744
|
+
var e2 = this.i.get(t2);
|
|
2745
|
+
if (void 0 !== e2 && (this.i.delete(t2), t2 = performance.now() - e2, ++this.h.W, this.h.Y += t2, this.h.V = Math.max(this.h.V, t2), this.u = Math.max(this.u, t2), performance.now() > this.o + 3e4)) {
|
|
2746
|
+
for (let [r2, n2] of this.i.entries()) t2 = r2, n2 < e2 && (this.h.S++, this.i.delete(t2));
|
|
2747
|
+
e2 = { ...this.h, ba: performance.now() - this.o }, this.h.V = 0, this.o = performance.now(), Dh(this, e2);
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
ya() {
|
|
2751
|
+
var t2 = { ...this.h, S: this.h.S + this.i.size, V: this.u, ba: performance.now() - this.v };
|
|
2752
|
+
Dh(this, t2);
|
|
2753
|
+
var e2 = new ph();
|
|
2754
|
+
e2 = Rr(e2, 0, 2, t2 = Ph(this, t2)), Oh(this, e2 = Ir(t2 = vh(gh(new _h(), this.D), 2), 5, yh, e2));
|
|
2755
|
+
}
|
|
2756
|
+
close() {
|
|
2757
|
+
var t2 = this.m;
|
|
2758
|
+
"function" == typeof t2.close ? t2.close() : t2.flush();
|
|
2759
|
+
}
|
|
2760
|
+
};
|
|
2761
|
+
function Uh() {
|
|
2762
|
+
var t2 = navigator;
|
|
2763
|
+
return "undefined" != typeof OffscreenCanvas && (!(function(t3 = navigator) {
|
|
2764
|
+
return (t3 = t3.userAgent).includes("Safari") && !t3.includes("Chrome");
|
|
2765
|
+
})(t2) || !!((t2 = t2.userAgent.match(/Version\/([\d]+).*Safari/)) && t2.length >= 1 && Number(t2[1]) >= 17));
|
|
2766
|
+
}
|
|
2767
|
+
async function Bh(t2) {
|
|
2768
|
+
if ("function" != typeof importScripts) {
|
|
2769
|
+
let e2 = document.createElement("script");
|
|
2770
|
+
return e2.src = t2.toString(), e2.crossOrigin = "anonymous", new Promise((t3, r2) => {
|
|
2771
|
+
e2.addEventListener("load", () => {
|
|
2772
|
+
t3();
|
|
2773
|
+
}, false), e2.addEventListener("error", (t4) => {
|
|
2774
|
+
r2(t4);
|
|
2775
|
+
}, false), document.body.appendChild(e2);
|
|
2776
|
+
});
|
|
2777
|
+
}
|
|
2778
|
+
try {
|
|
2779
|
+
importScripts(t2.toString());
|
|
2780
|
+
} catch (e2) {
|
|
2781
|
+
if (!(e2 instanceof TypeError)) throw e2;
|
|
2782
|
+
{
|
|
2783
|
+
let e3 = self.import;
|
|
2784
|
+
e3 ? await e3(t2.toString()) : await import(t2.toString());
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
}
|
|
2788
|
+
function jh(t2) {
|
|
2789
|
+
return void 0 !== t2.videoWidth ? [t2.videoWidth, t2.videoHeight] : void 0 !== t2.naturalWidth ? [t2.naturalWidth, t2.naturalHeight] : void 0 !== t2.displayWidth ? [t2.displayWidth, t2.displayHeight] : [t2.width, t2.height];
|
|
2790
|
+
}
|
|
2791
|
+
function Gh(t2, e2, r2) {
|
|
2792
|
+
t2.o || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target"), r2(e2 = t2.j.stringToNewUTF8(e2)), t2.j._free(e2);
|
|
2793
|
+
}
|
|
2794
|
+
function Vh(t2, e2, r2) {
|
|
2795
|
+
if (!t2.j.canvas) throw Error("No OpenGL canvas configured.");
|
|
2796
|
+
if (r2 ? t2.j._bindTextureToStream(r2) : t2.j._bindTextureToCanvas(), !(r2 = t2.j.canvas.getContext("webgl2") || t2.j.canvas.getContext("webgl"))) throw Error("Failed to obtain WebGL context from the provided canvas. `getContext()` should only be invoked with `webgl` or `webgl2`.");
|
|
2797
|
+
t2.j.gpuOriginForWebTexturesIsBottomLeft && r2.pixelStorei(r2.UNPACK_FLIP_Y_WEBGL, true), r2.texImage2D(r2.TEXTURE_2D, 0, r2.RGBA, r2.RGBA, r2.UNSIGNED_BYTE, e2), t2.j.gpuOriginForWebTexturesIsBottomLeft && r2.pixelStorei(r2.UNPACK_FLIP_Y_WEBGL, false);
|
|
2798
|
+
var [n2, i2] = jh(e2);
|
|
2799
|
+
return !t2.l || n2 === t2.j.canvas.width && i2 === t2.j.canvas.height || (t2.j.canvas.width = n2, t2.j.canvas.height = i2), [n2, i2];
|
|
2800
|
+
}
|
|
2801
|
+
function Hh(t2, e2, r2) {
|
|
2802
|
+
t2.o || console.error("No wasm multistream support detected: ensure dependency inclusion of :gl_graph_runner_internal_multi_input target");
|
|
2803
|
+
var n2 = new Uint32Array(e2.length);
|
|
2804
|
+
for (let r3 = 0; r3 < e2.length; r3++) n2[r3] = t2.j.stringToNewUTF8(e2[r3]);
|
|
2805
|
+
e2 = t2.j._malloc(4 * n2.length), t2.j.HEAPU32.set(n2, e2 >> 2), r2(e2);
|
|
2806
|
+
for (let e3 of n2) t2.j._free(e3);
|
|
2807
|
+
t2.j._free(e2);
|
|
2808
|
+
}
|
|
2809
|
+
function Kh(t2, e2, r2) {
|
|
2810
|
+
t2.j.simpleListeners = t2.j.simpleListeners || {}, t2.j.simpleListeners[e2] = r2;
|
|
2811
|
+
}
|
|
2812
|
+
function Xh(t2, e2, r2) {
|
|
2813
|
+
var n2 = [];
|
|
2814
|
+
t2.j.simpleListeners = t2.j.simpleListeners || {}, t2.j.simpleListeners[e2] = (t3, e3, i2) => {
|
|
2815
|
+
e3 ? (r2(n2, i2), n2 = []) : n2.push(t3);
|
|
2816
|
+
};
|
|
2817
|
+
}
|
|
2818
|
+
var Wh = class {
|
|
2819
|
+
constructor(t2, e2) {
|
|
2820
|
+
this.l = true, this.j = t2, this.h = null, this.i = 0, this.o = "function" == typeof this.j._addIntToInputStream, void 0 !== e2 ? this.j.canvas = e2 : Uh() ? this.j.canvas = new OffscreenCanvas(1, 1) : (console.warn("OffscreenCanvas not supported and GraphRunner constructor glCanvas parameter is undefined. Creating backup canvas."), this.j.canvas = document.createElement("canvas"));
|
|
2821
|
+
}
|
|
2822
|
+
async initializeGraph(t2) {
|
|
2823
|
+
var e2 = await (await fetch(t2)).arrayBuffer();
|
|
2824
|
+
t2 = !(t2.endsWith(".pbtxt") || t2.endsWith(".textproto")), this.setGraph(new Uint8Array(e2), t2);
|
|
2825
|
+
}
|
|
2826
|
+
setGraphFromString(t2) {
|
|
2827
|
+
this.setGraph(new TextEncoder().encode(t2), false);
|
|
2828
|
+
}
|
|
2829
|
+
setGraph(t2, e2) {
|
|
2830
|
+
var r2 = t2.length, n2 = this.j._malloc(r2);
|
|
2831
|
+
this.j.HEAPU8.set(t2, n2), e2 ? this.j._changeBinaryGraph(r2, n2) : this.j._changeTextGraph(r2, n2), this.j._free(n2);
|
|
2832
|
+
}
|
|
2833
|
+
configureAudio(t2, e2, r2, n2, i2) {
|
|
2834
|
+
this.j._configureAudio || console.warn('Attempting to use configureAudio without support for input audio. Is build dep ":gl_graph_runner_audio" missing?'), Gh(this, n2 || "input_audio", (n3) => {
|
|
2835
|
+
Gh(this, i2 = i2 || "audio_header", (i3) => {
|
|
2836
|
+
this.j._configureAudio(n3, i3, t2, e2 ?? 0, r2);
|
|
2837
|
+
});
|
|
2838
|
+
});
|
|
2839
|
+
}
|
|
2840
|
+
setAutoResizeCanvas(t2) {
|
|
2841
|
+
this.l = t2;
|
|
2842
|
+
}
|
|
2843
|
+
setAutoRenderToScreen(t2) {
|
|
2844
|
+
this.j._setAutoRenderToScreen(t2);
|
|
2845
|
+
}
|
|
2846
|
+
setGpuBufferVerticalFlip(t2) {
|
|
2847
|
+
this.j.gpuOriginForWebTexturesIsBottomLeft = t2;
|
|
2848
|
+
}
|
|
2849
|
+
ka(t2) {
|
|
2850
|
+
Kh(this, "__graph_config__", (e2) => {
|
|
2851
|
+
t2(e2);
|
|
2852
|
+
}), Gh(this, "__graph_config__", (t3) => {
|
|
2853
|
+
this.j._getGraphConfig(t3, void 0);
|
|
2854
|
+
}), delete this.j.simpleListeners.__graph_config__;
|
|
2855
|
+
}
|
|
2856
|
+
attachErrorListener(t2) {
|
|
2857
|
+
this.j.errorListener = t2;
|
|
2858
|
+
}
|
|
2859
|
+
attachEmptyPacketListener(t2, e2) {
|
|
2860
|
+
this.j.emptyPacketListeners = this.j.emptyPacketListeners || {}, this.j.emptyPacketListeners[t2] = e2;
|
|
2861
|
+
}
|
|
2862
|
+
addAudioToStream(t2, e2, r2) {
|
|
2863
|
+
this.addAudioToStreamWithShape(t2, 0, 0, e2, r2);
|
|
2864
|
+
}
|
|
2865
|
+
addAudioToStreamWithShape(t2, e2, r2, n2, i2) {
|
|
2866
|
+
var s2 = 4 * t2.length;
|
|
2867
|
+
this.i !== s2 && (this.h && this.j._free(this.h), this.h = this.j._malloc(s2), this.i = s2), this.j.HEAPF32.set(t2, this.h / 4), Gh(this, n2, (t3) => {
|
|
2868
|
+
this.j._addAudioToInputStream(this.h, e2, r2, t3, i2);
|
|
2869
|
+
});
|
|
2870
|
+
}
|
|
2871
|
+
addGpuBufferToStream(t2, e2, r2) {
|
|
2872
|
+
Gh(this, e2, (e3) => {
|
|
2873
|
+
var [n2, i2] = Vh(this, t2, e3);
|
|
2874
|
+
this.j._addBoundTextureToStream(e3, n2, i2, r2);
|
|
2875
|
+
});
|
|
2876
|
+
}
|
|
2877
|
+
addBoolToStream(t2, e2, r2) {
|
|
2878
|
+
Gh(this, e2, (e3) => {
|
|
2879
|
+
this.j._addBoolToInputStream(t2, e3, r2);
|
|
2880
|
+
});
|
|
2881
|
+
}
|
|
2882
|
+
addDoubleToStream(t2, e2, r2) {
|
|
2883
|
+
Gh(this, e2, (e3) => {
|
|
2884
|
+
this.j._addDoubleToInputStream(t2, e3, r2);
|
|
2885
|
+
});
|
|
2886
|
+
}
|
|
2887
|
+
addFloatToStream(t2, e2, r2) {
|
|
2888
|
+
Gh(this, e2, (e3) => {
|
|
2889
|
+
this.j._addFloatToInputStream(t2, e3, r2);
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
addIntToStream(t2, e2, r2) {
|
|
2893
|
+
Gh(this, e2, (e3) => {
|
|
2894
|
+
this.j._addIntToInputStream(t2, e3, r2);
|
|
2895
|
+
});
|
|
2896
|
+
}
|
|
2897
|
+
addUintToStream(t2, e2, r2) {
|
|
2898
|
+
Gh(this, e2, (e3) => {
|
|
2899
|
+
this.j._addUintToInputStream(t2, e3, r2);
|
|
2900
|
+
});
|
|
2901
|
+
}
|
|
2902
|
+
addStringToStream(t2, e2, r2) {
|
|
2903
|
+
Gh(this, e2, (e3) => {
|
|
2904
|
+
Gh(this, t2, (t3) => {
|
|
2905
|
+
this.j._addStringToInputStream(t3, e3, r2);
|
|
2906
|
+
});
|
|
2907
|
+
});
|
|
2908
|
+
}
|
|
2909
|
+
addStringRecordToStream(t2, e2, r2) {
|
|
2910
|
+
Gh(this, e2, (e3) => {
|
|
2911
|
+
Hh(this, Object.keys(t2), (n2) => {
|
|
2912
|
+
Hh(this, Object.values(t2), (i2) => {
|
|
2913
|
+
this.j._addFlatHashMapToInputStream(n2, i2, Object.keys(t2).length, e3, r2);
|
|
2914
|
+
});
|
|
2915
|
+
});
|
|
2916
|
+
});
|
|
2917
|
+
}
|
|
2918
|
+
addProtoToStream(t2, e2, r2, n2) {
|
|
2919
|
+
Gh(this, r2, (r3) => {
|
|
2920
|
+
Gh(this, e2, (e3) => {
|
|
2921
|
+
var i2 = this.j._malloc(t2.length);
|
|
2922
|
+
this.j.HEAPU8.set(t2, i2), this.j._addProtoToInputStream(i2, t2.length, e3, r3, n2), this.j._free(i2);
|
|
2923
|
+
});
|
|
2924
|
+
});
|
|
2925
|
+
}
|
|
2926
|
+
addEmptyPacketToStream(t2, e2) {
|
|
2927
|
+
Gh(this, t2, (t3) => {
|
|
2928
|
+
this.j._addEmptyPacketToInputStream(t3, e2);
|
|
2929
|
+
});
|
|
2930
|
+
}
|
|
2931
|
+
addBoolVectorToStream(t2, e2, r2) {
|
|
2932
|
+
Gh(this, e2, (e3) => {
|
|
2933
|
+
var n2 = this.j._allocateBoolVector(t2.length);
|
|
2934
|
+
if (!n2) throw Error("Unable to allocate new bool vector on heap.");
|
|
2935
|
+
for (let e4 of t2) this.j._addBoolVectorEntry(n2, e4);
|
|
2936
|
+
this.j._addBoolVectorToInputStream(n2, e3, r2);
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
addDoubleVectorToStream(t2, e2, r2) {
|
|
2940
|
+
Gh(this, e2, (e3) => {
|
|
2941
|
+
var n2 = this.j._allocateDoubleVector(t2.length);
|
|
2942
|
+
if (!n2) throw Error("Unable to allocate new double vector on heap.");
|
|
2943
|
+
for (let e4 of t2) this.j._addDoubleVectorEntry(n2, e4);
|
|
2944
|
+
this.j._addDoubleVectorToInputStream(n2, e3, r2);
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2947
|
+
addFloatVectorToStream(t2, e2, r2) {
|
|
2948
|
+
Gh(this, e2, (e3) => {
|
|
2949
|
+
var n2 = this.j._allocateFloatVector(t2.length);
|
|
2950
|
+
if (!n2) throw Error("Unable to allocate new float vector on heap.");
|
|
2951
|
+
for (let e4 of t2) this.j._addFloatVectorEntry(n2, e4);
|
|
2952
|
+
this.j._addFloatVectorToInputStream(n2, e3, r2);
|
|
2953
|
+
});
|
|
2954
|
+
}
|
|
2955
|
+
addIntVectorToStream(t2, e2, r2) {
|
|
2956
|
+
Gh(this, e2, (e3) => {
|
|
2957
|
+
var n2 = this.j._allocateIntVector(t2.length);
|
|
2958
|
+
if (!n2) throw Error("Unable to allocate new int vector on heap.");
|
|
2959
|
+
for (let e4 of t2) this.j._addIntVectorEntry(n2, e4);
|
|
2960
|
+
this.j._addIntVectorToInputStream(n2, e3, r2);
|
|
2961
|
+
});
|
|
2962
|
+
}
|
|
2963
|
+
addUintVectorToStream(t2, e2, r2) {
|
|
2964
|
+
Gh(this, e2, (e3) => {
|
|
2965
|
+
var n2 = this.j._allocateUintVector(t2.length);
|
|
2966
|
+
if (!n2) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
2967
|
+
for (let e4 of t2) this.j._addUintVectorEntry(n2, e4);
|
|
2968
|
+
this.j._addUintVectorToInputStream(n2, e3, r2);
|
|
2969
|
+
});
|
|
2970
|
+
}
|
|
2971
|
+
addStringVectorToStream(t2, e2, r2) {
|
|
2972
|
+
Gh(this, e2, (e3) => {
|
|
2973
|
+
var n2 = this.j._allocateStringVector(t2.length);
|
|
2974
|
+
if (!n2) throw Error("Unable to allocate new string vector on heap.");
|
|
2975
|
+
for (let e4 of t2) Gh(this, e4, (t3) => {
|
|
2976
|
+
this.j._addStringVectorEntry(n2, t3);
|
|
2977
|
+
});
|
|
2978
|
+
this.j._addStringVectorToInputStream(n2, e3, r2);
|
|
2979
|
+
});
|
|
2980
|
+
}
|
|
2981
|
+
addBoolToInputSidePacket(t2, e2) {
|
|
2982
|
+
Gh(this, e2, (e3) => {
|
|
2983
|
+
this.j._addBoolToInputSidePacket(t2, e3);
|
|
2984
|
+
});
|
|
2985
|
+
}
|
|
2986
|
+
addDoubleToInputSidePacket(t2, e2) {
|
|
2987
|
+
Gh(this, e2, (e3) => {
|
|
2988
|
+
this.j._addDoubleToInputSidePacket(t2, e3);
|
|
2989
|
+
});
|
|
2990
|
+
}
|
|
2991
|
+
addFloatToInputSidePacket(t2, e2) {
|
|
2992
|
+
Gh(this, e2, (e3) => {
|
|
2993
|
+
this.j._addFloatToInputSidePacket(t2, e3);
|
|
2994
|
+
});
|
|
2995
|
+
}
|
|
2996
|
+
addIntToInputSidePacket(t2, e2) {
|
|
2997
|
+
Gh(this, e2, (e3) => {
|
|
2998
|
+
this.j._addIntToInputSidePacket(t2, e3);
|
|
2999
|
+
});
|
|
3000
|
+
}
|
|
3001
|
+
addUintToInputSidePacket(t2, e2) {
|
|
3002
|
+
Gh(this, e2, (e3) => {
|
|
3003
|
+
this.j._addUintToInputSidePacket(t2, e3);
|
|
3004
|
+
});
|
|
3005
|
+
}
|
|
3006
|
+
addStringToInputSidePacket(t2, e2) {
|
|
3007
|
+
Gh(this, e2, (e3) => {
|
|
3008
|
+
Gh(this, t2, (t3) => {
|
|
3009
|
+
this.j._addStringToInputSidePacket(t3, e3);
|
|
3010
|
+
});
|
|
3011
|
+
});
|
|
3012
|
+
}
|
|
3013
|
+
addProtoToInputSidePacket(t2, e2, r2) {
|
|
3014
|
+
Gh(this, r2, (r3) => {
|
|
3015
|
+
Gh(this, e2, (e3) => {
|
|
3016
|
+
var n2 = this.j._malloc(t2.length);
|
|
3017
|
+
this.j.HEAPU8.set(t2, n2), this.j._addProtoToInputSidePacket(n2, t2.length, e3, r3), this.j._free(n2);
|
|
3018
|
+
});
|
|
3019
|
+
});
|
|
3020
|
+
}
|
|
3021
|
+
addBoolVectorToInputSidePacket(t2, e2) {
|
|
3022
|
+
Gh(this, e2, (e3) => {
|
|
3023
|
+
var r2 = this.j._allocateBoolVector(t2.length);
|
|
3024
|
+
if (!r2) throw Error("Unable to allocate new bool vector on heap.");
|
|
3025
|
+
for (let e4 of t2) this.j._addBoolVectorEntry(r2, e4);
|
|
3026
|
+
this.j._addBoolVectorToInputSidePacket(r2, e3);
|
|
3027
|
+
});
|
|
3028
|
+
}
|
|
3029
|
+
addDoubleVectorToInputSidePacket(t2, e2) {
|
|
3030
|
+
Gh(this, e2, (e3) => {
|
|
3031
|
+
var r2 = this.j._allocateDoubleVector(t2.length);
|
|
3032
|
+
if (!r2) throw Error("Unable to allocate new double vector on heap.");
|
|
3033
|
+
for (let e4 of t2) this.j._addDoubleVectorEntry(r2, e4);
|
|
3034
|
+
this.j._addDoubleVectorToInputSidePacket(r2, e3);
|
|
3035
|
+
});
|
|
3036
|
+
}
|
|
3037
|
+
addFloatVectorToInputSidePacket(t2, e2) {
|
|
3038
|
+
Gh(this, e2, (e3) => {
|
|
3039
|
+
var r2 = this.j._allocateFloatVector(t2.length);
|
|
3040
|
+
if (!r2) throw Error("Unable to allocate new float vector on heap.");
|
|
3041
|
+
for (let e4 of t2) this.j._addFloatVectorEntry(r2, e4);
|
|
3042
|
+
this.j._addFloatVectorToInputSidePacket(r2, e3);
|
|
3043
|
+
});
|
|
3044
|
+
}
|
|
3045
|
+
addIntVectorToInputSidePacket(t2, e2) {
|
|
3046
|
+
Gh(this, e2, (e3) => {
|
|
3047
|
+
var r2 = this.j._allocateIntVector(t2.length);
|
|
3048
|
+
if (!r2) throw Error("Unable to allocate new int vector on heap.");
|
|
3049
|
+
for (let e4 of t2) this.j._addIntVectorEntry(r2, e4);
|
|
3050
|
+
this.j._addIntVectorToInputSidePacket(r2, e3);
|
|
3051
|
+
});
|
|
3052
|
+
}
|
|
3053
|
+
addUintVectorToInputSidePacket(t2, e2) {
|
|
3054
|
+
Gh(this, e2, (e3) => {
|
|
3055
|
+
var r2 = this.j._allocateUintVector(t2.length);
|
|
3056
|
+
if (!r2) throw Error("Unable to allocate new unsigned int vector on heap.");
|
|
3057
|
+
for (let e4 of t2) this.j._addUintVectorEntry(r2, e4);
|
|
3058
|
+
this.j._addUintVectorToInputSidePacket(r2, e3);
|
|
3059
|
+
});
|
|
3060
|
+
}
|
|
3061
|
+
addStringVectorToInputSidePacket(t2, e2) {
|
|
3062
|
+
Gh(this, e2, (e3) => {
|
|
3063
|
+
var r2 = this.j._allocateStringVector(t2.length);
|
|
3064
|
+
if (!r2) throw Error("Unable to allocate new string vector on heap.");
|
|
3065
|
+
for (let e4 of t2) Gh(this, e4, (t3) => {
|
|
3066
|
+
this.j._addStringVectorEntry(r2, t3);
|
|
3067
|
+
});
|
|
3068
|
+
this.j._addStringVectorToInputSidePacket(r2, e3);
|
|
3069
|
+
});
|
|
3070
|
+
}
|
|
3071
|
+
attachBoolListener(t2, e2) {
|
|
3072
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3073
|
+
this.j._attachBoolListener(t3);
|
|
3074
|
+
});
|
|
3075
|
+
}
|
|
3076
|
+
attachBoolVectorListener(t2, e2) {
|
|
3077
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3078
|
+
this.j._attachBoolVectorListener(t3);
|
|
3079
|
+
});
|
|
3080
|
+
}
|
|
3081
|
+
attachIntListener(t2, e2) {
|
|
3082
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3083
|
+
this.j._attachIntListener(t3);
|
|
3084
|
+
});
|
|
3085
|
+
}
|
|
3086
|
+
attachIntVectorListener(t2, e2) {
|
|
3087
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3088
|
+
this.j._attachIntVectorListener(t3);
|
|
3089
|
+
});
|
|
3090
|
+
}
|
|
3091
|
+
attachUintListener(t2, e2) {
|
|
3092
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3093
|
+
this.j._attachUintListener(t3);
|
|
3094
|
+
});
|
|
3095
|
+
}
|
|
3096
|
+
attachUintVectorListener(t2, e2) {
|
|
3097
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3098
|
+
this.j._attachUintVectorListener(t3);
|
|
3099
|
+
});
|
|
3100
|
+
}
|
|
3101
|
+
attachDoubleListener(t2, e2) {
|
|
3102
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3103
|
+
this.j._attachDoubleListener(t3);
|
|
3104
|
+
});
|
|
3105
|
+
}
|
|
3106
|
+
attachDoubleVectorListener(t2, e2) {
|
|
3107
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3108
|
+
this.j._attachDoubleVectorListener(t3);
|
|
3109
|
+
});
|
|
3110
|
+
}
|
|
3111
|
+
attachFloatListener(t2, e2) {
|
|
3112
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3113
|
+
this.j._attachFloatListener(t3);
|
|
3114
|
+
});
|
|
3115
|
+
}
|
|
3116
|
+
attachFloatVectorListener(t2, e2) {
|
|
3117
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3118
|
+
this.j._attachFloatVectorListener(t3);
|
|
3119
|
+
});
|
|
3120
|
+
}
|
|
3121
|
+
attachStringListener(t2, e2) {
|
|
3122
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3123
|
+
this.j._attachStringListener(t3);
|
|
3124
|
+
});
|
|
3125
|
+
}
|
|
3126
|
+
attachStringVectorListener(t2, e2) {
|
|
3127
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3128
|
+
this.j._attachStringVectorListener(t3);
|
|
3129
|
+
});
|
|
3130
|
+
}
|
|
3131
|
+
attachProtoListener(t2, e2, r2) {
|
|
3132
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3133
|
+
this.j._attachProtoListener(t3, r2 || false);
|
|
3134
|
+
});
|
|
3135
|
+
}
|
|
3136
|
+
attachProtoVectorListener(t2, e2, r2) {
|
|
3137
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3138
|
+
this.j._attachProtoVectorListener(t3, r2 || false);
|
|
3139
|
+
});
|
|
3140
|
+
}
|
|
3141
|
+
attachAudioListener(t2, e2, r2) {
|
|
3142
|
+
this.j._attachAudioListener || console.warn('Attempting to use attachAudioListener without support for output audio. Is build dep ":gl_graph_runner_audio_out" missing?'), Kh(this, t2, (t3, r3) => {
|
|
3143
|
+
t3 = new Float32Array(t3.buffer, t3.byteOffset, t3.length / 4), e2(t3, r3);
|
|
3144
|
+
}), Gh(this, t2, (t3) => {
|
|
3145
|
+
this.j._attachAudioListener(t3, r2 || false);
|
|
3146
|
+
});
|
|
3147
|
+
}
|
|
3148
|
+
finishProcessing() {
|
|
3149
|
+
this.j._waitUntilIdle();
|
|
3150
|
+
}
|
|
3151
|
+
closeGraph() {
|
|
3152
|
+
this.j._closeGraph(), this.j.simpleListeners = void 0, this.j.emptyPacketListeners = void 0;
|
|
3153
|
+
}
|
|
3154
|
+
};
|
|
3155
|
+
function zh(t2) {
|
|
3156
|
+
return class extends t2 {
|
|
3157
|
+
get qa() {
|
|
3158
|
+
return this.j;
|
|
3159
|
+
}
|
|
3160
|
+
Ta() {
|
|
3161
|
+
if ("function" == typeof this.qa._mediapipeLoggerGetEncodedApiKey) {
|
|
3162
|
+
let t3 = this.qa._mediapipeLoggerGetEncodedApiKey();
|
|
3163
|
+
return this.qa._decodeBase64(t3);
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
};
|
|
3167
|
+
}
|
|
3168
|
+
function Yh(t2) {
|
|
3169
|
+
return class extends t2 {
|
|
3170
|
+
ab() {
|
|
3171
|
+
this.j._registerModelResourcesGraphService();
|
|
3172
|
+
}
|
|
3173
|
+
};
|
|
3174
|
+
}
|
|
3175
|
+
var qh = zh(Yh(Wh));
|
|
3176
|
+
var Jh = class extends qh {
|
|
3177
|
+
};
|
|
3178
|
+
async function Zh(t2, e2, r2, n2) {
|
|
3179
|
+
return t2 = await (async (t3, e3, r3, n3, i2) => {
|
|
3180
|
+
if (e3 && await Bh(e3), !self.ModuleFactory) throw Error("ModuleFactory not set.");
|
|
3181
|
+
if (r3 && (await Bh(r3), !self.ModuleFactory)) throw Error("ModuleFactory not set.");
|
|
3182
|
+
return self.Module && i2 && ((e3 = self.Module).locateFile = i2.locateFile, i2.mainScriptUrlOrBlob && (e3.mainScriptUrlOrBlob = i2.mainScriptUrlOrBlob)), i2 = await self.ModuleFactory(self.Module || i2), self.ModuleFactory = self.Module = void 0, new t3(i2, n3);
|
|
3183
|
+
})(t2, r2.wasmLoaderPath, r2.assetLoaderPath, e2, { locateFile: (t3) => t3.endsWith(".wasm") ? r2.wasmBinaryPath.toString() : r2.assetBinaryPath && t3.endsWith(".data") ? r2.assetBinaryPath.toString() : t3 }), (function(t3, e3) {
|
|
3184
|
+
e3 = e3.runningMode ?? "";
|
|
3185
|
+
var r3 = t3.h.Ta();
|
|
3186
|
+
t3.o = new $h(t3.D(), e3, r3);
|
|
3187
|
+
})(t2, n2), await t2.A(n2), t2;
|
|
3188
|
+
}
|
|
3189
|
+
async function Qh(t2, e2, r2, n2) {
|
|
3190
|
+
return Zh(t2, e2, r2, n2);
|
|
3191
|
+
}
|
|
3192
|
+
function tu(t2, e2, r2) {
|
|
3193
|
+
try {
|
|
3194
|
+
t2.h.j.FS_unlink(`/${r2}`);
|
|
3195
|
+
} catch {
|
|
3196
|
+
}
|
|
3197
|
+
t2.h.j.FS_createDataFile("/", r2, e2, true, false, false), eu(t2, `/${r2}`);
|
|
3198
|
+
}
|
|
3199
|
+
function eu(t2, e2) {
|
|
3200
|
+
var r2 = kr(t2.baseOptions, Yo, 1) || new Yo();
|
|
3201
|
+
"string" == typeof e2 ? (ar(r2, 2, ve(e2)), ar(r2, 1)) : e2 instanceof Uint8Array && (ar(r2, 1, lt(e2, false)), ar(r2, 2)), Rr(t2.baseOptions, 0, 1, r2);
|
|
3202
|
+
}
|
|
3203
|
+
function ru(t2) {
|
|
3204
|
+
try {
|
|
3205
|
+
let e2 = t2.L.length;
|
|
3206
|
+
if (1 === e2) throw Error(t2.L[0].message);
|
|
3207
|
+
if (e2 > 1) throw Error("Encountered multiple errors: " + t2.L.map((t3) => t3.message).join(", "));
|
|
3208
|
+
} finally {
|
|
3209
|
+
t2.L = [];
|
|
3210
|
+
}
|
|
3211
|
+
}
|
|
3212
|
+
function nu(t2, e2) {
|
|
3213
|
+
t2.J = Math.max(t2.J, e2);
|
|
3214
|
+
}
|
|
3215
|
+
function iu(t2, e2) {
|
|
3216
|
+
t2.F = new co(), Vr(t2.F, 2, "PassThroughCalculator"), ho(t2.F, "free_memory"), uo(t2.F, "free_memory_unused_out"), go(e2, "free_memory"), mo(e2, t2.F);
|
|
3217
|
+
}
|
|
3218
|
+
function su(t2, e2) {
|
|
3219
|
+
ho(t2.F, e2), uo(t2.F, e2 + "_unused_out");
|
|
3220
|
+
}
|
|
3221
|
+
function ou(t2) {
|
|
3222
|
+
t2.h.addBoolToStream(true, "free_memory", t2.J);
|
|
3223
|
+
}
|
|
3224
|
+
var au = class {
|
|
3225
|
+
constructor(t2) {
|
|
3226
|
+
this.h = t2, this.L = [], this.J = 0, this.h.setAutoRenderToScreen(false);
|
|
3227
|
+
}
|
|
3228
|
+
l(t2, e2 = true, r2 = false, n2 = false) {
|
|
3229
|
+
if (e2) {
|
|
3230
|
+
let e3 = t2.baseOptions || {};
|
|
3231
|
+
if (t2.baseOptions?.modelAssetBuffer && t2.baseOptions?.modelAssetPath) throw Error("Cannot set both baseOptions.modelAssetPath and baseOptions.modelAssetBuffer");
|
|
3232
|
+
if (!(kr(this.baseOptions, Yo, 1)?.h() || kr(this.baseOptions, Yo, 1)?.l() || t2.baseOptions?.modelAssetBuffer || t2.baseOptions?.modelAssetPath)) throw Error("Either baseOptions.modelAssetPath or baseOptions.modelAssetBuffer must be set");
|
|
3233
|
+
!(function(t3, e4, r3 = false) {
|
|
3234
|
+
var n3 = kr(t3.baseOptions, Wo, 3);
|
|
3235
|
+
if (!n3) {
|
|
3236
|
+
var i3 = n3 = new Wo(), s2 = new eo();
|
|
3237
|
+
Ir(i3, 4, zo, s2);
|
|
3238
|
+
}
|
|
3239
|
+
"delegate" in e4 && ("GPU" === e4.delegate ? (e4 = n3, i3 = new zs(), Ir(e4, 2, zo, i3)) : (e4 = n3, i3 = new eo(), Ir(e4, 4, zo, i3))), r3 && (r3 = n3.l(), e4 = n3.h() || true === r3?.h(), r3 = new Zs(), e4 ? Rr(r3, 0, 9, e4 = new Js()) : Rr(r3, 0, 8, e4 = new qs()), Ir(n3, 6, zo, r3)), Rr(t3.baseOptions, 0, 3, n3);
|
|
3240
|
+
})(this, e3, n2);
|
|
3241
|
+
let i2 = r2 ? "model.litertlm" : "model.dat";
|
|
3242
|
+
if (e3.modelAssetPath) return fetch(e3.modelAssetPath.toString()).then((t3) => {
|
|
3243
|
+
if (t3.ok) return t3.arrayBuffer();
|
|
3244
|
+
throw Error(`Failed to fetch model: ${e3.modelAssetPath} (${t3.status})`);
|
|
3245
|
+
}).then((t3) => {
|
|
3246
|
+
tu(this, new Uint8Array(t3), i2), this.u(), this.M();
|
|
3247
|
+
});
|
|
3248
|
+
if (e3.modelAssetBuffer instanceof Uint8Array) r2 ? tu(this, e3.modelAssetBuffer, i2) : eu(this, e3.modelAssetBuffer);
|
|
3249
|
+
else if (e3.modelAssetBuffer) return (async function(t3) {
|
|
3250
|
+
for (var e4 = [], r3 = 0; ; ) {
|
|
3251
|
+
let { done: n3, value: i3 } = await t3.read();
|
|
3252
|
+
if (n3) break;
|
|
3253
|
+
e4.push(i3), r3 += i3.length;
|
|
3254
|
+
}
|
|
3255
|
+
if (0 === e4.length) return new Uint8Array(0);
|
|
3256
|
+
if (1 === e4.length) return e4[0];
|
|
3257
|
+
t3 = new Uint8Array(r3), r3 = 0;
|
|
3258
|
+
for (let n3 of e4) t3.set(n3, r3), r3 += n3.length;
|
|
3259
|
+
return t3;
|
|
3260
|
+
})(e3.modelAssetBuffer).then((t3) => {
|
|
3261
|
+
r2 ? tu(this, t3, i2) : eu(this, t3), this.u(), this.M();
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
return this.u(), this.M(), Promise.resolve();
|
|
3265
|
+
}
|
|
3266
|
+
M() {
|
|
3267
|
+
}
|
|
3268
|
+
ka() {
|
|
3269
|
+
var t2;
|
|
3270
|
+
if (this.h.ka((e2) => {
|
|
3271
|
+
t2 = Eo(e2);
|
|
3272
|
+
}), !t2) throw Error("Failed to retrieve CalculatorGraphConfig");
|
|
3273
|
+
return t2;
|
|
3274
|
+
}
|
|
3275
|
+
setGraph(t2, e2) {
|
|
3276
|
+
this.h.attachErrorListener((t3, e3) => {
|
|
3277
|
+
this.L.push(Error(e3));
|
|
3278
|
+
}), this.h.ab(), this.h.setGraph(t2, e2), this.o?.za(), this.F = void 0, ru(this);
|
|
3279
|
+
}
|
|
3280
|
+
finishProcessing(t2) {
|
|
3281
|
+
this.h.finishProcessing(), ru(this), this.o && void 0 !== t2 && this.o.Aa(t2);
|
|
3282
|
+
}
|
|
3283
|
+
close() {
|
|
3284
|
+
this.F = void 0, this.o?.ya(), this.o?.close(), this.h.closeGraph();
|
|
3285
|
+
}
|
|
3286
|
+
};
|
|
3287
|
+
function hu(t2, e2) {
|
|
3288
|
+
if (!t2) throw Error(`Unable to obtain required WebGL resource: ${e2}`);
|
|
3289
|
+
return t2;
|
|
3290
|
+
}
|
|
3291
|
+
au.prototype.close = au.prototype.close;
|
|
3292
|
+
var uu = class {
|
|
3293
|
+
constructor(t2, e2, r2, n2) {
|
|
3294
|
+
this.h = t2, this.i = e2, this.o = r2, this.l = n2;
|
|
3295
|
+
}
|
|
3296
|
+
bind() {
|
|
3297
|
+
this.h.bindVertexArray(this.i);
|
|
3298
|
+
}
|
|
3299
|
+
close() {
|
|
3300
|
+
this.h.deleteVertexArray(this.i), this.h.deleteBuffer(this.o), this.h.deleteBuffer(this.l);
|
|
3301
|
+
}
|
|
3302
|
+
};
|
|
3303
|
+
function cu(t2, e2, r2) {
|
|
3304
|
+
var n2 = t2.h;
|
|
3305
|
+
if (r2 = hu(n2.createShader(r2), "Failed to create WebGL shader"), n2.shaderSource(r2, e2), n2.compileShader(r2), !n2.getShaderParameter(r2, n2.COMPILE_STATUS)) throw Error(`Could not compile WebGL shader: ${n2.getShaderInfoLog(r2)}`);
|
|
3306
|
+
return n2.attachShader(t2.i, r2), r2;
|
|
3307
|
+
}
|
|
3308
|
+
function lu(t2, e2) {
|
|
3309
|
+
var r2 = t2.h, n2 = hu(r2.createVertexArray(), "Failed to create vertex array");
|
|
3310
|
+
r2.bindVertexArray(n2);
|
|
3311
|
+
var i2 = hu(r2.createBuffer(), "Failed to create buffer");
|
|
3312
|
+
r2.bindBuffer(r2.ARRAY_BUFFER, i2), r2.enableVertexAttribArray(t2.G), r2.vertexAttribPointer(t2.G, 2, r2.FLOAT, false, 0, 0), r2.bufferData(r2.ARRAY_BUFFER, new Float32Array([-1, -1, -1, 1, 1, 1, 1, -1]), r2.STATIC_DRAW);
|
|
3313
|
+
var s2 = hu(r2.createBuffer(), "Failed to create buffer");
|
|
3314
|
+
return r2.bindBuffer(r2.ARRAY_BUFFER, s2), r2.enableVertexAttribArray(t2.L), r2.vertexAttribPointer(t2.L, 2, r2.FLOAT, false, 0, 0), r2.bufferData(r2.ARRAY_BUFFER, new Float32Array(e2 ? [0, 1, 0, 0, 1, 0, 1, 1] : [0, 0, 0, 1, 1, 1, 1, 0]), r2.STATIC_DRAW), r2.bindBuffer(r2.ARRAY_BUFFER, null), r2.bindVertexArray(null), new uu(r2, n2, i2, s2);
|
|
3315
|
+
}
|
|
3316
|
+
function du(t2, e2) {
|
|
3317
|
+
if (t2.h) {
|
|
3318
|
+
if (e2 !== t2.h) throw Error("Cannot change GL context once initialized");
|
|
3319
|
+
} else t2.h = e2;
|
|
3320
|
+
}
|
|
3321
|
+
function fu(t2, e2, r2, n2) {
|
|
3322
|
+
return du(t2, e2), t2.i || (t2.o(), t2.J()), r2 ? (t2.m || (t2.m = lu(t2, true)), r2 = t2.m) : (t2.F || (t2.F = lu(t2, false)), r2 = t2.F), e2.useProgram(t2.i), r2.bind(), t2.l(), t2 = n2(), r2.h.bindVertexArray(null), t2;
|
|
3323
|
+
}
|
|
3324
|
+
function pu(t2, e2, r2) {
|
|
3325
|
+
return du(t2, e2), t2 = hu(e2.createTexture(), "Failed to create texture"), e2.bindTexture(e2.TEXTURE_2D, t2), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_WRAP_S, e2.CLAMP_TO_EDGE), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_WRAP_T, e2.CLAMP_TO_EDGE), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_MIN_FILTER, r2 ?? e2.LINEAR), e2.texParameteri(e2.TEXTURE_2D, e2.TEXTURE_MAG_FILTER, r2 ?? e2.LINEAR), e2.bindTexture(e2.TEXTURE_2D, null), t2;
|
|
3326
|
+
}
|
|
3327
|
+
function mu(t2, e2, r2) {
|
|
3328
|
+
du(t2, e2), t2.D || (t2.D = hu(e2.createFramebuffer(), "Failed to create framebuffe.")), e2.bindFramebuffer(e2.FRAMEBUFFER, t2.D), e2.framebufferTexture2D(e2.FRAMEBUFFER, e2.COLOR_ATTACHMENT0, e2.TEXTURE_2D, r2, 0);
|
|
3329
|
+
}
|
|
3330
|
+
function gu(t2) {
|
|
3331
|
+
t2.h?.bindFramebuffer(t2.h.FRAMEBUFFER, null);
|
|
3332
|
+
}
|
|
3333
|
+
var vu = class {
|
|
3334
|
+
C() {
|
|
3335
|
+
return "\n precision mediump float;\n varying vec2 vTex;\n uniform sampler2D inputTexture;\n void main() {\n gl_FragColor = texture2D(inputTexture, vTex);\n }\n ";
|
|
3336
|
+
}
|
|
3337
|
+
o() {
|
|
3338
|
+
var t2 = this.h;
|
|
3339
|
+
if (this.i = hu(t2.createProgram(), "Failed to create WebGL program"), this.ea = cu(this, "\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 }", t2.VERTEX_SHADER), this.aa = cu(this, this.C(), t2.FRAGMENT_SHADER), t2.linkProgram(this.i), !t2.getProgramParameter(this.i, t2.LINK_STATUS)) throw Error(`Error during program linking: ${t2.getProgramInfoLog(this.i)}`);
|
|
3340
|
+
this.G = t2.getAttribLocation(this.i, "aVertex"), this.L = t2.getAttribLocation(this.i, "aTex");
|
|
3341
|
+
}
|
|
3342
|
+
J() {
|
|
3343
|
+
}
|
|
3344
|
+
l() {
|
|
3345
|
+
}
|
|
3346
|
+
close() {
|
|
3347
|
+
if (this.i) {
|
|
3348
|
+
let t2 = this.h;
|
|
3349
|
+
t2.deleteProgram(this.i), t2.deleteShader(this.ea), t2.deleteShader(this.aa);
|
|
3350
|
+
}
|
|
3351
|
+
this.D && this.h.deleteFramebuffer(this.D), this.F && this.F.close(), this.m && this.m.close();
|
|
3352
|
+
}
|
|
3353
|
+
};
|
|
3354
|
+
var _u = class extends vu {
|
|
3355
|
+
C() {
|
|
3356
|
+
return "\n precision mediump float;\n uniform sampler2D backgroundTexture;\n uniform sampler2D maskTexture;\n uniform sampler2D colorMappingTexture;\n varying vec2 vTex;\n void main() {\n vec4 backgroundColor = texture2D(backgroundTexture, vTex);\n float category = texture2D(maskTexture, vTex).r;\n vec4 categoryColor = texture2D(colorMappingTexture, vec2(category, 0.0));\n gl_FragColor = mix(backgroundColor, categoryColor, categoryColor.a);\n }\n ";
|
|
3357
|
+
}
|
|
3358
|
+
J() {
|
|
3359
|
+
var t2 = this.h;
|
|
3360
|
+
t2.activeTexture(t2.TEXTURE1), this.v = pu(this, t2, t2.LINEAR), t2.activeTexture(t2.TEXTURE2), this.u = pu(this, t2, t2.NEAREST);
|
|
3361
|
+
}
|
|
3362
|
+
o() {
|
|
3363
|
+
super.o();
|
|
3364
|
+
var t2 = this.h;
|
|
3365
|
+
this.P = hu(t2.getUniformLocation(this.i, "backgroundTexture"), "Uniform location"), this.Z = hu(t2.getUniformLocation(this.i, "colorMappingTexture"), "Uniform location"), this.M = hu(t2.getUniformLocation(this.i, "maskTexture"), "Uniform location");
|
|
3366
|
+
}
|
|
3367
|
+
l() {
|
|
3368
|
+
super.l();
|
|
3369
|
+
var t2 = this.h;
|
|
3370
|
+
t2.uniform1i(this.M, 0), t2.uniform1i(this.P, 1), t2.uniform1i(this.Z, 2);
|
|
3371
|
+
}
|
|
3372
|
+
close() {
|
|
3373
|
+
this.v && this.h.deleteTexture(this.v), this.u && this.h.deleteTexture(this.u), super.close();
|
|
3374
|
+
}
|
|
3375
|
+
};
|
|
3376
|
+
var yu = class extends vu {
|
|
3377
|
+
C() {
|
|
3378
|
+
return "\n precision mediump float;\n uniform sampler2D maskTexture;\n uniform sampler2D defaultTexture;\n uniform sampler2D overlayTexture;\n varying vec2 vTex;\n void main() {\n float confidence = texture2D(maskTexture, vTex).r;\n vec4 defaultColor = texture2D(defaultTexture, vTex);\n vec4 overlayColor = texture2D(overlayTexture, vTex);\n // Apply the alpha from the overlay and merge in the default color\n overlayColor = mix(defaultColor, overlayColor, overlayColor.a);\n gl_FragColor = mix(defaultColor, overlayColor, confidence);\n }\n ";
|
|
3379
|
+
}
|
|
3380
|
+
J() {
|
|
3381
|
+
var t2 = this.h;
|
|
3382
|
+
t2.activeTexture(t2.TEXTURE1), this.u = pu(this, t2), t2.activeTexture(t2.TEXTURE2), this.v = pu(this, t2);
|
|
3383
|
+
}
|
|
3384
|
+
o() {
|
|
3385
|
+
super.o();
|
|
3386
|
+
var t2 = this.h;
|
|
3387
|
+
this.M = hu(t2.getUniformLocation(this.i, "defaultTexture"), "Uniform location"), this.P = hu(t2.getUniformLocation(this.i, "overlayTexture"), "Uniform location"), this.K = hu(t2.getUniformLocation(this.i, "maskTexture"), "Uniform location");
|
|
3388
|
+
}
|
|
3389
|
+
l() {
|
|
3390
|
+
super.l();
|
|
3391
|
+
var t2 = this.h;
|
|
3392
|
+
t2.uniform1i(this.K, 0), t2.uniform1i(this.M, 1), t2.uniform1i(this.P, 2);
|
|
3393
|
+
}
|
|
3394
|
+
close() {
|
|
3395
|
+
this.u && this.h.deleteTexture(this.u), this.v && this.h.deleteTexture(this.v), super.close();
|
|
3396
|
+
}
|
|
3397
|
+
};
|
|
3398
|
+
function Eu(t2, e2) {
|
|
3399
|
+
switch (e2) {
|
|
3400
|
+
case 0:
|
|
3401
|
+
return t2.h.find((t3) => t3 instanceof Uint8Array);
|
|
3402
|
+
case 1:
|
|
3403
|
+
return t2.h.find((t3) => t3 instanceof Float32Array);
|
|
3404
|
+
case 2:
|
|
3405
|
+
return t2.h.find((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture);
|
|
3406
|
+
default:
|
|
3407
|
+
throw Error(`Type is not supported: ${e2}`);
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
function Au(t2) {
|
|
3411
|
+
var e2 = Eu(t2, 1);
|
|
3412
|
+
if (!e2) {
|
|
3413
|
+
if (e2 = Eu(t2, 0)) e2 = new Float32Array(e2).map((t3) => t3 / 255);
|
|
3414
|
+
else {
|
|
3415
|
+
e2 = new Float32Array(t2.width * t2.height);
|
|
3416
|
+
let n2 = Tu(t2);
|
|
3417
|
+
var r2 = ku(t2);
|
|
3418
|
+
if (mu(r2, n2, wu(t2)), "iPad Simulator;iPhone Simulator;iPod Simulator;iPad;iPhone;iPod".split(";").includes(navigator.platform) || navigator.userAgent.includes("Mac") && "document" in self && "ontouchend" in self.document) {
|
|
3419
|
+
r2 = new Float32Array(t2.width * t2.height * 4), n2.readPixels(0, 0, t2.width, t2.height, n2.RGBA, n2.FLOAT, r2);
|
|
3420
|
+
for (let t3 = 0, n3 = 0; t3 < e2.length; ++t3, n3 += 4) e2[t3] = r2[n3];
|
|
3421
|
+
} else n2.readPixels(0, 0, t2.width, t2.height, n2.RED, n2.FLOAT, e2);
|
|
3422
|
+
}
|
|
3423
|
+
t2.h.push(e2);
|
|
3424
|
+
}
|
|
3425
|
+
return e2;
|
|
3426
|
+
}
|
|
3427
|
+
function wu(t2) {
|
|
3428
|
+
var e2 = Eu(t2, 2);
|
|
3429
|
+
if (!e2) {
|
|
3430
|
+
let r2 = Tu(t2);
|
|
3431
|
+
e2 = Su(t2);
|
|
3432
|
+
let n2 = Au(t2), i2 = bu(t2);
|
|
3433
|
+
r2.texImage2D(r2.TEXTURE_2D, 0, i2, t2.width, t2.height, 0, r2.RED, r2.FLOAT, n2), Lu(t2);
|
|
3434
|
+
}
|
|
3435
|
+
return e2;
|
|
3436
|
+
}
|
|
3437
|
+
function Tu(t2) {
|
|
3438
|
+
if (!t2.canvas) throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");
|
|
3439
|
+
return t2.i || (t2.i = hu(t2.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), t2.i;
|
|
3440
|
+
}
|
|
3441
|
+
function bu(t2) {
|
|
3442
|
+
if (t2 = Tu(t2), !xu) if (t2.getExtension("EXT_color_buffer_float") && t2.getExtension("OES_texture_float_linear") && t2.getExtension("EXT_float_blend")) xu = t2.R32F;
|
|
3443
|
+
else {
|
|
3444
|
+
if (!t2.getExtension("EXT_color_buffer_half_float")) throw Error("GPU does not fully support 4-channel float32 or float16 formats");
|
|
3445
|
+
xu = t2.R16F;
|
|
3446
|
+
}
|
|
3447
|
+
return xu;
|
|
3448
|
+
}
|
|
3449
|
+
function ku(t2) {
|
|
3450
|
+
return t2.l || (t2.l = new vu()), t2.l;
|
|
3451
|
+
}
|
|
3452
|
+
function Su(t2) {
|
|
3453
|
+
var e2 = Tu(t2);
|
|
3454
|
+
e2.viewport(0, 0, t2.width, t2.height), e2.activeTexture(e2.TEXTURE0);
|
|
3455
|
+
var r2 = Eu(t2, 2);
|
|
3456
|
+
return r2 || (r2 = pu(ku(t2), e2, t2.o ? e2.LINEAR : e2.NEAREST), t2.h.push(r2), t2.u = true), e2.bindTexture(e2.TEXTURE_2D, r2), r2;
|
|
3457
|
+
}
|
|
3458
|
+
function Lu(t2) {
|
|
3459
|
+
t2.i.bindTexture(t2.i.TEXTURE_2D, null);
|
|
3460
|
+
}
|
|
3461
|
+
var xu;
|
|
3462
|
+
var Ru = class {
|
|
3463
|
+
constructor(t2, e2, r2, n2, i2, s2, o2) {
|
|
3464
|
+
this.h = t2, this.o = e2, this.u = r2, this.canvas = n2, this.l = i2, this.width = s2, this.height = o2, this.u && (0 === --Iu && console.error("You seem to be creating MPMask instances without invoking .close(). This leaks resources."));
|
|
3465
|
+
}
|
|
3466
|
+
Va() {
|
|
3467
|
+
return !!Eu(this, 0);
|
|
3468
|
+
}
|
|
3469
|
+
va() {
|
|
3470
|
+
return !!Eu(this, 1);
|
|
3471
|
+
}
|
|
3472
|
+
X() {
|
|
3473
|
+
return !!Eu(this, 2);
|
|
3474
|
+
}
|
|
3475
|
+
ua() {
|
|
3476
|
+
return (e2 = Eu(t2 = this, 0)) || (e2 = Au(t2), e2 = new Uint8Array(e2.map((t3) => Math.round(255 * t3))), t2.h.push(e2)), e2;
|
|
3477
|
+
var t2, e2;
|
|
3478
|
+
}
|
|
3479
|
+
ta() {
|
|
3480
|
+
return Au(this);
|
|
3481
|
+
}
|
|
3482
|
+
T() {
|
|
3483
|
+
return wu(this);
|
|
3484
|
+
}
|
|
3485
|
+
clone() {
|
|
3486
|
+
var t2 = [];
|
|
3487
|
+
for (let e2 of this.h) {
|
|
3488
|
+
let r2;
|
|
3489
|
+
if (e2 instanceof Uint8Array) r2 = new Uint8Array(e2);
|
|
3490
|
+
else if (e2 instanceof Float32Array) r2 = new Float32Array(e2);
|
|
3491
|
+
else {
|
|
3492
|
+
if (!(e2 instanceof WebGLTexture)) throw Error(`Type is not supported: ${e2}`);
|
|
3493
|
+
{
|
|
3494
|
+
let t3 = Tu(this), e3 = ku(this);
|
|
3495
|
+
t3.activeTexture(t3.TEXTURE1), r2 = pu(e3, t3, this.o ? t3.LINEAR : t3.NEAREST), t3.bindTexture(t3.TEXTURE_2D, r2);
|
|
3496
|
+
let n2 = bu(this);
|
|
3497
|
+
t3.texImage2D(t3.TEXTURE_2D, 0, n2, this.width, this.height, 0, t3.RED, t3.FLOAT, null), t3.bindTexture(t3.TEXTURE_2D, null), mu(e3, t3, r2), fu(e3, t3, false, () => {
|
|
3498
|
+
Su(this), t3.clearColor(0, 0, 0, 0), t3.clear(t3.COLOR_BUFFER_BIT), t3.drawArrays(t3.TRIANGLE_FAN, 0, 4), Lu(this);
|
|
3499
|
+
}), gu(e3), Lu(this);
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
t2.push(r2);
|
|
3503
|
+
}
|
|
3504
|
+
return new Ru(t2, this.o, this.X(), this.canvas, this.l, this.width, this.height);
|
|
3505
|
+
}
|
|
3506
|
+
close() {
|
|
3507
|
+
this.u && Tu(this).deleteTexture(Eu(this, 2)), Iu = -1;
|
|
3508
|
+
}
|
|
3509
|
+
};
|
|
3510
|
+
Ru.prototype.close = Ru.prototype.close, Ru.prototype.clone = Ru.prototype.clone, Ru.prototype.getAsWebGLTexture = Ru.prototype.T, Ru.prototype.getAsFloat32Array = Ru.prototype.ta, Ru.prototype.getAsUint8Array = Ru.prototype.ua, Ru.prototype.hasWebGLTexture = Ru.prototype.X, Ru.prototype.hasFloat32Array = Ru.prototype.va, Ru.prototype.hasUint8Array = Ru.prototype.Va;
|
|
3511
|
+
var Iu = 250;
|
|
3512
|
+
var Fu = { color: "white", lineWidth: 4, radius: 6 };
|
|
3513
|
+
function Cu(t2) {
|
|
3514
|
+
return { ...Fu, fillColor: (t2 = t2 || {}).color, ...t2 };
|
|
3515
|
+
}
|
|
3516
|
+
function Nu(t2, e2) {
|
|
3517
|
+
return t2 instanceof Function ? t2(e2) : t2;
|
|
3518
|
+
}
|
|
3519
|
+
function Mu(t2, e2, r2) {
|
|
3520
|
+
return Math.max(Math.min(e2, r2), Math.min(Math.max(e2, r2), t2));
|
|
3521
|
+
}
|
|
3522
|
+
function Ou(t2) {
|
|
3523
|
+
if (!t2.l) throw Error("CPU rendering requested but CanvasRenderingContext2D not provided.");
|
|
3524
|
+
return t2.l;
|
|
3525
|
+
}
|
|
3526
|
+
function Du(t2) {
|
|
3527
|
+
if (!t2.u) throw Error("GPU rendering requested but WebGL2RenderingContext not provided.");
|
|
3528
|
+
return t2.u;
|
|
3529
|
+
}
|
|
3530
|
+
function Pu(t2, e2, r2) {
|
|
3531
|
+
if (e2.X()) r2(e2.T());
|
|
3532
|
+
else {
|
|
3533
|
+
let n2 = e2.va() ? e2.ta() : e2.ua();
|
|
3534
|
+
t2.o = t2.o ?? new vu();
|
|
3535
|
+
let i2 = Du(t2);
|
|
3536
|
+
r2((t2 = new Ru([n2], e2.o, false, i2.canvas, t2.o, e2.width, e2.height)).T()), t2.close();
|
|
3537
|
+
}
|
|
3538
|
+
}
|
|
3539
|
+
function $u(t2, e2, r2, n2) {
|
|
3540
|
+
var i2 = (function(t3) {
|
|
3541
|
+
return t3.h || (t3.h = new _u()), t3.h;
|
|
3542
|
+
})(t2), s2 = Du(t2), o2 = Array.isArray(r2) ? new ImageData(new Uint8ClampedArray(r2), 1, 1) : r2;
|
|
3543
|
+
fu(i2, s2, true, () => {
|
|
3544
|
+
!(function(t4, e3, r3, n3) {
|
|
3545
|
+
var i3 = t4.h;
|
|
3546
|
+
if (i3.activeTexture(i3.TEXTURE0), i3.bindTexture(i3.TEXTURE_2D, e3), i3.activeTexture(i3.TEXTURE1), i3.bindTexture(i3.TEXTURE_2D, t4.v), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, i3.RGBA, i3.UNSIGNED_BYTE, r3), t4.K && (function(t5, e4) {
|
|
3547
|
+
if (t5 !== e4) return false;
|
|
3548
|
+
t5 = t5.entries(), e4 = e4.entries();
|
|
3549
|
+
for (let [r4, n4] of t5) {
|
|
3550
|
+
t5 = r4;
|
|
3551
|
+
let i4 = n4, s3 = e4.next();
|
|
3552
|
+
if (s3.done) return false;
|
|
3553
|
+
let [o3, a2] = s3.value;
|
|
3554
|
+
if (t5 !== o3 || i4[0] !== a2[0] || i4[1] !== a2[1] || i4[2] !== a2[2] || i4[3] !== a2[3]) return false;
|
|
3555
|
+
}
|
|
3556
|
+
return !!e4.next().done;
|
|
3557
|
+
})(t4.K, n3)) i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.u);
|
|
3558
|
+
else {
|
|
3559
|
+
t4.K = n3;
|
|
3560
|
+
let e4 = Array(1024).fill(0);
|
|
3561
|
+
n3.forEach((t5, r4) => {
|
|
3562
|
+
if (4 !== t5.length) throw Error(`Color at index ${r4} is not a four-channel value.`);
|
|
3563
|
+
e4[4 * r4] = t5[0], e4[4 * r4 + 1] = t5[1], e4[4 * r4 + 2] = t5[2], e4[4 * r4 + 3] = t5[3];
|
|
3564
|
+
}), i3.activeTexture(i3.TEXTURE2), i3.bindTexture(i3.TEXTURE_2D, t4.u), i3.texImage2D(i3.TEXTURE_2D, 0, i3.RGBA, 256, 1, 0, i3.RGBA, i3.UNSIGNED_BYTE, new Uint8Array(e4));
|
|
3565
|
+
}
|
|
3566
|
+
})(i2, e2, o2, n2), s2.clearColor(0, 0, 0, 0), s2.clear(s2.COLOR_BUFFER_BIT), s2.drawArrays(s2.TRIANGLE_FAN, 0, 4);
|
|
3567
|
+
var t3 = i2.h;
|
|
3568
|
+
t3.activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, null);
|
|
3569
|
+
});
|
|
3570
|
+
}
|
|
3571
|
+
function Uu(t2, e2, r2, n2) {
|
|
3572
|
+
var i2 = Du(t2), s2 = (function(t3) {
|
|
3573
|
+
return t3.i || (t3.i = new yu()), t3.i;
|
|
3574
|
+
})(t2), o2 = Array.isArray(r2) ? new ImageData(new Uint8ClampedArray(r2), 1, 1) : r2, a2 = Array.isArray(n2) ? new ImageData(new Uint8ClampedArray(n2), 1, 1) : n2;
|
|
3575
|
+
fu(s2, i2, true, () => {
|
|
3576
|
+
var t3 = s2.h;
|
|
3577
|
+
t3.activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, e2), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, s2.u), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, t3.RGBA, t3.UNSIGNED_BYTE, o2), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, s2.v), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, t3.RGBA, t3.UNSIGNED_BYTE, a2), i2.clearColor(0, 0, 0, 0), i2.clear(i2.COLOR_BUFFER_BIT), i2.drawArrays(i2.TRIANGLE_FAN, 0, 4), i2.bindTexture(i2.TEXTURE_2D, null), (t3 = s2.h).activeTexture(t3.TEXTURE0), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE1), t3.bindTexture(t3.TEXTURE_2D, null), t3.activeTexture(t3.TEXTURE2), t3.bindTexture(t3.TEXTURE_2D, null);
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3580
|
+
var Bu = class {
|
|
3581
|
+
constructor(t2, e2) {
|
|
3582
|
+
"undefined" != typeof CanvasRenderingContext2D && t2 instanceof CanvasRenderingContext2D || t2 instanceof OffscreenCanvasRenderingContext2D ? (this.l = t2, this.u = e2) : this.u = t2;
|
|
3583
|
+
}
|
|
3584
|
+
Na(t2, e2) {
|
|
3585
|
+
if (t2) {
|
|
3586
|
+
var r2 = Ou(this);
|
|
3587
|
+
e2 = Cu(e2), r2.save();
|
|
3588
|
+
var n2 = r2.canvas, i2 = 0;
|
|
3589
|
+
for (let s2 of t2) r2.fillStyle = Nu(e2.fillColor, { index: i2, from: s2 }), r2.strokeStyle = Nu(e2.color, { index: i2, from: s2 }), r2.lineWidth = Nu(e2.lineWidth, { index: i2, from: s2 }), (t2 = new Path2D()).arc(s2.x * n2.width, s2.y * n2.height, Nu(e2.radius, { index: i2, from: s2 }), 0, 2 * Math.PI), r2.fill(t2), r2.stroke(t2), ++i2;
|
|
3590
|
+
r2.restore();
|
|
3591
|
+
}
|
|
3592
|
+
}
|
|
3593
|
+
Ma(t2, e2, r2) {
|
|
3594
|
+
if (t2 && e2) {
|
|
3595
|
+
var n2 = Ou(this);
|
|
3596
|
+
r2 = Cu(r2), n2.save();
|
|
3597
|
+
var i2 = n2.canvas, s2 = 0;
|
|
3598
|
+
for (let o2 of e2) {
|
|
3599
|
+
n2.beginPath(), e2 = t2[o2.start];
|
|
3600
|
+
let a2 = t2[o2.end];
|
|
3601
|
+
e2 && a2 && (n2.strokeStyle = Nu(r2.color, { index: s2, from: e2, to: a2 }), n2.lineWidth = Nu(r2.lineWidth, { index: s2, from: e2, to: a2 }), n2.moveTo(e2.x * i2.width, e2.y * i2.height), n2.lineTo(a2.x * i2.width, a2.y * i2.height)), ++s2, n2.stroke();
|
|
3602
|
+
}
|
|
3603
|
+
n2.restore();
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
Ja(t2, e2) {
|
|
3607
|
+
var r2 = Ou(this);
|
|
3608
|
+
e2 = Cu(e2), r2.save(), r2.beginPath(), r2.lineWidth = Nu(e2.lineWidth, {}), r2.strokeStyle = Nu(e2.color, {}), r2.fillStyle = Nu(e2.fillColor, {}), r2.moveTo(t2.originX, t2.originY), r2.lineTo(t2.originX + t2.width, t2.originY), r2.lineTo(t2.originX + t2.width, t2.originY + t2.height), r2.lineTo(t2.originX, t2.originY + t2.height), r2.lineTo(t2.originX, t2.originY), r2.stroke(), r2.fill(), r2.restore();
|
|
3609
|
+
}
|
|
3610
|
+
Ka(t2, e2, r2 = [0, 0, 0, 255]) {
|
|
3611
|
+
this.l ? (function(t3, e3, r3, n2) {
|
|
3612
|
+
var i2 = Du(t3);
|
|
3613
|
+
Pu(t3, e3, (e4) => {
|
|
3614
|
+
$u(t3, e4, r3, n2), (e4 = Ou(t3)).drawImage(i2.canvas, 0, 0, e4.canvas.width, e4.canvas.height);
|
|
3615
|
+
});
|
|
3616
|
+
})(this, t2, r2, e2) : $u(this, t2.T(), r2, e2);
|
|
3617
|
+
}
|
|
3618
|
+
La(t2, e2, r2) {
|
|
3619
|
+
this.l ? (function(t3, e3, r3, n2) {
|
|
3620
|
+
var i2 = Du(t3);
|
|
3621
|
+
Pu(t3, e3, (e4) => {
|
|
3622
|
+
Uu(t3, e4, r3, n2), (e4 = Ou(t3)).drawImage(i2.canvas, 0, 0, e4.canvas.width, e4.canvas.height);
|
|
3623
|
+
});
|
|
3624
|
+
})(this, t2, e2, r2) : Uu(this, t2.T(), e2, r2);
|
|
3625
|
+
}
|
|
3626
|
+
close() {
|
|
3627
|
+
this.h?.close(), this.h = void 0, this.i?.close(), this.i = void 0, this.o?.close(), this.o = void 0;
|
|
3628
|
+
}
|
|
3629
|
+
};
|
|
3630
|
+
function ju(t2, e2) {
|
|
3631
|
+
switch (e2) {
|
|
3632
|
+
case 0:
|
|
3633
|
+
return t2.h.find((t3) => t3 instanceof ImageData);
|
|
3634
|
+
case 1:
|
|
3635
|
+
return t2.h.find((t3) => "undefined" != typeof ImageBitmap && t3 instanceof ImageBitmap);
|
|
3636
|
+
case 2:
|
|
3637
|
+
return t2.h.find((t3) => "undefined" != typeof WebGLTexture && t3 instanceof WebGLTexture);
|
|
3638
|
+
default:
|
|
3639
|
+
throw Error(`Type is not supported: ${e2}`);
|
|
3640
|
+
}
|
|
3641
|
+
}
|
|
3642
|
+
function Gu(t2) {
|
|
3643
|
+
var e2 = ju(t2, 0);
|
|
3644
|
+
if (!e2) {
|
|
3645
|
+
e2 = Hu(t2);
|
|
3646
|
+
let r2 = Ku(t2), n2 = new Uint8Array(t2.width * t2.height * 4);
|
|
3647
|
+
mu(r2, e2, Vu(t2)), e2.readPixels(0, 0, t2.width, t2.height, e2.RGBA, e2.UNSIGNED_BYTE, n2), gu(r2), e2 = new ImageData(new Uint8ClampedArray(n2.buffer), t2.width, t2.height), t2.h.push(e2);
|
|
3648
|
+
}
|
|
3649
|
+
return e2;
|
|
3650
|
+
}
|
|
3651
|
+
function Vu(t2) {
|
|
3652
|
+
var e2 = ju(t2, 2);
|
|
3653
|
+
if (!e2) {
|
|
3654
|
+
let r2 = Hu(t2);
|
|
3655
|
+
e2 = Xu(t2);
|
|
3656
|
+
let n2 = ju(t2, 1) || Gu(t2);
|
|
3657
|
+
r2.texImage2D(r2.TEXTURE_2D, 0, r2.RGBA, r2.RGBA, r2.UNSIGNED_BYTE, n2), Wu(t2);
|
|
3658
|
+
}
|
|
3659
|
+
return e2;
|
|
3660
|
+
}
|
|
3661
|
+
function Hu(t2) {
|
|
3662
|
+
if (!t2.canvas) throw Error("Conversion to different image formats require that a canvas is passed when initializing the image.");
|
|
3663
|
+
return t2.i || (t2.i = hu(t2.canvas.getContext("webgl2"), "You cannot use a canvas that is already bound to a different type of rendering context.")), t2.i;
|
|
3664
|
+
}
|
|
3665
|
+
function Ku(t2) {
|
|
3666
|
+
return t2.l || (t2.l = new vu()), t2.l;
|
|
3667
|
+
}
|
|
3668
|
+
function Xu(t2) {
|
|
3669
|
+
var e2 = Hu(t2);
|
|
3670
|
+
e2.viewport(0, 0, t2.width, t2.height), e2.activeTexture(e2.TEXTURE0);
|
|
3671
|
+
var r2 = ju(t2, 2);
|
|
3672
|
+
return r2 || (r2 = pu(Ku(t2), e2), t2.h.push(r2), t2.o = true), e2.bindTexture(e2.TEXTURE_2D, r2), r2;
|
|
3673
|
+
}
|
|
3674
|
+
function Wu(t2) {
|
|
3675
|
+
t2.i.bindTexture(t2.i.TEXTURE_2D, null);
|
|
3676
|
+
}
|
|
3677
|
+
function zu(t2) {
|
|
3678
|
+
var e2 = Hu(t2);
|
|
3679
|
+
return fu(Ku(t2), e2, true, () => (function(t3, e3) {
|
|
3680
|
+
var r2 = t3.canvas;
|
|
3681
|
+
if (r2.width === t3.width && r2.height === t3.height) return e3();
|
|
3682
|
+
var n2 = r2.width, i2 = r2.height;
|
|
3683
|
+
return r2.width = t3.width, r2.height = t3.height, t3 = e3(), r2.width = n2, r2.height = i2, t3;
|
|
3684
|
+
})(t2, () => {
|
|
3685
|
+
if (e2.bindFramebuffer(e2.FRAMEBUFFER, null), e2.clearColor(0, 0, 0, 0), e2.clear(e2.COLOR_BUFFER_BIT), e2.drawArrays(e2.TRIANGLE_FAN, 0, 4), !(t2.canvas instanceof OffscreenCanvas)) throw Error("Conversion to ImageBitmap requires that the MediaPipe Tasks is initialized with an OffscreenCanvas");
|
|
3686
|
+
return t2.canvas.transferToImageBitmap();
|
|
3687
|
+
}));
|
|
3688
|
+
}
|
|
3689
|
+
Bu.prototype.close = Bu.prototype.close, Bu.prototype.drawConfidenceMask = Bu.prototype.La, Bu.prototype.drawCategoryMask = Bu.prototype.Ka, Bu.prototype.drawBoundingBox = Bu.prototype.Ja, Bu.prototype.drawConnectors = Bu.prototype.Ma, Bu.prototype.drawLandmarks = Bu.prototype.Na, Bu.lerp = function(t2, e2, r2, n2, i2) {
|
|
3690
|
+
return Mu(n2 * (1 - (t2 - e2) / (r2 - e2)) + i2 * (1 - (r2 - t2) / (r2 - e2)), n2, i2);
|
|
3691
|
+
}, Bu.clamp = Mu;
|
|
3692
|
+
var Yu = class {
|
|
3693
|
+
constructor(t2, e2, r2, n2, i2, s2, o2) {
|
|
3694
|
+
this.h = t2, this.u = e2, this.o = r2, this.canvas = n2, this.l = i2, this.width = s2, this.height = o2, (this.u || this.o) && (0 === --qu && console.error("You seem to be creating MPImage instances without invoking .close(). This leaks resources."));
|
|
3695
|
+
}
|
|
3696
|
+
Ua() {
|
|
3697
|
+
return !!ju(this, 0);
|
|
3698
|
+
}
|
|
3699
|
+
wa() {
|
|
3700
|
+
return !!ju(this, 1);
|
|
3701
|
+
}
|
|
3702
|
+
X() {
|
|
3703
|
+
return !!ju(this, 2);
|
|
3704
|
+
}
|
|
3705
|
+
Ra() {
|
|
3706
|
+
return Gu(this);
|
|
3707
|
+
}
|
|
3708
|
+
Qa() {
|
|
3709
|
+
var t2 = ju(this, 1);
|
|
3710
|
+
return t2 || (Vu(this), Xu(this), t2 = zu(this), Wu(this), this.h.push(t2), this.u = true), t2;
|
|
3711
|
+
}
|
|
3712
|
+
T() {
|
|
3713
|
+
return Vu(this);
|
|
3714
|
+
}
|
|
3715
|
+
clone() {
|
|
3716
|
+
var t2 = [];
|
|
3717
|
+
for (let e2 of this.h) {
|
|
3718
|
+
let r2;
|
|
3719
|
+
if (e2 instanceof ImageData) r2 = new ImageData(e2.data, this.width, this.height);
|
|
3720
|
+
else if (e2 instanceof WebGLTexture) {
|
|
3721
|
+
let t3 = Hu(this), e3 = Ku(this);
|
|
3722
|
+
t3.activeTexture(t3.TEXTURE1), r2 = pu(e3, t3), t3.bindTexture(t3.TEXTURE_2D, r2), t3.texImage2D(t3.TEXTURE_2D, 0, t3.RGBA, this.width, this.height, 0, t3.RGBA, t3.UNSIGNED_BYTE, null), t3.bindTexture(t3.TEXTURE_2D, null), mu(e3, t3, r2), fu(e3, t3, false, () => {
|
|
3723
|
+
Xu(this), t3.clearColor(0, 0, 0, 0), t3.clear(t3.COLOR_BUFFER_BIT), t3.drawArrays(t3.TRIANGLE_FAN, 0, 4), Wu(this);
|
|
3724
|
+
}), gu(e3), Wu(this);
|
|
3725
|
+
} else {
|
|
3726
|
+
if (!(e2 instanceof ImageBitmap)) throw Error(`Type is not supported: ${e2}`);
|
|
3727
|
+
Vu(this), Xu(this), r2 = zu(this), Wu(this);
|
|
3728
|
+
}
|
|
3729
|
+
t2.push(r2);
|
|
3730
|
+
}
|
|
3731
|
+
return new Yu(t2, this.wa(), this.X(), this.canvas, this.l, this.width, this.height);
|
|
3732
|
+
}
|
|
3733
|
+
close() {
|
|
3734
|
+
this.u && ju(this, 1).close(), this.o && Hu(this).deleteTexture(ju(this, 2)), qu = -1;
|
|
3735
|
+
}
|
|
3736
|
+
};
|
|
3737
|
+
Yu.prototype.close = Yu.prototype.close, Yu.prototype.clone = Yu.prototype.clone, Yu.prototype.getAsWebGLTexture = Yu.prototype.T, Yu.prototype.getAsImageBitmap = Yu.prototype.Qa, Yu.prototype.getAsImageData = Yu.prototype.Ra, Yu.prototype.hasWebGLTexture = Yu.prototype.X, Yu.prototype.hasImageBitmap = Yu.prototype.wa, Yu.prototype.hasImageData = Yu.prototype.Ua;
|
|
3738
|
+
var qu = 250;
|
|
3739
|
+
function Ju(...t2) {
|
|
3740
|
+
return t2.map(([t3, e2]) => ({ start: t3, end: e2 }));
|
|
3741
|
+
}
|
|
3742
|
+
var Zu;
|
|
3743
|
+
var Qu = Yh((Zu = zh(Wh), class extends Zu {
|
|
3744
|
+
get pa() {
|
|
3745
|
+
return this.j;
|
|
3746
|
+
}
|
|
3747
|
+
Ea(t2, e2, r2) {
|
|
3748
|
+
Gh(this, e2, (e3) => {
|
|
3749
|
+
var [n2, i2] = Vh(this, t2, e3);
|
|
3750
|
+
this.pa._addBoundTextureAsImageToStream(e3, n2, i2, r2);
|
|
3751
|
+
});
|
|
3752
|
+
}
|
|
3753
|
+
ha(t2, e2) {
|
|
3754
|
+
Kh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3755
|
+
this.pa._attachImageListener(t3);
|
|
3756
|
+
});
|
|
3757
|
+
}
|
|
3758
|
+
ia(t2, e2) {
|
|
3759
|
+
Xh(this, t2, e2), Gh(this, t2, (t3) => {
|
|
3760
|
+
this.pa._attachImageVectorListener(t3);
|
|
3761
|
+
});
|
|
3762
|
+
}
|
|
3763
|
+
}));
|
|
3764
|
+
var tc = class extends Qu {
|
|
3765
|
+
};
|
|
3766
|
+
async function ec(t2, e2, r2) {
|
|
3767
|
+
return Qh(t2, r2.canvas ?? (Uh() ? void 0 : document.createElement("canvas")), e2, r2);
|
|
3768
|
+
}
|
|
3769
|
+
function rc(t2, e2, r2, n2) {
|
|
3770
|
+
if (t2.o && void 0 !== n2) {
|
|
3771
|
+
var i2 = kr(t2.baseOptions, Wo, 3);
|
|
3772
|
+
i2?.h() || i2?.l()?.h() ? (++(i2 = t2.o).h.U, i2.i.set(n2, performance.now())) : (++(i2 = t2.o).h.R, i2.i.set(n2, performance.now()));
|
|
3773
|
+
}
|
|
3774
|
+
if (t2.ra) {
|
|
3775
|
+
if (i2 = new Oo(), r2?.regionOfInterest) {
|
|
3776
|
+
if (!t2.Da) throw Error("This task doesn't support region-of-interest.");
|
|
3777
|
+
var s2 = r2.regionOfInterest;
|
|
3778
|
+
if (s2.left >= s2.right || s2.top >= s2.bottom) throw Error("Expected RectF with left < right and top < bottom.");
|
|
3779
|
+
if (s2.left < 0 || s2.top < 0 || s2.right > 1 || s2.bottom > 1) throw Error("Expected RectF values to be in [0,1].");
|
|
3780
|
+
jr(i2, 1, (s2.left + s2.right) / 2), jr(i2, 2, (s2.top + s2.bottom) / 2), jr(i2, 4, s2.right - s2.left), jr(i2, 3, s2.bottom - s2.top);
|
|
3781
|
+
} else jr(i2, 1, 0.5), jr(i2, 2, 0.5), jr(i2, 4, 1), jr(i2, 3, 1);
|
|
3782
|
+
if (r2?.rotationDegrees) {
|
|
3783
|
+
if (r2?.rotationDegrees % 90 != 0) throw Error("Expected rotation to be a multiple of 90\xB0.");
|
|
3784
|
+
if (jr(i2, 5, -Math.PI * r2.rotationDegrees / 180), r2?.rotationDegrees % 180 != 0) {
|
|
3785
|
+
let [t3, n3] = jh(e2);
|
|
3786
|
+
r2 = Or(i2, 3) * n3 / t3, s2 = Or(i2, 4) * t3 / n3, jr(i2, 4, r2), jr(i2, 3, s2);
|
|
3787
|
+
}
|
|
3788
|
+
}
|
|
3789
|
+
t2.h.addProtoToStream(i2.h(), "mediapipe.NormalizedRect", t2.ra, n2);
|
|
3790
|
+
}
|
|
3791
|
+
t2.h.Ea(e2, t2.Ca, n2 ?? performance.now()), t2.finishProcessing(n2);
|
|
3792
|
+
}
|
|
3793
|
+
function nc(t2, e2, r2) {
|
|
3794
|
+
if (t2.K) throw Error("Task is not initialized with image mode. 'runningMode' must be set to 'IMAGE'.");
|
|
3795
|
+
rc(t2, e2, r2, t2.J + 1);
|
|
3796
|
+
}
|
|
3797
|
+
function ic(t2, e2, r2, n2) {
|
|
3798
|
+
if (!t2.K) throw Error("Task is not initialized with video mode. 'runningMode' must be set to 'VIDEO'.");
|
|
3799
|
+
rc(t2, e2, r2, n2);
|
|
3800
|
+
}
|
|
3801
|
+
function sc(t2, e2, r2, n2) {
|
|
3802
|
+
var i2 = e2.data, s2 = e2.width, o2 = s2 * (e2 = e2.height);
|
|
3803
|
+
if ((i2 instanceof Uint8Array || i2 instanceof Float32Array) && i2.length !== o2) throw Error("Unsupported channel count: " + i2.length / o2);
|
|
3804
|
+
return t2 = new Ru([i2], r2, false, t2.h.j.canvas, t2.ea, s2, e2), n2 ? t2.clone() : t2;
|
|
3805
|
+
}
|
|
3806
|
+
var oc = class extends au {
|
|
3807
|
+
constructor(t2, e2, r2, n2) {
|
|
3808
|
+
super(t2), this.h = t2, this.Ca = e2, this.ra = r2, this.Da = n2, this.ea = new vu(), this.K = false;
|
|
3809
|
+
}
|
|
3810
|
+
l(t2, e2 = true, r2 = false, n2 = false) {
|
|
3811
|
+
if ("runningMode" in t2) {
|
|
3812
|
+
var i2 = this.K = !!t2.runningMode && "IMAGE" !== t2.runningMode;
|
|
3813
|
+
ar(this.baseOptions, 2, null == i2 ? i2 : Zt(i2));
|
|
3814
|
+
}
|
|
3815
|
+
if (void 0 !== t2.canvas && this.h.j.canvas !== t2.canvas) throw Error("You must create a new task to reset the canvas.");
|
|
3816
|
+
return super.l(t2, e2, r2, n2);
|
|
3817
|
+
}
|
|
3818
|
+
close() {
|
|
3819
|
+
this.ea.close(), super.close();
|
|
3820
|
+
}
|
|
3821
|
+
};
|
|
3822
|
+
oc.prototype.close = oc.prototype.close;
|
|
3823
|
+
var ac = class extends oc {
|
|
3824
|
+
constructor(t2, e2) {
|
|
3825
|
+
super(new tc(t2, e2), "image_in", "norm_rect_in", false), this.m = { detections: [] }, Rr(t2 = this.i = new ta(), 0, 1, e2 = new qo()), jr(this.i, 2, 0.5), jr(this.i, 3, 0.3);
|
|
3826
|
+
}
|
|
3827
|
+
D() {
|
|
3828
|
+
return "FaceDetector";
|
|
3829
|
+
}
|
|
3830
|
+
get baseOptions() {
|
|
3831
|
+
return kr(this.i, qo, 1);
|
|
3832
|
+
}
|
|
3833
|
+
set baseOptions(t2) {
|
|
3834
|
+
Rr(this.i, 0, 1, t2);
|
|
3835
|
+
}
|
|
3836
|
+
A(t2) {
|
|
3837
|
+
return "minDetectionConfidence" in t2 && jr(this.i, 2, t2.minDetectionConfidence ?? 0.5), "minSuppressionThreshold" in t2 && jr(this.i, 3, t2.minSuppressionThreshold ?? 0.3), this.l(t2);
|
|
3838
|
+
}
|
|
3839
|
+
H(t2, e2) {
|
|
3840
|
+
return this.m = { detections: [] }, nc(this, t2, e2), this.m;
|
|
3841
|
+
}
|
|
3842
|
+
I(t2, e2, r2) {
|
|
3843
|
+
return this.m = { detections: [] }, ic(this, t2, r2, e2), this.m;
|
|
3844
|
+
}
|
|
3845
|
+
u() {
|
|
3846
|
+
var t2 = new _o();
|
|
3847
|
+
go(t2, "image_in"), go(t2, "norm_rect_in"), vo(t2, "detections");
|
|
3848
|
+
var e2 = new so();
|
|
3849
|
+
ci(e2, ra, this.i);
|
|
3850
|
+
var r2 = new co();
|
|
3851
|
+
Vr(r2, 2, "mediapipe.tasks.vision.face_detector.FaceDetectorGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect_in"), uo(r2, "DETECTIONS:detections"), r2.A(e2), mo(t2, r2), this.h.attachProtoVectorListener("detections", (t3, e3) => {
|
|
3852
|
+
for (let e4 of t3) t3 = xo(e4), this.m.detections.push(th(t3));
|
|
3853
|
+
nu(this, e3);
|
|
3854
|
+
}), this.h.attachEmptyPacketListener("detections", (t3) => {
|
|
3855
|
+
nu(this, t3);
|
|
3856
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
3857
|
+
}
|
|
3858
|
+
};
|
|
3859
|
+
ac.prototype.detectForVideo = ac.prototype.I, ac.prototype.detect = ac.prototype.H, ac.prototype.setOptions = ac.prototype.A, ac.createFromModelPath = async function(t2, e2) {
|
|
3860
|
+
return ec(ac, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3861
|
+
}, ac.createFromModelBuffer = function(t2, e2) {
|
|
3862
|
+
return ec(ac, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3863
|
+
}, ac.createFromOptions = function(t2, e2) {
|
|
3864
|
+
return ec(ac, t2, e2);
|
|
3865
|
+
};
|
|
3866
|
+
var hc = Ju([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]);
|
|
3867
|
+
var uc = Ju([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]);
|
|
3868
|
+
var cc = Ju([276, 283], [283, 282], [282, 295], [295, 285], [300, 293], [293, 334], [334, 296], [296, 336]);
|
|
3869
|
+
var lc = Ju([474, 475], [475, 476], [476, 477], [477, 474]);
|
|
3870
|
+
var dc = Ju([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]);
|
|
3871
|
+
var fc = Ju([46, 53], [53, 52], [52, 65], [65, 55], [70, 63], [63, 105], [105, 66], [66, 107]);
|
|
3872
|
+
var pc = Ju([469, 470], [470, 471], [471, 472], [472, 469]);
|
|
3873
|
+
var mc = Ju([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]);
|
|
3874
|
+
var gc = [...hc, ...uc, ...cc, ...dc, ...fc, ...mc];
|
|
3875
|
+
var vc = Ju([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]);
|
|
3876
|
+
function _c(t2) {
|
|
3877
|
+
t2.m = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] };
|
|
3878
|
+
}
|
|
3879
|
+
var yc = class extends oc {
|
|
3880
|
+
constructor(t2, e2) {
|
|
3881
|
+
super(new tc(t2, e2), "image_in", "norm_rect", false), this.m = { faceLandmarks: [], faceBlendshapes: [], facialTransformationMatrixes: [] }, this.outputFacialTransformationMatrixes = this.outputFaceBlendshapes = false, Rr(t2 = this.i = new sa(), 0, 1, e2 = new qo()), this.C = new ia(), Rr(this.i, 0, 3, this.C), this.v = new ta(), Rr(this.i, 0, 2, this.v), $r(this.v, 4, 1), jr(this.v, 2, 0.5), jr(this.C, 2, 0.5), jr(this.i, 4, 0.5);
|
|
3882
|
+
}
|
|
3883
|
+
D() {
|
|
3884
|
+
return "FaceLandmarker";
|
|
3885
|
+
}
|
|
3886
|
+
get baseOptions() {
|
|
3887
|
+
return kr(this.i, qo, 1);
|
|
3888
|
+
}
|
|
3889
|
+
set baseOptions(t2) {
|
|
3890
|
+
Rr(this.i, 0, 1, t2);
|
|
3891
|
+
}
|
|
3892
|
+
A(t2) {
|
|
3893
|
+
return "numFaces" in t2 && $r(this.v, 4, t2.numFaces ?? 1), "minFaceDetectionConfidence" in t2 && jr(this.v, 2, t2.minFaceDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && jr(this.i, 4, t2.minTrackingConfidence ?? 0.5), "minFacePresenceConfidence" in t2 && jr(this.C, 2, t2.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in t2 && (this.outputFaceBlendshapes = !!t2.outputFaceBlendshapes), "outputFacialTransformationMatrixes" in t2 && (this.outputFacialTransformationMatrixes = !!t2.outputFacialTransformationMatrixes), this.l(t2);
|
|
3894
|
+
}
|
|
3895
|
+
H(t2, e2) {
|
|
3896
|
+
return _c(this), nc(this, t2, e2), this.m;
|
|
3897
|
+
}
|
|
3898
|
+
I(t2, e2, r2) {
|
|
3899
|
+
return _c(this), ic(this, t2, r2, e2), this.m;
|
|
3900
|
+
}
|
|
3901
|
+
u() {
|
|
3902
|
+
var t2 = new _o();
|
|
3903
|
+
go(t2, "image_in"), go(t2, "norm_rect"), vo(t2, "face_landmarks");
|
|
3904
|
+
var e2 = new so();
|
|
3905
|
+
ci(e2, aa, this.i);
|
|
3906
|
+
var r2 = new co();
|
|
3907
|
+
Vr(r2, 2, "mediapipe.tasks.vision.face_landmarker.FaceLandmarkerGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "NORM_LANDMARKS:face_landmarks"), r2.A(e2), mo(t2, r2), this.h.attachProtoVectorListener("face_landmarks", (t3, e3) => {
|
|
3908
|
+
for (let e4 of t3) t3 = Co(e4), this.m.faceLandmarks.push(eh(t3));
|
|
3909
|
+
nu(this, e3);
|
|
3910
|
+
}), this.h.attachEmptyPacketListener("face_landmarks", (t3) => {
|
|
3911
|
+
nu(this, t3);
|
|
3912
|
+
}), this.outputFaceBlendshapes && (vo(t2, "blendshapes"), uo(r2, "BLENDSHAPES:blendshapes"), this.h.attachProtoVectorListener("blendshapes", (t3, e3) => {
|
|
3913
|
+
if (this.outputFaceBlendshapes) for (let e4 of t3) t3 = bo(e4), this.m.faceBlendshapes.push(Za(t3.h() ?? []));
|
|
3914
|
+
nu(this, e3);
|
|
3915
|
+
}), this.h.attachEmptyPacketListener("blendshapes", (t3) => {
|
|
3916
|
+
nu(this, t3);
|
|
3917
|
+
})), this.outputFacialTransformationMatrixes && (vo(t2, "face_geometry"), uo(r2, "FACE_GEOMETRY:face_geometry"), this.h.attachProtoVectorListener("face_geometry", (t3, e3) => {
|
|
3918
|
+
if (this.outputFacialTransformationMatrixes) for (let e4 of t3) (t3 = kr(t3 = na(e4), No, 2)) && this.m.facialTransformationMatrixes.push({ rows: Mr(t3, 1) ?? 0 ?? 0, columns: Mr(t3, 2) ?? 0 ?? 0, data: lr(t3, 3, Jt).slice() ?? [] });
|
|
3919
|
+
nu(this, e3);
|
|
3920
|
+
}), this.h.attachEmptyPacketListener("face_geometry", (t3) => {
|
|
3921
|
+
nu(this, t3);
|
|
3922
|
+
})), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
3923
|
+
}
|
|
3924
|
+
};
|
|
3925
|
+
yc.prototype.detectForVideo = yc.prototype.I, yc.prototype.detect = yc.prototype.H, yc.prototype.setOptions = yc.prototype.A, yc.createFromModelPath = function(t2, e2) {
|
|
3926
|
+
return ec(yc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
3927
|
+
}, yc.createFromModelBuffer = function(t2, e2) {
|
|
3928
|
+
return ec(yc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
3929
|
+
}, yc.createFromOptions = function(t2, e2) {
|
|
3930
|
+
return ec(yc, t2, e2);
|
|
3931
|
+
}, yc.FACE_LANDMARKS_LIPS = hc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LIPS", yc.FACE_LANDMARKS_LIPS), yc.FACE_LANDMARKS_LEFT_EYE = uc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYE", yc.FACE_LANDMARKS_LEFT_EYE), yc.FACE_LANDMARKS_LEFT_EYEBROW = cc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_EYEBROW", yc.FACE_LANDMARKS_LEFT_EYEBROW), yc.FACE_LANDMARKS_LEFT_IRIS = lc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_LEFT_IRIS", yc.FACE_LANDMARKS_LEFT_IRIS), yc.FACE_LANDMARKS_RIGHT_EYE = dc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYE", yc.FACE_LANDMARKS_RIGHT_EYE), yc.FACE_LANDMARKS_RIGHT_EYEBROW = fc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW", yc.FACE_LANDMARKS_RIGHT_EYEBROW), yc.FACE_LANDMARKS_RIGHT_IRIS = pc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_RIGHT_IRIS", yc.FACE_LANDMARKS_RIGHT_IRIS), yc.FACE_LANDMARKS_FACE_OVAL = mc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_FACE_OVAL", yc.FACE_LANDMARKS_FACE_OVAL), yc.FACE_LANDMARKS_CONTOURS = gc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_CONTOURS", yc.FACE_LANDMARKS_CONTOURS), yc.FACE_LANDMARKS_TESSELATION = vc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$face_landmarker$face_landmarker.FaceLandmarker.FACE_LANDMARKS_TESSELATION", yc.FACE_LANDMARKS_TESSELATION);
|
|
3932
|
+
var Ec = Ju([0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], [7, 8], [5, 9], [9, 10], [10, 11], [11, 12], [9, 13], [13, 14], [14, 15], [15, 16], [13, 17], [0, 17], [17, 18], [18, 19], [19, 20]);
|
|
3933
|
+
function Ac(t2) {
|
|
3934
|
+
t2.gestures = [], t2.landmarks = [], t2.worldLandmarks = [], t2.handedness = [];
|
|
3935
|
+
}
|
|
3936
|
+
function wc(t2) {
|
|
3937
|
+
return 0 === t2.gestures.length ? { gestures: [], landmarks: [], worldLandmarks: [], handedness: [], handednesses: [] } : { gestures: t2.gestures, landmarks: t2.landmarks, worldLandmarks: t2.worldLandmarks, handedness: t2.handedness, handednesses: t2.handedness };
|
|
3938
|
+
}
|
|
3939
|
+
function Tc(t2, e2 = true) {
|
|
3940
|
+
var r2 = [];
|
|
3941
|
+
for (let i2 of t2) {
|
|
3942
|
+
var n2 = bo(i2);
|
|
3943
|
+
t2 = [];
|
|
3944
|
+
for (let r3 of n2.h()) n2 = e2 && null != Mr(r3, 1) ? Mr(r3, 1) ?? 0 : -1, t2.push({ score: Or(r3, 2) ?? 0, index: n2, categoryName: _e(sr(r3, 3)) ?? "" ?? "", displayName: _e(sr(r3, 4)) ?? "" ?? "" });
|
|
3945
|
+
r2.push(t2);
|
|
3946
|
+
}
|
|
3947
|
+
return r2;
|
|
3948
|
+
}
|
|
3949
|
+
var bc = class extends oc {
|
|
3950
|
+
constructor(t2, e2) {
|
|
3951
|
+
super(new tc(t2, e2), "image_in", "norm_rect", false), this.gestures = [], this.landmarks = [], this.worldLandmarks = [], this.handedness = [], Rr(t2 = this.m = new pa(), 0, 1, e2 = new qo()), this.v = new fa(), Rr(this.m, 0, 2, this.v), this.G = new da(), Rr(this.v, 0, 3, this.G), this.C = new la(), Rr(this.v, 0, 2, this.C), this.i = new ca(), Rr(this.m, 0, 3, this.i), jr(this.C, 2, 0.5), jr(this.v, 4, 0.5), jr(this.G, 2, 0.5);
|
|
3952
|
+
}
|
|
3953
|
+
D() {
|
|
3954
|
+
return "GestureRecognizer";
|
|
3955
|
+
}
|
|
3956
|
+
get baseOptions() {
|
|
3957
|
+
return kr(this.m, qo, 1);
|
|
3958
|
+
}
|
|
3959
|
+
set baseOptions(t2) {
|
|
3960
|
+
Rr(this.m, 0, 1, t2);
|
|
3961
|
+
}
|
|
3962
|
+
A(t2) {
|
|
3963
|
+
if ($r(this.C, 3, t2.numHands ?? 1), "minHandDetectionConfidence" in t2 && jr(this.C, 2, t2.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && jr(this.v, 4, t2.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in t2 && jr(this.G, 2, t2.minHandPresenceConfidence ?? 0.5), t2.cannedGesturesClassifierOptions) {
|
|
3964
|
+
var e2 = new ha(), r2 = e2, n2 = qa(t2.cannedGesturesClassifierOptions, kr(this.i, ha, 3)?.l());
|
|
3965
|
+
Rr(r2, 0, 2, n2), Rr(this.i, 0, 3, e2);
|
|
3966
|
+
} else void 0 === t2.cannedGesturesClassifierOptions && kr(this.i, ha, 3)?.h();
|
|
3967
|
+
return t2.customGesturesClassifierOptions ? (Rr(r2 = e2 = new ha(), 0, 2, n2 = qa(t2.customGesturesClassifierOptions, kr(this.i, ha, 4)?.l())), Rr(this.i, 0, 4, e2)) : void 0 === t2.customGesturesClassifierOptions && kr(this.i, ha, 4)?.h(), this.l(t2);
|
|
3968
|
+
}
|
|
3969
|
+
Ya(t2, e2) {
|
|
3970
|
+
return Ac(this), nc(this, t2, e2), wc(this);
|
|
3971
|
+
}
|
|
3972
|
+
Za(t2, e2, r2) {
|
|
3973
|
+
return Ac(this), ic(this, t2, r2, e2), wc(this);
|
|
3974
|
+
}
|
|
3975
|
+
u() {
|
|
3976
|
+
var t2 = new _o();
|
|
3977
|
+
go(t2, "image_in"), go(t2, "norm_rect"), vo(t2, "hand_gestures"), vo(t2, "hand_landmarks"), vo(t2, "world_hand_landmarks"), vo(t2, "handedness");
|
|
3978
|
+
var e2 = new so();
|
|
3979
|
+
ci(e2, ya, this.m);
|
|
3980
|
+
var r2 = new co();
|
|
3981
|
+
Vr(r2, 2, "mediapipe.tasks.vision.gesture_recognizer.GestureRecognizerGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "HAND_GESTURES:hand_gestures"), uo(r2, "LANDMARKS:hand_landmarks"), uo(r2, "WORLD_LANDMARKS:world_hand_landmarks"), uo(r2, "HANDEDNESS:handedness"), r2.A(e2), mo(t2, r2), this.h.attachProtoVectorListener("hand_landmarks", (t3, e3) => {
|
|
3982
|
+
for (let e4 of t3) t3 = Co(e4), this.landmarks.push(eh(t3));
|
|
3983
|
+
nu(this, e3);
|
|
3984
|
+
}), this.h.attachEmptyPacketListener("hand_landmarks", (t3) => {
|
|
3985
|
+
nu(this, t3);
|
|
3986
|
+
}), this.h.attachProtoVectorListener("world_hand_landmarks", (t3, e3) => {
|
|
3987
|
+
for (let e4 of t3) t3 = Io(e4), this.worldLandmarks.push(rh(t3));
|
|
3988
|
+
nu(this, e3);
|
|
3989
|
+
}), this.h.attachEmptyPacketListener("world_hand_landmarks", (t3) => {
|
|
3990
|
+
nu(this, t3);
|
|
3991
|
+
}), this.h.attachProtoVectorListener("hand_gestures", (t3, e3) => {
|
|
3992
|
+
this.gestures.push(...Tc(t3, false)), nu(this, e3);
|
|
3993
|
+
}), this.h.attachEmptyPacketListener("hand_gestures", (t3) => {
|
|
3994
|
+
nu(this, t3);
|
|
3995
|
+
}), this.h.attachProtoVectorListener("handedness", (t3, e3) => {
|
|
3996
|
+
this.handedness.push(...Tc(t3)), nu(this, e3);
|
|
3997
|
+
}), this.h.attachEmptyPacketListener("handedness", (t3) => {
|
|
3998
|
+
nu(this, t3);
|
|
3999
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4000
|
+
}
|
|
4001
|
+
};
|
|
4002
|
+
function kc(t2) {
|
|
4003
|
+
return { landmarks: t2.landmarks, worldLandmarks: t2.worldLandmarks, handednesses: t2.handedness, handedness: t2.handedness };
|
|
4004
|
+
}
|
|
4005
|
+
bc.prototype.recognizeForVideo = bc.prototype.Za, bc.prototype.recognize = bc.prototype.Ya, bc.prototype.setOptions = bc.prototype.A, bc.createFromModelPath = function(t2, e2) {
|
|
4006
|
+
return ec(bc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4007
|
+
}, bc.createFromModelBuffer = function(t2, e2) {
|
|
4008
|
+
return ec(bc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4009
|
+
}, bc.createFromOptions = function(t2, e2) {
|
|
4010
|
+
return ec(bc, t2, e2);
|
|
4011
|
+
}, bc.HAND_CONNECTIONS = Ec, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$gesture_recognizer$gesture_recognizer.GestureRecognizer.HAND_CONNECTIONS", bc.HAND_CONNECTIONS);
|
|
4012
|
+
var Sc = class extends oc {
|
|
4013
|
+
constructor(t2, e2) {
|
|
4014
|
+
super(new tc(t2, e2), "image_in", "norm_rect", false), this.landmarks = [], this.worldLandmarks = [], this.handedness = [], Rr(t2 = this.i = new fa(), 0, 1, e2 = new qo()), this.v = new da(), Rr(this.i, 0, 3, this.v), this.m = new la(), Rr(this.i, 0, 2, this.m), $r(this.m, 3, 1), jr(this.m, 2, 0.5), jr(this.v, 2, 0.5), jr(this.i, 4, 0.5);
|
|
4015
|
+
}
|
|
4016
|
+
D() {
|
|
4017
|
+
return "HandLandmarker";
|
|
4018
|
+
}
|
|
4019
|
+
get baseOptions() {
|
|
4020
|
+
return kr(this.i, qo, 1);
|
|
4021
|
+
}
|
|
4022
|
+
set baseOptions(t2) {
|
|
4023
|
+
Rr(this.i, 0, 1, t2);
|
|
4024
|
+
}
|
|
4025
|
+
A(t2) {
|
|
4026
|
+
return "numHands" in t2 && $r(this.m, 3, t2.numHands ?? 1), "minHandDetectionConfidence" in t2 && jr(this.m, 2, t2.minHandDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && jr(this.i, 4, t2.minTrackingConfidence ?? 0.5), "minHandPresenceConfidence" in t2 && jr(this.v, 2, t2.minHandPresenceConfidence ?? 0.5), this.l(t2);
|
|
4027
|
+
}
|
|
4028
|
+
H(t2, e2) {
|
|
4029
|
+
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], nc(this, t2, e2), kc(this);
|
|
4030
|
+
}
|
|
4031
|
+
I(t2, e2, r2) {
|
|
4032
|
+
return this.landmarks = [], this.worldLandmarks = [], this.handedness = [], ic(this, t2, r2, e2), kc(this);
|
|
4033
|
+
}
|
|
4034
|
+
u() {
|
|
4035
|
+
var t2 = new _o();
|
|
4036
|
+
go(t2, "image_in"), go(t2, "norm_rect"), vo(t2, "hand_landmarks"), vo(t2, "world_hand_landmarks"), vo(t2, "handedness");
|
|
4037
|
+
var e2 = new so();
|
|
4038
|
+
ci(e2, Ea, this.i);
|
|
4039
|
+
var r2 = new co();
|
|
4040
|
+
Vr(r2, 2, "mediapipe.tasks.vision.hand_landmarker.HandLandmarkerGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "LANDMARKS:hand_landmarks"), uo(r2, "WORLD_LANDMARKS:world_hand_landmarks"), uo(r2, "HANDEDNESS:handedness"), r2.A(e2), mo(t2, r2), this.h.attachProtoVectorListener("hand_landmarks", (t3, e3) => {
|
|
4041
|
+
for (let e4 of t3) t3 = Co(e4), this.landmarks.push(eh(t3));
|
|
4042
|
+
nu(this, e3);
|
|
4043
|
+
}), this.h.attachEmptyPacketListener("hand_landmarks", (t3) => {
|
|
4044
|
+
nu(this, t3);
|
|
4045
|
+
}), this.h.attachProtoVectorListener("world_hand_landmarks", (t3, e3) => {
|
|
4046
|
+
for (let e4 of t3) t3 = Io(e4), this.worldLandmarks.push(rh(t3));
|
|
4047
|
+
nu(this, e3);
|
|
4048
|
+
}), this.h.attachEmptyPacketListener("world_hand_landmarks", (t3) => {
|
|
4049
|
+
nu(this, t3);
|
|
4050
|
+
}), this.h.attachProtoVectorListener("handedness", (t3, e3) => {
|
|
4051
|
+
var r3 = this.handedness, n2 = r3.push, i2 = [];
|
|
4052
|
+
for (let e4 of t3) {
|
|
4053
|
+
t3 = bo(e4);
|
|
4054
|
+
let r4 = [];
|
|
4055
|
+
for (let e5 of t3.h()) r4.push({ score: Or(e5, 2) ?? 0, index: Mr(e5, 1) ?? 0 ?? -1, categoryName: _e(sr(e5, 3)) ?? "" ?? "", displayName: _e(sr(e5, 4)) ?? "" ?? "" });
|
|
4056
|
+
i2.push(r4);
|
|
4057
|
+
}
|
|
4058
|
+
n2.call(r3, ...i2), nu(this, e3);
|
|
4059
|
+
}), this.h.attachEmptyPacketListener("handedness", (t3) => {
|
|
4060
|
+
nu(this, t3);
|
|
4061
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4062
|
+
}
|
|
4063
|
+
};
|
|
4064
|
+
Sc.prototype.detectForVideo = Sc.prototype.I, Sc.prototype.detect = Sc.prototype.H, Sc.prototype.setOptions = Sc.prototype.A, Sc.createFromModelPath = function(t2, e2) {
|
|
4065
|
+
return ec(Sc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4066
|
+
}, Sc.createFromModelBuffer = function(t2, e2) {
|
|
4067
|
+
return ec(Sc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4068
|
+
}, Sc.createFromOptions = function(t2, e2) {
|
|
4069
|
+
return ec(Sc, t2, e2);
|
|
4070
|
+
}, Sc.HAND_CONNECTIONS = Ec, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$hand_landmarker$hand_landmarker.HandLandmarker.HAND_CONNECTIONS", Sc.HAND_CONNECTIONS);
|
|
4071
|
+
var Lc = Ju([0, 1], [1, 2], [2, 3], [3, 7], [0, 4], [4, 5], [5, 6], [6, 8], [9, 10], [11, 12], [11, 13], [13, 15], [15, 17], [15, 19], [15, 21], [17, 19], [12, 14], [14, 16], [16, 18], [16, 20], [16, 22], [18, 20], [11, 23], [12, 24], [23, 24], [23, 25], [24, 26], [25, 27], [26, 28], [27, 29], [28, 30], [29, 31], [30, 32], [27, 31], [28, 32]);
|
|
4072
|
+
function xc(t2) {
|
|
4073
|
+
t2.i = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] };
|
|
4074
|
+
}
|
|
4075
|
+
function Rc(t2) {
|
|
4076
|
+
try {
|
|
4077
|
+
if (!t2.G) return t2.i;
|
|
4078
|
+
t2.G(t2.i);
|
|
4079
|
+
} finally {
|
|
4080
|
+
ou(t2);
|
|
4081
|
+
}
|
|
4082
|
+
}
|
|
4083
|
+
function Ic(t2, e2) {
|
|
4084
|
+
t2 = Co(t2), e2.push(eh(t2));
|
|
4085
|
+
}
|
|
4086
|
+
var Fc = class extends oc {
|
|
4087
|
+
constructor(t2, e2) {
|
|
4088
|
+
super(new tc(t2, e2), "input_frames_image", null, false), this.i = { faceLandmarks: [], faceBlendshapes: [], poseLandmarks: [], poseWorldLandmarks: [], poseSegmentationMasks: [], leftHandLandmarks: [], leftHandWorldLandmarks: [], rightHandLandmarks: [], rightHandWorldLandmarks: [] }, this.outputPoseSegmentationMasks = this.outputFaceBlendshapes = false, Rr(t2 = this.m = new ba(), 0, 1, e2 = new qo()), this.Z = new da(), Rr(this.m, 0, 2, this.Z), this.Ba = new Aa(), Rr(this.m, 0, 3, this.Ba), this.v = new ta(), Rr(this.m, 0, 4, this.v), this.P = new ia(), Rr(this.m, 0, 5, this.P), this.C = new wa(), Rr(this.m, 0, 6, this.C), this.aa = new Ta(), Rr(this.m, 0, 7, this.aa), jr(this.v, 2, 0.5), jr(this.v, 3, 0.3), jr(this.P, 2, 0.5), jr(this.C, 2, 0.5), jr(this.C, 3, 0.3), jr(this.aa, 2, 0.5), jr(this.Z, 2, 0.5);
|
|
4089
|
+
}
|
|
4090
|
+
D() {
|
|
4091
|
+
return "HolisticLandmarker";
|
|
4092
|
+
}
|
|
4093
|
+
get baseOptions() {
|
|
4094
|
+
return kr(this.m, qo, 1);
|
|
4095
|
+
}
|
|
4096
|
+
set baseOptions(t2) {
|
|
4097
|
+
Rr(this.m, 0, 1, t2);
|
|
4098
|
+
}
|
|
4099
|
+
A(t2) {
|
|
4100
|
+
return "minFaceDetectionConfidence" in t2 && jr(this.v, 2, t2.minFaceDetectionConfidence ?? 0.5), "minFaceSuppressionThreshold" in t2 && jr(this.v, 3, t2.minFaceSuppressionThreshold ?? 0.3), "minFacePresenceConfidence" in t2 && jr(this.P, 2, t2.minFacePresenceConfidence ?? 0.5), "outputFaceBlendshapes" in t2 && (this.outputFaceBlendshapes = !!t2.outputFaceBlendshapes), "minPoseDetectionConfidence" in t2 && jr(this.C, 2, t2.minPoseDetectionConfidence ?? 0.5), "minPoseSuppressionThreshold" in t2 && jr(this.C, 3, t2.minPoseSuppressionThreshold ?? 0.3), "minPosePresenceConfidence" in t2 && jr(this.aa, 2, t2.minPosePresenceConfidence ?? 0.5), "outputPoseSegmentationMasks" in t2 && (this.outputPoseSegmentationMasks = !!t2.outputPoseSegmentationMasks), "minHandLandmarksConfidence" in t2 && jr(this.Z, 2, t2.minHandLandmarksConfidence ?? 0.5), this.l(t2);
|
|
4101
|
+
}
|
|
4102
|
+
H(t2, e2, r2) {
|
|
4103
|
+
var n2 = "function" != typeof e2 ? e2 : {};
|
|
4104
|
+
return this.G = "function" == typeof e2 ? e2 : r2, xc(this), nc(this, t2, n2), Rc(this);
|
|
4105
|
+
}
|
|
4106
|
+
I(t2, e2, r2, n2) {
|
|
4107
|
+
var i2 = "function" != typeof r2 ? r2 : {};
|
|
4108
|
+
return this.G = "function" == typeof r2 ? r2 : n2, xc(this), ic(this, t2, i2, e2), Rc(this);
|
|
4109
|
+
}
|
|
4110
|
+
u() {
|
|
4111
|
+
var t2 = new _o();
|
|
4112
|
+
go(t2, "input_frames_image"), vo(t2, "pose_landmarks"), vo(t2, "pose_world_landmarks"), vo(t2, "face_landmarks"), vo(t2, "left_hand_landmarks"), vo(t2, "left_hand_world_landmarks"), vo(t2, "right_hand_landmarks"), vo(t2, "right_hand_world_landmarks");
|
|
4113
|
+
var e2 = new so(), r2 = new Us();
|
|
4114
|
+
Vr(r2, 1, "type.googleapis.com/mediapipe.tasks.vision.holistic_landmarker.proto.HolisticLandmarkerGraphOptions"), (function(t3, e3) {
|
|
4115
|
+
if (null != e3) if (Array.isArray(e3)) ar(t3, 2, je(e3, 0, Ve));
|
|
4116
|
+
else {
|
|
4117
|
+
if (!("string" == typeof e3 || e3 instanceof N || x(e3))) throw Error("invalid value in Any.value field: " + e3 + " expected a ByteString, a base64 encoded string, a Uint8Array or a jspb array");
|
|
4118
|
+
_r(t3, 2, lt(e3, false), I());
|
|
4119
|
+
}
|
|
4120
|
+
})(r2, this.m.h());
|
|
4121
|
+
var n2 = new co();
|
|
4122
|
+
Vr(n2, 2, "mediapipe.tasks.vision.holistic_landmarker.HolisticLandmarkerGraph"), Nr(n2, 8, Us, r2), ho(n2, "IMAGE:input_frames_image"), uo(n2, "POSE_LANDMARKS:pose_landmarks"), uo(n2, "POSE_WORLD_LANDMARKS:pose_world_landmarks"), uo(n2, "FACE_LANDMARKS:face_landmarks"), uo(n2, "LEFT_HAND_LANDMARKS:left_hand_landmarks"), uo(n2, "LEFT_HAND_WORLD_LANDMARKS:left_hand_world_landmarks"), uo(n2, "RIGHT_HAND_LANDMARKS:right_hand_landmarks"), uo(n2, "RIGHT_HAND_WORLD_LANDMARKS:right_hand_world_landmarks"), n2.A(e2), mo(t2, n2), iu(this, t2), this.h.attachProtoListener("pose_landmarks", (t3, e3) => {
|
|
4123
|
+
Ic(t3, this.i.poseLandmarks), nu(this, e3);
|
|
4124
|
+
}), this.h.attachEmptyPacketListener("pose_landmarks", (t3) => {
|
|
4125
|
+
nu(this, t3);
|
|
4126
|
+
}), this.h.attachProtoListener("pose_world_landmarks", (t3, e3) => {
|
|
4127
|
+
var r3 = this.i.poseWorldLandmarks;
|
|
4128
|
+
t3 = Io(t3), r3.push(rh(t3)), nu(this, e3);
|
|
4129
|
+
}), this.h.attachEmptyPacketListener("pose_world_landmarks", (t3) => {
|
|
4130
|
+
nu(this, t3);
|
|
4131
|
+
}), this.outputPoseSegmentationMasks && (uo(n2, "POSE_SEGMENTATION_MASK:pose_segmentation_mask"), su(this, "pose_segmentation_mask"), this.h.ha("pose_segmentation_mask", (t3, e3) => {
|
|
4132
|
+
this.i.poseSegmentationMasks = [sc(this, t3, true, !this.G)], nu(this, e3);
|
|
4133
|
+
}), this.h.attachEmptyPacketListener("pose_segmentation_mask", (t3) => {
|
|
4134
|
+
this.i.poseSegmentationMasks = [], nu(this, t3);
|
|
4135
|
+
})), this.h.attachProtoListener("face_landmarks", (t3, e3) => {
|
|
4136
|
+
Ic(t3, this.i.faceLandmarks), nu(this, e3);
|
|
4137
|
+
}), this.h.attachEmptyPacketListener("face_landmarks", (t3) => {
|
|
4138
|
+
nu(this, t3);
|
|
4139
|
+
}), this.outputFaceBlendshapes && (vo(t2, "extra_blendshapes"), uo(n2, "FACE_BLENDSHAPES:extra_blendshapes"), this.h.attachProtoListener("extra_blendshapes", (t3, e3) => {
|
|
4140
|
+
var r3 = this.i.faceBlendshapes;
|
|
4141
|
+
this.outputFaceBlendshapes && (t3 = bo(t3), r3.push(Za(t3.h() ?? []))), nu(this, e3);
|
|
4142
|
+
}), this.h.attachEmptyPacketListener("extra_blendshapes", (t3) => {
|
|
4143
|
+
nu(this, t3);
|
|
4144
|
+
})), this.h.attachProtoListener("left_hand_landmarks", (t3, e3) => {
|
|
4145
|
+
Ic(t3, this.i.leftHandLandmarks), nu(this, e3);
|
|
4146
|
+
}), this.h.attachEmptyPacketListener("left_hand_landmarks", (t3) => {
|
|
4147
|
+
nu(this, t3);
|
|
4148
|
+
}), this.h.attachProtoListener("left_hand_world_landmarks", (t3, e3) => {
|
|
4149
|
+
var r3 = this.i.leftHandWorldLandmarks;
|
|
4150
|
+
t3 = Io(t3), r3.push(rh(t3)), nu(this, e3);
|
|
4151
|
+
}), this.h.attachEmptyPacketListener("left_hand_world_landmarks", (t3) => {
|
|
4152
|
+
nu(this, t3);
|
|
4153
|
+
}), this.h.attachProtoListener("right_hand_landmarks", (t3, e3) => {
|
|
4154
|
+
Ic(t3, this.i.rightHandLandmarks), nu(this, e3);
|
|
4155
|
+
}), this.h.attachEmptyPacketListener("right_hand_landmarks", (t3) => {
|
|
4156
|
+
nu(this, t3);
|
|
4157
|
+
}), this.h.attachProtoListener("right_hand_world_landmarks", (t3, e3) => {
|
|
4158
|
+
var r3 = this.i.rightHandWorldLandmarks;
|
|
4159
|
+
t3 = Io(t3), r3.push(rh(t3)), nu(this, e3);
|
|
4160
|
+
}), this.h.attachEmptyPacketListener("right_hand_world_landmarks", (t3) => {
|
|
4161
|
+
nu(this, t3);
|
|
4162
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4163
|
+
}
|
|
4164
|
+
};
|
|
4165
|
+
Fc.prototype.detectForVideo = Fc.prototype.I, Fc.prototype.detect = Fc.prototype.H, Fc.prototype.setOptions = Fc.prototype.A, Fc.createFromModelPath = function(t2, e2) {
|
|
4166
|
+
return ec(Fc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4167
|
+
}, Fc.createFromModelBuffer = function(t2, e2) {
|
|
4168
|
+
return ec(Fc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4169
|
+
}, Fc.createFromOptions = function(t2, e2) {
|
|
4170
|
+
return ec(Fc, t2, e2);
|
|
4171
|
+
}, Fc.HAND_CONNECTIONS = Ec, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.HAND_CONNECTIONS", Fc.HAND_CONNECTIONS), Fc.POSE_CONNECTIONS = Lc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.POSE_CONNECTIONS", Fc.POSE_CONNECTIONS), Fc.FACE_LANDMARKS_LIPS = hc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LIPS", Fc.FACE_LANDMARKS_LIPS), Fc.FACE_LANDMARKS_LEFT_EYE = uc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYE", Fc.FACE_LANDMARKS_LEFT_EYE), Fc.FACE_LANDMARKS_LEFT_EYEBROW = cc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_EYEBROW", Fc.FACE_LANDMARKS_LEFT_EYEBROW), Fc.FACE_LANDMARKS_LEFT_IRIS = lc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_LEFT_IRIS", Fc.FACE_LANDMARKS_LEFT_IRIS), Fc.FACE_LANDMARKS_RIGHT_EYE = dc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYE", Fc.FACE_LANDMARKS_RIGHT_EYE), Fc.FACE_LANDMARKS_RIGHT_EYEBROW = fc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_EYEBROW", Fc.FACE_LANDMARKS_RIGHT_EYEBROW), Fc.FACE_LANDMARKS_RIGHT_IRIS = pc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_RIGHT_IRIS", Fc.FACE_LANDMARKS_RIGHT_IRIS), Fc.FACE_LANDMARKS_FACE_OVAL = mc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_FACE_OVAL", Fc.FACE_LANDMARKS_FACE_OVAL), Fc.FACE_LANDMARKS_CONTOURS = gc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_CONTOURS", Fc.FACE_LANDMARKS_CONTOURS), Fc.FACE_LANDMARKS_TESSELATION = vc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$holistic_landmarker$holistic_landmarker.HolisticLandmarker.FACE_LANDMARKS_TESSELATION", Fc.FACE_LANDMARKS_TESSELATION);
|
|
4172
|
+
var Cc = class extends oc {
|
|
4173
|
+
constructor(t2, e2) {
|
|
4174
|
+
super(new tc(t2, e2), "input_image", "norm_rect", true), this.m = { classifications: [] }, Rr(t2 = this.i = new La(), 0, 1, e2 = new qo());
|
|
4175
|
+
}
|
|
4176
|
+
D() {
|
|
4177
|
+
return "ImageClassifier";
|
|
4178
|
+
}
|
|
4179
|
+
get baseOptions() {
|
|
4180
|
+
return kr(this.i, qo, 1);
|
|
4181
|
+
}
|
|
4182
|
+
set baseOptions(t2) {
|
|
4183
|
+
Rr(this.i, 0, 1, t2);
|
|
4184
|
+
}
|
|
4185
|
+
A(t2) {
|
|
4186
|
+
return Rr(this.i, 0, 2, qa(t2, kr(this.i, Vo, 2))), this.l(t2);
|
|
4187
|
+
}
|
|
4188
|
+
Ha(t2, e2) {
|
|
4189
|
+
return this.m = { classifications: [] }, nc(this, t2, e2), this.m;
|
|
4190
|
+
}
|
|
4191
|
+
Ia(t2, e2, r2) {
|
|
4192
|
+
return this.m = { classifications: [] }, ic(this, t2, r2, e2), this.m;
|
|
4193
|
+
}
|
|
4194
|
+
u() {
|
|
4195
|
+
var t2 = new _o();
|
|
4196
|
+
go(t2, "input_image"), go(t2, "norm_rect"), vo(t2, "classifications");
|
|
4197
|
+
var e2 = new so();
|
|
4198
|
+
ci(e2, xa, this.i);
|
|
4199
|
+
var r2 = new co();
|
|
4200
|
+
Vr(r2, 2, "mediapipe.tasks.vision.image_classifier.ImageClassifierGraph"), ho(r2, "IMAGE:input_image"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "CLASSIFICATIONS:classifications"), r2.A(e2), mo(t2, r2), this.h.attachProtoListener("classifications", (t3, e3) => {
|
|
4201
|
+
this.m = Qa(Po(t3)), nu(this, e3);
|
|
4202
|
+
}), this.h.attachEmptyPacketListener("classifications", (t3) => {
|
|
4203
|
+
nu(this, t3);
|
|
4204
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4205
|
+
}
|
|
4206
|
+
};
|
|
4207
|
+
Cc.prototype.classifyForVideo = Cc.prototype.Ia, Cc.prototype.classify = Cc.prototype.Ha, Cc.prototype.setOptions = Cc.prototype.A, Cc.createFromModelPath = function(t2, e2) {
|
|
4208
|
+
return ec(Cc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4209
|
+
}, Cc.createFromModelBuffer = function(t2, e2) {
|
|
4210
|
+
return ec(Cc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4211
|
+
}, Cc.createFromOptions = function(t2, e2) {
|
|
4212
|
+
return ec(Cc, t2, e2);
|
|
4213
|
+
};
|
|
4214
|
+
var Nc = class extends oc {
|
|
4215
|
+
constructor(t2, e2) {
|
|
4216
|
+
super(new tc(t2, e2), "image_in", "norm_rect", true), this.i = new Ra(), this.embeddings = { embeddings: [] }, Rr(t2 = this.i, 0, 1, e2 = new qo());
|
|
4217
|
+
}
|
|
4218
|
+
D() {
|
|
4219
|
+
return "ImageEmbedder";
|
|
4220
|
+
}
|
|
4221
|
+
get baseOptions() {
|
|
4222
|
+
return kr(this.i, qo, 1);
|
|
4223
|
+
}
|
|
4224
|
+
set baseOptions(t2) {
|
|
4225
|
+
Rr(this.i, 0, 1, t2);
|
|
4226
|
+
}
|
|
4227
|
+
A(t2) {
|
|
4228
|
+
var e2 = this.i, r2 = kr(this.i, Ko, 2);
|
|
4229
|
+
if (r2 = r2 ? r2.clone() : new Ko(), void 0 !== t2.l2Normalize) {
|
|
4230
|
+
var n2 = t2.l2Normalize;
|
|
4231
|
+
ar(r2, 1, null == n2 ? n2 : Zt(n2));
|
|
4232
|
+
} else "l2Normalize" in t2 && ar(r2, 1);
|
|
4233
|
+
return void 0 !== t2.quantize ? ar(r2, 2, null == (n2 = t2.quantize) ? n2 : Zt(n2)) : "quantize" in t2 && ar(r2, 2), Rr(e2, 0, 2, r2), this.l(t2);
|
|
4234
|
+
}
|
|
4235
|
+
Oa(t2, e2) {
|
|
4236
|
+
return nc(this, t2, e2), this.embeddings;
|
|
4237
|
+
}
|
|
4238
|
+
Pa(t2, e2, r2) {
|
|
4239
|
+
return ic(this, t2, r2, e2), this.embeddings;
|
|
4240
|
+
}
|
|
4241
|
+
u() {
|
|
4242
|
+
var t2 = new _o();
|
|
4243
|
+
go(t2, "image_in"), go(t2, "norm_rect"), vo(t2, "embeddings_out");
|
|
4244
|
+
var e2 = new so();
|
|
4245
|
+
ci(e2, Ia, this.i);
|
|
4246
|
+
var r2 = new co();
|
|
4247
|
+
Vr(r2, 2, "mediapipe.tasks.vision.image_embedder.ImageEmbedderGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "EMBEDDINGS:embeddings_out"), r2.A(e2), mo(t2, r2), this.h.attachProtoListener("embeddings_out", (t3, e3) => {
|
|
4248
|
+
t3 = Go(t3), this.embeddings = (function(t4) {
|
|
4249
|
+
return { embeddings: Lr(t4, Bo, 1).map((t5) => {
|
|
4250
|
+
var e4 = { headIndex: Mr(t5, 3) ?? 0 ?? -1, headName: _e(sr(t5, 4)) ?? "" ?? "" };
|
|
4251
|
+
if (cr(t5, 1, jo)) t5 = lr(t5 = Dr(t5, $o, 1, jo), 1, Jt), e4.floatEmbedding = t5.slice();
|
|
4252
|
+
else {
|
|
4253
|
+
let r3 = new Uint8Array(0);
|
|
4254
|
+
e4.quantizedEmbedding = Dr(t5, Uo, 2, jo)?.h()?.i() ?? r3;
|
|
4255
|
+
}
|
|
4256
|
+
return e4;
|
|
4257
|
+
}), timestampMs: Ja(sr(t4, 2, void 0, fe) ?? nr) };
|
|
4258
|
+
})(t3), nu(this, e3);
|
|
4259
|
+
}), this.h.attachEmptyPacketListener("embeddings_out", (t3) => {
|
|
4260
|
+
nu(this, t3);
|
|
4261
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4262
|
+
}
|
|
4263
|
+
};
|
|
4264
|
+
Nc.cosineSimilarity = function(t2, e2) {
|
|
4265
|
+
if (t2.floatEmbedding && e2.floatEmbedding) t2 = ih(t2.floatEmbedding, e2.floatEmbedding);
|
|
4266
|
+
else {
|
|
4267
|
+
if (!t2.quantizedEmbedding || !e2.quantizedEmbedding) throw Error("Cannot compute cosine similarity between quantized and float embeddings.");
|
|
4268
|
+
t2 = ih(nh(t2.quantizedEmbedding), nh(e2.quantizedEmbedding));
|
|
4269
|
+
}
|
|
4270
|
+
return t2;
|
|
4271
|
+
}, Nc.prototype.embedForVideo = Nc.prototype.Pa, Nc.prototype.embed = Nc.prototype.Oa, Nc.prototype.setOptions = Nc.prototype.A, Nc.createFromModelPath = function(t2, e2) {
|
|
4272
|
+
return ec(Nc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4273
|
+
}, Nc.createFromModelBuffer = function(t2, e2) {
|
|
4274
|
+
return ec(Nc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4275
|
+
}, Nc.createFromOptions = function(t2, e2) {
|
|
4276
|
+
return ec(Nc, t2, e2);
|
|
4277
|
+
};
|
|
4278
|
+
var Mc = class {
|
|
4279
|
+
constructor(t2, e2, r2) {
|
|
4280
|
+
this.confidenceMasks = t2, this.categoryMask = e2, this.qualityScores = r2;
|
|
4281
|
+
}
|
|
4282
|
+
close() {
|
|
4283
|
+
this.confidenceMasks?.forEach((t2) => {
|
|
4284
|
+
t2.close();
|
|
4285
|
+
}), this.categoryMask?.close();
|
|
4286
|
+
}
|
|
4287
|
+
};
|
|
4288
|
+
function Oc(t2) {
|
|
4289
|
+
var e2 = (function(t3) {
|
|
4290
|
+
return Lr(t3, co, 1);
|
|
4291
|
+
})(t2.ka()).filter((t3) => (_e(sr(t3, 1)) ?? "").includes("mediapipe.tasks.TensorsToSegmentationCalculator"));
|
|
4292
|
+
if (t2.v = [], e2.length > 1) throw Error("The graph has more than one mediapipe.tasks.TensorsToSegmentationCalculator.");
|
|
4293
|
+
1 === e2.length && (kr(e2[0], so, 7)?.u()?.h() ?? /* @__PURE__ */ new Map()).forEach((e3, r2) => {
|
|
4294
|
+
t2.v[Number(r2)] = _e(sr(e3, 1)) ?? "";
|
|
4295
|
+
});
|
|
4296
|
+
}
|
|
4297
|
+
function Dc(t2) {
|
|
4298
|
+
t2.categoryMask = void 0, t2.confidenceMasks = void 0, t2.qualityScores = void 0;
|
|
4299
|
+
}
|
|
4300
|
+
function Pc(t2) {
|
|
4301
|
+
try {
|
|
4302
|
+
let e2 = new Mc(t2.confidenceMasks, t2.categoryMask, t2.qualityScores);
|
|
4303
|
+
if (!t2.m) return e2;
|
|
4304
|
+
t2.m(e2);
|
|
4305
|
+
} finally {
|
|
4306
|
+
ou(t2);
|
|
4307
|
+
}
|
|
4308
|
+
}
|
|
4309
|
+
Mc.prototype.close = Mc.prototype.close;
|
|
4310
|
+
var $c = class extends oc {
|
|
4311
|
+
constructor(t2, e2) {
|
|
4312
|
+
super(new tc(t2, e2), "image_in", "norm_rect", false), this.v = [], this.outputCategoryMask = false, this.outputConfidenceMasks = true, this.i = new Oa(), this.C = new Fa(), Rr(this.i, 0, 3, this.C), Rr(t2 = this.i, 0, 1, e2 = new qo());
|
|
4313
|
+
}
|
|
4314
|
+
D() {
|
|
4315
|
+
return "ImageSegmenter";
|
|
4316
|
+
}
|
|
4317
|
+
get baseOptions() {
|
|
4318
|
+
return kr(this.i, qo, 1);
|
|
4319
|
+
}
|
|
4320
|
+
set baseOptions(t2) {
|
|
4321
|
+
Rr(this.i, 0, 1, t2);
|
|
4322
|
+
}
|
|
4323
|
+
A(t2) {
|
|
4324
|
+
return void 0 !== t2.displayNamesLocale ? ar(this.i, 2, ve(t2.displayNamesLocale)) : "displayNamesLocale" in t2 && ar(this.i, 2), "outputCategoryMask" in t2 && (this.outputCategoryMask = t2.outputCategoryMask ?? false), "outputConfidenceMasks" in t2 && (this.outputConfidenceMasks = t2.outputConfidenceMasks ?? true), super.l(t2);
|
|
4325
|
+
}
|
|
4326
|
+
M() {
|
|
4327
|
+
Oc(this);
|
|
4328
|
+
}
|
|
4329
|
+
segment(t2, e2, r2) {
|
|
4330
|
+
var n2 = "function" != typeof e2 ? e2 : {};
|
|
4331
|
+
return this.m = "function" == typeof e2 ? e2 : r2, Dc(this), nc(this, t2, n2), Pc(this);
|
|
4332
|
+
}
|
|
4333
|
+
fb(t2, e2, r2, n2) {
|
|
4334
|
+
var i2 = "function" != typeof r2 ? r2 : {};
|
|
4335
|
+
return this.m = "function" == typeof r2 ? r2 : n2, Dc(this), ic(this, t2, i2, e2), Pc(this);
|
|
4336
|
+
}
|
|
4337
|
+
Sa() {
|
|
4338
|
+
return this.v;
|
|
4339
|
+
}
|
|
4340
|
+
u() {
|
|
4341
|
+
var t2 = new _o();
|
|
4342
|
+
go(t2, "image_in"), go(t2, "norm_rect");
|
|
4343
|
+
var e2 = new so();
|
|
4344
|
+
ci(e2, Da, this.i);
|
|
4345
|
+
var r2 = new co();
|
|
4346
|
+
Vr(r2, 2, "mediapipe.tasks.vision.image_segmenter.ImageSegmenterGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect"), r2.A(e2), mo(t2, r2), iu(this, t2), this.outputConfidenceMasks && (vo(t2, "confidence_masks"), uo(r2, "CONFIDENCE_MASKS:confidence_masks"), su(this, "confidence_masks"), this.h.ia("confidence_masks", (t3, e3) => {
|
|
4347
|
+
this.confidenceMasks = t3.map((t4) => sc(this, t4, true, !this.m)), nu(this, e3);
|
|
4348
|
+
}), this.h.attachEmptyPacketListener("confidence_masks", (t3) => {
|
|
4349
|
+
this.confidenceMasks = [], nu(this, t3);
|
|
4350
|
+
})), this.outputCategoryMask && (vo(t2, "category_mask"), uo(r2, "CATEGORY_MASK:category_mask"), su(this, "category_mask"), this.h.ha("category_mask", (t3, e3) => {
|
|
4351
|
+
this.categoryMask = sc(this, t3, false, !this.m), nu(this, e3);
|
|
4352
|
+
}), this.h.attachEmptyPacketListener("category_mask", (t3) => {
|
|
4353
|
+
this.categoryMask = void 0, nu(this, t3);
|
|
4354
|
+
})), vo(t2, "quality_scores"), uo(r2, "QUALITY_SCORES:quality_scores"), this.h.attachFloatVectorListener("quality_scores", (t3, e3) => {
|
|
4355
|
+
this.qualityScores = t3, nu(this, e3);
|
|
4356
|
+
}), this.h.attachEmptyPacketListener("quality_scores", (t3) => {
|
|
4357
|
+
this.categoryMask = void 0, nu(this, t3);
|
|
4358
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4359
|
+
}
|
|
4360
|
+
};
|
|
4361
|
+
$c.prototype.getLabels = $c.prototype.Sa, $c.prototype.segmentForVideo = $c.prototype.fb, $c.prototype.segment = $c.prototype.segment, $c.prototype.setOptions = $c.prototype.A, $c.createFromModelPath = function(t2, e2) {
|
|
4362
|
+
return ec($c, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4363
|
+
}, $c.createFromModelBuffer = function(t2, e2) {
|
|
4364
|
+
return ec($c, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4365
|
+
}, $c.createFromOptions = function(t2, e2) {
|
|
4366
|
+
return ec($c, t2, e2);
|
|
4367
|
+
};
|
|
4368
|
+
var Uc = { 0: 0, 1: 1, 2: 2, 3: 3 };
|
|
4369
|
+
function Bc() {
|
|
4370
|
+
return Uh() ? void 0 : document.createElement("canvas");
|
|
4371
|
+
}
|
|
4372
|
+
var jc = class extends au {
|
|
4373
|
+
constructor(t2, e2) {
|
|
4374
|
+
super(new Jh(t2, e2)), this.v = new vu(), this.delegate = "CPU", this.i = 0, this.baseOptions = new qo(), this.C = this.m = 0;
|
|
4375
|
+
}
|
|
4376
|
+
D() {
|
|
4377
|
+
return "InteractiveSegmenter";
|
|
4378
|
+
}
|
|
4379
|
+
get j() {
|
|
4380
|
+
return this.h.j;
|
|
4381
|
+
}
|
|
4382
|
+
A(t2) {
|
|
4383
|
+
return this.delegate = t2.baseOptions?.delegate ?? "CPU", super.l(t2);
|
|
4384
|
+
}
|
|
4385
|
+
gb(t2) {
|
|
4386
|
+
if (0 === this.i) throw Error("Segmenter is not initialized.");
|
|
4387
|
+
var e2;
|
|
4388
|
+
if (0 !== this.m && (this.j._free(this.m), this.m = 0), !(e2 = "undefined" != typeof ImageData && t2 instanceof ImageData)) if ("object" != typeof t2 || null === t2) e2 = false;
|
|
4389
|
+
else {
|
|
4390
|
+
e2 = t2.data;
|
|
4391
|
+
var r2 = t2.width, n2 = t2.height;
|
|
4392
|
+
e2 = Number.isInteger(r2) && r2 > 0 && Number.isInteger(n2) && n2 > 0 && (e2 instanceof Uint8ClampedArray || e2 instanceof Uint8Array);
|
|
4393
|
+
}
|
|
4394
|
+
if (e2) e2 = t2.width, r2 = t2.height, t2 = t2.data;
|
|
4395
|
+
else {
|
|
4396
|
+
if ([e2, r2] = jh(t2), "undefined" != typeof OffscreenCanvas) n2 = new OffscreenCanvas(e2, r2);
|
|
4397
|
+
else {
|
|
4398
|
+
if ("undefined" == typeof document) throw Error("Canvas is not supported in this environment.");
|
|
4399
|
+
n2 = document.createElement("canvas");
|
|
4400
|
+
}
|
|
4401
|
+
if (n2.width = e2, n2.height = r2, !(n2 = n2.getContext("2d"))) throw Error("Canvas 2D context is not supported in this environment.");
|
|
4402
|
+
n2.drawImage(t2, 0, 0), t2 = n2.getImageData(0, 0, e2, r2).data;
|
|
4403
|
+
}
|
|
4404
|
+
if (!t2) throw Error("Unsupported image source or failed to extract image pixels.");
|
|
4405
|
+
n2 = (function({ Xa: t3, width: e3, height: r3 }) {
|
|
4406
|
+
if (e3 <= 0 || r3 <= 0) throw Error(`Invalid image dimensions: ${e3}x${r3}. Dimensions must be positive.`);
|
|
4407
|
+
if (t3 % (e3 * r3) !== 0) throw Error(`Invalid image dimensions or pixel data length. Pixel data length ${t3} is not a multiple of the number of pixels (${e3 * r3}).`);
|
|
4408
|
+
if (4 !== (t3 /= e3 * r3) && 3 !== t3 && 1 !== t3) throw Error(`Invalid image dimensions or pixel data length. Calculated channels: ${t3}. Expected 1, 3, or 4.`);
|
|
4409
|
+
return t3;
|
|
4410
|
+
})({ Xa: t2.length, width: e2, height: r2 });
|
|
4411
|
+
var i2 = this.j._malloc(t2.length);
|
|
4412
|
+
if (this.j.HEAPU8.set(t2, i2), this.m = i2, !this.j._interactive_segmenter_set_image(this.i, i2, e2, r2, n2)) throw Error("Failed to set image on native engine.");
|
|
4413
|
+
}
|
|
4414
|
+
segment(t2) {
|
|
4415
|
+
if (0 === this.i) throw Error("Segmenter is not initialized.");
|
|
4416
|
+
var e2 = (function(t3) {
|
|
4417
|
+
t3 = t3.map(({ isCompleted: t4, brushMode: e4, point: r3 }) => {
|
|
4418
|
+
e4 = Uc[e4] ?? 0, r3 = r3.map(({ x: t5, y: e5 }) => {
|
|
4419
|
+
var r4 = new Pa();
|
|
4420
|
+
return Gr(r4, 1, t5), Gr(r4, 2, e5), r4;
|
|
4421
|
+
});
|
|
4422
|
+
var n3 = new $a();
|
|
4423
|
+
return Pr(n3, t4), _r(n3, 1, ee(e4), 0), Fr(n3, 2, r3), n3;
|
|
4424
|
+
});
|
|
4425
|
+
var e3 = new Ua();
|
|
4426
|
+
return Fr(e3, 1, t3), Ba(e3);
|
|
4427
|
+
})(t2);
|
|
4428
|
+
t2 = this.j._malloc(e2.length), this.j.HEAPU8.set(e2, t2);
|
|
4429
|
+
var r2 = this.j._malloc(12), n2 = r2 + 4, i2 = r2 + 8, s2 = 0, o2 = this.C++;
|
|
4430
|
+
try {
|
|
4431
|
+
if (this.o) if ("GPU" === this.delegate) {
|
|
4432
|
+
var a2 = this.o;
|
|
4433
|
+
++a2.h.U, a2.i.set(o2, performance.now());
|
|
4434
|
+
} else {
|
|
4435
|
+
var h2 = this.o;
|
|
4436
|
+
++h2.h.R, h2.i.set(o2, performance.now());
|
|
4437
|
+
}
|
|
4438
|
+
if (0 === (s2 = this.j._interactive_segmenter_segment(this.i, t2, e2.length, r2, n2, i2))) throw Error("Segmentation failed.");
|
|
4439
|
+
this.o?.Aa(o2);
|
|
4440
|
+
let c2 = this.j.HEAPU32[r2 / 4], l2 = this.j.HEAPU32[n2 / 4], d2 = new Float32Array(this.j.HEAPU8.buffer, s2, this.j.HEAPU32[i2 / 4] / 4);
|
|
4441
|
+
var u2 = new Float32Array(d2);
|
|
4442
|
+
if (a2 = c2 * l2, (u2 instanceof Uint8Array || u2 instanceof Float32Array) && u2.length !== a2) throw Error("Unsupported channel count: " + u2.length / a2);
|
|
4443
|
+
return new Ru([u2], true, false, this.h.j.canvas ?? void 0, this.v, c2, l2);
|
|
4444
|
+
} finally {
|
|
4445
|
+
0 !== t2 && this.j._free(t2), 0 !== r2 && this.j._free(r2), 0 !== s2 && this.j._free(s2);
|
|
4446
|
+
}
|
|
4447
|
+
}
|
|
4448
|
+
u() {
|
|
4449
|
+
0 !== this.i && (this.o?.ya(), this.j._interactive_segmenter_close(this.i), this.i = 0), 0 !== this.m && (this.j._free(this.m), this.m = 0);
|
|
4450
|
+
var t2 = new Wo();
|
|
4451
|
+
if ("GPU" === this.delegate) {
|
|
4452
|
+
var e2 = new zs();
|
|
4453
|
+
Ir(t2, 2, zo, e2);
|
|
4454
|
+
} else $r(e2 = new no(), 1, 4), Ir(t2, 1, zo, e2);
|
|
4455
|
+
if (Rr(this.baseOptions, 0, 3, t2), t2 = Qo(this.baseOptions), e2 = this.j._malloc(t2.length), this.j.HEAPU8.set(t2, e2), this.i = this.j._interactive_segmenter_create(e2, t2.length), this.j._free(e2), 0 === this.i) throw Error("Failed to create native InteractiveSegmenter engine.");
|
|
4456
|
+
this.o?.za();
|
|
4457
|
+
}
|
|
4458
|
+
close() {
|
|
4459
|
+
0 !== this.i && (this.j._interactive_segmenter_close(this.i), this.i = 0), 0 !== this.m && (this.j._free(this.m), this.m = 0), this.v.close(), super.close();
|
|
4460
|
+
}
|
|
4461
|
+
};
|
|
4462
|
+
jc.prototype.close = jc.prototype.close, jc.prototype.segment = jc.prototype.segment, jc.prototype.setImage = jc.prototype.gb, jc.prototype.setOptions = jc.prototype.A, jc.createFromModelPath = function(t2, e2) {
|
|
4463
|
+
return Qh(jc, Bc(), t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4464
|
+
}, jc.createFromModelBuffer = function(t2, e2) {
|
|
4465
|
+
return Qh(jc, Bc(), t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4466
|
+
}, jc.createFromOptions = function(t2, e2) {
|
|
4467
|
+
var r2 = e2.canvas ?? Bc();
|
|
4468
|
+
return Qh(jc, r2, t2, e2);
|
|
4469
|
+
};
|
|
4470
|
+
var Gc = class {
|
|
4471
|
+
constructor(t2, e2, r2) {
|
|
4472
|
+
this.confidenceMasks = t2, this.categoryMask = e2, this.qualityScores = r2;
|
|
4473
|
+
}
|
|
4474
|
+
close() {
|
|
4475
|
+
this.confidenceMasks?.forEach((t2) => {
|
|
4476
|
+
t2.close();
|
|
4477
|
+
}), this.categoryMask?.close();
|
|
4478
|
+
}
|
|
4479
|
+
};
|
|
4480
|
+
Gc.prototype.close = Gc.prototype.close;
|
|
4481
|
+
var Vc = class extends oc {
|
|
4482
|
+
constructor(t2, e2) {
|
|
4483
|
+
super(new tc(t2, e2), "image_in", "norm_rect_in", false), this.outputCategoryMask = false, this.outputConfidenceMasks = true, this.i = new Oa(), this.v = new Fa(), Rr(this.i, 0, 3, this.v), Rr(t2 = this.i, 0, 1, e2 = new qo());
|
|
4484
|
+
}
|
|
4485
|
+
D() {
|
|
4486
|
+
return "InteractiveSegmenterLegacy";
|
|
4487
|
+
}
|
|
4488
|
+
get baseOptions() {
|
|
4489
|
+
return kr(this.i, qo, 1);
|
|
4490
|
+
}
|
|
4491
|
+
set baseOptions(t2) {
|
|
4492
|
+
Rr(this.i, 0, 1, t2);
|
|
4493
|
+
}
|
|
4494
|
+
A(t2) {
|
|
4495
|
+
return "outputCategoryMask" in t2 && (this.outputCategoryMask = t2.outputCategoryMask ?? false), "outputConfidenceMasks" in t2 && (this.outputConfidenceMasks = t2.outputConfidenceMasks ?? true), super.l(t2);
|
|
4496
|
+
}
|
|
4497
|
+
segment(t2, e2, r2, n2) {
|
|
4498
|
+
var i2 = "function" != typeof r2 ? r2 : {};
|
|
4499
|
+
if (this.m = "function" == typeof r2 ? r2 : n2, this.qualityScores = this.categoryMask = this.confidenceMasks = void 0, r2 = this.J + 1, n2 = new Ha(), e2.keypoint && e2.scribble) throw Error("Cannot provide both keypoint and scribble.");
|
|
4500
|
+
if (e2.keypoint) {
|
|
4501
|
+
var s2 = new ja();
|
|
4502
|
+
Pr(s2, true), Gr(s2, 1, e2.keypoint.x), Gr(s2, 2, e2.keypoint.y), Ir(n2, 1, Ka, s2);
|
|
4503
|
+
} else {
|
|
4504
|
+
if (!e2.scribble) throw Error("Must provide either a keypoint or a scribble.");
|
|
4505
|
+
{
|
|
4506
|
+
let t3 = new Va();
|
|
4507
|
+
for (s2 of e2.scribble) Pr(e2 = new ja(), true), Gr(e2, 1, s2.x), Gr(e2, 2, s2.y), Nr(t3, 1, ja, e2);
|
|
4508
|
+
Ir(n2, 2, Ka, t3);
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
this.h.addProtoToStream(n2.h(), "mediapipe.tasks.vision.interactive_segmenter_legacy.proto.RegionOfInterest", "roi_in", r2), nc(this, t2, i2);
|
|
4512
|
+
t: {
|
|
4513
|
+
try {
|
|
4514
|
+
let t3 = new Gc(this.confidenceMasks, this.categoryMask, this.qualityScores);
|
|
4515
|
+
if (!this.m) {
|
|
4516
|
+
var o2 = t3;
|
|
4517
|
+
break t;
|
|
4518
|
+
}
|
|
4519
|
+
this.m(t3);
|
|
4520
|
+
} finally {
|
|
4521
|
+
ou(this);
|
|
4522
|
+
}
|
|
4523
|
+
o2 = void 0;
|
|
4524
|
+
}
|
|
4525
|
+
return o2;
|
|
4526
|
+
}
|
|
4527
|
+
u() {
|
|
4528
|
+
var t2 = new _o();
|
|
4529
|
+
go(t2, "image_in"), go(t2, "roi_in"), go(t2, "norm_rect_in");
|
|
4530
|
+
var e2 = new so();
|
|
4531
|
+
ci(e2, Da, this.i);
|
|
4532
|
+
var r2 = new co();
|
|
4533
|
+
Vr(r2, 2, "mediapipe.tasks.vision.interactive_segmenter_legacy.InteractiveSegmenterLegacyGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "ROI:roi_in"), ho(r2, "NORM_RECT:norm_rect_in"), r2.A(e2), mo(t2, r2), iu(this, t2), this.outputConfidenceMasks && (vo(t2, "confidence_masks"), uo(r2, "CONFIDENCE_MASKS:confidence_masks"), su(this, "confidence_masks"), this.h.ia("confidence_masks", (t3, e3) => {
|
|
4534
|
+
this.confidenceMasks = t3.map((t4) => sc(this, t4, true, !this.m)), nu(this, e3);
|
|
4535
|
+
}), this.h.attachEmptyPacketListener("confidence_masks", (t3) => {
|
|
4536
|
+
this.confidenceMasks = [], nu(this, t3);
|
|
4537
|
+
})), this.outputCategoryMask && (vo(t2, "category_mask"), uo(r2, "CATEGORY_MASK:category_mask"), su(this, "category_mask"), this.h.ha("category_mask", (t3, e3) => {
|
|
4538
|
+
this.categoryMask = sc(this, t3, false, !this.m), nu(this, e3);
|
|
4539
|
+
}), this.h.attachEmptyPacketListener("category_mask", (t3) => {
|
|
4540
|
+
this.categoryMask = void 0, nu(this, t3);
|
|
4541
|
+
})), vo(t2, "quality_scores"), uo(r2, "QUALITY_SCORES:quality_scores"), this.h.attachFloatVectorListener("quality_scores", (t3, e3) => {
|
|
4542
|
+
this.qualityScores = t3, nu(this, e3);
|
|
4543
|
+
}), this.h.attachEmptyPacketListener("quality_scores", (t3) => {
|
|
4544
|
+
this.categoryMask = void 0, nu(this, t3);
|
|
4545
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4546
|
+
}
|
|
4547
|
+
};
|
|
4548
|
+
Vc.prototype.segment = Vc.prototype.segment, Vc.prototype.setOptions = Vc.prototype.A, Vc.createFromModelPath = function(t2, e2) {
|
|
4549
|
+
return ec(Vc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4550
|
+
}, Vc.createFromModelBuffer = function(t2, e2) {
|
|
4551
|
+
return ec(Vc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4552
|
+
}, Vc.createFromOptions = function(t2, e2) {
|
|
4553
|
+
return ec(Vc, t2, e2);
|
|
4554
|
+
};
|
|
4555
|
+
var Hc = class extends oc {
|
|
4556
|
+
constructor(t2, e2) {
|
|
4557
|
+
super(new tc(t2, e2), "input_frame_gpu", "norm_rect", false), this.m = { detections: [] }, Rr(t2 = this.i = new Xa(), 0, 1, e2 = new qo());
|
|
4558
|
+
}
|
|
4559
|
+
D() {
|
|
4560
|
+
return "ObjectDetector";
|
|
4561
|
+
}
|
|
4562
|
+
get baseOptions() {
|
|
4563
|
+
return kr(this.i, qo, 1);
|
|
4564
|
+
}
|
|
4565
|
+
set baseOptions(t2) {
|
|
4566
|
+
Rr(this.i, 0, 1, t2);
|
|
4567
|
+
}
|
|
4568
|
+
A(t2) {
|
|
4569
|
+
return void 0 !== t2.displayNamesLocale ? ar(this.i, 2, ve(t2.displayNamesLocale)) : "displayNamesLocale" in t2 && ar(this.i, 2), void 0 !== t2.maxResults ? $r(this.i, 3, t2.maxResults) : "maxResults" in t2 && ar(this.i, 3), void 0 !== t2.scoreThreshold ? jr(this.i, 4, t2.scoreThreshold) : "scoreThreshold" in t2 && ar(this.i, 4), void 0 !== t2.categoryAllowlist ? Hr(this.i, 5, t2.categoryAllowlist) : "categoryAllowlist" in t2 && ar(this.i, 5), void 0 !== t2.categoryDenylist ? Hr(this.i, 6, t2.categoryDenylist) : "categoryDenylist" in t2 && ar(this.i, 6), this.l(t2);
|
|
4570
|
+
}
|
|
4571
|
+
H(t2, e2) {
|
|
4572
|
+
return this.m = { detections: [] }, nc(this, t2, e2), this.m;
|
|
4573
|
+
}
|
|
4574
|
+
I(t2, e2, r2) {
|
|
4575
|
+
return this.m = { detections: [] }, ic(this, t2, r2, e2), this.m;
|
|
4576
|
+
}
|
|
4577
|
+
u() {
|
|
4578
|
+
var t2 = new _o();
|
|
4579
|
+
go(t2, "input_frame_gpu"), go(t2, "norm_rect"), vo(t2, "detections");
|
|
4580
|
+
var e2 = new so();
|
|
4581
|
+
ci(e2, Wa, this.i);
|
|
4582
|
+
var r2 = new co();
|
|
4583
|
+
Vr(r2, 2, "mediapipe.tasks.vision.ObjectDetectorGraph"), ho(r2, "IMAGE:input_frame_gpu"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "DETECTIONS:detections"), r2.A(e2), mo(t2, r2), this.h.attachProtoVectorListener("detections", (t3, e3) => {
|
|
4584
|
+
for (let e4 of t3) t3 = xo(e4), this.m.detections.push(th(t3));
|
|
4585
|
+
nu(this, e3);
|
|
4586
|
+
}), this.h.attachEmptyPacketListener("detections", (t3) => {
|
|
4587
|
+
nu(this, t3);
|
|
4588
|
+
}), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4589
|
+
}
|
|
4590
|
+
};
|
|
4591
|
+
Hc.prototype.detectForVideo = Hc.prototype.I, Hc.prototype.detect = Hc.prototype.H, Hc.prototype.setOptions = Hc.prototype.A, Hc.createFromModelPath = async function(t2, e2) {
|
|
4592
|
+
return ec(Hc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4593
|
+
}, Hc.createFromModelBuffer = function(t2, e2) {
|
|
4594
|
+
return ec(Hc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4595
|
+
}, Hc.createFromOptions = function(t2, e2) {
|
|
4596
|
+
return ec(Hc, t2, e2);
|
|
4597
|
+
};
|
|
4598
|
+
var Kc = class {
|
|
4599
|
+
constructor(t2, e2, r2) {
|
|
4600
|
+
this.landmarks = t2, this.worldLandmarks = e2, this.segmentationMasks = r2;
|
|
4601
|
+
}
|
|
4602
|
+
close() {
|
|
4603
|
+
this.segmentationMasks?.forEach((t2) => {
|
|
4604
|
+
t2.close();
|
|
4605
|
+
});
|
|
4606
|
+
}
|
|
4607
|
+
};
|
|
4608
|
+
function Xc(t2) {
|
|
4609
|
+
t2.landmarks = [], t2.worldLandmarks = [], t2.segmentationMasks = void 0;
|
|
4610
|
+
}
|
|
4611
|
+
function Wc(t2) {
|
|
4612
|
+
try {
|
|
4613
|
+
let e2 = new Kc(t2.landmarks, t2.worldLandmarks, t2.segmentationMasks);
|
|
4614
|
+
if (!t2.v) return e2;
|
|
4615
|
+
t2.v(e2);
|
|
4616
|
+
} finally {
|
|
4617
|
+
ou(t2);
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
Kc.prototype.close = Kc.prototype.close;
|
|
4621
|
+
var zc = class extends oc {
|
|
4622
|
+
constructor(t2, e2) {
|
|
4623
|
+
super(new tc(t2, e2), "image_in", "norm_rect", false), this.landmarks = [], this.worldLandmarks = [], this.outputSegmentationMasks = false, Rr(t2 = this.i = new za(), 0, 1, e2 = new qo()), this.C = new Ta(), Rr(this.i, 0, 3, this.C), this.m = new wa(), Rr(this.i, 0, 2, this.m), $r(this.m, 4, 1), jr(this.m, 2, 0.5), jr(this.C, 2, 0.5), jr(this.i, 4, 0.5);
|
|
4624
|
+
}
|
|
4625
|
+
D() {
|
|
4626
|
+
return "PoseLandmarker";
|
|
4627
|
+
}
|
|
4628
|
+
get baseOptions() {
|
|
4629
|
+
return kr(this.i, qo, 1);
|
|
4630
|
+
}
|
|
4631
|
+
set baseOptions(t2) {
|
|
4632
|
+
Rr(this.i, 0, 1, t2);
|
|
4633
|
+
}
|
|
4634
|
+
A(t2) {
|
|
4635
|
+
return "numPoses" in t2 && $r(this.m, 4, t2.numPoses ?? 1), "minPoseDetectionConfidence" in t2 && jr(this.m, 2, t2.minPoseDetectionConfidence ?? 0.5), "minTrackingConfidence" in t2 && jr(this.i, 4, t2.minTrackingConfidence ?? 0.5), "minPosePresenceConfidence" in t2 && jr(this.C, 2, t2.minPosePresenceConfidence ?? 0.5), "outputSegmentationMasks" in t2 && (this.outputSegmentationMasks = t2.outputSegmentationMasks ?? false), this.l(t2);
|
|
4636
|
+
}
|
|
4637
|
+
H(t2, e2, r2) {
|
|
4638
|
+
var n2 = "function" != typeof e2 ? e2 : {};
|
|
4639
|
+
return this.v = "function" == typeof e2 ? e2 : r2, Xc(this), nc(this, t2, n2), Wc(this);
|
|
4640
|
+
}
|
|
4641
|
+
I(t2, e2, r2, n2) {
|
|
4642
|
+
var i2 = "function" != typeof r2 ? r2 : {};
|
|
4643
|
+
return this.v = "function" == typeof r2 ? r2 : n2, Xc(this), ic(this, t2, i2, e2), Wc(this);
|
|
4644
|
+
}
|
|
4645
|
+
u() {
|
|
4646
|
+
var t2 = new _o();
|
|
4647
|
+
go(t2, "image_in"), go(t2, "norm_rect"), vo(t2, "normalized_landmarks"), vo(t2, "world_landmarks"), vo(t2, "segmentation_masks");
|
|
4648
|
+
var e2 = new so();
|
|
4649
|
+
ci(e2, Ya, this.i);
|
|
4650
|
+
var r2 = new co();
|
|
4651
|
+
Vr(r2, 2, "mediapipe.tasks.vision.pose_landmarker.PoseLandmarkerGraph"), ho(r2, "IMAGE:image_in"), ho(r2, "NORM_RECT:norm_rect"), uo(r2, "NORM_LANDMARKS:normalized_landmarks"), uo(r2, "WORLD_LANDMARKS:world_landmarks"), r2.A(e2), mo(t2, r2), iu(this, t2), this.h.attachProtoVectorListener("normalized_landmarks", (t3, e3) => {
|
|
4652
|
+
this.landmarks = [];
|
|
4653
|
+
for (let e4 of t3) t3 = Co(e4), this.landmarks.push(eh(t3));
|
|
4654
|
+
nu(this, e3);
|
|
4655
|
+
}), this.h.attachEmptyPacketListener("normalized_landmarks", (t3) => {
|
|
4656
|
+
this.landmarks = [], nu(this, t3);
|
|
4657
|
+
}), this.h.attachProtoVectorListener("world_landmarks", (t3, e3) => {
|
|
4658
|
+
this.worldLandmarks = [];
|
|
4659
|
+
for (let e4 of t3) t3 = Io(e4), this.worldLandmarks.push(rh(t3));
|
|
4660
|
+
nu(this, e3);
|
|
4661
|
+
}), this.h.attachEmptyPacketListener("world_landmarks", (t3) => {
|
|
4662
|
+
this.worldLandmarks = [], nu(this, t3);
|
|
4663
|
+
}), this.outputSegmentationMasks && (uo(r2, "SEGMENTATION_MASK:segmentation_masks"), su(this, "segmentation_masks"), this.h.ia("segmentation_masks", (t3, e3) => {
|
|
4664
|
+
this.segmentationMasks = t3.map((t4) => sc(this, t4, true, !this.v)), nu(this, e3);
|
|
4665
|
+
}), this.h.attachEmptyPacketListener("segmentation_masks", (t3) => {
|
|
4666
|
+
this.segmentationMasks = [], nu(this, t3);
|
|
4667
|
+
})), t2 = t2.h(), this.setGraph(new Uint8Array(t2), true);
|
|
4668
|
+
}
|
|
4669
|
+
};
|
|
4670
|
+
zc.prototype.detectForVideo = zc.prototype.I, zc.prototype.detect = zc.prototype.H, zc.prototype.setOptions = zc.prototype.A, zc.createFromModelPath = function(t2, e2) {
|
|
4671
|
+
return ec(zc, t2, { baseOptions: { modelAssetPath: e2 } });
|
|
4672
|
+
}, zc.createFromModelBuffer = function(t2, e2) {
|
|
4673
|
+
return ec(zc, t2, { baseOptions: { modelAssetBuffer: e2 } });
|
|
4674
|
+
}, zc.createFromOptions = function(t2, e2) {
|
|
4675
|
+
return ec(zc, t2, e2);
|
|
4676
|
+
}, zc.POSE_CONNECTIONS = Lc, r("module$exports$google3$third_party$mediapipe$tasks$web$vision$pose_landmarker$pose_landmarker.PoseLandmarker.POSE_CONNECTIONS", zc.POSE_CONNECTIONS);
|
|
4677
|
+
|
|
4678
|
+
// src/face.ts
|
|
4679
|
+
var WASM_DIR = "/mediakit/mp";
|
|
4680
|
+
var MODEL_URL = "/mediakit/face_landmarker.task";
|
|
4681
|
+
var FACE_FLOATS = 478 * 3;
|
|
4682
|
+
async function createFaceDetector(canvas, maxFaces, delegate = "GPU") {
|
|
4683
|
+
const fileset = await uh.forVisionTasks(WASM_DIR);
|
|
4684
|
+
const landmarker = await yc.createFromOptions(fileset, {
|
|
4685
|
+
baseOptions: { modelAssetPath: MODEL_URL, delegate },
|
|
4686
|
+
canvas,
|
|
4687
|
+
runningMode: "VIDEO",
|
|
4688
|
+
// As many as the core tracks: one landmark pass returns them all, so the cost of a second
|
|
4689
|
+
// face is the copy below and its own shader passes, not a second inference.
|
|
4690
|
+
numFaces: maxFaces,
|
|
4691
|
+
// No blendshapes and no transformation matrix - extra work for data nobody reads.
|
|
4692
|
+
outputFaceBlendshapes: false,
|
|
4693
|
+
outputFacialTransformationMatrixes: false
|
|
4694
|
+
});
|
|
4695
|
+
return {
|
|
4696
|
+
detect(frame, timestampMs, out) {
|
|
4697
|
+
const res = landmarker.detectForVideo(frame, timestampMs);
|
|
4698
|
+
let n2 = 0;
|
|
4699
|
+
for (const lm2 of res.faceLandmarks ?? []) {
|
|
4700
|
+
if (lm2.length * 3 !== FACE_FLOATS || n2 + FACE_FLOATS > out.length) break;
|
|
4701
|
+
for (let i2 = 0; i2 < lm2.length; i2++) {
|
|
4702
|
+
const p2 = lm2[i2];
|
|
4703
|
+
out[n2 + i2 * 3] = p2.x;
|
|
4704
|
+
out[n2 + i2 * 3 + 1] = p2.y;
|
|
4705
|
+
out[n2 + i2 * 3 + 2] = p2.z;
|
|
4706
|
+
}
|
|
4707
|
+
n2 += FACE_FLOATS;
|
|
4708
|
+
}
|
|
4709
|
+
return n2;
|
|
4710
|
+
},
|
|
4711
|
+
close() {
|
|
4712
|
+
landmarker.close();
|
|
4713
|
+
}
|
|
4714
|
+
};
|
|
4715
|
+
}
|
|
4716
|
+
|
|
4717
|
+
// src/segmenter.ts
|
|
4718
|
+
var WASM_DIR2 = "/mediakit/mp";
|
|
4719
|
+
var MODEL_URL2 = {
|
|
4720
|
+
person: "/mediakit/selfie_segmenter.tflite",
|
|
4721
|
+
classes: "/mediakit/selfie_multiclass_256x256.tflite"
|
|
4722
|
+
};
|
|
4723
|
+
async function createMaskReader(canvas, model, delegate) {
|
|
4724
|
+
const fileset = await uh.forVisionTasks(WASM_DIR2);
|
|
4725
|
+
const segmenter = await $c.createFromOptions(fileset, {
|
|
4726
|
+
baseOptions: { modelAssetPath: MODEL_URL2[model], delegate },
|
|
4727
|
+
canvas,
|
|
4728
|
+
runningMode: "VIDEO",
|
|
4729
|
+
outputCategoryMask: true,
|
|
4730
|
+
outputConfidenceMasks: false
|
|
4731
|
+
});
|
|
4732
|
+
return {
|
|
4733
|
+
read(frame, timestampMs) {
|
|
4734
|
+
let out = null;
|
|
4735
|
+
segmenter.segmentForVideo(frame, timestampMs, (result) => {
|
|
4736
|
+
const mask2 = result.categoryMask;
|
|
4737
|
+
if (mask2) out = { width: mask2.width, height: mask2.height, data: mask2.getAsUint8Array().slice() };
|
|
4738
|
+
result.close();
|
|
4739
|
+
});
|
|
4740
|
+
return out;
|
|
4741
|
+
},
|
|
4742
|
+
close() {
|
|
4743
|
+
segmenter.close();
|
|
4744
|
+
}
|
|
4745
|
+
};
|
|
4746
|
+
}
|
|
4747
|
+
|
|
4748
|
+
// src/detect-worker/entry.ts
|
|
4749
|
+
var DELEGATE = "CPU";
|
|
4750
|
+
var scope = self;
|
|
4751
|
+
var face = null;
|
|
4752
|
+
var lm = new Float32Array(0);
|
|
4753
|
+
var mask = null;
|
|
4754
|
+
var post = (m2, transfer = []) => scope.postMessage(m2, transfer);
|
|
4755
|
+
var MAX_EDGE = 512;
|
|
4756
|
+
var rgb = null;
|
|
4757
|
+
function toRGB(frame) {
|
|
4758
|
+
const s2 = Math.min(1, MAX_EDGE / Math.max(frame.displayWidth, frame.displayHeight));
|
|
4759
|
+
const w2 = Math.max(1, Math.round(frame.displayWidth * s2));
|
|
4760
|
+
const h2 = Math.max(1, Math.round(frame.displayHeight * s2));
|
|
4761
|
+
if (!rgb || rgb.width !== w2 || rgb.height !== h2) rgb = new OffscreenCanvas(w2, h2);
|
|
4762
|
+
rgb.getContext("2d").drawImage(frame, 0, 0, w2, h2);
|
|
4763
|
+
return rgb;
|
|
4764
|
+
}
|
|
4765
|
+
var message = (err) => String(err?.message ?? err);
|
|
4766
|
+
scope.onmessage = async (e2) => {
|
|
4767
|
+
const m2 = e2.data;
|
|
4768
|
+
switch (m2.t) {
|
|
4769
|
+
case "initFace":
|
|
4770
|
+
try {
|
|
4771
|
+
face = await createFaceDetector(new OffscreenCanvas(1, 1), m2.maxFaces, DELEGATE);
|
|
4772
|
+
lm = new Float32Array(m2.maxFaces * FACE_FLOATS);
|
|
4773
|
+
post({ t: "ready", kind: "face" });
|
|
4774
|
+
} catch (err) {
|
|
4775
|
+
post({ t: "error", kind: "face", message: message(err) });
|
|
4776
|
+
}
|
|
4777
|
+
break;
|
|
4778
|
+
case "initMask":
|
|
4779
|
+
try {
|
|
4780
|
+
mask = await createMaskReader(new OffscreenCanvas(1, 1), m2.model, DELEGATE);
|
|
4781
|
+
post({ t: "ready", kind: "mask" });
|
|
4782
|
+
} catch (err) {
|
|
4783
|
+
post({ t: "error", kind: "mask", message: message(err) });
|
|
4784
|
+
}
|
|
4785
|
+
break;
|
|
4786
|
+
case "face": {
|
|
4787
|
+
const t0 = performance.now();
|
|
4788
|
+
let n2 = 0;
|
|
4789
|
+
try {
|
|
4790
|
+
if (face) n2 = face.detect(toRGB(m2.frame), m2.tsUs / 1e3, lm);
|
|
4791
|
+
} catch (err) {
|
|
4792
|
+
post({ t: "error", kind: "face", message: message(err) });
|
|
4793
|
+
} finally {
|
|
4794
|
+
m2.frame.close();
|
|
4795
|
+
}
|
|
4796
|
+
const out = lm.slice(0, n2);
|
|
4797
|
+
post({ t: "face", tsUs: m2.tsUs, n: n2, lm: out, ms: performance.now() - t0 }, [out.buffer]);
|
|
4798
|
+
break;
|
|
4799
|
+
}
|
|
4800
|
+
case "mask": {
|
|
4801
|
+
const t0 = performance.now();
|
|
4802
|
+
let got = null;
|
|
4803
|
+
try {
|
|
4804
|
+
if (mask) got = mask.read(toRGB(m2.frame), m2.tsUs / 1e3);
|
|
4805
|
+
} catch (err) {
|
|
4806
|
+
post({ t: "error", kind: "mask", message: message(err) });
|
|
4807
|
+
} finally {
|
|
4808
|
+
m2.frame.close();
|
|
4809
|
+
}
|
|
4810
|
+
const data = got?.data ?? new Uint8Array(0);
|
|
4811
|
+
post(
|
|
4812
|
+
{ t: "mask", tsUs: m2.tsUs, width: got?.width ?? 0, height: got?.height ?? 0, data, ms: performance.now() - t0 },
|
|
4813
|
+
[data.buffer]
|
|
4814
|
+
);
|
|
4815
|
+
break;
|
|
4816
|
+
}
|
|
4817
|
+
case "close":
|
|
4818
|
+
face?.close();
|
|
4819
|
+
mask?.close();
|
|
4820
|
+
scope.close();
|
|
4821
|
+
break;
|
|
4822
|
+
}
|
|
4823
|
+
};
|
|
4824
|
+
})();
|
|
4825
|
+
//# sourceMappingURL=detect-worker.js.map
|