@streamlayer/sdk-web 0.28.3 → 0.28.5
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/lib/cjs/index.js +8 -8
- package/lib/es/index.js +1241 -1189
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { QuestionType as
|
|
1
|
+
import { QuestionType as ze, SilenceSetting as zr, QuestionStatus as Yt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
|
-
import { SdkOverlayType as
|
|
4
|
-
import { computed as
|
|
3
|
+
import { SdkOverlayType as ae } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
|
+
import { computed as Kr, map as jn, atom as Ft } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
|
-
import { Code as
|
|
8
|
-
import { createGrpcWebTransport as
|
|
9
|
-
import { nanoquery as
|
|
10
|
-
import { Events as
|
|
11
|
-
import { Client as
|
|
12
|
-
import { Users as
|
|
13
|
-
import { pino as
|
|
7
|
+
import { Code as Mn, createPromiseClient as Vn, createCallbackClient as qn } from "@connectrpc/connect";
|
|
8
|
+
import { createGrpcWebTransport as Gn } from "@connectrpc/connect-web";
|
|
9
|
+
import { nanoquery as Qn } from "@nanostores/query";
|
|
10
|
+
import { Events as zn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
|
+
import { Client as Tt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
|
+
import { Users as Hr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
|
+
import { pino as Kn } from "pino";
|
|
14
14
|
import { Feed as de } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
16
|
-
var
|
|
15
|
+
import { Leaderboard as Wr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
|
+
var Jr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
17
17
|
function Hn(t) {
|
|
18
18
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
19
19
|
}
|
|
20
|
-
var
|
|
21
|
-
Ct.byteLength =
|
|
22
|
-
Ct.toByteArray =
|
|
23
|
-
Ct.fromByteArray =
|
|
24
|
-
var ve = [], oe = [],
|
|
25
|
-
for (var je = 0,
|
|
26
|
-
ve[je] =
|
|
20
|
+
var T = {}, Yr = {}, Ct = {};
|
|
21
|
+
Ct.byteLength = Yn;
|
|
22
|
+
Ct.toByteArray = Zn;
|
|
23
|
+
Ct.fromByteArray = ri;
|
|
24
|
+
var ve = [], oe = [], Wn = typeof Uint8Array < "u" ? Uint8Array : Array, Rt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
25
|
+
for (var je = 0, Jn = Rt.length; je < Jn; ++je)
|
|
26
|
+
ve[je] = Rt[je], oe[Rt.charCodeAt(je)] = je;
|
|
27
27
|
oe["-".charCodeAt(0)] = 62;
|
|
28
28
|
oe["_".charCodeAt(0)] = 63;
|
|
29
|
-
function
|
|
29
|
+
function Xr(t) {
|
|
30
30
|
var e = t.length;
|
|
31
31
|
if (e % 4 > 0)
|
|
32
32
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -35,60 +35,60 @@ function Jr(t) {
|
|
|
35
35
|
var o = r === e ? 0 : 4 - r % 4;
|
|
36
36
|
return [r, o];
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
var e =
|
|
38
|
+
function Yn(t) {
|
|
39
|
+
var e = Xr(t), r = e[0], o = e[1];
|
|
40
40
|
return (r + o) * 3 / 4 - o;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Xn(t, e, r) {
|
|
43
43
|
return (e + r) * 3 / 4 - r;
|
|
44
44
|
}
|
|
45
|
-
function Xn(t) {
|
|
46
|
-
var e, r = Jr(t), o = r[0], s = r[1], u = new Kn(Yn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, p;
|
|
47
|
-
for (p = 0; p < f; p += 4)
|
|
48
|
-
e = oe[t.charCodeAt(p)] << 18 | oe[t.charCodeAt(p + 1)] << 12 | oe[t.charCodeAt(p + 2)] << 6 | oe[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
|
|
49
|
-
return s === 2 && (e = oe[t.charCodeAt(p)] << 2 | oe[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = oe[t.charCodeAt(p)] << 10 | oe[t.charCodeAt(p + 1)] << 4 | oe[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
|
|
50
|
-
}
|
|
51
45
|
function Zn(t) {
|
|
46
|
+
var e, r = Xr(t), o = r[0], s = r[1], u = new Wn(Xn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, d;
|
|
47
|
+
for (d = 0; d < f; d += 4)
|
|
48
|
+
e = oe[t.charCodeAt(d)] << 18 | oe[t.charCodeAt(d + 1)] << 12 | oe[t.charCodeAt(d + 2)] << 6 | oe[t.charCodeAt(d + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
|
|
49
|
+
return s === 2 && (e = oe[t.charCodeAt(d)] << 2 | oe[t.charCodeAt(d + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = oe[t.charCodeAt(d)] << 10 | oe[t.charCodeAt(d + 1)] << 4 | oe[t.charCodeAt(d + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
|
|
50
|
+
}
|
|
51
|
+
function ei(t) {
|
|
52
52
|
return ve[t >> 18 & 63] + ve[t >> 12 & 63] + ve[t >> 6 & 63] + ve[t & 63];
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function ti(t, e, r) {
|
|
55
55
|
for (var o, s = [], u = e; u < r; u += 3)
|
|
56
|
-
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(
|
|
56
|
+
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(ei(o));
|
|
57
57
|
return s.join("");
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function ri(t) {
|
|
60
60
|
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0, f = r - o; l < f; l += u)
|
|
61
|
-
s.push(
|
|
61
|
+
s.push(ti(t, l, l + u > f ? f : l + u));
|
|
62
62
|
return o === 1 ? (e = t[r - 1], s.push(
|
|
63
63
|
ve[e >> 2] + ve[e << 4 & 63] + "=="
|
|
64
64
|
)) : o === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
65
65
|
ve[e >> 10] + ve[e >> 4 & 63] + ve[e << 2 & 63] + "="
|
|
66
66
|
)), s.join("");
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var fr = {};
|
|
69
69
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
70
|
-
|
|
71
|
-
var u, l, f = s * 8 - o - 1,
|
|
72
|
-
for (
|
|
70
|
+
fr.read = function(t, e, r, o, s) {
|
|
71
|
+
var u, l, f = s * 8 - o - 1, d = (1 << f) - 1, A = d >> 1, g = -7, v = r ? s - 1 : 0, E = r ? -1 : 1, C = t[e + v];
|
|
72
|
+
for (v += E, u = C & (1 << -g) - 1, C >>= -g, g += f; g > 0; u = u * 256 + t[e + v], v += E, g -= 8)
|
|
73
73
|
;
|
|
74
|
-
for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e +
|
|
74
|
+
for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + v], v += E, g -= 8)
|
|
75
75
|
;
|
|
76
76
|
if (u === 0)
|
|
77
77
|
u = 1 - A;
|
|
78
78
|
else {
|
|
79
|
-
if (u ===
|
|
80
|
-
return l ? NaN : (
|
|
79
|
+
if (u === d)
|
|
80
|
+
return l ? NaN : (C ? -1 : 1) * (1 / 0);
|
|
81
81
|
l = l + Math.pow(2, o), u = u - A;
|
|
82
82
|
}
|
|
83
|
-
return (
|
|
83
|
+
return (C ? -1 : 1) * l * Math.pow(2, u - o);
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
var l, f,
|
|
87
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (
|
|
85
|
+
fr.write = function(t, e, r, o, s, u) {
|
|
86
|
+
var l, f, d, A = u * 8 - s - 1, g = (1 << A) - 1, v = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, C = o ? 0 : u - 1, R = o ? 1 : -1, L = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
87
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (d = Math.pow(2, -l)) < 1 && (l--, d *= 2), l + v >= 1 ? e += E / d : e += E * Math.pow(2, 1 - v), e * d >= 2 && (l++, d /= 2), l + v >= g ? (f = 0, l = g) : l + v >= 1 ? (f = (e * d - 1) * Math.pow(2, s), l = l + v) : (f = e * Math.pow(2, v - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + C] = f & 255, C += R, f /= 256, s -= 8)
|
|
88
88
|
;
|
|
89
|
-
for (l = l << s | f, A += s; A > 0; t[r +
|
|
89
|
+
for (l = l << s | f, A += s; A > 0; t[r + C] = l & 255, C += R, l /= 256, A -= 8)
|
|
90
90
|
;
|
|
91
|
-
t[r +
|
|
91
|
+
t[r + C - R] |= L * 128;
|
|
92
92
|
};
|
|
93
93
|
/*!
|
|
94
94
|
* The buffer module from node.js, for the browser.
|
|
@@ -97,7 +97,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
97
97
|
* @license MIT
|
|
98
98
|
*/
|
|
99
99
|
(function(t) {
|
|
100
|
-
const e = Ct, r =
|
|
100
|
+
const e = Ct, r = fr, o = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
101
101
|
t.Buffer = f, t.SlowBuffer = X, t.INSPECT_MAX_BYTES = 50;
|
|
102
102
|
const s = 2147483647;
|
|
103
103
|
t.kMaxLength = s, f.TYPED_ARRAY_SUPPORT = u(), !f.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
@@ -138,12 +138,12 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
138
138
|
throw new TypeError(
|
|
139
139
|
'The "string" argument must be of type string. Received type number'
|
|
140
140
|
);
|
|
141
|
-
return
|
|
141
|
+
return v(a);
|
|
142
142
|
}
|
|
143
|
-
return
|
|
143
|
+
return d(a, n, i);
|
|
144
144
|
}
|
|
145
145
|
f.poolSize = 8192;
|
|
146
|
-
function
|
|
146
|
+
function d(a, n, i) {
|
|
147
147
|
if (typeof a == "string")
|
|
148
148
|
return E(a, n);
|
|
149
149
|
if (ArrayBuffer.isView(a))
|
|
@@ -153,7 +153,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
153
153
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
154
154
|
);
|
|
155
155
|
if (me(a, ArrayBuffer) || a && me(a.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (me(a, SharedArrayBuffer) || a && me(a.buffer, SharedArrayBuffer)))
|
|
156
|
-
return
|
|
156
|
+
return L(a, n, i);
|
|
157
157
|
if (typeof a == "number")
|
|
158
158
|
throw new TypeError(
|
|
159
159
|
'The "value" argument must not be of type number. Received type number'
|
|
@@ -171,7 +171,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
173
|
f.from = function(a, n, i) {
|
|
174
|
-
return
|
|
174
|
+
return d(a, n, i);
|
|
175
175
|
}, Object.setPrototypeOf(f.prototype, Uint8Array.prototype), Object.setPrototypeOf(f, Uint8Array);
|
|
176
176
|
function A(a) {
|
|
177
177
|
if (typeof a != "number")
|
|
@@ -185,13 +185,13 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
185
185
|
f.alloc = function(a, n, i) {
|
|
186
186
|
return g(a, n, i);
|
|
187
187
|
};
|
|
188
|
-
function
|
|
188
|
+
function v(a) {
|
|
189
189
|
return A(a), l(a < 0 ? 0 : z(a) | 0);
|
|
190
190
|
}
|
|
191
191
|
f.allocUnsafe = function(a) {
|
|
192
|
-
return
|
|
192
|
+
return v(a);
|
|
193
193
|
}, f.allocUnsafeSlow = function(a) {
|
|
194
|
-
return
|
|
194
|
+
return v(a);
|
|
195
195
|
};
|
|
196
196
|
function E(a, n) {
|
|
197
197
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !f.isEncoding(n))
|
|
@@ -201,7 +201,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
201
201
|
const h = c.write(a, n);
|
|
202
202
|
return h !== i && (c = c.slice(0, h)), c;
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function C(a) {
|
|
205
205
|
const n = a.length < 0 ? 0 : z(a.length) | 0, i = l(n);
|
|
206
206
|
for (let c = 0; c < n; c += 1)
|
|
207
207
|
i[c] = a[c] & 255;
|
|
@@ -210,11 +210,11 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
210
210
|
function R(a) {
|
|
211
211
|
if (me(a, Uint8Array)) {
|
|
212
212
|
const n = new Uint8Array(a);
|
|
213
|
-
return
|
|
213
|
+
return L(n.buffer, n.byteOffset, n.byteLength);
|
|
214
214
|
}
|
|
215
|
-
return
|
|
215
|
+
return C(a);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function L(a, n, i) {
|
|
218
218
|
if (n < 0 || a.byteLength < n)
|
|
219
219
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
220
220
|
if (a.byteLength < n + (i || 0))
|
|
@@ -228,9 +228,9 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
228
228
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
229
229
|
}
|
|
230
230
|
if (a.length !== void 0)
|
|
231
|
-
return typeof a.length != "number" ||
|
|
231
|
+
return typeof a.length != "number" || Pt(a.length) ? l(0) : C(a);
|
|
232
232
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
233
|
-
return
|
|
233
|
+
return C(a.data);
|
|
234
234
|
}
|
|
235
235
|
function z(a) {
|
|
236
236
|
if (a >= s)
|
|
@@ -321,7 +321,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
321
321
|
return i;
|
|
322
322
|
case "utf8":
|
|
323
323
|
case "utf-8":
|
|
324
|
-
return
|
|
324
|
+
return nt(a).length;
|
|
325
325
|
case "ucs2":
|
|
326
326
|
case "ucs-2":
|
|
327
327
|
case "utf16le":
|
|
@@ -330,10 +330,10 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
330
330
|
case "hex":
|
|
331
331
|
return i >>> 1;
|
|
332
332
|
case "base64":
|
|
333
|
-
return
|
|
333
|
+
return lt(a).length;
|
|
334
334
|
default:
|
|
335
335
|
if (h)
|
|
336
|
-
return c ? -1 :
|
|
336
|
+
return c ? -1 : nt(a).length;
|
|
337
337
|
n = ("" + n).toLowerCase(), h = !0;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
@@ -350,17 +350,17 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
350
350
|
case "utf-8":
|
|
351
351
|
return le(this, n, i);
|
|
352
352
|
case "ascii":
|
|
353
|
-
return
|
|
353
|
+
return rt(this, n, i);
|
|
354
354
|
case "latin1":
|
|
355
355
|
case "binary":
|
|
356
|
-
return
|
|
356
|
+
return xe(this, n, i);
|
|
357
357
|
case "base64":
|
|
358
|
-
return
|
|
358
|
+
return tt(this, n, i);
|
|
359
359
|
case "ucs2":
|
|
360
360
|
case "ucs-2":
|
|
361
361
|
case "utf16le":
|
|
362
362
|
case "utf-16le":
|
|
363
|
-
return
|
|
363
|
+
return ke(this, n, i);
|
|
364
364
|
default:
|
|
365
365
|
if (c)
|
|
366
366
|
throw new TypeError("Unknown encoding: " + a);
|
|
@@ -419,19 +419,19 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
419
419
|
return 1;
|
|
420
420
|
if (i >>>= 0, c >>>= 0, h >>>= 0, y >>>= 0, this === n)
|
|
421
421
|
return 0;
|
|
422
|
-
let m = y - h,
|
|
423
|
-
const q = Math.min(m,
|
|
422
|
+
let m = y - h, _ = c - i;
|
|
423
|
+
const q = Math.min(m, _), M = this.slice(h, y), G = n.slice(i, c);
|
|
424
424
|
for (let D = 0; D < q; ++D)
|
|
425
425
|
if (M[D] !== G[D]) {
|
|
426
|
-
m = M[D],
|
|
426
|
+
m = M[D], _ = G[D];
|
|
427
427
|
break;
|
|
428
428
|
}
|
|
429
|
-
return m <
|
|
429
|
+
return m < _ ? -1 : _ < m ? 1 : 0;
|
|
430
430
|
};
|
|
431
431
|
function j(a, n, i, c, h) {
|
|
432
432
|
if (a.length === 0)
|
|
433
433
|
return -1;
|
|
434
|
-
if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i,
|
|
434
|
+
if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Pt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
|
|
435
435
|
if (h)
|
|
436
436
|
return -1;
|
|
437
437
|
i = a.length - 1;
|
|
@@ -447,11 +447,11 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
447
447
|
throw new TypeError("val must be string, number or Buffer");
|
|
448
448
|
}
|
|
449
449
|
function B(a, n, i, c, h) {
|
|
450
|
-
let y = 1, m = a.length,
|
|
450
|
+
let y = 1, m = a.length, _ = n.length;
|
|
451
451
|
if (c !== void 0 && (c = String(c).toLowerCase(), c === "ucs2" || c === "ucs-2" || c === "utf16le" || c === "utf-16le")) {
|
|
452
452
|
if (a.length < 2 || n.length < 2)
|
|
453
453
|
return -1;
|
|
454
|
-
y = 2, m /= 2,
|
|
454
|
+
y = 2, m /= 2, _ /= 2, i /= 2;
|
|
455
455
|
}
|
|
456
456
|
function q(G, D) {
|
|
457
457
|
return y === 1 ? G[D] : G.readUInt16BE(D * y);
|
|
@@ -461,14 +461,14 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
461
461
|
let G = -1;
|
|
462
462
|
for (M = i; M < m; M++)
|
|
463
463
|
if (q(a, M) === q(n, G === -1 ? 0 : M - G)) {
|
|
464
|
-
if (G === -1 && (G = M), M - G + 1 ===
|
|
464
|
+
if (G === -1 && (G = M), M - G + 1 === _)
|
|
465
465
|
return G * y;
|
|
466
466
|
} else
|
|
467
467
|
G !== -1 && (M -= M - G), G = -1;
|
|
468
468
|
} else
|
|
469
|
-
for (i +
|
|
469
|
+
for (i + _ > m && (i = m - _), M = i; M >= 0; M--) {
|
|
470
470
|
let G = !0;
|
|
471
|
-
for (let D = 0; D <
|
|
471
|
+
for (let D = 0; D < _; D++)
|
|
472
472
|
if (q(a, M + D) !== q(n, D)) {
|
|
473
473
|
G = !1;
|
|
474
474
|
break;
|
|
@@ -493,24 +493,24 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
493
493
|
c > y / 2 && (c = y / 2);
|
|
494
494
|
let m;
|
|
495
495
|
for (m = 0; m < c; ++m) {
|
|
496
|
-
const
|
|
497
|
-
if (
|
|
496
|
+
const _ = parseInt(n.substr(m * 2, 2), 16);
|
|
497
|
+
if (Pt(_))
|
|
498
498
|
return m;
|
|
499
|
-
a[i + m] =
|
|
499
|
+
a[i + m] = _;
|
|
500
500
|
}
|
|
501
501
|
return m;
|
|
502
502
|
}
|
|
503
503
|
function ne(a, n, i, c) {
|
|
504
|
-
return nt(
|
|
504
|
+
return it(nt(n, a.length - i), a, i, c);
|
|
505
505
|
}
|
|
506
506
|
function _e(a, n, i, c) {
|
|
507
|
-
return
|
|
507
|
+
return it(kt(n), a, i, c);
|
|
508
508
|
}
|
|
509
509
|
function Se(a, n, i, c) {
|
|
510
|
-
return
|
|
510
|
+
return it(lt(n), a, i, c);
|
|
511
511
|
}
|
|
512
512
|
function fe(a, n, i, c) {
|
|
513
|
-
return
|
|
513
|
+
return it(w(n, a.length - i), a, i, c);
|
|
514
514
|
}
|
|
515
515
|
f.prototype.write = function(n, i, c, h) {
|
|
516
516
|
if (i === void 0)
|
|
@@ -557,7 +557,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
557
557
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
558
558
|
};
|
|
559
559
|
};
|
|
560
|
-
function
|
|
560
|
+
function tt(a, n, i) {
|
|
561
561
|
return n === 0 && i === a.length ? e.fromByteArray(a) : e.fromByteArray(a.slice(n, i));
|
|
562
562
|
}
|
|
563
563
|
function le(a, n, i) {
|
|
@@ -566,10 +566,10 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
566
566
|
let h = n;
|
|
567
567
|
for (; h < i; ) {
|
|
568
568
|
const y = a[h];
|
|
569
|
-
let m = null,
|
|
570
|
-
if (h +
|
|
569
|
+
let m = null, _ = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
570
|
+
if (h + _ <= i) {
|
|
571
571
|
let q, M, G, D;
|
|
572
|
-
switch (
|
|
572
|
+
switch (_) {
|
|
573
573
|
case 1:
|
|
574
574
|
y < 128 && (m = y);
|
|
575
575
|
break;
|
|
@@ -583,31 +583,31 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
583
583
|
q = a[h + 1], M = a[h + 2], G = a[h + 3], (q & 192) === 128 && (M & 192) === 128 && (G & 192) === 128 && (D = (y & 15) << 18 | (q & 63) << 12 | (M & 63) << 6 | G & 63, D > 65535 && D < 1114112 && (m = D));
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
m === null ? (m = 65533,
|
|
586
|
+
m === null ? (m = 65533, _ = 1) : m > 65535 && (m -= 65536, c.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), c.push(m), h += _;
|
|
587
587
|
}
|
|
588
|
-
return
|
|
588
|
+
return Oe(c);
|
|
589
589
|
}
|
|
590
|
-
const
|
|
591
|
-
function
|
|
590
|
+
const Be = 4096;
|
|
591
|
+
function Oe(a) {
|
|
592
592
|
const n = a.length;
|
|
593
|
-
if (n <=
|
|
593
|
+
if (n <= Be)
|
|
594
594
|
return String.fromCharCode.apply(String, a);
|
|
595
595
|
let i = "", c = 0;
|
|
596
596
|
for (; c < n; )
|
|
597
597
|
i += String.fromCharCode.apply(
|
|
598
598
|
String,
|
|
599
|
-
a.slice(c, c +=
|
|
599
|
+
a.slice(c, c += Be)
|
|
600
600
|
);
|
|
601
601
|
return i;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function rt(a, n, i) {
|
|
604
604
|
let c = "";
|
|
605
605
|
i = Math.min(a.length, i);
|
|
606
606
|
for (let h = n; h < i; ++h)
|
|
607
607
|
c += String.fromCharCode(a[h] & 127);
|
|
608
608
|
return c;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function xe(a, n, i) {
|
|
611
611
|
let c = "";
|
|
612
612
|
i = Math.min(a.length, i);
|
|
613
613
|
for (let h = n; h < i; ++h)
|
|
@@ -619,10 +619,10 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
619
619
|
(!n || n < 0) && (n = 0), (!i || i < 0 || i > c) && (i = c);
|
|
620
620
|
let h = "";
|
|
621
621
|
for (let y = n; y < i; ++y)
|
|
622
|
-
h +=
|
|
622
|
+
h += $n[a[y]];
|
|
623
623
|
return h;
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function ke(a, n, i) {
|
|
626
626
|
const c = a.slice(n, i);
|
|
627
627
|
let h = "";
|
|
628
628
|
for (let y = 0; y < c.length - 1; y += 2)
|
|
@@ -663,13 +663,13 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
663
663
|
return n = n >>> 0, i || V(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
|
|
664
664
|
}, f.prototype.readUint32BE = f.prototype.readUInt32BE = function(n, i) {
|
|
665
665
|
return n = n >>> 0, i || V(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
|
|
666
|
-
}, f.prototype.readBigUInt64LE =
|
|
666
|
+
}, f.prototype.readBigUInt64LE = Pe(function(n) {
|
|
667
667
|
n = n >>> 0, pe(n, "offset");
|
|
668
668
|
const i = this[n], c = this[n + 7];
|
|
669
669
|
(i === void 0 || c === void 0) && ie(n, this.length - 8);
|
|
670
670
|
const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + c * 2 ** 24;
|
|
671
671
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
672
|
-
}), f.prototype.readBigUInt64BE =
|
|
672
|
+
}), f.prototype.readBigUInt64BE = Pe(function(n) {
|
|
673
673
|
n = n >>> 0, pe(n, "offset");
|
|
674
674
|
const i = this[n], c = this[n + 7];
|
|
675
675
|
(i === void 0 || c === void 0) && ie(n, this.length - 8);
|
|
@@ -701,13 +701,13 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
701
701
|
return n = n >>> 0, i || V(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
|
|
702
702
|
}, f.prototype.readInt32BE = function(n, i) {
|
|
703
703
|
return n = n >>> 0, i || V(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
|
|
704
|
-
}, f.prototype.readBigInt64LE =
|
|
704
|
+
}, f.prototype.readBigInt64LE = Pe(function(n) {
|
|
705
705
|
n = n >>> 0, pe(n, "offset");
|
|
706
706
|
const i = this[n], c = this[n + 7];
|
|
707
707
|
(i === void 0 || c === void 0) && ie(n, this.length - 8);
|
|
708
708
|
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (c << 24);
|
|
709
709
|
return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
710
|
-
}), f.prototype.readBigInt64BE =
|
|
710
|
+
}), f.prototype.readBigInt64BE = Pe(function(n) {
|
|
711
711
|
n = n >>> 0, pe(n, "offset");
|
|
712
712
|
const i = this[n], c = this[n + 7];
|
|
713
713
|
(i === void 0 || c === void 0) && ie(n, this.length - 8);
|
|
@@ -723,7 +723,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
723
723
|
}, f.prototype.readDoubleBE = function(n, i) {
|
|
724
724
|
return n = n >>> 0, i || V(n, 8, this.length), r.read(this, n, !1, 52, 8);
|
|
725
725
|
};
|
|
726
|
-
function
|
|
726
|
+
function p(a, n, i, c, h, y) {
|
|
727
727
|
if (!f.isBuffer(a))
|
|
728
728
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
729
729
|
if (n > h || n < y)
|
|
@@ -733,8 +733,8 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
733
733
|
}
|
|
734
734
|
f.prototype.writeUintLE = f.prototype.writeUIntLE = function(n, i, c, h) {
|
|
735
735
|
if (n = +n, i = i >>> 0, c = c >>> 0, !h) {
|
|
736
|
-
const
|
|
737
|
-
|
|
736
|
+
const _ = Math.pow(2, 8 * c) - 1;
|
|
737
|
+
p(this, n, i, c, _, 0);
|
|
738
738
|
}
|
|
739
739
|
let y = 1, m = 0;
|
|
740
740
|
for (this[i] = n & 255; ++m < c && (y *= 256); )
|
|
@@ -742,23 +742,23 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
742
742
|
return i + c;
|
|
743
743
|
}, f.prototype.writeUintBE = f.prototype.writeUIntBE = function(n, i, c, h) {
|
|
744
744
|
if (n = +n, i = i >>> 0, c = c >>> 0, !h) {
|
|
745
|
-
const
|
|
746
|
-
|
|
745
|
+
const _ = Math.pow(2, 8 * c) - 1;
|
|
746
|
+
p(this, n, i, c, _, 0);
|
|
747
747
|
}
|
|
748
748
|
let y = c - 1, m = 1;
|
|
749
749
|
for (this[i + y] = n & 255; --y >= 0 && (m *= 256); )
|
|
750
750
|
this[i + y] = n / m & 255;
|
|
751
751
|
return i + c;
|
|
752
752
|
}, f.prototype.writeUint8 = f.prototype.writeUInt8 = function(n, i, c) {
|
|
753
|
-
return n = +n, i = i >>> 0, c ||
|
|
753
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
|
|
754
754
|
}, f.prototype.writeUint16LE = f.prototype.writeUInt16LE = function(n, i, c) {
|
|
755
|
-
return n = +n, i = i >>> 0, c ||
|
|
755
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
756
756
|
}, f.prototype.writeUint16BE = f.prototype.writeUInt16BE = function(n, i, c) {
|
|
757
|
-
return n = +n, i = i >>> 0, c ||
|
|
757
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
758
758
|
}, f.prototype.writeUint32LE = f.prototype.writeUInt32LE = function(n, i, c) {
|
|
759
|
-
return n = +n, i = i >>> 0, c ||
|
|
759
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
|
|
760
760
|
}, f.prototype.writeUint32BE = f.prototype.writeUInt32BE = function(n, i, c) {
|
|
761
|
-
return n = +n, i = i >>> 0, c ||
|
|
761
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
762
762
|
};
|
|
763
763
|
function b(a, n, i, c, h) {
|
|
764
764
|
ge(n, c, h, a, i, 7);
|
|
@@ -774,51 +774,51 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
774
774
|
let m = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
775
775
|
return a[i + 3] = m, m = m >> 8, a[i + 2] = m, m = m >> 8, a[i + 1] = m, m = m >> 8, a[i] = m, i + 8;
|
|
776
776
|
}
|
|
777
|
-
f.prototype.writeBigUInt64LE =
|
|
777
|
+
f.prototype.writeBigUInt64LE = Pe(function(n, i = 0) {
|
|
778
778
|
return b(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
779
|
-
}), f.prototype.writeBigUInt64BE =
|
|
779
|
+
}), f.prototype.writeBigUInt64BE = Pe(function(n, i = 0) {
|
|
780
780
|
return S(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
781
781
|
}), f.prototype.writeIntLE = function(n, i, c, h) {
|
|
782
782
|
if (n = +n, i = i >>> 0, !h) {
|
|
783
783
|
const q = Math.pow(2, 8 * c - 1);
|
|
784
|
-
|
|
784
|
+
p(this, n, i, c, q - 1, -q);
|
|
785
785
|
}
|
|
786
|
-
let y = 0, m = 1,
|
|
786
|
+
let y = 0, m = 1, _ = 0;
|
|
787
787
|
for (this[i] = n & 255; ++y < c && (m *= 256); )
|
|
788
|
-
n < 0 &&
|
|
788
|
+
n < 0 && _ === 0 && this[i + y - 1] !== 0 && (_ = 1), this[i + y] = (n / m >> 0) - _ & 255;
|
|
789
789
|
return i + c;
|
|
790
790
|
}, f.prototype.writeIntBE = function(n, i, c, h) {
|
|
791
791
|
if (n = +n, i = i >>> 0, !h) {
|
|
792
792
|
const q = Math.pow(2, 8 * c - 1);
|
|
793
|
-
|
|
793
|
+
p(this, n, i, c, q - 1, -q);
|
|
794
794
|
}
|
|
795
|
-
let y = c - 1, m = 1,
|
|
795
|
+
let y = c - 1, m = 1, _ = 0;
|
|
796
796
|
for (this[i + y] = n & 255; --y >= 0 && (m *= 256); )
|
|
797
|
-
n < 0 &&
|
|
797
|
+
n < 0 && _ === 0 && this[i + y + 1] !== 0 && (_ = 1), this[i + y] = (n / m >> 0) - _ & 255;
|
|
798
798
|
return i + c;
|
|
799
799
|
}, f.prototype.writeInt8 = function(n, i, c) {
|
|
800
|
-
return n = +n, i = i >>> 0, c ||
|
|
800
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
|
|
801
801
|
}, f.prototype.writeInt16LE = function(n, i, c) {
|
|
802
|
-
return n = +n, i = i >>> 0, c ||
|
|
802
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
803
803
|
}, f.prototype.writeInt16BE = function(n, i, c) {
|
|
804
|
-
return n = +n, i = i >>> 0, c ||
|
|
804
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
805
805
|
}, f.prototype.writeInt32LE = function(n, i, c) {
|
|
806
|
-
return n = +n, i = i >>> 0, c ||
|
|
806
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
|
|
807
807
|
}, f.prototype.writeInt32BE = function(n, i, c) {
|
|
808
|
-
return n = +n, i = i >>> 0, c ||
|
|
809
|
-
}, f.prototype.writeBigInt64LE =
|
|
808
|
+
return n = +n, i = i >>> 0, c || p(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
|
|
809
|
+
}, f.prototype.writeBigInt64LE = Pe(function(n, i = 0) {
|
|
810
810
|
return b(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
811
|
-
}), f.prototype.writeBigInt64BE =
|
|
811
|
+
}), f.prototype.writeBigInt64BE = Pe(function(n, i = 0) {
|
|
812
812
|
return S(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
813
813
|
});
|
|
814
|
-
function
|
|
814
|
+
function I(a, n, i, c, h, y) {
|
|
815
815
|
if (i + c > a.length)
|
|
816
816
|
throw new RangeError("Index out of range");
|
|
817
817
|
if (i < 0)
|
|
818
818
|
throw new RangeError("Index out of range");
|
|
819
819
|
}
|
|
820
820
|
function P(a, n, i, c, h) {
|
|
821
|
-
return n = +n, i = i >>> 0, h ||
|
|
821
|
+
return n = +n, i = i >>> 0, h || I(a, n, i, 4), r.write(a, n, i, c, 23, 4), i + 4;
|
|
822
822
|
}
|
|
823
823
|
f.prototype.writeFloatLE = function(n, i, c) {
|
|
824
824
|
return P(this, n, i, !0, c);
|
|
@@ -826,7 +826,7 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
826
826
|
return P(this, n, i, !1, c);
|
|
827
827
|
};
|
|
828
828
|
function N(a, n, i, c, h) {
|
|
829
|
-
return n = +n, i = i >>> 0, h ||
|
|
829
|
+
return n = +n, i = i >>> 0, h || I(a, n, i, 8), r.write(a, n, i, c, 52, 8), i + 8;
|
|
830
830
|
}
|
|
831
831
|
f.prototype.writeDoubleLE = function(n, i, c) {
|
|
832
832
|
return N(this, n, i, !0, c);
|
|
@@ -872,17 +872,17 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
872
872
|
for (y = i; y < c; ++y)
|
|
873
873
|
this[y] = n;
|
|
874
874
|
else {
|
|
875
|
-
const m = f.isBuffer(n) ? n : f.from(n, h),
|
|
876
|
-
if (
|
|
875
|
+
const m = f.isBuffer(n) ? n : f.from(n, h), _ = m.length;
|
|
876
|
+
if (_ === 0)
|
|
877
877
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
878
878
|
for (y = 0; y < c - i; ++y)
|
|
879
|
-
this[y + i] = m[y %
|
|
879
|
+
this[y + i] = m[y % _];
|
|
880
880
|
}
|
|
881
881
|
return this;
|
|
882
882
|
};
|
|
883
|
-
const
|
|
883
|
+
const F = {};
|
|
884
884
|
function O(a, n, i) {
|
|
885
|
-
|
|
885
|
+
F[a] = class extends i {
|
|
886
886
|
constructor() {
|
|
887
887
|
super(), Object.defineProperty(this, "message", {
|
|
888
888
|
value: n.apply(this, arguments),
|
|
@@ -922,11 +922,11 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
922
922
|
"ERR_OUT_OF_RANGE",
|
|
923
923
|
function(a, n, i) {
|
|
924
924
|
let c = `The value of "${a}" is out of range.`, h = i;
|
|
925
|
-
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h =
|
|
925
|
+
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = U(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = U(h)), h += "n"), c += ` It must be ${n}. Received ${h}`, c;
|
|
926
926
|
},
|
|
927
927
|
RangeError
|
|
928
928
|
);
|
|
929
|
-
function
|
|
929
|
+
function U(a) {
|
|
930
930
|
let n = "", i = a.length;
|
|
931
931
|
const c = a[0] === "-" ? 1 : 0;
|
|
932
932
|
for (; i >= c + 4; i -= 3)
|
|
@@ -939,31 +939,31 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
939
939
|
function ge(a, n, i, c, h, y) {
|
|
940
940
|
if (a > i || a < n) {
|
|
941
941
|
const m = typeof n == "bigint" ? "n" : "";
|
|
942
|
-
let
|
|
943
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ?
|
|
942
|
+
let _;
|
|
943
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? _ = `>= 0${m} and < 2${m} ** ${(y + 1) * 8}${m}` : _ = `>= -(2${m} ** ${(y + 1) * 8 - 1}${m}) and < 2 ** ${(y + 1) * 8 - 1}${m}` : _ = `>= ${n}${m} and <= ${i}${m}`, new F.ERR_OUT_OF_RANGE("value", _, a);
|
|
944
944
|
}
|
|
945
945
|
Y(c, h, y);
|
|
946
946
|
}
|
|
947
947
|
function pe(a, n) {
|
|
948
948
|
if (typeof a != "number")
|
|
949
|
-
throw new
|
|
949
|
+
throw new F.ERR_INVALID_ARG_TYPE(n, "number", a);
|
|
950
950
|
}
|
|
951
951
|
function ie(a, n, i) {
|
|
952
|
-
throw Math.floor(a) !== a ? (pe(a, i), new
|
|
952
|
+
throw Math.floor(a) !== a ? (pe(a, i), new F.ERR_OUT_OF_RANGE(i || "offset", "an integer", a)) : n < 0 ? new F.ERR_BUFFER_OUT_OF_BOUNDS() : new F.ERR_OUT_OF_RANGE(
|
|
953
953
|
i || "offset",
|
|
954
954
|
`>= ${i ? 1 : 0} and <= ${n}`,
|
|
955
955
|
a
|
|
956
956
|
);
|
|
957
957
|
}
|
|
958
958
|
const De = /[^+/0-9A-Za-z-_]/g;
|
|
959
|
-
function
|
|
959
|
+
function ft(a) {
|
|
960
960
|
if (a = a.split("=")[0], a = a.trim().replace(De, ""), a.length < 2)
|
|
961
961
|
return "";
|
|
962
962
|
for (; a.length % 4 !== 0; )
|
|
963
963
|
a = a + "=";
|
|
964
964
|
return a;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function nt(a, n) {
|
|
967
967
|
n = n || 1 / 0;
|
|
968
968
|
let i;
|
|
969
969
|
const c = a.length;
|
|
@@ -1022,23 +1022,23 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
return y;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function kt(a) {
|
|
1026
1026
|
const n = [];
|
|
1027
1027
|
for (let i = 0; i < a.length; ++i)
|
|
1028
1028
|
n.push(a.charCodeAt(i) & 255);
|
|
1029
1029
|
return n;
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function w(a, n) {
|
|
1032
1032
|
let i, c, h;
|
|
1033
1033
|
const y = [];
|
|
1034
1034
|
for (let m = 0; m < a.length && !((n -= 2) < 0); ++m)
|
|
1035
1035
|
i = a.charCodeAt(m), c = i >> 8, h = i % 256, y.push(h), y.push(c);
|
|
1036
1036
|
return y;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1039
|
-
return e.toByteArray(
|
|
1038
|
+
function lt(a) {
|
|
1039
|
+
return e.toByteArray(ft(a));
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function it(a, n, i, c) {
|
|
1042
1042
|
let h;
|
|
1043
1043
|
for (h = 0; h < c && !(h + i >= n.length || h >= a.length); ++h)
|
|
1044
1044
|
n[h + i] = a[h];
|
|
@@ -1047,10 +1047,10 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
1047
1047
|
function me(a, n) {
|
|
1048
1048
|
return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function Pt(a) {
|
|
1051
1051
|
return a !== a;
|
|
1052
1052
|
}
|
|
1053
|
-
const
|
|
1053
|
+
const $n = function() {
|
|
1054
1054
|
const a = "0123456789abcdef", n = new Array(256);
|
|
1055
1055
|
for (let i = 0; i < 16; ++i) {
|
|
1056
1056
|
const c = i * 16;
|
|
@@ -1059,36 +1059,36 @@ ur.write = function(t, e, r, o, s, u) {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
return n;
|
|
1061
1061
|
}();
|
|
1062
|
-
function
|
|
1063
|
-
return typeof BigInt > "u" ?
|
|
1062
|
+
function Pe(a) {
|
|
1063
|
+
return typeof BigInt > "u" ? Dn : a;
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function Dn() {
|
|
1066
1066
|
throw new Error("BigInt not supported");
|
|
1067
1067
|
}
|
|
1068
|
-
})(
|
|
1069
|
-
var
|
|
1070
|
-
function
|
|
1068
|
+
})(Yr);
|
|
1069
|
+
var Zr = { exports: {} }, K = Zr.exports = {}, be, we;
|
|
1070
|
+
function Xt() {
|
|
1071
1071
|
throw new Error("setTimeout has not been defined");
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function Zt() {
|
|
1074
1074
|
throw new Error("clearTimeout has not been defined");
|
|
1075
1075
|
}
|
|
1076
1076
|
(function() {
|
|
1077
1077
|
try {
|
|
1078
|
-
typeof setTimeout == "function" ? be = setTimeout : be =
|
|
1078
|
+
typeof setTimeout == "function" ? be = setTimeout : be = Xt;
|
|
1079
1079
|
} catch {
|
|
1080
|
-
be =
|
|
1080
|
+
be = Xt;
|
|
1081
1081
|
}
|
|
1082
1082
|
try {
|
|
1083
|
-
typeof clearTimeout == "function" ? we = clearTimeout : we =
|
|
1083
|
+
typeof clearTimeout == "function" ? we = clearTimeout : we = Zt;
|
|
1084
1084
|
} catch {
|
|
1085
|
-
we =
|
|
1085
|
+
we = Zt;
|
|
1086
1086
|
}
|
|
1087
1087
|
})();
|
|
1088
|
-
function
|
|
1088
|
+
function en(t) {
|
|
1089
1089
|
if (be === setTimeout)
|
|
1090
1090
|
return setTimeout(t, 0);
|
|
1091
|
-
if ((be ===
|
|
1091
|
+
if ((be === Xt || !be) && setTimeout)
|
|
1092
1092
|
return be = setTimeout, setTimeout(t, 0);
|
|
1093
1093
|
try {
|
|
1094
1094
|
return be(t, 0);
|
|
@@ -1100,10 +1100,10 @@ function Xr(t) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
|
-
function
|
|
1103
|
+
function ni(t) {
|
|
1104
1104
|
if (we === clearTimeout)
|
|
1105
1105
|
return clearTimeout(t);
|
|
1106
|
-
if ((we ===
|
|
1106
|
+
if ((we === Zt || !we) && clearTimeout)
|
|
1107
1107
|
return we = clearTimeout, clearTimeout(t);
|
|
1108
1108
|
try {
|
|
1109
1109
|
return we(t);
|
|
@@ -1115,74 +1115,74 @@ function ri(t) {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
var
|
|
1119
|
-
function
|
|
1120
|
-
!
|
|
1118
|
+
var Te = [], Ke = !1, Ne, ht = -1;
|
|
1119
|
+
function ii() {
|
|
1120
|
+
!Ke || !Ne || (Ke = !1, Ne.length ? Te = Ne.concat(Te) : ht = -1, Te.length && tn());
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1123
|
-
if (!
|
|
1124
|
-
var t =
|
|
1125
|
-
|
|
1126
|
-
for (var e =
|
|
1127
|
-
for (Ne =
|
|
1128
|
-
Ne && Ne[
|
|
1129
|
-
|
|
1122
|
+
function tn() {
|
|
1123
|
+
if (!Ke) {
|
|
1124
|
+
var t = en(ii);
|
|
1125
|
+
Ke = !0;
|
|
1126
|
+
for (var e = Te.length; e; ) {
|
|
1127
|
+
for (Ne = Te, Te = []; ++ht < e; )
|
|
1128
|
+
Ne && Ne[ht].run();
|
|
1129
|
+
ht = -1, e = Te.length;
|
|
1130
1130
|
}
|
|
1131
|
-
Ne = null,
|
|
1131
|
+
Ne = null, Ke = !1, ni(t);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1134
|
+
K.nextTick = function(t) {
|
|
1135
1135
|
var e = new Array(arguments.length - 1);
|
|
1136
1136
|
if (arguments.length > 1)
|
|
1137
1137
|
for (var r = 1; r < arguments.length; r++)
|
|
1138
1138
|
e[r - 1] = arguments[r];
|
|
1139
|
-
|
|
1139
|
+
Te.push(new rn(t, e)), Te.length === 1 && !Ke && en(tn);
|
|
1140
1140
|
};
|
|
1141
|
-
function
|
|
1141
|
+
function rn(t, e) {
|
|
1142
1142
|
this.fun = t, this.array = e;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1144
|
+
rn.prototype.run = function() {
|
|
1145
1145
|
this.fun.apply(null, this.array);
|
|
1146
1146
|
};
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1147
|
+
K.title = "browser";
|
|
1148
|
+
K.browser = !0;
|
|
1149
|
+
K.env = {};
|
|
1150
|
+
K.argv = [];
|
|
1151
|
+
K.version = "";
|
|
1152
|
+
K.versions = {};
|
|
1153
1153
|
function Ce() {
|
|
1154
1154
|
}
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1155
|
+
K.on = Ce;
|
|
1156
|
+
K.addListener = Ce;
|
|
1157
|
+
K.once = Ce;
|
|
1158
|
+
K.off = Ce;
|
|
1159
|
+
K.removeListener = Ce;
|
|
1160
|
+
K.removeAllListeners = Ce;
|
|
1161
|
+
K.emit = Ce;
|
|
1162
|
+
K.prependListener = Ce;
|
|
1163
|
+
K.prependOnceListener = Ce;
|
|
1164
|
+
K.listeners = function(t) {
|
|
1165
1165
|
return [];
|
|
1166
1166
|
};
|
|
1167
|
-
|
|
1167
|
+
K.binding = function(t) {
|
|
1168
1168
|
throw new Error("process.binding is not supported");
|
|
1169
1169
|
};
|
|
1170
|
-
|
|
1170
|
+
K.cwd = function() {
|
|
1171
1171
|
return "/";
|
|
1172
1172
|
};
|
|
1173
|
-
|
|
1173
|
+
K.chdir = function(t) {
|
|
1174
1174
|
throw new Error("process.chdir is not supported");
|
|
1175
1175
|
};
|
|
1176
|
-
|
|
1176
|
+
K.umask = function() {
|
|
1177
1177
|
return 0;
|
|
1178
1178
|
};
|
|
1179
|
-
var
|
|
1179
|
+
var oi = Zr.exports;
|
|
1180
1180
|
(function(t) {
|
|
1181
1181
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
1182
|
-
const e =
|
|
1182
|
+
const e = Yr, r = oi, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
|
|
1183
1183
|
Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
|
|
1184
|
-
})(
|
|
1185
|
-
class
|
|
1184
|
+
})(T);
|
|
1185
|
+
class si {
|
|
1186
1186
|
}
|
|
1187
1187
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
1188
1188
|
class _t {
|
|
@@ -1201,33 +1201,33 @@ class _t {
|
|
|
1201
1201
|
return this.store;
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
1204
|
-
const
|
|
1204
|
+
const ai = (t) => {
|
|
1205
1205
|
const e = Object.keys(t);
|
|
1206
|
-
return
|
|
1206
|
+
return Kr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
|
|
1207
1207
|
};
|
|
1208
|
-
class
|
|
1208
|
+
class ot extends _t {
|
|
1209
1209
|
getValues = () => this.getStore().get();
|
|
1210
1210
|
getValue = (e) => this.getStore().get()[e];
|
|
1211
1211
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
1212
1212
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
1213
1213
|
unsubscribe = () => this.getStore().off();
|
|
1214
1214
|
}
|
|
1215
|
-
const
|
|
1216
|
-
var
|
|
1215
|
+
const st = (t) => jn(t);
|
|
1216
|
+
var Ie;
|
|
1217
1217
|
(function(t) {
|
|
1218
1218
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
1219
|
-
})(
|
|
1220
|
-
const
|
|
1221
|
-
[
|
|
1222
|
-
[
|
|
1223
|
-
[
|
|
1224
|
-
[
|
|
1219
|
+
})(Ie || (Ie = {}));
|
|
1220
|
+
const ui = {
|
|
1221
|
+
[ae.BETTING]: "betting",
|
|
1222
|
+
[ae.GAMES]: "games",
|
|
1223
|
+
[ae.PUBLIC_CHAT]: "publicChat",
|
|
1224
|
+
[ae.TWITTER]: "twitter"
|
|
1225
1225
|
};
|
|
1226
|
-
var
|
|
1226
|
+
var Le;
|
|
1227
1227
|
(function(t) {
|
|
1228
1228
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
1229
|
-
})(
|
|
1230
|
-
class
|
|
1229
|
+
})(Le || (Le = {}));
|
|
1230
|
+
class lr {
|
|
1231
1231
|
status;
|
|
1232
1232
|
source;
|
|
1233
1233
|
config;
|
|
@@ -1235,7 +1235,7 @@ class cr {
|
|
|
1235
1235
|
listeners = /* @__PURE__ */ new Set();
|
|
1236
1236
|
settingsKey;
|
|
1237
1237
|
constructor({ settings: e, ...r }, o) {
|
|
1238
|
-
this.settingsKey =
|
|
1238
|
+
this.settingsKey = ui[r.type], this.status = Ft(Le.Suspended), this.config = new ot(st(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new ot(st(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new ot(st({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1239
1239
|
}
|
|
1240
1240
|
get featureConfig() {
|
|
1241
1241
|
return this.config.getStore();
|
|
@@ -1247,10 +1247,10 @@ class cr {
|
|
|
1247
1247
|
this.listeners.add(e);
|
|
1248
1248
|
}
|
|
1249
1249
|
enable = () => {
|
|
1250
|
-
this.status.set(
|
|
1250
|
+
this.status.set(Le.Ready);
|
|
1251
1251
|
};
|
|
1252
1252
|
disable = () => {
|
|
1253
|
-
this.status.set(
|
|
1253
|
+
this.status.set(Le.Suspended);
|
|
1254
1254
|
};
|
|
1255
1255
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
1256
1256
|
let o;
|
|
@@ -1266,7 +1266,7 @@ class cr {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
};
|
|
1268
1268
|
update = (e, r) => {
|
|
1269
|
-
this.source ===
|
|
1269
|
+
this.source === Ie.STREAM && r === Ie.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
|
|
1270
1270
|
};
|
|
1271
1271
|
fireEvent(e) {
|
|
1272
1272
|
for (const r of this.listeners.values())
|
|
@@ -1277,7 +1277,7 @@ class cr {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
class
|
|
1280
|
+
class ue extends _t {
|
|
1281
1281
|
getValue = () => this.getStore().get();
|
|
1282
1282
|
getValues() {
|
|
1283
1283
|
throw new Error("not implemented");
|
|
@@ -1292,11 +1292,11 @@ class ae extends _t {
|
|
|
1292
1292
|
return this.getStore().get();
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
|
-
const
|
|
1295
|
+
const ce = (t) => Ft(t), hr = (t, e) => Kr(t, e);
|
|
1296
1296
|
class te extends _t {
|
|
1297
1297
|
atomStore;
|
|
1298
1298
|
constructor(e, r, o) {
|
|
1299
|
-
super(e, `api:${r}`), this.atomStore =
|
|
1299
|
+
super(e, `api:${r}`), this.atomStore = Ft(), o && e.subscribe((s) => {
|
|
1300
1300
|
this.atomStore.set(o(s));
|
|
1301
1301
|
});
|
|
1302
1302
|
}
|
|
@@ -1325,7 +1325,7 @@ class te extends _t {
|
|
|
1325
1325
|
key = () => this.getStore().key;
|
|
1326
1326
|
off = () => this.getStore().off();
|
|
1327
1327
|
}
|
|
1328
|
-
async function*
|
|
1328
|
+
async function* ci(t, e) {
|
|
1329
1329
|
for await (const r of e) {
|
|
1330
1330
|
t.response.message = r, t.received_at = Date.now();
|
|
1331
1331
|
const o = {
|
|
@@ -1335,7 +1335,7 @@ async function* ui(t, e) {
|
|
|
1335
1335
|
window.postMessage(o), yield r;
|
|
1336
1336
|
}
|
|
1337
1337
|
}
|
|
1338
|
-
const
|
|
1338
|
+
const fi = () => (t) => async (e) => {
|
|
1339
1339
|
const r = {
|
|
1340
1340
|
name: e.url,
|
|
1341
1341
|
request: {},
|
|
@@ -1347,7 +1347,7 @@ const ci = () => (t) => async (e) => {
|
|
|
1347
1347
|
if (r.received_at = Date.now(), r.stream = o.stream, r.response.header = Object.fromEntries(o.header.entries()), r.response.trailer = Object.fromEntries(o.trailer.entries()), o.stream)
|
|
1348
1348
|
return {
|
|
1349
1349
|
...o,
|
|
1350
|
-
message:
|
|
1350
|
+
message: ci(r, o.message)
|
|
1351
1351
|
};
|
|
1352
1352
|
{
|
|
1353
1353
|
r.request.message = e.message, r.response.message = o.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -1375,7 +1375,7 @@ var Ae;
|
|
|
1375
1375
|
(function(t) {
|
|
1376
1376
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnecting = "reconnecting";
|
|
1377
1377
|
})(Ae || (Ae = {}));
|
|
1378
|
-
class
|
|
1378
|
+
class li {
|
|
1379
1379
|
params;
|
|
1380
1380
|
stream;
|
|
1381
1381
|
method;
|
|
@@ -1390,7 +1390,7 @@ class fi {
|
|
|
1390
1390
|
ts: /* @__PURE__ */ new Date(),
|
|
1391
1391
|
log: []
|
|
1392
1392
|
};
|
|
1393
|
-
this.state = new
|
|
1393
|
+
this.state = new ot(st(u), `subscription:${s.name}:state`), this.name = s.name, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = o, this.method = r, s.withStore && (this.store = new ue(ce(null), `subscription:${s.name}:store`)), "subscribe" in o && typeof o.subscribe == "function" && o.subscribe(() => {
|
|
1394
1394
|
this.reconnect();
|
|
1395
1395
|
}), this.updateState(Ae.Ready);
|
|
1396
1396
|
}
|
|
@@ -1432,10 +1432,10 @@ class fi {
|
|
|
1432
1432
|
this.addStateLog(`data routed to ${this.listeners.size} listeners`);
|
|
1433
1433
|
};
|
|
1434
1434
|
onStreamError = (e) => {
|
|
1435
|
-
e !== void 0 && (e.code !==
|
|
1435
|
+
e !== void 0 && (e.code !== Mn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
|
|
1436
1436
|
};
|
|
1437
1437
|
}
|
|
1438
|
-
class
|
|
1438
|
+
class hi {
|
|
1439
1439
|
toJsonOptions = {
|
|
1440
1440
|
emitDefaultValues: !1,
|
|
1441
1441
|
enumAsInteger: !0,
|
|
@@ -1450,11 +1450,11 @@ class li {
|
|
|
1450
1450
|
callbackClients;
|
|
1451
1451
|
subscriptions;
|
|
1452
1452
|
constructor(e) {
|
|
1453
|
-
this.host = e, this.$headers = new
|
|
1454
|
-
"sl-device-id":
|
|
1453
|
+
this.host = e, this.$headers = new ot(st({
|
|
1454
|
+
"sl-device-id": T.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1455
1455
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1456
|
-
const [r, o, s] =
|
|
1457
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport =
|
|
1456
|
+
const [r, o, s] = Qn();
|
|
1457
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Gn({
|
|
1458
1458
|
baseUrl: e,
|
|
1459
1459
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1460
1460
|
// @ts-ignore
|
|
@@ -1469,7 +1469,7 @@ class li {
|
|
|
1469
1469
|
const s = this.subscriptions.get(r);
|
|
1470
1470
|
if (s)
|
|
1471
1471
|
return s;
|
|
1472
|
-
const u = new
|
|
1472
|
+
const u = new li(this.$headers, e, r, o);
|
|
1473
1473
|
return this.subscriptions.set(r, u), u;
|
|
1474
1474
|
};
|
|
1475
1475
|
removeSubscription = (e) => {
|
|
@@ -1490,14 +1490,14 @@ class li {
|
|
|
1490
1490
|
const r = e.typeName;
|
|
1491
1491
|
if (this.clients.has(r))
|
|
1492
1492
|
return this.clients.get(r);
|
|
1493
|
-
const o =
|
|
1493
|
+
const o = Vn(e, this.transport);
|
|
1494
1494
|
return this.clients.set(r, o), o;
|
|
1495
1495
|
};
|
|
1496
1496
|
getCallbackClient = (e) => {
|
|
1497
1497
|
const r = e.typeName;
|
|
1498
1498
|
if (this.callbackClients.has(r))
|
|
1499
1499
|
return this.callbackClients.get(r);
|
|
1500
|
-
const o =
|
|
1500
|
+
const o = qn(e, this.transport);
|
|
1501
1501
|
return this.callbackClients.set(r, o), o;
|
|
1502
1502
|
};
|
|
1503
1503
|
// create unary client, used for query request
|
|
@@ -1529,11 +1529,11 @@ class li {
|
|
|
1529
1529
|
o.header.set(u, s[u]);
|
|
1530
1530
|
return r(o);
|
|
1531
1531
|
};
|
|
1532
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
1532
|
+
this.interceptors.push(e), this.interceptors.push(fi());
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
1535
|
-
const
|
|
1536
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1535
|
+
const pi = (t, e) => {
|
|
1536
|
+
const { client: r, queryKey: o } = e.createPromiseClient(zn, {
|
|
1537
1537
|
method: "retrieveEventId",
|
|
1538
1538
|
params: [t]
|
|
1539
1539
|
});
|
|
@@ -1550,32 +1550,29 @@ const hi = (t, e) => {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
});
|
|
1553
|
-
},
|
|
1554
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1553
|
+
}, di = (t, e) => {
|
|
1554
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "getStream", params: [t] });
|
|
1555
1555
|
return e.nanoquery.createFetcherStore(o, {
|
|
1556
1556
|
fetcher: async (s, u, l) => l ? (await r.getStream({
|
|
1557
1557
|
id: l
|
|
1558
1558
|
// we are sure that id is a string
|
|
1559
1559
|
})).data?.attributes : void 0
|
|
1560
1560
|
});
|
|
1561
|
-
},
|
|
1562
|
-
const { queryKey: r, client: o } = e.createPromiseClient(
|
|
1561
|
+
}, yi = (t, e) => {
|
|
1562
|
+
const { queryKey: r, client: o } = e.createPromiseClient(Hr, { method: "me", params: [t] });
|
|
1563
1563
|
return e.nanoquery.createFetcherStore(r, {
|
|
1564
1564
|
fetcher: () => o.me({})
|
|
1565
1565
|
});
|
|
1566
|
-
},
|
|
1567
|
-
const { client: e
|
|
1568
|
-
return
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
});
|
|
1572
|
-
}, gi = (t, e) => {
|
|
1573
|
-
const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "get", params: [t] });
|
|
1566
|
+
}, gi = (t) => {
|
|
1567
|
+
const { client: e } = t.createPromiseClient(Hr, { method: "bypassAuth" });
|
|
1568
|
+
return ({ userKey: r, schema: o, init: s }) => e.bypassAuth({ userKey: r, schema: o, init: s });
|
|
1569
|
+
}, mi = (t, e) => {
|
|
1570
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "get", params: [t] });
|
|
1574
1571
|
return e.nanoquery.createFetcherStore(o, {
|
|
1575
1572
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
1576
1573
|
});
|
|
1577
|
-
},
|
|
1578
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1574
|
+
}, bi = (t, e) => {
|
|
1575
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "getOrganization", params: [t] });
|
|
1579
1576
|
return e.nanoquery.createFetcherStore(o, {
|
|
1580
1577
|
fetcher: async () => {
|
|
1581
1578
|
const s = await r.getOrganization({});
|
|
@@ -1585,18 +1582,18 @@ const hi = (t, e) => {
|
|
|
1585
1582
|
} : void 0;
|
|
1586
1583
|
}
|
|
1587
1584
|
});
|
|
1588
|
-
},
|
|
1589
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1585
|
+
}, wi = (t, e) => {
|
|
1586
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, {
|
|
1590
1587
|
method: "getOrganizationAdvertising",
|
|
1591
1588
|
params: [t]
|
|
1592
1589
|
});
|
|
1593
1590
|
return e.nanoquery.createFetcherStore(o, {
|
|
1594
1591
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
1595
1592
|
});
|
|
1596
|
-
},
|
|
1597
|
-
t.transport = new
|
|
1593
|
+
}, vi = (t, e, r) => {
|
|
1594
|
+
t.transport = new hi(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
|
|
1598
1595
|
};
|
|
1599
|
-
class
|
|
1596
|
+
class pr {
|
|
1600
1597
|
delimiter = ":";
|
|
1601
1598
|
prefix;
|
|
1602
1599
|
constructor(e = "main") {
|
|
@@ -1619,63 +1616,74 @@ class lr {
|
|
|
1619
1616
|
window.localStorage.removeItem(this.generateKey(e));
|
|
1620
1617
|
};
|
|
1621
1618
|
}
|
|
1622
|
-
var
|
|
1619
|
+
var Ee;
|
|
1623
1620
|
(function(t) {
|
|
1624
|
-
t.SCHEMA = "schema", t.TOKEN = "token";
|
|
1625
|
-
})(
|
|
1626
|
-
class
|
|
1621
|
+
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
1622
|
+
})(Ee || (Ee = {}));
|
|
1623
|
+
class Ge extends pr {
|
|
1627
1624
|
constructor() {
|
|
1628
1625
|
super("user");
|
|
1629
1626
|
}
|
|
1630
1627
|
// Schema
|
|
1631
1628
|
setSchema = (e) => {
|
|
1632
|
-
this.write(
|
|
1629
|
+
this.write(Ee.SCHEMA, e);
|
|
1633
1630
|
};
|
|
1634
|
-
getSchema = () => this.read(
|
|
1631
|
+
getSchema = () => this.read(Ee.SCHEMA);
|
|
1635
1632
|
// Token
|
|
1636
1633
|
setToken = (e) => {
|
|
1637
|
-
this.write(
|
|
1634
|
+
this.write(Ee.TOKEN, e);
|
|
1638
1635
|
};
|
|
1639
|
-
getToken = () => this.read(
|
|
1640
|
-
|
|
1641
|
-
|
|
1636
|
+
getToken = () => this.read(Ee.TOKEN);
|
|
1637
|
+
// External Token
|
|
1638
|
+
setExternalToken = (e) => {
|
|
1639
|
+
this.write(Ee.EXTERNAL_TOKEN, e);
|
|
1642
1640
|
};
|
|
1643
|
-
|
|
1644
|
-
|
|
1641
|
+
getExternalToken = () => this.read(Ee.EXTERNAL_TOKEN);
|
|
1642
|
+
removeToken = () => {
|
|
1643
|
+
this.remove(Ee.TOKEN);
|
|
1645
1644
|
};
|
|
1646
1645
|
}
|
|
1647
|
-
var
|
|
1646
|
+
var Fe;
|
|
1648
1647
|
(function(t) {
|
|
1649
1648
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1650
|
-
})(
|
|
1651
|
-
const
|
|
1652
|
-
const e = new
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
const
|
|
1649
|
+
})(Fe || (Fe = {}));
|
|
1650
|
+
const Si = (t) => {
|
|
1651
|
+
const e = new Ge(), r = new ue(ce(e.getExternalToken()), "userKey"), o = new ue(ce(e.getToken()), "userToken"), s = new te(yi(o.getStore(), t), "user", (l) => l?.data?.data?.id), u = new te(mi(o.getStore(), t), "userSettings");
|
|
1652
|
+
return {
|
|
1653
|
+
userKey: r,
|
|
1654
|
+
userToken: o,
|
|
1655
|
+
user: s,
|
|
1656
|
+
userSettings: u
|
|
1657
|
+
};
|
|
1658
|
+
}, Ai = (t) => {
|
|
1659
|
+
const e = new ue(ce(void 0), "providerStreamId"), r = new te(pi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new te(di(r.getAtomStore(), t), "streamSettings");
|
|
1660
|
+
return r.getAtomStore().listen((s) => {
|
|
1661
|
+
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
1662
|
+
}), {
|
|
1663
|
+
providerStreamId: e,
|
|
1664
|
+
slStreamId: r,
|
|
1665
|
+
streamSettings: o
|
|
1666
|
+
};
|
|
1667
|
+
}, Ei = (t) => {
|
|
1668
|
+
const e = new ue(ce(void 0), "enabled"), r = new ue(ce(Fe.DISABLED), "status"), o = new te(bi(e.getStore(), t), "organizationSettings", (f) => f?.data?.id), s = new te(wi(o.getAtomStore(), t), "organizationAdvertising"), u = Si(t), l = Ai(t);
|
|
1661
1669
|
return {
|
|
1662
1670
|
enabled: e,
|
|
1663
1671
|
status: r,
|
|
1664
|
-
providerStreamId: l,
|
|
1665
|
-
slStreamId:
|
|
1666
|
-
streamSettings:
|
|
1667
|
-
user:
|
|
1668
|
-
userKey:
|
|
1669
|
-
userToken:
|
|
1670
|
-
userSettings:
|
|
1671
|
-
organizationSettings:
|
|
1672
|
-
organizationAdvertising:
|
|
1672
|
+
providerStreamId: l.providerStreamId,
|
|
1673
|
+
slStreamId: l.slStreamId,
|
|
1674
|
+
streamSettings: l.streamSettings,
|
|
1675
|
+
user: u.user,
|
|
1676
|
+
userKey: u.userKey,
|
|
1677
|
+
userToken: u.userToken,
|
|
1678
|
+
userSettings: u.userSettings,
|
|
1679
|
+
organizationSettings: o,
|
|
1680
|
+
organizationAdvertising: s
|
|
1673
1681
|
};
|
|
1674
1682
|
};
|
|
1675
|
-
class
|
|
1683
|
+
class Ii extends _t {
|
|
1676
1684
|
stores;
|
|
1677
1685
|
constructor(e) {
|
|
1678
|
-
const r =
|
|
1686
|
+
const r = Ei(e), o = ai(r);
|
|
1679
1687
|
super(o, "core"), this.stores = r;
|
|
1680
1688
|
}
|
|
1681
1689
|
getValue() {
|
|
@@ -1696,93 +1704,140 @@ class Si extends _t {
|
|
|
1696
1704
|
};
|
|
1697
1705
|
unsubscribe = () => this.getStore().off();
|
|
1698
1706
|
}
|
|
1699
|
-
class
|
|
1707
|
+
class Fi extends si {
|
|
1700
1708
|
$coreStore;
|
|
1701
1709
|
transport;
|
|
1702
|
-
|
|
1710
|
+
bypassLogin;
|
|
1703
1711
|
constructor(e, r) {
|
|
1704
|
-
super(), this.$coreStore = e, this.transport = r, this
|
|
1712
|
+
super(), this.$coreStore = e, this.transport = r, this.bypassLogin = gi(this.transport), this.connect();
|
|
1705
1713
|
}
|
|
1706
|
-
me = async () => (await this.$coreStore.getValues().user.getValue())?.data;
|
|
1707
|
-
|
|
1714
|
+
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1715
|
+
/**
|
|
1716
|
+
* Login user by token and schema.
|
|
1717
|
+
* On success, save the user and update the token to the Transport, UserStore and cache.
|
|
1718
|
+
* @param schema - schema created by the host app and provided to the StreamLayer SDK.
|
|
1719
|
+
* @param userKey - user token received from the host app.
|
|
1720
|
+
*/
|
|
1721
|
+
login = async (e, r) => {
|
|
1722
|
+
this.$coreStore.getValues().userKey.setValue(r);
|
|
1723
|
+
const o = await this.bypassLogin({ schema: e, userKey: r, init: !1 }), s = o.meta?.jwt;
|
|
1724
|
+
if (!s)
|
|
1725
|
+
throw new Error("internal: token missing");
|
|
1726
|
+
return this.$coreStore.getValues().user.getStore().mutate(o), this.saveToken(s), s;
|
|
1727
|
+
};
|
|
1708
1728
|
isAuthenticated = () => this.me();
|
|
1729
|
+
/**
|
|
1730
|
+
* Logout user. Clears the all user data from the store.
|
|
1731
|
+
*/
|
|
1709
1732
|
logout = () => {
|
|
1710
|
-
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("");
|
|
1733
|
+
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth(""), new Ge().clear();
|
|
1734
|
+
};
|
|
1735
|
+
/**
|
|
1736
|
+
* Soft logout, only clears the StreamLayer user data from the store.
|
|
1737
|
+
* Does not clear the external token. And automatically tries to re-login by external token.
|
|
1738
|
+
*/
|
|
1739
|
+
softLogout = () => {
|
|
1740
|
+
const e = new Ge();
|
|
1741
|
+
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth(""), e.setToken(""), this.reLogin();
|
|
1711
1742
|
};
|
|
1712
1743
|
/**
|
|
1713
|
-
*
|
|
1744
|
+
* Try to re-login.
|
|
1745
|
+
* - If the user has an token, then try to login by it, by calling the me() method.
|
|
1746
|
+
* - If the user has an external token, then try to login by it, by calling the login() method. On failure, logout.
|
|
1747
|
+
* -
|
|
1748
|
+
* - If no one of the above is true, then logout.
|
|
1714
1749
|
*/
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1750
|
+
reLogin = () => {
|
|
1751
|
+
const e = new Ge(), r = e.getToken(), o = e.getExternalToken();
|
|
1752
|
+
if (this.$coreStore.getValues().userKey.setValue(o), this.$coreStore.getValues().userToken.setValue(r), r)
|
|
1753
|
+
return this.saveToken(r), this.me();
|
|
1754
|
+
if (o && !r) {
|
|
1755
|
+
const s = e.getSchema();
|
|
1756
|
+
s && o && this.login(s, o).catch(() => {
|
|
1757
|
+
this.logout();
|
|
1758
|
+
});
|
|
1759
|
+
}
|
|
1760
|
+
};
|
|
1761
|
+
/**
|
|
1762
|
+
* Write token to the Transport and UserStore
|
|
1763
|
+
*/
|
|
1764
|
+
saveToken = (e) => {
|
|
1765
|
+
this.transport.setAuth(e), this.$coreStore.getValues().userToken.setValue(e), new Ge().setToken(e);
|
|
1766
|
+
};
|
|
1767
|
+
/**
|
|
1768
|
+
* Add interceptor to the Transport to handle 401 and 403 errors.
|
|
1769
|
+
* If the user is logged in (auth header is set), then make a soft logout.
|
|
1770
|
+
*/
|
|
1771
|
+
connect = () => {
|
|
1772
|
+
this.transport.registerInterceptor((e) => async (r) => {
|
|
1773
|
+
try {
|
|
1774
|
+
return await e(r);
|
|
1775
|
+
} catch (o) {
|
|
1776
|
+
throw o.code && (o.code === 7 || o.code === 16) && this.transport.getHeader("authorization") && this.softLogout(), o;
|
|
1777
|
+
}
|
|
1718
1778
|
});
|
|
1719
1779
|
};
|
|
1720
1780
|
}
|
|
1721
|
-
const
|
|
1722
|
-
t.auth = new
|
|
1723
|
-
|
|
1724
|
-
t.
|
|
1725
|
-
|
|
1726
|
-
const u = o.getSchema(), l = o.getToken();
|
|
1727
|
-
u && l && await t.auth.login(u, l);
|
|
1728
|
-
}
|
|
1729
|
-
}), t.sdk.authorizationBypass = async (s, u) => {
|
|
1730
|
-
await t.auth.login(s, u), o.setSchema("streamlayer:streamlayer");
|
|
1781
|
+
const Nt = new Ge(), Ti = (t, e, r) => {
|
|
1782
|
+
t.auth = new Fi(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1783
|
+
o === Fe.READY && t.auth.reLogin();
|
|
1784
|
+
}), t.sdk.authorizationBypass = async (o, s) => {
|
|
1785
|
+
await t.auth.login(o, s), Nt.setSchema(o), Nt.setExternalToken(s);
|
|
1731
1786
|
}, t.sdk.logout = () => {
|
|
1732
|
-
t.auth.logout();
|
|
1787
|
+
t.auth.logout(), Nt.clear();
|
|
1733
1788
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1734
|
-
},
|
|
1735
|
-
t.store = new
|
|
1789
|
+
}, Ci = (t, e, r) => {
|
|
1790
|
+
t.store = new Ii(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = t.store.getStore(), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.storeUnsubscribe = () => {
|
|
1736
1791
|
t.store.unsubscribe();
|
|
1737
1792
|
}, r();
|
|
1738
|
-
},
|
|
1793
|
+
}, _i = (t, e, r) => {
|
|
1739
1794
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1740
1795
|
if (t.stores.enabled.get() === "on")
|
|
1741
1796
|
return { enabled: !0 };
|
|
1742
|
-
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(
|
|
1797
|
+
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Fe.INITIALIZATION);
|
|
1743
1798
|
try {
|
|
1744
1799
|
const o = await t.stores.organizationSettings.getValue();
|
|
1745
|
-
return o ? (t.stores.status.setValue(
|
|
1800
|
+
return o ? (t.stores.status.setValue(Fe.READY), { enabled: !!o }) : (t.stores.status.setValue(Fe.FAILED), { err: "failed" });
|
|
1746
1801
|
} catch (o) {
|
|
1747
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1802
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(Fe.FAILED), { err: `${o}` };
|
|
1748
1803
|
}
|
|
1749
1804
|
}, t.sdk.disableApp = () => {
|
|
1750
|
-
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1805
|
+
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Fe.DISABLED), t.storeUnsubscribe());
|
|
1751
1806
|
}, t.sdk.createEventSession = (o) => {
|
|
1752
1807
|
t.stores.providerStreamId.setValue(o);
|
|
1753
1808
|
}, r();
|
|
1754
|
-
},
|
|
1809
|
+
}, Bi = Kn({
|
|
1755
1810
|
level: "trace"
|
|
1756
|
-
}),
|
|
1757
|
-
const { client: o, queryKey: s } = r.createPromiseClient(
|
|
1811
|
+
}), nn = (t, e) => Bi.child({ name: t }, e), Oi = (t, e, r) => {
|
|
1812
|
+
const { client: o, queryKey: s } = r.createPromiseClient(Wr, {
|
|
1758
1813
|
method: "summary",
|
|
1759
1814
|
params: [t, e]
|
|
1760
1815
|
});
|
|
1761
1816
|
return r.nanoquery.createFetcherStore(s, {
|
|
1762
|
-
fetcher: async (u, l, f,
|
|
1817
|
+
fetcher: async (u, l, f, d) => (await o.summary({
|
|
1763
1818
|
eventId: f,
|
|
1764
|
-
userId:
|
|
1819
|
+
userId: d
|
|
1765
1820
|
})).data?.attributes
|
|
1766
1821
|
});
|
|
1767
|
-
},
|
|
1768
|
-
const { client: o, queryKey: s } = r.createPromiseClient(
|
|
1822
|
+
}, xi = (t, e, r) => {
|
|
1823
|
+
const { client: o, queryKey: s } = r.createPromiseClient(Wr, {
|
|
1769
1824
|
method: "list",
|
|
1770
1825
|
params: [t, e]
|
|
1771
1826
|
});
|
|
1772
1827
|
return r.nanoquery.createFetcherStore(s, {
|
|
1773
|
-
fetcher: async (u, l, f,
|
|
1828
|
+
fetcher: async (u, l, f, d) => {
|
|
1774
1829
|
const A = { usersIds: [] };
|
|
1775
|
-
return f && (A.eventId = f),
|
|
1830
|
+
return f && (A.eventId = f), d && (A.leaderboardId = d), (await o.list(A)).data;
|
|
1776
1831
|
}
|
|
1777
1832
|
});
|
|
1778
|
-
},
|
|
1833
|
+
}, ki = (t, e) => {
|
|
1779
1834
|
const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "get", params: [t] });
|
|
1780
1835
|
return e.nanoquery.createFetcherStore(o, {
|
|
1781
1836
|
fetcher: async (s, u, l) => (await r.get({
|
|
1782
1837
|
eventId: l
|
|
1783
1838
|
})).data?.attributes
|
|
1784
1839
|
});
|
|
1785
|
-
},
|
|
1840
|
+
}, Pi = (t, e) => {
|
|
1786
1841
|
const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "syncQuestion", params: [t] });
|
|
1787
1842
|
return e.nanoquery.createFetcherStore(o, {
|
|
1788
1843
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1791,42 +1846,42 @@ const Ei = (t, e, r) => {
|
|
|
1791
1846
|
}
|
|
1792
1847
|
})).data?.attributes : void 0
|
|
1793
1848
|
});
|
|
1794
|
-
},
|
|
1795
|
-
const { client: r } = e.createCallbackClient(de), o =
|
|
1849
|
+
}, Ri = (t, e) => {
|
|
1850
|
+
const { client: r } = e.createCallbackClient(de), o = Ft({ eventId: t.get() || "", feedId: "" });
|
|
1796
1851
|
return t.subscribe((u = "") => {
|
|
1797
1852
|
o.set({ eventId: u, feedId: "" });
|
|
1798
1853
|
}), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
|
|
1799
|
-
},
|
|
1854
|
+
}, Ni = (t, e) => {
|
|
1800
1855
|
const { client: r } = e.createCallbackClient(de);
|
|
1801
1856
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1802
|
-
},
|
|
1857
|
+
}, Li = async (t, e) => {
|
|
1803
1858
|
const { client: r } = e.createPromiseClient(de, { method: "questionByUser", params: [t] });
|
|
1804
1859
|
return (await r.questionByUser({
|
|
1805
1860
|
questionId: t
|
|
1806
1861
|
})).data?.attributes?.question;
|
|
1807
|
-
},
|
|
1862
|
+
}, Ui = (t, e) => {
|
|
1808
1863
|
const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "questionByUser", params: [t] });
|
|
1809
1864
|
return e.nanoquery.createFetcherStore(o, {
|
|
1810
1865
|
fetcher: async (s, u, l) => (await r.questionByUser({
|
|
1811
1866
|
questionId: l
|
|
1812
1867
|
})).data?.attributes?.question
|
|
1813
1868
|
});
|
|
1814
|
-
},
|
|
1869
|
+
}, $i = (t, e) => {
|
|
1815
1870
|
const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "pickHistory", params: [t] });
|
|
1816
1871
|
return e.nanoquery.createFetcherStore(o, {
|
|
1817
1872
|
fetcher: async (s, u, l) => l ? (await r.pickHistory({
|
|
1818
1873
|
eventId: l
|
|
1819
|
-
})).data?.map(({ attributes:
|
|
1874
|
+
})).data?.map(({ attributes: d }) => d) : []
|
|
1820
1875
|
});
|
|
1821
|
-
},
|
|
1876
|
+
}, Di = (t, e) => {
|
|
1822
1877
|
const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "insightHistory", params: [t] });
|
|
1823
1878
|
return e.nanoquery.createFetcherStore(o, {
|
|
1824
1879
|
fetcher: async (s, u, l) => l ? (await r.insightHistory({
|
|
1825
1880
|
eventId: l
|
|
1826
|
-
})).data?.map(({ attributes:
|
|
1881
|
+
})).data?.map(({ attributes: d }) => d) : void 0
|
|
1827
1882
|
});
|
|
1828
|
-
},
|
|
1829
|
-
class
|
|
1883
|
+
}, on = (t) => (t.gamification || (t.gamification = new ji(t)), t.gamification);
|
|
1884
|
+
class ji {
|
|
1830
1885
|
/** sl event id */
|
|
1831
1886
|
slStreamId;
|
|
1832
1887
|
/** organization id */
|
|
@@ -1852,13 +1907,13 @@ class Li {
|
|
|
1852
1907
|
constructor(e) {
|
|
1853
1908
|
if (e.gamification)
|
|
1854
1909
|
throw new Error("GamificationBackground Singleton error");
|
|
1855
|
-
this.log =
|
|
1856
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
1910
|
+
this.log = nn("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ue(ce(void 0), "moderationId").getStore(), this.openedQuestionId = new ue(ce(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new te(ki(this.slStreamId, e.transport), "gamification:moderation"), this.activeQuestionId = new te(Pi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = new te(Ui(this.openedQuestionId, e.transport), "gamification:openedQuestion"), this.openedQuestionId.listen((r) => {
|
|
1911
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Ni(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
1857
1912
|
window.requestAnimationFrame(() => {
|
|
1858
|
-
this.openedQuestion
|
|
1913
|
+
this.openedQuestion.getStore().mutate(o.data?.attributes?.question);
|
|
1859
1914
|
});
|
|
1860
|
-
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.
|
|
1861
|
-
}), this.feedSubscription =
|
|
1915
|
+
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1916
|
+
}), this.feedSubscription = Ri(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1862
1917
|
window.requestAnimationFrame(() => {
|
|
1863
1918
|
const o = this.activeQuestionId.getStore();
|
|
1864
1919
|
o && o.mutate(r.data?.attributes);
|
|
@@ -1893,7 +1948,7 @@ class Li {
|
|
|
1893
1948
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1894
1949
|
};
|
|
1895
1950
|
}
|
|
1896
|
-
class
|
|
1951
|
+
class Mi {
|
|
1897
1952
|
notificationsList;
|
|
1898
1953
|
notifications;
|
|
1899
1954
|
store;
|
|
@@ -1903,7 +1958,7 @@ class $i {
|
|
|
1903
1958
|
options;
|
|
1904
1959
|
logger;
|
|
1905
1960
|
constructor(e) {
|
|
1906
|
-
this.options = e, this.logger =
|
|
1961
|
+
this.options = e, this.logger = nn("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new ue(ce(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = hr(this.notifications.getStore(), (r) => r ? [...r.values()] : []);
|
|
1907
1962
|
}
|
|
1908
1963
|
addToQueue = (e) => {
|
|
1909
1964
|
if (this.store.has(e.id)) {
|
|
@@ -1963,18 +2018,18 @@ class $i {
|
|
|
1963
2018
|
this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding");
|
|
1964
2019
|
};
|
|
1965
2020
|
}
|
|
1966
|
-
var
|
|
2021
|
+
var bt;
|
|
1967
2022
|
(function(t) {
|
|
1968
2023
|
t.OPENED = "opened";
|
|
1969
|
-
})(
|
|
1970
|
-
class
|
|
2024
|
+
})(bt || (bt = {}));
|
|
2025
|
+
class Vi extends pr {
|
|
1971
2026
|
constructor() {
|
|
1972
2027
|
super("notification");
|
|
1973
2028
|
}
|
|
1974
2029
|
setOpened = (e) => {
|
|
1975
|
-
this.write(
|
|
2030
|
+
this.write(bt.OPENED, e, "true");
|
|
1976
2031
|
};
|
|
1977
|
-
isOpened = (e) => this.read(
|
|
2032
|
+
isOpened = (e) => this.read(bt.OPENED, e);
|
|
1978
2033
|
clearNotification = () => {
|
|
1979
2034
|
this.clear();
|
|
1980
2035
|
};
|
|
@@ -1983,11 +2038,11 @@ var He;
|
|
|
1983
2038
|
(function(t) {
|
|
1984
2039
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION";
|
|
1985
2040
|
})(He || (He = {}));
|
|
1986
|
-
class
|
|
2041
|
+
class qi {
|
|
1987
2042
|
queue;
|
|
1988
2043
|
storage;
|
|
1989
2044
|
constructor(e = {}) {
|
|
1990
|
-
this.storage = new
|
|
2045
|
+
this.storage = new Vi(), this.queue = new Mi({ concurrency: 1, animationDelay: 300, ...e });
|
|
1991
2046
|
}
|
|
1992
2047
|
add = (e) => {
|
|
1993
2048
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2000,37 +2055,37 @@ class ji {
|
|
|
2000
2055
|
this.storage.setOpened(e);
|
|
2001
2056
|
};
|
|
2002
2057
|
}
|
|
2003
|
-
const
|
|
2004
|
-
t.notifications = new
|
|
2005
|
-
},
|
|
2058
|
+
const Gi = (t, e, r) => {
|
|
2059
|
+
t.notifications = new qi(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2060
|
+
}, Qi = (t, e) => {
|
|
2006
2061
|
const { client: r } = t.createPromiseClient(de, { method: "submitAnswer" });
|
|
2007
2062
|
return r.submitAnswer({ data: e });
|
|
2008
|
-
},
|
|
2063
|
+
}, zi = (t, e) => {
|
|
2009
2064
|
const { client: r } = t.createPromiseClient(de, { method: "submitInplay" });
|
|
2010
2065
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2011
|
-
},
|
|
2066
|
+
}, Ki = (t, e) => {
|
|
2012
2067
|
const { client: r } = t.createPromiseClient(de, { method: "skipQuestion" });
|
|
2013
2068
|
return r.skipQuestion({ data: { id: e } });
|
|
2014
2069
|
};
|
|
2015
|
-
var
|
|
2070
|
+
var wt;
|
|
2016
2071
|
(function(t) {
|
|
2017
2072
|
t.ONBOARDING = "onboarding";
|
|
2018
|
-
})(
|
|
2019
|
-
class
|
|
2073
|
+
})(wt || (wt = {}));
|
|
2074
|
+
class Hi extends pr {
|
|
2020
2075
|
constructor() {
|
|
2021
2076
|
super("gamification");
|
|
2022
2077
|
}
|
|
2023
2078
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }, s) => {
|
|
2024
|
-
this.write(
|
|
2079
|
+
this.write(wt.ONBOARDING, o, e, r, s);
|
|
2025
2080
|
};
|
|
2026
|
-
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(
|
|
2081
|
+
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(wt.ONBOARDING, o, e, r);
|
|
2027
2082
|
}
|
|
2028
|
-
const
|
|
2083
|
+
const Ir = /* @__PURE__ */ new Set([ze.POLL, ze.PREDICTION, ze.TRIVIA]);
|
|
2029
2084
|
var Z;
|
|
2030
2085
|
(function(t) {
|
|
2031
2086
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2032
2087
|
})(Z || (Z = {}));
|
|
2033
|
-
class
|
|
2088
|
+
class Wi extends lr {
|
|
2034
2089
|
/** user statistics (leaderboard panel) */
|
|
2035
2090
|
userSummary;
|
|
2036
2091
|
/** questions list (pick history) */
|
|
@@ -2052,17 +2107,14 @@ class zi extends cr {
|
|
|
2052
2107
|
/** Browser cache */
|
|
2053
2108
|
storage;
|
|
2054
2109
|
constructor(e, r, o) {
|
|
2055
|
-
super(e, r), this.background =
|
|
2056
|
-
if (s.data?.type && Ar.has(s.data.type))
|
|
2057
|
-
return s.data;
|
|
2058
|
-
}), this.leaderboardList = new te(Ti(this.background.slStreamId, this.leaderboardId, o.transport), "gamification:leaderboardList"), this.onboardingStatus.subscribe((s) => {
|
|
2110
|
+
super(e, r), this.background = on(o), this.storage = new Hi(), this.userSummary = new te(Oi(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.questions = new te($i(this.background.slStreamId, o.transport), "gamification:questions"), this.leaderboardId = new ue(ce(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = new ue(ce(Z.Unset), "onboardingStatus").getStore(), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ae.GAMES), this.openedQuestion = hr(this.background.openedQuestion.getStore(), (s) => s.data?.type && Ir.has(s.data.type) ? { loading: !1, data: s.data } : { loading: s.loading, data: void 0 }), this.leaderboardList = new te(xi(this.background.slStreamId, this.leaderboardId, o.transport), "gamification:leaderboardList"), this.onboardingStatus.subscribe((s) => {
|
|
2059
2111
|
(s === Z.Optional || Z.Required) && this.showOnboardingInApp();
|
|
2060
2112
|
}), this.status.subscribe((s) => {
|
|
2061
|
-
s ===
|
|
2113
|
+
s === Le.Ready ? (this.notifications.close(this.background.getCurrentSessionId({ prefix: "onboarding" })), this.connect(o.transport)) : this.disconnect();
|
|
2062
2114
|
}), this.onboardingStatus.subscribe((s) => {
|
|
2063
2115
|
s && this.background.activeQuestionId.invalidate();
|
|
2064
2116
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2065
|
-
s && s.data && this.onboardingStatus.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !==
|
|
2117
|
+
s && s.data && this.onboardingStatus.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== zr.ON && Ir.has(s.data.question.type) && s.data.question.status === Yt.ACTIVE && this.notifications.add({
|
|
2066
2118
|
type: He.QUESTION,
|
|
2067
2119
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2068
2120
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
@@ -2130,10 +2182,10 @@ class zi extends cr {
|
|
|
2130
2182
|
if (!o)
|
|
2131
2183
|
return;
|
|
2132
2184
|
const { status: s, type: u, id: l } = o;
|
|
2133
|
-
if (s ===
|
|
2185
|
+
if (s === Yt.RESOLVED && u === ze.PREDICTION) {
|
|
2134
2186
|
const f = this.background.getCurrentSessionId({
|
|
2135
2187
|
prefix: `notification-id:${l}`
|
|
2136
|
-
}), A = (await
|
|
2188
|
+
}), A = (await Li(l, e))?.answers.find(({ correct: g }) => g);
|
|
2137
2189
|
this.notifications.add({
|
|
2138
2190
|
type: He.ONBOARDING,
|
|
2139
2191
|
action: () => this.openQuestion(l),
|
|
@@ -2158,22 +2210,22 @@ class zi extends cr {
|
|
|
2158
2210
|
// onboarding
|
|
2159
2211
|
submitInplay = async () => {
|
|
2160
2212
|
const e = this.background.slStreamId.get();
|
|
2161
|
-
e && (await
|
|
2213
|
+
e && (await zi(this.transport, e), this.onboardingStatus.set(Z.Completed), this.storage.saveOnboardingStatus({
|
|
2162
2214
|
organizationId: this.background.organizationId.get() || "",
|
|
2163
2215
|
userId: this.background.userId.get() || "",
|
|
2164
2216
|
eventId: e
|
|
2165
2217
|
}, Z.Completed));
|
|
2166
2218
|
};
|
|
2167
2219
|
submitAnswer = async (e, r) => {
|
|
2168
|
-
await
|
|
2220
|
+
await Qi(this.transport, { questionId: e, answerId: r }), this.questions?.invalidate();
|
|
2169
2221
|
};
|
|
2170
2222
|
skipQuestion = async (e) => {
|
|
2171
|
-
await
|
|
2223
|
+
await Ki(this.transport, e), this.questions?.invalidate();
|
|
2172
2224
|
};
|
|
2173
2225
|
openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
|
|
2174
2226
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
2175
2227
|
}
|
|
2176
|
-
class
|
|
2228
|
+
class Ji extends lr {
|
|
2177
2229
|
insights;
|
|
2178
2230
|
closeFeature;
|
|
2179
2231
|
openFeature;
|
|
@@ -2182,10 +2234,10 @@ class Hi extends cr {
|
|
|
2182
2234
|
transport;
|
|
2183
2235
|
background;
|
|
2184
2236
|
constructor(e, r, o) {
|
|
2185
|
-
super(e, r), this.background =
|
|
2186
|
-
s ===
|
|
2237
|
+
super(e, r), this.background = on(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ae.HIGHLIGHTS), this.status.subscribe((s) => {
|
|
2238
|
+
s === Le.Ready ? this.connect() : this.disconnect();
|
|
2187
2239
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2188
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !==
|
|
2240
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== zr.ON && s.data.question.type === ze.FACTOID && s.data.question.status === Yt.ACTIVE && this.notifications.add({
|
|
2189
2241
|
type: He.QUESTION,
|
|
2190
2242
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2191
2243
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
@@ -2199,13 +2251,13 @@ class Hi extends cr {
|
|
|
2199
2251
|
imagePosition: s.data.question.notification.imagePosition
|
|
2200
2252
|
}
|
|
2201
2253
|
});
|
|
2202
|
-
}), this.openedInsight =
|
|
2203
|
-
if (s.data?.type ===
|
|
2254
|
+
}), this.openedInsight = hr(this.background.openedQuestion.getStore(), (s) => {
|
|
2255
|
+
if (s.data?.type === ze.FACTOID)
|
|
2204
2256
|
return s.data;
|
|
2205
2257
|
});
|
|
2206
2258
|
}
|
|
2207
2259
|
connect = () => {
|
|
2208
|
-
this.insights ? this.insights.invalidate() : this.insights = new te(
|
|
2260
|
+
this.insights ? this.insights.invalidate() : this.insights = new te(Di(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
|
|
2209
2261
|
window.requestAnimationFrame(() => {
|
|
2210
2262
|
this.insights?.invalidate();
|
|
2211
2263
|
});
|
|
@@ -2217,19 +2269,19 @@ class Hi extends cr {
|
|
|
2217
2269
|
openHighlight = (e) => (this.openFeature(), this.background.openQuestion(e));
|
|
2218
2270
|
closeHighlight = (e) => this.background.closeQuestion(e);
|
|
2219
2271
|
}
|
|
2220
|
-
|
|
2221
|
-
class
|
|
2272
|
+
ae.GAMES + "", ae.HIGHLIGHTS + "";
|
|
2273
|
+
class Yi extends lr {
|
|
2222
2274
|
constructor(e, r) {
|
|
2223
2275
|
super(e, r);
|
|
2224
2276
|
}
|
|
2225
2277
|
}
|
|
2226
|
-
const
|
|
2227
|
-
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new
|
|
2278
|
+
const Xi = (t, e, r) => t.type === ae.GAMES ? new Wi(t, e, r) : t.type === ae.HIGHLIGHTS ? new Ji(t, e, r) : new Yi(t, e), Zi = (t, e, r) => {
|
|
2279
|
+
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new ue(ce(ae.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
|
|
2228
2280
|
t.activeFeature.setValue(o);
|
|
2229
2281
|
}, t.sdk.closeFeature = () => {
|
|
2230
|
-
t.activeFeature.setValue(
|
|
2231
|
-
}, t.initFeature = (o, s =
|
|
2232
|
-
const u =
|
|
2282
|
+
t.activeFeature.setValue(ae.UNSET);
|
|
2283
|
+
}, t.initFeature = (o, s = Ie.ORGANIZATION) => {
|
|
2284
|
+
const u = Xi(o, s, t);
|
|
2233
2285
|
t.features.set(o.type, u);
|
|
2234
2286
|
}, t.updateFeature = (o, s) => {
|
|
2235
2287
|
t.features.get(o.type)?.update(o, s);
|
|
@@ -2239,13 +2291,13 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
|
|
|
2239
2291
|
const o = await t.stores.organizationSettings.getValue();
|
|
2240
2292
|
t.features.clear();
|
|
2241
2293
|
for (const s of o?.overlays || [])
|
|
2242
|
-
t.initFeature(s,
|
|
2294
|
+
t.initFeature(s, Ie.ORGANIZATION);
|
|
2243
2295
|
}, t.stores.providerStreamId.listen((o) => {
|
|
2244
2296
|
o || t.reinitializeFeatures();
|
|
2245
2297
|
}), t.storeSubscribe = () => {
|
|
2246
2298
|
const o = (u, l) => {
|
|
2247
2299
|
if (l?.overlays) {
|
|
2248
|
-
u ===
|
|
2300
|
+
u === Ie.STREAM && t.features.clear();
|
|
2249
2301
|
for (const f of l.overlays)
|
|
2250
2302
|
f.sdkEnable === !0 && (t.features.has(f.type) ? t.updateFeature(f, u) : t.initFeature(f, u));
|
|
2251
2303
|
}
|
|
@@ -2262,7 +2314,7 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
|
|
|
2262
2314
|
organizationSettings: (u) => {
|
|
2263
2315
|
if (u.data)
|
|
2264
2316
|
try {
|
|
2265
|
-
o(
|
|
2317
|
+
o(Ie.ORGANIZATION, u.data);
|
|
2266
2318
|
} catch (l) {
|
|
2267
2319
|
console.log(l);
|
|
2268
2320
|
}
|
|
@@ -2270,7 +2322,7 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
|
|
|
2270
2322
|
streamSettings: (u) => {
|
|
2271
2323
|
if (u.data)
|
|
2272
2324
|
try {
|
|
2273
|
-
o(
|
|
2325
|
+
o(Ie.STREAM, u.data);
|
|
2274
2326
|
} catch (l) {
|
|
2275
2327
|
console.log(l);
|
|
2276
2328
|
}
|
|
@@ -2279,8 +2331,8 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
|
|
|
2279
2331
|
t.store.subscribe(s);
|
|
2280
2332
|
}, r();
|
|
2281
2333
|
};
|
|
2282
|
-
var
|
|
2283
|
-
function
|
|
2334
|
+
var dr = { exports: {} }, yr = { exports: {} };
|
|
2335
|
+
function eo(t) {
|
|
2284
2336
|
var e = new t(), r = e;
|
|
2285
2337
|
function o() {
|
|
2286
2338
|
var u = e;
|
|
@@ -2294,21 +2346,21 @@ function Yi(t) {
|
|
|
2294
2346
|
release: s
|
|
2295
2347
|
};
|
|
2296
2348
|
}
|
|
2297
|
-
var
|
|
2298
|
-
function
|
|
2349
|
+
var to = eo, ro = to;
|
|
2350
|
+
function sn(t, e, r) {
|
|
2299
2351
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2300
2352
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2301
|
-
var o =
|
|
2302
|
-
push:
|
|
2353
|
+
var o = ro(no), s = null, u = null, l = 0, f = null, d = {
|
|
2354
|
+
push: L,
|
|
2303
2355
|
drain: se,
|
|
2304
2356
|
saturated: se,
|
|
2305
2357
|
pause: g,
|
|
2306
2358
|
paused: !1,
|
|
2307
2359
|
concurrency: r,
|
|
2308
2360
|
running: A,
|
|
2309
|
-
resume:
|
|
2361
|
+
resume: C,
|
|
2310
2362
|
idle: R,
|
|
2311
|
-
length:
|
|
2363
|
+
length: v,
|
|
2312
2364
|
getQueue: E,
|
|
2313
2365
|
unshift: Q,
|
|
2314
2366
|
empty: se,
|
|
@@ -2316,14 +2368,14 @@ function on(t, e, r) {
|
|
|
2316
2368
|
killAndDrain: ye,
|
|
2317
2369
|
error: ee
|
|
2318
2370
|
};
|
|
2319
|
-
return
|
|
2371
|
+
return d;
|
|
2320
2372
|
function A() {
|
|
2321
2373
|
return l;
|
|
2322
2374
|
}
|
|
2323
2375
|
function g() {
|
|
2324
|
-
|
|
2376
|
+
d.paused = !0;
|
|
2325
2377
|
}
|
|
2326
|
-
function
|
|
2378
|
+
function v() {
|
|
2327
2379
|
for (var x = s, j = 0; x; )
|
|
2328
2380
|
x = x.next, j++;
|
|
2329
2381
|
return j;
|
|
@@ -2333,34 +2385,34 @@ function on(t, e, r) {
|
|
|
2333
2385
|
j.push(x.value), x = x.next;
|
|
2334
2386
|
return j;
|
|
2335
2387
|
}
|
|
2336
|
-
function
|
|
2337
|
-
if (
|
|
2338
|
-
|
|
2339
|
-
for (var x = 0; x <
|
|
2388
|
+
function C() {
|
|
2389
|
+
if (d.paused) {
|
|
2390
|
+
d.paused = !1;
|
|
2391
|
+
for (var x = 0; x < d.concurrency; x++)
|
|
2340
2392
|
l++, z();
|
|
2341
2393
|
}
|
|
2342
2394
|
}
|
|
2343
2395
|
function R() {
|
|
2344
|
-
return l === 0 &&
|
|
2396
|
+
return l === 0 && d.length() === 0;
|
|
2345
2397
|
}
|
|
2346
|
-
function
|
|
2398
|
+
function L(x, j) {
|
|
2347
2399
|
var B = o.get();
|
|
2348
|
-
B.context = t, B.release = z, B.value = x, B.callback = j || se, B.errorHandler = f, l ===
|
|
2400
|
+
B.context = t, B.release = z, B.value = x, B.callback = j || se, B.errorHandler = f, l === d.concurrency || d.paused ? u ? (u.next = B, u = B) : (s = B, u = B, d.saturated()) : (l++, e.call(t, B.value, B.worked));
|
|
2349
2401
|
}
|
|
2350
2402
|
function Q(x, j) {
|
|
2351
2403
|
var B = o.get();
|
|
2352
|
-
B.context = t, B.release = z, B.value = x, B.callback = j || se, l ===
|
|
2404
|
+
B.context = t, B.release = z, B.value = x, B.callback = j || se, l === d.concurrency || d.paused ? s ? (B.next = s, s = B) : (s = B, u = B, d.saturated()) : (l++, e.call(t, B.value, B.worked));
|
|
2353
2405
|
}
|
|
2354
2406
|
function z(x) {
|
|
2355
2407
|
x && o.release(x);
|
|
2356
2408
|
var j = s;
|
|
2357
|
-
j ?
|
|
2409
|
+
j ? d.paused ? l-- : (u === s && (u = null), s = j.next, j.next = null, e.call(t, j.value, j.worked), u === null && d.empty()) : --l === 0 && d.drain();
|
|
2358
2410
|
}
|
|
2359
2411
|
function X() {
|
|
2360
|
-
s = null, u = null,
|
|
2412
|
+
s = null, u = null, d.drain = se;
|
|
2361
2413
|
}
|
|
2362
2414
|
function ye() {
|
|
2363
|
-
s = null, u = null,
|
|
2415
|
+
s = null, u = null, d.drain(), d.drain = se;
|
|
2364
2416
|
}
|
|
2365
2417
|
function ee(x) {
|
|
2366
2418
|
f = x;
|
|
@@ -2368,7 +2420,7 @@ function on(t, e, r) {
|
|
|
2368
2420
|
}
|
|
2369
2421
|
function se() {
|
|
2370
2422
|
}
|
|
2371
|
-
function
|
|
2423
|
+
function no() {
|
|
2372
2424
|
this.value = null, this.callback = se, this.next = null, this.release = se, this.context = null, this.errorHandler = null;
|
|
2373
2425
|
var t = this;
|
|
2374
2426
|
this.worked = function(r, o) {
|
|
@@ -2376,106 +2428,106 @@ function eo() {
|
|
|
2376
2428
|
t.value = null, t.callback = se, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
|
|
2377
2429
|
};
|
|
2378
2430
|
}
|
|
2379
|
-
function
|
|
2431
|
+
function io(t, e, r) {
|
|
2380
2432
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2381
|
-
function o(g,
|
|
2433
|
+
function o(g, v) {
|
|
2382
2434
|
e.call(this, g).then(function(E) {
|
|
2383
|
-
|
|
2384
|
-
},
|
|
2435
|
+
v(null, E);
|
|
2436
|
+
}, v);
|
|
2385
2437
|
}
|
|
2386
|
-
var s =
|
|
2387
|
-
return s.push = f, s.unshift =
|
|
2438
|
+
var s = sn(t, o, r), u = s.push, l = s.unshift;
|
|
2439
|
+
return s.push = f, s.unshift = d, s.drained = A, s;
|
|
2388
2440
|
function f(g) {
|
|
2389
|
-
var
|
|
2390
|
-
u(g, function(R,
|
|
2441
|
+
var v = new Promise(function(E, C) {
|
|
2442
|
+
u(g, function(R, L) {
|
|
2391
2443
|
if (R) {
|
|
2392
|
-
|
|
2444
|
+
C(R);
|
|
2393
2445
|
return;
|
|
2394
2446
|
}
|
|
2395
|
-
E(
|
|
2447
|
+
E(L);
|
|
2396
2448
|
});
|
|
2397
2449
|
});
|
|
2398
|
-
return
|
|
2450
|
+
return v.catch(se), v;
|
|
2399
2451
|
}
|
|
2400
|
-
function
|
|
2401
|
-
var
|
|
2402
|
-
l(g, function(R,
|
|
2452
|
+
function d(g) {
|
|
2453
|
+
var v = new Promise(function(E, C) {
|
|
2454
|
+
l(g, function(R, L) {
|
|
2403
2455
|
if (R) {
|
|
2404
|
-
|
|
2456
|
+
C(R);
|
|
2405
2457
|
return;
|
|
2406
2458
|
}
|
|
2407
|
-
E(
|
|
2459
|
+
E(L);
|
|
2408
2460
|
});
|
|
2409
2461
|
});
|
|
2410
|
-
return
|
|
2462
|
+
return v.catch(se), v;
|
|
2411
2463
|
}
|
|
2412
2464
|
function A() {
|
|
2413
2465
|
if (s.idle())
|
|
2414
2466
|
return new Promise(function(E) {
|
|
2415
2467
|
E();
|
|
2416
2468
|
});
|
|
2417
|
-
var g = s.drain,
|
|
2469
|
+
var g = s.drain, v = new Promise(function(E) {
|
|
2418
2470
|
s.drain = function() {
|
|
2419
2471
|
g(), E();
|
|
2420
2472
|
};
|
|
2421
2473
|
});
|
|
2422
|
-
return
|
|
2474
|
+
return v;
|
|
2423
2475
|
}
|
|
2424
2476
|
}
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
var
|
|
2477
|
+
yr.exports = sn;
|
|
2478
|
+
yr.exports.promise = io;
|
|
2479
|
+
var an = yr.exports, gr = { exports: {} }, We = typeof Reflect == "object" ? Reflect : null, Fr = We && typeof We.apply == "function" ? We.apply : function(e, r, o) {
|
|
2428
2480
|
return Function.prototype.apply.call(e, r, o);
|
|
2429
|
-
},
|
|
2430
|
-
|
|
2481
|
+
}, pt;
|
|
2482
|
+
We && typeof We.ownKeys == "function" ? pt = We.ownKeys : Object.getOwnPropertySymbols ? pt = function(e) {
|
|
2431
2483
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2432
|
-
} :
|
|
2484
|
+
} : pt = function(e) {
|
|
2433
2485
|
return Object.getOwnPropertyNames(e);
|
|
2434
2486
|
};
|
|
2435
|
-
function
|
|
2487
|
+
function oo(t) {
|
|
2436
2488
|
console && console.warn && console.warn(t);
|
|
2437
2489
|
}
|
|
2438
|
-
var
|
|
2490
|
+
var un = Number.isNaN || function(e) {
|
|
2439
2491
|
return e !== e;
|
|
2440
2492
|
};
|
|
2441
2493
|
function $() {
|
|
2442
2494
|
$.init.call(this);
|
|
2443
2495
|
}
|
|
2444
|
-
|
|
2445
|
-
|
|
2496
|
+
gr.exports = $;
|
|
2497
|
+
gr.exports.once = co;
|
|
2446
2498
|
$.EventEmitter = $;
|
|
2447
2499
|
$.prototype._events = void 0;
|
|
2448
2500
|
$.prototype._eventsCount = 0;
|
|
2449
2501
|
$.prototype._maxListeners = void 0;
|
|
2450
|
-
var
|
|
2451
|
-
function
|
|
2502
|
+
var Tr = 10;
|
|
2503
|
+
function Bt(t) {
|
|
2452
2504
|
if (typeof t != "function")
|
|
2453
2505
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
2454
2506
|
}
|
|
2455
2507
|
Object.defineProperty($, "defaultMaxListeners", {
|
|
2456
2508
|
enumerable: !0,
|
|
2457
2509
|
get: function() {
|
|
2458
|
-
return
|
|
2510
|
+
return Tr;
|
|
2459
2511
|
},
|
|
2460
2512
|
set: function(t) {
|
|
2461
|
-
if (typeof t != "number" || t < 0 ||
|
|
2513
|
+
if (typeof t != "number" || t < 0 || un(t))
|
|
2462
2514
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2463
|
-
|
|
2515
|
+
Tr = t;
|
|
2464
2516
|
}
|
|
2465
2517
|
});
|
|
2466
2518
|
$.init = function() {
|
|
2467
2519
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2468
2520
|
};
|
|
2469
2521
|
$.prototype.setMaxListeners = function(e) {
|
|
2470
|
-
if (typeof e != "number" || e < 0 ||
|
|
2522
|
+
if (typeof e != "number" || e < 0 || un(e))
|
|
2471
2523
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2472
2524
|
return this._maxListeners = e, this;
|
|
2473
2525
|
};
|
|
2474
|
-
function
|
|
2526
|
+
function cn(t) {
|
|
2475
2527
|
return t._maxListeners === void 0 ? $.defaultMaxListeners : t._maxListeners;
|
|
2476
2528
|
}
|
|
2477
2529
|
$.prototype.getMaxListeners = function() {
|
|
2478
|
-
return
|
|
2530
|
+
return cn(this);
|
|
2479
2531
|
};
|
|
2480
2532
|
$.prototype.emit = function(e) {
|
|
2481
2533
|
for (var r = [], o = 1; o < arguments.length; o++)
|
|
@@ -2492,55 +2544,55 @@ $.prototype.emit = function(e) {
|
|
|
2492
2544
|
var f = new Error("Unhandled error." + (l ? " (" + l.message + ")" : ""));
|
|
2493
2545
|
throw f.context = l, f;
|
|
2494
2546
|
}
|
|
2495
|
-
var
|
|
2496
|
-
if (
|
|
2547
|
+
var d = u[e];
|
|
2548
|
+
if (d === void 0)
|
|
2497
2549
|
return !1;
|
|
2498
|
-
if (typeof
|
|
2499
|
-
|
|
2550
|
+
if (typeof d == "function")
|
|
2551
|
+
Fr(d, this, r);
|
|
2500
2552
|
else
|
|
2501
|
-
for (var A =
|
|
2502
|
-
|
|
2553
|
+
for (var A = d.length, g = dn(d, A), o = 0; o < A; ++o)
|
|
2554
|
+
Fr(g[o], this, r);
|
|
2503
2555
|
return !0;
|
|
2504
2556
|
};
|
|
2505
|
-
function
|
|
2557
|
+
function fn(t, e, r, o) {
|
|
2506
2558
|
var s, u, l;
|
|
2507
|
-
if (
|
|
2559
|
+
if (Bt(r), u = t._events, u === void 0 ? (u = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (u.newListener !== void 0 && (t.emit(
|
|
2508
2560
|
"newListener",
|
|
2509
2561
|
e,
|
|
2510
2562
|
r.listener ? r.listener : r
|
|
2511
2563
|
), u = t._events), l = u[e]), l === void 0)
|
|
2512
2564
|
l = u[e] = r, ++t._eventsCount;
|
|
2513
|
-
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s =
|
|
2565
|
+
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = cn(t), s > 0 && l.length > s && !l.warned) {
|
|
2514
2566
|
l.warned = !0;
|
|
2515
2567
|
var f = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2516
|
-
f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length,
|
|
2568
|
+
f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length, oo(f);
|
|
2517
2569
|
}
|
|
2518
2570
|
return t;
|
|
2519
2571
|
}
|
|
2520
2572
|
$.prototype.addListener = function(e, r) {
|
|
2521
|
-
return
|
|
2573
|
+
return fn(this, e, r, !1);
|
|
2522
2574
|
};
|
|
2523
2575
|
$.prototype.on = $.prototype.addListener;
|
|
2524
2576
|
$.prototype.prependListener = function(e, r) {
|
|
2525
|
-
return
|
|
2577
|
+
return fn(this, e, r, !0);
|
|
2526
2578
|
};
|
|
2527
|
-
function
|
|
2579
|
+
function so() {
|
|
2528
2580
|
if (!this.fired)
|
|
2529
2581
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
2530
2582
|
}
|
|
2531
|
-
function
|
|
2532
|
-
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
2583
|
+
function ln(t, e, r) {
|
|
2584
|
+
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = so.bind(o);
|
|
2533
2585
|
return s.listener = r, o.wrapFn = s, s;
|
|
2534
2586
|
}
|
|
2535
2587
|
$.prototype.once = function(e, r) {
|
|
2536
|
-
return
|
|
2588
|
+
return Bt(r), this.on(e, ln(this, e, r)), this;
|
|
2537
2589
|
};
|
|
2538
2590
|
$.prototype.prependOnceListener = function(e, r) {
|
|
2539
|
-
return
|
|
2591
|
+
return Bt(r), this.prependListener(e, ln(this, e, r)), this;
|
|
2540
2592
|
};
|
|
2541
2593
|
$.prototype.removeListener = function(e, r) {
|
|
2542
2594
|
var o, s, u, l, f;
|
|
2543
|
-
if (
|
|
2595
|
+
if (Bt(r), s = this._events, s === void 0)
|
|
2544
2596
|
return this;
|
|
2545
2597
|
if (o = s[e], o === void 0)
|
|
2546
2598
|
return this;
|
|
@@ -2554,7 +2606,7 @@ $.prototype.removeListener = function(e, r) {
|
|
|
2554
2606
|
}
|
|
2555
2607
|
if (u < 0)
|
|
2556
2608
|
return this;
|
|
2557
|
-
u === 0 ? o.shift() :
|
|
2609
|
+
u === 0 ? o.shift() : ao(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, f || r);
|
|
2558
2610
|
}
|
|
2559
2611
|
return this;
|
|
2560
2612
|
};
|
|
@@ -2578,24 +2630,24 @@ $.prototype.removeAllListeners = function(e) {
|
|
|
2578
2630
|
this.removeListener(e, r[s]);
|
|
2579
2631
|
return this;
|
|
2580
2632
|
};
|
|
2581
|
-
function
|
|
2633
|
+
function hn(t, e, r) {
|
|
2582
2634
|
var o = t._events;
|
|
2583
2635
|
if (o === void 0)
|
|
2584
2636
|
return [];
|
|
2585
2637
|
var s = o[e];
|
|
2586
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
2638
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? uo(s) : dn(s, s.length);
|
|
2587
2639
|
}
|
|
2588
2640
|
$.prototype.listeners = function(e) {
|
|
2589
|
-
return
|
|
2641
|
+
return hn(this, e, !0);
|
|
2590
2642
|
};
|
|
2591
2643
|
$.prototype.rawListeners = function(e) {
|
|
2592
|
-
return
|
|
2644
|
+
return hn(this, e, !1);
|
|
2593
2645
|
};
|
|
2594
2646
|
$.listenerCount = function(t, e) {
|
|
2595
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
2647
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : pn.call(t, e);
|
|
2596
2648
|
};
|
|
2597
|
-
$.prototype.listenerCount =
|
|
2598
|
-
function
|
|
2649
|
+
$.prototype.listenerCount = pn;
|
|
2650
|
+
function pn(t) {
|
|
2599
2651
|
var e = this._events;
|
|
2600
2652
|
if (e !== void 0) {
|
|
2601
2653
|
var r = e[t];
|
|
@@ -2607,24 +2659,24 @@ function hn(t) {
|
|
|
2607
2659
|
return 0;
|
|
2608
2660
|
}
|
|
2609
2661
|
$.prototype.eventNames = function() {
|
|
2610
|
-
return this._eventsCount > 0 ?
|
|
2662
|
+
return this._eventsCount > 0 ? pt(this._events) : [];
|
|
2611
2663
|
};
|
|
2612
|
-
function
|
|
2664
|
+
function dn(t, e) {
|
|
2613
2665
|
for (var r = new Array(e), o = 0; o < e; ++o)
|
|
2614
2666
|
r[o] = t[o];
|
|
2615
2667
|
return r;
|
|
2616
2668
|
}
|
|
2617
|
-
function
|
|
2669
|
+
function ao(t, e) {
|
|
2618
2670
|
for (; e + 1 < t.length; e++)
|
|
2619
2671
|
t[e] = t[e + 1];
|
|
2620
2672
|
t.pop();
|
|
2621
2673
|
}
|
|
2622
|
-
function
|
|
2674
|
+
function uo(t) {
|
|
2623
2675
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2624
2676
|
e[r] = t[r].listener || t[r];
|
|
2625
2677
|
return e;
|
|
2626
2678
|
}
|
|
2627
|
-
function
|
|
2679
|
+
function co(t, e) {
|
|
2628
2680
|
return new Promise(function(r, o) {
|
|
2629
2681
|
function s(l) {
|
|
2630
2682
|
t.removeListener(e, u), o(l);
|
|
@@ -2632,13 +2684,13 @@ function so(t, e) {
|
|
|
2632
2684
|
function u() {
|
|
2633
2685
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
2634
2686
|
}
|
|
2635
|
-
|
|
2687
|
+
yn(t, e, u, { once: !0 }), e !== "error" && fo(t, s, { once: !0 });
|
|
2636
2688
|
});
|
|
2637
2689
|
}
|
|
2638
|
-
function
|
|
2639
|
-
typeof t.on == "function" &&
|
|
2690
|
+
function fo(t, e, r) {
|
|
2691
|
+
typeof t.on == "function" && yn(t, "error", e, r);
|
|
2640
2692
|
}
|
|
2641
|
-
function
|
|
2693
|
+
function yn(t, e, r, o) {
|
|
2642
2694
|
if (typeof t.on == "function")
|
|
2643
2695
|
o.once ? t.once(e, r) : t.on(e, r);
|
|
2644
2696
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2648,7 +2700,7 @@ function dn(t, e, r, o) {
|
|
|
2648
2700
|
else
|
|
2649
2701
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2650
2702
|
}
|
|
2651
|
-
var
|
|
2703
|
+
var gn = gr.exports, Ot = {}, mn = {}, bn = function() {
|
|
2652
2704
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2653
2705
|
return !1;
|
|
2654
2706
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2671,85 +2723,85 @@ var yn = dr.exports, Bt = {}, gn = {}, mn = function() {
|
|
|
2671
2723
|
return !1;
|
|
2672
2724
|
}
|
|
2673
2725
|
return !0;
|
|
2674
|
-
},
|
|
2675
|
-
return
|
|
2676
|
-
},
|
|
2677
|
-
return typeof
|
|
2678
|
-
},
|
|
2726
|
+
}, lo = bn, mr = function() {
|
|
2727
|
+
return lo() && !!Symbol.toStringTag;
|
|
2728
|
+
}, Cr = typeof Symbol < "u" && Symbol, ho = bn, po = function() {
|
|
2729
|
+
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ho();
|
|
2730
|
+
}, _r = {
|
|
2679
2731
|
foo: {}
|
|
2680
|
-
},
|
|
2681
|
-
return { __proto__:
|
|
2682
|
-
},
|
|
2732
|
+
}, yo = Object, go = function() {
|
|
2733
|
+
return { __proto__: _r }.foo === _r.foo && !({ __proto__: null } instanceof yo);
|
|
2734
|
+
}, mo = "Function.prototype.bind called on incompatible ", bo = Object.prototype.toString, wo = Math.max, vo = "[object Function]", Br = function(e, r) {
|
|
2683
2735
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2684
2736
|
o[s] = e[s];
|
|
2685
2737
|
for (var u = 0; u < r.length; u += 1)
|
|
2686
2738
|
o[u + e.length] = r[u];
|
|
2687
2739
|
return o;
|
|
2688
|
-
},
|
|
2740
|
+
}, So = function(e, r) {
|
|
2689
2741
|
for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
|
|
2690
2742
|
o[u] = e[s];
|
|
2691
2743
|
return o;
|
|
2692
|
-
},
|
|
2744
|
+
}, Ao = function(t, e) {
|
|
2693
2745
|
for (var r = "", o = 0; o < t.length; o += 1)
|
|
2694
2746
|
r += t[o], o + 1 < t.length && (r += e);
|
|
2695
2747
|
return r;
|
|
2696
|
-
},
|
|
2748
|
+
}, Eo = function(e) {
|
|
2697
2749
|
var r = this;
|
|
2698
|
-
if (typeof r != "function" ||
|
|
2699
|
-
throw new TypeError(
|
|
2700
|
-
for (var o =
|
|
2750
|
+
if (typeof r != "function" || bo.apply(r) !== vo)
|
|
2751
|
+
throw new TypeError(mo + r);
|
|
2752
|
+
for (var o = So(arguments, 1), s, u = function() {
|
|
2701
2753
|
if (this instanceof s) {
|
|
2702
2754
|
var g = r.apply(
|
|
2703
2755
|
this,
|
|
2704
|
-
|
|
2756
|
+
Br(o, arguments)
|
|
2705
2757
|
);
|
|
2706
2758
|
return Object(g) === g ? g : this;
|
|
2707
2759
|
}
|
|
2708
2760
|
return r.apply(
|
|
2709
2761
|
e,
|
|
2710
|
-
|
|
2762
|
+
Br(o, arguments)
|
|
2711
2763
|
);
|
|
2712
|
-
}, l =
|
|
2713
|
-
f[
|
|
2714
|
-
if (s = Function("binder", "return function (" +
|
|
2764
|
+
}, l = wo(0, r.length - o.length), f = [], d = 0; d < l; d++)
|
|
2765
|
+
f[d] = "$" + d;
|
|
2766
|
+
if (s = Function("binder", "return function (" + Ao(f, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
|
|
2715
2767
|
var A = function() {
|
|
2716
2768
|
};
|
|
2717
2769
|
A.prototype = r.prototype, s.prototype = new A(), A.prototype = null;
|
|
2718
2770
|
}
|
|
2719
2771
|
return s;
|
|
2720
|
-
},
|
|
2721
|
-
return
|
|
2722
|
-
}, k,
|
|
2772
|
+
}, Io = Eo, wn = Function.prototype.bind || Io, Or = {}.hasOwnProperty, Lt = Function.prototype.call, Fo = Lt.bind ? Lt.bind(Or) : function(t, e) {
|
|
2773
|
+
return Lt.call(Or, t, e);
|
|
2774
|
+
}, k, Ye = SyntaxError, vn = Function, Je = TypeError, Ut = function(t) {
|
|
2723
2775
|
try {
|
|
2724
|
-
return
|
|
2776
|
+
return vn('"use strict"; return (' + t + ").constructor;")();
|
|
2725
2777
|
} catch {
|
|
2726
2778
|
}
|
|
2727
|
-
},
|
|
2728
|
-
if (
|
|
2779
|
+
}, Ue = Object.getOwnPropertyDescriptor;
|
|
2780
|
+
if (Ue)
|
|
2729
2781
|
try {
|
|
2730
|
-
|
|
2782
|
+
Ue({}, "");
|
|
2731
2783
|
} catch {
|
|
2732
|
-
|
|
2784
|
+
Ue = null;
|
|
2733
2785
|
}
|
|
2734
|
-
var
|
|
2735
|
-
throw new
|
|
2736
|
-
},
|
|
2786
|
+
var $t = function() {
|
|
2787
|
+
throw new Je();
|
|
2788
|
+
}, To = Ue ? function() {
|
|
2737
2789
|
try {
|
|
2738
|
-
return arguments.callee,
|
|
2790
|
+
return arguments.callee, $t;
|
|
2739
2791
|
} catch {
|
|
2740
2792
|
try {
|
|
2741
|
-
return
|
|
2793
|
+
return Ue(arguments, "callee").get;
|
|
2742
2794
|
} catch {
|
|
2743
|
-
return
|
|
2795
|
+
return $t;
|
|
2744
2796
|
}
|
|
2745
2797
|
}
|
|
2746
|
-
}() :
|
|
2798
|
+
}() : $t, Me = po(), Co = go(), H = Object.getPrototypeOf || (Co ? function(t) {
|
|
2747
2799
|
return t.__proto__;
|
|
2748
|
-
} : null), qe = {},
|
|
2800
|
+
} : null), qe = {}, _o = typeof Uint8Array > "u" || !H ? k : H(Uint8Array), $e = {
|
|
2749
2801
|
"%AggregateError%": typeof AggregateError > "u" ? k : AggregateError,
|
|
2750
2802
|
"%Array%": Array,
|
|
2751
2803
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? k : ArrayBuffer,
|
|
2752
|
-
"%ArrayIteratorPrototype%": Me &&
|
|
2804
|
+
"%ArrayIteratorPrototype%": Me && H ? H([][Symbol.iterator]()) : k,
|
|
2753
2805
|
"%AsyncFromSyncIteratorPrototype%": k,
|
|
2754
2806
|
"%AsyncFunction%": qe,
|
|
2755
2807
|
"%AsyncGenerator%": qe,
|
|
@@ -2773,17 +2825,17 @@ var Ut = function() {
|
|
|
2773
2825
|
"%Float32Array%": typeof Float32Array > "u" ? k : Float32Array,
|
|
2774
2826
|
"%Float64Array%": typeof Float64Array > "u" ? k : Float64Array,
|
|
2775
2827
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? k : FinalizationRegistry,
|
|
2776
|
-
"%Function%":
|
|
2828
|
+
"%Function%": vn,
|
|
2777
2829
|
"%GeneratorFunction%": qe,
|
|
2778
2830
|
"%Int8Array%": typeof Int8Array > "u" ? k : Int8Array,
|
|
2779
2831
|
"%Int16Array%": typeof Int16Array > "u" ? k : Int16Array,
|
|
2780
2832
|
"%Int32Array%": typeof Int32Array > "u" ? k : Int32Array,
|
|
2781
2833
|
"%isFinite%": isFinite,
|
|
2782
2834
|
"%isNaN%": isNaN,
|
|
2783
|
-
"%IteratorPrototype%": Me &&
|
|
2835
|
+
"%IteratorPrototype%": Me && H ? H(H([][Symbol.iterator]())) : k,
|
|
2784
2836
|
"%JSON%": typeof JSON == "object" ? JSON : k,
|
|
2785
2837
|
"%Map%": typeof Map > "u" ? k : Map,
|
|
2786
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !Me || !
|
|
2838
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Me || !H ? k : H((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2787
2839
|
"%Math%": Math,
|
|
2788
2840
|
"%Number%": Number,
|
|
2789
2841
|
"%Object%": Object,
|
|
@@ -2796,15 +2848,15 @@ var Ut = function() {
|
|
|
2796
2848
|
"%Reflect%": typeof Reflect > "u" ? k : Reflect,
|
|
2797
2849
|
"%RegExp%": RegExp,
|
|
2798
2850
|
"%Set%": typeof Set > "u" ? k : Set,
|
|
2799
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !Me || !
|
|
2851
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Me || !H ? k : H((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2800
2852
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? k : SharedArrayBuffer,
|
|
2801
2853
|
"%String%": String,
|
|
2802
|
-
"%StringIteratorPrototype%": Me &&
|
|
2854
|
+
"%StringIteratorPrototype%": Me && H ? H(""[Symbol.iterator]()) : k,
|
|
2803
2855
|
"%Symbol%": Me ? Symbol : k,
|
|
2804
|
-
"%SyntaxError%":
|
|
2805
|
-
"%ThrowTypeError%":
|
|
2806
|
-
"%TypedArray%":
|
|
2807
|
-
"%TypeError%":
|
|
2856
|
+
"%SyntaxError%": Ye,
|
|
2857
|
+
"%ThrowTypeError%": To,
|
|
2858
|
+
"%TypedArray%": _o,
|
|
2859
|
+
"%TypeError%": Je,
|
|
2808
2860
|
"%Uint8Array%": typeof Uint8Array > "u" ? k : Uint8Array,
|
|
2809
2861
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? k : Uint8ClampedArray,
|
|
2810
2862
|
"%Uint16Array%": typeof Uint16Array > "u" ? k : Uint16Array,
|
|
@@ -2814,30 +2866,30 @@ var Ut = function() {
|
|
|
2814
2866
|
"%WeakRef%": typeof WeakRef > "u" ? k : WeakRef,
|
|
2815
2867
|
"%WeakSet%": typeof WeakSet > "u" ? k : WeakSet
|
|
2816
2868
|
};
|
|
2817
|
-
if (
|
|
2869
|
+
if (H)
|
|
2818
2870
|
try {
|
|
2819
2871
|
null.error;
|
|
2820
2872
|
} catch (t) {
|
|
2821
|
-
var
|
|
2822
|
-
$e["%Error.prototype%"] =
|
|
2873
|
+
var Bo = H(H(t));
|
|
2874
|
+
$e["%Error.prototype%"] = Bo;
|
|
2823
2875
|
}
|
|
2824
|
-
var
|
|
2876
|
+
var Oo = function t(e) {
|
|
2825
2877
|
var r;
|
|
2826
2878
|
if (e === "%AsyncFunction%")
|
|
2827
|
-
r =
|
|
2879
|
+
r = Ut("async function () {}");
|
|
2828
2880
|
else if (e === "%GeneratorFunction%")
|
|
2829
|
-
r =
|
|
2881
|
+
r = Ut("function* () {}");
|
|
2830
2882
|
else if (e === "%AsyncGeneratorFunction%")
|
|
2831
|
-
r =
|
|
2883
|
+
r = Ut("async function* () {}");
|
|
2832
2884
|
else if (e === "%AsyncGenerator%") {
|
|
2833
2885
|
var o = t("%AsyncGeneratorFunction%");
|
|
2834
2886
|
o && (r = o.prototype);
|
|
2835
2887
|
} else if (e === "%AsyncIteratorPrototype%") {
|
|
2836
2888
|
var s = t("%AsyncGenerator%");
|
|
2837
|
-
s &&
|
|
2889
|
+
s && H && (r = H(s.prototype));
|
|
2838
2890
|
}
|
|
2839
2891
|
return $e[e] = r, r;
|
|
2840
|
-
},
|
|
2892
|
+
}, xr = {
|
|
2841
2893
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2842
2894
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
2843
2895
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -2889,92 +2941,92 @@ var _o = function t(e) {
|
|
|
2889
2941
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2890
2942
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2891
2943
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2892
|
-
},
|
|
2893
|
-
var r =
|
|
2944
|
+
}, ct = wn, vt = Fo, xo = ct.call(Function.call, Array.prototype.concat), ko = ct.call(Function.apply, Array.prototype.splice), kr = ct.call(Function.call, String.prototype.replace), St = ct.call(Function.call, String.prototype.slice), Po = ct.call(Function.call, RegExp.prototype.exec), Ro = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, No = /\\(\\)?/g, Lo = function(e) {
|
|
2945
|
+
var r = St(e, 0, 1), o = St(e, -1);
|
|
2894
2946
|
if (r === "%" && o !== "%")
|
|
2895
|
-
throw new
|
|
2947
|
+
throw new Ye("invalid intrinsic syntax, expected closing `%`");
|
|
2896
2948
|
if (o === "%" && r !== "%")
|
|
2897
|
-
throw new
|
|
2949
|
+
throw new Ye("invalid intrinsic syntax, expected opening `%`");
|
|
2898
2950
|
var s = [];
|
|
2899
|
-
return
|
|
2900
|
-
s[s.length] = f ?
|
|
2951
|
+
return kr(e, Ro, function(u, l, f, d) {
|
|
2952
|
+
s[s.length] = f ? kr(d, No, "$1") : l || u;
|
|
2901
2953
|
}), s;
|
|
2902
|
-
},
|
|
2954
|
+
}, Uo = function(e, r) {
|
|
2903
2955
|
var o = e, s;
|
|
2904
|
-
if (
|
|
2956
|
+
if (vt(xr, o) && (s = xr[o], o = "%" + s[0] + "%"), vt($e, o)) {
|
|
2905
2957
|
var u = $e[o];
|
|
2906
|
-
if (u === qe && (u =
|
|
2907
|
-
throw new
|
|
2958
|
+
if (u === qe && (u = Oo(o)), typeof u > "u" && !r)
|
|
2959
|
+
throw new Je("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2908
2960
|
return {
|
|
2909
2961
|
alias: s,
|
|
2910
2962
|
name: o,
|
|
2911
2963
|
value: u
|
|
2912
2964
|
};
|
|
2913
2965
|
}
|
|
2914
|
-
throw new
|
|
2915
|
-
},
|
|
2966
|
+
throw new Ye("intrinsic " + e + " does not exist!");
|
|
2967
|
+
}, Ze = function(e, r) {
|
|
2916
2968
|
if (typeof e != "string" || e.length === 0)
|
|
2917
|
-
throw new
|
|
2969
|
+
throw new Je("intrinsic name must be a non-empty string");
|
|
2918
2970
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
2919
|
-
throw new
|
|
2920
|
-
if (
|
|
2921
|
-
throw new
|
|
2922
|
-
var o =
|
|
2923
|
-
A && (s = A[0],
|
|
2924
|
-
for (var g = 1,
|
|
2925
|
-
var E = o[g],
|
|
2926
|
-
if ((
|
|
2927
|
-
throw new
|
|
2928
|
-
if ((E === "constructor" || !
|
|
2971
|
+
throw new Je('"allowMissing" argument must be a boolean');
|
|
2972
|
+
if (Po(/^%?[^%]*%?$/, e) === null)
|
|
2973
|
+
throw new Ye("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2974
|
+
var o = Lo(e), s = o.length > 0 ? o[0] : "", u = Uo("%" + s + "%", r), l = u.name, f = u.value, d = !1, A = u.alias;
|
|
2975
|
+
A && (s = A[0], ko(o, xo([0, 1], A)));
|
|
2976
|
+
for (var g = 1, v = !0; g < o.length; g += 1) {
|
|
2977
|
+
var E = o[g], C = St(E, 0, 1), R = St(E, -1);
|
|
2978
|
+
if ((C === '"' || C === "'" || C === "`" || R === '"' || R === "'" || R === "`") && C !== R)
|
|
2979
|
+
throw new Ye("property names with quotes must have matching quotes");
|
|
2980
|
+
if ((E === "constructor" || !v) && (d = !0), s += "." + E, l = "%" + s + "%", vt($e, l))
|
|
2929
2981
|
f = $e[l];
|
|
2930
2982
|
else if (f != null) {
|
|
2931
2983
|
if (!(E in f)) {
|
|
2932
2984
|
if (!r)
|
|
2933
|
-
throw new
|
|
2985
|
+
throw new Je("base intrinsic for " + e + " exists, but the property is not available.");
|
|
2934
2986
|
return;
|
|
2935
2987
|
}
|
|
2936
|
-
if (
|
|
2937
|
-
var
|
|
2938
|
-
|
|
2988
|
+
if (Ue && g + 1 >= o.length) {
|
|
2989
|
+
var L = Ue(f, E);
|
|
2990
|
+
v = !!L, v && "get" in L && !("originalValue" in L.get) ? f = L.get : f = f[E];
|
|
2939
2991
|
} else
|
|
2940
|
-
|
|
2941
|
-
|
|
2992
|
+
v = vt(f, E), f = f[E];
|
|
2993
|
+
v && !d && ($e[l] = f);
|
|
2942
2994
|
}
|
|
2943
2995
|
}
|
|
2944
2996
|
return f;
|
|
2945
|
-
},
|
|
2946
|
-
if (
|
|
2997
|
+
}, Sn = { exports: {} }, $o = Ze, er = $o("%Object.defineProperty%", !0), tr = function() {
|
|
2998
|
+
if (er)
|
|
2947
2999
|
try {
|
|
2948
|
-
return
|
|
3000
|
+
return er({}, "a", { value: 1 }), !0;
|
|
2949
3001
|
} catch {
|
|
2950
3002
|
return !1;
|
|
2951
3003
|
}
|
|
2952
3004
|
return !1;
|
|
2953
3005
|
};
|
|
2954
|
-
|
|
2955
|
-
if (!
|
|
3006
|
+
tr.hasArrayLengthDefineBug = function() {
|
|
3007
|
+
if (!tr())
|
|
2956
3008
|
return null;
|
|
2957
3009
|
try {
|
|
2958
|
-
return
|
|
3010
|
+
return er([], "length", { value: 1 }).length !== 1;
|
|
2959
3011
|
} catch {
|
|
2960
3012
|
return !0;
|
|
2961
3013
|
}
|
|
2962
3014
|
};
|
|
2963
|
-
var
|
|
2964
|
-
if (
|
|
3015
|
+
var An = tr, Do = Ze, dt = Do("%Object.getOwnPropertyDescriptor%", !0);
|
|
3016
|
+
if (dt)
|
|
2965
3017
|
try {
|
|
2966
|
-
|
|
3018
|
+
dt([], "length");
|
|
2967
3019
|
} catch {
|
|
2968
|
-
|
|
3020
|
+
dt = null;
|
|
2969
3021
|
}
|
|
2970
|
-
var
|
|
2971
|
-
if (
|
|
3022
|
+
var br = dt, jo = An(), wr = Ze, at = jo && wr("%Object.defineProperty%", !0);
|
|
3023
|
+
if (at)
|
|
2972
3024
|
try {
|
|
2973
|
-
|
|
3025
|
+
at({}, "a", { value: 1 });
|
|
2974
3026
|
} catch {
|
|
2975
|
-
|
|
3027
|
+
at = !1;
|
|
2976
3028
|
}
|
|
2977
|
-
var
|
|
3029
|
+
var Mo = wr("%SyntaxError%"), Ve = wr("%TypeError%"), Pr = br, Vo = function(e, r, o) {
|
|
2978
3030
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
2979
3031
|
throw new Ve("`obj` must be an object or a function`");
|
|
2980
3032
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -2987,44 +3039,44 @@ var $o = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Do = function(e,
|
|
|
2987
3039
|
throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2988
3040
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
2989
3041
|
throw new Ve("`loose`, if provided, must be a boolean");
|
|
2990
|
-
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1,
|
|
2991
|
-
if (
|
|
2992
|
-
|
|
2993
|
-
configurable: l === null &&
|
|
2994
|
-
enumerable: s === null &&
|
|
3042
|
+
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, d = !!Pr && Pr(e, r);
|
|
3043
|
+
if (at)
|
|
3044
|
+
at(e, r, {
|
|
3045
|
+
configurable: l === null && d ? d.configurable : !l,
|
|
3046
|
+
enumerable: s === null && d ? d.enumerable : !s,
|
|
2995
3047
|
value: o,
|
|
2996
|
-
writable: u === null &&
|
|
3048
|
+
writable: u === null && d ? d.writable : !u
|
|
2997
3049
|
});
|
|
2998
3050
|
else if (f || !s && !u && !l)
|
|
2999
3051
|
e[r] = o;
|
|
3000
3052
|
else
|
|
3001
|
-
throw new
|
|
3002
|
-
},
|
|
3053
|
+
throw new Mo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3054
|
+
}, En = Ze, Rr = Vo, qo = An(), Nr = br, Lr = En("%TypeError%"), Go = En("%Math.floor%"), Qo = function(e, r) {
|
|
3003
3055
|
if (typeof e != "function")
|
|
3004
|
-
throw new
|
|
3005
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3006
|
-
throw new
|
|
3056
|
+
throw new Lr("`fn` is not a function");
|
|
3057
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || Go(r) !== r)
|
|
3058
|
+
throw new Lr("`length` must be a positive 32-bit integer");
|
|
3007
3059
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3008
|
-
if ("length" in e &&
|
|
3009
|
-
var l =
|
|
3060
|
+
if ("length" in e && Nr) {
|
|
3061
|
+
var l = Nr(e, "length");
|
|
3010
3062
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3011
3063
|
}
|
|
3012
|
-
return (s || u || !o) && (
|
|
3064
|
+
return (s || u || !o) && (qo ? Rr(e, "length", r, !0, !0) : Rr(e, "length", r)), e;
|
|
3013
3065
|
};
|
|
3014
3066
|
(function(t) {
|
|
3015
|
-
var e =
|
|
3016
|
-
if (
|
|
3067
|
+
var e = wn, r = Ze, o = Qo, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), d = r("%Object.defineProperty%", !0), A = r("%Math.max%");
|
|
3068
|
+
if (d)
|
|
3017
3069
|
try {
|
|
3018
|
-
|
|
3070
|
+
d({}, "a", { value: 1 });
|
|
3019
3071
|
} catch {
|
|
3020
|
-
|
|
3072
|
+
d = null;
|
|
3021
3073
|
}
|
|
3022
3074
|
t.exports = function(E) {
|
|
3023
3075
|
if (typeof E != "function")
|
|
3024
3076
|
throw new s("a function is required");
|
|
3025
|
-
var
|
|
3077
|
+
var C = f(e, l, arguments);
|
|
3026
3078
|
return o(
|
|
3027
|
-
|
|
3079
|
+
C,
|
|
3028
3080
|
1 + A(0, E.length - (arguments.length - 1)),
|
|
3029
3081
|
!0
|
|
3030
3082
|
);
|
|
@@ -3032,123 +3084,123 @@ var $o = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Do = function(e,
|
|
|
3032
3084
|
var g = function() {
|
|
3033
3085
|
return f(e, u, arguments);
|
|
3034
3086
|
};
|
|
3035
|
-
|
|
3036
|
-
})(
|
|
3037
|
-
var
|
|
3038
|
-
var o =
|
|
3039
|
-
return typeof o == "function" &&
|
|
3040
|
-
},
|
|
3041
|
-
return
|
|
3087
|
+
d ? d(t.exports, "apply", { value: g }) : t.exports.apply = g;
|
|
3088
|
+
})(Sn);
|
|
3089
|
+
var In = Sn.exports, Fn = Ze, Tn = In, zo = Tn(Fn("String.prototype.indexOf")), Cn = function(e, r) {
|
|
3090
|
+
var o = Fn(e, !!r);
|
|
3091
|
+
return typeof o == "function" && zo(e, ".prototype.") > -1 ? Tn(o) : o;
|
|
3092
|
+
}, Ko = mr(), Ho = Cn, rr = Ho("Object.prototype.toString"), xt = function(e) {
|
|
3093
|
+
return Ko && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : rr(e) === "[object Arguments]";
|
|
3042
3094
|
}, _n = function(e) {
|
|
3043
|
-
return
|
|
3044
|
-
},
|
|
3045
|
-
return
|
|
3095
|
+
return xt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && rr(e) !== "[object Array]" && rr(e.callee) === "[object Function]";
|
|
3096
|
+
}, Wo = function() {
|
|
3097
|
+
return xt(arguments);
|
|
3046
3098
|
}();
|
|
3047
|
-
|
|
3048
|
-
var
|
|
3049
|
-
if (!
|
|
3099
|
+
xt.isLegacyArguments = _n;
|
|
3100
|
+
var Jo = Wo ? xt : _n, Yo = Object.prototype.toString, Xo = Function.prototype.toString, Zo = /^\s*(?:function)?\*/, Bn = mr(), Dt = Object.getPrototypeOf, es = function() {
|
|
3101
|
+
if (!Bn)
|
|
3050
3102
|
return !1;
|
|
3051
3103
|
try {
|
|
3052
3104
|
return Function("return function*() {}")();
|
|
3053
3105
|
} catch {
|
|
3054
3106
|
}
|
|
3055
|
-
},
|
|
3107
|
+
}, jt, ts = function(e) {
|
|
3056
3108
|
if (typeof e != "function")
|
|
3057
3109
|
return !1;
|
|
3058
|
-
if (
|
|
3110
|
+
if (Zo.test(Xo.call(e)))
|
|
3059
3111
|
return !0;
|
|
3060
|
-
if (!
|
|
3061
|
-
var r =
|
|
3112
|
+
if (!Bn) {
|
|
3113
|
+
var r = Yo.call(e);
|
|
3062
3114
|
return r === "[object GeneratorFunction]";
|
|
3063
3115
|
}
|
|
3064
|
-
if (!
|
|
3116
|
+
if (!Dt)
|
|
3065
3117
|
return !1;
|
|
3066
|
-
if (typeof
|
|
3067
|
-
var o =
|
|
3068
|
-
|
|
3118
|
+
if (typeof jt > "u") {
|
|
3119
|
+
var o = es();
|
|
3120
|
+
jt = o ? Dt(o) : !1;
|
|
3069
3121
|
}
|
|
3070
|
-
return
|
|
3071
|
-
},
|
|
3072
|
-
if (typeof
|
|
3122
|
+
return Dt(e) === jt;
|
|
3123
|
+
}, On = Function.prototype.toString, Qe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr, yt;
|
|
3124
|
+
if (typeof Qe == "function" && typeof Object.defineProperty == "function")
|
|
3073
3125
|
try {
|
|
3074
|
-
|
|
3126
|
+
nr = Object.defineProperty({}, "length", {
|
|
3075
3127
|
get: function() {
|
|
3076
|
-
throw
|
|
3128
|
+
throw yt;
|
|
3077
3129
|
}
|
|
3078
|
-
}),
|
|
3130
|
+
}), yt = {}, Qe(function() {
|
|
3079
3131
|
throw 42;
|
|
3080
|
-
}, null,
|
|
3132
|
+
}, null, nr);
|
|
3081
3133
|
} catch (t) {
|
|
3082
|
-
t !==
|
|
3134
|
+
t !== yt && (Qe = null);
|
|
3083
3135
|
}
|
|
3084
3136
|
else
|
|
3085
|
-
|
|
3086
|
-
var
|
|
3137
|
+
Qe = null;
|
|
3138
|
+
var rs = /^\s*class\b/, ir = function(e) {
|
|
3087
3139
|
try {
|
|
3088
|
-
var r =
|
|
3089
|
-
return
|
|
3140
|
+
var r = On.call(e);
|
|
3141
|
+
return rs.test(r);
|
|
3090
3142
|
} catch {
|
|
3091
3143
|
return !1;
|
|
3092
3144
|
}
|
|
3093
|
-
},
|
|
3145
|
+
}, Mt = function(e) {
|
|
3094
3146
|
try {
|
|
3095
|
-
return
|
|
3147
|
+
return ir(e) ? !1 : (On.call(e), !0);
|
|
3096
3148
|
} catch {
|
|
3097
3149
|
return !1;
|
|
3098
3150
|
}
|
|
3099
|
-
},
|
|
3151
|
+
}, gt = Object.prototype.toString, ns = "[object Object]", is = "[object Function]", os = "[object GeneratorFunction]", ss = "[object HTMLAllCollection]", as = "[object HTML document.all class]", us = "[object HTMLCollection]", cs = typeof Symbol == "function" && !!Symbol.toStringTag, fs = !(0 in [,]), or = function() {
|
|
3100
3152
|
return !1;
|
|
3101
3153
|
};
|
|
3102
3154
|
if (typeof document == "object") {
|
|
3103
|
-
var
|
|
3104
|
-
|
|
3105
|
-
if ((
|
|
3155
|
+
var ls = document.all;
|
|
3156
|
+
gt.call(ls) === gt.call(document.all) && (or = function(e) {
|
|
3157
|
+
if ((fs || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3106
3158
|
try {
|
|
3107
|
-
var r =
|
|
3108
|
-
return (r ===
|
|
3159
|
+
var r = gt.call(e);
|
|
3160
|
+
return (r === ss || r === as || r === us || r === ns) && e("") == null;
|
|
3109
3161
|
} catch {
|
|
3110
3162
|
}
|
|
3111
3163
|
return !1;
|
|
3112
3164
|
});
|
|
3113
3165
|
}
|
|
3114
|
-
var
|
|
3115
|
-
if (
|
|
3166
|
+
var hs = Qe ? function(e) {
|
|
3167
|
+
if (or(e))
|
|
3116
3168
|
return !0;
|
|
3117
3169
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3118
3170
|
return !1;
|
|
3119
3171
|
try {
|
|
3120
|
-
|
|
3172
|
+
Qe(e, null, nr);
|
|
3121
3173
|
} catch (r) {
|
|
3122
|
-
if (r !==
|
|
3174
|
+
if (r !== yt)
|
|
3123
3175
|
return !1;
|
|
3124
3176
|
}
|
|
3125
|
-
return !
|
|
3177
|
+
return !ir(e) && Mt(e);
|
|
3126
3178
|
} : function(e) {
|
|
3127
|
-
if (
|
|
3179
|
+
if (or(e))
|
|
3128
3180
|
return !0;
|
|
3129
3181
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3130
3182
|
return !1;
|
|
3131
|
-
if (
|
|
3132
|
-
return
|
|
3133
|
-
if (
|
|
3183
|
+
if (cs)
|
|
3184
|
+
return Mt(e);
|
|
3185
|
+
if (ir(e))
|
|
3134
3186
|
return !1;
|
|
3135
|
-
var r =
|
|
3136
|
-
return r !==
|
|
3137
|
-
},
|
|
3187
|
+
var r = gt.call(e);
|
|
3188
|
+
return r !== is && r !== os && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3189
|
+
}, ps = hs, ds = Object.prototype.toString, xn = Object.prototype.hasOwnProperty, ys = function(e, r, o) {
|
|
3138
3190
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3139
|
-
|
|
3140
|
-
},
|
|
3191
|
+
xn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3192
|
+
}, gs = function(e, r, o) {
|
|
3141
3193
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3142
3194
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3143
|
-
},
|
|
3195
|
+
}, ms = function(e, r, o) {
|
|
3144
3196
|
for (var s in e)
|
|
3145
|
-
|
|
3146
|
-
},
|
|
3147
|
-
if (!
|
|
3197
|
+
xn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3198
|
+
}, bs = function(e, r, o) {
|
|
3199
|
+
if (!ps(r))
|
|
3148
3200
|
throw new TypeError("iterator must be a function");
|
|
3149
3201
|
var s;
|
|
3150
|
-
arguments.length >= 3 && (s = o),
|
|
3151
|
-
},
|
|
3202
|
+
arguments.length >= 3 && (s = o), ds.call(e) === "[object Array]" ? ys(e, r, s) : typeof e == "string" ? gs(e, r, s) : ms(e, r, s);
|
|
3203
|
+
}, ws = bs, Vt = [
|
|
3152
3204
|
"BigInt64Array",
|
|
3153
3205
|
"BigUint64Array",
|
|
3154
3206
|
"Float32Array",
|
|
@@ -3160,247 +3212,247 @@ var cs = Ge ? function(e) {
|
|
|
3160
3212
|
"Uint32Array",
|
|
3161
3213
|
"Uint8Array",
|
|
3162
3214
|
"Uint8ClampedArray"
|
|
3163
|
-
],
|
|
3164
|
-
for (var e = [], r = 0; r <
|
|
3165
|
-
typeof
|
|
3215
|
+
], vs = typeof globalThis > "u" ? Jr : globalThis, Ss = function() {
|
|
3216
|
+
for (var e = [], r = 0; r < Vt.length; r++)
|
|
3217
|
+
typeof vs[Vt[r]] == "function" && (e[e.length] = Vt[r]);
|
|
3166
3218
|
return e;
|
|
3167
|
-
},
|
|
3219
|
+
}, At = ws, As = Ss, Ur = In, vr = Cn, mt = br, Es = vr("Object.prototype.toString"), kn = mr(), $r = typeof globalThis > "u" ? Jr : globalThis, sr = As(), Sr = vr("String.prototype.slice"), qt = Object.getPrototypeOf, Is = vr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3168
3220
|
for (var o = 0; o < e.length; o += 1)
|
|
3169
3221
|
if (e[o] === r)
|
|
3170
3222
|
return o;
|
|
3171
3223
|
return -1;
|
|
3172
|
-
},
|
|
3173
|
-
|
|
3174
|
-
var e = new
|
|
3224
|
+
}, Et = { __proto__: null };
|
|
3225
|
+
kn && mt && qt ? At(sr, function(t) {
|
|
3226
|
+
var e = new $r[t]();
|
|
3175
3227
|
if (Symbol.toStringTag in e) {
|
|
3176
|
-
var r =
|
|
3228
|
+
var r = qt(e), o = mt(r, Symbol.toStringTag);
|
|
3177
3229
|
if (!o) {
|
|
3178
|
-
var s =
|
|
3179
|
-
o =
|
|
3230
|
+
var s = qt(r);
|
|
3231
|
+
o = mt(s, Symbol.toStringTag);
|
|
3180
3232
|
}
|
|
3181
|
-
|
|
3233
|
+
Et["$" + t] = Ur(o.get);
|
|
3182
3234
|
}
|
|
3183
|
-
}) :
|
|
3184
|
-
var e = new
|
|
3185
|
-
r && (
|
|
3235
|
+
}) : At(sr, function(t) {
|
|
3236
|
+
var e = new $r[t](), r = e.slice || e.set;
|
|
3237
|
+
r && (Et["$" + t] = Ur(r));
|
|
3186
3238
|
});
|
|
3187
|
-
var
|
|
3239
|
+
var Fs = function(e) {
|
|
3188
3240
|
var r = !1;
|
|
3189
|
-
return
|
|
3241
|
+
return At(Et, function(o, s) {
|
|
3190
3242
|
if (!r)
|
|
3191
3243
|
try {
|
|
3192
|
-
"$" + o(e) === s && (r =
|
|
3244
|
+
"$" + o(e) === s && (r = Sr(s, 1));
|
|
3193
3245
|
} catch {
|
|
3194
3246
|
}
|
|
3195
3247
|
}), r;
|
|
3196
|
-
},
|
|
3248
|
+
}, Ts = function(e) {
|
|
3197
3249
|
var r = !1;
|
|
3198
|
-
return
|
|
3250
|
+
return At(Et, function(o, s) {
|
|
3199
3251
|
if (!r)
|
|
3200
3252
|
try {
|
|
3201
|
-
o(e), r =
|
|
3253
|
+
o(e), r = Sr(s, 1);
|
|
3202
3254
|
} catch {
|
|
3203
3255
|
}
|
|
3204
3256
|
}), r;
|
|
3205
|
-
},
|
|
3257
|
+
}, Pn = function(e) {
|
|
3206
3258
|
if (!e || typeof e != "object")
|
|
3207
3259
|
return !1;
|
|
3208
|
-
if (!
|
|
3209
|
-
var r =
|
|
3210
|
-
return
|
|
3260
|
+
if (!kn) {
|
|
3261
|
+
var r = Sr(Es(e), 8, -1);
|
|
3262
|
+
return Is(sr, r) > -1 ? r : r !== "Object" ? !1 : Ts(e);
|
|
3211
3263
|
}
|
|
3212
|
-
return
|
|
3213
|
-
},
|
|
3214
|
-
return !!
|
|
3264
|
+
return mt ? Fs(e) : null;
|
|
3265
|
+
}, Cs = Pn, _s = function(e) {
|
|
3266
|
+
return !!Cs(e);
|
|
3215
3267
|
};
|
|
3216
3268
|
(function(t) {
|
|
3217
|
-
var e =
|
|
3218
|
-
function u(
|
|
3219
|
-
return
|
|
3269
|
+
var e = Jo, r = ts, o = Pn, s = _s;
|
|
3270
|
+
function u(w) {
|
|
3271
|
+
return w.call.bind(w);
|
|
3220
3272
|
}
|
|
3221
|
-
var l = typeof BigInt < "u", f = typeof Symbol < "u",
|
|
3273
|
+
var l = typeof BigInt < "u", f = typeof Symbol < "u", d = u(Object.prototype.toString), A = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), v = u(Boolean.prototype.valueOf);
|
|
3222
3274
|
if (l)
|
|
3223
3275
|
var E = u(BigInt.prototype.valueOf);
|
|
3224
3276
|
if (f)
|
|
3225
|
-
var
|
|
3226
|
-
function R(
|
|
3227
|
-
if (typeof
|
|
3277
|
+
var C = u(Symbol.prototype.valueOf);
|
|
3278
|
+
function R(w, lt) {
|
|
3279
|
+
if (typeof w != "object")
|
|
3228
3280
|
return !1;
|
|
3229
3281
|
try {
|
|
3230
|
-
return
|
|
3282
|
+
return lt(w), !0;
|
|
3231
3283
|
} catch {
|
|
3232
3284
|
return !1;
|
|
3233
3285
|
}
|
|
3234
3286
|
}
|
|
3235
3287
|
t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = s;
|
|
3236
|
-
function
|
|
3237
|
-
return typeof Promise < "u" &&
|
|
3288
|
+
function L(w) {
|
|
3289
|
+
return typeof Promise < "u" && w instanceof Promise || w !== null && typeof w == "object" && typeof w.then == "function" && typeof w.catch == "function";
|
|
3238
3290
|
}
|
|
3239
|
-
t.isPromise =
|
|
3240
|
-
function Q(
|
|
3241
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(
|
|
3291
|
+
t.isPromise = L;
|
|
3292
|
+
function Q(w) {
|
|
3293
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(w) : s(w) || b(w);
|
|
3242
3294
|
}
|
|
3243
3295
|
t.isArrayBufferView = Q;
|
|
3244
|
-
function z(
|
|
3245
|
-
return o(
|
|
3296
|
+
function z(w) {
|
|
3297
|
+
return o(w) === "Uint8Array";
|
|
3246
3298
|
}
|
|
3247
3299
|
t.isUint8Array = z;
|
|
3248
|
-
function X(
|
|
3249
|
-
return o(
|
|
3300
|
+
function X(w) {
|
|
3301
|
+
return o(w) === "Uint8ClampedArray";
|
|
3250
3302
|
}
|
|
3251
3303
|
t.isUint8ClampedArray = X;
|
|
3252
|
-
function ye(
|
|
3253
|
-
return o(
|
|
3304
|
+
function ye(w) {
|
|
3305
|
+
return o(w) === "Uint16Array";
|
|
3254
3306
|
}
|
|
3255
3307
|
t.isUint16Array = ye;
|
|
3256
|
-
function ee(
|
|
3257
|
-
return o(
|
|
3308
|
+
function ee(w) {
|
|
3309
|
+
return o(w) === "Uint32Array";
|
|
3258
3310
|
}
|
|
3259
3311
|
t.isUint32Array = ee;
|
|
3260
|
-
function x(
|
|
3261
|
-
return o(
|
|
3312
|
+
function x(w) {
|
|
3313
|
+
return o(w) === "Int8Array";
|
|
3262
3314
|
}
|
|
3263
3315
|
t.isInt8Array = x;
|
|
3264
|
-
function j(
|
|
3265
|
-
return o(
|
|
3316
|
+
function j(w) {
|
|
3317
|
+
return o(w) === "Int16Array";
|
|
3266
3318
|
}
|
|
3267
3319
|
t.isInt16Array = j;
|
|
3268
|
-
function B(
|
|
3269
|
-
return o(
|
|
3320
|
+
function B(w) {
|
|
3321
|
+
return o(w) === "Int32Array";
|
|
3270
3322
|
}
|
|
3271
3323
|
t.isInt32Array = B;
|
|
3272
|
-
function re(
|
|
3273
|
-
return o(
|
|
3324
|
+
function re(w) {
|
|
3325
|
+
return o(w) === "Float32Array";
|
|
3274
3326
|
}
|
|
3275
3327
|
t.isFloat32Array = re;
|
|
3276
|
-
function ne(
|
|
3277
|
-
return o(
|
|
3328
|
+
function ne(w) {
|
|
3329
|
+
return o(w) === "Float64Array";
|
|
3278
3330
|
}
|
|
3279
3331
|
t.isFloat64Array = ne;
|
|
3280
|
-
function _e(
|
|
3281
|
-
return o(
|
|
3332
|
+
function _e(w) {
|
|
3333
|
+
return o(w) === "BigInt64Array";
|
|
3282
3334
|
}
|
|
3283
3335
|
t.isBigInt64Array = _e;
|
|
3284
|
-
function Se(
|
|
3285
|
-
return o(
|
|
3336
|
+
function Se(w) {
|
|
3337
|
+
return o(w) === "BigUint64Array";
|
|
3286
3338
|
}
|
|
3287
3339
|
t.isBigUint64Array = Se;
|
|
3288
|
-
function fe(
|
|
3289
|
-
return
|
|
3340
|
+
function fe(w) {
|
|
3341
|
+
return d(w) === "[object Map]";
|
|
3290
3342
|
}
|
|
3291
3343
|
fe.working = typeof Map < "u" && fe(/* @__PURE__ */ new Map());
|
|
3292
|
-
function
|
|
3293
|
-
return typeof Map > "u" ? !1 : fe.working ? fe(
|
|
3344
|
+
function tt(w) {
|
|
3345
|
+
return typeof Map > "u" ? !1 : fe.working ? fe(w) : w instanceof Map;
|
|
3294
3346
|
}
|
|
3295
|
-
t.isMap =
|
|
3296
|
-
function le(
|
|
3297
|
-
return
|
|
3347
|
+
t.isMap = tt;
|
|
3348
|
+
function le(w) {
|
|
3349
|
+
return d(w) === "[object Set]";
|
|
3298
3350
|
}
|
|
3299
3351
|
le.working = typeof Set < "u" && le(/* @__PURE__ */ new Set());
|
|
3300
|
-
function
|
|
3301
|
-
return typeof Set > "u" ? !1 : le.working ? le(
|
|
3352
|
+
function Be(w) {
|
|
3353
|
+
return typeof Set > "u" ? !1 : le.working ? le(w) : w instanceof Set;
|
|
3302
3354
|
}
|
|
3303
|
-
t.isSet =
|
|
3304
|
-
function
|
|
3305
|
-
return
|
|
3355
|
+
t.isSet = Be;
|
|
3356
|
+
function Oe(w) {
|
|
3357
|
+
return d(w) === "[object WeakMap]";
|
|
3306
3358
|
}
|
|
3307
|
-
|
|
3308
|
-
function
|
|
3309
|
-
return typeof WeakMap > "u" ? !1 :
|
|
3359
|
+
Oe.working = typeof WeakMap < "u" && Oe(/* @__PURE__ */ new WeakMap());
|
|
3360
|
+
function rt(w) {
|
|
3361
|
+
return typeof WeakMap > "u" ? !1 : Oe.working ? Oe(w) : w instanceof WeakMap;
|
|
3310
3362
|
}
|
|
3311
|
-
t.isWeakMap =
|
|
3312
|
-
function
|
|
3313
|
-
return
|
|
3363
|
+
t.isWeakMap = rt;
|
|
3364
|
+
function xe(w) {
|
|
3365
|
+
return d(w) === "[object WeakSet]";
|
|
3314
3366
|
}
|
|
3315
|
-
|
|
3316
|
-
function he(
|
|
3317
|
-
return
|
|
3367
|
+
xe.working = typeof WeakSet < "u" && xe(/* @__PURE__ */ new WeakSet());
|
|
3368
|
+
function he(w) {
|
|
3369
|
+
return xe(w);
|
|
3318
3370
|
}
|
|
3319
3371
|
t.isWeakSet = he;
|
|
3320
|
-
function
|
|
3321
|
-
return
|
|
3372
|
+
function ke(w) {
|
|
3373
|
+
return d(w) === "[object ArrayBuffer]";
|
|
3322
3374
|
}
|
|
3323
|
-
|
|
3324
|
-
function V(
|
|
3325
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
3375
|
+
ke.working = typeof ArrayBuffer < "u" && ke(new ArrayBuffer());
|
|
3376
|
+
function V(w) {
|
|
3377
|
+
return typeof ArrayBuffer > "u" ? !1 : ke.working ? ke(w) : w instanceof ArrayBuffer;
|
|
3326
3378
|
}
|
|
3327
3379
|
t.isArrayBuffer = V;
|
|
3328
|
-
function
|
|
3329
|
-
return
|
|
3380
|
+
function p(w) {
|
|
3381
|
+
return d(w) === "[object DataView]";
|
|
3330
3382
|
}
|
|
3331
|
-
|
|
3332
|
-
function b(
|
|
3333
|
-
return typeof DataView > "u" ? !1 :
|
|
3383
|
+
p.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && p(new DataView(new ArrayBuffer(1), 0, 1));
|
|
3384
|
+
function b(w) {
|
|
3385
|
+
return typeof DataView > "u" ? !1 : p.working ? p(w) : w instanceof DataView;
|
|
3334
3386
|
}
|
|
3335
3387
|
t.isDataView = b;
|
|
3336
3388
|
var S = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3337
|
-
function
|
|
3338
|
-
return
|
|
3389
|
+
function I(w) {
|
|
3390
|
+
return d(w) === "[object SharedArrayBuffer]";
|
|
3339
3391
|
}
|
|
3340
|
-
function P(
|
|
3341
|
-
return typeof S > "u" ? !1 : (typeof
|
|
3392
|
+
function P(w) {
|
|
3393
|
+
return typeof S > "u" ? !1 : (typeof I.working > "u" && (I.working = I(new S())), I.working ? I(w) : w instanceof S);
|
|
3342
3394
|
}
|
|
3343
3395
|
t.isSharedArrayBuffer = P;
|
|
3344
|
-
function N(
|
|
3345
|
-
return
|
|
3396
|
+
function N(w) {
|
|
3397
|
+
return d(w) === "[object AsyncFunction]";
|
|
3346
3398
|
}
|
|
3347
3399
|
t.isAsyncFunction = N;
|
|
3348
|
-
function
|
|
3349
|
-
return
|
|
3400
|
+
function F(w) {
|
|
3401
|
+
return d(w) === "[object Map Iterator]";
|
|
3350
3402
|
}
|
|
3351
|
-
t.isMapIterator =
|
|
3352
|
-
function O(
|
|
3353
|
-
return
|
|
3403
|
+
t.isMapIterator = F;
|
|
3404
|
+
function O(w) {
|
|
3405
|
+
return d(w) === "[object Set Iterator]";
|
|
3354
3406
|
}
|
|
3355
3407
|
t.isSetIterator = O;
|
|
3356
|
-
function
|
|
3357
|
-
return
|
|
3408
|
+
function U(w) {
|
|
3409
|
+
return d(w) === "[object Generator]";
|
|
3358
3410
|
}
|
|
3359
|
-
t.isGeneratorObject =
|
|
3360
|
-
function Y(
|
|
3361
|
-
return
|
|
3411
|
+
t.isGeneratorObject = U;
|
|
3412
|
+
function Y(w) {
|
|
3413
|
+
return d(w) === "[object WebAssembly.Module]";
|
|
3362
3414
|
}
|
|
3363
3415
|
t.isWebAssemblyCompiledModule = Y;
|
|
3364
|
-
function ge(
|
|
3365
|
-
return R(
|
|
3416
|
+
function ge(w) {
|
|
3417
|
+
return R(w, A);
|
|
3366
3418
|
}
|
|
3367
3419
|
t.isNumberObject = ge;
|
|
3368
|
-
function pe(
|
|
3369
|
-
return R(
|
|
3420
|
+
function pe(w) {
|
|
3421
|
+
return R(w, g);
|
|
3370
3422
|
}
|
|
3371
3423
|
t.isStringObject = pe;
|
|
3372
|
-
function ie(
|
|
3373
|
-
return R(
|
|
3424
|
+
function ie(w) {
|
|
3425
|
+
return R(w, v);
|
|
3374
3426
|
}
|
|
3375
3427
|
t.isBooleanObject = ie;
|
|
3376
|
-
function De(
|
|
3377
|
-
return l && R(
|
|
3428
|
+
function De(w) {
|
|
3429
|
+
return l && R(w, E);
|
|
3378
3430
|
}
|
|
3379
3431
|
t.isBigIntObject = De;
|
|
3380
|
-
function
|
|
3381
|
-
return f && R(
|
|
3432
|
+
function ft(w) {
|
|
3433
|
+
return f && R(w, C);
|
|
3382
3434
|
}
|
|
3383
|
-
t.isSymbolObject =
|
|
3384
|
-
function
|
|
3385
|
-
return ge(
|
|
3435
|
+
t.isSymbolObject = ft;
|
|
3436
|
+
function nt(w) {
|
|
3437
|
+
return ge(w) || pe(w) || ie(w) || De(w) || ft(w);
|
|
3386
3438
|
}
|
|
3387
|
-
t.isBoxedPrimitive =
|
|
3388
|
-
function
|
|
3389
|
-
return typeof Uint8Array < "u" && (V(
|
|
3439
|
+
t.isBoxedPrimitive = nt;
|
|
3440
|
+
function kt(w) {
|
|
3441
|
+
return typeof Uint8Array < "u" && (V(w) || P(w));
|
|
3390
3442
|
}
|
|
3391
|
-
t.isAnyArrayBuffer =
|
|
3392
|
-
Object.defineProperty(t,
|
|
3443
|
+
t.isAnyArrayBuffer = kt, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(w) {
|
|
3444
|
+
Object.defineProperty(t, w, {
|
|
3393
3445
|
enumerable: !1,
|
|
3394
3446
|
value: function() {
|
|
3395
|
-
throw new Error(
|
|
3447
|
+
throw new Error(w + " is not supported in userland");
|
|
3396
3448
|
}
|
|
3397
3449
|
});
|
|
3398
3450
|
});
|
|
3399
|
-
})(
|
|
3400
|
-
var
|
|
3451
|
+
})(mn);
|
|
3452
|
+
var Bs = function(e) {
|
|
3401
3453
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3402
|
-
},
|
|
3403
|
-
typeof Object.create == "function" ?
|
|
3454
|
+
}, ar = { exports: {} };
|
|
3455
|
+
typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
3404
3456
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
3405
3457
|
constructor: {
|
|
3406
3458
|
value: e,
|
|
@@ -3409,7 +3461,7 @@ typeof Object.create == "function" ? or.exports = function(e, r) {
|
|
|
3409
3461
|
configurable: !0
|
|
3410
3462
|
}
|
|
3411
3463
|
}));
|
|
3412
|
-
} :
|
|
3464
|
+
} : ar.exports = function(e, r) {
|
|
3413
3465
|
if (r) {
|
|
3414
3466
|
e.super_ = r;
|
|
3415
3467
|
var o = function() {
|
|
@@ -3417,83 +3469,83 @@ typeof Object.create == "function" ? or.exports = function(e, r) {
|
|
|
3417
3469
|
o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
|
|
3418
3470
|
}
|
|
3419
3471
|
};
|
|
3420
|
-
var
|
|
3472
|
+
var Os = ar.exports;
|
|
3421
3473
|
(function(t) {
|
|
3422
3474
|
var e = Object.getOwnPropertyDescriptors || function(b) {
|
|
3423
|
-
for (var S = Object.keys(b),
|
|
3424
|
-
|
|
3425
|
-
return
|
|
3475
|
+
for (var S = Object.keys(b), I = {}, P = 0; P < S.length; P++)
|
|
3476
|
+
I[S[P]] = Object.getOwnPropertyDescriptor(b, S[P]);
|
|
3477
|
+
return I;
|
|
3426
3478
|
}, r = /%[sdj%]/g;
|
|
3427
|
-
t.format = function(
|
|
3428
|
-
if (!x(
|
|
3479
|
+
t.format = function(p) {
|
|
3480
|
+
if (!x(p)) {
|
|
3429
3481
|
for (var b = [], S = 0; S < arguments.length; S++)
|
|
3430
3482
|
b.push(l(arguments[S]));
|
|
3431
3483
|
return b.join(" ");
|
|
3432
3484
|
}
|
|
3433
|
-
for (var S = 1,
|
|
3485
|
+
for (var S = 1, I = arguments, P = I.length, N = String(p).replace(r, function(O) {
|
|
3434
3486
|
if (O === "%%")
|
|
3435
3487
|
return "%";
|
|
3436
3488
|
if (S >= P)
|
|
3437
3489
|
return O;
|
|
3438
3490
|
switch (O) {
|
|
3439
3491
|
case "%s":
|
|
3440
|
-
return String(
|
|
3492
|
+
return String(I[S++]);
|
|
3441
3493
|
case "%d":
|
|
3442
|
-
return Number(
|
|
3494
|
+
return Number(I[S++]);
|
|
3443
3495
|
case "%j":
|
|
3444
3496
|
try {
|
|
3445
|
-
return JSON.stringify(
|
|
3497
|
+
return JSON.stringify(I[S++]);
|
|
3446
3498
|
} catch {
|
|
3447
3499
|
return "[Circular]";
|
|
3448
3500
|
}
|
|
3449
3501
|
default:
|
|
3450
3502
|
return O;
|
|
3451
3503
|
}
|
|
3452
|
-
}),
|
|
3453
|
-
X(
|
|
3504
|
+
}), F = I[S]; S < P; F = I[++S])
|
|
3505
|
+
X(F) || !ne(F) ? N += " " + F : N += " " + l(F);
|
|
3454
3506
|
return N;
|
|
3455
|
-
}, t.deprecate = function(
|
|
3456
|
-
if (typeof
|
|
3457
|
-
return
|
|
3458
|
-
if (typeof
|
|
3507
|
+
}, t.deprecate = function(p, b) {
|
|
3508
|
+
if (typeof T.process < "u" && T.process.noDeprecation === !0)
|
|
3509
|
+
return p;
|
|
3510
|
+
if (typeof T.process > "u")
|
|
3459
3511
|
return function() {
|
|
3460
|
-
return t.deprecate(
|
|
3512
|
+
return t.deprecate(p, b).apply(this, arguments);
|
|
3461
3513
|
};
|
|
3462
3514
|
var S = !1;
|
|
3463
|
-
function
|
|
3515
|
+
function I() {
|
|
3464
3516
|
if (!S) {
|
|
3465
|
-
if (
|
|
3517
|
+
if (T.process.throwDeprecation)
|
|
3466
3518
|
throw new Error(b);
|
|
3467
|
-
|
|
3519
|
+
T.process.traceDeprecation ? console.trace(b) : console.error(b), S = !0;
|
|
3468
3520
|
}
|
|
3469
|
-
return
|
|
3521
|
+
return p.apply(this, arguments);
|
|
3470
3522
|
}
|
|
3471
|
-
return
|
|
3523
|
+
return I;
|
|
3472
3524
|
};
|
|
3473
3525
|
var o = {}, s = /^$/;
|
|
3474
|
-
if (
|
|
3475
|
-
var u =
|
|
3526
|
+
if (T.process.env.NODE_DEBUG) {
|
|
3527
|
+
var u = T.process.env.NODE_DEBUG;
|
|
3476
3528
|
u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
|
|
3477
3529
|
}
|
|
3478
|
-
t.debuglog = function(
|
|
3479
|
-
if (
|
|
3480
|
-
if (s.test(
|
|
3481
|
-
var b =
|
|
3482
|
-
o[
|
|
3530
|
+
t.debuglog = function(p) {
|
|
3531
|
+
if (p = p.toUpperCase(), !o[p])
|
|
3532
|
+
if (s.test(p)) {
|
|
3533
|
+
var b = T.process.pid;
|
|
3534
|
+
o[p] = function() {
|
|
3483
3535
|
var S = t.format.apply(t, arguments);
|
|
3484
|
-
console.error("%s %d: %s",
|
|
3536
|
+
console.error("%s %d: %s", p, b, S);
|
|
3485
3537
|
};
|
|
3486
3538
|
} else
|
|
3487
|
-
o[
|
|
3539
|
+
o[p] = function() {
|
|
3488
3540
|
};
|
|
3489
|
-
return o[
|
|
3541
|
+
return o[p];
|
|
3490
3542
|
};
|
|
3491
|
-
function l(
|
|
3543
|
+
function l(p, b) {
|
|
3492
3544
|
var S = {
|
|
3493
3545
|
seen: [],
|
|
3494
|
-
stylize:
|
|
3546
|
+
stylize: d
|
|
3495
3547
|
};
|
|
3496
|
-
return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), z(b) ? S.showHidden = b : b && t._extend(S, b), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = f), g(S,
|
|
3548
|
+
return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), z(b) ? S.showHidden = b : b && t._extend(S, b), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = f), g(S, p, S.depth);
|
|
3497
3549
|
}
|
|
3498
3550
|
t.inspect = l, l.colors = {
|
|
3499
3551
|
bold: [1, 22],
|
|
@@ -3520,100 +3572,100 @@ var _s = or.exports;
|
|
|
3520
3572
|
// "name": intentionally not styling
|
|
3521
3573
|
regexp: "red"
|
|
3522
3574
|
};
|
|
3523
|
-
function f(
|
|
3575
|
+
function f(p, b) {
|
|
3524
3576
|
var S = l.styles[b];
|
|
3525
|
-
return S ? "\x1B[" + l.colors[S][0] + "m" +
|
|
3577
|
+
return S ? "\x1B[" + l.colors[S][0] + "m" + p + "\x1B[" + l.colors[S][1] + "m" : p;
|
|
3526
3578
|
}
|
|
3527
|
-
function p
|
|
3528
|
-
return
|
|
3579
|
+
function d(p, b) {
|
|
3580
|
+
return p;
|
|
3529
3581
|
}
|
|
3530
|
-
function A(
|
|
3582
|
+
function A(p) {
|
|
3531
3583
|
var b = {};
|
|
3532
|
-
return
|
|
3584
|
+
return p.forEach(function(S, I) {
|
|
3533
3585
|
b[S] = !0;
|
|
3534
3586
|
}), b;
|
|
3535
3587
|
}
|
|
3536
|
-
function g(
|
|
3537
|
-
if (
|
|
3588
|
+
function g(p, b, S) {
|
|
3589
|
+
if (p.customInspect && b && fe(b.inspect) && // Filter out the util module, it's inspect function is special
|
|
3538
3590
|
b.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3539
3591
|
!(b.constructor && b.constructor.prototype === b)) {
|
|
3540
|
-
var
|
|
3541
|
-
return x(
|
|
3592
|
+
var I = b.inspect(S, p);
|
|
3593
|
+
return x(I) || (I = g(p, I, S)), I;
|
|
3542
3594
|
}
|
|
3543
|
-
var P =
|
|
3595
|
+
var P = v(p, b);
|
|
3544
3596
|
if (P)
|
|
3545
3597
|
return P;
|
|
3546
|
-
var N = Object.keys(b),
|
|
3547
|
-
if (
|
|
3598
|
+
var N = Object.keys(b), F = A(N);
|
|
3599
|
+
if (p.showHidden && (N = Object.getOwnPropertyNames(b)), Se(b) && (N.indexOf("message") >= 0 || N.indexOf("description") >= 0))
|
|
3548
3600
|
return E(b);
|
|
3549
3601
|
if (N.length === 0) {
|
|
3550
3602
|
if (fe(b)) {
|
|
3551
3603
|
var O = b.name ? ": " + b.name : "";
|
|
3552
|
-
return
|
|
3604
|
+
return p.stylize("[Function" + O + "]", "special");
|
|
3553
3605
|
}
|
|
3554
3606
|
if (re(b))
|
|
3555
|
-
return
|
|
3607
|
+
return p.stylize(RegExp.prototype.toString.call(b), "regexp");
|
|
3556
3608
|
if (_e(b))
|
|
3557
|
-
return
|
|
3609
|
+
return p.stylize(Date.prototype.toString.call(b), "date");
|
|
3558
3610
|
if (Se(b))
|
|
3559
3611
|
return E(b);
|
|
3560
3612
|
}
|
|
3561
|
-
var
|
|
3613
|
+
var U = "", Y = !1, ge = ["{", "}"];
|
|
3562
3614
|
if (Q(b) && (Y = !0, ge = ["[", "]"]), fe(b)) {
|
|
3563
3615
|
var pe = b.name ? ": " + b.name : "";
|
|
3564
|
-
|
|
3616
|
+
U = " [Function" + pe + "]";
|
|
3565
3617
|
}
|
|
3566
|
-
if (re(b) && (
|
|
3567
|
-
return ge[0] +
|
|
3618
|
+
if (re(b) && (U = " " + RegExp.prototype.toString.call(b)), _e(b) && (U = " " + Date.prototype.toUTCString.call(b)), Se(b) && (U = " " + E(b)), N.length === 0 && (!Y || b.length == 0))
|
|
3619
|
+
return ge[0] + U + ge[1];
|
|
3568
3620
|
if (S < 0)
|
|
3569
|
-
return re(b) ?
|
|
3570
|
-
|
|
3621
|
+
return re(b) ? p.stylize(RegExp.prototype.toString.call(b), "regexp") : p.stylize("[Object]", "special");
|
|
3622
|
+
p.seen.push(b);
|
|
3571
3623
|
var ie;
|
|
3572
|
-
return Y ? ie =
|
|
3573
|
-
return R(
|
|
3574
|
-
}),
|
|
3624
|
+
return Y ? ie = C(p, b, S, F, N) : ie = N.map(function(De) {
|
|
3625
|
+
return R(p, b, S, F, De, Y);
|
|
3626
|
+
}), p.seen.pop(), L(ie, U, ge);
|
|
3575
3627
|
}
|
|
3576
|
-
function
|
|
3628
|
+
function v(p, b) {
|
|
3577
3629
|
if (B(b))
|
|
3578
|
-
return
|
|
3630
|
+
return p.stylize("undefined", "undefined");
|
|
3579
3631
|
if (x(b)) {
|
|
3580
3632
|
var S = "'" + JSON.stringify(b).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3581
|
-
return
|
|
3633
|
+
return p.stylize(S, "string");
|
|
3582
3634
|
}
|
|
3583
3635
|
if (ee(b))
|
|
3584
|
-
return
|
|
3636
|
+
return p.stylize("" + b, "number");
|
|
3585
3637
|
if (z(b))
|
|
3586
|
-
return
|
|
3638
|
+
return p.stylize("" + b, "boolean");
|
|
3587
3639
|
if (X(b))
|
|
3588
|
-
return
|
|
3640
|
+
return p.stylize("null", "null");
|
|
3589
3641
|
}
|
|
3590
|
-
function E(
|
|
3591
|
-
return "[" + Error.prototype.toString.call(
|
|
3642
|
+
function E(p) {
|
|
3643
|
+
return "[" + Error.prototype.toString.call(p) + "]";
|
|
3592
3644
|
}
|
|
3593
|
-
function
|
|
3594
|
-
for (var N = [],
|
|
3595
|
-
|
|
3596
|
-
|
|
3645
|
+
function C(p, b, S, I, P) {
|
|
3646
|
+
for (var N = [], F = 0, O = b.length; F < O; ++F)
|
|
3647
|
+
xe(b, String(F)) ? N.push(R(
|
|
3648
|
+
p,
|
|
3597
3649
|
b,
|
|
3598
3650
|
S,
|
|
3599
|
-
|
|
3600
|
-
String(
|
|
3651
|
+
I,
|
|
3652
|
+
String(F),
|
|
3601
3653
|
!0
|
|
3602
3654
|
)) : N.push("");
|
|
3603
|
-
return P.forEach(function(
|
|
3604
|
-
|
|
3605
|
-
|
|
3655
|
+
return P.forEach(function(U) {
|
|
3656
|
+
U.match(/^\d+$/) || N.push(R(
|
|
3657
|
+
p,
|
|
3606
3658
|
b,
|
|
3607
3659
|
S,
|
|
3608
|
-
|
|
3609
|
-
|
|
3660
|
+
I,
|
|
3661
|
+
U,
|
|
3610
3662
|
!0
|
|
3611
3663
|
));
|
|
3612
3664
|
}), N;
|
|
3613
3665
|
}
|
|
3614
|
-
function R(
|
|
3615
|
-
var
|
|
3616
|
-
if (
|
|
3666
|
+
function R(p, b, S, I, P, N) {
|
|
3667
|
+
var F, O, U;
|
|
3668
|
+
if (U = Object.getOwnPropertyDescriptor(b, P) || { value: b[P] }, U.get ? U.set ? O = p.stylize("[Getter/Setter]", "special") : O = p.stylize("[Getter]", "special") : U.set && (O = p.stylize("[Setter]", "special")), xe(I, P) || (F = "[" + P + "]"), O || (p.seen.indexOf(U.value) < 0 ? (X(S) ? O = g(p, U.value, null) : O = g(p, U.value, S - 1), O.indexOf(`
|
|
3617
3669
|
`) > -1 && (N ? O = O.split(`
|
|
3618
3670
|
`).map(function(Y) {
|
|
3619
3671
|
return " " + Y;
|
|
@@ -3623,87 +3675,87 @@ var _s = or.exports;
|
|
|
3623
3675
|
`).map(function(Y) {
|
|
3624
3676
|
return " " + Y;
|
|
3625
3677
|
}).join(`
|
|
3626
|
-
`))) : O =
|
|
3678
|
+
`))) : O = p.stylize("[Circular]", "special")), B(F)) {
|
|
3627
3679
|
if (N && P.match(/^\d+$/))
|
|
3628
3680
|
return O;
|
|
3629
|
-
|
|
3681
|
+
F = JSON.stringify("" + P), F.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (F = F.slice(1, -1), F = p.stylize(F, "name")) : (F = F.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), F = p.stylize(F, "string"));
|
|
3630
3682
|
}
|
|
3631
|
-
return
|
|
3683
|
+
return F + ": " + O;
|
|
3632
3684
|
}
|
|
3633
|
-
function
|
|
3634
|
-
var
|
|
3685
|
+
function L(p, b, S) {
|
|
3686
|
+
var I = p.reduce(function(P, N) {
|
|
3635
3687
|
return N.indexOf(`
|
|
3636
3688
|
`) >= 0, P + N.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3637
3689
|
}, 0);
|
|
3638
|
-
return
|
|
3639
|
-
`) + " " +
|
|
3640
|
-
`) + " " + S[1] : S[0] + b + " " +
|
|
3690
|
+
return I > 60 ? S[0] + (b === "" ? "" : b + `
|
|
3691
|
+
`) + " " + p.join(`,
|
|
3692
|
+
`) + " " + S[1] : S[0] + b + " " + p.join(", ") + " " + S[1];
|
|
3641
3693
|
}
|
|
3642
|
-
t.types =
|
|
3643
|
-
function Q(
|
|
3644
|
-
return Array.isArray(
|
|
3694
|
+
t.types = mn;
|
|
3695
|
+
function Q(p) {
|
|
3696
|
+
return Array.isArray(p);
|
|
3645
3697
|
}
|
|
3646
3698
|
t.isArray = Q;
|
|
3647
|
-
function z(
|
|
3648
|
-
return typeof
|
|
3699
|
+
function z(p) {
|
|
3700
|
+
return typeof p == "boolean";
|
|
3649
3701
|
}
|
|
3650
3702
|
t.isBoolean = z;
|
|
3651
|
-
function X(
|
|
3652
|
-
return
|
|
3703
|
+
function X(p) {
|
|
3704
|
+
return p === null;
|
|
3653
3705
|
}
|
|
3654
3706
|
t.isNull = X;
|
|
3655
|
-
function ye(
|
|
3656
|
-
return
|
|
3707
|
+
function ye(p) {
|
|
3708
|
+
return p == null;
|
|
3657
3709
|
}
|
|
3658
3710
|
t.isNullOrUndefined = ye;
|
|
3659
|
-
function ee(
|
|
3660
|
-
return typeof
|
|
3711
|
+
function ee(p) {
|
|
3712
|
+
return typeof p == "number";
|
|
3661
3713
|
}
|
|
3662
3714
|
t.isNumber = ee;
|
|
3663
|
-
function x(
|
|
3664
|
-
return typeof
|
|
3715
|
+
function x(p) {
|
|
3716
|
+
return typeof p == "string";
|
|
3665
3717
|
}
|
|
3666
3718
|
t.isString = x;
|
|
3667
|
-
function j(
|
|
3668
|
-
return typeof
|
|
3719
|
+
function j(p) {
|
|
3720
|
+
return typeof p == "symbol";
|
|
3669
3721
|
}
|
|
3670
3722
|
t.isSymbol = j;
|
|
3671
|
-
function B(
|
|
3672
|
-
return
|
|
3723
|
+
function B(p) {
|
|
3724
|
+
return p === void 0;
|
|
3673
3725
|
}
|
|
3674
3726
|
t.isUndefined = B;
|
|
3675
|
-
function re(
|
|
3676
|
-
return ne(
|
|
3727
|
+
function re(p) {
|
|
3728
|
+
return ne(p) && le(p) === "[object RegExp]";
|
|
3677
3729
|
}
|
|
3678
3730
|
t.isRegExp = re, t.types.isRegExp = re;
|
|
3679
|
-
function ne(
|
|
3680
|
-
return typeof
|
|
3731
|
+
function ne(p) {
|
|
3732
|
+
return typeof p == "object" && p !== null;
|
|
3681
3733
|
}
|
|
3682
3734
|
t.isObject = ne;
|
|
3683
|
-
function _e(
|
|
3684
|
-
return ne(
|
|
3735
|
+
function _e(p) {
|
|
3736
|
+
return ne(p) && le(p) === "[object Date]";
|
|
3685
3737
|
}
|
|
3686
3738
|
t.isDate = _e, t.types.isDate = _e;
|
|
3687
|
-
function Se(
|
|
3688
|
-
return ne(
|
|
3739
|
+
function Se(p) {
|
|
3740
|
+
return ne(p) && (le(p) === "[object Error]" || p instanceof Error);
|
|
3689
3741
|
}
|
|
3690
3742
|
t.isError = Se, t.types.isNativeError = Se;
|
|
3691
|
-
function fe(
|
|
3692
|
-
return typeof
|
|
3743
|
+
function fe(p) {
|
|
3744
|
+
return typeof p == "function";
|
|
3693
3745
|
}
|
|
3694
3746
|
t.isFunction = fe;
|
|
3695
|
-
function
|
|
3696
|
-
return
|
|
3697
|
-
typeof
|
|
3747
|
+
function tt(p) {
|
|
3748
|
+
return p === null || typeof p == "boolean" || typeof p == "number" || typeof p == "string" || typeof p == "symbol" || // ES6 symbol
|
|
3749
|
+
typeof p > "u";
|
|
3698
3750
|
}
|
|
3699
|
-
t.isPrimitive =
|
|
3700
|
-
function le(
|
|
3701
|
-
return Object.prototype.toString.call(
|
|
3751
|
+
t.isPrimitive = tt, t.isBuffer = Bs;
|
|
3752
|
+
function le(p) {
|
|
3753
|
+
return Object.prototype.toString.call(p);
|
|
3702
3754
|
}
|
|
3703
|
-
function
|
|
3704
|
-
return
|
|
3755
|
+
function Be(p) {
|
|
3756
|
+
return p < 10 ? "0" + p.toString(10) : p.toString(10);
|
|
3705
3757
|
}
|
|
3706
|
-
var
|
|
3758
|
+
var Oe = [
|
|
3707
3759
|
"Jan",
|
|
3708
3760
|
"Feb",
|
|
3709
3761
|
"Mar",
|
|
@@ -3717,25 +3769,25 @@ var _s = or.exports;
|
|
|
3717
3769
|
"Nov",
|
|
3718
3770
|
"Dec"
|
|
3719
3771
|
];
|
|
3720
|
-
function
|
|
3721
|
-
var
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3772
|
+
function rt() {
|
|
3773
|
+
var p = /* @__PURE__ */ new Date(), b = [
|
|
3774
|
+
Be(p.getHours()),
|
|
3775
|
+
Be(p.getMinutes()),
|
|
3776
|
+
Be(p.getSeconds())
|
|
3725
3777
|
].join(":");
|
|
3726
|
-
return [
|
|
3778
|
+
return [p.getDate(), Oe[p.getMonth()], b].join(" ");
|
|
3727
3779
|
}
|
|
3728
3780
|
t.log = function() {
|
|
3729
|
-
console.log("%s - %s",
|
|
3730
|
-
}, t.inherits =
|
|
3781
|
+
console.log("%s - %s", rt(), t.format.apply(t, arguments));
|
|
3782
|
+
}, t.inherits = Os, t._extend = function(p, b) {
|
|
3731
3783
|
if (!b || !ne(b))
|
|
3732
|
-
return
|
|
3733
|
-
for (var S = Object.keys(b),
|
|
3734
|
-
|
|
3735
|
-
return
|
|
3784
|
+
return p;
|
|
3785
|
+
for (var S = Object.keys(b), I = S.length; I--; )
|
|
3786
|
+
p[S[I]] = b[S[I]];
|
|
3787
|
+
return p;
|
|
3736
3788
|
};
|
|
3737
|
-
function
|
|
3738
|
-
return Object.prototype.hasOwnProperty.call(
|
|
3789
|
+
function xe(p, b) {
|
|
3790
|
+
return Object.prototype.hasOwnProperty.call(p, b);
|
|
3739
3791
|
}
|
|
3740
3792
|
var he = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
3741
3793
|
t.promisify = function(b) {
|
|
@@ -3753,17 +3805,17 @@ var _s = or.exports;
|
|
|
3753
3805
|
}), S;
|
|
3754
3806
|
}
|
|
3755
3807
|
function S() {
|
|
3756
|
-
for (var
|
|
3757
|
-
|
|
3758
|
-
}),
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3808
|
+
for (var I, P, N = new Promise(function(U, Y) {
|
|
3809
|
+
I = U, P = Y;
|
|
3810
|
+
}), F = [], O = 0; O < arguments.length; O++)
|
|
3811
|
+
F.push(arguments[O]);
|
|
3812
|
+
F.push(function(U, Y) {
|
|
3813
|
+
U ? P(U) : I(Y);
|
|
3762
3814
|
});
|
|
3763
3815
|
try {
|
|
3764
|
-
b.apply(this,
|
|
3765
|
-
} catch (
|
|
3766
|
-
P(
|
|
3816
|
+
b.apply(this, F);
|
|
3817
|
+
} catch (U) {
|
|
3818
|
+
P(U);
|
|
3767
3819
|
}
|
|
3768
3820
|
return N;
|
|
3769
3821
|
}
|
|
@@ -3777,43 +3829,43 @@ var _s = or.exports;
|
|
|
3777
3829
|
e(b)
|
|
3778
3830
|
);
|
|
3779
3831
|
}, t.promisify.custom = he;
|
|
3780
|
-
function
|
|
3781
|
-
if (!
|
|
3832
|
+
function ke(p, b) {
|
|
3833
|
+
if (!p) {
|
|
3782
3834
|
var S = new Error("Promise was rejected with a falsy value");
|
|
3783
|
-
S.reason =
|
|
3835
|
+
S.reason = p, p = S;
|
|
3784
3836
|
}
|
|
3785
|
-
return b(
|
|
3837
|
+
return b(p);
|
|
3786
3838
|
}
|
|
3787
|
-
function V(
|
|
3788
|
-
if (typeof
|
|
3839
|
+
function V(p) {
|
|
3840
|
+
if (typeof p != "function")
|
|
3789
3841
|
throw new TypeError('The "original" argument must be of type Function');
|
|
3790
3842
|
function b() {
|
|
3791
|
-
for (var S = [],
|
|
3792
|
-
S.push(arguments[
|
|
3843
|
+
for (var S = [], I = 0; I < arguments.length; I++)
|
|
3844
|
+
S.push(arguments[I]);
|
|
3793
3845
|
var P = S.pop();
|
|
3794
3846
|
if (typeof P != "function")
|
|
3795
3847
|
throw new TypeError("The last argument must be of type Function");
|
|
3796
|
-
var N = this,
|
|
3848
|
+
var N = this, F = function() {
|
|
3797
3849
|
return P.apply(N, arguments);
|
|
3798
3850
|
};
|
|
3799
|
-
|
|
3851
|
+
p.apply(this, S).then(
|
|
3800
3852
|
function(O) {
|
|
3801
|
-
|
|
3853
|
+
T.process.nextTick(F.bind(null, null, O));
|
|
3802
3854
|
},
|
|
3803
3855
|
function(O) {
|
|
3804
|
-
|
|
3856
|
+
T.process.nextTick(ke.bind(null, O, F));
|
|
3805
3857
|
}
|
|
3806
3858
|
);
|
|
3807
3859
|
}
|
|
3808
|
-
return Object.setPrototypeOf(b, Object.getPrototypeOf(
|
|
3860
|
+
return Object.setPrototypeOf(b, Object.getPrototypeOf(p)), Object.defineProperties(
|
|
3809
3861
|
b,
|
|
3810
|
-
e(
|
|
3862
|
+
e(p)
|
|
3811
3863
|
), b;
|
|
3812
3864
|
}
|
|
3813
3865
|
t.callbackify = V;
|
|
3814
|
-
})(
|
|
3815
|
-
const { inherits:
|
|
3816
|
-
function
|
|
3866
|
+
})(Ot);
|
|
3867
|
+
const { inherits: xs, format: Gt } = Ot;
|
|
3868
|
+
function Re(t, e, r = Error) {
|
|
3817
3869
|
if (!t)
|
|
3818
3870
|
throw new Error("Avvio error code must not be empty");
|
|
3819
3871
|
if (!e)
|
|
@@ -3821,41 +3873,41 @@ function Pe(t, e, r = Error) {
|
|
|
3821
3873
|
function o(s, u, l) {
|
|
3822
3874
|
if (!new.target)
|
|
3823
3875
|
return new o(s, u, l);
|
|
3824
|
-
Error.captureStackTrace(this, o), this.code = t, this.message = e, this.name = "AvvioError", s && u && l ? this.message =
|
|
3876
|
+
Error.captureStackTrace(this, o), this.code = t, this.message = e, this.name = "AvvioError", s && u && l ? this.message = Gt(e, s, u, l) : s && u ? this.message = Gt(e, s, u) : s ? this.message = Gt(e, s) : this.message = e;
|
|
3825
3877
|
}
|
|
3826
3878
|
return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
|
|
3827
3879
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
3828
|
-
},
|
|
3880
|
+
}, xs(o, r), o;
|
|
3829
3881
|
}
|
|
3830
|
-
var
|
|
3831
|
-
createError:
|
|
3832
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
3882
|
+
var Rn = {
|
|
3883
|
+
createError: Re,
|
|
3884
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Re(
|
|
3833
3885
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
3834
3886
|
"'%s' () is already defined, specify an expose option"
|
|
3835
3887
|
),
|
|
3836
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
3888
|
+
AVV_ERR_CALLBACK_NOT_FN: Re(
|
|
3837
3889
|
"AVV_ERR_CALLBACK_NOT_FN",
|
|
3838
3890
|
"Callback for '%s' hook is not a function. Received: '%s'"
|
|
3839
3891
|
),
|
|
3840
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
3892
|
+
AVV_ERR_PLUGIN_NOT_VALID: Re(
|
|
3841
3893
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
3842
3894
|
"Plugin must be a function or a promise. Received: '%s'"
|
|
3843
3895
|
),
|
|
3844
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
3896
|
+
AVV_ERR_ROOT_PLG_BOOTED: Re(
|
|
3845
3897
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
3846
3898
|
"Root plugin has already booted"
|
|
3847
3899
|
),
|
|
3848
|
-
AVV_ERR_PARENT_PLG_LOADED:
|
|
3900
|
+
AVV_ERR_PARENT_PLG_LOADED: Re(
|
|
3849
3901
|
"AVV_ERR_PARENT_PLG_LOADED",
|
|
3850
3902
|
"Impossible to load '%s' plugin because the parent '%s' was already loaded"
|
|
3851
3903
|
),
|
|
3852
|
-
AVV_ERR_READY_TIMEOUT:
|
|
3904
|
+
AVV_ERR_READY_TIMEOUT: Re(
|
|
3853
3905
|
"AVV_ERR_READY_TIMEOUT",
|
|
3854
3906
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
3855
3907
|
)
|
|
3856
|
-
},
|
|
3908
|
+
}, ks = function t(e, r, o) {
|
|
3857
3909
|
r === void 0 && (r = ""), o || (o = {});
|
|
3858
|
-
var s = function(
|
|
3910
|
+
var s = function(d) {
|
|
3859
3911
|
var A = {
|
|
3860
3912
|
"│": "|",
|
|
3861
3913
|
"└": "`",
|
|
@@ -3863,27 +3915,27 @@ var Pn = {
|
|
|
3863
3915
|
"─": "-",
|
|
3864
3916
|
"┬": "-"
|
|
3865
3917
|
};
|
|
3866
|
-
return o.unicode === !1 ? A[
|
|
3918
|
+
return o.unicode === !1 ? A[d] : d;
|
|
3867
3919
|
};
|
|
3868
3920
|
typeof e == "string" && (e = { label: e });
|
|
3869
3921
|
var u = e.nodes || [], l = (e.label || "").split(`
|
|
3870
3922
|
`), f = `
|
|
3871
3923
|
` + r + (u.length ? s("│") : " ") + " ";
|
|
3872
3924
|
return r + l.join(f) + `
|
|
3873
|
-
` + u.map(function(
|
|
3874
|
-
var g = A === u.length - 1,
|
|
3875
|
-
return r + s(g ? "└" : "├") + s("─") + s(
|
|
3925
|
+
` + u.map(function(d, A) {
|
|
3926
|
+
var g = A === u.length - 1, v = d.nodes && d.nodes.length, E = r + (g ? " " : s("│")) + " ";
|
|
3927
|
+
return r + s(g ? "└" : "├") + s("─") + s(v ? "┬" : "─") + " " + t(d, E, o).slice(r.length + 2);
|
|
3876
3928
|
}).join("");
|
|
3877
3929
|
};
|
|
3878
|
-
const
|
|
3879
|
-
let
|
|
3930
|
+
const Ps = ks, Dr = Symbol("avvio.TimeTree.untrackNode"), Qt = Symbol("avvio.TimeTree.trackNode"), jr = Symbol("avvio.TimeTree.getParent"), Mr = Symbol("avvio.TimeTree.getNode"), Vr = Symbol("avvio.TimeTree.addNode");
|
|
3931
|
+
let Rs = class {
|
|
3880
3932
|
constructor() {
|
|
3881
3933
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
3882
3934
|
}
|
|
3883
|
-
[
|
|
3935
|
+
[Qt](e) {
|
|
3884
3936
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
3885
3937
|
}
|
|
3886
|
-
[
|
|
3938
|
+
[Dr](e) {
|
|
3887
3939
|
this.tableId.delete(e.id);
|
|
3888
3940
|
const r = this.tableLabel.get(e.label);
|
|
3889
3941
|
if (r.id) {
|
|
@@ -3892,72 +3944,72 @@ let xs = class {
|
|
|
3892
3944
|
}
|
|
3893
3945
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
3894
3946
|
}
|
|
3895
|
-
[
|
|
3947
|
+
[jr](e) {
|
|
3896
3948
|
if (e === null)
|
|
3897
3949
|
return this.root;
|
|
3898
3950
|
const r = this.tableLabel.get(e);
|
|
3899
3951
|
return r.id ? r : r[r.length - 1];
|
|
3900
3952
|
}
|
|
3901
|
-
[
|
|
3953
|
+
[Mr](e) {
|
|
3902
3954
|
return this.tableId.get(e);
|
|
3903
3955
|
}
|
|
3904
|
-
[
|
|
3956
|
+
[Vr](e, r, o) {
|
|
3905
3957
|
if (e === null)
|
|
3906
3958
|
return this.root = {
|
|
3907
3959
|
id: "root",
|
|
3908
3960
|
label: r,
|
|
3909
3961
|
start: o,
|
|
3910
3962
|
nodes: []
|
|
3911
|
-
}, this[
|
|
3912
|
-
const u = this[
|
|
3963
|
+
}, this[Qt](this.root), this.root.id;
|
|
3964
|
+
const u = this[jr](e), l = `${r}-${Math.random()}`, f = {
|
|
3913
3965
|
id: l,
|
|
3914
3966
|
parent: e,
|
|
3915
3967
|
start: o,
|
|
3916
3968
|
label: r,
|
|
3917
3969
|
nodes: []
|
|
3918
3970
|
};
|
|
3919
|
-
return u.nodes.push(f), this[
|
|
3971
|
+
return u.nodes.push(f), this[Qt](f), l;
|
|
3920
3972
|
}
|
|
3921
3973
|
start(e, r, o = Date.now()) {
|
|
3922
|
-
return this[
|
|
3974
|
+
return this[Vr](e, r, o);
|
|
3923
3975
|
}
|
|
3924
3976
|
stop(e, r = Date.now()) {
|
|
3925
|
-
const o = this[
|
|
3926
|
-
o && (o.stop = r, o.diff = o.stop - o.start || 0, this[
|
|
3977
|
+
const o = this[Mr](e);
|
|
3978
|
+
o && (o.stop = r, o.diff = o.stop - o.start || 0, this[Dr](o));
|
|
3927
3979
|
}
|
|
3928
3980
|
toJSON() {
|
|
3929
3981
|
return Object.assign({}, this.root);
|
|
3930
3982
|
}
|
|
3931
3983
|
prittyPrint() {
|
|
3932
3984
|
const e = (o) => (o.label = `${o.label} ${o.diff} ms`, o.nodes.length > 0 && (o.nodes = o.nodes.map((s) => e(s))), o), r = e(this.toJSON());
|
|
3933
|
-
return
|
|
3985
|
+
return Ps(r);
|
|
3934
3986
|
}
|
|
3935
3987
|
};
|
|
3936
|
-
var
|
|
3937
|
-
function
|
|
3938
|
-
if (
|
|
3939
|
-
return
|
|
3940
|
-
|
|
3988
|
+
var Ns = Rs, Ar = { exports: {} }, ur = { exports: {} }, zt, qr;
|
|
3989
|
+
function Ls() {
|
|
3990
|
+
if (qr)
|
|
3991
|
+
return zt;
|
|
3992
|
+
qr = 1;
|
|
3941
3993
|
var t = 1e3, e = t * 60, r = e * 60, o = r * 24, s = o * 7, u = o * 365.25;
|
|
3942
|
-
|
|
3943
|
-
|
|
3994
|
+
zt = function(g, v) {
|
|
3995
|
+
v = v || {};
|
|
3944
3996
|
var E = typeof g;
|
|
3945
3997
|
if (E === "string" && g.length > 0)
|
|
3946
3998
|
return l(g);
|
|
3947
3999
|
if (E === "number" && isFinite(g))
|
|
3948
|
-
return
|
|
4000
|
+
return v.long ? d(g) : f(g);
|
|
3949
4001
|
throw new Error(
|
|
3950
4002
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(g)
|
|
3951
4003
|
);
|
|
3952
4004
|
};
|
|
3953
4005
|
function l(g) {
|
|
3954
4006
|
if (g = String(g), !(g.length > 100)) {
|
|
3955
|
-
var
|
|
4007
|
+
var v = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
|
|
3956
4008
|
g
|
|
3957
4009
|
);
|
|
3958
|
-
if (
|
|
3959
|
-
var E = parseFloat(
|
|
3960
|
-
switch (
|
|
4010
|
+
if (v) {
|
|
4011
|
+
var E = parseFloat(v[1]), C = (v[2] || "ms").toLowerCase();
|
|
4012
|
+
switch (C) {
|
|
3961
4013
|
case "years":
|
|
3962
4014
|
case "year":
|
|
3963
4015
|
case "yrs":
|
|
@@ -4003,37 +4055,37 @@ function Ps() {
|
|
|
4003
4055
|
}
|
|
4004
4056
|
}
|
|
4005
4057
|
function f(g) {
|
|
4006
|
-
var
|
|
4007
|
-
return
|
|
4058
|
+
var v = Math.abs(g);
|
|
4059
|
+
return v >= o ? Math.round(g / o) + "d" : v >= r ? Math.round(g / r) + "h" : v >= e ? Math.round(g / e) + "m" : v >= t ? Math.round(g / t) + "s" : g + "ms";
|
|
4008
4060
|
}
|
|
4009
|
-
function
|
|
4010
|
-
var
|
|
4011
|
-
return
|
|
4061
|
+
function d(g) {
|
|
4062
|
+
var v = Math.abs(g);
|
|
4063
|
+
return v >= o ? A(g, v, o, "day") : v >= r ? A(g, v, r, "hour") : v >= e ? A(g, v, e, "minute") : v >= t ? A(g, v, t, "second") : g + " ms";
|
|
4012
4064
|
}
|
|
4013
|
-
function A(g,
|
|
4014
|
-
var R =
|
|
4015
|
-
return Math.round(g / E) + " " +
|
|
4065
|
+
function A(g, v, E, C) {
|
|
4066
|
+
var R = v >= E * 1.5;
|
|
4067
|
+
return Math.round(g / E) + " " + C + (R ? "s" : "");
|
|
4016
4068
|
}
|
|
4017
|
-
return
|
|
4069
|
+
return zt;
|
|
4018
4070
|
}
|
|
4019
|
-
function
|
|
4020
|
-
r.debug = r, r.default = r, r.coerce =
|
|
4071
|
+
function Us(t) {
|
|
4072
|
+
r.debug = r, r.default = r, r.coerce = d, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ls(), r.destroy = A, Object.keys(t).forEach((g) => {
|
|
4021
4073
|
r[g] = t[g];
|
|
4022
4074
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4023
4075
|
function e(g) {
|
|
4024
|
-
let
|
|
4076
|
+
let v = 0;
|
|
4025
4077
|
for (let E = 0; E < g.length; E++)
|
|
4026
|
-
|
|
4027
|
-
return r.colors[Math.abs(
|
|
4078
|
+
v = (v << 5) - v + g.charCodeAt(E), v |= 0;
|
|
4079
|
+
return r.colors[Math.abs(v) % r.colors.length];
|
|
4028
4080
|
}
|
|
4029
4081
|
r.selectColor = e;
|
|
4030
4082
|
function r(g) {
|
|
4031
|
-
let
|
|
4032
|
-
function
|
|
4033
|
-
if (!
|
|
4083
|
+
let v, E = null, C, R;
|
|
4084
|
+
function L(...Q) {
|
|
4085
|
+
if (!L.enabled)
|
|
4034
4086
|
return;
|
|
4035
|
-
const z =
|
|
4036
|
-
z.diff = ye, z.prev =
|
|
4087
|
+
const z = L, X = Number(/* @__PURE__ */ new Date()), ye = X - (v || X);
|
|
4088
|
+
z.diff = ye, z.prev = v, z.curr = X, v = X, Q[0] = r.coerce(Q[0]), typeof Q[0] != "string" && Q.unshift("%O");
|
|
4037
4089
|
let ee = 0;
|
|
4038
4090
|
Q[0] = Q[0].replace(/%([a-zA-Z%])/g, (j, B) => {
|
|
4039
4091
|
if (j === "%%")
|
|
@@ -4047,49 +4099,49 @@ function Rs(t) {
|
|
|
4047
4099
|
return j;
|
|
4048
4100
|
}), r.formatArgs.call(z, Q), (z.log || r.log).apply(z, Q);
|
|
4049
4101
|
}
|
|
4050
|
-
return
|
|
4102
|
+
return L.namespace = g, L.useColors = r.useColors(), L.color = r.selectColor(g), L.extend = o, L.destroy = r.destroy, Object.defineProperty(L, "enabled", {
|
|
4051
4103
|
enumerable: !0,
|
|
4052
4104
|
configurable: !1,
|
|
4053
|
-
get: () => E !== null ? E : (
|
|
4105
|
+
get: () => E !== null ? E : (C !== r.namespaces && (C = r.namespaces, R = r.enabled(g)), R),
|
|
4054
4106
|
set: (Q) => {
|
|
4055
4107
|
E = Q;
|
|
4056
4108
|
}
|
|
4057
|
-
}), typeof r.init == "function" && r.init(
|
|
4109
|
+
}), typeof r.init == "function" && r.init(L), L;
|
|
4058
4110
|
}
|
|
4059
|
-
function o(g,
|
|
4060
|
-
const E = r(this.namespace + (typeof
|
|
4111
|
+
function o(g, v) {
|
|
4112
|
+
const E = r(this.namespace + (typeof v > "u" ? ":" : v) + g);
|
|
4061
4113
|
return E.log = this.log, E;
|
|
4062
4114
|
}
|
|
4063
4115
|
function s(g) {
|
|
4064
4116
|
r.save(g), r.namespaces = g, r.names = [], r.skips = [];
|
|
4065
|
-
let
|
|
4066
|
-
const E = (typeof g == "string" ? g : "").split(/[\s,]+/),
|
|
4067
|
-
for (
|
|
4068
|
-
E[
|
|
4117
|
+
let v;
|
|
4118
|
+
const E = (typeof g == "string" ? g : "").split(/[\s,]+/), C = E.length;
|
|
4119
|
+
for (v = 0; v < C; v++)
|
|
4120
|
+
E[v] && (g = E[v].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
|
|
4069
4121
|
}
|
|
4070
4122
|
function u() {
|
|
4071
4123
|
const g = [
|
|
4072
4124
|
...r.names.map(f),
|
|
4073
|
-
...r.skips.map(f).map((
|
|
4125
|
+
...r.skips.map(f).map((v) => "-" + v)
|
|
4074
4126
|
].join(",");
|
|
4075
4127
|
return r.enable(""), g;
|
|
4076
4128
|
}
|
|
4077
4129
|
function l(g) {
|
|
4078
4130
|
if (g[g.length - 1] === "*")
|
|
4079
4131
|
return !0;
|
|
4080
|
-
let
|
|
4081
|
-
for (
|
|
4082
|
-
if (r.skips[
|
|
4132
|
+
let v, E;
|
|
4133
|
+
for (v = 0, E = r.skips.length; v < E; v++)
|
|
4134
|
+
if (r.skips[v].test(g))
|
|
4083
4135
|
return !1;
|
|
4084
|
-
for (
|
|
4085
|
-
if (r.names[
|
|
4136
|
+
for (v = 0, E = r.names.length; v < E; v++)
|
|
4137
|
+
if (r.names[v].test(g))
|
|
4086
4138
|
return !0;
|
|
4087
4139
|
return !1;
|
|
4088
4140
|
}
|
|
4089
4141
|
function f(g) {
|
|
4090
4142
|
return g.toString().substring(2, g.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
4091
4143
|
}
|
|
4092
|
-
function
|
|
4144
|
+
function d(g) {
|
|
4093
4145
|
return g instanceof Error ? g.stack || g.message : g;
|
|
4094
4146
|
}
|
|
4095
4147
|
function A() {
|
|
@@ -4097,12 +4149,12 @@ function Rs(t) {
|
|
|
4097
4149
|
}
|
|
4098
4150
|
return r.enable(r.load()), r;
|
|
4099
4151
|
}
|
|
4100
|
-
var
|
|
4152
|
+
var $s = Us;
|
|
4101
4153
|
(function(t, e) {
|
|
4102
4154
|
e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
|
|
4103
|
-
let
|
|
4155
|
+
let d = !1;
|
|
4104
4156
|
return () => {
|
|
4105
|
-
|
|
4157
|
+
d || (d = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
4106
4158
|
};
|
|
4107
4159
|
})(), e.colors = [
|
|
4108
4160
|
"#0000CC",
|
|
@@ -4189,31 +4241,31 @@ var Ns = Rs;
|
|
|
4189
4241
|
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
4190
4242
|
typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
4191
4243
|
}
|
|
4192
|
-
function o(
|
|
4193
|
-
if (
|
|
4244
|
+
function o(d) {
|
|
4245
|
+
if (d[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + d[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
|
|
4194
4246
|
return;
|
|
4195
4247
|
const A = "color: " + this.color;
|
|
4196
|
-
|
|
4197
|
-
let g = 0,
|
|
4198
|
-
|
|
4199
|
-
E !== "%%" && (g++, E === "%c" && (
|
|
4200
|
-
}),
|
|
4248
|
+
d.splice(1, 0, A, "color: inherit");
|
|
4249
|
+
let g = 0, v = 0;
|
|
4250
|
+
d[0].replace(/%[a-zA-Z%]/g, (E) => {
|
|
4251
|
+
E !== "%%" && (g++, E === "%c" && (v = g));
|
|
4252
|
+
}), d.splice(v, 0, A);
|
|
4201
4253
|
}
|
|
4202
4254
|
e.log = console.debug || console.log || (() => {
|
|
4203
4255
|
});
|
|
4204
|
-
function s(
|
|
4256
|
+
function s(d) {
|
|
4205
4257
|
try {
|
|
4206
|
-
|
|
4258
|
+
d ? e.storage.setItem("debug", d) : e.storage.removeItem("debug");
|
|
4207
4259
|
} catch {
|
|
4208
4260
|
}
|
|
4209
4261
|
}
|
|
4210
4262
|
function u() {
|
|
4211
|
-
let
|
|
4263
|
+
let d;
|
|
4212
4264
|
try {
|
|
4213
|
-
|
|
4265
|
+
d = e.storage.getItem("debug");
|
|
4214
4266
|
} catch {
|
|
4215
4267
|
}
|
|
4216
|
-
return !
|
|
4268
|
+
return !d && typeof T.process < "u" && "env" in T.process && (d = T.process.env.DEBUG), d;
|
|
4217
4269
|
}
|
|
4218
4270
|
function l() {
|
|
4219
4271
|
try {
|
|
@@ -4221,38 +4273,38 @@ var Ns = Rs;
|
|
|
4221
4273
|
} catch {
|
|
4222
4274
|
}
|
|
4223
4275
|
}
|
|
4224
|
-
t.exports =
|
|
4276
|
+
t.exports = $s(e);
|
|
4225
4277
|
const { formatters: f } = t.exports;
|
|
4226
|
-
f.j = function(
|
|
4278
|
+
f.j = function(d) {
|
|
4227
4279
|
try {
|
|
4228
|
-
return JSON.stringify(
|
|
4280
|
+
return JSON.stringify(d);
|
|
4229
4281
|
} catch (A) {
|
|
4230
4282
|
return "[UnexpectedJSONParseError]: " + A.message;
|
|
4231
4283
|
}
|
|
4232
4284
|
};
|
|
4233
|
-
})(
|
|
4234
|
-
var
|
|
4235
|
-
const
|
|
4236
|
-
function
|
|
4237
|
-
return t[
|
|
4285
|
+
})(ur, ur.exports);
|
|
4286
|
+
var Nn = ur.exports;
|
|
4287
|
+
const Ds = an, js = gn.EventEmitter, Ms = Ot.inherits, W = Nn("avvio"), { AVV_ERR_READY_TIMEOUT: Vs } = Rn, Kt = Symbol.for("plugin-meta");
|
|
4288
|
+
function qs(t, e) {
|
|
4289
|
+
return t[Kt] && t[Kt].name ? t[Kt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4238
4290
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4239
4291
|
}
|
|
4240
|
-
function
|
|
4292
|
+
function Gs() {
|
|
4241
4293
|
const t = {};
|
|
4242
4294
|
return t.promise = new Promise((e, r) => {
|
|
4243
4295
|
t.resolve = e, t.reject = r;
|
|
4244
4296
|
}), t;
|
|
4245
4297
|
}
|
|
4246
|
-
function
|
|
4247
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name =
|
|
4298
|
+
function et(t, e, r, o, s) {
|
|
4299
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = qs(e, r), this.isAfter = o, this.q = Ds(t, Qs, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4248
4300
|
}
|
|
4249
|
-
|
|
4250
|
-
|
|
4301
|
+
Ms(et, js);
|
|
4302
|
+
et.prototype.exec = function(t, e) {
|
|
4251
4303
|
const r = this.func;
|
|
4252
4304
|
let o = !1;
|
|
4253
4305
|
const s = this.name;
|
|
4254
4306
|
if (this.parent._error && !this.isAfter) {
|
|
4255
|
-
W("skipping loading of plugin as parent errored and it is not an after", s),
|
|
4307
|
+
W("skipping loading of plugin as parent errored and it is not an after", s), T.process.nextTick(e);
|
|
4256
4308
|
return;
|
|
4257
4309
|
}
|
|
4258
4310
|
if (this.isAfter)
|
|
@@ -4260,44 +4312,44 @@ Ze.prototype.exec = function(t, e) {
|
|
|
4260
4312
|
else
|
|
4261
4313
|
try {
|
|
4262
4314
|
this.server = this.parent.override(t, r, this.opts);
|
|
4263
|
-
} catch (
|
|
4264
|
-
return W("override errored", s), e(
|
|
4315
|
+
} catch (d) {
|
|
4316
|
+
return W("override errored", s), e(d);
|
|
4265
4317
|
}
|
|
4266
4318
|
this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, W("exec", s);
|
|
4267
4319
|
let u;
|
|
4268
|
-
const l = (
|
|
4320
|
+
const l = (d) => {
|
|
4269
4321
|
if (o) {
|
|
4270
4322
|
W("loading complete", s);
|
|
4271
4323
|
return;
|
|
4272
4324
|
}
|
|
4273
|
-
this._error =
|
|
4325
|
+
this._error = d, W(d ? "exec errored" : "exec completed", s), o = !0, u && clearTimeout(u), e(d);
|
|
4274
4326
|
};
|
|
4275
4327
|
this.timeout > 0 && (W("setting up timeout", s, this.timeout), u = setTimeout(function() {
|
|
4276
4328
|
W("timed out", s), u = null;
|
|
4277
|
-
const
|
|
4278
|
-
|
|
4329
|
+
const d = new Vs(s);
|
|
4330
|
+
d.fn = r, l(d);
|
|
4279
4331
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4280
4332
|
const f = r(this.server, this.opts, l);
|
|
4281
4333
|
f && typeof f.then == "function" && (W("exec: resolving promise", s), f.then(
|
|
4282
|
-
() =>
|
|
4283
|
-
(
|
|
4334
|
+
() => T.process.nextTick(l),
|
|
4335
|
+
(d) => T.process.nextTick(l, d)
|
|
4284
4336
|
));
|
|
4285
4337
|
};
|
|
4286
|
-
|
|
4338
|
+
et.prototype.loadedSoFar = function() {
|
|
4287
4339
|
if (this.loaded)
|
|
4288
4340
|
return Promise.resolve();
|
|
4289
4341
|
const t = () => {
|
|
4290
4342
|
this.server.after((r, o) => {
|
|
4291
|
-
this._error = r, this.q.pause(), r ? (W("rejecting promise", this.name, r), this._promise.reject(r)) : (W("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4343
|
+
this._error = r, this.q.pause(), r ? (W("rejecting promise", this.name, r), this._promise.reject(r)) : (W("resolving promise", this.name), this._promise.resolve()), this._promise = null, T.process.nextTick(o, r);
|
|
4292
4344
|
}), this.q.resume();
|
|
4293
4345
|
};
|
|
4294
4346
|
let e;
|
|
4295
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4347
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Gs(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4296
4348
|
};
|
|
4297
|
-
|
|
4349
|
+
et.prototype.enqueue = function(t, e) {
|
|
4298
4350
|
W("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4299
4351
|
};
|
|
4300
|
-
|
|
4352
|
+
et.prototype.finish = function(t, e) {
|
|
4301
4353
|
W("finish", this.name, t);
|
|
4302
4354
|
const r = () => {
|
|
4303
4355
|
this.loaded || (W("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4317,19 +4369,19 @@ Ze.prototype.finish = function(t, e) {
|
|
|
4317
4369
|
r();
|
|
4318
4370
|
else
|
|
4319
4371
|
W("delayed", this.name), this.q.drain = () => {
|
|
4320
|
-
W("drain", this.name), this.q.drain =
|
|
4372
|
+
W("drain", this.name), this.q.drain = zs, queueMicrotask(o);
|
|
4321
4373
|
};
|
|
4322
4374
|
};
|
|
4323
4375
|
queueMicrotask(o), this.q.resume();
|
|
4324
4376
|
};
|
|
4325
|
-
function
|
|
4377
|
+
function Qs(t, e) {
|
|
4326
4378
|
const r = this;
|
|
4327
|
-
|
|
4379
|
+
T.process.nextTick(Er.bind(r), t, e);
|
|
4328
4380
|
}
|
|
4329
|
-
function
|
|
4381
|
+
function Er(t, e) {
|
|
4330
4382
|
if (typeof t.func.then == "function") {
|
|
4331
4383
|
t.func.then((o) => {
|
|
4332
|
-
typeof o.default == "function" && (o = o.default), t.func = o,
|
|
4384
|
+
typeof o.default == "function" && (o = o.default), t.func = o, Er.call(this, t, e);
|
|
4333
4385
|
}, e);
|
|
4334
4386
|
return;
|
|
4335
4387
|
}
|
|
@@ -4340,60 +4392,60 @@ function Sr(t, e) {
|
|
|
4340
4392
|
});
|
|
4341
4393
|
});
|
|
4342
4394
|
}
|
|
4343
|
-
function
|
|
4395
|
+
function zs() {
|
|
4344
4396
|
}
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
var
|
|
4348
|
-
const
|
|
4349
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4350
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4351
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4352
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4353
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4354
|
-
} =
|
|
4355
|
-
function
|
|
4356
|
-
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose",
|
|
4397
|
+
Ar.exports = et;
|
|
4398
|
+
Ar.exports.loadPlugin = Er;
|
|
4399
|
+
var Ks = Ar.exports;
|
|
4400
|
+
const Gr = an, Hs = gn.EventEmitter, Ws = Ot.inherits, {
|
|
4401
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ht,
|
|
4402
|
+
AVV_ERR_CALLBACK_NOT_FN: ut,
|
|
4403
|
+
AVV_ERR_PLUGIN_NOT_VALID: Js,
|
|
4404
|
+
AVV_ERR_ROOT_PLG_BOOTED: Ys,
|
|
4405
|
+
AVV_ERR_READY_TIMEOUT: Xs
|
|
4406
|
+
} = Rn, Zs = Ns, cr = Ks, Xe = Nn("avvio"), It = Symbol("kAvvio"), Wt = Symbol("kThenifyDoNotWrap");
|
|
4407
|
+
function ea(t, e, r) {
|
|
4408
|
+
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose", d = o.close || "close";
|
|
4357
4409
|
if (t[s])
|
|
4358
|
-
throw new
|
|
4410
|
+
throw new Ht(s);
|
|
4359
4411
|
if (t[u])
|
|
4360
|
-
throw new
|
|
4412
|
+
throw new Ht(u);
|
|
4361
4413
|
if (t[l])
|
|
4362
|
-
throw new
|
|
4414
|
+
throw new Ht(l);
|
|
4363
4415
|
t[s] = function(A, g) {
|
|
4364
4416
|
return r.use(A, g), this;
|
|
4365
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4366
|
-
return typeof A != "function" ? r._loadRegistered() : (r.after(
|
|
4417
|
+
}, Object.defineProperty(t, "then", { get: Ln.bind(r) }), t[It] = !0, t[u] = function(A) {
|
|
4418
|
+
return typeof A != "function" ? r._loadRegistered() : (r.after(Jt(A, this)), this);
|
|
4367
4419
|
}, t[l] = function(A) {
|
|
4368
4420
|
if (A && typeof A != "function")
|
|
4369
|
-
throw new
|
|
4370
|
-
return r.ready(A ?
|
|
4421
|
+
throw new ut(l, typeof A);
|
|
4422
|
+
return r.ready(A ? Jt(A, this) : void 0);
|
|
4371
4423
|
}, t[f] = function(A) {
|
|
4372
4424
|
if (typeof A != "function")
|
|
4373
|
-
throw new
|
|
4374
|
-
return r.onClose(
|
|
4375
|
-
}, t[
|
|
4425
|
+
throw new ut(f, typeof A);
|
|
4426
|
+
return r.onClose(oa(A, this)), this;
|
|
4427
|
+
}, t[d] = function(A) {
|
|
4376
4428
|
if (A && typeof A != "function")
|
|
4377
|
-
throw new
|
|
4378
|
-
return A ? (r.close(
|
|
4429
|
+
throw new ut(d, typeof A);
|
|
4430
|
+
return A ? (r.close(Jt(A, this)), this) : r.close();
|
|
4379
4431
|
};
|
|
4380
4432
|
}
|
|
4381
4433
|
function J(t, e, r) {
|
|
4382
4434
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof J)) {
|
|
4383
4435
|
const o = new J(t, e, r);
|
|
4384
|
-
return t &&
|
|
4436
|
+
return t && ea(t, e, o), o;
|
|
4385
4437
|
}
|
|
4386
|
-
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new
|
|
4387
|
-
this.emit("start"), this._readyQ.drain =
|
|
4388
|
-
}, this._closeQ =
|
|
4389
|
-
this.emit("close"), this._closeQ.drain =
|
|
4390
|
-
}, this._doStart = null, this._root = new
|
|
4438
|
+
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new Zs(), this._readyQ = Gr(this, Un, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4439
|
+
this.emit("start"), this._readyQ.drain = Qr;
|
|
4440
|
+
}, this._closeQ = Gr(this, ia, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4441
|
+
this.emit("close"), this._closeQ.drain = Qr;
|
|
4442
|
+
}, this._doStart = null, this._root = new cr(this, ta.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
|
|
4391
4443
|
const l = this.pluginTree.start(null, s, u);
|
|
4392
|
-
this._root.once("loaded", (f,
|
|
4444
|
+
this._root.once("loaded", (f, d, A) => {
|
|
4393
4445
|
this.pluginTree.stop(l, A);
|
|
4394
4446
|
});
|
|
4395
|
-
}),
|
|
4396
|
-
|
|
4447
|
+
}), cr.loadPlugin.call(this, this._root, (o) => {
|
|
4448
|
+
Xe("root plugin ready");
|
|
4397
4449
|
try {
|
|
4398
4450
|
this.emit("preReady"), this._root = null;
|
|
4399
4451
|
} catch (s) {
|
|
@@ -4407,38 +4459,38 @@ function J(t, e, r) {
|
|
|
4407
4459
|
this._readyQ.resume();
|
|
4408
4460
|
});
|
|
4409
4461
|
}
|
|
4410
|
-
function
|
|
4462
|
+
function ta(t, e, r) {
|
|
4411
4463
|
this._doStart = r, e.autostart && this.start();
|
|
4412
4464
|
}
|
|
4413
|
-
|
|
4465
|
+
Ws(J, Hs);
|
|
4414
4466
|
J.prototype.start = function() {
|
|
4415
|
-
return this.started = !0,
|
|
4467
|
+
return this.started = !0, T.process.nextTick(this._doStart), this;
|
|
4416
4468
|
};
|
|
4417
4469
|
J.prototype.override = function(t, e, r) {
|
|
4418
4470
|
return t;
|
|
4419
4471
|
};
|
|
4420
|
-
function
|
|
4472
|
+
function ra(t) {
|
|
4421
4473
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4422
|
-
throw new
|
|
4474
|
+
throw new Js(typeof t);
|
|
4423
4475
|
return t;
|
|
4424
4476
|
}
|
|
4425
|
-
J.prototype[
|
|
4477
|
+
J.prototype[It] = !0;
|
|
4426
4478
|
J.prototype.use = function(t, e) {
|
|
4427
4479
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
4428
4480
|
};
|
|
4429
4481
|
J.prototype._loadRegistered = function() {
|
|
4430
4482
|
const t = this._current[0];
|
|
4431
|
-
return !this.started && !this.booted &&
|
|
4483
|
+
return !this.started && !this.booted && T.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4432
4484
|
};
|
|
4433
|
-
Object.defineProperty(J.prototype, "then", { get:
|
|
4485
|
+
Object.defineProperty(J.prototype, "then", { get: Ln });
|
|
4434
4486
|
J.prototype._addPlugin = function(t, e, r) {
|
|
4435
|
-
if (t =
|
|
4436
|
-
throw new
|
|
4437
|
-
const o = this._current[0], s = new
|
|
4487
|
+
if (t = ra(t), e = e || {}, this.booted)
|
|
4488
|
+
throw new Ys();
|
|
4489
|
+
const o = this._current[0], s = new cr(this, t, e, r);
|
|
4438
4490
|
if (s.once("start", (u, l, f) => {
|
|
4439
|
-
const
|
|
4440
|
-
s.once("loaded", (A, g,
|
|
4441
|
-
this.pluginTree.stop(
|
|
4491
|
+
const d = this.pluginTree.start(o.name, l, f);
|
|
4492
|
+
s.once("loaded", (A, g, v) => {
|
|
4493
|
+
this.pluginTree.stop(d, v);
|
|
4442
4494
|
});
|
|
4443
4495
|
}), o.loaded)
|
|
4444
4496
|
throw new Error(s.name, o.name);
|
|
@@ -4468,7 +4520,7 @@ J.prototype.close = function(t) {
|
|
|
4468
4520
|
let e;
|
|
4469
4521
|
if (t) {
|
|
4470
4522
|
if (typeof t != "function")
|
|
4471
|
-
throw new
|
|
4523
|
+
throw new ut("close", typeof t);
|
|
4472
4524
|
} else
|
|
4473
4525
|
e = new Promise(function(r, o) {
|
|
4474
4526
|
t = function(s) {
|
|
@@ -4478,13 +4530,13 @@ J.prototype.close = function(t) {
|
|
|
4478
4530
|
};
|
|
4479
4531
|
});
|
|
4480
4532
|
return this.ready(() => {
|
|
4481
|
-
this._error = null, this._closeQ.push(t),
|
|
4533
|
+
this._error = null, this._closeQ.push(t), T.process.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4482
4534
|
}), e;
|
|
4483
4535
|
};
|
|
4484
4536
|
J.prototype.ready = function(t) {
|
|
4485
4537
|
if (t) {
|
|
4486
4538
|
if (typeof t != "function")
|
|
4487
|
-
throw new
|
|
4539
|
+
throw new ut("ready", typeof t);
|
|
4488
4540
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
4489
4541
|
return;
|
|
4490
4542
|
}
|
|
@@ -4492,7 +4544,7 @@ J.prototype.ready = function(t) {
|
|
|
4492
4544
|
this._readyQ.push(s), this.start();
|
|
4493
4545
|
const o = this._current[0].server;
|
|
4494
4546
|
function s(u, l, f) {
|
|
4495
|
-
u ? r(u) : e(o),
|
|
4547
|
+
u ? r(u) : e(o), T.process.nextTick(f);
|
|
4496
4548
|
}
|
|
4497
4549
|
});
|
|
4498
4550
|
};
|
|
@@ -4502,40 +4554,40 @@ J.prototype.prettyPrint = function() {
|
|
|
4502
4554
|
J.prototype.toJSON = function() {
|
|
4503
4555
|
return this.pluginTree.toJSON();
|
|
4504
4556
|
};
|
|
4505
|
-
function
|
|
4557
|
+
function Qr() {
|
|
4506
4558
|
}
|
|
4507
|
-
function
|
|
4559
|
+
function Ln() {
|
|
4508
4560
|
if (this.booted) {
|
|
4509
|
-
|
|
4561
|
+
Xe("thenify returning null because we are already booted");
|
|
4510
4562
|
return;
|
|
4511
4563
|
}
|
|
4512
|
-
if (this[
|
|
4513
|
-
this[
|
|
4564
|
+
if (this[Wt]) {
|
|
4565
|
+
this[Wt] = !1;
|
|
4514
4566
|
return;
|
|
4515
4567
|
}
|
|
4516
|
-
return
|
|
4568
|
+
return Xe("thenify"), (t, e) => this._loadRegistered().then(() => (this[Wt] = !0, t(this._server)), e);
|
|
4517
4569
|
}
|
|
4518
4570
|
function Un(t, e) {
|
|
4519
4571
|
const r = this._server, o = this._error;
|
|
4520
4572
|
let s;
|
|
4521
4573
|
if (this._error = null, t.length === 0)
|
|
4522
|
-
this._error = o, s = t(), s && !s[
|
|
4574
|
+
this._error = o, s = t(), s && !s[It] && typeof s.then == "function" ? s.then(() => T.process.nextTick(e), (u) => T.process.nextTick(e, u)) : T.process.nextTick(e);
|
|
4523
4575
|
else if (t.length === 1)
|
|
4524
|
-
s = t(o), s && !s[
|
|
4576
|
+
s = t(o), s && !s[It] && typeof s.then == "function" ? s.then(() => T.process.nextTick(e), (u) => T.process.nextTick(e, u)) : T.process.nextTick(e);
|
|
4525
4577
|
else if (this._timeout === 0) {
|
|
4526
4578
|
const u = (l) => {
|
|
4527
4579
|
this._error = l, e(this._error);
|
|
4528
4580
|
};
|
|
4529
4581
|
t.length === 2 ? t(o, u) : t(o, r, u);
|
|
4530
4582
|
} else
|
|
4531
|
-
|
|
4583
|
+
na.call(this, t, o, r, e);
|
|
4532
4584
|
}
|
|
4533
|
-
function
|
|
4585
|
+
function na(t, e, r, o) {
|
|
4534
4586
|
const s = t.name;
|
|
4535
|
-
|
|
4587
|
+
Xe("setting up ready timeout", s, this._timeout);
|
|
4536
4588
|
let u = setTimeout(() => {
|
|
4537
|
-
|
|
4538
|
-
const f = new
|
|
4589
|
+
Xe("timed out", s), u = null;
|
|
4590
|
+
const f = new Xs(s);
|
|
4539
4591
|
f.fn = t, this._error = f, o(f);
|
|
4540
4592
|
}, this._timeout);
|
|
4541
4593
|
t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
|
|
@@ -4543,52 +4595,52 @@ function ea(t, e, r, o) {
|
|
|
4543
4595
|
u && (clearTimeout(u), this._error = f, o(this._error));
|
|
4544
4596
|
}
|
|
4545
4597
|
}
|
|
4546
|
-
function
|
|
4598
|
+
function ia(t, e) {
|
|
4547
4599
|
const r = this._server, o = t[this._isOnCloseHandlerKey];
|
|
4548
4600
|
if (t.length === 0 || t.length === 1) {
|
|
4549
4601
|
let s;
|
|
4550
|
-
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (
|
|
4551
|
-
() =>
|
|
4552
|
-
(u) =>
|
|
4553
|
-
)) :
|
|
4602
|
+
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (Xe("resolving close/onClose promise"), s.then(
|
|
4603
|
+
() => T.process.nextTick(e),
|
|
4604
|
+
(u) => T.process.nextTick(e, u)
|
|
4605
|
+
)) : T.process.nextTick(e);
|
|
4554
4606
|
} else
|
|
4555
4607
|
t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
|
|
4556
4608
|
}
|
|
4557
|
-
function
|
|
4609
|
+
function oa(t, e) {
|
|
4558
4610
|
return r.bind(e);
|
|
4559
4611
|
function r(o, s) {
|
|
4560
4612
|
let u;
|
|
4561
4613
|
t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4562
|
-
|
|
4563
|
-
}, s) :
|
|
4564
|
-
|
|
4565
|
-
}, s) :
|
|
4614
|
+
T.process.nextTick(s);
|
|
4615
|
+
}, s) : T.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
|
|
4616
|
+
T.process.nextTick(s);
|
|
4617
|
+
}, s) : T.process.nextTick(s)) : t(this, s);
|
|
4566
4618
|
}
|
|
4567
4619
|
}
|
|
4568
|
-
function
|
|
4620
|
+
function Jt(t, e) {
|
|
4569
4621
|
return r.bind(e);
|
|
4570
4622
|
function r(o, s) {
|
|
4571
4623
|
let u;
|
|
4572
4624
|
t ? t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4573
|
-
|
|
4574
|
-
}, s) :
|
|
4575
|
-
|
|
4576
|
-
}, s) :
|
|
4625
|
+
T.process.nextTick(s, o);
|
|
4626
|
+
}, s) : T.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
|
|
4627
|
+
T.process.nextTick(s);
|
|
4628
|
+
}, s) : T.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : T.process.nextTick(s);
|
|
4577
4629
|
}
|
|
4578
4630
|
}
|
|
4579
|
-
|
|
4580
|
-
|
|
4631
|
+
dr.exports = J;
|
|
4632
|
+
dr.exports.express = function(t) {
|
|
4581
4633
|
return J(t, {
|
|
4582
4634
|
expose: {
|
|
4583
4635
|
use: "load"
|
|
4584
4636
|
}
|
|
4585
4637
|
});
|
|
4586
4638
|
};
|
|
4587
|
-
var
|
|
4588
|
-
const
|
|
4589
|
-
function
|
|
4590
|
-
const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s =
|
|
4591
|
-
return s.use(
|
|
4639
|
+
var sa = dr.exports;
|
|
4640
|
+
const aa = /* @__PURE__ */ Hn(sa);
|
|
4641
|
+
function Fa(t, e = !0, r = !0) {
|
|
4642
|
+
const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = aa(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4643
|
+
return s.use(_i), s.use(vi, { sdkKey: t, host: o }), s.use(Ci), s.use(Ti), s.use(Zi), s.use(Gi), r && s.after(async (u, l, f) => {
|
|
4592
4644
|
if (u)
|
|
4593
4645
|
throw u;
|
|
4594
4646
|
await l.sdk.initializeApp(), f();
|
|
@@ -4597,5 +4649,5 @@ function Aa(t, e = !0, r = !0) {
|
|
|
4597
4649
|
}), s;
|
|
4598
4650
|
}
|
|
4599
4651
|
export {
|
|
4600
|
-
|
|
4652
|
+
Fa as StreamLayer
|
|
4601
4653
|
};
|