@streamlayer/sdk-web 0.31.2 → 0.32.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 +10 -10
- package/lib/es/index.js +1225 -1193
- package/package.json +11 -10
package/lib/es/index.js
CHANGED
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import { QuestionType as fe, QuestionStatus as dt, SilenceSetting as oi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
|
-
import { SdkOverlayType as
|
|
3
|
+
import { SdkOverlayType as Fe } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
4
|
import { computed as ln, map as si, atom as kt, onMount as fn } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
|
+
import { nanoid as ai } from "nanoid";
|
|
7
8
|
import { ConnectError as Br, Code as Lr, createPromiseClient as Pr } from "@connectrpc/connect";
|
|
8
9
|
import { createGrpcWebTransport as Rr } from "@connectrpc/connect-web";
|
|
9
10
|
import { nanoquery as Nr } from "@nanostores/query";
|
|
10
|
-
import { Events as
|
|
11
|
+
import { Events as ui } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
12
|
import { Client as yt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
|
-
import { Users as
|
|
13
|
-
import { pino as
|
|
14
|
-
import { Feed as
|
|
13
|
+
import { Users as yr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
+
import { pino as ci } from "pino";
|
|
15
|
+
import { Feed as _e } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
16
|
import { Leaderboard as dn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
17
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
18
|
-
function
|
|
18
|
+
import { LinksClient as li } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
19
|
+
function fi(t) {
|
|
19
20
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
20
21
|
}
|
|
21
22
|
var hn = { exports: {} }, Y = hn.exports = {}, ye, ge;
|
|
22
|
-
function
|
|
23
|
+
function nr() {
|
|
23
24
|
throw new Error("setTimeout has not been defined");
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function ir() {
|
|
26
27
|
throw new Error("clearTimeout has not been defined");
|
|
27
28
|
}
|
|
28
29
|
(function() {
|
|
29
30
|
try {
|
|
30
|
-
typeof setTimeout == "function" ? ye = setTimeout : ye =
|
|
31
|
+
typeof setTimeout == "function" ? ye = setTimeout : ye = nr;
|
|
31
32
|
} catch {
|
|
32
|
-
ye =
|
|
33
|
+
ye = nr;
|
|
33
34
|
}
|
|
34
35
|
try {
|
|
35
|
-
typeof clearTimeout == "function" ? ge = clearTimeout : ge =
|
|
36
|
+
typeof clearTimeout == "function" ? ge = clearTimeout : ge = ir;
|
|
36
37
|
} catch {
|
|
37
|
-
ge =
|
|
38
|
+
ge = ir;
|
|
38
39
|
}
|
|
39
40
|
})();
|
|
40
41
|
function pn(t) {
|
|
41
42
|
if (ye === setTimeout)
|
|
42
43
|
return setTimeout(t, 0);
|
|
43
|
-
if ((ye ===
|
|
44
|
+
if ((ye === nr || !ye) && setTimeout)
|
|
44
45
|
return ye = setTimeout, setTimeout(t, 0);
|
|
45
46
|
try {
|
|
46
47
|
return ye(t, 0);
|
|
@@ -52,10 +53,10 @@ function pn(t) {
|
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
|
-
function
|
|
56
|
+
function di(t) {
|
|
56
57
|
if (ge === clearTimeout)
|
|
57
58
|
return clearTimeout(t);
|
|
58
|
-
if ((ge ===
|
|
59
|
+
if ((ge === ir || !ge) && clearTimeout)
|
|
59
60
|
return ge = clearTimeout, clearTimeout(t);
|
|
60
61
|
try {
|
|
61
62
|
return ge(t);
|
|
@@ -67,20 +68,20 @@ function fi(t) {
|
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
var
|
|
71
|
-
function
|
|
72
|
-
!et || !Ue || (et = !1, Ue.length ?
|
|
71
|
+
var Oe = [], et = !1, Ue, bt = -1;
|
|
72
|
+
function hi() {
|
|
73
|
+
!et || !Ue || (et = !1, Ue.length ? Oe = Ue.concat(Oe) : bt = -1, Oe.length && yn());
|
|
73
74
|
}
|
|
74
75
|
function yn() {
|
|
75
76
|
if (!et) {
|
|
76
|
-
var t = pn(
|
|
77
|
+
var t = pn(hi);
|
|
77
78
|
et = !0;
|
|
78
|
-
for (var e =
|
|
79
|
-
for (Ue =
|
|
79
|
+
for (var e = Oe.length; e; ) {
|
|
80
|
+
for (Ue = Oe, Oe = []; ++bt < e; )
|
|
80
81
|
Ue && Ue[bt].run();
|
|
81
|
-
bt = -1, e =
|
|
82
|
+
bt = -1, e = Oe.length;
|
|
82
83
|
}
|
|
83
|
-
Ue = null, et = !1,
|
|
84
|
+
Ue = null, et = !1, di(t);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
86
87
|
Y.nextTick = function(t) {
|
|
@@ -88,7 +89,7 @@ Y.nextTick = function(t) {
|
|
|
88
89
|
if (arguments.length > 1)
|
|
89
90
|
for (var r = 1; r < arguments.length; r++)
|
|
90
91
|
e[r - 1] = arguments[r];
|
|
91
|
-
|
|
92
|
+
Oe.push(new gn(t, e)), Oe.length === 1 && !et && pn(yn);
|
|
92
93
|
};
|
|
93
94
|
function gn(t, e) {
|
|
94
95
|
this.fun = t, this.array = e;
|
|
@@ -128,9 +129,9 @@ Y.chdir = function(t) {
|
|
|
128
129
|
Y.umask = function() {
|
|
129
130
|
return 0;
|
|
130
131
|
};
|
|
131
|
-
var
|
|
132
|
-
const
|
|
133
|
-
class
|
|
132
|
+
var pi = hn.exports;
|
|
133
|
+
const P = /* @__PURE__ */ fi(pi);
|
|
134
|
+
class yi {
|
|
134
135
|
}
|
|
135
136
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
136
137
|
class Bt {
|
|
@@ -149,7 +150,7 @@ class Bt {
|
|
|
149
150
|
return this.store;
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
|
-
const
|
|
153
|
+
const gi = (t) => {
|
|
153
154
|
const e = Object.keys(t);
|
|
154
155
|
return ln(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((i, s) => [i, r[s]])));
|
|
155
156
|
};
|
|
@@ -160,16 +161,16 @@ class tt extends Bt {
|
|
|
160
161
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
161
162
|
unsubscribe = () => this.getStore().off();
|
|
162
163
|
}
|
|
163
|
-
const
|
|
164
|
+
const Te = (t) => si(t);
|
|
164
165
|
var Ee;
|
|
165
166
|
(function(t) {
|
|
166
167
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
167
168
|
})(Ee || (Ee = {}));
|
|
168
|
-
const
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
169
|
+
const mi = {
|
|
170
|
+
[Fe.BETTING]: "betting",
|
|
171
|
+
[Fe.GAMES]: "games",
|
|
172
|
+
[Fe.PUBLIC_CHAT]: "publicChat",
|
|
173
|
+
[Fe.TWITTER]: "twitter"
|
|
173
174
|
};
|
|
174
175
|
var rt;
|
|
175
176
|
(function(t) {
|
|
@@ -183,7 +184,7 @@ class mn {
|
|
|
183
184
|
listeners = /* @__PURE__ */ new Set();
|
|
184
185
|
settingsKey;
|
|
185
186
|
constructor({ settings: e, ...r }, i) {
|
|
186
|
-
this.settingsKey =
|
|
187
|
+
this.settingsKey = mi[r.type], this.status = kt(rt.Suspended), this.config = new tt(Te(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new tt(Te(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new tt(Te({}), `feature:settings:${this.settingsKey}`), this.source = i;
|
|
187
188
|
}
|
|
188
189
|
get featureConfig() {
|
|
189
190
|
return this.config.getStore();
|
|
@@ -207,9 +208,9 @@ class mn {
|
|
|
207
208
|
if (e?.overlaySettings?.case !== void 0 && e?.overlaySettings.case === this.settingsKey) {
|
|
208
209
|
const s = e.overlaySettings.value;
|
|
209
210
|
if (s !== void 0) {
|
|
210
|
-
let
|
|
211
|
-
for (
|
|
212
|
-
s[
|
|
211
|
+
let a;
|
|
212
|
+
for (a in s)
|
|
213
|
+
s[a] !== 0 && s[a] !== "" && this.settings.setValue(a, s[a]);
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
};
|
|
@@ -245,8 +246,8 @@ class de extends Bt {
|
|
|
245
246
|
atomStore;
|
|
246
247
|
constructor(e, r, i) {
|
|
247
248
|
super(e, `api:${r}`), this.atomStore = kt(), i && e.subscribe((s) => {
|
|
248
|
-
const
|
|
249
|
-
|
|
249
|
+
const a = this.atomStore.get(), c = i(s, a);
|
|
250
|
+
a !== c && this.atomStore.set(c);
|
|
250
251
|
});
|
|
251
252
|
}
|
|
252
253
|
getAtomStore = () => this.atomStore;
|
|
@@ -272,7 +273,7 @@ class de extends Bt {
|
|
|
272
273
|
key = () => this.getStore().key;
|
|
273
274
|
off = () => this.getStore().off();
|
|
274
275
|
}
|
|
275
|
-
async function*
|
|
276
|
+
async function* wi(t, e) {
|
|
276
277
|
for await (const r of e) {
|
|
277
278
|
t.response.message = r, t.received_at = Date.now();
|
|
278
279
|
const i = {
|
|
@@ -282,7 +283,7 @@ async function* mi(t, e) {
|
|
|
282
283
|
window.postMessage(i), yield r;
|
|
283
284
|
}
|
|
284
285
|
}
|
|
285
|
-
const
|
|
286
|
+
const bi = () => (t) => async (e) => {
|
|
286
287
|
const r = {
|
|
287
288
|
name: e.url,
|
|
288
289
|
stream: e.stream,
|
|
@@ -306,7 +307,7 @@ const wi = () => (t) => async (e) => {
|
|
|
306
307
|
};
|
|
307
308
|
return window.postMessage(s), {
|
|
308
309
|
...i,
|
|
309
|
-
message:
|
|
310
|
+
message: wi(r, i.message)
|
|
310
311
|
};
|
|
311
312
|
} else {
|
|
312
313
|
r.request.message = e.message, r.response.message = i.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -334,7 +335,7 @@ var le;
|
|
|
334
335
|
(function(t) {
|
|
335
336
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
336
337
|
})(le || (le = {}));
|
|
337
|
-
class
|
|
338
|
+
class vi {
|
|
338
339
|
params;
|
|
339
340
|
streamCancel;
|
|
340
341
|
method;
|
|
@@ -347,12 +348,12 @@ class bi {
|
|
|
347
348
|
reconnectTimeout;
|
|
348
349
|
attempt = 0;
|
|
349
350
|
constructor(e, r, i, s) {
|
|
350
|
-
const
|
|
351
|
+
const a = {
|
|
351
352
|
status: le.Init,
|
|
352
353
|
ts: /* @__PURE__ */ new Date(),
|
|
353
354
|
log: []
|
|
354
355
|
};
|
|
355
|
-
this.state = new tt(
|
|
356
|
+
this.state = new tt(Te(a), `subscription:${s.name}:state`), this.options = {
|
|
356
357
|
...s,
|
|
357
358
|
reconnectDelay: s.reconnectDelay ?? 1e3,
|
|
358
359
|
reconnectMaxDelay: s.reconnectMaxDelay ?? 3e4,
|
|
@@ -384,8 +385,8 @@ class bi {
|
|
|
384
385
|
headers: this.headers.getValues(),
|
|
385
386
|
signal: this.streamCancel.signal
|
|
386
387
|
}, s = this.method(e, i);
|
|
387
|
-
for await (const
|
|
388
|
-
this.attempt = 0, this.onData(
|
|
388
|
+
for await (const a of s)
|
|
389
|
+
this.attempt = 0, this.onData(a);
|
|
389
390
|
} catch (i) {
|
|
390
391
|
i instanceof Br && i.code != Lr.Canceled && this.onStreamError(i);
|
|
391
392
|
}
|
|
@@ -435,7 +436,14 @@ class bi {
|
|
|
435
436
|
}
|
|
436
437
|
};
|
|
437
438
|
}
|
|
438
|
-
|
|
439
|
+
const Si = () => {
|
|
440
|
+
const t = localStorage.getItem("sl-device-id");
|
|
441
|
+
if (t)
|
|
442
|
+
return t;
|
|
443
|
+
const e = ai();
|
|
444
|
+
return localStorage.setItem("sl-device-id", e), e;
|
|
445
|
+
};
|
|
446
|
+
class Ai {
|
|
439
447
|
toJsonOptions = {
|
|
440
448
|
emitDefaultValues: !1,
|
|
441
449
|
enumAsInteger: !0,
|
|
@@ -453,8 +461,8 @@ class vi {
|
|
|
453
461
|
callbackClients;
|
|
454
462
|
subscriptions;
|
|
455
463
|
constructor(e) {
|
|
456
|
-
this.host = e, this.$headers = new tt(
|
|
457
|
-
"sl-device-id":
|
|
464
|
+
this.host = e, this.$headers = new tt(Te({
|
|
465
|
+
"sl-device-id": Si()
|
|
458
466
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
459
467
|
const [r, i, s] = Nr();
|
|
460
468
|
this.nanoquery = { createFetcherStore: r, createMutatorStore: i, utils: s }, this.transport = Rr({
|
|
@@ -475,16 +483,16 @@ class vi {
|
|
|
475
483
|
const s = this.subscriptions.get(r);
|
|
476
484
|
if (s)
|
|
477
485
|
return s;
|
|
478
|
-
const
|
|
479
|
-
return this.subscriptions.set(r,
|
|
486
|
+
const a = new vi(this.$headers, e, r, i);
|
|
487
|
+
return this.subscriptions.set(r, a), a;
|
|
480
488
|
};
|
|
481
489
|
removeSubscription = (e) => {
|
|
482
490
|
e.disconnect(), this.subscriptions.delete(e.params);
|
|
483
491
|
};
|
|
484
492
|
// cleanup subscriptions
|
|
485
493
|
disconnect = () => {
|
|
486
|
-
for (const [s,
|
|
487
|
-
|
|
494
|
+
for (const [s, a] of this.subscriptions)
|
|
495
|
+
a.disconnect(), this.subscriptions.delete(s);
|
|
488
496
|
this.clients.clear(), this.callbackClients.clear(), this.subscriptions.clear();
|
|
489
497
|
const [e, r, i] = Nr();
|
|
490
498
|
this.nanoquery = { createFetcherStore: e, createMutatorStore: r, utils: i };
|
|
@@ -511,12 +519,12 @@ class vi {
|
|
|
511
519
|
};
|
|
512
520
|
// create unary client, used for query request
|
|
513
521
|
createPromiseClient = (e, { params: r = [], method: i }) => {
|
|
514
|
-
const s = this.getClient(e),
|
|
522
|
+
const s = this.getClient(e), a = e.methods[i].name, c = [
|
|
515
523
|
e.typeName,
|
|
516
|
-
|
|
524
|
+
a.charAt(0).toLowerCase() + a.slice(1),
|
|
517
525
|
...Array.isArray(r) ? r : [r]
|
|
518
|
-
],
|
|
519
|
-
return { client: s, queryKey: c, queryKeyStr:
|
|
526
|
+
], d = [e.typeName, a.charAt(0).toLowerCase() + a.slice(1)];
|
|
527
|
+
return { client: s, queryKey: c, queryKeyStr: d.join("") };
|
|
520
528
|
};
|
|
521
529
|
// create promise client, used for server stream subscriptions
|
|
522
530
|
createStreamClient = (e) => ({ client: this.getStreamClient(e) });
|
|
@@ -534,20 +542,20 @@ class vi {
|
|
|
534
542
|
return;
|
|
535
543
|
const e = (r) => (i) => {
|
|
536
544
|
const s = this.$headers.getValues();
|
|
537
|
-
for (const
|
|
538
|
-
i.header.set(
|
|
545
|
+
for (const a in s)
|
|
546
|
+
i.header.set(a, s[a]);
|
|
539
547
|
return r(i);
|
|
540
548
|
};
|
|
541
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
549
|
+
this.interceptors.push(e), this.interceptors.push(bi());
|
|
542
550
|
};
|
|
543
551
|
}
|
|
544
|
-
const
|
|
545
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
552
|
+
const Ei = (t, e) => {
|
|
553
|
+
const { client: r, queryKey: i } = e.createPromiseClient(ui, {
|
|
546
554
|
method: "retrieveEventId",
|
|
547
555
|
params: [t]
|
|
548
556
|
});
|
|
549
557
|
return e.nanoquery.createFetcherStore(i, {
|
|
550
|
-
fetcher: async (s,
|
|
558
|
+
fetcher: async (s, a, c) => {
|
|
551
559
|
if (!c || typeof c != "string")
|
|
552
560
|
return "";
|
|
553
561
|
try {
|
|
@@ -559,31 +567,31 @@ const Si = (t, e) => {
|
|
|
559
567
|
}
|
|
560
568
|
}
|
|
561
569
|
});
|
|
562
|
-
},
|
|
570
|
+
}, Ii = (t, e) => {
|
|
563
571
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "getStream", params: [t] });
|
|
564
572
|
return e.nanoquery.createFetcherStore(i, {
|
|
565
|
-
fetcher: async (s,
|
|
573
|
+
fetcher: async (s, a, c) => c ? (await r.getStream({
|
|
566
574
|
id: c
|
|
567
575
|
// we are sure that id is a string
|
|
568
576
|
})).data?.attributes : void 0
|
|
569
577
|
});
|
|
570
|
-
},
|
|
571
|
-
const { queryKey: r, client: i } = e.createPromiseClient(
|
|
578
|
+
}, Fi = (t, e) => {
|
|
579
|
+
const { queryKey: r, client: i } = e.createPromiseClient(yr, { method: "me", params: [t] });
|
|
572
580
|
return e.nanoquery.createFetcherStore(r, {
|
|
573
581
|
fetcher: () => i.me({})
|
|
574
582
|
});
|
|
575
|
-
},
|
|
576
|
-
const { client: e } = t.createPromiseClient(
|
|
577
|
-
return async ({ userKey: r, schema: i, init: s, inviterKey:
|
|
583
|
+
}, Oi = (t) => {
|
|
584
|
+
const { client: e } = t.createPromiseClient(yr, { method: "bypassAuth" });
|
|
585
|
+
return async ({ userKey: r, schema: i, init: s, inviterKey: a }) => {
|
|
578
586
|
const c = await e.bypassAuth({ userKey: r, schema: i, init: s });
|
|
579
|
-
return c.meta && (c.meta.inviterKey =
|
|
587
|
+
return c.meta && (c.meta.inviterKey = a), c;
|
|
580
588
|
};
|
|
581
|
-
},
|
|
589
|
+
}, Ti = (t, e) => {
|
|
582
590
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "get", params: [t] });
|
|
583
591
|
return e.nanoquery.createFetcherStore(i, {
|
|
584
592
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
585
593
|
});
|
|
586
|
-
},
|
|
594
|
+
}, _i = (t, e) => {
|
|
587
595
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "getOrganization", params: [t] });
|
|
588
596
|
return e.nanoquery.createFetcherStore(i, {
|
|
589
597
|
fetcher: async () => {
|
|
@@ -594,7 +602,7 @@ const Si = (t, e) => {
|
|
|
594
602
|
} : void 0;
|
|
595
603
|
}
|
|
596
604
|
});
|
|
597
|
-
},
|
|
605
|
+
}, Ci = (t, e) => {
|
|
598
606
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, {
|
|
599
607
|
method: "getOrganizationAdvertising",
|
|
600
608
|
params: [t]
|
|
@@ -602,8 +610,8 @@ const Si = (t, e) => {
|
|
|
602
610
|
return e.nanoquery.createFetcherStore(i, {
|
|
603
611
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
604
612
|
});
|
|
605
|
-
},
|
|
606
|
-
t.transport = new
|
|
613
|
+
}, xi = (t, e, r) => {
|
|
614
|
+
t.transport = new Ai(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), r();
|
|
607
615
|
};
|
|
608
616
|
class Lt {
|
|
609
617
|
delimiter = ":";
|
|
@@ -660,19 +668,19 @@ var Ie;
|
|
|
660
668
|
(function(t) {
|
|
661
669
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
662
670
|
})(Ie || (Ie = {}));
|
|
663
|
-
const
|
|
664
|
-
const e = new Ye(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(
|
|
665
|
-
if (!
|
|
671
|
+
const ki = (t) => {
|
|
672
|
+
const e = new Ye(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(Fi(i.getStore(), t), "user", ({ data: c, error: d, loading: p }, m) => {
|
|
673
|
+
if (!d)
|
|
666
674
|
return c?.data?.id ? c.data.id : p === !1 ? void 0 : m;
|
|
667
|
-
}),
|
|
675
|
+
}), a = new de(Ti(i.getStore(), t), "userSettings");
|
|
668
676
|
return {
|
|
669
677
|
userKey: r,
|
|
670
678
|
userToken: i,
|
|
671
679
|
user: s,
|
|
672
|
-
userSettings:
|
|
680
|
+
userSettings: a
|
|
673
681
|
};
|
|
674
|
-
},
|
|
675
|
-
const e = new se(re(void 0), "providerStreamId"), r = new de(
|
|
682
|
+
}, Bi = (t) => {
|
|
683
|
+
const e = new se(re(void 0), "providerStreamId"), r = new de(Ei(e.getStore(), t), "slStreamId", (s) => s?.data), i = new de(Ii(r.getAtomStore(), t), "streamSettings");
|
|
676
684
|
return r.getAtomStore().listen((s) => {
|
|
677
685
|
(s === "" || s === void 0) && i.getStore().mutate(void 0);
|
|
678
686
|
}), {
|
|
@@ -680,26 +688,26 @@ const Ci = (t) => {
|
|
|
680
688
|
slStreamId: r,
|
|
681
689
|
streamSettings: i
|
|
682
690
|
};
|
|
683
|
-
},
|
|
684
|
-
const e = new se(re(void 0), "enabled"), r = new se(re(Ie.DISABLED), "status"), i = new de(
|
|
691
|
+
}, Li = (t) => {
|
|
692
|
+
const e = new se(re(void 0), "enabled"), r = new se(re(Ie.DISABLED), "status"), i = new de(_i(e.getStore(), t), "organizationSettings", (d) => d?.data?.id), s = new de(Ci(i.getAtomStore(), t), "organizationAdvertising"), a = ki(t), c = Bi(t);
|
|
685
693
|
return {
|
|
686
694
|
enabled: e,
|
|
687
695
|
status: r,
|
|
688
696
|
providerStreamId: c.providerStreamId,
|
|
689
697
|
slStreamId: c.slStreamId,
|
|
690
698
|
streamSettings: c.streamSettings,
|
|
691
|
-
user:
|
|
692
|
-
userKey:
|
|
693
|
-
userToken:
|
|
694
|
-
userSettings:
|
|
699
|
+
user: a.user,
|
|
700
|
+
userKey: a.userKey,
|
|
701
|
+
userToken: a.userToken,
|
|
702
|
+
userSettings: a.userSettings,
|
|
695
703
|
organizationSettings: i,
|
|
696
704
|
organizationAdvertising: s
|
|
697
705
|
};
|
|
698
706
|
};
|
|
699
|
-
class
|
|
707
|
+
class Pi extends Bt {
|
|
700
708
|
stores;
|
|
701
709
|
constructor(e) {
|
|
702
|
-
const r =
|
|
710
|
+
const r = Li(e), i = gi(r);
|
|
703
711
|
super(i, "core"), this.stores = r;
|
|
704
712
|
}
|
|
705
713
|
getValue() {
|
|
@@ -720,7 +728,7 @@ class Bi extends Bt {
|
|
|
720
728
|
};
|
|
721
729
|
unsubscribe = () => this.getStore().off();
|
|
722
730
|
}
|
|
723
|
-
const
|
|
731
|
+
const Ri = ci({
|
|
724
732
|
level: "trace",
|
|
725
733
|
enabled: !!window.localStorage.getItem("SL_DEBUG"),
|
|
726
734
|
browser: {
|
|
@@ -728,8 +736,8 @@ const Li = ui({
|
|
|
728
736
|
console.log(t);
|
|
729
737
|
}
|
|
730
738
|
}
|
|
731
|
-
}), Pt = (t, e) =>
|
|
732
|
-
class
|
|
739
|
+
}), Pt = (t, e) => Ri.child({ name: t }, e);
|
|
740
|
+
class Ni extends Lt {
|
|
733
741
|
get = this.read;
|
|
734
742
|
set = this.write;
|
|
735
743
|
del = this.remove;
|
|
@@ -737,12 +745,12 @@ class Pi extends Lt {
|
|
|
737
745
|
super("deep-link-context", window.sessionStorage);
|
|
738
746
|
}
|
|
739
747
|
}
|
|
740
|
-
const Dr = "sldl",
|
|
748
|
+
const Dr = "sldl", Rt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Di = /* @__PURE__ */ new Set([Rt, wn, bn]), $r = (t) => {
|
|
741
749
|
const e = {}, r = {};
|
|
742
750
|
for (const [i, s] of t)
|
|
743
|
-
|
|
751
|
+
Di.has(i) ? e[i] = s : r[i] = s;
|
|
744
752
|
return { result: e, remain: r };
|
|
745
|
-
},
|
|
753
|
+
}, $i = ({ hash: t, search: e }) => {
|
|
746
754
|
if (t && t.includes(Dr)) {
|
|
747
755
|
const r = new URLSearchParams(t.substr(1));
|
|
748
756
|
return { hash: $r(r) };
|
|
@@ -752,73 +760,76 @@ const Dr = "sldl", yr = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Ri = /*
|
|
|
752
760
|
return { search: $r(r) };
|
|
753
761
|
}
|
|
754
762
|
return null;
|
|
755
|
-
}, je = Pt("deep_link"),
|
|
763
|
+
}, je = Pt("deep_link"), Ui = (t, e) => {
|
|
756
764
|
const { hash: r, search: i } = window.location;
|
|
757
765
|
if (je.debug({ hash: r, search: i }, "get deep link data from"), r || i) {
|
|
758
|
-
const s =
|
|
766
|
+
const s = $i({ hash: r, search: i });
|
|
759
767
|
if (je.debug(s, "parse deep link result"), s) {
|
|
760
|
-
const { hash:
|
|
761
|
-
if (Object.keys(
|
|
762
|
-
t.setValue("data",
|
|
768
|
+
const { hash: a, search: c } = s, { result: d, remain: p } = a || c;
|
|
769
|
+
if (Object.keys(d).length !== 0) {
|
|
770
|
+
t.setValue("data", d);
|
|
763
771
|
const m = Object.keys(p).length !== 0;
|
|
764
|
-
if (
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
je.debug({ updatedSearch: l }, "update search"), window.location.search = l;
|
|
774
|
-
} else
|
|
775
|
-
window.location.search = "";
|
|
776
|
-
e(h);
|
|
772
|
+
if (a) {
|
|
773
|
+
let l = "";
|
|
774
|
+
m && (l = `#${new URLSearchParams(p).toString()}`, je.debug({ updatedHash: l }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + l);
|
|
775
|
+
}
|
|
776
|
+
if (c) {
|
|
777
|
+
let l = "";
|
|
778
|
+
m && (l = `?${new URLSearchParams(p).toString()}`, je.debug({ updatedSearch: l }, "update search")), window.history.replaceState(null, "", window.location.pathname + l + window.location.hash);
|
|
779
|
+
}
|
|
780
|
+
e(d);
|
|
777
781
|
}
|
|
778
782
|
}
|
|
779
783
|
}
|
|
780
784
|
t.setValue("parsed", !0);
|
|
781
|
-
},
|
|
782
|
-
const i = new
|
|
783
|
-
let
|
|
785
|
+
}, ji = (t, e, r) => {
|
|
786
|
+
const i = new Ni(), s = i.get("sl-deep-link-store");
|
|
787
|
+
let a = {};
|
|
784
788
|
if (s)
|
|
785
789
|
try {
|
|
786
|
-
|
|
787
|
-
} catch (
|
|
788
|
-
je.debug(
|
|
790
|
+
a = JSON.parse(s);
|
|
791
|
+
} catch (d) {
|
|
792
|
+
je.debug(d);
|
|
789
793
|
}
|
|
790
794
|
t.deepLink = {
|
|
791
|
-
$store: new tt(
|
|
795
|
+
$store: new tt(Te(a), "deep-link-context"),
|
|
792
796
|
getDeepLinkData: () => {
|
|
793
|
-
const { data:
|
|
794
|
-
return { data:
|
|
797
|
+
const { data: d, used: p } = t.deepLink.$store.getValues();
|
|
798
|
+
return { data: d, used: p };
|
|
795
799
|
},
|
|
796
800
|
// we are logged in with inviter id
|
|
797
|
-
deepLinkUsed: (
|
|
798
|
-
je.debug(`logged in with inviterId: ${
|
|
801
|
+
deepLinkUsed: (d) => {
|
|
802
|
+
je.debug(`logged in with inviterId: ${d}`), t.deepLink.$store.setValue("used", !0);
|
|
799
803
|
},
|
|
800
804
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
801
|
-
}, t.
|
|
802
|
-
t.deepLink.
|
|
805
|
+
}, t.sdk.getInviter = () => {
|
|
806
|
+
const { data: d, used: p } = t.deepLink.getDeepLinkData();
|
|
807
|
+
return p ? d?.[Rt] : void 0;
|
|
808
|
+
}, t.sdk.inviteDisplayed = () => {
|
|
809
|
+
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), i.del("sl-deep-link-store");
|
|
810
|
+
}, t.deepLink.$store.subscribe((d) => i.set("sl-deep-link-store", JSON.stringify(d))), t.sdk.addDeepLinkHandler = (d) => {
|
|
811
|
+
t.deepLink.onDeepLinkHandlers.add(d);
|
|
812
|
+
}, t.sdk.removeDeepLinkHandler = (d) => {
|
|
813
|
+
t.deepLink.onDeepLinkHandlers.delete(d);
|
|
803
814
|
};
|
|
804
|
-
const c = (
|
|
815
|
+
const c = (d) => {
|
|
805
816
|
t.deepLink.$store.setValue("handled", !0);
|
|
806
817
|
for (const p of t.deepLink.onDeepLinkHandlers)
|
|
807
818
|
try {
|
|
808
|
-
je.debug("called handler"), p(
|
|
819
|
+
je.debug("called handler"), p(d);
|
|
809
820
|
} catch (m) {
|
|
810
821
|
console.error(m);
|
|
811
822
|
}
|
|
812
823
|
};
|
|
813
|
-
|
|
824
|
+
Ui(t.deepLink.$store, c), r();
|
|
814
825
|
}, Ur = Pt("bypass");
|
|
815
|
-
class
|
|
826
|
+
class Mi extends yi {
|
|
816
827
|
$coreStore;
|
|
817
828
|
deepLink;
|
|
818
829
|
transport;
|
|
819
830
|
bypassLogin;
|
|
820
831
|
constructor(e, r, i) {
|
|
821
|
-
super(), this.$coreStore = e, this.deepLink = i, this.transport = r, this.bypassLogin =
|
|
832
|
+
super(), this.$coreStore = e, this.deepLink = i, this.transport = r, this.bypassLogin = Oi(this.transport), this.connect();
|
|
822
833
|
}
|
|
823
834
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
824
835
|
/**
|
|
@@ -829,17 +840,17 @@ class Ui extends pi {
|
|
|
829
840
|
*/
|
|
830
841
|
login = async (e, r) => {
|
|
831
842
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
832
|
-
const { used: i, data: s } = this.deepLink.getDeepLinkData(),
|
|
833
|
-
Ur.debug("inviterKey",
|
|
843
|
+
const { used: i, data: s } = this.deepLink.getDeepLinkData(), a = i ? "" : s?.[Rt];
|
|
844
|
+
Ur.debug("inviterKey", a);
|
|
834
845
|
const c = await this.bypassLogin({
|
|
835
846
|
schema: e,
|
|
836
847
|
userKey: r,
|
|
837
|
-
inviterKey:
|
|
848
|
+
inviterKey: a,
|
|
838
849
|
init: !1
|
|
839
|
-
}),
|
|
840
|
-
if (!
|
|
850
|
+
}), d = c.meta?.jwt, p = c.data?.id;
|
|
851
|
+
if (!d || !p)
|
|
841
852
|
throw new Error("internal: token missing");
|
|
842
|
-
return Ur.debug("user", c), c.meta?.inviterKey && this.deepLink.deepLinkUsed(c.meta.inviterKey), this.$coreStore.getValues().user.getStore().mutate(c), this.saveUser(
|
|
853
|
+
return Ur.debug("user", c), c.meta?.inviterKey && this.deepLink.deepLinkUsed(c.meta.inviterKey), this.$coreStore.getValues().user.getStore().mutate(c), this.saveUser(d, p), d;
|
|
843
854
|
};
|
|
844
855
|
isAuthenticated = () => this.me();
|
|
845
856
|
/**
|
|
@@ -868,8 +879,8 @@ class Ui extends pi {
|
|
|
868
879
|
if (this.$coreStore.getValues().userKey.setValue(i), r)
|
|
869
880
|
return this.saveUser(r, ""), this.me().then((s) => {
|
|
870
881
|
if (s?.id) {
|
|
871
|
-
const
|
|
872
|
-
this.saveUser(r,
|
|
882
|
+
const a = s.id;
|
|
883
|
+
this.saveUser(r, a);
|
|
873
884
|
}
|
|
874
885
|
});
|
|
875
886
|
if (i && !r) {
|
|
@@ -899,8 +910,8 @@ class Ui extends pi {
|
|
|
899
910
|
});
|
|
900
911
|
};
|
|
901
912
|
}
|
|
902
|
-
const ft = new Ye(),
|
|
903
|
-
t.auth = new
|
|
913
|
+
const ft = new Ye(), Vi = (t, e, r) => {
|
|
914
|
+
t.auth = new Mi(t.store, t.transport, t.deepLink), t.stores.status.listen((i) => {
|
|
904
915
|
i === Ie.READY && t.auth.reLogin();
|
|
905
916
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (i, s) => {
|
|
906
917
|
if (!(ft.getSchema() === i && ft.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
@@ -912,11 +923,26 @@ const ft = new Ye(), ji = (t, e, r) => {
|
|
|
912
923
|
}, t.sdk.logout = () => {
|
|
913
924
|
t.auth.logout(), ft.clear();
|
|
914
925
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
915
|
-
},
|
|
916
|
-
t.store = new
|
|
926
|
+
}, qi = (t, e, r) => {
|
|
927
|
+
t.store = new Pi(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(([i, s]) => [i, s.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
917
928
|
t.store.unsubscribe();
|
|
918
929
|
}, r();
|
|
919
|
-
},
|
|
930
|
+
}, Qi = (t, e, r) => {
|
|
931
|
+
t.videoPlayer = {
|
|
932
|
+
controllers: /* @__PURE__ */ new Set()
|
|
933
|
+
}, t.sdk.addVideoPlayerController = (i) => {
|
|
934
|
+
t.videoPlayer.controllers.add(i);
|
|
935
|
+
}, t.sdk.removeVideoPlayerController = (i) => {
|
|
936
|
+
t.videoPlayer.controllers.delete(i);
|
|
937
|
+
}, t.sdk.controlVideoPlayer = (i) => {
|
|
938
|
+
for (const s of t.videoPlayer.controllers)
|
|
939
|
+
try {
|
|
940
|
+
s(i);
|
|
941
|
+
} catch (a) {
|
|
942
|
+
console.error(a);
|
|
943
|
+
}
|
|
944
|
+
}, r();
|
|
945
|
+
}, Gi = (t, e, r) => {
|
|
920
946
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async (i) => {
|
|
921
947
|
if (t.contextConfig = i, t.stores.enabled.get() === "on")
|
|
922
948
|
return { enabled: !0 };
|
|
@@ -932,65 +958,65 @@ const ft = new Ye(), ji = (t, e, r) => {
|
|
|
932
958
|
}, t.sdk.createEventSession = (i) => {
|
|
933
959
|
t.stores.providerStreamId.setValue(i);
|
|
934
960
|
}, r();
|
|
935
|
-
},
|
|
961
|
+
}, zi = (t, e, r) => {
|
|
936
962
|
const { client: i, queryKey: s } = r.createPromiseClient(dn, {
|
|
937
963
|
method: "summary",
|
|
938
964
|
params: [t, e]
|
|
939
965
|
});
|
|
940
966
|
return r.nanoquery.createFetcherStore(s, {
|
|
941
|
-
fetcher: async (
|
|
942
|
-
eventId:
|
|
967
|
+
fetcher: async (a, c, d, p) => (await i.summary({
|
|
968
|
+
eventId: d,
|
|
943
969
|
userId: p
|
|
944
970
|
})).data?.attributes
|
|
945
971
|
});
|
|
946
|
-
},
|
|
972
|
+
}, Ki = (t) => {
|
|
947
973
|
const { client: e } = t.createPromiseClient(dn, { method: "list" });
|
|
948
974
|
return (r) => e.list(r);
|
|
949
|
-
},
|
|
950
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
975
|
+
}, Wi = (t, e) => {
|
|
976
|
+
const { client: r, queryKey: i } = e.createPromiseClient(yr, {
|
|
951
977
|
method: "getFriends",
|
|
952
978
|
params: [t]
|
|
953
979
|
});
|
|
954
980
|
return e.nanoquery.createFetcherStore(i, {
|
|
955
|
-
fetcher: async (s,
|
|
981
|
+
fetcher: async (s, a, c) => c ? (await r.getFriends({})).data : []
|
|
956
982
|
});
|
|
957
|
-
},
|
|
958
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
983
|
+
}, Hi = (t, e) => {
|
|
984
|
+
const { client: r, queryKey: i } = e.createPromiseClient(_e, { method: "get", params: [t] });
|
|
959
985
|
return e.nanoquery.createFetcherStore(i, {
|
|
960
|
-
fetcher: async (s,
|
|
986
|
+
fetcher: async (s, a, c) => (await r.get({
|
|
961
987
|
eventId: c
|
|
962
988
|
})).data?.attributes
|
|
963
989
|
});
|
|
964
|
-
},
|
|
965
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
990
|
+
}, Ji = (t, e) => {
|
|
991
|
+
const { client: r, queryKey: i } = e.createPromiseClient(_e, { method: "syncQuestion", params: [t] });
|
|
966
992
|
return e.nanoquery.createFetcherStore(i, {
|
|
967
|
-
fetcher: async (s,
|
|
993
|
+
fetcher: async (s, a, c) => c ? (await r.syncQuestion({
|
|
968
994
|
filter: {
|
|
969
995
|
eventId: c
|
|
970
996
|
}
|
|
971
997
|
})).data?.attributes : void 0
|
|
972
998
|
});
|
|
973
|
-
},
|
|
974
|
-
const { client: r } = e.createStreamClient(
|
|
975
|
-
return t.subscribe((
|
|
976
|
-
i.set({ eventId:
|
|
999
|
+
}, Yi = (t, e) => {
|
|
1000
|
+
const { client: r } = e.createStreamClient(_e), i = kt({ eventId: t.get() || "", feedId: "" });
|
|
1001
|
+
return t.subscribe((a = "") => {
|
|
1002
|
+
i.set({ eventId: a, feedId: "" });
|
|
977
1003
|
}), e.addSubscription(r.subscription, i, { name: "feedSubscription" });
|
|
978
|
-
},
|
|
979
|
-
const { client: r } = e.createStreamClient(
|
|
1004
|
+
}, Xi = (t, e) => {
|
|
1005
|
+
const { client: r } = e.createStreamClient(_e);
|
|
980
1006
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
981
1007
|
}, vn = async (t, e) => {
|
|
982
|
-
const { client: r } = e.createPromiseClient(
|
|
1008
|
+
const { client: r } = e.createPromiseClient(_e, { method: "questionByUser", params: [t] });
|
|
983
1009
|
return (await r.questionByUser({
|
|
984
1010
|
questionId: t
|
|
985
1011
|
})).data?.attributes?.question;
|
|
986
|
-
},
|
|
987
|
-
const { client: i, queryKey: s } = r.createPromiseClient(
|
|
1012
|
+
}, Zi = (t, e, r) => {
|
|
1013
|
+
const { client: i, queryKey: s } = r.createPromiseClient(_e, {
|
|
988
1014
|
method: "list",
|
|
989
1015
|
params: [t, e]
|
|
990
1016
|
});
|
|
991
1017
|
return r.nanoquery.createFetcherStore(s, {
|
|
992
|
-
fetcher: async (
|
|
993
|
-
eventId:
|
|
1018
|
+
fetcher: async (a, c, d, p) => d ? (await i.list({
|
|
1019
|
+
eventId: d,
|
|
994
1020
|
filter: {
|
|
995
1021
|
types: p === Ve.ALLOWED ? [] : [fe.FACTOID, fe.PROMOTION, fe.TWEET],
|
|
996
1022
|
statuses: [dt.ACTIVE, dt.RESOLVED]
|
|
@@ -998,13 +1024,13 @@ const ft = new Ye(), ji = (t, e, r) => {
|
|
|
998
1024
|
})).data : []
|
|
999
1025
|
});
|
|
1000
1026
|
};
|
|
1001
|
-
var Sn = {},
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
var me = [], ie = [],
|
|
1006
|
-
for (var Ke = 0,
|
|
1007
|
-
me[Ke] =
|
|
1027
|
+
var Sn = {}, Nt = {};
|
|
1028
|
+
Nt.byteLength = ro;
|
|
1029
|
+
Nt.toByteArray = io;
|
|
1030
|
+
Nt.fromByteArray = ao;
|
|
1031
|
+
var me = [], ie = [], eo = typeof Uint8Array < "u" ? Uint8Array : Array, Vt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1032
|
+
for (var Ke = 0, to = Vt.length; Ke < to; ++Ke)
|
|
1033
|
+
me[Ke] = Vt[Ke], ie[Vt.charCodeAt(Ke)] = Ke;
|
|
1008
1034
|
ie[45] = 62;
|
|
1009
1035
|
ie[95] = 63;
|
|
1010
1036
|
function An(t) {
|
|
@@ -1016,30 +1042,30 @@ function An(t) {
|
|
|
1016
1042
|
var i = r === e ? 0 : 4 - r % 4;
|
|
1017
1043
|
return [r, i];
|
|
1018
1044
|
}
|
|
1019
|
-
function
|
|
1045
|
+
function ro(t) {
|
|
1020
1046
|
var e = An(t), r = e[0], i = e[1];
|
|
1021
1047
|
return (r + i) * 3 / 4 - i;
|
|
1022
1048
|
}
|
|
1023
|
-
function
|
|
1049
|
+
function no(t, e, r) {
|
|
1024
1050
|
return (e + r) * 3 / 4 - r;
|
|
1025
1051
|
}
|
|
1026
|
-
function
|
|
1027
|
-
var e, r = An(t), i = r[0], s = r[1],
|
|
1028
|
-
for (p = 0; p <
|
|
1029
|
-
e = ie[t.charCodeAt(p)] << 18 | ie[t.charCodeAt(p + 1)] << 12 | ie[t.charCodeAt(p + 2)] << 6 | ie[t.charCodeAt(p + 3)],
|
|
1030
|
-
return s === 2 && (e = ie[t.charCodeAt(p)] << 2 | ie[t.charCodeAt(p + 1)] >> 4,
|
|
1052
|
+
function io(t) {
|
|
1053
|
+
var e, r = An(t), i = r[0], s = r[1], a = new eo(no(t, i, s)), c = 0, d = s > 0 ? i - 4 : i, p;
|
|
1054
|
+
for (p = 0; p < d; p += 4)
|
|
1055
|
+
e = ie[t.charCodeAt(p)] << 18 | ie[t.charCodeAt(p + 1)] << 12 | ie[t.charCodeAt(p + 2)] << 6 | ie[t.charCodeAt(p + 3)], a[c++] = e >> 16 & 255, a[c++] = e >> 8 & 255, a[c++] = e & 255;
|
|
1056
|
+
return s === 2 && (e = ie[t.charCodeAt(p)] << 2 | ie[t.charCodeAt(p + 1)] >> 4, a[c++] = e & 255), s === 1 && (e = ie[t.charCodeAt(p)] << 10 | ie[t.charCodeAt(p + 1)] << 4 | ie[t.charCodeAt(p + 2)] >> 2, a[c++] = e >> 8 & 255, a[c++] = e & 255), a;
|
|
1031
1057
|
}
|
|
1032
|
-
function
|
|
1058
|
+
function oo(t) {
|
|
1033
1059
|
return me[t >> 18 & 63] + me[t >> 12 & 63] + me[t >> 6 & 63] + me[t & 63];
|
|
1034
1060
|
}
|
|
1035
|
-
function
|
|
1036
|
-
for (var i, s = [],
|
|
1037
|
-
i = (t[
|
|
1061
|
+
function so(t, e, r) {
|
|
1062
|
+
for (var i, s = [], a = e; a < r; a += 3)
|
|
1063
|
+
i = (t[a] << 16 & 16711680) + (t[a + 1] << 8 & 65280) + (t[a + 2] & 255), s.push(oo(i));
|
|
1038
1064
|
return s.join("");
|
|
1039
1065
|
}
|
|
1040
|
-
function
|
|
1041
|
-
for (var e, r = t.length, i = r % 3, s = [],
|
|
1042
|
-
s.push(
|
|
1066
|
+
function ao(t) {
|
|
1067
|
+
for (var e, r = t.length, i = r % 3, s = [], a = 16383, c = 0, d = r - i; c < d; c += a)
|
|
1068
|
+
s.push(so(t, c, c + a > d ? d : c + a));
|
|
1043
1069
|
return i === 1 ? (e = t[r - 1], s.push(
|
|
1044
1070
|
me[e >> 2] + me[e << 4 & 63] + "=="
|
|
1045
1071
|
)) : i === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
@@ -1049,27 +1075,27 @@ function io(t) {
|
|
|
1049
1075
|
var gr = {};
|
|
1050
1076
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
1051
1077
|
gr.read = function(t, e, r, i, s) {
|
|
1052
|
-
var
|
|
1053
|
-
for (w += E,
|
|
1078
|
+
var a, c, d = s * 8 - i - 1, p = (1 << d) - 1, m = p >> 1, l = -7, w = r ? s - 1 : 0, E = r ? -1 : 1, F = t[e + w];
|
|
1079
|
+
for (w += E, a = F & (1 << -l) - 1, F >>= -l, l += d; l > 0; a = a * 256 + t[e + w], w += E, l -= 8)
|
|
1054
1080
|
;
|
|
1055
|
-
for (c =
|
|
1081
|
+
for (c = a & (1 << -l) - 1, a >>= -l, l += i; l > 0; c = c * 256 + t[e + w], w += E, l -= 8)
|
|
1056
1082
|
;
|
|
1057
|
-
if (
|
|
1058
|
-
|
|
1083
|
+
if (a === 0)
|
|
1084
|
+
a = 1 - m;
|
|
1059
1085
|
else {
|
|
1060
|
-
if (
|
|
1061
|
-
return c ? NaN : (
|
|
1062
|
-
c = c + Math.pow(2, i),
|
|
1086
|
+
if (a === p)
|
|
1087
|
+
return c ? NaN : (F ? -1 : 1) * (1 / 0);
|
|
1088
|
+
c = c + Math.pow(2, i), a = a - m;
|
|
1063
1089
|
}
|
|
1064
|
-
return (
|
|
1090
|
+
return (F ? -1 : 1) * c * Math.pow(2, a - i);
|
|
1065
1091
|
};
|
|
1066
|
-
gr.write = function(t, e, r, i, s,
|
|
1067
|
-
var c,
|
|
1068
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (
|
|
1092
|
+
gr.write = function(t, e, r, i, s, a) {
|
|
1093
|
+
var c, d, p, m = a * 8 - s - 1, l = (1 << m) - 1, w = l >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = i ? 0 : a - 1, _ = i ? 1 : -1, x = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
1094
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (d = isNaN(e) ? 1 : 0, c = l) : (c = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -c)) < 1 && (c--, p *= 2), c + w >= 1 ? e += E / p : e += E * Math.pow(2, 1 - w), e * p >= 2 && (c++, p /= 2), c + w >= l ? (d = 0, c = l) : c + w >= 1 ? (d = (e * p - 1) * Math.pow(2, s), c = c + w) : (d = e * Math.pow(2, w - 1) * Math.pow(2, s), c = 0)); s >= 8; t[r + F] = d & 255, F += _, d /= 256, s -= 8)
|
|
1069
1095
|
;
|
|
1070
|
-
for (c = c << s |
|
|
1096
|
+
for (c = c << s | d, m += s; m > 0; t[r + F] = c & 255, F += _, c /= 256, m -= 8)
|
|
1071
1097
|
;
|
|
1072
|
-
t[r +
|
|
1098
|
+
t[r + F - _] |= x * 128;
|
|
1073
1099
|
};
|
|
1074
1100
|
/*!
|
|
1075
1101
|
* The buffer module from node.js, for the browser.
|
|
@@ -1078,20 +1104,20 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1078
1104
|
* @license MIT
|
|
1079
1105
|
*/
|
|
1080
1106
|
(function(t) {
|
|
1081
|
-
const e =
|
|
1107
|
+
const e = Nt, r = gr, i = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1082
1108
|
t.Buffer = l, t.SlowBuffer = C, t.INSPECT_MAX_BYTES = 50;
|
|
1083
1109
|
const s = 2147483647;
|
|
1084
1110
|
t.kMaxLength = s;
|
|
1085
|
-
const { Uint8Array:
|
|
1111
|
+
const { Uint8Array: a, ArrayBuffer: c, SharedArrayBuffer: d } = globalThis;
|
|
1086
1112
|
l.TYPED_ARRAY_SUPPORT = p(), !l.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
|
|
1087
1113
|
"This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."
|
|
1088
1114
|
);
|
|
1089
1115
|
function p() {
|
|
1090
1116
|
try {
|
|
1091
|
-
const
|
|
1117
|
+
const u = new a(1), n = { foo: function() {
|
|
1092
1118
|
return 42;
|
|
1093
1119
|
} };
|
|
1094
|
-
return Object.setPrototypeOf(n,
|
|
1120
|
+
return Object.setPrototypeOf(n, a.prototype), Object.setPrototypeOf(u, n), u.foo() === 42;
|
|
1095
1121
|
} catch {
|
|
1096
1122
|
return !1;
|
|
1097
1123
|
}
|
|
@@ -1109,136 +1135,136 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1109
1135
|
return this.byteOffset;
|
|
1110
1136
|
}
|
|
1111
1137
|
});
|
|
1112
|
-
function m(
|
|
1113
|
-
if (
|
|
1114
|
-
throw new RangeError('The value "' +
|
|
1115
|
-
const n = new u
|
|
1138
|
+
function m(u) {
|
|
1139
|
+
if (u > s)
|
|
1140
|
+
throw new RangeError('The value "' + u + '" is invalid for option "size"');
|
|
1141
|
+
const n = new a(u);
|
|
1116
1142
|
return Object.setPrototypeOf(n, l.prototype), n;
|
|
1117
1143
|
}
|
|
1118
|
-
function l(
|
|
1119
|
-
if (typeof
|
|
1144
|
+
function l(u, n, o) {
|
|
1145
|
+
if (typeof u == "number") {
|
|
1120
1146
|
if (typeof n == "string")
|
|
1121
1147
|
throw new TypeError(
|
|
1122
1148
|
'The "string" argument must be of type string. Received type number'
|
|
1123
1149
|
);
|
|
1124
|
-
return
|
|
1150
|
+
return _(u);
|
|
1125
1151
|
}
|
|
1126
|
-
return w(
|
|
1152
|
+
return w(u, n, o);
|
|
1127
1153
|
}
|
|
1128
1154
|
l.poolSize = 8192;
|
|
1129
|
-
function w(
|
|
1130
|
-
if (typeof
|
|
1131
|
-
return x(
|
|
1132
|
-
if (c.isView(
|
|
1133
|
-
return I(
|
|
1134
|
-
if (
|
|
1155
|
+
function w(u, n, o) {
|
|
1156
|
+
if (typeof u == "string")
|
|
1157
|
+
return x(u, n);
|
|
1158
|
+
if (c.isView(u))
|
|
1159
|
+
return I(u);
|
|
1160
|
+
if (u == null)
|
|
1135
1161
|
throw new TypeError(
|
|
1136
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof
|
|
1162
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof u
|
|
1137
1163
|
);
|
|
1138
|
-
if (pe(
|
|
1139
|
-
return
|
|
1140
|
-
if (typeof
|
|
1164
|
+
if (pe(u, c) || u && pe(u.buffer, c) || typeof d < "u" && (pe(u, d) || u && pe(u.buffer, d)))
|
|
1165
|
+
return T(u, n, o);
|
|
1166
|
+
if (typeof u == "number")
|
|
1141
1167
|
throw new TypeError(
|
|
1142
1168
|
'The "value" argument must not be of type number. Received type number'
|
|
1143
1169
|
);
|
|
1144
|
-
const f =
|
|
1145
|
-
if (f != null && f !==
|
|
1170
|
+
const f = u.valueOf && u.valueOf();
|
|
1171
|
+
if (f != null && f !== u)
|
|
1146
1172
|
return l.from(f, n, o);
|
|
1147
|
-
const
|
|
1148
|
-
if (
|
|
1149
|
-
return
|
|
1150
|
-
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof
|
|
1151
|
-
return l.from(
|
|
1173
|
+
const h = j(u);
|
|
1174
|
+
if (h)
|
|
1175
|
+
return h;
|
|
1176
|
+
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof u[Symbol.toPrimitive] == "function")
|
|
1177
|
+
return l.from(u[Symbol.toPrimitive]("string"), n, o);
|
|
1152
1178
|
throw new TypeError(
|
|
1153
|
-
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof
|
|
1179
|
+
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof u
|
|
1154
1180
|
);
|
|
1155
1181
|
}
|
|
1156
|
-
l.from = function(
|
|
1157
|
-
return w(
|
|
1158
|
-
}, Object.setPrototypeOf(l.prototype,
|
|
1159
|
-
function E(
|
|
1160
|
-
if (typeof
|
|
1182
|
+
l.from = function(u, n, o) {
|
|
1183
|
+
return w(u, n, o);
|
|
1184
|
+
}, Object.setPrototypeOf(l.prototype, a.prototype), Object.setPrototypeOf(l, a);
|
|
1185
|
+
function E(u) {
|
|
1186
|
+
if (typeof u != "number")
|
|
1161
1187
|
throw new TypeError('"size" argument must be of type number');
|
|
1162
|
-
if (
|
|
1163
|
-
throw new RangeError('The value "' +
|
|
1188
|
+
if (u < 0)
|
|
1189
|
+
throw new RangeError('The value "' + u + '" is invalid for option "size"');
|
|
1164
1190
|
}
|
|
1165
|
-
function
|
|
1166
|
-
return E(
|
|
1191
|
+
function F(u, n, o) {
|
|
1192
|
+
return E(u), u <= 0 ? m(u) : n !== void 0 ? typeof o == "string" ? m(u).fill(n, o) : m(u).fill(n) : m(u);
|
|
1167
1193
|
}
|
|
1168
|
-
l.alloc = function(
|
|
1169
|
-
return
|
|
1194
|
+
l.alloc = function(u, n, o) {
|
|
1195
|
+
return F(u, n, o);
|
|
1170
1196
|
};
|
|
1171
|
-
function
|
|
1172
|
-
return E(
|
|
1197
|
+
function _(u) {
|
|
1198
|
+
return E(u), m(u < 0 ? 0 : L(u) | 0);
|
|
1173
1199
|
}
|
|
1174
|
-
l.allocUnsafe = function(
|
|
1175
|
-
return
|
|
1176
|
-
}, l.allocUnsafeSlow = function(
|
|
1177
|
-
return
|
|
1200
|
+
l.allocUnsafe = function(u) {
|
|
1201
|
+
return _(u);
|
|
1202
|
+
}, l.allocUnsafeSlow = function(u) {
|
|
1203
|
+
return _(u);
|
|
1178
1204
|
};
|
|
1179
|
-
function x(
|
|
1205
|
+
function x(u, n) {
|
|
1180
1206
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !l.isEncoding(n))
|
|
1181
1207
|
throw new TypeError("Unknown encoding: " + n);
|
|
1182
|
-
const o = k(
|
|
1208
|
+
const o = k(u, n) | 0;
|
|
1183
1209
|
let f = m(o);
|
|
1184
|
-
const
|
|
1185
|
-
return
|
|
1210
|
+
const h = f.write(u, n);
|
|
1211
|
+
return h !== o && (f = f.slice(0, h)), f;
|
|
1186
1212
|
}
|
|
1187
|
-
function N(
|
|
1188
|
-
const n =
|
|
1213
|
+
function N(u) {
|
|
1214
|
+
const n = u.length < 0 ? 0 : L(u.length) | 0, o = m(n);
|
|
1189
1215
|
for (let f = 0; f < n; f += 1)
|
|
1190
|
-
o[f] =
|
|
1216
|
+
o[f] = u[f] & 255;
|
|
1191
1217
|
return o;
|
|
1192
1218
|
}
|
|
1193
|
-
function I(
|
|
1194
|
-
if (pe(
|
|
1195
|
-
const n = new u
|
|
1196
|
-
return
|
|
1219
|
+
function I(u) {
|
|
1220
|
+
if (pe(u, a)) {
|
|
1221
|
+
const n = new a(u);
|
|
1222
|
+
return T(n.buffer, n.byteOffset, n.byteLength);
|
|
1197
1223
|
}
|
|
1198
|
-
return N(
|
|
1224
|
+
return N(u);
|
|
1199
1225
|
}
|
|
1200
|
-
function
|
|
1201
|
-
if (n < 0 ||
|
|
1226
|
+
function T(u, n, o) {
|
|
1227
|
+
if (n < 0 || u.byteLength < n)
|
|
1202
1228
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
1203
|
-
if (
|
|
1229
|
+
if (u.byteLength < n + (o || 0))
|
|
1204
1230
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
1205
1231
|
let f;
|
|
1206
|
-
return n === void 0 && o === void 0 ? f = new u
|
|
1232
|
+
return n === void 0 && o === void 0 ? f = new a(u) : o === void 0 ? f = new a(u, n) : f = new a(u, n, o), Object.setPrototypeOf(f, l.prototype), f;
|
|
1207
1233
|
}
|
|
1208
|
-
function j(
|
|
1209
|
-
if (l.isBuffer(
|
|
1210
|
-
const n =
|
|
1211
|
-
return o.length === 0 ||
|
|
1234
|
+
function j(u) {
|
|
1235
|
+
if (l.isBuffer(u)) {
|
|
1236
|
+
const n = L(u.length) | 0, o = m(n);
|
|
1237
|
+
return o.length === 0 || u.copy(o, 0, 0, n), o;
|
|
1212
1238
|
}
|
|
1213
|
-
if (
|
|
1214
|
-
return typeof
|
|
1215
|
-
if (
|
|
1216
|
-
return N(
|
|
1239
|
+
if (u.length !== void 0)
|
|
1240
|
+
return typeof u.length != "number" || Mt(u.length) ? m(0) : N(u);
|
|
1241
|
+
if (u.type === "Buffer" && Array.isArray(u.data))
|
|
1242
|
+
return N(u.data);
|
|
1217
1243
|
}
|
|
1218
|
-
function
|
|
1219
|
-
if (
|
|
1244
|
+
function L(u) {
|
|
1245
|
+
if (u >= s)
|
|
1220
1246
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s.toString(16) + " bytes");
|
|
1221
|
-
return
|
|
1247
|
+
return u | 0;
|
|
1222
1248
|
}
|
|
1223
|
-
function C(
|
|
1224
|
-
return +
|
|
1249
|
+
function C(u) {
|
|
1250
|
+
return +u != u && (u = 0), l.alloc(+u);
|
|
1225
1251
|
}
|
|
1226
1252
|
l.isBuffer = function(n) {
|
|
1227
1253
|
return n != null && n._isBuffer === !0 && n !== l.prototype;
|
|
1228
1254
|
}, l.compare = function(n, o) {
|
|
1229
|
-
if (pe(n,
|
|
1255
|
+
if (pe(n, a) && (n = l.from(n, n.offset, n.byteLength)), pe(o, a) && (o = l.from(o, o.offset, o.byteLength)), !l.isBuffer(n) || !l.isBuffer(o))
|
|
1230
1256
|
throw new TypeError(
|
|
1231
1257
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
1232
1258
|
);
|
|
1233
1259
|
if (n === o)
|
|
1234
1260
|
return 0;
|
|
1235
|
-
let f = n.length,
|
|
1236
|
-
for (let y = 0, b = Math.min(f,
|
|
1261
|
+
let f = n.length, h = o.length;
|
|
1262
|
+
for (let y = 0, b = Math.min(f, h); y < b; ++y)
|
|
1237
1263
|
if (n[y] !== o[y]) {
|
|
1238
|
-
f = n[y],
|
|
1264
|
+
f = n[y], h = o[y];
|
|
1239
1265
|
break;
|
|
1240
1266
|
}
|
|
1241
|
-
return f <
|
|
1267
|
+
return f < h ? -1 : h < f ? 1 : 0;
|
|
1242
1268
|
}, l.isEncoding = function(n) {
|
|
1243
1269
|
switch (String(n).toLowerCase()) {
|
|
1244
1270
|
case "hex":
|
|
@@ -1265,37 +1291,37 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1265
1291
|
if (o === void 0)
|
|
1266
1292
|
for (o = 0, f = 0; f < n.length; ++f)
|
|
1267
1293
|
o += n[f].length;
|
|
1268
|
-
const
|
|
1294
|
+
const h = l.allocUnsafe(o);
|
|
1269
1295
|
let y = 0;
|
|
1270
1296
|
for (f = 0; f < n.length; ++f) {
|
|
1271
1297
|
let b = n[f];
|
|
1272
|
-
if (pe(b,
|
|
1273
|
-
y + b.length >
|
|
1274
|
-
|
|
1298
|
+
if (pe(b, a))
|
|
1299
|
+
y + b.length > h.length ? (l.isBuffer(b) || (b = l.from(b)), b.copy(h, y)) : a.prototype.set.call(
|
|
1300
|
+
h,
|
|
1275
1301
|
b,
|
|
1276
1302
|
y
|
|
1277
1303
|
);
|
|
1278
1304
|
else if (l.isBuffer(b))
|
|
1279
|
-
b.copy(
|
|
1305
|
+
b.copy(h, y);
|
|
1280
1306
|
else
|
|
1281
1307
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
1282
1308
|
y += b.length;
|
|
1283
1309
|
}
|
|
1284
|
-
return
|
|
1310
|
+
return h;
|
|
1285
1311
|
};
|
|
1286
|
-
function k(
|
|
1287
|
-
if (l.isBuffer(
|
|
1288
|
-
return
|
|
1289
|
-
if (c.isView(
|
|
1290
|
-
return
|
|
1291
|
-
if (typeof
|
|
1312
|
+
function k(u, n) {
|
|
1313
|
+
if (l.isBuffer(u))
|
|
1314
|
+
return u.length;
|
|
1315
|
+
if (c.isView(u) || pe(u, c))
|
|
1316
|
+
return u.byteLength;
|
|
1317
|
+
if (typeof u != "string")
|
|
1292
1318
|
throw new TypeError(
|
|
1293
|
-
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof
|
|
1319
|
+
'The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type ' + typeof u
|
|
1294
1320
|
);
|
|
1295
|
-
const o =
|
|
1321
|
+
const o = u.length, f = arguments.length > 2 && arguments[2] === !0;
|
|
1296
1322
|
if (!f && o === 0)
|
|
1297
1323
|
return 0;
|
|
1298
|
-
let
|
|
1324
|
+
let h = !1;
|
|
1299
1325
|
for (; ; )
|
|
1300
1326
|
switch (n) {
|
|
1301
1327
|
case "ascii":
|
|
@@ -1304,7 +1330,7 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1304
1330
|
return o;
|
|
1305
1331
|
case "utf8":
|
|
1306
1332
|
case "utf-8":
|
|
1307
|
-
return lt(
|
|
1333
|
+
return lt(u).length;
|
|
1308
1334
|
case "ucs2":
|
|
1309
1335
|
case "ucs-2":
|
|
1310
1336
|
case "utf16le":
|
|
@@ -1313,20 +1339,20 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1313
1339
|
case "hex":
|
|
1314
1340
|
return o >>> 1;
|
|
1315
1341
|
case "base64":
|
|
1316
|
-
return kr(
|
|
1342
|
+
return kr(u).length;
|
|
1317
1343
|
default:
|
|
1318
|
-
if (
|
|
1319
|
-
return f ? -1 : lt(
|
|
1320
|
-
n = ("" + n).toLowerCase(),
|
|
1344
|
+
if (h)
|
|
1345
|
+
return f ? -1 : lt(u).length;
|
|
1346
|
+
n = ("" + n).toLowerCase(), h = !0;
|
|
1321
1347
|
}
|
|
1322
1348
|
}
|
|
1323
1349
|
l.byteLength = k;
|
|
1324
|
-
function B(
|
|
1350
|
+
function B(u, n, o) {
|
|
1325
1351
|
let f = !1;
|
|
1326
1352
|
if ((n === void 0 || n < 0) && (n = 0), n > this.length || ((o === void 0 || o > this.length) && (o = this.length), o <= 0) || (o >>>= 0, n >>>= 0, o <= n))
|
|
1327
1353
|
return "";
|
|
1328
|
-
for (
|
|
1329
|
-
switch (
|
|
1354
|
+
for (u || (u = "utf8"); ; )
|
|
1355
|
+
switch (u) {
|
|
1330
1356
|
case "hex":
|
|
1331
1357
|
return g(this, n, o);
|
|
1332
1358
|
case "utf8":
|
|
@@ -1346,14 +1372,14 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1346
1372
|
return v(this, n, o);
|
|
1347
1373
|
default:
|
|
1348
1374
|
if (f)
|
|
1349
|
-
throw new TypeError("Unknown encoding: " +
|
|
1350
|
-
|
|
1375
|
+
throw new TypeError("Unknown encoding: " + u);
|
|
1376
|
+
u = (u + "").toLowerCase(), f = !0;
|
|
1351
1377
|
}
|
|
1352
1378
|
}
|
|
1353
1379
|
l.prototype._isBuffer = !0;
|
|
1354
|
-
function q(
|
|
1355
|
-
const f =
|
|
1356
|
-
|
|
1380
|
+
function q(u, n, o) {
|
|
1381
|
+
const f = u[n];
|
|
1382
|
+
u[n] = u[o], u[o] = f;
|
|
1357
1383
|
}
|
|
1358
1384
|
l.prototype.swap16 = function() {
|
|
1359
1385
|
const n = this.length;
|
|
@@ -1387,23 +1413,23 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1387
1413
|
let n = "";
|
|
1388
1414
|
const o = t.INSPECT_MAX_BYTES;
|
|
1389
1415
|
return n = this.toString("hex", 0, o).replace(/(.{2})/g, "$1 ").trim(), this.length > o && (n += " ... "), "<Buffer " + n + ">";
|
|
1390
|
-
}, i && (l.prototype[i] = l.prototype.inspect), l.prototype.compare = function(n, o, f,
|
|
1391
|
-
if (pe(n,
|
|
1416
|
+
}, i && (l.prototype[i] = l.prototype.inspect), l.prototype.compare = function(n, o, f, h, y) {
|
|
1417
|
+
if (pe(n, a) && (n = l.from(n, n.offset, n.byteLength)), !l.isBuffer(n))
|
|
1392
1418
|
throw new TypeError(
|
|
1393
1419
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof n
|
|
1394
1420
|
);
|
|
1395
|
-
if (o === void 0 && (o = 0), f === void 0 && (f = n ? n.length : 0),
|
|
1421
|
+
if (o === void 0 && (o = 0), f === void 0 && (f = n ? n.length : 0), h === void 0 && (h = 0), y === void 0 && (y = this.length), o < 0 || f > n.length || h < 0 || y > this.length)
|
|
1396
1422
|
throw new RangeError("out of range index");
|
|
1397
|
-
if (
|
|
1423
|
+
if (h >= y && o >= f)
|
|
1398
1424
|
return 0;
|
|
1399
|
-
if (
|
|
1425
|
+
if (h >= y)
|
|
1400
1426
|
return -1;
|
|
1401
1427
|
if (o >= f)
|
|
1402
1428
|
return 1;
|
|
1403
|
-
if (o >>>= 0, f >>>= 0,
|
|
1429
|
+
if (o >>>= 0, f >>>= 0, h >>>= 0, y >>>= 0, this === n)
|
|
1404
1430
|
return 0;
|
|
1405
|
-
let b = y -
|
|
1406
|
-
const W = Math.min(b, D), K = this.slice(
|
|
1431
|
+
let b = y - h, D = f - o;
|
|
1432
|
+
const W = Math.min(b, D), K = this.slice(h, y), H = n.slice(o, f);
|
|
1407
1433
|
for (let z = 0; z < W; ++z)
|
|
1408
1434
|
if (K[z] !== H[z]) {
|
|
1409
1435
|
b = K[z], D = H[z];
|
|
@@ -1411,28 +1437,28 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1411
1437
|
}
|
|
1412
1438
|
return b < D ? -1 : D < b ? 1 : 0;
|
|
1413
1439
|
};
|
|
1414
|
-
function ne(
|
|
1415
|
-
if (
|
|
1440
|
+
function ne(u, n, o, f, h) {
|
|
1441
|
+
if (u.length === 0)
|
|
1416
1442
|
return -1;
|
|
1417
|
-
if (typeof o == "string" ? (f = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o,
|
|
1418
|
-
if (
|
|
1443
|
+
if (typeof o == "string" ? (f = o, o = 0) : o > 2147483647 ? o = 2147483647 : o < -2147483648 && (o = -2147483648), o = +o, Mt(o) && (o = h ? 0 : u.length - 1), o < 0 && (o = u.length + o), o >= u.length) {
|
|
1444
|
+
if (h)
|
|
1419
1445
|
return -1;
|
|
1420
|
-
o =
|
|
1446
|
+
o = u.length - 1;
|
|
1421
1447
|
} else if (o < 0)
|
|
1422
|
-
if (
|
|
1448
|
+
if (h)
|
|
1423
1449
|
o = 0;
|
|
1424
1450
|
else
|
|
1425
1451
|
return -1;
|
|
1426
1452
|
if (typeof n == "string" && (n = l.from(n, f)), l.isBuffer(n))
|
|
1427
|
-
return n.length === 0 ? -1 : we(
|
|
1453
|
+
return n.length === 0 ? -1 : we(u, n, o, f, h);
|
|
1428
1454
|
if (typeof n == "number")
|
|
1429
|
-
return n = n & 255, typeof
|
|
1455
|
+
return n = n & 255, typeof a.prototype.indexOf == "function" ? h ? a.prototype.indexOf.call(u, n, o) : a.prototype.lastIndexOf.call(u, n, o) : we(u, [n], o, f, h);
|
|
1430
1456
|
throw new TypeError("val must be string, number or Buffer");
|
|
1431
1457
|
}
|
|
1432
|
-
function we(
|
|
1433
|
-
let y = 1, b =
|
|
1458
|
+
function we(u, n, o, f, h) {
|
|
1459
|
+
let y = 1, b = u.length, D = n.length;
|
|
1434
1460
|
if (f !== void 0 && (f = String(f).toLowerCase(), f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le")) {
|
|
1435
|
-
if (
|
|
1461
|
+
if (u.length < 2 || n.length < 2)
|
|
1436
1462
|
return -1;
|
|
1437
1463
|
y = 2, b /= 2, D /= 2, o /= 2;
|
|
1438
1464
|
}
|
|
@@ -1440,10 +1466,10 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1440
1466
|
return y === 1 ? H[z] : H.readUInt16BE(z * y);
|
|
1441
1467
|
}
|
|
1442
1468
|
let K;
|
|
1443
|
-
if (
|
|
1469
|
+
if (h) {
|
|
1444
1470
|
let H = -1;
|
|
1445
1471
|
for (K = o; K < b; K++)
|
|
1446
|
-
if (W(
|
|
1472
|
+
if (W(u, K) === W(n, H === -1 ? 0 : K - H)) {
|
|
1447
1473
|
if (H === -1 && (H = K), K - H + 1 === D)
|
|
1448
1474
|
return H * y;
|
|
1449
1475
|
} else
|
|
@@ -1452,7 +1478,7 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1452
1478
|
for (o + D > b && (o = b - D), K = o; K >= 0; K--) {
|
|
1453
1479
|
let H = !0;
|
|
1454
1480
|
for (let z = 0; z < D; z++)
|
|
1455
|
-
if (W(
|
|
1481
|
+
if (W(u, K + z) !== W(n, z)) {
|
|
1456
1482
|
H = !1;
|
|
1457
1483
|
break;
|
|
1458
1484
|
}
|
|
@@ -1468,40 +1494,40 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1468
1494
|
}, l.prototype.lastIndexOf = function(n, o, f) {
|
|
1469
1495
|
return ne(this, n, o, f, !1);
|
|
1470
1496
|
};
|
|
1471
|
-
function be(
|
|
1497
|
+
function be(u, n, o, f) {
|
|
1472
1498
|
o = Number(o) || 0;
|
|
1473
|
-
const
|
|
1474
|
-
f ? (f = Number(f), f >
|
|
1499
|
+
const h = u.length - o;
|
|
1500
|
+
f ? (f = Number(f), f > h && (f = h)) : f = h;
|
|
1475
1501
|
const y = n.length;
|
|
1476
1502
|
f > y / 2 && (f = y / 2);
|
|
1477
1503
|
let b;
|
|
1478
1504
|
for (b = 0; b < f; ++b) {
|
|
1479
1505
|
const D = parseInt(n.substr(b * 2, 2), 16);
|
|
1480
|
-
if (
|
|
1506
|
+
if (Mt(D))
|
|
1481
1507
|
return b;
|
|
1482
|
-
|
|
1508
|
+
u[o + b] = D;
|
|
1483
1509
|
}
|
|
1484
1510
|
return b;
|
|
1485
1511
|
}
|
|
1486
|
-
function ae(
|
|
1487
|
-
return mt(lt(n,
|
|
1512
|
+
function ae(u, n, o, f) {
|
|
1513
|
+
return mt(lt(n, u.length - o), u, o, f);
|
|
1488
1514
|
}
|
|
1489
|
-
function ct(
|
|
1490
|
-
return mt(xr(n),
|
|
1515
|
+
function ct(u, n, o, f) {
|
|
1516
|
+
return mt(xr(n), u, o, f);
|
|
1491
1517
|
}
|
|
1492
|
-
function he(
|
|
1493
|
-
return mt(kr(n),
|
|
1518
|
+
function he(u, n, o, f) {
|
|
1519
|
+
return mt(kr(n), u, o, f);
|
|
1494
1520
|
}
|
|
1495
|
-
function Pe(
|
|
1496
|
-
return mt(ri(n,
|
|
1521
|
+
function Pe(u, n, o, f) {
|
|
1522
|
+
return mt(ri(n, u.length - o), u, o, f);
|
|
1497
1523
|
}
|
|
1498
|
-
l.prototype.write = function(n, o, f,
|
|
1524
|
+
l.prototype.write = function(n, o, f, h) {
|
|
1499
1525
|
if (o === void 0)
|
|
1500
|
-
|
|
1526
|
+
h = "utf8", f = this.length, o = 0;
|
|
1501
1527
|
else if (f === void 0 && typeof o == "string")
|
|
1502
|
-
|
|
1528
|
+
h = o, f = this.length, o = 0;
|
|
1503
1529
|
else if (isFinite(o))
|
|
1504
|
-
o = o >>> 0, isFinite(f) ? (f = f >>> 0,
|
|
1530
|
+
o = o >>> 0, isFinite(f) ? (f = f >>> 0, h === void 0 && (h = "utf8")) : (h = f, f = void 0);
|
|
1505
1531
|
else
|
|
1506
1532
|
throw new Error(
|
|
1507
1533
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
@@ -1509,10 +1535,10 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1509
1535
|
const y = this.length - o;
|
|
1510
1536
|
if ((f === void 0 || f > y) && (f = y), n.length > 0 && (f < 0 || o < 0) || o > this.length)
|
|
1511
1537
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
1512
|
-
|
|
1538
|
+
h || (h = "utf8");
|
|
1513
1539
|
let b = !1;
|
|
1514
1540
|
for (; ; )
|
|
1515
|
-
switch (
|
|
1541
|
+
switch (h) {
|
|
1516
1542
|
case "hex":
|
|
1517
1543
|
return be(this, n, o, f);
|
|
1518
1544
|
case "utf8":
|
|
@@ -1531,8 +1557,8 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1531
1557
|
return Pe(this, n, o, f);
|
|
1532
1558
|
default:
|
|
1533
1559
|
if (b)
|
|
1534
|
-
throw new TypeError("Unknown encoding: " +
|
|
1535
|
-
|
|
1560
|
+
throw new TypeError("Unknown encoding: " + h);
|
|
1561
|
+
h = ("" + h).toLowerCase(), b = !0;
|
|
1536
1562
|
}
|
|
1537
1563
|
}, l.prototype.toJSON = function() {
|
|
1538
1564
|
return {
|
|
@@ -1540,102 +1566,102 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1540
1566
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1541
1567
|
};
|
|
1542
1568
|
};
|
|
1543
|
-
function xe(
|
|
1544
|
-
return n === 0 && o ===
|
|
1569
|
+
function xe(u, n, o) {
|
|
1570
|
+
return n === 0 && o === u.length ? e.fromByteArray(u) : e.fromByteArray(u.slice(n, o));
|
|
1545
1571
|
}
|
|
1546
|
-
function Ge(
|
|
1547
|
-
o = Math.min(
|
|
1572
|
+
function Ge(u, n, o) {
|
|
1573
|
+
o = Math.min(u.length, o);
|
|
1548
1574
|
const f = [];
|
|
1549
|
-
let
|
|
1550
|
-
for (;
|
|
1551
|
-
const y =
|
|
1575
|
+
let h = n;
|
|
1576
|
+
for (; h < o; ) {
|
|
1577
|
+
const y = u[h];
|
|
1552
1578
|
let b = null, D = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
|
|
1553
|
-
if (
|
|
1579
|
+
if (h + D <= o) {
|
|
1554
1580
|
let W, K, H, z;
|
|
1555
1581
|
switch (D) {
|
|
1556
1582
|
case 1:
|
|
1557
1583
|
y < 128 && (b = y);
|
|
1558
1584
|
break;
|
|
1559
1585
|
case 2:
|
|
1560
|
-
W =
|
|
1586
|
+
W = u[h + 1], (W & 192) === 128 && (z = (y & 31) << 6 | W & 63, z > 127 && (b = z));
|
|
1561
1587
|
break;
|
|
1562
1588
|
case 3:
|
|
1563
|
-
W =
|
|
1589
|
+
W = u[h + 1], K = u[h + 2], (W & 192) === 128 && (K & 192) === 128 && (z = (y & 15) << 12 | (W & 63) << 6 | K & 63, z > 2047 && (z < 55296 || z > 57343) && (b = z));
|
|
1564
1590
|
break;
|
|
1565
1591
|
case 4:
|
|
1566
|
-
W =
|
|
1592
|
+
W = u[h + 1], K = u[h + 2], H = u[h + 3], (W & 192) === 128 && (K & 192) === 128 && (H & 192) === 128 && (z = (y & 15) << 18 | (W & 63) << 12 | (K & 63) << 6 | H & 63, z > 65535 && z < 1114112 && (b = z));
|
|
1567
1593
|
}
|
|
1568
1594
|
}
|
|
1569
|
-
b === null ? (b = 65533, D = 1) : b > 65535 && (b -= 65536, f.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), f.push(b),
|
|
1595
|
+
b === null ? (b = 65533, D = 1) : b > 65535 && (b -= 65536, f.push(b >>> 10 & 1023 | 55296), b = 56320 | b & 1023), f.push(b), h += D;
|
|
1570
1596
|
}
|
|
1571
1597
|
return ue(f);
|
|
1572
1598
|
}
|
|
1573
1599
|
const ve = 4096;
|
|
1574
|
-
function ue(
|
|
1575
|
-
const n =
|
|
1600
|
+
function ue(u) {
|
|
1601
|
+
const n = u.length;
|
|
1576
1602
|
if (n <= ve)
|
|
1577
|
-
return String.fromCharCode.apply(String,
|
|
1603
|
+
return String.fromCharCode.apply(String, u);
|
|
1578
1604
|
let o = "", f = 0;
|
|
1579
1605
|
for (; f < n; )
|
|
1580
1606
|
o += String.fromCharCode.apply(
|
|
1581
1607
|
String,
|
|
1582
|
-
|
|
1608
|
+
u.slice(f, f += ve)
|
|
1583
1609
|
);
|
|
1584
1610
|
return o;
|
|
1585
1611
|
}
|
|
1586
|
-
function ke(
|
|
1612
|
+
function ke(u, n, o) {
|
|
1587
1613
|
let f = "";
|
|
1588
|
-
o = Math.min(
|
|
1589
|
-
for (let
|
|
1590
|
-
f += String.fromCharCode(
|
|
1614
|
+
o = Math.min(u.length, o);
|
|
1615
|
+
for (let h = n; h < o; ++h)
|
|
1616
|
+
f += String.fromCharCode(u[h] & 127);
|
|
1591
1617
|
return f;
|
|
1592
1618
|
}
|
|
1593
|
-
function ze(
|
|
1619
|
+
function ze(u, n, o) {
|
|
1594
1620
|
let f = "";
|
|
1595
|
-
o = Math.min(
|
|
1596
|
-
for (let
|
|
1597
|
-
f += String.fromCharCode(
|
|
1621
|
+
o = Math.min(u.length, o);
|
|
1622
|
+
for (let h = n; h < o; ++h)
|
|
1623
|
+
f += String.fromCharCode(u[h]);
|
|
1598
1624
|
return f;
|
|
1599
1625
|
}
|
|
1600
|
-
function g(
|
|
1601
|
-
const f =
|
|
1626
|
+
function g(u, n, o) {
|
|
1627
|
+
const f = u.length;
|
|
1602
1628
|
(!n || n < 0) && (n = 0), (!o || o < 0 || o > f) && (o = f);
|
|
1603
|
-
let
|
|
1629
|
+
let h = "";
|
|
1604
1630
|
for (let y = n; y < o; ++y)
|
|
1605
|
-
|
|
1606
|
-
return
|
|
1631
|
+
h += ni[u[y]];
|
|
1632
|
+
return h;
|
|
1607
1633
|
}
|
|
1608
|
-
function v(
|
|
1609
|
-
const f =
|
|
1610
|
-
let
|
|
1634
|
+
function v(u, n, o) {
|
|
1635
|
+
const f = u.slice(n, o);
|
|
1636
|
+
let h = "";
|
|
1611
1637
|
for (let y = 0; y < f.length - 1; y += 2)
|
|
1612
|
-
|
|
1613
|
-
return
|
|
1638
|
+
h += String.fromCharCode(f[y] + f[y + 1] * 256);
|
|
1639
|
+
return h;
|
|
1614
1640
|
}
|
|
1615
1641
|
l.prototype.slice = function(n, o) {
|
|
1616
1642
|
const f = this.length;
|
|
1617
1643
|
n = ~~n, o = o === void 0 ? f : ~~o, n < 0 ? (n += f, n < 0 && (n = 0)) : n > f && (n = f), o < 0 ? (o += f, o < 0 && (o = 0)) : o > f && (o = f), o < n && (o = n);
|
|
1618
|
-
const
|
|
1619
|
-
return Object.setPrototypeOf(
|
|
1644
|
+
const h = this.subarray(n, o);
|
|
1645
|
+
return Object.setPrototypeOf(h, l.prototype), h;
|
|
1620
1646
|
};
|
|
1621
|
-
function S(
|
|
1622
|
-
if (
|
|
1647
|
+
function S(u, n, o) {
|
|
1648
|
+
if (u % 1 !== 0 || u < 0)
|
|
1623
1649
|
throw new RangeError("offset is not uint");
|
|
1624
|
-
if (
|
|
1650
|
+
if (u + n > o)
|
|
1625
1651
|
throw new RangeError("Trying to access beyond buffer length");
|
|
1626
1652
|
}
|
|
1627
1653
|
l.prototype.readUintLE = l.prototype.readUIntLE = function(n, o, f) {
|
|
1628
1654
|
n = n >>> 0, o = o >>> 0, f || S(n, o, this.length);
|
|
1629
|
-
let
|
|
1655
|
+
let h = this[n], y = 1, b = 0;
|
|
1630
1656
|
for (; ++b < o && (y *= 256); )
|
|
1631
|
-
|
|
1632
|
-
return
|
|
1657
|
+
h += this[n + b] * y;
|
|
1658
|
+
return h;
|
|
1633
1659
|
}, l.prototype.readUintBE = l.prototype.readUIntBE = function(n, o, f) {
|
|
1634
1660
|
n = n >>> 0, o = o >>> 0, f || S(n, o, this.length);
|
|
1635
|
-
let
|
|
1661
|
+
let h = this[n + --o], y = 1;
|
|
1636
1662
|
for (; o > 0 && (y *= 256); )
|
|
1637
|
-
|
|
1638
|
-
return
|
|
1663
|
+
h += this[n + --o] * y;
|
|
1664
|
+
return h;
|
|
1639
1665
|
}, l.prototype.readUint8 = l.prototype.readUInt8 = function(n, o) {
|
|
1640
1666
|
return n = n >>> 0, o || S(n, 1, this.length), this[n];
|
|
1641
1667
|
}, l.prototype.readUint16LE = l.prototype.readUInt16LE = function(n, o) {
|
|
@@ -1650,25 +1676,25 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1650
1676
|
n = n >>> 0, Se(n, "offset");
|
|
1651
1677
|
const o = this[n], f = this[n + 7];
|
|
1652
1678
|
(o === void 0 || f === void 0) && De(n, this.length - 8);
|
|
1653
|
-
const
|
|
1654
|
-
return BigInt(
|
|
1679
|
+
const h = o + 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;
|
|
1680
|
+
return BigInt(h) + (BigInt(y) << BigInt(32));
|
|
1655
1681
|
}), l.prototype.readBigUInt64BE = Le(function(n) {
|
|
1656
1682
|
n = n >>> 0, Se(n, "offset");
|
|
1657
1683
|
const o = this[n], f = this[n + 7];
|
|
1658
1684
|
(o === void 0 || f === void 0) && De(n, this.length - 8);
|
|
1659
|
-
const
|
|
1660
|
-
return (BigInt(
|
|
1685
|
+
const h = o * 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;
|
|
1686
|
+
return (BigInt(h) << BigInt(32)) + BigInt(y);
|
|
1661
1687
|
}), l.prototype.readIntLE = function(n, o, f) {
|
|
1662
1688
|
n = n >>> 0, o = o >>> 0, f || S(n, o, this.length);
|
|
1663
|
-
let
|
|
1689
|
+
let h = this[n], y = 1, b = 0;
|
|
1664
1690
|
for (; ++b < o && (y *= 256); )
|
|
1665
|
-
|
|
1666
|
-
return y *= 128,
|
|
1691
|
+
h += this[n + b] * y;
|
|
1692
|
+
return y *= 128, h >= y && (h -= Math.pow(2, 8 * o)), h;
|
|
1667
1693
|
}, l.prototype.readIntBE = function(n, o, f) {
|
|
1668
1694
|
n = n >>> 0, o = o >>> 0, f || S(n, o, this.length);
|
|
1669
|
-
let
|
|
1670
|
-
for (;
|
|
1671
|
-
b += this[n + --
|
|
1695
|
+
let h = o, y = 1, b = this[n + --h];
|
|
1696
|
+
for (; h > 0 && (y *= 256); )
|
|
1697
|
+
b += this[n + --h] * y;
|
|
1672
1698
|
return y *= 128, b >= y && (b -= Math.pow(2, 8 * o)), b;
|
|
1673
1699
|
}, l.prototype.readInt8 = function(n, o) {
|
|
1674
1700
|
return n = n >>> 0, o || S(n, 1, this.length), this[n] & 128 ? (255 - this[n] + 1) * -1 : this[n];
|
|
@@ -1688,15 +1714,15 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1688
1714
|
n = n >>> 0, Se(n, "offset");
|
|
1689
1715
|
const o = this[n], f = this[n + 7];
|
|
1690
1716
|
(o === void 0 || f === void 0) && De(n, this.length - 8);
|
|
1691
|
-
const
|
|
1692
|
-
return (BigInt(
|
|
1717
|
+
const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (f << 24);
|
|
1718
|
+
return (BigInt(h) << BigInt(32)) + BigInt(o + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
|
|
1693
1719
|
}), l.prototype.readBigInt64BE = Le(function(n) {
|
|
1694
1720
|
n = n >>> 0, Se(n, "offset");
|
|
1695
1721
|
const o = this[n], f = this[n + 7];
|
|
1696
1722
|
(o === void 0 || f === void 0) && De(n, this.length - 8);
|
|
1697
|
-
const
|
|
1723
|
+
const h = (o << 24) + // Overflow
|
|
1698
1724
|
this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + this[++n];
|
|
1699
|
-
return (BigInt(
|
|
1725
|
+
return (BigInt(h) << BigInt(32)) + BigInt(this[++n] * 2 ** 24 + this[++n] * 2 ** 16 + this[++n] * 2 ** 8 + f);
|
|
1700
1726
|
}), l.prototype.readFloatLE = function(n, o) {
|
|
1701
1727
|
return n = n >>> 0, o || S(n, 4, this.length), r.read(this, n, !0, 23, 4);
|
|
1702
1728
|
}, l.prototype.readFloatBE = function(n, o) {
|
|
@@ -1706,142 +1732,142 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1706
1732
|
}, l.prototype.readDoubleBE = function(n, o) {
|
|
1707
1733
|
return n = n >>> 0, o || S(n, 8, this.length), r.read(this, n, !1, 52, 8);
|
|
1708
1734
|
};
|
|
1709
|
-
function
|
|
1710
|
-
if (!l.isBuffer(
|
|
1735
|
+
function O(u, n, o, f, h, y) {
|
|
1736
|
+
if (!l.isBuffer(u))
|
|
1711
1737
|
throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
1712
|
-
if (n >
|
|
1738
|
+
if (n > h || n < y)
|
|
1713
1739
|
throw new RangeError('"value" argument is out of bounds');
|
|
1714
|
-
if (o + f >
|
|
1740
|
+
if (o + f > u.length)
|
|
1715
1741
|
throw new RangeError("Index out of range");
|
|
1716
1742
|
}
|
|
1717
|
-
l.prototype.writeUintLE = l.prototype.writeUIntLE = function(n, o, f,
|
|
1718
|
-
if (n = +n, o = o >>> 0, f = f >>> 0, !
|
|
1743
|
+
l.prototype.writeUintLE = l.prototype.writeUIntLE = function(n, o, f, h) {
|
|
1744
|
+
if (n = +n, o = o >>> 0, f = f >>> 0, !h) {
|
|
1719
1745
|
const D = Math.pow(2, 8 * f) - 1;
|
|
1720
|
-
|
|
1746
|
+
O(this, n, o, f, D, 0);
|
|
1721
1747
|
}
|
|
1722
1748
|
let y = 1, b = 0;
|
|
1723
1749
|
for (this[o] = n & 255; ++b < f && (y *= 256); )
|
|
1724
1750
|
this[o + b] = n / y & 255;
|
|
1725
1751
|
return o + f;
|
|
1726
|
-
}, l.prototype.writeUintBE = l.prototype.writeUIntBE = function(n, o, f,
|
|
1727
|
-
if (n = +n, o = o >>> 0, f = f >>> 0, !
|
|
1752
|
+
}, l.prototype.writeUintBE = l.prototype.writeUIntBE = function(n, o, f, h) {
|
|
1753
|
+
if (n = +n, o = o >>> 0, f = f >>> 0, !h) {
|
|
1728
1754
|
const D = Math.pow(2, 8 * f) - 1;
|
|
1729
|
-
|
|
1755
|
+
O(this, n, o, f, D, 0);
|
|
1730
1756
|
}
|
|
1731
1757
|
let y = f - 1, b = 1;
|
|
1732
1758
|
for (this[o + y] = n & 255; --y >= 0 && (b *= 256); )
|
|
1733
1759
|
this[o + y] = n / b & 255;
|
|
1734
1760
|
return o + f;
|
|
1735
1761
|
}, l.prototype.writeUint8 = l.prototype.writeUInt8 = function(n, o, f) {
|
|
1736
|
-
return n = +n, o = o >>> 0, f ||
|
|
1762
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 1, 255, 0), this[o] = n & 255, o + 1;
|
|
1737
1763
|
}, l.prototype.writeUint16LE = l.prototype.writeUInt16LE = function(n, o, f) {
|
|
1738
|
-
return n = +n, o = o >>> 0, f ||
|
|
1764
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 2, 65535, 0), this[o] = n & 255, this[o + 1] = n >>> 8, o + 2;
|
|
1739
1765
|
}, l.prototype.writeUint16BE = l.prototype.writeUInt16BE = function(n, o, f) {
|
|
1740
|
-
return n = +n, o = o >>> 0, f ||
|
|
1766
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 2, 65535, 0), this[o] = n >>> 8, this[o + 1] = n & 255, o + 2;
|
|
1741
1767
|
}, l.prototype.writeUint32LE = l.prototype.writeUInt32LE = function(n, o, f) {
|
|
1742
|
-
return n = +n, o = o >>> 0, f ||
|
|
1768
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 4, 4294967295, 0), this[o + 3] = n >>> 24, this[o + 2] = n >>> 16, this[o + 1] = n >>> 8, this[o] = n & 255, o + 4;
|
|
1743
1769
|
}, l.prototype.writeUint32BE = l.prototype.writeUInt32BE = function(n, o, f) {
|
|
1744
|
-
return n = +n, o = o >>> 0, f ||
|
|
1770
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 4, 4294967295, 0), this[o] = n >>> 24, this[o + 1] = n >>> 16, this[o + 2] = n >>> 8, this[o + 3] = n & 255, o + 4;
|
|
1745
1771
|
};
|
|
1746
|
-
function M(
|
|
1747
|
-
Ne(n, f,
|
|
1772
|
+
function M(u, n, o, f, h) {
|
|
1773
|
+
Ne(n, f, h, u, o, 7);
|
|
1748
1774
|
let y = Number(n & BigInt(4294967295));
|
|
1749
|
-
|
|
1775
|
+
u[o++] = y, y = y >> 8, u[o++] = y, y = y >> 8, u[o++] = y, y = y >> 8, u[o++] = y;
|
|
1750
1776
|
let b = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
1751
|
-
return
|
|
1777
|
+
return u[o++] = b, b = b >> 8, u[o++] = b, b = b >> 8, u[o++] = b, b = b >> 8, u[o++] = b, o;
|
|
1752
1778
|
}
|
|
1753
|
-
function V(
|
|
1754
|
-
Ne(n, f,
|
|
1779
|
+
function V(u, n, o, f, h) {
|
|
1780
|
+
Ne(n, f, h, u, o, 7);
|
|
1755
1781
|
let y = Number(n & BigInt(4294967295));
|
|
1756
|
-
|
|
1782
|
+
u[o + 7] = y, y = y >> 8, u[o + 6] = y, y = y >> 8, u[o + 5] = y, y = y >> 8, u[o + 4] = y;
|
|
1757
1783
|
let b = Number(n >> BigInt(32) & BigInt(4294967295));
|
|
1758
|
-
return
|
|
1784
|
+
return u[o + 3] = b, b = b >> 8, u[o + 2] = b, b = b >> 8, u[o + 1] = b, b = b >> 8, u[o] = b, o + 8;
|
|
1759
1785
|
}
|
|
1760
1786
|
l.prototype.writeBigUInt64LE = Le(function(n, o = 0) {
|
|
1761
1787
|
return M(this, n, o, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1762
1788
|
}), l.prototype.writeBigUInt64BE = Le(function(n, o = 0) {
|
|
1763
1789
|
return V(this, n, o, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1764
|
-
}), l.prototype.writeIntLE = function(n, o, f,
|
|
1765
|
-
if (n = +n, o = o >>> 0, !
|
|
1790
|
+
}), l.prototype.writeIntLE = function(n, o, f, h) {
|
|
1791
|
+
if (n = +n, o = o >>> 0, !h) {
|
|
1766
1792
|
const W = Math.pow(2, 8 * f - 1);
|
|
1767
|
-
|
|
1793
|
+
O(this, n, o, f, W - 1, -W);
|
|
1768
1794
|
}
|
|
1769
1795
|
let y = 0, b = 1, D = 0;
|
|
1770
1796
|
for (this[o] = n & 255; ++y < f && (b *= 256); )
|
|
1771
1797
|
n < 0 && D === 0 && this[o + y - 1] !== 0 && (D = 1), this[o + y] = (n / b >> 0) - D & 255;
|
|
1772
1798
|
return o + f;
|
|
1773
|
-
}, l.prototype.writeIntBE = function(n, o, f,
|
|
1774
|
-
if (n = +n, o = o >>> 0, !
|
|
1799
|
+
}, l.prototype.writeIntBE = function(n, o, f, h) {
|
|
1800
|
+
if (n = +n, o = o >>> 0, !h) {
|
|
1775
1801
|
const W = Math.pow(2, 8 * f - 1);
|
|
1776
|
-
|
|
1802
|
+
O(this, n, o, f, W - 1, -W);
|
|
1777
1803
|
}
|
|
1778
1804
|
let y = f - 1, b = 1, D = 0;
|
|
1779
1805
|
for (this[o + y] = n & 255; --y >= 0 && (b *= 256); )
|
|
1780
1806
|
n < 0 && D === 0 && this[o + y + 1] !== 0 && (D = 1), this[o + y] = (n / b >> 0) - D & 255;
|
|
1781
1807
|
return o + f;
|
|
1782
1808
|
}, l.prototype.writeInt8 = function(n, o, f) {
|
|
1783
|
-
return n = +n, o = o >>> 0, f ||
|
|
1809
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[o] = n & 255, o + 1;
|
|
1784
1810
|
}, l.prototype.writeInt16LE = function(n, o, f) {
|
|
1785
|
-
return n = +n, o = o >>> 0, f ||
|
|
1811
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 2, 32767, -32768), this[o] = n & 255, this[o + 1] = n >>> 8, o + 2;
|
|
1786
1812
|
}, l.prototype.writeInt16BE = function(n, o, f) {
|
|
1787
|
-
return n = +n, o = o >>> 0, f ||
|
|
1813
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 2, 32767, -32768), this[o] = n >>> 8, this[o + 1] = n & 255, o + 2;
|
|
1788
1814
|
}, l.prototype.writeInt32LE = function(n, o, f) {
|
|
1789
|
-
return n = +n, o = o >>> 0, f ||
|
|
1815
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 4, 2147483647, -2147483648), this[o] = n & 255, this[o + 1] = n >>> 8, this[o + 2] = n >>> 16, this[o + 3] = n >>> 24, o + 4;
|
|
1790
1816
|
}, l.prototype.writeInt32BE = function(n, o, f) {
|
|
1791
|
-
return n = +n, o = o >>> 0, f ||
|
|
1817
|
+
return n = +n, o = o >>> 0, f || O(this, n, o, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[o] = n >>> 24, this[o + 1] = n >>> 16, this[o + 2] = n >>> 8, this[o + 3] = n & 255, o + 4;
|
|
1792
1818
|
}, l.prototype.writeBigInt64LE = Le(function(n, o = 0) {
|
|
1793
1819
|
return M(this, n, o, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1794
1820
|
}), l.prototype.writeBigInt64BE = Le(function(n, o = 0) {
|
|
1795
1821
|
return V(this, n, o, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1796
1822
|
});
|
|
1797
|
-
function R(
|
|
1798
|
-
if (o + f >
|
|
1823
|
+
function R(u, n, o, f, h, y) {
|
|
1824
|
+
if (o + f > u.length)
|
|
1799
1825
|
throw new RangeError("Index out of range");
|
|
1800
1826
|
if (o < 0)
|
|
1801
1827
|
throw new RangeError("Index out of range");
|
|
1802
1828
|
}
|
|
1803
|
-
function $(
|
|
1804
|
-
return n = +n, o = o >>> 0,
|
|
1829
|
+
function $(u, n, o, f, h) {
|
|
1830
|
+
return n = +n, o = o >>> 0, h || R(u, n, o, 4), r.write(u, n, o, f, 23, 4), o + 4;
|
|
1805
1831
|
}
|
|
1806
1832
|
l.prototype.writeFloatLE = function(n, o, f) {
|
|
1807
1833
|
return $(this, n, o, !0, f);
|
|
1808
1834
|
}, l.prototype.writeFloatBE = function(n, o, f) {
|
|
1809
1835
|
return $(this, n, o, !1, f);
|
|
1810
1836
|
};
|
|
1811
|
-
function Q(
|
|
1812
|
-
return n = +n, o = o >>> 0,
|
|
1837
|
+
function Q(u, n, o, f, h) {
|
|
1838
|
+
return n = +n, o = o >>> 0, h || R(u, n, o, 8), r.write(u, n, o, f, 52, 8), o + 8;
|
|
1813
1839
|
}
|
|
1814
1840
|
l.prototype.writeDoubleLE = function(n, o, f) {
|
|
1815
1841
|
return Q(this, n, o, !0, f);
|
|
1816
1842
|
}, l.prototype.writeDoubleBE = function(n, o, f) {
|
|
1817
1843
|
return Q(this, n, o, !1, f);
|
|
1818
|
-
}, l.prototype.copy = function(n, o, f,
|
|
1844
|
+
}, l.prototype.copy = function(n, o, f, h) {
|
|
1819
1845
|
if (!l.isBuffer(n))
|
|
1820
1846
|
throw new TypeError("argument should be a Buffer");
|
|
1821
|
-
if (f || (f = 0), !
|
|
1847
|
+
if (f || (f = 0), !h && h !== 0 && (h = this.length), o >= n.length && (o = n.length), o || (o = 0), h > 0 && h < f && (h = f), h === f || n.length === 0 || this.length === 0)
|
|
1822
1848
|
return 0;
|
|
1823
1849
|
if (o < 0)
|
|
1824
1850
|
throw new RangeError("targetStart out of bounds");
|
|
1825
1851
|
if (f < 0 || f >= this.length)
|
|
1826
1852
|
throw new RangeError("Index out of range");
|
|
1827
|
-
if (
|
|
1853
|
+
if (h < 0)
|
|
1828
1854
|
throw new RangeError("sourceEnd out of bounds");
|
|
1829
|
-
|
|
1830
|
-
const y =
|
|
1831
|
-
return this === n && typeof
|
|
1855
|
+
h > this.length && (h = this.length), n.length - o < h - f && (h = n.length - o + f);
|
|
1856
|
+
const y = h - f;
|
|
1857
|
+
return this === n && typeof a.prototype.copyWithin == "function" ? this.copyWithin(o, f, h) : a.prototype.set.call(
|
|
1832
1858
|
n,
|
|
1833
|
-
this.subarray(f,
|
|
1859
|
+
this.subarray(f, h),
|
|
1834
1860
|
o
|
|
1835
1861
|
), y;
|
|
1836
|
-
}, l.prototype.fill = function(n, o, f,
|
|
1862
|
+
}, l.prototype.fill = function(n, o, f, h) {
|
|
1837
1863
|
if (typeof n == "string") {
|
|
1838
|
-
if (typeof o == "string" ? (
|
|
1864
|
+
if (typeof o == "string" ? (h = o, o = 0, f = this.length) : typeof f == "string" && (h = f, f = this.length), h !== void 0 && typeof h != "string")
|
|
1839
1865
|
throw new TypeError("encoding must be a string");
|
|
1840
|
-
if (typeof
|
|
1841
|
-
throw new TypeError("Unknown encoding: " +
|
|
1866
|
+
if (typeof h == "string" && !l.isEncoding(h))
|
|
1867
|
+
throw new TypeError("Unknown encoding: " + h);
|
|
1842
1868
|
if (n.length === 1) {
|
|
1843
1869
|
const b = n.charCodeAt(0);
|
|
1844
|
-
(
|
|
1870
|
+
(h === "utf8" && b < 128 || h === "latin1") && (n = b);
|
|
1845
1871
|
}
|
|
1846
1872
|
} else
|
|
1847
1873
|
typeof n == "number" ? n = n & 255 : typeof n == "boolean" && (n = Number(n));
|
|
@@ -1855,7 +1881,7 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1855
1881
|
for (y = o; y < f; ++y)
|
|
1856
1882
|
this[y] = n;
|
|
1857
1883
|
else {
|
|
1858
|
-
const b = l.isBuffer(n) ? n : l.from(n,
|
|
1884
|
+
const b = l.isBuffer(n) ? n : l.from(n, h), D = b.length;
|
|
1859
1885
|
if (D === 0)
|
|
1860
1886
|
throw new TypeError('The value "' + n + '" is invalid for argument "value"');
|
|
1861
1887
|
for (y = 0; y < f - o; ++y)
|
|
@@ -1864,97 +1890,97 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1864
1890
|
return this;
|
|
1865
1891
|
};
|
|
1866
1892
|
const J = {};
|
|
1867
|
-
function ce(
|
|
1868
|
-
J[
|
|
1893
|
+
function ce(u, n, o) {
|
|
1894
|
+
J[u] = class extends o {
|
|
1869
1895
|
constructor() {
|
|
1870
1896
|
super(), Object.defineProperty(this, "message", {
|
|
1871
1897
|
value: n.apply(this, arguments),
|
|
1872
1898
|
writable: !0,
|
|
1873
1899
|
configurable: !0
|
|
1874
|
-
}), this.name = `${this.name} [${
|
|
1900
|
+
}), this.name = `${this.name} [${u}]`, this.stack, delete this.name;
|
|
1875
1901
|
}
|
|
1876
1902
|
get code() {
|
|
1877
|
-
return
|
|
1903
|
+
return u;
|
|
1878
1904
|
}
|
|
1879
|
-
set code(
|
|
1905
|
+
set code(h) {
|
|
1880
1906
|
Object.defineProperty(this, "code", {
|
|
1881
1907
|
configurable: !0,
|
|
1882
1908
|
enumerable: !0,
|
|
1883
|
-
value:
|
|
1909
|
+
value: h,
|
|
1884
1910
|
writable: !0
|
|
1885
1911
|
});
|
|
1886
1912
|
}
|
|
1887
1913
|
toString() {
|
|
1888
|
-
return `${this.name} [${
|
|
1914
|
+
return `${this.name} [${u}]: ${this.message}`;
|
|
1889
1915
|
}
|
|
1890
1916
|
};
|
|
1891
1917
|
}
|
|
1892
1918
|
ce(
|
|
1893
1919
|
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
1894
|
-
function(
|
|
1895
|
-
return
|
|
1920
|
+
function(u) {
|
|
1921
|
+
return u ? `${u} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
1896
1922
|
},
|
|
1897
1923
|
RangeError
|
|
1898
1924
|
), ce(
|
|
1899
1925
|
"ERR_INVALID_ARG_TYPE",
|
|
1900
|
-
function(
|
|
1901
|
-
return `The "${
|
|
1926
|
+
function(u, n) {
|
|
1927
|
+
return `The "${u}" argument must be of type number. Received type ${typeof n}`;
|
|
1902
1928
|
},
|
|
1903
1929
|
TypeError
|
|
1904
1930
|
), ce(
|
|
1905
1931
|
"ERR_OUT_OF_RANGE",
|
|
1906
|
-
function(
|
|
1907
|
-
let f = `The value of "${
|
|
1908
|
-
return Number.isInteger(o) && Math.abs(o) > 2 ** 32 ?
|
|
1932
|
+
function(u, n, o) {
|
|
1933
|
+
let f = `The value of "${u}" is out of range.`, h = o;
|
|
1934
|
+
return Number.isInteger(o) && Math.abs(o) > 2 ** 32 ? h = Re(String(o)) : typeof o == "bigint" && (h = String(o), (o > BigInt(2) ** BigInt(32) || o < -(BigInt(2) ** BigInt(32))) && (h = Re(h)), h += "n"), f += ` It must be ${n}. Received ${h}`, f;
|
|
1909
1935
|
},
|
|
1910
1936
|
RangeError
|
|
1911
1937
|
);
|
|
1912
|
-
function Re(
|
|
1913
|
-
let n = "", o =
|
|
1914
|
-
const f =
|
|
1938
|
+
function Re(u) {
|
|
1939
|
+
let n = "", o = u.length;
|
|
1940
|
+
const f = u[0] === "-" ? 1 : 0;
|
|
1915
1941
|
for (; o >= f + 4; o -= 3)
|
|
1916
|
-
n = `_${
|
|
1917
|
-
return `${
|
|
1942
|
+
n = `_${u.slice(o - 3, o)}${n}`;
|
|
1943
|
+
return `${u.slice(0, o)}${n}`;
|
|
1918
1944
|
}
|
|
1919
|
-
function Be(
|
|
1920
|
-
Se(n, "offset"), (
|
|
1945
|
+
function Be(u, n, o) {
|
|
1946
|
+
Se(n, "offset"), (u[n] === void 0 || u[n + o] === void 0) && De(n, u.length - (o + 1));
|
|
1921
1947
|
}
|
|
1922
|
-
function Ne(
|
|
1923
|
-
if (
|
|
1948
|
+
function Ne(u, n, o, f, h, y) {
|
|
1949
|
+
if (u > o || u < n) {
|
|
1924
1950
|
const b = typeof n == "bigint" ? "n" : "";
|
|
1925
1951
|
let D;
|
|
1926
|
-
throw y > 3 ? n === 0 || n === BigInt(0) ? D = `>= 0${b} and < 2${b} ** ${(y + 1) * 8}${b}` : D = `>= -(2${b} ** ${(y + 1) * 8 - 1}${b}) and < 2 ** ${(y + 1) * 8 - 1}${b}` : D = `>= ${n}${b} and <= ${o}${b}`, new J.ERR_OUT_OF_RANGE("value", D,
|
|
1952
|
+
throw y > 3 ? n === 0 || n === BigInt(0) ? D = `>= 0${b} and < 2${b} ** ${(y + 1) * 8}${b}` : D = `>= -(2${b} ** ${(y + 1) * 8 - 1}${b}) and < 2 ** ${(y + 1) * 8 - 1}${b}` : D = `>= ${n}${b} and <= ${o}${b}`, new J.ERR_OUT_OF_RANGE("value", D, u);
|
|
1927
1953
|
}
|
|
1928
|
-
Be(f,
|
|
1954
|
+
Be(f, h, y);
|
|
1929
1955
|
}
|
|
1930
|
-
function Se(
|
|
1931
|
-
if (typeof
|
|
1932
|
-
throw new J.ERR_INVALID_ARG_TYPE(n, "number",
|
|
1956
|
+
function Se(u, n) {
|
|
1957
|
+
if (typeof u != "number")
|
|
1958
|
+
throw new J.ERR_INVALID_ARG_TYPE(n, "number", u);
|
|
1933
1959
|
}
|
|
1934
|
-
function De(
|
|
1935
|
-
throw Math.floor(
|
|
1960
|
+
function De(u, n, o) {
|
|
1961
|
+
throw Math.floor(u) !== u ? (Se(u, o), new J.ERR_OUT_OF_RANGE(o || "offset", "an integer", u)) : n < 0 ? new J.ERR_BUFFER_OUT_OF_BOUNDS() : new J.ERR_OUT_OF_RANGE(
|
|
1936
1962
|
o || "offset",
|
|
1937
1963
|
`>= ${o ? 1 : 0} and <= ${n}`,
|
|
1938
|
-
|
|
1964
|
+
u
|
|
1939
1965
|
);
|
|
1940
1966
|
}
|
|
1941
|
-
const
|
|
1942
|
-
function A(
|
|
1943
|
-
if (
|
|
1967
|
+
const jt = /[^+/0-9A-Za-z-_]/g;
|
|
1968
|
+
function A(u) {
|
|
1969
|
+
if (u = u.split("=")[0], u = u.trim().replace(jt, ""), u.length < 2)
|
|
1944
1970
|
return "";
|
|
1945
|
-
for (;
|
|
1946
|
-
|
|
1947
|
-
return
|
|
1971
|
+
for (; u.length % 4 !== 0; )
|
|
1972
|
+
u = u + "=";
|
|
1973
|
+
return u;
|
|
1948
1974
|
}
|
|
1949
|
-
function lt(
|
|
1975
|
+
function lt(u, n) {
|
|
1950
1976
|
n = n || 1 / 0;
|
|
1951
1977
|
let o;
|
|
1952
|
-
const f =
|
|
1953
|
-
let
|
|
1978
|
+
const f = u.length;
|
|
1979
|
+
let h = null;
|
|
1954
1980
|
const y = [];
|
|
1955
1981
|
for (let b = 0; b < f; ++b) {
|
|
1956
|
-
if (o =
|
|
1957
|
-
if (!
|
|
1982
|
+
if (o = u.charCodeAt(b), o > 55295 && o < 57344) {
|
|
1983
|
+
if (!h) {
|
|
1958
1984
|
if (o > 56319) {
|
|
1959
1985
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
1960
1986
|
continue;
|
|
@@ -1962,17 +1988,17 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
1962
1988
|
(n -= 3) > -1 && y.push(239, 191, 189);
|
|
1963
1989
|
continue;
|
|
1964
1990
|
}
|
|
1965
|
-
|
|
1991
|
+
h = o;
|
|
1966
1992
|
continue;
|
|
1967
1993
|
}
|
|
1968
1994
|
if (o < 56320) {
|
|
1969
|
-
(n -= 3) > -1 && y.push(239, 191, 189),
|
|
1995
|
+
(n -= 3) > -1 && y.push(239, 191, 189), h = o;
|
|
1970
1996
|
continue;
|
|
1971
1997
|
}
|
|
1972
|
-
o = (
|
|
1998
|
+
o = (h - 55296 << 10 | o - 56320) + 65536;
|
|
1973
1999
|
} else
|
|
1974
|
-
|
|
1975
|
-
if (
|
|
2000
|
+
h && (n -= 3) > -1 && y.push(239, 191, 189);
|
|
2001
|
+
if (h = null, o < 128) {
|
|
1976
2002
|
if ((n -= 1) < 0)
|
|
1977
2003
|
break;
|
|
1978
2004
|
y.push(o);
|
|
@@ -2005,45 +2031,45 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
2005
2031
|
}
|
|
2006
2032
|
return y;
|
|
2007
2033
|
}
|
|
2008
|
-
function xr(
|
|
2034
|
+
function xr(u) {
|
|
2009
2035
|
const n = [];
|
|
2010
|
-
for (let o = 0; o <
|
|
2011
|
-
n.push(
|
|
2036
|
+
for (let o = 0; o < u.length; ++o)
|
|
2037
|
+
n.push(u.charCodeAt(o) & 255);
|
|
2012
2038
|
return n;
|
|
2013
2039
|
}
|
|
2014
|
-
function ri(
|
|
2015
|
-
let o, f,
|
|
2040
|
+
function ri(u, n) {
|
|
2041
|
+
let o, f, h;
|
|
2016
2042
|
const y = [];
|
|
2017
|
-
for (let b = 0; b <
|
|
2018
|
-
o =
|
|
2043
|
+
for (let b = 0; b < u.length && !((n -= 2) < 0); ++b)
|
|
2044
|
+
o = u.charCodeAt(b), f = o >> 8, h = o % 256, y.push(h), y.push(f);
|
|
2019
2045
|
return y;
|
|
2020
2046
|
}
|
|
2021
|
-
function kr(
|
|
2022
|
-
return e.toByteArray(A(
|
|
2047
|
+
function kr(u) {
|
|
2048
|
+
return e.toByteArray(A(u));
|
|
2023
2049
|
}
|
|
2024
|
-
function mt(
|
|
2025
|
-
let
|
|
2026
|
-
for (
|
|
2027
|
-
n[
|
|
2028
|
-
return
|
|
2050
|
+
function mt(u, n, o, f) {
|
|
2051
|
+
let h;
|
|
2052
|
+
for (h = 0; h < f && !(h + o >= n.length || h >= u.length); ++h)
|
|
2053
|
+
n[h + o] = u[h];
|
|
2054
|
+
return h;
|
|
2029
2055
|
}
|
|
2030
|
-
function pe(
|
|
2031
|
-
return
|
|
2056
|
+
function pe(u, n) {
|
|
2057
|
+
return u instanceof n || u != null && u.constructor != null && u.constructor.name != null && u.constructor.name === n.name;
|
|
2032
2058
|
}
|
|
2033
|
-
function
|
|
2034
|
-
return
|
|
2059
|
+
function Mt(u) {
|
|
2060
|
+
return u !== u;
|
|
2035
2061
|
}
|
|
2036
2062
|
const ni = function() {
|
|
2037
|
-
const
|
|
2063
|
+
const u = "0123456789abcdef", n = new Array(256);
|
|
2038
2064
|
for (let o = 0; o < 16; ++o) {
|
|
2039
2065
|
const f = o * 16;
|
|
2040
|
-
for (let
|
|
2041
|
-
n[f +
|
|
2066
|
+
for (let h = 0; h < 16; ++h)
|
|
2067
|
+
n[f + h] = u[o] + u[h];
|
|
2042
2068
|
}
|
|
2043
2069
|
return n;
|
|
2044
2070
|
}();
|
|
2045
|
-
function Le(
|
|
2046
|
-
return typeof BigInt > "u" ? ii :
|
|
2071
|
+
function Le(u) {
|
|
2072
|
+
return typeof BigInt > "u" ? ii : u;
|
|
2047
2073
|
}
|
|
2048
2074
|
function ii() {
|
|
2049
2075
|
throw new Error("BigInt not supported");
|
|
@@ -2051,108 +2077,108 @@ gr.write = function(t, e, r, i, s, u) {
|
|
|
2051
2077
|
})(Sn);
|
|
2052
2078
|
const jr = Sn.Buffer;
|
|
2053
2079
|
var En = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2054
|
-
function
|
|
2080
|
+
function uo(t) {
|
|
2055
2081
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2056
2082
|
}
|
|
2057
2083
|
var mr = { exports: {} };
|
|
2058
|
-
const
|
|
2084
|
+
const co = Object.getPrototypeOf({});
|
|
2059
2085
|
function wr(t) {
|
|
2060
2086
|
function e(I) {
|
|
2061
2087
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
2062
2088
|
}
|
|
2063
2089
|
function r(I) {
|
|
2064
|
-
let
|
|
2065
|
-
const j = I.length,
|
|
2066
|
-
for (
|
|
2067
|
-
|
|
2068
|
-
return
|
|
2090
|
+
let T = 0;
|
|
2091
|
+
const j = I.length, L = new Array(j);
|
|
2092
|
+
for (T = 0; T < j; ++T)
|
|
2093
|
+
L[T] = F(I[T]);
|
|
2094
|
+
return L;
|
|
2069
2095
|
}
|
|
2070
2096
|
function i(I) {
|
|
2071
|
-
const
|
|
2072
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
2097
|
+
const T = {};
|
|
2098
|
+
if (p && Object.getPrototypeOf(I) !== co)
|
|
2073
2099
|
return p(I);
|
|
2074
|
-
const j =
|
|
2075
|
-
let
|
|
2076
|
-
for (
|
|
2077
|
-
e(k = j[
|
|
2078
|
-
return
|
|
2079
|
-
}
|
|
2080
|
-
function s(I,
|
|
2081
|
-
const j = I.length,
|
|
2100
|
+
const j = d(I);
|
|
2101
|
+
let L, C, k;
|
|
2102
|
+
for (L = 0, C = j.length; L < C; ++L)
|
|
2103
|
+
e(k = j[L]) && (T[k] = F(I[k]));
|
|
2104
|
+
return T;
|
|
2105
|
+
}
|
|
2106
|
+
function s(I, T) {
|
|
2107
|
+
const j = I.length, L = T.length;
|
|
2082
2108
|
let C = 0;
|
|
2083
|
-
const k = new Array(j +
|
|
2109
|
+
const k = new Array(j + L);
|
|
2084
2110
|
for (C = 0; C < j; ++C)
|
|
2085
|
-
k[C] =
|
|
2086
|
-
for (C = 0; C <
|
|
2087
|
-
k[C + j] =
|
|
2111
|
+
k[C] = F(I[C]);
|
|
2112
|
+
for (C = 0; C < L; ++C)
|
|
2113
|
+
k[C + j] = F(T[C]);
|
|
2088
2114
|
return k;
|
|
2089
2115
|
}
|
|
2090
|
-
const
|
|
2116
|
+
const a = Object.prototype.propertyIsEnumerable;
|
|
2091
2117
|
function c(I) {
|
|
2092
|
-
const
|
|
2093
|
-
for (let
|
|
2094
|
-
|
|
2095
|
-
return
|
|
2118
|
+
const T = Object.keys(I), j = Object.getOwnPropertySymbols(I);
|
|
2119
|
+
for (let L = 0, C = j.length; L < C; ++L)
|
|
2120
|
+
a.call(I, j[L]) && T.push(j[L]);
|
|
2121
|
+
return T;
|
|
2096
2122
|
}
|
|
2097
|
-
const
|
|
2123
|
+
const d = t && t.symbols ? c : Object.keys, p = typeof t?.cloneProtoObject == "function" ? t.cloneProtoObject : void 0;
|
|
2098
2124
|
function m(I) {
|
|
2099
2125
|
return typeof I == "object" && I !== null && !(I instanceof RegExp) && !(I instanceof Date);
|
|
2100
2126
|
}
|
|
2101
2127
|
function l(I) {
|
|
2102
2128
|
return typeof I != "object" || I === null;
|
|
2103
2129
|
}
|
|
2104
|
-
const w = typeof jr < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof jr : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone:
|
|
2105
|
-
function
|
|
2130
|
+
const w = typeof jr < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof jr : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: x, getKeys: d, isMergeableObject: m }) : s;
|
|
2131
|
+
function F(I) {
|
|
2106
2132
|
return m(I) ? Array.isArray(I) ? r(I) : i(I) : I;
|
|
2107
2133
|
}
|
|
2108
|
-
function
|
|
2109
|
-
const j = {},
|
|
2134
|
+
function _(I, T) {
|
|
2135
|
+
const j = {}, L = d(I), C = d(T);
|
|
2110
2136
|
let k, B, q;
|
|
2111
|
-
for (k = 0, B =
|
|
2112
|
-
e(q =
|
|
2137
|
+
for (k = 0, B = L.length; k < B; ++k)
|
|
2138
|
+
e(q = L[k]) && C.indexOf(q) === -1 && (j[q] = F(I[q]));
|
|
2113
2139
|
for (k = 0, B = C.length; k < B; ++k)
|
|
2114
|
-
e(q = C[k]) && (q in I && (
|
|
2115
|
-
(j[q] =
|
|
2140
|
+
e(q = C[k]) && (q in I && (L.indexOf(q) !== -1 && (j[q] = x(I[q], T[q])), !0) || // eslint-disable-line no-mixed-operators
|
|
2141
|
+
(j[q] = F(T[q])));
|
|
2116
2142
|
return j;
|
|
2117
2143
|
}
|
|
2118
|
-
function x(I,
|
|
2119
|
-
const j = Array.isArray(
|
|
2120
|
-
return l(
|
|
2144
|
+
function x(I, T) {
|
|
2145
|
+
const j = Array.isArray(T), L = Array.isArray(I);
|
|
2146
|
+
return l(T) ? T : w(I) ? F(T) : j && L ? E(I, T) : j !== L ? F(T) : _(I, T);
|
|
2121
2147
|
}
|
|
2122
2148
|
function N() {
|
|
2123
2149
|
switch (arguments.length) {
|
|
2124
2150
|
case 0:
|
|
2125
2151
|
return {};
|
|
2126
2152
|
case 1:
|
|
2127
|
-
return
|
|
2153
|
+
return F(arguments[0]);
|
|
2128
2154
|
case 2:
|
|
2129
2155
|
return x(arguments[0], arguments[1]);
|
|
2130
2156
|
}
|
|
2131
2157
|
let I;
|
|
2132
|
-
for (let
|
|
2133
|
-
I = x(I, arguments[
|
|
2158
|
+
for (let T = 0, j = arguments.length; T < j; ++T)
|
|
2159
|
+
I = x(I, arguments[T]);
|
|
2134
2160
|
return I;
|
|
2135
2161
|
}
|
|
2136
2162
|
return t && t.all ? N : x;
|
|
2137
2163
|
}
|
|
2138
2164
|
mr.exports = wr;
|
|
2139
2165
|
mr.exports.default = wr;
|
|
2140
|
-
var
|
|
2141
|
-
const
|
|
2166
|
+
var lo = mr.exports.deepmerge = wr;
|
|
2167
|
+
const fo = (t) => (e, r) => {
|
|
2142
2168
|
let i = 0;
|
|
2143
|
-
const s = e.length,
|
|
2169
|
+
const s = e.length, a = r.length, c = Math.max(s, a), d = new Array(c);
|
|
2144
2170
|
for (i = 0; i < c; ++i)
|
|
2145
|
-
i <
|
|
2146
|
-
return
|
|
2147
|
-
},
|
|
2148
|
-
const i = ln([e, r], (c,
|
|
2171
|
+
i < a ? d[i] = t.deepmerge(e[i], r[i]) : d[i] = t.clone(e[i]);
|
|
2172
|
+
return d;
|
|
2173
|
+
}, ho = lo({ mergeArray: fo }), po = (t, e, r) => {
|
|
2174
|
+
const i = ln([e, r], (c, d) => {
|
|
2149
2175
|
if (c) {
|
|
2150
|
-
const p =
|
|
2176
|
+
const p = d.data?.find((m) => m.id === c);
|
|
2151
2177
|
if (p)
|
|
2152
2178
|
return p;
|
|
2153
2179
|
console.error("Feed list is not loaded yet. Issue with the opened question.");
|
|
2154
2180
|
}
|
|
2155
|
-
}), s =
|
|
2181
|
+
}), s = Te({
|
|
2156
2182
|
data: void 0,
|
|
2157
2183
|
loading: void 0,
|
|
2158
2184
|
error: void 0
|
|
@@ -2160,24 +2186,24 @@ const uo = (t) => (e, r) => {
|
|
|
2160
2186
|
return i.subscribe(async (c) => {
|
|
2161
2187
|
if (c && c.type === "question") {
|
|
2162
2188
|
s.setKey("loading", !0);
|
|
2163
|
-
const
|
|
2164
|
-
s.set({ data:
|
|
2189
|
+
const d = await vn(c.id, t);
|
|
2190
|
+
s.set({ data: d, loading: !1 });
|
|
2165
2191
|
return;
|
|
2166
2192
|
}
|
|
2167
2193
|
s.set({ data: void 0, loading: !1 });
|
|
2168
2194
|
}), { $store: i, $extendedStore: s, updateExtendedQuestion: (c) => {
|
|
2169
|
-
const
|
|
2170
|
-
if (
|
|
2195
|
+
const d = s.get().data;
|
|
2196
|
+
if (d && c?.answers)
|
|
2171
2197
|
for (const p of c.answers)
|
|
2172
2198
|
p.youVoted !== !0 && delete p.youVoted;
|
|
2173
|
-
s.set({ data:
|
|
2199
|
+
s.set({ data: ho(d, c) });
|
|
2174
2200
|
} };
|
|
2175
2201
|
};
|
|
2176
2202
|
var Ve;
|
|
2177
2203
|
(function(t) {
|
|
2178
2204
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
2179
2205
|
})(Ve || (Ve = {}));
|
|
2180
|
-
class
|
|
2206
|
+
class yo {
|
|
2181
2207
|
/** sl event id */
|
|
2182
2208
|
slStreamId;
|
|
2183
2209
|
/** organization id */
|
|
@@ -2207,13 +2233,13 @@ class fo {
|
|
|
2207
2233
|
notifications;
|
|
2208
2234
|
log;
|
|
2209
2235
|
constructor(e) {
|
|
2210
|
-
this.log = Pt("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new se(re(void 0), "moderationId").getStore(), this.interactiveAllowed = new se(re(Ve.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new se(re(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new de(
|
|
2211
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2236
|
+
this.log = Pt("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new se(re(void 0), "moderationId").getStore(), this.interactiveAllowed = new se(re(Ve.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new se(re(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new de(Hi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new de(Zi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new de(Ji(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = po(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2237
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Xi(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
|
|
2212
2238
|
window.requestAnimationFrame(() => {
|
|
2213
2239
|
this.openedQuestion.updateExtendedQuestion(i.data?.attributes?.question);
|
|
2214
2240
|
});
|
|
2215
2241
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2216
|
-
}), this.feedSubscription =
|
|
2242
|
+
}), this.feedSubscription = Yi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2217
2243
|
const i = this.activeQuestionId.getStore();
|
|
2218
2244
|
i && i.mutate(r.data?.attributes);
|
|
2219
2245
|
}), this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -2235,8 +2261,8 @@ class fo {
|
|
|
2235
2261
|
* @param opts.entity - entity id (question id, tweet id, ...etc)
|
|
2236
2262
|
*/
|
|
2237
2263
|
getCurrentSessionId = (e) => {
|
|
2238
|
-
const r = e.eventId || this.slStreamId.get() || "", i = e.userId || this.userId.get() || "", s = e.organizationId || this.organizationId.get() || "",
|
|
2239
|
-
return [s, r, i, c,
|
|
2264
|
+
const r = e.eventId || this.slStreamId.get() || "", i = e.userId || this.userId.get() || "", s = e.organizationId || this.organizationId.get() || "", a = e.entity || "", c = e.prefix || "";
|
|
2265
|
+
return [s, r, i, c, a].join(":");
|
|
2240
2266
|
};
|
|
2241
2267
|
disconnect = () => {
|
|
2242
2268
|
this.feedSubscription?.disconnect();
|
|
@@ -2254,7 +2280,7 @@ class fo {
|
|
|
2254
2280
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2255
2281
|
};
|
|
2256
2282
|
}
|
|
2257
|
-
class
|
|
2283
|
+
class go {
|
|
2258
2284
|
notificationsList;
|
|
2259
2285
|
notifications;
|
|
2260
2286
|
store;
|
|
@@ -2309,12 +2335,12 @@ class ho {
|
|
|
2309
2335
|
return;
|
|
2310
2336
|
}
|
|
2311
2337
|
const i = setTimeout(() => {
|
|
2312
|
-
const s = e,
|
|
2313
|
-
|
|
2338
|
+
const s = e, a = new Map(this.notifications.getValue());
|
|
2339
|
+
a.set(r.id, r), this.notifications.setValue(a);
|
|
2314
2340
|
const c = setTimeout(() => {
|
|
2315
2341
|
this.logger.debug({ notificationId: s, delay: r.autoHideDuration || 5e3 }, "notification hiding by autoHideDuration"), this.closeNotification(s);
|
|
2316
2342
|
}, r.autoHideDuration || 5e3);
|
|
2317
|
-
this.timeouts.set(s, c), this.logger.debug({ notificationId: s, queue: [...
|
|
2343
|
+
this.timeouts.set(s, c), this.logger.debug({ notificationId: s, queue: [...a.values()] }, "notification displayed");
|
|
2318
2344
|
}, r.delay || 0);
|
|
2319
2345
|
this.timeouts.set(e, i), this.logger.debug({ notificationId: e }, "active queue tick completed"), this.tickWaitingQueue();
|
|
2320
2346
|
};
|
|
@@ -2323,8 +2349,8 @@ class ho {
|
|
|
2323
2349
|
if (i) {
|
|
2324
2350
|
i.hiding = !(this.waitingQueue.size >= this.options.concurrency), this.notifications.setValue(r);
|
|
2325
2351
|
const s = setTimeout(() => {
|
|
2326
|
-
const
|
|
2327
|
-
|
|
2352
|
+
const a = new Map(this.notifications.getValue());
|
|
2353
|
+
a.delete(e), this.notifications.setValue(a);
|
|
2328
2354
|
const c = this.timeouts.get(e);
|
|
2329
2355
|
c !== void 0 && (clearTimeout(c), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden");
|
|
2330
2356
|
}, this.options.animationDelay || 0);
|
|
@@ -2333,18 +2359,18 @@ class ho {
|
|
|
2333
2359
|
this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding");
|
|
2334
2360
|
};
|
|
2335
2361
|
}
|
|
2336
|
-
var
|
|
2362
|
+
var Ft;
|
|
2337
2363
|
(function(t) {
|
|
2338
2364
|
t.OPENED = "opened";
|
|
2339
|
-
})(
|
|
2340
|
-
class
|
|
2365
|
+
})(Ft || (Ft = {}));
|
|
2366
|
+
class mo extends Lt {
|
|
2341
2367
|
constructor() {
|
|
2342
2368
|
super("notification");
|
|
2343
2369
|
}
|
|
2344
2370
|
setOpened = (e) => {
|
|
2345
|
-
this.write(
|
|
2371
|
+
this.write(Ft.OPENED, e, "true");
|
|
2346
2372
|
};
|
|
2347
|
-
isOpened = (e) => this.read(
|
|
2373
|
+
isOpened = (e) => this.read(Ft.OPENED, e);
|
|
2348
2374
|
clearNotification = () => {
|
|
2349
2375
|
this.clear();
|
|
2350
2376
|
};
|
|
@@ -2353,11 +2379,11 @@ var Me;
|
|
|
2353
2379
|
(function(t) {
|
|
2354
2380
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2355
2381
|
})(Me || (Me = {}));
|
|
2356
|
-
class
|
|
2382
|
+
class wo {
|
|
2357
2383
|
queue;
|
|
2358
2384
|
storage;
|
|
2359
2385
|
constructor(e = {}) {
|
|
2360
|
-
this.storage = new
|
|
2386
|
+
this.storage = new mo(), this.queue = new go({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2361
2387
|
}
|
|
2362
2388
|
add = (e) => {
|
|
2363
2389
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2370,16 +2396,16 @@ class yo {
|
|
|
2370
2396
|
this.storage.setOpened(e);
|
|
2371
2397
|
};
|
|
2372
2398
|
}
|
|
2373
|
-
const
|
|
2374
|
-
t.notifications = new
|
|
2375
|
-
},
|
|
2376
|
-
const { client: r } = t.createPromiseClient(
|
|
2399
|
+
const bo = (t, e, r) => {
|
|
2400
|
+
t.notifications = new wo(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2401
|
+
}, vo = (t, e) => {
|
|
2402
|
+
const { client: r } = t.createPromiseClient(_e, { method: "submitAnswer" });
|
|
2377
2403
|
return r.submitAnswer({ data: e });
|
|
2378
|
-
},
|
|
2379
|
-
const { client: r } = t.createPromiseClient(
|
|
2404
|
+
}, So = (t, e) => {
|
|
2405
|
+
const { client: r } = t.createPromiseClient(_e, { method: "submitInplay" });
|
|
2380
2406
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2381
|
-
},
|
|
2382
|
-
const { client: r } = t.createPromiseClient(
|
|
2407
|
+
}, Ao = (t, e) => {
|
|
2408
|
+
const { client: r } = t.createPromiseClient(_e, { method: "skipQuestion" });
|
|
2383
2409
|
return r.skipQuestion({ data: { id: e } });
|
|
2384
2410
|
};
|
|
2385
2411
|
var Xe;
|
|
@@ -2405,93 +2431,93 @@ class In extends Lt {
|
|
|
2405
2431
|
}
|
|
2406
2432
|
const Mr = {
|
|
2407
2433
|
pageSize: 10
|
|
2408
|
-
},
|
|
2409
|
-
let
|
|
2410
|
-
const c = re({ pageSize: s?.pageSize || Mr.pageSize, page: 0 }),
|
|
2434
|
+
}, Eo = (t, e, r, i, s) => {
|
|
2435
|
+
let a = 0;
|
|
2436
|
+
const c = re({ pageSize: s?.pageSize || Mr.pageSize, page: 0 }), d = Te({
|
|
2411
2437
|
data: [],
|
|
2412
2438
|
key: Date.now(),
|
|
2413
2439
|
hasMore: !0,
|
|
2414
2440
|
loading: void 0,
|
|
2415
2441
|
error: void 0
|
|
2416
|
-
}), p =
|
|
2417
|
-
const E = e.get(),
|
|
2418
|
-
if (E &&
|
|
2419
|
-
const
|
|
2420
|
-
|
|
2442
|
+
}), p = Ki(t), m = async () => {
|
|
2443
|
+
const E = e.get(), F = i.getStore().get().data?.map((_) => _.slId) || [];
|
|
2444
|
+
if (E && F?.length) {
|
|
2445
|
+
const _ = r.get();
|
|
2446
|
+
_ && F.push(_), d.setKey("loading", !0), d.setKey("data", []);
|
|
2421
2447
|
const x = {
|
|
2422
2448
|
eventId: E,
|
|
2423
|
-
usersIds:
|
|
2449
|
+
usersIds: F,
|
|
2424
2450
|
pagination: { page: 0, pageSize: s?.pageSize || Mr.pageSize }
|
|
2425
2451
|
}, N = await p(x);
|
|
2426
|
-
|
|
2452
|
+
d.set({
|
|
2427
2453
|
data: N.data.map((I) => I.attributes),
|
|
2428
2454
|
hasMore: !0,
|
|
2429
2455
|
key: Date.now(),
|
|
2430
2456
|
loading: !1
|
|
2431
|
-
}), N.meta && (
|
|
2457
|
+
}), N.meta && (a = Math.round(N.meta.count / N.meta.pageSize)), c.set(x.pagination);
|
|
2432
2458
|
}
|
|
2433
2459
|
}, l = () => {
|
|
2434
2460
|
m();
|
|
2435
2461
|
}, w = (E) => {
|
|
2436
|
-
const
|
|
2437
|
-
|
|
2462
|
+
const F = c.get(), _ = E || F.page + 1;
|
|
2463
|
+
_ <= a && c.set({ ...F, page: _ });
|
|
2438
2464
|
};
|
|
2439
|
-
return fn(
|
|
2440
|
-
const E = e.listen(m),
|
|
2465
|
+
return fn(d, () => {
|
|
2466
|
+
const E = e.listen(m), F = i.listen(m), _ = c.listen(async (x) => {
|
|
2441
2467
|
const N = e.get();
|
|
2442
2468
|
if (x.page > 0 && N)
|
|
2443
|
-
if (x.page <
|
|
2444
|
-
|
|
2445
|
-
const
|
|
2469
|
+
if (x.page < a) {
|
|
2470
|
+
d.setKey("loading", !0);
|
|
2471
|
+
const T = await p({
|
|
2446
2472
|
eventId: N,
|
|
2447
2473
|
pagination: x
|
|
2448
|
-
}), j =
|
|
2449
|
-
|
|
2450
|
-
data: [...j, ...
|
|
2451
|
-
key:
|
|
2474
|
+
}), j = d.get().data || [];
|
|
2475
|
+
d.set({
|
|
2476
|
+
data: [...j, ...T.data.map((L) => L.attributes)],
|
|
2477
|
+
key: d.get().key,
|
|
2452
2478
|
loading: !1,
|
|
2453
2479
|
hasMore: !0
|
|
2454
2480
|
});
|
|
2455
2481
|
} else
|
|
2456
|
-
|
|
2482
|
+
d.setKey("hasMore", !1);
|
|
2457
2483
|
});
|
|
2458
2484
|
return () => {
|
|
2459
|
-
E(),
|
|
2485
|
+
E(), F(), _();
|
|
2460
2486
|
};
|
|
2461
|
-
}), { $store:
|
|
2462
|
-
},
|
|
2487
|
+
}), { $store: d, fetchMore: w, invalidate: l };
|
|
2488
|
+
}, Io = (t, e) => {
|
|
2463
2489
|
const { client: r, queryKey: i } = t.createPromiseClient(yt, {
|
|
2464
2490
|
method: "generateDeepLink",
|
|
2465
2491
|
params: e
|
|
2466
2492
|
});
|
|
2467
2493
|
return t.nanoquery.createFetcherStore(i, {
|
|
2468
|
-
fetcher: async (s,
|
|
2469
|
-
data: { gamification: !0, externalEventId:
|
|
2494
|
+
fetcher: async (s, a, c, d) => c ? (await r.generateDeepLink({
|
|
2495
|
+
data: { gamification: !0, externalEventId: d, eventId: c }
|
|
2470
2496
|
})).data?.attributes : {}
|
|
2471
2497
|
});
|
|
2472
|
-
},
|
|
2473
|
-
const { client: i } = t.createPromiseClient(
|
|
2498
|
+
}, Fo = (t, { web: e, mobile: r }) => {
|
|
2499
|
+
const { client: i } = t.createPromiseClient(li, { method: "generate" });
|
|
2474
2500
|
return i.generate({ web: e, mobile: r });
|
|
2475
2501
|
}, Vr = (t, e) => {
|
|
2476
2502
|
const r = new URLSearchParams(t);
|
|
2477
2503
|
for (const [i, s] of Object.entries(e))
|
|
2478
2504
|
r.append(i, s);
|
|
2479
2505
|
return r.toString();
|
|
2480
|
-
},
|
|
2481
|
-
const s =
|
|
2482
|
-
return fn(s, () =>
|
|
2483
|
-
const l = p ? "https://masters.com" :
|
|
2484
|
-
[
|
|
2506
|
+
}, Oo = (t, e, r, i) => {
|
|
2507
|
+
const s = Te({});
|
|
2508
|
+
return fn(s, () => Io(t, [e, r]).subscribe(async ({ data: d, error: p, loading: m }) => {
|
|
2509
|
+
const l = p ? "https://masters.com" : d?.url, w = i.get() || "", E = e.get() || "", F = r.get() || "", _ = {
|
|
2510
|
+
[Rt]: w,
|
|
2485
2511
|
[wn]: E,
|
|
2486
|
-
[bn]:
|
|
2512
|
+
[bn]: F
|
|
2487
2513
|
};
|
|
2488
2514
|
if (!m && l) {
|
|
2489
2515
|
s.setKey("loading", !0);
|
|
2490
2516
|
let x = window.location.search, N = window.location.hash;
|
|
2491
|
-
x && N || N ? x = `?${Vr(x,
|
|
2492
|
-
const I = window.location.origin + window.location.pathname + x + N,
|
|
2517
|
+
x && N || N ? x = `?${Vr(x, _)}` : N = `#${Vr("", _)}`;
|
|
2518
|
+
const I = window.location.origin + window.location.pathname + x + N, T = await Fo(t, { web: I, mobile: l });
|
|
2493
2519
|
s.set({
|
|
2494
|
-
data:
|
|
2520
|
+
data: T.data?.link,
|
|
2495
2521
|
loading: !1
|
|
2496
2522
|
});
|
|
2497
2523
|
} else
|
|
@@ -2502,11 +2528,11 @@ var ee;
|
|
|
2502
2528
|
(function(t) {
|
|
2503
2529
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2504
2530
|
})(ee || (ee = {}));
|
|
2505
|
-
const
|
|
2506
|
-
const { inplayGame: s } = t.featureSettings.get(),
|
|
2531
|
+
const To = (t, e, r, i) => {
|
|
2532
|
+
const { inplayGame: s } = t.featureSettings.get(), a = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2507
2533
|
s && r.add({
|
|
2508
2534
|
type: Me.ONBOARDING,
|
|
2509
|
-
id:
|
|
2535
|
+
id: a,
|
|
2510
2536
|
action: t.openFeature,
|
|
2511
2537
|
persistent: !0,
|
|
2512
2538
|
autoHideDuration: 1e6,
|
|
@@ -2522,7 +2548,7 @@ const Io = (t, e, r, i) => {
|
|
|
2522
2548
|
}
|
|
2523
2549
|
}
|
|
2524
2550
|
});
|
|
2525
|
-
}, wt = (t, e, r, i, s,
|
|
2551
|
+
}, wt = (t, e, r, i, s, a) => {
|
|
2526
2552
|
try {
|
|
2527
2553
|
const c = e.userId.get();
|
|
2528
2554
|
if (!c)
|
|
@@ -2533,7 +2559,7 @@ const Io = (t, e, r, i) => {
|
|
|
2533
2559
|
eventId: e.slStreamId.get() || ""
|
|
2534
2560
|
}) === ee.Completed) {
|
|
2535
2561
|
t.set(ee.Completed);
|
|
2536
|
-
for (const E of
|
|
2562
|
+
for (const E of a)
|
|
2537
2563
|
E();
|
|
2538
2564
|
return;
|
|
2539
2565
|
}
|
|
@@ -2547,25 +2573,25 @@ const Io = (t, e, r, i) => {
|
|
|
2547
2573
|
}
|
|
2548
2574
|
}, _o = (t, e, r, i) => {
|
|
2549
2575
|
let s = !1;
|
|
2550
|
-
const
|
|
2576
|
+
const a = new In(), c = re(ee.Unset);
|
|
2551
2577
|
c.subscribe((m) => {
|
|
2552
|
-
m !== ee.Unset && ((m === ee.Optional || m === ee.Required) && s === !1 && (
|
|
2578
|
+
m !== ee.Unset && ((m === ee.Optional || m === ee.Required) && s === !1 && (To(t, e, i, a), s = !0), m === ee.Completed && e.activeQuestionId.invalidate(), a.setOnboardingInstantOpen({
|
|
2553
2579
|
userId: e.userId.get() || "",
|
|
2554
2580
|
organizationId: e.organizationId.get() || "",
|
|
2555
2581
|
eventId: e.slStreamId.get() || ""
|
|
2556
2582
|
}));
|
|
2557
2583
|
});
|
|
2558
|
-
const
|
|
2559
|
-
return wt(c, e, t, i,
|
|
2560
|
-
m && wt(c, e, t, i,
|
|
2561
|
-
})),
|
|
2562
|
-
m.data && wt(c, e, t, i,
|
|
2563
|
-
})),
|
|
2564
|
-
m && wt(c, e, t, i,
|
|
2584
|
+
const d = [];
|
|
2585
|
+
return wt(c, e, t, i, a, d), c.get() !== ee.Completed && (d.push(e.userId.listen((m) => {
|
|
2586
|
+
m && wt(c, e, t, i, a, d);
|
|
2587
|
+
})), d.push(e.moderation.listen((m) => {
|
|
2588
|
+
m.data && wt(c, e, t, i, a, d);
|
|
2589
|
+
})), d.push(t.featureSettings.listen((m) => {
|
|
2590
|
+
m && wt(c, e, t, i, a, d);
|
|
2565
2591
|
}))), { $store: c, submitInplay: async () => {
|
|
2566
2592
|
const m = e.slStreamId.get();
|
|
2567
2593
|
if (m) {
|
|
2568
|
-
await
|
|
2594
|
+
await So(r, m), c.set(ee.Completed), a.saveOnboardingStatus({
|
|
2569
2595
|
organizationId: e.organizationId.get() || "",
|
|
2570
2596
|
userId: e.userId.get() || "",
|
|
2571
2597
|
eventId: m
|
|
@@ -2574,8 +2600,8 @@ const Io = (t, e, r, i) => {
|
|
|
2574
2600
|
i.close(l);
|
|
2575
2601
|
}
|
|
2576
2602
|
} };
|
|
2577
|
-
},
|
|
2578
|
-
class
|
|
2603
|
+
}, Co = /* @__PURE__ */ new Set([fe.POLL, fe.PREDICTION, fe.TRIVIA]);
|
|
2604
|
+
class xo extends mn {
|
|
2579
2605
|
/** user statistics (leaderboard panel) */
|
|
2580
2606
|
userSummary;
|
|
2581
2607
|
/** feed list (pick history) */
|
|
@@ -2604,7 +2630,7 @@ class Oo extends mn {
|
|
|
2604
2630
|
/** Browser cache */
|
|
2605
2631
|
storage;
|
|
2606
2632
|
constructor(e, r, i) {
|
|
2607
|
-
super(e, r), this.background = new
|
|
2633
|
+
super(e, r), this.background = new yo(i), this.storage = new In(), this.userSummary = new de(zi(this.background.slStreamId, this.background.userId, i.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.friends = new de(Wi(this.background.userId, i.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = re(void 0), this.leaderboardId = new se(re(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = _o(this, this.background, i.transport, i.notifications), this.notifications = i.notifications, this.transport = i.transport, this.closeFeature = () => i.sdk.closeFeature(!0), this.openFeature = () => i.sdk.openFeature(Fe.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Oo(this.transport, this.background.slStreamId, i.stores.providerStreamId.getStore(), this.background.userId), this.leaderboardList = Eo(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.status.subscribe((s) => {
|
|
2608
2634
|
s === rt.Ready ? this.connect(i.transport) : this.disconnect();
|
|
2609
2635
|
}), this.userSummary.listen((s) => {
|
|
2610
2636
|
this.leaderboardList.$store.lc !== 0 && s?.data?.summary && window.requestAnimationFrame(() => {
|
|
@@ -2616,8 +2642,8 @@ class Oo extends mn {
|
|
|
2616
2642
|
return this.background.interactiveAllowed.get() === Ve.ALLOWED;
|
|
2617
2643
|
}
|
|
2618
2644
|
checkInteractiveFlag = () => {
|
|
2619
|
-
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, i = this.settings.getValues().inplayGame?.titleCard?.optIn, s = e === ee.Completed,
|
|
2620
|
-
this.background.interactiveAllowed.set(
|
|
2645
|
+
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, i = this.settings.getValues().inplayGame?.titleCard?.optIn, s = e === ee.Completed, a = !r || s || i !== !0;
|
|
2646
|
+
this.background.interactiveAllowed.set(a ? Ve.ALLOWED : Ve.DISALLOWED);
|
|
2621
2647
|
};
|
|
2622
2648
|
connect = (e) => {
|
|
2623
2649
|
this.userSummary.invalidate(), this.leaderboardList.invalidate(), this.feedList.invalidate(), this.friends.invalidate(), this.background.feedSubscription.addListener("feed-subscription-prediction-close", (r) => {
|
|
@@ -2625,9 +2651,9 @@ class Oo extends mn {
|
|
|
2625
2651
|
const i = r.data?.attributes?.question;
|
|
2626
2652
|
if (!i)
|
|
2627
2653
|
return;
|
|
2628
|
-
const { status: s, type:
|
|
2629
|
-
if (s === dt.RESOLVED &&
|
|
2630
|
-
const
|
|
2654
|
+
const { status: s, type: a, id: c } = i;
|
|
2655
|
+
if (s === dt.RESOLVED && a === fe.PREDICTION) {
|
|
2656
|
+
const d = this.background.getCurrentSessionId({
|
|
2631
2657
|
prefix: `notification-id:${c}`
|
|
2632
2658
|
}), p = await vn(c, e), m = p?.answers.find(({ correct: w }) => w), l = p?.answers.find(({ youVoted: w }) => w);
|
|
2633
2659
|
if (!l)
|
|
@@ -2637,7 +2663,7 @@ class Oo extends mn {
|
|
|
2637
2663
|
action: () => this.openQuestion(c),
|
|
2638
2664
|
close: () => this.closeQuestion(c),
|
|
2639
2665
|
autoHideDuration: m?.youVoted ? 15e3 : 12e3,
|
|
2640
|
-
id:
|
|
2666
|
+
id: d,
|
|
2641
2667
|
data: {
|
|
2642
2668
|
questionType: fe.PREDICTION,
|
|
2643
2669
|
question: {
|
|
@@ -2665,10 +2691,10 @@ class Oo extends mn {
|
|
|
2665
2691
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2666
2692
|
};
|
|
2667
2693
|
submitAnswer = async (e, r) => {
|
|
2668
|
-
await
|
|
2694
|
+
await vo(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2669
2695
|
};
|
|
2670
2696
|
skipQuestion = async (e) => {
|
|
2671
|
-
await
|
|
2697
|
+
await Ao(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2672
2698
|
};
|
|
2673
2699
|
openQuestion = (e) => (this.openFeature(), this.notifications.close(this.background.getCurrentSessionId({
|
|
2674
2700
|
prefix: "notification",
|
|
@@ -2691,10 +2717,12 @@ class Oo extends mn {
|
|
|
2691
2717
|
showInApp = (e) => {
|
|
2692
2718
|
const r = this.onboardingStatus.$store.get();
|
|
2693
2719
|
if (e && e.data && r && r !== ee.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== oi.ON && e.data.question.status === dt.ACTIVE) {
|
|
2694
|
-
if (
|
|
2720
|
+
if (Co.has(e.data.question.type))
|
|
2695
2721
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2696
2722
|
type: Me.QUESTION,
|
|
2697
|
-
action: () =>
|
|
2723
|
+
action: () => {
|
|
2724
|
+
e.data?.question && this.openQuestion(e.data.question.id), this.openFeature();
|
|
2725
|
+
},
|
|
2698
2726
|
close: () => e.data?.question && this.closeQuestion(e.data.question.id),
|
|
2699
2727
|
autoHideDuration: 1e3 * 60,
|
|
2700
2728
|
id: this.background.getCurrentSessionId({
|
|
@@ -2726,7 +2754,9 @@ class Oo extends mn {
|
|
|
2726
2754
|
};
|
|
2727
2755
|
this.notifications.add({
|
|
2728
2756
|
type: Me.QUESTION,
|
|
2729
|
-
action: () =>
|
|
2757
|
+
action: () => {
|
|
2758
|
+
e.data?.question && this.openQuestion(e.data.question.id), this.openFeature();
|
|
2759
|
+
},
|
|
2730
2760
|
close: () => e.data?.question && this.closeQuestion(e.data.question.id),
|
|
2731
2761
|
autoHideDuration: 1e3 * 120,
|
|
2732
2762
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: e.data.question.id }),
|
|
@@ -2746,7 +2776,9 @@ class Oo extends mn {
|
|
|
2746
2776
|
};
|
|
2747
2777
|
this.notifications.add({
|
|
2748
2778
|
type: Me.QUESTION,
|
|
2749
|
-
action: () =>
|
|
2779
|
+
action: () => {
|
|
2780
|
+
e.data?.question && this.openQuestion(e.data.question.id), this.openFeature();
|
|
2781
|
+
},
|
|
2750
2782
|
close: () => e.data?.question && this.closeQuestion(e.data.question.id),
|
|
2751
2783
|
autoHideDuration: 1e3 * 120,
|
|
2752
2784
|
id: this.background.getCurrentSessionId({ prefix: "notification", entity: e.data.question.id }),
|
|
@@ -2759,24 +2791,24 @@ class Oo extends mn {
|
|
|
2759
2791
|
}
|
|
2760
2792
|
};
|
|
2761
2793
|
}
|
|
2762
|
-
const
|
|
2763
|
-
[
|
|
2794
|
+
const ko = {
|
|
2795
|
+
[Fe.GAMES]: !0
|
|
2764
2796
|
};
|
|
2765
|
-
class
|
|
2797
|
+
class Bo extends mn {
|
|
2766
2798
|
constructor(e, r) {
|
|
2767
2799
|
super(e, r);
|
|
2768
2800
|
}
|
|
2769
2801
|
}
|
|
2770
|
-
const
|
|
2771
|
-
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new se(re(
|
|
2802
|
+
const Lo = (t, e, r) => t.type === Fe.GAMES ? new xo(t, e, r) : new Bo(t, e), Po = (t, e, r) => {
|
|
2803
|
+
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new se(re(Fe.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (i) => t.features.get(i), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (i) => {
|
|
2772
2804
|
t.activeFeature.setValue(i);
|
|
2773
2805
|
}, t.sdk.closeFeature = (i = !1) => {
|
|
2774
2806
|
const s = t.activeFeature.getValue();
|
|
2775
|
-
t.activeFeature.setValue(
|
|
2807
|
+
t.activeFeature.setValue(Fe.UNSET), i && s && t.features.delete(s);
|
|
2776
2808
|
}, t.initFeature = (i, s = Ee.ORGANIZATION) => {
|
|
2777
|
-
if (i.type in
|
|
2778
|
-
const
|
|
2779
|
-
t.features.set(i.type,
|
|
2809
|
+
if (i.type in ko && !t.features.has(i.type)) {
|
|
2810
|
+
const a = Lo(i, s, t);
|
|
2811
|
+
t.features.set(i.type, a);
|
|
2780
2812
|
}
|
|
2781
2813
|
}, t.updateFeature = (i, s) => {
|
|
2782
2814
|
t.features.get(i.type)?.update(i, s);
|
|
@@ -2790,10 +2822,10 @@ const xo = (t, e, r) => t.type === _e.GAMES ? new Oo(t, e, r) : new Co(t, e), ko
|
|
|
2790
2822
|
}, t.stores.providerStreamId.listen((i) => {
|
|
2791
2823
|
i || t.reinitializeFeatures();
|
|
2792
2824
|
}), t.storeSubscribe = () => {
|
|
2793
|
-
const i = (
|
|
2794
|
-
if (c?.overlays && !(t.contextConfig?.skipOrganizationSettings &&
|
|
2795
|
-
for (const
|
|
2796
|
-
|
|
2825
|
+
const i = (a, c) => {
|
|
2826
|
+
if (c?.overlays && !(t.contextConfig?.skipOrganizationSettings && a === Ee.ORGANIZATION))
|
|
2827
|
+
for (const d of c.overlays)
|
|
2828
|
+
d.sdkEnable === !0 && (t.features.has(d.type) ? t.updateFeature(d, a) : t.initFeature(d, a));
|
|
2797
2829
|
}, s = {
|
|
2798
2830
|
/**
|
|
2799
2831
|
* During the initial SDK initialization, it's imperative to initialize features first,
|
|
@@ -2804,18 +2836,18 @@ const xo = (t, e, r) => t.type === _e.GAMES ? new Oo(t, e, r) : new Co(t, e), ko
|
|
|
2804
2836
|
* that feature should be skipped. Conversely, if a feature is
|
|
2805
2837
|
* missing in the new settings, it should be initialized again.
|
|
2806
2838
|
*/
|
|
2807
|
-
organizationSettings: (
|
|
2808
|
-
if (
|
|
2839
|
+
organizationSettings: (a) => {
|
|
2840
|
+
if (a.data)
|
|
2809
2841
|
try {
|
|
2810
|
-
i(Ee.ORGANIZATION,
|
|
2842
|
+
i(Ee.ORGANIZATION, a.data);
|
|
2811
2843
|
} catch (c) {
|
|
2812
2844
|
console.log(c);
|
|
2813
2845
|
}
|
|
2814
2846
|
},
|
|
2815
|
-
streamSettings: (
|
|
2816
|
-
if (
|
|
2847
|
+
streamSettings: (a) => {
|
|
2848
|
+
if (a.data)
|
|
2817
2849
|
try {
|
|
2818
|
-
i(Ee.STREAM,
|
|
2850
|
+
i(Ee.STREAM, a.data);
|
|
2819
2851
|
} catch (c) {
|
|
2820
2852
|
console.log(c);
|
|
2821
2853
|
}
|
|
@@ -2825,25 +2857,25 @@ const xo = (t, e, r) => t.type === _e.GAMES ? new Oo(t, e, r) : new Co(t, e), ko
|
|
|
2825
2857
|
}, r();
|
|
2826
2858
|
};
|
|
2827
2859
|
var br = { exports: {} }, vr = { exports: {} };
|
|
2828
|
-
function
|
|
2860
|
+
function Ro(t) {
|
|
2829
2861
|
var e = new t(), r = e;
|
|
2830
2862
|
function i() {
|
|
2831
|
-
var
|
|
2832
|
-
return
|
|
2863
|
+
var a = e;
|
|
2864
|
+
return a.next ? e = a.next : (e = new t(), r = e), a.next = null, a;
|
|
2833
2865
|
}
|
|
2834
|
-
function s(
|
|
2835
|
-
r.next =
|
|
2866
|
+
function s(a) {
|
|
2867
|
+
r.next = a, r = a;
|
|
2836
2868
|
}
|
|
2837
2869
|
return {
|
|
2838
2870
|
get: i,
|
|
2839
2871
|
release: s
|
|
2840
2872
|
};
|
|
2841
2873
|
}
|
|
2842
|
-
var
|
|
2843
|
-
function
|
|
2874
|
+
var No = Ro, Do = No;
|
|
2875
|
+
function Fn(t, e, r) {
|
|
2844
2876
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2845
2877
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2846
|
-
var i =
|
|
2878
|
+
var i = Do($o), s = null, a = null, c = 0, d = null, p = {
|
|
2847
2879
|
push: x,
|
|
2848
2880
|
drain: oe,
|
|
2849
2881
|
saturated: oe,
|
|
@@ -2851,15 +2883,15 @@ function _n(t, e, r) {
|
|
|
2851
2883
|
paused: !1,
|
|
2852
2884
|
concurrency: r,
|
|
2853
2885
|
running: m,
|
|
2854
|
-
resume:
|
|
2855
|
-
idle:
|
|
2886
|
+
resume: F,
|
|
2887
|
+
idle: _,
|
|
2856
2888
|
length: w,
|
|
2857
2889
|
getQueue: E,
|
|
2858
2890
|
unshift: N,
|
|
2859
2891
|
empty: oe,
|
|
2860
|
-
kill:
|
|
2892
|
+
kill: T,
|
|
2861
2893
|
killAndDrain: j,
|
|
2862
|
-
error:
|
|
2894
|
+
error: L
|
|
2863
2895
|
};
|
|
2864
2896
|
return p;
|
|
2865
2897
|
function m() {
|
|
@@ -2878,63 +2910,63 @@ function _n(t, e, r) {
|
|
|
2878
2910
|
k.push(C.value), C = C.next;
|
|
2879
2911
|
return k;
|
|
2880
2912
|
}
|
|
2881
|
-
function
|
|
2913
|
+
function F() {
|
|
2882
2914
|
if (p.paused) {
|
|
2883
2915
|
p.paused = !1;
|
|
2884
2916
|
for (var C = 0; C < p.concurrency; C++)
|
|
2885
2917
|
c++, I();
|
|
2886
2918
|
}
|
|
2887
2919
|
}
|
|
2888
|
-
function
|
|
2920
|
+
function _() {
|
|
2889
2921
|
return c === 0 && p.length() === 0;
|
|
2890
2922
|
}
|
|
2891
2923
|
function x(C, k) {
|
|
2892
2924
|
var B = i.get();
|
|
2893
|
-
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler =
|
|
2925
|
+
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler = d, c === p.concurrency || p.paused ? a ? (a.next = B, a = B) : (s = B, a = B, p.saturated()) : (c++, e.call(t, B.value, B.worked));
|
|
2894
2926
|
}
|
|
2895
2927
|
function N(C, k) {
|
|
2896
2928
|
var B = i.get();
|
|
2897
|
-
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler =
|
|
2929
|
+
B.context = t, B.release = I, B.value = C, B.callback = k || oe, B.errorHandler = d, c === p.concurrency || p.paused ? s ? (B.next = s, s = B) : (s = B, a = B, p.saturated()) : (c++, e.call(t, B.value, B.worked));
|
|
2898
2930
|
}
|
|
2899
2931
|
function I(C) {
|
|
2900
2932
|
C && i.release(C);
|
|
2901
2933
|
var k = s;
|
|
2902
|
-
k ? p.paused ? c-- : (
|
|
2934
|
+
k ? p.paused ? c-- : (a === s && (a = null), s = k.next, k.next = null, e.call(t, k.value, k.worked), a === null && p.empty()) : --c === 0 && p.drain();
|
|
2903
2935
|
}
|
|
2904
|
-
function
|
|
2905
|
-
s = null,
|
|
2936
|
+
function T() {
|
|
2937
|
+
s = null, a = null, p.drain = oe;
|
|
2906
2938
|
}
|
|
2907
2939
|
function j() {
|
|
2908
|
-
s = null,
|
|
2940
|
+
s = null, a = null, p.drain(), p.drain = oe;
|
|
2909
2941
|
}
|
|
2910
|
-
function
|
|
2911
|
-
|
|
2942
|
+
function L(C) {
|
|
2943
|
+
d = C;
|
|
2912
2944
|
}
|
|
2913
2945
|
}
|
|
2914
2946
|
function oe() {
|
|
2915
2947
|
}
|
|
2916
|
-
function
|
|
2948
|
+
function $o() {
|
|
2917
2949
|
this.value = null, this.callback = oe, this.next = null, this.release = oe, this.context = null, this.errorHandler = null;
|
|
2918
2950
|
var t = this;
|
|
2919
2951
|
this.worked = function(r, i) {
|
|
2920
|
-
var s = t.callback,
|
|
2921
|
-
t.value = null, t.callback = oe, t.errorHandler &&
|
|
2952
|
+
var s = t.callback, a = t.errorHandler, c = t.value;
|
|
2953
|
+
t.value = null, t.callback = oe, t.errorHandler && a(r, c), s.call(t.context, r, i), t.release(t);
|
|
2922
2954
|
};
|
|
2923
2955
|
}
|
|
2924
|
-
function
|
|
2956
|
+
function Uo(t, e, r) {
|
|
2925
2957
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2926
2958
|
function i(l, w) {
|
|
2927
2959
|
e.call(this, l).then(function(E) {
|
|
2928
2960
|
w(null, E);
|
|
2929
2961
|
}, w);
|
|
2930
2962
|
}
|
|
2931
|
-
var s =
|
|
2932
|
-
return s.push =
|
|
2933
|
-
function
|
|
2934
|
-
var w = new Promise(function(E,
|
|
2935
|
-
|
|
2936
|
-
if (
|
|
2937
|
-
_
|
|
2963
|
+
var s = Fn(t, i, r), a = s.push, c = s.unshift;
|
|
2964
|
+
return s.push = d, s.unshift = p, s.drained = m, s;
|
|
2965
|
+
function d(l) {
|
|
2966
|
+
var w = new Promise(function(E, F) {
|
|
2967
|
+
a(l, function(_, x) {
|
|
2968
|
+
if (_) {
|
|
2969
|
+
F(_);
|
|
2938
2970
|
return;
|
|
2939
2971
|
}
|
|
2940
2972
|
E(x);
|
|
@@ -2943,10 +2975,10 @@ function No(t, e, r) {
|
|
|
2943
2975
|
return w.catch(oe), w;
|
|
2944
2976
|
}
|
|
2945
2977
|
function p(l) {
|
|
2946
|
-
var w = new Promise(function(E,
|
|
2947
|
-
c(l, function(
|
|
2948
|
-
if (
|
|
2949
|
-
_
|
|
2978
|
+
var w = new Promise(function(E, F) {
|
|
2979
|
+
c(l, function(_, x) {
|
|
2980
|
+
if (_) {
|
|
2981
|
+
F(_);
|
|
2950
2982
|
return;
|
|
2951
2983
|
}
|
|
2952
2984
|
E(x);
|
|
@@ -2967,9 +2999,9 @@ function No(t, e, r) {
|
|
|
2967
2999
|
return w;
|
|
2968
3000
|
}
|
|
2969
3001
|
}
|
|
2970
|
-
vr.exports =
|
|
2971
|
-
vr.exports.promise =
|
|
2972
|
-
var
|
|
3002
|
+
vr.exports = Fn;
|
|
3003
|
+
vr.exports.promise = Uo;
|
|
3004
|
+
var On = vr.exports, Sr = { exports: {} }, nt = typeof Reflect == "object" ? Reflect : null, qr = nt && typeof nt.apply == "function" ? nt.apply : function(e, r, i) {
|
|
2973
3005
|
return Function.prototype.apply.call(e, r, i);
|
|
2974
3006
|
}, vt;
|
|
2975
3007
|
nt && typeof nt.ownKeys == "function" ? vt = nt.ownKeys : Object.getOwnPropertySymbols ? vt = function(e) {
|
|
@@ -2977,23 +3009,23 @@ nt && typeof nt.ownKeys == "function" ? vt = nt.ownKeys : Object.getOwnPropertyS
|
|
|
2977
3009
|
} : vt = function(e) {
|
|
2978
3010
|
return Object.getOwnPropertyNames(e);
|
|
2979
3011
|
};
|
|
2980
|
-
function
|
|
3012
|
+
function jo(t) {
|
|
2981
3013
|
console && console.warn && console.warn(t);
|
|
2982
3014
|
}
|
|
2983
|
-
var
|
|
3015
|
+
var Tn = Number.isNaN || function(e) {
|
|
2984
3016
|
return e !== e;
|
|
2985
3017
|
};
|
|
2986
3018
|
function G() {
|
|
2987
3019
|
G.init.call(this);
|
|
2988
3020
|
}
|
|
2989
3021
|
Sr.exports = G;
|
|
2990
|
-
Sr.exports.once =
|
|
3022
|
+
Sr.exports.once = Qo;
|
|
2991
3023
|
G.EventEmitter = G;
|
|
2992
3024
|
G.prototype._events = void 0;
|
|
2993
3025
|
G.prototype._eventsCount = 0;
|
|
2994
3026
|
G.prototype._maxListeners = void 0;
|
|
2995
3027
|
var Qr = 10;
|
|
2996
|
-
function
|
|
3028
|
+
function Dt(t) {
|
|
2997
3029
|
if (typeof t != "function")
|
|
2998
3030
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
2999
3031
|
}
|
|
@@ -3003,7 +3035,7 @@ Object.defineProperty(G, "defaultMaxListeners", {
|
|
|
3003
3035
|
return Qr;
|
|
3004
3036
|
},
|
|
3005
3037
|
set: function(t) {
|
|
3006
|
-
if (typeof t != "number" || t < 0 ||
|
|
3038
|
+
if (typeof t != "number" || t < 0 || Tn(t))
|
|
3007
3039
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3008
3040
|
Qr = t;
|
|
3009
3041
|
}
|
|
@@ -3012,32 +3044,32 @@ G.init = function() {
|
|
|
3012
3044
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
3013
3045
|
};
|
|
3014
3046
|
G.prototype.setMaxListeners = function(e) {
|
|
3015
|
-
if (typeof e != "number" || e < 0 ||
|
|
3047
|
+
if (typeof e != "number" || e < 0 || Tn(e))
|
|
3016
3048
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3017
3049
|
return this._maxListeners = e, this;
|
|
3018
3050
|
};
|
|
3019
|
-
function
|
|
3051
|
+
function _n(t) {
|
|
3020
3052
|
return t._maxListeners === void 0 ? G.defaultMaxListeners : t._maxListeners;
|
|
3021
3053
|
}
|
|
3022
3054
|
G.prototype.getMaxListeners = function() {
|
|
3023
|
-
return
|
|
3055
|
+
return _n(this);
|
|
3024
3056
|
};
|
|
3025
3057
|
G.prototype.emit = function(e) {
|
|
3026
3058
|
for (var r = [], i = 1; i < arguments.length; i++)
|
|
3027
3059
|
r.push(arguments[i]);
|
|
3028
|
-
var s = e === "error",
|
|
3029
|
-
if (
|
|
3030
|
-
s = s &&
|
|
3060
|
+
var s = e === "error", a = this._events;
|
|
3061
|
+
if (a !== void 0)
|
|
3062
|
+
s = s && a.error === void 0;
|
|
3031
3063
|
else if (!s)
|
|
3032
3064
|
return !1;
|
|
3033
3065
|
if (s) {
|
|
3034
3066
|
var c;
|
|
3035
3067
|
if (r.length > 0 && (c = r[0]), c instanceof Error)
|
|
3036
3068
|
throw c;
|
|
3037
|
-
var
|
|
3038
|
-
throw
|
|
3069
|
+
var d = new Error("Unhandled error." + (c ? " (" + c.message + ")" : ""));
|
|
3070
|
+
throw d.context = c, d;
|
|
3039
3071
|
}
|
|
3040
|
-
var p =
|
|
3072
|
+
var p = a[e];
|
|
3041
3073
|
if (p === void 0)
|
|
3042
3074
|
return !1;
|
|
3043
3075
|
if (typeof p == "function")
|
|
@@ -3048,17 +3080,17 @@ G.prototype.emit = function(e) {
|
|
|
3048
3080
|
return !0;
|
|
3049
3081
|
};
|
|
3050
3082
|
function Cn(t, e, r, i) {
|
|
3051
|
-
var s,
|
|
3052
|
-
if (
|
|
3083
|
+
var s, a, c;
|
|
3084
|
+
if (Dt(r), a = t._events, a === void 0 ? (a = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (a.newListener !== void 0 && (t.emit(
|
|
3053
3085
|
"newListener",
|
|
3054
3086
|
e,
|
|
3055
3087
|
r.listener ? r.listener : r
|
|
3056
|
-
),
|
|
3057
|
-
c =
|
|
3058
|
-
else if (typeof c == "function" ? c =
|
|
3088
|
+
), a = t._events), c = a[e]), c === void 0)
|
|
3089
|
+
c = a[e] = r, ++t._eventsCount;
|
|
3090
|
+
else if (typeof c == "function" ? c = a[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s = _n(t), s > 0 && c.length > s && !c.warned) {
|
|
3059
3091
|
c.warned = !0;
|
|
3060
|
-
var
|
|
3061
|
-
|
|
3092
|
+
var d = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3093
|
+
d.name = "MaxListenersExceededWarning", d.emitter = t, d.type = e, d.count = c.length, jo(d);
|
|
3062
3094
|
}
|
|
3063
3095
|
return t;
|
|
3064
3096
|
}
|
|
@@ -3069,37 +3101,37 @@ G.prototype.on = G.prototype.addListener;
|
|
|
3069
3101
|
G.prototype.prependListener = function(e, r) {
|
|
3070
3102
|
return Cn(this, e, r, !0);
|
|
3071
3103
|
};
|
|
3072
|
-
function
|
|
3104
|
+
function Mo() {
|
|
3073
3105
|
if (!this.fired)
|
|
3074
3106
|
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);
|
|
3075
3107
|
}
|
|
3076
3108
|
function xn(t, e, r) {
|
|
3077
|
-
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
3109
|
+
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = Mo.bind(i);
|
|
3078
3110
|
return s.listener = r, i.wrapFn = s, s;
|
|
3079
3111
|
}
|
|
3080
3112
|
G.prototype.once = function(e, r) {
|
|
3081
|
-
return
|
|
3113
|
+
return Dt(r), this.on(e, xn(this, e, r)), this;
|
|
3082
3114
|
};
|
|
3083
3115
|
G.prototype.prependOnceListener = function(e, r) {
|
|
3084
|
-
return
|
|
3116
|
+
return Dt(r), this.prependListener(e, xn(this, e, r)), this;
|
|
3085
3117
|
};
|
|
3086
3118
|
G.prototype.removeListener = function(e, r) {
|
|
3087
|
-
var i, s,
|
|
3088
|
-
if (
|
|
3119
|
+
var i, s, a, c, d;
|
|
3120
|
+
if (Dt(r), s = this._events, s === void 0)
|
|
3089
3121
|
return this;
|
|
3090
3122
|
if (i = s[e], i === void 0)
|
|
3091
3123
|
return this;
|
|
3092
3124
|
if (i === r || i.listener === r)
|
|
3093
3125
|
--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete s[e], s.removeListener && this.emit("removeListener", e, i.listener || r));
|
|
3094
3126
|
else if (typeof i != "function") {
|
|
3095
|
-
for (
|
|
3127
|
+
for (a = -1, c = i.length - 1; c >= 0; c--)
|
|
3096
3128
|
if (i[c] === r || i[c].listener === r) {
|
|
3097
|
-
|
|
3129
|
+
d = i[c].listener, a = c;
|
|
3098
3130
|
break;
|
|
3099
3131
|
}
|
|
3100
|
-
if (
|
|
3132
|
+
if (a < 0)
|
|
3101
3133
|
return this;
|
|
3102
|
-
|
|
3134
|
+
a === 0 ? i.shift() : Vo(i, a), i.length === 1 && (s[e] = i[0]), s.removeListener !== void 0 && this.emit("removeListener", e, d || r);
|
|
3103
3135
|
}
|
|
3104
3136
|
return this;
|
|
3105
3137
|
};
|
|
@@ -3111,9 +3143,9 @@ G.prototype.removeAllListeners = function(e) {
|
|
|
3111
3143
|
if (i.removeListener === void 0)
|
|
3112
3144
|
return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : i[e] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete i[e]), this;
|
|
3113
3145
|
if (arguments.length === 0) {
|
|
3114
|
-
var
|
|
3115
|
-
for (s = 0; s <
|
|
3116
|
-
c =
|
|
3146
|
+
var a = Object.keys(i), c;
|
|
3147
|
+
for (s = 0; s < a.length; ++s)
|
|
3148
|
+
c = a[s], c !== "removeListener" && this.removeAllListeners(c);
|
|
3117
3149
|
return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
|
|
3118
3150
|
}
|
|
3119
3151
|
if (r = i[e], typeof r == "function")
|
|
@@ -3128,7 +3160,7 @@ function kn(t, e, r) {
|
|
|
3128
3160
|
if (i === void 0)
|
|
3129
3161
|
return [];
|
|
3130
3162
|
var s = i[e];
|
|
3131
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
3163
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? qo(s) : Ln(s, s.length);
|
|
3132
3164
|
}
|
|
3133
3165
|
G.prototype.listeners = function(e) {
|
|
3134
3166
|
return kn(this, e, !0);
|
|
@@ -3159,41 +3191,41 @@ function Ln(t, e) {
|
|
|
3159
3191
|
r[i] = t[i];
|
|
3160
3192
|
return r;
|
|
3161
3193
|
}
|
|
3162
|
-
function
|
|
3194
|
+
function Vo(t, e) {
|
|
3163
3195
|
for (; e + 1 < t.length; e++)
|
|
3164
3196
|
t[e] = t[e + 1];
|
|
3165
3197
|
t.pop();
|
|
3166
3198
|
}
|
|
3167
|
-
function
|
|
3199
|
+
function qo(t) {
|
|
3168
3200
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3169
3201
|
e[r] = t[r].listener || t[r];
|
|
3170
3202
|
return e;
|
|
3171
3203
|
}
|
|
3172
|
-
function
|
|
3204
|
+
function Qo(t, e) {
|
|
3173
3205
|
return new Promise(function(r, i) {
|
|
3174
3206
|
function s(c) {
|
|
3175
|
-
t.removeListener(e,
|
|
3207
|
+
t.removeListener(e, a), i(c);
|
|
3176
3208
|
}
|
|
3177
|
-
function
|
|
3209
|
+
function a() {
|
|
3178
3210
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
3179
3211
|
}
|
|
3180
|
-
Pn(t, e,
|
|
3212
|
+
Pn(t, e, a, { once: !0 }), e !== "error" && Go(t, s, { once: !0 });
|
|
3181
3213
|
});
|
|
3182
3214
|
}
|
|
3183
|
-
function
|
|
3215
|
+
function Go(t, e, r) {
|
|
3184
3216
|
typeof t.on == "function" && Pn(t, "error", e, r);
|
|
3185
3217
|
}
|
|
3186
3218
|
function Pn(t, e, r, i) {
|
|
3187
3219
|
if (typeof t.on == "function")
|
|
3188
3220
|
i.once ? t.once(e, r) : t.on(e, r);
|
|
3189
3221
|
else if (typeof t.addEventListener == "function")
|
|
3190
|
-
t.addEventListener(e, function s(
|
|
3191
|
-
i.once && t.removeEventListener(e, s), r(
|
|
3222
|
+
t.addEventListener(e, function s(a) {
|
|
3223
|
+
i.once && t.removeEventListener(e, s), r(a);
|
|
3192
3224
|
});
|
|
3193
3225
|
else
|
|
3194
3226
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3195
3227
|
}
|
|
3196
|
-
var Rn = Sr.exports,
|
|
3228
|
+
var Rn = Sr.exports, $t = {}, Nn = {}, Dn = function() {
|
|
3197
3229
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3198
3230
|
return !1;
|
|
3199
3231
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3207,8 +3239,8 @@ var Rn = Sr.exports, Dt = {}, Nn = {}, Dn = function() {
|
|
|
3207
3239
|
return !1;
|
|
3208
3240
|
if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
|
|
3209
3241
|
return !1;
|
|
3210
|
-
var
|
|
3211
|
-
if (
|
|
3242
|
+
var a = Object.getOwnPropertySymbols(e);
|
|
3243
|
+
if (a.length !== 1 || a[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
|
|
3212
3244
|
return !1;
|
|
3213
3245
|
if (typeof Object.getOwnPropertyDescriptor == "function") {
|
|
3214
3246
|
var c = Object.getOwnPropertyDescriptor(e, r);
|
|
@@ -3216,33 +3248,33 @@ var Rn = Sr.exports, Dt = {}, Nn = {}, Dn = function() {
|
|
|
3216
3248
|
return !1;
|
|
3217
3249
|
}
|
|
3218
3250
|
return !0;
|
|
3219
|
-
},
|
|
3220
|
-
return
|
|
3221
|
-
}, Gr = typeof Symbol < "u" && Symbol,
|
|
3222
|
-
return typeof Gr != "function" || typeof Symbol != "function" || typeof Gr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
3251
|
+
}, zo = Dn, Ar = function() {
|
|
3252
|
+
return zo() && !!Symbol.toStringTag;
|
|
3253
|
+
}, Gr = typeof Symbol < "u" && Symbol, Ko = Dn, Wo = function() {
|
|
3254
|
+
return typeof Gr != "function" || typeof Symbol != "function" || typeof Gr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ko();
|
|
3223
3255
|
}, zr = {
|
|
3224
3256
|
foo: {}
|
|
3225
|
-
},
|
|
3226
|
-
return { __proto__: zr }.foo === zr.foo && !({ __proto__: null } instanceof
|
|
3227
|
-
},
|
|
3257
|
+
}, Ho = Object, Jo = function() {
|
|
3258
|
+
return { __proto__: zr }.foo === zr.foo && !({ __proto__: null } instanceof Ho);
|
|
3259
|
+
}, Yo = "Function.prototype.bind called on incompatible ", Xo = Object.prototype.toString, Zo = Math.max, es = "[object Function]", Kr = function(e, r) {
|
|
3228
3260
|
for (var i = [], s = 0; s < e.length; s += 1)
|
|
3229
3261
|
i[s] = e[s];
|
|
3230
|
-
for (var
|
|
3231
|
-
i[
|
|
3262
|
+
for (var a = 0; a < r.length; a += 1)
|
|
3263
|
+
i[a + e.length] = r[a];
|
|
3232
3264
|
return i;
|
|
3233
|
-
},
|
|
3234
|
-
for (var i = [], s = r || 0,
|
|
3235
|
-
i[
|
|
3265
|
+
}, ts = function(e, r) {
|
|
3266
|
+
for (var i = [], s = r || 0, a = 0; s < e.length; s += 1, a += 1)
|
|
3267
|
+
i[a] = e[s];
|
|
3236
3268
|
return i;
|
|
3237
|
-
},
|
|
3269
|
+
}, rs = function(t, e) {
|
|
3238
3270
|
for (var r = "", i = 0; i < t.length; i += 1)
|
|
3239
3271
|
r += t[i], i + 1 < t.length && (r += e);
|
|
3240
3272
|
return r;
|
|
3241
|
-
},
|
|
3273
|
+
}, ns = function(e) {
|
|
3242
3274
|
var r = this;
|
|
3243
|
-
if (typeof r != "function" ||
|
|
3244
|
-
throw new TypeError(
|
|
3245
|
-
for (var i =
|
|
3275
|
+
if (typeof r != "function" || Xo.apply(r) !== es)
|
|
3276
|
+
throw new TypeError(Yo + r);
|
|
3277
|
+
for (var i = ts(arguments, 1), s, a = function() {
|
|
3246
3278
|
if (this instanceof s) {
|
|
3247
3279
|
var l = r.apply(
|
|
3248
3280
|
this,
|
|
@@ -3254,15 +3286,15 @@ var Rn = Sr.exports, Dt = {}, Nn = {}, Dn = function() {
|
|
|
3254
3286
|
e,
|
|
3255
3287
|
Kr(i, arguments)
|
|
3256
3288
|
);
|
|
3257
|
-
}, c =
|
|
3258
|
-
|
|
3259
|
-
if (s = Function("binder", "return function (" +
|
|
3289
|
+
}, c = Zo(0, r.length - i.length), d = [], p = 0; p < c; p++)
|
|
3290
|
+
d[p] = "$" + p;
|
|
3291
|
+
if (s = Function("binder", "return function (" + rs(d, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) {
|
|
3260
3292
|
var m = function() {
|
|
3261
3293
|
};
|
|
3262
3294
|
m.prototype = r.prototype, s.prototype = new m(), m.prototype = null;
|
|
3263
3295
|
}
|
|
3264
3296
|
return s;
|
|
3265
|
-
},
|
|
3297
|
+
}, is = ns, Er = Function.prototype.bind || is, os = Function.prototype.call, ss = Object.prototype.hasOwnProperty, as = Er, us = as.call(os, ss), U, ot = SyntaxError, $n = Function, it = TypeError, qt = function(t) {
|
|
3266
3298
|
try {
|
|
3267
3299
|
return $n('"use strict"; return (' + t + ").constructor;")();
|
|
3268
3300
|
} catch {
|
|
@@ -3274,21 +3306,21 @@ if (qe)
|
|
|
3274
3306
|
} catch {
|
|
3275
3307
|
qe = null;
|
|
3276
3308
|
}
|
|
3277
|
-
var
|
|
3309
|
+
var Qt = function() {
|
|
3278
3310
|
throw new it();
|
|
3279
|
-
},
|
|
3311
|
+
}, cs = qe ? function() {
|
|
3280
3312
|
try {
|
|
3281
|
-
return arguments.callee,
|
|
3313
|
+
return arguments.callee, Qt;
|
|
3282
3314
|
} catch {
|
|
3283
3315
|
try {
|
|
3284
3316
|
return qe(arguments, "callee").get;
|
|
3285
3317
|
} catch {
|
|
3286
|
-
return
|
|
3318
|
+
return Qt;
|
|
3287
3319
|
}
|
|
3288
3320
|
}
|
|
3289
|
-
}() :
|
|
3321
|
+
}() : Qt, We = Wo(), ls = Jo(), X = Object.getPrototypeOf || (ls ? function(t) {
|
|
3290
3322
|
return t.__proto__;
|
|
3291
|
-
} : null), Je = {},
|
|
3323
|
+
} : null), Je = {}, fs = typeof Uint8Array > "u" || !X ? U : X(Uint8Array), Qe = {
|
|
3292
3324
|
"%AggregateError%": typeof AggregateError > "u" ? U : AggregateError,
|
|
3293
3325
|
"%Array%": Array,
|
|
3294
3326
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? U : ArrayBuffer,
|
|
@@ -3345,8 +3377,8 @@ var qt = function() {
|
|
|
3345
3377
|
"%StringIteratorPrototype%": We && X ? X(""[Symbol.iterator]()) : U,
|
|
3346
3378
|
"%Symbol%": We ? Symbol : U,
|
|
3347
3379
|
"%SyntaxError%": ot,
|
|
3348
|
-
"%ThrowTypeError%":
|
|
3349
|
-
"%TypedArray%":
|
|
3380
|
+
"%ThrowTypeError%": cs,
|
|
3381
|
+
"%TypedArray%": fs,
|
|
3350
3382
|
"%TypeError%": it,
|
|
3351
3383
|
"%Uint8Array%": typeof Uint8Array > "u" ? U : Uint8Array,
|
|
3352
3384
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? U : Uint8ClampedArray,
|
|
@@ -3361,17 +3393,17 @@ if (X)
|
|
|
3361
3393
|
try {
|
|
3362
3394
|
null.error;
|
|
3363
3395
|
} catch (t) {
|
|
3364
|
-
var
|
|
3365
|
-
Qe["%Error.prototype%"] =
|
|
3396
|
+
var ds = X(X(t));
|
|
3397
|
+
Qe["%Error.prototype%"] = ds;
|
|
3366
3398
|
}
|
|
3367
|
-
var
|
|
3399
|
+
var hs = function t(e) {
|
|
3368
3400
|
var r;
|
|
3369
3401
|
if (e === "%AsyncFunction%")
|
|
3370
|
-
r =
|
|
3402
|
+
r = qt("async function () {}");
|
|
3371
3403
|
else if (e === "%GeneratorFunction%")
|
|
3372
|
-
r =
|
|
3404
|
+
r = qt("function* () {}");
|
|
3373
3405
|
else if (e === "%AsyncGeneratorFunction%")
|
|
3374
|
-
r =
|
|
3406
|
+
r = qt("async function* () {}");
|
|
3375
3407
|
else if (e === "%AsyncGenerator%") {
|
|
3376
3408
|
var i = t("%AsyncGeneratorFunction%");
|
|
3377
3409
|
i && (r = i.prototype);
|
|
@@ -3432,26 +3464,26 @@ var ls = function t(e) {
|
|
|
3432
3464
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3433
3465
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3434
3466
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3435
|
-
}, gt = Er,
|
|
3436
|
-
var r =
|
|
3467
|
+
}, gt = Er, Ot = us, ps = gt.call(Function.call, Array.prototype.concat), ys = gt.call(Function.apply, Array.prototype.splice), Hr = gt.call(Function.call, String.prototype.replace), Tt = gt.call(Function.call, String.prototype.slice), gs = gt.call(Function.call, RegExp.prototype.exec), ms = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ws = /\\(\\)?/g, bs = function(e) {
|
|
3468
|
+
var r = Tt(e, 0, 1), i = Tt(e, -1);
|
|
3437
3469
|
if (r === "%" && i !== "%")
|
|
3438
3470
|
throw new ot("invalid intrinsic syntax, expected closing `%`");
|
|
3439
3471
|
if (i === "%" && r !== "%")
|
|
3440
3472
|
throw new ot("invalid intrinsic syntax, expected opening `%`");
|
|
3441
3473
|
var s = [];
|
|
3442
|
-
return Hr(e,
|
|
3443
|
-
s[s.length] =
|
|
3474
|
+
return Hr(e, ms, function(a, c, d, p) {
|
|
3475
|
+
s[s.length] = d ? Hr(p, ws, "$1") : c || a;
|
|
3444
3476
|
}), s;
|
|
3445
|
-
},
|
|
3477
|
+
}, vs = function(e, r) {
|
|
3446
3478
|
var i = e, s;
|
|
3447
|
-
if (
|
|
3448
|
-
var
|
|
3449
|
-
if (
|
|
3479
|
+
if (Ot(Wr, i) && (s = Wr[i], i = "%" + s[0] + "%"), Ot(Qe, i)) {
|
|
3480
|
+
var a = Qe[i];
|
|
3481
|
+
if (a === Je && (a = hs(i)), typeof a > "u" && !r)
|
|
3450
3482
|
throw new it("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3451
3483
|
return {
|
|
3452
3484
|
alias: s,
|
|
3453
3485
|
name: i,
|
|
3454
|
-
value:
|
|
3486
|
+
value: a
|
|
3455
3487
|
};
|
|
3456
3488
|
}
|
|
3457
3489
|
throw new ot("intrinsic " + e + " does not exist!");
|
|
@@ -3460,64 +3492,64 @@ var ls = function t(e) {
|
|
|
3460
3492
|
throw new it("intrinsic name must be a non-empty string");
|
|
3461
3493
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3462
3494
|
throw new it('"allowMissing" argument must be a boolean');
|
|
3463
|
-
if (
|
|
3495
|
+
if (gs(/^%?[^%]*%?$/, e) === null)
|
|
3464
3496
|
throw new ot("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3465
|
-
var i =
|
|
3466
|
-
m && (s = m[0],
|
|
3497
|
+
var i = bs(e), s = i.length > 0 ? i[0] : "", a = vs("%" + s + "%", r), c = a.name, d = a.value, p = !1, m = a.alias;
|
|
3498
|
+
m && (s = m[0], ys(i, ps([0, 1], m)));
|
|
3467
3499
|
for (var l = 1, w = !0; l < i.length; l += 1) {
|
|
3468
|
-
var E = i[l],
|
|
3469
|
-
if ((
|
|
3500
|
+
var E = i[l], F = Tt(E, 0, 1), _ = Tt(E, -1);
|
|
3501
|
+
if ((F === '"' || F === "'" || F === "`" || _ === '"' || _ === "'" || _ === "`") && F !== _)
|
|
3470
3502
|
throw new ot("property names with quotes must have matching quotes");
|
|
3471
|
-
if ((E === "constructor" || !w) && (p = !0), s += "." + E, c = "%" + s + "%",
|
|
3472
|
-
|
|
3473
|
-
else if (
|
|
3474
|
-
if (!(E in
|
|
3503
|
+
if ((E === "constructor" || !w) && (p = !0), s += "." + E, c = "%" + s + "%", Ot(Qe, c))
|
|
3504
|
+
d = Qe[c];
|
|
3505
|
+
else if (d != null) {
|
|
3506
|
+
if (!(E in d)) {
|
|
3475
3507
|
if (!r)
|
|
3476
3508
|
throw new it("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3477
3509
|
return;
|
|
3478
3510
|
}
|
|
3479
3511
|
if (qe && l + 1 >= i.length) {
|
|
3480
|
-
var x = qe(
|
|
3481
|
-
w = !!x, w && "get" in x && !("originalValue" in x.get) ?
|
|
3512
|
+
var x = qe(d, E);
|
|
3513
|
+
w = !!x, w && "get" in x && !("originalValue" in x.get) ? d = x.get : d = d[E];
|
|
3482
3514
|
} else
|
|
3483
|
-
w =
|
|
3484
|
-
w && !p && (Qe[c] =
|
|
3515
|
+
w = Ot(d, E), d = d[E];
|
|
3516
|
+
w && !p && (Qe[c] = d);
|
|
3485
3517
|
}
|
|
3486
3518
|
}
|
|
3487
|
-
return
|
|
3488
|
-
}, Un = { exports: {} },
|
|
3489
|
-
if (
|
|
3519
|
+
return d;
|
|
3520
|
+
}, Un = { exports: {} }, Ss = at, or = Ss("%Object.defineProperty%", !0), sr = function() {
|
|
3521
|
+
if (or)
|
|
3490
3522
|
try {
|
|
3491
|
-
return
|
|
3523
|
+
return or({}, "a", { value: 1 }), !0;
|
|
3492
3524
|
} catch {
|
|
3493
3525
|
return !1;
|
|
3494
3526
|
}
|
|
3495
3527
|
return !1;
|
|
3496
3528
|
};
|
|
3497
|
-
|
|
3498
|
-
if (!
|
|
3529
|
+
sr.hasArrayLengthDefineBug = function() {
|
|
3530
|
+
if (!sr())
|
|
3499
3531
|
return null;
|
|
3500
3532
|
try {
|
|
3501
|
-
return
|
|
3533
|
+
return or([], "length", { value: 1 }).length !== 1;
|
|
3502
3534
|
} catch {
|
|
3503
3535
|
return !0;
|
|
3504
3536
|
}
|
|
3505
3537
|
};
|
|
3506
|
-
var jn =
|
|
3538
|
+
var jn = sr, As = at, St = As("%Object.getOwnPropertyDescriptor%", !0);
|
|
3507
3539
|
if (St)
|
|
3508
3540
|
try {
|
|
3509
3541
|
St([], "length");
|
|
3510
3542
|
} catch {
|
|
3511
3543
|
St = null;
|
|
3512
3544
|
}
|
|
3513
|
-
var Ir = St,
|
|
3545
|
+
var Ir = St, Es = jn(), Fr = at, ht = Es && Fr("%Object.defineProperty%", !0);
|
|
3514
3546
|
if (ht)
|
|
3515
3547
|
try {
|
|
3516
3548
|
ht({}, "a", { value: 1 });
|
|
3517
3549
|
} catch {
|
|
3518
3550
|
ht = !1;
|
|
3519
3551
|
}
|
|
3520
|
-
var
|
|
3552
|
+
var Is = Fr("%SyntaxError%"), He = Fr("%TypeError%"), Jr = Ir, Fs = function(e, r, i) {
|
|
3521
3553
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3522
3554
|
throw new He("`obj` must be an object or a function`");
|
|
3523
3555
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3530,29 +3562,29 @@ var Ss = _r("%SyntaxError%"), He = _r("%TypeError%"), Jr = Ir, As = function(e,
|
|
|
3530
3562
|
throw new He("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3531
3563
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3532
3564
|
throw new He("`loose`, if provided, must be a boolean");
|
|
3533
|
-
var s = arguments.length > 3 ? arguments[3] : null,
|
|
3565
|
+
var s = arguments.length > 3 ? arguments[3] : null, a = arguments.length > 4 ? arguments[4] : null, c = arguments.length > 5 ? arguments[5] : null, d = arguments.length > 6 ? arguments[6] : !1, p = !!Jr && Jr(e, r);
|
|
3534
3566
|
if (ht)
|
|
3535
3567
|
ht(e, r, {
|
|
3536
3568
|
configurable: c === null && p ? p.configurable : !c,
|
|
3537
3569
|
enumerable: s === null && p ? p.enumerable : !s,
|
|
3538
3570
|
value: i,
|
|
3539
|
-
writable:
|
|
3571
|
+
writable: a === null && p ? p.writable : !a
|
|
3540
3572
|
});
|
|
3541
|
-
else if (
|
|
3573
|
+
else if (d || !s && !a && !c)
|
|
3542
3574
|
e[r] = i;
|
|
3543
3575
|
else
|
|
3544
|
-
throw new
|
|
3545
|
-
}, Mn = at, Yr =
|
|
3576
|
+
throw new Is("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3577
|
+
}, Mn = at, Yr = Fs, Os = jn(), Xr = Ir, Zr = Mn("%TypeError%"), Ts = Mn("%Math.floor%"), _s = function(e, r) {
|
|
3546
3578
|
if (typeof e != "function")
|
|
3547
3579
|
throw new Zr("`fn` is not a function");
|
|
3548
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3580
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || Ts(r) !== r)
|
|
3549
3581
|
throw new Zr("`length` must be a positive 32-bit integer");
|
|
3550
|
-
var i = arguments.length > 2 && !!arguments[2], s = !0,
|
|
3582
|
+
var i = arguments.length > 2 && !!arguments[2], s = !0, a = !0;
|
|
3551
3583
|
if ("length" in e && Xr) {
|
|
3552
3584
|
var c = Xr(e, "length");
|
|
3553
|
-
c && !c.configurable && (s = !1), c && !c.writable && (
|
|
3585
|
+
c && !c.configurable && (s = !1), c && !c.writable && (a = !1);
|
|
3554
3586
|
}
|
|
3555
|
-
return (s ||
|
|
3587
|
+
return (s || a || !i) && (Os ? Yr(
|
|
3556
3588
|
/** @type {Parameters<define>[0]} */
|
|
3557
3589
|
e,
|
|
3558
3590
|
"length",
|
|
@@ -3567,7 +3599,7 @@ var Ss = _r("%SyntaxError%"), He = _r("%TypeError%"), Jr = Ir, As = function(e,
|
|
|
3567
3599
|
)), e;
|
|
3568
3600
|
};
|
|
3569
3601
|
(function(t) {
|
|
3570
|
-
var e = Er, r = at, i = _s, s = r("%TypeError%"),
|
|
3602
|
+
var e = Er, r = at, i = _s, s = r("%TypeError%"), a = r("%Function.prototype.apply%"), c = r("%Function.prototype.call%"), d = r("%Reflect.apply%", !0) || e.call(c, a), p = r("%Object.defineProperty%", !0), m = r("%Math.max%");
|
|
3571
3603
|
if (p)
|
|
3572
3604
|
try {
|
|
3573
3605
|
p({}, "a", { value: 1 });
|
|
@@ -3577,133 +3609,133 @@ var Ss = _r("%SyntaxError%"), He = _r("%TypeError%"), Jr = Ir, As = function(e,
|
|
|
3577
3609
|
t.exports = function(E) {
|
|
3578
3610
|
if (typeof E != "function")
|
|
3579
3611
|
throw new s("a function is required");
|
|
3580
|
-
var
|
|
3612
|
+
var F = d(e, c, arguments);
|
|
3581
3613
|
return i(
|
|
3582
|
-
|
|
3614
|
+
F,
|
|
3583
3615
|
1 + m(0, E.length - (arguments.length - 1)),
|
|
3584
3616
|
!0
|
|
3585
3617
|
);
|
|
3586
3618
|
};
|
|
3587
3619
|
var l = function() {
|
|
3588
|
-
return
|
|
3620
|
+
return d(e, a, arguments);
|
|
3589
3621
|
};
|
|
3590
3622
|
p ? p(t.exports, "apply", { value: l }) : t.exports.apply = l;
|
|
3591
3623
|
})(Un);
|
|
3592
|
-
var Vn = Un.exports, qn = at, Qn = Vn,
|
|
3624
|
+
var Vn = Un.exports, qn = at, Qn = Vn, Cs = Qn(qn("String.prototype.indexOf")), Gn = function(e, r) {
|
|
3593
3625
|
var i = qn(e, !!r);
|
|
3594
|
-
return typeof i == "function" &&
|
|
3595
|
-
},
|
|
3596
|
-
return
|
|
3626
|
+
return typeof i == "function" && Cs(e, ".prototype.") > -1 ? Qn(i) : i;
|
|
3627
|
+
}, xs = Ar(), ks = Gn, ar = ks("Object.prototype.toString"), Ut = function(e) {
|
|
3628
|
+
return xs && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ar(e) === "[object Arguments]";
|
|
3597
3629
|
}, zn = function(e) {
|
|
3598
|
-
return
|
|
3599
|
-
},
|
|
3600
|
-
return
|
|
3630
|
+
return Ut(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ar(e) !== "[object Array]" && ar(e.callee) === "[object Function]";
|
|
3631
|
+
}, Bs = function() {
|
|
3632
|
+
return Ut(arguments);
|
|
3601
3633
|
}();
|
|
3602
|
-
|
|
3603
|
-
var
|
|
3634
|
+
Ut.isLegacyArguments = zn;
|
|
3635
|
+
var Ls = Bs ? Ut : zn, Ps = Object.prototype.toString, Rs = Function.prototype.toString, Ns = /^\s*(?:function)?\*/, Kn = Ar(), Gt = Object.getPrototypeOf, Ds = function() {
|
|
3604
3636
|
if (!Kn)
|
|
3605
3637
|
return !1;
|
|
3606
3638
|
try {
|
|
3607
3639
|
return Function("return function*() {}")();
|
|
3608
3640
|
} catch {
|
|
3609
3641
|
}
|
|
3610
|
-
},
|
|
3642
|
+
}, zt, $s = function(e) {
|
|
3611
3643
|
if (typeof e != "function")
|
|
3612
3644
|
return !1;
|
|
3613
|
-
if (
|
|
3645
|
+
if (Ns.test(Rs.call(e)))
|
|
3614
3646
|
return !0;
|
|
3615
3647
|
if (!Kn) {
|
|
3616
|
-
var r =
|
|
3648
|
+
var r = Ps.call(e);
|
|
3617
3649
|
return r === "[object GeneratorFunction]";
|
|
3618
3650
|
}
|
|
3619
|
-
if (!
|
|
3651
|
+
if (!Gt)
|
|
3620
3652
|
return !1;
|
|
3621
|
-
if (typeof
|
|
3622
|
-
var i =
|
|
3623
|
-
|
|
3653
|
+
if (typeof zt > "u") {
|
|
3654
|
+
var i = Ds();
|
|
3655
|
+
zt = i ? Gt(i) : !1;
|
|
3624
3656
|
}
|
|
3625
|
-
return
|
|
3626
|
-
}, Wn = Function.prototype.toString, Ze = typeof Reflect == "object" && Reflect !== null && Reflect.apply,
|
|
3657
|
+
return Gt(e) === zt;
|
|
3658
|
+
}, Wn = Function.prototype.toString, Ze = typeof Reflect == "object" && Reflect !== null && Reflect.apply, ur, At;
|
|
3627
3659
|
if (typeof Ze == "function" && typeof Object.defineProperty == "function")
|
|
3628
3660
|
try {
|
|
3629
|
-
|
|
3661
|
+
ur = Object.defineProperty({}, "length", {
|
|
3630
3662
|
get: function() {
|
|
3631
3663
|
throw At;
|
|
3632
3664
|
}
|
|
3633
3665
|
}), At = {}, Ze(function() {
|
|
3634
3666
|
throw 42;
|
|
3635
|
-
}, null,
|
|
3667
|
+
}, null, ur);
|
|
3636
3668
|
} catch (t) {
|
|
3637
3669
|
t !== At && (Ze = null);
|
|
3638
3670
|
}
|
|
3639
3671
|
else
|
|
3640
3672
|
Ze = null;
|
|
3641
|
-
var
|
|
3673
|
+
var Us = /^\s*class\b/, cr = function(e) {
|
|
3642
3674
|
try {
|
|
3643
3675
|
var r = Wn.call(e);
|
|
3644
|
-
return
|
|
3676
|
+
return Us.test(r);
|
|
3645
3677
|
} catch {
|
|
3646
3678
|
return !1;
|
|
3647
3679
|
}
|
|
3648
|
-
},
|
|
3680
|
+
}, Kt = function(e) {
|
|
3649
3681
|
try {
|
|
3650
|
-
return
|
|
3682
|
+
return cr(e) ? !1 : (Wn.call(e), !0);
|
|
3651
3683
|
} catch {
|
|
3652
3684
|
return !1;
|
|
3653
3685
|
}
|
|
3654
|
-
}, Et = Object.prototype.toString,
|
|
3686
|
+
}, Et = Object.prototype.toString, js = "[object Object]", Ms = "[object Function]", Vs = "[object GeneratorFunction]", qs = "[object HTMLAllCollection]", Qs = "[object HTML document.all class]", Gs = "[object HTMLCollection]", zs = typeof Symbol == "function" && !!Symbol.toStringTag, Ks = !(0 in [,]), lr = function() {
|
|
3655
3687
|
return !1;
|
|
3656
3688
|
};
|
|
3657
3689
|
if (typeof document == "object") {
|
|
3658
|
-
var
|
|
3659
|
-
Et.call(
|
|
3660
|
-
if ((
|
|
3690
|
+
var Ws = document.all;
|
|
3691
|
+
Et.call(Ws) === Et.call(document.all) && (lr = function(e) {
|
|
3692
|
+
if ((Ks || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3661
3693
|
try {
|
|
3662
3694
|
var r = Et.call(e);
|
|
3663
|
-
return (r ===
|
|
3695
|
+
return (r === qs || r === Qs || r === Gs || r === js) && e("") == null;
|
|
3664
3696
|
} catch {
|
|
3665
3697
|
}
|
|
3666
3698
|
return !1;
|
|
3667
3699
|
});
|
|
3668
3700
|
}
|
|
3669
|
-
var
|
|
3670
|
-
if (
|
|
3701
|
+
var Hs = Ze ? function(e) {
|
|
3702
|
+
if (lr(e))
|
|
3671
3703
|
return !0;
|
|
3672
3704
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3673
3705
|
return !1;
|
|
3674
3706
|
try {
|
|
3675
|
-
Ze(e, null,
|
|
3707
|
+
Ze(e, null, ur);
|
|
3676
3708
|
} catch (r) {
|
|
3677
3709
|
if (r !== At)
|
|
3678
3710
|
return !1;
|
|
3679
3711
|
}
|
|
3680
|
-
return !
|
|
3712
|
+
return !cr(e) && Kt(e);
|
|
3681
3713
|
} : function(e) {
|
|
3682
|
-
if (
|
|
3714
|
+
if (lr(e))
|
|
3683
3715
|
return !0;
|
|
3684
3716
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3685
3717
|
return !1;
|
|
3686
|
-
if (
|
|
3687
|
-
return
|
|
3688
|
-
if (
|
|
3718
|
+
if (zs)
|
|
3719
|
+
return Kt(e);
|
|
3720
|
+
if (cr(e))
|
|
3689
3721
|
return !1;
|
|
3690
3722
|
var r = Et.call(e);
|
|
3691
|
-
return r !==
|
|
3692
|
-
},
|
|
3693
|
-
for (var s = 0,
|
|
3723
|
+
return r !== Ms && r !== Vs && !/^\[object HTML/.test(r) ? !1 : Kt(e);
|
|
3724
|
+
}, Js = Hs, Ys = Object.prototype.toString, Hn = Object.prototype.hasOwnProperty, Xs = function(e, r, i) {
|
|
3725
|
+
for (var s = 0, a = e.length; s < a; s++)
|
|
3694
3726
|
Hn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3695
|
-
},
|
|
3696
|
-
for (var s = 0,
|
|
3727
|
+
}, Zs = function(e, r, i) {
|
|
3728
|
+
for (var s = 0, a = e.length; s < a; s++)
|
|
3697
3729
|
i == null ? r(e.charAt(s), s, e) : r.call(i, e.charAt(s), s, e);
|
|
3698
|
-
},
|
|
3730
|
+
}, ea = function(e, r, i) {
|
|
3699
3731
|
for (var s in e)
|
|
3700
3732
|
Hn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3701
|
-
},
|
|
3702
|
-
if (!
|
|
3733
|
+
}, ta = function(e, r, i) {
|
|
3734
|
+
if (!Js(r))
|
|
3703
3735
|
throw new TypeError("iterator must be a function");
|
|
3704
3736
|
var s;
|
|
3705
|
-
arguments.length >= 3 && (s = i),
|
|
3706
|
-
},
|
|
3737
|
+
arguments.length >= 3 && (s = i), Ys.call(e) === "[object Array]" ? Xs(e, r, s) : typeof e == "string" ? Zs(e, r, s) : ea(e, r, s);
|
|
3738
|
+
}, ra = ta, Wt = [
|
|
3707
3739
|
"BigInt64Array",
|
|
3708
3740
|
"BigUint64Array",
|
|
3709
3741
|
"Float32Array",
|
|
@@ -3715,45 +3747,45 @@ var zs = Ze ? function(e) {
|
|
|
3715
3747
|
"Uint32Array",
|
|
3716
3748
|
"Uint8Array",
|
|
3717
3749
|
"Uint8ClampedArray"
|
|
3718
|
-
],
|
|
3719
|
-
for (var e = [], r = 0; r <
|
|
3720
|
-
typeof
|
|
3750
|
+
], na = typeof globalThis > "u" ? En : globalThis, ia = function() {
|
|
3751
|
+
for (var e = [], r = 0; r < Wt.length; r++)
|
|
3752
|
+
typeof na[Wt[r]] == "function" && (e[e.length] = Wt[r]);
|
|
3721
3753
|
return e;
|
|
3722
|
-
},
|
|
3754
|
+
}, _t = ra, oa = ia, en = Vn, Or = Gn, It = Ir, sa = Or("Object.prototype.toString"), Jn = Ar(), tn = typeof globalThis > "u" ? En : globalThis, fr = oa(), Tr = Or("String.prototype.slice"), Ht = Object.getPrototypeOf, aa = Or("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3723
3755
|
for (var i = 0; i < e.length; i += 1)
|
|
3724
3756
|
if (e[i] === r)
|
|
3725
3757
|
return i;
|
|
3726
3758
|
return -1;
|
|
3727
3759
|
}, Ct = { __proto__: null };
|
|
3728
|
-
Jn && It &&
|
|
3760
|
+
Jn && It && Ht ? _t(fr, function(t) {
|
|
3729
3761
|
var e = new tn[t]();
|
|
3730
3762
|
if (Symbol.toStringTag in e) {
|
|
3731
|
-
var r =
|
|
3763
|
+
var r = Ht(e), i = It(r, Symbol.toStringTag);
|
|
3732
3764
|
if (!i) {
|
|
3733
|
-
var s =
|
|
3765
|
+
var s = Ht(r);
|
|
3734
3766
|
i = It(s, Symbol.toStringTag);
|
|
3735
3767
|
}
|
|
3736
3768
|
Ct["$" + t] = en(i.get);
|
|
3737
3769
|
}
|
|
3738
|
-
}) :
|
|
3770
|
+
}) : _t(fr, function(t) {
|
|
3739
3771
|
var e = new tn[t](), r = e.slice || e.set;
|
|
3740
3772
|
r && (Ct["$" + t] = en(r));
|
|
3741
3773
|
});
|
|
3742
|
-
var
|
|
3774
|
+
var ua = function(e) {
|
|
3743
3775
|
var r = !1;
|
|
3744
|
-
return
|
|
3776
|
+
return _t(Ct, function(i, s) {
|
|
3745
3777
|
if (!r)
|
|
3746
3778
|
try {
|
|
3747
|
-
"$" + i(e) === s && (r =
|
|
3779
|
+
"$" + i(e) === s && (r = Tr(s, 1));
|
|
3748
3780
|
} catch {
|
|
3749
3781
|
}
|
|
3750
3782
|
}), r;
|
|
3751
|
-
},
|
|
3783
|
+
}, ca = function(e) {
|
|
3752
3784
|
var r = !1;
|
|
3753
|
-
return
|
|
3785
|
+
return _t(Ct, function(i, s) {
|
|
3754
3786
|
if (!r)
|
|
3755
3787
|
try {
|
|
3756
|
-
i(e), r =
|
|
3788
|
+
i(e), r = Tr(s, 1);
|
|
3757
3789
|
} catch {
|
|
3758
3790
|
}
|
|
3759
3791
|
}), r;
|
|
@@ -3761,24 +3793,24 @@ var oa = function(e) {
|
|
|
3761
3793
|
if (!e || typeof e != "object")
|
|
3762
3794
|
return !1;
|
|
3763
3795
|
if (!Jn) {
|
|
3764
|
-
var r =
|
|
3765
|
-
return
|
|
3796
|
+
var r = Tr(sa(e), 8, -1);
|
|
3797
|
+
return aa(fr, r) > -1 ? r : r !== "Object" ? !1 : ca(e);
|
|
3766
3798
|
}
|
|
3767
|
-
return It ?
|
|
3768
|
-
},
|
|
3769
|
-
return !!
|
|
3799
|
+
return It ? ua(e) : null;
|
|
3800
|
+
}, la = Yn, fa = function(e) {
|
|
3801
|
+
return !!la(e);
|
|
3770
3802
|
};
|
|
3771
3803
|
(function(t) {
|
|
3772
|
-
var e =
|
|
3773
|
-
function
|
|
3804
|
+
var e = Ls, r = $s, i = Yn, s = fa;
|
|
3805
|
+
function a(A) {
|
|
3774
3806
|
return A.call.bind(A);
|
|
3775
3807
|
}
|
|
3776
|
-
var c = typeof BigInt < "u",
|
|
3808
|
+
var c = typeof BigInt < "u", d = typeof Symbol < "u", p = a(Object.prototype.toString), m = a(Number.prototype.valueOf), l = a(String.prototype.valueOf), w = a(Boolean.prototype.valueOf);
|
|
3777
3809
|
if (c)
|
|
3778
|
-
var E =
|
|
3779
|
-
if (
|
|
3780
|
-
var
|
|
3781
|
-
function
|
|
3810
|
+
var E = a(BigInt.prototype.valueOf);
|
|
3811
|
+
if (d)
|
|
3812
|
+
var F = a(Symbol.prototype.valueOf);
|
|
3813
|
+
function _(A, lt) {
|
|
3782
3814
|
if (typeof A != "object")
|
|
3783
3815
|
return !1;
|
|
3784
3816
|
try {
|
|
@@ -3800,18 +3832,18 @@ var oa = function(e) {
|
|
|
3800
3832
|
return i(A) === "Uint8Array";
|
|
3801
3833
|
}
|
|
3802
3834
|
t.isUint8Array = I;
|
|
3803
|
-
function
|
|
3835
|
+
function T(A) {
|
|
3804
3836
|
return i(A) === "Uint8ClampedArray";
|
|
3805
3837
|
}
|
|
3806
|
-
t.isUint8ClampedArray =
|
|
3838
|
+
t.isUint8ClampedArray = T;
|
|
3807
3839
|
function j(A) {
|
|
3808
3840
|
return i(A) === "Uint16Array";
|
|
3809
3841
|
}
|
|
3810
3842
|
t.isUint16Array = j;
|
|
3811
|
-
function
|
|
3843
|
+
function L(A) {
|
|
3812
3844
|
return i(A) === "Uint32Array";
|
|
3813
3845
|
}
|
|
3814
|
-
t.isUint32Array =
|
|
3846
|
+
t.isUint32Array = L;
|
|
3815
3847
|
function C(A) {
|
|
3816
3848
|
return i(A) === "Int8Array";
|
|
3817
3849
|
}
|
|
@@ -3889,11 +3921,11 @@ var oa = function(e) {
|
|
|
3889
3921
|
}
|
|
3890
3922
|
t.isDataView = v;
|
|
3891
3923
|
var S = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
|
|
3892
|
-
function
|
|
3924
|
+
function O(A) {
|
|
3893
3925
|
return p(A) === "[object SharedArrayBuffer]";
|
|
3894
3926
|
}
|
|
3895
3927
|
function M(A) {
|
|
3896
|
-
return typeof S > "u" ? !1 : (typeof
|
|
3928
|
+
return typeof S > "u" ? !1 : (typeof O.working > "u" && (O.working = O(new S())), O.working ? O(A) : A instanceof S);
|
|
3897
3929
|
}
|
|
3898
3930
|
t.isSharedArrayBuffer = M;
|
|
3899
3931
|
function V(A) {
|
|
@@ -3917,33 +3949,33 @@ var oa = function(e) {
|
|
|
3917
3949
|
}
|
|
3918
3950
|
t.isWebAssemblyCompiledModule = J;
|
|
3919
3951
|
function ce(A) {
|
|
3920
|
-
return
|
|
3952
|
+
return _(A, m);
|
|
3921
3953
|
}
|
|
3922
3954
|
t.isNumberObject = ce;
|
|
3923
3955
|
function Re(A) {
|
|
3924
|
-
return
|
|
3956
|
+
return _(A, l);
|
|
3925
3957
|
}
|
|
3926
3958
|
t.isStringObject = Re;
|
|
3927
3959
|
function Be(A) {
|
|
3928
|
-
return
|
|
3960
|
+
return _(A, w);
|
|
3929
3961
|
}
|
|
3930
3962
|
t.isBooleanObject = Be;
|
|
3931
3963
|
function Ne(A) {
|
|
3932
|
-
return c &&
|
|
3964
|
+
return c && _(A, E);
|
|
3933
3965
|
}
|
|
3934
3966
|
t.isBigIntObject = Ne;
|
|
3935
3967
|
function Se(A) {
|
|
3936
|
-
return
|
|
3968
|
+
return d && _(A, F);
|
|
3937
3969
|
}
|
|
3938
3970
|
t.isSymbolObject = Se;
|
|
3939
3971
|
function De(A) {
|
|
3940
3972
|
return ce(A) || Re(A) || Be(A) || Ne(A) || Se(A);
|
|
3941
3973
|
}
|
|
3942
3974
|
t.isBoxedPrimitive = De;
|
|
3943
|
-
function
|
|
3975
|
+
function jt(A) {
|
|
3944
3976
|
return typeof Uint8Array < "u" && (ze(A) || M(A));
|
|
3945
3977
|
}
|
|
3946
|
-
t.isAnyArrayBuffer =
|
|
3978
|
+
t.isAnyArrayBuffer = jt, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(A) {
|
|
3947
3979
|
Object.defineProperty(t, A, {
|
|
3948
3980
|
enumerable: !1,
|
|
3949
3981
|
value: function() {
|
|
@@ -3952,10 +3984,10 @@ var oa = function(e) {
|
|
|
3952
3984
|
});
|
|
3953
3985
|
});
|
|
3954
3986
|
})(Nn);
|
|
3955
|
-
var
|
|
3987
|
+
var da = function(e) {
|
|
3956
3988
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3957
|
-
},
|
|
3958
|
-
typeof Object.create == "function" ?
|
|
3989
|
+
}, dr = { exports: {} };
|
|
3990
|
+
typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
3959
3991
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
3960
3992
|
constructor: {
|
|
3961
3993
|
value: e,
|
|
@@ -3964,7 +3996,7 @@ typeof Object.create == "function" ? fr.exports = function(e, r) {
|
|
|
3964
3996
|
configurable: !0
|
|
3965
3997
|
}
|
|
3966
3998
|
}));
|
|
3967
|
-
} :
|
|
3999
|
+
} : dr.exports = function(e, r) {
|
|
3968
4000
|
if (r) {
|
|
3969
4001
|
e.super_ = r;
|
|
3970
4002
|
var i = function() {
|
|
@@ -3972,12 +4004,12 @@ typeof Object.create == "function" ? fr.exports = function(e, r) {
|
|
|
3972
4004
|
i.prototype = r.prototype, e.prototype = new i(), e.prototype.constructor = e;
|
|
3973
4005
|
}
|
|
3974
4006
|
};
|
|
3975
|
-
var
|
|
4007
|
+
var ha = dr.exports;
|
|
3976
4008
|
(function(t) {
|
|
3977
4009
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
3978
|
-
for (var S = Object.keys(v),
|
|
3979
|
-
|
|
3980
|
-
return
|
|
4010
|
+
for (var S = Object.keys(v), O = {}, M = 0; M < S.length; M++)
|
|
4011
|
+
O[S[M]] = Object.getOwnPropertyDescriptor(v, S[M]);
|
|
4012
|
+
return O;
|
|
3981
4013
|
}, r = /%[sdj%]/g;
|
|
3982
4014
|
t.format = function(g) {
|
|
3983
4015
|
if (!C(g)) {
|
|
@@ -3985,55 +4017,55 @@ var la = fr.exports;
|
|
|
3985
4017
|
v.push(c(arguments[S]));
|
|
3986
4018
|
return v.join(" ");
|
|
3987
4019
|
}
|
|
3988
|
-
for (var S = 1,
|
|
4020
|
+
for (var S = 1, O = arguments, M = O.length, V = String(g).replace(r, function($) {
|
|
3989
4021
|
if ($ === "%%")
|
|
3990
4022
|
return "%";
|
|
3991
4023
|
if (S >= M)
|
|
3992
4024
|
return $;
|
|
3993
4025
|
switch ($) {
|
|
3994
4026
|
case "%s":
|
|
3995
|
-
return String(
|
|
4027
|
+
return String(O[S++]);
|
|
3996
4028
|
case "%d":
|
|
3997
|
-
return Number(
|
|
4029
|
+
return Number(O[S++]);
|
|
3998
4030
|
case "%j":
|
|
3999
4031
|
try {
|
|
4000
|
-
return JSON.stringify(
|
|
4032
|
+
return JSON.stringify(O[S++]);
|
|
4001
4033
|
} catch {
|
|
4002
4034
|
return "[Circular]";
|
|
4003
4035
|
}
|
|
4004
4036
|
default:
|
|
4005
4037
|
return $;
|
|
4006
4038
|
}
|
|
4007
|
-
}), R =
|
|
4008
|
-
|
|
4039
|
+
}), R = O[S]; S < M; R = O[++S])
|
|
4040
|
+
T(R) || !ne(R) ? V += " " + R : V += " " + c(R);
|
|
4009
4041
|
return V;
|
|
4010
4042
|
}, t.deprecate = function(g, v) {
|
|
4011
|
-
if (typeof
|
|
4043
|
+
if (typeof P < "u" && P.noDeprecation === !0)
|
|
4012
4044
|
return g;
|
|
4013
|
-
if (typeof
|
|
4045
|
+
if (typeof P > "u")
|
|
4014
4046
|
return function() {
|
|
4015
4047
|
return t.deprecate(g, v).apply(this, arguments);
|
|
4016
4048
|
};
|
|
4017
4049
|
var S = !1;
|
|
4018
|
-
function
|
|
4050
|
+
function O() {
|
|
4019
4051
|
if (!S) {
|
|
4020
|
-
if (
|
|
4052
|
+
if (P.throwDeprecation)
|
|
4021
4053
|
throw new Error(v);
|
|
4022
|
-
|
|
4054
|
+
P.traceDeprecation ? console.trace(v) : console.error(v), S = !0;
|
|
4023
4055
|
}
|
|
4024
4056
|
return g.apply(this, arguments);
|
|
4025
4057
|
}
|
|
4026
|
-
return
|
|
4058
|
+
return O;
|
|
4027
4059
|
};
|
|
4028
4060
|
var i = {}, s = /^$/;
|
|
4029
|
-
if (
|
|
4030
|
-
var
|
|
4031
|
-
|
|
4061
|
+
if (P.env.NODE_DEBUG) {
|
|
4062
|
+
var a = P.env.NODE_DEBUG;
|
|
4063
|
+
a = a.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + a + "$", "i");
|
|
4032
4064
|
}
|
|
4033
4065
|
t.debuglog = function(g) {
|
|
4034
4066
|
if (g = g.toUpperCase(), !i[g])
|
|
4035
4067
|
if (s.test(g)) {
|
|
4036
|
-
var v =
|
|
4068
|
+
var v = P.pid;
|
|
4037
4069
|
i[g] = function() {
|
|
4038
4070
|
var S = t.format.apply(t, arguments);
|
|
4039
4071
|
console.error("%s %d: %s", g, v, S);
|
|
@@ -4048,7 +4080,7 @@ var la = fr.exports;
|
|
|
4048
4080
|
seen: [],
|
|
4049
4081
|
stylize: p
|
|
4050
4082
|
};
|
|
4051
|
-
return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), I(v) ? S.showHidden = v : v && t._extend(S, v), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize =
|
|
4083
|
+
return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), I(v) ? S.showHidden = v : v && t._extend(S, v), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = d), l(S, g, S.depth);
|
|
4052
4084
|
}
|
|
4053
4085
|
t.inspect = c, c.colors = {
|
|
4054
4086
|
bold: [1, 22],
|
|
@@ -4075,7 +4107,7 @@ var la = fr.exports;
|
|
|
4075
4107
|
// "name": intentionally not styling
|
|
4076
4108
|
regexp: "red"
|
|
4077
4109
|
};
|
|
4078
|
-
function
|
|
4110
|
+
function d(g, v) {
|
|
4079
4111
|
var S = c.styles[v];
|
|
4080
4112
|
return S ? "\x1B[" + c.colors[S][0] + "m" + g + "\x1B[" + c.colors[S][1] + "m" : g;
|
|
4081
4113
|
}
|
|
@@ -4084,7 +4116,7 @@ var la = fr.exports;
|
|
|
4084
4116
|
}
|
|
4085
4117
|
function m(g) {
|
|
4086
4118
|
var v = {};
|
|
4087
|
-
return g.forEach(function(S,
|
|
4119
|
+
return g.forEach(function(S, O) {
|
|
4088
4120
|
v[S] = !0;
|
|
4089
4121
|
}), v;
|
|
4090
4122
|
}
|
|
@@ -4092,8 +4124,8 @@ var la = fr.exports;
|
|
|
4092
4124
|
if (g.customInspect && v && ae(v.inspect) && // Filter out the util module, it's inspect function is special
|
|
4093
4125
|
v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
4094
4126
|
!(v.constructor && v.constructor.prototype === v)) {
|
|
4095
|
-
var
|
|
4096
|
-
return C(
|
|
4127
|
+
var O = v.inspect(S, g);
|
|
4128
|
+
return C(O) || (O = l(g, O, S)), O;
|
|
4097
4129
|
}
|
|
4098
4130
|
var M = w(g, v);
|
|
4099
4131
|
if (M)
|
|
@@ -4124,8 +4156,8 @@ var la = fr.exports;
|
|
|
4124
4156
|
return q(v) ? g.stylize(RegExp.prototype.toString.call(v), "regexp") : g.stylize("[Object]", "special");
|
|
4125
4157
|
g.seen.push(v);
|
|
4126
4158
|
var Be;
|
|
4127
|
-
return J ? Be =
|
|
4128
|
-
return
|
|
4159
|
+
return J ? Be = F(g, v, S, R, V) : Be = V.map(function(Ne) {
|
|
4160
|
+
return _(g, v, S, R, Ne, J);
|
|
4129
4161
|
}), g.seen.pop(), x(Be, Q, ce);
|
|
4130
4162
|
}
|
|
4131
4163
|
function w(g, v) {
|
|
@@ -4135,40 +4167,40 @@ var la = fr.exports;
|
|
|
4135
4167
|
var S = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4136
4168
|
return g.stylize(S, "string");
|
|
4137
4169
|
}
|
|
4138
|
-
if (
|
|
4170
|
+
if (L(v))
|
|
4139
4171
|
return g.stylize("" + v, "number");
|
|
4140
4172
|
if (I(v))
|
|
4141
4173
|
return g.stylize("" + v, "boolean");
|
|
4142
|
-
if (
|
|
4174
|
+
if (T(v))
|
|
4143
4175
|
return g.stylize("null", "null");
|
|
4144
4176
|
}
|
|
4145
4177
|
function E(g) {
|
|
4146
4178
|
return "[" + Error.prototype.toString.call(g) + "]";
|
|
4147
4179
|
}
|
|
4148
|
-
function
|
|
4180
|
+
function F(g, v, S, O, M) {
|
|
4149
4181
|
for (var V = [], R = 0, $ = v.length; R < $; ++R)
|
|
4150
|
-
ve(v, String(R)) ? V.push(
|
|
4182
|
+
ve(v, String(R)) ? V.push(_(
|
|
4151
4183
|
g,
|
|
4152
4184
|
v,
|
|
4153
4185
|
S,
|
|
4154
|
-
|
|
4186
|
+
O,
|
|
4155
4187
|
String(R),
|
|
4156
4188
|
!0
|
|
4157
4189
|
)) : V.push("");
|
|
4158
4190
|
return M.forEach(function(Q) {
|
|
4159
|
-
Q.match(/^\d+$/) || V.push(
|
|
4191
|
+
Q.match(/^\d+$/) || V.push(_(
|
|
4160
4192
|
g,
|
|
4161
4193
|
v,
|
|
4162
4194
|
S,
|
|
4163
|
-
|
|
4195
|
+
O,
|
|
4164
4196
|
Q,
|
|
4165
4197
|
!0
|
|
4166
4198
|
));
|
|
4167
4199
|
}), V;
|
|
4168
4200
|
}
|
|
4169
|
-
function
|
|
4201
|
+
function _(g, v, S, O, M, V) {
|
|
4170
4202
|
var R, $, Q;
|
|
4171
|
-
if (Q = Object.getOwnPropertyDescriptor(v, M) || { value: v[M] }, Q.get ? Q.set ? $ = g.stylize("[Getter/Setter]", "special") : $ = g.stylize("[Getter]", "special") : Q.set && ($ = g.stylize("[Setter]", "special")), ve(
|
|
4203
|
+
if (Q = Object.getOwnPropertyDescriptor(v, M) || { value: v[M] }, Q.get ? Q.set ? $ = g.stylize("[Getter/Setter]", "special") : $ = g.stylize("[Getter]", "special") : Q.set && ($ = g.stylize("[Setter]", "special")), ve(O, M) || (R = "[" + M + "]"), $ || (g.seen.indexOf(Q.value) < 0 ? (T(S) ? $ = l(g, Q.value, null) : $ = l(g, Q.value, S - 1), $.indexOf(`
|
|
4172
4204
|
`) > -1 && (V ? $ = $.split(`
|
|
4173
4205
|
`).map(function(J) {
|
|
4174
4206
|
return " " + J;
|
|
@@ -4186,11 +4218,11 @@ var la = fr.exports;
|
|
|
4186
4218
|
return R + ": " + $;
|
|
4187
4219
|
}
|
|
4188
4220
|
function x(g, v, S) {
|
|
4189
|
-
var
|
|
4221
|
+
var O = g.reduce(function(M, V) {
|
|
4190
4222
|
return V.indexOf(`
|
|
4191
4223
|
`) >= 0, M + V.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4192
4224
|
}, 0);
|
|
4193
|
-
return
|
|
4225
|
+
return O > 60 ? S[0] + (v === "" ? "" : v + `
|
|
4194
4226
|
`) + " " + g.join(`,
|
|
4195
4227
|
`) + " " + S[1] : S[0] + v + " " + g.join(", ") + " " + S[1];
|
|
4196
4228
|
}
|
|
@@ -4203,18 +4235,18 @@ var la = fr.exports;
|
|
|
4203
4235
|
return typeof g == "boolean";
|
|
4204
4236
|
}
|
|
4205
4237
|
t.isBoolean = I;
|
|
4206
|
-
function
|
|
4238
|
+
function T(g) {
|
|
4207
4239
|
return g === null;
|
|
4208
4240
|
}
|
|
4209
|
-
t.isNull =
|
|
4241
|
+
t.isNull = T;
|
|
4210
4242
|
function j(g) {
|
|
4211
4243
|
return g == null;
|
|
4212
4244
|
}
|
|
4213
4245
|
t.isNullOrUndefined = j;
|
|
4214
|
-
function
|
|
4246
|
+
function L(g) {
|
|
4215
4247
|
return typeof g == "number";
|
|
4216
4248
|
}
|
|
4217
|
-
t.isNumber =
|
|
4249
|
+
t.isNumber = L;
|
|
4218
4250
|
function C(g) {
|
|
4219
4251
|
return typeof g == "string";
|
|
4220
4252
|
}
|
|
@@ -4251,7 +4283,7 @@ var la = fr.exports;
|
|
|
4251
4283
|
return g === null || typeof g == "boolean" || typeof g == "number" || typeof g == "string" || typeof g == "symbol" || // ES6 symbol
|
|
4252
4284
|
typeof g > "u";
|
|
4253
4285
|
}
|
|
4254
|
-
t.isPrimitive = ct, t.isBuffer =
|
|
4286
|
+
t.isPrimitive = ct, t.isBuffer = da;
|
|
4255
4287
|
function he(g) {
|
|
4256
4288
|
return Object.prototype.toString.call(g);
|
|
4257
4289
|
}
|
|
@@ -4282,11 +4314,11 @@ var la = fr.exports;
|
|
|
4282
4314
|
}
|
|
4283
4315
|
t.log = function() {
|
|
4284
4316
|
console.log("%s - %s", Ge(), t.format.apply(t, arguments));
|
|
4285
|
-
}, t.inherits =
|
|
4317
|
+
}, t.inherits = ha, t._extend = function(g, v) {
|
|
4286
4318
|
if (!v || !ne(v))
|
|
4287
4319
|
return g;
|
|
4288
|
-
for (var S = Object.keys(v),
|
|
4289
|
-
g[S[
|
|
4320
|
+
for (var S = Object.keys(v), O = S.length; O--; )
|
|
4321
|
+
g[S[O]] = v[S[O]];
|
|
4290
4322
|
return g;
|
|
4291
4323
|
};
|
|
4292
4324
|
function ve(g, v) {
|
|
@@ -4308,12 +4340,12 @@ var la = fr.exports;
|
|
|
4308
4340
|
}), S;
|
|
4309
4341
|
}
|
|
4310
4342
|
function S() {
|
|
4311
|
-
for (var
|
|
4312
|
-
|
|
4343
|
+
for (var O, M, V = new Promise(function(Q, J) {
|
|
4344
|
+
O = Q, M = J;
|
|
4313
4345
|
}), R = [], $ = 0; $ < arguments.length; $++)
|
|
4314
4346
|
R.push(arguments[$]);
|
|
4315
4347
|
R.push(function(Q, J) {
|
|
4316
|
-
Q ? M(Q) :
|
|
4348
|
+
Q ? M(Q) : O(J);
|
|
4317
4349
|
});
|
|
4318
4350
|
try {
|
|
4319
4351
|
v.apply(this, R);
|
|
@@ -4343,8 +4375,8 @@ var la = fr.exports;
|
|
|
4343
4375
|
if (typeof g != "function")
|
|
4344
4376
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4345
4377
|
function v() {
|
|
4346
|
-
for (var S = [],
|
|
4347
|
-
S.push(arguments[
|
|
4378
|
+
for (var S = [], O = 0; O < arguments.length; O++)
|
|
4379
|
+
S.push(arguments[O]);
|
|
4348
4380
|
var M = S.pop();
|
|
4349
4381
|
if (typeof M != "function")
|
|
4350
4382
|
throw new TypeError("The last argument must be of type Function");
|
|
@@ -4353,10 +4385,10 @@ var la = fr.exports;
|
|
|
4353
4385
|
};
|
|
4354
4386
|
g.apply(this, S).then(
|
|
4355
4387
|
function($) {
|
|
4356
|
-
|
|
4388
|
+
P.nextTick(R.bind(null, null, $));
|
|
4357
4389
|
},
|
|
4358
4390
|
function($) {
|
|
4359
|
-
|
|
4391
|
+
P.nextTick(ke.bind(null, $, R));
|
|
4360
4392
|
}
|
|
4361
4393
|
);
|
|
4362
4394
|
}
|
|
@@ -4366,21 +4398,21 @@ var la = fr.exports;
|
|
|
4366
4398
|
), v;
|
|
4367
4399
|
}
|
|
4368
4400
|
t.callbackify = ze;
|
|
4369
|
-
})(
|
|
4370
|
-
const { inherits:
|
|
4401
|
+
})($t);
|
|
4402
|
+
const { inherits: pa, format: Jt } = $t;
|
|
4371
4403
|
function $e(t, e, r = Error) {
|
|
4372
4404
|
if (!t)
|
|
4373
4405
|
throw new Error("Avvio error code must not be empty");
|
|
4374
4406
|
if (!e)
|
|
4375
4407
|
throw new Error("Avvio base error message must not be empty");
|
|
4376
|
-
function i(s,
|
|
4408
|
+
function i(s, a, c) {
|
|
4377
4409
|
if (!new.target)
|
|
4378
|
-
return new i(s,
|
|
4379
|
-
Error.captureStackTrace(this, i), this.code = t, this.message = e, this.name = "AvvioError", s &&
|
|
4410
|
+
return new i(s, a, c);
|
|
4411
|
+
Error.captureStackTrace(this, i), this.code = t, this.message = e, this.name = "AvvioError", s && a && c ? this.message = Jt(e, s, a, c) : s && a ? this.message = Jt(e, s, a) : s ? this.message = Jt(e, s) : this.message = e;
|
|
4380
4412
|
}
|
|
4381
4413
|
return i.prototype[Symbol.toStringTag] = "Error", i.prototype.toString = function() {
|
|
4382
4414
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4383
|
-
},
|
|
4415
|
+
}, pa(i, r), i;
|
|
4384
4416
|
}
|
|
4385
4417
|
var Xn = {
|
|
4386
4418
|
createError: $e,
|
|
@@ -4408,7 +4440,7 @@ var Xn = {
|
|
|
4408
4440
|
"AVV_ERR_READY_TIMEOUT",
|
|
4409
4441
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4410
4442
|
)
|
|
4411
|
-
},
|
|
4443
|
+
}, ya = function t(e, r, i) {
|
|
4412
4444
|
r === void 0 && (r = ""), i || (i = {});
|
|
4413
4445
|
var s = function(p) {
|
|
4414
4446
|
var m = {
|
|
@@ -4421,21 +4453,21 @@ var Xn = {
|
|
|
4421
4453
|
return i.unicode === !1 ? m[p] : p;
|
|
4422
4454
|
};
|
|
4423
4455
|
typeof e == "string" && (e = { label: e });
|
|
4424
|
-
var
|
|
4425
|
-
`),
|
|
4426
|
-
` + r + (
|
|
4427
|
-
return r + c.join(
|
|
4428
|
-
` +
|
|
4429
|
-
var l = m ===
|
|
4456
|
+
var a = e.nodes || [], c = (e.label || "").split(`
|
|
4457
|
+
`), d = `
|
|
4458
|
+
` + r + (a.length ? s("│") : " ") + " ";
|
|
4459
|
+
return r + c.join(d) + `
|
|
4460
|
+
` + a.map(function(p, m) {
|
|
4461
|
+
var l = m === a.length - 1, w = p.nodes && p.nodes.length, E = r + (l ? " " : s("│")) + " ";
|
|
4430
4462
|
return r + s(l ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, i).slice(r.length + 2);
|
|
4431
4463
|
}).join("");
|
|
4432
4464
|
};
|
|
4433
|
-
const
|
|
4434
|
-
let
|
|
4465
|
+
const ga = ya, rn = Symbol("avvio.TimeTree.untrackNode"), Yt = Symbol("avvio.TimeTree.trackNode"), nn = Symbol("avvio.TimeTree.getParent"), on = Symbol("avvio.TimeTree.getNode"), sn = Symbol("avvio.TimeTree.addNode");
|
|
4466
|
+
let ma = class {
|
|
4435
4467
|
constructor() {
|
|
4436
4468
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4437
4469
|
}
|
|
4438
|
-
[
|
|
4470
|
+
[Yt](e) {
|
|
4439
4471
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4440
4472
|
}
|
|
4441
4473
|
[rn](e) {
|
|
@@ -4463,15 +4495,15 @@ let pa = class {
|
|
|
4463
4495
|
label: r,
|
|
4464
4496
|
start: i,
|
|
4465
4497
|
nodes: []
|
|
4466
|
-
}, this[
|
|
4467
|
-
const
|
|
4498
|
+
}, this[Yt](this.root), this.root.id;
|
|
4499
|
+
const a = this[nn](e), c = `${r}-${Math.random()}`, d = {
|
|
4468
4500
|
id: c,
|
|
4469
4501
|
parent: e,
|
|
4470
4502
|
start: i,
|
|
4471
4503
|
label: r,
|
|
4472
4504
|
nodes: []
|
|
4473
4505
|
};
|
|
4474
|
-
return
|
|
4506
|
+
return a.nodes.push(d), this[Yt](d), c;
|
|
4475
4507
|
}
|
|
4476
4508
|
start(e, r, i = Date.now()) {
|
|
4477
4509
|
return this[sn](e, r, i);
|
|
@@ -4485,22 +4517,22 @@ let pa = class {
|
|
|
4485
4517
|
}
|
|
4486
4518
|
prittyPrint() {
|
|
4487
4519
|
const e = (i) => (i.label = `${i.label} ${i.diff} ms`, i.nodes.length > 0 && (i.nodes = i.nodes.map((s) => e(s))), i), r = e(this.toJSON());
|
|
4488
|
-
return
|
|
4520
|
+
return ga(r);
|
|
4489
4521
|
}
|
|
4490
4522
|
};
|
|
4491
|
-
var
|
|
4492
|
-
function
|
|
4523
|
+
var wa = ma, _r = { exports: {} }, hr = { exports: {} }, Xt, an;
|
|
4524
|
+
function ba() {
|
|
4493
4525
|
if (an)
|
|
4494
|
-
return
|
|
4526
|
+
return Xt;
|
|
4495
4527
|
an = 1;
|
|
4496
|
-
var t = 1e3, e = t * 60, r = e * 60, i = r * 24, s = i * 7,
|
|
4497
|
-
|
|
4528
|
+
var t = 1e3, e = t * 60, r = e * 60, i = r * 24, s = i * 7, a = i * 365.25;
|
|
4529
|
+
Xt = function(l, w) {
|
|
4498
4530
|
w = w || {};
|
|
4499
4531
|
var E = typeof l;
|
|
4500
4532
|
if (E === "string" && l.length > 0)
|
|
4501
4533
|
return c(l);
|
|
4502
4534
|
if (E === "number" && isFinite(l))
|
|
4503
|
-
return w.long ? p(l) :
|
|
4535
|
+
return w.long ? p(l) : d(l);
|
|
4504
4536
|
throw new Error(
|
|
4505
4537
|
"val is not a non-empty string or a valid number. val=" + JSON.stringify(l)
|
|
4506
4538
|
);
|
|
@@ -4511,14 +4543,14 @@ function ga() {
|
|
|
4511
4543
|
l
|
|
4512
4544
|
);
|
|
4513
4545
|
if (w) {
|
|
4514
|
-
var E = parseFloat(w[1]),
|
|
4515
|
-
switch (
|
|
4546
|
+
var E = parseFloat(w[1]), F = (w[2] || "ms").toLowerCase();
|
|
4547
|
+
switch (F) {
|
|
4516
4548
|
case "years":
|
|
4517
4549
|
case "year":
|
|
4518
4550
|
case "yrs":
|
|
4519
4551
|
case "yr":
|
|
4520
4552
|
case "y":
|
|
4521
|
-
return E *
|
|
4553
|
+
return E * a;
|
|
4522
4554
|
case "weeks":
|
|
4523
4555
|
case "week":
|
|
4524
4556
|
case "w":
|
|
@@ -4557,7 +4589,7 @@ function ga() {
|
|
|
4557
4589
|
}
|
|
4558
4590
|
}
|
|
4559
4591
|
}
|
|
4560
|
-
function
|
|
4592
|
+
function d(l) {
|
|
4561
4593
|
var w = Math.abs(l);
|
|
4562
4594
|
return w >= i ? Math.round(l / i) + "d" : w >= r ? Math.round(l / r) + "h" : w >= e ? Math.round(l / e) + "m" : w >= t ? Math.round(l / t) + "s" : l + "ms";
|
|
4563
4595
|
}
|
|
@@ -4565,14 +4597,14 @@ function ga() {
|
|
|
4565
4597
|
var w = Math.abs(l);
|
|
4566
4598
|
return w >= i ? m(l, w, i, "day") : w >= r ? m(l, w, r, "hour") : w >= e ? m(l, w, e, "minute") : w >= t ? m(l, w, t, "second") : l + " ms";
|
|
4567
4599
|
}
|
|
4568
|
-
function m(l, w, E,
|
|
4569
|
-
var
|
|
4570
|
-
return Math.round(l / E) + " " +
|
|
4600
|
+
function m(l, w, E, F) {
|
|
4601
|
+
var _ = w >= E * 1.5;
|
|
4602
|
+
return Math.round(l / E) + " " + F + (_ ? "s" : "");
|
|
4571
4603
|
}
|
|
4572
|
-
return
|
|
4604
|
+
return Xt;
|
|
4573
4605
|
}
|
|
4574
|
-
function
|
|
4575
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable =
|
|
4606
|
+
function va(t) {
|
|
4607
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = a, r.enable = s, r.enabled = c, r.humanize = ba(), r.destroy = m, Object.keys(t).forEach((l) => {
|
|
4576
4608
|
r[l] = t[l];
|
|
4577
4609
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4578
4610
|
function e(l) {
|
|
@@ -4583,21 +4615,21 @@ function ma(t) {
|
|
|
4583
4615
|
}
|
|
4584
4616
|
r.selectColor = e;
|
|
4585
4617
|
function r(l) {
|
|
4586
|
-
let w, E = null,
|
|
4618
|
+
let w, E = null, F, _;
|
|
4587
4619
|
function x(...N) {
|
|
4588
4620
|
if (!x.enabled)
|
|
4589
4621
|
return;
|
|
4590
|
-
const I = x,
|
|
4591
|
-
I.diff = j, I.prev = w, I.curr =
|
|
4592
|
-
let
|
|
4622
|
+
const I = x, T = Number(/* @__PURE__ */ new Date()), j = T - (w || T);
|
|
4623
|
+
I.diff = j, I.prev = w, I.curr = T, w = T, N[0] = r.coerce(N[0]), typeof N[0] != "string" && N.unshift("%O");
|
|
4624
|
+
let L = 0;
|
|
4593
4625
|
N[0] = N[0].replace(/%([a-zA-Z%])/g, (k, B) => {
|
|
4594
4626
|
if (k === "%%")
|
|
4595
4627
|
return "%";
|
|
4596
|
-
|
|
4628
|
+
L++;
|
|
4597
4629
|
const q = r.formatters[B];
|
|
4598
4630
|
if (typeof q == "function") {
|
|
4599
|
-
const ne = N[
|
|
4600
|
-
k = q.call(I, ne), N.splice(
|
|
4631
|
+
const ne = N[L];
|
|
4632
|
+
k = q.call(I, ne), N.splice(L, 1), L--;
|
|
4601
4633
|
}
|
|
4602
4634
|
return k;
|
|
4603
4635
|
}), r.formatArgs.call(I, N), (I.log || r.log).apply(I, N);
|
|
@@ -4605,7 +4637,7 @@ function ma(t) {
|
|
|
4605
4637
|
return x.namespace = l, x.useColors = r.useColors(), x.color = r.selectColor(l), x.extend = i, x.destroy = r.destroy, Object.defineProperty(x, "enabled", {
|
|
4606
4638
|
enumerable: !0,
|
|
4607
4639
|
configurable: !1,
|
|
4608
|
-
get: () => E !== null ? E : (
|
|
4640
|
+
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, _ = r.enabled(l)), _),
|
|
4609
4641
|
set: (N) => {
|
|
4610
4642
|
E = N;
|
|
4611
4643
|
}
|
|
@@ -4618,14 +4650,14 @@ function ma(t) {
|
|
|
4618
4650
|
function s(l) {
|
|
4619
4651
|
r.save(l), r.namespaces = l, r.names = [], r.skips = [];
|
|
4620
4652
|
let w;
|
|
4621
|
-
const E = (typeof l == "string" ? l : "").split(/[\s,]+/),
|
|
4622
|
-
for (w = 0; w <
|
|
4653
|
+
const E = (typeof l == "string" ? l : "").split(/[\s,]+/), F = E.length;
|
|
4654
|
+
for (w = 0; w < F; w++)
|
|
4623
4655
|
E[w] && (l = E[w].replace(/\*/g, ".*?"), l[0] === "-" ? r.skips.push(new RegExp("^" + l.slice(1) + "$")) : r.names.push(new RegExp("^" + l + "$")));
|
|
4624
4656
|
}
|
|
4625
|
-
function
|
|
4657
|
+
function a() {
|
|
4626
4658
|
const l = [
|
|
4627
|
-
...r.names.map(
|
|
4628
|
-
...r.skips.map(
|
|
4659
|
+
...r.names.map(d),
|
|
4660
|
+
...r.skips.map(d).map((w) => "-" + w)
|
|
4629
4661
|
].join(",");
|
|
4630
4662
|
return r.enable(""), l;
|
|
4631
4663
|
}
|
|
@@ -4641,7 +4673,7 @@ function ma(t) {
|
|
|
4641
4673
|
return !0;
|
|
4642
4674
|
return !1;
|
|
4643
4675
|
}
|
|
4644
|
-
function
|
|
4676
|
+
function d(l) {
|
|
4645
4677
|
return l.toString().substring(2, l.toString().length - 2).replace(/\.\*\?$/, "*");
|
|
4646
4678
|
}
|
|
4647
4679
|
function p(l) {
|
|
@@ -4652,9 +4684,9 @@ function ma(t) {
|
|
|
4652
4684
|
}
|
|
4653
4685
|
return r.enable(r.load()), r;
|
|
4654
4686
|
}
|
|
4655
|
-
var
|
|
4687
|
+
var Sa = va;
|
|
4656
4688
|
(function(t, e) {
|
|
4657
|
-
e.formatArgs = i, e.save = s, e.load =
|
|
4689
|
+
e.formatArgs = i, e.save = s, e.load = a, e.useColors = r, e.storage = c(), e.destroy = /* @__PURE__ */ (() => {
|
|
4658
4690
|
let p = !1;
|
|
4659
4691
|
return () => {
|
|
4660
4692
|
p || (p = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
@@ -4762,13 +4794,13 @@ var wa = ma;
|
|
|
4762
4794
|
} catch {
|
|
4763
4795
|
}
|
|
4764
4796
|
}
|
|
4765
|
-
function
|
|
4797
|
+
function a() {
|
|
4766
4798
|
let p;
|
|
4767
4799
|
try {
|
|
4768
4800
|
p = e.storage.getItem("debug");
|
|
4769
4801
|
} catch {
|
|
4770
4802
|
}
|
|
4771
|
-
return !p && typeof
|
|
4803
|
+
return !p && typeof P < "u" && "env" in P && (p = P.env.DEBUG), p;
|
|
4772
4804
|
}
|
|
4773
4805
|
function c() {
|
|
4774
4806
|
try {
|
|
@@ -4776,38 +4808,38 @@ var wa = ma;
|
|
|
4776
4808
|
} catch {
|
|
4777
4809
|
}
|
|
4778
4810
|
}
|
|
4779
|
-
t.exports =
|
|
4780
|
-
const { formatters:
|
|
4781
|
-
|
|
4811
|
+
t.exports = Sa(e);
|
|
4812
|
+
const { formatters: d } = t.exports;
|
|
4813
|
+
d.j = function(p) {
|
|
4782
4814
|
try {
|
|
4783
4815
|
return JSON.stringify(p);
|
|
4784
4816
|
} catch (m) {
|
|
4785
4817
|
return "[UnexpectedJSONParseError]: " + m.message;
|
|
4786
4818
|
}
|
|
4787
4819
|
};
|
|
4788
|
-
})(
|
|
4789
|
-
var Zn =
|
|
4790
|
-
const
|
|
4791
|
-
function
|
|
4792
|
-
return t[
|
|
4820
|
+
})(hr, hr.exports);
|
|
4821
|
+
var Zn = hr.exports;
|
|
4822
|
+
const Aa = On, Ea = Rn.EventEmitter, Ia = $t.inherits, Z = Zn("avvio"), { AVV_ERR_READY_TIMEOUT: Fa } = Xn, Zt = Symbol.for("plugin-meta");
|
|
4823
|
+
function Oa(t, e) {
|
|
4824
|
+
return t[Zt] && t[Zt].name ? t[Zt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4793
4825
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4794
4826
|
}
|
|
4795
|
-
function
|
|
4827
|
+
function Ta() {
|
|
4796
4828
|
const t = {};
|
|
4797
4829
|
return t.promise = new Promise((e, r) => {
|
|
4798
4830
|
t.resolve = e, t.reject = r;
|
|
4799
4831
|
}), t;
|
|
4800
4832
|
}
|
|
4801
4833
|
function ut(t, e, r, i, s) {
|
|
4802
|
-
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 =
|
|
4834
|
+
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 = Oa(e, r), this.isAfter = i, this.q = Aa(t, _a, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4803
4835
|
}
|
|
4804
|
-
|
|
4836
|
+
Ia(ut, Ea);
|
|
4805
4837
|
ut.prototype.exec = function(t, e) {
|
|
4806
4838
|
const r = this.func;
|
|
4807
4839
|
let i = !1;
|
|
4808
4840
|
const s = this.name;
|
|
4809
4841
|
if (this.parent._error && !this.isAfter) {
|
|
4810
|
-
Z("skipping loading of plugin as parent errored and it is not an after", s),
|
|
4842
|
+
Z("skipping loading of plugin as parent errored and it is not an after", s), P.nextTick(e);
|
|
4811
4843
|
return;
|
|
4812
4844
|
}
|
|
4813
4845
|
if (this.isAfter)
|
|
@@ -4819,23 +4851,23 @@ ut.prototype.exec = function(t, e) {
|
|
|
4819
4851
|
return Z("override errored", s), e(p);
|
|
4820
4852
|
}
|
|
4821
4853
|
this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, Z("exec", s);
|
|
4822
|
-
let
|
|
4854
|
+
let a;
|
|
4823
4855
|
const c = (p) => {
|
|
4824
4856
|
if (i) {
|
|
4825
4857
|
Z("loading complete", s);
|
|
4826
4858
|
return;
|
|
4827
4859
|
}
|
|
4828
|
-
this._error = p, Z(p ? "exec errored" : "exec completed", s), i = !0,
|
|
4860
|
+
this._error = p, Z(p ? "exec errored" : "exec completed", s), i = !0, a && clearTimeout(a), e(p);
|
|
4829
4861
|
};
|
|
4830
|
-
this.timeout > 0 && (Z("setting up timeout", s, this.timeout),
|
|
4831
|
-
Z("timed out", s),
|
|
4832
|
-
const p = new
|
|
4862
|
+
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), a = setTimeout(function() {
|
|
4863
|
+
Z("timed out", s), a = null;
|
|
4864
|
+
const p = new Fa(s);
|
|
4833
4865
|
p.fn = r, c(p);
|
|
4834
4866
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4835
|
-
const
|
|
4836
|
-
|
|
4837
|
-
() =>
|
|
4838
|
-
(p) =>
|
|
4867
|
+
const d = r(this.server, this.opts, c);
|
|
4868
|
+
d && typeof d.then == "function" && (Z("exec: resolving promise", s), d.then(
|
|
4869
|
+
() => P.nextTick(c),
|
|
4870
|
+
(p) => P.nextTick(c, p)
|
|
4839
4871
|
));
|
|
4840
4872
|
};
|
|
4841
4873
|
ut.prototype.loadedSoFar = function() {
|
|
@@ -4843,11 +4875,11 @@ ut.prototype.loadedSoFar = function() {
|
|
|
4843
4875
|
return Promise.resolve();
|
|
4844
4876
|
const t = () => {
|
|
4845
4877
|
this.server.after((r, i) => {
|
|
4846
|
-
this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4878
|
+
this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null, P.nextTick(i, r);
|
|
4847
4879
|
}), this.q.resume();
|
|
4848
4880
|
};
|
|
4849
4881
|
let e;
|
|
4850
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4882
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Ta(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4851
4883
|
};
|
|
4852
4884
|
ut.prototype.enqueue = function(t, e) {
|
|
4853
4885
|
Z("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4872,14 +4904,14 @@ ut.prototype.finish = function(t, e) {
|
|
|
4872
4904
|
r();
|
|
4873
4905
|
else
|
|
4874
4906
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4875
|
-
Z("drain", this.name), this.q.drain =
|
|
4907
|
+
Z("drain", this.name), this.q.drain = Ca, queueMicrotask(i);
|
|
4876
4908
|
};
|
|
4877
4909
|
};
|
|
4878
4910
|
queueMicrotask(i), this.q.resume();
|
|
4879
4911
|
};
|
|
4880
4912
|
function _a(t, e) {
|
|
4881
4913
|
const r = this;
|
|
4882
|
-
|
|
4914
|
+
P.nextTick(Cr.bind(r), t, e);
|
|
4883
4915
|
}
|
|
4884
4916
|
function Cr(t, e) {
|
|
4885
4917
|
if (typeof t.func.then == "function") {
|
|
@@ -4895,59 +4927,59 @@ function Cr(t, e) {
|
|
|
4895
4927
|
});
|
|
4896
4928
|
});
|
|
4897
4929
|
}
|
|
4898
|
-
function
|
|
4930
|
+
function Ca() {
|
|
4899
4931
|
}
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
var
|
|
4903
|
-
const un =
|
|
4904
|
-
AVV_ERR_EXPOSE_ALREADY_DEFINED:
|
|
4932
|
+
_r.exports = ut;
|
|
4933
|
+
_r.exports.loadPlugin = Cr;
|
|
4934
|
+
var xa = _r.exports;
|
|
4935
|
+
const un = On, ka = Rn.EventEmitter, Ba = $t.inherits, {
|
|
4936
|
+
AVV_ERR_EXPOSE_ALREADY_DEFINED: er,
|
|
4905
4937
|
AVV_ERR_CALLBACK_NOT_FN: pt,
|
|
4906
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4907
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4908
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4909
|
-
} = Xn,
|
|
4910
|
-
function
|
|
4911
|
-
const i = e.expose || {}, s = i.use || "use",
|
|
4938
|
+
AVV_ERR_PLUGIN_NOT_VALID: La,
|
|
4939
|
+
AVV_ERR_ROOT_PLG_BOOTED: Pa,
|
|
4940
|
+
AVV_ERR_READY_TIMEOUT: Ra
|
|
4941
|
+
} = Xn, Na = wa, pr = xa, st = Zn("avvio"), xt = Symbol("kAvvio"), tr = Symbol("kThenifyDoNotWrap");
|
|
4942
|
+
function Da(t, e, r) {
|
|
4943
|
+
const i = e.expose || {}, s = i.use || "use", a = i.after || "after", c = i.ready || "ready", d = i.onClose || "onClose", p = i.close || "close";
|
|
4912
4944
|
if (t[s])
|
|
4913
|
-
throw new
|
|
4914
|
-
if (t[
|
|
4915
|
-
throw new
|
|
4945
|
+
throw new er(s);
|
|
4946
|
+
if (t[a])
|
|
4947
|
+
throw new er(a);
|
|
4916
4948
|
if (t[c])
|
|
4917
|
-
throw new
|
|
4949
|
+
throw new er(c);
|
|
4918
4950
|
t[s] = function(m, l) {
|
|
4919
4951
|
return r.use(m, l), this;
|
|
4920
|
-
}, Object.defineProperty(t, "then", { get: ei.bind(r) }), t[xt] = !0, t[
|
|
4921
|
-
return typeof m != "function" ? r._loadRegistered() : (r.after(
|
|
4952
|
+
}, Object.defineProperty(t, "then", { get: ei.bind(r) }), t[xt] = !0, t[a] = function(m) {
|
|
4953
|
+
return typeof m != "function" ? r._loadRegistered() : (r.after(rr(m, this)), this);
|
|
4922
4954
|
}, t[c] = function(m) {
|
|
4923
4955
|
if (m && typeof m != "function")
|
|
4924
4956
|
throw new pt(c, typeof m);
|
|
4925
|
-
return r.ready(m ?
|
|
4926
|
-
}, t[
|
|
4957
|
+
return r.ready(m ? rr(m, this) : void 0);
|
|
4958
|
+
}, t[d] = function(m) {
|
|
4927
4959
|
if (typeof m != "function")
|
|
4928
|
-
throw new pt(
|
|
4929
|
-
return r.onClose(
|
|
4960
|
+
throw new pt(d, typeof m);
|
|
4961
|
+
return r.onClose(Va(m, this)), this;
|
|
4930
4962
|
}, t[p] = function(m) {
|
|
4931
4963
|
if (m && typeof m != "function")
|
|
4932
4964
|
throw new pt(p, typeof m);
|
|
4933
|
-
return m ? (r.close(
|
|
4965
|
+
return m ? (r.close(rr(m, this)), this) : r.close();
|
|
4934
4966
|
};
|
|
4935
4967
|
}
|
|
4936
4968
|
function te(t, e, r) {
|
|
4937
4969
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof te)) {
|
|
4938
4970
|
const i = new te(t, e, r);
|
|
4939
|
-
return t &&
|
|
4971
|
+
return t && Da(t, e, i), i;
|
|
4940
4972
|
}
|
|
4941
|
-
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
|
|
4973
|
+
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 Na(), this._readyQ = un(this, ti, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4942
4974
|
this.emit("start"), this._readyQ.drain = cn;
|
|
4943
|
-
}, this._closeQ = un(this,
|
|
4975
|
+
}, this._closeQ = un(this, Ma, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4944
4976
|
this.emit("close"), this._closeQ.drain = cn;
|
|
4945
|
-
}, this._doStart = null, this._root = new
|
|
4946
|
-
const c = this.pluginTree.start(null, s,
|
|
4947
|
-
this._root.once("loaded", (
|
|
4977
|
+
}, this._doStart = null, this._root = new pr(this, $a.bind(this), e, !1, 0), this._root.once("start", (i, s, a) => {
|
|
4978
|
+
const c = this.pluginTree.start(null, s, a);
|
|
4979
|
+
this._root.once("loaded", (d, p, m) => {
|
|
4948
4980
|
this.pluginTree.stop(c, m);
|
|
4949
4981
|
});
|
|
4950
|
-
}),
|
|
4982
|
+
}), pr.loadPlugin.call(this, this._root, (i) => {
|
|
4951
4983
|
st("root plugin ready");
|
|
4952
4984
|
try {
|
|
4953
4985
|
this.emit("preReady"), this._root = null;
|
|
@@ -4962,19 +4994,19 @@ function te(t, e, r) {
|
|
|
4962
4994
|
this._readyQ.resume();
|
|
4963
4995
|
});
|
|
4964
4996
|
}
|
|
4965
|
-
function
|
|
4997
|
+
function $a(t, e, r) {
|
|
4966
4998
|
this._doStart = r, e.autostart && this.start();
|
|
4967
4999
|
}
|
|
4968
|
-
|
|
5000
|
+
Ba(te, ka);
|
|
4969
5001
|
te.prototype.start = function() {
|
|
4970
|
-
return this.started = !0,
|
|
5002
|
+
return this.started = !0, P.nextTick(this._doStart), this;
|
|
4971
5003
|
};
|
|
4972
5004
|
te.prototype.override = function(t, e, r) {
|
|
4973
5005
|
return t;
|
|
4974
5006
|
};
|
|
4975
|
-
function
|
|
5007
|
+
function Ua(t) {
|
|
4976
5008
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4977
|
-
throw new
|
|
5009
|
+
throw new La(typeof t);
|
|
4978
5010
|
return t;
|
|
4979
5011
|
}
|
|
4980
5012
|
te.prototype[xt] = !0;
|
|
@@ -4983,22 +5015,22 @@ te.prototype.use = function(t, e) {
|
|
|
4983
5015
|
};
|
|
4984
5016
|
te.prototype._loadRegistered = function() {
|
|
4985
5017
|
const t = this._current[0];
|
|
4986
|
-
return !this.started && !this.booted &&
|
|
5018
|
+
return !this.started && !this.booted && P.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4987
5019
|
};
|
|
4988
5020
|
Object.defineProperty(te.prototype, "then", { get: ei });
|
|
4989
5021
|
te.prototype._addPlugin = function(t, e, r) {
|
|
4990
|
-
if (t =
|
|
4991
|
-
throw new
|
|
4992
|
-
const i = this._current[0], s = new
|
|
4993
|
-
if (s.once("start", (
|
|
4994
|
-
const p = this.pluginTree.start(i.name, c,
|
|
5022
|
+
if (t = Ua(t), e = e || {}, this.booted)
|
|
5023
|
+
throw new Pa();
|
|
5024
|
+
const i = this._current[0], s = new pr(this, t, e, r);
|
|
5025
|
+
if (s.once("start", (a, c, d) => {
|
|
5026
|
+
const p = this.pluginTree.start(i.name, c, d);
|
|
4995
5027
|
s.once("loaded", (m, l, w) => {
|
|
4996
5028
|
this.pluginTree.stop(p, w);
|
|
4997
5029
|
});
|
|
4998
5030
|
}), i.loaded)
|
|
4999
5031
|
throw new Error(s.name, i.name);
|
|
5000
|
-
return i.enqueue(s, (
|
|
5001
|
-
|
|
5032
|
+
return i.enqueue(s, (a) => {
|
|
5033
|
+
a && (this._error = a);
|
|
5002
5034
|
}), s;
|
|
5003
5035
|
};
|
|
5004
5036
|
te.prototype.after = function(t) {
|
|
@@ -5033,7 +5065,7 @@ te.prototype.close = function(t) {
|
|
|
5033
5065
|
};
|
|
5034
5066
|
});
|
|
5035
5067
|
return this.ready(() => {
|
|
5036
|
-
this._error = null, this._closeQ.push(t),
|
|
5068
|
+
this._error = null, this._closeQ.push(t), P.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
5037
5069
|
}), e;
|
|
5038
5070
|
};
|
|
5039
5071
|
te.prototype.ready = function(t) {
|
|
@@ -5046,8 +5078,8 @@ te.prototype.ready = function(t) {
|
|
|
5046
5078
|
return new Promise((e, r) => {
|
|
5047
5079
|
this._readyQ.push(s), this.start();
|
|
5048
5080
|
const i = this._current[0].server;
|
|
5049
|
-
function s(
|
|
5050
|
-
|
|
5081
|
+
function s(a, c, d) {
|
|
5082
|
+
a ? r(a) : e(i), P.nextTick(d);
|
|
5051
5083
|
}
|
|
5052
5084
|
});
|
|
5053
5085
|
};
|
|
@@ -5064,71 +5096,71 @@ function ei() {
|
|
|
5064
5096
|
st("thenify returning null because we are already booted");
|
|
5065
5097
|
return;
|
|
5066
5098
|
}
|
|
5067
|
-
if (this[
|
|
5068
|
-
this[
|
|
5099
|
+
if (this[tr]) {
|
|
5100
|
+
this[tr] = !1;
|
|
5069
5101
|
return;
|
|
5070
5102
|
}
|
|
5071
|
-
return st("thenify"), (t, e) => this._loadRegistered().then(() => (this[
|
|
5103
|
+
return st("thenify"), (t, e) => this._loadRegistered().then(() => (this[tr] = !0, t(this._server)), e);
|
|
5072
5104
|
}
|
|
5073
5105
|
function ti(t, e) {
|
|
5074
5106
|
const r = this._server, i = this._error;
|
|
5075
5107
|
let s;
|
|
5076
5108
|
if (this._error = null, t.length === 0)
|
|
5077
|
-
this._error = i, s = t(), s && !s[xt] && typeof s.then == "function" ? s.then(() =>
|
|
5109
|
+
this._error = i, s = t(), s && !s[xt] && typeof s.then == "function" ? s.then(() => P.nextTick(e), (a) => P.nextTick(e, a)) : P.nextTick(e);
|
|
5078
5110
|
else if (t.length === 1)
|
|
5079
|
-
s = t(i), s && !s[xt] && typeof s.then == "function" ? s.then(() =>
|
|
5111
|
+
s = t(i), s && !s[xt] && typeof s.then == "function" ? s.then(() => P.nextTick(e), (a) => P.nextTick(e, a)) : P.nextTick(e);
|
|
5080
5112
|
else if (this._timeout === 0) {
|
|
5081
|
-
const
|
|
5113
|
+
const a = (c) => {
|
|
5082
5114
|
this._error = c, e(this._error);
|
|
5083
5115
|
};
|
|
5084
|
-
t.length === 2 ? t(i,
|
|
5116
|
+
t.length === 2 ? t(i, a) : t(i, r, a);
|
|
5085
5117
|
} else
|
|
5086
|
-
|
|
5118
|
+
ja.call(this, t, i, r, e);
|
|
5087
5119
|
}
|
|
5088
|
-
function
|
|
5120
|
+
function ja(t, e, r, i) {
|
|
5089
5121
|
const s = t.name;
|
|
5090
5122
|
st("setting up ready timeout", s, this._timeout);
|
|
5091
|
-
let
|
|
5092
|
-
st("timed out", s),
|
|
5093
|
-
const
|
|
5094
|
-
|
|
5123
|
+
let a = setTimeout(() => {
|
|
5124
|
+
st("timed out", s), a = null;
|
|
5125
|
+
const d = new Ra(s);
|
|
5126
|
+
d.fn = t, this._error = d, i(d);
|
|
5095
5127
|
}, this._timeout);
|
|
5096
5128
|
t.length === 2 ? t(e, c.bind(this)) : t(e, r, c.bind(this));
|
|
5097
|
-
function c(
|
|
5098
|
-
|
|
5129
|
+
function c(d) {
|
|
5130
|
+
a && (clearTimeout(a), this._error = d, i(this._error));
|
|
5099
5131
|
}
|
|
5100
5132
|
}
|
|
5101
|
-
function
|
|
5133
|
+
function Ma(t, e) {
|
|
5102
5134
|
const r = this._server, i = t[this._isOnCloseHandlerKey];
|
|
5103
5135
|
if (t.length === 0 || t.length === 1) {
|
|
5104
5136
|
let s;
|
|
5105
5137
|
i ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (st("resolving close/onClose promise"), s.then(
|
|
5106
|
-
() =>
|
|
5107
|
-
(
|
|
5108
|
-
)) :
|
|
5138
|
+
() => P.nextTick(e),
|
|
5139
|
+
(a) => P.nextTick(e, a)
|
|
5140
|
+
)) : P.nextTick(e);
|
|
5109
5141
|
} else
|
|
5110
5142
|
t.length === 2 ? t(i ? r : this._error, e) : i ? t(r, e) : t(this._error, r, e);
|
|
5111
5143
|
}
|
|
5112
|
-
function
|
|
5144
|
+
function Va(t, e) {
|
|
5113
5145
|
return r.bind(e);
|
|
5114
5146
|
function r(i, s) {
|
|
5115
|
-
let
|
|
5116
|
-
t.length === 0 ? (
|
|
5117
|
-
|
|
5118
|
-
}, s) :
|
|
5119
|
-
|
|
5120
|
-
}, s) :
|
|
5147
|
+
let a;
|
|
5148
|
+
t.length === 0 ? (a = t(), a && a.then ? a.then(function() {
|
|
5149
|
+
P.nextTick(s);
|
|
5150
|
+
}, s) : P.nextTick(s)) : t.length === 1 ? (a = t(this), a && a.then ? a.then(function() {
|
|
5151
|
+
P.nextTick(s);
|
|
5152
|
+
}, s) : P.nextTick(s)) : t(this, s);
|
|
5121
5153
|
}
|
|
5122
5154
|
}
|
|
5123
|
-
function
|
|
5155
|
+
function rr(t, e) {
|
|
5124
5156
|
return r.bind(e);
|
|
5125
5157
|
function r(i, s) {
|
|
5126
|
-
let
|
|
5127
|
-
t ? t.length === 0 ? (
|
|
5128
|
-
|
|
5129
|
-
}, s) :
|
|
5130
|
-
|
|
5131
|
-
}, s) :
|
|
5158
|
+
let a;
|
|
5159
|
+
t ? t.length === 0 ? (a = t(), a && a.then ? a.then(function() {
|
|
5160
|
+
P.nextTick(s, i);
|
|
5161
|
+
}, s) : P.nextTick(s, i)) : t.length === 1 ? (a = t(i), a && a.then ? a.then(function() {
|
|
5162
|
+
P.nextTick(s);
|
|
5163
|
+
}, s) : P.nextTick(s)) : t.length === 2 ? t(i, s) : t(i, this, s) : P.nextTick(s);
|
|
5132
5164
|
}
|
|
5133
5165
|
}
|
|
5134
5166
|
br.exports = te;
|
|
@@ -5139,8 +5171,8 @@ br.exports.express = function(t) {
|
|
|
5139
5171
|
}
|
|
5140
5172
|
});
|
|
5141
5173
|
};
|
|
5142
|
-
var
|
|
5143
|
-
const
|
|
5174
|
+
var qa = br.exports;
|
|
5175
|
+
const Qa = /* @__PURE__ */ uo(qa);
|
|
5144
5176
|
(function() {
|
|
5145
5177
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5146
5178
|
return;
|
|
@@ -5151,23 +5183,23 @@ const Ma = /* @__PURE__ */ oo(ja);
|
|
|
5151
5183
|
let e = 0;
|
|
5152
5184
|
const r = !!(window.performance && window.performance.now);
|
|
5153
5185
|
window.requestAnimationFrame = function(i) {
|
|
5154
|
-
const s = r ? window.performance.now() : (/* @__PURE__ */ new Date()).getTime(),
|
|
5155
|
-
i(s +
|
|
5156
|
-
},
|
|
5157
|
-
return e = s +
|
|
5186
|
+
const s = r ? window.performance.now() : (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (s - e)), c = window.setTimeout(function() {
|
|
5187
|
+
i(s + a);
|
|
5188
|
+
}, a);
|
|
5189
|
+
return e = s + a, c;
|
|
5158
5190
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5159
5191
|
}
|
|
5160
5192
|
})();
|
|
5161
|
-
function
|
|
5162
|
-
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443",
|
|
5163
|
-
return
|
|
5193
|
+
function fu(t, e = !0, r = !0, i) {
|
|
5194
|
+
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", a = Qa(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5195
|
+
return a.use(Gi), a.use(ji), a.use(Qi), a.use(xi, { sdkKey: t, host: s, version: i?.version }), a.use(qi), a.use(Vi), a.use(Po), a.use(bo), r && a.after(async (c, d, p) => {
|
|
5164
5196
|
if (c)
|
|
5165
5197
|
throw c;
|
|
5166
|
-
await
|
|
5167
|
-
}),
|
|
5198
|
+
await d.sdk.initializeApp(), p();
|
|
5199
|
+
}), a.onClose(() => {
|
|
5168
5200
|
console.log("close");
|
|
5169
|
-
}),
|
|
5201
|
+
}), a;
|
|
5170
5202
|
}
|
|
5171
5203
|
export {
|
|
5172
|
-
|
|
5204
|
+
fu as StreamLayer
|
|
5173
5205
|
};
|