@streamlayer/sdk-web 1.15.8 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +10 -10
- package/lib/es/index.js +817 -720
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { pino as _i } from "pino";
|
|
2
|
-
import { QuestionType as T, QuestionStatus as
|
|
3
|
-
import { Feed as te, PickHistoryStatus as
|
|
2
|
+
import { QuestionType as T, QuestionStatus as X, AdUnit as ie, PromotionType as R, NotificationEnabled as Mr, SilenceSetting as ki, NotificationUseContentTexts as $r, UseAsNotification as Pi, FactoidMediaMode as Ni } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
+
import { Feed as te, PickHistoryStatus as ht } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as $ } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
|
-
import { InvitationCategory as qr, InvitationFrom as
|
|
6
|
-
import { computed as
|
|
7
|
-
import { v4 as
|
|
8
|
-
import { ConnectError as
|
|
5
|
+
import { InvitationCategory as qr, InvitationFrom as xr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
+
import { computed as Li, map as Ci, atom as Rt, batched as jr, onMount as Er, onStart as Di } from "nanostores";
|
|
7
|
+
import { v4 as Qe } from "uuid";
|
|
8
|
+
import { ConnectError as at, Code as se, createContextKey as Qr, createClient as Gr, createContextValues as Ri } from "@connectrpc/connect";
|
|
9
9
|
import { createGrpcWebTransport as Hr } from "@connectrpc/connect-web";
|
|
10
10
|
import { nanoquery as Kr } from "@nanostores/query";
|
|
11
11
|
import { Events as Cn } from "@streamlayer/sl-eslib/sports/events/events_pb";
|
|
12
|
-
import { Client as
|
|
12
|
+
import { Client as ut } from "@streamlayer/sl-eslib/sdkSettings/client/client_pb";
|
|
13
13
|
import { Users as Ar } from "@streamlayer/sl-eslib/users/users_pb";
|
|
14
14
|
import { Leaderboard as Dn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
15
15
|
import { LinksClient as Fi } from "@streamlayer/sl-eslib/shortLinks/linksClient_pb";
|
|
16
|
-
import { Kind as
|
|
16
|
+
import { Kind as C, TopicSubType as j, TopicType as V, PollOpenedFrom as Q, Category as z, ScreenOrientation as zr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
17
17
|
import { AnalyticsService as Rn } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_pb";
|
|
18
18
|
import { InteractionActionType as Wr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
19
19
|
import { NotificationKind as ge, NotificationType as Yr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
20
20
|
function Vi(t) {
|
|
21
21
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
22
22
|
}
|
|
23
|
-
var Fn = { exports: {} },
|
|
23
|
+
var Fn = { exports: {} }, H = Fn.exports = {}, le, fe;
|
|
24
24
|
function ur() {
|
|
25
25
|
throw new Error("setTimeout has not been defined");
|
|
26
26
|
}
|
|
@@ -54,7 +54,7 @@ function Vn(t) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ui(t) {
|
|
58
58
|
if (fe === clearTimeout)
|
|
59
59
|
return clearTimeout(t);
|
|
60
60
|
if ((fe === cr || !fe) && clearTimeout)
|
|
@@ -69,69 +69,69 @@ function Bi(t) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var Ee = [],
|
|
73
|
-
function
|
|
74
|
-
!
|
|
72
|
+
var Ee = [], ze = !1, Ne, bt = -1;
|
|
73
|
+
function Bi() {
|
|
74
|
+
!ze || !Ne || (ze = !1, Ne.length ? Ee = Ne.concat(Ee) : bt = -1, Ee.length && Un());
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
if (!
|
|
78
|
-
var t = Vn(
|
|
79
|
-
|
|
76
|
+
function Un() {
|
|
77
|
+
if (!ze) {
|
|
78
|
+
var t = Vn(Bi);
|
|
79
|
+
ze = !0;
|
|
80
80
|
for (var e = Ee.length; e; ) {
|
|
81
|
-
for (
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
for (Ne = Ee, Ee = []; ++bt < e; )
|
|
82
|
+
Ne && Ne[bt].run();
|
|
83
|
+
bt = -1, e = Ee.length;
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
Ne = null, ze = !1, Ui(t);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
H.nextTick = function(t) {
|
|
89
89
|
var e = new Array(arguments.length - 1);
|
|
90
90
|
if (arguments.length > 1)
|
|
91
91
|
for (var r = 1; r < arguments.length; r++)
|
|
92
92
|
e[r - 1] = arguments[r];
|
|
93
|
-
Ee.push(new
|
|
93
|
+
Ee.push(new Bn(t, e)), Ee.length === 1 && !ze && Vn(Un);
|
|
94
94
|
};
|
|
95
|
-
function
|
|
95
|
+
function Bn(t, e) {
|
|
96
96
|
this.fun = t, this.array = e;
|
|
97
97
|
}
|
|
98
|
-
|
|
98
|
+
Bn.prototype.run = function() {
|
|
99
99
|
this.fun.apply(null, this.array);
|
|
100
100
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
H.title = "browser";
|
|
102
|
+
H.browser = !0;
|
|
103
|
+
H.env = {};
|
|
104
|
+
H.argv = [];
|
|
105
|
+
H.version = "";
|
|
106
|
+
H.versions = {};
|
|
107
107
|
function Ie() {
|
|
108
108
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
H.on = Ie;
|
|
110
|
+
H.addListener = Ie;
|
|
111
|
+
H.once = Ie;
|
|
112
|
+
H.off = Ie;
|
|
113
|
+
H.removeListener = Ie;
|
|
114
|
+
H.removeAllListeners = Ie;
|
|
115
|
+
H.emit = Ie;
|
|
116
|
+
H.prependListener = Ie;
|
|
117
|
+
H.prependOnceListener = Ie;
|
|
118
|
+
H.listeners = function(t) {
|
|
119
119
|
return [];
|
|
120
120
|
};
|
|
121
|
-
|
|
121
|
+
H.binding = function(t) {
|
|
122
122
|
throw new Error("process.binding is not supported");
|
|
123
123
|
};
|
|
124
|
-
|
|
124
|
+
H.cwd = function() {
|
|
125
125
|
return "/";
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
H.chdir = function(t) {
|
|
128
128
|
throw new Error("process.chdir is not supported");
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
H.umask = function() {
|
|
131
131
|
return 0;
|
|
132
132
|
};
|
|
133
|
-
var
|
|
134
|
-
const O = /* @__PURE__ */ Vi(
|
|
133
|
+
var Mi = Fn.exports;
|
|
134
|
+
const O = /* @__PURE__ */ Vi(Mi), $i = _i({
|
|
135
135
|
level: "trace",
|
|
136
136
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
137
137
|
browser: {
|
|
@@ -139,15 +139,15 @@ const O = /* @__PURE__ */ Vi($i), Ui = _i({
|
|
|
139
139
|
console.log(t);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
}), he = (t, e) =>
|
|
142
|
+
}), he = (t, e) => $i.child({ name: t }, e);
|
|
143
143
|
class qi extends Event {
|
|
144
144
|
slEventBus;
|
|
145
145
|
constructor(e, r) {
|
|
146
146
|
super(e), this.slEventBus = r;
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
const
|
|
150
|
-
class
|
|
149
|
+
const xi = he("event-bus");
|
|
150
|
+
class ji {
|
|
151
151
|
name;
|
|
152
152
|
listeners;
|
|
153
153
|
constructor(e = "sl-event-bus") {
|
|
@@ -155,7 +155,7 @@ class xi {
|
|
|
155
155
|
}
|
|
156
156
|
emit = (e, r) => {
|
|
157
157
|
const n = new qi(this.name, { ...r, type: e });
|
|
158
|
-
|
|
158
|
+
xi.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
159
159
|
};
|
|
160
160
|
listen(e) {
|
|
161
161
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -196,9 +196,9 @@ class Ft {
|
|
|
196
196
|
}
|
|
197
197
|
const Gi = (t) => {
|
|
198
198
|
const e = Object.keys(t);
|
|
199
|
-
return
|
|
199
|
+
return Li(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
200
200
|
};
|
|
201
|
-
class
|
|
201
|
+
class Le extends Ft {
|
|
202
202
|
getValues = () => this.getStore().get();
|
|
203
203
|
getValue = (e) => this.getStore().get()[e];
|
|
204
204
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
@@ -216,10 +216,10 @@ const Hi = {
|
|
|
216
216
|
[$.PUBLIC_CHAT]: "publicChat",
|
|
217
217
|
[$.TWITTER]: "twitter"
|
|
218
218
|
};
|
|
219
|
-
var
|
|
219
|
+
var it;
|
|
220
220
|
(function(t) {
|
|
221
221
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
222
|
-
})(
|
|
222
|
+
})(it || (it = {}));
|
|
223
223
|
const Ki = /* @__PURE__ */ new Set([
|
|
224
224
|
"equals",
|
|
225
225
|
"clone",
|
|
@@ -231,7 +231,7 @@ const Ki = /* @__PURE__ */ new Set([
|
|
|
231
231
|
"toJsonString",
|
|
232
232
|
"getType"
|
|
233
233
|
]);
|
|
234
|
-
class
|
|
234
|
+
class Mn {
|
|
235
235
|
status;
|
|
236
236
|
source;
|
|
237
237
|
config;
|
|
@@ -239,7 +239,7 @@ class $n {
|
|
|
239
239
|
listeners = /* @__PURE__ */ new Set();
|
|
240
240
|
settingsKey;
|
|
241
241
|
constructor({ settings: e, ...r }, n) {
|
|
242
|
-
this.settingsKey = Hi[r.type], this.status = Rt(
|
|
242
|
+
this.settingsKey = Hi[r.type], this.status = Rt(it.Suspended), this.config = new Le(ee(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(ee(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(ee({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
243
243
|
}
|
|
244
244
|
get featureConfig() {
|
|
245
245
|
return this.config.getStore();
|
|
@@ -251,10 +251,10 @@ class $n {
|
|
|
251
251
|
this.listeners.add(e);
|
|
252
252
|
}
|
|
253
253
|
enable = () => {
|
|
254
|
-
this.status.set(
|
|
254
|
+
this.status.set(it.Ready);
|
|
255
255
|
};
|
|
256
256
|
disable = () => {
|
|
257
|
-
this.status.set(
|
|
257
|
+
this.status.set(it.Suspended);
|
|
258
258
|
};
|
|
259
259
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
260
260
|
let n;
|
|
@@ -296,7 +296,7 @@ class ne extends Ft {
|
|
|
296
296
|
return this.getStore().get();
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
const
|
|
299
|
+
const K = (t) => Rt(t);
|
|
300
300
|
class ae extends Ft {
|
|
301
301
|
atomStore;
|
|
302
302
|
constructor(e, r, n) {
|
|
@@ -328,7 +328,7 @@ class ae extends Ft {
|
|
|
328
328
|
key = () => this.getStore().key;
|
|
329
329
|
off = () => this.getStore().off();
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const q = new ji();
|
|
332
332
|
async function* zi(t, e) {
|
|
333
333
|
for await (const r of e) {
|
|
334
334
|
t.response.message = r, t.received_at = Date.now(), t.id = Date.now();
|
|
@@ -410,7 +410,7 @@ const Wi = () => (t) => async (e) => {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
413
|
-
function
|
|
413
|
+
function $n(t) {
|
|
414
414
|
return t instanceof DOMException && // everything except Firefox
|
|
415
415
|
(t.code === 22 || // Firefox
|
|
416
416
|
t.code === 1014 || // test name field too, because code might not be present
|
|
@@ -418,7 +418,7 @@ function Un(t) {
|
|
|
418
418
|
t.name === "QuotaExceededError" || // Firefox
|
|
419
419
|
t.name === "NS_ERROR_DOM_QUOTA_REACHED");
|
|
420
420
|
}
|
|
421
|
-
class
|
|
421
|
+
class et {
|
|
422
422
|
delimiter = ":";
|
|
423
423
|
prefix;
|
|
424
424
|
storage;
|
|
@@ -435,7 +435,7 @@ class Ze {
|
|
|
435
435
|
try {
|
|
436
436
|
this.storage.setItem(n, r);
|
|
437
437
|
} catch (i) {
|
|
438
|
-
|
|
438
|
+
$n(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
|
|
439
439
|
}
|
|
440
440
|
};
|
|
441
441
|
read = (...e) => {
|
|
@@ -469,13 +469,13 @@ class Yi {
|
|
|
469
469
|
ts: /* @__PURE__ */ new Date(),
|
|
470
470
|
log: []
|
|
471
471
|
};
|
|
472
|
-
this.state = new
|
|
472
|
+
this.state = new Le(ee(o), `subscription:${i.name}:state`), this.options = {
|
|
473
473
|
...i,
|
|
474
474
|
reconnectDelay: i.reconnectDelay ?? 1e3,
|
|
475
475
|
reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
|
|
476
476
|
reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
|
|
477
477
|
withStore: i.withStore ?? !1
|
|
478
|
-
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new ne(
|
|
478
|
+
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new ne(K(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
|
|
479
479
|
this.state.getValue("status") === oe.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
|
|
480
480
|
})), this.updateState(oe.Ready);
|
|
481
481
|
}
|
|
@@ -490,7 +490,7 @@ class Yi {
|
|
|
490
490
|
window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
|
|
491
491
|
` + n);
|
|
492
492
|
} catch (i) {
|
|
493
|
-
|
|
493
|
+
$n(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
};
|
|
@@ -512,7 +512,7 @@ class Yi {
|
|
|
512
512
|
for await (const o of i)
|
|
513
513
|
this.attempt = 0, this.onData(o);
|
|
514
514
|
} catch (n) {
|
|
515
|
-
n instanceof
|
|
515
|
+
n instanceof at && n.code != se.Canceled && this.onStreamError(n);
|
|
516
516
|
}
|
|
517
517
|
})(), this.updateState(oe.Connected);
|
|
518
518
|
};
|
|
@@ -552,7 +552,7 @@ class Yi {
|
|
|
552
552
|
*/
|
|
553
553
|
onStreamError = (e) => {
|
|
554
554
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
555
|
-
if (e instanceof
|
|
555
|
+
if (e instanceof at && e.code !== se.Canceled) {
|
|
556
556
|
this.updateState(oe.Failed), this.state.setValue("error", e), e.code === se.Unknown && e.cause === "missing trailer" && (this.attempt = 0), this.reconnect();
|
|
557
557
|
return;
|
|
558
558
|
}
|
|
@@ -578,8 +578,8 @@ const Ji = /* @__PURE__ */ new Set([
|
|
|
578
578
|
return await t(e);
|
|
579
579
|
} catch (s) {
|
|
580
580
|
Xr.trace({ attempt: o, error: s, url: e.url }, "retry attempt");
|
|
581
|
-
const a =
|
|
582
|
-
if (o >= r || !(a instanceof
|
|
581
|
+
const a = at.from(s);
|
|
582
|
+
if (o >= r || !(a instanceof at) || !Ji.has(a.code))
|
|
583
583
|
throw s;
|
|
584
584
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
585
585
|
await new Promise((c) => setTimeout(c, d));
|
|
@@ -591,7 +591,7 @@ const Ji = /* @__PURE__ */ new Set([
|
|
|
591
591
|
const t = localStorage.getItem("sl-device-id");
|
|
592
592
|
if (t)
|
|
593
593
|
return t;
|
|
594
|
-
const e =
|
|
594
|
+
const e = Qe();
|
|
595
595
|
return localStorage.setItem("sl-device-id", e), e;
|
|
596
596
|
}, eo = () => navigator.userAgentData?.platform || navigator.platform, to = (t) => t ? "webOS" : navigator.userAgentData && navigator.userAgentData.mobile || "ontouchstart" in window || navigator.maxTouchPoints > 0 ? "mobile-web" : "desktop-web";
|
|
597
597
|
class Zr {
|
|
@@ -615,7 +615,7 @@ class Zr {
|
|
|
615
615
|
subscriptions;
|
|
616
616
|
opts;
|
|
617
617
|
constructor(e, r) {
|
|
618
|
-
this.host = e, this.opts = r, this.$headers = new
|
|
618
|
+
this.host = e, this.opts = r, this.$headers = new Le(ee({
|
|
619
619
|
"sl-device-id": Zi(),
|
|
620
620
|
"sl-device-os": eo(),
|
|
621
621
|
"sl-platform": to(r?.webOS)
|
|
@@ -744,7 +744,7 @@ const ro = (t, e) => {
|
|
|
744
744
|
}
|
|
745
745
|
});
|
|
746
746
|
}, no = (t, e) => {
|
|
747
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
747
|
+
const { client: r, queryKey: n } = e.createPromiseClient(ut, { method: "getStream", params: [t] });
|
|
748
748
|
return e.nanoquery.createFetcherStore(n, {
|
|
749
749
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
750
750
|
id: s
|
|
@@ -772,12 +772,12 @@ const ro = (t, e) => {
|
|
|
772
772
|
const { client: e, createRequestOptions: r } = t.createPromiseClient(Ar, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
773
773
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
774
774
|
}, ao = (t, e) => {
|
|
775
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
775
|
+
const { client: r, queryKey: n } = e.createPromiseClient(ut, { method: "get", params: [t] });
|
|
776
776
|
return e.nanoquery.createFetcherStore(n, {
|
|
777
777
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
778
778
|
});
|
|
779
779
|
}, uo = (t, e) => {
|
|
780
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
780
|
+
const { client: r, queryKey: n } = e.createPromiseClient(ut, { method: "getOrganization", params: [t] });
|
|
781
781
|
return e.nanoquery.createFetcherStore(n, {
|
|
782
782
|
fetcher: async () => {
|
|
783
783
|
const i = await r.getOrganization({});
|
|
@@ -788,7 +788,7 @@ const ro = (t, e) => {
|
|
|
788
788
|
}
|
|
789
789
|
});
|
|
790
790
|
}, co = (t, e) => {
|
|
791
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
791
|
+
const { client: r, queryKey: n } = e.createPromiseClient(ut, {
|
|
792
792
|
method: "getOrganizationAdvertising",
|
|
793
793
|
params: [t]
|
|
794
794
|
});
|
|
@@ -811,7 +811,7 @@ var be;
|
|
|
811
811
|
(function(t) {
|
|
812
812
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
813
813
|
})(be || (be = {}));
|
|
814
|
-
class
|
|
814
|
+
class Ge extends et {
|
|
815
815
|
constructor() {
|
|
816
816
|
super("user");
|
|
817
817
|
}
|
|
@@ -839,7 +839,7 @@ var Se;
|
|
|
839
839
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
840
840
|
})(Se || (Se = {}));
|
|
841
841
|
const fo = (t) => {
|
|
842
|
-
const e = new
|
|
842
|
+
const e = new Ge(), r = new ne(K(e.getExternalToken()), "userKey"), n = new ne(K(e.getToken()), "userToken"), i = new ae(oo(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
843
843
|
if (!a)
|
|
844
844
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
845
845
|
}), o = new ae(ao(n.getStore(), t), "userSettings");
|
|
@@ -850,7 +850,7 @@ const fo = (t) => {
|
|
|
850
850
|
userSettings: o
|
|
851
851
|
};
|
|
852
852
|
}, po = (t) => {
|
|
853
|
-
const e = new ne(
|
|
853
|
+
const e = new ne(K(void 0), "providerStreamId"), r = new ae(ro(e.getStore(), t), "slStreamId", (o) => o?.data), n = new ae(no(r.getAtomStore(), t), "streamSettings"), i = new ae(io(r.getAtomStore(), t), "streamSettings");
|
|
854
854
|
return r.getAtomStore().listen((o) => {
|
|
855
855
|
(o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
|
|
856
856
|
}), {
|
|
@@ -860,7 +860,7 @@ const fo = (t) => {
|
|
|
860
860
|
streamSummary: i
|
|
861
861
|
};
|
|
862
862
|
}, ho = (t) => {
|
|
863
|
-
const e = new ne(
|
|
863
|
+
const e = new ne(K(void 0), "enabled"), r = new ne(K(Se.DISABLED), "status"), n = new ae(uo(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new ae(co(n.getAtomStore(), t), "organizationAdvertising"), o = fo(t), s = po(t);
|
|
864
864
|
return {
|
|
865
865
|
enabled: e,
|
|
866
866
|
status: r,
|
|
@@ -969,12 +969,12 @@ const mo = (t, e, r) => {
|
|
|
969
969
|
}, Ao = (t, e) => {
|
|
970
970
|
const { client: r } = e.createStreamClient(te);
|
|
971
971
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
972
|
-
},
|
|
972
|
+
}, xn = async (t, e) => {
|
|
973
973
|
const { client: r } = e.createPromiseClient(te, { method: "questionByUser", params: [t] });
|
|
974
974
|
return (await r.questionByUser({
|
|
975
975
|
questionId: t
|
|
976
976
|
})).data?.attributes?.question;
|
|
977
|
-
},
|
|
977
|
+
}, vt = (t, e) => {
|
|
978
978
|
const { client: r, queryKey: n, queryKeyStr: i } = e.createPromiseClient(te, {
|
|
979
979
|
method: "questionByUser",
|
|
980
980
|
params: [t]
|
|
@@ -992,7 +992,7 @@ const mo = (t, e, r) => {
|
|
|
992
992
|
});
|
|
993
993
|
return e.storeCache.set(o, s), s;
|
|
994
994
|
}
|
|
995
|
-
},
|
|
995
|
+
}, jn = async (t, e) => {
|
|
996
996
|
if (!t)
|
|
997
997
|
return;
|
|
998
998
|
const { client: r } = e.createPromiseClient(te, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
|
|
@@ -1015,7 +1015,7 @@ const mo = (t, e, r) => {
|
|
|
1015
1015
|
eventId: l,
|
|
1016
1016
|
filter: {
|
|
1017
1017
|
types: p === Te.ALLOWED ? [] : [T.FACTOID, T.PROMOTION, T.TWEET],
|
|
1018
|
-
statuses: [
|
|
1018
|
+
statuses: [X.ACTIVE, X.RESOLVED]
|
|
1019
1019
|
}
|
|
1020
1020
|
}), v = {
|
|
1021
1021
|
eventId: l,
|
|
@@ -1023,7 +1023,7 @@ const mo = (t, e, r) => {
|
|
|
1023
1023
|
organizationId: n.get()
|
|
1024
1024
|
};
|
|
1025
1025
|
for (const E of w.data)
|
|
1026
|
-
i.isQuestionReceived(v, E.id) || (
|
|
1026
|
+
i.isQuestionReceived(v, E.id) || (q.emit("poll", {
|
|
1027
1027
|
action: "received",
|
|
1028
1028
|
payload: {
|
|
1029
1029
|
isAd: E.attributes?.adUnit == ie.UNSET,
|
|
@@ -1049,7 +1049,7 @@ const mo = (t, e, r) => {
|
|
|
1049
1049
|
eventId: s,
|
|
1050
1050
|
filter: {
|
|
1051
1051
|
types: [T.PROMOTION],
|
|
1052
|
-
statuses: [
|
|
1052
|
+
statuses: [X.ACTIVE]
|
|
1053
1053
|
},
|
|
1054
1054
|
pagination: {
|
|
1055
1055
|
page: 0,
|
|
@@ -1057,7 +1057,7 @@ const mo = (t, e, r) => {
|
|
|
1057
1057
|
}
|
|
1058
1058
|
})).data?.[0];
|
|
1059
1059
|
if (u.type === "promotion")
|
|
1060
|
-
return
|
|
1060
|
+
return jn(u.id, e);
|
|
1061
1061
|
},
|
|
1062
1062
|
dedupeTime: 1 / 0,
|
|
1063
1063
|
refetchInterval: 1 / 0
|
|
@@ -1077,7 +1077,7 @@ const mo = (t, e, r) => {
|
|
|
1077
1077
|
const p = await o.betPack({
|
|
1078
1078
|
eventId: d,
|
|
1079
1079
|
types: [T.PREDICTION],
|
|
1080
|
-
statuses: [
|
|
1080
|
+
statuses: [X.ACTIVE, X.RESOLVED],
|
|
1081
1081
|
limit: 5,
|
|
1082
1082
|
sort: {
|
|
1083
1083
|
field: "activated_at",
|
|
@@ -1098,14 +1098,14 @@ const mo = (t, e, r) => {
|
|
|
1098
1098
|
userId: c,
|
|
1099
1099
|
organizationId: l
|
|
1100
1100
|
};
|
|
1101
|
-
return n.isQuestionReceived(E, v.id) || (
|
|
1101
|
+
return n.isQuestionReceived(E, v.id) || (q.emit("poll", {
|
|
1102
1102
|
action: "received",
|
|
1103
1103
|
payload: {
|
|
1104
1104
|
isAd: v?.adUnit == ie.UNSET,
|
|
1105
1105
|
questionId: v.id,
|
|
1106
1106
|
questionType: v.type
|
|
1107
1107
|
}
|
|
1108
|
-
}), n.saveQuestionReceived(E, v.id)), v.answers = v.answers.sort((
|
|
1108
|
+
}), n.saveQuestionReceived(E, v.id)), v.answers = v.answers.sort((L, b) => L.id > b.id ? 1 : -1), { ...g, [v.id]: v };
|
|
1109
1109
|
}, {})
|
|
1110
1110
|
};
|
|
1111
1111
|
},
|
|
@@ -1113,13 +1113,13 @@ const mo = (t, e, r) => {
|
|
|
1113
1113
|
refetchInterval: 1 / 0
|
|
1114
1114
|
});
|
|
1115
1115
|
}, _o = (t, e, r) => {
|
|
1116
|
-
const n =
|
|
1116
|
+
const n = jr([e, r], () => {
|
|
1117
1117
|
const a = e.get();
|
|
1118
1118
|
if (!a)
|
|
1119
1119
|
return;
|
|
1120
1120
|
const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
|
|
1121
1121
|
return u ? (u.openedFrom = d, u) : a.question;
|
|
1122
|
-
}), i =
|
|
1122
|
+
}), i = jr(n, (a) => a && a.type === "question" ? a.id : void 0), o = vt(i, t);
|
|
1123
1123
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
1124
1124
|
const u = o.get().data, d = (c, l) => {
|
|
1125
1125
|
if (!c || !l)
|
|
@@ -1144,22 +1144,22 @@ const mo = (t, e, r) => {
|
|
|
1144
1144
|
});
|
|
1145
1145
|
} };
|
|
1146
1146
|
};
|
|
1147
|
-
var
|
|
1147
|
+
var He;
|
|
1148
1148
|
(function(t) {
|
|
1149
1149
|
t.SHOWED = "showed", t.EVENT = "ev";
|
|
1150
|
-
})(
|
|
1151
|
-
class ko extends
|
|
1150
|
+
})(He || (He = {}));
|
|
1151
|
+
class ko extends et {
|
|
1152
1152
|
constructor() {
|
|
1153
1153
|
super("advertisement");
|
|
1154
1154
|
}
|
|
1155
1155
|
setShowed = (e) => {
|
|
1156
|
-
this.write(
|
|
1156
|
+
this.write(He.SHOWED, e, "true");
|
|
1157
1157
|
};
|
|
1158
|
-
isViewed = (e) => this.read(
|
|
1158
|
+
isViewed = (e) => this.read(He.SHOWED, e);
|
|
1159
1159
|
fireEvent = (e, r) => {
|
|
1160
|
-
this.write(
|
|
1160
|
+
this.write(He.EVENT, r, e, "true");
|
|
1161
1161
|
};
|
|
1162
|
-
isEventFired = (e, r) => this.read(
|
|
1162
|
+
isEventFired = (e, r) => this.read(He.EVENT, r, e) === "true";
|
|
1163
1163
|
}
|
|
1164
1164
|
const Po = (t) => {
|
|
1165
1165
|
const e = t.data?.attributes?.question;
|
|
@@ -1172,22 +1172,22 @@ const Po = (t) => {
|
|
|
1172
1172
|
notification: i,
|
|
1173
1173
|
promotion: s
|
|
1174
1174
|
};
|
|
1175
|
-
},
|
|
1175
|
+
}, yt = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, No = ({ gamOptions: t, gamBaseUrl: e }) => {
|
|
1176
1176
|
const r = `${e}?`, n = [];
|
|
1177
1177
|
for (const i in t) {
|
|
1178
1178
|
const o = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), s = t[i];
|
|
1179
1179
|
if (s)
|
|
1180
1180
|
if (typeof s == "string")
|
|
1181
|
-
n.push(`${o}=${
|
|
1181
|
+
n.push(`${o}=${yt(s)}`);
|
|
1182
1182
|
else if (Array.isArray(s))
|
|
1183
|
-
n.push(`${o}=${s.map(
|
|
1183
|
+
n.push(`${o}=${s.map(yt).join(",")}`);
|
|
1184
1184
|
else {
|
|
1185
|
-
const a = Object.entries(s).map(([u, d]) => Array.isArray(d) ? `${u}=${d.map(
|
|
1185
|
+
const a = Object.entries(s).map(([u, d]) => Array.isArray(d) ? `${u}=${d.map(yt).join(",")}` : typeof d == "string" ? `${u}=${yt(d)}` : `${u}=${d}`).join("&").replaceAll("=", "%3D").replaceAll("&", "%26").replaceAll(",", "%2C");
|
|
1186
1186
|
n.push(`${o}=${a}`);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
1189
|
return r + n.join("&");
|
|
1190
|
-
},
|
|
1190
|
+
}, Me = (t) => (t?.promotion?.type === R.INGAME_IAB11_LBAR || t?.promotion?.type === R.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, Lo = (t, e, r) => {
|
|
1191
1191
|
let n = !1;
|
|
1192
1192
|
const i = r.transport, o = he("advertisement"), s = new ko(), a = (b, S) => {
|
|
1193
1193
|
s.fireEvent(b, S);
|
|
@@ -1195,30 +1195,30 @@ const Po = (t) => {
|
|
|
1195
1195
|
const S = d.get(), _ = S.data?.question.id, A = S.data?.promotion?.type;
|
|
1196
1196
|
if (!_)
|
|
1197
1197
|
return;
|
|
1198
|
-
d.get()?.isOpened || (d.setKey("isOpened", !0),
|
|
1198
|
+
d.get()?.isOpened || (d.setKey("isOpened", !0), q.emit("advertisement", {
|
|
1199
1199
|
action: "opened",
|
|
1200
1200
|
payload: {
|
|
1201
1201
|
id: _,
|
|
1202
1202
|
type: A,
|
|
1203
|
-
hasBanner:
|
|
1203
|
+
hasBanner: Me(S.data),
|
|
1204
1204
|
openedFrom: b?.fromNotification ? "notification" : "auto"
|
|
1205
1205
|
}
|
|
1206
|
-
})), b?.fromNotification && (d.setKey("hasNotification", !1),
|
|
1206
|
+
})), b?.fromNotification && (d.setKey("hasNotification", !1), q.emit("advertisement", {
|
|
1207
1207
|
action: "notification-opened",
|
|
1208
1208
|
payload: {
|
|
1209
1209
|
id: _,
|
|
1210
1210
|
type: A,
|
|
1211
|
-
hasBanner:
|
|
1211
|
+
hasBanner: Me(S.data)
|
|
1212
1212
|
}
|
|
1213
1213
|
}));
|
|
1214
1214
|
}, p = () => {
|
|
1215
1215
|
const b = d.get(), S = b.data?.question.id, _ = b.data?.promotion?.type, A = d.get()?.isOpened;
|
|
1216
|
-
S && !A && (o.debug({ id: S }, "markAsViewed: %o"), s.setShowed(S), d.setKey("isOpened", !0),
|
|
1216
|
+
S && !A && (o.debug({ id: S }, "markAsViewed: %o"), s.setShowed(S), d.setKey("isOpened", !0), q.emit("advertisement", {
|
|
1217
1217
|
action: "viewed",
|
|
1218
1218
|
payload: {
|
|
1219
1219
|
id: S,
|
|
1220
1220
|
type: _,
|
|
1221
|
-
hasBanner:
|
|
1221
|
+
hasBanner: Me(b.data)
|
|
1222
1222
|
}
|
|
1223
1223
|
}));
|
|
1224
1224
|
}, g = (b, S) => {
|
|
@@ -1226,18 +1226,18 @@ const Po = (t) => {
|
|
|
1226
1226
|
loading: !1,
|
|
1227
1227
|
error: void 0,
|
|
1228
1228
|
data: S,
|
|
1229
|
-
hasNotification: S?.notification?.enabled ===
|
|
1229
|
+
hasNotification: S?.notification?.enabled === Mr.NOTIFICATION_ENABLED,
|
|
1230
1230
|
close: () => w(S.question.id),
|
|
1231
1231
|
togglePause: (_) => v(S.question.id, _),
|
|
1232
1232
|
toggleMute: (_) => E(S.question.id, _),
|
|
1233
1233
|
isViewed: !!s.isViewed(S.question.id),
|
|
1234
1234
|
fireEvent: (_) => a(b, _),
|
|
1235
1235
|
isEventFired: (_) => u(b, _)
|
|
1236
|
-
}) : (d.setKey("loading", !0),
|
|
1236
|
+
}) : (d.setKey("loading", !0), jn(b, i).then((_) => d.set({
|
|
1237
1237
|
loading: !1,
|
|
1238
1238
|
error: void 0,
|
|
1239
1239
|
data: _,
|
|
1240
|
-
hasNotification: _?.notification?.enabled ===
|
|
1240
|
+
hasNotification: _?.notification?.enabled === Mr.NOTIFICATION_ENABLED,
|
|
1241
1241
|
close: () => w(_?.question.id),
|
|
1242
1242
|
togglePause: (A) => v(_?.question.id, A),
|
|
1243
1243
|
toggleMute: (A) => E(_?.question.id, A),
|
|
@@ -1255,36 +1255,36 @@ const Po = (t) => {
|
|
|
1255
1255
|
};
|
|
1256
1256
|
d.subscribe((b, S) => {
|
|
1257
1257
|
if (!(b.data?.id === S?.data?.id && b.isPaused !== S?.isPaused)) {
|
|
1258
|
-
if (b.data?.promotion?.type ===
|
|
1259
|
-
const _ =
|
|
1258
|
+
if (b.data?.promotion?.type === R.EXTERNAL_AD && !b?.externalAd && b.data.promotion.adCampaigns?.desktopWebSettings) {
|
|
1259
|
+
const _ = No(b.data.promotion.adCampaigns.desktopWebSettings);
|
|
1260
1260
|
d.setKey("externalAd", { type: "gam", url: _ });
|
|
1261
1261
|
}
|
|
1262
|
-
b.data?.promotion && !b.isOpened && (
|
|
1262
|
+
b.data?.promotion && !b.isOpened && (q.emit("advertisement", {
|
|
1263
1263
|
action: "received",
|
|
1264
1264
|
payload: {
|
|
1265
1265
|
id: b.data.question.id,
|
|
1266
1266
|
type: b.data.promotion.type,
|
|
1267
1267
|
hasNotification: !!b.hasNotification,
|
|
1268
|
-
hasBanner:
|
|
1268
|
+
hasBanner: Me(b.data),
|
|
1269
1269
|
isViewed: !!s.isViewed(b.data.question.id)
|
|
1270
1270
|
},
|
|
1271
1271
|
skipAnalytics: b.data.question.id === S?.data?.question.id
|
|
1272
|
-
}), b.data.question.id !== S?.data?.question.id && !s.isViewed(b.data.question.id) &&
|
|
1272
|
+
}), b.data.question.id !== S?.data?.question.id && !s.isViewed(b.data.question.id) && q.emit("advertisement", {
|
|
1273
1273
|
action: "notification-received",
|
|
1274
1274
|
payload: {
|
|
1275
1275
|
id: b.data.question.id,
|
|
1276
1276
|
type: b.data.promotion.type,
|
|
1277
1277
|
hasNotification: !0,
|
|
1278
|
-
hasBanner:
|
|
1278
|
+
hasBanner: Me(b.data),
|
|
1279
1279
|
isViewed: !1
|
|
1280
1280
|
}
|
|
1281
|
-
})), !b?.data && S?.data &&
|
|
1281
|
+
})), !b?.data && S?.data && q.emit("advertisement", {
|
|
1282
1282
|
action: "closed",
|
|
1283
1283
|
payload: {
|
|
1284
1284
|
id: S.data.question.id,
|
|
1285
1285
|
type: S.data.promotion?.type,
|
|
1286
1286
|
hasNotification: !!S.hasNotification,
|
|
1287
|
-
hasBanner:
|
|
1287
|
+
hasBanner: Me(S.data),
|
|
1288
1288
|
isViewed: !!s.isViewed(S.data.question.id)
|
|
1289
1289
|
}
|
|
1290
1290
|
});
|
|
@@ -1303,11 +1303,11 @@ const Po = (t) => {
|
|
|
1303
1303
|
}), e.addListener("promotion", (b) => {
|
|
1304
1304
|
const S = Po(b);
|
|
1305
1305
|
if (S) {
|
|
1306
|
-
if (S.question.status ===
|
|
1306
|
+
if (S.question.status === X.RESOLVED) {
|
|
1307
1307
|
w(S.question.id), o.debug({ promotion: S }, "resolved: %o");
|
|
1308
1308
|
return;
|
|
1309
1309
|
}
|
|
1310
|
-
if (S.question.status ===
|
|
1310
|
+
if (S.question.status === X.ACTIVE) {
|
|
1311
1311
|
o.debug({ promotion: S }, "active: %o"), g(S.question.id, S);
|
|
1312
1312
|
return;
|
|
1313
1313
|
}
|
|
@@ -1320,7 +1320,7 @@ var de;
|
|
|
1320
1320
|
(function(t) {
|
|
1321
1321
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io", t.QUESTION_RECEIVED = "q-received", t.QUESTION_OPENED = "q-opened";
|
|
1322
1322
|
})(de || (de = {}));
|
|
1323
|
-
class Co extends
|
|
1323
|
+
class Co extends et {
|
|
1324
1324
|
constructor() {
|
|
1325
1325
|
super("gamification-session", window.sessionStorage);
|
|
1326
1326
|
}
|
|
@@ -1329,7 +1329,7 @@ class Co extends Ze {
|
|
|
1329
1329
|
};
|
|
1330
1330
|
readValue = (e) => this.read(...e);
|
|
1331
1331
|
}
|
|
1332
|
-
class Do extends
|
|
1332
|
+
class Do extends et {
|
|
1333
1333
|
sessionStorage;
|
|
1334
1334
|
constructor() {
|
|
1335
1335
|
super("gamification"), this.sessionStorage = new Co();
|
|
@@ -1390,12 +1390,12 @@ class Ro {
|
|
|
1390
1390
|
transport;
|
|
1391
1391
|
cancels = /* @__PURE__ */ new Set();
|
|
1392
1392
|
constructor(e) {
|
|
1393
|
-
this.transport = e.transport, this.log = he("gamification-background"), this.storage = new Do(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ne(
|
|
1393
|
+
this.transport = e.transport, this.log = he("gamification-background"), this.storage = new Do(), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ne(K(void 0), "moderationId").getStore(), this.interactiveAllowed = new ne(K(Te.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new ne(K(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new ae(vo(this.slStreamId, e.transport), "gamification:moderation");
|
|
1394
1394
|
const r = !!e.sdk.options.get().betPack;
|
|
1395
1395
|
this.feedList = new ae(Io(this.slStreamId, this.interactiveAllowed, this.userId, this.organizationId, this.storage, r, e.transport), "gamification:feedList"), this.betPack = new ae(To(this.slStreamId, this.userId, this.organizationId, this.storage, e.transport), "gamification:betPack"), this.activeQuestionId = So(this.slStreamId, r, e.transport), this.openedQuestion = _o(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((n) => {
|
|
1396
1396
|
this.log.debug({ item: n }, "received question"), n?.questionId ? (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0), this.questionSubscription = Ao(n.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (i) => {
|
|
1397
1397
|
const o = i.data?.attributes?.question;
|
|
1398
|
-
if (this.openedQuestion.updateExtendedQuestion(o), this.betPack && o?.type === T.PREDICTION && (o.status ===
|
|
1398
|
+
if (this.openedQuestion.updateExtendedQuestion(o), this.betPack && o?.type === T.PREDICTION && (o.status === X.ACTIVE || o.status === X.RESOLVED)) {
|
|
1399
1399
|
const s = this.betPack.getValues().data?.data || {}, a = s?.[o.id];
|
|
1400
1400
|
if (a) {
|
|
1401
1401
|
const u = [], d = a.answers.sort((l, p) => l.id > p.id ? 1 : -1), c = o.answers.sort((l, p) => l.id > p.id ? 1 : -1);
|
|
@@ -1426,7 +1426,7 @@ class Ro {
|
|
|
1426
1426
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1427
1427
|
})), this.feedSubscription = Eo(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("bet-pack-update", async (n) => {
|
|
1428
1428
|
const i = n.data?.attributes?.question;
|
|
1429
|
-
if (this.betPack && i?.type === T.PREDICTION && (i.status ===
|
|
1429
|
+
if (this.betPack && i?.type === T.PREDICTION && (i.status === X.ACTIVE || i.status === X.RESOLVED)) {
|
|
1430
1430
|
const o = this.betPack.getValues().data?.data || {}, s = o?.[i.id];
|
|
1431
1431
|
if (s)
|
|
1432
1432
|
this.betPack.getStore().mutate({
|
|
@@ -1443,7 +1443,7 @@ class Ro {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
});
|
|
1445
1445
|
else if (!s && Object.keys(o).length < 5) {
|
|
1446
|
-
const a = await
|
|
1446
|
+
const a = await xn(i.id, this.transport);
|
|
1447
1447
|
this.betPack.getStore().mutate({
|
|
1448
1448
|
timestamp: Date.now(),
|
|
1449
1449
|
data: {
|
|
@@ -1456,7 +1456,7 @@ class Ro {
|
|
|
1456
1456
|
})), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (n) => {
|
|
1457
1457
|
const i = this.activeQuestionId.get().data?.question?.id, o = n.data?.attributes?.question;
|
|
1458
1458
|
if (!(!o || o.type === T.PROMOTION)) {
|
|
1459
|
-
if (o.status ===
|
|
1459
|
+
if (o.status === X.RESOLVED) {
|
|
1460
1460
|
i === o.id && this.activeQuestionId.mutate(void 0);
|
|
1461
1461
|
return;
|
|
1462
1462
|
}
|
|
@@ -1496,7 +1496,7 @@ class Ro {
|
|
|
1496
1496
|
this.activeQuestionId.off();
|
|
1497
1497
|
for (const n of this.cancels)
|
|
1498
1498
|
n(), this.cancels.delete(n);
|
|
1499
|
-
}), r || (this.advertisement =
|
|
1499
|
+
}), r || (this.advertisement = Lo(this.slStreamId, this.feedSubscription, e));
|
|
1500
1500
|
}
|
|
1501
1501
|
/**
|
|
1502
1502
|
* Get id for notifications and link with current session
|
|
@@ -1535,7 +1535,7 @@ class Fo {
|
|
|
1535
1535
|
options;
|
|
1536
1536
|
logger;
|
|
1537
1537
|
constructor(e) {
|
|
1538
|
-
this.options = e, this.logger = he("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList =
|
|
1538
|
+
this.options = e, this.logger = he("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = K(/* @__PURE__ */ new Map());
|
|
1539
1539
|
}
|
|
1540
1540
|
addToQueue = (e) => {
|
|
1541
1541
|
if (this.store.has(e.id)) {
|
|
@@ -1579,7 +1579,7 @@ class Fo {
|
|
|
1579
1579
|
this.logger.debug({ notificationId: e }, "active queue tick skipped, notification not exist");
|
|
1580
1580
|
return;
|
|
1581
1581
|
}
|
|
1582
|
-
|
|
1582
|
+
q.emit("notification", {
|
|
1583
1583
|
action: "received",
|
|
1584
1584
|
payload: {
|
|
1585
1585
|
type: r.type,
|
|
@@ -1606,7 +1606,7 @@ class Fo {
|
|
|
1606
1606
|
const a = new Map(this.notificationsList.get());
|
|
1607
1607
|
a.delete(e), this.notificationsList.set(a);
|
|
1608
1608
|
const u = this.timeouts.get(e);
|
|
1609
|
-
u !== void 0 && (clearTimeout(u), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding &&
|
|
1609
|
+
u !== void 0 && (clearTimeout(u), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding && q.emit("notification", {
|
|
1610
1610
|
action: "closed",
|
|
1611
1611
|
payload: {
|
|
1612
1612
|
type: i.type,
|
|
@@ -1631,7 +1631,7 @@ var Tt;
|
|
|
1631
1631
|
(function(t) {
|
|
1632
1632
|
t.OPENED = "opened";
|
|
1633
1633
|
})(Tt || (Tt = {}));
|
|
1634
|
-
class Vo extends
|
|
1634
|
+
class Vo extends et {
|
|
1635
1635
|
constructor() {
|
|
1636
1636
|
super("notification");
|
|
1637
1637
|
}
|
|
@@ -1643,7 +1643,7 @@ class Vo extends Ze {
|
|
|
1643
1643
|
this.clear();
|
|
1644
1644
|
};
|
|
1645
1645
|
}
|
|
1646
|
-
class
|
|
1646
|
+
class Uo {
|
|
1647
1647
|
queue;
|
|
1648
1648
|
storage;
|
|
1649
1649
|
constructor(e = {}) {
|
|
@@ -1655,7 +1655,7 @@ class Bo {
|
|
|
1655
1655
|
if (e.data && e.emitEvent) {
|
|
1656
1656
|
const n = e.action;
|
|
1657
1657
|
e.action = (...i) => {
|
|
1658
|
-
n && n(...i),
|
|
1658
|
+
n && n(...i), q.emit("notification", {
|
|
1659
1659
|
action: "opened",
|
|
1660
1660
|
payload: {
|
|
1661
1661
|
questionId: e.data.questionId,
|
|
@@ -1688,30 +1688,30 @@ class Bo {
|
|
|
1688
1688
|
this.storage.setOpened(e);
|
|
1689
1689
|
};
|
|
1690
1690
|
}
|
|
1691
|
-
const
|
|
1692
|
-
t.notifications = new
|
|
1691
|
+
const Bo = (t, e, r) => {
|
|
1692
|
+
t.notifications = new Uo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1693
1693
|
t.notifications.queue.drain();
|
|
1694
1694
|
}), r();
|
|
1695
1695
|
};
|
|
1696
|
-
var
|
|
1696
|
+
var Je;
|
|
1697
1697
|
(function(t) {
|
|
1698
1698
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1699
|
-
})(
|
|
1699
|
+
})(Je || (Je = {}));
|
|
1700
1700
|
const en = async (t, e) => {
|
|
1701
1701
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(te, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1702
1702
|
try {
|
|
1703
1703
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1704
1704
|
} catch (o) {
|
|
1705
|
-
throw
|
|
1705
|
+
throw at.from(o)?.code === se.AlreadyExists ? new Error(Je.ALREADY_VOTED) : new Error(Je.UNKNOWN);
|
|
1706
1706
|
}
|
|
1707
1707
|
}, Qn = (t, e) => {
|
|
1708
1708
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(te, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1709
1709
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1710
|
-
},
|
|
1710
|
+
}, Mo = {
|
|
1711
1711
|
pageSize: 10
|
|
1712
|
-
},
|
|
1712
|
+
}, $o = (t, e, r, n, i) => {
|
|
1713
1713
|
let o = 0;
|
|
1714
|
-
const s =
|
|
1714
|
+
const s = K({ pageSize: Mo.pageSize, page: 0 }), a = ee({
|
|
1715
1715
|
data: [],
|
|
1716
1716
|
key: Date.now(),
|
|
1717
1717
|
hasMore: !0,
|
|
@@ -1728,8 +1728,8 @@ const en = async (t, e) => {
|
|
|
1728
1728
|
leaderboardId: ""
|
|
1729
1729
|
});
|
|
1730
1730
|
a.set({
|
|
1731
|
-
data: E.data.map((
|
|
1732
|
-
...
|
|
1731
|
+
data: E.data.map((L, b) => ({
|
|
1732
|
+
...L.attributes,
|
|
1733
1733
|
friendsRank: b + 1
|
|
1734
1734
|
})),
|
|
1735
1735
|
hasMore: !1,
|
|
@@ -1750,7 +1750,7 @@ const en = async (t, e) => {
|
|
|
1750
1750
|
};
|
|
1751
1751
|
}), { $store: a, fetchMore: l, invalidate: c };
|
|
1752
1752
|
};
|
|
1753
|
-
class qo extends
|
|
1753
|
+
class qo extends et {
|
|
1754
1754
|
get = this.read;
|
|
1755
1755
|
set = this.write;
|
|
1756
1756
|
del = this.remove;
|
|
@@ -1758,12 +1758,12 @@ class qo extends Ze {
|
|
|
1758
1758
|
super("deep-link-context", window.sessionStorage);
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
|
-
const tn = "sldl", Vt = "sldl_uid", Gn = "sldl_eid", Hn = "sldl_e_eid",
|
|
1761
|
+
const tn = "sldl", Vt = "sldl_uid", Gn = "sldl_eid", Hn = "sldl_e_eid", xo = /* @__PURE__ */ new Set([Vt, Gn, Hn]), rn = (t) => {
|
|
1762
1762
|
const e = {}, r = {};
|
|
1763
1763
|
for (const [n, i] of t)
|
|
1764
|
-
|
|
1764
|
+
xo.has(n) ? e[n] = i : r[n] = i;
|
|
1765
1765
|
return { result: e, remain: r };
|
|
1766
|
-
},
|
|
1766
|
+
}, jo = ({ hash: t, search: e }) => {
|
|
1767
1767
|
if (t && t.includes(tn)) {
|
|
1768
1768
|
const r = new URLSearchParams(t.substr(1));
|
|
1769
1769
|
return { hash: rn(r) };
|
|
@@ -1783,7 +1783,7 @@ const tn = "sldl", Vt = "sldl_uid", Gn = "sldl_eid", Hn = "sldl_e_eid", jo = /*
|
|
|
1783
1783
|
}, Qo = (t, e) => {
|
|
1784
1784
|
const { hash: r, search: n } = window.location;
|
|
1785
1785
|
if (pe.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1786
|
-
const i =
|
|
1786
|
+
const i = jo({ hash: r, search: n });
|
|
1787
1787
|
if (pe.debug(i, "parse deep link result"), i) {
|
|
1788
1788
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1789
1789
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1812,7 +1812,7 @@ const tn = "sldl", Vt = "sldl_uid", Gn = "sldl_eid", Hn = "sldl_e_eid", jo = /*
|
|
|
1812
1812
|
pe.debug(a);
|
|
1813
1813
|
}
|
|
1814
1814
|
t.deepLink = {
|
|
1815
|
-
$store: new
|
|
1815
|
+
$store: new Le(ee(o), "deep-link-context"),
|
|
1816
1816
|
getDeepLinkData: () => {
|
|
1817
1817
|
const { data: a, used: u } = t.deepLink.$store.getValues();
|
|
1818
1818
|
return { data: a, used: u };
|
|
@@ -1877,14 +1877,14 @@ class Ko extends Qi {
|
|
|
1877
1877
|
* Logout user. Clears the all user data from the store.
|
|
1878
1878
|
*/
|
|
1879
1879
|
logout = () => {
|
|
1880
|
-
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), new
|
|
1880
|
+
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), new Ge().clear();
|
|
1881
1881
|
};
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Soft logout, only clears the StreamLayer user data from the store.
|
|
1884
1884
|
* Does not clear the external token. And automatically tries to re-login by external token.
|
|
1885
1885
|
*/
|
|
1886
1886
|
softLogout = () => {
|
|
1887
|
-
const e = new
|
|
1887
|
+
const e = new Ge();
|
|
1888
1888
|
this.transport.setAuth("", ""), e.setToken(""), this.reLogin();
|
|
1889
1889
|
};
|
|
1890
1890
|
/**
|
|
@@ -1895,7 +1895,7 @@ class Ko extends Qi {
|
|
|
1895
1895
|
* - If no one of the above is true, then logout.
|
|
1896
1896
|
*/
|
|
1897
1897
|
reLogin = ({ skipLogin: e } = { skipLogin: !1 }) => {
|
|
1898
|
-
const r = new
|
|
1898
|
+
const r = new Ge(), n = r.getToken(), i = r.getExternalToken();
|
|
1899
1899
|
if (this.$coreStore.getValues().userKey.setValue(i), n)
|
|
1900
1900
|
return this.saveUser(n, ""), this.me().then((o) => {
|
|
1901
1901
|
if (o?.id) {
|
|
@@ -1915,7 +1915,7 @@ class Ko extends Qi {
|
|
|
1915
1915
|
* Write token to the Transport and UserStore
|
|
1916
1916
|
*/
|
|
1917
1917
|
saveUser = (e, r) => {
|
|
1918
|
-
this.transport.setAuth(e, r), this.$coreStore.getValues().userToken.setValue(e), new
|
|
1918
|
+
this.transport.setAuth(e, r), this.$coreStore.getValues().userToken.setValue(e), new Ge().setToken(e);
|
|
1919
1919
|
};
|
|
1920
1920
|
/**
|
|
1921
1921
|
* Add interceptor to the Transport to handle 401 and 403 errors.
|
|
@@ -1931,20 +1931,20 @@ class Ko extends Qi {
|
|
|
1931
1931
|
});
|
|
1932
1932
|
};
|
|
1933
1933
|
}
|
|
1934
|
-
const
|
|
1934
|
+
const nt = new Ge(), zo = (t, e, r) => {
|
|
1935
1935
|
t.auth = new Ko(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1936
1936
|
n === Se.READY && t.auth.reLogin();
|
|
1937
1937
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1938
|
-
if (!(
|
|
1938
|
+
if (!(nt.getSchema() === n && nt.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
1939
1939
|
try {
|
|
1940
|
-
await t.auth.login(n, i),
|
|
1940
|
+
await t.auth.login(n, i), nt.setSchema(n), nt.setExternalToken(i);
|
|
1941
1941
|
} catch {
|
|
1942
1942
|
t.sdk.logout();
|
|
1943
1943
|
}
|
|
1944
1944
|
}, t.sdk.logout = () => {
|
|
1945
|
-
t.auth.logout(),
|
|
1945
|
+
t.auth.logout(), nt.clear();
|
|
1946
1946
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1947
|
-
}, on = he("video_player"),
|
|
1947
|
+
}, on = he("video_player"), mt = {
|
|
1948
1948
|
debug: (...t) => {
|
|
1949
1949
|
on.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1950
1950
|
},
|
|
@@ -1955,13 +1955,13 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
1955
1955
|
t.videoPlayer = {
|
|
1956
1956
|
controllers: /* @__PURE__ */ new Set()
|
|
1957
1957
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
1958
|
-
|
|
1958
|
+
mt.trace("adding video player controller"), t.videoPlayer.controllers.add(n);
|
|
1959
1959
|
}, e.videoPlayerController && t.sdk.addVideoPlayerController(e.videoPlayerController), t.sdk.removeVideoPlayerController = (n) => {
|
|
1960
|
-
|
|
1960
|
+
mt.trace("removing video player controller"), t.videoPlayer.controllers.delete(n);
|
|
1961
1961
|
}, t.sdk.controlVideoPlayer = (n) => {
|
|
1962
|
-
|
|
1962
|
+
mt.trace("controlling video player");
|
|
1963
1963
|
for (const i of t.videoPlayer.controllers) {
|
|
1964
|
-
|
|
1964
|
+
mt.trace("calling video player controller");
|
|
1965
1965
|
try {
|
|
1966
1966
|
i(n);
|
|
1967
1967
|
} catch (o) {
|
|
@@ -1975,7 +1975,7 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
1975
1975
|
[T.TRIVIA]: "trivia",
|
|
1976
1976
|
[T.PREDICTION]: "prediction",
|
|
1977
1977
|
[T.TWEET]: "tweet"
|
|
1978
|
-
},
|
|
1978
|
+
}, $e = (t) => t === R.INGAME_IAB11 || t === R.INGAME_IAB21 || t === R.NFL_SHOP_OVERLAY || t === R.SHOP_OVERLAY, Jo = (t, e, r) => {
|
|
1979
1979
|
t.sdk.uiState = ee({}), t.ui = {
|
|
1980
1980
|
enableAppNotification: function() {
|
|
1981
1981
|
t.sdk.uiState.setKey("appNotification", !0);
|
|
@@ -2096,11 +2096,11 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2096
2096
|
switch (u.action) {
|
|
2097
2097
|
case "notification-opened":
|
|
2098
2098
|
t.sdk.uiState.set({
|
|
2099
|
-
promotionExternalAd: g ===
|
|
2099
|
+
promotionExternalAd: g === R.EXTERNAL_AD,
|
|
2100
2100
|
promotionBanner: c,
|
|
2101
2101
|
promotionNotification: !1,
|
|
2102
|
-
promotionOverlay:
|
|
2103
|
-
promotionSidebar:
|
|
2102
|
+
promotionOverlay: $e(g),
|
|
2103
|
+
promotionSidebar: !$e(g)
|
|
2104
2104
|
});
|
|
2105
2105
|
break;
|
|
2106
2106
|
case "received":
|
|
@@ -2114,9 +2114,9 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2114
2114
|
t.sdk.uiState.set({
|
|
2115
2115
|
promotionBanner: c,
|
|
2116
2116
|
onboardingNotification: t.sdk.uiState.get().onboardingNotification,
|
|
2117
|
-
promotionOverlay:
|
|
2118
|
-
promotionSidebar:
|
|
2119
|
-
promotionExternalAd: g ===
|
|
2117
|
+
promotionOverlay: $e(g),
|
|
2118
|
+
promotionSidebar: !$e(g),
|
|
2119
|
+
promotionExternalAd: g === R.EXTERNAL_AD
|
|
2120
2120
|
});
|
|
2121
2121
|
break;
|
|
2122
2122
|
}
|
|
@@ -2126,9 +2126,9 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2126
2126
|
}) : t.sdk.uiState.set({
|
|
2127
2127
|
onboardingNotification: t.sdk.uiState.get().onboardingNotification,
|
|
2128
2128
|
promotionBanner: c,
|
|
2129
|
-
promotionOverlay:
|
|
2130
|
-
promotionSidebar:
|
|
2131
|
-
promotionExternalAd: g ===
|
|
2129
|
+
promotionOverlay: $e(g),
|
|
2130
|
+
promotionSidebar: !$e(g),
|
|
2131
|
+
promotionExternalAd: g === R.EXTERNAL_AD
|
|
2132
2132
|
});
|
|
2133
2133
|
break;
|
|
2134
2134
|
case "closed":
|
|
@@ -2149,7 +2149,7 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2149
2149
|
break;
|
|
2150
2150
|
}
|
|
2151
2151
|
}
|
|
2152
|
-
}, o =
|
|
2152
|
+
}, o = q.listen(i), s = t.activeFeature.subscribe((a) => {
|
|
2153
2153
|
a || t.ui.disableApp();
|
|
2154
2154
|
});
|
|
2155
2155
|
return () => {
|
|
@@ -2184,7 +2184,7 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2184
2184
|
a ? t.stores.slStreamId.getStore().set({ loading: !1, data: s }) : t.stores.providerStreamId.setValue(s);
|
|
2185
2185
|
}, r();
|
|
2186
2186
|
}, Zo = (t, e) => {
|
|
2187
|
-
const { client: r, queryKey: n } = t.createPromiseClient(
|
|
2187
|
+
const { client: r, queryKey: n } = t.createPromiseClient(ut, {
|
|
2188
2188
|
method: "generateDeepLink",
|
|
2189
2189
|
params: e
|
|
2190
2190
|
});
|
|
@@ -2226,9 +2226,9 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2226
2226
|
w && v || v ? w = `?${sn(w, g)}` : v = `#${sn("", g)}`;
|
|
2227
2227
|
const E = window.location.origin + window.location.pathname + w + v;
|
|
2228
2228
|
try {
|
|
2229
|
-
const
|
|
2229
|
+
const L = await es(t, { web: E, mobile: d });
|
|
2230
2230
|
i.set({
|
|
2231
|
-
data:
|
|
2231
|
+
data: L.data?.link,
|
|
2232
2232
|
loading: !1
|
|
2233
2233
|
});
|
|
2234
2234
|
} catch {
|
|
@@ -2242,10 +2242,10 @@ const rt = new Qe(), zo = (t, e, r) => {
|
|
|
2242
2242
|
i.setKey("loading", !0);
|
|
2243
2243
|
})), { $store: i, fetch };
|
|
2244
2244
|
};
|
|
2245
|
-
var
|
|
2245
|
+
var G;
|
|
2246
2246
|
(function(t) {
|
|
2247
2247
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
2248
|
-
})(
|
|
2248
|
+
})(G || (G = {}));
|
|
2249
2249
|
const rs = (t, e, r, n) => {
|
|
2250
2250
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
2251
2251
|
i && r.add({
|
|
@@ -2279,7 +2279,7 @@ const rs = (t, e, r, n) => {
|
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
2281
|
});
|
|
2282
|
-
},
|
|
2282
|
+
}, gt = (t, e, r, n, i, o, s, a) => {
|
|
2283
2283
|
try {
|
|
2284
2284
|
const u = e.userId.get(), d = e.organizationId.get(), c = e.slStreamId.get();
|
|
2285
2285
|
if (!u || !d || !c)
|
|
@@ -2289,50 +2289,50 @@ const rs = (t, e, r, n) => {
|
|
|
2289
2289
|
organizationId: d,
|
|
2290
2290
|
eventId: c
|
|
2291
2291
|
});
|
|
2292
|
-
if (l ===
|
|
2293
|
-
t.set(
|
|
2292
|
+
if (l === G.Completed || a?.skipOnboarding) {
|
|
2293
|
+
t.set(G.Completed);
|
|
2294
2294
|
for (const E of o)
|
|
2295
2295
|
E();
|
|
2296
|
-
a?.skipOnboarding && l !==
|
|
2296
|
+
a?.skipOnboarding && l !== G.Completed && (i.saveOnboardingStatus({
|
|
2297
2297
|
organizationId: d,
|
|
2298
2298
|
userId: u,
|
|
2299
2299
|
eventId: c
|
|
2300
|
-
},
|
|
2300
|
+
}, G.Completed), Qn(s, c));
|
|
2301
2301
|
return;
|
|
2302
2302
|
}
|
|
2303
2303
|
const p = e.moderation.getStore().value?.data, g = r.featureSettings.get().inplayGame;
|
|
2304
2304
|
if (p === void 0 || g === void 0)
|
|
2305
2305
|
return;
|
|
2306
2306
|
const w = p?.options?.onboardingEnabled, v = g?.titleCard?.optIn;
|
|
2307
|
-
w ? v ? t.set(
|
|
2307
|
+
w ? v ? t.set(G.Required) : t.set(G.Optional) : (v ? t.set(G.Unavailable) : t.set(G.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
2308
2308
|
} catch (u) {
|
|
2309
2309
|
console.error(u);
|
|
2310
2310
|
}
|
|
2311
2311
|
}, an = (t, e, r, n, i) => {
|
|
2312
2312
|
let o = !!i?.skipOnboarding;
|
|
2313
|
-
const s = e.storage, a =
|
|
2313
|
+
const s = e.storage, a = K(G.Unset);
|
|
2314
2314
|
a.subscribe((c) => {
|
|
2315
|
-
c !==
|
|
2315
|
+
c !== G.Unset && (c === G.Optional || c === G.Required ? o === !1 && (rs(t, e, n, s), o = !0) : t.onboardingProcessed.set(!0), c === G.Completed && e.activeQuestionId.invalidate(), s.setOnboardingInstantOpen({
|
|
2316
2316
|
userId: e.userId.get() || "",
|
|
2317
2317
|
organizationId: e.organizationId.get() || "",
|
|
2318
2318
|
eventId: e.slStreamId.get() || ""
|
|
2319
2319
|
}));
|
|
2320
2320
|
});
|
|
2321
2321
|
const u = [];
|
|
2322
|
-
return a.get() !==
|
|
2323
|
-
c &&
|
|
2322
|
+
return a.get() !== G.Completed && (u.push(e.userId.listen((c) => {
|
|
2323
|
+
c && gt(a, e, t, n, s, u, r, i);
|
|
2324
2324
|
})), u.push(e.moderation.listen((c) => {
|
|
2325
|
-
c.data &&
|
|
2325
|
+
c.data && gt(a, e, t, n, s, u, r, i);
|
|
2326
2326
|
})), u.push(t.featureSettings.listen((c) => {
|
|
2327
|
-
c &&
|
|
2328
|
-
}))),
|
|
2327
|
+
c && gt(a, e, t, n, s, u, r, i);
|
|
2328
|
+
}))), gt(a, e, t, n, s, u, r, i), { $store: a, submitInplay: async () => {
|
|
2329
2329
|
const c = e.slStreamId.get();
|
|
2330
2330
|
if (c) {
|
|
2331
|
-
await Qn(r, c), a.set(
|
|
2331
|
+
await Qn(r, c), a.set(G.Completed), s.saveOnboardingStatus({
|
|
2332
2332
|
organizationId: e.organizationId.get() || "",
|
|
2333
2333
|
userId: e.userId.get() || "",
|
|
2334
2334
|
eventId: c
|
|
2335
|
-
},
|
|
2335
|
+
}, G.Completed), q.emit("poll", {
|
|
2336
2336
|
action: "onboardingPassed",
|
|
2337
2337
|
payload: {}
|
|
2338
2338
|
}), t.openFeature();
|
|
@@ -2371,7 +2371,7 @@ const rs = (t, e, r, n) => {
|
|
|
2371
2371
|
};
|
|
2372
2372
|
return (await o(d)).data?.attributes?.summary;
|
|
2373
2373
|
}, un = /* @__PURE__ */ new Set([T.POLL, T.PREDICTION, T.TRIVIA]);
|
|
2374
|
-
class os extends
|
|
2374
|
+
class os extends Mn {
|
|
2375
2375
|
/** user statistics (leaderboard panel) */
|
|
2376
2376
|
userSummary;
|
|
2377
2377
|
/** feed list (pick history) */
|
|
@@ -2412,9 +2412,9 @@ class os extends $n {
|
|
|
2412
2412
|
cancels = /* @__PURE__ */ new Set();
|
|
2413
2413
|
onQuestionActivate;
|
|
2414
2414
|
constructor(e, r, n) {
|
|
2415
|
-
if (super(e, r), this.background = new Ro(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed =
|
|
2416
|
-
this.friends = new ae(bo(this.background.userId, n.transport), "gamification:friends"), this.openedUser =
|
|
2417
|
-
const i = this.leaderboardList =
|
|
2415
|
+
if (super(e, r), this.background = new Ro(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = this.background.storage, this.feedList = this.background.feedList, this.betPack = this.background.betPack, this.currentUserId = this.background.userId, this.onboardingProcessed = K(!n.sdk.withAuth), this.leaderboardId = new ne(K(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature($.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = ts(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = ns(this.background.slStreamId, this.background.userId, this.friends, this.transport), !n.sdk.options.get().hideFriends) {
|
|
2416
|
+
this.friends = new ae(bo(this.background.userId, n.transport), "gamification:friends"), this.openedUser = K(void 0);
|
|
2417
|
+
const i = this.leaderboardList = $o(this.transport, this.background.slStreamId, this.background.userId, this.friends);
|
|
2418
2418
|
this.cancels.add(this.userSummary.$store.listen((o, s) => {
|
|
2419
2419
|
s?.summary && o?.summary && i.invalidate();
|
|
2420
2420
|
}));
|
|
@@ -2424,8 +2424,8 @@ class os extends $n {
|
|
|
2424
2424
|
}), n.sdk.options.get().skipOnboarding || (this.onboardingStatus = an(this, this.background, n.transport, n.notifications, {
|
|
2425
2425
|
skipOnboarding: n.sdk.options.get().skipOnboarding
|
|
2426
2426
|
})), 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)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
|
|
2427
|
-
(o === void 0 || i !==
|
|
2428
|
-
})), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled =
|
|
2427
|
+
(o === void 0 || i !== G.Unset) && this.background.activeQuestionId.invalidate();
|
|
2428
|
+
})), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = K(!1), this.cancels.add(n.sdk.options.subscribe((i) => {
|
|
2429
2429
|
i.friendsTab === "disabled" ? this.friendsTabEnabled.set(!1) : i.friendsTab === "enabled" && this.friendsTabEnabled.set(!0);
|
|
2430
2430
|
})), this.cancels.add(this.settings.subscribe((i) => {
|
|
2431
2431
|
n.sdk.options.get().friendsTab === "activatedGame" && this.friendsTabEnabled.set(!!i.inplayGame?.titleCard?.optIn);
|
|
@@ -2441,7 +2441,7 @@ class os extends $n {
|
|
|
2441
2441
|
if (this.skipOnboarding)
|
|
2442
2442
|
this.background.interactiveAllowed.set(Te.ALLOWED);
|
|
2443
2443
|
else {
|
|
2444
|
-
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e ===
|
|
2444
|
+
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === G.Completed, o = !r || i || n !== !0;
|
|
2445
2445
|
this.background.interactiveAllowed.set(o ? Te.ALLOWED : Te.DISALLOWED);
|
|
2446
2446
|
}
|
|
2447
2447
|
};
|
|
@@ -2455,27 +2455,27 @@ class os extends $n {
|
|
|
2455
2455
|
if (!r || !n?.attributes)
|
|
2456
2456
|
return;
|
|
2457
2457
|
const { status: i, type: o, id: s, answers: a } = r;
|
|
2458
|
-
if (i ===
|
|
2458
|
+
if (i === X.RESOLVED && o === T.PREDICTION) {
|
|
2459
2459
|
const u = this.background.getCurrentSessionId({
|
|
2460
2460
|
prefix: `notification-id:${s}`
|
|
2461
2461
|
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((S) => S.id === s), l = d[c];
|
|
2462
2462
|
let p = l?.attributes?.attributes?.value?.answerId;
|
|
2463
|
-
const g =
|
|
2463
|
+
const g = vt(s, this.transport), w = g.subscribe(() => {
|
|
2464
2464
|
});
|
|
2465
2465
|
await g.get().promise;
|
|
2466
2466
|
let v = g.get().data;
|
|
2467
|
-
v || (v = await
|
|
2467
|
+
v || (v = await xn(s, this.transport), g.mutate(v)), w(), window.requestAnimationFrame(() => {
|
|
2468
2468
|
g.invalidate();
|
|
2469
2469
|
}), p || (p = v?.answers.find(({ youVoted: S }) => S)?.id);
|
|
2470
|
-
const E = a.find(({ correct: S }) => S),
|
|
2470
|
+
const E = a.find(({ correct: S }) => S), L = p ? a.find(({ id: S }) => S === p) : void 0, b = !!L?.correct;
|
|
2471
2471
|
if (l && d[c]?.attributes?.attributes.case === "question") {
|
|
2472
2472
|
try {
|
|
2473
|
-
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = b ?
|
|
2473
|
+
d[c].attributes.attributes.value.answerId = p, d[c].attributes.attributes.value.openForVoting = !1, p && (d[c].attributes.attributes.value.status = b ? ht.WON : ht.LOST);
|
|
2474
2474
|
} catch {
|
|
2475
2475
|
}
|
|
2476
2476
|
this.feedList.getStore().mutate(d);
|
|
2477
2477
|
}
|
|
2478
|
-
if (!
|
|
2478
|
+
if (!L || !E)
|
|
2479
2479
|
return;
|
|
2480
2480
|
this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
|
|
2481
2481
|
type: Ae.QUESTION_RESOLVED,
|
|
@@ -2490,8 +2490,8 @@ class os extends $n {
|
|
|
2490
2490
|
question: {
|
|
2491
2491
|
title: b ? `Congratulations! You answered correctly! You won ${E.points} pts!` : `Better luck next time! Correct: ${E?.text}!`,
|
|
2492
2492
|
votedAnswer: {
|
|
2493
|
-
title:
|
|
2494
|
-
points:
|
|
2493
|
+
title: L?.text,
|
|
2494
|
+
points: L?.points
|
|
2495
2495
|
},
|
|
2496
2496
|
correctAnswerTitle: E?.text,
|
|
2497
2497
|
correct: !!b,
|
|
@@ -2513,7 +2513,7 @@ class os extends $n {
|
|
|
2513
2513
|
}));
|
|
2514
2514
|
}), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
|
|
2515
2515
|
const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
|
|
2516
|
-
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !==
|
|
2516
|
+
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== X.ACTIVE && n.attributes.status !== X.RESOLVED) && !(!this.isInteractiveAllowed && un.has(n.attributes.type) && n?.attributes?.adUnit !== ie.STANDART)) {
|
|
2517
2517
|
if (i !== -1)
|
|
2518
2518
|
if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
|
|
2519
2519
|
const o = r[i];
|
|
@@ -2564,7 +2564,7 @@ class os extends $n {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
});
|
|
2566
2566
|
}
|
|
2567
|
-
i === -1 && (r.unshift(n),
|
|
2567
|
+
i === -1 && (r.unshift(n), q.emit("poll", {
|
|
2568
2568
|
action: "received",
|
|
2569
2569
|
payload: {
|
|
2570
2570
|
isAd: n.attributes?.adUnit == ie.UNSET,
|
|
@@ -2585,15 +2585,15 @@ class os extends $n {
|
|
|
2585
2585
|
try {
|
|
2586
2586
|
await en(this.transport, { questionId: e, answerId: r });
|
|
2587
2587
|
} catch (o) {
|
|
2588
|
-
if (o.message ===
|
|
2589
|
-
const s =
|
|
2588
|
+
if (o.message === Je.ALREADY_VOTED) {
|
|
2589
|
+
const s = vt(e, this.transport), a = s.subscribe(() => {
|
|
2590
2590
|
});
|
|
2591
2591
|
s.invalidate(), a();
|
|
2592
2592
|
}
|
|
2593
2593
|
throw o;
|
|
2594
2594
|
}
|
|
2595
2595
|
const n = { ...this.betPack.getValues().data?.data }, i = n?.[e];
|
|
2596
|
-
i && (
|
|
2596
|
+
i && (q.emit("poll", {
|
|
2597
2597
|
action: "voted",
|
|
2598
2598
|
payload: {
|
|
2599
2599
|
questionId: e,
|
|
@@ -2606,14 +2606,14 @@ class os extends $n {
|
|
|
2606
2606
|
} : o), this.betPack.getStore().mutate({ data: n, timestamp: Date.now() }));
|
|
2607
2607
|
};
|
|
2608
2608
|
submitAnswer = async (e, r) => {
|
|
2609
|
-
const n =
|
|
2609
|
+
const n = vt(e, this.transport), i = n.subscribe(() => {
|
|
2610
2610
|
}), o = { ...n.get().data || {} }, s = () => {
|
|
2611
2611
|
const a = this.feedList.getValues().data;
|
|
2612
2612
|
if (!a)
|
|
2613
2613
|
return;
|
|
2614
2614
|
const u = a.findIndex((l) => l.id === e), d = a[u], c = d?.attributes?.attributes.case === "question" && d.attributes.attributes.value;
|
|
2615
2615
|
if (c) {
|
|
2616
|
-
|
|
2616
|
+
q.emit("poll", {
|
|
2617
2617
|
action: "voted",
|
|
2618
2618
|
payload: {
|
|
2619
2619
|
isAd: d.attributes?.adUnit == ie.UNSET,
|
|
@@ -2623,10 +2623,10 @@ class os extends $n {
|
|
|
2623
2623
|
});
|
|
2624
2624
|
const l = n.get().data;
|
|
2625
2625
|
if (i(), l) {
|
|
2626
|
-
const p = l.answers.find((E) => E.correct === !0), g = l.answers.findIndex((E) => E.id === r), w = l.answers[g], v = l.answers.every(({ percentageDecimal: E },
|
|
2627
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = w?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ?
|
|
2626
|
+
const p = l.answers.find((E) => E.correct === !0), g = l.answers.findIndex((E) => E.id === r), w = l.answers[g], v = l.answers.every(({ percentageDecimal: E }, L) => E === o?.answers[L].percentageDecimal);
|
|
2627
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = w?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? ht.WON : ht.LOST), this.feedList.getStore().mutate([...a]), l.answers[g].correct = p?.id === r, l.answers[g].youVoted = !0, v && l.answers.forEach((E) => {
|
|
2628
2628
|
E.percentageDecimal = 0;
|
|
2629
|
-
}), p?.id === r && (l.answers[g].pointsEarned = l.status ===
|
|
2629
|
+
}), p?.id === r && (l.answers[g].pointsEarned = l.status === X.RESOLVED ? 0 : p.points), n.mutate({ ...l });
|
|
2630
2630
|
}
|
|
2631
2631
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
2632
2632
|
this.userSummary.invalidate();
|
|
@@ -2636,7 +2636,7 @@ class os extends $n {
|
|
|
2636
2636
|
try {
|
|
2637
2637
|
await en(this.transport, { questionId: e, answerId: r }), s();
|
|
2638
2638
|
} catch (a) {
|
|
2639
|
-
if (a.message ===
|
|
2639
|
+
if (a.message === Je.ALREADY_VOTED) {
|
|
2640
2640
|
this.userSummary.invalidate();
|
|
2641
2641
|
const u = n.subscribe(() => {
|
|
2642
2642
|
});
|
|
@@ -2666,7 +2666,7 @@ class os extends $n {
|
|
|
2666
2666
|
userId: this.background.userId.get() || "",
|
|
2667
2667
|
organizationId: this.background.organizationId.get() || ""
|
|
2668
2668
|
};
|
|
2669
|
-
return
|
|
2669
|
+
return q.emit("poll", {
|
|
2670
2670
|
action: "opened",
|
|
2671
2671
|
payload: {
|
|
2672
2672
|
questionId: e,
|
|
@@ -2675,7 +2675,7 @@ class os extends $n {
|
|
|
2675
2675
|
questionOpenedFrom: r?.openedFrom === "bet-pack" ? "list" : r?.openedFrom,
|
|
2676
2676
|
hasBanner: o
|
|
2677
2677
|
}
|
|
2678
|
-
}), this.storage.isQuestionOpened(s, e) || (
|
|
2678
|
+
}), this.storage.isQuestionOpened(s, e) || (q.emit("poll", {
|
|
2679
2679
|
action: "viewed",
|
|
2680
2680
|
payload: {
|
|
2681
2681
|
questionId: e,
|
|
@@ -2697,7 +2697,7 @@ class os extends $n {
|
|
|
2697
2697
|
prefix: "notification",
|
|
2698
2698
|
entity: e
|
|
2699
2699
|
}))
|
|
2700
|
-
}),
|
|
2700
|
+
}), q.emit("poll", {
|
|
2701
2701
|
action: "closed",
|
|
2702
2702
|
payload: {
|
|
2703
2703
|
questionId: e
|
|
@@ -2728,7 +2728,7 @@ class os extends $n {
|
|
|
2728
2728
|
this.openedUser?.set(void 0);
|
|
2729
2729
|
};
|
|
2730
2730
|
openOnboarding = () => {
|
|
2731
|
-
this.openFeature(),
|
|
2731
|
+
this.openFeature(), q.emit("poll", {
|
|
2732
2732
|
action: "onboardingOpen",
|
|
2733
2733
|
payload: {}
|
|
2734
2734
|
});
|
|
@@ -2741,7 +2741,7 @@ class os extends $n {
|
|
|
2741
2741
|
*/
|
|
2742
2742
|
showInApp = (e) => {
|
|
2743
2743
|
const r = this.onboardingStatus.$store.get(), n = e?.data?.question?.adUnit === ie.STANDART;
|
|
2744
|
-
if (e && e.data && (n || r && r !==
|
|
2744
|
+
if (e && e.data && (n || r && r !== G.Unset) && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== ki.ON && e.data.question.status === X.ACTIVE && !e.data.question.marketClosed) {
|
|
2745
2745
|
if (un.has(e.data.question.type))
|
|
2746
2746
|
(this.isInteractiveAllowed || n) && e.data.question.notification !== void 0 && this.notifications.add({
|
|
2747
2747
|
type: Ae.QUESTION,
|
|
@@ -2769,7 +2769,7 @@ class os extends $n {
|
|
|
2769
2769
|
}
|
|
2770
2770
|
});
|
|
2771
2771
|
else if (e.data.question.type === T.FACTOID) {
|
|
2772
|
-
const i = e.data.question.options?.options.value, o = e.data.question.notification?.useContentTexts ===
|
|
2772
|
+
const i = e.data.question.options?.options.value, o = e.data.question.notification?.useContentTexts === $r.ENABLED ? e.data.question.subject : e.data.question.notification?.title || "", s = e.data.question.notification?.useContentTexts === $r.ENABLED ? i.body : e.data.question.notification?.body, a = {
|
|
2773
2773
|
heading: o,
|
|
2774
2774
|
body: s,
|
|
2775
2775
|
imageMode: i?.imageMode,
|
|
@@ -2802,7 +2802,7 @@ class os extends $n {
|
|
|
2802
2802
|
sponsorship: e.data.question.sponsorship,
|
|
2803
2803
|
adUnit: e.data.question?.adUnit,
|
|
2804
2804
|
sponsorLogo: e.data.question.promotion?.sponsor?.logo,
|
|
2805
|
-
isVideo: i?.mode ===
|
|
2805
|
+
isVideo: i?.mode === Ni.VIDEO
|
|
2806
2806
|
}
|
|
2807
2807
|
}
|
|
2808
2808
|
});
|
|
@@ -2853,13 +2853,13 @@ class os extends $n {
|
|
|
2853
2853
|
const ss = {
|
|
2854
2854
|
[$.GAMES]: !0
|
|
2855
2855
|
};
|
|
2856
|
-
class as extends
|
|
2856
|
+
class as extends Mn {
|
|
2857
2857
|
constructor(e, r) {
|
|
2858
2858
|
super(e, r);
|
|
2859
2859
|
}
|
|
2860
2860
|
}
|
|
2861
2861
|
const us = (t, e, r) => t.type === $.GAMES ? new os(t, e, r) : new as(t, e), cs = (t, e, r) => {
|
|
2862
|
-
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new ne(
|
|
2862
|
+
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new ne(K(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new ne(K($.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) => {
|
|
2863
2863
|
t.sdk.initializeApp().then(() => {
|
|
2864
2864
|
t.activeFeature.setValue(n);
|
|
2865
2865
|
});
|
|
@@ -2937,27 +2937,27 @@ class ds {
|
|
|
2937
2937
|
break;
|
|
2938
2938
|
}
|
|
2939
2939
|
};
|
|
2940
|
-
return
|
|
2940
|
+
return q.listen(r);
|
|
2941
2941
|
});
|
|
2942
2942
|
}
|
|
2943
2943
|
accepted = () => {
|
|
2944
2944
|
this.analytics.write("invitation", {
|
|
2945
2945
|
common: {
|
|
2946
2946
|
...this.analytics.commonStore.getValues(),
|
|
2947
|
-
kind:
|
|
2947
|
+
kind: C.INVITATION_ACCEPTED
|
|
2948
2948
|
},
|
|
2949
2949
|
category: qr.GAMES,
|
|
2950
|
-
from:
|
|
2950
|
+
from: xr.UNSET
|
|
2951
2951
|
});
|
|
2952
2952
|
};
|
|
2953
2953
|
sent = ({ from: e }) => {
|
|
2954
2954
|
this.analytics.write("invitation", {
|
|
2955
2955
|
common: {
|
|
2956
2956
|
...this.analytics.commonStore.getValues(),
|
|
2957
|
-
kind:
|
|
2957
|
+
kind: C.INVITATION_SENT
|
|
2958
2958
|
},
|
|
2959
2959
|
category: qr.GAMES,
|
|
2960
|
-
from: e ||
|
|
2960
|
+
from: e || xr.UNSET
|
|
2961
2961
|
});
|
|
2962
2962
|
};
|
|
2963
2963
|
}
|
|
@@ -2976,14 +2976,14 @@ class ls {
|
|
|
2976
2976
|
break;
|
|
2977
2977
|
}
|
|
2978
2978
|
};
|
|
2979
|
-
return
|
|
2979
|
+
return q.listen(r);
|
|
2980
2980
|
});
|
|
2981
2981
|
}
|
|
2982
2982
|
tap = () => {
|
|
2983
2983
|
this.analytics.write("interactions", {
|
|
2984
2984
|
common: {
|
|
2985
2985
|
...this.analytics.commonStore.getValues(),
|
|
2986
|
-
kind:
|
|
2986
|
+
kind: C.INTERACTIONS
|
|
2987
2987
|
},
|
|
2988
2988
|
actionType: Wr.TAP
|
|
2989
2989
|
});
|
|
@@ -2992,117 +2992,202 @@ class ls {
|
|
|
2992
2992
|
this.analytics.write("interactions", {
|
|
2993
2993
|
common: {
|
|
2994
2994
|
...this.analytics.commonStore.getValues(),
|
|
2995
|
-
kind:
|
|
2995
|
+
kind: C.INTERACTIONS
|
|
2996
2996
|
},
|
|
2997
2997
|
actionType: Wr.SCROLL
|
|
2998
2998
|
});
|
|
2999
2999
|
};
|
|
3000
3000
|
}
|
|
3001
3001
|
const fs = {
|
|
3002
|
-
[
|
|
3003
|
-
[
|
|
3004
|
-
[
|
|
3005
|
-
[
|
|
3006
|
-
[
|
|
3007
|
-
[
|
|
3008
|
-
[
|
|
3009
|
-
[
|
|
3010
|
-
[
|
|
3011
|
-
[
|
|
3012
|
-
[
|
|
3013
|
-
[
|
|
3014
|
-
[
|
|
3015
|
-
[
|
|
3016
|
-
[
|
|
3017
|
-
[
|
|
3018
|
-
[
|
|
3019
|
-
[
|
|
3020
|
-
[
|
|
3021
|
-
[
|
|
3022
|
-
[
|
|
3023
|
-
[
|
|
3024
|
-
[
|
|
3002
|
+
[R.UNSET]: j.UNSET,
|
|
3003
|
+
[R.INGAME_IAB21]: j.PROMOTION_INGAME_IAB21,
|
|
3004
|
+
[R.INGAME_IAB21_SIDEBAR]: j.PROMOTION_INGAME_IAB21,
|
|
3005
|
+
[R.INGAME_IAB11_LBAR]: j.PROMOTION_INGAME_IAB11_LBAR,
|
|
3006
|
+
[R.INGAME_IAB11]: j.PROMOTION_INGAME_IAB11,
|
|
3007
|
+
[R.INGAME_IAB11_SIDEBAR]: j.PROMOTION_INGAME_IAB11,
|
|
3008
|
+
[R.INGAME_IAB21_LBAR]: j.PROMOTION_INGAME_IAB21_LBAR,
|
|
3009
|
+
[R.INGAME_IAB61]: j.PROMOTION_INGAME_IAB61,
|
|
3010
|
+
[R.INGAME_IAB61_SIDEBAR]: j.PROMOTION_INGAME_IAB61,
|
|
3011
|
+
[R.EXTERNAL_AD]: j.PROMOTION_GAM,
|
|
3012
|
+
[R.VIDEO_SIDE_BY_SIDE]: j.PROMOTION_VIDEO_SIDE_BY_SIDE,
|
|
3013
|
+
[R.PICTURE_IN_PICTURE]: j.PROMOTION_PICTURE_IN_PICTURE,
|
|
3014
|
+
[R.LOWER_THIRD]: j.PROMOTION_LOWER_THIRD,
|
|
3015
|
+
[R.SHOP_LBAR]: j.PROMOTION_SHOP_LBAR,
|
|
3016
|
+
[R.SHOP_OVERLAY]: j.PROMOTION_SHOP_OVERLAY,
|
|
3017
|
+
[R.SHOP_SIDEBAR]: j.PROMOTION_SHOP_SIDEBAR,
|
|
3018
|
+
[R.NFL_SHOP_LBAR]: j.PROMOTION_SHOP_LBAR,
|
|
3019
|
+
[R.NFL_SHOP_OVERLAY]: j.PROMOTION_SHOP_OVERLAY,
|
|
3020
|
+
[R.NFL_SHOP_SIDEBAR]: j.PROMOTION_SHOP_SIDEBAR,
|
|
3021
|
+
[R.STATS]: j.UNSET,
|
|
3022
|
+
[R.STANDARD]: j.UNSET,
|
|
3023
|
+
[R.SHOP]: j.UNSET,
|
|
3024
|
+
[R.NFL_SHOP]: j.UNSET
|
|
3025
3025
|
}, lr = (t) => t ? fs[t] : j.UNSET, ps = {
|
|
3026
|
-
25:
|
|
3027
|
-
50:
|
|
3028
|
-
75:
|
|
3026
|
+
25: C.AD_VIDEO_Q25,
|
|
3027
|
+
50: C.AD_VIDEO_Q50,
|
|
3028
|
+
75: C.AD_VIDEO_Q75
|
|
3029
3029
|
};
|
|
3030
3030
|
class hs {
|
|
3031
3031
|
analytics;
|
|
3032
3032
|
constructor(e) {
|
|
3033
3033
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
3034
3034
|
const r = (n) => {
|
|
3035
|
-
if (!n.slEventBus?.skipAnalytics
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3035
|
+
if (!n.slEventBus?.skipAnalytics) {
|
|
3036
|
+
if (n.slEventBus?.type === "exposedPauseAd") {
|
|
3037
|
+
const i = n.slEventBus.payload;
|
|
3038
|
+
switch (n.slEventBus.action) {
|
|
3039
|
+
case "enabled":
|
|
3040
|
+
this.exposedPauseAdEnabled(i);
|
|
3041
|
+
break;
|
|
3042
|
+
case "disabled":
|
|
3043
|
+
this.exposedPauseAdDisabled(i);
|
|
3044
|
+
break;
|
|
3045
|
+
case "closed":
|
|
3046
|
+
this.exposedPauseAdClosed(i);
|
|
3047
|
+
break;
|
|
3048
|
+
case "load":
|
|
3049
|
+
this.exposedPauseAdLoad(i, !1);
|
|
3050
|
+
break;
|
|
3051
|
+
case "loaded":
|
|
3052
|
+
this.exposedPauseAdLoad(i, !0);
|
|
3053
|
+
break;
|
|
3054
|
+
case "rendered":
|
|
3055
|
+
this.exposedPauseAdOpened(i);
|
|
3056
|
+
break;
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
if (n.slEventBus?.type === "advertisement") {
|
|
3060
|
+
const i = n.slEventBus.payload, o = lr(i.type);
|
|
3061
|
+
switch (n.slEventBus.action) {
|
|
3062
|
+
case "videoPlay":
|
|
3063
|
+
this.videoPlay(i, { topicSubType: o });
|
|
3064
|
+
break;
|
|
3065
|
+
case "videoEnd":
|
|
3066
|
+
this.videoEnd(i, { topicSubType: o });
|
|
3067
|
+
break;
|
|
3068
|
+
case "videoRendered":
|
|
3069
|
+
this.videoRendered(i, { topicSubType: o });
|
|
3070
|
+
break;
|
|
3071
|
+
case "buttonSelect":
|
|
3072
|
+
this.buttonSelect(i, { topicSubType: o });
|
|
3073
|
+
break;
|
|
3074
|
+
case "bannerSelect":
|
|
3075
|
+
this.bannerSelect(i, { topicSubType: o });
|
|
3076
|
+
break;
|
|
3077
|
+
case "bannerShown":
|
|
3078
|
+
this.bannerShown(i, { topicSubType: o });
|
|
3079
|
+
break;
|
|
3080
|
+
case "received":
|
|
3081
|
+
this.received(i, { topicSubType: o });
|
|
3082
|
+
break;
|
|
3083
|
+
case "opened":
|
|
3084
|
+
this.opened(i, { topicSubType: o });
|
|
3085
|
+
break;
|
|
3086
|
+
case "viewed":
|
|
3087
|
+
this.viewed(i, { topicSubType: o });
|
|
3088
|
+
break;
|
|
3089
|
+
case "videoMuted":
|
|
3090
|
+
case "videoUnmuted":
|
|
3091
|
+
this.videoMuted(i, {
|
|
3092
|
+
topicSubType: o,
|
|
3093
|
+
muted: n.slEventBus.action === "videoMuted"
|
|
3094
|
+
});
|
|
3095
|
+
break;
|
|
3096
|
+
case "videoReplayed":
|
|
3097
|
+
this.videoReplayed(i, { topicSubType: o });
|
|
3098
|
+
break;
|
|
3099
|
+
case "quartileCompleted":
|
|
3100
|
+
this.quartileCompleted(i, { topicSubType: o });
|
|
3101
|
+
break;
|
|
3102
|
+
}
|
|
3078
3103
|
}
|
|
3079
3104
|
}
|
|
3080
3105
|
};
|
|
3081
|
-
return
|
|
3106
|
+
return q.listen(r);
|
|
3082
3107
|
});
|
|
3083
3108
|
}
|
|
3109
|
+
exposedPauseAdEnabled = ({ id: e }) => {
|
|
3110
|
+
const r = this.analytics.commonStore.getValues();
|
|
3111
|
+
this.analytics.write("games", {
|
|
3112
|
+
common: {
|
|
3113
|
+
...r,
|
|
3114
|
+
kind: C.STREAM_PAUSED,
|
|
3115
|
+
topicId: e ?? r.topicId,
|
|
3116
|
+
topicType: V.EXPOSED_PAUSED_AD
|
|
3117
|
+
},
|
|
3118
|
+
pollOpenedFrom: Q.UNSET
|
|
3119
|
+
});
|
|
3120
|
+
};
|
|
3121
|
+
exposedPauseAdClosed = ({ id: e }) => {
|
|
3122
|
+
const r = this.analytics.commonStore.getValues();
|
|
3123
|
+
this.analytics.write("games", {
|
|
3124
|
+
common: {
|
|
3125
|
+
...r,
|
|
3126
|
+
kind: C.EXTERNAL_AD_CLOSED,
|
|
3127
|
+
topicId: e ?? r.topicId,
|
|
3128
|
+
topicType: V.EXPOSED_PAUSED_AD
|
|
3129
|
+
},
|
|
3130
|
+
pollOpenedFrom: Q.UNSET
|
|
3131
|
+
});
|
|
3132
|
+
};
|
|
3133
|
+
exposedPauseAdDisabled = ({ id: e }) => {
|
|
3134
|
+
const r = this.analytics.commonStore.getValues();
|
|
3135
|
+
this.analytics.write("games", {
|
|
3136
|
+
common: {
|
|
3137
|
+
...r,
|
|
3138
|
+
kind: C.STREAM_RESUMED,
|
|
3139
|
+
topicId: e ?? r.topicId,
|
|
3140
|
+
topicType: V.EXPOSED_PAUSED_AD
|
|
3141
|
+
},
|
|
3142
|
+
pollOpenedFrom: Q.UNSET
|
|
3143
|
+
});
|
|
3144
|
+
};
|
|
3145
|
+
exposedPauseAdOpened = ({ id: e }) => {
|
|
3146
|
+
const r = this.analytics.commonStore.getValues();
|
|
3147
|
+
this.analytics.write("games", {
|
|
3148
|
+
common: {
|
|
3149
|
+
...r,
|
|
3150
|
+
kind: C.EXTERNAL_AD_RENDERED,
|
|
3151
|
+
topicId: e ?? r.topicId,
|
|
3152
|
+
topicType: V.EXPOSED_PAUSED_AD
|
|
3153
|
+
},
|
|
3154
|
+
pollOpenedFrom: Q.UNSET
|
|
3155
|
+
});
|
|
3156
|
+
};
|
|
3157
|
+
exposedPauseAdLoad = ({ id: e }, r) => {
|
|
3158
|
+
const n = this.analytics.commonStore.getValues();
|
|
3159
|
+
this.analytics.write("games", {
|
|
3160
|
+
common: {
|
|
3161
|
+
...n,
|
|
3162
|
+
kind: r ? C.EXTERNAL_AD_LOADED : C.EXTERNAL_AD_REQUESTED,
|
|
3163
|
+
topicId: e ?? n.topicId,
|
|
3164
|
+
topicType: V.EXPOSED_PAUSED_AD
|
|
3165
|
+
},
|
|
3166
|
+
pollOpenedFrom: Q.UNSET
|
|
3167
|
+
});
|
|
3168
|
+
};
|
|
3084
3169
|
received = ({ id: e }, { topicSubType: r }) => {
|
|
3085
3170
|
this.analytics.write("games", {
|
|
3086
3171
|
common: {
|
|
3087
3172
|
...this.analytics.commonStore.getValues(),
|
|
3088
|
-
kind:
|
|
3173
|
+
kind: C.POLLS_RECEIVED,
|
|
3089
3174
|
topicId: e,
|
|
3090
|
-
topicType:
|
|
3175
|
+
topicType: V.POLLS_PROMOTION,
|
|
3091
3176
|
topicSubType: r
|
|
3092
3177
|
},
|
|
3093
|
-
pollOpenedFrom:
|
|
3178
|
+
pollOpenedFrom: Q.UNSET
|
|
3094
3179
|
});
|
|
3095
3180
|
};
|
|
3096
3181
|
opened = ({ id: e, openedFrom: r }, { topicSubType: n }) => {
|
|
3097
3182
|
this.analytics.write("games", {
|
|
3098
3183
|
common: {
|
|
3099
3184
|
...this.analytics.commonStore.getValues(),
|
|
3100
|
-
kind:
|
|
3185
|
+
kind: C.POLLS_OPENED,
|
|
3101
3186
|
topicId: e,
|
|
3102
|
-
topicType:
|
|
3187
|
+
topicType: V.POLLS_PROMOTION,
|
|
3103
3188
|
topicSubType: n
|
|
3104
3189
|
},
|
|
3105
|
-
pollOpenedFrom: r === "notification" ?
|
|
3190
|
+
pollOpenedFrom: r === "notification" ? Q.IN_APP : Q.UNSET
|
|
3106
3191
|
});
|
|
3107
3192
|
};
|
|
3108
3193
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -3113,11 +3198,11 @@ class hs {
|
|
|
3113
3198
|
common: {
|
|
3114
3199
|
...this.analytics.commonStore.getValues(),
|
|
3115
3200
|
topicId: e,
|
|
3116
|
-
kind: n ?
|
|
3117
|
-
topicType:
|
|
3201
|
+
kind: n ? C.AD_VIDEO_MUTED : C.AD_VIDEO_UNMUTED,
|
|
3202
|
+
topicType: V.POLLS_PROMOTION,
|
|
3118
3203
|
topicSubType: r
|
|
3119
3204
|
},
|
|
3120
|
-
pollOpenedFrom:
|
|
3205
|
+
pollOpenedFrom: Q.UNSET
|
|
3121
3206
|
});
|
|
3122
3207
|
};
|
|
3123
3208
|
quartileCompleted = ({ id: e, quartile: r }, { topicSubType: n }) => {
|
|
@@ -3126,10 +3211,10 @@ class hs {
|
|
|
3126
3211
|
...this.analytics.commonStore.getValues(),
|
|
3127
3212
|
topicId: e,
|
|
3128
3213
|
kind: ps[r],
|
|
3129
|
-
topicType:
|
|
3214
|
+
topicType: V.POLLS_PROMOTION,
|
|
3130
3215
|
topicSubType: n
|
|
3131
3216
|
},
|
|
3132
|
-
pollOpenedFrom:
|
|
3217
|
+
pollOpenedFrom: Q.UNSET
|
|
3133
3218
|
});
|
|
3134
3219
|
};
|
|
3135
3220
|
videoReplayed = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3137,11 +3222,11 @@ class hs {
|
|
|
3137
3222
|
common: {
|
|
3138
3223
|
...this.analytics.commonStore.getValues(),
|
|
3139
3224
|
topicId: e,
|
|
3140
|
-
kind:
|
|
3141
|
-
topicType:
|
|
3225
|
+
kind: C.AD_VIDEO_REPLAYED,
|
|
3226
|
+
topicType: V.POLLS_PROMOTION,
|
|
3142
3227
|
topicSubType: r
|
|
3143
3228
|
},
|
|
3144
|
-
pollOpenedFrom:
|
|
3229
|
+
pollOpenedFrom: Q.UNSET
|
|
3145
3230
|
});
|
|
3146
3231
|
};
|
|
3147
3232
|
videoPlay = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3149,11 +3234,11 @@ class hs {
|
|
|
3149
3234
|
common: {
|
|
3150
3235
|
...this.analytics.commonStore.getValues(),
|
|
3151
3236
|
topicId: e,
|
|
3152
|
-
kind:
|
|
3153
|
-
topicType:
|
|
3237
|
+
kind: C.AD_VIDEO_PLAYED,
|
|
3238
|
+
topicType: V.POLLS_PROMOTION,
|
|
3154
3239
|
topicSubType: r
|
|
3155
3240
|
},
|
|
3156
|
-
pollOpenedFrom:
|
|
3241
|
+
pollOpenedFrom: Q.UNSET
|
|
3157
3242
|
});
|
|
3158
3243
|
};
|
|
3159
3244
|
videoEnd = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3161,11 +3246,11 @@ class hs {
|
|
|
3161
3246
|
common: {
|
|
3162
3247
|
...this.analytics.commonStore.getValues(),
|
|
3163
3248
|
topicId: e,
|
|
3164
|
-
kind:
|
|
3165
|
-
topicType:
|
|
3249
|
+
kind: C.AD_VIDEO_COMPLETE,
|
|
3250
|
+
topicType: V.POLLS_PROMOTION,
|
|
3166
3251
|
topicSubType: r
|
|
3167
3252
|
},
|
|
3168
|
-
pollOpenedFrom:
|
|
3253
|
+
pollOpenedFrom: Q.UNSET
|
|
3169
3254
|
});
|
|
3170
3255
|
};
|
|
3171
3256
|
videoRendered = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3173,11 +3258,11 @@ class hs {
|
|
|
3173
3258
|
common: {
|
|
3174
3259
|
...this.analytics.commonStore.getValues(),
|
|
3175
3260
|
topicId: e,
|
|
3176
|
-
kind:
|
|
3177
|
-
topicType:
|
|
3261
|
+
kind: C.AD_VIDEO_RENDERED,
|
|
3262
|
+
topicType: V.POLLS_PROMOTION,
|
|
3178
3263
|
topicSubType: r
|
|
3179
3264
|
},
|
|
3180
|
-
pollOpenedFrom:
|
|
3265
|
+
pollOpenedFrom: Q.UNSET
|
|
3181
3266
|
});
|
|
3182
3267
|
};
|
|
3183
3268
|
buttonSelect = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3185,11 +3270,11 @@ class hs {
|
|
|
3185
3270
|
common: {
|
|
3186
3271
|
...this.analytics.commonStore.getValues(),
|
|
3187
3272
|
topicId: e,
|
|
3188
|
-
kind:
|
|
3189
|
-
topicType:
|
|
3273
|
+
kind: C.AD_INTERACTION_BUTTON_NAVIGATED,
|
|
3274
|
+
topicType: V.POLLS_PROMOTION,
|
|
3190
3275
|
topicSubType: r
|
|
3191
3276
|
},
|
|
3192
|
-
pollOpenedFrom:
|
|
3277
|
+
pollOpenedFrom: Q.UNSET
|
|
3193
3278
|
});
|
|
3194
3279
|
};
|
|
3195
3280
|
bannerSelect = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3197,11 +3282,11 @@ class hs {
|
|
|
3197
3282
|
common: {
|
|
3198
3283
|
...this.analytics.commonStore.getValues(),
|
|
3199
3284
|
topicId: e,
|
|
3200
|
-
kind:
|
|
3201
|
-
topicType:
|
|
3285
|
+
kind: C.AD_INTERACTION_BANNER_NAVIGATED,
|
|
3286
|
+
topicType: V.POLLS_PROMOTION,
|
|
3202
3287
|
topicSubType: r
|
|
3203
3288
|
},
|
|
3204
|
-
pollOpenedFrom:
|
|
3289
|
+
pollOpenedFrom: Q.UNSET
|
|
3205
3290
|
});
|
|
3206
3291
|
};
|
|
3207
3292
|
bannerShown = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -3209,43 +3294,43 @@ class hs {
|
|
|
3209
3294
|
common: {
|
|
3210
3295
|
...this.analytics.commonStore.getValues(),
|
|
3211
3296
|
topicId: e,
|
|
3212
|
-
kind:
|
|
3213
|
-
topicType:
|
|
3297
|
+
kind: C.AD_BANNER_SHOWN,
|
|
3298
|
+
topicType: V.POLLS_PROMOTION,
|
|
3214
3299
|
topicSubType: r
|
|
3215
3300
|
},
|
|
3216
|
-
pollOpenedFrom:
|
|
3301
|
+
pollOpenedFrom: Q.UNSET
|
|
3217
3302
|
});
|
|
3218
3303
|
};
|
|
3219
3304
|
}
|
|
3220
|
-
const
|
|
3221
|
-
[T.UNSET]:
|
|
3222
|
-
[T.FACTOID]:
|
|
3223
|
-
[T.POLL]:
|
|
3224
|
-
[T.PREDICTION]:
|
|
3225
|
-
[T.PROMOTION]:
|
|
3226
|
-
[T.TRIVIA]:
|
|
3227
|
-
[T.TWEET]:
|
|
3305
|
+
const ot = {
|
|
3306
|
+
[T.UNSET]: V.UNSET,
|
|
3307
|
+
[T.FACTOID]: V.POLLS_INSIGHT,
|
|
3308
|
+
[T.POLL]: V.POLLS_POLL,
|
|
3309
|
+
[T.PREDICTION]: V.POLLS_PREDICTION,
|
|
3310
|
+
[T.PROMOTION]: V.POLLS_PROMOTION,
|
|
3311
|
+
[T.TRIVIA]: V.POLLS_TRIVIA,
|
|
3312
|
+
[T.TWEET]: V.POLLS_TWITTER
|
|
3228
3313
|
};
|
|
3229
3314
|
T.UNSET + "", ge.UNSET, T.FACTOID + "", ge.POLLS, T.POLL + "", ge.POLLS, T.PREDICTION + "", ge.POLLS, T.PROMOTION + "", ge.POLLS, T.TRIVIA + "", ge.POLLS, T.TWEET + "", ge.POLLS;
|
|
3230
3315
|
const ys = {
|
|
3231
|
-
[$.UNSET]:
|
|
3232
|
-
[$.INPLAY]:
|
|
3233
|
-
[$.MESSAGING]:
|
|
3234
|
-
[$.STATISTICS]:
|
|
3235
|
-
[$.BETTING]:
|
|
3236
|
-
[$.TWITTER]:
|
|
3237
|
-
[$.MERCHANDISE]:
|
|
3238
|
-
[$.CONTESTS]:
|
|
3239
|
-
[$.VOICE_CHAT]:
|
|
3240
|
-
[$.TICKETS]:
|
|
3241
|
-
[$.WHOIS_WATCHING]:
|
|
3242
|
-
[$.PROFILE]:
|
|
3243
|
-
[$.GAMES]:
|
|
3316
|
+
[$.UNSET]: z.UNSET,
|
|
3317
|
+
[$.INPLAY]: z.INPLAY,
|
|
3318
|
+
[$.MESSAGING]: z.MESSAGING,
|
|
3319
|
+
[$.STATISTICS]: z.STATS,
|
|
3320
|
+
[$.BETTING]: z.BETTING,
|
|
3321
|
+
[$.TWITTER]: z.TWITTER,
|
|
3322
|
+
[$.MERCHANDISE]: z.MERCHANDISE,
|
|
3323
|
+
[$.CONTESTS]: z.CONTESTS,
|
|
3324
|
+
[$.VOICE_CHAT]: z.CALLING,
|
|
3325
|
+
[$.TICKETS]: z.TICKETS,
|
|
3326
|
+
[$.WHOIS_WATCHING]: z.WHOISWATCHING,
|
|
3327
|
+
[$.PROFILE]: z.PROFILE,
|
|
3328
|
+
[$.GAMES]: z.POLLS,
|
|
3244
3329
|
// ??
|
|
3245
|
-
[$.GOLF_STATISTICS]:
|
|
3330
|
+
[$.GOLF_STATISTICS]: z.STATS,
|
|
3246
3331
|
// ??
|
|
3247
|
-
[$.HIGHLIGHTS]:
|
|
3248
|
-
[$.PUBLIC_CHAT]:
|
|
3332
|
+
[$.HIGHLIGHTS]: z.HIGHLIGHTS,
|
|
3333
|
+
[$.PUBLIC_CHAT]: z.PUBLIC_CHAT
|
|
3249
3334
|
};
|
|
3250
3335
|
class ms {
|
|
3251
3336
|
analytics;
|
|
@@ -3279,16 +3364,16 @@ class ms {
|
|
|
3279
3364
|
break;
|
|
3280
3365
|
}
|
|
3281
3366
|
};
|
|
3282
|
-
return
|
|
3367
|
+
return q.listen(r);
|
|
3283
3368
|
});
|
|
3284
3369
|
}
|
|
3285
3370
|
received = ({ questionId: e, questionType: r, topicSubType: n }) => {
|
|
3286
3371
|
this.analytics.write("notification", {
|
|
3287
3372
|
common: {
|
|
3288
3373
|
...this.analytics.commonStore.getValues(),
|
|
3289
|
-
kind:
|
|
3374
|
+
kind: C.NOTIFICATION_RECEIVED,
|
|
3290
3375
|
topicId: e,
|
|
3291
|
-
topicType: r ?
|
|
3376
|
+
topicType: r ? ot[r] : V.UNSET,
|
|
3292
3377
|
topicSubType: n
|
|
3293
3378
|
},
|
|
3294
3379
|
notificationKind: ge.POLLS,
|
|
@@ -3299,9 +3384,9 @@ class ms {
|
|
|
3299
3384
|
this.analytics.write("notification", {
|
|
3300
3385
|
common: {
|
|
3301
3386
|
...this.analytics.commonStore.getValues(),
|
|
3302
|
-
kind:
|
|
3387
|
+
kind: C.NOTIFICATION_OPENED,
|
|
3303
3388
|
topicId: e,
|
|
3304
|
-
topicType: r ?
|
|
3389
|
+
topicType: r ? ot[r] : V.UNSET,
|
|
3305
3390
|
topicSubType: n
|
|
3306
3391
|
},
|
|
3307
3392
|
notificationKind: ge.POLLS,
|
|
@@ -3333,7 +3418,7 @@ class gs {
|
|
|
3333
3418
|
break;
|
|
3334
3419
|
}
|
|
3335
3420
|
};
|
|
3336
|
-
return
|
|
3421
|
+
return q.listen(r);
|
|
3337
3422
|
});
|
|
3338
3423
|
}
|
|
3339
3424
|
// event when a poll is received from subscription or active question request
|
|
@@ -3341,11 +3426,11 @@ class gs {
|
|
|
3341
3426
|
this.analytics.write("games", {
|
|
3342
3427
|
common: {
|
|
3343
3428
|
...this.analytics.commonStore.getValues(),
|
|
3344
|
-
kind:
|
|
3429
|
+
kind: C.POLLS_RECEIVED,
|
|
3345
3430
|
topicId: e,
|
|
3346
|
-
topicType: r ?
|
|
3431
|
+
topicType: r ? ot[r] : V.UNSET
|
|
3347
3432
|
},
|
|
3348
|
-
pollOpenedFrom:
|
|
3433
|
+
pollOpenedFrom: Q.UNSET
|
|
3349
3434
|
});
|
|
3350
3435
|
};
|
|
3351
3436
|
// poll is viewed from notification or list
|
|
@@ -3353,11 +3438,11 @@ class gs {
|
|
|
3353
3438
|
this.analytics.write("games", {
|
|
3354
3439
|
common: {
|
|
3355
3440
|
...this.analytics.commonStore.getValues(),
|
|
3356
|
-
kind: i ?
|
|
3441
|
+
kind: i ? C.POLLS_AD_OPENED : C.POLLS_OPENED,
|
|
3357
3442
|
topicId: e,
|
|
3358
|
-
topicType: r ?
|
|
3443
|
+
topicType: r ? ot[r] : V.UNSET
|
|
3359
3444
|
},
|
|
3360
|
-
pollOpenedFrom: n === "list" ?
|
|
3445
|
+
pollOpenedFrom: n === "list" ? Q.PICK_HISTORY : Q.IN_APP
|
|
3361
3446
|
});
|
|
3362
3447
|
};
|
|
3363
3448
|
// poll is voted
|
|
@@ -3365,11 +3450,11 @@ class gs {
|
|
|
3365
3450
|
this.analytics.write("games", {
|
|
3366
3451
|
common: {
|
|
3367
3452
|
...this.analytics.commonStore.getValues(),
|
|
3368
|
-
kind: n ?
|
|
3453
|
+
kind: n ? C.POLLS_AD_VOTE : C.POLLS_VOTE,
|
|
3369
3454
|
topicId: e,
|
|
3370
|
-
topicType: r ?
|
|
3455
|
+
topicType: r ? ot[r] : V.UNSET
|
|
3371
3456
|
},
|
|
3372
|
-
pollOpenedFrom:
|
|
3457
|
+
pollOpenedFrom: Q.UNSET
|
|
3373
3458
|
});
|
|
3374
3459
|
};
|
|
3375
3460
|
// onboarding passed, user is now able to vote
|
|
@@ -3377,9 +3462,9 @@ class gs {
|
|
|
3377
3462
|
this.analytics.write("games", {
|
|
3378
3463
|
common: {
|
|
3379
3464
|
...this.analytics.commonStore.getValues(),
|
|
3380
|
-
kind:
|
|
3465
|
+
kind: C.GAMES_JOINED
|
|
3381
3466
|
},
|
|
3382
|
-
pollOpenedFrom:
|
|
3467
|
+
pollOpenedFrom: Q.UNSET
|
|
3383
3468
|
});
|
|
3384
3469
|
};
|
|
3385
3470
|
// user clicked on link in poll and navigated to another page
|
|
@@ -3387,15 +3472,15 @@ class gs {
|
|
|
3387
3472
|
this.analytics.write("games", {
|
|
3388
3473
|
common: {
|
|
3389
3474
|
...this.analytics.commonStore.getValues(),
|
|
3390
|
-
kind:
|
|
3475
|
+
kind: C.POLLS_NAVIGATED
|
|
3391
3476
|
},
|
|
3392
|
-
pollOpenedFrom:
|
|
3477
|
+
pollOpenedFrom: Q.UNSET
|
|
3393
3478
|
});
|
|
3394
3479
|
};
|
|
3395
3480
|
}
|
|
3396
3481
|
const bs = ({ transport: t, $commonStore: e }) => {
|
|
3397
3482
|
let r;
|
|
3398
|
-
const n =
|
|
3483
|
+
const n = K(!1), i = 3e4, { client: o, queryKey: s } = t.createPromiseClient(Rn, {
|
|
3399
3484
|
method: "send",
|
|
3400
3485
|
params: [n]
|
|
3401
3486
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -3408,7 +3493,7 @@ const bs = ({ transport: t, $commonStore: e }) => {
|
|
|
3408
3493
|
value: {
|
|
3409
3494
|
common: {
|
|
3410
3495
|
...p,
|
|
3411
|
-
kind:
|
|
3496
|
+
kind: C.SESSION_HEARTBEAT
|
|
3412
3497
|
}
|
|
3413
3498
|
}
|
|
3414
3499
|
}
|
|
@@ -3444,14 +3529,14 @@ class vs {
|
|
|
3444
3529
|
listenersCancels;
|
|
3445
3530
|
connected = !1;
|
|
3446
3531
|
constructor(e) {
|
|
3447
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new
|
|
3532
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(ee({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = bs({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new ms(this), this.polls = new gs(this), this.invitation = new ds(this), this.interactions = new ls(this), this.advertisement = new hs(this);
|
|
3448
3533
|
const { client: r } = e.analyticsTransport.createPromiseClient(Rn, {
|
|
3449
3534
|
method: "send"
|
|
3450
3535
|
});
|
|
3451
3536
|
this.analyticsClient = r;
|
|
3452
3537
|
}
|
|
3453
3538
|
connect = () => {
|
|
3454
|
-
this.writeCommon("sessionId",
|
|
3539
|
+
this.writeCommon("sessionId", Qe()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, we.debug("analytics connected");
|
|
3455
3540
|
};
|
|
3456
3541
|
disconnect = () => {
|
|
3457
3542
|
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, we.debug("analytics disconnected");
|
|
@@ -3474,8 +3559,20 @@ class vs {
|
|
|
3474
3559
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
3475
3560
|
this.writeCommon("eventId", r);
|
|
3476
3561
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
3477
|
-
r && this.writeCommon("category", ys[r]), r !== $.UNSET ? this.writeCommon("overlaySessionId",
|
|
3562
|
+
r && this.writeCommon("category", ys[r]), r !== $.UNSET ? this.writeCommon("overlaySessionId", Qe()) : this.writeCommon("overlaySessionId", "");
|
|
3478
3563
|
})), this.onConnect(() => {
|
|
3564
|
+
const r = (n) => {
|
|
3565
|
+
if (!n.slEventBus)
|
|
3566
|
+
return;
|
|
3567
|
+
const i = n.slEventBus?.action;
|
|
3568
|
+
if (n.slEventBus?.type === "exposedPauseAd") {
|
|
3569
|
+
const o = n.slEventBus.payload;
|
|
3570
|
+
i === "disabled" && (this.writeCommon("overlaySessionId", ""), this.writeCommon("topicId", ""), this.writeCommon("topicType", V.UNSET), this.writeCommon("category", z.UNSET)), i === "enabled" && (this.writeCommon("overlaySessionId", Qe()), this.writeCommon("category", z.EXPOSED_PAUSED_AD)), i === "loaded" && o.id && (this.writeCommon("topicId", o.id), this.writeCommon("topicType", V.UNSET));
|
|
3571
|
+
}
|
|
3572
|
+
n.slEventBus?.type === "advertisement" && (i === "opened" && this.writeCommon("overlaySessionId", Qe()), i === "closed" && this.writeCommon("overlaySessionId", ""));
|
|
3573
|
+
};
|
|
3574
|
+
return q.listen(r);
|
|
3575
|
+
}), this.onConnect(() => {
|
|
3479
3576
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
3480
3577
|
this.writeCommon("screenOrientation", i.matches ? zr.PORTRAIT : zr.LANDSCAPE);
|
|
3481
3578
|
};
|
|
@@ -3489,7 +3586,7 @@ class vs {
|
|
|
3489
3586
|
}
|
|
3490
3587
|
const Ss = (t, e, r) => {
|
|
3491
3588
|
t.analytics = new vs(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), t.sdk.writeOverlaySessionId = (n) => {
|
|
3492
|
-
n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId",
|
|
3589
|
+
n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId", Qe());
|
|
3493
3590
|
}, () => {
|
|
3494
3591
|
t.analytics.disconnect();
|
|
3495
3592
|
})), r();
|
|
@@ -3531,7 +3628,7 @@ function Kn(t, e, r) {
|
|
|
3531
3628
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
3532
3629
|
if (r = A, !u.paused)
|
|
3533
3630
|
for (; i && s < r; )
|
|
3534
|
-
s++,
|
|
3631
|
+
s++, L();
|
|
3535
3632
|
},
|
|
3536
3633
|
running: d,
|
|
3537
3634
|
resume: g,
|
|
@@ -3552,40 +3649,40 @@ function Kn(t, e, r) {
|
|
|
3552
3649
|
u.paused = !0;
|
|
3553
3650
|
}
|
|
3554
3651
|
function l() {
|
|
3555
|
-
for (var A = i,
|
|
3556
|
-
A = A.next,
|
|
3557
|
-
return
|
|
3652
|
+
for (var A = i, x = 0; A; )
|
|
3653
|
+
A = A.next, x++;
|
|
3654
|
+
return x;
|
|
3558
3655
|
}
|
|
3559
3656
|
function p() {
|
|
3560
|
-
for (var A = i,
|
|
3561
|
-
|
|
3562
|
-
return
|
|
3657
|
+
for (var A = i, x = []; A; )
|
|
3658
|
+
x.push(A.value), A = A.next;
|
|
3659
|
+
return x;
|
|
3563
3660
|
}
|
|
3564
3661
|
function g() {
|
|
3565
3662
|
if (u.paused) {
|
|
3566
3663
|
if (u.paused = !1, i === null) {
|
|
3567
|
-
s++,
|
|
3664
|
+
s++, L();
|
|
3568
3665
|
return;
|
|
3569
3666
|
}
|
|
3570
3667
|
for (; i && s < r; )
|
|
3571
|
-
s++,
|
|
3668
|
+
s++, L();
|
|
3572
3669
|
}
|
|
3573
3670
|
}
|
|
3574
3671
|
function w() {
|
|
3575
3672
|
return s === 0 && u.length() === 0;
|
|
3576
3673
|
}
|
|
3577
|
-
function v(A,
|
|
3578
|
-
var
|
|
3579
|
-
|
|
3674
|
+
function v(A, x) {
|
|
3675
|
+
var N = n.get();
|
|
3676
|
+
N.context = t, N.release = L, N.value = A, N.callback = x || re, N.errorHandler = a, s >= r || u.paused ? o ? (o.next = N, o = N) : (i = N, o = N, u.saturated()) : (s++, e.call(t, N.value, N.worked));
|
|
3580
3677
|
}
|
|
3581
|
-
function E(A,
|
|
3582
|
-
var
|
|
3583
|
-
|
|
3678
|
+
function E(A, x) {
|
|
3679
|
+
var N = n.get();
|
|
3680
|
+
N.context = t, N.release = L, N.value = A, N.callback = x || re, N.errorHandler = a, s >= r || u.paused ? i ? (N.next = i, i = N) : (i = N, o = N, u.saturated()) : (s++, e.call(t, N.value, N.worked));
|
|
3584
3681
|
}
|
|
3585
|
-
function
|
|
3682
|
+
function L(A) {
|
|
3586
3683
|
A && n.release(A);
|
|
3587
|
-
var
|
|
3588
|
-
|
|
3684
|
+
var x = i;
|
|
3685
|
+
x && s <= r ? u.paused ? s-- : (o === i && (o = null), i = x.next, x.next = null, e.call(t, x.value, x.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
3589
3686
|
}
|
|
3590
3687
|
function b() {
|
|
3591
3688
|
i = null, o = null, u.drain = re;
|
|
@@ -3655,12 +3752,12 @@ function Ts(t, e, r) {
|
|
|
3655
3752
|
}
|
|
3656
3753
|
Tr.exports = Kn;
|
|
3657
3754
|
Tr.exports.promise = Ts;
|
|
3658
|
-
var zn = Tr.exports, _r = { exports: {} },
|
|
3755
|
+
var zn = Tr.exports, _r = { exports: {} }, We = typeof Reflect == "object" ? Reflect : null, cn = We && typeof We.apply == "function" ? We.apply : function(e, r, n) {
|
|
3659
3756
|
return Function.prototype.apply.call(e, r, n);
|
|
3660
|
-
},
|
|
3661
|
-
|
|
3757
|
+
}, St;
|
|
3758
|
+
We && typeof We.ownKeys == "function" ? St = We.ownKeys : Object.getOwnPropertySymbols ? St = function(e) {
|
|
3662
3759
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
3663
|
-
} :
|
|
3760
|
+
} : St = function(e) {
|
|
3664
3761
|
return Object.getOwnPropertyNames(e);
|
|
3665
3762
|
};
|
|
3666
3763
|
function _s(t) {
|
|
@@ -3673,13 +3770,13 @@ function B() {
|
|
|
3673
3770
|
B.init.call(this);
|
|
3674
3771
|
}
|
|
3675
3772
|
_r.exports = B;
|
|
3676
|
-
_r.exports.once =
|
|
3773
|
+
_r.exports.once = Ls;
|
|
3677
3774
|
B.EventEmitter = B;
|
|
3678
3775
|
B.prototype._events = void 0;
|
|
3679
3776
|
B.prototype._eventsCount = 0;
|
|
3680
3777
|
B.prototype._maxListeners = void 0;
|
|
3681
3778
|
var dn = 10;
|
|
3682
|
-
function
|
|
3779
|
+
function Ut(t) {
|
|
3683
3780
|
if (typeof t != "function")
|
|
3684
3781
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
3685
3782
|
}
|
|
@@ -3734,7 +3831,7 @@ B.prototype.emit = function(e) {
|
|
|
3734
3831
|
};
|
|
3735
3832
|
function Jn(t, e, r, n) {
|
|
3736
3833
|
var i, o, s;
|
|
3737
|
-
if (
|
|
3834
|
+
if (Ut(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3738
3835
|
"newListener",
|
|
3739
3836
|
e,
|
|
3740
3837
|
r.listener ? r.listener : r
|
|
@@ -3763,14 +3860,14 @@ function Xn(t, e, r) {
|
|
|
3763
3860
|
return i.listener = r, n.wrapFn = i, i;
|
|
3764
3861
|
}
|
|
3765
3862
|
B.prototype.once = function(e, r) {
|
|
3766
|
-
return
|
|
3863
|
+
return Ut(r), this.on(e, Xn(this, e, r)), this;
|
|
3767
3864
|
};
|
|
3768
3865
|
B.prototype.prependOnceListener = function(e, r) {
|
|
3769
|
-
return
|
|
3866
|
+
return Ut(r), this.prependListener(e, Xn(this, e, r)), this;
|
|
3770
3867
|
};
|
|
3771
3868
|
B.prototype.removeListener = function(e, r) {
|
|
3772
3869
|
var n, i, o, s, a;
|
|
3773
|
-
if (
|
|
3870
|
+
if (Ut(r), i = this._events, i === void 0)
|
|
3774
3871
|
return this;
|
|
3775
3872
|
if (n = i[e], n === void 0)
|
|
3776
3873
|
return this;
|
|
@@ -3813,7 +3910,7 @@ function Zn(t, e, r) {
|
|
|
3813
3910
|
if (n === void 0)
|
|
3814
3911
|
return [];
|
|
3815
3912
|
var i = n[e];
|
|
3816
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
3913
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Ns(i) : ti(i, i.length);
|
|
3817
3914
|
}
|
|
3818
3915
|
B.prototype.listeners = function(e) {
|
|
3819
3916
|
return Zn(this, e, !0);
|
|
@@ -3837,7 +3934,7 @@ function ei(t) {
|
|
|
3837
3934
|
return 0;
|
|
3838
3935
|
}
|
|
3839
3936
|
B.prototype.eventNames = function() {
|
|
3840
|
-
return this._eventsCount > 0 ?
|
|
3937
|
+
return this._eventsCount > 0 ? St(this._events) : [];
|
|
3841
3938
|
};
|
|
3842
3939
|
function ti(t, e) {
|
|
3843
3940
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
@@ -3849,12 +3946,12 @@ function Ps(t, e) {
|
|
|
3849
3946
|
t[e] = t[e + 1];
|
|
3850
3947
|
t.pop();
|
|
3851
3948
|
}
|
|
3852
|
-
function
|
|
3949
|
+
function Ns(t) {
|
|
3853
3950
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3854
3951
|
e[r] = t[r].listener || t[r];
|
|
3855
3952
|
return e;
|
|
3856
3953
|
}
|
|
3857
|
-
function
|
|
3954
|
+
function Ls(t, e) {
|
|
3858
3955
|
return new Promise(function(r, n) {
|
|
3859
3956
|
function i(s) {
|
|
3860
3957
|
t.removeListener(e, o), n(s);
|
|
@@ -3878,7 +3975,7 @@ function ri(t, e, r, n) {
|
|
|
3878
3975
|
else
|
|
3879
3976
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3880
3977
|
}
|
|
3881
|
-
var ni = _r.exports,
|
|
3978
|
+
var ni = _r.exports, Bt = {}, ii = {}, oi = function() {
|
|
3882
3979
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3883
3980
|
return !1;
|
|
3884
3981
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3901,16 +3998,16 @@ var ni = _r.exports, Mt = {}, ii = {}, oi = function() {
|
|
|
3901
3998
|
return !1;
|
|
3902
3999
|
}
|
|
3903
4000
|
return !0;
|
|
3904
|
-
}, Ds = oi,
|
|
4001
|
+
}, Ds = oi, Mt = function() {
|
|
3905
4002
|
return Ds() && !!Symbol.toStringTag;
|
|
3906
|
-
}, Rs = Error, Fs = EvalError, Vs = RangeError,
|
|
3907
|
-
return typeof ln != "function" || typeof Symbol != "function" || typeof ln("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 :
|
|
4003
|
+
}, Rs = Error, Fs = EvalError, Vs = RangeError, Us = ReferenceError, si = SyntaxError, $t = TypeError, Bs = URIError, ln = typeof Symbol < "u" && Symbol, Ms = oi, $s = function() {
|
|
4004
|
+
return typeof ln != "function" || typeof Symbol != "function" || typeof ln("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Ms();
|
|
3908
4005
|
}, Gt = {
|
|
3909
4006
|
__proto__: null,
|
|
3910
4007
|
foo: {}
|
|
3911
|
-
}, qs = Object,
|
|
4008
|
+
}, qs = Object, xs = function() {
|
|
3912
4009
|
return { __proto__: Gt }.foo === Gt.foo && !(Gt instanceof qs);
|
|
3913
|
-
},
|
|
4010
|
+
}, js = "Function.prototype.bind called on incompatible ", Qs = Object.prototype.toString, Gs = Math.max, Hs = "[object Function]", fn = function(e, r) {
|
|
3914
4011
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3915
4012
|
n[i] = e[i];
|
|
3916
4013
|
for (var o = 0; o < r.length; o += 1)
|
|
@@ -3927,7 +4024,7 @@ var ni = _r.exports, Mt = {}, ii = {}, oi = function() {
|
|
|
3927
4024
|
}, Ws = function(e) {
|
|
3928
4025
|
var r = this;
|
|
3929
4026
|
if (typeof r != "function" || Qs.apply(r) !== Hs)
|
|
3930
|
-
throw new TypeError(
|
|
4027
|
+
throw new TypeError(js + r);
|
|
3931
4028
|
for (var n = Ks(arguments, 1), i, o = function() {
|
|
3932
4029
|
if (this instanceof i) {
|
|
3933
4030
|
var c = r.apply(
|
|
@@ -3948,7 +4045,7 @@ var ni = _r.exports, Mt = {}, ii = {}, oi = function() {
|
|
|
3948
4045
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3949
4046
|
}
|
|
3950
4047
|
return i;
|
|
3951
|
-
}, Ys = Ws, kr = Function.prototype.bind || Ys, Js = Function.prototype.call, Xs = Object.prototype.hasOwnProperty, Zs = kr, ea = Zs.call(Js, Xs), P, ta = Rs, ra = Fs, na = Vs, ia =
|
|
4048
|
+
}, Ys = Ws, kr = Function.prototype.bind || Ys, Js = Function.prototype.call, Xs = Object.prototype.hasOwnProperty, Zs = kr, ea = Zs.call(Js, Xs), P, ta = Rs, ra = Fs, na = Vs, ia = Us, Xe = si, Ye = $t, oa = Bs, ai = Function, Ht = function(t) {
|
|
3952
4049
|
try {
|
|
3953
4050
|
return ai('"use strict"; return (' + t + ").constructor;")();
|
|
3954
4051
|
} catch {
|
|
@@ -3961,7 +4058,7 @@ if (Ce)
|
|
|
3961
4058
|
Ce = null;
|
|
3962
4059
|
}
|
|
3963
4060
|
var Kt = function() {
|
|
3964
|
-
throw new
|
|
4061
|
+
throw new Ye();
|
|
3965
4062
|
}, sa = Ce ? function() {
|
|
3966
4063
|
try {
|
|
3967
4064
|
return arguments.callee, Kt;
|
|
@@ -3972,19 +4069,19 @@ var Kt = function() {
|
|
|
3972
4069
|
return Kt;
|
|
3973
4070
|
}
|
|
3974
4071
|
}
|
|
3975
|
-
}() : Kt, qe =
|
|
4072
|
+
}() : Kt, qe = $s(), aa = xs(), W = Object.getPrototypeOf || (aa ? function(t) {
|
|
3976
4073
|
return t.__proto__;
|
|
3977
|
-
} : null),
|
|
4074
|
+
} : null), je = {}, ua = typeof Uint8Array > "u" || !W ? P : W(Uint8Array), De = {
|
|
3978
4075
|
__proto__: null,
|
|
3979
4076
|
"%AggregateError%": typeof AggregateError > "u" ? P : AggregateError,
|
|
3980
4077
|
"%Array%": Array,
|
|
3981
4078
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? P : ArrayBuffer,
|
|
3982
|
-
"%ArrayIteratorPrototype%": qe &&
|
|
4079
|
+
"%ArrayIteratorPrototype%": qe && W ? W([][Symbol.iterator]()) : P,
|
|
3983
4080
|
"%AsyncFromSyncIteratorPrototype%": P,
|
|
3984
|
-
"%AsyncFunction%":
|
|
3985
|
-
"%AsyncGenerator%":
|
|
3986
|
-
"%AsyncGeneratorFunction%":
|
|
3987
|
-
"%AsyncIteratorPrototype%":
|
|
4081
|
+
"%AsyncFunction%": je,
|
|
4082
|
+
"%AsyncGenerator%": je,
|
|
4083
|
+
"%AsyncGeneratorFunction%": je,
|
|
4084
|
+
"%AsyncIteratorPrototype%": je,
|
|
3988
4085
|
"%Atomics%": typeof Atomics > "u" ? P : Atomics,
|
|
3989
4086
|
"%BigInt%": typeof BigInt > "u" ? P : BigInt,
|
|
3990
4087
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? P : BigInt64Array,
|
|
@@ -4004,16 +4101,16 @@ var Kt = function() {
|
|
|
4004
4101
|
"%Float64Array%": typeof Float64Array > "u" ? P : Float64Array,
|
|
4005
4102
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? P : FinalizationRegistry,
|
|
4006
4103
|
"%Function%": ai,
|
|
4007
|
-
"%GeneratorFunction%":
|
|
4104
|
+
"%GeneratorFunction%": je,
|
|
4008
4105
|
"%Int8Array%": typeof Int8Array > "u" ? P : Int8Array,
|
|
4009
4106
|
"%Int16Array%": typeof Int16Array > "u" ? P : Int16Array,
|
|
4010
4107
|
"%Int32Array%": typeof Int32Array > "u" ? P : Int32Array,
|
|
4011
4108
|
"%isFinite%": isFinite,
|
|
4012
4109
|
"%isNaN%": isNaN,
|
|
4013
|
-
"%IteratorPrototype%": qe &&
|
|
4110
|
+
"%IteratorPrototype%": qe && W ? W(W([][Symbol.iterator]())) : P,
|
|
4014
4111
|
"%JSON%": typeof JSON == "object" ? JSON : P,
|
|
4015
4112
|
"%Map%": typeof Map > "u" ? P : Map,
|
|
4016
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !qe || !
|
|
4113
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !qe || !W ? P : W((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
4017
4114
|
"%Math%": Math,
|
|
4018
4115
|
"%Number%": Number,
|
|
4019
4116
|
"%Object%": Object,
|
|
@@ -4026,15 +4123,15 @@ var Kt = function() {
|
|
|
4026
4123
|
"%Reflect%": typeof Reflect > "u" ? P : Reflect,
|
|
4027
4124
|
"%RegExp%": RegExp,
|
|
4028
4125
|
"%Set%": typeof Set > "u" ? P : Set,
|
|
4029
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !qe || !
|
|
4126
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !qe || !W ? P : W((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
4030
4127
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? P : SharedArrayBuffer,
|
|
4031
4128
|
"%String%": String,
|
|
4032
|
-
"%StringIteratorPrototype%": qe &&
|
|
4129
|
+
"%StringIteratorPrototype%": qe && W ? W(""[Symbol.iterator]()) : P,
|
|
4033
4130
|
"%Symbol%": qe ? Symbol : P,
|
|
4034
|
-
"%SyntaxError%":
|
|
4131
|
+
"%SyntaxError%": Xe,
|
|
4035
4132
|
"%ThrowTypeError%": sa,
|
|
4036
4133
|
"%TypedArray%": ua,
|
|
4037
|
-
"%TypeError%":
|
|
4134
|
+
"%TypeError%": Ye,
|
|
4038
4135
|
"%Uint8Array%": typeof Uint8Array > "u" ? P : Uint8Array,
|
|
4039
4136
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? P : Uint8ClampedArray,
|
|
4040
4137
|
"%Uint16Array%": typeof Uint16Array > "u" ? P : Uint16Array,
|
|
@@ -4044,11 +4141,11 @@ var Kt = function() {
|
|
|
4044
4141
|
"%WeakRef%": typeof WeakRef > "u" ? P : WeakRef,
|
|
4045
4142
|
"%WeakSet%": typeof WeakSet > "u" ? P : WeakSet
|
|
4046
4143
|
};
|
|
4047
|
-
if (
|
|
4144
|
+
if (W)
|
|
4048
4145
|
try {
|
|
4049
4146
|
null.error;
|
|
4050
4147
|
} catch (t) {
|
|
4051
|
-
var ca =
|
|
4148
|
+
var ca = W(W(t));
|
|
4052
4149
|
De["%Error.prototype%"] = ca;
|
|
4053
4150
|
}
|
|
4054
4151
|
var da = function t(e) {
|
|
@@ -4064,7 +4161,7 @@ var da = function t(e) {
|
|
|
4064
4161
|
n && (r = n.prototype);
|
|
4065
4162
|
} else if (e === "%AsyncIteratorPrototype%") {
|
|
4066
4163
|
var i = t("%AsyncGenerator%");
|
|
4067
|
-
i &&
|
|
4164
|
+
i && W && (r = W(i.prototype));
|
|
4068
4165
|
}
|
|
4069
4166
|
return De[e] = r, r;
|
|
4070
4167
|
}, pn = {
|
|
@@ -4120,12 +4217,12 @@ var da = function t(e) {
|
|
|
4120
4217
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
4121
4218
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
4122
4219
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
4123
|
-
},
|
|
4220
|
+
}, ct = kr, _t = ea, la = ct.call(Function.call, Array.prototype.concat), fa = ct.call(Function.apply, Array.prototype.splice), hn = ct.call(Function.call, String.prototype.replace), kt = ct.call(Function.call, String.prototype.slice), pa = ct.call(Function.call, RegExp.prototype.exec), ha = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ya = /\\(\\)?/g, ma = function(e) {
|
|
4124
4221
|
var r = kt(e, 0, 1), n = kt(e, -1);
|
|
4125
4222
|
if (r === "%" && n !== "%")
|
|
4126
|
-
throw new
|
|
4223
|
+
throw new Xe("invalid intrinsic syntax, expected closing `%`");
|
|
4127
4224
|
if (n === "%" && r !== "%")
|
|
4128
|
-
throw new
|
|
4225
|
+
throw new Xe("invalid intrinsic syntax, expected opening `%`");
|
|
4129
4226
|
var i = [];
|
|
4130
4227
|
return hn(e, ha, function(o, s, a, u) {
|
|
4131
4228
|
i[i.length] = a ? hn(u, ya, "$1") : s || o;
|
|
@@ -4134,34 +4231,34 @@ var da = function t(e) {
|
|
|
4134
4231
|
var n = e, i;
|
|
4135
4232
|
if (_t(pn, n) && (i = pn[n], n = "%" + i[0] + "%"), _t(De, n)) {
|
|
4136
4233
|
var o = De[n];
|
|
4137
|
-
if (o ===
|
|
4138
|
-
throw new
|
|
4234
|
+
if (o === je && (o = da(n)), typeof o > "u" && !r)
|
|
4235
|
+
throw new Ye("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
4139
4236
|
return {
|
|
4140
4237
|
alias: i,
|
|
4141
4238
|
name: n,
|
|
4142
4239
|
value: o
|
|
4143
4240
|
};
|
|
4144
4241
|
}
|
|
4145
|
-
throw new
|
|
4146
|
-
},
|
|
4242
|
+
throw new Xe("intrinsic " + e + " does not exist!");
|
|
4243
|
+
}, dt = function(e, r) {
|
|
4147
4244
|
if (typeof e != "string" || e.length === 0)
|
|
4148
|
-
throw new
|
|
4245
|
+
throw new Ye("intrinsic name must be a non-empty string");
|
|
4149
4246
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
4150
|
-
throw new
|
|
4247
|
+
throw new Ye('"allowMissing" argument must be a boolean');
|
|
4151
4248
|
if (pa(/^%?[^%]*%?$/, e) === null)
|
|
4152
|
-
throw new
|
|
4249
|
+
throw new Xe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
4153
4250
|
var n = ma(e), i = n.length > 0 ? n[0] : "", o = ga("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
4154
4251
|
d && (i = d[0], fa(n, la([0, 1], d)));
|
|
4155
4252
|
for (var c = 1, l = !0; c < n.length; c += 1) {
|
|
4156
4253
|
var p = n[c], g = kt(p, 0, 1), w = kt(p, -1);
|
|
4157
4254
|
if ((g === '"' || g === "'" || g === "`" || w === '"' || w === "'" || w === "`") && g !== w)
|
|
4158
|
-
throw new
|
|
4255
|
+
throw new Xe("property names with quotes must have matching quotes");
|
|
4159
4256
|
if ((p === "constructor" || !l) && (u = !0), i += "." + p, s = "%" + i + "%", _t(De, s))
|
|
4160
4257
|
a = De[s];
|
|
4161
4258
|
else if (a != null) {
|
|
4162
4259
|
if (!(p in a)) {
|
|
4163
4260
|
if (!r)
|
|
4164
|
-
throw new
|
|
4261
|
+
throw new Ye("base intrinsic for " + e + " exists, but the property is not available.");
|
|
4165
4262
|
return;
|
|
4166
4263
|
}
|
|
4167
4264
|
if (Ce && c + 1 >= n.length) {
|
|
@@ -4177,7 +4274,7 @@ var da = function t(e) {
|
|
|
4177
4274
|
function Pr() {
|
|
4178
4275
|
if (yn) return zt;
|
|
4179
4276
|
yn = 1;
|
|
4180
|
-
var t =
|
|
4277
|
+
var t = dt, e = t("%Object.defineProperty%", !0) || !1;
|
|
4181
4278
|
if (e)
|
|
4182
4279
|
try {
|
|
4183
4280
|
e({}, "a", { value: 1 });
|
|
@@ -4186,26 +4283,26 @@ function Pr() {
|
|
|
4186
4283
|
}
|
|
4187
4284
|
return zt = e, zt;
|
|
4188
4285
|
}
|
|
4189
|
-
var ba =
|
|
4190
|
-
if (
|
|
4286
|
+
var ba = dt, wt = ba("%Object.getOwnPropertyDescriptor%", !0);
|
|
4287
|
+
if (wt)
|
|
4191
4288
|
try {
|
|
4192
|
-
|
|
4289
|
+
wt([], "length");
|
|
4193
4290
|
} catch {
|
|
4194
|
-
|
|
4291
|
+
wt = null;
|
|
4195
4292
|
}
|
|
4196
|
-
var qt =
|
|
4293
|
+
var qt = wt, mn = Pr(), va = si, xe = $t, gn = qt, Sa = function(e, r, n) {
|
|
4197
4294
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
4198
|
-
throw new
|
|
4295
|
+
throw new xe("`obj` must be an object or a function`");
|
|
4199
4296
|
if (typeof r != "string" && typeof r != "symbol")
|
|
4200
|
-
throw new
|
|
4297
|
+
throw new xe("`property` must be a string or a symbol`");
|
|
4201
4298
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
|
|
4202
|
-
throw new
|
|
4299
|
+
throw new xe("`nonEnumerable`, if provided, must be a boolean or null");
|
|
4203
4300
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
|
|
4204
|
-
throw new
|
|
4301
|
+
throw new xe("`nonWritable`, if provided, must be a boolean or null");
|
|
4205
4302
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
|
|
4206
|
-
throw new
|
|
4303
|
+
throw new xe("`nonConfigurable`, if provided, must be a boolean or null");
|
|
4207
4304
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
4208
|
-
throw new
|
|
4305
|
+
throw new xe("`loose`, if provided, must be a boolean");
|
|
4209
4306
|
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!gn && gn(e, r);
|
|
4210
4307
|
if (mn)
|
|
4211
4308
|
mn(e, r, {
|
|
@@ -4230,7 +4327,7 @@ ci.hasArrayLengthDefineBug = function() {
|
|
|
4230
4327
|
return !0;
|
|
4231
4328
|
}
|
|
4232
4329
|
};
|
|
4233
|
-
var wa = ci, Ea =
|
|
4330
|
+
var wa = ci, Ea = dt, bn = Sa, Aa = wa(), vn = qt, Sn = $t, Ia = Ea("%Math.floor%"), Oa = function(e, r) {
|
|
4234
4331
|
if (typeof e != "function")
|
|
4235
4332
|
throw new Sn("`fn` is not a function");
|
|
4236
4333
|
if (typeof r != "number" || r < 0 || r > 4294967295 || Ia(r) !== r)
|
|
@@ -4255,7 +4352,7 @@ var wa = ci, Ea = ct, bn = Sa, Aa = wa(), vn = qt, Sn = Ut, Ia = Ea("%Math.floor
|
|
|
4255
4352
|
)), e;
|
|
4256
4353
|
};
|
|
4257
4354
|
(function(t) {
|
|
4258
|
-
var e = kr, r =
|
|
4355
|
+
var e = kr, r = dt, n = Oa, i = $t, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = Pr(), d = r("%Math.max%");
|
|
4259
4356
|
t.exports = function(p) {
|
|
4260
4357
|
if (typeof p != "function")
|
|
4261
4358
|
throw new i("a function is required");
|
|
@@ -4271,18 +4368,18 @@ var wa = ci, Ea = ct, bn = Sa, Aa = wa(), vn = qt, Sn = Ut, Ia = Ea("%Math.floor
|
|
|
4271
4368
|
};
|
|
4272
4369
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
4273
4370
|
})(ui);
|
|
4274
|
-
var
|
|
4371
|
+
var Nr = ui.exports, di = dt, li = Nr, Ta = li(di("String.prototype.indexOf")), Lr = function(e, r) {
|
|
4275
4372
|
var n = di(e, !!r);
|
|
4276
4373
|
return typeof n == "function" && Ta(e, ".prototype.") > -1 ? li(n) : n;
|
|
4277
|
-
}, _a =
|
|
4374
|
+
}, _a = Mt(), ka = Lr, pr = ka("Object.prototype.toString"), xt = function(e) {
|
|
4278
4375
|
return _a && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : pr(e) === "[object Arguments]";
|
|
4279
4376
|
}, fi = function(e) {
|
|
4280
|
-
return
|
|
4377
|
+
return xt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && pr(e) !== "[object Array]" && pr(e.callee) === "[object Function]";
|
|
4281
4378
|
}, Pa = function() {
|
|
4282
|
-
return
|
|
4379
|
+
return xt(arguments);
|
|
4283
4380
|
}();
|
|
4284
|
-
|
|
4285
|
-
var
|
|
4381
|
+
xt.isLegacyArguments = fi;
|
|
4382
|
+
var Na = Pa ? xt : fi, La = Object.prototype.toString, Ca = Function.prototype.toString, Da = /^\s*(?:function)?\*/, pi = Mt(), Wt = Object.getPrototypeOf, Ra = function() {
|
|
4286
4383
|
if (!pi)
|
|
4287
4384
|
return !1;
|
|
4288
4385
|
try {
|
|
@@ -4295,7 +4392,7 @@ var La = Pa ? jt : fi, Na = Object.prototype.toString, Ca = Function.prototype.t
|
|
|
4295
4392
|
if (Da.test(Ca.call(e)))
|
|
4296
4393
|
return !0;
|
|
4297
4394
|
if (!pi) {
|
|
4298
|
-
var r =
|
|
4395
|
+
var r = La.call(e);
|
|
4299
4396
|
return r === "[object GeneratorFunction]";
|
|
4300
4397
|
}
|
|
4301
4398
|
if (!Wt)
|
|
@@ -4305,21 +4402,21 @@ var La = Pa ? jt : fi, Na = Object.prototype.toString, Ca = Function.prototype.t
|
|
|
4305
4402
|
Yt = n ? Wt(n) : !1;
|
|
4306
4403
|
}
|
|
4307
4404
|
return Wt(e) === Yt;
|
|
4308
|
-
}, hi = Function.prototype.toString,
|
|
4309
|
-
if (typeof
|
|
4405
|
+
}, hi = Function.prototype.toString, Ke = typeof Reflect == "object" && Reflect !== null && Reflect.apply, hr, Et;
|
|
4406
|
+
if (typeof Ke == "function" && typeof Object.defineProperty == "function")
|
|
4310
4407
|
try {
|
|
4311
4408
|
hr = Object.defineProperty({}, "length", {
|
|
4312
4409
|
get: function() {
|
|
4313
|
-
throw
|
|
4410
|
+
throw Et;
|
|
4314
4411
|
}
|
|
4315
|
-
}),
|
|
4412
|
+
}), Et = {}, Ke(function() {
|
|
4316
4413
|
throw 42;
|
|
4317
4414
|
}, null, hr);
|
|
4318
4415
|
} catch (t) {
|
|
4319
|
-
t !==
|
|
4416
|
+
t !== Et && (Ke = null);
|
|
4320
4417
|
}
|
|
4321
4418
|
else
|
|
4322
|
-
|
|
4419
|
+
Ke = null;
|
|
4323
4420
|
var Va = /^\s*class\b/, yr = function(e) {
|
|
4324
4421
|
try {
|
|
4325
4422
|
var r = hi.call(e);
|
|
@@ -4333,30 +4430,30 @@ var Va = /^\s*class\b/, yr = function(e) {
|
|
|
4333
4430
|
} catch {
|
|
4334
4431
|
return !1;
|
|
4335
4432
|
}
|
|
4336
|
-
},
|
|
4433
|
+
}, At = Object.prototype.toString, Ua = "[object Object]", Ba = "[object Function]", Ma = "[object GeneratorFunction]", $a = "[object HTMLAllCollection]", qa = "[object HTML document.all class]", xa = "[object HTMLCollection]", ja = typeof Symbol == "function" && !!Symbol.toStringTag, Qa = !(0 in [,]), mr = function() {
|
|
4337
4434
|
return !1;
|
|
4338
4435
|
};
|
|
4339
4436
|
if (typeof document == "object") {
|
|
4340
4437
|
var Ga = document.all;
|
|
4341
|
-
|
|
4438
|
+
At.call(Ga) === At.call(document.all) && (mr = function(e) {
|
|
4342
4439
|
if ((Qa || !e) && (typeof e > "u" || typeof e == "object"))
|
|
4343
4440
|
try {
|
|
4344
|
-
var r =
|
|
4345
|
-
return (r ===
|
|
4441
|
+
var r = At.call(e);
|
|
4442
|
+
return (r === $a || r === qa || r === xa || r === Ua) && e("") == null;
|
|
4346
4443
|
} catch {
|
|
4347
4444
|
}
|
|
4348
4445
|
return !1;
|
|
4349
4446
|
});
|
|
4350
4447
|
}
|
|
4351
|
-
var Ha =
|
|
4448
|
+
var Ha = Ke ? function(e) {
|
|
4352
4449
|
if (mr(e))
|
|
4353
4450
|
return !0;
|
|
4354
4451
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
4355
4452
|
return !1;
|
|
4356
4453
|
try {
|
|
4357
|
-
|
|
4454
|
+
Ke(e, null, hr);
|
|
4358
4455
|
} catch (r) {
|
|
4359
|
-
if (r !==
|
|
4456
|
+
if (r !== Et)
|
|
4360
4457
|
return !1;
|
|
4361
4458
|
}
|
|
4362
4459
|
return !yr(e) && Jt(e);
|
|
@@ -4365,12 +4462,12 @@ var Ha = He ? function(e) {
|
|
|
4365
4462
|
return !0;
|
|
4366
4463
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
4367
4464
|
return !1;
|
|
4368
|
-
if (
|
|
4465
|
+
if (ja)
|
|
4369
4466
|
return Jt(e);
|
|
4370
4467
|
if (yr(e))
|
|
4371
4468
|
return !1;
|
|
4372
|
-
var r =
|
|
4373
|
-
return r !==
|
|
4469
|
+
var r = At.call(e);
|
|
4470
|
+
return r !== Ba && r !== Ma && !/^\[object HTML/.test(r) ? !1 : Jt(e);
|
|
4374
4471
|
}, Ka = Ha, za = Object.prototype.toString, yi = Object.prototype.hasOwnProperty, Wa = function(e, r, n) {
|
|
4375
4472
|
for (var i = 0, o = e.length; i < o; i++)
|
|
4376
4473
|
yi.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
@@ -4401,29 +4498,29 @@ var Ha = He ? function(e) {
|
|
|
4401
4498
|
for (var e = [], r = 0; r < Xt.length; r++)
|
|
4402
4499
|
typeof eu[Xt[r]] == "function" && (e[e.length] = Xt[r]);
|
|
4403
4500
|
return e;
|
|
4404
|
-
}, Pt = mi, tu = gi, wn =
|
|
4501
|
+
}, Pt = mi, tu = gi, wn = Nr, Cr = Lr, It = qt, ru = Cr("Object.prototype.toString"), bi = Mt(), En = typeof globalThis > "u" ? Ir : globalThis, gr = tu(), Dr = Cr("String.prototype.slice"), Zt = Object.getPrototypeOf, nu = Cr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4405
4502
|
for (var n = 0; n < e.length; n += 1)
|
|
4406
4503
|
if (e[n] === r)
|
|
4407
4504
|
return n;
|
|
4408
4505
|
return -1;
|
|
4409
|
-
},
|
|
4410
|
-
bi &&
|
|
4506
|
+
}, Nt = { __proto__: null };
|
|
4507
|
+
bi && It && Zt ? Pt(gr, function(t) {
|
|
4411
4508
|
var e = new En[t]();
|
|
4412
4509
|
if (Symbol.toStringTag in e) {
|
|
4413
|
-
var r = Zt(e), n =
|
|
4510
|
+
var r = Zt(e), n = It(r, Symbol.toStringTag);
|
|
4414
4511
|
if (!n) {
|
|
4415
4512
|
var i = Zt(r);
|
|
4416
|
-
n =
|
|
4513
|
+
n = It(i, Symbol.toStringTag);
|
|
4417
4514
|
}
|
|
4418
|
-
|
|
4515
|
+
Nt["$" + t] = wn(n.get);
|
|
4419
4516
|
}
|
|
4420
4517
|
}) : Pt(gr, function(t) {
|
|
4421
4518
|
var e = new En[t](), r = e.slice || e.set;
|
|
4422
|
-
r && (
|
|
4519
|
+
r && (Nt["$" + t] = wn(r));
|
|
4423
4520
|
});
|
|
4424
4521
|
var iu = function(e) {
|
|
4425
4522
|
var r = !1;
|
|
4426
|
-
return Pt(
|
|
4523
|
+
return Pt(Nt, function(n, i) {
|
|
4427
4524
|
if (!r)
|
|
4428
4525
|
try {
|
|
4429
4526
|
"$" + n(e) === i && (r = Dr(i, 1));
|
|
@@ -4432,7 +4529,7 @@ var iu = function(e) {
|
|
|
4432
4529
|
}), r;
|
|
4433
4530
|
}, ou = function(e) {
|
|
4434
4531
|
var r = !1;
|
|
4435
|
-
return Pt(
|
|
4532
|
+
return Pt(Nt, function(n, i) {
|
|
4436
4533
|
if (!r)
|
|
4437
4534
|
try {
|
|
4438
4535
|
n(e), r = Dr(i, 1);
|
|
@@ -4446,30 +4543,30 @@ var iu = function(e) {
|
|
|
4446
4543
|
var r = Dr(ru(e), 8, -1);
|
|
4447
4544
|
return nu(gr, r) > -1 ? r : r !== "Object" ? !1 : ou(e);
|
|
4448
4545
|
}
|
|
4449
|
-
return
|
|
4450
|
-
},
|
|
4546
|
+
return It ? iu(e) : null;
|
|
4547
|
+
}, Lt = mi, au = gi, An = Nr, Rr = Lr, Ot = qt, uu = Rr("Object.prototype.toString"), vi = Mt(), In = typeof globalThis > "u" ? Ir : globalThis, br = au(), Fr = Rr("String.prototype.slice"), er = Object.getPrototypeOf, cu = Rr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
4451
4548
|
for (var n = 0; n < e.length; n += 1)
|
|
4452
4549
|
if (e[n] === r)
|
|
4453
4550
|
return n;
|
|
4454
4551
|
return -1;
|
|
4455
4552
|
}, Ct = { __proto__: null };
|
|
4456
|
-
vi &&
|
|
4553
|
+
vi && Ot && er ? Lt(br, function(t) {
|
|
4457
4554
|
var e = new In[t]();
|
|
4458
4555
|
if (Symbol.toStringTag in e) {
|
|
4459
|
-
var r = er(e), n =
|
|
4556
|
+
var r = er(e), n = Ot(r, Symbol.toStringTag);
|
|
4460
4557
|
if (!n) {
|
|
4461
4558
|
var i = er(r);
|
|
4462
|
-
n =
|
|
4559
|
+
n = Ot(i, Symbol.toStringTag);
|
|
4463
4560
|
}
|
|
4464
4561
|
Ct["$" + t] = An(n.get);
|
|
4465
4562
|
}
|
|
4466
|
-
}) :
|
|
4563
|
+
}) : Lt(br, function(t) {
|
|
4467
4564
|
var e = new In[t](), r = e.slice || e.set;
|
|
4468
4565
|
r && (Ct["$" + t] = An(r));
|
|
4469
4566
|
});
|
|
4470
4567
|
var du = function(e) {
|
|
4471
4568
|
var r = !1;
|
|
4472
|
-
return
|
|
4569
|
+
return Lt(
|
|
4473
4570
|
// eslint-disable-next-line no-extra-parens
|
|
4474
4571
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
4475
4572
|
/** @type {any} */
|
|
@@ -4485,7 +4582,7 @@ var du = function(e) {
|
|
|
4485
4582
|
), r;
|
|
4486
4583
|
}, lu = function(e) {
|
|
4487
4584
|
var r = !1;
|
|
4488
|
-
return
|
|
4585
|
+
return Lt(
|
|
4489
4586
|
// eslint-disable-next-line no-extra-parens
|
|
4490
4587
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
4491
4588
|
/** @type {any} */
|
|
@@ -4506,12 +4603,12 @@ var du = function(e) {
|
|
|
4506
4603
|
var r = Fr(uu(e), 8, -1);
|
|
4507
4604
|
return cu(br, r) > -1 ? r : r !== "Object" ? !1 : lu(e);
|
|
4508
4605
|
}
|
|
4509
|
-
return
|
|
4606
|
+
return Ot ? du(e) : null;
|
|
4510
4607
|
}, pu = fu, hu = function(e) {
|
|
4511
4608
|
return !!pu(e);
|
|
4512
4609
|
};
|
|
4513
4610
|
(function(t) {
|
|
4514
|
-
var e =
|
|
4611
|
+
var e = Na, r = Fa, n = su, i = hu;
|
|
4515
4612
|
function o(y) {
|
|
4516
4613
|
return y.call.bind(y);
|
|
4517
4614
|
}
|
|
@@ -4538,10 +4635,10 @@ var du = function(e) {
|
|
|
4538
4635
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(y) : i(y) || h(y);
|
|
4539
4636
|
}
|
|
4540
4637
|
t.isArrayBufferView = E;
|
|
4541
|
-
function
|
|
4638
|
+
function L(y) {
|
|
4542
4639
|
return n(y) === "Uint8Array";
|
|
4543
4640
|
}
|
|
4544
|
-
t.isUint8Array =
|
|
4641
|
+
t.isUint8Array = L;
|
|
4545
4642
|
function b(y) {
|
|
4546
4643
|
return n(y) === "Uint8ClampedArray";
|
|
4547
4644
|
}
|
|
@@ -4558,14 +4655,14 @@ var du = function(e) {
|
|
|
4558
4655
|
return n(y) === "Int8Array";
|
|
4559
4656
|
}
|
|
4560
4657
|
t.isInt8Array = A;
|
|
4561
|
-
function
|
|
4658
|
+
function x(y) {
|
|
4562
4659
|
return n(y) === "Int16Array";
|
|
4563
4660
|
}
|
|
4564
|
-
t.isInt16Array =
|
|
4565
|
-
function
|
|
4661
|
+
t.isInt16Array = x;
|
|
4662
|
+
function N(y) {
|
|
4566
4663
|
return n(y) === "Int32Array";
|
|
4567
4664
|
}
|
|
4568
|
-
t.isInt32Array =
|
|
4665
|
+
t.isInt32Array = N;
|
|
4569
4666
|
function ue(y) {
|
|
4570
4667
|
return n(y) === "Float32Array";
|
|
4571
4668
|
}
|
|
@@ -4586,18 +4683,18 @@ var du = function(e) {
|
|
|
4586
4683
|
return u(y) === "[object Map]";
|
|
4587
4684
|
}
|
|
4588
4685
|
ye.working = typeof Map < "u" && ye(/* @__PURE__ */ new Map());
|
|
4589
|
-
function
|
|
4686
|
+
function jt(y) {
|
|
4590
4687
|
return typeof Map > "u" ? !1 : ye.working ? ye(y) : y instanceof Map;
|
|
4591
4688
|
}
|
|
4592
|
-
t.isMap =
|
|
4689
|
+
t.isMap = jt;
|
|
4593
4690
|
function Oe(y) {
|
|
4594
4691
|
return u(y) === "[object Set]";
|
|
4595
4692
|
}
|
|
4596
4693
|
Oe.working = typeof Set < "u" && Oe(/* @__PURE__ */ new Set());
|
|
4597
|
-
function
|
|
4694
|
+
function rt(y) {
|
|
4598
4695
|
return typeof Set > "u" ? !1 : Oe.working ? Oe(y) : y instanceof Set;
|
|
4599
4696
|
}
|
|
4600
|
-
t.isSet =
|
|
4697
|
+
t.isSet = rt;
|
|
4601
4698
|
function Fe(y) {
|
|
4602
4699
|
return u(y) === "[object WeakMap]";
|
|
4603
4700
|
}
|
|
@@ -4614,14 +4711,14 @@ var du = function(e) {
|
|
|
4614
4711
|
return Ve(y);
|
|
4615
4712
|
}
|
|
4616
4713
|
t.isWeakSet = me;
|
|
4617
|
-
function
|
|
4714
|
+
function Ue(y) {
|
|
4618
4715
|
return u(y) === "[object ArrayBuffer]";
|
|
4619
4716
|
}
|
|
4620
|
-
|
|
4621
|
-
function
|
|
4622
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
4717
|
+
Ue.working = typeof ArrayBuffer < "u" && Ue(new ArrayBuffer());
|
|
4718
|
+
function lt(y) {
|
|
4719
|
+
return typeof ArrayBuffer > "u" ? !1 : Ue.working ? Ue(y) : y instanceof ArrayBuffer;
|
|
4623
4720
|
}
|
|
4624
|
-
t.isArrayBuffer =
|
|
4721
|
+
t.isArrayBuffer = lt;
|
|
4625
4722
|
function f(y) {
|
|
4626
4723
|
return u(y) === "[object DataView]";
|
|
4627
4724
|
}
|
|
@@ -4634,22 +4731,22 @@ var du = function(e) {
|
|
|
4634
4731
|
function I(y) {
|
|
4635
4732
|
return u(y) === "[object SharedArrayBuffer]";
|
|
4636
4733
|
}
|
|
4637
|
-
function
|
|
4734
|
+
function F(y) {
|
|
4638
4735
|
return typeof m > "u" ? !1 : (typeof I.working > "u" && (I.working = I(new m())), I.working ? I(y) : y instanceof m);
|
|
4639
4736
|
}
|
|
4640
|
-
t.isSharedArrayBuffer =
|
|
4641
|
-
function
|
|
4737
|
+
t.isSharedArrayBuffer = F;
|
|
4738
|
+
function U(y) {
|
|
4642
4739
|
return u(y) === "[object AsyncFunction]";
|
|
4643
4740
|
}
|
|
4644
|
-
t.isAsyncFunction =
|
|
4741
|
+
t.isAsyncFunction = U;
|
|
4645
4742
|
function k(y) {
|
|
4646
4743
|
return u(y) === "[object Map Iterator]";
|
|
4647
4744
|
}
|
|
4648
4745
|
t.isMapIterator = k;
|
|
4649
|
-
function
|
|
4746
|
+
function D(y) {
|
|
4650
4747
|
return u(y) === "[object Set Iterator]";
|
|
4651
4748
|
}
|
|
4652
|
-
t.isSetIterator =
|
|
4749
|
+
t.isSetIterator = D;
|
|
4653
4750
|
function M(y) {
|
|
4654
4751
|
return u(y) === "[object Generator]";
|
|
4655
4752
|
}
|
|
@@ -4662,28 +4759,28 @@ var du = function(e) {
|
|
|
4662
4759
|
return w(y, d);
|
|
4663
4760
|
}
|
|
4664
4761
|
t.isNumberObject = ke;
|
|
4665
|
-
function
|
|
4762
|
+
function ft(y) {
|
|
4666
4763
|
return w(y, c);
|
|
4667
4764
|
}
|
|
4668
|
-
t.isStringObject =
|
|
4669
|
-
function
|
|
4765
|
+
t.isStringObject = ft;
|
|
4766
|
+
function Be(y) {
|
|
4670
4767
|
return w(y, l);
|
|
4671
4768
|
}
|
|
4672
|
-
t.isBooleanObject =
|
|
4673
|
-
function
|
|
4769
|
+
t.isBooleanObject = Be;
|
|
4770
|
+
function pt(y) {
|
|
4674
4771
|
return s && w(y, p);
|
|
4675
4772
|
}
|
|
4676
|
-
t.isBigIntObject =
|
|
4677
|
-
function
|
|
4773
|
+
t.isBigIntObject = pt;
|
|
4774
|
+
function Br(y) {
|
|
4678
4775
|
return a && w(y, g);
|
|
4679
4776
|
}
|
|
4680
|
-
t.isSymbolObject =
|
|
4777
|
+
t.isSymbolObject = Br;
|
|
4681
4778
|
function Ii(y) {
|
|
4682
|
-
return ke(y) ||
|
|
4779
|
+
return ke(y) || ft(y) || Be(y) || pt(y) || Br(y);
|
|
4683
4780
|
}
|
|
4684
4781
|
t.isBoxedPrimitive = Ii;
|
|
4685
4782
|
function Oi(y) {
|
|
4686
|
-
return typeof Uint8Array < "u" && (
|
|
4783
|
+
return typeof Uint8Array < "u" && (lt(y) || F(y));
|
|
4687
4784
|
}
|
|
4688
4785
|
t.isAnyArrayBuffer = Oi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4689
4786
|
Object.defineProperty(t, y, {
|
|
@@ -4717,8 +4814,8 @@ typeof Object.create == "function" ? vr.exports = function(e, r) {
|
|
|
4717
4814
|
var mu = vr.exports;
|
|
4718
4815
|
(function(t) {
|
|
4719
4816
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
4720
|
-
for (var m = Object.keys(h), I = {},
|
|
4721
|
-
I[m[
|
|
4817
|
+
for (var m = Object.keys(h), I = {}, F = 0; F < m.length; F++)
|
|
4818
|
+
I[m[F]] = Object.getOwnPropertyDescriptor(h, m[F]);
|
|
4722
4819
|
return I;
|
|
4723
4820
|
}, r = /%[sdj%]/g;
|
|
4724
4821
|
t.format = function(f) {
|
|
@@ -4727,10 +4824,10 @@ var mu = vr.exports;
|
|
|
4727
4824
|
h.push(s(arguments[m]));
|
|
4728
4825
|
return h.join(" ");
|
|
4729
4826
|
}
|
|
4730
|
-
for (var m = 1, I = arguments,
|
|
4731
|
-
if (
|
|
4732
|
-
if (m >=
|
|
4733
|
-
switch (
|
|
4827
|
+
for (var m = 1, I = arguments, F = I.length, U = String(f).replace(r, function(D) {
|
|
4828
|
+
if (D === "%%") return "%";
|
|
4829
|
+
if (m >= F) return D;
|
|
4830
|
+
switch (D) {
|
|
4734
4831
|
case "%s":
|
|
4735
4832
|
return String(I[m++]);
|
|
4736
4833
|
case "%d":
|
|
@@ -4742,11 +4839,11 @@ var mu = vr.exports;
|
|
|
4742
4839
|
return "[Circular]";
|
|
4743
4840
|
}
|
|
4744
4841
|
default:
|
|
4745
|
-
return
|
|
4842
|
+
return D;
|
|
4746
4843
|
}
|
|
4747
|
-
}), k = I[m]; m <
|
|
4748
|
-
b(k) || !ce(k) ?
|
|
4749
|
-
return
|
|
4844
|
+
}), k = I[m]; m < F; k = I[++m])
|
|
4845
|
+
b(k) || !ce(k) ? U += " " + k : U += " " + s(k);
|
|
4846
|
+
return U;
|
|
4750
4847
|
}, t.deprecate = function(f, h) {
|
|
4751
4848
|
if (typeof O < "u" && O.noDeprecation === !0)
|
|
4752
4849
|
return f;
|
|
@@ -4788,7 +4885,7 @@ var mu = vr.exports;
|
|
|
4788
4885
|
seen: [],
|
|
4789
4886
|
stylize: u
|
|
4790
4887
|
};
|
|
4791
|
-
return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]),
|
|
4888
|
+
return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), L(h) ? m.showHidden = h : h && t._extend(m, h), N(m.showHidden) && (m.showHidden = !1), N(m.depth) && (m.depth = 2), N(m.colors) && (m.colors = !1), N(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = a), c(m, f, m.depth);
|
|
4792
4889
|
}
|
|
4793
4890
|
t.inspect = s, s.colors = {
|
|
4794
4891
|
bold: [1, 22],
|
|
@@ -4835,16 +4932,16 @@ var mu = vr.exports;
|
|
|
4835
4932
|
var I = h.inspect(m, f);
|
|
4836
4933
|
return A(I) || (I = c(f, I, m)), I;
|
|
4837
4934
|
}
|
|
4838
|
-
var
|
|
4839
|
-
if (
|
|
4840
|
-
return
|
|
4841
|
-
var
|
|
4842
|
-
if (f.showHidden && (
|
|
4935
|
+
var F = l(f, h);
|
|
4936
|
+
if (F)
|
|
4937
|
+
return F;
|
|
4938
|
+
var U = Object.keys(h), k = d(U);
|
|
4939
|
+
if (f.showHidden && (U = Object.getOwnPropertyNames(h)), _e(h) && (U.indexOf("message") >= 0 || U.indexOf("description") >= 0))
|
|
4843
4940
|
return p(h);
|
|
4844
|
-
if (
|
|
4941
|
+
if (U.length === 0) {
|
|
4845
4942
|
if (ye(h)) {
|
|
4846
|
-
var
|
|
4847
|
-
return f.stylize("[Function" +
|
|
4943
|
+
var D = h.name ? ": " + h.name : "";
|
|
4944
|
+
return f.stylize("[Function" + D + "]", "special");
|
|
4848
4945
|
}
|
|
4849
4946
|
if (ue(h))
|
|
4850
4947
|
return f.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
@@ -4855,21 +4952,21 @@ var mu = vr.exports;
|
|
|
4855
4952
|
}
|
|
4856
4953
|
var M = "", Z = !1, ke = ["{", "}"];
|
|
4857
4954
|
if (E(h) && (Z = !0, ke = ["[", "]"]), ye(h)) {
|
|
4858
|
-
var
|
|
4859
|
-
M = " [Function" +
|
|
4955
|
+
var ft = h.name ? ": " + h.name : "";
|
|
4956
|
+
M = " [Function" + ft + "]";
|
|
4860
4957
|
}
|
|
4861
|
-
if (ue(h) && (M = " " + RegExp.prototype.toString.call(h)), Re(h) && (M = " " + Date.prototype.toUTCString.call(h)), _e(h) && (M = " " + p(h)),
|
|
4958
|
+
if (ue(h) && (M = " " + RegExp.prototype.toString.call(h)), Re(h) && (M = " " + Date.prototype.toUTCString.call(h)), _e(h) && (M = " " + p(h)), U.length === 0 && (!Z || h.length == 0))
|
|
4862
4959
|
return ke[0] + M + ke[1];
|
|
4863
4960
|
if (m < 0)
|
|
4864
4961
|
return ue(h) ? f.stylize(RegExp.prototype.toString.call(h), "regexp") : f.stylize("[Object]", "special");
|
|
4865
4962
|
f.seen.push(h);
|
|
4866
|
-
var
|
|
4867
|
-
return Z ?
|
|
4868
|
-
return w(f, h, m, k,
|
|
4869
|
-
}), f.seen.pop(), v(
|
|
4963
|
+
var Be;
|
|
4964
|
+
return Z ? Be = g(f, h, m, k, U) : Be = U.map(function(pt) {
|
|
4965
|
+
return w(f, h, m, k, pt, Z);
|
|
4966
|
+
}), f.seen.pop(), v(Be, M, ke);
|
|
4870
4967
|
}
|
|
4871
4968
|
function l(f, h) {
|
|
4872
|
-
if (
|
|
4969
|
+
if (N(h))
|
|
4873
4970
|
return f.stylize("undefined", "undefined");
|
|
4874
4971
|
if (A(h)) {
|
|
4875
4972
|
var m = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
@@ -4877,7 +4974,7 @@ var mu = vr.exports;
|
|
|
4877
4974
|
}
|
|
4878
4975
|
if (_(h))
|
|
4879
4976
|
return f.stylize("" + h, "number");
|
|
4880
|
-
if (
|
|
4977
|
+
if (L(h))
|
|
4881
4978
|
return f.stylize("" + h, "boolean");
|
|
4882
4979
|
if (b(h))
|
|
4883
4980
|
return f.stylize("null", "null");
|
|
@@ -4885,18 +4982,18 @@ var mu = vr.exports;
|
|
|
4885
4982
|
function p(f) {
|
|
4886
4983
|
return "[" + Error.prototype.toString.call(f) + "]";
|
|
4887
4984
|
}
|
|
4888
|
-
function g(f, h, m, I,
|
|
4889
|
-
for (var
|
|
4890
|
-
Ve(h, String(k)) ?
|
|
4985
|
+
function g(f, h, m, I, F) {
|
|
4986
|
+
for (var U = [], k = 0, D = h.length; k < D; ++k)
|
|
4987
|
+
Ve(h, String(k)) ? U.push(w(
|
|
4891
4988
|
f,
|
|
4892
4989
|
h,
|
|
4893
4990
|
m,
|
|
4894
4991
|
I,
|
|
4895
4992
|
String(k),
|
|
4896
4993
|
!0
|
|
4897
|
-
)) :
|
|
4898
|
-
return
|
|
4899
|
-
M.match(/^\d+$/) ||
|
|
4994
|
+
)) : U.push("");
|
|
4995
|
+
return F.forEach(function(M) {
|
|
4996
|
+
M.match(/^\d+$/) || U.push(w(
|
|
4900
4997
|
f,
|
|
4901
4998
|
h,
|
|
4902
4999
|
m,
|
|
@@ -4904,31 +5001,31 @@ var mu = vr.exports;
|
|
|
4904
5001
|
M,
|
|
4905
5002
|
!0
|
|
4906
5003
|
));
|
|
4907
|
-
}),
|
|
5004
|
+
}), U;
|
|
4908
5005
|
}
|
|
4909
|
-
function w(f, h, m, I,
|
|
4910
|
-
var k,
|
|
4911
|
-
if (M = Object.getOwnPropertyDescriptor(h,
|
|
4912
|
-
`) > -1 && (
|
|
5006
|
+
function w(f, h, m, I, F, U) {
|
|
5007
|
+
var k, D, M;
|
|
5008
|
+
if (M = Object.getOwnPropertyDescriptor(h, F) || { value: h[F] }, M.get ? M.set ? D = f.stylize("[Getter/Setter]", "special") : D = f.stylize("[Getter]", "special") : M.set && (D = f.stylize("[Setter]", "special")), Ve(I, F) || (k = "[" + F + "]"), D || (f.seen.indexOf(M.value) < 0 ? (b(m) ? D = c(f, M.value, null) : D = c(f, M.value, m - 1), D.indexOf(`
|
|
5009
|
+
`) > -1 && (U ? D = D.split(`
|
|
4913
5010
|
`).map(function(Z) {
|
|
4914
5011
|
return " " + Z;
|
|
4915
5012
|
}).join(`
|
|
4916
|
-
`).slice(2) :
|
|
4917
|
-
` +
|
|
5013
|
+
`).slice(2) : D = `
|
|
5014
|
+
` + D.split(`
|
|
4918
5015
|
`).map(function(Z) {
|
|
4919
5016
|
return " " + Z;
|
|
4920
5017
|
}).join(`
|
|
4921
|
-
`))) :
|
|
4922
|
-
if (
|
|
4923
|
-
return
|
|
4924
|
-
k = JSON.stringify("" +
|
|
5018
|
+
`))) : D = f.stylize("[Circular]", "special")), N(k)) {
|
|
5019
|
+
if (U && F.match(/^\d+$/))
|
|
5020
|
+
return D;
|
|
5021
|
+
k = JSON.stringify("" + F), k.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (k = k.slice(1, -1), k = f.stylize(k, "name")) : (k = k.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), k = f.stylize(k, "string"));
|
|
4925
5022
|
}
|
|
4926
|
-
return k + ": " +
|
|
5023
|
+
return k + ": " + D;
|
|
4927
5024
|
}
|
|
4928
5025
|
function v(f, h, m) {
|
|
4929
|
-
var I = f.reduce(function(
|
|
4930
|
-
return
|
|
4931
|
-
`) >= 0,
|
|
5026
|
+
var I = f.reduce(function(F, U) {
|
|
5027
|
+
return U.indexOf(`
|
|
5028
|
+
`) >= 0, F + U.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4932
5029
|
}, 0);
|
|
4933
5030
|
return I > 60 ? m[0] + (h === "" ? "" : h + `
|
|
4934
5031
|
`) + " " + f.join(`,
|
|
@@ -4939,10 +5036,10 @@ var mu = vr.exports;
|
|
|
4939
5036
|
return Array.isArray(f);
|
|
4940
5037
|
}
|
|
4941
5038
|
t.isArray = E;
|
|
4942
|
-
function
|
|
5039
|
+
function L(f) {
|
|
4943
5040
|
return typeof f == "boolean";
|
|
4944
5041
|
}
|
|
4945
|
-
t.isBoolean =
|
|
5042
|
+
t.isBoolean = L;
|
|
4946
5043
|
function b(f) {
|
|
4947
5044
|
return f === null;
|
|
4948
5045
|
}
|
|
@@ -4959,14 +5056,14 @@ var mu = vr.exports;
|
|
|
4959
5056
|
return typeof f == "string";
|
|
4960
5057
|
}
|
|
4961
5058
|
t.isString = A;
|
|
4962
|
-
function
|
|
5059
|
+
function x(f) {
|
|
4963
5060
|
return typeof f == "symbol";
|
|
4964
5061
|
}
|
|
4965
|
-
t.isSymbol =
|
|
4966
|
-
function
|
|
5062
|
+
t.isSymbol = x;
|
|
5063
|
+
function N(f) {
|
|
4967
5064
|
return f === void 0;
|
|
4968
5065
|
}
|
|
4969
|
-
t.isUndefined =
|
|
5066
|
+
t.isUndefined = N;
|
|
4970
5067
|
function ue(f) {
|
|
4971
5068
|
return ce(f) && Oe(f) === "[object RegExp]";
|
|
4972
5069
|
}
|
|
@@ -4987,15 +5084,15 @@ var mu = vr.exports;
|
|
|
4987
5084
|
return typeof f == "function";
|
|
4988
5085
|
}
|
|
4989
5086
|
t.isFunction = ye;
|
|
4990
|
-
function
|
|
5087
|
+
function jt(f) {
|
|
4991
5088
|
return f === null || typeof f == "boolean" || typeof f == "number" || typeof f == "string" || typeof f == "symbol" || // ES6 symbol
|
|
4992
5089
|
typeof f > "u";
|
|
4993
5090
|
}
|
|
4994
|
-
t.isPrimitive =
|
|
5091
|
+
t.isPrimitive = jt, t.isBuffer = yu;
|
|
4995
5092
|
function Oe(f) {
|
|
4996
5093
|
return Object.prototype.toString.call(f);
|
|
4997
5094
|
}
|
|
4998
|
-
function
|
|
5095
|
+
function rt(f) {
|
|
4999
5096
|
return f < 10 ? "0" + f.toString(10) : f.toString(10);
|
|
5000
5097
|
}
|
|
5001
5098
|
var Fe = [
|
|
@@ -5014,9 +5111,9 @@ var mu = vr.exports;
|
|
|
5014
5111
|
];
|
|
5015
5112
|
function Qt() {
|
|
5016
5113
|
var f = /* @__PURE__ */ new Date(), h = [
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5114
|
+
rt(f.getHours()),
|
|
5115
|
+
rt(f.getMinutes()),
|
|
5116
|
+
rt(f.getSeconds())
|
|
5020
5117
|
].join(":");
|
|
5021
5118
|
return [f.getDate(), Fe[f.getMonth()], h].join(" ");
|
|
5022
5119
|
}
|
|
@@ -5047,19 +5144,19 @@ var mu = vr.exports;
|
|
|
5047
5144
|
}), m;
|
|
5048
5145
|
}
|
|
5049
5146
|
function m() {
|
|
5050
|
-
for (var I,
|
|
5051
|
-
I = M,
|
|
5052
|
-
}), k = [],
|
|
5053
|
-
k.push(arguments[
|
|
5147
|
+
for (var I, F, U = new Promise(function(M, Z) {
|
|
5148
|
+
I = M, F = Z;
|
|
5149
|
+
}), k = [], D = 0; D < arguments.length; D++)
|
|
5150
|
+
k.push(arguments[D]);
|
|
5054
5151
|
k.push(function(M, Z) {
|
|
5055
|
-
M ?
|
|
5152
|
+
M ? F(M) : I(Z);
|
|
5056
5153
|
});
|
|
5057
5154
|
try {
|
|
5058
5155
|
h.apply(this, k);
|
|
5059
5156
|
} catch (M) {
|
|
5060
|
-
|
|
5157
|
+
F(M);
|
|
5061
5158
|
}
|
|
5062
|
-
return
|
|
5159
|
+
return U;
|
|
5063
5160
|
}
|
|
5064
5161
|
return Object.setPrototypeOf(m, Object.getPrototypeOf(h)), me && Object.defineProperty(m, me, {
|
|
5065
5162
|
value: m,
|
|
@@ -5071,31 +5168,31 @@ var mu = vr.exports;
|
|
|
5071
5168
|
e(h)
|
|
5072
5169
|
);
|
|
5073
5170
|
}, t.promisify.custom = me;
|
|
5074
|
-
function
|
|
5171
|
+
function Ue(f, h) {
|
|
5075
5172
|
if (!f) {
|
|
5076
5173
|
var m = new Error("Promise was rejected with a falsy value");
|
|
5077
5174
|
m.reason = f, f = m;
|
|
5078
5175
|
}
|
|
5079
5176
|
return h(f);
|
|
5080
5177
|
}
|
|
5081
|
-
function
|
|
5178
|
+
function lt(f) {
|
|
5082
5179
|
if (typeof f != "function")
|
|
5083
5180
|
throw new TypeError('The "original" argument must be of type Function');
|
|
5084
5181
|
function h() {
|
|
5085
5182
|
for (var m = [], I = 0; I < arguments.length; I++)
|
|
5086
5183
|
m.push(arguments[I]);
|
|
5087
|
-
var
|
|
5088
|
-
if (typeof
|
|
5184
|
+
var F = m.pop();
|
|
5185
|
+
if (typeof F != "function")
|
|
5089
5186
|
throw new TypeError("The last argument must be of type Function");
|
|
5090
|
-
var
|
|
5091
|
-
return
|
|
5187
|
+
var U = this, k = function() {
|
|
5188
|
+
return F.apply(U, arguments);
|
|
5092
5189
|
};
|
|
5093
5190
|
f.apply(this, m).then(
|
|
5094
|
-
function(
|
|
5095
|
-
O.nextTick(k.bind(null, null,
|
|
5191
|
+
function(D) {
|
|
5192
|
+
O.nextTick(k.bind(null, null, D));
|
|
5096
5193
|
},
|
|
5097
|
-
function(
|
|
5098
|
-
O.nextTick(
|
|
5194
|
+
function(D) {
|
|
5195
|
+
O.nextTick(Ue.bind(null, D, k));
|
|
5099
5196
|
}
|
|
5100
5197
|
);
|
|
5101
5198
|
}
|
|
@@ -5104,9 +5201,9 @@ var mu = vr.exports;
|
|
|
5104
5201
|
e(f)
|
|
5105
5202
|
), h;
|
|
5106
5203
|
}
|
|
5107
|
-
t.callbackify =
|
|
5108
|
-
})(
|
|
5109
|
-
const { inherits: gu, format: tr } =
|
|
5204
|
+
t.callbackify = lt;
|
|
5205
|
+
})(Bt);
|
|
5206
|
+
const { inherits: gu, format: tr } = Bt;
|
|
5110
5207
|
function Pe(t, e, r = Error) {
|
|
5111
5208
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
5112
5209
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -5323,20 +5420,20 @@ function Au(t) {
|
|
|
5323
5420
|
function v(...E) {
|
|
5324
5421
|
if (!v.enabled)
|
|
5325
5422
|
return;
|
|
5326
|
-
const
|
|
5327
|
-
|
|
5423
|
+
const L = v, b = Number(/* @__PURE__ */ new Date()), S = b - (l || b);
|
|
5424
|
+
L.diff = S, L.prev = l, L.curr = b, l = b, E[0] = r.coerce(E[0]), typeof E[0] != "string" && E.unshift("%O");
|
|
5328
5425
|
let _ = 0;
|
|
5329
|
-
E[0] = E[0].replace(/%([a-zA-Z%])/g, (
|
|
5330
|
-
if (
|
|
5426
|
+
E[0] = E[0].replace(/%([a-zA-Z%])/g, (x, N) => {
|
|
5427
|
+
if (x === "%%")
|
|
5331
5428
|
return "%";
|
|
5332
5429
|
_++;
|
|
5333
|
-
const ue = r.formatters[
|
|
5430
|
+
const ue = r.formatters[N];
|
|
5334
5431
|
if (typeof ue == "function") {
|
|
5335
5432
|
const ce = E[_];
|
|
5336
|
-
|
|
5433
|
+
x = ue.call(L, ce), E.splice(_, 1), _--;
|
|
5337
5434
|
}
|
|
5338
|
-
return
|
|
5339
|
-
}), r.formatArgs.call(
|
|
5435
|
+
return x;
|
|
5436
|
+
}), r.formatArgs.call(L, E), (L.log || r.log).apply(L, E);
|
|
5340
5437
|
}
|
|
5341
5438
|
return v.namespace = c, v.useColors = r.useColors(), v.color = r.selectColor(c), v.extend = n, v.destroy = r.destroy, Object.defineProperty(v, "enabled", {
|
|
5342
5439
|
enumerable: !0,
|
|
@@ -5523,27 +5620,27 @@ var Iu = Au;
|
|
|
5523
5620
|
};
|
|
5524
5621
|
})(Sr, Sr.exports);
|
|
5525
5622
|
var wi = Sr.exports;
|
|
5526
|
-
const Ou = zn, Tu = ni.EventEmitter, _u =
|
|
5623
|
+
const Ou = zn, Tu = ni.EventEmitter, _u = Bt.inherits, Y = wi("avvio"), { AVV_ERR_READY_TIMEOUT: ku } = Si, ir = Symbol.for("plugin-meta");
|
|
5527
5624
|
function Pu(t, e) {
|
|
5528
5625
|
return t[ir] && t[ir].name ? t[ir].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
5529
5626
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
5530
5627
|
}
|
|
5531
|
-
function
|
|
5628
|
+
function Nu() {
|
|
5532
5629
|
const t = {};
|
|
5533
5630
|
return t.promise = new Promise((e, r) => {
|
|
5534
5631
|
t.resolve = e, t.reject = r;
|
|
5535
5632
|
}), t;
|
|
5536
5633
|
}
|
|
5537
|
-
function
|
|
5538
|
-
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 = Pu(e, r), this.isAfter = n, this.q = Ou(t,
|
|
5634
|
+
function tt(t, e, r, n, i) {
|
|
5635
|
+
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 = Pu(e, r), this.isAfter = n, this.q = Ou(t, Lu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
5539
5636
|
}
|
|
5540
|
-
_u(
|
|
5541
|
-
|
|
5637
|
+
_u(tt, Tu);
|
|
5638
|
+
tt.prototype.exec = function(t, e) {
|
|
5542
5639
|
const r = this.func;
|
|
5543
5640
|
let n = !1;
|
|
5544
5641
|
const i = this.name;
|
|
5545
5642
|
if (this.parent._error && !this.isAfter) {
|
|
5546
|
-
|
|
5643
|
+
Y("skipping loading of plugin as parent errored and it is not an after", i), O.nextTick(e);
|
|
5547
5644
|
return;
|
|
5548
5645
|
}
|
|
5549
5646
|
if (this.isAfter)
|
|
@@ -5552,75 +5649,75 @@ et.prototype.exec = function(t, e) {
|
|
|
5552
5649
|
try {
|
|
5553
5650
|
this.server = this.parent.override(t, r, this.opts);
|
|
5554
5651
|
} catch (u) {
|
|
5555
|
-
return
|
|
5652
|
+
return Y("override errored", i), e(u);
|
|
5556
5653
|
}
|
|
5557
|
-
this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts,
|
|
5654
|
+
this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, Y("exec", i);
|
|
5558
5655
|
let o;
|
|
5559
5656
|
const s = (u) => {
|
|
5560
5657
|
if (n) {
|
|
5561
|
-
|
|
5658
|
+
Y("loading complete", i);
|
|
5562
5659
|
return;
|
|
5563
5660
|
}
|
|
5564
|
-
this._error = u,
|
|
5661
|
+
this._error = u, Y(u ? "exec errored" : "exec completed", i), n = !0, o && clearTimeout(o), e(u);
|
|
5565
5662
|
};
|
|
5566
|
-
this.timeout > 0 && (
|
|
5567
|
-
|
|
5663
|
+
this.timeout > 0 && (Y("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
5664
|
+
Y("timed out", i), o = null;
|
|
5568
5665
|
const u = new ku(i);
|
|
5569
5666
|
u.fn = r, s(u);
|
|
5570
5667
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
5571
5668
|
const a = r(this.server, this.opts, s);
|
|
5572
|
-
a && typeof a.then == "function" && (
|
|
5669
|
+
a && typeof a.then == "function" && (Y("exec: resolving promise", i), a.then(
|
|
5573
5670
|
() => O.nextTick(s),
|
|
5574
5671
|
(u) => O.nextTick(s, u)
|
|
5575
5672
|
));
|
|
5576
5673
|
};
|
|
5577
|
-
|
|
5674
|
+
tt.prototype.loadedSoFar = function() {
|
|
5578
5675
|
if (this.loaded)
|
|
5579
5676
|
return Promise.resolve();
|
|
5580
5677
|
const t = () => {
|
|
5581
5678
|
this.server.after((r, n) => {
|
|
5582
|
-
this._error = r, this.q.pause(), r ? (
|
|
5679
|
+
this._error = r, this.q.pause(), r ? (Y("rejecting promise", this.name, r), this._promise.reject(r)) : (Y("resolving promise", this.name), this._promise.resolve()), this._promise = null, O.nextTick(n, r);
|
|
5583
5680
|
}), this.q.resume();
|
|
5584
5681
|
};
|
|
5585
5682
|
let e;
|
|
5586
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
5683
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Nu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
5587
5684
|
};
|
|
5588
|
-
|
|
5589
|
-
|
|
5685
|
+
tt.prototype.enqueue = function(t, e) {
|
|
5686
|
+
Y("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
5590
5687
|
};
|
|
5591
|
-
|
|
5592
|
-
|
|
5688
|
+
tt.prototype.finish = function(t, e) {
|
|
5689
|
+
Y("finish", this.name, t);
|
|
5593
5690
|
const r = () => {
|
|
5594
|
-
this.loaded || (
|
|
5691
|
+
this.loaded || (Y("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
5595
5692
|
};
|
|
5596
5693
|
if (t) {
|
|
5597
5694
|
this._promise && (this._promise.reject(t), this._promise = null), r();
|
|
5598
5695
|
return;
|
|
5599
5696
|
}
|
|
5600
5697
|
const n = () => {
|
|
5601
|
-
if (
|
|
5698
|
+
if (Y("check", this.name, this.q.length(), this.q.running(), this._promise), this.q.length() === 0 && this.q.running() === 0)
|
|
5602
5699
|
if (this._promise) {
|
|
5603
5700
|
const i = () => {
|
|
5604
|
-
|
|
5701
|
+
Y("wrap"), queueMicrotask(n);
|
|
5605
5702
|
};
|
|
5606
5703
|
this._promise.resolve(), this._promise.promise.then(i, i), this._promise = null;
|
|
5607
5704
|
} else
|
|
5608
5705
|
r();
|
|
5609
5706
|
else
|
|
5610
|
-
|
|
5611
|
-
|
|
5707
|
+
Y("delayed", this.name), this.q.drain = () => {
|
|
5708
|
+
Y("drain", this.name), this.q.drain = Cu, queueMicrotask(n);
|
|
5612
5709
|
};
|
|
5613
5710
|
};
|
|
5614
5711
|
queueMicrotask(n), this.q.resume();
|
|
5615
5712
|
};
|
|
5616
|
-
function
|
|
5713
|
+
function Lu(t, e) {
|
|
5617
5714
|
const r = this;
|
|
5618
|
-
O.nextTick(
|
|
5715
|
+
O.nextTick(Ur.bind(r), t, e);
|
|
5619
5716
|
}
|
|
5620
|
-
function
|
|
5717
|
+
function Ur(t, e) {
|
|
5621
5718
|
if (typeof t.func.then == "function") {
|
|
5622
5719
|
t.func.then((n) => {
|
|
5623
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
5720
|
+
typeof n.default == "function" && (n = n.default), t.func = n, Ur.call(this, t, e);
|
|
5624
5721
|
}, e);
|
|
5625
5722
|
return;
|
|
5626
5723
|
}
|
|
@@ -5633,17 +5730,17 @@ function Br(t, e) {
|
|
|
5633
5730
|
}
|
|
5634
5731
|
function Cu() {
|
|
5635
5732
|
}
|
|
5636
|
-
Vr.exports =
|
|
5637
|
-
Vr.exports.loadPlugin =
|
|
5733
|
+
Vr.exports = tt;
|
|
5734
|
+
Vr.exports.loadPlugin = Ur;
|
|
5638
5735
|
var Du = Vr.exports;
|
|
5639
|
-
const
|
|
5736
|
+
const Nn = zn, Ru = ni.EventEmitter, Fu = Bt.inherits, {
|
|
5640
5737
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: or,
|
|
5641
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
5738
|
+
AVV_ERR_CALLBACK_NOT_FN: st,
|
|
5642
5739
|
AVV_ERR_PLUGIN_NOT_VALID: Vu,
|
|
5643
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
5644
|
-
AVV_ERR_READY_TIMEOUT:
|
|
5645
|
-
} = Si,
|
|
5646
|
-
function
|
|
5740
|
+
AVV_ERR_ROOT_PLG_BOOTED: Uu,
|
|
5741
|
+
AVV_ERR_READY_TIMEOUT: Bu
|
|
5742
|
+
} = Si, Mu = wu, wr = Du, Ze = wi("avvio"), Dt = Symbol("kAvvio"), sr = Symbol("kThenifyDoNotWrap");
|
|
5743
|
+
function $u(t, e, r) {
|
|
5647
5744
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
5648
5745
|
if (t[i])
|
|
5649
5746
|
throw new or(i);
|
|
@@ -5657,34 +5754,34 @@ function Uu(t, e, r) {
|
|
|
5657
5754
|
return typeof d != "function" ? r._loadRegistered() : (r.after(ar(d, this)), this);
|
|
5658
5755
|
}, t[s] = function(d) {
|
|
5659
5756
|
if (d && typeof d != "function")
|
|
5660
|
-
throw new
|
|
5757
|
+
throw new st(s, typeof d);
|
|
5661
5758
|
return r.ready(d ? ar(d, this) : void 0);
|
|
5662
5759
|
}, t[a] = function(d) {
|
|
5663
5760
|
if (typeof d != "function")
|
|
5664
|
-
throw new
|
|
5761
|
+
throw new st(a, typeof d);
|
|
5665
5762
|
return r.onClose(Gu(d, this)), this;
|
|
5666
5763
|
}, t[u] = function(d) {
|
|
5667
5764
|
if (d && typeof d != "function")
|
|
5668
|
-
throw new
|
|
5765
|
+
throw new st(u, typeof d);
|
|
5669
5766
|
return d ? (r.close(ar(d, this)), this) : r.close();
|
|
5670
5767
|
};
|
|
5671
5768
|
}
|
|
5672
|
-
function
|
|
5673
|
-
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof
|
|
5674
|
-
const n = new
|
|
5675
|
-
return t &&
|
|
5676
|
-
}
|
|
5677
|
-
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
|
|
5678
|
-
this.emit("start"), this._readyQ.drain =
|
|
5679
|
-
}, this._closeQ =
|
|
5680
|
-
this.emit("close"), this._closeQ.drain =
|
|
5769
|
+
function J(t, e, r) {
|
|
5770
|
+
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof J)) {
|
|
5771
|
+
const n = new J(t, e, r);
|
|
5772
|
+
return t && $u(t, e, n), n;
|
|
5773
|
+
}
|
|
5774
|
+
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 Mu(), this._readyQ = Nn(this, Ai, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
5775
|
+
this.emit("start"), this._readyQ.drain = Ln;
|
|
5776
|
+
}, this._closeQ = Nn(this, Qu, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5777
|
+
this.emit("close"), this._closeQ.drain = Ln;
|
|
5681
5778
|
}, this._doStart = null, this._root = new wr(this, qu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5682
5779
|
const s = this.pluginTree.start(null, i, o);
|
|
5683
5780
|
this._root.once("loaded", (a, u, d) => {
|
|
5684
5781
|
this.pluginTree.stop(s, d);
|
|
5685
5782
|
});
|
|
5686
5783
|
}), wr.loadPlugin.call(this, this._root, (n) => {
|
|
5687
|
-
|
|
5784
|
+
Ze("root plugin ready");
|
|
5688
5785
|
try {
|
|
5689
5786
|
this.emit("preReady"), this._root = null;
|
|
5690
5787
|
} catch (i) {
|
|
@@ -5701,30 +5798,30 @@ function Y(t, e, r) {
|
|
|
5701
5798
|
function qu(t, e, r) {
|
|
5702
5799
|
this._doStart = r, e.autostart && this.start();
|
|
5703
5800
|
}
|
|
5704
|
-
Fu(
|
|
5705
|
-
|
|
5801
|
+
Fu(J, Ru);
|
|
5802
|
+
J.prototype.start = function() {
|
|
5706
5803
|
return this.started = !0, O.nextTick(this._doStart), this;
|
|
5707
5804
|
};
|
|
5708
|
-
|
|
5805
|
+
J.prototype.override = function(t, e, r) {
|
|
5709
5806
|
return t;
|
|
5710
5807
|
};
|
|
5711
|
-
function
|
|
5808
|
+
function xu(t) {
|
|
5712
5809
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
5713
5810
|
throw new Vu(typeof t);
|
|
5714
5811
|
return t;
|
|
5715
5812
|
}
|
|
5716
|
-
|
|
5717
|
-
|
|
5813
|
+
J.prototype[Dt] = !0;
|
|
5814
|
+
J.prototype.use = function(t, e) {
|
|
5718
5815
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5719
5816
|
};
|
|
5720
|
-
|
|
5817
|
+
J.prototype._loadRegistered = function() {
|
|
5721
5818
|
const t = this._current[0];
|
|
5722
5819
|
return !this.started && !this.booted && O.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
5723
5820
|
};
|
|
5724
|
-
Object.defineProperty(
|
|
5725
|
-
|
|
5726
|
-
if (t =
|
|
5727
|
-
throw new
|
|
5821
|
+
Object.defineProperty(J.prototype, "then", { get: Ei });
|
|
5822
|
+
J.prototype._addPlugin = function(t, e, r) {
|
|
5823
|
+
if (t = xu(t), e = e || {}, this.booted)
|
|
5824
|
+
throw new Uu();
|
|
5728
5825
|
const n = this._current[0], i = new wr(this, t, e, r);
|
|
5729
5826
|
if (i.once("start", (o, s, a) => {
|
|
5730
5827
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -5737,7 +5834,7 @@ Y.prototype._addPlugin = function(t, e, r) {
|
|
|
5737
5834
|
o && (this._error = o);
|
|
5738
5835
|
}), i;
|
|
5739
5836
|
};
|
|
5740
|
-
|
|
5837
|
+
J.prototype.after = function(t) {
|
|
5741
5838
|
if (!t)
|
|
5742
5839
|
return this._loadRegistered();
|
|
5743
5840
|
this._addPlugin(e.bind(this), {}, !0);
|
|
@@ -5746,7 +5843,7 @@ Y.prototype.after = function(t) {
|
|
|
5746
5843
|
}
|
|
5747
5844
|
return this;
|
|
5748
5845
|
};
|
|
5749
|
-
|
|
5846
|
+
J.prototype.onClose = function(t) {
|
|
5750
5847
|
if (typeof t != "function")
|
|
5751
5848
|
throw new Error("not a function");
|
|
5752
5849
|
t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
|
|
@@ -5755,11 +5852,11 @@ Y.prototype.onClose = function(t) {
|
|
|
5755
5852
|
}
|
|
5756
5853
|
return this;
|
|
5757
5854
|
};
|
|
5758
|
-
|
|
5855
|
+
J.prototype.close = function(t) {
|
|
5759
5856
|
let e;
|
|
5760
5857
|
if (t) {
|
|
5761
5858
|
if (typeof t != "function")
|
|
5762
|
-
throw new
|
|
5859
|
+
throw new st("close", typeof t);
|
|
5763
5860
|
} else
|
|
5764
5861
|
e = new Promise(function(r, n) {
|
|
5765
5862
|
t = function(i) {
|
|
@@ -5772,10 +5869,10 @@ Y.prototype.close = function(t) {
|
|
|
5772
5869
|
this._error = null, this._closeQ.push(t), O.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
5773
5870
|
}), e;
|
|
5774
5871
|
};
|
|
5775
|
-
|
|
5872
|
+
J.prototype.ready = function(t) {
|
|
5776
5873
|
if (t) {
|
|
5777
5874
|
if (typeof t != "function")
|
|
5778
|
-
throw new
|
|
5875
|
+
throw new st("ready", typeof t);
|
|
5779
5876
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
5780
5877
|
return;
|
|
5781
5878
|
}
|
|
@@ -5787,24 +5884,24 @@ Y.prototype.ready = function(t) {
|
|
|
5787
5884
|
}
|
|
5788
5885
|
});
|
|
5789
5886
|
};
|
|
5790
|
-
|
|
5887
|
+
J.prototype.prettyPrint = function() {
|
|
5791
5888
|
return this.pluginTree.prittyPrint();
|
|
5792
5889
|
};
|
|
5793
|
-
|
|
5890
|
+
J.prototype.toJSON = function() {
|
|
5794
5891
|
return this.pluginTree.toJSON();
|
|
5795
5892
|
};
|
|
5796
|
-
function
|
|
5893
|
+
function Ln() {
|
|
5797
5894
|
}
|
|
5798
5895
|
function Ei() {
|
|
5799
5896
|
if (this.booted) {
|
|
5800
|
-
|
|
5897
|
+
Ze("thenify returning null because we are already booted");
|
|
5801
5898
|
return;
|
|
5802
5899
|
}
|
|
5803
5900
|
if (this[sr]) {
|
|
5804
5901
|
this[sr] = !1;
|
|
5805
5902
|
return;
|
|
5806
5903
|
}
|
|
5807
|
-
return
|
|
5904
|
+
return Ze("thenify"), (t, e) => this._loadRegistered().then(() => (this[sr] = !0, t(this._server)), e);
|
|
5808
5905
|
}
|
|
5809
5906
|
function Ai(t, e) {
|
|
5810
5907
|
const r = this._server, n = this._error;
|
|
@@ -5819,14 +5916,14 @@ function Ai(t, e) {
|
|
|
5819
5916
|
};
|
|
5820
5917
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5821
5918
|
} else
|
|
5822
|
-
|
|
5919
|
+
ju.call(this, t, n, r, e);
|
|
5823
5920
|
}
|
|
5824
|
-
function
|
|
5921
|
+
function ju(t, e, r, n) {
|
|
5825
5922
|
const i = t.name;
|
|
5826
|
-
|
|
5923
|
+
Ze("setting up ready timeout", i, this._timeout);
|
|
5827
5924
|
let o = setTimeout(() => {
|
|
5828
|
-
|
|
5829
|
-
const a = new
|
|
5925
|
+
Ze("timed out", i), o = null;
|
|
5926
|
+
const a = new Bu(i);
|
|
5830
5927
|
a.fn = t, this._error = a, n(a);
|
|
5831
5928
|
}, this._timeout);
|
|
5832
5929
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5838,7 +5935,7 @@ function Qu(t, e) {
|
|
|
5838
5935
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5839
5936
|
if (t.length === 0 || t.length === 1) {
|
|
5840
5937
|
let i;
|
|
5841
|
-
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (
|
|
5938
|
+
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (Ze("resolving close/onClose promise"), i.then(
|
|
5842
5939
|
() => O.nextTick(e),
|
|
5843
5940
|
(o) => O.nextTick(e, o)
|
|
5844
5941
|
)) : O.nextTick(e);
|
|
@@ -5866,9 +5963,9 @@ function ar(t, e) {
|
|
|
5866
5963
|
}, i) : O.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : O.nextTick(i);
|
|
5867
5964
|
}
|
|
5868
5965
|
}
|
|
5869
|
-
Or.exports =
|
|
5966
|
+
Or.exports = J;
|
|
5870
5967
|
Or.exports.express = function(t) {
|
|
5871
|
-
return
|
|
5968
|
+
return J(t, {
|
|
5872
5969
|
expose: {
|
|
5873
5970
|
use: "load"
|
|
5874
5971
|
}
|
|
@@ -5906,7 +6003,7 @@ function yc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
|
5906
6003
|
onContentActivate: n?.onContentActivate,
|
|
5907
6004
|
withAd: n?.withAd,
|
|
5908
6005
|
withAdNotification: n?.withAdNotification
|
|
5909
|
-
}), s.use(lo, { sdkKey: t, host: i, analyticsHost: o, version: n?.version, webOS: n?.webOS }), s.use(mo), s.use(zo), s.use(cs), s.use(
|
|
6006
|
+
}), s.use(lo, { sdkKey: t, host: i, analyticsHost: o, version: n?.version, webOS: n?.webOS }), s.use(mo), s.use(zo), s.use(cs), s.use(Bo), s.use(Ss), s.after((a, u, d) => {
|
|
5910
6007
|
if (a)
|
|
5911
6008
|
throw a;
|
|
5912
6009
|
u.ready(), d();
|