@streamlayer/sdk-web 0.28.28 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +11 -11
- package/lib/es/index.js +998 -943
- package/package.json +6 -6
package/lib/es/index.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuestionStatus as We, QuestionType as Te, SilenceSetting as Kr } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as ue } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
4
|
import { computed as Hr, map as qn, atom as Ct } from "nanostores";
|
|
5
|
-
import "@nanostores/logger";
|
|
6
|
-
import "microdiff";
|
|
7
|
-
import { Code as
|
|
8
|
-
import { createGrpcWebTransport as
|
|
9
|
-
import { nanoquery as
|
|
10
|
-
import { Events as
|
|
11
|
-
import { Client as
|
|
5
|
+
import { buildLogger as Qn } from "@nanostores/logger";
|
|
6
|
+
import Gn from "microdiff";
|
|
7
|
+
import { Code as zn, createPromiseClient as Kn, createCallbackClient as Hn } from "@connectrpc/connect";
|
|
8
|
+
import { createGrpcWebTransport as Wn } from "@connectrpc/connect-web";
|
|
9
|
+
import { nanoquery as Jn } from "@nanostores/query";
|
|
10
|
+
import { Events as Yn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
|
+
import { Client as lt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
12
|
import { Users as Wr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
|
-
import { pino as
|
|
13
|
+
import { pino as Xn } from "pino";
|
|
14
14
|
import { Feed as ve } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as Jr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
17
|
var Yr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
18
|
-
function
|
|
18
|
+
function Zn(t) {
|
|
19
19
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
20
20
|
}
|
|
21
21
|
var O = {}, Xr = {}, Ot = {};
|
|
22
|
-
Ot.byteLength =
|
|
23
|
-
Ot.toByteArray =
|
|
24
|
-
Ot.fromByteArray =
|
|
25
|
-
var
|
|
26
|
-
for (var qe = 0,
|
|
27
|
-
|
|
22
|
+
Ot.byteLength = ri;
|
|
23
|
+
Ot.toByteArray = ii;
|
|
24
|
+
Ot.fromByteArray = ai;
|
|
25
|
+
var be = [], se = [], ei = typeof Uint8Array < "u" ? Uint8Array : Array, Nt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
26
|
+
for (var qe = 0, ti = Nt.length; qe < ti; ++qe)
|
|
27
|
+
be[qe] = Nt[qe], se[Nt.charCodeAt(qe)] = qe;
|
|
28
28
|
se["-".charCodeAt(0)] = 62;
|
|
29
29
|
se["_".charCodeAt(0)] = 63;
|
|
30
30
|
function Zr(t) {
|
|
@@ -36,60 +36,60 @@ function Zr(t) {
|
|
|
36
36
|
var o = r === e ? 0 : 4 - r % 4;
|
|
37
37
|
return [r, o];
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function ri(t) {
|
|
40
40
|
var e = Zr(t), r = e[0], o = e[1];
|
|
41
41
|
return (r + o) * 3 / 4 - o;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ni(t, e, r) {
|
|
44
44
|
return (e + r) * 3 / 4 - r;
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
var e, r = Zr(t), o = r[0], s = r[1], u = new
|
|
48
|
-
for (p = 0; p <
|
|
46
|
+
function ii(t) {
|
|
47
|
+
var e, r = Zr(t), o = r[0], s = r[1], u = new ei(ni(t, o, s)), l = 0, c = s > 0 ? o - 4 : o, p;
|
|
48
|
+
for (p = 0; p < c; p += 4)
|
|
49
49
|
e = se[t.charCodeAt(p)] << 18 | se[t.charCodeAt(p + 1)] << 12 | se[t.charCodeAt(p + 2)] << 6 | se[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
|
|
50
50
|
return s === 2 && (e = se[t.charCodeAt(p)] << 2 | se[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = se[t.charCodeAt(p)] << 10 | se[t.charCodeAt(p + 1)] << 4 | se[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function oi(t) {
|
|
53
|
+
return be[t >> 18 & 63] + be[t >> 12 & 63] + be[t >> 6 & 63] + be[t & 63];
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function si(t, e, r) {
|
|
56
56
|
for (var o, s = [], u = e; u < r; u += 3)
|
|
57
|
-
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(
|
|
57
|
+
o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(oi(o));
|
|
58
58
|
return s.join("");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0,
|
|
62
|
-
s.push(
|
|
60
|
+
function ai(t) {
|
|
61
|
+
for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0, c = r - o; l < c; l += u)
|
|
62
|
+
s.push(si(t, l, l + u > c ? c : l + u));
|
|
63
63
|
return o === 1 ? (e = t[r - 1], s.push(
|
|
64
|
-
|
|
64
|
+
be[e >> 2] + be[e << 4 & 63] + "=="
|
|
65
65
|
)) : o === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
66
|
-
|
|
66
|
+
be[e >> 10] + be[e >> 4 & 63] + be[e << 2 & 63] + "="
|
|
67
67
|
)), s.join("");
|
|
68
68
|
}
|
|
69
69
|
var fr = {};
|
|
70
70
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
71
71
|
fr.read = function(t, e, r, o, s) {
|
|
72
|
-
var u, l,
|
|
73
|
-
for (m += E, u = F & (1 << -g) - 1, F >>= -g, g +=
|
|
72
|
+
var u, l, c = s * 8 - o - 1, p = (1 << c) - 1, b = p >> 1, g = -7, m = r ? s - 1 : 0, E = r ? -1 : 1, F = t[e + m];
|
|
73
|
+
for (m += E, u = F & (1 << -g) - 1, F >>= -g, g += c; g > 0; u = u * 256 + t[e + m], m += E, g -= 8)
|
|
74
74
|
;
|
|
75
75
|
for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + m], m += E, g -= 8)
|
|
76
76
|
;
|
|
77
77
|
if (u === 0)
|
|
78
|
-
u = 1 -
|
|
78
|
+
u = 1 - b;
|
|
79
79
|
else {
|
|
80
80
|
if (u === p)
|
|
81
81
|
return l ? NaN : (F ? -1 : 1) * (1 / 0);
|
|
82
|
-
l = l + Math.pow(2, o), u = u -
|
|
82
|
+
l = l + Math.pow(2, o), u = u - b;
|
|
83
83
|
}
|
|
84
84
|
return (F ? -1 : 1) * l * Math.pow(2, u - o);
|
|
85
85
|
};
|
|
86
86
|
fr.write = function(t, e, r, o, s, u) {
|
|
87
|
-
var l,
|
|
88
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (
|
|
87
|
+
var l, c, p, b = u * 8 - s - 1, g = (1 << b) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = o ? 0 : u - 1, L = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
88
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (c = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + m >= 1 ? e += E / p : e += E * Math.pow(2, 1 - m), e * p >= 2 && (l++, p /= 2), l + m >= g ? (c = 0, l = g) : l + m >= 1 ? (c = (e * p - 1) * Math.pow(2, s), l = l + m) : (c = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + F] = c & 255, F += L, c /= 256, s -= 8)
|
|
89
89
|
;
|
|
90
|
-
for (l = l << s |
|
|
90
|
+
for (l = l << s | c, b += s; b > 0; t[r + F] = l & 255, F += L, l /= 256, b -= 8)
|
|
91
91
|
;
|
|
92
|
-
t[r + F -
|
|
92
|
+
t[r + F - L] |= P * 128;
|
|
93
93
|
};
|
|
94
94
|
/*!
|
|
95
95
|
* The buffer module from node.js, for the browser.
|
|
@@ -99,9 +99,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
99
99
|
*/
|
|
100
100
|
(function(t) {
|
|
101
101
|
const e = Ot, r = fr, o = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
102
|
-
t.Buffer =
|
|
102
|
+
t.Buffer = c, t.SlowBuffer = _, t.INSPECT_MAX_BYTES = 50;
|
|
103
103
|
const s = 2147483647;
|
|
104
|
-
t.kMaxLength = s,
|
|
104
|
+
t.kMaxLength = s, c.TYPED_ARRAY_SUPPORT = u(), !c.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
105
105
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
106
106
|
);
|
|
107
107
|
function u() {
|
|
@@ -114,16 +114,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
114
114
|
return !1;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
Object.defineProperty(
|
|
117
|
+
Object.defineProperty(c.prototype, "parent", {
|
|
118
118
|
enumerable: !0,
|
|
119
119
|
get: function() {
|
|
120
|
-
if (
|
|
120
|
+
if (c.isBuffer(this))
|
|
121
121
|
return this.buffer;
|
|
122
122
|
}
|
|
123
|
-
}), Object.defineProperty(
|
|
123
|
+
}), Object.defineProperty(c.prototype, "offset", {
|
|
124
124
|
enumerable: !0,
|
|
125
125
|
get: function() {
|
|
126
|
-
if (
|
|
126
|
+
if (c.isBuffer(this))
|
|
127
127
|
return this.byteOffset;
|
|
128
128
|
}
|
|
129
129
|
});
|
|
@@ -131,9 +131,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
131
131
|
if (a > s)
|
|
132
132
|
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
133
133
|
const n = new Uint8Array(a);
|
|
134
|
-
return Object.setPrototypeOf(n,
|
|
134
|
+
return Object.setPrototypeOf(n, c.prototype), n;
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function c(a, n, i) {
|
|
137
137
|
if (typeof a == "number") {
|
|
138
138
|
if (typeof n == "string")
|
|
139
139
|
throw new TypeError(
|
|
@@ -143,12 +143,12 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
143
143
|
}
|
|
144
144
|
return p(a, n, i);
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
c.poolSize = 8192;
|
|
147
147
|
function p(a, n, i) {
|
|
148
148
|
if (typeof a == "string")
|
|
149
149
|
return E(a, n);
|
|
150
150
|
if (ArrayBuffer.isView(a))
|
|
151
|
-
return
|
|
151
|
+
return L(a);
|
|
152
152
|
if (a == null)
|
|
153
153
|
throw new TypeError(
|
|
154
154
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
@@ -159,56 +159,56 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
159
159
|
throw new TypeError(
|
|
160
160
|
'The "value" argument must not be of type number. Received type number'
|
|
161
161
|
);
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
164
|
-
return
|
|
162
|
+
const f = a.valueOf && a.valueOf();
|
|
163
|
+
if (f != null && f !== a)
|
|
164
|
+
return c.from(f, n, i);
|
|
165
165
|
const h = K(a);
|
|
166
166
|
if (h)
|
|
167
167
|
return h;
|
|
168
168
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof a[Symbol.toPrimitive] == "function")
|
|
169
|
-
return
|
|
169
|
+
return c.from(a[Symbol.toPrimitive]("string"), n, i);
|
|
170
170
|
throw new TypeError(
|
|
171
171
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
|
|
174
|
+
c.from = function(a, n, i) {
|
|
175
175
|
return p(a, n, i);
|
|
176
|
-
}, Object.setPrototypeOf(
|
|
177
|
-
function
|
|
176
|
+
}, Object.setPrototypeOf(c.prototype, Uint8Array.prototype), Object.setPrototypeOf(c, Uint8Array);
|
|
177
|
+
function b(a) {
|
|
178
178
|
if (typeof a != "number")
|
|
179
179
|
throw new TypeError('"size" argument must be of type number');
|
|
180
180
|
if (a < 0)
|
|
181
181
|
throw new RangeError('The value "' + a + '" is invalid for option "size"');
|
|
182
182
|
}
|
|
183
183
|
function g(a, n, i) {
|
|
184
|
-
return
|
|
184
|
+
return b(a), a <= 0 ? l(a) : n !== void 0 ? typeof i == "string" ? l(a).fill(n, i) : l(a).fill(n) : l(a);
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
c.alloc = function(a, n, i) {
|
|
187
187
|
return g(a, n, i);
|
|
188
188
|
};
|
|
189
189
|
function m(a) {
|
|
190
|
-
return
|
|
190
|
+
return b(a), l(a < 0 ? 0 : I(a) | 0);
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
c.allocUnsafe = function(a) {
|
|
193
193
|
return m(a);
|
|
194
|
-
},
|
|
194
|
+
}, c.allocUnsafeSlow = function(a) {
|
|
195
195
|
return m(a);
|
|
196
196
|
};
|
|
197
197
|
function E(a, n) {
|
|
198
|
-
if ((typeof n != "string" || n === "") && (n = "utf8"), !
|
|
198
|
+
if ((typeof n != "string" || n === "") && (n = "utf8"), !c.isEncoding(n))
|
|
199
199
|
throw new TypeError("Unknown encoding: " + n);
|
|
200
200
|
const i = D(a, n) | 0;
|
|
201
|
-
let
|
|
202
|
-
const h =
|
|
203
|
-
return h !== i && (
|
|
201
|
+
let f = l(i);
|
|
202
|
+
const h = f.write(a, n);
|
|
203
|
+
return h !== i && (f = f.slice(0, h)), f;
|
|
204
204
|
}
|
|
205
205
|
function F(a) {
|
|
206
206
|
const n = a.length < 0 ? 0 : I(a.length) | 0, i = l(n);
|
|
207
|
-
for (let
|
|
208
|
-
i[
|
|
207
|
+
for (let f = 0; f < n; f += 1)
|
|
208
|
+
i[f] = a[f] & 255;
|
|
209
209
|
return i;
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function L(a) {
|
|
212
212
|
if (ge(a, Uint8Array)) {
|
|
213
213
|
const n = new Uint8Array(a);
|
|
214
214
|
return P(n.buffer, n.byteOffset, n.byteLength);
|
|
@@ -220,16 +220,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
220
220
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
221
221
|
if (a.byteLength < n + (i || 0))
|
|
222
222
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
223
|
-
let
|
|
224
|
-
return n === void 0 && i === void 0 ?
|
|
223
|
+
let f;
|
|
224
|
+
return n === void 0 && i === void 0 ? f = new Uint8Array(a) : i === void 0 ? f = new Uint8Array(a, n) : f = new Uint8Array(a, n, i), Object.setPrototypeOf(f, c.prototype), f;
|
|
225
225
|
}
|
|
226
226
|
function K(a) {
|
|
227
|
-
if (
|
|
227
|
+
if (c.isBuffer(a)) {
|
|
228
228
|
const n = I(a.length) | 0, i = l(n);
|
|
229
229
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
230
230
|
}
|
|
231
231
|
if (a.length !== void 0)
|
|
232
|
-
return typeof a.length != "number" ||
|
|
232
|
+
return typeof a.length != "number" || Lt(a.length) ? l(0) : F(a);
|
|
233
233
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
234
234
|
return F(a.data);
|
|
235
235
|
}
|
|
@@ -239,25 +239,25 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
239
239
|
return a | 0;
|
|
240
240
|
}
|
|
241
241
|
function _(a) {
|
|
242
|
-
return +a != a && (a = 0),
|
|
242
|
+
return +a != a && (a = 0), c.alloc(+a);
|
|
243
243
|
}
|
|
244
|
-
|
|
245
|
-
return n != null && n._isBuffer === !0 && n !==
|
|
246
|
-
},
|
|
247
|
-
if (ge(n, Uint8Array) && (n =
|
|
244
|
+
c.isBuffer = function(n) {
|
|
245
|
+
return n != null && n._isBuffer === !0 && n !== c.prototype;
|
|
246
|
+
}, c.compare = function(n, i) {
|
|
247
|
+
if (ge(n, Uint8Array) && (n = c.from(n, n.offset, n.byteLength)), ge(i, Uint8Array) && (i = c.from(i, i.offset, i.byteLength)), !c.isBuffer(n) || !c.isBuffer(i))
|
|
248
248
|
throw new TypeError(
|
|
249
249
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
250
250
|
);
|
|
251
251
|
if (n === i)
|
|
252
252
|
return 0;
|
|
253
|
-
let
|
|
254
|
-
for (let y = 0,
|
|
253
|
+
let f = n.length, h = i.length;
|
|
254
|
+
for (let y = 0, w = Math.min(f, h); y < w; ++y)
|
|
255
255
|
if (n[y] !== i[y]) {
|
|
256
|
-
|
|
256
|
+
f = n[y], h = i[y];
|
|
257
257
|
break;
|
|
258
258
|
}
|
|
259
|
-
return
|
|
260
|
-
},
|
|
259
|
+
return f < h ? -1 : h < f ? 1 : 0;
|
|
260
|
+
}, c.isEncoding = function(n) {
|
|
261
261
|
switch (String(n).toLowerCase()) {
|
|
262
262
|
case "hex":
|
|
263
263
|
case "utf8":
|
|
@@ -274,35 +274,35 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
274
274
|
default:
|
|
275
275
|
return !1;
|
|
276
276
|
}
|
|
277
|
-
},
|
|
277
|
+
}, c.concat = function(n, i) {
|
|
278
278
|
if (!Array.isArray(n))
|
|
279
279
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
280
280
|
if (n.length === 0)
|
|
281
|
-
return
|
|
282
|
-
let
|
|
281
|
+
return c.alloc(0);
|
|
282
|
+
let f;
|
|
283
283
|
if (i === void 0)
|
|
284
|
-
for (i = 0,
|
|
285
|
-
i += n[
|
|
286
|
-
const h =
|
|
284
|
+
for (i = 0, f = 0; f < n.length; ++f)
|
|
285
|
+
i += n[f].length;
|
|
286
|
+
const h = c.allocUnsafe(i);
|
|
287
287
|
let y = 0;
|
|
288
|
-
for (
|
|
289
|
-
let
|
|
290
|
-
if (ge(
|
|
291
|
-
y +
|
|
288
|
+
for (f = 0; f < n.length; ++f) {
|
|
289
|
+
let w = n[f];
|
|
290
|
+
if (ge(w, Uint8Array))
|
|
291
|
+
y + w.length > h.length ? (c.isBuffer(w) || (w = c.from(w)), w.copy(h, y)) : Uint8Array.prototype.set.call(
|
|
292
292
|
h,
|
|
293
|
-
|
|
293
|
+
w,
|
|
294
294
|
y
|
|
295
295
|
);
|
|
296
|
-
else if (
|
|
297
|
-
|
|
296
|
+
else if (c.isBuffer(w))
|
|
297
|
+
w.copy(h, y);
|
|
298
298
|
else
|
|
299
299
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
300
|
-
y +=
|
|
300
|
+
y += w.length;
|
|
301
301
|
}
|
|
302
302
|
return h;
|
|
303
303
|
};
|
|
304
304
|
function D(a, n) {
|
|
305
|
-
if (
|
|
305
|
+
if (c.isBuffer(a))
|
|
306
306
|
return a.length;
|
|
307
307
|
if (ArrayBuffer.isView(a) || ge(a, ArrayBuffer))
|
|
308
308
|
return a.byteLength;
|
|
@@ -310,8 +310,8 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
310
310
|
throw new TypeError(
|
|
311
311
|
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof a
|
|
312
312
|
);
|
|
313
|
-
const i = a.length,
|
|
314
|
-
if (!
|
|
313
|
+
const i = a.length, f = arguments.length > 2 && arguments[2] === !0;
|
|
314
|
+
if (!f && i === 0)
|
|
315
315
|
return 0;
|
|
316
316
|
let h = !1;
|
|
317
317
|
for (; ; )
|
|
@@ -322,7 +322,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
322
322
|
return i;
|
|
323
323
|
case "utf8":
|
|
324
324
|
case "utf-8":
|
|
325
|
-
return
|
|
325
|
+
return ot(a).length;
|
|
326
326
|
case "ucs2":
|
|
327
327
|
case "ucs-2":
|
|
328
328
|
case "utf16le":
|
|
@@ -331,16 +331,16 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
331
331
|
case "hex":
|
|
332
332
|
return i >>> 1;
|
|
333
333
|
case "base64":
|
|
334
|
-
return
|
|
334
|
+
return dt(a).length;
|
|
335
335
|
default:
|
|
336
336
|
if (h)
|
|
337
|
-
return
|
|
337
|
+
return f ? -1 : ot(a).length;
|
|
338
338
|
n = ("" + n).toLowerCase(), h = !0;
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
c.byteLength = D;
|
|
342
342
|
function U(a, n, i) {
|
|
343
|
-
let
|
|
343
|
+
let f = !1;
|
|
344
344
|
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((i === void 0 || i > this.length) && (i = this.length), i <= 0) || (i >>>= 0, n >>>= 0, i <= n))
|
|
345
345
|
return "";
|
|
346
346
|
for (a || (a = "utf8"); ; )
|
|
@@ -351,88 +351,88 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
351
351
|
case "utf-8":
|
|
352
352
|
return fe(this, n, i);
|
|
353
353
|
case "ascii":
|
|
354
|
-
return
|
|
354
|
+
return it(this, n, i);
|
|
355
355
|
case "latin1":
|
|
356
356
|
case "binary":
|
|
357
357
|
return ke(this, n, i);
|
|
358
358
|
case "base64":
|
|
359
|
-
return
|
|
359
|
+
return nt(this, n, i);
|
|
360
360
|
case "ucs2":
|
|
361
361
|
case "ucs-2":
|
|
362
362
|
case "utf16le":
|
|
363
363
|
case "utf-16le":
|
|
364
364
|
return Pe(this, n, i);
|
|
365
365
|
default:
|
|
366
|
-
if (
|
|
366
|
+
if (f)
|
|
367
367
|
throw new TypeError("Unknown encoding: " + a);
|
|
368
|
-
a = (a + "").toLowerCase(),
|
|
368
|
+
a = (a + "").toLowerCase(), f = !0;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
c.prototype._isBuffer = !0;
|
|
372
372
|
function T(a, n, i) {
|
|
373
|
-
const
|
|
374
|
-
a[n] = a[i], a[i] =
|
|
373
|
+
const f = a[n];
|
|
374
|
+
a[n] = a[i], a[i] = f;
|
|
375
375
|
}
|
|
376
|
-
|
|
376
|
+
c.prototype.swap16 = function() {
|
|
377
377
|
const n = this.length;
|
|
378
378
|
if (n % 2 !== 0)
|
|
379
379
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
380
380
|
for (let i = 0; i < n; i += 2)
|
|
381
381
|
T(this, i, i + 1);
|
|
382
382
|
return this;
|
|
383
|
-
},
|
|
383
|
+
}, c.prototype.swap32 = function() {
|
|
384
384
|
const n = this.length;
|
|
385
385
|
if (n % 4 !== 0)
|
|
386
386
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
387
387
|
for (let i = 0; i < n; i += 4)
|
|
388
388
|
T(this, i, i + 3), T(this, i + 1, i + 2);
|
|
389
389
|
return this;
|
|
390
|
-
},
|
|
390
|
+
}, c.prototype.swap64 = function() {
|
|
391
391
|
const n = this.length;
|
|
392
392
|
if (n % 8 !== 0)
|
|
393
393
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
394
394
|
for (let i = 0; i < n; i += 8)
|
|
395
395
|
T(this, i, i + 7), T(this, i + 1, i + 6), T(this, i + 2, i + 5), T(this, i + 3, i + 4);
|
|
396
396
|
return this;
|
|
397
|
-
},
|
|
397
|
+
}, c.prototype.toString = function() {
|
|
398
398
|
const n = this.length;
|
|
399
399
|
return n === 0 ? "" : arguments.length === 0 ? fe(this, 0, n) : U.apply(this, arguments);
|
|
400
|
-
},
|
|
401
|
-
if (!
|
|
400
|
+
}, c.prototype.toLocaleString = c.prototype.toString, c.prototype.equals = function(n) {
|
|
401
|
+
if (!c.isBuffer(n))
|
|
402
402
|
throw new TypeError("Argument must be a Buffer");
|
|
403
|
-
return this === n ? !0 :
|
|
404
|
-
},
|
|
403
|
+
return this === n ? !0 : c.compare(this, n) === 0;
|
|
404
|
+
}, c.prototype.inspect = function() {
|
|
405
405
|
let n = "";
|
|
406
406
|
const i = t.INSPECT_MAX_BYTES;
|
|
407
407
|
return n = this.toString("hex", 0, i).replace(/(.{2})/g, "$1 ").trim(), this.length > i && (n += " ... "), "<Buffer " + n + ">";
|
|
408
|
-
}, o && (
|
|
409
|
-
if (ge(n, Uint8Array) && (n =
|
|
408
|
+
}, o && (c.prototype[o] = c.prototype.inspect), c.prototype.compare = function(n, i, f, h, y) {
|
|
409
|
+
if (ge(n, Uint8Array) && (n = c.from(n, n.offset, n.byteLength)), !c.isBuffer(n))
|
|
410
410
|
throw new TypeError(
|
|
411
411
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof n
|
|
412
412
|
);
|
|
413
|
-
if (i === void 0 && (i = 0),
|
|
413
|
+
if (i === void 0 && (i = 0), f === void 0 && (f = n ? n.length : 0), h === void 0 && (h = 0), y === void 0 && (y = this.length), i < 0 || f > n.length || h < 0 || y > this.length)
|
|
414
414
|
throw new RangeError("out of range index");
|
|
415
|
-
if (h >= y && i >=
|
|
415
|
+
if (h >= y && i >= f)
|
|
416
416
|
return 0;
|
|
417
417
|
if (h >= y)
|
|
418
418
|
return -1;
|
|
419
|
-
if (i >=
|
|
419
|
+
if (i >= f)
|
|
420
420
|
return 1;
|
|
421
|
-
if (i >>>= 0,
|
|
421
|
+
if (i >>>= 0, f >>>= 0, h >>>= 0, y >>>= 0, this === n)
|
|
422
422
|
return 0;
|
|
423
|
-
let
|
|
424
|
-
const W = Math.min(
|
|
423
|
+
let w = y - h, R = f - i;
|
|
424
|
+
const W = Math.min(w, R), z = this.slice(h, y), J = n.slice(i, f);
|
|
425
425
|
for (let Q = 0; Q < W; ++Q)
|
|
426
426
|
if (z[Q] !== J[Q]) {
|
|
427
|
-
|
|
427
|
+
w = z[Q], R = J[Q];
|
|
428
428
|
break;
|
|
429
429
|
}
|
|
430
|
-
return
|
|
430
|
+
return w < R ? -1 : R < w ? 1 : 0;
|
|
431
431
|
};
|
|
432
|
-
function x(a, n, i,
|
|
432
|
+
function x(a, n, i, f, h) {
|
|
433
433
|
if (a.length === 0)
|
|
434
434
|
return -1;
|
|
435
|
-
if (typeof i == "string" ? (
|
|
435
|
+
if (typeof i == "string" ? (f = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Lt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
|
|
436
436
|
if (h)
|
|
437
437
|
return -1;
|
|
438
438
|
i = a.length - 1;
|
|
@@ -441,18 +441,18 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
441
441
|
i = 0;
|
|
442
442
|
else
|
|
443
443
|
return -1;
|
|
444
|
-
if (typeof n == "string" && (n =
|
|
445
|
-
return n.length === 0 ? -1 : k(a, n, i,
|
|
444
|
+
if (typeof n == "string" && (n = c.from(n, f)), c.isBuffer(n))
|
|
445
|
+
return n.length === 0 ? -1 : k(a, n, i, f, h);
|
|
446
446
|
if (typeof n == "number")
|
|
447
|
-
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? h ? Uint8Array.prototype.indexOf.call(a, n, i) : Uint8Array.prototype.lastIndexOf.call(a, n, i) : k(a, [n], i,
|
|
447
|
+
return n = n & 255, typeof Uint8Array.prototype.indexOf == "function" ? h ? Uint8Array.prototype.indexOf.call(a, n, i) : Uint8Array.prototype.lastIndexOf.call(a, n, i) : k(a, [n], i, f, h);
|
|
448
448
|
throw new TypeError("val must be string, number or Buffer");
|
|
449
449
|
}
|
|
450
|
-
function k(a, n, i,
|
|
451
|
-
let y = 1,
|
|
452
|
-
if (
|
|
450
|
+
function k(a, n, i, f, h) {
|
|
451
|
+
let y = 1, w = a.length, R = n.length;
|
|
452
|
+
if (f !== void 0 && (f = String(f).toLowerCase(), f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le")) {
|
|
453
453
|
if (a.length < 2 || n.length < 2)
|
|
454
454
|
return -1;
|
|
455
|
-
y = 2,
|
|
455
|
+
y = 2, w /= 2, R /= 2, i /= 2;
|
|
456
456
|
}
|
|
457
457
|
function W(J, Q) {
|
|
458
458
|
return y === 1 ? J[Q] : J.readUInt16BE(Q * y);
|
|
@@ -460,14 +460,14 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
460
460
|
let z;
|
|
461
461
|
if (h) {
|
|
462
462
|
let J = -1;
|
|
463
|
-
for (z = i; z <
|
|
463
|
+
for (z = i; z < w; z++)
|
|
464
464
|
if (W(a, z) === W(n, J === -1 ? 0 : z - J)) {
|
|
465
465
|
if (J === -1 && (J = z), z - J + 1 === R)
|
|
466
466
|
return J * y;
|
|
467
467
|
} else
|
|
468
468
|
J !== -1 && (z -= z - J), J = -1;
|
|
469
469
|
} else
|
|
470
|
-
for (i + R >
|
|
470
|
+
for (i + R > w && (i = w - R), z = i; z >= 0; z--) {
|
|
471
471
|
let J = !0;
|
|
472
472
|
for (let Q = 0; Q < R; Q++)
|
|
473
473
|
if (W(a, z + Q) !== W(n, Q)) {
|
|
@@ -479,162 +479,162 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
479
479
|
}
|
|
480
480
|
return -1;
|
|
481
481
|
}
|
|
482
|
-
|
|
483
|
-
return this.indexOf(n, i,
|
|
484
|
-
},
|
|
485
|
-
return x(this, n, i,
|
|
486
|
-
},
|
|
487
|
-
return x(this, n, i,
|
|
482
|
+
c.prototype.includes = function(n, i, f) {
|
|
483
|
+
return this.indexOf(n, i, f) !== -1;
|
|
484
|
+
}, c.prototype.indexOf = function(n, i, f) {
|
|
485
|
+
return x(this, n, i, f, !0);
|
|
486
|
+
}, c.prototype.lastIndexOf = function(n, i, f) {
|
|
487
|
+
return x(this, n, i, f, !1);
|
|
488
488
|
};
|
|
489
|
-
function G(a, n, i,
|
|
489
|
+
function G(a, n, i, f) {
|
|
490
490
|
i = Number(i) || 0;
|
|
491
491
|
const h = a.length - i;
|
|
492
|
-
|
|
492
|
+
f ? (f = Number(f), f > h && (f = h)) : f = h;
|
|
493
493
|
const y = n.length;
|
|
494
|
-
|
|
495
|
-
let
|
|
496
|
-
for (
|
|
497
|
-
const R = parseInt(n.substr(
|
|
498
|
-
if (
|
|
499
|
-
return
|
|
500
|
-
a[i +
|
|
494
|
+
f > y / 2 && (f = y / 2);
|
|
495
|
+
let w;
|
|
496
|
+
for (w = 0; w < f; ++w) {
|
|
497
|
+
const R = parseInt(n.substr(w * 2, 2), 16);
|
|
498
|
+
if (Lt(R))
|
|
499
|
+
return w;
|
|
500
|
+
a[i + w] = R;
|
|
501
501
|
}
|
|
502
|
-
return
|
|
502
|
+
return w;
|
|
503
503
|
}
|
|
504
|
-
function ie(a, n, i,
|
|
505
|
-
return ot(
|
|
504
|
+
function ie(a, n, i, f) {
|
|
505
|
+
return st(ot(n, a.length - i), a, i, f);
|
|
506
506
|
}
|
|
507
|
-
function Oe(a, n, i,
|
|
508
|
-
return
|
|
507
|
+
function Oe(a, n, i, f) {
|
|
508
|
+
return st(Rt(n), a, i, f);
|
|
509
509
|
}
|
|
510
|
-
function Se(a, n, i,
|
|
511
|
-
return
|
|
510
|
+
function Se(a, n, i, f) {
|
|
511
|
+
return st(dt(n), a, i, f);
|
|
512
512
|
}
|
|
513
|
-
function ce(a, n, i,
|
|
514
|
-
return
|
|
513
|
+
function ce(a, n, i, f) {
|
|
514
|
+
return st(S(n, a.length - i), a, i, f);
|
|
515
515
|
}
|
|
516
|
-
|
|
516
|
+
c.prototype.write = function(n, i, f, h) {
|
|
517
517
|
if (i === void 0)
|
|
518
|
-
h = "utf8",
|
|
519
|
-
else if (
|
|
520
|
-
h = i,
|
|
518
|
+
h = "utf8", f = this.length, i = 0;
|
|
519
|
+
else if (f === void 0 && typeof i == "string")
|
|
520
|
+
h = i, f = this.length, i = 0;
|
|
521
521
|
else if (isFinite(i))
|
|
522
|
-
i = i >>> 0, isFinite(
|
|
522
|
+
i = i >>> 0, isFinite(f) ? (f = f >>> 0, h === void 0 && (h = "utf8")) : (h = f, f = void 0);
|
|
523
523
|
else
|
|
524
524
|
throw new Error(
|
|
525
525
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
526
526
|
);
|
|
527
527
|
const y = this.length - i;
|
|
528
|
-
if ((
|
|
528
|
+
if ((f === void 0 || f > y) && (f = y), n.length > 0 && (f < 0 || i < 0) || i > this.length)
|
|
529
529
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
530
530
|
h || (h = "utf8");
|
|
531
|
-
let
|
|
531
|
+
let w = !1;
|
|
532
532
|
for (; ; )
|
|
533
533
|
switch (h) {
|
|
534
534
|
case "hex":
|
|
535
|
-
return G(this, n, i,
|
|
535
|
+
return G(this, n, i, f);
|
|
536
536
|
case "utf8":
|
|
537
537
|
case "utf-8":
|
|
538
|
-
return ie(this, n, i,
|
|
538
|
+
return ie(this, n, i, f);
|
|
539
539
|
case "ascii":
|
|
540
540
|
case "latin1":
|
|
541
541
|
case "binary":
|
|
542
|
-
return Oe(this, n, i,
|
|
542
|
+
return Oe(this, n, i, f);
|
|
543
543
|
case "base64":
|
|
544
|
-
return Se(this, n, i,
|
|
544
|
+
return Se(this, n, i, f);
|
|
545
545
|
case "ucs2":
|
|
546
546
|
case "ucs-2":
|
|
547
547
|
case "utf16le":
|
|
548
548
|
case "utf-16le":
|
|
549
|
-
return ce(this, n, i,
|
|
549
|
+
return ce(this, n, i, f);
|
|
550
550
|
default:
|
|
551
|
-
if (
|
|
551
|
+
if (w)
|
|
552
552
|
throw new TypeError("Unknown encoding: " + h);
|
|
553
|
-
h = ("" + h).toLowerCase(),
|
|
553
|
+
h = ("" + h).toLowerCase(), w = !0;
|
|
554
554
|
}
|
|
555
|
-
},
|
|
555
|
+
}, c.prototype.toJSON = function() {
|
|
556
556
|
return {
|
|
557
557
|
type: "Buffer",
|
|
558
558
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
559
559
|
};
|
|
560
560
|
};
|
|
561
|
-
function
|
|
561
|
+
function nt(a, n, i) {
|
|
562
562
|
return n === 0 && i === a.length ? e.fromByteArray(a) : e.fromByteArray(a.slice(n, i));
|
|
563
563
|
}
|
|
564
564
|
function fe(a, n, i) {
|
|
565
565
|
i = Math.min(a.length, i);
|
|
566
|
-
const
|
|
566
|
+
const f = [];
|
|
567
567
|
let h = n;
|
|
568
568
|
for (; h < i; ) {
|
|
569
569
|
const y = a[h];
|
|
570
|
-
let
|
|
570
|
+
let w = null, R = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
571
571
|
if (h + R <= i) {
|
|
572
572
|
let W, z, J, Q;
|
|
573
573
|
switch (R) {
|
|
574
574
|
case 1:
|
|
575
|
-
y < 128 && (
|
|
575
|
+
y < 128 && (w = y);
|
|
576
576
|
break;
|
|
577
577
|
case 2:
|
|
578
|
-
W = a[h + 1], (W & 192) === 128 && (Q = (y & 31) << 6 | W & 63, Q > 127 && (
|
|
578
|
+
W = a[h + 1], (W & 192) === 128 && (Q = (y & 31) << 6 | W & 63, Q > 127 && (w = Q));
|
|
579
579
|
break;
|
|
580
580
|
case 3:
|
|
581
|
-
W = a[h + 1], z = a[h + 2], (W & 192) === 128 && (z & 192) === 128 && (Q = (y & 15) << 12 | (W & 63) << 6 | z & 63, Q > 2047 && (Q < 55296 || Q > 57343) && (
|
|
581
|
+
W = a[h + 1], z = a[h + 2], (W & 192) === 128 && (z & 192) === 128 && (Q = (y & 15) << 12 | (W & 63) << 6 | z & 63, Q > 2047 && (Q < 55296 || Q > 57343) && (w = Q));
|
|
582
582
|
break;
|
|
583
583
|
case 4:
|
|
584
|
-
W = a[h + 1], z = a[h + 2], J = a[h + 3], (W & 192) === 128 && (z & 192) === 128 && (J & 192) === 128 && (Q = (y & 15) << 18 | (W & 63) << 12 | (z & 63) << 6 | J & 63, Q > 65535 && Q < 1114112 && (
|
|
584
|
+
W = a[h + 1], z = a[h + 2], J = a[h + 3], (W & 192) === 128 && (z & 192) === 128 && (J & 192) === 128 && (Q = (y & 15) << 18 | (W & 63) << 12 | (z & 63) << 6 | J & 63, Q > 65535 && Q < 1114112 && (w = Q));
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
|
|
587
|
+
w === null ? (w = 65533, R = 1) : w > 65535 && (w -= 65536, f.push(w >>> 10 & 1023 | 55296), w = 56320 | w & 1023), f.push(w), h += R;
|
|
588
588
|
}
|
|
589
|
-
return Be(
|
|
589
|
+
return Be(f);
|
|
590
590
|
}
|
|
591
591
|
const xe = 4096;
|
|
592
592
|
function Be(a) {
|
|
593
593
|
const n = a.length;
|
|
594
594
|
if (n <= xe)
|
|
595
595
|
return String.fromCharCode.apply(String, a);
|
|
596
|
-
let i = "",
|
|
597
|
-
for (;
|
|
596
|
+
let i = "", f = 0;
|
|
597
|
+
for (; f < n; )
|
|
598
598
|
i += String.fromCharCode.apply(
|
|
599
599
|
String,
|
|
600
|
-
a.slice(
|
|
600
|
+
a.slice(f, f += xe)
|
|
601
601
|
);
|
|
602
602
|
return i;
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
let
|
|
604
|
+
function it(a, n, i) {
|
|
605
|
+
let f = "";
|
|
606
606
|
i = Math.min(a.length, i);
|
|
607
607
|
for (let h = n; h < i; ++h)
|
|
608
|
-
|
|
609
|
-
return
|
|
608
|
+
f += String.fromCharCode(a[h] & 127);
|
|
609
|
+
return f;
|
|
610
610
|
}
|
|
611
611
|
function ke(a, n, i) {
|
|
612
|
-
let
|
|
612
|
+
let f = "";
|
|
613
613
|
i = Math.min(a.length, i);
|
|
614
614
|
for (let h = n; h < i; ++h)
|
|
615
|
-
|
|
616
|
-
return
|
|
615
|
+
f += String.fromCharCode(a[h]);
|
|
616
|
+
return f;
|
|
617
617
|
}
|
|
618
618
|
function le(a, n, i) {
|
|
619
|
-
const
|
|
620
|
-
(!n || n < 0) && (n = 0), (!i || i < 0 || i >
|
|
619
|
+
const f = a.length;
|
|
620
|
+
(!n || n < 0) && (n = 0), (!i || i < 0 || i > f) && (i = f);
|
|
621
621
|
let h = "";
|
|
622
622
|
for (let y = n; y < i; ++y)
|
|
623
623
|
h += Vn[a[y]];
|
|
624
624
|
return h;
|
|
625
625
|
}
|
|
626
626
|
function Pe(a, n, i) {
|
|
627
|
-
const
|
|
627
|
+
const f = a.slice(n, i);
|
|
628
628
|
let h = "";
|
|
629
|
-
for (let y = 0; y <
|
|
630
|
-
h += String.fromCharCode(
|
|
629
|
+
for (let y = 0; y < f.length - 1; y += 2)
|
|
630
|
+
h += String.fromCharCode(f[y] + f[y + 1] * 256);
|
|
631
631
|
return h;
|
|
632
632
|
}
|
|
633
|
-
|
|
634
|
-
const
|
|
635
|
-
n = ~~n, i = i === void 0 ?
|
|
633
|
+
c.prototype.slice = function(n, i) {
|
|
634
|
+
const f = this.length;
|
|
635
|
+
n = ~~n, i = i === void 0 ? f : ~~i, n < 0 ? (n += f, n < 0 && (n = 0)) : n > f && (n = f), i < 0 ? (i += f, i < 0 && (i = 0)) : i > f && (i = f), i < n && (i = n);
|
|
636
636
|
const h = this.subarray(n, i);
|
|
637
|
-
return Object.setPrototypeOf(h,
|
|
637
|
+
return Object.setPrototypeOf(h, c.prototype), h;
|
|
638
638
|
};
|
|
639
639
|
function H(a, n, i) {
|
|
640
640
|
if (a % 1 !== 0 || a < 0)
|
|
@@ -642,247 +642,247 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
642
642
|
if (a + n > i)
|
|
643
643
|
throw new RangeError("Trying to access beyond buffer length");
|
|
644
644
|
}
|
|
645
|
-
|
|
646
|
-
n = n >>> 0, i = i >>> 0,
|
|
647
|
-
let h = this[n], y = 1,
|
|
648
|
-
for (; ++
|
|
649
|
-
h += this[n +
|
|
645
|
+
c.prototype.readUintLE = c.prototype.readUIntLE = function(n, i, f) {
|
|
646
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
647
|
+
let h = this[n], y = 1, w = 0;
|
|
648
|
+
for (; ++w < i && (y *= 256); )
|
|
649
|
+
h += this[n + w] * y;
|
|
650
650
|
return h;
|
|
651
|
-
},
|
|
652
|
-
n = n >>> 0, i = i >>> 0,
|
|
651
|
+
}, c.prototype.readUintBE = c.prototype.readUIntBE = function(n, i, f) {
|
|
652
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
653
653
|
let h = this[n + --i], y = 1;
|
|
654
654
|
for (; i > 0 && (y *= 256); )
|
|
655
655
|
h += this[n + --i] * y;
|
|
656
656
|
return h;
|
|
657
|
-
},
|
|
657
|
+
}, c.prototype.readUint8 = c.prototype.readUInt8 = function(n, i) {
|
|
658
658
|
return n = n >>> 0, i || H(n, 1, this.length), this[n];
|
|
659
|
-
},
|
|
659
|
+
}, c.prototype.readUint16LE = c.prototype.readUInt16LE = function(n, i) {
|
|
660
660
|
return n = n >>> 0, i || H(n, 2, this.length), this[n] | this[n + 1] << 8;
|
|
661
|
-
},
|
|
661
|
+
}, c.prototype.readUint16BE = c.prototype.readUInt16BE = function(n, i) {
|
|
662
662
|
return n = n >>> 0, i || H(n, 2, this.length), this[n] << 8 | this[n + 1];
|
|
663
|
-
},
|
|
663
|
+
}, c.prototype.readUint32LE = c.prototype.readUInt32LE = function(n, i) {
|
|
664
664
|
return n = n >>> 0, i || H(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
|
|
665
|
-
},
|
|
665
|
+
}, c.prototype.readUint32BE = c.prototype.readUInt32BE = function(n, i) {
|
|
666
666
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
|
|
667
|
-
},
|
|
667
|
+
}, c.prototype.readBigUInt64LE = Re(function(n) {
|
|
668
668
|
n = n >>> 0, he(n, "offset");
|
|
669
|
-
const i = this[n],
|
|
670
|
-
(i === void 0 ||
|
|
671
|
-
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 +
|
|
669
|
+
const i = this[n], f = this[n + 7];
|
|
670
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
671
|
+
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 + f * 2 ** 24;
|
|
672
672
|
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
673
|
-
}),
|
|
673
|
+
}), c.prototype.readBigUInt64BE = Re(function(n) {
|
|
674
674
|
n = n >>> 0, he(n, "offset");
|
|
675
|
-
const i = this[n],
|
|
676
|
-
(i === void 0 ||
|
|
677
|
-
const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
675
|
+
const i = this[n], f = this[n + 7];
|
|
676
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
677
|
+
const h = i * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n], y = this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f;
|
|
678
678
|
return (BigInt(h) << BigInt(32)) + BigInt(y);
|
|
679
|
-
}),
|
|
680
|
-
n = n >>> 0, i = i >>> 0,
|
|
681
|
-
let h = this[n], y = 1,
|
|
682
|
-
for (; ++
|
|
683
|
-
h += this[n +
|
|
679
|
+
}), c.prototype.readIntLE = function(n, i, f) {
|
|
680
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
681
|
+
let h = this[n], y = 1, w = 0;
|
|
682
|
+
for (; ++w < i && (y *= 256); )
|
|
683
|
+
h += this[n + w] * y;
|
|
684
684
|
return y *= 128, h >= y && (h -= Math.pow(2, 8 * i)), h;
|
|
685
|
-
},
|
|
686
|
-
n = n >>> 0, i = i >>> 0,
|
|
687
|
-
let h = i, y = 1,
|
|
685
|
+
}, c.prototype.readIntBE = function(n, i, f) {
|
|
686
|
+
n = n >>> 0, i = i >>> 0, f || H(n, i, this.length);
|
|
687
|
+
let h = i, y = 1, w = this[n + --h];
|
|
688
688
|
for (; h > 0 && (y *= 256); )
|
|
689
|
-
|
|
690
|
-
return y *= 128,
|
|
691
|
-
},
|
|
689
|
+
w += this[n + --h] * y;
|
|
690
|
+
return y *= 128, w >= y && (w -= Math.pow(2, 8 * i)), w;
|
|
691
|
+
}, c.prototype.readInt8 = function(n, i) {
|
|
692
692
|
return n = n >>> 0, i || H(n, 1, this.length), this[n] & 128 ? (255 - this[n] + 1) * -1 : this[n];
|
|
693
|
-
},
|
|
693
|
+
}, c.prototype.readInt16LE = function(n, i) {
|
|
694
694
|
n = n >>> 0, i || H(n, 2, this.length);
|
|
695
|
-
const
|
|
696
|
-
return
|
|
697
|
-
},
|
|
695
|
+
const f = this[n] | this[n + 1] << 8;
|
|
696
|
+
return f & 32768 ? f | 4294901760 : f;
|
|
697
|
+
}, c.prototype.readInt16BE = function(n, i) {
|
|
698
698
|
n = n >>> 0, i || H(n, 2, this.length);
|
|
699
|
-
const
|
|
700
|
-
return
|
|
701
|
-
},
|
|
699
|
+
const f = this[n + 1] | this[n] << 8;
|
|
700
|
+
return f & 32768 ? f | 4294901760 : f;
|
|
701
|
+
}, c.prototype.readInt32LE = function(n, i) {
|
|
702
702
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
|
|
703
|
-
},
|
|
703
|
+
}, c.prototype.readInt32BE = function(n, i) {
|
|
704
704
|
return n = n >>> 0, i || H(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
|
|
705
|
-
},
|
|
705
|
+
}, c.prototype.readBigInt64LE = Re(function(n) {
|
|
706
706
|
n = n >>> 0, he(n, "offset");
|
|
707
|
-
const i = this[n],
|
|
708
|
-
(i === void 0 ||
|
|
709
|
-
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (
|
|
707
|
+
const i = this[n], f = this[n + 7];
|
|
708
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
709
|
+
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (f << 24);
|
|
710
710
|
return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
711
|
-
}),
|
|
711
|
+
}), c.prototype.readBigInt64BE = Re(function(n) {
|
|
712
712
|
n = n >>> 0, he(n, "offset");
|
|
713
|
-
const i = this[n],
|
|
714
|
-
(i === void 0 ||
|
|
713
|
+
const i = this[n], f = this[n + 7];
|
|
714
|
+
(i === void 0 || f === void 0) && oe(n, this.length - 8);
|
|
715
715
|
const h = (i << 24) + // Overflow
|
|
716
716
|
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
|
|
717
|
-
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 +
|
|
718
|
-
}),
|
|
717
|
+
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f);
|
|
718
|
+
}), c.prototype.readFloatLE = function(n, i) {
|
|
719
719
|
return n = n >>> 0, i || H(n, 4, this.length), r.read(this, n, !0, 23, 4);
|
|
720
|
-
},
|
|
720
|
+
}, c.prototype.readFloatBE = function(n, i) {
|
|
721
721
|
return n = n >>> 0, i || H(n, 4, this.length), r.read(this, n, !1, 23, 4);
|
|
722
|
-
},
|
|
722
|
+
}, c.prototype.readDoubleLE = function(n, i) {
|
|
723
723
|
return n = n >>> 0, i || H(n, 8, this.length), r.read(this, n, !0, 52, 8);
|
|
724
|
-
},
|
|
724
|
+
}, c.prototype.readDoubleBE = function(n, i) {
|
|
725
725
|
return n = n >>> 0, i || H(n, 8, this.length), r.read(this, n, !1, 52, 8);
|
|
726
726
|
};
|
|
727
|
-
function d(a, n, i,
|
|
728
|
-
if (!
|
|
727
|
+
function d(a, n, i, f, h, y) {
|
|
728
|
+
if (!c.isBuffer(a))
|
|
729
729
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
730
730
|
if (n > h || n < y)
|
|
731
731
|
throw new RangeError('"value" argument is out of bounds');
|
|
732
|
-
if (i +
|
|
732
|
+
if (i + f > a.length)
|
|
733
733
|
throw new RangeError("Index out of range");
|
|
734
734
|
}
|
|
735
|
-
|
|
736
|
-
if (n = +n, i = i >>> 0,
|
|
737
|
-
const R = Math.pow(2, 8 *
|
|
738
|
-
d(this, n, i,
|
|
735
|
+
c.prototype.writeUintLE = c.prototype.writeUIntLE = function(n, i, f, h) {
|
|
736
|
+
if (n = +n, i = i >>> 0, f = f >>> 0, !h) {
|
|
737
|
+
const R = Math.pow(2, 8 * f) - 1;
|
|
738
|
+
d(this, n, i, f, R, 0);
|
|
739
739
|
}
|
|
740
|
-
let y = 1,
|
|
741
|
-
for (this[i] = n & 255; ++
|
|
742
|
-
this[i +
|
|
743
|
-
return i +
|
|
744
|
-
},
|
|
745
|
-
if (n = +n, i = i >>> 0,
|
|
746
|
-
const R = Math.pow(2, 8 *
|
|
747
|
-
d(this, n, i,
|
|
740
|
+
let y = 1, w = 0;
|
|
741
|
+
for (this[i] = n & 255; ++w < f && (y *= 256); )
|
|
742
|
+
this[i + w] = n / y & 255;
|
|
743
|
+
return i + f;
|
|
744
|
+
}, c.prototype.writeUintBE = c.prototype.writeUIntBE = function(n, i, f, h) {
|
|
745
|
+
if (n = +n, i = i >>> 0, f = f >>> 0, !h) {
|
|
746
|
+
const R = Math.pow(2, 8 * f) - 1;
|
|
747
|
+
d(this, n, i, f, R, 0);
|
|
748
748
|
}
|
|
749
|
-
let y =
|
|
750
|
-
for (this[i + y] = n & 255; --y >= 0 && (
|
|
751
|
-
this[i + y] = n /
|
|
752
|
-
return i +
|
|
753
|
-
},
|
|
754
|
-
return n = +n, i = i >>> 0,
|
|
755
|
-
},
|
|
756
|
-
return n = +n, i = i >>> 0,
|
|
757
|
-
},
|
|
758
|
-
return n = +n, i = i >>> 0,
|
|
759
|
-
},
|
|
760
|
-
return n = +n, i = i >>> 0,
|
|
761
|
-
},
|
|
762
|
-
return n = +n, i = i >>> 0,
|
|
749
|
+
let y = f - 1, w = 1;
|
|
750
|
+
for (this[i + y] = n & 255; --y >= 0 && (w *= 256); )
|
|
751
|
+
this[i + y] = n / w & 255;
|
|
752
|
+
return i + f;
|
|
753
|
+
}, c.prototype.writeUint8 = c.prototype.writeUInt8 = function(n, i, f) {
|
|
754
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
|
|
755
|
+
}, c.prototype.writeUint16LE = c.prototype.writeUInt16LE = function(n, i, f) {
|
|
756
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
757
|
+
}, c.prototype.writeUint16BE = c.prototype.writeUInt16BE = function(n, i, f) {
|
|
758
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
759
|
+
}, c.prototype.writeUint32LE = c.prototype.writeUInt32LE = function(n, i, f) {
|
|
760
|
+
return n = +n, i = i >>> 0, f || d(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;
|
|
761
|
+
}, c.prototype.writeUint32BE = c.prototype.writeUInt32BE = function(n, i, f) {
|
|
762
|
+
return n = +n, i = i >>> 0, f || d(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;
|
|
763
763
|
};
|
|
764
|
-
function v(a, n, i,
|
|
765
|
-
ye(n,
|
|
764
|
+
function v(a, n, i, f, h) {
|
|
765
|
+
ye(n, f, h, a, i, 7);
|
|
766
766
|
let y = Number(n & BigInt(4294967295));
|
|
767
767
|
a[i++] = y, y = y >> 8, a[i++] = y, y = y >> 8, a[i++] = y, y = y >> 8, a[i++] = y;
|
|
768
|
-
let
|
|
769
|
-
return a[i++] =
|
|
768
|
+
let w = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
769
|
+
return a[i++] = w, w = w >> 8, a[i++] = w, w = w >> 8, a[i++] = w, w = w >> 8, a[i++] = w, i;
|
|
770
770
|
}
|
|
771
|
-
function A(a, n, i,
|
|
772
|
-
ye(n,
|
|
771
|
+
function A(a, n, i, f, h) {
|
|
772
|
+
ye(n, f, h, a, i, 7);
|
|
773
773
|
let y = Number(n & BigInt(4294967295));
|
|
774
774
|
a[i + 7] = y, y = y >> 8, a[i + 6] = y, y = y >> 8, a[i + 5] = y, y = y >> 8, a[i + 4] = y;
|
|
775
|
-
let
|
|
776
|
-
return a[i + 3] =
|
|
775
|
+
let w = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
776
|
+
return a[i + 3] = w, w = w >> 8, a[i + 2] = w, w = w >> 8, a[i + 1] = w, w = w >> 8, a[i] = w, i + 8;
|
|
777
777
|
}
|
|
778
|
-
|
|
778
|
+
c.prototype.writeBigUInt64LE = Re(function(n, i = 0) {
|
|
779
779
|
return v(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
780
|
-
}),
|
|
780
|
+
}), c.prototype.writeBigUInt64BE = Re(function(n, i = 0) {
|
|
781
781
|
return A(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
782
|
-
}),
|
|
782
|
+
}), c.prototype.writeIntLE = function(n, i, f, h) {
|
|
783
783
|
if (n = +n, i = i >>> 0, !h) {
|
|
784
|
-
const W = Math.pow(2, 8 *
|
|
785
|
-
d(this, n, i,
|
|
784
|
+
const W = Math.pow(2, 8 * f - 1);
|
|
785
|
+
d(this, n, i, f, W - 1, -W);
|
|
786
786
|
}
|
|
787
|
-
let y = 0,
|
|
788
|
-
for (this[i] = n & 255; ++y <
|
|
789
|
-
n < 0 && R === 0 && this[i + y - 1] !== 0 && (R = 1), this[i + y] = (n /
|
|
790
|
-
return i +
|
|
791
|
-
},
|
|
787
|
+
let y = 0, w = 1, R = 0;
|
|
788
|
+
for (this[i] = n & 255; ++y < f && (w *= 256); )
|
|
789
|
+
n < 0 && R === 0 && this[i + y - 1] !== 0 && (R = 1), this[i + y] = (n / w >> 0) - R & 255;
|
|
790
|
+
return i + f;
|
|
791
|
+
}, c.prototype.writeIntBE = function(n, i, f, h) {
|
|
792
792
|
if (n = +n, i = i >>> 0, !h) {
|
|
793
|
-
const W = Math.pow(2, 8 *
|
|
794
|
-
d(this, n, i,
|
|
793
|
+
const W = Math.pow(2, 8 * f - 1);
|
|
794
|
+
d(this, n, i, f, W - 1, -W);
|
|
795
795
|
}
|
|
796
|
-
let y =
|
|
797
|
-
for (this[i + y] = n & 255; --y >= 0 && (
|
|
798
|
-
n < 0 && R === 0 && this[i + y + 1] !== 0 && (R = 1), this[i + y] = (n /
|
|
799
|
-
return i +
|
|
800
|
-
},
|
|
801
|
-
return n = +n, i = i >>> 0,
|
|
802
|
-
},
|
|
803
|
-
return n = +n, i = i >>> 0,
|
|
804
|
-
},
|
|
805
|
-
return n = +n, i = i >>> 0,
|
|
806
|
-
},
|
|
807
|
-
return n = +n, i = i >>> 0,
|
|
808
|
-
},
|
|
809
|
-
return n = +n, i = i >>> 0,
|
|
810
|
-
},
|
|
796
|
+
let y = f - 1, w = 1, R = 0;
|
|
797
|
+
for (this[i + y] = n & 255; --y >= 0 && (w *= 256); )
|
|
798
|
+
n < 0 && R === 0 && this[i + y + 1] !== 0 && (R = 1), this[i + y] = (n / w >> 0) - R & 255;
|
|
799
|
+
return i + f;
|
|
800
|
+
}, c.prototype.writeInt8 = function(n, i, f) {
|
|
801
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
|
|
802
|
+
}, c.prototype.writeInt16LE = function(n, i, f) {
|
|
803
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
|
|
804
|
+
}, c.prototype.writeInt16BE = function(n, i, f) {
|
|
805
|
+
return n = +n, i = i >>> 0, f || d(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
|
|
806
|
+
}, c.prototype.writeInt32LE = function(n, i, f) {
|
|
807
|
+
return n = +n, i = i >>> 0, f || d(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;
|
|
808
|
+
}, c.prototype.writeInt32BE = function(n, i, f) {
|
|
809
|
+
return n = +n, i = i >>> 0, f || d(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;
|
|
810
|
+
}, c.prototype.writeBigInt64LE = Re(function(n, i = 0) {
|
|
811
811
|
return v(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
812
|
-
}),
|
|
812
|
+
}), c.prototype.writeBigInt64BE = Re(function(n, i = 0) {
|
|
813
813
|
return A(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
814
814
|
});
|
|
815
|
-
function C(a, n, i,
|
|
816
|
-
if (i +
|
|
815
|
+
function C(a, n, i, f, h, y) {
|
|
816
|
+
if (i + f > a.length)
|
|
817
817
|
throw new RangeError("Index out of range");
|
|
818
818
|
if (i < 0)
|
|
819
819
|
throw new RangeError("Index out of range");
|
|
820
820
|
}
|
|
821
|
-
function j(a, n, i,
|
|
822
|
-
return n = +n, i = i >>> 0, h || C(a, n, i, 4), r.write(a, n, i,
|
|
821
|
+
function j(a, n, i, f, h) {
|
|
822
|
+
return n = +n, i = i >>> 0, h || C(a, n, i, 4), r.write(a, n, i, f, 23, 4), i + 4;
|
|
823
823
|
}
|
|
824
|
-
|
|
825
|
-
return j(this, n, i, !0,
|
|
826
|
-
},
|
|
827
|
-
return j(this, n, i, !1,
|
|
824
|
+
c.prototype.writeFloatLE = function(n, i, f) {
|
|
825
|
+
return j(this, n, i, !0, f);
|
|
826
|
+
}, c.prototype.writeFloatBE = function(n, i, f) {
|
|
827
|
+
return j(this, n, i, !1, f);
|
|
828
828
|
};
|
|
829
|
-
function V(a, n, i,
|
|
830
|
-
return n = +n, i = i >>> 0, h || C(a, n, i, 8), r.write(a, n, i,
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
return V(this, n, i, !0,
|
|
834
|
-
},
|
|
835
|
-
return V(this, n, i, !1,
|
|
836
|
-
},
|
|
837
|
-
if (!
|
|
829
|
+
function V(a, n, i, f, h) {
|
|
830
|
+
return n = +n, i = i >>> 0, h || C(a, n, i, 8), r.write(a, n, i, f, 52, 8), i + 8;
|
|
831
|
+
}
|
|
832
|
+
c.prototype.writeDoubleLE = function(n, i, f) {
|
|
833
|
+
return V(this, n, i, !0, f);
|
|
834
|
+
}, c.prototype.writeDoubleBE = function(n, i, f) {
|
|
835
|
+
return V(this, n, i, !1, f);
|
|
836
|
+
}, c.prototype.copy = function(n, i, f, h) {
|
|
837
|
+
if (!c.isBuffer(n))
|
|
838
838
|
throw new TypeError("argument should be a Buffer");
|
|
839
|
-
if (
|
|
839
|
+
if (f || (f = 0), !h && h !== 0 && (h = this.length), i >= n.length && (i = n.length), i || (i = 0), h > 0 && h < f && (h = f), h === f || n.length === 0 || this.length === 0)
|
|
840
840
|
return 0;
|
|
841
841
|
if (i < 0)
|
|
842
842
|
throw new RangeError("targetStart out of bounds");
|
|
843
|
-
if (
|
|
843
|
+
if (f < 0 || f >= this.length)
|
|
844
844
|
throw new RangeError("Index out of range");
|
|
845
845
|
if (h < 0)
|
|
846
846
|
throw new RangeError("sourceEnd out of bounds");
|
|
847
|
-
h > this.length && (h = this.length), n.length - i < h -
|
|
848
|
-
const y = h -
|
|
849
|
-
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i,
|
|
847
|
+
h > this.length && (h = this.length), n.length - i < h - f && (h = n.length - i + f);
|
|
848
|
+
const y = h - f;
|
|
849
|
+
return this === n && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(i, f, h) : Uint8Array.prototype.set.call(
|
|
850
850
|
n,
|
|
851
|
-
this.subarray(
|
|
851
|
+
this.subarray(f, h),
|
|
852
852
|
i
|
|
853
853
|
), y;
|
|
854
|
-
},
|
|
854
|
+
}, c.prototype.fill = function(n, i, f, h) {
|
|
855
855
|
if (typeof n == "string") {
|
|
856
|
-
if (typeof i == "string" ? (h = i, i = 0,
|
|
856
|
+
if (typeof i == "string" ? (h = i, i = 0, f = this.length) : typeof f == "string" && (h = f, f = this.length), h !== void 0 && typeof h != "string")
|
|
857
857
|
throw new TypeError("encoding must be a string");
|
|
858
|
-
if (typeof h == "string" && !
|
|
858
|
+
if (typeof h == "string" && !c.isEncoding(h))
|
|
859
859
|
throw new TypeError("Unknown encoding: " + h);
|
|
860
860
|
if (n.length === 1) {
|
|
861
|
-
const
|
|
862
|
-
(h === "utf8" &&
|
|
861
|
+
const w = n.charCodeAt(0);
|
|
862
|
+
(h === "utf8" && w < 128 || h === "latin1") && (n = w);
|
|
863
863
|
}
|
|
864
864
|
} else
|
|
865
865
|
typeof n == "number" ? n = n & 255 : typeof n == "boolean" && (n = Number(n));
|
|
866
|
-
if (i < 0 || this.length < i || this.length <
|
|
866
|
+
if (i < 0 || this.length < i || this.length < f)
|
|
867
867
|
throw new RangeError("Out of range index");
|
|
868
|
-
if (
|
|
868
|
+
if (f <= i)
|
|
869
869
|
return this;
|
|
870
|
-
i = i >>> 0,
|
|
870
|
+
i = i >>> 0, f = f === void 0 ? this.length : f >>> 0, n || (n = 0);
|
|
871
871
|
let y;
|
|
872
872
|
if (typeof n == "number")
|
|
873
|
-
for (y = i; y <
|
|
873
|
+
for (y = i; y < f; ++y)
|
|
874
874
|
this[y] = n;
|
|
875
875
|
else {
|
|
876
|
-
const
|
|
876
|
+
const w = c.isBuffer(n) ? n : c.from(n, h), R = w.length;
|
|
877
877
|
if (R === 0)
|
|
878
878
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
879
|
-
for (y = 0; y <
|
|
880
|
-
this[y + i] =
|
|
879
|
+
for (y = 0; y < f - i; ++y)
|
|
880
|
+
this[y + i] = w[y % R];
|
|
881
881
|
}
|
|
882
882
|
return this;
|
|
883
883
|
};
|
|
884
884
|
const B = {};
|
|
885
|
-
function
|
|
885
|
+
function N(a, n, i) {
|
|
886
886
|
B[a] = class extends i {
|
|
887
887
|
constructor() {
|
|
888
888
|
super(), Object.defineProperty(this, "message", {
|
|
@@ -907,43 +907,43 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
907
907
|
}
|
|
908
908
|
};
|
|
909
909
|
}
|
|
910
|
-
|
|
910
|
+
N(
|
|
911
911
|
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
912
912
|
function(a) {
|
|
913
913
|
return a ? `${a} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
914
914
|
},
|
|
915
915
|
RangeError
|
|
916
|
-
),
|
|
916
|
+
), N(
|
|
917
917
|
"ERR_INVALID_ARG_TYPE",
|
|
918
918
|
function(a, n) {
|
|
919
919
|
return `The "${a}" argument must be of type number. Received type ${typeof n}`;
|
|
920
920
|
},
|
|
921
921
|
TypeError
|
|
922
|
-
),
|
|
922
|
+
), N(
|
|
923
923
|
"ERR_OUT_OF_RANGE",
|
|
924
924
|
function(a, n, i) {
|
|
925
|
-
let
|
|
926
|
-
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = M(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = M(h)), h += "n"),
|
|
925
|
+
let f = `The value of "${a}" is out of range.`, h = i;
|
|
926
|
+
return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = M(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = M(h)), h += "n"), f += ` It must be ${n}. Received ${h}`, f;
|
|
927
927
|
},
|
|
928
928
|
RangeError
|
|
929
929
|
);
|
|
930
930
|
function M(a) {
|
|
931
931
|
let n = "", i = a.length;
|
|
932
|
-
const
|
|
933
|
-
for (; i >=
|
|
932
|
+
const f = a[0] === "-" ? 1 : 0;
|
|
933
|
+
for (; i >= f + 4; i -= 3)
|
|
934
934
|
n = `_${a.slice(i - 3, i)}${n}`;
|
|
935
935
|
return `${a.slice(0, i)}${n}`;
|
|
936
936
|
}
|
|
937
937
|
function te(a, n, i) {
|
|
938
938
|
he(n, "offset"), (a[n] === void 0 || a[n + i] === void 0) && oe(n, a.length - (i + 1));
|
|
939
939
|
}
|
|
940
|
-
function ye(a, n, i,
|
|
940
|
+
function ye(a, n, i, f, h, y) {
|
|
941
941
|
if (a > i || a < n) {
|
|
942
|
-
const
|
|
942
|
+
const w = typeof n == "bigint" ? "n" : "";
|
|
943
943
|
let R;
|
|
944
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ? R = `>= 0${
|
|
944
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? R = `>= 0${w} and < 2${w} ** ${(y + 1) * 8}${w}` : R = `>= -(2${w} ** ${(y + 1) * 8 - 1}${w}) and < 2 ** ${(y + 1) * 8 - 1}${w}` : R = `>= ${n}${w} and <= ${i}${w}`, new B.ERR_OUT_OF_RANGE("value", R, a);
|
|
945
945
|
}
|
|
946
|
-
te(
|
|
946
|
+
te(f, h, y);
|
|
947
947
|
}
|
|
948
948
|
function he(a, n) {
|
|
949
949
|
if (typeof a != "number")
|
|
@@ -957,26 +957,26 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
957
957
|
);
|
|
958
958
|
}
|
|
959
959
|
const Me = /[^+/0-9A-Za-z-_]/g;
|
|
960
|
-
function
|
|
960
|
+
function pt(a) {
|
|
961
961
|
if (a = a.split("=")[0], a = a.trim().replace(Me, ""), a.length < 2)
|
|
962
962
|
return "";
|
|
963
963
|
for (; a.length % 4 !== 0; )
|
|
964
964
|
a = a + "=";
|
|
965
965
|
return a;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
967
|
+
function ot(a, n) {
|
|
968
968
|
n = n || 1 / 0;
|
|
969
969
|
let i;
|
|
970
|
-
const
|
|
970
|
+
const f = a.length;
|
|
971
971
|
let h = null;
|
|
972
972
|
const y = [];
|
|
973
|
-
for (let
|
|
974
|
-
if (i = a.charCodeAt(
|
|
973
|
+
for (let w = 0; w < f; ++w) {
|
|
974
|
+
if (i = a.charCodeAt(w), i > 55295 && i < 57344) {
|
|
975
975
|
if (!h) {
|
|
976
976
|
if (i > 56319) {
|
|
977
977
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
978
978
|
continue;
|
|
979
|
-
} else if (
|
|
979
|
+
} else if (w + 1 === f) {
|
|
980
980
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
981
981
|
continue;
|
|
982
982
|
}
|
|
@@ -1030,33 +1030,33 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1030
1030
|
return n;
|
|
1031
1031
|
}
|
|
1032
1032
|
function S(a, n) {
|
|
1033
|
-
let i,
|
|
1033
|
+
let i, f, h;
|
|
1034
1034
|
const y = [];
|
|
1035
|
-
for (let
|
|
1036
|
-
i = a.charCodeAt(
|
|
1035
|
+
for (let w = 0; w < a.length && !((n -= 2) < 0); ++w)
|
|
1036
|
+
i = a.charCodeAt(w), f = i >> 8, h = i % 256, y.push(h), y.push(f);
|
|
1037
1037
|
return y;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return e.toByteArray(
|
|
1039
|
+
function dt(a) {
|
|
1040
|
+
return e.toByteArray(pt(a));
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1042
|
+
function st(a, n, i, f) {
|
|
1043
1043
|
let h;
|
|
1044
|
-
for (h = 0; h <
|
|
1044
|
+
for (h = 0; h < f && !(h + i >= n.length || h >= a.length); ++h)
|
|
1045
1045
|
n[h + i] = a[h];
|
|
1046
1046
|
return h;
|
|
1047
1047
|
}
|
|
1048
1048
|
function ge(a, n) {
|
|
1049
1049
|
return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Lt(a) {
|
|
1052
1052
|
return a !== a;
|
|
1053
1053
|
}
|
|
1054
1054
|
const Vn = function() {
|
|
1055
1055
|
const a = "0123456789abcdef", n = new Array(256);
|
|
1056
1056
|
for (let i = 0; i < 16; ++i) {
|
|
1057
|
-
const
|
|
1057
|
+
const f = i * 16;
|
|
1058
1058
|
for (let h = 0; h < 16; ++h)
|
|
1059
|
-
n[
|
|
1059
|
+
n[f + h] = a[i] + a[h];
|
|
1060
1060
|
}
|
|
1061
1061
|
return n;
|
|
1062
1062
|
}();
|
|
@@ -1067,7 +1067,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
1067
1067
|
throw new Error("BigInt not supported");
|
|
1068
1068
|
}
|
|
1069
1069
|
})(Xr);
|
|
1070
|
-
var en = { exports: {} }, Y = en.exports = {}, me,
|
|
1070
|
+
var en = { exports: {} }, Y = en.exports = {}, me, we;
|
|
1071
1071
|
function Xt() {
|
|
1072
1072
|
throw new Error("setTimeout has not been defined");
|
|
1073
1073
|
}
|
|
@@ -1081,9 +1081,9 @@ function Zt() {
|
|
|
1081
1081
|
me = Xt;
|
|
1082
1082
|
}
|
|
1083
1083
|
try {
|
|
1084
|
-
typeof clearTimeout == "function" ?
|
|
1084
|
+
typeof clearTimeout == "function" ? we = clearTimeout : we = Zt;
|
|
1085
1085
|
} catch {
|
|
1086
|
-
|
|
1086
|
+
we = Zt;
|
|
1087
1087
|
}
|
|
1088
1088
|
})();
|
|
1089
1089
|
function tn(t) {
|
|
@@ -1101,35 +1101,35 @@ function tn(t) {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
if (
|
|
1104
|
+
function ui(t) {
|
|
1105
|
+
if (we === clearTimeout)
|
|
1106
1106
|
return clearTimeout(t);
|
|
1107
|
-
if ((
|
|
1108
|
-
return
|
|
1107
|
+
if ((we === Zt || !we) && clearTimeout)
|
|
1108
|
+
return we = clearTimeout, clearTimeout(t);
|
|
1109
1109
|
try {
|
|
1110
|
-
return
|
|
1110
|
+
return we(t);
|
|
1111
1111
|
} catch {
|
|
1112
1112
|
try {
|
|
1113
|
-
return
|
|
1113
|
+
return we.call(null, t);
|
|
1114
1114
|
} catch {
|
|
1115
|
-
return
|
|
1115
|
+
return we.call(this, t);
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
var _e = [],
|
|
1120
|
-
function
|
|
1121
|
-
!
|
|
1119
|
+
var _e = [], Je = !1, Ue, yt = -1;
|
|
1120
|
+
function ci() {
|
|
1121
|
+
!Je || !Ue || (Je = !1, Ue.length ? _e = Ue.concat(_e) : yt = -1, _e.length && rn());
|
|
1122
1122
|
}
|
|
1123
1123
|
function rn() {
|
|
1124
|
-
if (!
|
|
1125
|
-
var t = tn(
|
|
1126
|
-
|
|
1124
|
+
if (!Je) {
|
|
1125
|
+
var t = tn(ci);
|
|
1126
|
+
Je = !0;
|
|
1127
1127
|
for (var e = _e.length; e; ) {
|
|
1128
1128
|
for (Ue = _e, _e = []; ++yt < e; )
|
|
1129
1129
|
Ue && Ue[yt].run();
|
|
1130
1130
|
yt = -1, e = _e.length;
|
|
1131
1131
|
}
|
|
1132
|
-
Ue = null,
|
|
1132
|
+
Ue = null, Je = !1, ui(t);
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
1135
|
Y.nextTick = function(t) {
|
|
@@ -1137,7 +1137,7 @@ Y.nextTick = function(t) {
|
|
|
1137
1137
|
if (arguments.length > 1)
|
|
1138
1138
|
for (var r = 1; r < arguments.length; r++)
|
|
1139
1139
|
e[r - 1] = arguments[r];
|
|
1140
|
-
_e.push(new nn(t, e)), _e.length === 1 && !
|
|
1140
|
+
_e.push(new nn(t, e)), _e.length === 1 && !Je && tn(rn);
|
|
1141
1141
|
};
|
|
1142
1142
|
function nn(t, e) {
|
|
1143
1143
|
this.fun = t, this.array = e;
|
|
@@ -1177,15 +1177,57 @@ Y.chdir = function(t) {
|
|
|
1177
1177
|
Y.umask = function() {
|
|
1178
1178
|
return 0;
|
|
1179
1179
|
};
|
|
1180
|
-
var
|
|
1180
|
+
var fi = en.exports;
|
|
1181
1181
|
(function(t) {
|
|
1182
1182
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
1183
|
-
const e = Xr, r =
|
|
1183
|
+
const e = Xr, r = fi, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
|
|
1184
1184
|
Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
|
|
1185
1185
|
})(O);
|
|
1186
|
-
class
|
|
1186
|
+
class li {
|
|
1187
1187
|
}
|
|
1188
1188
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
1189
|
+
const hi = (t, e) => Qn(t, e, {
|
|
1190
|
+
mount: ({ storeName: r }) => {
|
|
1191
|
+
window.slStore[r] || (window.slStore[r] = { mounted: !0, history: [{ type: "mount" }] }), window.slStore[r].store = t;
|
|
1192
|
+
},
|
|
1193
|
+
unmount: ({ storeName: r }) => {
|
|
1194
|
+
window.slStore[r].mounted = !1, window.slStore[r]?.history.push({ type: "unmount" });
|
|
1195
|
+
},
|
|
1196
|
+
change: ({ actionName: r, storeName: o, changed: s, newValue: u, oldValue: l, valueMessage: c }) => {
|
|
1197
|
+
window.slStore[o]?.history.push({
|
|
1198
|
+
type: "change",
|
|
1199
|
+
changed: s,
|
|
1200
|
+
newValue: u,
|
|
1201
|
+
oldValue: l,
|
|
1202
|
+
diff: Gn({ ...l }, { ...u }, { cyclesFix: !1 }),
|
|
1203
|
+
actionName: r,
|
|
1204
|
+
valueMessage: c
|
|
1205
|
+
});
|
|
1206
|
+
},
|
|
1207
|
+
action: {
|
|
1208
|
+
start: ({ actionName: r, args: o, storeName: s }) => {
|
|
1209
|
+
window.slStore[s]?.history.push({
|
|
1210
|
+
type: "action:start",
|
|
1211
|
+
actionName: r,
|
|
1212
|
+
args: o,
|
|
1213
|
+
storeName: s
|
|
1214
|
+
});
|
|
1215
|
+
},
|
|
1216
|
+
error: ({ actionName: r, error: o, storeName: s }) => {
|
|
1217
|
+
window.slStore[s]?.history.push({
|
|
1218
|
+
type: "action:error",
|
|
1219
|
+
actionName: r,
|
|
1220
|
+
error: o
|
|
1221
|
+
});
|
|
1222
|
+
},
|
|
1223
|
+
end: ({ actionName: r, storeName: o }) => {
|
|
1224
|
+
window.slStore[o]?.history.push({
|
|
1225
|
+
type: "action:end",
|
|
1226
|
+
actionName: r
|
|
1227
|
+
});
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1189
1231
|
class xt {
|
|
1190
1232
|
/**
|
|
1191
1233
|
* store instance (nanostores)
|
|
@@ -1193,7 +1235,7 @@ class xt {
|
|
|
1193
1235
|
store;
|
|
1194
1236
|
name;
|
|
1195
1237
|
constructor(e, r) {
|
|
1196
|
-
this.store = e, this.name = r;
|
|
1238
|
+
this.store = e, this.name = r, hi(this.store, this.name);
|
|
1197
1239
|
}
|
|
1198
1240
|
/**
|
|
1199
1241
|
* return store instance
|
|
@@ -1202,11 +1244,11 @@ class xt {
|
|
|
1202
1244
|
return this.store;
|
|
1203
1245
|
}
|
|
1204
1246
|
}
|
|
1205
|
-
const
|
|
1247
|
+
const pi = (t) => {
|
|
1206
1248
|
const e = Object.keys(t);
|
|
1207
1249
|
return Hr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
|
|
1208
1250
|
};
|
|
1209
|
-
class
|
|
1251
|
+
class ut extends xt {
|
|
1210
1252
|
getValues = () => this.getStore().get();
|
|
1211
1253
|
getValue = (e) => this.getStore().get()[e];
|
|
1212
1254
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
@@ -1218,7 +1260,7 @@ var Ie;
|
|
|
1218
1260
|
(function(t) {
|
|
1219
1261
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
1220
1262
|
})(Ie || (Ie = {}));
|
|
1221
|
-
const
|
|
1263
|
+
const di = {
|
|
1222
1264
|
[ue.BETTING]: "betting",
|
|
1223
1265
|
[ue.GAMES]: "games",
|
|
1224
1266
|
[ue.PUBLIC_CHAT]: "publicChat",
|
|
@@ -1236,7 +1278,7 @@ class lr {
|
|
|
1236
1278
|
listeners = /* @__PURE__ */ new Set();
|
|
1237
1279
|
settingsKey;
|
|
1238
1280
|
constructor({ settings: e, ...r }, o) {
|
|
1239
|
-
this.settingsKey =
|
|
1281
|
+
this.settingsKey = di[r.type], this.status = Ct(De.Suspended), this.config = new ut($e(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new ut($e(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new ut($e({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1240
1282
|
}
|
|
1241
1283
|
get featureConfig() {
|
|
1242
1284
|
return this.config.getStore();
|
|
@@ -1327,7 +1369,7 @@ class pe extends xt {
|
|
|
1327
1369
|
key = () => this.getStore().key;
|
|
1328
1370
|
off = () => this.getStore().off();
|
|
1329
1371
|
}
|
|
1330
|
-
async function*
|
|
1372
|
+
async function* yi(t, e) {
|
|
1331
1373
|
for await (const r of e) {
|
|
1332
1374
|
t.response.message = r, t.received_at = Date.now();
|
|
1333
1375
|
const o = {
|
|
@@ -1337,7 +1379,7 @@ async function* hi(t, e) {
|
|
|
1337
1379
|
window.postMessage(o), yield r;
|
|
1338
1380
|
}
|
|
1339
1381
|
}
|
|
1340
|
-
const
|
|
1382
|
+
const gi = () => (t) => async (e) => {
|
|
1341
1383
|
const r = {
|
|
1342
1384
|
name: e.url,
|
|
1343
1385
|
request: {},
|
|
@@ -1349,7 +1391,7 @@ const pi = () => (t) => async (e) => {
|
|
|
1349
1391
|
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)
|
|
1350
1392
|
return {
|
|
1351
1393
|
...o,
|
|
1352
|
-
message:
|
|
1394
|
+
message: yi(r, o.message)
|
|
1353
1395
|
};
|
|
1354
1396
|
{
|
|
1355
1397
|
r.request.message = e.message, r.response.message = o.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -1377,7 +1419,7 @@ var Ae;
|
|
|
1377
1419
|
(function(t) {
|
|
1378
1420
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnecting = "reconnecting";
|
|
1379
1421
|
})(Ae || (Ae = {}));
|
|
1380
|
-
class
|
|
1422
|
+
class mi {
|
|
1381
1423
|
params;
|
|
1382
1424
|
stream;
|
|
1383
1425
|
method;
|
|
@@ -1392,7 +1434,7 @@ class di {
|
|
|
1392
1434
|
ts: /* @__PURE__ */ new Date(),
|
|
1393
1435
|
log: []
|
|
1394
1436
|
};
|
|
1395
|
-
this.state = new
|
|
1437
|
+
this.state = new ut($e(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 de(ne(null), `subscription:${s.name}:store`)), "subscribe" in o && typeof o.subscribe == "function" && o.subscribe(() => {
|
|
1396
1438
|
this.reconnect();
|
|
1397
1439
|
}), this.updateState(Ae.Ready);
|
|
1398
1440
|
}
|
|
@@ -1434,10 +1476,10 @@ class di {
|
|
|
1434
1476
|
this.addStateLog(`data routed to ${this.listeners.size} listeners`);
|
|
1435
1477
|
};
|
|
1436
1478
|
onStreamError = (e) => {
|
|
1437
|
-
e !== void 0 && (e.code !==
|
|
1479
|
+
e !== void 0 && (e.code !== zn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
|
|
1438
1480
|
};
|
|
1439
1481
|
}
|
|
1440
|
-
class
|
|
1482
|
+
class wi {
|
|
1441
1483
|
toJsonOptions = {
|
|
1442
1484
|
emitDefaultValues: !1,
|
|
1443
1485
|
enumAsInteger: !0,
|
|
@@ -1452,11 +1494,11 @@ class yi {
|
|
|
1452
1494
|
callbackClients;
|
|
1453
1495
|
subscriptions;
|
|
1454
1496
|
constructor(e) {
|
|
1455
|
-
this.host = e, this.$headers = new
|
|
1497
|
+
this.host = e, this.$headers = new ut($e({
|
|
1456
1498
|
"sl-device-id": O.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1457
1499
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1458
|
-
const [r, o, s] =
|
|
1459
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport =
|
|
1500
|
+
const [r, o, s] = Jn();
|
|
1501
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Wn({
|
|
1460
1502
|
baseUrl: e,
|
|
1461
1503
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1462
1504
|
// @ts-ignore
|
|
@@ -1471,7 +1513,7 @@ class yi {
|
|
|
1471
1513
|
const s = this.subscriptions.get(r);
|
|
1472
1514
|
if (s)
|
|
1473
1515
|
return s;
|
|
1474
|
-
const u = new
|
|
1516
|
+
const u = new mi(this.$headers, e, r, o);
|
|
1475
1517
|
return this.subscriptions.set(r, u), u;
|
|
1476
1518
|
};
|
|
1477
1519
|
removeSubscription = (e) => {
|
|
@@ -1492,14 +1534,14 @@ class yi {
|
|
|
1492
1534
|
const r = e.typeName;
|
|
1493
1535
|
if (this.clients.has(r))
|
|
1494
1536
|
return this.clients.get(r);
|
|
1495
|
-
const o =
|
|
1537
|
+
const o = Kn(e, this.transport);
|
|
1496
1538
|
return this.clients.set(r, o), o;
|
|
1497
1539
|
};
|
|
1498
1540
|
getCallbackClient = (e) => {
|
|
1499
1541
|
const r = e.typeName;
|
|
1500
1542
|
if (this.callbackClients.has(r))
|
|
1501
1543
|
return this.callbackClients.get(r);
|
|
1502
|
-
const o =
|
|
1544
|
+
const o = Hn(e, this.transport);
|
|
1503
1545
|
return this.callbackClients.set(r, o), o;
|
|
1504
1546
|
};
|
|
1505
1547
|
// create unary client, used for query request
|
|
@@ -1508,8 +1550,8 @@ class yi {
|
|
|
1508
1550
|
e.typeName,
|
|
1509
1551
|
u.charAt(0).toLowerCase() + u.slice(1),
|
|
1510
1552
|
...Array.isArray(r) ? r : [r]
|
|
1511
|
-
],
|
|
1512
|
-
return { client: s, queryKey: l, queryKeyStr:
|
|
1553
|
+
], c = [e.typeName, u.charAt(0).toLowerCase() + u.slice(1)];
|
|
1554
|
+
return { client: s, queryKey: l, queryKeyStr: c.join("") };
|
|
1513
1555
|
};
|
|
1514
1556
|
// create callback client, used for server stream subscriptions
|
|
1515
1557
|
createCallbackClient = (e) => ({ client: this.getCallbackClient(e) });
|
|
@@ -1531,11 +1573,11 @@ class yi {
|
|
|
1531
1573
|
o.header.set(u, s[u]);
|
|
1532
1574
|
return r(o);
|
|
1533
1575
|
};
|
|
1534
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
1576
|
+
this.interceptors.push(e), this.interceptors.push(gi());
|
|
1535
1577
|
};
|
|
1536
1578
|
}
|
|
1537
|
-
const
|
|
1538
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1579
|
+
const bi = (t, e) => {
|
|
1580
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Yn, {
|
|
1539
1581
|
method: "retrieveEventId",
|
|
1540
1582
|
params: [t]
|
|
1541
1583
|
});
|
|
@@ -1552,29 +1594,29 @@ const gi = (t, e) => {
|
|
|
1552
1594
|
}
|
|
1553
1595
|
}
|
|
1554
1596
|
});
|
|
1555
|
-
},
|
|
1556
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1597
|
+
}, vi = (t, e) => {
|
|
1598
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "getStream", params: [t] });
|
|
1557
1599
|
return e.nanoquery.createFetcherStore(o, {
|
|
1558
1600
|
fetcher: async (s, u, l) => l ? (await r.getStream({
|
|
1559
1601
|
id: l
|
|
1560
1602
|
// we are sure that id is a string
|
|
1561
1603
|
})).data?.attributes : void 0
|
|
1562
1604
|
});
|
|
1563
|
-
},
|
|
1605
|
+
}, Si = (t, e) => {
|
|
1564
1606
|
const { queryKey: r, client: o } = e.createPromiseClient(Wr, { method: "me", params: [t] });
|
|
1565
1607
|
return e.nanoquery.createFetcherStore(r, {
|
|
1566
1608
|
fetcher: () => o.me({})
|
|
1567
1609
|
});
|
|
1568
|
-
},
|
|
1610
|
+
}, Ai = (t) => {
|
|
1569
1611
|
const { client: e } = t.createPromiseClient(Wr, { method: "bypassAuth" });
|
|
1570
1612
|
return ({ userKey: r, schema: o, init: s }) => e.bypassAuth({ userKey: r, schema: o, init: s });
|
|
1571
|
-
},
|
|
1572
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1613
|
+
}, Ei = (t, e) => {
|
|
1614
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "get", params: [t] });
|
|
1573
1615
|
return e.nanoquery.createFetcherStore(o, {
|
|
1574
1616
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
1575
1617
|
});
|
|
1576
|
-
},
|
|
1577
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1618
|
+
}, Ii = (t, e) => {
|
|
1619
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, { method: "getOrganization", params: [t] });
|
|
1578
1620
|
return e.nanoquery.createFetcherStore(o, {
|
|
1579
1621
|
fetcher: async () => {
|
|
1580
1622
|
const s = await r.getOrganization({});
|
|
@@ -1584,16 +1626,16 @@ const gi = (t, e) => {
|
|
|
1584
1626
|
} : void 0;
|
|
1585
1627
|
}
|
|
1586
1628
|
});
|
|
1587
|
-
},
|
|
1588
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1629
|
+
}, Fi = (t, e) => {
|
|
1630
|
+
const { client: r, queryKey: o } = e.createPromiseClient(lt, {
|
|
1589
1631
|
method: "getOrganizationAdvertising",
|
|
1590
1632
|
params: [t]
|
|
1591
1633
|
});
|
|
1592
1634
|
return e.nanoquery.createFetcherStore(o, {
|
|
1593
1635
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
1594
1636
|
});
|
|
1595
|
-
},
|
|
1596
|
-
t.transport = new
|
|
1637
|
+
}, Ti = (t, e, r) => {
|
|
1638
|
+
t.transport = new wi(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
|
|
1597
1639
|
};
|
|
1598
1640
|
class hr {
|
|
1599
1641
|
delimiter = ":";
|
|
@@ -1649,19 +1691,19 @@ var Fe;
|
|
|
1649
1691
|
(function(t) {
|
|
1650
1692
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
1651
1693
|
})(Fe || (Fe = {}));
|
|
1652
|
-
const
|
|
1653
|
-
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(
|
|
1654
|
-
if (!
|
|
1655
|
-
return l?.data?.id ? l.data.id : p === !1 ? void 0 :
|
|
1656
|
-
}), u = new pe(
|
|
1694
|
+
const _i = (t) => {
|
|
1695
|
+
const e = new Ke(), r = new de(ne(e.getExternalToken()), "userKey"), o = new de(ne(e.getToken()), "userToken"), s = new pe(Si(o.getStore(), t), "user", ({ data: l, error: c, loading: p }, b) => {
|
|
1696
|
+
if (!c)
|
|
1697
|
+
return l?.data?.id ? l.data.id : p === !1 ? void 0 : b;
|
|
1698
|
+
}), u = new pe(Ei(o.getStore(), t), "userSettings");
|
|
1657
1699
|
return {
|
|
1658
1700
|
userKey: r,
|
|
1659
1701
|
userToken: o,
|
|
1660
1702
|
user: s,
|
|
1661
1703
|
userSettings: u
|
|
1662
1704
|
};
|
|
1663
|
-
},
|
|
1664
|
-
const e = new de(ne(void 0), "providerStreamId"), r = new pe(
|
|
1705
|
+
}, Ci = (t) => {
|
|
1706
|
+
const e = new de(ne(void 0), "providerStreamId"), r = new pe(bi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new pe(vi(r.getAtomStore(), t), "streamSettings");
|
|
1665
1707
|
return r.getAtomStore().listen((s) => {
|
|
1666
1708
|
(s === "" || s === void 0) && o.getStore().mutate(void 0);
|
|
1667
1709
|
}), {
|
|
@@ -1669,8 +1711,8 @@ const Ii = (t) => {
|
|
|
1669
1711
|
slStreamId: r,
|
|
1670
1712
|
streamSettings: o
|
|
1671
1713
|
};
|
|
1672
|
-
},
|
|
1673
|
-
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.DISABLED), "status"), o = new pe(
|
|
1714
|
+
}, Oi = (t) => {
|
|
1715
|
+
const e = new de(ne(void 0), "enabled"), r = new de(ne(Fe.DISABLED), "status"), o = new pe(Ii(e.getStore(), t), "organizationSettings", (c) => c?.data?.id), s = new pe(Fi(o.getAtomStore(), t), "organizationAdvertising"), u = _i(t), l = Ci(t);
|
|
1674
1716
|
return {
|
|
1675
1717
|
enabled: e,
|
|
1676
1718
|
status: r,
|
|
@@ -1685,10 +1727,10 @@ const Ii = (t) => {
|
|
|
1685
1727
|
organizationAdvertising: s
|
|
1686
1728
|
};
|
|
1687
1729
|
};
|
|
1688
|
-
class
|
|
1730
|
+
class xi extends xt {
|
|
1689
1731
|
stores;
|
|
1690
1732
|
constructor(e) {
|
|
1691
|
-
const r =
|
|
1733
|
+
const r = Oi(e), o = pi(r);
|
|
1692
1734
|
super(o, "core"), this.stores = r;
|
|
1693
1735
|
}
|
|
1694
1736
|
getValue() {
|
|
@@ -1709,12 +1751,12 @@ class _i extends xt {
|
|
|
1709
1751
|
};
|
|
1710
1752
|
unsubscribe = () => this.getStore().off();
|
|
1711
1753
|
}
|
|
1712
|
-
class
|
|
1754
|
+
class Bi extends li {
|
|
1713
1755
|
$coreStore;
|
|
1714
1756
|
transport;
|
|
1715
1757
|
bypassLogin;
|
|
1716
1758
|
constructor(e, r) {
|
|
1717
|
-
super(), this.$coreStore = e, this.transport = r, this.bypassLogin =
|
|
1759
|
+
super(), this.$coreStore = e, this.transport = r, this.bypassLogin = Ai(this.transport), this.connect();
|
|
1718
1760
|
}
|
|
1719
1761
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1720
1762
|
/**
|
|
@@ -1756,7 +1798,7 @@ class Ci extends ci {
|
|
|
1756
1798
|
const e = new Ke(), r = e.getToken(), o = e.getExternalToken();
|
|
1757
1799
|
if (this.$coreStore.getValues().userKey.setValue(o), r)
|
|
1758
1800
|
return this.saveUser(r, ""), this.me().then((s) => {
|
|
1759
|
-
if (
|
|
1801
|
+
if (s?.id) {
|
|
1760
1802
|
const u = s.id;
|
|
1761
1803
|
this.saveUser(r, u);
|
|
1762
1804
|
}
|
|
@@ -1788,24 +1830,24 @@ class Ci extends ci {
|
|
|
1788
1830
|
});
|
|
1789
1831
|
};
|
|
1790
1832
|
}
|
|
1791
|
-
const
|
|
1792
|
-
t.auth = new
|
|
1833
|
+
const at = new Ke(), ki = (t, e, r) => {
|
|
1834
|
+
t.auth = new Bi(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1793
1835
|
o === Fe.READY && t.auth.reLogin();
|
|
1794
1836
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (o, s) => {
|
|
1795
|
-
if (!(
|
|
1837
|
+
if (!(at.getSchema() === o && at.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
1796
1838
|
try {
|
|
1797
|
-
await t.auth.login(o, s),
|
|
1839
|
+
await t.auth.login(o, s), at.setSchema(o), at.setExternalToken(s);
|
|
1798
1840
|
} catch {
|
|
1799
1841
|
t.sdk.logout();
|
|
1800
1842
|
}
|
|
1801
1843
|
}, t.sdk.logout = () => {
|
|
1802
|
-
t.auth.logout(),
|
|
1844
|
+
t.auth.logout(), at.clear();
|
|
1803
1845
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1804
|
-
},
|
|
1805
|
-
t.store = new
|
|
1846
|
+
}, Pi = (t, e, r) => {
|
|
1847
|
+
t.store = new xi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([o, s]) => [o, s.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
1806
1848
|
t.store.unsubscribe();
|
|
1807
1849
|
}, r();
|
|
1808
|
-
},
|
|
1850
|
+
}, Ri = (t, e, r) => {
|
|
1809
1851
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
|
|
1810
1852
|
if (t.stores.enabled.get() === "on")
|
|
1811
1853
|
return { enabled: !0 };
|
|
@@ -1821,30 +1863,36 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1821
1863
|
}, t.sdk.createEventSession = (o) => {
|
|
1822
1864
|
t.stores.providerStreamId.setValue(o);
|
|
1823
1865
|
}, r();
|
|
1824
|
-
},
|
|
1825
|
-
level: "trace"
|
|
1826
|
-
|
|
1866
|
+
}, Li = Xn({
|
|
1867
|
+
level: "trace",
|
|
1868
|
+
enabled: !1,
|
|
1869
|
+
browser: {
|
|
1870
|
+
write: (t) => {
|
|
1871
|
+
console.log(t);
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
}), on = (t, e) => Li.child({ name: t }, e), Ni = (t, e, r) => {
|
|
1827
1875
|
const { client: o, queryKey: s } = r.createPromiseClient(Jr, {
|
|
1828
1876
|
method: "summary",
|
|
1829
1877
|
params: [t, e]
|
|
1830
1878
|
});
|
|
1831
1879
|
return r.nanoquery.createFetcherStore(s, {
|
|
1832
|
-
fetcher: async (u, l,
|
|
1833
|
-
eventId:
|
|
1880
|
+
fetcher: async (u, l, c, p) => (await o.summary({
|
|
1881
|
+
eventId: c,
|
|
1834
1882
|
userId: p
|
|
1835
1883
|
})).data?.attributes
|
|
1836
1884
|
});
|
|
1837
|
-
},
|
|
1885
|
+
}, Ui = (t) => {
|
|
1838
1886
|
const { client: e } = t.createPromiseClient(Jr, { method: "list" });
|
|
1839
1887
|
return (r) => e.list(r);
|
|
1840
|
-
},
|
|
1888
|
+
}, $i = (t, e) => {
|
|
1841
1889
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "get", params: [t] });
|
|
1842
1890
|
return e.nanoquery.createFetcherStore(o, {
|
|
1843
1891
|
fetcher: async (s, u, l) => (await r.get({
|
|
1844
1892
|
eventId: l
|
|
1845
1893
|
})).data?.attributes
|
|
1846
1894
|
});
|
|
1847
|
-
},
|
|
1895
|
+
}, Di = (t, e) => {
|
|
1848
1896
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "syncQuestion", params: [t] });
|
|
1849
1897
|
return e.nanoquery.createFetcherStore(o, {
|
|
1850
1898
|
fetcher: async (s, u, l) => l ? (await r.syncQuestion({
|
|
@@ -1853,12 +1901,12 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1853
1901
|
}
|
|
1854
1902
|
})).data?.attributes : void 0
|
|
1855
1903
|
});
|
|
1856
|
-
},
|
|
1904
|
+
}, ji = (t, e) => {
|
|
1857
1905
|
const { client: r } = e.createCallbackClient(ve), o = Ct({ eventId: t.get() || "", feedId: "" });
|
|
1858
1906
|
return t.subscribe((u = "") => {
|
|
1859
1907
|
o.set({ eventId: u, feedId: "" });
|
|
1860
1908
|
}), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
|
|
1861
|
-
},
|
|
1909
|
+
}, Vi = (t, e) => {
|
|
1862
1910
|
const { client: r } = e.createCallbackClient(ve);
|
|
1863
1911
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1864
1912
|
}, sn = async (t, e) => {
|
|
@@ -1866,14 +1914,17 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1866
1914
|
return (await r.questionByUser({
|
|
1867
1915
|
questionId: t
|
|
1868
1916
|
})).data?.attributes?.question;
|
|
1869
|
-
},
|
|
1917
|
+
}, Mi = (t, e) => {
|
|
1870
1918
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "list", params: [t] });
|
|
1871
1919
|
return e.nanoquery.createFetcherStore(o, {
|
|
1872
1920
|
fetcher: async (s, u, l) => l ? (await r.list({
|
|
1873
|
-
eventId: l
|
|
1921
|
+
eventId: l,
|
|
1922
|
+
filter: {
|
|
1923
|
+
statuses: [We.ACTIVE, We.RESOLVED]
|
|
1924
|
+
}
|
|
1874
1925
|
})).data : []
|
|
1875
1926
|
});
|
|
1876
|
-
},
|
|
1927
|
+
}, qi = (t, e) => {
|
|
1877
1928
|
const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "insightHistory", params: [t] });
|
|
1878
1929
|
return e.nanoquery.createFetcherStore(o, {
|
|
1879
1930
|
fetcher: async (s, u, l) => l ? (await r.insightHistory({
|
|
@@ -1882,7 +1933,7 @@ const st = new Ke(), Oi = (t, e, r) => {
|
|
|
1882
1933
|
});
|
|
1883
1934
|
};
|
|
1884
1935
|
var pr = { exports: {} };
|
|
1885
|
-
const
|
|
1936
|
+
const Qi = Object.getPrototypeOf({});
|
|
1886
1937
|
function dr(t) {
|
|
1887
1938
|
function e(I) {
|
|
1888
1939
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
@@ -1896,9 +1947,9 @@ function dr(t) {
|
|
|
1896
1947
|
}
|
|
1897
1948
|
function o(I) {
|
|
1898
1949
|
const _ = {};
|
|
1899
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
1950
|
+
if (p && Object.getPrototypeOf(I) !== Qi)
|
|
1900
1951
|
return p(I);
|
|
1901
|
-
const D =
|
|
1952
|
+
const D = c(I);
|
|
1902
1953
|
let U, T, x;
|
|
1903
1954
|
for (U = 0, T = D.length; U < T; ++U)
|
|
1904
1955
|
e(x = D[U]) && (_[x] = F(I[x]));
|
|
@@ -1921,19 +1972,19 @@ function dr(t) {
|
|
|
1921
1972
|
u.call(I, D[U]) && _.push(D[U]);
|
|
1922
1973
|
return _;
|
|
1923
1974
|
}
|
|
1924
|
-
const
|
|
1925
|
-
function
|
|
1975
|
+
const c = t && t.symbols ? l : Object.keys, p = typeof t?.cloneProtoObject == "function" ? t.cloneProtoObject : void 0;
|
|
1976
|
+
function b(I) {
|
|
1926
1977
|
return typeof I == "object" && I !== null && !(I instanceof RegExp) && !(I instanceof Date);
|
|
1927
1978
|
}
|
|
1928
1979
|
function g(I) {
|
|
1929
1980
|
return typeof I != "object" || I === null;
|
|
1930
1981
|
}
|
|
1931
|
-
const m = typeof O.Buffer < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof O.Buffer : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: P, getKeys:
|
|
1982
|
+
const m = typeof O.Buffer < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof O.Buffer : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: P, getKeys: c, isMergeableObject: b }) : s;
|
|
1932
1983
|
function F(I) {
|
|
1933
|
-
return
|
|
1984
|
+
return b(I) ? Array.isArray(I) ? r(I) : o(I) : I;
|
|
1934
1985
|
}
|
|
1935
|
-
function
|
|
1936
|
-
const D = {}, U =
|
|
1986
|
+
function L(I, _) {
|
|
1987
|
+
const D = {}, U = c(I), T = c(_);
|
|
1937
1988
|
let x, k, G;
|
|
1938
1989
|
for (x = 0, k = U.length; x < k; ++x)
|
|
1939
1990
|
e(G = U[x]) && T.indexOf(G) === -1 && (D[G] = F(I[G]));
|
|
@@ -1944,7 +1995,7 @@ function dr(t) {
|
|
|
1944
1995
|
}
|
|
1945
1996
|
function P(I, _) {
|
|
1946
1997
|
const D = Array.isArray(_), U = Array.isArray(I);
|
|
1947
|
-
return g(_) ? _ : m(I) ? F(_) : D && U ? E(I, _) : D !== U ? F(_) :
|
|
1998
|
+
return g(_) ? _ : m(I) ? F(_) : D && U ? E(I, _) : D !== U ? F(_) : L(I, _);
|
|
1948
1999
|
}
|
|
1949
2000
|
function K() {
|
|
1950
2001
|
switch (arguments.length) {
|
|
@@ -1964,17 +2015,17 @@ function dr(t) {
|
|
|
1964
2015
|
}
|
|
1965
2016
|
pr.exports = dr;
|
|
1966
2017
|
pr.exports.default = dr;
|
|
1967
|
-
var
|
|
1968
|
-
const
|
|
2018
|
+
var Gi = pr.exports.deepmerge = dr;
|
|
2019
|
+
const zi = (t) => (e, r) => {
|
|
1969
2020
|
let o = 0;
|
|
1970
|
-
const s = e.length, u = r.length, l = Math.max(s, u),
|
|
2021
|
+
const s = e.length, u = r.length, l = Math.max(s, u), c = new Array(l);
|
|
1971
2022
|
for (o = 0; o < l; ++o)
|
|
1972
|
-
o < u ?
|
|
1973
|
-
return
|
|
1974
|
-
},
|
|
1975
|
-
const o = Hr([e, r], (l,
|
|
1976
|
-
if (l &&
|
|
1977
|
-
return
|
|
2023
|
+
o < u ? c[o] = t.deepmerge(e[o], r[o]) : c[o] = t.clone(e[o]);
|
|
2024
|
+
return c;
|
|
2025
|
+
}, Ki = Gi({ mergeArray: zi }), Hi = (t, e, r) => {
|
|
2026
|
+
const o = Hr([e, r], (l, c) => {
|
|
2027
|
+
if (l && c.data)
|
|
2028
|
+
return c.data.find((p) => p.id === l);
|
|
1978
2029
|
}), s = $e({
|
|
1979
2030
|
data: void 0,
|
|
1980
2031
|
loading: void 0,
|
|
@@ -1983,20 +2034,20 @@ const qi = (t) => (e, r) => {
|
|
|
1983
2034
|
return o.subscribe(async (l) => {
|
|
1984
2035
|
if (l && l.type === "question") {
|
|
1985
2036
|
s.setKey("loading", !0);
|
|
1986
|
-
const
|
|
1987
|
-
s.set({ data:
|
|
2037
|
+
const c = await sn(l.id, t);
|
|
2038
|
+
s.set({ data: c, loading: !1 });
|
|
1988
2039
|
return;
|
|
1989
2040
|
}
|
|
1990
2041
|
s.set({ data: void 0, loading: !1 });
|
|
1991
2042
|
}), { $store: o, $extendedStore: s, updateExtendedQuestion: (l) => {
|
|
1992
|
-
const
|
|
1993
|
-
if (
|
|
2043
|
+
const c = s.get().data;
|
|
2044
|
+
if (c)
|
|
1994
2045
|
for (const p of l?.answers || [])
|
|
1995
2046
|
p.youVoted !== !0 && delete p.youVoted;
|
|
1996
|
-
s.set({ data:
|
|
2047
|
+
s.set({ data: Ki(c, l) });
|
|
1997
2048
|
} };
|
|
1998
|
-
}, an = (t) => (t.gamification || (t.gamification = new
|
|
1999
|
-
class
|
|
2049
|
+
}, an = (t) => (t.gamification || (t.gamification = new Wi(t)), t.gamification);
|
|
2050
|
+
class Wi {
|
|
2000
2051
|
/** sl event id */
|
|
2001
2052
|
slStreamId;
|
|
2002
2053
|
/** organization id */
|
|
@@ -2023,13 +2074,13 @@ class zi {
|
|
|
2023
2074
|
constructor(e) {
|
|
2024
2075
|
if (e.gamification)
|
|
2025
2076
|
throw new Error("GamificationBackground Singleton error");
|
|
2026
|
-
this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe(
|
|
2027
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2077
|
+
this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe($i(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Mi(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Di(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Hi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2078
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Vi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
|
|
2028
2079
|
window.requestAnimationFrame(() => {
|
|
2029
2080
|
this.openedQuestion.updateExtendedQuestion(o.data?.attributes?.question);
|
|
2030
2081
|
});
|
|
2031
2082
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2032
|
-
}), this.feedSubscription =
|
|
2083
|
+
}), this.feedSubscription = ji(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2033
2084
|
window.requestAnimationFrame(() => {
|
|
2034
2085
|
const o = this.activeQuestionId.getStore();
|
|
2035
2086
|
o && o.mutate(r.data?.attributes);
|
|
@@ -2064,7 +2115,7 @@ class zi {
|
|
|
2064
2115
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2065
2116
|
};
|
|
2066
2117
|
}
|
|
2067
|
-
class
|
|
2118
|
+
class Ji {
|
|
2068
2119
|
notificationsList;
|
|
2069
2120
|
notifications;
|
|
2070
2121
|
store;
|
|
@@ -2082,7 +2133,7 @@ class Ki {
|
|
|
2082
2133
|
return;
|
|
2083
2134
|
}
|
|
2084
2135
|
const r = e.close, o = e.action;
|
|
2085
|
-
this.store.set(e.id, {
|
|
2136
|
+
if (this.store.set(e.id, {
|
|
2086
2137
|
...e,
|
|
2087
2138
|
close: (...s) => {
|
|
2088
2139
|
r && r(...s), this.closeNotification(e.id);
|
|
@@ -2090,7 +2141,11 @@ class Ki {
|
|
|
2090
2141
|
action: (...s) => {
|
|
2091
2142
|
o && o(...s), this.closeNotification(e.id);
|
|
2092
2143
|
}
|
|
2093
|
-
}), this.waitingQueue.add(e.id), this.
|
|
2144
|
+
}), this.waitingQueue.add(e.id), this.activeQueue.size === this.options.concurrency) {
|
|
2145
|
+
const [s] = this.activeQueue;
|
|
2146
|
+
this.closeNotification(s);
|
|
2147
|
+
} else
|
|
2148
|
+
this.tickWaitingQueue();
|
|
2094
2149
|
};
|
|
2095
2150
|
tickWaitingQueue = () => {
|
|
2096
2151
|
if (this.activeQueue.size < this.options.concurrency) {
|
|
@@ -2122,7 +2177,7 @@ class Ki {
|
|
|
2122
2177
|
closeNotification = (e) => {
|
|
2123
2178
|
const r = new Map(this.notifications.getValue()), o = r.get(e);
|
|
2124
2179
|
if (o) {
|
|
2125
|
-
o.hiding = !
|
|
2180
|
+
o.hiding = !(this.waitingQueue.size >= this.options.concurrency), this.notifications.setValue(r);
|
|
2126
2181
|
const s = setTimeout(() => {
|
|
2127
2182
|
const u = new Map(this.notifications.getValue());
|
|
2128
2183
|
u.delete(e), this.notifications.setValue(u);
|
|
@@ -2138,7 +2193,7 @@ var St;
|
|
|
2138
2193
|
(function(t) {
|
|
2139
2194
|
t.OPENED = "opened";
|
|
2140
2195
|
})(St || (St = {}));
|
|
2141
|
-
class
|
|
2196
|
+
class Yi extends hr {
|
|
2142
2197
|
constructor() {
|
|
2143
2198
|
super("notification");
|
|
2144
2199
|
}
|
|
@@ -2150,15 +2205,15 @@ class Hi extends hr {
|
|
|
2150
2205
|
this.clear();
|
|
2151
2206
|
};
|
|
2152
2207
|
}
|
|
2153
|
-
var
|
|
2208
|
+
var Le;
|
|
2154
2209
|
(function(t) {
|
|
2155
2210
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2156
|
-
})(
|
|
2157
|
-
class
|
|
2211
|
+
})(Le || (Le = {}));
|
|
2212
|
+
class Xi {
|
|
2158
2213
|
queue;
|
|
2159
2214
|
storage;
|
|
2160
2215
|
constructor(e = {}) {
|
|
2161
|
-
this.storage = new
|
|
2216
|
+
this.storage = new Yi(), this.queue = new Ji({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2162
2217
|
}
|
|
2163
2218
|
add = (e) => {
|
|
2164
2219
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2171,15 +2226,15 @@ class Wi {
|
|
|
2171
2226
|
this.storage.setOpened(e);
|
|
2172
2227
|
};
|
|
2173
2228
|
}
|
|
2174
|
-
const
|
|
2175
|
-
t.notifications = new
|
|
2176
|
-
},
|
|
2229
|
+
const Zi = (t, e, r) => {
|
|
2230
|
+
t.notifications = new Xi(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2231
|
+
}, eo = (t, e) => {
|
|
2177
2232
|
const { client: r } = t.createPromiseClient(ve, { method: "submitAnswer" });
|
|
2178
2233
|
return r.submitAnswer({ data: e });
|
|
2179
|
-
},
|
|
2234
|
+
}, to = (t, e) => {
|
|
2180
2235
|
const { client: r } = t.createPromiseClient(ve, { method: "submitInplay" });
|
|
2181
2236
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2182
|
-
},
|
|
2237
|
+
}, ro = (t, e) => {
|
|
2183
2238
|
const { client: r } = t.createPromiseClient(ve, { method: "skipQuestion" });
|
|
2184
2239
|
return r.skipQuestion({ data: { id: e } });
|
|
2185
2240
|
};
|
|
@@ -2198,56 +2253,56 @@ class un extends hr {
|
|
|
2198
2253
|
}
|
|
2199
2254
|
const Fr = {
|
|
2200
2255
|
pageSize: 10
|
|
2201
|
-
},
|
|
2202
|
-
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u =
|
|
2203
|
-
if (
|
|
2256
|
+
}, no = (t, e, r) => {
|
|
2257
|
+
const o = ne({ pageSize: r?.pageSize || Fr.pageSize, page: 0 }), s = $e({ data: [], loading: void 0, error: void 0 }), u = Ui(t), l = async (b) => {
|
|
2258
|
+
if (b) {
|
|
2204
2259
|
s.setKey("loading", !0);
|
|
2205
2260
|
const g = {
|
|
2206
|
-
eventId:
|
|
2261
|
+
eventId: b,
|
|
2207
2262
|
pagination: { page: 0, pageSize: r?.pageSize || Fr.pageSize }
|
|
2208
2263
|
}, m = await u(g);
|
|
2209
2264
|
s.set({ data: m.data.map((E) => E.attributes), loading: !1 }), o.set(g.pagination);
|
|
2210
2265
|
}
|
|
2211
2266
|
};
|
|
2212
2267
|
e.listen(l);
|
|
2213
|
-
const
|
|
2268
|
+
const c = () => {
|
|
2214
2269
|
l(e.get());
|
|
2215
2270
|
};
|
|
2216
|
-
return o.listen(async (
|
|
2271
|
+
return o.listen(async (b) => {
|
|
2217
2272
|
const g = e.get(), m = s.get().data?.length || 0;
|
|
2218
|
-
if (
|
|
2273
|
+
if (b.page > 0 && g && m >= b.page * b.pageSize) {
|
|
2219
2274
|
s.setKey("loading", !0);
|
|
2220
2275
|
const F = await u({
|
|
2221
2276
|
eventId: g,
|
|
2222
|
-
pagination:
|
|
2223
|
-
}),
|
|
2277
|
+
pagination: b
|
|
2278
|
+
}), L = s.get().data || [];
|
|
2224
2279
|
s.set({
|
|
2225
|
-
data: [...
|
|
2280
|
+
data: [...L, ...F.data.map((P) => P.attributes)],
|
|
2226
2281
|
loading: !1
|
|
2227
2282
|
});
|
|
2228
2283
|
}
|
|
2229
2284
|
}), { $store: s, fetchMore: () => {
|
|
2230
|
-
const
|
|
2231
|
-
o.set({ ...
|
|
2232
|
-
}, invalidate:
|
|
2233
|
-
},
|
|
2234
|
-
const { client: r, queryKey: o } = t.createPromiseClient(
|
|
2285
|
+
const b = o.get();
|
|
2286
|
+
o.set({ ...b, page: b.page + 1 });
|
|
2287
|
+
}, invalidate: c };
|
|
2288
|
+
}, io = (t, e) => {
|
|
2289
|
+
const { client: r, queryKey: o } = t.createPromiseClient(lt, {
|
|
2235
2290
|
method: "generateDeepLink",
|
|
2236
2291
|
params: e
|
|
2237
2292
|
});
|
|
2238
2293
|
return t.nanoquery.createFetcherStore(o, {
|
|
2239
2294
|
fetcher: async (s, u, l) => l ? (await r.generateDeepLink({ data: { eventId: l } })).data?.attributes : {}
|
|
2240
2295
|
});
|
|
2241
|
-
},
|
|
2296
|
+
}, oo = (t, e) => ({ $store: io(t, [e]), fetch });
|
|
2242
2297
|
var re;
|
|
2243
2298
|
(function(t) {
|
|
2244
2299
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2245
2300
|
})(re || (re = {}));
|
|
2246
|
-
const
|
|
2301
|
+
const so = (t, e, r, o) => {
|
|
2247
2302
|
const s = new un(), u = ne(re.Unset), l = () => {
|
|
2248
|
-
const { inplayGame:
|
|
2249
|
-
|
|
2250
|
-
type:
|
|
2303
|
+
const { inplayGame: b } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2304
|
+
b && o.add({
|
|
2305
|
+
type: Le.ONBOARDING,
|
|
2251
2306
|
id: g,
|
|
2252
2307
|
action: t.openFeature,
|
|
2253
2308
|
close: () => {
|
|
@@ -2258,21 +2313,21 @@ const no = (t, e, r, o) => {
|
|
|
2258
2313
|
questionType: Te.UNSET,
|
|
2259
2314
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2260
2315
|
// @ts-ignore
|
|
2261
|
-
onboarding: { ...
|
|
2316
|
+
onboarding: { ...b }
|
|
2262
2317
|
}
|
|
2263
2318
|
});
|
|
2264
2319
|
};
|
|
2265
|
-
u.subscribe((
|
|
2266
|
-
(
|
|
2320
|
+
u.subscribe((b) => {
|
|
2321
|
+
(b === re.Optional || re.Required) && l(), b === re.Completed && e.activeQuestionId.invalidate();
|
|
2267
2322
|
});
|
|
2268
|
-
const
|
|
2269
|
-
const
|
|
2270
|
-
if (!
|
|
2323
|
+
const c = async () => {
|
|
2324
|
+
const b = e.userId.get();
|
|
2325
|
+
if (!b) {
|
|
2271
2326
|
u.set(re.Unset);
|
|
2272
2327
|
return;
|
|
2273
2328
|
}
|
|
2274
2329
|
s.getOnboardingStatus({
|
|
2275
|
-
userId:
|
|
2330
|
+
userId: b,
|
|
2276
2331
|
organizationId: e.organizationId.get() || "",
|
|
2277
2332
|
eventId: e.slStreamId.get() || ""
|
|
2278
2333
|
}) === re.Completed && u.set(re.Completed);
|
|
@@ -2282,20 +2337,20 @@ const no = (t, e, r, o) => {
|
|
|
2282
2337
|
const E = !!(m?.options?.onboardingEnabled && t.featureSettings.get().inplayGame?.onboarding?.completed), F = !!t.featureSettings.get().inplayGame?.titleCard?.optIn;
|
|
2283
2338
|
E ? F ? u.set(re.Required) : u.set(re.Optional) : F ? u.set(re.Unavailable) : u.set(re.Disabled);
|
|
2284
2339
|
};
|
|
2285
|
-
return
|
|
2286
|
-
|
|
2287
|
-
}), e.moderation.subscribe((
|
|
2288
|
-
|
|
2340
|
+
return c(), e.userId.subscribe((b) => {
|
|
2341
|
+
b && c();
|
|
2342
|
+
}), e.moderation.subscribe((b) => {
|
|
2343
|
+
b.data && c();
|
|
2289
2344
|
}), { $store: u, submitInplay: async () => {
|
|
2290
|
-
const
|
|
2291
|
-
|
|
2345
|
+
const b = e.slStreamId.get();
|
|
2346
|
+
b && (await to(r, b), u.set(re.Completed), s.saveOnboardingStatus({
|
|
2292
2347
|
organizationId: e.organizationId.get() || "",
|
|
2293
2348
|
userId: e.userId.get() || "",
|
|
2294
|
-
eventId:
|
|
2349
|
+
eventId: b
|
|
2295
2350
|
}, re.Completed));
|
|
2296
2351
|
} };
|
|
2297
|
-
},
|
|
2298
|
-
class
|
|
2352
|
+
}, ao = /* @__PURE__ */ new Set([Te.POLL, Te.PREDICTION, Te.TRIVIA]);
|
|
2353
|
+
class uo extends lr {
|
|
2299
2354
|
/** user statistics (leaderboard panel) */
|
|
2300
2355
|
userSummary;
|
|
2301
2356
|
/** feed list (pick history) */
|
|
@@ -2322,16 +2377,16 @@ class oo extends lr {
|
|
|
2322
2377
|
/** Browser cache */
|
|
2323
2378
|
storage;
|
|
2324
2379
|
constructor(e, r, o) {
|
|
2325
|
-
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(
|
|
2380
|
+
super(e, r), this.background = an(o), this.storage = new un(), this.userSummary = new pe(Ni(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.currentUserId = this.background.userId, this.openedUser = ne(void 0), this.leaderboardId = new de(ne(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = so(this, this.background, o.transport, o.notifications), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ue.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = oo(this.transport, this.background.slStreamId), this.leaderboardList = no(this.transport, this.background.slStreamId), this.status.subscribe((s) => {
|
|
2326
2381
|
s === De.Ready ? this.connect(o.transport) : this.disconnect();
|
|
2327
2382
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2328
|
-
if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status ===
|
|
2329
|
-
if (
|
|
2383
|
+
if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status === We.ACTIVE) {
|
|
2384
|
+
if (ao.has(s.data.question.type))
|
|
2330
2385
|
this.notifications.add({
|
|
2331
|
-
type:
|
|
2386
|
+
type: Le.QUESTION,
|
|
2332
2387
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2333
2388
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2334
|
-
autoHideDuration: 1e3 *
|
|
2389
|
+
autoHideDuration: 1e3 * 60,
|
|
2335
2390
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2336
2391
|
data: {
|
|
2337
2392
|
questionType: s.data.question.type,
|
|
@@ -2356,10 +2411,10 @@ class oo extends lr {
|
|
|
2356
2411
|
}
|
|
2357
2412
|
};
|
|
2358
2413
|
this.notifications.add({
|
|
2359
|
-
type:
|
|
2414
|
+
type: Le.QUESTION,
|
|
2360
2415
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2361
2416
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2362
|
-
autoHideDuration: 1e3 *
|
|
2417
|
+
autoHideDuration: 1e3 * 120,
|
|
2363
2418
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2364
2419
|
data: {
|
|
2365
2420
|
questionType: s.data.question.type,
|
|
@@ -2381,10 +2436,10 @@ class oo extends lr {
|
|
|
2381
2436
|
}
|
|
2382
2437
|
};
|
|
2383
2438
|
this.notifications.add({
|
|
2384
|
-
type:
|
|
2439
|
+
type: Le.QUESTION,
|
|
2385
2440
|
action: () => s.data?.question && this.openQuestion(s.data.question.id),
|
|
2386
2441
|
close: () => s.data?.question && this.closeQuestion(s.data.question.id),
|
|
2387
|
-
autoHideDuration: 1e3 *
|
|
2442
|
+
autoHideDuration: 1e3 * 120,
|
|
2388
2443
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: s.data.question.id }),
|
|
2389
2444
|
data: {
|
|
2390
2445
|
questionType: s.data.question.type,
|
|
@@ -2402,29 +2457,29 @@ class oo extends lr {
|
|
|
2402
2457
|
if (!o)
|
|
2403
2458
|
return;
|
|
2404
2459
|
const { status: s, type: u, id: l } = o;
|
|
2405
|
-
if (s ===
|
|
2406
|
-
const
|
|
2460
|
+
if (s === We.RESOLVED && u === Te.PREDICTION) {
|
|
2461
|
+
const c = this.background.getCurrentSessionId({
|
|
2407
2462
|
prefix: `notification-id:${l}`
|
|
2408
|
-
}), p = await sn(l, e),
|
|
2463
|
+
}), p = await sn(l, e), b = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
|
|
2409
2464
|
if (!g)
|
|
2410
2465
|
return;
|
|
2411
2466
|
this.notifications.add({
|
|
2412
|
-
type:
|
|
2467
|
+
type: Le.QUESTION_RESOLVED,
|
|
2413
2468
|
action: () => this.openQuestion(l),
|
|
2414
2469
|
close: () => this.closeQuestion(l),
|
|
2415
2470
|
autoHideDuration: 35e3,
|
|
2416
|
-
id:
|
|
2471
|
+
id: c,
|
|
2417
2472
|
data: {
|
|
2418
2473
|
questionType: Te.PREDICTION,
|
|
2419
2474
|
question: {
|
|
2420
|
-
title:
|
|
2475
|
+
title: b?.youVoted ? `Congratulations! You answered correctly! You won ${b.points} pts!` : `Better luck next time! Correct: ${b?.text}!`,
|
|
2421
2476
|
votedAnswer: {
|
|
2422
2477
|
title: g?.text,
|
|
2423
2478
|
points: g?.points
|
|
2424
2479
|
},
|
|
2425
|
-
correctAnswerTitle:
|
|
2426
|
-
correct:
|
|
2427
|
-
predictionResult: s ===
|
|
2480
|
+
correctAnswerTitle: b?.text,
|
|
2481
|
+
correct: b?.youVoted,
|
|
2482
|
+
predictionResult: s === We.RESOLVED
|
|
2428
2483
|
}
|
|
2429
2484
|
}
|
|
2430
2485
|
});
|
|
@@ -2440,10 +2495,10 @@ class oo extends lr {
|
|
|
2440
2495
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2441
2496
|
};
|
|
2442
2497
|
submitAnswer = async (e, r) => {
|
|
2443
|
-
await
|
|
2498
|
+
await eo(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2444
2499
|
};
|
|
2445
2500
|
skipQuestion = async (e) => {
|
|
2446
|
-
await
|
|
2501
|
+
await ro(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2447
2502
|
};
|
|
2448
2503
|
openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
|
|
2449
2504
|
closeQuestion = (e) => this.background.closeQuestion(e);
|
|
@@ -2455,7 +2510,7 @@ class oo extends lr {
|
|
|
2455
2510
|
this.openedUser.set(void 0);
|
|
2456
2511
|
};
|
|
2457
2512
|
}
|
|
2458
|
-
class
|
|
2513
|
+
class co extends lr {
|
|
2459
2514
|
insights;
|
|
2460
2515
|
closeFeature;
|
|
2461
2516
|
openFeature;
|
|
@@ -2467,8 +2522,8 @@ class so extends lr {
|
|
|
2467
2522
|
super(e, r), this.background = an(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ue.HIGHLIGHTS), this.status.subscribe((s) => {
|
|
2468
2523
|
s === De.Ready ? this.connect() : this.disconnect();
|
|
2469
2524
|
}), this.background.activeQuestionId.listen((s) => {
|
|
2470
|
-
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status ===
|
|
2471
|
-
type:
|
|
2525
|
+
s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status === We.ACTIVE && this.notifications.add({
|
|
2526
|
+
type: Le.QUESTION,
|
|
2472
2527
|
action: () => s.data?.question && this.openHighlight(s.data.question.id),
|
|
2473
2528
|
close: () => s.data?.question && this.closeHighlight(s.data.question.id),
|
|
2474
2529
|
autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
|
|
@@ -2483,7 +2538,7 @@ class so extends lr {
|
|
|
2483
2538
|
}), this.openedInsight = this.background.openedQuestion;
|
|
2484
2539
|
}
|
|
2485
2540
|
connect = () => {
|
|
2486
|
-
this.insights ? this.insights.invalidate() : this.insights = new pe(
|
|
2541
|
+
this.insights ? this.insights.invalidate() : this.insights = new pe(qi(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
|
|
2487
2542
|
window.requestAnimationFrame(() => {
|
|
2488
2543
|
this.insights?.invalidate();
|
|
2489
2544
|
});
|
|
@@ -2496,18 +2551,18 @@ class so extends lr {
|
|
|
2496
2551
|
closeHighlight = (e) => this.background.closeQuestion(e);
|
|
2497
2552
|
}
|
|
2498
2553
|
ue.GAMES + "", ue.HIGHLIGHTS + "";
|
|
2499
|
-
class
|
|
2554
|
+
class fo extends lr {
|
|
2500
2555
|
constructor(e, r) {
|
|
2501
2556
|
super(e, r);
|
|
2502
2557
|
}
|
|
2503
2558
|
}
|
|
2504
|
-
const
|
|
2559
|
+
const lo = (t, e, r) => t.type === ue.GAMES ? new uo(t, e, r) : t.type === ue.HIGHLIGHTS ? new co(t, e, r) : new fo(t, e), ho = (t, e, r) => {
|
|
2505
2560
|
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new de(ne(ue.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) => {
|
|
2506
2561
|
t.activeFeature.setValue(o);
|
|
2507
2562
|
}, t.sdk.closeFeature = () => {
|
|
2508
2563
|
t.activeFeature.setValue(ue.UNSET);
|
|
2509
2564
|
}, t.initFeature = (o, s = Ie.ORGANIZATION) => {
|
|
2510
|
-
const u =
|
|
2565
|
+
const u = lo(o, s, t);
|
|
2511
2566
|
t.features.set(o.type, u);
|
|
2512
2567
|
}, t.updateFeature = (o, s) => {
|
|
2513
2568
|
t.features.get(o.type)?.update(o, s);
|
|
@@ -2524,8 +2579,8 @@ const uo = (t, e, r) => t.type === ue.GAMES ? new oo(t, e, r) : t.type === ue.HI
|
|
|
2524
2579
|
const o = (u, l) => {
|
|
2525
2580
|
if (l?.overlays) {
|
|
2526
2581
|
u === Ie.STREAM && t.features.clear();
|
|
2527
|
-
for (const
|
|
2528
|
-
|
|
2582
|
+
for (const c of l.overlays)
|
|
2583
|
+
c.sdkEnable === !0 && (t.features.has(c.type) ? t.updateFeature(c, u) : t.initFeature(c, u));
|
|
2529
2584
|
}
|
|
2530
2585
|
}, s = {
|
|
2531
2586
|
/**
|
|
@@ -2558,7 +2613,7 @@ const uo = (t, e, r) => t.type === ue.GAMES ? new oo(t, e, r) : t.type === ue.HI
|
|
|
2558
2613
|
}, r();
|
|
2559
2614
|
};
|
|
2560
2615
|
var yr = { exports: {} }, gr = { exports: {} };
|
|
2561
|
-
function
|
|
2616
|
+
function po(t) {
|
|
2562
2617
|
var e = new t(), r = e;
|
|
2563
2618
|
function o() {
|
|
2564
2619
|
var u = e;
|
|
@@ -2572,20 +2627,20 @@ function fo(t) {
|
|
|
2572
2627
|
release: s
|
|
2573
2628
|
};
|
|
2574
2629
|
}
|
|
2575
|
-
var
|
|
2630
|
+
var yo = po, go = yo;
|
|
2576
2631
|
function cn(t, e, r) {
|
|
2577
2632
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2578
2633
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2579
|
-
var o =
|
|
2634
|
+
var o = go(mo), s = null, u = null, l = 0, c = null, p = {
|
|
2580
2635
|
push: P,
|
|
2581
2636
|
drain: ae,
|
|
2582
2637
|
saturated: ae,
|
|
2583
2638
|
pause: g,
|
|
2584
2639
|
paused: !1,
|
|
2585
2640
|
concurrency: r,
|
|
2586
|
-
running:
|
|
2641
|
+
running: b,
|
|
2587
2642
|
resume: F,
|
|
2588
|
-
idle:
|
|
2643
|
+
idle: L,
|
|
2589
2644
|
length: m,
|
|
2590
2645
|
getQueue: E,
|
|
2591
2646
|
unshift: K,
|
|
@@ -2595,7 +2650,7 @@ function cn(t, e, r) {
|
|
|
2595
2650
|
error: U
|
|
2596
2651
|
};
|
|
2597
2652
|
return p;
|
|
2598
|
-
function
|
|
2653
|
+
function b() {
|
|
2599
2654
|
return l;
|
|
2600
2655
|
}
|
|
2601
2656
|
function g() {
|
|
@@ -2618,12 +2673,12 @@ function cn(t, e, r) {
|
|
|
2618
2673
|
l++, I();
|
|
2619
2674
|
}
|
|
2620
2675
|
}
|
|
2621
|
-
function
|
|
2676
|
+
function L() {
|
|
2622
2677
|
return l === 0 && p.length() === 0;
|
|
2623
2678
|
}
|
|
2624
2679
|
function P(T, x) {
|
|
2625
2680
|
var k = o.get();
|
|
2626
|
-
k.context = t, k.release = I, k.value = T, k.callback = x || ae, k.errorHandler =
|
|
2681
|
+
k.context = t, k.release = I, k.value = T, k.callback = x || ae, k.errorHandler = c, l === p.concurrency || p.paused ? u ? (u.next = k, u = k) : (s = k, u = k, p.saturated()) : (l++, e.call(t, k.value, k.worked));
|
|
2627
2682
|
}
|
|
2628
2683
|
function K(T, x) {
|
|
2629
2684
|
var k = o.get();
|
|
@@ -2641,12 +2696,12 @@ function cn(t, e, r) {
|
|
|
2641
2696
|
s = null, u = null, p.drain(), p.drain = ae;
|
|
2642
2697
|
}
|
|
2643
2698
|
function U(T) {
|
|
2644
|
-
|
|
2699
|
+
c = T;
|
|
2645
2700
|
}
|
|
2646
2701
|
}
|
|
2647
2702
|
function ae() {
|
|
2648
2703
|
}
|
|
2649
|
-
function
|
|
2704
|
+
function mo() {
|
|
2650
2705
|
this.value = null, this.callback = ae, this.next = null, this.release = ae, this.context = null, this.errorHandler = null;
|
|
2651
2706
|
var t = this;
|
|
2652
2707
|
this.worked = function(r, o) {
|
|
@@ -2654,7 +2709,7 @@ function po() {
|
|
|
2654
2709
|
t.value = null, t.callback = ae, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
|
|
2655
2710
|
};
|
|
2656
2711
|
}
|
|
2657
|
-
function
|
|
2712
|
+
function wo(t, e, r) {
|
|
2658
2713
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2659
2714
|
function o(g, m) {
|
|
2660
2715
|
e.call(this, g).then(function(E) {
|
|
@@ -2662,12 +2717,12 @@ function yo(t, e, r) {
|
|
|
2662
2717
|
}, m);
|
|
2663
2718
|
}
|
|
2664
2719
|
var s = cn(t, o, r), u = s.push, l = s.unshift;
|
|
2665
|
-
return s.push =
|
|
2666
|
-
function
|
|
2720
|
+
return s.push = c, s.unshift = p, s.drained = b, s;
|
|
2721
|
+
function c(g) {
|
|
2667
2722
|
var m = new Promise(function(E, F) {
|
|
2668
|
-
u(g, function(
|
|
2669
|
-
if (
|
|
2670
|
-
F(
|
|
2723
|
+
u(g, function(L, P) {
|
|
2724
|
+
if (L) {
|
|
2725
|
+
F(L);
|
|
2671
2726
|
return;
|
|
2672
2727
|
}
|
|
2673
2728
|
E(P);
|
|
@@ -2677,9 +2732,9 @@ function yo(t, e, r) {
|
|
|
2677
2732
|
}
|
|
2678
2733
|
function p(g) {
|
|
2679
2734
|
var m = new Promise(function(E, F) {
|
|
2680
|
-
l(g, function(
|
|
2681
|
-
if (
|
|
2682
|
-
F(
|
|
2735
|
+
l(g, function(L, P) {
|
|
2736
|
+
if (L) {
|
|
2737
|
+
F(L);
|
|
2683
2738
|
return;
|
|
2684
2739
|
}
|
|
2685
2740
|
E(P);
|
|
@@ -2687,7 +2742,7 @@ function yo(t, e, r) {
|
|
|
2687
2742
|
});
|
|
2688
2743
|
return m.catch(ae), m;
|
|
2689
2744
|
}
|
|
2690
|
-
function
|
|
2745
|
+
function b() {
|
|
2691
2746
|
if (s.idle())
|
|
2692
2747
|
return new Promise(function(E) {
|
|
2693
2748
|
E();
|
|
@@ -2701,16 +2756,16 @@ function yo(t, e, r) {
|
|
|
2701
2756
|
}
|
|
2702
2757
|
}
|
|
2703
2758
|
gr.exports = cn;
|
|
2704
|
-
gr.exports.promise =
|
|
2705
|
-
var fn = gr.exports, mr = { exports: {} },
|
|
2759
|
+
gr.exports.promise = wo;
|
|
2760
|
+
var fn = gr.exports, mr = { exports: {} }, Ye = typeof Reflect == "object" ? Reflect : null, Tr = Ye && typeof Ye.apply == "function" ? Ye.apply : function(e, r, o) {
|
|
2706
2761
|
return Function.prototype.apply.call(e, r, o);
|
|
2707
2762
|
}, gt;
|
|
2708
|
-
|
|
2763
|
+
Ye && typeof Ye.ownKeys == "function" ? gt = Ye.ownKeys : Object.getOwnPropertySymbols ? gt = function(e) {
|
|
2709
2764
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2710
2765
|
} : gt = function(e) {
|
|
2711
2766
|
return Object.getOwnPropertyNames(e);
|
|
2712
2767
|
};
|
|
2713
|
-
function
|
|
2768
|
+
function bo(t) {
|
|
2714
2769
|
console && console.warn && console.warn(t);
|
|
2715
2770
|
}
|
|
2716
2771
|
var ln = Number.isNaN || function(e) {
|
|
@@ -2720,7 +2775,7 @@ function q() {
|
|
|
2720
2775
|
q.init.call(this);
|
|
2721
2776
|
}
|
|
2722
2777
|
mr.exports = q;
|
|
2723
|
-
mr.exports.once =
|
|
2778
|
+
mr.exports.once = Eo;
|
|
2724
2779
|
q.EventEmitter = q;
|
|
2725
2780
|
q.prototype._events = void 0;
|
|
2726
2781
|
q.prototype._eventsCount = 0;
|
|
@@ -2767,8 +2822,8 @@ q.prototype.emit = function(e) {
|
|
|
2767
2822
|
var l;
|
|
2768
2823
|
if (r.length > 0 && (l = r[0]), l instanceof Error)
|
|
2769
2824
|
throw l;
|
|
2770
|
-
var
|
|
2771
|
-
throw
|
|
2825
|
+
var c = new Error("Unhandled error." + (l ? " (" + l.message + ")" : ""));
|
|
2826
|
+
throw c.context = l, c;
|
|
2772
2827
|
}
|
|
2773
2828
|
var p = u[e];
|
|
2774
2829
|
if (p === void 0)
|
|
@@ -2776,7 +2831,7 @@ q.prototype.emit = function(e) {
|
|
|
2776
2831
|
if (typeof p == "function")
|
|
2777
2832
|
Tr(p, this, r);
|
|
2778
2833
|
else
|
|
2779
|
-
for (var
|
|
2834
|
+
for (var b = p.length, g = mn(p, b), o = 0; o < b; ++o)
|
|
2780
2835
|
Tr(g[o], this, r);
|
|
2781
2836
|
return !0;
|
|
2782
2837
|
};
|
|
@@ -2790,8 +2845,8 @@ function pn(t, e, r, o) {
|
|
|
2790
2845
|
l = u[e] = r, ++t._eventsCount;
|
|
2791
2846
|
else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = hn(t), s > 0 && l.length > s && !l.warned) {
|
|
2792
2847
|
l.warned = !0;
|
|
2793
|
-
var
|
|
2794
|
-
|
|
2848
|
+
var c = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2849
|
+
c.name = "MaxListenersExceededWarning", c.emitter = t, c.type = e, c.count = l.length, bo(c);
|
|
2795
2850
|
}
|
|
2796
2851
|
return t;
|
|
2797
2852
|
}
|
|
@@ -2802,12 +2857,12 @@ q.prototype.on = q.prototype.addListener;
|
|
|
2802
2857
|
q.prototype.prependListener = function(e, r) {
|
|
2803
2858
|
return pn(this, e, r, !0);
|
|
2804
2859
|
};
|
|
2805
|
-
function
|
|
2860
|
+
function vo() {
|
|
2806
2861
|
if (!this.fired)
|
|
2807
2862
|
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);
|
|
2808
2863
|
}
|
|
2809
2864
|
function dn(t, e, r) {
|
|
2810
|
-
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
2865
|
+
var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = vo.bind(o);
|
|
2811
2866
|
return s.listener = r, o.wrapFn = s, s;
|
|
2812
2867
|
}
|
|
2813
2868
|
q.prototype.once = function(e, r) {
|
|
@@ -2817,7 +2872,7 @@ q.prototype.prependOnceListener = function(e, r) {
|
|
|
2817
2872
|
return Bt(r), this.prependListener(e, dn(this, e, r)), this;
|
|
2818
2873
|
};
|
|
2819
2874
|
q.prototype.removeListener = function(e, r) {
|
|
2820
|
-
var o, s, u, l,
|
|
2875
|
+
var o, s, u, l, c;
|
|
2821
2876
|
if (Bt(r), s = this._events, s === void 0)
|
|
2822
2877
|
return this;
|
|
2823
2878
|
if (o = s[e], o === void 0)
|
|
@@ -2827,12 +2882,12 @@ q.prototype.removeListener = function(e, r) {
|
|
|
2827
2882
|
else if (typeof o != "function") {
|
|
2828
2883
|
for (u = -1, l = o.length - 1; l >= 0; l--)
|
|
2829
2884
|
if (o[l] === r || o[l].listener === r) {
|
|
2830
|
-
|
|
2885
|
+
c = o[l].listener, u = l;
|
|
2831
2886
|
break;
|
|
2832
2887
|
}
|
|
2833
2888
|
if (u < 0)
|
|
2834
2889
|
return this;
|
|
2835
|
-
u === 0 ? o.shift() :
|
|
2890
|
+
u === 0 ? o.shift() : So(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, c || r);
|
|
2836
2891
|
}
|
|
2837
2892
|
return this;
|
|
2838
2893
|
};
|
|
@@ -2861,7 +2916,7 @@ function yn(t, e, r) {
|
|
|
2861
2916
|
if (o === void 0)
|
|
2862
2917
|
return [];
|
|
2863
2918
|
var s = o[e];
|
|
2864
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
2919
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? Ao(s) : mn(s, s.length);
|
|
2865
2920
|
}
|
|
2866
2921
|
q.prototype.listeners = function(e) {
|
|
2867
2922
|
return yn(this, e, !0);
|
|
@@ -2892,17 +2947,17 @@ function mn(t, e) {
|
|
|
2892
2947
|
r[o] = t[o];
|
|
2893
2948
|
return r;
|
|
2894
2949
|
}
|
|
2895
|
-
function
|
|
2950
|
+
function So(t, e) {
|
|
2896
2951
|
for (; e + 1 < t.length; e++)
|
|
2897
2952
|
t[e] = t[e + 1];
|
|
2898
2953
|
t.pop();
|
|
2899
2954
|
}
|
|
2900
|
-
function
|
|
2955
|
+
function Ao(t) {
|
|
2901
2956
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2902
2957
|
e[r] = t[r].listener || t[r];
|
|
2903
2958
|
return e;
|
|
2904
2959
|
}
|
|
2905
|
-
function
|
|
2960
|
+
function Eo(t, e) {
|
|
2906
2961
|
return new Promise(function(r, o) {
|
|
2907
2962
|
function s(l) {
|
|
2908
2963
|
t.removeListener(e, u), o(l);
|
|
@@ -2910,13 +2965,13 @@ function vo(t, e) {
|
|
|
2910
2965
|
function u() {
|
|
2911
2966
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
2912
2967
|
}
|
|
2913
|
-
|
|
2968
|
+
wn(t, e, u, { once: !0 }), e !== "error" && Io(t, s, { once: !0 });
|
|
2914
2969
|
});
|
|
2915
2970
|
}
|
|
2916
|
-
function
|
|
2917
|
-
typeof t.on == "function" &&
|
|
2971
|
+
function Io(t, e, r) {
|
|
2972
|
+
typeof t.on == "function" && wn(t, "error", e, r);
|
|
2918
2973
|
}
|
|
2919
|
-
function
|
|
2974
|
+
function wn(t, e, r, o) {
|
|
2920
2975
|
if (typeof t.on == "function")
|
|
2921
2976
|
o.once ? t.once(e, r) : t.on(e, r);
|
|
2922
2977
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2926,7 +2981,7 @@ function bn(t, e, r, o) {
|
|
|
2926
2981
|
else
|
|
2927
2982
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2928
2983
|
}
|
|
2929
|
-
var
|
|
2984
|
+
var bn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
2930
2985
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2931
2986
|
return !1;
|
|
2932
2987
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2949,33 +3004,33 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2949
3004
|
return !1;
|
|
2950
3005
|
}
|
|
2951
3006
|
return !0;
|
|
2952
|
-
},
|
|
2953
|
-
return
|
|
2954
|
-
}, Cr = typeof Symbol < "u" && Symbol,
|
|
2955
|
-
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3007
|
+
}, Fo = Sn, wr = function() {
|
|
3008
|
+
return Fo() && !!Symbol.toStringTag;
|
|
3009
|
+
}, Cr = typeof Symbol < "u" && Symbol, To = Sn, _o = function() {
|
|
3010
|
+
return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : To();
|
|
2956
3011
|
}, Or = {
|
|
2957
3012
|
foo: {}
|
|
2958
|
-
},
|
|
2959
|
-
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof
|
|
2960
|
-
},
|
|
3013
|
+
}, Co = Object, Oo = function() {
|
|
3014
|
+
return { __proto__: Or }.foo === Or.foo && !({ __proto__: null } instanceof Co);
|
|
3015
|
+
}, xo = "Function.prototype.bind called on incompatible ", Bo = Object.prototype.toString, ko = Math.max, Po = "[object Function]", xr = function(e, r) {
|
|
2961
3016
|
for (var o = [], s = 0; s < e.length; s += 1)
|
|
2962
3017
|
o[s] = e[s];
|
|
2963
3018
|
for (var u = 0; u < r.length; u += 1)
|
|
2964
3019
|
o[u + e.length] = r[u];
|
|
2965
3020
|
return o;
|
|
2966
|
-
},
|
|
3021
|
+
}, Ro = function(e, r) {
|
|
2967
3022
|
for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
|
|
2968
3023
|
o[u] = e[s];
|
|
2969
3024
|
return o;
|
|
2970
|
-
},
|
|
3025
|
+
}, Lo = function(t, e) {
|
|
2971
3026
|
for (var r = "", o = 0; o < t.length; o += 1)
|
|
2972
3027
|
r += t[o], o + 1 < t.length && (r += e);
|
|
2973
3028
|
return r;
|
|
2974
|
-
},
|
|
3029
|
+
}, No = function(e) {
|
|
2975
3030
|
var r = this;
|
|
2976
|
-
if (typeof r != "function" ||
|
|
2977
|
-
throw new TypeError(
|
|
2978
|
-
for (var o =
|
|
3031
|
+
if (typeof r != "function" || Bo.apply(r) !== Po)
|
|
3032
|
+
throw new TypeError(xo + r);
|
|
3033
|
+
for (var o = Ro(arguments, 1), s, u = function() {
|
|
2979
3034
|
if (this instanceof s) {
|
|
2980
3035
|
var g = r.apply(
|
|
2981
3036
|
this,
|
|
@@ -2987,17 +3042,17 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
|
|
|
2987
3042
|
e,
|
|
2988
3043
|
xr(o, arguments)
|
|
2989
3044
|
);
|
|
2990
|
-
}, l =
|
|
2991
|
-
|
|
2992
|
-
if (s = Function("binder", "return function (" +
|
|
2993
|
-
var
|
|
3045
|
+
}, l = ko(0, r.length - o.length), c = [], p = 0; p < l; p++)
|
|
3046
|
+
c[p] = "$" + p;
|
|
3047
|
+
if (s = Function("binder", "return function (" + Lo(c, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
|
|
3048
|
+
var b = function() {
|
|
2994
3049
|
};
|
|
2995
|
-
|
|
3050
|
+
b.prototype = r.prototype, s.prototype = new b(), b.prototype = null;
|
|
2996
3051
|
}
|
|
2997
3052
|
return s;
|
|
2998
|
-
},
|
|
3053
|
+
}, Uo = No, An = Function.prototype.bind || Uo, Br = {}.hasOwnProperty, Ut = Function.prototype.call, $o = Ut.bind ? Ut.bind(Br) : function(t, e) {
|
|
2999
3054
|
return Ut.call(Br, t, e);
|
|
3000
|
-
}, $,
|
|
3055
|
+
}, $, Ze = SyntaxError, En = Function, Xe = TypeError, $t = function(t) {
|
|
3001
3056
|
try {
|
|
3002
3057
|
return En('"use strict"; return (' + t + ").constructor;")();
|
|
3003
3058
|
} catch {
|
|
@@ -3010,8 +3065,8 @@ if (je)
|
|
|
3010
3065
|
je = null;
|
|
3011
3066
|
}
|
|
3012
3067
|
var Dt = function() {
|
|
3013
|
-
throw new
|
|
3014
|
-
},
|
|
3068
|
+
throw new Xe();
|
|
3069
|
+
}, Do = je ? function() {
|
|
3015
3070
|
try {
|
|
3016
3071
|
return arguments.callee, Dt;
|
|
3017
3072
|
} catch {
|
|
@@ -3021,9 +3076,9 @@ var Dt = function() {
|
|
|
3021
3076
|
return Dt;
|
|
3022
3077
|
}
|
|
3023
3078
|
}
|
|
3024
|
-
}() : Dt, Qe =
|
|
3079
|
+
}() : Dt, Qe = _o(), jo = Oo(), X = Object.getPrototypeOf || (jo ? function(t) {
|
|
3025
3080
|
return t.__proto__;
|
|
3026
|
-
} : null), ze = {},
|
|
3081
|
+
} : null), ze = {}, Vo = typeof Uint8Array > "u" || !X ? $ : X(Uint8Array), Ve = {
|
|
3027
3082
|
"%AggregateError%": typeof AggregateError > "u" ? $ : AggregateError,
|
|
3028
3083
|
"%Array%": Array,
|
|
3029
3084
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? $ : ArrayBuffer,
|
|
@@ -3079,10 +3134,10 @@ var Dt = function() {
|
|
|
3079
3134
|
"%String%": String,
|
|
3080
3135
|
"%StringIteratorPrototype%": Qe && X ? X(""[Symbol.iterator]()) : $,
|
|
3081
3136
|
"%Symbol%": Qe ? Symbol : $,
|
|
3082
|
-
"%SyntaxError%":
|
|
3083
|
-
"%ThrowTypeError%":
|
|
3084
|
-
"%TypedArray%":
|
|
3085
|
-
"%TypeError%":
|
|
3137
|
+
"%SyntaxError%": Ze,
|
|
3138
|
+
"%ThrowTypeError%": Do,
|
|
3139
|
+
"%TypedArray%": Vo,
|
|
3140
|
+
"%TypeError%": Xe,
|
|
3086
3141
|
"%Uint8Array%": typeof Uint8Array > "u" ? $ : Uint8Array,
|
|
3087
3142
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? $ : Uint8ClampedArray,
|
|
3088
3143
|
"%Uint16Array%": typeof Uint16Array > "u" ? $ : Uint16Array,
|
|
@@ -3096,10 +3151,10 @@ if (X)
|
|
|
3096
3151
|
try {
|
|
3097
3152
|
null.error;
|
|
3098
3153
|
} catch (t) {
|
|
3099
|
-
var
|
|
3100
|
-
Ve["%Error.prototype%"] =
|
|
3154
|
+
var Mo = X(X(t));
|
|
3155
|
+
Ve["%Error.prototype%"] = Mo;
|
|
3101
3156
|
}
|
|
3102
|
-
var
|
|
3157
|
+
var qo = function t(e) {
|
|
3103
3158
|
var r;
|
|
3104
3159
|
if (e === "%AsyncFunction%")
|
|
3105
3160
|
r = $t("async function () {}");
|
|
@@ -3167,60 +3222,60 @@ var jo = function t(e) {
|
|
|
3167
3222
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3168
3223
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3169
3224
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3170
|
-
},
|
|
3225
|
+
}, ht = An, Et = $o, Qo = ht.call(Function.call, Array.prototype.concat), Go = ht.call(Function.apply, Array.prototype.splice), Pr = ht.call(Function.call, String.prototype.replace), It = ht.call(Function.call, String.prototype.slice), zo = ht.call(Function.call, RegExp.prototype.exec), Ko = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ho = /\\(\\)?/g, Wo = function(e) {
|
|
3171
3226
|
var r = It(e, 0, 1), o = It(e, -1);
|
|
3172
3227
|
if (r === "%" && o !== "%")
|
|
3173
|
-
throw new
|
|
3228
|
+
throw new Ze("invalid intrinsic syntax, expected closing `%`");
|
|
3174
3229
|
if (o === "%" && r !== "%")
|
|
3175
|
-
throw new
|
|
3230
|
+
throw new Ze("invalid intrinsic syntax, expected opening `%`");
|
|
3176
3231
|
var s = [];
|
|
3177
|
-
return Pr(e,
|
|
3178
|
-
s[s.length] =
|
|
3232
|
+
return Pr(e, Ko, function(u, l, c, p) {
|
|
3233
|
+
s[s.length] = c ? Pr(p, Ho, "$1") : l || u;
|
|
3179
3234
|
}), s;
|
|
3180
|
-
},
|
|
3235
|
+
}, Jo = function(e, r) {
|
|
3181
3236
|
var o = e, s;
|
|
3182
3237
|
if (Et(kr, o) && (s = kr[o], o = "%" + s[0] + "%"), Et(Ve, o)) {
|
|
3183
3238
|
var u = Ve[o];
|
|
3184
|
-
if (u === ze && (u =
|
|
3185
|
-
throw new
|
|
3239
|
+
if (u === ze && (u = qo(o)), typeof u > "u" && !r)
|
|
3240
|
+
throw new Xe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3186
3241
|
return {
|
|
3187
3242
|
alias: s,
|
|
3188
3243
|
name: o,
|
|
3189
3244
|
value: u
|
|
3190
3245
|
};
|
|
3191
3246
|
}
|
|
3192
|
-
throw new
|
|
3193
|
-
},
|
|
3247
|
+
throw new Ze("intrinsic " + e + " does not exist!");
|
|
3248
|
+
}, tt = function(e, r) {
|
|
3194
3249
|
if (typeof e != "string" || e.length === 0)
|
|
3195
|
-
throw new
|
|
3250
|
+
throw new Xe("intrinsic name must be a non-empty string");
|
|
3196
3251
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3197
|
-
throw new
|
|
3198
|
-
if (
|
|
3199
|
-
throw new
|
|
3200
|
-
var o =
|
|
3201
|
-
|
|
3252
|
+
throw new Xe('"allowMissing" argument must be a boolean');
|
|
3253
|
+
if (zo(/^%?[^%]*%?$/, e) === null)
|
|
3254
|
+
throw new Ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3255
|
+
var o = Wo(e), s = o.length > 0 ? o[0] : "", u = Jo("%" + s + "%", r), l = u.name, c = u.value, p = !1, b = u.alias;
|
|
3256
|
+
b && (s = b[0], Go(o, Qo([0, 1], b)));
|
|
3202
3257
|
for (var g = 1, m = !0; g < o.length; g += 1) {
|
|
3203
|
-
var E = o[g], F = It(E, 0, 1),
|
|
3204
|
-
if ((F === '"' || F === "'" || F === "`" ||
|
|
3205
|
-
throw new
|
|
3258
|
+
var E = o[g], F = It(E, 0, 1), L = It(E, -1);
|
|
3259
|
+
if ((F === '"' || F === "'" || F === "`" || L === '"' || L === "'" || L === "`") && F !== L)
|
|
3260
|
+
throw new Ze("property names with quotes must have matching quotes");
|
|
3206
3261
|
if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
|
|
3207
|
-
|
|
3208
|
-
else if (
|
|
3209
|
-
if (!(E in
|
|
3262
|
+
c = Ve[l];
|
|
3263
|
+
else if (c != null) {
|
|
3264
|
+
if (!(E in c)) {
|
|
3210
3265
|
if (!r)
|
|
3211
|
-
throw new
|
|
3266
|
+
throw new Xe("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3212
3267
|
return;
|
|
3213
3268
|
}
|
|
3214
3269
|
if (je && g + 1 >= o.length) {
|
|
3215
|
-
var P = je(
|
|
3216
|
-
m = !!P, m && "get" in P && !("originalValue" in P.get) ?
|
|
3270
|
+
var P = je(c, E);
|
|
3271
|
+
m = !!P, m && "get" in P && !("originalValue" in P.get) ? c = P.get : c = c[E];
|
|
3217
3272
|
} else
|
|
3218
|
-
m = Et(
|
|
3219
|
-
m && !p && (Ve[l] =
|
|
3273
|
+
m = Et(c, E), c = c[E];
|
|
3274
|
+
m && !p && (Ve[l] = c);
|
|
3220
3275
|
}
|
|
3221
3276
|
}
|
|
3222
|
-
return
|
|
3223
|
-
}, In = { exports: {} },
|
|
3277
|
+
return c;
|
|
3278
|
+
}, In = { exports: {} }, Yo = tt, er = Yo("%Object.defineProperty%", !0), tr = function() {
|
|
3224
3279
|
if (er)
|
|
3225
3280
|
try {
|
|
3226
3281
|
return er({}, "a", { value: 1 }), !0;
|
|
@@ -3238,21 +3293,21 @@ tr.hasArrayLengthDefineBug = function() {
|
|
|
3238
3293
|
return !0;
|
|
3239
3294
|
}
|
|
3240
3295
|
};
|
|
3241
|
-
var Fn = tr,
|
|
3296
|
+
var Fn = tr, Xo = tt, mt = Xo("%Object.getOwnPropertyDescriptor%", !0);
|
|
3242
3297
|
if (mt)
|
|
3243
3298
|
try {
|
|
3244
3299
|
mt([], "length");
|
|
3245
3300
|
} catch {
|
|
3246
3301
|
mt = null;
|
|
3247
3302
|
}
|
|
3248
|
-
var
|
|
3249
|
-
if (
|
|
3303
|
+
var br = mt, Zo = Fn(), vr = tt, ct = Zo && vr("%Object.defineProperty%", !0);
|
|
3304
|
+
if (ct)
|
|
3250
3305
|
try {
|
|
3251
|
-
|
|
3306
|
+
ct({}, "a", { value: 1 });
|
|
3252
3307
|
} catch {
|
|
3253
|
-
|
|
3308
|
+
ct = !1;
|
|
3254
3309
|
}
|
|
3255
|
-
var
|
|
3310
|
+
var es = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = br, ts = function(e, r, o) {
|
|
3256
3311
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3257
3312
|
throw new Ge("`obj` must be an object or a function`");
|
|
3258
3313
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3265,32 +3320,32 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3265
3320
|
throw new Ge("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3266
3321
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3267
3322
|
throw new Ge("`loose`, if provided, must be a boolean");
|
|
3268
|
-
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null,
|
|
3269
|
-
if (
|
|
3270
|
-
|
|
3323
|
+
var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, c = arguments.length > 6 ? arguments[6] : !1, p = !!Rr && Rr(e, r);
|
|
3324
|
+
if (ct)
|
|
3325
|
+
ct(e, r, {
|
|
3271
3326
|
configurable: l === null && p ? p.configurable : !l,
|
|
3272
3327
|
enumerable: s === null && p ? p.enumerable : !s,
|
|
3273
3328
|
value: o,
|
|
3274
3329
|
writable: u === null && p ? p.writable : !u
|
|
3275
3330
|
});
|
|
3276
|
-
else if (
|
|
3331
|
+
else if (c || !s && !u && !l)
|
|
3277
3332
|
e[r] = o;
|
|
3278
3333
|
else
|
|
3279
|
-
throw new
|
|
3280
|
-
}, Tn =
|
|
3334
|
+
throw new es("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3335
|
+
}, Tn = tt, Lr = ts, rs = Fn(), Nr = br, Ur = Tn("%TypeError%"), ns = Tn("%Math.floor%"), is = function(e, r) {
|
|
3281
3336
|
if (typeof e != "function")
|
|
3282
3337
|
throw new Ur("`fn` is not a function");
|
|
3283
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3338
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || ns(r) !== r)
|
|
3284
3339
|
throw new Ur("`length` must be a positive 32-bit integer");
|
|
3285
3340
|
var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
|
|
3286
|
-
if ("length" in e &&
|
|
3287
|
-
var l =
|
|
3341
|
+
if ("length" in e && Nr) {
|
|
3342
|
+
var l = Nr(e, "length");
|
|
3288
3343
|
l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
|
|
3289
3344
|
}
|
|
3290
|
-
return (s || u || !o) && (
|
|
3345
|
+
return (s || u || !o) && (rs ? Lr(e, "length", r, !0, !0) : Lr(e, "length", r)), e;
|
|
3291
3346
|
};
|
|
3292
3347
|
(function(t) {
|
|
3293
|
-
var e = An, r =
|
|
3348
|
+
var e = An, r = tt, o = is, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), c = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), b = r("%Math.max%");
|
|
3294
3349
|
if (p)
|
|
3295
3350
|
try {
|
|
3296
3351
|
p({}, "a", { value: 1 });
|
|
@@ -3300,71 +3355,71 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
|
|
|
3300
3355
|
t.exports = function(E) {
|
|
3301
3356
|
if (typeof E != "function")
|
|
3302
3357
|
throw new s("a function is required");
|
|
3303
|
-
var F =
|
|
3358
|
+
var F = c(e, l, arguments);
|
|
3304
3359
|
return o(
|
|
3305
3360
|
F,
|
|
3306
|
-
1 +
|
|
3361
|
+
1 + b(0, E.length - (arguments.length - 1)),
|
|
3307
3362
|
!0
|
|
3308
3363
|
);
|
|
3309
3364
|
};
|
|
3310
3365
|
var g = function() {
|
|
3311
|
-
return
|
|
3366
|
+
return c(e, u, arguments);
|
|
3312
3367
|
};
|
|
3313
3368
|
p ? p(t.exports, "apply", { value: g }) : t.exports.apply = g;
|
|
3314
3369
|
})(In);
|
|
3315
|
-
var _n = In.exports, Cn =
|
|
3370
|
+
var _n = In.exports, Cn = tt, On = _n, os = On(Cn("String.prototype.indexOf")), xn = function(e, r) {
|
|
3316
3371
|
var o = Cn(e, !!r);
|
|
3317
|
-
return typeof o == "function" &&
|
|
3318
|
-
},
|
|
3319
|
-
return
|
|
3372
|
+
return typeof o == "function" && os(e, ".prototype.") > -1 ? On(o) : o;
|
|
3373
|
+
}, ss = wr(), as = xn, rr = as("Object.prototype.toString"), Pt = function(e) {
|
|
3374
|
+
return ss && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : rr(e) === "[object Arguments]";
|
|
3320
3375
|
}, Bn = function(e) {
|
|
3321
3376
|
return Pt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && rr(e) !== "[object Array]" && rr(e.callee) === "[object Function]";
|
|
3322
|
-
},
|
|
3377
|
+
}, us = function() {
|
|
3323
3378
|
return Pt(arguments);
|
|
3324
3379
|
}();
|
|
3325
3380
|
Pt.isLegacyArguments = Bn;
|
|
3326
|
-
var
|
|
3381
|
+
var cs = us ? Pt : Bn, fs = Object.prototype.toString, ls = Function.prototype.toString, hs = /^\s*(?:function)?\*/, kn = wr(), jt = Object.getPrototypeOf, ps = function() {
|
|
3327
3382
|
if (!kn)
|
|
3328
3383
|
return !1;
|
|
3329
3384
|
try {
|
|
3330
3385
|
return Function("return function*() {}")();
|
|
3331
3386
|
} catch {
|
|
3332
3387
|
}
|
|
3333
|
-
}, Vt,
|
|
3388
|
+
}, Vt, ds = function(e) {
|
|
3334
3389
|
if (typeof e != "function")
|
|
3335
3390
|
return !1;
|
|
3336
|
-
if (
|
|
3391
|
+
if (hs.test(ls.call(e)))
|
|
3337
3392
|
return !0;
|
|
3338
3393
|
if (!kn) {
|
|
3339
|
-
var r =
|
|
3394
|
+
var r = fs.call(e);
|
|
3340
3395
|
return r === "[object GeneratorFunction]";
|
|
3341
3396
|
}
|
|
3342
3397
|
if (!jt)
|
|
3343
3398
|
return !1;
|
|
3344
3399
|
if (typeof Vt > "u") {
|
|
3345
|
-
var o =
|
|
3400
|
+
var o = ps();
|
|
3346
3401
|
Vt = o ? jt(o) : !1;
|
|
3347
3402
|
}
|
|
3348
3403
|
return jt(e) === Vt;
|
|
3349
|
-
}, Pn = Function.prototype.toString, He = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr,
|
|
3404
|
+
}, Pn = Function.prototype.toString, He = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr, wt;
|
|
3350
3405
|
if (typeof He == "function" && typeof Object.defineProperty == "function")
|
|
3351
3406
|
try {
|
|
3352
3407
|
nr = Object.defineProperty({}, "length", {
|
|
3353
3408
|
get: function() {
|
|
3354
|
-
throw
|
|
3409
|
+
throw wt;
|
|
3355
3410
|
}
|
|
3356
|
-
}),
|
|
3411
|
+
}), wt = {}, He(function() {
|
|
3357
3412
|
throw 42;
|
|
3358
3413
|
}, null, nr);
|
|
3359
3414
|
} catch (t) {
|
|
3360
|
-
t !==
|
|
3415
|
+
t !== wt && (He = null);
|
|
3361
3416
|
}
|
|
3362
3417
|
else
|
|
3363
3418
|
He = null;
|
|
3364
|
-
var
|
|
3419
|
+
var ys = /^\s*class\b/, ir = function(e) {
|
|
3365
3420
|
try {
|
|
3366
3421
|
var r = Pn.call(e);
|
|
3367
|
-
return
|
|
3422
|
+
return ys.test(r);
|
|
3368
3423
|
} catch {
|
|
3369
3424
|
return !1;
|
|
3370
3425
|
}
|
|
@@ -3374,22 +3429,22 @@ var hs = /^\s*class\b/, ir = function(e) {
|
|
|
3374
3429
|
} catch {
|
|
3375
3430
|
return !1;
|
|
3376
3431
|
}
|
|
3377
|
-
},
|
|
3432
|
+
}, bt = Object.prototype.toString, gs = "[object Object]", ms = "[object Function]", ws = "[object GeneratorFunction]", bs = "[object HTMLAllCollection]", vs = "[object HTML document.all class]", Ss = "[object HTMLCollection]", As = typeof Symbol == "function" && !!Symbol.toStringTag, Es = !(0 in [,]), or = function() {
|
|
3378
3433
|
return !1;
|
|
3379
3434
|
};
|
|
3380
3435
|
if (typeof document == "object") {
|
|
3381
|
-
var
|
|
3382
|
-
|
|
3383
|
-
if ((
|
|
3436
|
+
var Is = document.all;
|
|
3437
|
+
bt.call(Is) === bt.call(document.all) && (or = function(e) {
|
|
3438
|
+
if ((Es || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3384
3439
|
try {
|
|
3385
|
-
var r =
|
|
3386
|
-
return (r ===
|
|
3440
|
+
var r = bt.call(e);
|
|
3441
|
+
return (r === bs || r === vs || r === Ss || r === gs) && e("") == null;
|
|
3387
3442
|
} catch {
|
|
3388
3443
|
}
|
|
3389
3444
|
return !1;
|
|
3390
3445
|
});
|
|
3391
3446
|
}
|
|
3392
|
-
var
|
|
3447
|
+
var Fs = He ? function(e) {
|
|
3393
3448
|
if (or(e))
|
|
3394
3449
|
return !0;
|
|
3395
3450
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3397,7 +3452,7 @@ var As = He ? function(e) {
|
|
|
3397
3452
|
try {
|
|
3398
3453
|
He(e, null, nr);
|
|
3399
3454
|
} catch (r) {
|
|
3400
|
-
if (r !==
|
|
3455
|
+
if (r !== wt)
|
|
3401
3456
|
return !1;
|
|
3402
3457
|
}
|
|
3403
3458
|
return !ir(e) && Mt(e);
|
|
@@ -3406,27 +3461,27 @@ var As = He ? function(e) {
|
|
|
3406
3461
|
return !0;
|
|
3407
3462
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3408
3463
|
return !1;
|
|
3409
|
-
if (
|
|
3464
|
+
if (As)
|
|
3410
3465
|
return Mt(e);
|
|
3411
3466
|
if (ir(e))
|
|
3412
3467
|
return !1;
|
|
3413
|
-
var r =
|
|
3414
|
-
return r !==
|
|
3415
|
-
},
|
|
3468
|
+
var r = bt.call(e);
|
|
3469
|
+
return r !== ms && r !== ws && !/^\[object HTML/.test(r) ? !1 : Mt(e);
|
|
3470
|
+
}, Ts = Fs, _s = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, Cs = function(e, r, o) {
|
|
3416
3471
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3417
3472
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3418
|
-
},
|
|
3473
|
+
}, Os = function(e, r, o) {
|
|
3419
3474
|
for (var s = 0, u = e.length; s < u; s++)
|
|
3420
3475
|
o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
|
|
3421
|
-
},
|
|
3476
|
+
}, xs = function(e, r, o) {
|
|
3422
3477
|
for (var s in e)
|
|
3423
3478
|
Rn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
|
|
3424
|
-
},
|
|
3425
|
-
if (!
|
|
3479
|
+
}, Bs = function(e, r, o) {
|
|
3480
|
+
if (!Ts(r))
|
|
3426
3481
|
throw new TypeError("iterator must be a function");
|
|
3427
3482
|
var s;
|
|
3428
|
-
arguments.length >= 3 && (s = o),
|
|
3429
|
-
},
|
|
3483
|
+
arguments.length >= 3 && (s = o), _s.call(e) === "[object Array]" ? Cs(e, r, s) : typeof e == "string" ? Os(e, r, s) : xs(e, r, s);
|
|
3484
|
+
}, ks = Bs, qt = [
|
|
3430
3485
|
"BigInt64Array",
|
|
3431
3486
|
"BigUint64Array",
|
|
3432
3487
|
"Float32Array",
|
|
@@ -3438,17 +3493,17 @@ var As = He ? function(e) {
|
|
|
3438
3493
|
"Uint32Array",
|
|
3439
3494
|
"Uint8Array",
|
|
3440
3495
|
"Uint8ClampedArray"
|
|
3441
|
-
],
|
|
3496
|
+
], Ps = typeof globalThis > "u" ? Yr : globalThis, Rs = function() {
|
|
3442
3497
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3443
|
-
typeof
|
|
3498
|
+
typeof Ps[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3444
3499
|
return e;
|
|
3445
|
-
}, Ft =
|
|
3500
|
+
}, Ft = ks, Ls = Rs, $r = _n, Sr = xn, vt = br, Ns = Sr("Object.prototype.toString"), Ln = wr(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = Ls(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Us = Sr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3446
3501
|
for (var o = 0; o < e.length; o += 1)
|
|
3447
3502
|
if (e[o] === r)
|
|
3448
3503
|
return o;
|
|
3449
3504
|
return -1;
|
|
3450
3505
|
}, Tt = { __proto__: null };
|
|
3451
|
-
|
|
3506
|
+
Ln && vt && Qt ? Ft(sr, function(t) {
|
|
3452
3507
|
var e = new Dr[t]();
|
|
3453
3508
|
if (Symbol.toStringTag in e) {
|
|
3454
3509
|
var r = Qt(e), o = vt(r, Symbol.toStringTag);
|
|
@@ -3462,7 +3517,7 @@ Nn && vt && Qt ? Ft(sr, function(t) {
|
|
|
3462
3517
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3463
3518
|
r && (Tt["$" + t] = $r(r));
|
|
3464
3519
|
});
|
|
3465
|
-
var
|
|
3520
|
+
var $s = function(e) {
|
|
3466
3521
|
var r = !1;
|
|
3467
3522
|
return Ft(Tt, function(o, s) {
|
|
3468
3523
|
if (!r)
|
|
@@ -3471,7 +3526,7 @@ var Ns = function(e) {
|
|
|
3471
3526
|
} catch {
|
|
3472
3527
|
}
|
|
3473
3528
|
}), r;
|
|
3474
|
-
},
|
|
3529
|
+
}, Ds = function(e) {
|
|
3475
3530
|
var r = !1;
|
|
3476
3531
|
return Ft(Tt, function(o, s) {
|
|
3477
3532
|
if (!r)
|
|
@@ -3480,32 +3535,32 @@ var Ns = function(e) {
|
|
|
3480
3535
|
} catch {
|
|
3481
3536
|
}
|
|
3482
3537
|
}), r;
|
|
3483
|
-
},
|
|
3538
|
+
}, Nn = function(e) {
|
|
3484
3539
|
if (!e || typeof e != "object")
|
|
3485
3540
|
return !1;
|
|
3486
|
-
if (!
|
|
3487
|
-
var r = Ar(
|
|
3488
|
-
return
|
|
3541
|
+
if (!Ln) {
|
|
3542
|
+
var r = Ar(Ns(e), 8, -1);
|
|
3543
|
+
return Us(sr, r) > -1 ? r : r !== "Object" ? !1 : Ds(e);
|
|
3489
3544
|
}
|
|
3490
|
-
return vt ?
|
|
3491
|
-
},
|
|
3492
|
-
return !!
|
|
3545
|
+
return vt ? $s(e) : null;
|
|
3546
|
+
}, js = Nn, Vs = function(e) {
|
|
3547
|
+
return !!js(e);
|
|
3493
3548
|
};
|
|
3494
3549
|
(function(t) {
|
|
3495
|
-
var e =
|
|
3550
|
+
var e = cs, r = ds, o = Nn, s = Vs;
|
|
3496
3551
|
function u(S) {
|
|
3497
3552
|
return S.call.bind(S);
|
|
3498
3553
|
}
|
|
3499
|
-
var l = typeof BigInt < "u",
|
|
3554
|
+
var l = typeof BigInt < "u", c = typeof Symbol < "u", p = u(Object.prototype.toString), b = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), m = u(Boolean.prototype.valueOf);
|
|
3500
3555
|
if (l)
|
|
3501
3556
|
var E = u(BigInt.prototype.valueOf);
|
|
3502
|
-
if (
|
|
3557
|
+
if (c)
|
|
3503
3558
|
var F = u(Symbol.prototype.valueOf);
|
|
3504
|
-
function
|
|
3559
|
+
function L(S, dt) {
|
|
3505
3560
|
if (typeof S != "object")
|
|
3506
3561
|
return !1;
|
|
3507
3562
|
try {
|
|
3508
|
-
return
|
|
3563
|
+
return dt(S), !0;
|
|
3509
3564
|
} catch {
|
|
3510
3565
|
return !1;
|
|
3511
3566
|
}
|
|
@@ -3567,10 +3622,10 @@ var Ns = function(e) {
|
|
|
3567
3622
|
return p(S) === "[object Map]";
|
|
3568
3623
|
}
|
|
3569
3624
|
ce.working = typeof Map < "u" && ce(/* @__PURE__ */ new Map());
|
|
3570
|
-
function
|
|
3625
|
+
function nt(S) {
|
|
3571
3626
|
return typeof Map > "u" ? !1 : ce.working ? ce(S) : S instanceof Map;
|
|
3572
3627
|
}
|
|
3573
|
-
t.isMap =
|
|
3628
|
+
t.isMap = nt;
|
|
3574
3629
|
function fe(S) {
|
|
3575
3630
|
return p(S) === "[object Set]";
|
|
3576
3631
|
}
|
|
@@ -3583,10 +3638,10 @@ var Ns = function(e) {
|
|
|
3583
3638
|
return p(S) === "[object WeakMap]";
|
|
3584
3639
|
}
|
|
3585
3640
|
Be.working = typeof WeakMap < "u" && Be(/* @__PURE__ */ new WeakMap());
|
|
3586
|
-
function
|
|
3641
|
+
function it(S) {
|
|
3587
3642
|
return typeof WeakMap > "u" ? !1 : Be.working ? Be(S) : S instanceof WeakMap;
|
|
3588
3643
|
}
|
|
3589
|
-
t.isWeakMap =
|
|
3644
|
+
t.isWeakMap = it;
|
|
3590
3645
|
function ke(S) {
|
|
3591
3646
|
return p(S) === "[object WeakSet]";
|
|
3592
3647
|
}
|
|
@@ -3627,10 +3682,10 @@ var Ns = function(e) {
|
|
|
3627
3682
|
return p(S) === "[object Map Iterator]";
|
|
3628
3683
|
}
|
|
3629
3684
|
t.isMapIterator = B;
|
|
3630
|
-
function
|
|
3685
|
+
function N(S) {
|
|
3631
3686
|
return p(S) === "[object Set Iterator]";
|
|
3632
3687
|
}
|
|
3633
|
-
t.isSetIterator =
|
|
3688
|
+
t.isSetIterator = N;
|
|
3634
3689
|
function M(S) {
|
|
3635
3690
|
return p(S) === "[object Generator]";
|
|
3636
3691
|
}
|
|
@@ -3640,29 +3695,29 @@ var Ns = function(e) {
|
|
|
3640
3695
|
}
|
|
3641
3696
|
t.isWebAssemblyCompiledModule = te;
|
|
3642
3697
|
function ye(S) {
|
|
3643
|
-
return
|
|
3698
|
+
return L(S, b);
|
|
3644
3699
|
}
|
|
3645
3700
|
t.isNumberObject = ye;
|
|
3646
3701
|
function he(S) {
|
|
3647
|
-
return
|
|
3702
|
+
return L(S, g);
|
|
3648
3703
|
}
|
|
3649
3704
|
t.isStringObject = he;
|
|
3650
3705
|
function oe(S) {
|
|
3651
|
-
return
|
|
3706
|
+
return L(S, m);
|
|
3652
3707
|
}
|
|
3653
3708
|
t.isBooleanObject = oe;
|
|
3654
3709
|
function Me(S) {
|
|
3655
|
-
return l &&
|
|
3710
|
+
return l && L(S, E);
|
|
3656
3711
|
}
|
|
3657
3712
|
t.isBigIntObject = Me;
|
|
3658
|
-
function
|
|
3659
|
-
return
|
|
3713
|
+
function pt(S) {
|
|
3714
|
+
return c && L(S, F);
|
|
3660
3715
|
}
|
|
3661
|
-
t.isSymbolObject =
|
|
3662
|
-
function
|
|
3663
|
-
return ye(S) || he(S) || oe(S) || Me(S) ||
|
|
3716
|
+
t.isSymbolObject = pt;
|
|
3717
|
+
function ot(S) {
|
|
3718
|
+
return ye(S) || he(S) || oe(S) || Me(S) || pt(S);
|
|
3664
3719
|
}
|
|
3665
|
-
t.isBoxedPrimitive =
|
|
3720
|
+
t.isBoxedPrimitive = ot;
|
|
3666
3721
|
function Rt(S) {
|
|
3667
3722
|
return typeof Uint8Array < "u" && (H(S) || j(S));
|
|
3668
3723
|
}
|
|
@@ -3675,7 +3730,7 @@ var Ns = function(e) {
|
|
|
3675
3730
|
});
|
|
3676
3731
|
});
|
|
3677
3732
|
})(vn);
|
|
3678
|
-
var
|
|
3733
|
+
var Ms = function(e) {
|
|
3679
3734
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3680
3735
|
}, ar = { exports: {} };
|
|
3681
3736
|
typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
@@ -3695,7 +3750,7 @@ typeof Object.create == "function" ? ar.exports = function(e, r) {
|
|
|
3695
3750
|
o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
|
|
3696
3751
|
}
|
|
3697
3752
|
};
|
|
3698
|
-
var
|
|
3753
|
+
var qs = ar.exports;
|
|
3699
3754
|
(function(t) {
|
|
3700
3755
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
3701
3756
|
for (var A = Object.keys(v), C = {}, j = 0; j < A.length; j++)
|
|
@@ -3708,12 +3763,12 @@ var js = ar.exports;
|
|
|
3708
3763
|
v.push(l(arguments[A]));
|
|
3709
3764
|
return v.join(" ");
|
|
3710
3765
|
}
|
|
3711
|
-
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(
|
|
3712
|
-
if (
|
|
3766
|
+
for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(N) {
|
|
3767
|
+
if (N === "%%")
|
|
3713
3768
|
return "%";
|
|
3714
3769
|
if (A >= j)
|
|
3715
|
-
return
|
|
3716
|
-
switch (
|
|
3770
|
+
return N;
|
|
3771
|
+
switch (N) {
|
|
3717
3772
|
case "%s":
|
|
3718
3773
|
return String(C[A++]);
|
|
3719
3774
|
case "%d":
|
|
@@ -3725,7 +3780,7 @@ var js = ar.exports;
|
|
|
3725
3780
|
return "[Circular]";
|
|
3726
3781
|
}
|
|
3727
3782
|
default:
|
|
3728
|
-
return
|
|
3783
|
+
return N;
|
|
3729
3784
|
}
|
|
3730
3785
|
}), B = C[A]; A < j; B = C[++A])
|
|
3731
3786
|
_(B) || !ie(B) ? V += " " + B : V += " " + l(B);
|
|
@@ -3771,7 +3826,7 @@ var js = ar.exports;
|
|
|
3771
3826
|
seen: [],
|
|
3772
3827
|
stylize: p
|
|
3773
3828
|
};
|
|
3774
|
-
return arguments.length >= 3 && (A.depth = arguments[2]), arguments.length >= 4 && (A.colors = arguments[3]), I(v) ? A.showHidden = v : v && t._extend(A, v), k(A.showHidden) && (A.showHidden = !1), k(A.depth) && (A.depth = 2), k(A.colors) && (A.colors = !1), k(A.customInspect) && (A.customInspect = !0), A.colors && (A.stylize =
|
|
3829
|
+
return arguments.length >= 3 && (A.depth = arguments[2]), arguments.length >= 4 && (A.colors = arguments[3]), I(v) ? A.showHidden = v : v && t._extend(A, v), k(A.showHidden) && (A.showHidden = !1), k(A.depth) && (A.depth = 2), k(A.colors) && (A.colors = !1), k(A.customInspect) && (A.customInspect = !0), A.colors && (A.stylize = c), g(A, d, A.depth);
|
|
3775
3830
|
}
|
|
3776
3831
|
t.inspect = l, l.colors = {
|
|
3777
3832
|
bold: [1, 22],
|
|
@@ -3798,14 +3853,14 @@ var js = ar.exports;
|
|
|
3798
3853
|
// "name": intentionally not styling
|
|
3799
3854
|
regexp: "red"
|
|
3800
3855
|
};
|
|
3801
|
-
function
|
|
3856
|
+
function c(d, v) {
|
|
3802
3857
|
var A = l.styles[v];
|
|
3803
3858
|
return A ? "\x1B[" + l.colors[A][0] + "m" + d + "\x1B[" + l.colors[A][1] + "m" : d;
|
|
3804
3859
|
}
|
|
3805
3860
|
function p(d, v) {
|
|
3806
3861
|
return d;
|
|
3807
3862
|
}
|
|
3808
|
-
function
|
|
3863
|
+
function b(d) {
|
|
3809
3864
|
var v = {};
|
|
3810
3865
|
return d.forEach(function(A, C) {
|
|
3811
3866
|
v[A] = !0;
|
|
@@ -3821,13 +3876,13 @@ var js = ar.exports;
|
|
|
3821
3876
|
var j = m(d, v);
|
|
3822
3877
|
if (j)
|
|
3823
3878
|
return j;
|
|
3824
|
-
var V = Object.keys(v), B =
|
|
3879
|
+
var V = Object.keys(v), B = b(V);
|
|
3825
3880
|
if (d.showHidden && (V = Object.getOwnPropertyNames(v)), Se(v) && (V.indexOf("message") >= 0 || V.indexOf("description") >= 0))
|
|
3826
3881
|
return E(v);
|
|
3827
3882
|
if (V.length === 0) {
|
|
3828
3883
|
if (ce(v)) {
|
|
3829
|
-
var
|
|
3830
|
-
return d.stylize("[Function" +
|
|
3884
|
+
var N = v.name ? ": " + v.name : "";
|
|
3885
|
+
return d.stylize("[Function" + N + "]", "special");
|
|
3831
3886
|
}
|
|
3832
3887
|
if (G(v))
|
|
3833
3888
|
return d.stylize(RegExp.prototype.toString.call(v), "regexp");
|
|
@@ -3848,7 +3903,7 @@ var js = ar.exports;
|
|
|
3848
3903
|
d.seen.push(v);
|
|
3849
3904
|
var oe;
|
|
3850
3905
|
return te ? oe = F(d, v, A, B, V) : oe = V.map(function(Me) {
|
|
3851
|
-
return
|
|
3906
|
+
return L(d, v, A, B, Me, te);
|
|
3852
3907
|
}), d.seen.pop(), P(oe, M, ye);
|
|
3853
3908
|
}
|
|
3854
3909
|
function m(d, v) {
|
|
@@ -3869,8 +3924,8 @@ var js = ar.exports;
|
|
|
3869
3924
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
3870
3925
|
}
|
|
3871
3926
|
function F(d, v, A, C, j) {
|
|
3872
|
-
for (var V = [], B = 0,
|
|
3873
|
-
ke(v, String(B)) ? V.push(
|
|
3927
|
+
for (var V = [], B = 0, N = v.length; B < N; ++B)
|
|
3928
|
+
ke(v, String(B)) ? V.push(L(
|
|
3874
3929
|
d,
|
|
3875
3930
|
v,
|
|
3876
3931
|
A,
|
|
@@ -3879,7 +3934,7 @@ var js = ar.exports;
|
|
|
3879
3934
|
!0
|
|
3880
3935
|
)) : V.push("");
|
|
3881
3936
|
return j.forEach(function(M) {
|
|
3882
|
-
M.match(/^\d+$/) || V.push(
|
|
3937
|
+
M.match(/^\d+$/) || V.push(L(
|
|
3883
3938
|
d,
|
|
3884
3939
|
v,
|
|
3885
3940
|
A,
|
|
@@ -3889,24 +3944,24 @@ var js = ar.exports;
|
|
|
3889
3944
|
));
|
|
3890
3945
|
}), V;
|
|
3891
3946
|
}
|
|
3892
|
-
function
|
|
3893
|
-
var B,
|
|
3894
|
-
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ?
|
|
3895
|
-
`) > -1 && (V ?
|
|
3947
|
+
function L(d, v, A, C, j, V) {
|
|
3948
|
+
var B, N, M;
|
|
3949
|
+
if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? N = d.stylize("[Getter/Setter]", "special") : N = d.stylize("[Getter]", "special") : M.set && (N = d.stylize("[Setter]", "special")), ke(C, j) || (B = "[" + j + "]"), N || (d.seen.indexOf(M.value) < 0 ? (_(A) ? N = g(d, M.value, null) : N = g(d, M.value, A - 1), N.indexOf(`
|
|
3950
|
+
`) > -1 && (V ? N = N.split(`
|
|
3896
3951
|
`).map(function(te) {
|
|
3897
3952
|
return " " + te;
|
|
3898
3953
|
}).join(`
|
|
3899
|
-
`).slice(2) :
|
|
3900
|
-
` +
|
|
3954
|
+
`).slice(2) : N = `
|
|
3955
|
+
` + N.split(`
|
|
3901
3956
|
`).map(function(te) {
|
|
3902
3957
|
return " " + te;
|
|
3903
3958
|
}).join(`
|
|
3904
|
-
`))) :
|
|
3959
|
+
`))) : N = d.stylize("[Circular]", "special")), k(B)) {
|
|
3905
3960
|
if (V && j.match(/^\d+$/))
|
|
3906
|
-
return
|
|
3961
|
+
return N;
|
|
3907
3962
|
B = JSON.stringify("" + j), B.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (B = B.slice(1, -1), B = d.stylize(B, "name")) : (B = B.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), B = d.stylize(B, "string"));
|
|
3908
3963
|
}
|
|
3909
|
-
return B + ": " +
|
|
3964
|
+
return B + ": " + N;
|
|
3910
3965
|
}
|
|
3911
3966
|
function P(d, v, A) {
|
|
3912
3967
|
var C = d.reduce(function(j, V) {
|
|
@@ -3970,11 +4025,11 @@ var js = ar.exports;
|
|
|
3970
4025
|
return typeof d == "function";
|
|
3971
4026
|
}
|
|
3972
4027
|
t.isFunction = ce;
|
|
3973
|
-
function
|
|
4028
|
+
function nt(d) {
|
|
3974
4029
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
3975
4030
|
typeof d > "u";
|
|
3976
4031
|
}
|
|
3977
|
-
t.isPrimitive =
|
|
4032
|
+
t.isPrimitive = nt, t.isBuffer = Ms;
|
|
3978
4033
|
function fe(d) {
|
|
3979
4034
|
return Object.prototype.toString.call(d);
|
|
3980
4035
|
}
|
|
@@ -3995,7 +4050,7 @@ var js = ar.exports;
|
|
|
3995
4050
|
"Nov",
|
|
3996
4051
|
"Dec"
|
|
3997
4052
|
];
|
|
3998
|
-
function
|
|
4053
|
+
function it() {
|
|
3999
4054
|
var d = /* @__PURE__ */ new Date(), v = [
|
|
4000
4055
|
xe(d.getHours()),
|
|
4001
4056
|
xe(d.getMinutes()),
|
|
@@ -4004,8 +4059,8 @@ var js = ar.exports;
|
|
|
4004
4059
|
return [d.getDate(), Be[d.getMonth()], v].join(" ");
|
|
4005
4060
|
}
|
|
4006
4061
|
t.log = function() {
|
|
4007
|
-
console.log("%s - %s",
|
|
4008
|
-
}, t.inherits =
|
|
4062
|
+
console.log("%s - %s", it(), t.format.apply(t, arguments));
|
|
4063
|
+
}, t.inherits = qs, t._extend = function(d, v) {
|
|
4009
4064
|
if (!v || !ie(v))
|
|
4010
4065
|
return d;
|
|
4011
4066
|
for (var A = Object.keys(v), C = A.length; C--; )
|
|
@@ -4033,8 +4088,8 @@ var js = ar.exports;
|
|
|
4033
4088
|
function A() {
|
|
4034
4089
|
for (var C, j, V = new Promise(function(M, te) {
|
|
4035
4090
|
C = M, j = te;
|
|
4036
|
-
}), B = [],
|
|
4037
|
-
B.push(arguments[
|
|
4091
|
+
}), B = [], N = 0; N < arguments.length; N++)
|
|
4092
|
+
B.push(arguments[N]);
|
|
4038
4093
|
B.push(function(M, te) {
|
|
4039
4094
|
M ? j(M) : C(te);
|
|
4040
4095
|
});
|
|
@@ -4075,11 +4130,11 @@ var js = ar.exports;
|
|
|
4075
4130
|
return j.apply(V, arguments);
|
|
4076
4131
|
};
|
|
4077
4132
|
d.apply(this, A).then(
|
|
4078
|
-
function(
|
|
4079
|
-
O.process.nextTick(B.bind(null, null,
|
|
4133
|
+
function(N) {
|
|
4134
|
+
O.process.nextTick(B.bind(null, null, N));
|
|
4080
4135
|
},
|
|
4081
|
-
function(
|
|
4082
|
-
O.process.nextTick(Pe.bind(null,
|
|
4136
|
+
function(N) {
|
|
4137
|
+
O.process.nextTick(Pe.bind(null, N, B));
|
|
4083
4138
|
}
|
|
4084
4139
|
);
|
|
4085
4140
|
}
|
|
@@ -4090,8 +4145,8 @@ var js = ar.exports;
|
|
|
4090
4145
|
}
|
|
4091
4146
|
t.callbackify = H;
|
|
4092
4147
|
})(kt);
|
|
4093
|
-
const { inherits:
|
|
4094
|
-
function
|
|
4148
|
+
const { inherits: Qs, format: Gt } = kt;
|
|
4149
|
+
function Ne(t, e, r = Error) {
|
|
4095
4150
|
if (!t)
|
|
4096
4151
|
throw new Error("Avvio error code must not be empty");
|
|
4097
4152
|
if (!e)
|
|
@@ -4103,58 +4158,58 @@ function Le(t, e, r = Error) {
|
|
|
4103
4158
|
}
|
|
4104
4159
|
return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
|
|
4105
4160
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4106
|
-
},
|
|
4161
|
+
}, Qs(o, r), o;
|
|
4107
4162
|
}
|
|
4108
4163
|
var Un = {
|
|
4109
|
-
createError:
|
|
4110
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4164
|
+
createError: Ne,
|
|
4165
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ne(
|
|
4111
4166
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
4112
4167
|
"'%s' () is already defined, specify an expose option"
|
|
4113
4168
|
),
|
|
4114
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4169
|
+
AVV_ERR_CALLBACK_NOT_FN: Ne(
|
|
4115
4170
|
"AVV_ERR_CALLBACK_NOT_FN",
|
|
4116
4171
|
"Callback for '%s' hook is not a function. Received: '%s'"
|
|
4117
4172
|
),
|
|
4118
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4173
|
+
AVV_ERR_PLUGIN_NOT_VALID: Ne(
|
|
4119
4174
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
4120
4175
|
"Plugin must be a function or a promise. Received: '%s'"
|
|
4121
4176
|
),
|
|
4122
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4177
|
+
AVV_ERR_ROOT_PLG_BOOTED: Ne(
|
|
4123
4178
|
"AVV_ERR_PLUGIN_NOT_VALID",
|
|
4124
4179
|
"Root plugin has already booted"
|
|
4125
4180
|
),
|
|
4126
|
-
AVV_ERR_PARENT_PLG_LOADED:
|
|
4181
|
+
AVV_ERR_PARENT_PLG_LOADED: Ne(
|
|
4127
4182
|
"AVV_ERR_PARENT_PLG_LOADED",
|
|
4128
4183
|
"Impossible to load '%s' plugin because the parent '%s' was already loaded"
|
|
4129
4184
|
),
|
|
4130
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4185
|
+
AVV_ERR_READY_TIMEOUT: Ne(
|
|
4131
4186
|
"AVV_ERR_READY_TIMEOUT",
|
|
4132
4187
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4133
4188
|
)
|
|
4134
|
-
},
|
|
4189
|
+
}, Gs = function t(e, r, o) {
|
|
4135
4190
|
r === void 0 && (r = ""), o || (o = {});
|
|
4136
4191
|
var s = function(p) {
|
|
4137
|
-
var
|
|
4192
|
+
var b = {
|
|
4138
4193
|
"│": "|",
|
|
4139
4194
|
"└": "`",
|
|
4140
4195
|
"├": "+",
|
|
4141
4196
|
"─": "-",
|
|
4142
4197
|
"┬": "-"
|
|
4143
4198
|
};
|
|
4144
|
-
return o.unicode === !1 ?
|
|
4199
|
+
return o.unicode === !1 ? b[p] : p;
|
|
4145
4200
|
};
|
|
4146
4201
|
typeof e == "string" && (e = { label: e });
|
|
4147
4202
|
var u = e.nodes || [], l = (e.label || "").split(`
|
|
4148
|
-
`),
|
|
4203
|
+
`), c = `
|
|
4149
4204
|
` + r + (u.length ? s("│") : " ") + " ";
|
|
4150
|
-
return r + l.join(
|
|
4151
|
-
` + u.map(function(p,
|
|
4152
|
-
var g =
|
|
4205
|
+
return r + l.join(c) + `
|
|
4206
|
+
` + u.map(function(p, b) {
|
|
4207
|
+
var g = b === u.length - 1, m = p.nodes && p.nodes.length, E = r + (g ? " " : s("│")) + " ";
|
|
4153
4208
|
return r + s(g ? "└" : "├") + s("─") + s(m ? "┬" : "─") + " " + t(p, E, o).slice(r.length + 2);
|
|
4154
4209
|
}).join("");
|
|
4155
4210
|
};
|
|
4156
|
-
const
|
|
4157
|
-
let
|
|
4211
|
+
const zs = Gs, jr = Symbol("avvio.TimeTree.untrackNode"), zt = Symbol("avvio.TimeTree.trackNode"), Vr = Symbol("avvio.TimeTree.getParent"), Mr = Symbol("avvio.TimeTree.getNode"), qr = Symbol("avvio.TimeTree.addNode");
|
|
4212
|
+
let Ks = class {
|
|
4158
4213
|
constructor() {
|
|
4159
4214
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4160
4215
|
}
|
|
@@ -4187,14 +4242,14 @@ let Qs = class {
|
|
|
4187
4242
|
start: o,
|
|
4188
4243
|
nodes: []
|
|
4189
4244
|
}, this[zt](this.root), this.root.id;
|
|
4190
|
-
const u = this[Vr](e), l = `${r}-${Math.random()}`,
|
|
4245
|
+
const u = this[Vr](e), l = `${r}-${Math.random()}`, c = {
|
|
4191
4246
|
id: l,
|
|
4192
4247
|
parent: e,
|
|
4193
4248
|
start: o,
|
|
4194
4249
|
label: r,
|
|
4195
4250
|
nodes: []
|
|
4196
4251
|
};
|
|
4197
|
-
return u.nodes.push(
|
|
4252
|
+
return u.nodes.push(c), this[zt](c), l;
|
|
4198
4253
|
}
|
|
4199
4254
|
start(e, r, o = Date.now()) {
|
|
4200
4255
|
return this[qr](e, r, o);
|
|
@@ -4208,11 +4263,11 @@ let Qs = class {
|
|
|
4208
4263
|
}
|
|
4209
4264
|
prittyPrint() {
|
|
4210
4265
|
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());
|
|
4211
|
-
return
|
|
4266
|
+
return zs(r);
|
|
4212
4267
|
}
|
|
4213
4268
|
};
|
|
4214
|
-
var
|
|
4215
|
-
function
|
|
4269
|
+
var Hs = Ks, Er = { exports: {} }, ur = { exports: {} }, Kt, Qr;
|
|
4270
|
+
function Ws() {
|
|
4216
4271
|
if (Qr)
|
|
4217
4272
|
return Kt;
|
|
4218
4273
|
Qr = 1;
|
|
@@ -4223,7 +4278,7 @@ function zs() {
|
|
|
4223
4278
|
if (E === "string" && g.length > 0)
|
|
4224
4279
|
return l(g);
|
|
4225
4280
|
if (E === "number" && isFinite(g))
|
|
4226
|
-
return m.long ? p(g) :
|
|
4281
|
+
return m.long ? p(g) : c(g);
|
|
4227
4282
|
throw new Error(
|
|
4228
4283
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(g)
|
|
4229
4284
|
);
|
|
@@ -4280,22 +4335,22 @@ function zs() {
|
|
|
4280
4335
|
}
|
|
4281
4336
|
}
|
|
4282
4337
|
}
|
|
4283
|
-
function
|
|
4338
|
+
function c(g) {
|
|
4284
4339
|
var m = Math.abs(g);
|
|
4285
4340
|
return m >= o ? Math.round(g / o) + "d" : m >= r ? Math.round(g / r) + "h" : m >= e ? Math.round(g / e) + "m" : m >= t ? Math.round(g / t) + "s" : g + "ms";
|
|
4286
4341
|
}
|
|
4287
4342
|
function p(g) {
|
|
4288
4343
|
var m = Math.abs(g);
|
|
4289
|
-
return m >= o ?
|
|
4344
|
+
return m >= o ? b(g, m, o, "day") : m >= r ? b(g, m, r, "hour") : m >= e ? b(g, m, e, "minute") : m >= t ? b(g, m, t, "second") : g + " ms";
|
|
4290
4345
|
}
|
|
4291
|
-
function
|
|
4292
|
-
var
|
|
4293
|
-
return Math.round(g / E) + " " + F + (
|
|
4346
|
+
function b(g, m, E, F) {
|
|
4347
|
+
var L = m >= E * 1.5;
|
|
4348
|
+
return Math.round(g / E) + " " + F + (L ? "s" : "");
|
|
4294
4349
|
}
|
|
4295
4350
|
return Kt;
|
|
4296
4351
|
}
|
|
4297
|
-
function
|
|
4298
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize =
|
|
4352
|
+
function Js(t) {
|
|
4353
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ws(), r.destroy = b, Object.keys(t).forEach((g) => {
|
|
4299
4354
|
r[g] = t[g];
|
|
4300
4355
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4301
4356
|
function e(g) {
|
|
@@ -4306,7 +4361,7 @@ function Ks(t) {
|
|
|
4306
4361
|
}
|
|
4307
4362
|
r.selectColor = e;
|
|
4308
4363
|
function r(g) {
|
|
4309
|
-
let m, E = null, F,
|
|
4364
|
+
let m, E = null, F, L;
|
|
4310
4365
|
function P(...K) {
|
|
4311
4366
|
if (!P.enabled)
|
|
4312
4367
|
return;
|
|
@@ -4328,7 +4383,7 @@ function Ks(t) {
|
|
|
4328
4383
|
return P.namespace = g, P.useColors = r.useColors(), P.color = r.selectColor(g), P.extend = o, P.destroy = r.destroy, Object.defineProperty(P, "enabled", {
|
|
4329
4384
|
enumerable: !0,
|
|
4330
4385
|
configurable: !1,
|
|
4331
|
-
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces,
|
|
4386
|
+
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, L = r.enabled(g)), L),
|
|
4332
4387
|
set: (K) => {
|
|
4333
4388
|
E = K;
|
|
4334
4389
|
}
|
|
@@ -4347,8 +4402,8 @@ function Ks(t) {
|
|
|
4347
4402
|
}
|
|
4348
4403
|
function u() {
|
|
4349
4404
|
const g = [
|
|
4350
|
-
...r.names.map(
|
|
4351
|
-
...r.skips.map(
|
|
4405
|
+
...r.names.map(c),
|
|
4406
|
+
...r.skips.map(c).map((m) => "-" + m)
|
|
4352
4407
|
].join(",");
|
|
4353
4408
|
return r.enable(""), g;
|
|
4354
4409
|
}
|
|
@@ -4364,18 +4419,18 @@ function Ks(t) {
|
|
|
4364
4419
|
return !0;
|
|
4365
4420
|
return !1;
|
|
4366
4421
|
}
|
|
4367
|
-
function
|
|
4422
|
+
function c(g) {
|
|
4368
4423
|
return g.toString().substring(2, g.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
4369
4424
|
}
|
|
4370
4425
|
function p(g) {
|
|
4371
4426
|
return g instanceof Error ? g.stack || g.message : g;
|
|
4372
4427
|
}
|
|
4373
|
-
function
|
|
4428
|
+
function b() {
|
|
4374
4429
|
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
4375
4430
|
}
|
|
4376
4431
|
return r.enable(r.load()), r;
|
|
4377
4432
|
}
|
|
4378
|
-
var
|
|
4433
|
+
var Ys = Js;
|
|
4379
4434
|
(function(t, e) {
|
|
4380
4435
|
e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
|
|
4381
4436
|
let p = !1;
|
|
@@ -4470,12 +4525,12 @@ var Hs = Ks;
|
|
|
4470
4525
|
function o(p) {
|
|
4471
4526
|
if (p[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + p[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
|
|
4472
4527
|
return;
|
|
4473
|
-
const
|
|
4474
|
-
p.splice(1, 0,
|
|
4528
|
+
const b = "color: " + this.color;
|
|
4529
|
+
p.splice(1, 0, b, "color: inherit");
|
|
4475
4530
|
let g = 0, m = 0;
|
|
4476
4531
|
p[0].replace(/%[a-zA-Z%]/g, (E) => {
|
|
4477
4532
|
E !== "%%" && (g++, E === "%c" && (m = g));
|
|
4478
|
-
}), p.splice(m, 0,
|
|
4533
|
+
}), p.splice(m, 0, b);
|
|
4479
4534
|
}
|
|
4480
4535
|
e.log = console.debug || console.log || (() => {
|
|
4481
4536
|
});
|
|
@@ -4499,33 +4554,33 @@ var Hs = Ks;
|
|
|
4499
4554
|
} catch {
|
|
4500
4555
|
}
|
|
4501
4556
|
}
|
|
4502
|
-
t.exports =
|
|
4503
|
-
const { formatters:
|
|
4504
|
-
|
|
4557
|
+
t.exports = Ys(e);
|
|
4558
|
+
const { formatters: c } = t.exports;
|
|
4559
|
+
c.j = function(p) {
|
|
4505
4560
|
try {
|
|
4506
4561
|
return JSON.stringify(p);
|
|
4507
|
-
} catch (
|
|
4508
|
-
return "[UnexpectedJSONParseError]: " +
|
|
4562
|
+
} catch (b) {
|
|
4563
|
+
return "[UnexpectedJSONParseError]: " + b.message;
|
|
4509
4564
|
}
|
|
4510
4565
|
};
|
|
4511
4566
|
})(ur, ur.exports);
|
|
4512
4567
|
var $n = ur.exports;
|
|
4513
|
-
const
|
|
4514
|
-
function
|
|
4568
|
+
const Xs = fn, Zs = bn.EventEmitter, ea = kt.inherits, Z = $n("avvio"), { AVV_ERR_READY_TIMEOUT: ta } = Un, Ht = Symbol.for("plugin-meta");
|
|
4569
|
+
function ra(t, e) {
|
|
4515
4570
|
return t[Ht] && t[Ht].name ? t[Ht].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4516
4571
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4517
4572
|
}
|
|
4518
|
-
function
|
|
4573
|
+
function na() {
|
|
4519
4574
|
const t = {};
|
|
4520
4575
|
return t.promise = new Promise((e, r) => {
|
|
4521
4576
|
t.resolve = e, t.reject = r;
|
|
4522
4577
|
}), t;
|
|
4523
4578
|
}
|
|
4524
|
-
function
|
|
4525
|
-
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 =
|
|
4579
|
+
function rt(t, e, r, o, s) {
|
|
4580
|
+
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 = ra(e, r), this.isAfter = o, this.q = Xs(t, ia, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4526
4581
|
}
|
|
4527
|
-
|
|
4528
|
-
|
|
4582
|
+
ea(rt, Zs);
|
|
4583
|
+
rt.prototype.exec = function(t, e) {
|
|
4529
4584
|
const r = this.func;
|
|
4530
4585
|
let o = !1;
|
|
4531
4586
|
const s = this.name;
|
|
@@ -4552,16 +4607,16 @@ tt.prototype.exec = function(t, e) {
|
|
|
4552
4607
|
};
|
|
4553
4608
|
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), u = setTimeout(function() {
|
|
4554
4609
|
Z("timed out", s), u = null;
|
|
4555
|
-
const p = new
|
|
4610
|
+
const p = new ta(s);
|
|
4556
4611
|
p.fn = r, l(p);
|
|
4557
4612
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4558
|
-
const
|
|
4559
|
-
|
|
4613
|
+
const c = r(this.server, this.opts, l);
|
|
4614
|
+
c && typeof c.then == "function" && (Z("exec: resolving promise", s), c.then(
|
|
4560
4615
|
() => O.process.nextTick(l),
|
|
4561
4616
|
(p) => O.process.nextTick(l, p)
|
|
4562
4617
|
));
|
|
4563
4618
|
};
|
|
4564
|
-
|
|
4619
|
+
rt.prototype.loadedSoFar = function() {
|
|
4565
4620
|
if (this.loaded)
|
|
4566
4621
|
return Promise.resolve();
|
|
4567
4622
|
const t = () => {
|
|
@@ -4570,12 +4625,12 @@ tt.prototype.loadedSoFar = function() {
|
|
|
4570
4625
|
}), this.q.resume();
|
|
4571
4626
|
};
|
|
4572
4627
|
let e;
|
|
4573
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4628
|
+
return this._promise ? e = Promise.resolve() : (this._promise = na(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4574
4629
|
};
|
|
4575
|
-
|
|
4630
|
+
rt.prototype.enqueue = function(t, e) {
|
|
4576
4631
|
Z("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4577
4632
|
};
|
|
4578
|
-
|
|
4633
|
+
rt.prototype.finish = function(t, e) {
|
|
4579
4634
|
Z("finish", this.name, t);
|
|
4580
4635
|
const r = () => {
|
|
4581
4636
|
this.loaded || (Z("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4595,12 +4650,12 @@ tt.prototype.finish = function(t, e) {
|
|
|
4595
4650
|
r();
|
|
4596
4651
|
else
|
|
4597
4652
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4598
|
-
Z("drain", this.name), this.q.drain =
|
|
4653
|
+
Z("drain", this.name), this.q.drain = oa, queueMicrotask(o);
|
|
4599
4654
|
};
|
|
4600
4655
|
};
|
|
4601
4656
|
queueMicrotask(o), this.q.resume();
|
|
4602
4657
|
};
|
|
4603
|
-
function
|
|
4658
|
+
function ia(t, e) {
|
|
4604
4659
|
const r = this;
|
|
4605
4660
|
O.process.nextTick(Ir.bind(r), t, e);
|
|
4606
4661
|
}
|
|
@@ -4618,60 +4673,60 @@ function Ir(t, e) {
|
|
|
4618
4673
|
});
|
|
4619
4674
|
});
|
|
4620
4675
|
}
|
|
4621
|
-
function
|
|
4676
|
+
function oa() {
|
|
4622
4677
|
}
|
|
4623
|
-
Er.exports =
|
|
4678
|
+
Er.exports = rt;
|
|
4624
4679
|
Er.exports.loadPlugin = Ir;
|
|
4625
|
-
var
|
|
4626
|
-
const Gr = fn,
|
|
4680
|
+
var sa = Er.exports;
|
|
4681
|
+
const Gr = fn, aa = bn.EventEmitter, ua = kt.inherits, {
|
|
4627
4682
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Wt,
|
|
4628
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
4629
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4630
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4631
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4632
|
-
} = Un,
|
|
4633
|
-
function
|
|
4634
|
-
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready",
|
|
4683
|
+
AVV_ERR_CALLBACK_NOT_FN: ft,
|
|
4684
|
+
AVV_ERR_PLUGIN_NOT_VALID: ca,
|
|
4685
|
+
AVV_ERR_ROOT_PLG_BOOTED: fa,
|
|
4686
|
+
AVV_ERR_READY_TIMEOUT: la
|
|
4687
|
+
} = Un, ha = Hs, cr = sa, et = $n("avvio"), _t = Symbol("kAvvio"), Jt = Symbol("kThenifyDoNotWrap");
|
|
4688
|
+
function pa(t, e, r) {
|
|
4689
|
+
const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", c = o.onClose || "onClose", p = o.close || "close";
|
|
4635
4690
|
if (t[s])
|
|
4636
4691
|
throw new Wt(s);
|
|
4637
4692
|
if (t[u])
|
|
4638
4693
|
throw new Wt(u);
|
|
4639
4694
|
if (t[l])
|
|
4640
4695
|
throw new Wt(l);
|
|
4641
|
-
t[s] = function(
|
|
4642
|
-
return r.use(
|
|
4643
|
-
}, Object.defineProperty(t, "then", { get: Dn.bind(r) }), t[_t] = !0, t[u] = function(
|
|
4644
|
-
return typeof
|
|
4645
|
-
}, t[l] = function(
|
|
4646
|
-
if (
|
|
4647
|
-
throw new
|
|
4648
|
-
return r.ready(
|
|
4649
|
-
}, t[
|
|
4650
|
-
if (typeof
|
|
4651
|
-
throw new
|
|
4652
|
-
return r.onClose(
|
|
4653
|
-
}, t[p] = function(
|
|
4654
|
-
if (
|
|
4655
|
-
throw new
|
|
4656
|
-
return
|
|
4696
|
+
t[s] = function(b, g) {
|
|
4697
|
+
return r.use(b, g), this;
|
|
4698
|
+
}, Object.defineProperty(t, "then", { get: Dn.bind(r) }), t[_t] = !0, t[u] = function(b) {
|
|
4699
|
+
return typeof b != "function" ? r._loadRegistered() : (r.after(Yt(b, this)), this);
|
|
4700
|
+
}, t[l] = function(b) {
|
|
4701
|
+
if (b && typeof b != "function")
|
|
4702
|
+
throw new ft(l, typeof b);
|
|
4703
|
+
return r.ready(b ? Yt(b, this) : void 0);
|
|
4704
|
+
}, t[c] = function(b) {
|
|
4705
|
+
if (typeof b != "function")
|
|
4706
|
+
throw new ft(c, typeof b);
|
|
4707
|
+
return r.onClose(wa(b, this)), this;
|
|
4708
|
+
}, t[p] = function(b) {
|
|
4709
|
+
if (b && typeof b != "function")
|
|
4710
|
+
throw new ft(p, typeof b);
|
|
4711
|
+
return b ? (r.close(Yt(b, this)), this) : r.close();
|
|
4657
4712
|
};
|
|
4658
4713
|
}
|
|
4659
4714
|
function ee(t, e, r) {
|
|
4660
4715
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof ee)) {
|
|
4661
4716
|
const o = new ee(t, e, r);
|
|
4662
|
-
return t &&
|
|
4717
|
+
return t && pa(t, e, o), o;
|
|
4663
4718
|
}
|
|
4664
|
-
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
|
|
4719
|
+
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 ha(), this._readyQ = Gr(this, jn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4665
4720
|
this.emit("start"), this._readyQ.drain = zr;
|
|
4666
|
-
}, this._closeQ = Gr(this,
|
|
4721
|
+
}, this._closeQ = Gr(this, ma, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4667
4722
|
this.emit("close"), this._closeQ.drain = zr;
|
|
4668
|
-
}, this._doStart = null, this._root = new cr(this,
|
|
4723
|
+
}, this._doStart = null, this._root = new cr(this, da.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
|
|
4669
4724
|
const l = this.pluginTree.start(null, s, u);
|
|
4670
|
-
this._root.once("loaded", (
|
|
4671
|
-
this.pluginTree.stop(l,
|
|
4725
|
+
this._root.once("loaded", (c, p, b) => {
|
|
4726
|
+
this.pluginTree.stop(l, b);
|
|
4672
4727
|
});
|
|
4673
4728
|
}), cr.loadPlugin.call(this, this._root, (o) => {
|
|
4674
|
-
|
|
4729
|
+
et("root plugin ready");
|
|
4675
4730
|
try {
|
|
4676
4731
|
this.emit("preReady"), this._root = null;
|
|
4677
4732
|
} catch (s) {
|
|
@@ -4685,19 +4740,19 @@ function ee(t, e, r) {
|
|
|
4685
4740
|
this._readyQ.resume();
|
|
4686
4741
|
});
|
|
4687
4742
|
}
|
|
4688
|
-
function
|
|
4743
|
+
function da(t, e, r) {
|
|
4689
4744
|
this._doStart = r, e.autostart && this.start();
|
|
4690
4745
|
}
|
|
4691
|
-
|
|
4746
|
+
ua(ee, aa);
|
|
4692
4747
|
ee.prototype.start = function() {
|
|
4693
4748
|
return this.started = !0, O.process.nextTick(this._doStart), this;
|
|
4694
4749
|
};
|
|
4695
4750
|
ee.prototype.override = function(t, e, r) {
|
|
4696
4751
|
return t;
|
|
4697
4752
|
};
|
|
4698
|
-
function
|
|
4753
|
+
function ya(t) {
|
|
4699
4754
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4700
|
-
throw new
|
|
4755
|
+
throw new ca(typeof t);
|
|
4701
4756
|
return t;
|
|
4702
4757
|
}
|
|
4703
4758
|
ee.prototype[_t] = !0;
|
|
@@ -4710,12 +4765,12 @@ ee.prototype._loadRegistered = function() {
|
|
|
4710
4765
|
};
|
|
4711
4766
|
Object.defineProperty(ee.prototype, "then", { get: Dn });
|
|
4712
4767
|
ee.prototype._addPlugin = function(t, e, r) {
|
|
4713
|
-
if (t =
|
|
4714
|
-
throw new
|
|
4768
|
+
if (t = ya(t), e = e || {}, this.booted)
|
|
4769
|
+
throw new fa();
|
|
4715
4770
|
const o = this._current[0], s = new cr(this, t, e, r);
|
|
4716
|
-
if (s.once("start", (u, l,
|
|
4717
|
-
const p = this.pluginTree.start(o.name, l,
|
|
4718
|
-
s.once("loaded", (
|
|
4771
|
+
if (s.once("start", (u, l, c) => {
|
|
4772
|
+
const p = this.pluginTree.start(o.name, l, c);
|
|
4773
|
+
s.once("loaded", (b, g, m) => {
|
|
4719
4774
|
this.pluginTree.stop(p, m);
|
|
4720
4775
|
});
|
|
4721
4776
|
}), o.loaded)
|
|
@@ -4746,7 +4801,7 @@ ee.prototype.close = function(t) {
|
|
|
4746
4801
|
let e;
|
|
4747
4802
|
if (t) {
|
|
4748
4803
|
if (typeof t != "function")
|
|
4749
|
-
throw new
|
|
4804
|
+
throw new ft("close", typeof t);
|
|
4750
4805
|
} else
|
|
4751
4806
|
e = new Promise(function(r, o) {
|
|
4752
4807
|
t = function(s) {
|
|
@@ -4762,15 +4817,15 @@ ee.prototype.close = function(t) {
|
|
|
4762
4817
|
ee.prototype.ready = function(t) {
|
|
4763
4818
|
if (t) {
|
|
4764
4819
|
if (typeof t != "function")
|
|
4765
|
-
throw new
|
|
4820
|
+
throw new ft("ready", typeof t);
|
|
4766
4821
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
4767
4822
|
return;
|
|
4768
4823
|
}
|
|
4769
4824
|
return new Promise((e, r) => {
|
|
4770
4825
|
this._readyQ.push(s), this.start();
|
|
4771
4826
|
const o = this._current[0].server;
|
|
4772
|
-
function s(u, l,
|
|
4773
|
-
u ? r(u) : e(o), O.process.nextTick(
|
|
4827
|
+
function s(u, l, c) {
|
|
4828
|
+
u ? r(u) : e(o), O.process.nextTick(c);
|
|
4774
4829
|
}
|
|
4775
4830
|
});
|
|
4776
4831
|
};
|
|
@@ -4784,14 +4839,14 @@ function zr() {
|
|
|
4784
4839
|
}
|
|
4785
4840
|
function Dn() {
|
|
4786
4841
|
if (this.booted) {
|
|
4787
|
-
|
|
4842
|
+
et("thenify returning null because we are already booted");
|
|
4788
4843
|
return;
|
|
4789
4844
|
}
|
|
4790
4845
|
if (this[Jt]) {
|
|
4791
4846
|
this[Jt] = !1;
|
|
4792
4847
|
return;
|
|
4793
4848
|
}
|
|
4794
|
-
return
|
|
4849
|
+
return et("thenify"), (t, e) => this._loadRegistered().then(() => (this[Jt] = !0, t(this._server)), e);
|
|
4795
4850
|
}
|
|
4796
4851
|
function jn(t, e) {
|
|
4797
4852
|
const r = this._server, o = this._error;
|
|
@@ -4806,33 +4861,33 @@ function jn(t, e) {
|
|
|
4806
4861
|
};
|
|
4807
4862
|
t.length === 2 ? t(o, u) : t(o, r, u);
|
|
4808
4863
|
} else
|
|
4809
|
-
|
|
4864
|
+
ga.call(this, t, o, r, e);
|
|
4810
4865
|
}
|
|
4811
|
-
function
|
|
4866
|
+
function ga(t, e, r, o) {
|
|
4812
4867
|
const s = t.name;
|
|
4813
|
-
|
|
4868
|
+
et("setting up ready timeout", s, this._timeout);
|
|
4814
4869
|
let u = setTimeout(() => {
|
|
4815
|
-
|
|
4816
|
-
const
|
|
4817
|
-
|
|
4870
|
+
et("timed out", s), u = null;
|
|
4871
|
+
const c = new la(s);
|
|
4872
|
+
c.fn = t, this._error = c, o(c);
|
|
4818
4873
|
}, this._timeout);
|
|
4819
4874
|
t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
|
|
4820
|
-
function l(
|
|
4821
|
-
u && (clearTimeout(u), this._error =
|
|
4875
|
+
function l(c) {
|
|
4876
|
+
u && (clearTimeout(u), this._error = c, o(this._error));
|
|
4822
4877
|
}
|
|
4823
4878
|
}
|
|
4824
|
-
function
|
|
4879
|
+
function ma(t, e) {
|
|
4825
4880
|
const r = this._server, o = t[this._isOnCloseHandlerKey];
|
|
4826
4881
|
if (t.length === 0 || t.length === 1) {
|
|
4827
4882
|
let s;
|
|
4828
|
-
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (
|
|
4883
|
+
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (et("resolving close/onClose promise"), s.then(
|
|
4829
4884
|
() => O.process.nextTick(e),
|
|
4830
4885
|
(u) => O.process.nextTick(e, u)
|
|
4831
4886
|
)) : O.process.nextTick(e);
|
|
4832
4887
|
} else
|
|
4833
4888
|
t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
|
|
4834
4889
|
}
|
|
4835
|
-
function
|
|
4890
|
+
function wa(t, e) {
|
|
4836
4891
|
return r.bind(e);
|
|
4837
4892
|
function r(o, s) {
|
|
4838
4893
|
let u;
|
|
@@ -4862,18 +4917,18 @@ yr.exports.express = function(t) {
|
|
|
4862
4917
|
}
|
|
4863
4918
|
});
|
|
4864
4919
|
};
|
|
4865
|
-
var
|
|
4866
|
-
const
|
|
4867
|
-
function
|
|
4868
|
-
const o = e ? "https://grpc-
|
|
4869
|
-
return s.use(
|
|
4920
|
+
var ba = yr.exports;
|
|
4921
|
+
const va = /* @__PURE__ */ Zn(ba);
|
|
4922
|
+
function Da(t, e = !0, r = !0) {
|
|
4923
|
+
const o = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = va(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4924
|
+
return s.use(Ri), s.use(Ti, { sdkKey: t, host: o }), s.use(Pi), s.use(ki), s.use(ho), s.use(Zi), r && s.after(async (u, l, c) => {
|
|
4870
4925
|
if (u)
|
|
4871
4926
|
throw u;
|
|
4872
|
-
await l.sdk.initializeApp(),
|
|
4927
|
+
await l.sdk.initializeApp(), c();
|
|
4873
4928
|
}), s.onClose(() => {
|
|
4874
4929
|
console.log("close");
|
|
4875
4930
|
}), s;
|
|
4876
4931
|
}
|
|
4877
4932
|
export {
|
|
4878
|
-
|
|
4933
|
+
Da as StreamLayer
|
|
4879
4934
|
};
|