@streamlayer/sdk-web 0.33.6 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +5 -5
- package/lib/es/index.js +610 -587
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as D, QuestionStatus as ce, SilenceSetting as
|
|
3
|
-
import { PickHistoryStatus as
|
|
1
|
+
import { pino as li } from "pino";
|
|
2
|
+
import { QuestionType as D, QuestionStatus as ce, SilenceSetting as di } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
+
import { PickHistoryStatus as at } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as N } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
5
|
import { InvitationCategory as Pr, InvitationFrom as Fr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
-
import { computed as
|
|
6
|
+
import { computed as fi, map as hi, atom as Tt, batched as Nr, onMount as pr } from "nanostores";
|
|
7
7
|
import { nanoid as Zt } from "nanoid";
|
|
8
|
-
import { ConnectError as Xe, Code as ee, createContextKey as Dr, createPromiseClient as Rr, createContextValues as
|
|
8
|
+
import { ConnectError as Xe, Code as ee, createContextKey as Dr, createPromiseClient as Rr, createContextValues as pi } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as $r } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Vr } from "@nanostores/query";
|
|
11
|
-
import { Events as
|
|
11
|
+
import { Events as yi } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as et } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
13
|
import { Users as yr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { Feed as be } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
15
|
import { Leaderboard as vn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
18
|
-
import { Kind as H, TopicType as
|
|
17
|
+
import { LinksClient as gi } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
import { Kind as H, TopicType as z, Category as Q, PollOpenedFrom as De, ScreenOrientation as jr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
19
|
import { AnalyticsService as bn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
20
|
import { InteractionActionType as Mr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
21
|
import { NotificationKind as ae, NotificationType as Ur } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
-
function
|
|
22
|
+
function mi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
25
|
var Sn = { exports: {} }, V = Sn.exports = {}, te, re;
|
|
@@ -56,7 +56,7 @@ function wn(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function vi(t) {
|
|
60
60
|
if (re === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
62
|
if ((re === tr || !re) && clearTimeout)
|
|
@@ -71,20 +71,20 @@ function mi(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var he = [], xe = !1, Ie,
|
|
75
|
-
function
|
|
76
|
-
!xe || !Ie || (xe = !1, Ie.length ? he = Ie.concat(he) :
|
|
74
|
+
var he = [], xe = !1, Ie, lt = -1;
|
|
75
|
+
function bi() {
|
|
76
|
+
!xe || !Ie || (xe = !1, Ie.length ? he = Ie.concat(he) : lt = -1, he.length && An());
|
|
77
77
|
}
|
|
78
78
|
function An() {
|
|
79
79
|
if (!xe) {
|
|
80
|
-
var t = wn(
|
|
80
|
+
var t = wn(bi);
|
|
81
81
|
xe = !0;
|
|
82
82
|
for (var e = he.length; e; ) {
|
|
83
|
-
for (Ie = he, he = []; ++
|
|
84
|
-
Ie && Ie[
|
|
85
|
-
|
|
83
|
+
for (Ie = he, he = []; ++lt < e; )
|
|
84
|
+
Ie && Ie[lt].run();
|
|
85
|
+
lt = -1, e = he.length;
|
|
86
86
|
}
|
|
87
|
-
Ie = null, xe = !1,
|
|
87
|
+
Ie = null, xe = !1, vi(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
V.nextTick = function(t) {
|
|
@@ -132,8 +132,8 @@ V.chdir = function(t) {
|
|
|
132
132
|
V.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const w = /* @__PURE__ */
|
|
135
|
+
var Si = Sn.exports;
|
|
136
|
+
const w = /* @__PURE__ */ mi(Si), wi = li({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const w = /* @__PURE__ */ gi(bi), Si = ci({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), Se = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), Se = (t, e) => wi.child({ name: t }, e);
|
|
145
|
+
class Ai extends Event {
|
|
146
146
|
slEventBus;
|
|
147
147
|
constructor(e, r) {
|
|
148
148
|
super(e), this.slEventBus = r;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
151
|
+
const Ei = Se("event-bus");
|
|
152
|
+
class Ii {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
155
155
|
constructor(e = "sl-event-bus") {
|
|
156
156
|
this.name = e, this.listeners = /* @__PURE__ */ new Set();
|
|
157
157
|
}
|
|
158
158
|
emit = (e, r) => {
|
|
159
|
-
const n = new
|
|
160
|
-
|
|
159
|
+
const n = new Ai(this.name, { ...r, type: e });
|
|
160
|
+
Ei.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,10 +173,10 @@ class Ei {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Ti {
|
|
177
177
|
}
|
|
178
178
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
179
|
-
class
|
|
179
|
+
class Ot {
|
|
180
180
|
/**
|
|
181
181
|
* store instance (nanostores)
|
|
182
182
|
*/
|
|
@@ -192,23 +192,23 @@ class Tt {
|
|
|
192
192
|
return this.store;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const Oi = (t) => {
|
|
196
196
|
const e = Object.keys(t);
|
|
197
|
-
return
|
|
197
|
+
return fi(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
198
198
|
};
|
|
199
|
-
class Te extends
|
|
199
|
+
class Te extends Ot {
|
|
200
200
|
getValues = () => this.getStore().get();
|
|
201
201
|
getValue = (e) => this.getStore().get()[e];
|
|
202
202
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
203
203
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
204
204
|
unsubscribe = () => this.getStore().off();
|
|
205
205
|
}
|
|
206
|
-
const ie = (t) =>
|
|
206
|
+
const ie = (t) => hi(t);
|
|
207
207
|
var le;
|
|
208
208
|
(function(t) {
|
|
209
209
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
210
210
|
})(le || (le = {}));
|
|
211
|
-
const
|
|
211
|
+
const Ci = {
|
|
212
212
|
[N.BETTING]: "betting",
|
|
213
213
|
[N.GAMES]: "games",
|
|
214
214
|
[N.PUBLIC_CHAT]: "publicChat",
|
|
@@ -226,7 +226,7 @@ class In {
|
|
|
226
226
|
listeners = /* @__PURE__ */ new Set();
|
|
227
227
|
settingsKey;
|
|
228
228
|
constructor({ settings: e, ...r }, n) {
|
|
229
|
-
this.settingsKey =
|
|
229
|
+
this.settingsKey = Ci[r.type], this.status = Tt(We.Suspended), this.config = new Te(ie(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Te(ie(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Te(ie({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
230
230
|
}
|
|
231
231
|
get featureConfig() {
|
|
232
232
|
return this.config.getStore();
|
|
@@ -268,7 +268,7 @@ class In {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
class W extends
|
|
271
|
+
class W extends Ot {
|
|
272
272
|
getValue = () => this.getStore().get();
|
|
273
273
|
getValues() {
|
|
274
274
|
throw new Error("not implemented");
|
|
@@ -283,11 +283,11 @@ class W extends Tt {
|
|
|
283
283
|
return this.getStore().get();
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const B = (t) =>
|
|
287
|
-
class ye extends
|
|
286
|
+
const B = (t) => Tt(t);
|
|
287
|
+
class ye extends Ot {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
290
|
-
super(e, `api:${r}`), this.atomStore =
|
|
290
|
+
super(e, `api:${r}`), this.atomStore = Tt(), n && e.subscribe((i) => {
|
|
291
291
|
const o = this.atomStore.get(), s = n(i, o);
|
|
292
292
|
o !== s && this.atomStore.set(s);
|
|
293
293
|
});
|
|
@@ -315,8 +315,8 @@ class ye extends Tt {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const pe = new
|
|
319
|
-
async function*
|
|
318
|
+
const pe = new Ii();
|
|
319
|
+
async function* _i(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
321
|
t.response.message = r, t.received_at = Date.now();
|
|
322
322
|
const n = {
|
|
@@ -350,7 +350,7 @@ const Li = () => (t) => async (e) => {
|
|
|
350
350
|
};
|
|
351
351
|
return window.postMessage(i), {
|
|
352
352
|
...n,
|
|
353
|
-
message:
|
|
353
|
+
message: _i(r, n.message)
|
|
354
354
|
};
|
|
355
355
|
} else {
|
|
356
356
|
r.request.message = e.message, r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -374,11 +374,47 @@ const Li = () => (t) => async (e) => {
|
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
377
|
+
function Tn(t) {
|
|
378
|
+
return t instanceof DOMException && // everything except Firefox
|
|
379
|
+
(t.code === 22 || // Firefox
|
|
380
|
+
t.code === 1014 || // test name field too, because code might not be present
|
|
381
|
+
// everything except Firefox
|
|
382
|
+
t.name === "QuotaExceededError" || // Firefox
|
|
383
|
+
t.name === "NS_ERROR_DOM_QUOTA_REACHED");
|
|
384
|
+
}
|
|
385
|
+
class tt {
|
|
386
|
+
delimiter = ":";
|
|
387
|
+
prefix;
|
|
388
|
+
storage;
|
|
389
|
+
constructor(e = "main", r = window.localStorage) {
|
|
390
|
+
this.prefix = `sl-sdk${this.delimiter}${e}`, this.storage = r;
|
|
391
|
+
}
|
|
392
|
+
clear = () => {
|
|
393
|
+
for (const e in window.localStorage)
|
|
394
|
+
e.startsWith(this.prefix) && this.storage.removeItem(e);
|
|
395
|
+
};
|
|
396
|
+
generateKey = (e) => `${this.prefix}${this.delimiter}${e.join(this.delimiter)}`;
|
|
397
|
+
write = (...e) => {
|
|
398
|
+
const r = e.pop() || "", n = this.generateKey(e);
|
|
399
|
+
try {
|
|
400
|
+
this.storage.setItem(n, r);
|
|
401
|
+
} catch (i) {
|
|
402
|
+
Tn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
|
|
403
|
+
}
|
|
404
|
+
};
|
|
405
|
+
read = (...e) => {
|
|
406
|
+
const r = this.storage.getItem(this.generateKey(e));
|
|
407
|
+
return r === null ? void 0 : r;
|
|
408
|
+
};
|
|
409
|
+
remove = (...e) => {
|
|
410
|
+
this.storage.removeItem(this.generateKey(e));
|
|
411
|
+
};
|
|
412
|
+
}
|
|
377
413
|
var Y;
|
|
378
414
|
(function(t) {
|
|
379
415
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
380
416
|
})(Y || (Y = {}));
|
|
381
|
-
class
|
|
417
|
+
class ki {
|
|
382
418
|
params;
|
|
383
419
|
streamCancel;
|
|
384
420
|
method;
|
|
@@ -411,8 +447,13 @@ class _i {
|
|
|
411
447
|
};
|
|
412
448
|
addStateLog = (e) => {
|
|
413
449
|
const r = this.state.getStore().get().log, n = `${this.options.name} ${(/* @__PURE__ */ new Date()).toISOString()}: ${e}`;
|
|
414
|
-
r.push(n), this.state.setValue("log", r),
|
|
450
|
+
if (r.push(n), this.state.setValue("log", r), localStorage.getItem("SL_DEBUG"))
|
|
451
|
+
try {
|
|
452
|
+
window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
|
|
415
453
|
` + n);
|
|
454
|
+
} catch (i) {
|
|
455
|
+
Tn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
|
|
456
|
+
}
|
|
416
457
|
};
|
|
417
458
|
addListener = (e, r) => this.listeners.has(e) ? (this.addStateLog(`listener '${e}' not added, already exists`), () => {
|
|
418
459
|
}) : (this.listeners.set(e, r), this.addStateLog(`listener '${e}' added`), () => this.removeListener(e));
|
|
@@ -480,7 +521,7 @@ class _i {
|
|
|
480
521
|
}
|
|
481
522
|
};
|
|
482
523
|
}
|
|
483
|
-
const
|
|
524
|
+
const Pi = /* @__PURE__ */ new Set([
|
|
484
525
|
ee.Unknown,
|
|
485
526
|
ee.Internal,
|
|
486
527
|
ee.DeadlineExceeded,
|
|
@@ -488,7 +529,7 @@ const ki = /* @__PURE__ */ new Set([
|
|
|
488
529
|
ee.FailedPrecondition,
|
|
489
530
|
ee.Unavailable,
|
|
490
531
|
ee.DataLoss
|
|
491
|
-
]), xr = Se("grpc:retry"),
|
|
532
|
+
]), xr = Se("grpc:retry"), Fi = (t) => async (e) => {
|
|
492
533
|
const r = e.contextValues.get(rr.retryAttempts), n = 300, i = e.contextValues.get(rr.retryDelay);
|
|
493
534
|
if (e.stream || r === 0)
|
|
494
535
|
return t(e);
|
|
@@ -499,7 +540,7 @@ const ki = /* @__PURE__ */ new Set([
|
|
|
499
540
|
} catch (s) {
|
|
500
541
|
xr.trace({ attempt: o, error: s }, "retry attempt");
|
|
501
542
|
const a = Xe.from(s);
|
|
502
|
-
if (o >= r || !(a instanceof Xe) || !
|
|
543
|
+
if (o >= r || !(a instanceof Xe) || !Pi.has(a.code))
|
|
503
544
|
throw s;
|
|
504
545
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
505
546
|
await new Promise((c) => setTimeout(c, d));
|
|
@@ -507,13 +548,13 @@ const ki = /* @__PURE__ */ new Set([
|
|
|
507
548
|
}, rr = {
|
|
508
549
|
retryAttempts: Dr(10, { description: "Number of attempts to retry" }),
|
|
509
550
|
retryDelay: Dr(3e4, { description: "Max delay between retries in milliseconds" })
|
|
510
|
-
},
|
|
551
|
+
}, Ni = () => {
|
|
511
552
|
const t = localStorage.getItem("sl-device-id");
|
|
512
553
|
if (t)
|
|
513
554
|
return t;
|
|
514
555
|
const e = Zt();
|
|
515
556
|
return localStorage.setItem("sl-device-id", e), e;
|
|
516
|
-
},
|
|
557
|
+
}, Di = () => navigator.userAgentData?.platform || navigator.platform;
|
|
517
558
|
class Br {
|
|
518
559
|
toJsonOptions = {
|
|
519
560
|
emitDefaultValues: !1,
|
|
@@ -534,8 +575,8 @@ class Br {
|
|
|
534
575
|
opts;
|
|
535
576
|
constructor(e, r) {
|
|
536
577
|
this.host = e, this.opts = r, this.$headers = new Te(ie({
|
|
537
|
-
"sl-device-id":
|
|
538
|
-
"sl-device-os":
|
|
578
|
+
"sl-device-id": Ni(),
|
|
579
|
+
"sl-device-os": Di()
|
|
539
580
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
540
581
|
const [n, i, o] = Vr({
|
|
541
582
|
dedupeTime: r?.dedupeTime,
|
|
@@ -559,7 +600,7 @@ class Br {
|
|
|
559
600
|
const i = this.subscriptions.get(r);
|
|
560
601
|
if (i)
|
|
561
602
|
return i;
|
|
562
|
-
const o = new
|
|
603
|
+
const o = new ki(this.$headers, e, r, n);
|
|
563
604
|
return this.subscriptions.set(r, o), o;
|
|
564
605
|
};
|
|
565
606
|
removeSubscription = (e) => {
|
|
@@ -604,7 +645,7 @@ class Br {
|
|
|
604
645
|
...Array.isArray(r) ? r : [r]
|
|
605
646
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
606
647
|
return { client: i, createRequestOptions: (d) => {
|
|
607
|
-
const c =
|
|
648
|
+
const c = pi();
|
|
608
649
|
for (const f in d) {
|
|
609
650
|
const p = rr[f];
|
|
610
651
|
c.set(p, d[f]);
|
|
@@ -632,11 +673,11 @@ class Br {
|
|
|
632
673
|
n.header.set(o, i[o]);
|
|
633
674
|
return r(n);
|
|
634
675
|
};
|
|
635
|
-
this.interceptors.push(e), this.interceptors.push(Li()), this.opts?.retryable && this.interceptors.push(
|
|
676
|
+
this.interceptors.push(e), this.interceptors.push(Li()), this.opts?.retryable && this.interceptors.push(Fi);
|
|
636
677
|
};
|
|
637
678
|
}
|
|
638
|
-
const
|
|
639
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
679
|
+
const Ri = (t, e) => {
|
|
680
|
+
const { client: r, queryKey: n } = e.createPromiseClient(yi, {
|
|
640
681
|
method: "retrieveEventId",
|
|
641
682
|
params: [t]
|
|
642
683
|
});
|
|
@@ -653,7 +694,7 @@ const Di = (t, e) => {
|
|
|
653
694
|
}
|
|
654
695
|
}
|
|
655
696
|
});
|
|
656
|
-
},
|
|
697
|
+
}, $i = (t, e) => {
|
|
657
698
|
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "getStream", params: [t] });
|
|
658
699
|
return e.nanoquery.createFetcherStore(n, {
|
|
659
700
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
@@ -661,20 +702,20 @@ const Di = (t, e) => {
|
|
|
661
702
|
// we are sure that id is a string
|
|
662
703
|
})).data?.attributes : void 0
|
|
663
704
|
});
|
|
664
|
-
},
|
|
705
|
+
}, Vi = (t, e) => {
|
|
665
706
|
const { queryKey: r, client: n } = e.createPromiseClient(yr, { method: "me", params: [t] });
|
|
666
707
|
return e.nanoquery.createFetcherStore(r, {
|
|
667
708
|
fetcher: () => n.me({})
|
|
668
709
|
});
|
|
669
|
-
},
|
|
710
|
+
}, ji = (t) => {
|
|
670
711
|
const { client: e, createRequestOptions: r } = t.createPromiseClient(yr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
671
712
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
672
|
-
},
|
|
713
|
+
}, Mi = (t, e) => {
|
|
673
714
|
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "get", params: [t] });
|
|
674
715
|
return e.nanoquery.createFetcherStore(n, {
|
|
675
716
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
676
717
|
});
|
|
677
|
-
},
|
|
718
|
+
}, Ui = (t, e) => {
|
|
678
719
|
const { client: r, queryKey: n } = e.createPromiseClient(et, { method: "getOrganization", params: [t] });
|
|
679
720
|
return e.nanoquery.createFetcherStore(n, {
|
|
680
721
|
fetcher: async () => {
|
|
@@ -685,7 +726,7 @@ const Di = (t, e) => {
|
|
|
685
726
|
} : void 0;
|
|
686
727
|
}
|
|
687
728
|
});
|
|
688
|
-
},
|
|
729
|
+
}, xi = (t, e) => {
|
|
689
730
|
const { client: r, queryKey: n } = e.createPromiseClient(et, {
|
|
690
731
|
method: "getOrganizationAdvertising",
|
|
691
732
|
params: [t]
|
|
@@ -693,7 +734,7 @@ const Di = (t, e) => {
|
|
|
693
734
|
return e.nanoquery.createFetcherStore(n, {
|
|
694
735
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
695
736
|
});
|
|
696
|
-
},
|
|
737
|
+
}, Bi = (t, e, r) => {
|
|
697
738
|
t.transport = new Br(e.host, {
|
|
698
739
|
dedupeTime: 1e3 * 60 * 5,
|
|
699
740
|
refetchInterval: 1e3 * 60 * 5,
|
|
@@ -704,35 +745,11 @@ const Di = (t, e) => {
|
|
|
704
745
|
t.transport.disconnect(), t.analyticsTransport.disconnect();
|
|
705
746
|
}), r();
|
|
706
747
|
};
|
|
707
|
-
class Ot {
|
|
708
|
-
delimiter = ":";
|
|
709
|
-
prefix;
|
|
710
|
-
storage;
|
|
711
|
-
constructor(e = "main", r = window.localStorage) {
|
|
712
|
-
this.prefix = `sl-sdk${this.delimiter}${e}`, this.storage = r;
|
|
713
|
-
}
|
|
714
|
-
clear = () => {
|
|
715
|
-
for (const e in window.localStorage)
|
|
716
|
-
e.startsWith(this.prefix) && this.storage.removeItem(e);
|
|
717
|
-
};
|
|
718
|
-
generateKey = (e) => `${this.prefix}${this.delimiter}${e.join(this.delimiter)}`;
|
|
719
|
-
write = (...e) => {
|
|
720
|
-
const r = e.pop() || "";
|
|
721
|
-
this.storage.setItem(this.generateKey(e), r);
|
|
722
|
-
};
|
|
723
|
-
read = (...e) => {
|
|
724
|
-
const r = this.storage.getItem(this.generateKey(e));
|
|
725
|
-
return r === null ? void 0 : r;
|
|
726
|
-
};
|
|
727
|
-
remove = (...e) => {
|
|
728
|
-
this.storage.removeItem(this.generateKey(e));
|
|
729
|
-
};
|
|
730
|
-
}
|
|
731
748
|
var ue;
|
|
732
749
|
(function(t) {
|
|
733
750
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
734
751
|
})(ue || (ue = {}));
|
|
735
|
-
class je extends
|
|
752
|
+
class je extends tt {
|
|
736
753
|
constructor() {
|
|
737
754
|
super("user");
|
|
738
755
|
}
|
|
@@ -759,19 +776,19 @@ var de;
|
|
|
759
776
|
(function(t) {
|
|
760
777
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
761
778
|
})(de || (de = {}));
|
|
762
|
-
const
|
|
763
|
-
const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye(
|
|
779
|
+
const qi = (t) => {
|
|
780
|
+
const e = new je(), r = new W(B(e.getExternalToken()), "userKey"), n = new W(B(e.getToken()), "userToken"), i = new ye(Vi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
764
781
|
if (!a)
|
|
765
782
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
766
|
-
}), o = new ye(
|
|
783
|
+
}), o = new ye(Mi(n.getStore(), t), "userSettings");
|
|
767
784
|
return {
|
|
768
785
|
userKey: r,
|
|
769
786
|
userToken: n,
|
|
770
787
|
user: i,
|
|
771
788
|
userSettings: o
|
|
772
789
|
};
|
|
773
|
-
},
|
|
774
|
-
const e = new W(B(void 0), "providerStreamId"), r = new ye(
|
|
790
|
+
}, Qi = (t) => {
|
|
791
|
+
const e = new W(B(void 0), "providerStreamId"), r = new ye(Ri(e.getStore(), t), "slStreamId", (i) => i?.data), n = new ye($i(r.getAtomStore(), t), "streamSettings");
|
|
775
792
|
return r.getAtomStore().listen((i) => {
|
|
776
793
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
777
794
|
}), {
|
|
@@ -779,8 +796,8 @@ const Bi = (t) => {
|
|
|
779
796
|
slStreamId: r,
|
|
780
797
|
streamSettings: n
|
|
781
798
|
};
|
|
782
|
-
},
|
|
783
|
-
const e = new W(B(void 0), "enabled"), r = new W(B(de.DISABLED), "status"), n = new ye(
|
|
799
|
+
}, Gi = (t) => {
|
|
800
|
+
const e = new W(B(void 0), "enabled"), r = new W(B(de.DISABLED), "status"), n = new ye(Ui(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ye(xi(n.getAtomStore(), t), "organizationAdvertising"), o = qi(t), s = Qi(t);
|
|
784
801
|
return {
|
|
785
802
|
enabled: e,
|
|
786
803
|
status: r,
|
|
@@ -795,10 +812,10 @@ const Bi = (t) => {
|
|
|
795
812
|
organizationAdvertising: i
|
|
796
813
|
};
|
|
797
814
|
};
|
|
798
|
-
class
|
|
815
|
+
class zi extends Ot {
|
|
799
816
|
stores;
|
|
800
817
|
constructor(e) {
|
|
801
|
-
const r =
|
|
818
|
+
const r = Gi(e), n = Oi(r);
|
|
802
819
|
super(n, "core"), this.stores = r;
|
|
803
820
|
}
|
|
804
821
|
getValue() {
|
|
@@ -820,16 +837,16 @@ class Gi extends Tt {
|
|
|
820
837
|
unsubscribe = () => this.getStore().off();
|
|
821
838
|
}
|
|
822
839
|
const Ki = (t, e, r) => {
|
|
823
|
-
t.store = new
|
|
840
|
+
t.store = new zi(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(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
824
841
|
t.store.unsubscribe();
|
|
825
842
|
}, r();
|
|
826
|
-
},
|
|
843
|
+
}, Hi = (t) => {
|
|
827
844
|
const { client: e } = t.createPromiseClient(vn, { method: "list" });
|
|
828
845
|
return (r) => e.list(r);
|
|
829
|
-
},
|
|
846
|
+
}, On = (t) => {
|
|
830
847
|
const { client: e } = t.createPromiseClient(vn, { method: "summary" });
|
|
831
848
|
return (r) => e.summary(r);
|
|
832
|
-
},
|
|
849
|
+
}, Wi = (t, e) => {
|
|
833
850
|
const { client: r, queryKey: n } = e.createPromiseClient(yr, {
|
|
834
851
|
method: "getFriends",
|
|
835
852
|
params: [t]
|
|
@@ -837,7 +854,7 @@ const Ki = (t, e, r) => {
|
|
|
837
854
|
return e.nanoquery.createFetcherStore(n, {
|
|
838
855
|
fetcher: async (i, o, s) => s ? (await r.getFriends({})).data : []
|
|
839
856
|
});
|
|
840
|
-
},
|
|
857
|
+
}, Ji = (t, e) => {
|
|
841
858
|
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "get", params: [t] });
|
|
842
859
|
return e.nanoquery.createFetcherStore(n, {
|
|
843
860
|
fetcher: async (i, o, s) => (await r.get({
|
|
@@ -846,7 +863,7 @@ const Ki = (t, e, r) => {
|
|
|
846
863
|
refetchInterval: 0,
|
|
847
864
|
dedupeTime: 1e3 * 60 * 60
|
|
848
865
|
});
|
|
849
|
-
},
|
|
866
|
+
}, Yi = (t, e) => {
|
|
850
867
|
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "syncQuestion", params: [t] });
|
|
851
868
|
return e.nanoquery.createFetcherStore(n, {
|
|
852
869
|
fetcher: async (i, o, s) => s ? (await r.syncQuestion({
|
|
@@ -858,12 +875,12 @@ const Ki = (t, e, r) => {
|
|
|
858
875
|
// 10 minutes
|
|
859
876
|
refetchInterval: 0
|
|
860
877
|
});
|
|
861
|
-
},
|
|
862
|
-
const { client: r } = e.createStreamClient(be), n =
|
|
878
|
+
}, Xi = (t, e) => {
|
|
879
|
+
const { client: r } = e.createStreamClient(be), n = Tt({ eventId: t.get() || "", feedId: "" });
|
|
863
880
|
return t.subscribe((o = "") => {
|
|
864
881
|
n.set({ eventId: o, feedId: "" });
|
|
865
882
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
866
|
-
},
|
|
883
|
+
}, Zi = (t, e) => {
|
|
867
884
|
const { client: r } = e.createStreamClient(be);
|
|
868
885
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
869
886
|
}, nr = (t, e) => {
|
|
@@ -874,7 +891,7 @@ const Ki = (t, e, r) => {
|
|
|
874
891
|
})).data?.attributes?.question,
|
|
875
892
|
dedupeTime: 1e3 * 60 * 5
|
|
876
893
|
});
|
|
877
|
-
},
|
|
894
|
+
}, eo = (t, e, r) => {
|
|
878
895
|
const { client: n, queryKey: i } = r.createPromiseClient(be, {
|
|
879
896
|
method: "list",
|
|
880
897
|
params: [t, e]
|
|
@@ -890,7 +907,7 @@ const Ki = (t, e, r) => {
|
|
|
890
907
|
dedupeTime: 0,
|
|
891
908
|
refetchInterval: 0
|
|
892
909
|
});
|
|
893
|
-
},
|
|
910
|
+
}, to = (t, e, r) => {
|
|
894
911
|
const n = Nr([e, r], () => {
|
|
895
912
|
const a = e.get();
|
|
896
913
|
if (!a)
|
|
@@ -926,7 +943,7 @@ var Oe;
|
|
|
926
943
|
(function(t) {
|
|
927
944
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
928
945
|
})(Oe || (Oe = {}));
|
|
929
|
-
class
|
|
946
|
+
class ro {
|
|
930
947
|
/** sl event id */
|
|
931
948
|
slStreamId;
|
|
932
949
|
/** organization id */
|
|
@@ -958,11 +975,11 @@ class to {
|
|
|
958
975
|
transport;
|
|
959
976
|
cancels = /* @__PURE__ */ new Set();
|
|
960
977
|
constructor(e) {
|
|
961
|
-
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new W(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new W(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new W(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ye(
|
|
962
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
978
|
+
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new W(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new W(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new W(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ye(Ji(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new ye(eo(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = Yi(this.slStreamId, e.transport), this.openedQuestion = to(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
979
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = Zi(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
963
980
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
964
981
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
965
|
-
})), this.feedSubscription =
|
|
982
|
+
})), this.feedSubscription = Xi(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
966
983
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
967
984
|
i && (n && i.status === ce.RESOLVED && i.id !== n || this.activeQuestionId.mutate(r.data?.attributes));
|
|
968
985
|
})), this.cancels.add(this.feedSubscription.addListener("moderation update", (r) => {
|
|
@@ -1007,7 +1024,7 @@ class to {
|
|
|
1007
1024
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1008
1025
|
};
|
|
1009
1026
|
}
|
|
1010
|
-
class
|
|
1027
|
+
class no {
|
|
1011
1028
|
notificationsList;
|
|
1012
1029
|
store;
|
|
1013
1030
|
timeouts;
|
|
@@ -1088,18 +1105,18 @@ class ro {
|
|
|
1088
1105
|
this.store.clear(), this.timeouts.clear(), this.waitingQueue.clear(), this.activeQueue.clear(), this.notificationsList.off(), this.notificationsList.set(/* @__PURE__ */ new Map());
|
|
1089
1106
|
};
|
|
1090
1107
|
}
|
|
1091
|
-
var
|
|
1108
|
+
var mt;
|
|
1092
1109
|
(function(t) {
|
|
1093
1110
|
t.OPENED = "opened";
|
|
1094
|
-
})(
|
|
1095
|
-
class
|
|
1111
|
+
})(mt || (mt = {}));
|
|
1112
|
+
class io extends tt {
|
|
1096
1113
|
constructor() {
|
|
1097
1114
|
super("notification");
|
|
1098
1115
|
}
|
|
1099
1116
|
setOpened = (e) => {
|
|
1100
|
-
this.write(
|
|
1117
|
+
this.write(mt.OPENED, e, "true");
|
|
1101
1118
|
};
|
|
1102
|
-
isOpened = (e) => this.read(
|
|
1119
|
+
isOpened = (e) => this.read(mt.OPENED, e);
|
|
1103
1120
|
clearNotification = () => {
|
|
1104
1121
|
this.clear();
|
|
1105
1122
|
};
|
|
@@ -1108,11 +1125,11 @@ var ve;
|
|
|
1108
1125
|
(function(t) {
|
|
1109
1126
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1110
1127
|
})(ve || (ve = {}));
|
|
1111
|
-
class
|
|
1128
|
+
class oo {
|
|
1112
1129
|
queue;
|
|
1113
1130
|
storage;
|
|
1114
1131
|
constructor(e = {}) {
|
|
1115
|
-
this.storage = new
|
|
1132
|
+
this.storage = new io(), this.queue = new no({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1116
1133
|
}
|
|
1117
1134
|
add = (e) => {
|
|
1118
1135
|
if (!this.storage.isOpened(e.id)) {
|
|
@@ -1148,8 +1165,8 @@ class io {
|
|
|
1148
1165
|
this.storage.setOpened(e);
|
|
1149
1166
|
};
|
|
1150
1167
|
}
|
|
1151
|
-
const
|
|
1152
|
-
t.notifications = new
|
|
1168
|
+
const so = (t, e, r) => {
|
|
1169
|
+
t.notifications = new oo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1153
1170
|
t.notifications.queue.drain();
|
|
1154
1171
|
}), r();
|
|
1155
1172
|
};
|
|
@@ -1157,14 +1174,14 @@ var Ze;
|
|
|
1157
1174
|
(function(t) {
|
|
1158
1175
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1159
1176
|
})(Ze || (Ze = {}));
|
|
1160
|
-
const
|
|
1177
|
+
const ao = async (t, e) => {
|
|
1161
1178
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1162
1179
|
try {
|
|
1163
1180
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1164
1181
|
} catch (o) {
|
|
1165
1182
|
throw Xe.from(o)?.code === ee.AlreadyExists ? new Error(Ze.ALREADY_VOTED) : new Error(Ze.UNKNOWN);
|
|
1166
1183
|
}
|
|
1167
|
-
},
|
|
1184
|
+
}, uo = (t, e) => {
|
|
1168
1185
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1169
1186
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1170
1187
|
};
|
|
@@ -1172,34 +1189,40 @@ var Me;
|
|
|
1172
1189
|
(function(t) {
|
|
1173
1190
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1174
1191
|
})(Me || (Me = {}));
|
|
1175
|
-
class
|
|
1192
|
+
class co extends tt {
|
|
1193
|
+
constructor() {
|
|
1194
|
+
super("gamification-session", window.sessionStorage);
|
|
1195
|
+
}
|
|
1196
|
+
writeValue = (e, r) => {
|
|
1197
|
+
this.write(...e, r);
|
|
1198
|
+
};
|
|
1199
|
+
readValue = (e) => this.read(...e);
|
|
1200
|
+
}
|
|
1201
|
+
class Cn extends tt {
|
|
1202
|
+
sessionStorage;
|
|
1176
1203
|
constructor() {
|
|
1177
|
-
super("gamification");
|
|
1204
|
+
super("gamification"), this.sessionStorage = new co();
|
|
1178
1205
|
}
|
|
1179
1206
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1180
1207
|
this.write(Me.ONBOARDING, n, e, r, i);
|
|
1181
1208
|
};
|
|
1182
1209
|
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(Me.ONBOARDING, n, e, r);
|
|
1183
1210
|
setOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
|
|
1184
|
-
|
|
1185
|
-
window.sessionStorage.setItem(i, "1");
|
|
1186
|
-
};
|
|
1187
|
-
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
|
|
1188
|
-
const i = this.generateKey([Me.ONBOARDING_IO, n, e, r]);
|
|
1189
|
-
return window.sessionStorage.getItem(i);
|
|
1211
|
+
this.sessionStorage.writeValue([Me.ONBOARDING_IO, n, e, r], "1");
|
|
1190
1212
|
};
|
|
1213
|
+
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Me.ONBOARDING_IO, n, e, r]);
|
|
1191
1214
|
}
|
|
1192
|
-
const
|
|
1215
|
+
const lo = {
|
|
1193
1216
|
pageSize: 10
|
|
1194
|
-
},
|
|
1217
|
+
}, fo = (t, e, r, n, i) => {
|
|
1195
1218
|
let o = 0;
|
|
1196
|
-
const s = B({ pageSize: i?.pageSize ||
|
|
1219
|
+
const s = B({ pageSize: i?.pageSize || lo.pageSize, page: 0 }), a = ie({
|
|
1197
1220
|
data: [],
|
|
1198
1221
|
key: Date.now(),
|
|
1199
1222
|
hasMore: !0,
|
|
1200
1223
|
loading: void 0,
|
|
1201
1224
|
error: void 0
|
|
1202
|
-
}), u =
|
|
1225
|
+
}), u = Hi(t), d = async () => {
|
|
1203
1226
|
const p = e.get(), m = n.getStore().get().data?.map((v) => v.slId) || [];
|
|
1204
1227
|
if (p && m?.length) {
|
|
1205
1228
|
const v = r.get();
|
|
@@ -1209,8 +1232,8 @@ const uo = {
|
|
|
1209
1232
|
usersIds: m
|
|
1210
1233
|
});
|
|
1211
1234
|
a.set({
|
|
1212
|
-
data: b.data.map((
|
|
1213
|
-
...
|
|
1235
|
+
data: b.data.map((L, $) => ({
|
|
1236
|
+
...L.attributes,
|
|
1214
1237
|
friendsRank: $ + 1
|
|
1215
1238
|
})),
|
|
1216
1239
|
hasMore: !1,
|
|
@@ -1231,7 +1254,7 @@ const uo = {
|
|
|
1231
1254
|
};
|
|
1232
1255
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1233
1256
|
};
|
|
1234
|
-
class
|
|
1257
|
+
class ho extends tt {
|
|
1235
1258
|
get = this.read;
|
|
1236
1259
|
set = this.write;
|
|
1237
1260
|
del = this.remove;
|
|
@@ -1239,12 +1262,12 @@ class lo extends Ot {
|
|
|
1239
1262
|
super("deep-link-context", window.sessionStorage);
|
|
1240
1263
|
}
|
|
1241
1264
|
}
|
|
1242
|
-
const qr = "sldl", Ct = "sldl_uid",
|
|
1265
|
+
const qr = "sldl", Ct = "sldl_uid", _n = "sldl_eid", Ln = "sldl_e_eid", po = /* @__PURE__ */ new Set([Ct, _n, Ln]), Qr = (t) => {
|
|
1243
1266
|
const e = {}, r = {};
|
|
1244
1267
|
for (const [n, i] of t)
|
|
1245
|
-
|
|
1268
|
+
po.has(n) ? e[n] = i : r[n] = i;
|
|
1246
1269
|
return { result: e, remain: r };
|
|
1247
|
-
},
|
|
1270
|
+
}, yo = ({ hash: t, search: e }) => {
|
|
1248
1271
|
if (t && t.includes(qr)) {
|
|
1249
1272
|
const r = new URLSearchParams(t.substr(1));
|
|
1250
1273
|
return { hash: Qr(r) };
|
|
@@ -1261,10 +1284,10 @@ const qr = "sldl", Ct = "sldl_uid", Cn = "sldl_eid", Ln = "sldl_e_eid", fo = /*
|
|
|
1261
1284
|
trace: (...t) => {
|
|
1262
1285
|
Gr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1263
1286
|
}
|
|
1264
|
-
},
|
|
1287
|
+
}, go = (t, e) => {
|
|
1265
1288
|
const { hash: r, search: n } = window.location;
|
|
1266
1289
|
if (ne.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1267
|
-
const i =
|
|
1290
|
+
const i = yo({ hash: r, search: n });
|
|
1268
1291
|
if (ne.debug(i, "parse deep link result"), i) {
|
|
1269
1292
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1270
1293
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1283,8 +1306,8 @@ const qr = "sldl", Ct = "sldl_uid", Cn = "sldl_eid", Ln = "sldl_e_eid", fo = /*
|
|
|
1283
1306
|
}
|
|
1284
1307
|
}
|
|
1285
1308
|
t.setValue("parsed", !0);
|
|
1286
|
-
},
|
|
1287
|
-
const n = new
|
|
1309
|
+
}, mo = (t, e, r) => {
|
|
1310
|
+
const n = new ho(), i = n.get("sl-deep-link-store");
|
|
1288
1311
|
let o = {};
|
|
1289
1312
|
if (i)
|
|
1290
1313
|
try {
|
|
@@ -1322,15 +1345,15 @@ const qr = "sldl", Ct = "sldl_uid", Cn = "sldl_eid", Ln = "sldl_e_eid", fo = /*
|
|
|
1322
1345
|
console.error(d);
|
|
1323
1346
|
}
|
|
1324
1347
|
};
|
|
1325
|
-
|
|
1326
|
-
},
|
|
1327
|
-
class
|
|
1348
|
+
go(t.deepLink.$store, s), r();
|
|
1349
|
+
}, vo = Se("bypass");
|
|
1350
|
+
class bo extends Ti {
|
|
1328
1351
|
$coreStore;
|
|
1329
1352
|
deepLink;
|
|
1330
1353
|
transport;
|
|
1331
1354
|
bypassLogin;
|
|
1332
1355
|
constructor(e, r, n) {
|
|
1333
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1356
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = ji(this.transport), this.connect();
|
|
1334
1357
|
}
|
|
1335
1358
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1336
1359
|
/**
|
|
@@ -1342,7 +1365,7 @@ class mo extends Ii {
|
|
|
1342
1365
|
login = async (e, r) => {
|
|
1343
1366
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1344
1367
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Ct];
|
|
1345
|
-
|
|
1368
|
+
vo.debug({ inviterKey: o }, "login with inviterKey");
|
|
1346
1369
|
const s = await this.bypassLogin({
|
|
1347
1370
|
schema: e,
|
|
1348
1371
|
userKey: r,
|
|
@@ -1411,8 +1434,8 @@ class mo extends Ii {
|
|
|
1411
1434
|
});
|
|
1412
1435
|
};
|
|
1413
1436
|
}
|
|
1414
|
-
const He = new je(),
|
|
1415
|
-
t.auth = new
|
|
1437
|
+
const He = new je(), So = (t, e, r) => {
|
|
1438
|
+
t.auth = new bo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1416
1439
|
n === de.READY && t.auth.reLogin();
|
|
1417
1440
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1418
1441
|
if (!(He.getSchema() === n && He.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
@@ -1424,24 +1447,24 @@ const He = new je(), vo = (t, e, r) => {
|
|
|
1424
1447
|
}, t.sdk.logout = () => {
|
|
1425
1448
|
t.auth.logout(), He.clear();
|
|
1426
1449
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1427
|
-
},
|
|
1450
|
+
}, zr = Se("video_player"), ut = {
|
|
1428
1451
|
debug: (...t) => {
|
|
1429
|
-
|
|
1452
|
+
zr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1430
1453
|
},
|
|
1431
1454
|
trace: (...t) => {
|
|
1432
|
-
|
|
1455
|
+
zr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1433
1456
|
}
|
|
1434
|
-
},
|
|
1457
|
+
}, wo = (t, e, r) => {
|
|
1435
1458
|
t.videoPlayer = {
|
|
1436
1459
|
controllers: /* @__PURE__ */ new Set()
|
|
1437
1460
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
1438
|
-
|
|
1461
|
+
ut.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
|
|
1439
1462
|
}, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
|
|
1440
|
-
|
|
1463
|
+
ut.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
|
|
1441
1464
|
}, t.sdk.controlVideoPlayer = (n) => {
|
|
1442
|
-
|
|
1465
|
+
ut.trace("controlling video player");
|
|
1443
1466
|
for (const i of t.videoPlayer.controllers) {
|
|
1444
|
-
|
|
1467
|
+
ut.trace("calling video player controller");
|
|
1445
1468
|
try {
|
|
1446
1469
|
i(n);
|
|
1447
1470
|
} catch (o) {
|
|
@@ -1449,7 +1472,7 @@ const He = new je(), vo = (t, e, r) => {
|
|
|
1449
1472
|
}
|
|
1450
1473
|
}
|
|
1451
1474
|
}, r();
|
|
1452
|
-
},
|
|
1475
|
+
}, Ao = (t, e, r) => {
|
|
1453
1476
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1454
1477
|
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1455
1478
|
if (i.has(s)) {
|
|
@@ -1476,7 +1499,7 @@ const He = new je(), vo = (t, e, r) => {
|
|
|
1476
1499
|
}, t.sdk.createEventSession = (s) => {
|
|
1477
1500
|
t.stores.providerStreamId.setValue(s);
|
|
1478
1501
|
}, r();
|
|
1479
|
-
},
|
|
1502
|
+
}, Eo = (t, e) => {
|
|
1480
1503
|
const { client: r, queryKey: n } = t.createPromiseClient(et, {
|
|
1481
1504
|
method: "generateDeepLink",
|
|
1482
1505
|
params: e
|
|
@@ -1489,27 +1512,27 @@ const He = new je(), vo = (t, e, r) => {
|
|
|
1489
1512
|
// 24 hours
|
|
1490
1513
|
refetchInterval: 0
|
|
1491
1514
|
});
|
|
1492
|
-
},
|
|
1493
|
-
const { client: n } = t.createPromiseClient(
|
|
1515
|
+
}, Io = (t, { web: e, mobile: r }) => {
|
|
1516
|
+
const { client: n } = t.createPromiseClient(gi, { method: "generate" });
|
|
1494
1517
|
return n.generate({ web: e, mobile: r });
|
|
1495
|
-
},
|
|
1518
|
+
}, Kr = (t, e) => {
|
|
1496
1519
|
const r = new URLSearchParams(t);
|
|
1497
1520
|
for (const [n, i] of Object.entries(e))
|
|
1498
1521
|
r.append(n, i);
|
|
1499
1522
|
return r.toString();
|
|
1500
|
-
},
|
|
1523
|
+
}, To = (t, e, r, n) => {
|
|
1501
1524
|
const i = ie({});
|
|
1502
|
-
return pr(i, () =>
|
|
1525
|
+
return pr(i, () => Eo(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
|
|
1503
1526
|
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", p = e.get() || "", m = r.get() || "", v = {
|
|
1504
1527
|
[Ct]: f,
|
|
1505
|
-
[
|
|
1528
|
+
[_n]: p,
|
|
1506
1529
|
[Ln]: m
|
|
1507
1530
|
};
|
|
1508
1531
|
if (!d && c) {
|
|
1509
1532
|
i.setKey("loading", !0);
|
|
1510
1533
|
let I = window.location.search, b = window.location.hash;
|
|
1511
|
-
I && b || b ? I = `?${
|
|
1512
|
-
const
|
|
1534
|
+
I && b || b ? I = `?${Kr(I, v)}` : b = `#${Kr("", v)}`;
|
|
1535
|
+
const L = window.location.origin + window.location.pathname + I + b, $ = await Io(t, { web: L, mobile: c });
|
|
1513
1536
|
i.set({
|
|
1514
1537
|
data: $.data?.link,
|
|
1515
1538
|
loading: !1
|
|
@@ -1522,7 +1545,7 @@ var U;
|
|
|
1522
1545
|
(function(t) {
|
|
1523
1546
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1524
1547
|
})(U || (U = {}));
|
|
1525
|
-
const
|
|
1548
|
+
const Oo = (t, e, r, n) => {
|
|
1526
1549
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1527
1550
|
i && r.add({
|
|
1528
1551
|
type: ve.ONBOARDING,
|
|
@@ -1543,7 +1566,7 @@ const Io = (t, e, r, n) => {
|
|
|
1543
1566
|
}
|
|
1544
1567
|
}
|
|
1545
1568
|
});
|
|
1546
|
-
},
|
|
1569
|
+
}, ct = (t, e, r, n, i, o) => {
|
|
1547
1570
|
try {
|
|
1548
1571
|
const s = e.userId.get();
|
|
1549
1572
|
if (!s)
|
|
@@ -1566,27 +1589,27 @@ const Io = (t, e, r, n) => {
|
|
|
1566
1589
|
} catch (s) {
|
|
1567
1590
|
console.error(s);
|
|
1568
1591
|
}
|
|
1569
|
-
},
|
|
1592
|
+
}, Co = (t, e, r, n) => {
|
|
1570
1593
|
let i = !1;
|
|
1571
|
-
const o = new
|
|
1594
|
+
const o = new Cn(), s = B(U.Unset);
|
|
1572
1595
|
s.subscribe((d) => {
|
|
1573
|
-
d !== U.Unset && ((d === U.Optional || d === U.Required) && i === !1 && (
|
|
1596
|
+
d !== U.Unset && ((d === U.Optional || d === U.Required) && i === !1 && (Oo(t, e, n, o), i = !0), d === U.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1574
1597
|
userId: e.userId.get() || "",
|
|
1575
1598
|
organizationId: e.organizationId.get() || "",
|
|
1576
1599
|
eventId: e.slStreamId.get() || ""
|
|
1577
1600
|
}));
|
|
1578
1601
|
});
|
|
1579
1602
|
const a = [];
|
|
1580
|
-
return
|
|
1581
|
-
d &&
|
|
1603
|
+
return ct(s, e, t, n, o, a), s.get() !== U.Completed && (a.push(e.userId.listen((d) => {
|
|
1604
|
+
d && ct(s, e, t, n, o, a);
|
|
1582
1605
|
})), a.push(e.moderation.listen((d) => {
|
|
1583
|
-
d.data &&
|
|
1606
|
+
d.data && ct(s, e, t, n, o, a);
|
|
1584
1607
|
})), a.push(t.featureSettings.listen((d) => {
|
|
1585
|
-
d &&
|
|
1608
|
+
d && ct(s, e, t, n, o, a);
|
|
1586
1609
|
}))), { $store: s, submitInplay: async () => {
|
|
1587
1610
|
const d = e.slStreamId.get();
|
|
1588
1611
|
if (d) {
|
|
1589
|
-
await
|
|
1612
|
+
await uo(r, d), s.set(U.Completed), o.saveOnboardingStatus({
|
|
1590
1613
|
organizationId: e.organizationId.get() || "",
|
|
1591
1614
|
userId: e.userId.get() || "",
|
|
1592
1615
|
eventId: d
|
|
@@ -1598,8 +1621,8 @@ const Io = (t, e, r, n) => {
|
|
|
1598
1621
|
n.close(c);
|
|
1599
1622
|
}
|
|
1600
1623
|
} };
|
|
1601
|
-
},
|
|
1602
|
-
const i = ie(void 0), o =
|
|
1624
|
+
}, _o = (t, e, r, n) => {
|
|
1625
|
+
const i = ie(void 0), o = On(n), s = async () => {
|
|
1603
1626
|
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((m) => m.slId);
|
|
1604
1627
|
if (!c)
|
|
1605
1628
|
return;
|
|
@@ -1618,15 +1641,15 @@ const Io = (t, e, r, n) => {
|
|
|
1618
1641
|
u(), d(), c();
|
|
1619
1642
|
};
|
|
1620
1643
|
}), { $store: i, invalidate: a };
|
|
1621
|
-
},
|
|
1622
|
-
const o =
|
|
1644
|
+
}, Lo = async (t, e, r, n, i) => {
|
|
1645
|
+
const o = On(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], d = {
|
|
1623
1646
|
eventId: s,
|
|
1624
1647
|
userId: n,
|
|
1625
1648
|
usersIds: [...u, a]
|
|
1626
1649
|
};
|
|
1627
1650
|
return (await o(d)).data?.attributes?.summary;
|
|
1628
|
-
},
|
|
1629
|
-
class
|
|
1651
|
+
}, ko = /* @__PURE__ */ new Set([D.POLL, D.PREDICTION, D.TRIVIA]);
|
|
1652
|
+
class Po extends In {
|
|
1630
1653
|
/** user statistics (leaderboard panel) */
|
|
1631
1654
|
userSummary;
|
|
1632
1655
|
/** feed list (pick history) */
|
|
@@ -1660,7 +1683,7 @@ class _o extends In {
|
|
|
1660
1683
|
submitAnswerTimeout;
|
|
1661
1684
|
cancels = /* @__PURE__ */ new Set();
|
|
1662
1685
|
constructor(e, r, n) {
|
|
1663
|
-
super(e, r), this.background = new
|
|
1686
|
+
super(e, r), this.background = new ro(n), this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new Cn(), this.feedList = this.background.feedList, this.friends = new ye(Wi(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new W(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Co(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(N.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = To(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = _o(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = fo(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
1664
1687
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
1665
1688
|
})), this.cancels.add(this.background.activeQuestionId.listen(this.showInApp)), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), n.sdk.onMount({ name: "gamification", clear: !0 }, () => () => {
|
|
1666
1689
|
for (const i of this.cancels)
|
|
@@ -1694,15 +1717,15 @@ class _o extends In {
|
|
|
1694
1717
|
v(), window.requestAnimationFrame(() => {
|
|
1695
1718
|
m.invalidate();
|
|
1696
1719
|
}), p || (p = I?.answers.find(({ youVoted: q }) => q)?.id);
|
|
1697
|
-
const b = a.find(({ correct: q }) => q),
|
|
1720
|
+
const b = a.find(({ correct: q }) => q), L = p ? a.find(({ id: q }) => q === p) : void 0, $ = !!L?.correct;
|
|
1698
1721
|
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
1699
1722
|
try {
|
|
1700
|
-
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = $ ?
|
|
1723
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = $ ? at.WON : at.LOST);
|
|
1701
1724
|
} catch {
|
|
1702
1725
|
}
|
|
1703
1726
|
this.feedList.getStore().mutate(d);
|
|
1704
1727
|
}
|
|
1705
|
-
if (!
|
|
1728
|
+
if (!L || !b)
|
|
1706
1729
|
return;
|
|
1707
1730
|
this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
|
|
1708
1731
|
type: ve.QUESTION_RESOLVED,
|
|
@@ -1717,8 +1740,8 @@ class _o extends In {
|
|
|
1717
1740
|
question: {
|
|
1718
1741
|
title: $ ? `Congratulations! You answered correctly! You won ${b.points} pts!` : `Better luck next time! Correct: ${b?.text}!`,
|
|
1719
1742
|
votedAnswer: {
|
|
1720
|
-
title:
|
|
1721
|
-
points:
|
|
1743
|
+
title: L?.text,
|
|
1744
|
+
points: L?.points
|
|
1722
1745
|
},
|
|
1723
1746
|
correctAnswerTitle: b?.text,
|
|
1724
1747
|
correct: !!$,
|
|
@@ -1807,8 +1830,8 @@ class _o extends In {
|
|
|
1807
1830
|
});
|
|
1808
1831
|
const f = n.get().data;
|
|
1809
1832
|
if (i(), f) {
|
|
1810
|
-
const p = f.answers.find((b) => b.correct === !0), m = f.answers.findIndex((b) => b.id === r), v = f.answers[m], I = f.answers.every(({ percentageDecimal: b },
|
|
1811
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ?
|
|
1833
|
+
const p = f.answers.find((b) => b.correct === !0), m = f.answers.findIndex((b) => b.id === r), v = f.answers[m], I = f.answers.every(({ percentageDecimal: b }, L) => b === o?.answers[L].percentageDecimal);
|
|
1834
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = v?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? at.WON : at.LOST), this.feedList.getStore().mutate([...a]), f.answers[m].correct = p?.id === r, f.answers[m].youVoted = !0, I && f.answers.forEach((b) => {
|
|
1812
1835
|
b.percentageDecimal = 0;
|
|
1813
1836
|
}), p?.id === r && (f.answers[m].pointsEarned = f.status === ce.RESOLVED ? 0 : p.points), n.mutate({ ...f });
|
|
1814
1837
|
}
|
|
@@ -1818,7 +1841,7 @@ class _o extends In {
|
|
|
1818
1841
|
}
|
|
1819
1842
|
};
|
|
1820
1843
|
try {
|
|
1821
|
-
await
|
|
1844
|
+
await ao(this.transport, { questionId: e, answerId: r }), s();
|
|
1822
1845
|
} catch (a) {
|
|
1823
1846
|
if (a.message === Ze.ALREADY_VOTED) {
|
|
1824
1847
|
this.userSummary.invalidate();
|
|
@@ -1862,7 +1885,7 @@ class _o extends In {
|
|
|
1862
1885
|
}
|
|
1863
1886
|
const n = { ...r };
|
|
1864
1887
|
try {
|
|
1865
|
-
const i = await
|
|
1888
|
+
const i = await Lo(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
1866
1889
|
i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
|
|
1867
1890
|
} catch (i) {
|
|
1868
1891
|
console.error(i);
|
|
@@ -1880,8 +1903,8 @@ class _o extends In {
|
|
|
1880
1903
|
*/
|
|
1881
1904
|
showInApp = (e) => {
|
|
1882
1905
|
const r = this.onboardingStatus.$store.get();
|
|
1883
|
-
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !==
|
|
1884
|
-
if (
|
|
1906
|
+
if (e && e.data && r && r !== U.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== di.ON && e.data.question.status === ce.ACTIVE && !e.data.question.marketClosed) {
|
|
1907
|
+
if (ko.has(e.data.question.type))
|
|
1885
1908
|
this.isInteractiveAllowed && this.notifications.add({
|
|
1886
1909
|
type: ve.QUESTION,
|
|
1887
1910
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -1956,15 +1979,15 @@ class _o extends In {
|
|
|
1956
1979
|
}
|
|
1957
1980
|
};
|
|
1958
1981
|
}
|
|
1959
|
-
const
|
|
1982
|
+
const Fo = {
|
|
1960
1983
|
[N.GAMES]: !0
|
|
1961
1984
|
};
|
|
1962
|
-
class
|
|
1985
|
+
class No extends In {
|
|
1963
1986
|
constructor(e, r) {
|
|
1964
1987
|
super(e, r);
|
|
1965
1988
|
}
|
|
1966
1989
|
}
|
|
1967
|
-
const
|
|
1990
|
+
const Do = (t, e, r) => t.type === N.GAMES ? new Po(t, e, r) : new No(t, e), Ro = (t, e, r) => {
|
|
1968
1991
|
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new W(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new W(B(N.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
|
|
1969
1992
|
t.activeFeature.setValue(n);
|
|
1970
1993
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
@@ -1975,8 +1998,8 @@ const Fo = (t, e, r) => t.type === N.GAMES ? new _o(t, e, r) : new Po(t, e), No
|
|
|
1975
1998
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
1976
1999
|
}
|
|
1977
2000
|
}, t.initFeature = (n, i = le.ORGANIZATION) => {
|
|
1978
|
-
if (n.type in
|
|
1979
|
-
const o =
|
|
2001
|
+
if (n.type in Fo && !t.features.has(n.type)) {
|
|
2002
|
+
const o = Do(n, i, t);
|
|
1980
2003
|
t.features.set(n.type, o);
|
|
1981
2004
|
let s = t.sdk.featuresList.getValue();
|
|
1982
2005
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2029,7 +2052,7 @@ const Fo = (t, e, r) => t.type === N.GAMES ? new _o(t, e, r) : new Po(t, e), No
|
|
|
2029
2052
|
t.store.subscribe(i);
|
|
2030
2053
|
}, r();
|
|
2031
2054
|
};
|
|
2032
|
-
class
|
|
2055
|
+
class $o {
|
|
2033
2056
|
analytics;
|
|
2034
2057
|
constructor(e) {
|
|
2035
2058
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2065,7 +2088,7 @@ class Do {
|
|
|
2065
2088
|
});
|
|
2066
2089
|
};
|
|
2067
2090
|
}
|
|
2068
|
-
class
|
|
2091
|
+
class Vo {
|
|
2069
2092
|
analytics;
|
|
2070
2093
|
constructor(e) {
|
|
2071
2094
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2103,16 +2126,16 @@ class Ro {
|
|
|
2103
2126
|
};
|
|
2104
2127
|
}
|
|
2105
2128
|
const Je = {
|
|
2106
|
-
[D.UNSET]:
|
|
2107
|
-
[D.FACTOID]:
|
|
2108
|
-
[D.POLL]:
|
|
2109
|
-
[D.PREDICTION]:
|
|
2110
|
-
[D.PROMOTION]:
|
|
2111
|
-
[D.TRIVIA]:
|
|
2112
|
-
[D.TWEET]:
|
|
2129
|
+
[D.UNSET]: z.UNSET,
|
|
2130
|
+
[D.FACTOID]: z.POLLS_INSIGHT,
|
|
2131
|
+
[D.POLL]: z.POLLS_POLL,
|
|
2132
|
+
[D.PREDICTION]: z.POLLS_PREDICTION,
|
|
2133
|
+
[D.PROMOTION]: z.POLLS_PROMOTION,
|
|
2134
|
+
[D.TRIVIA]: z.POLLS_TRIVIA,
|
|
2135
|
+
[D.TWEET]: z.POLLS_TWITTER
|
|
2113
2136
|
};
|
|
2114
2137
|
D.UNSET + "", ae.UNSET, D.FACTOID + "", ae.POLLS, D.POLL + "", ae.POLLS, D.PREDICTION + "", ae.POLLS, D.PROMOTION + "", ae.POLLS, D.TRIVIA + "", ae.POLLS, D.TWEET + "", ae.POLLS;
|
|
2115
|
-
const
|
|
2138
|
+
const jo = {
|
|
2116
2139
|
[N.UNSET]: Q.UNSET,
|
|
2117
2140
|
[N.INPLAY]: Q.INPLAY,
|
|
2118
2141
|
[N.MESSAGING]: Q.MESSAGING,
|
|
@@ -2132,7 +2155,7 @@ const $o = {
|
|
|
2132
2155
|
[N.HIGHLIGHTS]: Q.HIGHLIGHTS,
|
|
2133
2156
|
[N.PUBLIC_CHAT]: Q.PUBLIC_CHAT
|
|
2134
2157
|
};
|
|
2135
|
-
class
|
|
2158
|
+
class Mo {
|
|
2136
2159
|
analytics;
|
|
2137
2160
|
constructor(e) {
|
|
2138
2161
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2156,7 +2179,7 @@ class Vo {
|
|
|
2156
2179
|
...this.analytics.commonStore.getValues(),
|
|
2157
2180
|
kind: H.NOTIFICATION_RECEIVED,
|
|
2158
2181
|
topicId: e,
|
|
2159
|
-
topicType: r ? Je[r] :
|
|
2182
|
+
topicType: r ? Je[r] : z.UNSET
|
|
2160
2183
|
},
|
|
2161
2184
|
notificationKind: ae.POLLS,
|
|
2162
2185
|
notificationType: Ur.IN_APP
|
|
@@ -2168,14 +2191,14 @@ class Vo {
|
|
|
2168
2191
|
...this.analytics.commonStore.getValues(),
|
|
2169
2192
|
kind: H.NOTIFICATION_OPENED,
|
|
2170
2193
|
topicId: e,
|
|
2171
|
-
topicType: r ? Je[r] :
|
|
2194
|
+
topicType: r ? Je[r] : z.UNSET
|
|
2172
2195
|
},
|
|
2173
2196
|
notificationKind: ae.POLLS,
|
|
2174
2197
|
notificationType: Ur.IN_APP
|
|
2175
2198
|
});
|
|
2176
2199
|
};
|
|
2177
2200
|
}
|
|
2178
|
-
class
|
|
2201
|
+
class Uo {
|
|
2179
2202
|
analytics;
|
|
2180
2203
|
constructor(e) {
|
|
2181
2204
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2209,7 +2232,7 @@ class jo {
|
|
|
2209
2232
|
...this.analytics.commonStore.getValues(),
|
|
2210
2233
|
kind: H.POLLS_RECEIVED,
|
|
2211
2234
|
topicId: e,
|
|
2212
|
-
topicType: r ? Je[r] :
|
|
2235
|
+
topicType: r ? Je[r] : z.UNSET
|
|
2213
2236
|
},
|
|
2214
2237
|
pollOpenedFrom: De.UNSET
|
|
2215
2238
|
});
|
|
@@ -2221,7 +2244,7 @@ class jo {
|
|
|
2221
2244
|
...this.analytics.commonStore.getValues(),
|
|
2222
2245
|
kind: H.POLLS_OPENED,
|
|
2223
2246
|
topicId: e,
|
|
2224
|
-
topicType: r ? Je[r] :
|
|
2247
|
+
topicType: r ? Je[r] : z.UNSET
|
|
2225
2248
|
},
|
|
2226
2249
|
pollOpenedFrom: n === "list" ? De.PICK_HISTORY : De.IN_APP
|
|
2227
2250
|
});
|
|
@@ -2233,7 +2256,7 @@ class jo {
|
|
|
2233
2256
|
...this.analytics.commonStore.getValues(),
|
|
2234
2257
|
kind: H.POLLS_VOTE,
|
|
2235
2258
|
topicId: e,
|
|
2236
|
-
topicType: r ? Je[r] :
|
|
2259
|
+
topicType: r ? Je[r] : z.UNSET
|
|
2237
2260
|
},
|
|
2238
2261
|
pollOpenedFrom: De.UNSET
|
|
2239
2262
|
});
|
|
@@ -2259,7 +2282,7 @@ class jo {
|
|
|
2259
2282
|
});
|
|
2260
2283
|
};
|
|
2261
2284
|
}
|
|
2262
|
-
const
|
|
2285
|
+
const xo = ({ transport: t, $commonStore: e }) => {
|
|
2263
2286
|
let r;
|
|
2264
2287
|
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(bn, {
|
|
2265
2288
|
method: "send",
|
|
@@ -2297,7 +2320,7 @@ const Mo = ({ transport: t, $commonStore: e }) => {
|
|
|
2297
2320
|
fe.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2298
2321
|
} };
|
|
2299
2322
|
}, fe = Se("analytics");
|
|
2300
|
-
class
|
|
2323
|
+
class Bo {
|
|
2301
2324
|
commonStore;
|
|
2302
2325
|
notifications;
|
|
2303
2326
|
polls;
|
|
@@ -2309,7 +2332,7 @@ class Uo {
|
|
|
2309
2332
|
listenersCancels;
|
|
2310
2333
|
connected = !1;
|
|
2311
2334
|
constructor(e) {
|
|
2312
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat =
|
|
2335
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = xo({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Mo(this), this.polls = new Uo(this), this.invitation = new $o(this), this.interactions = new Vo(this);
|
|
2313
2336
|
const { client: r } = e.analyticsTransport.createPromiseClient(bn, {
|
|
2314
2337
|
method: "send"
|
|
2315
2338
|
});
|
|
@@ -2339,7 +2362,7 @@ class Uo {
|
|
|
2339
2362
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2340
2363
|
this.writeCommon("eventId", r);
|
|
2341
2364
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2342
|
-
r && this.writeCommon("category",
|
|
2365
|
+
r && this.writeCommon("category", jo[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Zt()) : this.writeCommon("overlaySessionId", "");
|
|
2343
2366
|
})), this.onConnect(() => {
|
|
2344
2367
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2345
2368
|
this.writeCommon("screenOrientation", i.matches ? jr.PORTRAIT : jr.LANDSCAPE);
|
|
@@ -2352,17 +2375,17 @@ class Uo {
|
|
|
2352
2375
|
}));
|
|
2353
2376
|
};
|
|
2354
2377
|
}
|
|
2355
|
-
const
|
|
2356
|
-
t.analytics = new
|
|
2378
|
+
const qo = (t, e, r) => {
|
|
2379
|
+
t.analytics = new Bo(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2357
2380
|
t.analytics.disconnect();
|
|
2358
2381
|
})), r();
|
|
2359
2382
|
};
|
|
2360
2383
|
var gr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2361
|
-
function
|
|
2384
|
+
function Qo(t) {
|
|
2362
2385
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2363
2386
|
}
|
|
2364
2387
|
var mr = { exports: {} }, vr = { exports: {} };
|
|
2365
|
-
function
|
|
2388
|
+
function Go(t) {
|
|
2366
2389
|
var e = new t(), r = e;
|
|
2367
2390
|
function n() {
|
|
2368
2391
|
var o = e;
|
|
@@ -2376,14 +2399,14 @@ function qo(t) {
|
|
|
2376
2399
|
release: i
|
|
2377
2400
|
};
|
|
2378
2401
|
}
|
|
2379
|
-
var
|
|
2380
|
-
function
|
|
2402
|
+
var zo = Go, Ko = zo;
|
|
2403
|
+
function kn(t, e, r) {
|
|
2381
2404
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2382
2405
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2383
|
-
var n =
|
|
2406
|
+
var n = Ko(Ho), i = null, o = null, s = 0, a = null, u = {
|
|
2384
2407
|
push: I,
|
|
2385
|
-
drain:
|
|
2386
|
-
saturated:
|
|
2408
|
+
drain: K,
|
|
2409
|
+
saturated: K,
|
|
2387
2410
|
pause: c,
|
|
2388
2411
|
paused: !1,
|
|
2389
2412
|
concurrency: r,
|
|
@@ -2393,7 +2416,7 @@ function _n(t, e, r) {
|
|
|
2393
2416
|
length: f,
|
|
2394
2417
|
getQueue: p,
|
|
2395
2418
|
unshift: b,
|
|
2396
|
-
empty:
|
|
2419
|
+
empty: K,
|
|
2397
2420
|
kill: $,
|
|
2398
2421
|
killAndDrain: q,
|
|
2399
2422
|
error: J
|
|
@@ -2419,7 +2442,7 @@ function _n(t, e, r) {
|
|
|
2419
2442
|
if (u.paused) {
|
|
2420
2443
|
u.paused = !1;
|
|
2421
2444
|
for (var k = 0; k < u.concurrency; k++)
|
|
2422
|
-
s++,
|
|
2445
|
+
s++, L();
|
|
2423
2446
|
}
|
|
2424
2447
|
}
|
|
2425
2448
|
function v() {
|
|
@@ -2427,45 +2450,45 @@ function _n(t, e, r) {
|
|
|
2427
2450
|
}
|
|
2428
2451
|
function I(k, R) {
|
|
2429
2452
|
var T = n.get();
|
|
2430
|
-
T.context = t, T.release =
|
|
2453
|
+
T.context = t, T.release = L, T.value = k, T.callback = R || K, T.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = T, o = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2431
2454
|
}
|
|
2432
2455
|
function b(k, R) {
|
|
2433
2456
|
var T = n.get();
|
|
2434
|
-
T.context = t, T.release =
|
|
2457
|
+
T.context = t, T.release = L, T.value = k, T.callback = R || K, T.errorHandler = a, s === u.concurrency || u.paused ? i ? (T.next = i, i = T) : (i = T, o = T, u.saturated()) : (s++, e.call(t, T.value, T.worked));
|
|
2435
2458
|
}
|
|
2436
|
-
function
|
|
2459
|
+
function L(k) {
|
|
2437
2460
|
k && n.release(k);
|
|
2438
2461
|
var R = i;
|
|
2439
2462
|
R ? u.paused ? s-- : (o === i && (o = null), i = R.next, R.next = null, e.call(t, R.value, R.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
2440
2463
|
}
|
|
2441
2464
|
function $() {
|
|
2442
|
-
i = null, o = null, u.drain =
|
|
2465
|
+
i = null, o = null, u.drain = K;
|
|
2443
2466
|
}
|
|
2444
2467
|
function q() {
|
|
2445
|
-
i = null, o = null, u.drain(), u.drain =
|
|
2468
|
+
i = null, o = null, u.drain(), u.drain = K;
|
|
2446
2469
|
}
|
|
2447
2470
|
function J(k) {
|
|
2448
2471
|
a = k;
|
|
2449
2472
|
}
|
|
2450
2473
|
}
|
|
2451
|
-
function
|
|
2474
|
+
function K() {
|
|
2452
2475
|
}
|
|
2453
|
-
function
|
|
2454
|
-
this.value = null, this.callback =
|
|
2476
|
+
function Ho() {
|
|
2477
|
+
this.value = null, this.callback = K, this.next = null, this.release = K, this.context = null, this.errorHandler = null;
|
|
2455
2478
|
var t = this;
|
|
2456
2479
|
this.worked = function(r, n) {
|
|
2457
2480
|
var i = t.callback, o = t.errorHandler, s = t.value;
|
|
2458
|
-
t.value = null, t.callback =
|
|
2481
|
+
t.value = null, t.callback = K, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2459
2482
|
};
|
|
2460
2483
|
}
|
|
2461
|
-
function
|
|
2484
|
+
function Wo(t, e, r) {
|
|
2462
2485
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2463
2486
|
function n(c, f) {
|
|
2464
2487
|
e.call(this, c).then(function(p) {
|
|
2465
2488
|
f(null, p);
|
|
2466
2489
|
}, f);
|
|
2467
2490
|
}
|
|
2468
|
-
var i =
|
|
2491
|
+
var i = kn(t, n, r), o = i.push, s = i.unshift;
|
|
2469
2492
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
2470
2493
|
function a(c) {
|
|
2471
2494
|
var f = new Promise(function(p, m) {
|
|
@@ -2477,7 +2500,7 @@ function zo(t, e, r) {
|
|
|
2477
2500
|
p(I);
|
|
2478
2501
|
});
|
|
2479
2502
|
});
|
|
2480
|
-
return f.catch(
|
|
2503
|
+
return f.catch(K), f;
|
|
2481
2504
|
}
|
|
2482
2505
|
function u(c) {
|
|
2483
2506
|
var f = new Promise(function(p, m) {
|
|
@@ -2489,7 +2512,7 @@ function zo(t, e, r) {
|
|
|
2489
2512
|
p(I);
|
|
2490
2513
|
});
|
|
2491
2514
|
});
|
|
2492
|
-
return f.catch(
|
|
2515
|
+
return f.catch(K), f;
|
|
2493
2516
|
}
|
|
2494
2517
|
function d() {
|
|
2495
2518
|
if (i.idle())
|
|
@@ -2504,33 +2527,33 @@ function zo(t, e, r) {
|
|
|
2504
2527
|
return f;
|
|
2505
2528
|
}
|
|
2506
2529
|
}
|
|
2507
|
-
vr.exports =
|
|
2508
|
-
vr.exports.promise =
|
|
2509
|
-
var
|
|
2530
|
+
vr.exports = kn;
|
|
2531
|
+
vr.exports.promise = Wo;
|
|
2532
|
+
var Pn = vr.exports, br = { exports: {} }, Be = typeof Reflect == "object" ? Reflect : null, Hr = Be && typeof Be.apply == "function" ? Be.apply : function(e, r, n) {
|
|
2510
2533
|
return Function.prototype.apply.call(e, r, n);
|
|
2511
|
-
},
|
|
2512
|
-
Be && typeof Be.ownKeys == "function" ?
|
|
2534
|
+
}, dt;
|
|
2535
|
+
Be && typeof Be.ownKeys == "function" ? dt = Be.ownKeys : Object.getOwnPropertySymbols ? dt = function(e) {
|
|
2513
2536
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
2514
|
-
} :
|
|
2537
|
+
} : dt = function(e) {
|
|
2515
2538
|
return Object.getOwnPropertyNames(e);
|
|
2516
2539
|
};
|
|
2517
|
-
function
|
|
2540
|
+
function Jo(t) {
|
|
2518
2541
|
console && console.warn && console.warn(t);
|
|
2519
2542
|
}
|
|
2520
|
-
var
|
|
2543
|
+
var Fn = Number.isNaN || function(e) {
|
|
2521
2544
|
return e !== e;
|
|
2522
2545
|
};
|
|
2523
2546
|
function P() {
|
|
2524
2547
|
P.init.call(this);
|
|
2525
2548
|
}
|
|
2526
2549
|
br.exports = P;
|
|
2527
|
-
br.exports.once =
|
|
2550
|
+
br.exports.once = es;
|
|
2528
2551
|
P.EventEmitter = P;
|
|
2529
2552
|
P.prototype._events = void 0;
|
|
2530
2553
|
P.prototype._eventsCount = 0;
|
|
2531
2554
|
P.prototype._maxListeners = void 0;
|
|
2532
2555
|
var Wr = 10;
|
|
2533
|
-
function
|
|
2556
|
+
function _t(t) {
|
|
2534
2557
|
if (typeof t != "function")
|
|
2535
2558
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
2536
2559
|
}
|
|
@@ -2540,7 +2563,7 @@ Object.defineProperty(P, "defaultMaxListeners", {
|
|
|
2540
2563
|
return Wr;
|
|
2541
2564
|
},
|
|
2542
2565
|
set: function(t) {
|
|
2543
|
-
if (typeof t != "number" || t < 0 ||
|
|
2566
|
+
if (typeof t != "number" || t < 0 || Fn(t))
|
|
2544
2567
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2545
2568
|
Wr = t;
|
|
2546
2569
|
}
|
|
@@ -2549,15 +2572,15 @@ P.init = function() {
|
|
|
2549
2572
|
(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;
|
|
2550
2573
|
};
|
|
2551
2574
|
P.prototype.setMaxListeners = function(e) {
|
|
2552
|
-
if (typeof e != "number" || e < 0 ||
|
|
2575
|
+
if (typeof e != "number" || e < 0 || Fn(e))
|
|
2553
2576
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2554
2577
|
return this._maxListeners = e, this;
|
|
2555
2578
|
};
|
|
2556
|
-
function
|
|
2579
|
+
function Nn(t) {
|
|
2557
2580
|
return t._maxListeners === void 0 ? P.defaultMaxListeners : t._maxListeners;
|
|
2558
2581
|
}
|
|
2559
2582
|
P.prototype.getMaxListeners = function() {
|
|
2560
|
-
return
|
|
2583
|
+
return Nn(this);
|
|
2561
2584
|
};
|
|
2562
2585
|
P.prototype.emit = function(e) {
|
|
2563
2586
|
for (var r = [], n = 1; n < arguments.length; n++)
|
|
@@ -2580,49 +2603,49 @@ P.prototype.emit = function(e) {
|
|
|
2580
2603
|
if (typeof u == "function")
|
|
2581
2604
|
Hr(u, this, r);
|
|
2582
2605
|
else
|
|
2583
|
-
for (var d = u.length, c =
|
|
2606
|
+
for (var d = u.length, c = jn(u, d), n = 0; n < d; ++n)
|
|
2584
2607
|
Hr(c[n], this, r);
|
|
2585
2608
|
return !0;
|
|
2586
2609
|
};
|
|
2587
|
-
function
|
|
2610
|
+
function Dn(t, e, r, n) {
|
|
2588
2611
|
var i, o, s;
|
|
2589
|
-
if (
|
|
2612
|
+
if (_t(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
2590
2613
|
"newListener",
|
|
2591
2614
|
e,
|
|
2592
2615
|
r.listener ? r.listener : r
|
|
2593
2616
|
), o = t._events), s = o[e]), s === void 0)
|
|
2594
2617
|
s = o[e] = r, ++t._eventsCount;
|
|
2595
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
2618
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = Nn(t), i > 0 && s.length > i && !s.warned) {
|
|
2596
2619
|
s.warned = !0;
|
|
2597
2620
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2598
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
2621
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, Jo(a);
|
|
2599
2622
|
}
|
|
2600
2623
|
return t;
|
|
2601
2624
|
}
|
|
2602
2625
|
P.prototype.addListener = function(e, r) {
|
|
2603
|
-
return
|
|
2626
|
+
return Dn(this, e, r, !1);
|
|
2604
2627
|
};
|
|
2605
2628
|
P.prototype.on = P.prototype.addListener;
|
|
2606
2629
|
P.prototype.prependListener = function(e, r) {
|
|
2607
|
-
return
|
|
2630
|
+
return Dn(this, e, r, !0);
|
|
2608
2631
|
};
|
|
2609
|
-
function
|
|
2632
|
+
function Yo() {
|
|
2610
2633
|
if (!this.fired)
|
|
2611
2634
|
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);
|
|
2612
2635
|
}
|
|
2613
|
-
function
|
|
2614
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
2636
|
+
function Rn(t, e, r) {
|
|
2637
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Yo.bind(n);
|
|
2615
2638
|
return i.listener = r, n.wrapFn = i, i;
|
|
2616
2639
|
}
|
|
2617
2640
|
P.prototype.once = function(e, r) {
|
|
2618
|
-
return
|
|
2641
|
+
return _t(r), this.on(e, Rn(this, e, r)), this;
|
|
2619
2642
|
};
|
|
2620
2643
|
P.prototype.prependOnceListener = function(e, r) {
|
|
2621
|
-
return
|
|
2644
|
+
return _t(r), this.prependListener(e, Rn(this, e, r)), this;
|
|
2622
2645
|
};
|
|
2623
2646
|
P.prototype.removeListener = function(e, r) {
|
|
2624
2647
|
var n, i, o, s, a;
|
|
2625
|
-
if (
|
|
2648
|
+
if (_t(r), i = this._events, i === void 0)
|
|
2626
2649
|
return this;
|
|
2627
2650
|
if (n = i[e], n === void 0)
|
|
2628
2651
|
return this;
|
|
@@ -2636,7 +2659,7 @@ P.prototype.removeListener = function(e, r) {
|
|
|
2636
2659
|
}
|
|
2637
2660
|
if (o < 0)
|
|
2638
2661
|
return this;
|
|
2639
|
-
o === 0 ? n.shift() :
|
|
2662
|
+
o === 0 ? n.shift() : Xo(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
2640
2663
|
}
|
|
2641
2664
|
return this;
|
|
2642
2665
|
};
|
|
@@ -2660,24 +2683,24 @@ P.prototype.removeAllListeners = function(e) {
|
|
|
2660
2683
|
this.removeListener(e, r[i]);
|
|
2661
2684
|
return this;
|
|
2662
2685
|
};
|
|
2663
|
-
function
|
|
2686
|
+
function $n(t, e, r) {
|
|
2664
2687
|
var n = t._events;
|
|
2665
2688
|
if (n === void 0)
|
|
2666
2689
|
return [];
|
|
2667
2690
|
var i = n[e];
|
|
2668
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
2691
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Zo(i) : jn(i, i.length);
|
|
2669
2692
|
}
|
|
2670
2693
|
P.prototype.listeners = function(e) {
|
|
2671
|
-
return
|
|
2694
|
+
return $n(this, e, !0);
|
|
2672
2695
|
};
|
|
2673
2696
|
P.prototype.rawListeners = function(e) {
|
|
2674
|
-
return
|
|
2697
|
+
return $n(this, e, !1);
|
|
2675
2698
|
};
|
|
2676
2699
|
P.listenerCount = function(t, e) {
|
|
2677
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
2700
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Vn.call(t, e);
|
|
2678
2701
|
};
|
|
2679
|
-
P.prototype.listenerCount =
|
|
2680
|
-
function
|
|
2702
|
+
P.prototype.listenerCount = Vn;
|
|
2703
|
+
function Vn(t) {
|
|
2681
2704
|
var e = this._events;
|
|
2682
2705
|
if (e !== void 0) {
|
|
2683
2706
|
var r = e[t];
|
|
@@ -2689,24 +2712,24 @@ function $n(t) {
|
|
|
2689
2712
|
return 0;
|
|
2690
2713
|
}
|
|
2691
2714
|
P.prototype.eventNames = function() {
|
|
2692
|
-
return this._eventsCount > 0 ?
|
|
2715
|
+
return this._eventsCount > 0 ? dt(this._events) : [];
|
|
2693
2716
|
};
|
|
2694
|
-
function
|
|
2717
|
+
function jn(t, e) {
|
|
2695
2718
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
2696
2719
|
r[n] = t[n];
|
|
2697
2720
|
return r;
|
|
2698
2721
|
}
|
|
2699
|
-
function
|
|
2722
|
+
function Xo(t, e) {
|
|
2700
2723
|
for (; e + 1 < t.length; e++)
|
|
2701
2724
|
t[e] = t[e + 1];
|
|
2702
2725
|
t.pop();
|
|
2703
2726
|
}
|
|
2704
|
-
function
|
|
2727
|
+
function Zo(t) {
|
|
2705
2728
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2706
2729
|
e[r] = t[r].listener || t[r];
|
|
2707
2730
|
return e;
|
|
2708
2731
|
}
|
|
2709
|
-
function
|
|
2732
|
+
function es(t, e) {
|
|
2710
2733
|
return new Promise(function(r, n) {
|
|
2711
2734
|
function i(s) {
|
|
2712
2735
|
t.removeListener(e, o), n(s);
|
|
@@ -2714,13 +2737,13 @@ function Xo(t, e) {
|
|
|
2714
2737
|
function o() {
|
|
2715
2738
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
2716
2739
|
}
|
|
2717
|
-
|
|
2740
|
+
Mn(t, e, o, { once: !0 }), e !== "error" && ts(t, i, { once: !0 });
|
|
2718
2741
|
});
|
|
2719
2742
|
}
|
|
2720
|
-
function
|
|
2721
|
-
typeof t.on == "function" &&
|
|
2743
|
+
function ts(t, e, r) {
|
|
2744
|
+
typeof t.on == "function" && Mn(t, "error", e, r);
|
|
2722
2745
|
}
|
|
2723
|
-
function
|
|
2746
|
+
function Mn(t, e, r, n) {
|
|
2724
2747
|
if (typeof t.on == "function")
|
|
2725
2748
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
2726
2749
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2730,7 +2753,7 @@ function jn(t, e, r, n) {
|
|
|
2730
2753
|
else
|
|
2731
2754
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2732
2755
|
}
|
|
2733
|
-
var
|
|
2756
|
+
var Un = br.exports, Lt = {}, xn = {}, Bn = function() {
|
|
2734
2757
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2735
2758
|
return !1;
|
|
2736
2759
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2753,34 +2776,34 @@ var Mn = br.exports, _t = {}, Un = {}, xn = function() {
|
|
|
2753
2776
|
return !1;
|
|
2754
2777
|
}
|
|
2755
2778
|
return !0;
|
|
2756
|
-
},
|
|
2757
|
-
return
|
|
2758
|
-
},
|
|
2759
|
-
return typeof Jr != "function" || typeof Symbol != "function" || typeof Jr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
2779
|
+
}, rs = Bn, kt = function() {
|
|
2780
|
+
return rs() && !!Symbol.toStringTag;
|
|
2781
|
+
}, ns = Error, is = EvalError, os = RangeError, ss = ReferenceError, qn = SyntaxError, Pt = TypeError, as = URIError, Jr = typeof Symbol < "u" && Symbol, us = Bn, cs = function() {
|
|
2782
|
+
return typeof Jr != "function" || typeof Symbol != "function" || typeof Jr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : us();
|
|
2760
2783
|
}, $t = {
|
|
2761
2784
|
__proto__: null,
|
|
2762
2785
|
foo: {}
|
|
2763
|
-
},
|
|
2764
|
-
return { __proto__: $t }.foo === $t.foo && !($t instanceof
|
|
2765
|
-
},
|
|
2786
|
+
}, ls = Object, ds = function() {
|
|
2787
|
+
return { __proto__: $t }.foo === $t.foo && !($t instanceof ls);
|
|
2788
|
+
}, fs = "Function.prototype.bind called on incompatible ", hs = Object.prototype.toString, ps = Math.max, ys = "[object Function]", Yr = function(e, r) {
|
|
2766
2789
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
2767
2790
|
n[i] = e[i];
|
|
2768
2791
|
for (var o = 0; o < r.length; o += 1)
|
|
2769
2792
|
n[o + e.length] = r[o];
|
|
2770
2793
|
return n;
|
|
2771
|
-
},
|
|
2794
|
+
}, gs = function(e, r) {
|
|
2772
2795
|
for (var n = [], i = r || 0, o = 0; i < e.length; i += 1, o += 1)
|
|
2773
2796
|
n[o] = e[i];
|
|
2774
2797
|
return n;
|
|
2775
|
-
},
|
|
2798
|
+
}, ms = function(t, e) {
|
|
2776
2799
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
2777
2800
|
r += t[n], n + 1 < t.length && (r += e);
|
|
2778
2801
|
return r;
|
|
2779
|
-
},
|
|
2802
|
+
}, vs = function(e) {
|
|
2780
2803
|
var r = this;
|
|
2781
|
-
if (typeof r != "function" ||
|
|
2782
|
-
throw new TypeError(
|
|
2783
|
-
for (var n =
|
|
2804
|
+
if (typeof r != "function" || hs.apply(r) !== ys)
|
|
2805
|
+
throw new TypeError(fs + r);
|
|
2806
|
+
for (var n = gs(arguments, 1), i, o = function() {
|
|
2784
2807
|
if (this instanceof i) {
|
|
2785
2808
|
var c = r.apply(
|
|
2786
2809
|
this,
|
|
@@ -2792,17 +2815,17 @@ var Mn = br.exports, _t = {}, Un = {}, xn = function() {
|
|
|
2792
2815
|
e,
|
|
2793
2816
|
Yr(n, arguments)
|
|
2794
2817
|
);
|
|
2795
|
-
}, s =
|
|
2818
|
+
}, s = ps(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
2796
2819
|
a[u] = "$" + u;
|
|
2797
|
-
if (i = Function("binder", "return function (" +
|
|
2820
|
+
if (i = Function("binder", "return function (" + ms(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
2798
2821
|
var d = function() {
|
|
2799
2822
|
};
|
|
2800
2823
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
2801
2824
|
}
|
|
2802
2825
|
return i;
|
|
2803
|
-
},
|
|
2826
|
+
}, bs = vs, Sr = Function.prototype.bind || bs, Ss = Function.prototype.call, ws = Object.prototype.hasOwnProperty, As = Sr, Es = As.call(Ss, ws), E, Is = ns, Ts = is, Os = os, Cs = ss, Qe = qn, qe = Pt, _s = as, Qn = Function, Vt = function(t) {
|
|
2804
2827
|
try {
|
|
2805
|
-
return
|
|
2828
|
+
return Qn('"use strict"; return (' + t + ").constructor;")();
|
|
2806
2829
|
} catch {
|
|
2807
2830
|
}
|
|
2808
2831
|
}, Ce = Object.getOwnPropertyDescriptor;
|
|
@@ -2814,7 +2837,7 @@ if (Ce)
|
|
|
2814
2837
|
}
|
|
2815
2838
|
var jt = function() {
|
|
2816
2839
|
throw new qe();
|
|
2817
|
-
},
|
|
2840
|
+
}, Ls = Ce ? function() {
|
|
2818
2841
|
try {
|
|
2819
2842
|
return arguments.callee, jt;
|
|
2820
2843
|
} catch {
|
|
@@ -2824,9 +2847,9 @@ var jt = function() {
|
|
|
2824
2847
|
return jt;
|
|
2825
2848
|
}
|
|
2826
2849
|
}
|
|
2827
|
-
}() : jt, Re =
|
|
2850
|
+
}() : jt, Re = cs(), ks = ds(), j = Object.getPrototypeOf || (ks ? function(t) {
|
|
2828
2851
|
return t.__proto__;
|
|
2829
|
-
} : null), Ve = {},
|
|
2852
|
+
} : null), Ve = {}, Ps = typeof Uint8Array > "u" || !j ? E : j(Uint8Array), _e = {
|
|
2830
2853
|
__proto__: null,
|
|
2831
2854
|
"%AggregateError%": typeof AggregateError > "u" ? E : AggregateError,
|
|
2832
2855
|
"%Array%": Array,
|
|
@@ -2848,14 +2871,14 @@ var jt = function() {
|
|
|
2848
2871
|
"%decodeURIComponent%": decodeURIComponent,
|
|
2849
2872
|
"%encodeURI%": encodeURI,
|
|
2850
2873
|
"%encodeURIComponent%": encodeURIComponent,
|
|
2851
|
-
"%Error%":
|
|
2874
|
+
"%Error%": Is,
|
|
2852
2875
|
"%eval%": eval,
|
|
2853
2876
|
// eslint-disable-line no-eval
|
|
2854
|
-
"%EvalError%":
|
|
2877
|
+
"%EvalError%": Ts,
|
|
2855
2878
|
"%Float32Array%": typeof Float32Array > "u" ? E : Float32Array,
|
|
2856
2879
|
"%Float64Array%": typeof Float64Array > "u" ? E : Float64Array,
|
|
2857
2880
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? E : FinalizationRegistry,
|
|
2858
|
-
"%Function%":
|
|
2881
|
+
"%Function%": Qn,
|
|
2859
2882
|
"%GeneratorFunction%": Ve,
|
|
2860
2883
|
"%Int8Array%": typeof Int8Array > "u" ? E : Int8Array,
|
|
2861
2884
|
"%Int16Array%": typeof Int16Array > "u" ? E : Int16Array,
|
|
@@ -2873,8 +2896,8 @@ var jt = function() {
|
|
|
2873
2896
|
"%parseInt%": parseInt,
|
|
2874
2897
|
"%Promise%": typeof Promise > "u" ? E : Promise,
|
|
2875
2898
|
"%Proxy%": typeof Proxy > "u" ? E : Proxy,
|
|
2876
|
-
"%RangeError%":
|
|
2877
|
-
"%ReferenceError%":
|
|
2899
|
+
"%RangeError%": Os,
|
|
2900
|
+
"%ReferenceError%": Cs,
|
|
2878
2901
|
"%Reflect%": typeof Reflect > "u" ? E : Reflect,
|
|
2879
2902
|
"%RegExp%": RegExp,
|
|
2880
2903
|
"%Set%": typeof Set > "u" ? E : Set,
|
|
@@ -2884,14 +2907,14 @@ var jt = function() {
|
|
|
2884
2907
|
"%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : E,
|
|
2885
2908
|
"%Symbol%": Re ? Symbol : E,
|
|
2886
2909
|
"%SyntaxError%": Qe,
|
|
2887
|
-
"%ThrowTypeError%":
|
|
2888
|
-
"%TypedArray%":
|
|
2910
|
+
"%ThrowTypeError%": Ls,
|
|
2911
|
+
"%TypedArray%": Ps,
|
|
2889
2912
|
"%TypeError%": qe,
|
|
2890
2913
|
"%Uint8Array%": typeof Uint8Array > "u" ? E : Uint8Array,
|
|
2891
2914
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? E : Uint8ClampedArray,
|
|
2892
2915
|
"%Uint16Array%": typeof Uint16Array > "u" ? E : Uint16Array,
|
|
2893
2916
|
"%Uint32Array%": typeof Uint32Array > "u" ? E : Uint32Array,
|
|
2894
|
-
"%URIError%":
|
|
2917
|
+
"%URIError%": _s,
|
|
2895
2918
|
"%WeakMap%": typeof WeakMap > "u" ? E : WeakMap,
|
|
2896
2919
|
"%WeakRef%": typeof WeakRef > "u" ? E : WeakRef,
|
|
2897
2920
|
"%WeakSet%": typeof WeakSet > "u" ? E : WeakSet
|
|
@@ -2900,10 +2923,10 @@ if (j)
|
|
|
2900
2923
|
try {
|
|
2901
2924
|
null.error;
|
|
2902
2925
|
} catch (t) {
|
|
2903
|
-
var
|
|
2904
|
-
|
|
2926
|
+
var Fs = j(j(t));
|
|
2927
|
+
_e["%Error.prototype%"] = Fs;
|
|
2905
2928
|
}
|
|
2906
|
-
var
|
|
2929
|
+
var Ns = function t(e) {
|
|
2907
2930
|
var r;
|
|
2908
2931
|
if (e === "%AsyncFunction%")
|
|
2909
2932
|
r = Vt("async function () {}");
|
|
@@ -2918,7 +2941,7 @@ var Ps = function t(e) {
|
|
|
2918
2941
|
var i = t("%AsyncGenerator%");
|
|
2919
2942
|
i && j && (r = j(i.prototype));
|
|
2920
2943
|
}
|
|
2921
|
-
return
|
|
2944
|
+
return _e[e] = r, r;
|
|
2922
2945
|
}, Xr = {
|
|
2923
2946
|
__proto__: null,
|
|
2924
2947
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
@@ -2972,21 +2995,21 @@ var Ps = function t(e) {
|
|
|
2972
2995
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2973
2996
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2974
2997
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2975
|
-
},
|
|
2976
|
-
var r =
|
|
2998
|
+
}, rt = Sr, vt = Es, Ds = rt.call(Function.call, Array.prototype.concat), Rs = rt.call(Function.apply, Array.prototype.splice), Zr = rt.call(Function.call, String.prototype.replace), bt = rt.call(Function.call, String.prototype.slice), $s = rt.call(Function.call, RegExp.prototype.exec), Vs = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, js = /\\(\\)?/g, Ms = function(e) {
|
|
2999
|
+
var r = bt(e, 0, 1), n = bt(e, -1);
|
|
2977
3000
|
if (r === "%" && n !== "%")
|
|
2978
3001
|
throw new Qe("invalid intrinsic syntax, expected closing `%`");
|
|
2979
3002
|
if (n === "%" && r !== "%")
|
|
2980
3003
|
throw new Qe("invalid intrinsic syntax, expected opening `%`");
|
|
2981
3004
|
var i = [];
|
|
2982
|
-
return Zr(e,
|
|
2983
|
-
i[i.length] = a ? Zr(u,
|
|
3005
|
+
return Zr(e, Vs, function(o, s, a, u) {
|
|
3006
|
+
i[i.length] = a ? Zr(u, js, "$1") : s || o;
|
|
2984
3007
|
}), i;
|
|
2985
|
-
},
|
|
3008
|
+
}, Us = function(e, r) {
|
|
2986
3009
|
var n = e, i;
|
|
2987
|
-
if (
|
|
2988
|
-
var o =
|
|
2989
|
-
if (o === Ve && (o =
|
|
3010
|
+
if (vt(Xr, n) && (i = Xr[n], n = "%" + i[0] + "%"), vt(_e, n)) {
|
|
3011
|
+
var o = _e[n];
|
|
3012
|
+
if (o === Ve && (o = Ns(n)), typeof o > "u" && !r)
|
|
2990
3013
|
throw new qe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2991
3014
|
return {
|
|
2992
3015
|
alias: i,
|
|
@@ -2995,21 +3018,21 @@ var Ps = function t(e) {
|
|
|
2995
3018
|
};
|
|
2996
3019
|
}
|
|
2997
3020
|
throw new Qe("intrinsic " + e + " does not exist!");
|
|
2998
|
-
},
|
|
3021
|
+
}, nt = function(e, r) {
|
|
2999
3022
|
if (typeof e != "string" || e.length === 0)
|
|
3000
3023
|
throw new qe("intrinsic name must be a non-empty string");
|
|
3001
3024
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3002
3025
|
throw new qe('"allowMissing" argument must be a boolean');
|
|
3003
|
-
if (
|
|
3026
|
+
if ($s(/^%?[^%]*%?$/, e) === null)
|
|
3004
3027
|
throw new Qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3005
|
-
var n =
|
|
3006
|
-
d && (i = d[0],
|
|
3028
|
+
var n = Ms(e), i = n.length > 0 ? n[0] : "", o = Us("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
3029
|
+
d && (i = d[0], Rs(n, Ds([0, 1], d)));
|
|
3007
3030
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3008
|
-
var p = n[c], m =
|
|
3031
|
+
var p = n[c], m = bt(p, 0, 1), v = bt(p, -1);
|
|
3009
3032
|
if ((m === '"' || m === "'" || m === "`" || v === '"' || v === "'" || v === "`") && m !== v)
|
|
3010
3033
|
throw new Qe("property names with quotes must have matching quotes");
|
|
3011
|
-
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%",
|
|
3012
|
-
a =
|
|
3034
|
+
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", vt(_e, s))
|
|
3035
|
+
a = _e[s];
|
|
3013
3036
|
else if (a != null) {
|
|
3014
3037
|
if (!(p in a)) {
|
|
3015
3038
|
if (!r)
|
|
@@ -3020,17 +3043,17 @@ var Ps = function t(e) {
|
|
|
3020
3043
|
var I = Ce(a, p);
|
|
3021
3044
|
f = !!I, f && "get" in I && !("originalValue" in I.get) ? a = I.get : a = a[p];
|
|
3022
3045
|
} else
|
|
3023
|
-
f =
|
|
3024
|
-
f && !u && (
|
|
3046
|
+
f = vt(a, p), a = a[p];
|
|
3047
|
+
f && !u && (_e[s] = a);
|
|
3025
3048
|
}
|
|
3026
3049
|
}
|
|
3027
3050
|
return a;
|
|
3028
|
-
},
|
|
3051
|
+
}, Gn = { exports: {} }, Mt, en;
|
|
3029
3052
|
function wr() {
|
|
3030
3053
|
if (en)
|
|
3031
3054
|
return Mt;
|
|
3032
3055
|
en = 1;
|
|
3033
|
-
var t =
|
|
3056
|
+
var t = nt, e = t("%Object.defineProperty%", !0) || !1;
|
|
3034
3057
|
if (e)
|
|
3035
3058
|
try {
|
|
3036
3059
|
e({}, "a", { value: 1 });
|
|
@@ -3039,14 +3062,14 @@ function wr() {
|
|
|
3039
3062
|
}
|
|
3040
3063
|
return Mt = e, Mt;
|
|
3041
3064
|
}
|
|
3042
|
-
var
|
|
3043
|
-
if (
|
|
3065
|
+
var xs = nt, ft = xs("%Object.getOwnPropertyDescriptor%", !0);
|
|
3066
|
+
if (ft)
|
|
3044
3067
|
try {
|
|
3045
|
-
|
|
3068
|
+
ft([], "length");
|
|
3046
3069
|
} catch {
|
|
3047
|
-
|
|
3070
|
+
ft = null;
|
|
3048
3071
|
}
|
|
3049
|
-
var Ft =
|
|
3072
|
+
var Ft = ft, tn = wr(), Bs = qn, $e = Pt, rn = Ft, qs = function(e, r, n) {
|
|
3050
3073
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3051
3074
|
throw new $e("`obj` must be an object or a function`");
|
|
3052
3075
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3070,11 +3093,11 @@ var Ft = dt, tn = wr(), Us = Bn, $e = Pt, rn = Ft, xs = function(e, r, n) {
|
|
|
3070
3093
|
else if (a || !i && !o && !s)
|
|
3071
3094
|
e[r] = n;
|
|
3072
3095
|
else
|
|
3073
|
-
throw new
|
|
3074
|
-
}, ir = wr(),
|
|
3096
|
+
throw new Bs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3097
|
+
}, ir = wr(), zn = function() {
|
|
3075
3098
|
return !!ir;
|
|
3076
3099
|
};
|
|
3077
|
-
|
|
3100
|
+
zn.hasArrayLengthDefineBug = function() {
|
|
3078
3101
|
if (!ir)
|
|
3079
3102
|
return null;
|
|
3080
3103
|
try {
|
|
@@ -3083,17 +3106,17 @@ Gn.hasArrayLengthDefineBug = function() {
|
|
|
3083
3106
|
return !0;
|
|
3084
3107
|
}
|
|
3085
3108
|
};
|
|
3086
|
-
var
|
|
3109
|
+
var Qs = zn, Gs = nt, nn = qs, zs = Qs(), on = Ft, sn = Pt, Ks = Gs("%Math.floor%"), Hs = function(e, r) {
|
|
3087
3110
|
if (typeof e != "function")
|
|
3088
3111
|
throw new sn("`fn` is not a function");
|
|
3089
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3112
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || Ks(r) !== r)
|
|
3090
3113
|
throw new sn("`length` must be a positive 32-bit integer");
|
|
3091
3114
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3092
3115
|
if ("length" in e && on) {
|
|
3093
3116
|
var s = on(e, "length");
|
|
3094
3117
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3095
3118
|
}
|
|
3096
|
-
return (i || o || !n) && (
|
|
3119
|
+
return (i || o || !n) && (zs ? nn(
|
|
3097
3120
|
/** @type {Parameters<define>[0]} */
|
|
3098
3121
|
e,
|
|
3099
3122
|
"length",
|
|
@@ -3108,7 +3131,7 @@ var Bs = Gn, qs = rt, nn = xs, Qs = Bs(), on = Ft, sn = Pt, Gs = qs("%Math.floor
|
|
|
3108
3131
|
)), e;
|
|
3109
3132
|
};
|
|
3110
3133
|
(function(t) {
|
|
3111
|
-
var e = Sr, r =
|
|
3134
|
+
var e = Sr, r = nt, n = Hs, i = Pt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = wr(), d = r("%Math.max%");
|
|
3112
3135
|
t.exports = function(p) {
|
|
3113
3136
|
if (typeof p != "function")
|
|
3114
3137
|
throw new i("a function is required");
|
|
@@ -3123,85 +3146,85 @@ var Bs = Gn, qs = rt, nn = xs, Qs = Bs(), on = Ft, sn = Pt, Gs = qs("%Math.floor
|
|
|
3123
3146
|
return a(e, o, arguments);
|
|
3124
3147
|
};
|
|
3125
3148
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3126
|
-
})(
|
|
3127
|
-
var Ar =
|
|
3149
|
+
})(Gn);
|
|
3150
|
+
var Ar = Gn.exports, Kn = nt, Hn = Ar, Ws = Hn(Kn("String.prototype.indexOf")), Er = function(e, r) {
|
|
3128
3151
|
var n = Kn(e, !!r);
|
|
3129
|
-
return typeof n == "function" &&
|
|
3130
|
-
},
|
|
3131
|
-
return
|
|
3132
|
-
},
|
|
3152
|
+
return typeof n == "function" && Ws(e, ".prototype.") > -1 ? Hn(n) : n;
|
|
3153
|
+
}, Js = kt(), Ys = Er, or = Ys("Object.prototype.toString"), Nt = function(e) {
|
|
3154
|
+
return Js && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : or(e) === "[object Arguments]";
|
|
3155
|
+
}, Wn = function(e) {
|
|
3133
3156
|
return Nt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && or(e) !== "[object Array]" && or(e.callee) === "[object Function]";
|
|
3134
|
-
},
|
|
3157
|
+
}, Xs = function() {
|
|
3135
3158
|
return Nt(arguments);
|
|
3136
3159
|
}();
|
|
3137
|
-
Nt.isLegacyArguments =
|
|
3138
|
-
var
|
|
3139
|
-
if (!
|
|
3160
|
+
Nt.isLegacyArguments = Wn;
|
|
3161
|
+
var Zs = Xs ? Nt : Wn, ea = Object.prototype.toString, ta = Function.prototype.toString, ra = /^\s*(?:function)?\*/, Jn = kt(), Ut = Object.getPrototypeOf, na = function() {
|
|
3162
|
+
if (!Jn)
|
|
3140
3163
|
return !1;
|
|
3141
3164
|
try {
|
|
3142
3165
|
return Function("return function*() {}")();
|
|
3143
3166
|
} catch {
|
|
3144
3167
|
}
|
|
3145
|
-
}, xt,
|
|
3168
|
+
}, xt, ia = function(e) {
|
|
3146
3169
|
if (typeof e != "function")
|
|
3147
3170
|
return !1;
|
|
3148
|
-
if (
|
|
3171
|
+
if (ra.test(ta.call(e)))
|
|
3149
3172
|
return !0;
|
|
3150
|
-
if (!
|
|
3151
|
-
var r =
|
|
3173
|
+
if (!Jn) {
|
|
3174
|
+
var r = ea.call(e);
|
|
3152
3175
|
return r === "[object GeneratorFunction]";
|
|
3153
3176
|
}
|
|
3154
3177
|
if (!Ut)
|
|
3155
3178
|
return !1;
|
|
3156
3179
|
if (typeof xt > "u") {
|
|
3157
|
-
var n =
|
|
3180
|
+
var n = na();
|
|
3158
3181
|
xt = n ? Ut(n) : !1;
|
|
3159
3182
|
}
|
|
3160
3183
|
return Ut(e) === xt;
|
|
3161
|
-
},
|
|
3184
|
+
}, Yn = Function.prototype.toString, Ue = typeof Reflect == "object" && Reflect !== null && Reflect.apply, sr, ht;
|
|
3162
3185
|
if (typeof Ue == "function" && typeof Object.defineProperty == "function")
|
|
3163
3186
|
try {
|
|
3164
3187
|
sr = Object.defineProperty({}, "length", {
|
|
3165
3188
|
get: function() {
|
|
3166
|
-
throw
|
|
3189
|
+
throw ht;
|
|
3167
3190
|
}
|
|
3168
|
-
}),
|
|
3191
|
+
}), ht = {}, Ue(function() {
|
|
3169
3192
|
throw 42;
|
|
3170
3193
|
}, null, sr);
|
|
3171
3194
|
} catch (t) {
|
|
3172
|
-
t !==
|
|
3195
|
+
t !== ht && (Ue = null);
|
|
3173
3196
|
}
|
|
3174
3197
|
else
|
|
3175
3198
|
Ue = null;
|
|
3176
|
-
var
|
|
3199
|
+
var oa = /^\s*class\b/, ar = function(e) {
|
|
3177
3200
|
try {
|
|
3178
|
-
var r =
|
|
3179
|
-
return
|
|
3201
|
+
var r = Yn.call(e);
|
|
3202
|
+
return oa.test(r);
|
|
3180
3203
|
} catch {
|
|
3181
3204
|
return !1;
|
|
3182
3205
|
}
|
|
3183
3206
|
}, Bt = function(e) {
|
|
3184
3207
|
try {
|
|
3185
|
-
return ar(e) ? !1 : (
|
|
3208
|
+
return ar(e) ? !1 : (Yn.call(e), !0);
|
|
3186
3209
|
} catch {
|
|
3187
3210
|
return !1;
|
|
3188
3211
|
}
|
|
3189
|
-
},
|
|
3212
|
+
}, pt = Object.prototype.toString, sa = "[object Object]", aa = "[object Function]", ua = "[object GeneratorFunction]", ca = "[object HTMLAllCollection]", la = "[object HTML document.all class]", da = "[object HTMLCollection]", fa = typeof Symbol == "function" && !!Symbol.toStringTag, ha = !(0 in [,]), ur = function() {
|
|
3190
3213
|
return !1;
|
|
3191
3214
|
};
|
|
3192
3215
|
if (typeof document == "object") {
|
|
3193
|
-
var
|
|
3194
|
-
|
|
3195
|
-
if ((
|
|
3216
|
+
var pa = document.all;
|
|
3217
|
+
pt.call(pa) === pt.call(document.all) && (ur = function(e) {
|
|
3218
|
+
if ((ha || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3196
3219
|
try {
|
|
3197
|
-
var r =
|
|
3198
|
-
return (r ===
|
|
3220
|
+
var r = pt.call(e);
|
|
3221
|
+
return (r === ca || r === la || r === da || r === sa) && e("") == null;
|
|
3199
3222
|
} catch {
|
|
3200
3223
|
}
|
|
3201
3224
|
return !1;
|
|
3202
3225
|
});
|
|
3203
3226
|
}
|
|
3204
|
-
var
|
|
3227
|
+
var ya = Ue ? function(e) {
|
|
3205
3228
|
if (ur(e))
|
|
3206
3229
|
return !0;
|
|
3207
3230
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
@@ -3209,7 +3232,7 @@ var ha = Ue ? function(e) {
|
|
|
3209
3232
|
try {
|
|
3210
3233
|
Ue(e, null, sr);
|
|
3211
3234
|
} catch (r) {
|
|
3212
|
-
if (r !==
|
|
3235
|
+
if (r !== ht)
|
|
3213
3236
|
return !1;
|
|
3214
3237
|
}
|
|
3215
3238
|
return !ar(e) && Bt(e);
|
|
@@ -3218,27 +3241,27 @@ var ha = Ue ? function(e) {
|
|
|
3218
3241
|
return !0;
|
|
3219
3242
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3220
3243
|
return !1;
|
|
3221
|
-
if (
|
|
3244
|
+
if (fa)
|
|
3222
3245
|
return Bt(e);
|
|
3223
3246
|
if (ar(e))
|
|
3224
3247
|
return !1;
|
|
3225
|
-
var r =
|
|
3226
|
-
return r !==
|
|
3227
|
-
},
|
|
3248
|
+
var r = pt.call(e);
|
|
3249
|
+
return r !== aa && r !== ua && !/^\[object HTML/.test(r) ? !1 : Bt(e);
|
|
3250
|
+
}, ga = ya, ma = Object.prototype.toString, Xn = Object.prototype.hasOwnProperty, va = function(e, r, n) {
|
|
3228
3251
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3229
|
-
|
|
3230
|
-
},
|
|
3252
|
+
Xn.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3253
|
+
}, ba = function(e, r, n) {
|
|
3231
3254
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3232
3255
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3233
|
-
},
|
|
3256
|
+
}, Sa = function(e, r, n) {
|
|
3234
3257
|
for (var i in e)
|
|
3235
|
-
|
|
3236
|
-
},
|
|
3237
|
-
if (!
|
|
3258
|
+
Xn.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3259
|
+
}, wa = function(e, r, n) {
|
|
3260
|
+
if (!ga(r))
|
|
3238
3261
|
throw new TypeError("iterator must be a function");
|
|
3239
3262
|
var i;
|
|
3240
|
-
arguments.length >= 3 && (i = n),
|
|
3241
|
-
},
|
|
3263
|
+
arguments.length >= 3 && (i = n), ma.call(e) === "[object Array]" ? va(e, r, i) : typeof e == "string" ? ba(e, r, i) : Sa(e, r, i);
|
|
3264
|
+
}, Zn = wa, Aa = [
|
|
3242
3265
|
"Float32Array",
|
|
3243
3266
|
"Float64Array",
|
|
3244
3267
|
"Int8Array",
|
|
@@ -3250,83 +3273,83 @@ var ha = Ue ? function(e) {
|
|
|
3250
3273
|
"Uint32Array",
|
|
3251
3274
|
"BigInt64Array",
|
|
3252
3275
|
"BigUint64Array"
|
|
3253
|
-
], qt =
|
|
3276
|
+
], qt = Aa, Ea = typeof globalThis > "u" ? gr : globalThis, ei = function() {
|
|
3254
3277
|
for (var e = [], r = 0; r < qt.length; r++)
|
|
3255
|
-
typeof
|
|
3278
|
+
typeof Ea[qt[r]] == "function" && (e[e.length] = qt[r]);
|
|
3256
3279
|
return e;
|
|
3257
|
-
},
|
|
3280
|
+
}, St = Zn, Ia = ei, an = Ar, Ir = Er, yt = Ft, Ta = Ir("Object.prototype.toString"), ti = kt(), un = typeof globalThis > "u" ? gr : globalThis, cr = Ia(), Tr = Ir("String.prototype.slice"), Qt = Object.getPrototypeOf, Oa = Ir("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3258
3281
|
for (var n = 0; n < e.length; n += 1)
|
|
3259
3282
|
if (e[n] === r)
|
|
3260
3283
|
return n;
|
|
3261
3284
|
return -1;
|
|
3262
|
-
},
|
|
3263
|
-
|
|
3285
|
+
}, wt = { __proto__: null };
|
|
3286
|
+
ti && yt && Qt ? St(cr, function(t) {
|
|
3264
3287
|
var e = new un[t]();
|
|
3265
3288
|
if (Symbol.toStringTag in e) {
|
|
3266
|
-
var r = Qt(e), n =
|
|
3289
|
+
var r = Qt(e), n = yt(r, Symbol.toStringTag);
|
|
3267
3290
|
if (!n) {
|
|
3268
3291
|
var i = Qt(r);
|
|
3269
|
-
n =
|
|
3292
|
+
n = yt(i, Symbol.toStringTag);
|
|
3270
3293
|
}
|
|
3271
|
-
|
|
3294
|
+
wt["$" + t] = an(n.get);
|
|
3272
3295
|
}
|
|
3273
|
-
}) :
|
|
3296
|
+
}) : St(cr, function(t) {
|
|
3274
3297
|
var e = new un[t](), r = e.slice || e.set;
|
|
3275
|
-
r && (
|
|
3298
|
+
r && (wt["$" + t] = an(r));
|
|
3276
3299
|
});
|
|
3277
|
-
var
|
|
3300
|
+
var Ca = function(e) {
|
|
3278
3301
|
var r = !1;
|
|
3279
|
-
return
|
|
3302
|
+
return St(wt, function(n, i) {
|
|
3280
3303
|
if (!r)
|
|
3281
3304
|
try {
|
|
3282
3305
|
"$" + n(e) === i && (r = Tr(i, 1));
|
|
3283
3306
|
} catch {
|
|
3284
3307
|
}
|
|
3285
3308
|
}), r;
|
|
3286
|
-
},
|
|
3309
|
+
}, _a = function(e) {
|
|
3287
3310
|
var r = !1;
|
|
3288
|
-
return
|
|
3311
|
+
return St(wt, function(n, i) {
|
|
3289
3312
|
if (!r)
|
|
3290
3313
|
try {
|
|
3291
3314
|
n(e), r = Tr(i, 1);
|
|
3292
3315
|
} catch {
|
|
3293
3316
|
}
|
|
3294
3317
|
}), r;
|
|
3295
|
-
},
|
|
3318
|
+
}, La = function(e) {
|
|
3296
3319
|
if (!e || typeof e != "object")
|
|
3297
3320
|
return !1;
|
|
3298
|
-
if (!
|
|
3299
|
-
var r = Tr(
|
|
3300
|
-
return
|
|
3321
|
+
if (!ti) {
|
|
3322
|
+
var r = Tr(Ta(e), 8, -1);
|
|
3323
|
+
return Oa(cr, r) > -1 ? r : r !== "Object" ? !1 : _a(e);
|
|
3301
3324
|
}
|
|
3302
|
-
return
|
|
3303
|
-
},
|
|
3325
|
+
return yt ? Ca(e) : null;
|
|
3326
|
+
}, At = Zn, ka = ei, cn = Ar, Or = Er, gt = Ft, Pa = Or("Object.prototype.toString"), ri = kt(), ln = typeof globalThis > "u" ? gr : globalThis, lr = ka(), Cr = Or("String.prototype.slice"), Gt = Object.getPrototypeOf, Fa = Or("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3304
3327
|
for (var n = 0; n < e.length; n += 1)
|
|
3305
3328
|
if (e[n] === r)
|
|
3306
3329
|
return n;
|
|
3307
3330
|
return -1;
|
|
3308
|
-
},
|
|
3309
|
-
|
|
3331
|
+
}, Et = { __proto__: null };
|
|
3332
|
+
ri && gt && Gt ? At(lr, function(t) {
|
|
3310
3333
|
var e = new ln[t]();
|
|
3311
3334
|
if (Symbol.toStringTag in e) {
|
|
3312
|
-
var r = Gt(e), n =
|
|
3335
|
+
var r = Gt(e), n = gt(r, Symbol.toStringTag);
|
|
3313
3336
|
if (!n) {
|
|
3314
3337
|
var i = Gt(r);
|
|
3315
|
-
n =
|
|
3338
|
+
n = gt(i, Symbol.toStringTag);
|
|
3316
3339
|
}
|
|
3317
|
-
|
|
3340
|
+
Et["$" + t] = cn(n.get);
|
|
3318
3341
|
}
|
|
3319
|
-
}) :
|
|
3342
|
+
}) : At(lr, function(t) {
|
|
3320
3343
|
var e = new ln[t](), r = e.slice || e.set;
|
|
3321
|
-
r && (
|
|
3344
|
+
r && (Et["$" + t] = cn(r));
|
|
3322
3345
|
});
|
|
3323
|
-
var
|
|
3346
|
+
var Na = function(e) {
|
|
3324
3347
|
var r = !1;
|
|
3325
|
-
return
|
|
3348
|
+
return At(
|
|
3326
3349
|
// eslint-disable-next-line no-extra-parens
|
|
3327
3350
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3328
3351
|
/** @type {any} */
|
|
3329
|
-
|
|
3352
|
+
Et,
|
|
3330
3353
|
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3331
3354
|
function(n, i) {
|
|
3332
3355
|
if (!r)
|
|
@@ -3336,13 +3359,13 @@ var Pa = function(e) {
|
|
|
3336
3359
|
}
|
|
3337
3360
|
}
|
|
3338
3361
|
), r;
|
|
3339
|
-
},
|
|
3362
|
+
}, Da = function(e) {
|
|
3340
3363
|
var r = !1;
|
|
3341
|
-
return
|
|
3364
|
+
return At(
|
|
3342
3365
|
// eslint-disable-next-line no-extra-parens
|
|
3343
3366
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3344
3367
|
/** @type {any} */
|
|
3345
|
-
|
|
3368
|
+
Et,
|
|
3346
3369
|
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3347
3370
|
function(n, i) {
|
|
3348
3371
|
if (!r)
|
|
@@ -3352,19 +3375,19 @@ var Pa = function(e) {
|
|
|
3352
3375
|
}
|
|
3353
3376
|
}
|
|
3354
3377
|
), r;
|
|
3355
|
-
},
|
|
3378
|
+
}, Ra = function(e) {
|
|
3356
3379
|
if (!e || typeof e != "object")
|
|
3357
3380
|
return !1;
|
|
3358
|
-
if (!
|
|
3359
|
-
var r = Cr(
|
|
3360
|
-
return
|
|
3381
|
+
if (!ri) {
|
|
3382
|
+
var r = Cr(Pa(e), 8, -1);
|
|
3383
|
+
return Fa(lr, r) > -1 ? r : r !== "Object" ? !1 : Da(e);
|
|
3361
3384
|
}
|
|
3362
|
-
return
|
|
3363
|
-
},
|
|
3364
|
-
return
|
|
3385
|
+
return gt ? Na(e) : null;
|
|
3386
|
+
}, $a = Ra, Va = function(e) {
|
|
3387
|
+
return !!$a(e);
|
|
3365
3388
|
};
|
|
3366
3389
|
(function(t) {
|
|
3367
|
-
var e =
|
|
3390
|
+
var e = Zs, r = ia, n = La, i = Va;
|
|
3368
3391
|
function o(y) {
|
|
3369
3392
|
return y.call.bind(y);
|
|
3370
3393
|
}
|
|
@@ -3373,11 +3396,11 @@ var Pa = function(e) {
|
|
|
3373
3396
|
var p = o(BigInt.prototype.valueOf);
|
|
3374
3397
|
if (a)
|
|
3375
3398
|
var m = o(Symbol.prototype.valueOf);
|
|
3376
|
-
function v(y,
|
|
3399
|
+
function v(y, ci) {
|
|
3377
3400
|
if (typeof y != "object")
|
|
3378
3401
|
return !1;
|
|
3379
3402
|
try {
|
|
3380
|
-
return
|
|
3403
|
+
return ci(y), !0;
|
|
3381
3404
|
} catch {
|
|
3382
3405
|
return !1;
|
|
3383
3406
|
}
|
|
@@ -3391,10 +3414,10 @@ var Pa = function(e) {
|
|
|
3391
3414
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
|
|
3392
3415
|
}
|
|
3393
3416
|
t.isArrayBufferView = b;
|
|
3394
|
-
function
|
|
3417
|
+
function L(y) {
|
|
3395
3418
|
return n(y) === "Uint8Array";
|
|
3396
3419
|
}
|
|
3397
|
-
t.isUint8Array =
|
|
3420
|
+
t.isUint8Array = L;
|
|
3398
3421
|
function $(y) {
|
|
3399
3422
|
return n(y) === "Uint8ClampedArray";
|
|
3400
3423
|
}
|
|
@@ -3427,10 +3450,10 @@ var Pa = function(e) {
|
|
|
3427
3450
|
return n(y) === "Float64Array";
|
|
3428
3451
|
}
|
|
3429
3452
|
t.isFloat64Array = Z;
|
|
3430
|
-
function
|
|
3453
|
+
function Le(y) {
|
|
3431
3454
|
return n(y) === "BigInt64Array";
|
|
3432
3455
|
}
|
|
3433
|
-
t.isBigInt64Array =
|
|
3456
|
+
t.isBigInt64Array = Le;
|
|
3434
3457
|
function we(y) {
|
|
3435
3458
|
return n(y) === "BigUint64Array";
|
|
3436
3459
|
}
|
|
@@ -3447,10 +3470,10 @@ var Pa = function(e) {
|
|
|
3447
3470
|
return u(y) === "[object Set]";
|
|
3448
3471
|
}
|
|
3449
3472
|
me.working = typeof Set < "u" && me(/* @__PURE__ */ new Set());
|
|
3450
|
-
function
|
|
3473
|
+
function Ke(y) {
|
|
3451
3474
|
return typeof Set > "u" ? !1 : me.working ? me(y) : y instanceof Set;
|
|
3452
3475
|
}
|
|
3453
|
-
t.isSet =
|
|
3476
|
+
t.isSet = Ke;
|
|
3454
3477
|
function ke(y) {
|
|
3455
3478
|
return u(y) === "[object WeakMap]";
|
|
3456
3479
|
}
|
|
@@ -3471,10 +3494,10 @@ var Pa = function(e) {
|
|
|
3471
3494
|
return u(y) === "[object ArrayBuffer]";
|
|
3472
3495
|
}
|
|
3473
3496
|
Fe.working = typeof ArrayBuffer < "u" && Fe(new ArrayBuffer());
|
|
3474
|
-
function
|
|
3497
|
+
function it(y) {
|
|
3475
3498
|
return typeof ArrayBuffer > "u" ? !1 : Fe.working ? Fe(y) : y instanceof ArrayBuffer;
|
|
3476
3499
|
}
|
|
3477
|
-
t.isArrayBuffer =
|
|
3500
|
+
t.isArrayBuffer = it;
|
|
3478
3501
|
function l(y) {
|
|
3479
3502
|
return u(y) === "[object DataView]";
|
|
3480
3503
|
}
|
|
@@ -3491,10 +3514,10 @@ var Pa = function(e) {
|
|
|
3491
3514
|
return typeof g > "u" ? !1 : (typeof S.working > "u" && (S.working = S(new g())), S.working ? S(y) : y instanceof g);
|
|
3492
3515
|
}
|
|
3493
3516
|
t.isSharedArrayBuffer = C;
|
|
3494
|
-
function
|
|
3517
|
+
function _(y) {
|
|
3495
3518
|
return u(y) === "[object AsyncFunction]";
|
|
3496
3519
|
}
|
|
3497
|
-
t.isAsyncFunction =
|
|
3520
|
+
t.isAsyncFunction = _;
|
|
3498
3521
|
function A(y) {
|
|
3499
3522
|
return u(y) === "[object Map Iterator]";
|
|
3500
3523
|
}
|
|
@@ -3515,30 +3538,30 @@ var Pa = function(e) {
|
|
|
3515
3538
|
return v(y, d);
|
|
3516
3539
|
}
|
|
3517
3540
|
t.isNumberObject = Ae;
|
|
3518
|
-
function
|
|
3541
|
+
function ot(y) {
|
|
3519
3542
|
return v(y, c);
|
|
3520
3543
|
}
|
|
3521
|
-
t.isStringObject =
|
|
3544
|
+
t.isStringObject = ot;
|
|
3522
3545
|
function Ne(y) {
|
|
3523
3546
|
return v(y, f);
|
|
3524
3547
|
}
|
|
3525
3548
|
t.isBooleanObject = Ne;
|
|
3526
|
-
function
|
|
3549
|
+
function st(y) {
|
|
3527
3550
|
return s && v(y, p);
|
|
3528
3551
|
}
|
|
3529
|
-
t.isBigIntObject =
|
|
3552
|
+
t.isBigIntObject = st;
|
|
3530
3553
|
function kr(y) {
|
|
3531
3554
|
return a && v(y, m);
|
|
3532
3555
|
}
|
|
3533
3556
|
t.isSymbolObject = kr;
|
|
3534
|
-
function si(y) {
|
|
3535
|
-
return Ae(y) || it(y) || Ne(y) || ot(y) || kr(y);
|
|
3536
|
-
}
|
|
3537
|
-
t.isBoxedPrimitive = si;
|
|
3538
3557
|
function ai(y) {
|
|
3539
|
-
return
|
|
3558
|
+
return Ae(y) || ot(y) || Ne(y) || st(y) || kr(y);
|
|
3559
|
+
}
|
|
3560
|
+
t.isBoxedPrimitive = ai;
|
|
3561
|
+
function ui(y) {
|
|
3562
|
+
return typeof Uint8Array < "u" && (it(y) || C(y));
|
|
3540
3563
|
}
|
|
3541
|
-
t.isAnyArrayBuffer =
|
|
3564
|
+
t.isAnyArrayBuffer = ui, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
3542
3565
|
Object.defineProperty(t, y, {
|
|
3543
3566
|
enumerable: !1,
|
|
3544
3567
|
value: function() {
|
|
@@ -3546,8 +3569,8 @@ var Pa = function(e) {
|
|
|
3546
3569
|
}
|
|
3547
3570
|
});
|
|
3548
3571
|
});
|
|
3549
|
-
})(
|
|
3550
|
-
var
|
|
3572
|
+
})(xn);
|
|
3573
|
+
var ja = function(e) {
|
|
3551
3574
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3552
3575
|
}, dr = { exports: {} };
|
|
3553
3576
|
typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
@@ -3567,7 +3590,7 @@ typeof Object.create == "function" ? dr.exports = function(e, r) {
|
|
|
3567
3590
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3568
3591
|
}
|
|
3569
3592
|
};
|
|
3570
|
-
var
|
|
3593
|
+
var Ma = dr.exports;
|
|
3571
3594
|
(function(t) {
|
|
3572
3595
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
3573
3596
|
for (var g = Object.keys(h), S = {}, C = 0; C < g.length; C++)
|
|
@@ -3580,7 +3603,7 @@ var Va = dr.exports;
|
|
|
3580
3603
|
h.push(s(arguments[g]));
|
|
3581
3604
|
return h.join(" ");
|
|
3582
3605
|
}
|
|
3583
|
-
for (var g = 1, S = arguments, C = S.length,
|
|
3606
|
+
for (var g = 1, S = arguments, C = S.length, _ = String(l).replace(r, function(O) {
|
|
3584
3607
|
if (O === "%%")
|
|
3585
3608
|
return "%";
|
|
3586
3609
|
if (g >= C)
|
|
@@ -3600,8 +3623,8 @@ var Va = dr.exports;
|
|
|
3600
3623
|
return O;
|
|
3601
3624
|
}
|
|
3602
3625
|
}), A = S[g]; g < C; A = S[++g])
|
|
3603
|
-
$(A) || !Z(A) ?
|
|
3604
|
-
return
|
|
3626
|
+
$(A) || !Z(A) ? _ += " " + A : _ += " " + s(A);
|
|
3627
|
+
return _;
|
|
3605
3628
|
}, t.deprecate = function(l, h) {
|
|
3606
3629
|
if (typeof w < "u" && w.noDeprecation === !0)
|
|
3607
3630
|
return l;
|
|
@@ -3643,7 +3666,7 @@ var Va = dr.exports;
|
|
|
3643
3666
|
seen: [],
|
|
3644
3667
|
stylize: u
|
|
3645
3668
|
};
|
|
3646
|
-
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]),
|
|
3669
|
+
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), L(h) ? g.showHidden = h : h && t._extend(g, h), T(g.showHidden) && (g.showHidden = !1), T(g.depth) && (g.depth = 2), T(g.colors) && (g.colors = !1), T(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = a), c(g, l, g.depth);
|
|
3647
3670
|
}
|
|
3648
3671
|
t.inspect = s, s.colors = {
|
|
3649
3672
|
bold: [1, 22],
|
|
@@ -3693,34 +3716,34 @@ var Va = dr.exports;
|
|
|
3693
3716
|
var C = f(l, h);
|
|
3694
3717
|
if (C)
|
|
3695
3718
|
return C;
|
|
3696
|
-
var
|
|
3697
|
-
if (l.showHidden && (
|
|
3719
|
+
var _ = Object.keys(h), A = d(_);
|
|
3720
|
+
if (l.showHidden && (_ = Object.getOwnPropertyNames(h)), we(h) && (_.indexOf("message") >= 0 || _.indexOf("description") >= 0))
|
|
3698
3721
|
return p(h);
|
|
3699
|
-
if (
|
|
3722
|
+
if (_.length === 0) {
|
|
3700
3723
|
if (oe(h)) {
|
|
3701
3724
|
var O = h.name ? ": " + h.name : "";
|
|
3702
3725
|
return l.stylize("[Function" + O + "]", "special");
|
|
3703
3726
|
}
|
|
3704
3727
|
if (X(h))
|
|
3705
3728
|
return l.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
3706
|
-
if (
|
|
3729
|
+
if (Le(h))
|
|
3707
3730
|
return l.stylize(Date.prototype.toString.call(h), "date");
|
|
3708
3731
|
if (we(h))
|
|
3709
3732
|
return p(h);
|
|
3710
3733
|
}
|
|
3711
3734
|
var F = "", G = !1, Ae = ["{", "}"];
|
|
3712
3735
|
if (b(h) && (G = !0, Ae = ["[", "]"]), oe(h)) {
|
|
3713
|
-
var
|
|
3714
|
-
F = " [Function" +
|
|
3736
|
+
var ot = h.name ? ": " + h.name : "";
|
|
3737
|
+
F = " [Function" + ot + "]";
|
|
3715
3738
|
}
|
|
3716
|
-
if (X(h) && (F = " " + RegExp.prototype.toString.call(h)),
|
|
3739
|
+
if (X(h) && (F = " " + RegExp.prototype.toString.call(h)), Le(h) && (F = " " + Date.prototype.toUTCString.call(h)), we(h) && (F = " " + p(h)), _.length === 0 && (!G || h.length == 0))
|
|
3717
3740
|
return Ae[0] + F + Ae[1];
|
|
3718
3741
|
if (g < 0)
|
|
3719
3742
|
return X(h) ? l.stylize(RegExp.prototype.toString.call(h), "regexp") : l.stylize("[Object]", "special");
|
|
3720
3743
|
l.seen.push(h);
|
|
3721
3744
|
var Ne;
|
|
3722
|
-
return G ? Ne = m(l, h, g, A,
|
|
3723
|
-
return v(l, h, g, A,
|
|
3745
|
+
return G ? Ne = m(l, h, g, A, _) : Ne = _.map(function(st) {
|
|
3746
|
+
return v(l, h, g, A, st, G);
|
|
3724
3747
|
}), l.seen.pop(), I(Ne, F, Ae);
|
|
3725
3748
|
}
|
|
3726
3749
|
function f(l, h) {
|
|
@@ -3732,7 +3755,7 @@ var Va = dr.exports;
|
|
|
3732
3755
|
}
|
|
3733
3756
|
if (J(h))
|
|
3734
3757
|
return l.stylize("" + h, "number");
|
|
3735
|
-
if (
|
|
3758
|
+
if (L(h))
|
|
3736
3759
|
return l.stylize("" + h, "boolean");
|
|
3737
3760
|
if ($(h))
|
|
3738
3761
|
return l.stylize("null", "null");
|
|
@@ -3741,17 +3764,17 @@ var Va = dr.exports;
|
|
|
3741
3764
|
return "[" + Error.prototype.toString.call(l) + "]";
|
|
3742
3765
|
}
|
|
3743
3766
|
function m(l, h, g, S, C) {
|
|
3744
|
-
for (var
|
|
3745
|
-
Pe(h, String(A)) ?
|
|
3767
|
+
for (var _ = [], A = 0, O = h.length; A < O; ++A)
|
|
3768
|
+
Pe(h, String(A)) ? _.push(v(
|
|
3746
3769
|
l,
|
|
3747
3770
|
h,
|
|
3748
3771
|
g,
|
|
3749
3772
|
S,
|
|
3750
3773
|
String(A),
|
|
3751
3774
|
!0
|
|
3752
|
-
)) :
|
|
3775
|
+
)) : _.push("");
|
|
3753
3776
|
return C.forEach(function(F) {
|
|
3754
|
-
F.match(/^\d+$/) ||
|
|
3777
|
+
F.match(/^\d+$/) || _.push(v(
|
|
3755
3778
|
l,
|
|
3756
3779
|
h,
|
|
3757
3780
|
g,
|
|
@@ -3759,12 +3782,12 @@ var Va = dr.exports;
|
|
|
3759
3782
|
F,
|
|
3760
3783
|
!0
|
|
3761
3784
|
));
|
|
3762
|
-
}),
|
|
3785
|
+
}), _;
|
|
3763
3786
|
}
|
|
3764
|
-
function v(l, h, g, S, C,
|
|
3787
|
+
function v(l, h, g, S, C, _) {
|
|
3765
3788
|
var A, O, F;
|
|
3766
3789
|
if (F = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, F.get ? F.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : F.set && (O = l.stylize("[Setter]", "special")), Pe(S, C) || (A = "[" + C + "]"), O || (l.seen.indexOf(F.value) < 0 ? ($(g) ? O = c(l, F.value, null) : O = c(l, F.value, g - 1), O.indexOf(`
|
|
3767
|
-
`) > -1 && (
|
|
3790
|
+
`) > -1 && (_ ? O = O.split(`
|
|
3768
3791
|
`).map(function(G) {
|
|
3769
3792
|
return " " + G;
|
|
3770
3793
|
}).join(`
|
|
@@ -3774,30 +3797,30 @@ var Va = dr.exports;
|
|
|
3774
3797
|
return " " + G;
|
|
3775
3798
|
}).join(`
|
|
3776
3799
|
`))) : O = l.stylize("[Circular]", "special")), T(A)) {
|
|
3777
|
-
if (
|
|
3800
|
+
if (_ && C.match(/^\d+$/))
|
|
3778
3801
|
return O;
|
|
3779
3802
|
A = JSON.stringify("" + C), A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (A = A.slice(1, -1), A = l.stylize(A, "name")) : (A = A.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), A = l.stylize(A, "string"));
|
|
3780
3803
|
}
|
|
3781
3804
|
return A + ": " + O;
|
|
3782
3805
|
}
|
|
3783
3806
|
function I(l, h, g) {
|
|
3784
|
-
var S = l.reduce(function(C,
|
|
3785
|
-
return
|
|
3786
|
-
`) >= 0, C +
|
|
3807
|
+
var S = l.reduce(function(C, _) {
|
|
3808
|
+
return _.indexOf(`
|
|
3809
|
+
`) >= 0, C + _.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3787
3810
|
}, 0);
|
|
3788
3811
|
return S > 60 ? g[0] + (h === "" ? "" : h + `
|
|
3789
3812
|
`) + " " + l.join(`,
|
|
3790
3813
|
`) + " " + g[1] : g[0] + h + " " + l.join(", ") + " " + g[1];
|
|
3791
3814
|
}
|
|
3792
|
-
t.types =
|
|
3815
|
+
t.types = xn;
|
|
3793
3816
|
function b(l) {
|
|
3794
3817
|
return Array.isArray(l);
|
|
3795
3818
|
}
|
|
3796
3819
|
t.isArray = b;
|
|
3797
|
-
function
|
|
3820
|
+
function L(l) {
|
|
3798
3821
|
return typeof l == "boolean";
|
|
3799
3822
|
}
|
|
3800
|
-
t.isBoolean =
|
|
3823
|
+
t.isBoolean = L;
|
|
3801
3824
|
function $(l) {
|
|
3802
3825
|
return l === null;
|
|
3803
3826
|
}
|
|
@@ -3830,10 +3853,10 @@ var Va = dr.exports;
|
|
|
3830
3853
|
return typeof l == "object" && l !== null;
|
|
3831
3854
|
}
|
|
3832
3855
|
t.isObject = Z;
|
|
3833
|
-
function
|
|
3856
|
+
function Le(l) {
|
|
3834
3857
|
return Z(l) && me(l) === "[object Date]";
|
|
3835
3858
|
}
|
|
3836
|
-
t.isDate =
|
|
3859
|
+
t.isDate = Le, t.types.isDate = Le;
|
|
3837
3860
|
function we(l) {
|
|
3838
3861
|
return Z(l) && (me(l) === "[object Error]" || l instanceof Error);
|
|
3839
3862
|
}
|
|
@@ -3846,11 +3869,11 @@ var Va = dr.exports;
|
|
|
3846
3869
|
return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
|
|
3847
3870
|
typeof l > "u";
|
|
3848
3871
|
}
|
|
3849
|
-
t.isPrimitive = Dt, t.isBuffer =
|
|
3872
|
+
t.isPrimitive = Dt, t.isBuffer = ja;
|
|
3850
3873
|
function me(l) {
|
|
3851
3874
|
return Object.prototype.toString.call(l);
|
|
3852
3875
|
}
|
|
3853
|
-
function
|
|
3876
|
+
function Ke(l) {
|
|
3854
3877
|
return l < 10 ? "0" + l.toString(10) : l.toString(10);
|
|
3855
3878
|
}
|
|
3856
3879
|
var ke = [
|
|
@@ -3869,15 +3892,15 @@ var Va = dr.exports;
|
|
|
3869
3892
|
];
|
|
3870
3893
|
function Rt() {
|
|
3871
3894
|
var l = /* @__PURE__ */ new Date(), h = [
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3895
|
+
Ke(l.getHours()),
|
|
3896
|
+
Ke(l.getMinutes()),
|
|
3897
|
+
Ke(l.getSeconds())
|
|
3875
3898
|
].join(":");
|
|
3876
3899
|
return [l.getDate(), ke[l.getMonth()], h].join(" ");
|
|
3877
3900
|
}
|
|
3878
3901
|
t.log = function() {
|
|
3879
3902
|
console.log("%s - %s", Rt(), t.format.apply(t, arguments));
|
|
3880
|
-
}, t.inherits =
|
|
3903
|
+
}, t.inherits = Ma, t._extend = function(l, h) {
|
|
3881
3904
|
if (!h || !Z(h))
|
|
3882
3905
|
return l;
|
|
3883
3906
|
for (var g = Object.keys(h), S = g.length; S--; )
|
|
@@ -3903,7 +3926,7 @@ var Va = dr.exports;
|
|
|
3903
3926
|
}), g;
|
|
3904
3927
|
}
|
|
3905
3928
|
function g() {
|
|
3906
|
-
for (var S, C,
|
|
3929
|
+
for (var S, C, _ = new Promise(function(F, G) {
|
|
3907
3930
|
S = F, C = G;
|
|
3908
3931
|
}), A = [], O = 0; O < arguments.length; O++)
|
|
3909
3932
|
A.push(arguments[O]);
|
|
@@ -3915,7 +3938,7 @@ var Va = dr.exports;
|
|
|
3915
3938
|
} catch (F) {
|
|
3916
3939
|
C(F);
|
|
3917
3940
|
}
|
|
3918
|
-
return
|
|
3941
|
+
return _;
|
|
3919
3942
|
}
|
|
3920
3943
|
return Object.setPrototypeOf(g, Object.getPrototypeOf(h)), se && Object.defineProperty(g, se, {
|
|
3921
3944
|
value: g,
|
|
@@ -3934,7 +3957,7 @@ var Va = dr.exports;
|
|
|
3934
3957
|
}
|
|
3935
3958
|
return h(l);
|
|
3936
3959
|
}
|
|
3937
|
-
function
|
|
3960
|
+
function it(l) {
|
|
3938
3961
|
if (typeof l != "function")
|
|
3939
3962
|
throw new TypeError('The "original" argument must be of type Function');
|
|
3940
3963
|
function h() {
|
|
@@ -3943,8 +3966,8 @@ var Va = dr.exports;
|
|
|
3943
3966
|
var C = g.pop();
|
|
3944
3967
|
if (typeof C != "function")
|
|
3945
3968
|
throw new TypeError("The last argument must be of type Function");
|
|
3946
|
-
var
|
|
3947
|
-
return C.apply(
|
|
3969
|
+
var _ = this, A = function() {
|
|
3970
|
+
return C.apply(_, arguments);
|
|
3948
3971
|
};
|
|
3949
3972
|
l.apply(this, g).then(
|
|
3950
3973
|
function(O) {
|
|
@@ -3960,9 +3983,9 @@ var Va = dr.exports;
|
|
|
3960
3983
|
e(l)
|
|
3961
3984
|
), h;
|
|
3962
3985
|
}
|
|
3963
|
-
t.callbackify =
|
|
3964
|
-
})(
|
|
3965
|
-
const { inherits:
|
|
3986
|
+
t.callbackify = it;
|
|
3987
|
+
})(Lt);
|
|
3988
|
+
const { inherits: Ua, format: zt } = Lt;
|
|
3966
3989
|
function Ee(t, e, r = Error) {
|
|
3967
3990
|
if (!t)
|
|
3968
3991
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -3971,13 +3994,13 @@ function Ee(t, e, r = Error) {
|
|
|
3971
3994
|
function n(i, o, s) {
|
|
3972
3995
|
if (!new.target)
|
|
3973
3996
|
return new n(i, o, s);
|
|
3974
|
-
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message =
|
|
3997
|
+
Error.captureStackTrace(this, n), this.code = t, this.message = e, this.name = "AvvioError", i && o && s ? this.message = zt(e, i, o, s) : i && o ? this.message = zt(e, i, o) : i ? this.message = zt(e, i) : this.message = e;
|
|
3975
3998
|
}
|
|
3976
3999
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
3977
4000
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
3978
|
-
},
|
|
4001
|
+
}, Ua(n, r), n;
|
|
3979
4002
|
}
|
|
3980
|
-
var
|
|
4003
|
+
var ni = {
|
|
3981
4004
|
createError: Ee,
|
|
3982
4005
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ee(
|
|
3983
4006
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -4003,7 +4026,7 @@ var ri = {
|
|
|
4003
4026
|
"AVV_ERR_READY_TIMEOUT",
|
|
4004
4027
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4005
4028
|
)
|
|
4006
|
-
},
|
|
4029
|
+
}, xa = function t(e, r, n) {
|
|
4007
4030
|
r === void 0 && (r = ""), n || (n = {});
|
|
4008
4031
|
var i = function(u) {
|
|
4009
4032
|
var d = {
|
|
@@ -4025,12 +4048,12 @@ var ri = {
|
|
|
4025
4048
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4026
4049
|
}).join("");
|
|
4027
4050
|
};
|
|
4028
|
-
const
|
|
4029
|
-
let
|
|
4051
|
+
const Ba = xa, dn = Symbol("avvio.TimeTree.untrackNode"), Kt = Symbol("avvio.TimeTree.trackNode"), fn = Symbol("avvio.TimeTree.getParent"), hn = Symbol("avvio.TimeTree.getNode"), pn = Symbol("avvio.TimeTree.addNode");
|
|
4052
|
+
let qa = class {
|
|
4030
4053
|
constructor() {
|
|
4031
4054
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4032
4055
|
}
|
|
4033
|
-
[
|
|
4056
|
+
[Kt](e) {
|
|
4034
4057
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4035
4058
|
}
|
|
4036
4059
|
[dn](e) {
|
|
@@ -4058,7 +4081,7 @@ let xa = class {
|
|
|
4058
4081
|
label: r,
|
|
4059
4082
|
start: n,
|
|
4060
4083
|
nodes: []
|
|
4061
|
-
}, this[
|
|
4084
|
+
}, this[Kt](this.root), this.root.id;
|
|
4062
4085
|
const o = this[fn](e), s = `${r}-${Math.random()}`, a = {
|
|
4063
4086
|
id: s,
|
|
4064
4087
|
parent: e,
|
|
@@ -4066,7 +4089,7 @@ let xa = class {
|
|
|
4066
4089
|
label: r,
|
|
4067
4090
|
nodes: []
|
|
4068
4091
|
};
|
|
4069
|
-
return o.nodes.push(a), this[
|
|
4092
|
+
return o.nodes.push(a), this[Kt](a), s;
|
|
4070
4093
|
}
|
|
4071
4094
|
start(e, r, n = Date.now()) {
|
|
4072
4095
|
return this[pn](e, r, n);
|
|
@@ -4080,11 +4103,11 @@ let xa = class {
|
|
|
4080
4103
|
}
|
|
4081
4104
|
prittyPrint() {
|
|
4082
4105
|
const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
|
|
4083
|
-
return
|
|
4106
|
+
return Ba(r);
|
|
4084
4107
|
}
|
|
4085
4108
|
};
|
|
4086
|
-
var
|
|
4087
|
-
function
|
|
4109
|
+
var Qa = qa, _r = { exports: {} }, fr = { exports: {} }, Ht, yn;
|
|
4110
|
+
function Ga() {
|
|
4088
4111
|
if (yn)
|
|
4089
4112
|
return Ht;
|
|
4090
4113
|
yn = 1;
|
|
@@ -4166,8 +4189,8 @@ function qa() {
|
|
|
4166
4189
|
}
|
|
4167
4190
|
return Ht;
|
|
4168
4191
|
}
|
|
4169
|
-
function
|
|
4170
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4192
|
+
function za(t) {
|
|
4193
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = Ga(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
4171
4194
|
r[c] = t[c];
|
|
4172
4195
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4173
4196
|
function e(c) {
|
|
@@ -4182,8 +4205,8 @@ function Qa(t) {
|
|
|
4182
4205
|
function I(...b) {
|
|
4183
4206
|
if (!I.enabled)
|
|
4184
4207
|
return;
|
|
4185
|
-
const
|
|
4186
|
-
|
|
4208
|
+
const L = I, $ = Number(/* @__PURE__ */ new Date()), q = $ - (f || $);
|
|
4209
|
+
L.diff = q, L.prev = f, L.curr = $, f = $, b[0] = r.coerce(b[0]), typeof b[0] != "string" && b.unshift("%O");
|
|
4187
4210
|
let J = 0;
|
|
4188
4211
|
b[0] = b[0].replace(/%([a-zA-Z%])/g, (R, T) => {
|
|
4189
4212
|
if (R === "%%")
|
|
@@ -4192,10 +4215,10 @@ function Qa(t) {
|
|
|
4192
4215
|
const X = r.formatters[T];
|
|
4193
4216
|
if (typeof X == "function") {
|
|
4194
4217
|
const Z = b[J];
|
|
4195
|
-
R = X.call(
|
|
4218
|
+
R = X.call(L, Z), b.splice(J, 1), J--;
|
|
4196
4219
|
}
|
|
4197
4220
|
return R;
|
|
4198
|
-
}), r.formatArgs.call(
|
|
4221
|
+
}), r.formatArgs.call(L, b), (L.log || r.log).apply(L, b);
|
|
4199
4222
|
}
|
|
4200
4223
|
return I.namespace = c, I.useColors = r.useColors(), I.color = r.selectColor(c), I.extend = n, I.destroy = r.destroy, Object.defineProperty(I, "enabled", {
|
|
4201
4224
|
enumerable: !0,
|
|
@@ -4247,7 +4270,7 @@ function Qa(t) {
|
|
|
4247
4270
|
}
|
|
4248
4271
|
return r.enable(r.load()), r;
|
|
4249
4272
|
}
|
|
4250
|
-
var
|
|
4273
|
+
var Ka = za;
|
|
4251
4274
|
(function(t, e) {
|
|
4252
4275
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4253
4276
|
let u = !1;
|
|
@@ -4371,7 +4394,7 @@ var Ga = Qa;
|
|
|
4371
4394
|
} catch {
|
|
4372
4395
|
}
|
|
4373
4396
|
}
|
|
4374
|
-
t.exports =
|
|
4397
|
+
t.exports = Ka(e);
|
|
4375
4398
|
const { formatters: a } = t.exports;
|
|
4376
4399
|
a.j = function(u) {
|
|
4377
4400
|
try {
|
|
@@ -4381,23 +4404,23 @@ var Ga = Qa;
|
|
|
4381
4404
|
}
|
|
4382
4405
|
};
|
|
4383
4406
|
})(fr, fr.exports);
|
|
4384
|
-
var
|
|
4385
|
-
const
|
|
4386
|
-
function
|
|
4407
|
+
var ii = fr.exports;
|
|
4408
|
+
const Ha = Pn, Wa = Un.EventEmitter, Ja = Lt.inherits, M = ii("avvio"), { AVV_ERR_READY_TIMEOUT: Ya } = ni, Wt = Symbol.for("plugin-meta");
|
|
4409
|
+
function Xa(t, e) {
|
|
4387
4410
|
return t[Wt] && t[Wt].name ? t[Wt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4388
4411
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4389
4412
|
}
|
|
4390
|
-
function
|
|
4413
|
+
function Za() {
|
|
4391
4414
|
const t = {};
|
|
4392
4415
|
return t.promise = new Promise((e, r) => {
|
|
4393
4416
|
t.resolve = e, t.reject = r;
|
|
4394
4417
|
}), t;
|
|
4395
4418
|
}
|
|
4396
|
-
function
|
|
4397
|
-
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name =
|
|
4419
|
+
function ze(t, e, r, n, i) {
|
|
4420
|
+
this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = i === void 0 ? t._timeout : i, this.name = Xa(e, r), this.isAfter = n, this.q = Ha(t, eu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4398
4421
|
}
|
|
4399
|
-
|
|
4400
|
-
|
|
4422
|
+
Ja(ze, Wa);
|
|
4423
|
+
ze.prototype.exec = function(t, e) {
|
|
4401
4424
|
const r = this.func;
|
|
4402
4425
|
let n = !1;
|
|
4403
4426
|
const i = this.name;
|
|
@@ -4424,7 +4447,7 @@ Ke.prototype.exec = function(t, e) {
|
|
|
4424
4447
|
};
|
|
4425
4448
|
this.timeout > 0 && (M("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4426
4449
|
M("timed out", i), o = null;
|
|
4427
|
-
const u = new
|
|
4450
|
+
const u = new Ya(i);
|
|
4428
4451
|
u.fn = r, s(u);
|
|
4429
4452
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4430
4453
|
const a = r(this.server, this.opts, s);
|
|
@@ -4433,7 +4456,7 @@ Ke.prototype.exec = function(t, e) {
|
|
|
4433
4456
|
(u) => w.nextTick(s, u)
|
|
4434
4457
|
));
|
|
4435
4458
|
};
|
|
4436
|
-
|
|
4459
|
+
ze.prototype.loadedSoFar = function() {
|
|
4437
4460
|
if (this.loaded)
|
|
4438
4461
|
return Promise.resolve();
|
|
4439
4462
|
const t = () => {
|
|
@@ -4442,12 +4465,12 @@ Ke.prototype.loadedSoFar = function() {
|
|
|
4442
4465
|
}), this.q.resume();
|
|
4443
4466
|
};
|
|
4444
4467
|
let e;
|
|
4445
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4468
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Za(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4446
4469
|
};
|
|
4447
|
-
|
|
4470
|
+
ze.prototype.enqueue = function(t, e) {
|
|
4448
4471
|
M("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4449
4472
|
};
|
|
4450
|
-
|
|
4473
|
+
ze.prototype.finish = function(t, e) {
|
|
4451
4474
|
M("finish", this.name, t);
|
|
4452
4475
|
const r = () => {
|
|
4453
4476
|
this.loaded || (M("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4467,19 +4490,19 @@ Ke.prototype.finish = function(t, e) {
|
|
|
4467
4490
|
r();
|
|
4468
4491
|
else
|
|
4469
4492
|
M("delayed", this.name), this.q.drain = () => {
|
|
4470
|
-
M("drain", this.name), this.q.drain =
|
|
4493
|
+
M("drain", this.name), this.q.drain = tu, queueMicrotask(n);
|
|
4471
4494
|
};
|
|
4472
4495
|
};
|
|
4473
4496
|
queueMicrotask(n), this.q.resume();
|
|
4474
4497
|
};
|
|
4475
|
-
function
|
|
4498
|
+
function eu(t, e) {
|
|
4476
4499
|
const r = this;
|
|
4477
|
-
w.nextTick(
|
|
4500
|
+
w.nextTick(Lr.bind(r), t, e);
|
|
4478
4501
|
}
|
|
4479
|
-
function
|
|
4502
|
+
function Lr(t, e) {
|
|
4480
4503
|
if (typeof t.func.then == "function") {
|
|
4481
4504
|
t.func.then((n) => {
|
|
4482
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
4505
|
+
typeof n.default == "function" && (n = n.default), t.func = n, Lr.call(this, t, e);
|
|
4483
4506
|
}, e);
|
|
4484
4507
|
return;
|
|
4485
4508
|
}
|
|
@@ -4490,19 +4513,19 @@ function _r(t, e) {
|
|
|
4490
4513
|
});
|
|
4491
4514
|
});
|
|
4492
4515
|
}
|
|
4493
|
-
function
|
|
4516
|
+
function tu() {
|
|
4494
4517
|
}
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
var
|
|
4498
|
-
const gn =
|
|
4518
|
+
_r.exports = ze;
|
|
4519
|
+
_r.exports.loadPlugin = Lr;
|
|
4520
|
+
var ru = _r.exports;
|
|
4521
|
+
const gn = Pn, nu = Un.EventEmitter, iu = Lt.inherits, {
|
|
4499
4522
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Jt,
|
|
4500
4523
|
AVV_ERR_CALLBACK_NOT_FN: Ye,
|
|
4501
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4502
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4503
|
-
AVV_ERR_READY_TIMEOUT:
|
|
4504
|
-
} =
|
|
4505
|
-
function
|
|
4524
|
+
AVV_ERR_PLUGIN_NOT_VALID: ou,
|
|
4525
|
+
AVV_ERR_ROOT_PLG_BOOTED: su,
|
|
4526
|
+
AVV_ERR_READY_TIMEOUT: au
|
|
4527
|
+
} = ni, uu = Qa, hr = ru, Ge = ii("avvio"), It = Symbol("kAvvio"), Yt = Symbol("kThenifyDoNotWrap");
|
|
4528
|
+
function cu(t, e, r) {
|
|
4506
4529
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4507
4530
|
if (t[i])
|
|
4508
4531
|
throw new Jt(i);
|
|
@@ -4512,7 +4535,7 @@ function au(t, e, r) {
|
|
|
4512
4535
|
throw new Jt(s);
|
|
4513
4536
|
t[i] = function(d, c) {
|
|
4514
4537
|
return r.use(d, c), this;
|
|
4515
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4538
|
+
}, Object.defineProperty(t, "then", { get: oi.bind(r) }), t[It] = !0, t[o] = function(d) {
|
|
4516
4539
|
return typeof d != "function" ? r._loadRegistered() : (r.after(Xt(d, this)), this);
|
|
4517
4540
|
}, t[s] = function(d) {
|
|
4518
4541
|
if (d && typeof d != "function")
|
|
@@ -4521,7 +4544,7 @@ function au(t, e, r) {
|
|
|
4521
4544
|
}, t[a] = function(d) {
|
|
4522
4545
|
if (typeof d != "function")
|
|
4523
4546
|
throw new Ye(a, typeof d);
|
|
4524
|
-
return r.onClose(
|
|
4547
|
+
return r.onClose(pu(d, this)), this;
|
|
4525
4548
|
}, t[u] = function(d) {
|
|
4526
4549
|
if (d && typeof d != "function")
|
|
4527
4550
|
throw new Ye(u, typeof d);
|
|
@@ -4531,13 +4554,13 @@ function au(t, e, r) {
|
|
|
4531
4554
|
function x(t, e, r) {
|
|
4532
4555
|
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4533
4556
|
const n = new x(t, e, r);
|
|
4534
|
-
return t &&
|
|
4557
|
+
return t && cu(t, e, n), n;
|
|
4535
4558
|
}
|
|
4536
|
-
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
|
|
4559
|
+
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 uu(), this._readyQ = gn(this, si, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4537
4560
|
this.emit("start"), this._readyQ.drain = mn;
|
|
4538
|
-
}, this._closeQ = gn(this,
|
|
4561
|
+
}, this._closeQ = gn(this, hu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4539
4562
|
this.emit("close"), this._closeQ.drain = mn;
|
|
4540
|
-
}, this._doStart = null, this._root = new hr(this,
|
|
4563
|
+
}, this._doStart = null, this._root = new hr(this, lu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4541
4564
|
const s = this.pluginTree.start(null, i, o);
|
|
4542
4565
|
this._root.once("loaded", (a, u, d) => {
|
|
4543
4566
|
this.pluginTree.stop(s, d);
|
|
@@ -4557,22 +4580,22 @@ function x(t, e, r) {
|
|
|
4557
4580
|
this._readyQ.resume();
|
|
4558
4581
|
});
|
|
4559
4582
|
}
|
|
4560
|
-
function
|
|
4583
|
+
function lu(t, e, r) {
|
|
4561
4584
|
this._doStart = r, e.autostart && this.start();
|
|
4562
4585
|
}
|
|
4563
|
-
|
|
4586
|
+
iu(x, nu);
|
|
4564
4587
|
x.prototype.start = function() {
|
|
4565
4588
|
return this.started = !0, w.nextTick(this._doStart), this;
|
|
4566
4589
|
};
|
|
4567
4590
|
x.prototype.override = function(t, e, r) {
|
|
4568
4591
|
return t;
|
|
4569
4592
|
};
|
|
4570
|
-
function
|
|
4593
|
+
function du(t) {
|
|
4571
4594
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4572
|
-
throw new
|
|
4595
|
+
throw new ou(typeof t);
|
|
4573
4596
|
return t;
|
|
4574
4597
|
}
|
|
4575
|
-
x.prototype[
|
|
4598
|
+
x.prototype[It] = !0;
|
|
4576
4599
|
x.prototype.use = function(t, e) {
|
|
4577
4600
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
4578
4601
|
};
|
|
@@ -4580,10 +4603,10 @@ x.prototype._loadRegistered = function() {
|
|
|
4580
4603
|
const t = this._current[0];
|
|
4581
4604
|
return !this.started && !this.booted && w.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4582
4605
|
};
|
|
4583
|
-
Object.defineProperty(x.prototype, "then", { get:
|
|
4606
|
+
Object.defineProperty(x.prototype, "then", { get: oi });
|
|
4584
4607
|
x.prototype._addPlugin = function(t, e, r) {
|
|
4585
|
-
if (t =
|
|
4586
|
-
throw new
|
|
4608
|
+
if (t = du(t), e = e || {}, this.booted)
|
|
4609
|
+
throw new su();
|
|
4587
4610
|
const n = this._current[0], i = new hr(this, t, e, r);
|
|
4588
4611
|
if (i.once("start", (o, s, a) => {
|
|
4589
4612
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -4601,7 +4624,7 @@ x.prototype.after = function(t) {
|
|
|
4601
4624
|
return this._loadRegistered();
|
|
4602
4625
|
this._addPlugin(e.bind(this), {}, !0);
|
|
4603
4626
|
function e(r, n, i) {
|
|
4604
|
-
|
|
4627
|
+
si.call(this, t, i);
|
|
4605
4628
|
}
|
|
4606
4629
|
return this;
|
|
4607
4630
|
};
|
|
@@ -4654,7 +4677,7 @@ x.prototype.toJSON = function() {
|
|
|
4654
4677
|
};
|
|
4655
4678
|
function mn() {
|
|
4656
4679
|
}
|
|
4657
|
-
function
|
|
4680
|
+
function oi() {
|
|
4658
4681
|
if (this.booted) {
|
|
4659
4682
|
Ge("thenify returning null because we are already booted");
|
|
4660
4683
|
return;
|
|
@@ -4665,27 +4688,27 @@ function ii() {
|
|
|
4665
4688
|
}
|
|
4666
4689
|
return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[Yt] = !0, t(this._server)), e);
|
|
4667
4690
|
}
|
|
4668
|
-
function
|
|
4691
|
+
function si(t, e) {
|
|
4669
4692
|
const r = this._server, n = this._error;
|
|
4670
4693
|
let i;
|
|
4671
4694
|
if (this._error = null, t.length === 0)
|
|
4672
|
-
this._error = n, i = t(), i && !i[
|
|
4695
|
+
this._error = n, i = t(), i && !i[It] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
|
|
4673
4696
|
else if (t.length === 1)
|
|
4674
|
-
i = t(n), i && !i[
|
|
4697
|
+
i = t(n), i && !i[It] && typeof i.then == "function" ? i.then(() => w.nextTick(e), (o) => w.nextTick(e, o)) : w.nextTick(e);
|
|
4675
4698
|
else if (this._timeout === 0) {
|
|
4676
4699
|
const o = (s) => {
|
|
4677
4700
|
this._error = s, e(this._error);
|
|
4678
4701
|
};
|
|
4679
4702
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
4680
4703
|
} else
|
|
4681
|
-
|
|
4704
|
+
fu.call(this, t, n, r, e);
|
|
4682
4705
|
}
|
|
4683
|
-
function
|
|
4706
|
+
function fu(t, e, r, n) {
|
|
4684
4707
|
const i = t.name;
|
|
4685
4708
|
Ge("setting up ready timeout", i, this._timeout);
|
|
4686
4709
|
let o = setTimeout(() => {
|
|
4687
4710
|
Ge("timed out", i), o = null;
|
|
4688
|
-
const a = new
|
|
4711
|
+
const a = new au(i);
|
|
4689
4712
|
a.fn = t, this._error = a, n(a);
|
|
4690
4713
|
}, this._timeout);
|
|
4691
4714
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -4693,7 +4716,7 @@ function lu(t, e, r, n) {
|
|
|
4693
4716
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
4694
4717
|
}
|
|
4695
4718
|
}
|
|
4696
|
-
function
|
|
4719
|
+
function hu(t, e) {
|
|
4697
4720
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
4698
4721
|
if (t.length === 0 || t.length === 1) {
|
|
4699
4722
|
let i;
|
|
@@ -4704,7 +4727,7 @@ function du(t, e) {
|
|
|
4704
4727
|
} else
|
|
4705
4728
|
t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
4706
4729
|
}
|
|
4707
|
-
function
|
|
4730
|
+
function pu(t, e) {
|
|
4708
4731
|
return r.bind(e);
|
|
4709
4732
|
function r(n, i) {
|
|
4710
4733
|
let o;
|
|
@@ -4734,8 +4757,8 @@ mr.exports.express = function(t) {
|
|
|
4734
4757
|
}
|
|
4735
4758
|
});
|
|
4736
4759
|
};
|
|
4737
|
-
var
|
|
4738
|
-
const
|
|
4760
|
+
var yu = mr.exports;
|
|
4761
|
+
const gu = /* @__PURE__ */ Qo(yu);
|
|
4739
4762
|
(function() {
|
|
4740
4763
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
4741
4764
|
return;
|
|
@@ -4753,9 +4776,9 @@ const pu = /* @__PURE__ */ Bo(hu);
|
|
|
4753
4776
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
4754
4777
|
}
|
|
4755
4778
|
})();
|
|
4756
|
-
function
|
|
4757
|
-
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s =
|
|
4758
|
-
return s.use(
|
|
4779
|
+
function Uu(t, e = !0, r = !0, n) {
|
|
4780
|
+
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = gu(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4781
|
+
return s.use(Ao), s.use(mo, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(wo, { videoPlayerController: n?.videoPlayerController }), s.use(Bi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Ki), s.use(So), s.use(Ro), s.use(so), s.use(qo), s.after((a, u, d) => {
|
|
4759
4782
|
if (a)
|
|
4760
4783
|
throw a;
|
|
4761
4784
|
u.ready(), d();
|
|
@@ -4768,5 +4791,5 @@ function ju(t, e = !0, r = !0, n) {
|
|
|
4768
4791
|
}), s;
|
|
4769
4792
|
}
|
|
4770
4793
|
export {
|
|
4771
|
-
|
|
4794
|
+
Uu as StreamLayer
|
|
4772
4795
|
};
|