@streamlayer/sdk-web 0.32.1 → 0.32.2
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 +6 -6
- package/lib/es/index.js +586 -571
- package/lib/index.d.ts +3 -0
- package/package.json +6 -6
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { QuestionType as fe, QuestionStatus as dt, SilenceSetting as
|
|
1
|
+
import { QuestionType as fe, QuestionStatus as dt, SilenceSetting as ai } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as Oe } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
|
-
import { computed as
|
|
4
|
+
import { computed as dn, map as ui, atom as Bt, onMount as hn } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
|
-
import { nanoid as
|
|
8
|
-
import { ConnectError as
|
|
7
|
+
import { nanoid as ci } from "nanoid";
|
|
8
|
+
import { ConnectError as Br, Code as Pr, createPromiseClient as Rr } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as Dr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Nr } from "@nanostores/query";
|
|
11
|
-
import { Events as
|
|
11
|
+
import { Events as li } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as yt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as gr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
-
import { pino as
|
|
14
|
+
import { pino as fi } from "pino";
|
|
15
15
|
import { Feed as Ce } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
16
|
-
import { Leaderboard as
|
|
16
|
+
import { Leaderboard as pn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
17
17
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
18
|
-
import { LinksClient as
|
|
19
|
-
function
|
|
18
|
+
import { LinksClient as di } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
19
|
+
function hi(t) {
|
|
20
20
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var yn = { exports: {} }, Y = yn.exports = {}, ye, ge;
|
|
23
23
|
function ir() {
|
|
24
24
|
throw new Error("setTimeout has not been defined");
|
|
25
25
|
}
|
|
@@ -38,7 +38,7 @@ function or() {
|
|
|
38
38
|
ge = or;
|
|
39
39
|
}
|
|
40
40
|
})();
|
|
41
|
-
function
|
|
41
|
+
function gn(t) {
|
|
42
42
|
if (ye === setTimeout)
|
|
43
43
|
return setTimeout(t, 0);
|
|
44
44
|
if ((ye === ir || !ye) && setTimeout)
|
|
@@ -53,7 +53,7 @@ function pn(t) {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function pi(t) {
|
|
57
57
|
if (ge === clearTimeout)
|
|
58
58
|
return clearTimeout(t);
|
|
59
59
|
if ((ge === or || !ge) && clearTimeout)
|
|
@@ -69,19 +69,19 @@ function di(t) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
var _e = [], et = !1, je, St = -1;
|
|
72
|
-
function
|
|
73
|
-
!et || !je || (et = !1, je.length ? _e = je.concat(_e) : St = -1, _e.length &&
|
|
72
|
+
function yi() {
|
|
73
|
+
!et || !je || (et = !1, je.length ? _e = je.concat(_e) : St = -1, _e.length && mn());
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function mn() {
|
|
76
76
|
if (!et) {
|
|
77
|
-
var t =
|
|
77
|
+
var t = gn(yi);
|
|
78
78
|
et = !0;
|
|
79
79
|
for (var e = _e.length; e; ) {
|
|
80
80
|
for (je = _e, _e = []; ++St < e; )
|
|
81
81
|
je && je[St].run();
|
|
82
82
|
St = -1, e = _e.length;
|
|
83
83
|
}
|
|
84
|
-
je = null, et = !1,
|
|
84
|
+
je = null, et = !1, pi(t);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
Y.nextTick = function(t) {
|
|
@@ -89,12 +89,12 @@ Y.nextTick = function(t) {
|
|
|
89
89
|
if (arguments.length > 1)
|
|
90
90
|
for (var r = 1; r < arguments.length; r++)
|
|
91
91
|
e[r - 1] = arguments[r];
|
|
92
|
-
_e.push(new
|
|
92
|
+
_e.push(new wn(t, e)), _e.length === 1 && !et && gn(mn);
|
|
93
93
|
};
|
|
94
|
-
function
|
|
94
|
+
function wn(t, e) {
|
|
95
95
|
this.fun = t, this.array = e;
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
wn.prototype.run = function() {
|
|
98
98
|
this.fun.apply(null, this.array);
|
|
99
99
|
};
|
|
100
100
|
Y.title = "browser";
|
|
@@ -103,17 +103,17 @@ Y.env = {};
|
|
|
103
103
|
Y.argv = [];
|
|
104
104
|
Y.version = "";
|
|
105
105
|
Y.versions = {};
|
|
106
|
-
function
|
|
106
|
+
function ke() {
|
|
107
107
|
}
|
|
108
|
-
Y.on =
|
|
109
|
-
Y.addListener =
|
|
110
|
-
Y.once =
|
|
111
|
-
Y.off =
|
|
112
|
-
Y.removeListener =
|
|
113
|
-
Y.removeAllListeners =
|
|
114
|
-
Y.emit =
|
|
115
|
-
Y.prependListener =
|
|
116
|
-
Y.prependOnceListener =
|
|
108
|
+
Y.on = ke;
|
|
109
|
+
Y.addListener = ke;
|
|
110
|
+
Y.once = ke;
|
|
111
|
+
Y.off = ke;
|
|
112
|
+
Y.removeListener = ke;
|
|
113
|
+
Y.removeAllListeners = ke;
|
|
114
|
+
Y.emit = ke;
|
|
115
|
+
Y.prependListener = ke;
|
|
116
|
+
Y.prependOnceListener = ke;
|
|
117
117
|
Y.listeners = function(t) {
|
|
118
118
|
return [];
|
|
119
119
|
};
|
|
@@ -129,9 +129,9 @@ Y.chdir = function(t) {
|
|
|
129
129
|
Y.umask = function() {
|
|
130
130
|
return 0;
|
|
131
131
|
};
|
|
132
|
-
var
|
|
133
|
-
const P = /* @__PURE__ */
|
|
134
|
-
class
|
|
132
|
+
var gi = yn.exports;
|
|
133
|
+
const P = /* @__PURE__ */ hi(gi);
|
|
134
|
+
class mi {
|
|
135
135
|
}
|
|
136
136
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
137
137
|
class Pt {
|
|
@@ -150,9 +150,9 @@ class Pt {
|
|
|
150
150
|
return this.store;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const wi = (t) => {
|
|
154
154
|
const e = Object.keys(t);
|
|
155
|
-
return
|
|
155
|
+
return dn(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((i, s) => [i, r[s]])));
|
|
156
156
|
};
|
|
157
157
|
class tt extends Pt {
|
|
158
158
|
getValues = () => this.getStore().get();
|
|
@@ -161,12 +161,12 @@ class tt extends Pt {
|
|
|
161
161
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
162
162
|
unsubscribe = () => this.getStore().off();
|
|
163
163
|
}
|
|
164
|
-
const Te = (t) =>
|
|
164
|
+
const Te = (t) => ui(t);
|
|
165
165
|
var Ie;
|
|
166
166
|
(function(t) {
|
|
167
167
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
168
168
|
})(Ie || (Ie = {}));
|
|
169
|
-
const
|
|
169
|
+
const bi = {
|
|
170
170
|
[Oe.BETTING]: "betting",
|
|
171
171
|
[Oe.GAMES]: "games",
|
|
172
172
|
[Oe.PUBLIC_CHAT]: "publicChat",
|
|
@@ -176,7 +176,7 @@ var rt;
|
|
|
176
176
|
(function(t) {
|
|
177
177
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
178
178
|
})(rt || (rt = {}));
|
|
179
|
-
class
|
|
179
|
+
class bn {
|
|
180
180
|
status;
|
|
181
181
|
source;
|
|
182
182
|
config;
|
|
@@ -184,7 +184,7 @@ class mn {
|
|
|
184
184
|
listeners = /* @__PURE__ */ new Set();
|
|
185
185
|
settingsKey;
|
|
186
186
|
constructor({ settings: e, ...r }, i) {
|
|
187
|
-
this.settingsKey =
|
|
187
|
+
this.settingsKey = bi[r.type], this.status = Bt(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;
|
|
188
188
|
}
|
|
189
189
|
get featureConfig() {
|
|
190
190
|
return this.config.getStore();
|
|
@@ -241,11 +241,11 @@ class se extends Pt {
|
|
|
241
241
|
return this.getStore().get();
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
const re = (t) =>
|
|
244
|
+
const re = (t) => Bt(t);
|
|
245
245
|
class de extends Pt {
|
|
246
246
|
atomStore;
|
|
247
247
|
constructor(e, r, i) {
|
|
248
|
-
super(e, `api:${r}`), this.atomStore =
|
|
248
|
+
super(e, `api:${r}`), this.atomStore = Bt(), i && e.subscribe((s) => {
|
|
249
249
|
const a = this.atomStore.get(), c = i(s, a);
|
|
250
250
|
a !== c && this.atomStore.set(c);
|
|
251
251
|
});
|
|
@@ -273,7 +273,7 @@ class de extends Pt {
|
|
|
273
273
|
key = () => this.getStore().key;
|
|
274
274
|
off = () => this.getStore().off();
|
|
275
275
|
}
|
|
276
|
-
async function*
|
|
276
|
+
async function* vi(t, e) {
|
|
277
277
|
for await (const r of e) {
|
|
278
278
|
t.response.message = r, t.received_at = Date.now();
|
|
279
279
|
const i = {
|
|
@@ -283,7 +283,7 @@ async function* wi(t, e) {
|
|
|
283
283
|
window.postMessage(i), yield r;
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const Si = () => (t) => async (e) => {
|
|
287
287
|
const r = {
|
|
288
288
|
name: e.url,
|
|
289
289
|
stream: e.stream,
|
|
@@ -307,7 +307,7 @@ const bi = () => (t) => async (e) => {
|
|
|
307
307
|
};
|
|
308
308
|
return window.postMessage(s), {
|
|
309
309
|
...i,
|
|
310
|
-
message:
|
|
310
|
+
message: vi(r, i.message)
|
|
311
311
|
};
|
|
312
312
|
} else {
|
|
313
313
|
r.request.message = e.message, r.response.message = i.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -335,7 +335,7 @@ var le;
|
|
|
335
335
|
(function(t) {
|
|
336
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";
|
|
337
337
|
})(le || (le = {}));
|
|
338
|
-
class
|
|
338
|
+
class Ai {
|
|
339
339
|
params;
|
|
340
340
|
streamCancel;
|
|
341
341
|
method;
|
|
@@ -388,7 +388,7 @@ class vi {
|
|
|
388
388
|
for await (const a of s)
|
|
389
389
|
this.attempt = 0, this.onData(a);
|
|
390
390
|
} catch (i) {
|
|
391
|
-
i instanceof
|
|
391
|
+
i instanceof Br && i.code != Pr.Canceled && this.onStreamError(i);
|
|
392
392
|
}
|
|
393
393
|
})(), this.updateState(le.Connected);
|
|
394
394
|
};
|
|
@@ -428,7 +428,7 @@ class vi {
|
|
|
428
428
|
*/
|
|
429
429
|
onStreamError = (e) => {
|
|
430
430
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
431
|
-
if (e instanceof
|
|
431
|
+
if (e instanceof Br && e.code !== Pr.Canceled) {
|
|
432
432
|
this.updateState(le.Failed), this.state.setValue("error", e), this.reconnect();
|
|
433
433
|
return;
|
|
434
434
|
}
|
|
@@ -436,14 +436,14 @@ class vi {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
const
|
|
439
|
+
const Ei = () => {
|
|
440
440
|
const t = localStorage.getItem("sl-device-id");
|
|
441
441
|
if (t)
|
|
442
442
|
return t;
|
|
443
|
-
const e =
|
|
443
|
+
const e = ci();
|
|
444
444
|
return localStorage.setItem("sl-device-id", e), e;
|
|
445
445
|
};
|
|
446
|
-
class
|
|
446
|
+
class Ii {
|
|
447
447
|
toJsonOptions = {
|
|
448
448
|
emitDefaultValues: !1,
|
|
449
449
|
enumAsInteger: !0,
|
|
@@ -462,7 +462,7 @@ class Ai {
|
|
|
462
462
|
subscriptions;
|
|
463
463
|
constructor(e) {
|
|
464
464
|
this.host = e, this.$headers = new tt(Te({
|
|
465
|
-
"sl-device-id":
|
|
465
|
+
"sl-device-id": Ei()
|
|
466
466
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
467
467
|
const [r, i, s] = Nr();
|
|
468
468
|
this.nanoquery = { createFetcherStore: r, createMutatorStore: i, utils: s }, this.transport = Dr({
|
|
@@ -483,7 +483,7 @@ class Ai {
|
|
|
483
483
|
const s = this.subscriptions.get(r);
|
|
484
484
|
if (s)
|
|
485
485
|
return s;
|
|
486
|
-
const a = new
|
|
486
|
+
const a = new Ai(this.$headers, e, r, i);
|
|
487
487
|
return this.subscriptions.set(r, a), a;
|
|
488
488
|
};
|
|
489
489
|
removeSubscription = (e) => {
|
|
@@ -546,11 +546,11 @@ class Ai {
|
|
|
546
546
|
i.header.set(a, s[a]);
|
|
547
547
|
return r(i);
|
|
548
548
|
};
|
|
549
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
549
|
+
this.interceptors.push(e), this.interceptors.push(Si());
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
|
-
const
|
|
553
|
-
const { client: r, queryKey: i } = e.createPromiseClient(
|
|
552
|
+
const Fi = (t, e) => {
|
|
553
|
+
const { client: r, queryKey: i } = e.createPromiseClient(li, {
|
|
554
554
|
method: "retrieveEventId",
|
|
555
555
|
params: [t]
|
|
556
556
|
});
|
|
@@ -567,7 +567,7 @@ const Ei = (t, e) => {
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
});
|
|
570
|
-
},
|
|
570
|
+
}, Oi = (t, e) => {
|
|
571
571
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "getStream", params: [t] });
|
|
572
572
|
return e.nanoquery.createFetcherStore(i, {
|
|
573
573
|
fetcher: async (s, a, c) => c ? (await r.getStream({
|
|
@@ -575,23 +575,23 @@ const Ei = (t, e) => {
|
|
|
575
575
|
// we are sure that id is a string
|
|
576
576
|
})).data?.attributes : void 0
|
|
577
577
|
});
|
|
578
|
-
},
|
|
578
|
+
}, _i = (t, e) => {
|
|
579
579
|
const { queryKey: r, client: i } = e.createPromiseClient(gr, { method: "me", params: [t] });
|
|
580
580
|
return e.nanoquery.createFetcherStore(r, {
|
|
581
581
|
fetcher: () => i.me({})
|
|
582
582
|
});
|
|
583
|
-
},
|
|
583
|
+
}, Ti = (t) => {
|
|
584
584
|
const { client: e } = t.createPromiseClient(gr, { method: "bypassAuth" });
|
|
585
585
|
return async ({ userKey: r, schema: i, init: s, inviterKey: a }) => {
|
|
586
586
|
const c = await e.bypassAuth({ userKey: r, schema: i, init: s });
|
|
587
587
|
return c.meta && (c.meta.inviterKey = a), c;
|
|
588
588
|
};
|
|
589
|
-
},
|
|
589
|
+
}, Ci = (t, e) => {
|
|
590
590
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "get", params: [t] });
|
|
591
591
|
return e.nanoquery.createFetcherStore(i, {
|
|
592
592
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
593
593
|
});
|
|
594
|
-
},
|
|
594
|
+
}, ki = (t, e) => {
|
|
595
595
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, { method: "getOrganization", params: [t] });
|
|
596
596
|
return e.nanoquery.createFetcherStore(i, {
|
|
597
597
|
fetcher: async () => {
|
|
@@ -602,7 +602,7 @@ const Ei = (t, e) => {
|
|
|
602
602
|
} : void 0;
|
|
603
603
|
}
|
|
604
604
|
});
|
|
605
|
-
},
|
|
605
|
+
}, xi = (t, e) => {
|
|
606
606
|
const { client: r, queryKey: i } = e.createPromiseClient(yt, {
|
|
607
607
|
method: "getOrganizationAdvertising",
|
|
608
608
|
params: [t]
|
|
@@ -610,8 +610,8 @@ const Ei = (t, e) => {
|
|
|
610
610
|
return e.nanoquery.createFetcherStore(i, {
|
|
611
611
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
612
612
|
});
|
|
613
|
-
},
|
|
614
|
-
t.transport = new
|
|
613
|
+
}, Li = (t, e, r) => {
|
|
614
|
+
t.transport = new Ii(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), r();
|
|
615
615
|
};
|
|
616
616
|
class Rt {
|
|
617
617
|
delimiter = ":";
|
|
@@ -668,19 +668,19 @@ var Fe;
|
|
|
668
668
|
(function(t) {
|
|
669
669
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
670
670
|
})(Fe || (Fe = {}));
|
|
671
|
-
const
|
|
672
|
-
const e = new Ye(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(
|
|
671
|
+
const Bi = (t) => {
|
|
672
|
+
const e = new Ye(), r = new se(re(e.getExternalToken()), "userKey"), i = new se(re(e.getToken()), "userToken"), s = new de(_i(i.getStore(), t), "user", ({ data: c, error: d, loading: p }, m) => {
|
|
673
673
|
if (!d)
|
|
674
674
|
return c?.data?.id ? c.data.id : p === !1 ? void 0 : m;
|
|
675
|
-
}), a = new de(
|
|
675
|
+
}), a = new de(Ci(i.getStore(), t), "userSettings");
|
|
676
676
|
return {
|
|
677
677
|
userKey: r,
|
|
678
678
|
userToken: i,
|
|
679
679
|
user: s,
|
|
680
680
|
userSettings: a
|
|
681
681
|
};
|
|
682
|
-
},
|
|
683
|
-
const e = new se(re(void 0), "providerStreamId"), r = new de(
|
|
682
|
+
}, Pi = (t) => {
|
|
683
|
+
const e = new se(re(void 0), "providerStreamId"), r = new de(Fi(e.getStore(), t), "slStreamId", (s) => s?.data), i = new de(Oi(r.getAtomStore(), t), "streamSettings");
|
|
684
684
|
return r.getAtomStore().listen((s) => {
|
|
685
685
|
(s === "" || s === void 0) && i.getStore().mutate(void 0);
|
|
686
686
|
}), {
|
|
@@ -688,8 +688,8 @@ const ki = (t) => {
|
|
|
688
688
|
slStreamId: r,
|
|
689
689
|
streamSettings: i
|
|
690
690
|
};
|
|
691
|
-
},
|
|
692
|
-
const e = new se(re(void 0), "enabled"), r = new se(re(Fe.DISABLED), "status"), i = new de(
|
|
691
|
+
}, Ri = (t) => {
|
|
692
|
+
const e = new se(re(void 0), "enabled"), r = new se(re(Fe.DISABLED), "status"), i = new de(ki(e.getStore(), t), "organizationSettings", (d) => d?.data?.id), s = new de(xi(i.getAtomStore(), t), "organizationAdvertising"), a = Bi(t), c = Pi(t);
|
|
693
693
|
return {
|
|
694
694
|
enabled: e,
|
|
695
695
|
status: r,
|
|
@@ -704,10 +704,10 @@ const ki = (t) => {
|
|
|
704
704
|
organizationAdvertising: s
|
|
705
705
|
};
|
|
706
706
|
};
|
|
707
|
-
class
|
|
707
|
+
class Di extends Pt {
|
|
708
708
|
stores;
|
|
709
709
|
constructor(e) {
|
|
710
|
-
const r =
|
|
710
|
+
const r = Ri(e), i = wi(r);
|
|
711
711
|
super(i, "core"), this.stores = r;
|
|
712
712
|
}
|
|
713
713
|
getValue() {
|
|
@@ -728,7 +728,7 @@ class Pi extends Pt {
|
|
|
728
728
|
};
|
|
729
729
|
unsubscribe = () => this.getStore().off();
|
|
730
730
|
}
|
|
731
|
-
const
|
|
731
|
+
const Ni = fi({
|
|
732
732
|
level: "trace",
|
|
733
733
|
enabled: !!window.localStorage.getItem("SL_DEBUG"),
|
|
734
734
|
browser: {
|
|
@@ -736,8 +736,8 @@ const Ri = ci({
|
|
|
736
736
|
console.log(t);
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
}), gt = (t, e) =>
|
|
740
|
-
class
|
|
739
|
+
}), gt = (t, e) => Ni.child({ name: t }, e);
|
|
740
|
+
class $i extends Rt {
|
|
741
741
|
get = this.read;
|
|
742
742
|
set = this.write;
|
|
743
743
|
del = this.remove;
|
|
@@ -745,12 +745,12 @@ class Di extends Rt {
|
|
|
745
745
|
super("deep-link-context", window.sessionStorage);
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
|
-
const $r = "sldl", Dt = "sldl_uid",
|
|
748
|
+
const $r = "sldl", Dt = "sldl_uid", vn = "sldl_eid", Sn = "sldl_e_eid", Ui = /* @__PURE__ */ new Set([Dt, vn, Sn]), Ur = (t) => {
|
|
749
749
|
const e = {}, r = {};
|
|
750
750
|
for (const [i, s] of t)
|
|
751
|
-
|
|
751
|
+
Ui.has(i) ? e[i] = s : r[i] = s;
|
|
752
752
|
return { result: e, remain: r };
|
|
753
|
-
},
|
|
753
|
+
}, ji = ({ hash: t, search: e }) => {
|
|
754
754
|
if (t && t.includes($r)) {
|
|
755
755
|
const r = new URLSearchParams(t.substr(1));
|
|
756
756
|
return { hash: Ur(r) };
|
|
@@ -760,10 +760,17 @@ const $r = "sldl", Dt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Ni = /*
|
|
|
760
760
|
return { search: Ur(r) };
|
|
761
761
|
}
|
|
762
762
|
return null;
|
|
763
|
-
},
|
|
763
|
+
}, jr = gt("deep_link"), me = {
|
|
764
|
+
debug: (...t) => {
|
|
765
|
+
jr.debug(...t), console.log(...t);
|
|
766
|
+
},
|
|
767
|
+
trace: (...t) => {
|
|
768
|
+
jr.trace(...t), console.log(...t);
|
|
769
|
+
}
|
|
770
|
+
}, Mi = (t, e) => {
|
|
764
771
|
const { hash: r, search: i } = window.location;
|
|
765
772
|
if (me.debug({ hash: r, search: i }, "get deep link data from"), r || i) {
|
|
766
|
-
const s =
|
|
773
|
+
const s = ji({ hash: r, search: i });
|
|
767
774
|
if (me.debug(s, "parse deep link result"), s) {
|
|
768
775
|
const { hash: a, search: c } = s, { result: d, remain: p } = a || c;
|
|
769
776
|
if (Object.keys(d).length !== 0) {
|
|
@@ -782,8 +789,8 @@ const $r = "sldl", Dt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Ni = /*
|
|
|
782
789
|
}
|
|
783
790
|
}
|
|
784
791
|
t.setValue("parsed", !0);
|
|
785
|
-
},
|
|
786
|
-
const i = new
|
|
792
|
+
}, Vi = (t, e, r) => {
|
|
793
|
+
const i = new $i(), s = i.get("sl-deep-link-store");
|
|
787
794
|
let a = {};
|
|
788
795
|
if (s)
|
|
789
796
|
try {
|
|
@@ -808,9 +815,9 @@ const $r = "sldl", Dt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Ni = /*
|
|
|
808
815
|
}, t.sdk.inviteDisplayed = () => {
|
|
809
816
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), i.del("sl-deep-link-store");
|
|
810
817
|
}, t.deepLink.$store.subscribe((d) => i.set("sl-deep-link-store", JSON.stringify(d))), t.sdk.addDeepLinkHandler = (d) => {
|
|
811
|
-
me.trace("
|
|
812
|
-
}, t.sdk.removeDeepLinkHandler = (d) => {
|
|
813
|
-
me.trace("
|
|
818
|
+
me.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(d);
|
|
819
|
+
}, e.onDeepLinkHandled && t.sdk.addDeepLinkHandler(e.onDeepLinkHandled), t.sdk.removeDeepLinkHandler = (d) => {
|
|
820
|
+
me.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(d);
|
|
814
821
|
};
|
|
815
822
|
const c = (d) => {
|
|
816
823
|
t.deepLink.$store.setValue("handled", !0), me.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
|
|
@@ -821,15 +828,15 @@ const $r = "sldl", Dt = "sldl_uid", wn = "sldl_eid", bn = "sldl_e_eid", Ni = /*
|
|
|
821
828
|
console.error(m);
|
|
822
829
|
}
|
|
823
830
|
};
|
|
824
|
-
|
|
825
|
-
},
|
|
826
|
-
class
|
|
831
|
+
Mi(t.deepLink.$store, c), r();
|
|
832
|
+
}, qi = gt("bypass");
|
|
833
|
+
class Qi extends mi {
|
|
827
834
|
$coreStore;
|
|
828
835
|
deepLink;
|
|
829
836
|
transport;
|
|
830
837
|
bypassLogin;
|
|
831
838
|
constructor(e, r, i) {
|
|
832
|
-
super(), this.$coreStore = e, this.deepLink = i, this.transport = r, this.bypassLogin =
|
|
839
|
+
super(), this.$coreStore = e, this.deepLink = i, this.transport = r, this.bypassLogin = Ti(this.transport), this.connect();
|
|
833
840
|
}
|
|
834
841
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
835
842
|
/**
|
|
@@ -841,7 +848,7 @@ class Vi extends yi {
|
|
|
841
848
|
login = async (e, r) => {
|
|
842
849
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
843
850
|
const { used: i, data: s } = this.deepLink.getDeepLinkData(), a = i ? "" : s?.[Dt];
|
|
844
|
-
|
|
851
|
+
qi.debug({ inviterKey: a }, "login with inviterKey");
|
|
845
852
|
const c = await this.bypassLogin({
|
|
846
853
|
schema: e,
|
|
847
854
|
userKey: r,
|
|
@@ -910,8 +917,8 @@ class Vi extends yi {
|
|
|
910
917
|
});
|
|
911
918
|
};
|
|
912
919
|
}
|
|
913
|
-
const ft = new Ye(),
|
|
914
|
-
t.auth = new
|
|
920
|
+
const ft = new Ye(), Gi = (t, e, r) => {
|
|
921
|
+
t.auth = new Qi(t.store, t.transport, t.deepLink), t.stores.status.listen((i) => {
|
|
915
922
|
i === Fe.READY && t.auth.reLogin();
|
|
916
923
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (i, s) => {
|
|
917
924
|
if (!(ft.getSchema() === i && ft.getExternalToken() === s && t.transport.getHeader("authorization")))
|
|
@@ -923,16 +930,23 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
923
930
|
}, t.sdk.logout = () => {
|
|
924
931
|
t.auth.logout(), ft.clear();
|
|
925
932
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
926
|
-
},
|
|
927
|
-
t.store = new
|
|
933
|
+
}, zi = (t, e, r) => {
|
|
934
|
+
t.store = new Di(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 = () => {
|
|
928
935
|
t.store.unsubscribe();
|
|
929
936
|
}, r();
|
|
930
|
-
},
|
|
937
|
+
}, Mr = gt("video_player"), bt = {
|
|
938
|
+
debug: (...t) => {
|
|
939
|
+
Mr.debug(...t), console.log(...t);
|
|
940
|
+
},
|
|
941
|
+
trace: (...t) => {
|
|
942
|
+
Mr.trace(...t), console.log(...t);
|
|
943
|
+
}
|
|
944
|
+
}, Ki = (t, e, r) => {
|
|
931
945
|
t.videoPlayer = {
|
|
932
946
|
controllers: /* @__PURE__ */ new Set()
|
|
933
947
|
}, t.sdk.addVideoPlayerController = (i) => {
|
|
934
948
|
bt.trace("adding video player controller"), t.videoPlayer.controllers.add(i);
|
|
935
|
-
}, t.sdk.removeVideoPlayerController = (i) => {
|
|
949
|
+
}, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (i) => {
|
|
936
950
|
bt.trace("removing video player controller"), t.videoPlayer.controllers.delete(i);
|
|
937
951
|
}, t.sdk.controlVideoPlayer = (i) => {
|
|
938
952
|
bt.trace("controlling video player");
|
|
@@ -945,7 +959,7 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
945
959
|
}
|
|
946
960
|
}
|
|
947
961
|
}, r();
|
|
948
|
-
},
|
|
962
|
+
}, Wi = (t, e, r) => {
|
|
949
963
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async (i) => {
|
|
950
964
|
if (t.contextConfig = i, t.stores.enabled.get() === "on")
|
|
951
965
|
return { enabled: !0 };
|
|
@@ -961,8 +975,8 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
961
975
|
}, t.sdk.createEventSession = (i) => {
|
|
962
976
|
t.stores.providerStreamId.setValue(i);
|
|
963
977
|
}, r();
|
|
964
|
-
},
|
|
965
|
-
const { client: i, queryKey: s } = r.createPromiseClient(
|
|
978
|
+
}, Hi = (t, e, r) => {
|
|
979
|
+
const { client: i, queryKey: s } = r.createPromiseClient(pn, {
|
|
966
980
|
method: "summary",
|
|
967
981
|
params: [t, e]
|
|
968
982
|
});
|
|
@@ -972,10 +986,10 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
972
986
|
userId: p
|
|
973
987
|
})).data?.attributes
|
|
974
988
|
});
|
|
975
|
-
},
|
|
976
|
-
const { client: e } = t.createPromiseClient(
|
|
989
|
+
}, Ji = (t) => {
|
|
990
|
+
const { client: e } = t.createPromiseClient(pn, { method: "list" });
|
|
977
991
|
return (r) => e.list(r);
|
|
978
|
-
},
|
|
992
|
+
}, Yi = (t, e) => {
|
|
979
993
|
const { client: r, queryKey: i } = e.createPromiseClient(gr, {
|
|
980
994
|
method: "getFriends",
|
|
981
995
|
params: [t]
|
|
@@ -983,14 +997,14 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
983
997
|
return e.nanoquery.createFetcherStore(i, {
|
|
984
998
|
fetcher: async (s, a, c) => c ? (await r.getFriends({})).data : []
|
|
985
999
|
});
|
|
986
|
-
},
|
|
1000
|
+
}, Xi = (t, e) => {
|
|
987
1001
|
const { client: r, queryKey: i } = e.createPromiseClient(Ce, { method: "get", params: [t] });
|
|
988
1002
|
return e.nanoquery.createFetcherStore(i, {
|
|
989
1003
|
fetcher: async (s, a, c) => (await r.get({
|
|
990
1004
|
eventId: c
|
|
991
1005
|
})).data?.attributes
|
|
992
1006
|
});
|
|
993
|
-
},
|
|
1007
|
+
}, Zi = (t, e) => {
|
|
994
1008
|
const { client: r, queryKey: i } = e.createPromiseClient(Ce, { method: "syncQuestion", params: [t] });
|
|
995
1009
|
return e.nanoquery.createFetcherStore(i, {
|
|
996
1010
|
fetcher: async (s, a, c) => c ? (await r.syncQuestion({
|
|
@@ -999,20 +1013,20 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
999
1013
|
}
|
|
1000
1014
|
})).data?.attributes : void 0
|
|
1001
1015
|
});
|
|
1002
|
-
},
|
|
1003
|
-
const { client: r } = e.createStreamClient(Ce), i =
|
|
1016
|
+
}, eo = (t, e) => {
|
|
1017
|
+
const { client: r } = e.createStreamClient(Ce), i = Bt({ eventId: t.get() || "", feedId: "" });
|
|
1004
1018
|
return t.subscribe((a = "") => {
|
|
1005
1019
|
i.set({ eventId: a, feedId: "" });
|
|
1006
1020
|
}), e.addSubscription(r.subscription, i, { name: "feedSubscription" });
|
|
1007
|
-
},
|
|
1021
|
+
}, to = (t, e) => {
|
|
1008
1022
|
const { client: r } = e.createStreamClient(Ce);
|
|
1009
1023
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
1010
|
-
},
|
|
1024
|
+
}, An = async (t, e) => {
|
|
1011
1025
|
const { client: r } = e.createPromiseClient(Ce, { method: "questionByUser", params: [t] });
|
|
1012
1026
|
return (await r.questionByUser({
|
|
1013
1027
|
questionId: t
|
|
1014
1028
|
})).data?.attributes?.question;
|
|
1015
|
-
},
|
|
1029
|
+
}, ro = (t, e, r) => {
|
|
1016
1030
|
const { client: i, queryKey: s } = r.createPromiseClient(Ce, {
|
|
1017
1031
|
method: "list",
|
|
1018
1032
|
params: [t, e]
|
|
@@ -1027,16 +1041,16 @@ const ft = new Ye(), qi = (t, e, r) => {
|
|
|
1027
1041
|
})).data : []
|
|
1028
1042
|
});
|
|
1029
1043
|
};
|
|
1030
|
-
var
|
|
1031
|
-
Nt.byteLength =
|
|
1032
|
-
Nt.toByteArray =
|
|
1033
|
-
Nt.fromByteArray =
|
|
1034
|
-
var we = [], ie = [],
|
|
1035
|
-
for (var Ke = 0,
|
|
1044
|
+
var En = {}, Nt = {};
|
|
1045
|
+
Nt.byteLength = oo;
|
|
1046
|
+
Nt.toByteArray = ao;
|
|
1047
|
+
Nt.fromByteArray = lo;
|
|
1048
|
+
var we = [], ie = [], no = typeof Uint8Array < "u" ? Uint8Array : Array, qt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1049
|
+
for (var Ke = 0, io = qt.length; Ke < io; ++Ke)
|
|
1036
1050
|
we[Ke] = qt[Ke], ie[qt.charCodeAt(Ke)] = Ke;
|
|
1037
1051
|
ie[45] = 62;
|
|
1038
1052
|
ie[95] = 63;
|
|
1039
|
-
function
|
|
1053
|
+
function In(t) {
|
|
1040
1054
|
var e = t.length;
|
|
1041
1055
|
if (e % 4 > 0)
|
|
1042
1056
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -1045,30 +1059,30 @@ function An(t) {
|
|
|
1045
1059
|
var i = r === e ? 0 : 4 - r % 4;
|
|
1046
1060
|
return [r, i];
|
|
1047
1061
|
}
|
|
1048
|
-
function
|
|
1049
|
-
var e =
|
|
1062
|
+
function oo(t) {
|
|
1063
|
+
var e = In(t), r = e[0], i = e[1];
|
|
1050
1064
|
return (r + i) * 3 / 4 - i;
|
|
1051
1065
|
}
|
|
1052
|
-
function
|
|
1066
|
+
function so(t, e, r) {
|
|
1053
1067
|
return (e + r) * 3 / 4 - r;
|
|
1054
1068
|
}
|
|
1055
|
-
function
|
|
1056
|
-
var e, r =
|
|
1069
|
+
function ao(t) {
|
|
1070
|
+
var e, r = In(t), i = r[0], s = r[1], a = new no(so(t, i, s)), c = 0, d = s > 0 ? i - 4 : i, p;
|
|
1057
1071
|
for (p = 0; p < d; p += 4)
|
|
1058
1072
|
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;
|
|
1059
1073
|
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;
|
|
1060
1074
|
}
|
|
1061
|
-
function
|
|
1075
|
+
function uo(t) {
|
|
1062
1076
|
return we[t >> 18 & 63] + we[t >> 12 & 63] + we[t >> 6 & 63] + we[t & 63];
|
|
1063
1077
|
}
|
|
1064
|
-
function
|
|
1078
|
+
function co(t, e, r) {
|
|
1065
1079
|
for (var i, s = [], a = e; a < r; a += 3)
|
|
1066
|
-
i = (t[a] << 16 & 16711680) + (t[a + 1] << 8 & 65280) + (t[a + 2] & 255), s.push(
|
|
1080
|
+
i = (t[a] << 16 & 16711680) + (t[a + 1] << 8 & 65280) + (t[a + 2] & 255), s.push(uo(i));
|
|
1067
1081
|
return s.join("");
|
|
1068
1082
|
}
|
|
1069
|
-
function
|
|
1083
|
+
function lo(t) {
|
|
1070
1084
|
for (var e, r = t.length, i = r % 3, s = [], a = 16383, c = 0, d = r - i; c < d; c += a)
|
|
1071
|
-
s.push(
|
|
1085
|
+
s.push(co(t, c, c + a > d ? d : c + a));
|
|
1072
1086
|
return i === 1 ? (e = t[r - 1], s.push(
|
|
1073
1087
|
we[e >> 2] + we[e << 4 & 63] + "=="
|
|
1074
1088
|
)) : i === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
|
|
@@ -1093,12 +1107,12 @@ mr.read = function(t, e, r, i, s) {
|
|
|
1093
1107
|
return (F ? -1 : 1) * c * Math.pow(2, a - i);
|
|
1094
1108
|
};
|
|
1095
1109
|
mr.write = function(t, e, r, i, s, a) {
|
|
1096
|
-
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, T = i ? 1 : -1,
|
|
1110
|
+
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, T = i ? 1 : -1, k = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
1097
1111
|
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 += T, d /= 256, s -= 8)
|
|
1098
1112
|
;
|
|
1099
1113
|
for (c = c << s | d, m += s; m > 0; t[r + F] = c & 255, F += T, c /= 256, m -= 8)
|
|
1100
1114
|
;
|
|
1101
|
-
t[r + F - T] |=
|
|
1115
|
+
t[r + F - T] |= k * 128;
|
|
1102
1116
|
};
|
|
1103
1117
|
/*!
|
|
1104
1118
|
* The buffer module from node.js, for the browser.
|
|
@@ -1157,7 +1171,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1157
1171
|
l.poolSize = 8192;
|
|
1158
1172
|
function w(u, n, o) {
|
|
1159
1173
|
if (typeof u == "string")
|
|
1160
|
-
return
|
|
1174
|
+
return k(u, n);
|
|
1161
1175
|
if (c.isView(u))
|
|
1162
1176
|
return I(u);
|
|
1163
1177
|
if (u == null)
|
|
@@ -1198,23 +1212,23 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1198
1212
|
return F(u, n, o);
|
|
1199
1213
|
};
|
|
1200
1214
|
function T(u) {
|
|
1201
|
-
return E(u), m(u < 0 ? 0 :
|
|
1215
|
+
return E(u), m(u < 0 ? 0 : B(u) | 0);
|
|
1202
1216
|
}
|
|
1203
1217
|
l.allocUnsafe = function(u) {
|
|
1204
1218
|
return T(u);
|
|
1205
1219
|
}, l.allocUnsafeSlow = function(u) {
|
|
1206
1220
|
return T(u);
|
|
1207
1221
|
};
|
|
1208
|
-
function
|
|
1222
|
+
function k(u, n) {
|
|
1209
1223
|
if ((typeof n != "string" || n === "") && (n = "utf8"), !l.isEncoding(n))
|
|
1210
1224
|
throw new TypeError("Unknown encoding: " + n);
|
|
1211
|
-
const o =
|
|
1225
|
+
const o = x(u, n) | 0;
|
|
1212
1226
|
let f = m(o);
|
|
1213
1227
|
const h = f.write(u, n);
|
|
1214
1228
|
return h !== o && (f = f.slice(0, h)), f;
|
|
1215
1229
|
}
|
|
1216
1230
|
function D(u) {
|
|
1217
|
-
const n = u.length < 0 ? 0 :
|
|
1231
|
+
const n = u.length < 0 ? 0 : B(u.length) | 0, o = m(n);
|
|
1218
1232
|
for (let f = 0; f < n; f += 1)
|
|
1219
1233
|
o[f] = u[f] & 255;
|
|
1220
1234
|
return o;
|
|
@@ -1236,7 +1250,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1236
1250
|
}
|
|
1237
1251
|
function j(u) {
|
|
1238
1252
|
if (l.isBuffer(u)) {
|
|
1239
|
-
const n =
|
|
1253
|
+
const n = B(u.length) | 0, o = m(n);
|
|
1240
1254
|
return o.length === 0 || u.copy(o, 0, 0, n), o;
|
|
1241
1255
|
}
|
|
1242
1256
|
if (u.length !== void 0)
|
|
@@ -1244,7 +1258,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1244
1258
|
if (u.type === "Buffer" && Array.isArray(u.data))
|
|
1245
1259
|
return D(u.data);
|
|
1246
1260
|
}
|
|
1247
|
-
function
|
|
1261
|
+
function B(u) {
|
|
1248
1262
|
if (u >= s)
|
|
1249
1263
|
throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s.toString(16) + " bytes");
|
|
1250
1264
|
return u | 0;
|
|
@@ -1312,7 +1326,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1312
1326
|
}
|
|
1313
1327
|
return h;
|
|
1314
1328
|
};
|
|
1315
|
-
function
|
|
1329
|
+
function x(u, n) {
|
|
1316
1330
|
if (l.isBuffer(u))
|
|
1317
1331
|
return u.length;
|
|
1318
1332
|
if (c.isView(u) || pe(u, c))
|
|
@@ -1342,15 +1356,15 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1342
1356
|
case "hex":
|
|
1343
1357
|
return o >>> 1;
|
|
1344
1358
|
case "base64":
|
|
1345
|
-
return
|
|
1359
|
+
return Lr(u).length;
|
|
1346
1360
|
default:
|
|
1347
1361
|
if (h)
|
|
1348
1362
|
return f ? -1 : lt(u).length;
|
|
1349
1363
|
n = ("" + n).toLowerCase(), h = !0;
|
|
1350
1364
|
}
|
|
1351
1365
|
}
|
|
1352
|
-
l.byteLength =
|
|
1353
|
-
function
|
|
1366
|
+
l.byteLength = x;
|
|
1367
|
+
function L(u, n, o) {
|
|
1354
1368
|
let f = !1;
|
|
1355
1369
|
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))
|
|
1356
1370
|
return "";
|
|
@@ -1362,12 +1376,12 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1362
1376
|
case "utf-8":
|
|
1363
1377
|
return Ge(this, n, o);
|
|
1364
1378
|
case "ascii":
|
|
1365
|
-
return
|
|
1379
|
+
return Le(this, n, o);
|
|
1366
1380
|
case "latin1":
|
|
1367
1381
|
case "binary":
|
|
1368
1382
|
return ze(this, n, o);
|
|
1369
1383
|
case "base64":
|
|
1370
|
-
return
|
|
1384
|
+
return xe(this, n, o);
|
|
1371
1385
|
case "ucs2":
|
|
1372
1386
|
case "ucs-2":
|
|
1373
1387
|
case "utf16le":
|
|
@@ -1407,7 +1421,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1407
1421
|
return this;
|
|
1408
1422
|
}, l.prototype.toString = function() {
|
|
1409
1423
|
const n = this.length;
|
|
1410
|
-
return n === 0 ? "" : arguments.length === 0 ? Ge(this, 0, n) :
|
|
1424
|
+
return n === 0 ? "" : arguments.length === 0 ? Ge(this, 0, n) : L.apply(this, arguments);
|
|
1411
1425
|
}, l.prototype.toLocaleString = l.prototype.toString, l.prototype.equals = function(n) {
|
|
1412
1426
|
if (!l.isBuffer(n))
|
|
1413
1427
|
throw new TypeError("Argument must be a Buffer");
|
|
@@ -1516,13 +1530,13 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1516
1530
|
return wt(lt(n, u.length - o), u, o, f);
|
|
1517
1531
|
}
|
|
1518
1532
|
function ct(u, n, o, f) {
|
|
1519
|
-
return wt(
|
|
1533
|
+
return wt(xr(n), u, o, f);
|
|
1520
1534
|
}
|
|
1521
1535
|
function he(u, n, o, f) {
|
|
1522
|
-
return wt(
|
|
1536
|
+
return wt(Lr(n), u, o, f);
|
|
1523
1537
|
}
|
|
1524
1538
|
function Re(u, n, o, f) {
|
|
1525
|
-
return wt(
|
|
1539
|
+
return wt(ii(n, u.length - o), u, o, f);
|
|
1526
1540
|
}
|
|
1527
1541
|
l.prototype.write = function(n, o, f, h) {
|
|
1528
1542
|
if (o === void 0)
|
|
@@ -1569,7 +1583,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1569
1583
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
1570
1584
|
};
|
|
1571
1585
|
};
|
|
1572
|
-
function
|
|
1586
|
+
function xe(u, n, o) {
|
|
1573
1587
|
return n === 0 && o === u.length ? e.fromByteArray(u) : e.fromByteArray(u.slice(n, o));
|
|
1574
1588
|
}
|
|
1575
1589
|
function Ge(u, n, o) {
|
|
@@ -1612,7 +1626,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1612
1626
|
);
|
|
1613
1627
|
return o;
|
|
1614
1628
|
}
|
|
1615
|
-
function
|
|
1629
|
+
function Le(u, n, o) {
|
|
1616
1630
|
let f = "";
|
|
1617
1631
|
o = Math.min(u.length, o);
|
|
1618
1632
|
for (let h = n; h < o; ++h)
|
|
@@ -1631,7 +1645,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1631
1645
|
(!n || n < 0) && (n = 0), (!o || o < 0 || o > f) && (o = f);
|
|
1632
1646
|
let h = "";
|
|
1633
1647
|
for (let y = n; y < o; ++y)
|
|
1634
|
-
h +=
|
|
1648
|
+
h += oi[u[y]];
|
|
1635
1649
|
return h;
|
|
1636
1650
|
}
|
|
1637
1651
|
function v(u, n, o) {
|
|
@@ -1945,7 +1959,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1945
1959
|
n = `_${u.slice(o - 3, o)}${n}`;
|
|
1946
1960
|
return `${u.slice(0, o)}${n}`;
|
|
1947
1961
|
}
|
|
1948
|
-
function
|
|
1962
|
+
function Be(u, n, o) {
|
|
1949
1963
|
Ae(n, "offset"), (u[n] === void 0 || u[n + o] === void 0) && $e(n, u.length - (o + 1));
|
|
1950
1964
|
}
|
|
1951
1965
|
function Ne(u, n, o, f, h, y) {
|
|
@@ -1954,7 +1968,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
1954
1968
|
let N;
|
|
1955
1969
|
throw y > 3 ? n === 0 || n === BigInt(0) ? N = `>= 0${b} and < 2${b} ** ${(y + 1) * 8}${b}` : N = `>= -(2${b} ** ${(y + 1) * 8 - 1}${b}) and < 2 ** ${(y + 1) * 8 - 1}${b}` : N = `>= ${n}${b} and <= ${o}${b}`, new J.ERR_OUT_OF_RANGE("value", N, u);
|
|
1956
1970
|
}
|
|
1957
|
-
|
|
1971
|
+
Be(f, h, y);
|
|
1958
1972
|
}
|
|
1959
1973
|
function Ae(u, n) {
|
|
1960
1974
|
if (typeof u != "number")
|
|
@@ -2034,20 +2048,20 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
2034
2048
|
}
|
|
2035
2049
|
return y;
|
|
2036
2050
|
}
|
|
2037
|
-
function
|
|
2051
|
+
function xr(u) {
|
|
2038
2052
|
const n = [];
|
|
2039
2053
|
for (let o = 0; o < u.length; ++o)
|
|
2040
2054
|
n.push(u.charCodeAt(o) & 255);
|
|
2041
2055
|
return n;
|
|
2042
2056
|
}
|
|
2043
|
-
function
|
|
2057
|
+
function ii(u, n) {
|
|
2044
2058
|
let o, f, h;
|
|
2045
2059
|
const y = [];
|
|
2046
2060
|
for (let b = 0; b < u.length && !((n -= 2) < 0); ++b)
|
|
2047
2061
|
o = u.charCodeAt(b), f = o >> 8, h = o % 256, y.push(h), y.push(f);
|
|
2048
2062
|
return y;
|
|
2049
2063
|
}
|
|
2050
|
-
function
|
|
2064
|
+
function Lr(u) {
|
|
2051
2065
|
return e.toByteArray(A(u));
|
|
2052
2066
|
}
|
|
2053
2067
|
function wt(u, n, o, f) {
|
|
@@ -2062,7 +2076,7 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
2062
2076
|
function Vt(u) {
|
|
2063
2077
|
return u !== u;
|
|
2064
2078
|
}
|
|
2065
|
-
const
|
|
2079
|
+
const oi = function() {
|
|
2066
2080
|
const u = "0123456789abcdef", n = new Array(256);
|
|
2067
2081
|
for (let o = 0; o < 16; ++o) {
|
|
2068
2082
|
const f = o * 16;
|
|
@@ -2072,55 +2086,55 @@ mr.write = function(t, e, r, i, s, a) {
|
|
|
2072
2086
|
return n;
|
|
2073
2087
|
}();
|
|
2074
2088
|
function Pe(u) {
|
|
2075
|
-
return typeof BigInt > "u" ?
|
|
2089
|
+
return typeof BigInt > "u" ? si : u;
|
|
2076
2090
|
}
|
|
2077
|
-
function
|
|
2091
|
+
function si() {
|
|
2078
2092
|
throw new Error("BigInt not supported");
|
|
2079
2093
|
}
|
|
2080
|
-
})(
|
|
2081
|
-
const
|
|
2082
|
-
var
|
|
2083
|
-
function
|
|
2094
|
+
})(En);
|
|
2095
|
+
const Vr = En.Buffer;
|
|
2096
|
+
var Fn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2097
|
+
function fo(t) {
|
|
2084
2098
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2085
2099
|
}
|
|
2086
2100
|
var wr = { exports: {} };
|
|
2087
|
-
const
|
|
2101
|
+
const ho = Object.getPrototypeOf({});
|
|
2088
2102
|
function br(t) {
|
|
2089
2103
|
function e(I) {
|
|
2090
2104
|
return I !== "constructor" && I !== "prototype" && I !== "__proto__";
|
|
2091
2105
|
}
|
|
2092
2106
|
function r(I) {
|
|
2093
2107
|
let _ = 0;
|
|
2094
|
-
const j = I.length,
|
|
2108
|
+
const j = I.length, B = new Array(j);
|
|
2095
2109
|
for (_ = 0; _ < j; ++_)
|
|
2096
|
-
|
|
2097
|
-
return
|
|
2110
|
+
B[_] = F(I[_]);
|
|
2111
|
+
return B;
|
|
2098
2112
|
}
|
|
2099
2113
|
function i(I) {
|
|
2100
2114
|
const _ = {};
|
|
2101
|
-
if (p && Object.getPrototypeOf(I) !==
|
|
2115
|
+
if (p && Object.getPrototypeOf(I) !== ho)
|
|
2102
2116
|
return p(I);
|
|
2103
2117
|
const j = d(I);
|
|
2104
|
-
let
|
|
2105
|
-
for (
|
|
2106
|
-
e(
|
|
2118
|
+
let B, C, x;
|
|
2119
|
+
for (B = 0, C = j.length; B < C; ++B)
|
|
2120
|
+
e(x = j[B]) && (_[x] = F(I[x]));
|
|
2107
2121
|
return _;
|
|
2108
2122
|
}
|
|
2109
2123
|
function s(I, _) {
|
|
2110
|
-
const j = I.length,
|
|
2124
|
+
const j = I.length, B = _.length;
|
|
2111
2125
|
let C = 0;
|
|
2112
|
-
const
|
|
2126
|
+
const x = new Array(j + B);
|
|
2113
2127
|
for (C = 0; C < j; ++C)
|
|
2114
|
-
|
|
2115
|
-
for (C = 0; C <
|
|
2116
|
-
|
|
2117
|
-
return
|
|
2128
|
+
x[C] = F(I[C]);
|
|
2129
|
+
for (C = 0; C < B; ++C)
|
|
2130
|
+
x[C + j] = F(_[C]);
|
|
2131
|
+
return x;
|
|
2118
2132
|
}
|
|
2119
2133
|
const a = Object.prototype.propertyIsEnumerable;
|
|
2120
2134
|
function c(I) {
|
|
2121
2135
|
const _ = Object.keys(I), j = Object.getOwnPropertySymbols(I);
|
|
2122
|
-
for (let
|
|
2123
|
-
a.call(I, j[
|
|
2136
|
+
for (let B = 0, C = j.length; B < C; ++B)
|
|
2137
|
+
a.call(I, j[B]) && _.push(j[B]);
|
|
2124
2138
|
return _;
|
|
2125
2139
|
}
|
|
2126
2140
|
const d = t && t.symbols ? c : Object.keys, p = typeof t?.cloneProtoObject == "function" ? t.cloneProtoObject : void 0;
|
|
@@ -2130,23 +2144,23 @@ function br(t) {
|
|
|
2130
2144
|
function l(I) {
|
|
2131
2145
|
return typeof I != "object" || I === null;
|
|
2132
2146
|
}
|
|
2133
|
-
const w = typeof
|
|
2147
|
+
const w = typeof Vr < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof Vr : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: k, getKeys: d, isMergeableObject: m }) : s;
|
|
2134
2148
|
function F(I) {
|
|
2135
2149
|
return m(I) ? Array.isArray(I) ? r(I) : i(I) : I;
|
|
2136
2150
|
}
|
|
2137
2151
|
function T(I, _) {
|
|
2138
|
-
const j = {},
|
|
2139
|
-
let
|
|
2140
|
-
for (
|
|
2141
|
-
e(q =
|
|
2142
|
-
for (
|
|
2143
|
-
e(q = C[
|
|
2152
|
+
const j = {}, B = d(I), C = d(_);
|
|
2153
|
+
let x, L, q;
|
|
2154
|
+
for (x = 0, L = B.length; x < L; ++x)
|
|
2155
|
+
e(q = B[x]) && C.indexOf(q) === -1 && (j[q] = F(I[q]));
|
|
2156
|
+
for (x = 0, L = C.length; x < L; ++x)
|
|
2157
|
+
e(q = C[x]) && (q in I && (B.indexOf(q) !== -1 && (j[q] = k(I[q], _[q])), !0) || // eslint-disable-line no-mixed-operators
|
|
2144
2158
|
(j[q] = F(_[q])));
|
|
2145
2159
|
return j;
|
|
2146
2160
|
}
|
|
2147
|
-
function
|
|
2148
|
-
const j = Array.isArray(_),
|
|
2149
|
-
return l(_) ? _ : w(I) ? F(_) : j &&
|
|
2161
|
+
function k(I, _) {
|
|
2162
|
+
const j = Array.isArray(_), B = Array.isArray(I);
|
|
2163
|
+
return l(_) ? _ : w(I) ? F(_) : j && B ? E(I, _) : j !== B ? F(_) : T(I, _);
|
|
2150
2164
|
}
|
|
2151
2165
|
function D() {
|
|
2152
2166
|
switch (arguments.length) {
|
|
@@ -2155,26 +2169,26 @@ function br(t) {
|
|
|
2155
2169
|
case 1:
|
|
2156
2170
|
return F(arguments[0]);
|
|
2157
2171
|
case 2:
|
|
2158
|
-
return
|
|
2172
|
+
return k(arguments[0], arguments[1]);
|
|
2159
2173
|
}
|
|
2160
2174
|
let I;
|
|
2161
2175
|
for (let _ = 0, j = arguments.length; _ < j; ++_)
|
|
2162
|
-
I =
|
|
2176
|
+
I = k(I, arguments[_]);
|
|
2163
2177
|
return I;
|
|
2164
2178
|
}
|
|
2165
|
-
return t && t.all ? D :
|
|
2179
|
+
return t && t.all ? D : k;
|
|
2166
2180
|
}
|
|
2167
2181
|
wr.exports = br;
|
|
2168
2182
|
wr.exports.default = br;
|
|
2169
|
-
var
|
|
2170
|
-
const
|
|
2183
|
+
var po = wr.exports.deepmerge = br;
|
|
2184
|
+
const yo = (t) => (e, r) => {
|
|
2171
2185
|
let i = 0;
|
|
2172
2186
|
const s = e.length, a = r.length, c = Math.max(s, a), d = new Array(c);
|
|
2173
2187
|
for (i = 0; i < c; ++i)
|
|
2174
2188
|
i < a ? d[i] = t.deepmerge(e[i], r[i]) : d[i] = t.clone(e[i]);
|
|
2175
2189
|
return d;
|
|
2176
|
-
},
|
|
2177
|
-
const i =
|
|
2190
|
+
}, go = po({ mergeArray: yo }), mo = (t, e, r) => {
|
|
2191
|
+
const i = dn([e, r], (c, d) => {
|
|
2178
2192
|
if (c) {
|
|
2179
2193
|
const p = d.data?.find((m) => m.id === c);
|
|
2180
2194
|
if (p)
|
|
@@ -2189,7 +2203,7 @@ const ho = (t) => (e, r) => {
|
|
|
2189
2203
|
return i.subscribe(async (c) => {
|
|
2190
2204
|
if (c && c.type === "question") {
|
|
2191
2205
|
s.setKey("loading", !0);
|
|
2192
|
-
const d = await
|
|
2206
|
+
const d = await An(c.id, t);
|
|
2193
2207
|
s.set({ data: d, loading: !1 });
|
|
2194
2208
|
return;
|
|
2195
2209
|
}
|
|
@@ -2199,14 +2213,14 @@ const ho = (t) => (e, r) => {
|
|
|
2199
2213
|
if (d && c?.answers)
|
|
2200
2214
|
for (const p of c.answers)
|
|
2201
2215
|
p.youVoted !== !0 && delete p.youVoted;
|
|
2202
|
-
s.set({ data:
|
|
2216
|
+
s.set({ data: go(d, c) });
|
|
2203
2217
|
} };
|
|
2204
2218
|
};
|
|
2205
2219
|
var Ve;
|
|
2206
2220
|
(function(t) {
|
|
2207
2221
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
2208
2222
|
})(Ve || (Ve = {}));
|
|
2209
|
-
class
|
|
2223
|
+
class wo {
|
|
2210
2224
|
/** sl event id */
|
|
2211
2225
|
slStreamId;
|
|
2212
2226
|
/** organization id */
|
|
@@ -2236,13 +2250,13 @@ class go {
|
|
|
2236
2250
|
notifications;
|
|
2237
2251
|
log;
|
|
2238
2252
|
constructor(e) {
|
|
2239
|
-
this.log = gt("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(
|
|
2240
|
-
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription =
|
|
2253
|
+
this.log = gt("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(Xi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new de(ro(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new de(Zi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = mo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
2254
|
+
this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = to(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
|
|
2241
2255
|
window.requestAnimationFrame(() => {
|
|
2242
2256
|
this.openedQuestion.updateExtendedQuestion(i.data?.attributes?.question);
|
|
2243
2257
|
});
|
|
2244
2258
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
2245
|
-
}), this.feedSubscription =
|
|
2259
|
+
}), this.feedSubscription = eo(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
2246
2260
|
const i = this.activeQuestionId.getStore();
|
|
2247
2261
|
i && i.mutate(r.data?.attributes);
|
|
2248
2262
|
}), this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -2283,7 +2297,7 @@ class go {
|
|
|
2283
2297
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
2284
2298
|
};
|
|
2285
2299
|
}
|
|
2286
|
-
class
|
|
2300
|
+
class bo {
|
|
2287
2301
|
notificationsList;
|
|
2288
2302
|
notifications;
|
|
2289
2303
|
store;
|
|
@@ -2366,7 +2380,7 @@ var _t;
|
|
|
2366
2380
|
(function(t) {
|
|
2367
2381
|
t.OPENED = "opened";
|
|
2368
2382
|
})(_t || (_t = {}));
|
|
2369
|
-
class
|
|
2383
|
+
class vo extends Rt {
|
|
2370
2384
|
constructor() {
|
|
2371
2385
|
super("notification");
|
|
2372
2386
|
}
|
|
@@ -2382,11 +2396,11 @@ var Me;
|
|
|
2382
2396
|
(function(t) {
|
|
2383
2397
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
2384
2398
|
})(Me || (Me = {}));
|
|
2385
|
-
class
|
|
2399
|
+
class So {
|
|
2386
2400
|
queue;
|
|
2387
2401
|
storage;
|
|
2388
2402
|
constructor(e = {}) {
|
|
2389
|
-
this.storage = new
|
|
2403
|
+
this.storage = new vo(), this.queue = new bo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
2390
2404
|
}
|
|
2391
2405
|
add = (e) => {
|
|
2392
2406
|
this.storage.isOpened(e.id) || this.queue.addToQueue(e);
|
|
@@ -2399,15 +2413,15 @@ class bo {
|
|
|
2399
2413
|
this.storage.setOpened(e);
|
|
2400
2414
|
};
|
|
2401
2415
|
}
|
|
2402
|
-
const
|
|
2403
|
-
t.notifications = new
|
|
2404
|
-
},
|
|
2416
|
+
const Ao = (t, e, r) => {
|
|
2417
|
+
t.notifications = new So(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
|
|
2418
|
+
}, Eo = (t, e) => {
|
|
2405
2419
|
const { client: r } = t.createPromiseClient(Ce, { method: "submitAnswer" });
|
|
2406
2420
|
return r.submitAnswer({ data: e });
|
|
2407
|
-
},
|
|
2421
|
+
}, Io = (t, e) => {
|
|
2408
2422
|
const { client: r } = t.createPromiseClient(Ce, { method: "submitInplay" });
|
|
2409
2423
|
return r.submitInplay({ data: { eventId: +e } });
|
|
2410
|
-
},
|
|
2424
|
+
}, Fo = (t, e) => {
|
|
2411
2425
|
const { client: r } = t.createPromiseClient(Ce, { method: "skipQuestion" });
|
|
2412
2426
|
return r.skipQuestion({ data: { id: e } });
|
|
2413
2427
|
};
|
|
@@ -2415,7 +2429,7 @@ var Xe;
|
|
|
2415
2429
|
(function(t) {
|
|
2416
2430
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
2417
2431
|
})(Xe || (Xe = {}));
|
|
2418
|
-
class
|
|
2432
|
+
class On extends Rt {
|
|
2419
2433
|
constructor() {
|
|
2420
2434
|
super("gamification");
|
|
2421
2435
|
}
|
|
@@ -2432,32 +2446,32 @@ class In extends Rt {
|
|
|
2432
2446
|
return window.sessionStorage.getItem(s);
|
|
2433
2447
|
};
|
|
2434
2448
|
}
|
|
2435
|
-
const
|
|
2449
|
+
const qr = {
|
|
2436
2450
|
pageSize: 10
|
|
2437
|
-
},
|
|
2451
|
+
}, Oo = (t, e, r, i, s) => {
|
|
2438
2452
|
let a = 0;
|
|
2439
|
-
const c = re({ pageSize: s?.pageSize ||
|
|
2453
|
+
const c = re({ pageSize: s?.pageSize || qr.pageSize, page: 0 }), d = Te({
|
|
2440
2454
|
data: [],
|
|
2441
2455
|
key: Date.now(),
|
|
2442
2456
|
hasMore: !0,
|
|
2443
2457
|
loading: void 0,
|
|
2444
2458
|
error: void 0
|
|
2445
|
-
}), p =
|
|
2459
|
+
}), p = Ji(t), m = async () => {
|
|
2446
2460
|
const E = e.get(), F = i.getStore().get().data?.map((T) => T.slId) || [];
|
|
2447
2461
|
if (E && F?.length) {
|
|
2448
2462
|
const T = r.get();
|
|
2449
2463
|
T && F.push(T), d.setKey("loading", !0), d.setKey("data", []);
|
|
2450
|
-
const
|
|
2464
|
+
const k = {
|
|
2451
2465
|
eventId: E,
|
|
2452
2466
|
usersIds: F,
|
|
2453
|
-
pagination: { page: 0, pageSize: s?.pageSize ||
|
|
2454
|
-
}, D = await p(
|
|
2467
|
+
pagination: { page: 0, pageSize: s?.pageSize || qr.pageSize }
|
|
2468
|
+
}, D = await p(k);
|
|
2455
2469
|
d.set({
|
|
2456
2470
|
data: D.data.map((I) => I.attributes),
|
|
2457
2471
|
hasMore: !0,
|
|
2458
2472
|
key: Date.now(),
|
|
2459
2473
|
loading: !1
|
|
2460
|
-
}), D.meta && (a = Math.round(D.meta.count / D.meta.pageSize)), c.set(
|
|
2474
|
+
}), D.meta && (a = Math.round(D.meta.count / D.meta.pageSize)), c.set(k.pagination);
|
|
2461
2475
|
}
|
|
2462
2476
|
}, l = () => {
|
|
2463
2477
|
m();
|
|
@@ -2465,18 +2479,18 @@ const Mr = {
|
|
|
2465
2479
|
const F = c.get(), T = E || F.page + 1;
|
|
2466
2480
|
T <= a && c.set({ ...F, page: T });
|
|
2467
2481
|
};
|
|
2468
|
-
return
|
|
2469
|
-
const E = e.listen(m), F = i.listen(m), T = c.listen(async (
|
|
2482
|
+
return hn(d, () => {
|
|
2483
|
+
const E = e.listen(m), F = i.listen(m), T = c.listen(async (k) => {
|
|
2470
2484
|
const D = e.get();
|
|
2471
|
-
if (
|
|
2472
|
-
if (
|
|
2485
|
+
if (k.page > 0 && D)
|
|
2486
|
+
if (k.page < a) {
|
|
2473
2487
|
d.setKey("loading", !0);
|
|
2474
2488
|
const _ = await p({
|
|
2475
2489
|
eventId: D,
|
|
2476
|
-
pagination:
|
|
2490
|
+
pagination: k
|
|
2477
2491
|
}), j = d.get().data || [];
|
|
2478
2492
|
d.set({
|
|
2479
|
-
data: [...j, ..._.data.map((
|
|
2493
|
+
data: [...j, ..._.data.map((B) => B.attributes)],
|
|
2480
2494
|
key: d.get().key,
|
|
2481
2495
|
loading: !1,
|
|
2482
2496
|
hasMore: !0
|
|
@@ -2488,7 +2502,7 @@ const Mr = {
|
|
|
2488
2502
|
E(), F(), T();
|
|
2489
2503
|
};
|
|
2490
2504
|
}), { $store: d, fetchMore: w, invalidate: l };
|
|
2491
|
-
},
|
|
2505
|
+
}, _o = (t, e) => {
|
|
2492
2506
|
const { client: r, queryKey: i } = t.createPromiseClient(yt, {
|
|
2493
2507
|
method: "generateDeepLink",
|
|
2494
2508
|
params: e
|
|
@@ -2498,27 +2512,27 @@ const Mr = {
|
|
|
2498
2512
|
data: { gamification: !0, externalEventId: d, eventId: c }
|
|
2499
2513
|
})).data?.attributes : {}
|
|
2500
2514
|
});
|
|
2501
|
-
},
|
|
2502
|
-
const { client: i } = t.createPromiseClient(
|
|
2515
|
+
}, To = (t, { web: e, mobile: r }) => {
|
|
2516
|
+
const { client: i } = t.createPromiseClient(di, { method: "generate" });
|
|
2503
2517
|
return i.generate({ web: e, mobile: r });
|
|
2504
|
-
},
|
|
2518
|
+
}, Qr = (t, e) => {
|
|
2505
2519
|
const r = new URLSearchParams(t);
|
|
2506
2520
|
for (const [i, s] of Object.entries(e))
|
|
2507
2521
|
r.append(i, s);
|
|
2508
2522
|
return r.toString();
|
|
2509
|
-
},
|
|
2523
|
+
}, Co = (t, e, r, i) => {
|
|
2510
2524
|
const s = Te({});
|
|
2511
|
-
return
|
|
2525
|
+
return hn(s, () => _o(t, [e, r]).subscribe(async ({ data: d, error: p, loading: m }) => {
|
|
2512
2526
|
const l = p ? "https://masters.com" : d?.url, w = i.get() || "", E = e.get() || "", F = r.get() || "", T = {
|
|
2513
2527
|
[Dt]: w,
|
|
2514
|
-
[
|
|
2515
|
-
[
|
|
2528
|
+
[vn]: E,
|
|
2529
|
+
[Sn]: F
|
|
2516
2530
|
};
|
|
2517
2531
|
if (!m && l) {
|
|
2518
2532
|
s.setKey("loading", !0);
|
|
2519
|
-
let
|
|
2520
|
-
|
|
2521
|
-
const I = window.location.origin + window.location.pathname +
|
|
2533
|
+
let k = window.location.search, D = window.location.hash;
|
|
2534
|
+
k && D || D ? k = `?${Qr(k, T)}` : D = `#${Qr("", T)}`;
|
|
2535
|
+
const I = window.location.origin + window.location.pathname + k + D, _ = await To(t, { web: I, mobile: l });
|
|
2522
2536
|
s.set({
|
|
2523
2537
|
data: _.data?.link,
|
|
2524
2538
|
loading: !1
|
|
@@ -2531,7 +2545,7 @@ var ee;
|
|
|
2531
2545
|
(function(t) {
|
|
2532
2546
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2533
2547
|
})(ee || (ee = {}));
|
|
2534
|
-
const
|
|
2548
|
+
const ko = (t, e, r, i) => {
|
|
2535
2549
|
const { inplayGame: s } = t.featureSettings.get(), a = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2536
2550
|
s && r.add({
|
|
2537
2551
|
type: Me.ONBOARDING,
|
|
@@ -2574,11 +2588,11 @@ const To = (t, e, r, i) => {
|
|
|
2574
2588
|
} catch (c) {
|
|
2575
2589
|
console.error(c);
|
|
2576
2590
|
}
|
|
2577
|
-
},
|
|
2591
|
+
}, xo = (t, e, r, i) => {
|
|
2578
2592
|
let s = !1;
|
|
2579
|
-
const a = new
|
|
2593
|
+
const a = new On(), c = re(ee.Unset);
|
|
2580
2594
|
c.subscribe((m) => {
|
|
2581
|
-
m !== ee.Unset && ((m === ee.Optional || m === ee.Required) && s === !1 && (
|
|
2595
|
+
m !== ee.Unset && ((m === ee.Optional || m === ee.Required) && s === !1 && (ko(t, e, i, a), s = !0), m === ee.Completed && e.activeQuestionId.invalidate(), a.setOnboardingInstantOpen({
|
|
2582
2596
|
userId: e.userId.get() || "",
|
|
2583
2597
|
organizationId: e.organizationId.get() || "",
|
|
2584
2598
|
eventId: e.slStreamId.get() || ""
|
|
@@ -2594,7 +2608,7 @@ const To = (t, e, r, i) => {
|
|
|
2594
2608
|
}))), { $store: c, submitInplay: async () => {
|
|
2595
2609
|
const m = e.slStreamId.get();
|
|
2596
2610
|
if (m) {
|
|
2597
|
-
await
|
|
2611
|
+
await Io(r, m), c.set(ee.Completed), a.saveOnboardingStatus({
|
|
2598
2612
|
organizationId: e.organizationId.get() || "",
|
|
2599
2613
|
userId: e.userId.get() || "",
|
|
2600
2614
|
eventId: m
|
|
@@ -2603,8 +2617,8 @@ const To = (t, e, r, i) => {
|
|
|
2603
2617
|
i.close(l);
|
|
2604
2618
|
}
|
|
2605
2619
|
} };
|
|
2606
|
-
},
|
|
2607
|
-
class
|
|
2620
|
+
}, Lo = /* @__PURE__ */ new Set([fe.POLL, fe.PREDICTION, fe.TRIVIA]);
|
|
2621
|
+
class Bo extends bn {
|
|
2608
2622
|
/** user statistics (leaderboard panel) */
|
|
2609
2623
|
userSummary;
|
|
2610
2624
|
/** feed list (pick history) */
|
|
@@ -2633,7 +2647,7 @@ class ko extends mn {
|
|
|
2633
2647
|
/** Browser cache */
|
|
2634
2648
|
storage;
|
|
2635
2649
|
constructor(e, r, i) {
|
|
2636
|
-
super(e, r), this.background = new
|
|
2650
|
+
super(e, r), this.background = new wo(i), this.storage = new On(), this.userSummary = new de(Hi(this.background.slStreamId, this.background.userId, i.transport), "gamification:userSummary"), this.feedList = this.background.feedList, this.friends = new de(Yi(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 = xo(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(Oe.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Co(this.transport, this.background.slStreamId, i.stores.providerStreamId.getStore(), this.background.userId), this.leaderboardList = Oo(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.status.subscribe((s) => {
|
|
2637
2651
|
s === rt.Ready ? this.connect(i.transport) : this.disconnect();
|
|
2638
2652
|
}), this.userSummary.listen((s) => {
|
|
2639
2653
|
this.leaderboardList.$store.lc !== 0 && s?.data?.summary && window.requestAnimationFrame(() => {
|
|
@@ -2658,7 +2672,7 @@ class ko extends mn {
|
|
|
2658
2672
|
if (s === dt.RESOLVED && a === fe.PREDICTION) {
|
|
2659
2673
|
const d = this.background.getCurrentSessionId({
|
|
2660
2674
|
prefix: `notification-id:${c}`
|
|
2661
|
-
}), p = await
|
|
2675
|
+
}), p = await An(c, e), m = p?.answers.find(({ correct: w }) => w), l = p?.answers.find(({ youVoted: w }) => w);
|
|
2662
2676
|
if (!l)
|
|
2663
2677
|
return;
|
|
2664
2678
|
this.notifications.add({
|
|
@@ -2694,10 +2708,10 @@ class ko extends mn {
|
|
|
2694
2708
|
this.background.feedSubscription.removeListener("feed-subscription-questions-list");
|
|
2695
2709
|
};
|
|
2696
2710
|
submitAnswer = async (e, r) => {
|
|
2697
|
-
await
|
|
2711
|
+
await Eo(this.transport, { questionId: e, answerId: r }), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2698
2712
|
};
|
|
2699
2713
|
skipQuestion = async (e) => {
|
|
2700
|
-
await
|
|
2714
|
+
await Fo(this.transport, e), this.feedList.invalidate(), this.userSummary.invalidate();
|
|
2701
2715
|
};
|
|
2702
2716
|
openQuestion = (e) => (this.openFeature(), this.notifications.close(this.background.getCurrentSessionId({
|
|
2703
2717
|
prefix: "notification",
|
|
@@ -2719,8 +2733,8 @@ class ko extends mn {
|
|
|
2719
2733
|
*/
|
|
2720
2734
|
showInApp = (e) => {
|
|
2721
2735
|
const r = this.onboardingStatus.$store.get();
|
|
2722
|
-
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 !==
|
|
2723
|
-
if (
|
|
2736
|
+
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 !== ai.ON && e.data.question.status === dt.ACTIVE) {
|
|
2737
|
+
if (Lo.has(e.data.question.type))
|
|
2724
2738
|
this.isInteractiveAllowed && this.notifications.add({
|
|
2725
2739
|
type: Me.QUESTION,
|
|
2726
2740
|
action: () => {
|
|
@@ -2794,23 +2808,23 @@ class ko extends mn {
|
|
|
2794
2808
|
}
|
|
2795
2809
|
};
|
|
2796
2810
|
}
|
|
2797
|
-
const
|
|
2811
|
+
const Po = {
|
|
2798
2812
|
[Oe.GAMES]: !0
|
|
2799
2813
|
};
|
|
2800
|
-
class
|
|
2814
|
+
class Ro extends bn {
|
|
2801
2815
|
constructor(e, r) {
|
|
2802
2816
|
super(e, r);
|
|
2803
2817
|
}
|
|
2804
2818
|
}
|
|
2805
|
-
const
|
|
2819
|
+
const Do = (t, e, r) => t.type === Oe.GAMES ? new Bo(t, e, r) : new Ro(t, e), No = (t, e, r) => {
|
|
2806
2820
|
t.features = /* @__PURE__ */ new Map(), t.activeFeature = new se(re(Oe.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) => {
|
|
2807
2821
|
t.activeFeature.setValue(i);
|
|
2808
2822
|
}, t.sdk.closeFeature = (i = !1) => {
|
|
2809
2823
|
const s = t.activeFeature.getValue();
|
|
2810
2824
|
t.activeFeature.setValue(Oe.UNSET), i && s && t.features.delete(s);
|
|
2811
2825
|
}, t.initFeature = (i, s = Ie.ORGANIZATION) => {
|
|
2812
|
-
if (i.type in
|
|
2813
|
-
const a =
|
|
2826
|
+
if (i.type in Po && !t.features.has(i.type)) {
|
|
2827
|
+
const a = Do(i, s, t);
|
|
2814
2828
|
t.features.set(i.type, a);
|
|
2815
2829
|
}
|
|
2816
2830
|
}, t.updateFeature = (i, s) => {
|
|
@@ -2860,7 +2874,7 @@ const Po = (t, e, r) => t.type === Oe.GAMES ? new ko(t, e, r) : new Lo(t, e), Ro
|
|
|
2860
2874
|
}, r();
|
|
2861
2875
|
};
|
|
2862
2876
|
var vr = { exports: {} }, Sr = { exports: {} };
|
|
2863
|
-
function
|
|
2877
|
+
function $o(t) {
|
|
2864
2878
|
var e = new t(), r = e;
|
|
2865
2879
|
function i() {
|
|
2866
2880
|
var a = e;
|
|
@@ -2874,12 +2888,12 @@ function Do(t) {
|
|
|
2874
2888
|
release: s
|
|
2875
2889
|
};
|
|
2876
2890
|
}
|
|
2877
|
-
var
|
|
2878
|
-
function
|
|
2891
|
+
var Uo = $o, jo = Uo;
|
|
2892
|
+
function _n(t, e, r) {
|
|
2879
2893
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2880
2894
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2881
|
-
var i =
|
|
2882
|
-
push:
|
|
2895
|
+
var i = jo(Mo), s = null, a = null, c = 0, d = null, p = {
|
|
2896
|
+
push: k,
|
|
2883
2897
|
drain: oe,
|
|
2884
2898
|
saturated: oe,
|
|
2885
2899
|
pause: l,
|
|
@@ -2894,7 +2908,7 @@ function Fn(t, e, r) {
|
|
|
2894
2908
|
empty: oe,
|
|
2895
2909
|
kill: _,
|
|
2896
2910
|
killAndDrain: j,
|
|
2897
|
-
error:
|
|
2911
|
+
error: B
|
|
2898
2912
|
};
|
|
2899
2913
|
return p;
|
|
2900
2914
|
function m() {
|
|
@@ -2904,14 +2918,14 @@ function Fn(t, e, r) {
|
|
|
2904
2918
|
p.paused = !0;
|
|
2905
2919
|
}
|
|
2906
2920
|
function w() {
|
|
2907
|
-
for (var C = s,
|
|
2908
|
-
C = C.next,
|
|
2909
|
-
return
|
|
2921
|
+
for (var C = s, x = 0; C; )
|
|
2922
|
+
C = C.next, x++;
|
|
2923
|
+
return x;
|
|
2910
2924
|
}
|
|
2911
2925
|
function E() {
|
|
2912
|
-
for (var C = s,
|
|
2913
|
-
|
|
2914
|
-
return
|
|
2926
|
+
for (var C = s, x = []; C; )
|
|
2927
|
+
x.push(C.value), C = C.next;
|
|
2928
|
+
return x;
|
|
2915
2929
|
}
|
|
2916
2930
|
function F() {
|
|
2917
2931
|
if (p.paused) {
|
|
@@ -2923,18 +2937,18 @@ function Fn(t, e, r) {
|
|
|
2923
2937
|
function T() {
|
|
2924
2938
|
return c === 0 && p.length() === 0;
|
|
2925
2939
|
}
|
|
2926
|
-
function
|
|
2927
|
-
var
|
|
2928
|
-
|
|
2940
|
+
function k(C, x) {
|
|
2941
|
+
var L = i.get();
|
|
2942
|
+
L.context = t, L.release = I, L.value = C, L.callback = x || oe, L.errorHandler = d, c === p.concurrency || p.paused ? a ? (a.next = L, a = L) : (s = L, a = L, p.saturated()) : (c++, e.call(t, L.value, L.worked));
|
|
2929
2943
|
}
|
|
2930
|
-
function D(C,
|
|
2931
|
-
var
|
|
2932
|
-
|
|
2944
|
+
function D(C, x) {
|
|
2945
|
+
var L = i.get();
|
|
2946
|
+
L.context = t, L.release = I, L.value = C, L.callback = x || oe, L.errorHandler = d, c === p.concurrency || p.paused ? s ? (L.next = s, s = L) : (s = L, a = L, p.saturated()) : (c++, e.call(t, L.value, L.worked));
|
|
2933
2947
|
}
|
|
2934
2948
|
function I(C) {
|
|
2935
2949
|
C && i.release(C);
|
|
2936
|
-
var
|
|
2937
|
-
|
|
2950
|
+
var x = s;
|
|
2951
|
+
x ? p.paused ? c-- : (a === s && (a = null), s = x.next, x.next = null, e.call(t, x.value, x.worked), a === null && p.empty()) : --c === 0 && p.drain();
|
|
2938
2952
|
}
|
|
2939
2953
|
function _() {
|
|
2940
2954
|
s = null, a = null, p.drain = oe;
|
|
@@ -2942,13 +2956,13 @@ function Fn(t, e, r) {
|
|
|
2942
2956
|
function j() {
|
|
2943
2957
|
s = null, a = null, p.drain(), p.drain = oe;
|
|
2944
2958
|
}
|
|
2945
|
-
function
|
|
2959
|
+
function B(C) {
|
|
2946
2960
|
d = C;
|
|
2947
2961
|
}
|
|
2948
2962
|
}
|
|
2949
2963
|
function oe() {
|
|
2950
2964
|
}
|
|
2951
|
-
function
|
|
2965
|
+
function Mo() {
|
|
2952
2966
|
this.value = null, this.callback = oe, this.next = null, this.release = oe, this.context = null, this.errorHandler = null;
|
|
2953
2967
|
var t = this;
|
|
2954
2968
|
this.worked = function(r, i) {
|
|
@@ -2956,35 +2970,35 @@ function Uo() {
|
|
|
2956
2970
|
t.value = null, t.callback = oe, t.errorHandler && a(r, c), s.call(t.context, r, i), t.release(t);
|
|
2957
2971
|
};
|
|
2958
2972
|
}
|
|
2959
|
-
function
|
|
2973
|
+
function Vo(t, e, r) {
|
|
2960
2974
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2961
2975
|
function i(l, w) {
|
|
2962
2976
|
e.call(this, l).then(function(E) {
|
|
2963
2977
|
w(null, E);
|
|
2964
2978
|
}, w);
|
|
2965
2979
|
}
|
|
2966
|
-
var s =
|
|
2980
|
+
var s = _n(t, i, r), a = s.push, c = s.unshift;
|
|
2967
2981
|
return s.push = d, s.unshift = p, s.drained = m, s;
|
|
2968
2982
|
function d(l) {
|
|
2969
2983
|
var w = new Promise(function(E, F) {
|
|
2970
|
-
a(l, function(T,
|
|
2984
|
+
a(l, function(T, k) {
|
|
2971
2985
|
if (T) {
|
|
2972
2986
|
F(T);
|
|
2973
2987
|
return;
|
|
2974
2988
|
}
|
|
2975
|
-
E(
|
|
2989
|
+
E(k);
|
|
2976
2990
|
});
|
|
2977
2991
|
});
|
|
2978
2992
|
return w.catch(oe), w;
|
|
2979
2993
|
}
|
|
2980
2994
|
function p(l) {
|
|
2981
2995
|
var w = new Promise(function(E, F) {
|
|
2982
|
-
c(l, function(T,
|
|
2996
|
+
c(l, function(T, k) {
|
|
2983
2997
|
if (T) {
|
|
2984
2998
|
F(T);
|
|
2985
2999
|
return;
|
|
2986
3000
|
}
|
|
2987
|
-
E(
|
|
3001
|
+
E(k);
|
|
2988
3002
|
});
|
|
2989
3003
|
});
|
|
2990
3004
|
return w.catch(oe), w;
|
|
@@ -3002,9 +3016,9 @@ function jo(t, e, r) {
|
|
|
3002
3016
|
return w;
|
|
3003
3017
|
}
|
|
3004
3018
|
}
|
|
3005
|
-
Sr.exports =
|
|
3006
|
-
Sr.exports.promise =
|
|
3007
|
-
var
|
|
3019
|
+
Sr.exports = _n;
|
|
3020
|
+
Sr.exports.promise = Vo;
|
|
3021
|
+
var Tn = Sr.exports, Ar = { exports: {} }, nt = typeof Reflect == "object" ? Reflect : null, Gr = nt && typeof nt.apply == "function" ? nt.apply : function(e, r, i) {
|
|
3008
3022
|
return Function.prototype.apply.call(e, r, i);
|
|
3009
3023
|
}, At;
|
|
3010
3024
|
nt && typeof nt.ownKeys == "function" ? At = nt.ownKeys : Object.getOwnPropertySymbols ? At = function(e) {
|
|
@@ -3012,22 +3026,22 @@ nt && typeof nt.ownKeys == "function" ? At = nt.ownKeys : Object.getOwnPropertyS
|
|
|
3012
3026
|
} : At = function(e) {
|
|
3013
3027
|
return Object.getOwnPropertyNames(e);
|
|
3014
3028
|
};
|
|
3015
|
-
function
|
|
3029
|
+
function qo(t) {
|
|
3016
3030
|
console && console.warn && console.warn(t);
|
|
3017
3031
|
}
|
|
3018
|
-
var
|
|
3032
|
+
var Cn = Number.isNaN || function(e) {
|
|
3019
3033
|
return e !== e;
|
|
3020
3034
|
};
|
|
3021
3035
|
function G() {
|
|
3022
3036
|
G.init.call(this);
|
|
3023
3037
|
}
|
|
3024
3038
|
Ar.exports = G;
|
|
3025
|
-
Ar.exports.once =
|
|
3039
|
+
Ar.exports.once = Ko;
|
|
3026
3040
|
G.EventEmitter = G;
|
|
3027
3041
|
G.prototype._events = void 0;
|
|
3028
3042
|
G.prototype._eventsCount = 0;
|
|
3029
3043
|
G.prototype._maxListeners = void 0;
|
|
3030
|
-
var
|
|
3044
|
+
var zr = 10;
|
|
3031
3045
|
function $t(t) {
|
|
3032
3046
|
if (typeof t != "function")
|
|
3033
3047
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
@@ -3035,27 +3049,27 @@ function $t(t) {
|
|
|
3035
3049
|
Object.defineProperty(G, "defaultMaxListeners", {
|
|
3036
3050
|
enumerable: !0,
|
|
3037
3051
|
get: function() {
|
|
3038
|
-
return
|
|
3052
|
+
return zr;
|
|
3039
3053
|
},
|
|
3040
3054
|
set: function(t) {
|
|
3041
|
-
if (typeof t != "number" || t < 0 ||
|
|
3055
|
+
if (typeof t != "number" || t < 0 || Cn(t))
|
|
3042
3056
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3043
|
-
|
|
3057
|
+
zr = t;
|
|
3044
3058
|
}
|
|
3045
3059
|
});
|
|
3046
3060
|
G.init = function() {
|
|
3047
3061
|
(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;
|
|
3048
3062
|
};
|
|
3049
3063
|
G.prototype.setMaxListeners = function(e) {
|
|
3050
|
-
if (typeof e != "number" || e < 0 ||
|
|
3064
|
+
if (typeof e != "number" || e < 0 || Cn(e))
|
|
3051
3065
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3052
3066
|
return this._maxListeners = e, this;
|
|
3053
3067
|
};
|
|
3054
|
-
function
|
|
3068
|
+
function kn(t) {
|
|
3055
3069
|
return t._maxListeners === void 0 ? G.defaultMaxListeners : t._maxListeners;
|
|
3056
3070
|
}
|
|
3057
3071
|
G.prototype.getMaxListeners = function() {
|
|
3058
|
-
return
|
|
3072
|
+
return kn(this);
|
|
3059
3073
|
};
|
|
3060
3074
|
G.prototype.emit = function(e) {
|
|
3061
3075
|
for (var r = [], i = 1; i < arguments.length; i++)
|
|
@@ -3076,13 +3090,13 @@ G.prototype.emit = function(e) {
|
|
|
3076
3090
|
if (p === void 0)
|
|
3077
3091
|
return !1;
|
|
3078
3092
|
if (typeof p == "function")
|
|
3079
|
-
|
|
3093
|
+
Gr(p, this, r);
|
|
3080
3094
|
else
|
|
3081
|
-
for (var m = p.length, l =
|
|
3082
|
-
|
|
3095
|
+
for (var m = p.length, l = Rn(p, m), i = 0; i < m; ++i)
|
|
3096
|
+
Gr(l[i], this, r);
|
|
3083
3097
|
return !0;
|
|
3084
3098
|
};
|
|
3085
|
-
function
|
|
3099
|
+
function xn(t, e, r, i) {
|
|
3086
3100
|
var s, a, c;
|
|
3087
3101
|
if ($t(r), a = t._events, a === void 0 ? (a = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (a.newListener !== void 0 && (t.emit(
|
|
3088
3102
|
"newListener",
|
|
@@ -3090,33 +3104,33 @@ function Cn(t, e, r, i) {
|
|
|
3090
3104
|
r.listener ? r.listener : r
|
|
3091
3105
|
), a = t._events), c = a[e]), c === void 0)
|
|
3092
3106
|
c = a[e] = r, ++t._eventsCount;
|
|
3093
|
-
else if (typeof c == "function" ? c = a[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s =
|
|
3107
|
+
else if (typeof c == "function" ? c = a[e] = i ? [r, c] : [c, r] : i ? c.unshift(r) : c.push(r), s = kn(t), s > 0 && c.length > s && !c.warned) {
|
|
3094
3108
|
c.warned = !0;
|
|
3095
3109
|
var d = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3096
|
-
d.name = "MaxListenersExceededWarning", d.emitter = t, d.type = e, d.count = c.length,
|
|
3110
|
+
d.name = "MaxListenersExceededWarning", d.emitter = t, d.type = e, d.count = c.length, qo(d);
|
|
3097
3111
|
}
|
|
3098
3112
|
return t;
|
|
3099
3113
|
}
|
|
3100
3114
|
G.prototype.addListener = function(e, r) {
|
|
3101
|
-
return
|
|
3115
|
+
return xn(this, e, r, !1);
|
|
3102
3116
|
};
|
|
3103
3117
|
G.prototype.on = G.prototype.addListener;
|
|
3104
3118
|
G.prototype.prependListener = function(e, r) {
|
|
3105
|
-
return
|
|
3119
|
+
return xn(this, e, r, !0);
|
|
3106
3120
|
};
|
|
3107
|
-
function
|
|
3121
|
+
function Qo() {
|
|
3108
3122
|
if (!this.fired)
|
|
3109
3123
|
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);
|
|
3110
3124
|
}
|
|
3111
|
-
function
|
|
3112
|
-
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s =
|
|
3125
|
+
function Ln(t, e, r) {
|
|
3126
|
+
var i = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = Qo.bind(i);
|
|
3113
3127
|
return s.listener = r, i.wrapFn = s, s;
|
|
3114
3128
|
}
|
|
3115
3129
|
G.prototype.once = function(e, r) {
|
|
3116
|
-
return $t(r), this.on(e,
|
|
3130
|
+
return $t(r), this.on(e, Ln(this, e, r)), this;
|
|
3117
3131
|
};
|
|
3118
3132
|
G.prototype.prependOnceListener = function(e, r) {
|
|
3119
|
-
return $t(r), this.prependListener(e,
|
|
3133
|
+
return $t(r), this.prependListener(e, Ln(this, e, r)), this;
|
|
3120
3134
|
};
|
|
3121
3135
|
G.prototype.removeListener = function(e, r) {
|
|
3122
3136
|
var i, s, a, c, d;
|
|
@@ -3134,7 +3148,7 @@ G.prototype.removeListener = function(e, r) {
|
|
|
3134
3148
|
}
|
|
3135
3149
|
if (a < 0)
|
|
3136
3150
|
return this;
|
|
3137
|
-
a === 0 ? i.shift() :
|
|
3151
|
+
a === 0 ? i.shift() : Go(i, a), i.length === 1 && (s[e] = i[0]), s.removeListener !== void 0 && this.emit("removeListener", e, d || r);
|
|
3138
3152
|
}
|
|
3139
3153
|
return this;
|
|
3140
3154
|
};
|
|
@@ -3158,24 +3172,24 @@ G.prototype.removeAllListeners = function(e) {
|
|
|
3158
3172
|
this.removeListener(e, r[s]);
|
|
3159
3173
|
return this;
|
|
3160
3174
|
};
|
|
3161
|
-
function
|
|
3175
|
+
function Bn(t, e, r) {
|
|
3162
3176
|
var i = t._events;
|
|
3163
3177
|
if (i === void 0)
|
|
3164
3178
|
return [];
|
|
3165
3179
|
var s = i[e];
|
|
3166
|
-
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ?
|
|
3180
|
+
return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? zo(s) : Rn(s, s.length);
|
|
3167
3181
|
}
|
|
3168
3182
|
G.prototype.listeners = function(e) {
|
|
3169
|
-
return
|
|
3183
|
+
return Bn(this, e, !0);
|
|
3170
3184
|
};
|
|
3171
3185
|
G.prototype.rawListeners = function(e) {
|
|
3172
|
-
return
|
|
3186
|
+
return Bn(this, e, !1);
|
|
3173
3187
|
};
|
|
3174
3188
|
G.listenerCount = function(t, e) {
|
|
3175
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
3189
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Pn.call(t, e);
|
|
3176
3190
|
};
|
|
3177
|
-
G.prototype.listenerCount =
|
|
3178
|
-
function
|
|
3191
|
+
G.prototype.listenerCount = Pn;
|
|
3192
|
+
function Pn(t) {
|
|
3179
3193
|
var e = this._events;
|
|
3180
3194
|
if (e !== void 0) {
|
|
3181
3195
|
var r = e[t];
|
|
@@ -3189,22 +3203,22 @@ function Bn(t) {
|
|
|
3189
3203
|
G.prototype.eventNames = function() {
|
|
3190
3204
|
return this._eventsCount > 0 ? At(this._events) : [];
|
|
3191
3205
|
};
|
|
3192
|
-
function
|
|
3206
|
+
function Rn(t, e) {
|
|
3193
3207
|
for (var r = new Array(e), i = 0; i < e; ++i)
|
|
3194
3208
|
r[i] = t[i];
|
|
3195
3209
|
return r;
|
|
3196
3210
|
}
|
|
3197
|
-
function
|
|
3211
|
+
function Go(t, e) {
|
|
3198
3212
|
for (; e + 1 < t.length; e++)
|
|
3199
3213
|
t[e] = t[e + 1];
|
|
3200
3214
|
t.pop();
|
|
3201
3215
|
}
|
|
3202
|
-
function
|
|
3216
|
+
function zo(t) {
|
|
3203
3217
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3204
3218
|
e[r] = t[r].listener || t[r];
|
|
3205
3219
|
return e;
|
|
3206
3220
|
}
|
|
3207
|
-
function
|
|
3221
|
+
function Ko(t, e) {
|
|
3208
3222
|
return new Promise(function(r, i) {
|
|
3209
3223
|
function s(c) {
|
|
3210
3224
|
t.removeListener(e, a), i(c);
|
|
@@ -3212,13 +3226,13 @@ function Go(t, e) {
|
|
|
3212
3226
|
function a() {
|
|
3213
3227
|
typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
|
|
3214
3228
|
}
|
|
3215
|
-
|
|
3229
|
+
Dn(t, e, a, { once: !0 }), e !== "error" && Wo(t, s, { once: !0 });
|
|
3216
3230
|
});
|
|
3217
3231
|
}
|
|
3218
|
-
function
|
|
3219
|
-
typeof t.on == "function" &&
|
|
3232
|
+
function Wo(t, e, r) {
|
|
3233
|
+
typeof t.on == "function" && Dn(t, "error", e, r);
|
|
3220
3234
|
}
|
|
3221
|
-
function
|
|
3235
|
+
function Dn(t, e, r, i) {
|
|
3222
3236
|
if (typeof t.on == "function")
|
|
3223
3237
|
i.once ? t.once(e, r) : t.on(e, r);
|
|
3224
3238
|
else if (typeof t.addEventListener == "function")
|
|
@@ -3228,7 +3242,7 @@ function Pn(t, e, r, i) {
|
|
|
3228
3242
|
else
|
|
3229
3243
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3230
3244
|
}
|
|
3231
|
-
var
|
|
3245
|
+
var Nn = Ar.exports, Ut = {}, $n = {}, Un = function() {
|
|
3232
3246
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3233
3247
|
return !1;
|
|
3234
3248
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3251,55 +3265,55 @@ var Rn = Ar.exports, Ut = {}, Dn = {}, Nn = function() {
|
|
|
3251
3265
|
return !1;
|
|
3252
3266
|
}
|
|
3253
3267
|
return !0;
|
|
3254
|
-
},
|
|
3255
|
-
return
|
|
3256
|
-
},
|
|
3257
|
-
return typeof
|
|
3258
|
-
},
|
|
3268
|
+
}, Ho = Un, Er = function() {
|
|
3269
|
+
return Ho() && !!Symbol.toStringTag;
|
|
3270
|
+
}, Kr = typeof Symbol < "u" && Symbol, Jo = Un, Yo = function() {
|
|
3271
|
+
return typeof Kr != "function" || typeof Symbol != "function" || typeof Kr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Jo();
|
|
3272
|
+
}, Wr = {
|
|
3259
3273
|
foo: {}
|
|
3260
|
-
},
|
|
3261
|
-
return { __proto__:
|
|
3262
|
-
},
|
|
3274
|
+
}, Xo = Object, Zo = function() {
|
|
3275
|
+
return { __proto__: Wr }.foo === Wr.foo && !({ __proto__: null } instanceof Xo);
|
|
3276
|
+
}, es = "Function.prototype.bind called on incompatible ", ts = Object.prototype.toString, rs = Math.max, ns = "[object Function]", Hr = function(e, r) {
|
|
3263
3277
|
for (var i = [], s = 0; s < e.length; s += 1)
|
|
3264
3278
|
i[s] = e[s];
|
|
3265
3279
|
for (var a = 0; a < r.length; a += 1)
|
|
3266
3280
|
i[a + e.length] = r[a];
|
|
3267
3281
|
return i;
|
|
3268
|
-
},
|
|
3282
|
+
}, is = function(e, r) {
|
|
3269
3283
|
for (var i = [], s = r || 0, a = 0; s < e.length; s += 1, a += 1)
|
|
3270
3284
|
i[a] = e[s];
|
|
3271
3285
|
return i;
|
|
3272
|
-
},
|
|
3286
|
+
}, os = function(t, e) {
|
|
3273
3287
|
for (var r = "", i = 0; i < t.length; i += 1)
|
|
3274
3288
|
r += t[i], i + 1 < t.length && (r += e);
|
|
3275
3289
|
return r;
|
|
3276
|
-
},
|
|
3290
|
+
}, ss = function(e) {
|
|
3277
3291
|
var r = this;
|
|
3278
|
-
if (typeof r != "function" ||
|
|
3279
|
-
throw new TypeError(
|
|
3280
|
-
for (var i =
|
|
3292
|
+
if (typeof r != "function" || ts.apply(r) !== ns)
|
|
3293
|
+
throw new TypeError(es + r);
|
|
3294
|
+
for (var i = is(arguments, 1), s, a = function() {
|
|
3281
3295
|
if (this instanceof s) {
|
|
3282
3296
|
var l = r.apply(
|
|
3283
3297
|
this,
|
|
3284
|
-
|
|
3298
|
+
Hr(i, arguments)
|
|
3285
3299
|
);
|
|
3286
3300
|
return Object(l) === l ? l : this;
|
|
3287
3301
|
}
|
|
3288
3302
|
return r.apply(
|
|
3289
3303
|
e,
|
|
3290
|
-
|
|
3304
|
+
Hr(i, arguments)
|
|
3291
3305
|
);
|
|
3292
|
-
}, c =
|
|
3306
|
+
}, c = rs(0, r.length - i.length), d = [], p = 0; p < c; p++)
|
|
3293
3307
|
d[p] = "$" + p;
|
|
3294
|
-
if (s = Function("binder", "return function (" +
|
|
3308
|
+
if (s = Function("binder", "return function (" + os(d, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) {
|
|
3295
3309
|
var m = function() {
|
|
3296
3310
|
};
|
|
3297
3311
|
m.prototype = r.prototype, s.prototype = new m(), m.prototype = null;
|
|
3298
3312
|
}
|
|
3299
3313
|
return s;
|
|
3300
|
-
},
|
|
3314
|
+
}, as = ss, Ir = Function.prototype.bind || as, us = Function.prototype.call, cs = Object.prototype.hasOwnProperty, ls = Ir, fs = ls.call(us, cs), U, ot = SyntaxError, jn = Function, it = TypeError, Qt = function(t) {
|
|
3301
3315
|
try {
|
|
3302
|
-
return
|
|
3316
|
+
return jn('"use strict"; return (' + t + ").constructor;")();
|
|
3303
3317
|
} catch {
|
|
3304
3318
|
}
|
|
3305
3319
|
}, qe = Object.getOwnPropertyDescriptor;
|
|
@@ -3311,7 +3325,7 @@ if (qe)
|
|
|
3311
3325
|
}
|
|
3312
3326
|
var Gt = function() {
|
|
3313
3327
|
throw new it();
|
|
3314
|
-
},
|
|
3328
|
+
}, ds = qe ? function() {
|
|
3315
3329
|
try {
|
|
3316
3330
|
return arguments.callee, Gt;
|
|
3317
3331
|
} catch {
|
|
@@ -3321,9 +3335,9 @@ var Gt = function() {
|
|
|
3321
3335
|
return Gt;
|
|
3322
3336
|
}
|
|
3323
3337
|
}
|
|
3324
|
-
}() : Gt, We =
|
|
3338
|
+
}() : Gt, We = Yo(), hs = Zo(), X = Object.getPrototypeOf || (hs ? function(t) {
|
|
3325
3339
|
return t.__proto__;
|
|
3326
|
-
} : null), Je = {},
|
|
3340
|
+
} : null), Je = {}, ps = typeof Uint8Array > "u" || !X ? U : X(Uint8Array), Qe = {
|
|
3327
3341
|
"%AggregateError%": typeof AggregateError > "u" ? U : AggregateError,
|
|
3328
3342
|
"%Array%": Array,
|
|
3329
3343
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? U : ArrayBuffer,
|
|
@@ -3351,7 +3365,7 @@ var Gt = function() {
|
|
|
3351
3365
|
"%Float32Array%": typeof Float32Array > "u" ? U : Float32Array,
|
|
3352
3366
|
"%Float64Array%": typeof Float64Array > "u" ? U : Float64Array,
|
|
3353
3367
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? U : FinalizationRegistry,
|
|
3354
|
-
"%Function%":
|
|
3368
|
+
"%Function%": jn,
|
|
3355
3369
|
"%GeneratorFunction%": Je,
|
|
3356
3370
|
"%Int8Array%": typeof Int8Array > "u" ? U : Int8Array,
|
|
3357
3371
|
"%Int16Array%": typeof Int16Array > "u" ? U : Int16Array,
|
|
@@ -3380,8 +3394,8 @@ var Gt = function() {
|
|
|
3380
3394
|
"%StringIteratorPrototype%": We && X ? X(""[Symbol.iterator]()) : U,
|
|
3381
3395
|
"%Symbol%": We ? Symbol : U,
|
|
3382
3396
|
"%SyntaxError%": ot,
|
|
3383
|
-
"%ThrowTypeError%":
|
|
3384
|
-
"%TypedArray%":
|
|
3397
|
+
"%ThrowTypeError%": ds,
|
|
3398
|
+
"%TypedArray%": ps,
|
|
3385
3399
|
"%TypeError%": it,
|
|
3386
3400
|
"%Uint8Array%": typeof Uint8Array > "u" ? U : Uint8Array,
|
|
3387
3401
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? U : Uint8ClampedArray,
|
|
@@ -3396,10 +3410,10 @@ if (X)
|
|
|
3396
3410
|
try {
|
|
3397
3411
|
null.error;
|
|
3398
3412
|
} catch (t) {
|
|
3399
|
-
var
|
|
3400
|
-
Qe["%Error.prototype%"] =
|
|
3413
|
+
var ys = X(X(t));
|
|
3414
|
+
Qe["%Error.prototype%"] = ys;
|
|
3401
3415
|
}
|
|
3402
|
-
var
|
|
3416
|
+
var gs = function t(e) {
|
|
3403
3417
|
var r;
|
|
3404
3418
|
if (e === "%AsyncFunction%")
|
|
3405
3419
|
r = Qt("async function () {}");
|
|
@@ -3415,7 +3429,7 @@ var ps = function t(e) {
|
|
|
3415
3429
|
s && X && (r = X(s.prototype));
|
|
3416
3430
|
}
|
|
3417
3431
|
return Qe[e] = r, r;
|
|
3418
|
-
},
|
|
3432
|
+
}, Jr = {
|
|
3419
3433
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3420
3434
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
3421
3435
|
"%ArrayProto_entries%": ["Array", "prototype", "entries"],
|
|
@@ -3467,21 +3481,21 @@ var ps = function t(e) {
|
|
|
3467
3481
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3468
3482
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3469
3483
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3470
|
-
}, mt = Ir, Tt =
|
|
3484
|
+
}, mt = Ir, Tt = fs, ms = mt.call(Function.call, Array.prototype.concat), ws = mt.call(Function.apply, Array.prototype.splice), Yr = mt.call(Function.call, String.prototype.replace), Ct = mt.call(Function.call, String.prototype.slice), bs = mt.call(Function.call, RegExp.prototype.exec), vs = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Ss = /\\(\\)?/g, As = function(e) {
|
|
3471
3485
|
var r = Ct(e, 0, 1), i = Ct(e, -1);
|
|
3472
3486
|
if (r === "%" && i !== "%")
|
|
3473
3487
|
throw new ot("invalid intrinsic syntax, expected closing `%`");
|
|
3474
3488
|
if (i === "%" && r !== "%")
|
|
3475
3489
|
throw new ot("invalid intrinsic syntax, expected opening `%`");
|
|
3476
3490
|
var s = [];
|
|
3477
|
-
return
|
|
3478
|
-
s[s.length] = d ?
|
|
3491
|
+
return Yr(e, vs, function(a, c, d, p) {
|
|
3492
|
+
s[s.length] = d ? Yr(p, Ss, "$1") : c || a;
|
|
3479
3493
|
}), s;
|
|
3480
|
-
},
|
|
3494
|
+
}, Es = function(e, r) {
|
|
3481
3495
|
var i = e, s;
|
|
3482
|
-
if (Tt(
|
|
3496
|
+
if (Tt(Jr, i) && (s = Jr[i], i = "%" + s[0] + "%"), Tt(Qe, i)) {
|
|
3483
3497
|
var a = Qe[i];
|
|
3484
|
-
if (a === Je && (a =
|
|
3498
|
+
if (a === Je && (a = gs(i)), typeof a > "u" && !r)
|
|
3485
3499
|
throw new it("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3486
3500
|
return {
|
|
3487
3501
|
alias: s,
|
|
@@ -3495,10 +3509,10 @@ var ps = function t(e) {
|
|
|
3495
3509
|
throw new it("intrinsic name must be a non-empty string");
|
|
3496
3510
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3497
3511
|
throw new it('"allowMissing" argument must be a boolean');
|
|
3498
|
-
if (
|
|
3512
|
+
if (bs(/^%?[^%]*%?$/, e) === null)
|
|
3499
3513
|
throw new ot("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3500
|
-
var i =
|
|
3501
|
-
m && (s = m[0],
|
|
3514
|
+
var i = As(e), s = i.length > 0 ? i[0] : "", a = Es("%" + s + "%", r), c = a.name, d = a.value, p = !1, m = a.alias;
|
|
3515
|
+
m && (s = m[0], ws(i, ms([0, 1], m)));
|
|
3502
3516
|
for (var l = 1, w = !0; l < i.length; l += 1) {
|
|
3503
3517
|
var E = i[l], F = Ct(E, 0, 1), T = Ct(E, -1);
|
|
3504
3518
|
if ((F === '"' || F === "'" || F === "`" || T === '"' || T === "'" || T === "`") && F !== T)
|
|
@@ -3512,15 +3526,15 @@ var ps = function t(e) {
|
|
|
3512
3526
|
return;
|
|
3513
3527
|
}
|
|
3514
3528
|
if (qe && l + 1 >= i.length) {
|
|
3515
|
-
var
|
|
3516
|
-
w = !!
|
|
3529
|
+
var k = qe(d, E);
|
|
3530
|
+
w = !!k, w && "get" in k && !("originalValue" in k.get) ? d = k.get : d = d[E];
|
|
3517
3531
|
} else
|
|
3518
3532
|
w = Tt(d, E), d = d[E];
|
|
3519
3533
|
w && !p && (Qe[c] = d);
|
|
3520
3534
|
}
|
|
3521
3535
|
}
|
|
3522
3536
|
return d;
|
|
3523
|
-
},
|
|
3537
|
+
}, Mn = { exports: {} }, Is = at, sr = Is("%Object.defineProperty%", !0), ar = function() {
|
|
3524
3538
|
if (sr)
|
|
3525
3539
|
try {
|
|
3526
3540
|
return sr({}, "a", { value: 1 }), !0;
|
|
@@ -3538,21 +3552,21 @@ ar.hasArrayLengthDefineBug = function() {
|
|
|
3538
3552
|
return !0;
|
|
3539
3553
|
}
|
|
3540
3554
|
};
|
|
3541
|
-
var
|
|
3555
|
+
var Vn = ar, Fs = at, Et = Fs("%Object.getOwnPropertyDescriptor%", !0);
|
|
3542
3556
|
if (Et)
|
|
3543
3557
|
try {
|
|
3544
3558
|
Et([], "length");
|
|
3545
3559
|
} catch {
|
|
3546
3560
|
Et = null;
|
|
3547
3561
|
}
|
|
3548
|
-
var Fr = Et,
|
|
3562
|
+
var Fr = Et, Os = Vn(), Or = at, ht = Os && Or("%Object.defineProperty%", !0);
|
|
3549
3563
|
if (ht)
|
|
3550
3564
|
try {
|
|
3551
3565
|
ht({}, "a", { value: 1 });
|
|
3552
3566
|
} catch {
|
|
3553
3567
|
ht = !1;
|
|
3554
3568
|
}
|
|
3555
|
-
var
|
|
3569
|
+
var _s = Or("%SyntaxError%"), He = Or("%TypeError%"), Xr = Fr, Ts = function(e, r, i) {
|
|
3556
3570
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3557
3571
|
throw new He("`obj` must be an object or a function`");
|
|
3558
3572
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3565,7 +3579,7 @@ var Fs = Or("%SyntaxError%"), He = Or("%TypeError%"), Jr = Fr, Os = function(e,
|
|
|
3565
3579
|
throw new He("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3566
3580
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3567
3581
|
throw new He("`loose`, if provided, must be a boolean");
|
|
3568
|
-
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 = !!
|
|
3582
|
+
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 = !!Xr && Xr(e, r);
|
|
3569
3583
|
if (ht)
|
|
3570
3584
|
ht(e, r, {
|
|
3571
3585
|
configurable: c === null && p ? p.configurable : !c,
|
|
@@ -3576,25 +3590,25 @@ var Fs = Or("%SyntaxError%"), He = Or("%TypeError%"), Jr = Fr, Os = function(e,
|
|
|
3576
3590
|
else if (d || !s && !a && !c)
|
|
3577
3591
|
e[r] = i;
|
|
3578
3592
|
else
|
|
3579
|
-
throw new
|
|
3580
|
-
},
|
|
3593
|
+
throw new _s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3594
|
+
}, qn = at, Zr = Ts, Cs = Vn(), en = Fr, tn = qn("%TypeError%"), ks = qn("%Math.floor%"), xs = function(e, r) {
|
|
3581
3595
|
if (typeof e != "function")
|
|
3582
|
-
throw new
|
|
3583
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3584
|
-
throw new
|
|
3596
|
+
throw new tn("`fn` is not a function");
|
|
3597
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || ks(r) !== r)
|
|
3598
|
+
throw new tn("`length` must be a positive 32-bit integer");
|
|
3585
3599
|
var i = arguments.length > 2 && !!arguments[2], s = !0, a = !0;
|
|
3586
|
-
if ("length" in e &&
|
|
3587
|
-
var c =
|
|
3600
|
+
if ("length" in e && en) {
|
|
3601
|
+
var c = en(e, "length");
|
|
3588
3602
|
c && !c.configurable && (s = !1), c && !c.writable && (a = !1);
|
|
3589
3603
|
}
|
|
3590
|
-
return (s || a || !i) && (
|
|
3604
|
+
return (s || a || !i) && (Cs ? Zr(
|
|
3591
3605
|
/** @type {Parameters<define>[0]} */
|
|
3592
3606
|
e,
|
|
3593
3607
|
"length",
|
|
3594
3608
|
r,
|
|
3595
3609
|
!0,
|
|
3596
3610
|
!0
|
|
3597
|
-
) :
|
|
3611
|
+
) : Zr(
|
|
3598
3612
|
/** @type {Parameters<define>[0]} */
|
|
3599
3613
|
e,
|
|
3600
3614
|
"length",
|
|
@@ -3602,7 +3616,7 @@ var Fs = Or("%SyntaxError%"), He = Or("%TypeError%"), Jr = Fr, Os = function(e,
|
|
|
3602
3616
|
)), e;
|
|
3603
3617
|
};
|
|
3604
3618
|
(function(t) {
|
|
3605
|
-
var e = Ir, r = at, i =
|
|
3619
|
+
var e = Ir, r = at, i = xs, 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%");
|
|
3606
3620
|
if (p)
|
|
3607
3621
|
try {
|
|
3608
3622
|
p({}, "a", { value: 1 });
|
|
@@ -3623,42 +3637,42 @@ var Fs = Or("%SyntaxError%"), He = Or("%TypeError%"), Jr = Fr, Os = function(e,
|
|
|
3623
3637
|
return d(e, a, arguments);
|
|
3624
3638
|
};
|
|
3625
3639
|
p ? p(t.exports, "apply", { value: l }) : t.exports.apply = l;
|
|
3626
|
-
})(
|
|
3627
|
-
var
|
|
3628
|
-
var i =
|
|
3629
|
-
return typeof i == "function" &&
|
|
3630
|
-
},
|
|
3631
|
-
return
|
|
3632
|
-
},
|
|
3640
|
+
})(Mn);
|
|
3641
|
+
var Qn = Mn.exports, Gn = at, zn = Qn, Ls = zn(Gn("String.prototype.indexOf")), Kn = function(e, r) {
|
|
3642
|
+
var i = Gn(e, !!r);
|
|
3643
|
+
return typeof i == "function" && Ls(e, ".prototype.") > -1 ? zn(i) : i;
|
|
3644
|
+
}, Bs = Er(), Ps = Kn, ur = Ps("Object.prototype.toString"), jt = function(e) {
|
|
3645
|
+
return Bs && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : ur(e) === "[object Arguments]";
|
|
3646
|
+
}, Wn = function(e) {
|
|
3633
3647
|
return jt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && ur(e) !== "[object Array]" && ur(e.callee) === "[object Function]";
|
|
3634
|
-
},
|
|
3648
|
+
}, Rs = function() {
|
|
3635
3649
|
return jt(arguments);
|
|
3636
3650
|
}();
|
|
3637
|
-
jt.isLegacyArguments =
|
|
3638
|
-
var
|
|
3639
|
-
if (!
|
|
3651
|
+
jt.isLegacyArguments = Wn;
|
|
3652
|
+
var Ds = Rs ? jt : Wn, Ns = Object.prototype.toString, $s = Function.prototype.toString, Us = /^\s*(?:function)?\*/, Hn = Er(), zt = Object.getPrototypeOf, js = function() {
|
|
3653
|
+
if (!Hn)
|
|
3640
3654
|
return !1;
|
|
3641
3655
|
try {
|
|
3642
3656
|
return Function("return function*() {}")();
|
|
3643
3657
|
} catch {
|
|
3644
3658
|
}
|
|
3645
|
-
}, Kt,
|
|
3659
|
+
}, Kt, Ms = function(e) {
|
|
3646
3660
|
if (typeof e != "function")
|
|
3647
3661
|
return !1;
|
|
3648
|
-
if (
|
|
3662
|
+
if (Us.test($s.call(e)))
|
|
3649
3663
|
return !0;
|
|
3650
|
-
if (!
|
|
3651
|
-
var r =
|
|
3664
|
+
if (!Hn) {
|
|
3665
|
+
var r = Ns.call(e);
|
|
3652
3666
|
return r === "[object GeneratorFunction]";
|
|
3653
3667
|
}
|
|
3654
3668
|
if (!zt)
|
|
3655
3669
|
return !1;
|
|
3656
3670
|
if (typeof Kt > "u") {
|
|
3657
|
-
var i =
|
|
3671
|
+
var i = js();
|
|
3658
3672
|
Kt = i ? zt(i) : !1;
|
|
3659
3673
|
}
|
|
3660
3674
|
return zt(e) === Kt;
|
|
3661
|
-
},
|
|
3675
|
+
}, Jn = Function.prototype.toString, Ze = typeof Reflect == "object" && Reflect !== null && Reflect.apply, cr, It;
|
|
3662
3676
|
if (typeof Ze == "function" && typeof Object.defineProperty == "function")
|
|
3663
3677
|
try {
|
|
3664
3678
|
cr = Object.defineProperty({}, "length", {
|
|
@@ -3673,35 +3687,35 @@ if (typeof Ze == "function" && typeof Object.defineProperty == "function")
|
|
|
3673
3687
|
}
|
|
3674
3688
|
else
|
|
3675
3689
|
Ze = null;
|
|
3676
|
-
var
|
|
3690
|
+
var Vs = /^\s*class\b/, lr = function(e) {
|
|
3677
3691
|
try {
|
|
3678
|
-
var r =
|
|
3679
|
-
return
|
|
3692
|
+
var r = Jn.call(e);
|
|
3693
|
+
return Vs.test(r);
|
|
3680
3694
|
} catch {
|
|
3681
3695
|
return !1;
|
|
3682
3696
|
}
|
|
3683
3697
|
}, Wt = function(e) {
|
|
3684
3698
|
try {
|
|
3685
|
-
return lr(e) ? !1 : (
|
|
3699
|
+
return lr(e) ? !1 : (Jn.call(e), !0);
|
|
3686
3700
|
} catch {
|
|
3687
3701
|
return !1;
|
|
3688
3702
|
}
|
|
3689
|
-
}, Ft = Object.prototype.toString,
|
|
3703
|
+
}, Ft = Object.prototype.toString, qs = "[object Object]", Qs = "[object Function]", Gs = "[object GeneratorFunction]", zs = "[object HTMLAllCollection]", Ks = "[object HTML document.all class]", Ws = "[object HTMLCollection]", Hs = typeof Symbol == "function" && !!Symbol.toStringTag, Js = !(0 in [,]), fr = function() {
|
|
3690
3704
|
return !1;
|
|
3691
3705
|
};
|
|
3692
3706
|
if (typeof document == "object") {
|
|
3693
|
-
var
|
|
3694
|
-
Ft.call(
|
|
3695
|
-
if ((
|
|
3707
|
+
var Ys = document.all;
|
|
3708
|
+
Ft.call(Ys) === Ft.call(document.all) && (fr = function(e) {
|
|
3709
|
+
if ((Js || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3696
3710
|
try {
|
|
3697
3711
|
var r = Ft.call(e);
|
|
3698
|
-
return (r ===
|
|
3712
|
+
return (r === zs || r === Ks || r === Ws || r === qs) && e("") == null;
|
|
3699
3713
|
} catch {
|
|
3700
3714
|
}
|
|
3701
3715
|
return !1;
|
|
3702
3716
|
});
|
|
3703
3717
|
}
|
|
3704
|
-
var
|
|
3718
|
+
var Xs = Ze ? function(e) {
|
|
3705
3719
|
if (fr(e))
|
|
3706
3720
|
return !0;
|
|
3707
3721
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3718,27 +3732,27 @@ var Js = Ze ? function(e) {
|
|
|
3718
3732
|
return !0;
|
|
3719
3733
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3720
3734
|
return !1;
|
|
3721
|
-
if (
|
|
3735
|
+
if (Hs)
|
|
3722
3736
|
return Wt(e);
|
|
3723
3737
|
if (lr(e))
|
|
3724
3738
|
return !1;
|
|
3725
3739
|
var r = Ft.call(e);
|
|
3726
|
-
return r !==
|
|
3727
|
-
},
|
|
3740
|
+
return r !== Qs && r !== Gs && !/^\[object HTML/.test(r) ? !1 : Wt(e);
|
|
3741
|
+
}, Zs = Xs, ea = Object.prototype.toString, Yn = Object.prototype.hasOwnProperty, ta = function(e, r, i) {
|
|
3728
3742
|
for (var s = 0, a = e.length; s < a; s++)
|
|
3729
|
-
|
|
3730
|
-
},
|
|
3743
|
+
Yn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3744
|
+
}, ra = function(e, r, i) {
|
|
3731
3745
|
for (var s = 0, a = e.length; s < a; s++)
|
|
3732
3746
|
i == null ? r(e.charAt(s), s, e) : r.call(i, e.charAt(s), s, e);
|
|
3733
|
-
},
|
|
3747
|
+
}, na = function(e, r, i) {
|
|
3734
3748
|
for (var s in e)
|
|
3735
|
-
|
|
3736
|
-
},
|
|
3737
|
-
if (!
|
|
3749
|
+
Yn.call(e, s) && (i == null ? r(e[s], s, e) : r.call(i, e[s], s, e));
|
|
3750
|
+
}, ia = function(e, r, i) {
|
|
3751
|
+
if (!Zs(r))
|
|
3738
3752
|
throw new TypeError("iterator must be a function");
|
|
3739
3753
|
var s;
|
|
3740
|
-
arguments.length >= 3 && (s = i),
|
|
3741
|
-
},
|
|
3754
|
+
arguments.length >= 3 && (s = i), ea.call(e) === "[object Array]" ? ta(e, r, s) : typeof e == "string" ? ra(e, r, s) : na(e, r, s);
|
|
3755
|
+
}, oa = ia, Ht = [
|
|
3742
3756
|
"BigInt64Array",
|
|
3743
3757
|
"BigUint64Array",
|
|
3744
3758
|
"Float32Array",
|
|
@@ -3750,61 +3764,61 @@ var Js = Ze ? function(e) {
|
|
|
3750
3764
|
"Uint32Array",
|
|
3751
3765
|
"Uint8Array",
|
|
3752
3766
|
"Uint8ClampedArray"
|
|
3753
|
-
],
|
|
3767
|
+
], sa = typeof globalThis > "u" ? Fn : globalThis, aa = function() {
|
|
3754
3768
|
for (var e = [], r = 0; r < Ht.length; r++)
|
|
3755
|
-
typeof
|
|
3769
|
+
typeof sa[Ht[r]] == "function" && (e[e.length] = Ht[r]);
|
|
3756
3770
|
return e;
|
|
3757
|
-
},
|
|
3771
|
+
}, kt = oa, ua = aa, rn = Qn, _r = Kn, Ot = Fr, ca = _r("Object.prototype.toString"), Xn = Er(), nn = typeof globalThis > "u" ? Fn : globalThis, dr = ua(), Tr = _r("String.prototype.slice"), Jt = Object.getPrototypeOf, la = _r("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3758
3772
|
for (var i = 0; i < e.length; i += 1)
|
|
3759
3773
|
if (e[i] === r)
|
|
3760
3774
|
return i;
|
|
3761
3775
|
return -1;
|
|
3762
|
-
},
|
|
3763
|
-
|
|
3764
|
-
var e = new
|
|
3776
|
+
}, xt = { __proto__: null };
|
|
3777
|
+
Xn && Ot && Jt ? kt(dr, function(t) {
|
|
3778
|
+
var e = new nn[t]();
|
|
3765
3779
|
if (Symbol.toStringTag in e) {
|
|
3766
3780
|
var r = Jt(e), i = Ot(r, Symbol.toStringTag);
|
|
3767
3781
|
if (!i) {
|
|
3768
3782
|
var s = Jt(r);
|
|
3769
3783
|
i = Ot(s, Symbol.toStringTag);
|
|
3770
3784
|
}
|
|
3771
|
-
|
|
3785
|
+
xt["$" + t] = rn(i.get);
|
|
3772
3786
|
}
|
|
3773
|
-
}) :
|
|
3774
|
-
var e = new
|
|
3775
|
-
r && (
|
|
3787
|
+
}) : kt(dr, function(t) {
|
|
3788
|
+
var e = new nn[t](), r = e.slice || e.set;
|
|
3789
|
+
r && (xt["$" + t] = rn(r));
|
|
3776
3790
|
});
|
|
3777
|
-
var
|
|
3791
|
+
var fa = function(e) {
|
|
3778
3792
|
var r = !1;
|
|
3779
|
-
return xt
|
|
3793
|
+
return kt(xt, function(i, s) {
|
|
3780
3794
|
if (!r)
|
|
3781
3795
|
try {
|
|
3782
3796
|
"$" + i(e) === s && (r = Tr(s, 1));
|
|
3783
3797
|
} catch {
|
|
3784
3798
|
}
|
|
3785
3799
|
}), r;
|
|
3786
|
-
},
|
|
3800
|
+
}, da = function(e) {
|
|
3787
3801
|
var r = !1;
|
|
3788
|
-
return xt
|
|
3802
|
+
return kt(xt, function(i, s) {
|
|
3789
3803
|
if (!r)
|
|
3790
3804
|
try {
|
|
3791
3805
|
i(e), r = Tr(s, 1);
|
|
3792
3806
|
} catch {
|
|
3793
3807
|
}
|
|
3794
3808
|
}), r;
|
|
3795
|
-
},
|
|
3809
|
+
}, Zn = function(e) {
|
|
3796
3810
|
if (!e || typeof e != "object")
|
|
3797
3811
|
return !1;
|
|
3798
|
-
if (!
|
|
3799
|
-
var r = Tr(
|
|
3800
|
-
return
|
|
3812
|
+
if (!Xn) {
|
|
3813
|
+
var r = Tr(ca(e), 8, -1);
|
|
3814
|
+
return la(dr, r) > -1 ? r : r !== "Object" ? !1 : da(e);
|
|
3801
3815
|
}
|
|
3802
|
-
return Ot ?
|
|
3803
|
-
},
|
|
3804
|
-
return !!
|
|
3816
|
+
return Ot ? fa(e) : null;
|
|
3817
|
+
}, ha = Zn, pa = function(e) {
|
|
3818
|
+
return !!ha(e);
|
|
3805
3819
|
};
|
|
3806
3820
|
(function(t) {
|
|
3807
|
-
var e =
|
|
3821
|
+
var e = Ds, r = Ms, i = Zn, s = pa;
|
|
3808
3822
|
function a(A) {
|
|
3809
3823
|
return A.call.bind(A);
|
|
3810
3824
|
}
|
|
@@ -3823,10 +3837,10 @@ var ca = function(e) {
|
|
|
3823
3837
|
}
|
|
3824
3838
|
}
|
|
3825
3839
|
t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = s;
|
|
3826
|
-
function
|
|
3840
|
+
function k(A) {
|
|
3827
3841
|
return typeof Promise < "u" && A instanceof Promise || A !== null && typeof A == "object" && typeof A.then == "function" && typeof A.catch == "function";
|
|
3828
3842
|
}
|
|
3829
|
-
t.isPromise =
|
|
3843
|
+
t.isPromise = k;
|
|
3830
3844
|
function D(A) {
|
|
3831
3845
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(A) : s(A) || v(A);
|
|
3832
3846
|
}
|
|
@@ -3843,22 +3857,22 @@ var ca = function(e) {
|
|
|
3843
3857
|
return i(A) === "Uint16Array";
|
|
3844
3858
|
}
|
|
3845
3859
|
t.isUint16Array = j;
|
|
3846
|
-
function
|
|
3860
|
+
function B(A) {
|
|
3847
3861
|
return i(A) === "Uint32Array";
|
|
3848
3862
|
}
|
|
3849
|
-
t.isUint32Array =
|
|
3863
|
+
t.isUint32Array = B;
|
|
3850
3864
|
function C(A) {
|
|
3851
3865
|
return i(A) === "Int8Array";
|
|
3852
3866
|
}
|
|
3853
3867
|
t.isInt8Array = C;
|
|
3854
|
-
function
|
|
3868
|
+
function x(A) {
|
|
3855
3869
|
return i(A) === "Int16Array";
|
|
3856
3870
|
}
|
|
3857
|
-
t.isInt16Array =
|
|
3858
|
-
function
|
|
3871
|
+
t.isInt16Array = x;
|
|
3872
|
+
function L(A) {
|
|
3859
3873
|
return i(A) === "Int32Array";
|
|
3860
3874
|
}
|
|
3861
|
-
t.isInt32Array =
|
|
3875
|
+
t.isInt32Array = L;
|
|
3862
3876
|
function q(A) {
|
|
3863
3877
|
return i(A) === "Float32Array";
|
|
3864
3878
|
}
|
|
@@ -3891,12 +3905,12 @@ var ca = function(e) {
|
|
|
3891
3905
|
return typeof Set > "u" ? !1 : he.working ? he(A) : A instanceof Set;
|
|
3892
3906
|
}
|
|
3893
3907
|
t.isSet = Re;
|
|
3894
|
-
function
|
|
3908
|
+
function xe(A) {
|
|
3895
3909
|
return p(A) === "[object WeakMap]";
|
|
3896
3910
|
}
|
|
3897
|
-
|
|
3911
|
+
xe.working = typeof WeakMap < "u" && xe(/* @__PURE__ */ new WeakMap());
|
|
3898
3912
|
function Ge(A) {
|
|
3899
|
-
return typeof WeakMap > "u" ? !1 :
|
|
3913
|
+
return typeof WeakMap > "u" ? !1 : xe.working ? xe(A) : A instanceof WeakMap;
|
|
3900
3914
|
}
|
|
3901
3915
|
t.isWeakMap = Ge;
|
|
3902
3916
|
function Se(A) {
|
|
@@ -3907,12 +3921,12 @@ var ca = function(e) {
|
|
|
3907
3921
|
return Se(A);
|
|
3908
3922
|
}
|
|
3909
3923
|
t.isWeakSet = ue;
|
|
3910
|
-
function
|
|
3924
|
+
function Le(A) {
|
|
3911
3925
|
return p(A) === "[object ArrayBuffer]";
|
|
3912
3926
|
}
|
|
3913
|
-
|
|
3927
|
+
Le.working = typeof ArrayBuffer < "u" && Le(new ArrayBuffer());
|
|
3914
3928
|
function ze(A) {
|
|
3915
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
3929
|
+
return typeof ArrayBuffer > "u" ? !1 : Le.working ? Le(A) : A instanceof ArrayBuffer;
|
|
3916
3930
|
}
|
|
3917
3931
|
t.isArrayBuffer = ze;
|
|
3918
3932
|
function g(A) {
|
|
@@ -3959,10 +3973,10 @@ var ca = function(e) {
|
|
|
3959
3973
|
return T(A, l);
|
|
3960
3974
|
}
|
|
3961
3975
|
t.isStringObject = De;
|
|
3962
|
-
function
|
|
3976
|
+
function Be(A) {
|
|
3963
3977
|
return T(A, w);
|
|
3964
3978
|
}
|
|
3965
|
-
t.isBooleanObject =
|
|
3979
|
+
t.isBooleanObject = Be;
|
|
3966
3980
|
function Ne(A) {
|
|
3967
3981
|
return c && T(A, E);
|
|
3968
3982
|
}
|
|
@@ -3972,7 +3986,7 @@ var ca = function(e) {
|
|
|
3972
3986
|
}
|
|
3973
3987
|
t.isSymbolObject = Ae;
|
|
3974
3988
|
function $e(A) {
|
|
3975
|
-
return ce(A) || De(A) ||
|
|
3989
|
+
return ce(A) || De(A) || Be(A) || Ne(A) || Ae(A);
|
|
3976
3990
|
}
|
|
3977
3991
|
t.isBoxedPrimitive = $e;
|
|
3978
3992
|
function Mt(A) {
|
|
@@ -3986,8 +4000,8 @@ var ca = function(e) {
|
|
|
3986
4000
|
}
|
|
3987
4001
|
});
|
|
3988
4002
|
});
|
|
3989
|
-
})(
|
|
3990
|
-
var
|
|
4003
|
+
})($n);
|
|
4004
|
+
var ya = function(e) {
|
|
3991
4005
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3992
4006
|
}, hr = { exports: {} };
|
|
3993
4007
|
typeof Object.create == "function" ? hr.exports = function(e, r) {
|
|
@@ -4007,7 +4021,7 @@ typeof Object.create == "function" ? hr.exports = function(e, r) {
|
|
|
4007
4021
|
i.prototype = r.prototype, e.prototype = new i(), e.prototype.constructor = e;
|
|
4008
4022
|
}
|
|
4009
4023
|
};
|
|
4010
|
-
var
|
|
4024
|
+
var ga = hr.exports;
|
|
4011
4025
|
(function(t) {
|
|
4012
4026
|
var e = Object.getOwnPropertyDescriptors || function(v) {
|
|
4013
4027
|
for (var S = Object.keys(v), O = {}, M = 0; M < S.length; M++)
|
|
@@ -4083,7 +4097,7 @@ var pa = hr.exports;
|
|
|
4083
4097
|
seen: [],
|
|
4084
4098
|
stylize: p
|
|
4085
4099
|
};
|
|
4086
|
-
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),
|
|
4100
|
+
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), L(S.showHidden) && (S.showHidden = !1), L(S.depth) && (S.depth = 2), L(S.colors) && (S.colors = !1), L(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = d), l(S, g, S.depth);
|
|
4087
4101
|
}
|
|
4088
4102
|
t.inspect = c, c.colors = {
|
|
4089
4103
|
bold: [1, 22],
|
|
@@ -4158,19 +4172,19 @@ var pa = hr.exports;
|
|
|
4158
4172
|
if (S < 0)
|
|
4159
4173
|
return q(v) ? g.stylize(RegExp.prototype.toString.call(v), "regexp") : g.stylize("[Object]", "special");
|
|
4160
4174
|
g.seen.push(v);
|
|
4161
|
-
var
|
|
4162
|
-
return J ?
|
|
4175
|
+
var Be;
|
|
4176
|
+
return J ? Be = F(g, v, S, R, V) : Be = V.map(function(Ne) {
|
|
4163
4177
|
return T(g, v, S, R, Ne, J);
|
|
4164
|
-
}), g.seen.pop(),
|
|
4178
|
+
}), g.seen.pop(), k(Be, Q, ce);
|
|
4165
4179
|
}
|
|
4166
4180
|
function w(g, v) {
|
|
4167
|
-
if (
|
|
4181
|
+
if (L(v))
|
|
4168
4182
|
return g.stylize("undefined", "undefined");
|
|
4169
4183
|
if (C(v)) {
|
|
4170
4184
|
var S = "'" + JSON.stringify(v).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4171
4185
|
return g.stylize(S, "string");
|
|
4172
4186
|
}
|
|
4173
|
-
if (
|
|
4187
|
+
if (B(v))
|
|
4174
4188
|
return g.stylize("" + v, "number");
|
|
4175
4189
|
if (I(v))
|
|
4176
4190
|
return g.stylize("" + v, "boolean");
|
|
@@ -4213,14 +4227,14 @@ var pa = hr.exports;
|
|
|
4213
4227
|
`).map(function(J) {
|
|
4214
4228
|
return " " + J;
|
|
4215
4229
|
}).join(`
|
|
4216
|
-
`))) : $ = g.stylize("[Circular]", "special")),
|
|
4230
|
+
`))) : $ = g.stylize("[Circular]", "special")), L(R)) {
|
|
4217
4231
|
if (V && M.match(/^\d+$/))
|
|
4218
4232
|
return $;
|
|
4219
4233
|
R = JSON.stringify("" + M), R.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (R = R.slice(1, -1), R = g.stylize(R, "name")) : (R = R.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), R = g.stylize(R, "string"));
|
|
4220
4234
|
}
|
|
4221
4235
|
return R + ": " + $;
|
|
4222
4236
|
}
|
|
4223
|
-
function
|
|
4237
|
+
function k(g, v, S) {
|
|
4224
4238
|
var O = g.reduce(function(M, V) {
|
|
4225
4239
|
return V.indexOf(`
|
|
4226
4240
|
`) >= 0, M + V.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
@@ -4229,7 +4243,7 @@ var pa = hr.exports;
|
|
|
4229
4243
|
`) + " " + g.join(`,
|
|
4230
4244
|
`) + " " + S[1] : S[0] + v + " " + g.join(", ") + " " + S[1];
|
|
4231
4245
|
}
|
|
4232
|
-
t.types =
|
|
4246
|
+
t.types = $n;
|
|
4233
4247
|
function D(g) {
|
|
4234
4248
|
return Array.isArray(g);
|
|
4235
4249
|
}
|
|
@@ -4246,22 +4260,22 @@ var pa = hr.exports;
|
|
|
4246
4260
|
return g == null;
|
|
4247
4261
|
}
|
|
4248
4262
|
t.isNullOrUndefined = j;
|
|
4249
|
-
function
|
|
4263
|
+
function B(g) {
|
|
4250
4264
|
return typeof g == "number";
|
|
4251
4265
|
}
|
|
4252
|
-
t.isNumber =
|
|
4266
|
+
t.isNumber = B;
|
|
4253
4267
|
function C(g) {
|
|
4254
4268
|
return typeof g == "string";
|
|
4255
4269
|
}
|
|
4256
4270
|
t.isString = C;
|
|
4257
|
-
function
|
|
4271
|
+
function x(g) {
|
|
4258
4272
|
return typeof g == "symbol";
|
|
4259
4273
|
}
|
|
4260
|
-
t.isSymbol =
|
|
4261
|
-
function
|
|
4274
|
+
t.isSymbol = x;
|
|
4275
|
+
function L(g) {
|
|
4262
4276
|
return g === void 0;
|
|
4263
4277
|
}
|
|
4264
|
-
t.isUndefined =
|
|
4278
|
+
t.isUndefined = L;
|
|
4265
4279
|
function q(g) {
|
|
4266
4280
|
return ne(g) && he(g) === "[object RegExp]";
|
|
4267
4281
|
}
|
|
@@ -4286,14 +4300,14 @@ var pa = hr.exports;
|
|
|
4286
4300
|
return g === null || typeof g == "boolean" || typeof g == "number" || typeof g == "string" || typeof g == "symbol" || // ES6 symbol
|
|
4287
4301
|
typeof g > "u";
|
|
4288
4302
|
}
|
|
4289
|
-
t.isPrimitive = ct, t.isBuffer =
|
|
4303
|
+
t.isPrimitive = ct, t.isBuffer = ya;
|
|
4290
4304
|
function he(g) {
|
|
4291
4305
|
return Object.prototype.toString.call(g);
|
|
4292
4306
|
}
|
|
4293
4307
|
function Re(g) {
|
|
4294
4308
|
return g < 10 ? "0" + g.toString(10) : g.toString(10);
|
|
4295
4309
|
}
|
|
4296
|
-
var
|
|
4310
|
+
var xe = [
|
|
4297
4311
|
"Jan",
|
|
4298
4312
|
"Feb",
|
|
4299
4313
|
"Mar",
|
|
@@ -4313,11 +4327,11 @@ var pa = hr.exports;
|
|
|
4313
4327
|
Re(g.getMinutes()),
|
|
4314
4328
|
Re(g.getSeconds())
|
|
4315
4329
|
].join(":");
|
|
4316
|
-
return [g.getDate(),
|
|
4330
|
+
return [g.getDate(), xe[g.getMonth()], v].join(" ");
|
|
4317
4331
|
}
|
|
4318
4332
|
t.log = function() {
|
|
4319
4333
|
console.log("%s - %s", Ge(), t.format.apply(t, arguments));
|
|
4320
|
-
}, t.inherits =
|
|
4334
|
+
}, t.inherits = ga, t._extend = function(g, v) {
|
|
4321
4335
|
if (!v || !ne(v))
|
|
4322
4336
|
return g;
|
|
4323
4337
|
for (var S = Object.keys(v), O = S.length; O--; )
|
|
@@ -4367,7 +4381,7 @@ var pa = hr.exports;
|
|
|
4367
4381
|
e(v)
|
|
4368
4382
|
);
|
|
4369
4383
|
}, t.promisify.custom = ue;
|
|
4370
|
-
function
|
|
4384
|
+
function Le(g, v) {
|
|
4371
4385
|
if (!g) {
|
|
4372
4386
|
var S = new Error("Promise was rejected with a falsy value");
|
|
4373
4387
|
S.reason = g, g = S;
|
|
@@ -4391,7 +4405,7 @@ var pa = hr.exports;
|
|
|
4391
4405
|
P.nextTick(R.bind(null, null, $));
|
|
4392
4406
|
},
|
|
4393
4407
|
function($) {
|
|
4394
|
-
P.nextTick(
|
|
4408
|
+
P.nextTick(Le.bind(null, $, R));
|
|
4395
4409
|
}
|
|
4396
4410
|
);
|
|
4397
4411
|
}
|
|
@@ -4402,7 +4416,7 @@ var pa = hr.exports;
|
|
|
4402
4416
|
}
|
|
4403
4417
|
t.callbackify = ze;
|
|
4404
4418
|
})(Ut);
|
|
4405
|
-
const { inherits:
|
|
4419
|
+
const { inherits: ma, format: Yt } = Ut;
|
|
4406
4420
|
function Ue(t, e, r = Error) {
|
|
4407
4421
|
if (!t)
|
|
4408
4422
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -4415,9 +4429,9 @@ function Ue(t, e, r = Error) {
|
|
|
4415
4429
|
}
|
|
4416
4430
|
return i.prototype[Symbol.toStringTag] = "Error", i.prototype.toString = function() {
|
|
4417
4431
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4418
|
-
},
|
|
4432
|
+
}, ma(i, r), i;
|
|
4419
4433
|
}
|
|
4420
|
-
var
|
|
4434
|
+
var ei = {
|
|
4421
4435
|
createError: Ue,
|
|
4422
4436
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ue(
|
|
4423
4437
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -4443,7 +4457,7 @@ var Xn = {
|
|
|
4443
4457
|
"AVV_ERR_READY_TIMEOUT",
|
|
4444
4458
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4445
4459
|
)
|
|
4446
|
-
},
|
|
4460
|
+
}, wa = function t(e, r, i) {
|
|
4447
4461
|
r === void 0 && (r = ""), i || (i = {});
|
|
4448
4462
|
var s = function(p) {
|
|
4449
4463
|
var m = {
|
|
@@ -4465,15 +4479,15 @@ var Xn = {
|
|
|
4465
4479
|
return r + s(l ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, i).slice(r.length + 2);
|
|
4466
4480
|
}).join("");
|
|
4467
4481
|
};
|
|
4468
|
-
const
|
|
4469
|
-
let
|
|
4482
|
+
const ba = wa, on = Symbol("avvio.TimeTree.untrackNode"), Xt = Symbol("avvio.TimeTree.trackNode"), sn = Symbol("avvio.TimeTree.getParent"), an = Symbol("avvio.TimeTree.getNode"), un = Symbol("avvio.TimeTree.addNode");
|
|
4483
|
+
let va = class {
|
|
4470
4484
|
constructor() {
|
|
4471
4485
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4472
4486
|
}
|
|
4473
4487
|
[Xt](e) {
|
|
4474
4488
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4475
4489
|
}
|
|
4476
|
-
[
|
|
4490
|
+
[on](e) {
|
|
4477
4491
|
this.tableId.delete(e.id);
|
|
4478
4492
|
const r = this.tableLabel.get(e.label);
|
|
4479
4493
|
if (r.id) {
|
|
@@ -4482,16 +4496,16 @@ let wa = class {
|
|
|
4482
4496
|
}
|
|
4483
4497
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
4484
4498
|
}
|
|
4485
|
-
[
|
|
4499
|
+
[sn](e) {
|
|
4486
4500
|
if (e === null)
|
|
4487
4501
|
return this.root;
|
|
4488
4502
|
const r = this.tableLabel.get(e);
|
|
4489
4503
|
return r.id ? r : r[r.length - 1];
|
|
4490
4504
|
}
|
|
4491
|
-
[
|
|
4505
|
+
[an](e) {
|
|
4492
4506
|
return this.tableId.get(e);
|
|
4493
4507
|
}
|
|
4494
|
-
[
|
|
4508
|
+
[un](e, r, i) {
|
|
4495
4509
|
if (e === null)
|
|
4496
4510
|
return this.root = {
|
|
4497
4511
|
id: "root",
|
|
@@ -4499,7 +4513,7 @@ let wa = class {
|
|
|
4499
4513
|
start: i,
|
|
4500
4514
|
nodes: []
|
|
4501
4515
|
}, this[Xt](this.root), this.root.id;
|
|
4502
|
-
const a = this[
|
|
4516
|
+
const a = this[sn](e), c = `${r}-${Math.random()}`, d = {
|
|
4503
4517
|
id: c,
|
|
4504
4518
|
parent: e,
|
|
4505
4519
|
start: i,
|
|
@@ -4509,25 +4523,25 @@ let wa = class {
|
|
|
4509
4523
|
return a.nodes.push(d), this[Xt](d), c;
|
|
4510
4524
|
}
|
|
4511
4525
|
start(e, r, i = Date.now()) {
|
|
4512
|
-
return this[
|
|
4526
|
+
return this[un](e, r, i);
|
|
4513
4527
|
}
|
|
4514
4528
|
stop(e, r = Date.now()) {
|
|
4515
|
-
const i = this[
|
|
4516
|
-
i && (i.stop = r, i.diff = i.stop - i.start || 0, this[
|
|
4529
|
+
const i = this[an](e);
|
|
4530
|
+
i && (i.stop = r, i.diff = i.stop - i.start || 0, this[on](i));
|
|
4517
4531
|
}
|
|
4518
4532
|
toJSON() {
|
|
4519
4533
|
return Object.assign({}, this.root);
|
|
4520
4534
|
}
|
|
4521
4535
|
prittyPrint() {
|
|
4522
4536
|
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());
|
|
4523
|
-
return
|
|
4537
|
+
return ba(r);
|
|
4524
4538
|
}
|
|
4525
4539
|
};
|
|
4526
|
-
var
|
|
4527
|
-
function
|
|
4528
|
-
if (
|
|
4540
|
+
var Sa = va, Cr = { exports: {} }, pr = { exports: {} }, Zt, cn;
|
|
4541
|
+
function Aa() {
|
|
4542
|
+
if (cn)
|
|
4529
4543
|
return Zt;
|
|
4530
|
-
|
|
4544
|
+
cn = 1;
|
|
4531
4545
|
var t = 1e3, e = t * 60, r = e * 60, i = r * 24, s = i * 7, a = i * 365.25;
|
|
4532
4546
|
Zt = function(l, w) {
|
|
4533
4547
|
w = w || {};
|
|
@@ -4606,8 +4620,8 @@ function va() {
|
|
|
4606
4620
|
}
|
|
4607
4621
|
return Zt;
|
|
4608
4622
|
}
|
|
4609
|
-
function
|
|
4610
|
-
r.debug = r, r.default = r, r.coerce = p, r.disable = a, r.enable = s, r.enabled = c, r.humanize =
|
|
4623
|
+
function Ea(t) {
|
|
4624
|
+
r.debug = r, r.default = r, r.coerce = p, r.disable = a, r.enable = s, r.enabled = c, r.humanize = Aa(), r.destroy = m, Object.keys(t).forEach((l) => {
|
|
4611
4625
|
r[l] = t[l];
|
|
4612
4626
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4613
4627
|
function e(l) {
|
|
@@ -4619,32 +4633,32 @@ function Sa(t) {
|
|
|
4619
4633
|
r.selectColor = e;
|
|
4620
4634
|
function r(l) {
|
|
4621
4635
|
let w, E = null, F, T;
|
|
4622
|
-
function
|
|
4623
|
-
if (!
|
|
4636
|
+
function k(...D) {
|
|
4637
|
+
if (!k.enabled)
|
|
4624
4638
|
return;
|
|
4625
|
-
const I =
|
|
4639
|
+
const I = k, _ = Number(/* @__PURE__ */ new Date()), j = _ - (w || _);
|
|
4626
4640
|
I.diff = j, I.prev = w, I.curr = _, w = _, D[0] = r.coerce(D[0]), typeof D[0] != "string" && D.unshift("%O");
|
|
4627
|
-
let
|
|
4628
|
-
D[0] = D[0].replace(/%([a-zA-Z%])/g, (
|
|
4629
|
-
if (
|
|
4641
|
+
let B = 0;
|
|
4642
|
+
D[0] = D[0].replace(/%([a-zA-Z%])/g, (x, L) => {
|
|
4643
|
+
if (x === "%%")
|
|
4630
4644
|
return "%";
|
|
4631
|
-
|
|
4632
|
-
const q = r.formatters[
|
|
4645
|
+
B++;
|
|
4646
|
+
const q = r.formatters[L];
|
|
4633
4647
|
if (typeof q == "function") {
|
|
4634
|
-
const ne = D[
|
|
4635
|
-
|
|
4648
|
+
const ne = D[B];
|
|
4649
|
+
x = q.call(I, ne), D.splice(B, 1), B--;
|
|
4636
4650
|
}
|
|
4637
|
-
return
|
|
4651
|
+
return x;
|
|
4638
4652
|
}), r.formatArgs.call(I, D), (I.log || r.log).apply(I, D);
|
|
4639
4653
|
}
|
|
4640
|
-
return
|
|
4654
|
+
return k.namespace = l, k.useColors = r.useColors(), k.color = r.selectColor(l), k.extend = i, k.destroy = r.destroy, Object.defineProperty(k, "enabled", {
|
|
4641
4655
|
enumerable: !0,
|
|
4642
4656
|
configurable: !1,
|
|
4643
4657
|
get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, T = r.enabled(l)), T),
|
|
4644
4658
|
set: (D) => {
|
|
4645
4659
|
E = D;
|
|
4646
4660
|
}
|
|
4647
|
-
}), typeof r.init == "function" && r.init(
|
|
4661
|
+
}), typeof r.init == "function" && r.init(k), k;
|
|
4648
4662
|
}
|
|
4649
4663
|
function i(l, w) {
|
|
4650
4664
|
const E = r(this.namespace + (typeof w > "u" ? ":" : w) + l);
|
|
@@ -4687,7 +4701,7 @@ function Sa(t) {
|
|
|
4687
4701
|
}
|
|
4688
4702
|
return r.enable(r.load()), r;
|
|
4689
4703
|
}
|
|
4690
|
-
var
|
|
4704
|
+
var Ia = Ea;
|
|
4691
4705
|
(function(t, e) {
|
|
4692
4706
|
e.formatArgs = i, e.save = s, e.load = a, e.useColors = r, e.storage = c(), e.destroy = /* @__PURE__ */ (() => {
|
|
4693
4707
|
let p = !1;
|
|
@@ -4811,7 +4825,7 @@ var Aa = Sa;
|
|
|
4811
4825
|
} catch {
|
|
4812
4826
|
}
|
|
4813
4827
|
}
|
|
4814
|
-
t.exports =
|
|
4828
|
+
t.exports = Ia(e);
|
|
4815
4829
|
const { formatters: d } = t.exports;
|
|
4816
4830
|
d.j = function(p) {
|
|
4817
4831
|
try {
|
|
@@ -4821,22 +4835,22 @@ var Aa = Sa;
|
|
|
4821
4835
|
}
|
|
4822
4836
|
};
|
|
4823
4837
|
})(pr, pr.exports);
|
|
4824
|
-
var
|
|
4825
|
-
const
|
|
4826
|
-
function
|
|
4838
|
+
var ti = pr.exports;
|
|
4839
|
+
const Fa = Tn, Oa = Nn.EventEmitter, _a = Ut.inherits, Z = ti("avvio"), { AVV_ERR_READY_TIMEOUT: Ta } = ei, er = Symbol.for("plugin-meta");
|
|
4840
|
+
function Ca(t, e) {
|
|
4827
4841
|
return t[er] && t[er].name ? t[er].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4828
4842
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4829
4843
|
}
|
|
4830
|
-
function
|
|
4844
|
+
function ka() {
|
|
4831
4845
|
const t = {};
|
|
4832
4846
|
return t.promise = new Promise((e, r) => {
|
|
4833
4847
|
t.resolve = e, t.reject = r;
|
|
4834
4848
|
}), t;
|
|
4835
4849
|
}
|
|
4836
4850
|
function ut(t, e, r, i, s) {
|
|
4837
|
-
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 =
|
|
4851
|
+
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 = Ca(e, r), this.isAfter = i, this.q = Fa(t, xa, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4838
4852
|
}
|
|
4839
|
-
|
|
4853
|
+
_a(ut, Oa);
|
|
4840
4854
|
ut.prototype.exec = function(t, e) {
|
|
4841
4855
|
const r = this.func;
|
|
4842
4856
|
let i = !1;
|
|
@@ -4864,7 +4878,7 @@ ut.prototype.exec = function(t, e) {
|
|
|
4864
4878
|
};
|
|
4865
4879
|
this.timeout > 0 && (Z("setting up timeout", s, this.timeout), a = setTimeout(function() {
|
|
4866
4880
|
Z("timed out", s), a = null;
|
|
4867
|
-
const p = new
|
|
4881
|
+
const p = new Ta(s);
|
|
4868
4882
|
p.fn = r, c(p);
|
|
4869
4883
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4870
4884
|
const d = r(this.server, this.opts, c);
|
|
@@ -4882,7 +4896,7 @@ ut.prototype.loadedSoFar = function() {
|
|
|
4882
4896
|
}), this.q.resume();
|
|
4883
4897
|
};
|
|
4884
4898
|
let e;
|
|
4885
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4899
|
+
return this._promise ? e = Promise.resolve() : (this._promise = ka(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4886
4900
|
};
|
|
4887
4901
|
ut.prototype.enqueue = function(t, e) {
|
|
4888
4902
|
Z("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
@@ -4907,19 +4921,19 @@ ut.prototype.finish = function(t, e) {
|
|
|
4907
4921
|
r();
|
|
4908
4922
|
else
|
|
4909
4923
|
Z("delayed", this.name), this.q.drain = () => {
|
|
4910
|
-
Z("drain", this.name), this.q.drain =
|
|
4924
|
+
Z("drain", this.name), this.q.drain = La, queueMicrotask(i);
|
|
4911
4925
|
};
|
|
4912
4926
|
};
|
|
4913
4927
|
queueMicrotask(i), this.q.resume();
|
|
4914
4928
|
};
|
|
4915
|
-
function
|
|
4929
|
+
function xa(t, e) {
|
|
4916
4930
|
const r = this;
|
|
4917
|
-
P.nextTick(
|
|
4931
|
+
P.nextTick(kr.bind(r), t, e);
|
|
4918
4932
|
}
|
|
4919
|
-
function
|
|
4933
|
+
function kr(t, e) {
|
|
4920
4934
|
if (typeof t.func.then == "function") {
|
|
4921
4935
|
t.func.then((i) => {
|
|
4922
|
-
typeof i.default == "function" && (i = i.default), t.func = i,
|
|
4936
|
+
typeof i.default == "function" && (i = i.default), t.func = i, kr.call(this, t, e);
|
|
4923
4937
|
}, e);
|
|
4924
4938
|
return;
|
|
4925
4939
|
}
|
|
@@ -4930,19 +4944,19 @@ function xr(t, e) {
|
|
|
4930
4944
|
});
|
|
4931
4945
|
});
|
|
4932
4946
|
}
|
|
4933
|
-
function
|
|
4947
|
+
function La() {
|
|
4934
4948
|
}
|
|
4935
4949
|
Cr.exports = ut;
|
|
4936
|
-
Cr.exports.loadPlugin =
|
|
4937
|
-
var
|
|
4938
|
-
const
|
|
4950
|
+
Cr.exports.loadPlugin = kr;
|
|
4951
|
+
var Ba = Cr.exports;
|
|
4952
|
+
const ln = Tn, Pa = Nn.EventEmitter, Ra = Ut.inherits, {
|
|
4939
4953
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: tr,
|
|
4940
4954
|
AVV_ERR_CALLBACK_NOT_FN: pt,
|
|
4941
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4942
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4943
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4944
|
-
} =
|
|
4945
|
-
function
|
|
4955
|
+
AVV_ERR_PLUGIN_NOT_VALID: Da,
|
|
4956
|
+
AVV_ERR_ROOT_PLG_BOOTED: Na,
|
|
4957
|
+
AVV_ERR_READY_TIMEOUT: $a
|
|
4958
|
+
} = ei, Ua = Sa, yr = Ba, st = ti("avvio"), Lt = Symbol("kAvvio"), rr = Symbol("kThenifyDoNotWrap");
|
|
4959
|
+
function ja(t, e, r) {
|
|
4946
4960
|
const i = e.expose || {}, s = i.use || "use", a = i.after || "after", c = i.ready || "ready", d = i.onClose || "onClose", p = i.close || "close";
|
|
4947
4961
|
if (t[s])
|
|
4948
4962
|
throw new tr(s);
|
|
@@ -4952,7 +4966,7 @@ function $a(t, e, r) {
|
|
|
4952
4966
|
throw new tr(c);
|
|
4953
4967
|
t[s] = function(m, l) {
|
|
4954
4968
|
return r.use(m, l), this;
|
|
4955
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4969
|
+
}, Object.defineProperty(t, "then", { get: ri.bind(r) }), t[Lt] = !0, t[a] = function(m) {
|
|
4956
4970
|
return typeof m != "function" ? r._loadRegistered() : (r.after(nr(m, this)), this);
|
|
4957
4971
|
}, t[c] = function(m) {
|
|
4958
4972
|
if (m && typeof m != "function")
|
|
@@ -4961,7 +4975,7 @@ function $a(t, e, r) {
|
|
|
4961
4975
|
}, t[d] = function(m) {
|
|
4962
4976
|
if (typeof m != "function")
|
|
4963
4977
|
throw new pt(d, typeof m);
|
|
4964
|
-
return r.onClose(
|
|
4978
|
+
return r.onClose(Ga(m, this)), this;
|
|
4965
4979
|
}, t[p] = function(m) {
|
|
4966
4980
|
if (m && typeof m != "function")
|
|
4967
4981
|
throw new pt(p, typeof m);
|
|
@@ -4971,13 +4985,13 @@ function $a(t, e, r) {
|
|
|
4971
4985
|
function te(t, e, r) {
|
|
4972
4986
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof te)) {
|
|
4973
4987
|
const i = new te(t, e, r);
|
|
4974
|
-
return t &&
|
|
4988
|
+
return t && ja(t, e, i), i;
|
|
4975
4989
|
}
|
|
4976
|
-
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
|
|
4977
|
-
this.emit("start"), this._readyQ.drain =
|
|
4978
|
-
}, this._closeQ =
|
|
4979
|
-
this.emit("close"), this._closeQ.drain =
|
|
4980
|
-
}, this._doStart = null, this._root = new yr(this,
|
|
4990
|
+
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 Ua(), this._readyQ = ln(this, ni, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4991
|
+
this.emit("start"), this._readyQ.drain = fn;
|
|
4992
|
+
}, this._closeQ = ln(this, Qa, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4993
|
+
this.emit("close"), this._closeQ.drain = fn;
|
|
4994
|
+
}, this._doStart = null, this._root = new yr(this, Ma.bind(this), e, !1, 0), this._root.once("start", (i, s, a) => {
|
|
4981
4995
|
const c = this.pluginTree.start(null, s, a);
|
|
4982
4996
|
this._root.once("loaded", (d, p, m) => {
|
|
4983
4997
|
this.pluginTree.stop(c, m);
|
|
@@ -4997,22 +5011,22 @@ function te(t, e, r) {
|
|
|
4997
5011
|
this._readyQ.resume();
|
|
4998
5012
|
});
|
|
4999
5013
|
}
|
|
5000
|
-
function
|
|
5014
|
+
function Ma(t, e, r) {
|
|
5001
5015
|
this._doStart = r, e.autostart && this.start();
|
|
5002
5016
|
}
|
|
5003
|
-
|
|
5017
|
+
Ra(te, Pa);
|
|
5004
5018
|
te.prototype.start = function() {
|
|
5005
5019
|
return this.started = !0, P.nextTick(this._doStart), this;
|
|
5006
5020
|
};
|
|
5007
5021
|
te.prototype.override = function(t, e, r) {
|
|
5008
5022
|
return t;
|
|
5009
5023
|
};
|
|
5010
|
-
function
|
|
5024
|
+
function Va(t) {
|
|
5011
5025
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
5012
|
-
throw new
|
|
5026
|
+
throw new Da(typeof t);
|
|
5013
5027
|
return t;
|
|
5014
5028
|
}
|
|
5015
|
-
te.prototype[
|
|
5029
|
+
te.prototype[Lt] = !0;
|
|
5016
5030
|
te.prototype.use = function(t, e) {
|
|
5017
5031
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5018
5032
|
};
|
|
@@ -5020,10 +5034,10 @@ te.prototype._loadRegistered = function() {
|
|
|
5020
5034
|
const t = this._current[0];
|
|
5021
5035
|
return !this.started && !this.booted && P.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
5022
5036
|
};
|
|
5023
|
-
Object.defineProperty(te.prototype, "then", { get:
|
|
5037
|
+
Object.defineProperty(te.prototype, "then", { get: ri });
|
|
5024
5038
|
te.prototype._addPlugin = function(t, e, r) {
|
|
5025
|
-
if (t =
|
|
5026
|
-
throw new
|
|
5039
|
+
if (t = Va(t), e = e || {}, this.booted)
|
|
5040
|
+
throw new Na();
|
|
5027
5041
|
const i = this._current[0], s = new yr(this, t, e, r);
|
|
5028
5042
|
if (s.once("start", (a, c, d) => {
|
|
5029
5043
|
const p = this.pluginTree.start(i.name, c, d);
|
|
@@ -5041,7 +5055,7 @@ te.prototype.after = function(t) {
|
|
|
5041
5055
|
return this._loadRegistered();
|
|
5042
5056
|
this._addPlugin(e.bind(this), {}, !0);
|
|
5043
5057
|
function e(r, i, s) {
|
|
5044
|
-
|
|
5058
|
+
ni.call(this, t, s);
|
|
5045
5059
|
}
|
|
5046
5060
|
return this;
|
|
5047
5061
|
};
|
|
@@ -5092,9 +5106,9 @@ te.prototype.prettyPrint = function() {
|
|
|
5092
5106
|
te.prototype.toJSON = function() {
|
|
5093
5107
|
return this.pluginTree.toJSON();
|
|
5094
5108
|
};
|
|
5095
|
-
function
|
|
5109
|
+
function fn() {
|
|
5096
5110
|
}
|
|
5097
|
-
function
|
|
5111
|
+
function ri() {
|
|
5098
5112
|
if (this.booted) {
|
|
5099
5113
|
st("thenify returning null because we are already booted");
|
|
5100
5114
|
return;
|
|
@@ -5105,27 +5119,27 @@ function ei() {
|
|
|
5105
5119
|
}
|
|
5106
5120
|
return st("thenify"), (t, e) => this._loadRegistered().then(() => (this[rr] = !0, t(this._server)), e);
|
|
5107
5121
|
}
|
|
5108
|
-
function
|
|
5122
|
+
function ni(t, e) {
|
|
5109
5123
|
const r = this._server, i = this._error;
|
|
5110
5124
|
let s;
|
|
5111
5125
|
if (this._error = null, t.length === 0)
|
|
5112
|
-
this._error = i, s = t(), s && !s[
|
|
5126
|
+
this._error = i, s = t(), s && !s[Lt] && typeof s.then == "function" ? s.then(() => P.nextTick(e), (a) => P.nextTick(e, a)) : P.nextTick(e);
|
|
5113
5127
|
else if (t.length === 1)
|
|
5114
|
-
s = t(i), s && !s[
|
|
5128
|
+
s = t(i), s && !s[Lt] && typeof s.then == "function" ? s.then(() => P.nextTick(e), (a) => P.nextTick(e, a)) : P.nextTick(e);
|
|
5115
5129
|
else if (this._timeout === 0) {
|
|
5116
5130
|
const a = (c) => {
|
|
5117
5131
|
this._error = c, e(this._error);
|
|
5118
5132
|
};
|
|
5119
5133
|
t.length === 2 ? t(i, a) : t(i, r, a);
|
|
5120
5134
|
} else
|
|
5121
|
-
|
|
5135
|
+
qa.call(this, t, i, r, e);
|
|
5122
5136
|
}
|
|
5123
|
-
function
|
|
5137
|
+
function qa(t, e, r, i) {
|
|
5124
5138
|
const s = t.name;
|
|
5125
5139
|
st("setting up ready timeout", s, this._timeout);
|
|
5126
5140
|
let a = setTimeout(() => {
|
|
5127
5141
|
st("timed out", s), a = null;
|
|
5128
|
-
const d = new
|
|
5142
|
+
const d = new $a(s);
|
|
5129
5143
|
d.fn = t, this._error = d, i(d);
|
|
5130
5144
|
}, this._timeout);
|
|
5131
5145
|
t.length === 2 ? t(e, c.bind(this)) : t(e, r, c.bind(this));
|
|
@@ -5133,7 +5147,7 @@ function Ma(t, e, r, i) {
|
|
|
5133
5147
|
a && (clearTimeout(a), this._error = d, i(this._error));
|
|
5134
5148
|
}
|
|
5135
5149
|
}
|
|
5136
|
-
function
|
|
5150
|
+
function Qa(t, e) {
|
|
5137
5151
|
const r = this._server, i = t[this._isOnCloseHandlerKey];
|
|
5138
5152
|
if (t.length === 0 || t.length === 1) {
|
|
5139
5153
|
let s;
|
|
@@ -5144,7 +5158,7 @@ function Va(t, e) {
|
|
|
5144
5158
|
} else
|
|
5145
5159
|
t.length === 2 ? t(i ? r : this._error, e) : i ? t(r, e) : t(this._error, r, e);
|
|
5146
5160
|
}
|
|
5147
|
-
function
|
|
5161
|
+
function Ga(t, e) {
|
|
5148
5162
|
return r.bind(e);
|
|
5149
5163
|
function r(i, s) {
|
|
5150
5164
|
let a;
|
|
@@ -5174,8 +5188,8 @@ vr.exports.express = function(t) {
|
|
|
5174
5188
|
}
|
|
5175
5189
|
});
|
|
5176
5190
|
};
|
|
5177
|
-
var
|
|
5178
|
-
const
|
|
5191
|
+
var za = vr.exports;
|
|
5192
|
+
const Ka = /* @__PURE__ */ fo(za);
|
|
5179
5193
|
(function() {
|
|
5180
5194
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5181
5195
|
return;
|
|
@@ -5193,9 +5207,10 @@ const Ga = /* @__PURE__ */ co(Qa);
|
|
|
5193
5207
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5194
5208
|
}
|
|
5195
5209
|
})();
|
|
5196
|
-
function
|
|
5197
|
-
|
|
5198
|
-
|
|
5210
|
+
function pu(t, e = !0, r = !0, i) {
|
|
5211
|
+
console.log("start sdk");
|
|
5212
|
+
const s = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", a = Ka(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5213
|
+
return a.use(Wi), a.use(Vi, { onDeepLinkHandled: i?.onDeepLinkHandled }), a.use(Ki, { videoPlayerController: i?.videoPlayerController }), a.use(Li, { sdkKey: t, host: s, version: i?.version }), a.use(zi), a.use(Gi), a.use(No), a.use(Ao), r && a.after(async (c, d, p) => {
|
|
5199
5214
|
if (c)
|
|
5200
5215
|
throw c;
|
|
5201
5216
|
await d.sdk.initializeApp(), p();
|
|
@@ -5204,5 +5219,5 @@ function du(t, e = !0, r = !0, i) {
|
|
|
5204
5219
|
}), a;
|
|
5205
5220
|
}
|
|
5206
5221
|
export {
|
|
5207
|
-
|
|
5222
|
+
pu as StreamLayer
|
|
5208
5223
|
};
|