@streamlayer/sdk-web 1.15.7 → 1.15.9
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 +4 -4
- package/lib/es/index.js +185 -177
- package/package.json +12 -12
package/lib/es/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { pino as _i } from "pino";
|
|
2
2
|
import { QuestionType as T, QuestionStatus as J, AdUnit as ie, PromotionType as D, NotificationEnabled as $r, SilenceSetting as ki, NotificationUseContentTexts as Ur, UseAsNotification as Pi, FactoidMediaMode as Li } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
-
import { Feed as te, PickHistoryStatus as
|
|
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
5
|
import { InvitationCategory as qr, InvitationFrom as jr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
6
|
import { computed as Ni, map as Ci, atom as Rt, batched as xr, onMount as Er, onStart as Di } from "nanostores";
|
|
7
|
-
import { v4 as
|
|
8
|
-
import { ConnectError as
|
|
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";
|
|
@@ -69,20 +69,20 @@ function Bi(t) {
|
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
var Ee = [],
|
|
72
|
+
var Ee = [], ze = !1, Le, bt = -1;
|
|
73
73
|
function Mi() {
|
|
74
|
-
!
|
|
74
|
+
!ze || !Le || (ze = !1, Le.length ? Ee = Le.concat(Ee) : bt = -1, Ee.length && Bn());
|
|
75
75
|
}
|
|
76
76
|
function Bn() {
|
|
77
|
-
if (!
|
|
77
|
+
if (!ze) {
|
|
78
78
|
var t = Vn(Mi);
|
|
79
|
-
|
|
79
|
+
ze = !0;
|
|
80
80
|
for (var e = Ee.length; e; ) {
|
|
81
|
-
for (Le = Ee, Ee = []; ++
|
|
82
|
-
Le && Le[
|
|
83
|
-
|
|
81
|
+
for (Le = Ee, Ee = []; ++bt < e; )
|
|
82
|
+
Le && Le[bt].run();
|
|
83
|
+
bt = -1, e = Ee.length;
|
|
84
84
|
}
|
|
85
|
-
Le = null,
|
|
85
|
+
Le = null, ze = !1, Bi(t);
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
G.nextTick = function(t) {
|
|
@@ -90,7 +90,7 @@ G.nextTick = function(t) {
|
|
|
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 Mn(t, e)), Ee.length === 1 && !
|
|
93
|
+
Ee.push(new Mn(t, e)), Ee.length === 1 && !ze && Vn(Bn);
|
|
94
94
|
};
|
|
95
95
|
function Mn(t, e) {
|
|
96
96
|
this.fun = t, this.array = e;
|
|
@@ -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",
|
|
@@ -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 Ne(ee(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Ne(ee(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Ne(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;
|
|
@@ -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;
|
|
@@ -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 {
|
|
@@ -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(H(e.getExternalToken()), "userKey"), n = new ne(H(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");
|
|
@@ -974,7 +974,7 @@ const mo = (t, e, r) => {
|
|
|
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]
|
|
@@ -1119,7 +1119,7 @@ const mo = (t, e, r) => {
|
|
|
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 = xr(n, (a) => a && a.type === "question" ? a.id : void 0), o =
|
|
1122
|
+
}), i = xr(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,17 +1172,17 @@ 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, Lo = ({ 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
|
}
|
|
@@ -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();
|
|
@@ -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
|
}
|
|
@@ -1693,16 +1693,16 @@ const Mo = (t, e, r) => {
|
|
|
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 });
|
|
@@ -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;
|
|
@@ -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) {
|
|
@@ -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
|
});
|
|
@@ -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)
|
|
@@ -2320,12 +2320,12 @@ const rs = (t, e, r, n) => {
|
|
|
2320
2320
|
});
|
|
2321
2321
|
const u = [];
|
|
2322
2322
|
return a.get() !== Q.Completed && (u.push(e.userId.listen((c) => {
|
|
2323
|
-
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
2331
|
await Qn(r, c), a.set(Q.Completed), s.saveOnboardingStatus({
|
|
@@ -2460,7 +2460,7 @@ class os extends $n {
|
|
|
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;
|
|
@@ -2470,7 +2470,7 @@ class os extends $n {
|
|
|
2470
2470
|
const E = a.find(({ correct: S }) => S), N = p ? a.find(({ id: S }) => S === p) : void 0, b = !!N?.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);
|
|
@@ -2585,8 +2585,8 @@ 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
|
}
|
|
@@ -2606,7 +2606,7 @@ 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)
|
|
@@ -2624,7 +2624,7 @@ class os extends $n {
|
|
|
2624
2624
|
const l = n.get().data;
|
|
2625
2625
|
if (i(), l) {
|
|
2626
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 }, N) => E === o?.answers[N].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 ?
|
|
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
2629
|
}), p?.id === r && (l.answers[g].pointsEarned = l.status === J.RESOLVED ? 0 : p.points), n.mutate({ ...l });
|
|
2630
2630
|
}
|
|
@@ -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
|
});
|
|
@@ -3217,7 +3217,7 @@ class hs {
|
|
|
3217
3217
|
});
|
|
3218
3218
|
};
|
|
3219
3219
|
}
|
|
3220
|
-
const
|
|
3220
|
+
const ot = {
|
|
3221
3221
|
[T.UNSET]: x.UNSET,
|
|
3222
3222
|
[T.FACTOID]: x.POLLS_INSIGHT,
|
|
3223
3223
|
[T.POLL]: x.POLLS_POLL,
|
|
@@ -3288,7 +3288,7 @@ class ms {
|
|
|
3288
3288
|
...this.analytics.commonStore.getValues(),
|
|
3289
3289
|
kind: V.NOTIFICATION_RECEIVED,
|
|
3290
3290
|
topicId: e,
|
|
3291
|
-
topicType: r ?
|
|
3291
|
+
topicType: r ? ot[r] : x.UNSET,
|
|
3292
3292
|
topicSubType: n
|
|
3293
3293
|
},
|
|
3294
3294
|
notificationKind: ge.POLLS,
|
|
@@ -3301,7 +3301,7 @@ class ms {
|
|
|
3301
3301
|
...this.analytics.commonStore.getValues(),
|
|
3302
3302
|
kind: V.NOTIFICATION_OPENED,
|
|
3303
3303
|
topicId: e,
|
|
3304
|
-
topicType: r ?
|
|
3304
|
+
topicType: r ? ot[r] : x.UNSET,
|
|
3305
3305
|
topicSubType: n
|
|
3306
3306
|
},
|
|
3307
3307
|
notificationKind: ge.POLLS,
|
|
@@ -3343,7 +3343,7 @@ class gs {
|
|
|
3343
3343
|
...this.analytics.commonStore.getValues(),
|
|
3344
3344
|
kind: V.POLLS_RECEIVED,
|
|
3345
3345
|
topicId: e,
|
|
3346
|
-
topicType: r ?
|
|
3346
|
+
topicType: r ? ot[r] : x.UNSET
|
|
3347
3347
|
},
|
|
3348
3348
|
pollOpenedFrom: K.UNSET
|
|
3349
3349
|
});
|
|
@@ -3355,7 +3355,7 @@ class gs {
|
|
|
3355
3355
|
...this.analytics.commonStore.getValues(),
|
|
3356
3356
|
kind: i ? V.POLLS_AD_OPENED : V.POLLS_OPENED,
|
|
3357
3357
|
topicId: e,
|
|
3358
|
-
topicType: r ?
|
|
3358
|
+
topicType: r ? ot[r] : x.UNSET
|
|
3359
3359
|
},
|
|
3360
3360
|
pollOpenedFrom: n === "list" ? K.PICK_HISTORY : K.IN_APP
|
|
3361
3361
|
});
|
|
@@ -3367,7 +3367,7 @@ class gs {
|
|
|
3367
3367
|
...this.analytics.commonStore.getValues(),
|
|
3368
3368
|
kind: n ? V.POLLS_AD_VOTE : V.POLLS_VOTE,
|
|
3369
3369
|
topicId: e,
|
|
3370
|
-
topicType: r ?
|
|
3370
|
+
topicType: r ? ot[r] : x.UNSET
|
|
3371
3371
|
},
|
|
3372
3372
|
pollOpenedFrom: K.UNSET
|
|
3373
3373
|
});
|
|
@@ -3451,7 +3451,7 @@ class vs {
|
|
|
3451
3451
|
this.analyticsClient = r;
|
|
3452
3452
|
}
|
|
3453
3453
|
connect = () => {
|
|
3454
|
-
this.writeCommon("sessionId",
|
|
3454
|
+
this.writeCommon("sessionId", Qe()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, we.debug("analytics connected");
|
|
3455
3455
|
};
|
|
3456
3456
|
disconnect = () => {
|
|
3457
3457
|
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, we.debug("analytics disconnected");
|
|
@@ -3474,8 +3474,16 @@ class vs {
|
|
|
3474
3474
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
3475
3475
|
this.writeCommon("eventId", r);
|
|
3476
3476
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
3477
|
-
r && this.writeCommon("category", ys[r]), r !== $.UNSET ? this.writeCommon("overlaySessionId",
|
|
3477
|
+
r && this.writeCommon("category", ys[r]), r !== $.UNSET ? this.writeCommon("overlaySessionId", Qe()) : this.writeCommon("overlaySessionId", "");
|
|
3478
3478
|
})), this.onConnect(() => {
|
|
3479
|
+
const r = (n) => {
|
|
3480
|
+
if (!n.slEventBus)
|
|
3481
|
+
return;
|
|
3482
|
+
const i = n.slEventBus?.action;
|
|
3483
|
+
n.slEventBus?.type === "exposedPauseAd" && (i === "disabled" && this.writeCommon("overlaySessionId", ""), i === "rendered" && this.writeCommon("overlaySessionId", Qe())), n.slEventBus?.type === "advertisement" && (i === "opened" && this.writeCommon("overlaySessionId", Qe()), i === "closed" && this.writeCommon("overlaySessionId", ""));
|
|
3484
|
+
};
|
|
3485
|
+
return U.listen(r);
|
|
3486
|
+
}), this.onConnect(() => {
|
|
3479
3487
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
3480
3488
|
this.writeCommon("screenOrientation", i.matches ? zr.PORTRAIT : zr.LANDSCAPE);
|
|
3481
3489
|
};
|
|
@@ -3489,7 +3497,7 @@ class vs {
|
|
|
3489
3497
|
}
|
|
3490
3498
|
const Ss = (t, e, r) => {
|
|
3491
3499
|
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",
|
|
3500
|
+
n === "" ? t.analytics.writeCommon("overlaySessionId", "") : t.analytics.writeCommon("overlaySessionId", Qe());
|
|
3493
3501
|
}, () => {
|
|
3494
3502
|
t.analytics.disconnect();
|
|
3495
3503
|
})), r();
|
|
@@ -3655,12 +3663,12 @@ function Ts(t, e, r) {
|
|
|
3655
3663
|
}
|
|
3656
3664
|
Tr.exports = Kn;
|
|
3657
3665
|
Tr.exports.promise = Ts;
|
|
3658
|
-
var zn = Tr.exports, _r = { exports: {} },
|
|
3666
|
+
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
3667
|
return Function.prototype.apply.call(e, r, n);
|
|
3660
|
-
},
|
|
3661
|
-
|
|
3668
|
+
}, St;
|
|
3669
|
+
We && typeof We.ownKeys == "function" ? St = We.ownKeys : Object.getOwnPropertySymbols ? St = function(e) {
|
|
3662
3670
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
3663
|
-
} :
|
|
3671
|
+
} : St = function(e) {
|
|
3664
3672
|
return Object.getOwnPropertyNames(e);
|
|
3665
3673
|
};
|
|
3666
3674
|
function _s(t) {
|
|
@@ -3837,7 +3845,7 @@ function ei(t) {
|
|
|
3837
3845
|
return 0;
|
|
3838
3846
|
}
|
|
3839
3847
|
B.prototype.eventNames = function() {
|
|
3840
|
-
return this._eventsCount > 0 ?
|
|
3848
|
+
return this._eventsCount > 0 ? St(this._events) : [];
|
|
3841
3849
|
};
|
|
3842
3850
|
function ti(t, e) {
|
|
3843
3851
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
@@ -3948,7 +3956,7 @@ var ni = _r.exports, Mt = {}, ii = {}, oi = function() {
|
|
|
3948
3956
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
3949
3957
|
}
|
|
3950
3958
|
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 = Bs,
|
|
3959
|
+
}, 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 = Bs, Xe = si, Ye = Ut, oa = Ms, ai = Function, Ht = function(t) {
|
|
3952
3960
|
try {
|
|
3953
3961
|
return ai('"use strict"; return (' + t + ").constructor;")();
|
|
3954
3962
|
} catch {
|
|
@@ -3961,7 +3969,7 @@ if (Ce)
|
|
|
3961
3969
|
Ce = null;
|
|
3962
3970
|
}
|
|
3963
3971
|
var Kt = function() {
|
|
3964
|
-
throw new
|
|
3972
|
+
throw new Ye();
|
|
3965
3973
|
}, sa = Ce ? function() {
|
|
3966
3974
|
try {
|
|
3967
3975
|
return arguments.callee, Kt;
|
|
@@ -4031,10 +4039,10 @@ var Kt = function() {
|
|
|
4031
4039
|
"%String%": String,
|
|
4032
4040
|
"%StringIteratorPrototype%": qe && z ? z(""[Symbol.iterator]()) : P,
|
|
4033
4041
|
"%Symbol%": qe ? Symbol : P,
|
|
4034
|
-
"%SyntaxError%":
|
|
4042
|
+
"%SyntaxError%": Xe,
|
|
4035
4043
|
"%ThrowTypeError%": sa,
|
|
4036
4044
|
"%TypedArray%": ua,
|
|
4037
|
-
"%TypeError%":
|
|
4045
|
+
"%TypeError%": Ye,
|
|
4038
4046
|
"%Uint8Array%": typeof Uint8Array > "u" ? P : Uint8Array,
|
|
4039
4047
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? P : Uint8ClampedArray,
|
|
4040
4048
|
"%Uint16Array%": typeof Uint16Array > "u" ? P : Uint16Array,
|
|
@@ -4120,12 +4128,12 @@ var da = function t(e) {
|
|
|
4120
4128
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
4121
4129
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
4122
4130
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
4123
|
-
},
|
|
4131
|
+
}, 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
4132
|
var r = kt(e, 0, 1), n = kt(e, -1);
|
|
4125
4133
|
if (r === "%" && n !== "%")
|
|
4126
|
-
throw new
|
|
4134
|
+
throw new Xe("invalid intrinsic syntax, expected closing `%`");
|
|
4127
4135
|
if (n === "%" && r !== "%")
|
|
4128
|
-
throw new
|
|
4136
|
+
throw new Xe("invalid intrinsic syntax, expected opening `%`");
|
|
4129
4137
|
var i = [];
|
|
4130
4138
|
return hn(e, ha, function(o, s, a, u) {
|
|
4131
4139
|
i[i.length] = a ? hn(u, ya, "$1") : s || o;
|
|
@@ -4135,33 +4143,33 @@ var da = function t(e) {
|
|
|
4135
4143
|
if (_t(pn, n) && (i = pn[n], n = "%" + i[0] + "%"), _t(De, n)) {
|
|
4136
4144
|
var o = De[n];
|
|
4137
4145
|
if (o === xe && (o = da(n)), typeof o > "u" && !r)
|
|
4138
|
-
throw new
|
|
4146
|
+
throw new Ye("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
4139
4147
|
return {
|
|
4140
4148
|
alias: i,
|
|
4141
4149
|
name: n,
|
|
4142
4150
|
value: o
|
|
4143
4151
|
};
|
|
4144
4152
|
}
|
|
4145
|
-
throw new
|
|
4146
|
-
},
|
|
4153
|
+
throw new Xe("intrinsic " + e + " does not exist!");
|
|
4154
|
+
}, dt = function(e, r) {
|
|
4147
4155
|
if (typeof e != "string" || e.length === 0)
|
|
4148
|
-
throw new
|
|
4156
|
+
throw new Ye("intrinsic name must be a non-empty string");
|
|
4149
4157
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
4150
|
-
throw new
|
|
4158
|
+
throw new Ye('"allowMissing" argument must be a boolean');
|
|
4151
4159
|
if (pa(/^%?[^%]*%?$/, e) === null)
|
|
4152
|
-
throw new
|
|
4160
|
+
throw new Xe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
4153
4161
|
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
4162
|
d && (i = d[0], fa(n, la([0, 1], d)));
|
|
4155
4163
|
for (var c = 1, l = !0; c < n.length; c += 1) {
|
|
4156
4164
|
var p = n[c], g = kt(p, 0, 1), w = kt(p, -1);
|
|
4157
4165
|
if ((g === '"' || g === "'" || g === "`" || w === '"' || w === "'" || w === "`") && g !== w)
|
|
4158
|
-
throw new
|
|
4166
|
+
throw new Xe("property names with quotes must have matching quotes");
|
|
4159
4167
|
if ((p === "constructor" || !l) && (u = !0), i += "." + p, s = "%" + i + "%", _t(De, s))
|
|
4160
4168
|
a = De[s];
|
|
4161
4169
|
else if (a != null) {
|
|
4162
4170
|
if (!(p in a)) {
|
|
4163
4171
|
if (!r)
|
|
4164
|
-
throw new
|
|
4172
|
+
throw new Ye("base intrinsic for " + e + " exists, but the property is not available.");
|
|
4165
4173
|
return;
|
|
4166
4174
|
}
|
|
4167
4175
|
if (Ce && c + 1 >= n.length) {
|
|
@@ -4177,7 +4185,7 @@ var da = function t(e) {
|
|
|
4177
4185
|
function Pr() {
|
|
4178
4186
|
if (yn) return zt;
|
|
4179
4187
|
yn = 1;
|
|
4180
|
-
var t =
|
|
4188
|
+
var t = dt, e = t("%Object.defineProperty%", !0) || !1;
|
|
4181
4189
|
if (e)
|
|
4182
4190
|
try {
|
|
4183
4191
|
e({}, "a", { value: 1 });
|
|
@@ -4186,14 +4194,14 @@ function Pr() {
|
|
|
4186
4194
|
}
|
|
4187
4195
|
return zt = e, zt;
|
|
4188
4196
|
}
|
|
4189
|
-
var ba =
|
|
4190
|
-
if (
|
|
4197
|
+
var ba = dt, wt = ba("%Object.getOwnPropertyDescriptor%", !0);
|
|
4198
|
+
if (wt)
|
|
4191
4199
|
try {
|
|
4192
|
-
|
|
4200
|
+
wt([], "length");
|
|
4193
4201
|
} catch {
|
|
4194
|
-
|
|
4202
|
+
wt = null;
|
|
4195
4203
|
}
|
|
4196
|
-
var qt =
|
|
4204
|
+
var qt = wt, mn = Pr(), va = si, je = Ut, gn = qt, Sa = function(e, r, n) {
|
|
4197
4205
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
4198
4206
|
throw new je("`obj` must be an object or a function`");
|
|
4199
4207
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -4230,7 +4238,7 @@ ci.hasArrayLengthDefineBug = function() {
|
|
|
4230
4238
|
return !0;
|
|
4231
4239
|
}
|
|
4232
4240
|
};
|
|
4233
|
-
var wa = ci, Ea =
|
|
4241
|
+
var wa = ci, Ea = dt, bn = Sa, Aa = wa(), vn = qt, Sn = Ut, Ia = Ea("%Math.floor%"), Oa = function(e, r) {
|
|
4234
4242
|
if (typeof e != "function")
|
|
4235
4243
|
throw new Sn("`fn` is not a function");
|
|
4236
4244
|
if (typeof r != "number" || r < 0 || r > 4294967295 || Ia(r) !== r)
|
|
@@ -4255,7 +4263,7 @@ var wa = ci, Ea = ct, bn = Sa, Aa = wa(), vn = qt, Sn = Ut, Ia = Ea("%Math.floor
|
|
|
4255
4263
|
)), e;
|
|
4256
4264
|
};
|
|
4257
4265
|
(function(t) {
|
|
4258
|
-
var e = kr, r =
|
|
4266
|
+
var e = kr, r = dt, n = Oa, i = Ut, 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
4267
|
t.exports = function(p) {
|
|
4260
4268
|
if (typeof p != "function")
|
|
4261
4269
|
throw new i("a function is required");
|
|
@@ -4271,7 +4279,7 @@ var wa = ci, Ea = ct, bn = Sa, Aa = wa(), vn = qt, Sn = Ut, Ia = Ea("%Math.floor
|
|
|
4271
4279
|
};
|
|
4272
4280
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
4273
4281
|
})(ui);
|
|
4274
|
-
var Lr = ui.exports, di =
|
|
4282
|
+
var Lr = ui.exports, di = dt, li = Lr, Ta = li(di("String.prototype.indexOf")), Nr = function(e, r) {
|
|
4275
4283
|
var n = di(e, !!r);
|
|
4276
4284
|
return typeof n == "function" && Ta(e, ".prototype.") > -1 ? li(n) : n;
|
|
4277
4285
|
}, _a = $t(), ka = Nr, pr = ka("Object.prototype.toString"), jt = function(e) {
|
|
@@ -4305,21 +4313,21 @@ var La = Pa ? jt : fi, Na = Object.prototype.toString, Ca = Function.prototype.t
|
|
|
4305
4313
|
Yt = n ? Wt(n) : !1;
|
|
4306
4314
|
}
|
|
4307
4315
|
return Wt(e) === Yt;
|
|
4308
|
-
}, hi = Function.prototype.toString,
|
|
4309
|
-
if (typeof
|
|
4316
|
+
}, hi = Function.prototype.toString, Ke = typeof Reflect == "object" && Reflect !== null && Reflect.apply, hr, Et;
|
|
4317
|
+
if (typeof Ke == "function" && typeof Object.defineProperty == "function")
|
|
4310
4318
|
try {
|
|
4311
4319
|
hr = Object.defineProperty({}, "length", {
|
|
4312
4320
|
get: function() {
|
|
4313
|
-
throw
|
|
4321
|
+
throw Et;
|
|
4314
4322
|
}
|
|
4315
|
-
}),
|
|
4323
|
+
}), Et = {}, Ke(function() {
|
|
4316
4324
|
throw 42;
|
|
4317
4325
|
}, null, hr);
|
|
4318
4326
|
} catch (t) {
|
|
4319
|
-
t !==
|
|
4327
|
+
t !== Et && (Ke = null);
|
|
4320
4328
|
}
|
|
4321
4329
|
else
|
|
4322
|
-
|
|
4330
|
+
Ke = null;
|
|
4323
4331
|
var Va = /^\s*class\b/, yr = function(e) {
|
|
4324
4332
|
try {
|
|
4325
4333
|
var r = hi.call(e);
|
|
@@ -4333,30 +4341,30 @@ var Va = /^\s*class\b/, yr = function(e) {
|
|
|
4333
4341
|
} catch {
|
|
4334
4342
|
return !1;
|
|
4335
4343
|
}
|
|
4336
|
-
},
|
|
4344
|
+
}, At = Object.prototype.toString, Ba = "[object Object]", Ma = "[object Function]", $a = "[object GeneratorFunction]", Ua = "[object HTMLAllCollection]", qa = "[object HTML document.all class]", ja = "[object HTMLCollection]", xa = typeof Symbol == "function" && !!Symbol.toStringTag, Qa = !(0 in [,]), mr = function() {
|
|
4337
4345
|
return !1;
|
|
4338
4346
|
};
|
|
4339
4347
|
if (typeof document == "object") {
|
|
4340
4348
|
var Ga = document.all;
|
|
4341
|
-
|
|
4349
|
+
At.call(Ga) === At.call(document.all) && (mr = function(e) {
|
|
4342
4350
|
if ((Qa || !e) && (typeof e > "u" || typeof e == "object"))
|
|
4343
4351
|
try {
|
|
4344
|
-
var r =
|
|
4352
|
+
var r = At.call(e);
|
|
4345
4353
|
return (r === Ua || r === qa || r === ja || r === Ba) && e("") == null;
|
|
4346
4354
|
} catch {
|
|
4347
4355
|
}
|
|
4348
4356
|
return !1;
|
|
4349
4357
|
});
|
|
4350
4358
|
}
|
|
4351
|
-
var Ha =
|
|
4359
|
+
var Ha = Ke ? function(e) {
|
|
4352
4360
|
if (mr(e))
|
|
4353
4361
|
return !0;
|
|
4354
4362
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
4355
4363
|
return !1;
|
|
4356
4364
|
try {
|
|
4357
|
-
|
|
4365
|
+
Ke(e, null, hr);
|
|
4358
4366
|
} catch (r) {
|
|
4359
|
-
if (r !==
|
|
4367
|
+
if (r !== Et)
|
|
4360
4368
|
return !1;
|
|
4361
4369
|
}
|
|
4362
4370
|
return !yr(e) && Jt(e);
|
|
@@ -4369,7 +4377,7 @@ var Ha = He ? function(e) {
|
|
|
4369
4377
|
return Jt(e);
|
|
4370
4378
|
if (yr(e))
|
|
4371
4379
|
return !1;
|
|
4372
|
-
var r =
|
|
4380
|
+
var r = At.call(e);
|
|
4373
4381
|
return r !== Ma && r !== $a && !/^\[object HTML/.test(r) ? !1 : Jt(e);
|
|
4374
4382
|
}, Ka = Ha, za = Object.prototype.toString, yi = Object.prototype.hasOwnProperty, Wa = function(e, r, n) {
|
|
4375
4383
|
for (var i = 0, o = e.length; i < o; i++)
|
|
@@ -4401,19 +4409,19 @@ var Ha = He ? function(e) {
|
|
|
4401
4409
|
for (var e = [], r = 0; r < Xt.length; r++)
|
|
4402
4410
|
typeof eu[Xt[r]] == "function" && (e[e.length] = Xt[r]);
|
|
4403
4411
|
return e;
|
|
4404
|
-
}, Pt = mi, tu = gi, wn = Lr, Cr = Nr,
|
|
4412
|
+
}, Pt = mi, tu = gi, wn = Lr, Cr = Nr, It = qt, ru = Cr("Object.prototype.toString"), bi = $t(), 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
4413
|
for (var n = 0; n < e.length; n += 1)
|
|
4406
4414
|
if (e[n] === r)
|
|
4407
4415
|
return n;
|
|
4408
4416
|
return -1;
|
|
4409
4417
|
}, Lt = { __proto__: null };
|
|
4410
|
-
bi &&
|
|
4418
|
+
bi && It && Zt ? Pt(gr, function(t) {
|
|
4411
4419
|
var e = new En[t]();
|
|
4412
4420
|
if (Symbol.toStringTag in e) {
|
|
4413
|
-
var r = Zt(e), n =
|
|
4421
|
+
var r = Zt(e), n = It(r, Symbol.toStringTag);
|
|
4414
4422
|
if (!n) {
|
|
4415
4423
|
var i = Zt(r);
|
|
4416
|
-
n =
|
|
4424
|
+
n = It(i, Symbol.toStringTag);
|
|
4417
4425
|
}
|
|
4418
4426
|
Lt["$" + t] = wn(n.get);
|
|
4419
4427
|
}
|
|
@@ -4446,20 +4454,20 @@ var iu = function(e) {
|
|
|
4446
4454
|
var r = Dr(ru(e), 8, -1);
|
|
4447
4455
|
return nu(gr, r) > -1 ? r : r !== "Object" ? !1 : ou(e);
|
|
4448
4456
|
}
|
|
4449
|
-
return
|
|
4450
|
-
}, Nt = mi, au = gi, An = Lr, Rr = Nr,
|
|
4457
|
+
return It ? iu(e) : null;
|
|
4458
|
+
}, Nt = mi, au = gi, An = Lr, Rr = Nr, Ot = qt, uu = Rr("Object.prototype.toString"), vi = $t(), 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
4459
|
for (var n = 0; n < e.length; n += 1)
|
|
4452
4460
|
if (e[n] === r)
|
|
4453
4461
|
return n;
|
|
4454
4462
|
return -1;
|
|
4455
4463
|
}, Ct = { __proto__: null };
|
|
4456
|
-
vi &&
|
|
4464
|
+
vi && Ot && er ? Nt(br, function(t) {
|
|
4457
4465
|
var e = new In[t]();
|
|
4458
4466
|
if (Symbol.toStringTag in e) {
|
|
4459
|
-
var r = er(e), n =
|
|
4467
|
+
var r = er(e), n = Ot(r, Symbol.toStringTag);
|
|
4460
4468
|
if (!n) {
|
|
4461
4469
|
var i = er(r);
|
|
4462
|
-
n =
|
|
4470
|
+
n = Ot(i, Symbol.toStringTag);
|
|
4463
4471
|
}
|
|
4464
4472
|
Ct["$" + t] = An(n.get);
|
|
4465
4473
|
}
|
|
@@ -4506,7 +4514,7 @@ var du = function(e) {
|
|
|
4506
4514
|
var r = Fr(uu(e), 8, -1);
|
|
4507
4515
|
return cu(br, r) > -1 ? r : r !== "Object" ? !1 : lu(e);
|
|
4508
4516
|
}
|
|
4509
|
-
return
|
|
4517
|
+
return Ot ? du(e) : null;
|
|
4510
4518
|
}, pu = fu, hu = function(e) {
|
|
4511
4519
|
return !!pu(e);
|
|
4512
4520
|
};
|
|
@@ -4594,10 +4602,10 @@ var du = function(e) {
|
|
|
4594
4602
|
return u(y) === "[object Set]";
|
|
4595
4603
|
}
|
|
4596
4604
|
Oe.working = typeof Set < "u" && Oe(/* @__PURE__ */ new Set());
|
|
4597
|
-
function
|
|
4605
|
+
function rt(y) {
|
|
4598
4606
|
return typeof Set > "u" ? !1 : Oe.working ? Oe(y) : y instanceof Set;
|
|
4599
4607
|
}
|
|
4600
|
-
t.isSet =
|
|
4608
|
+
t.isSet = rt;
|
|
4601
4609
|
function Fe(y) {
|
|
4602
4610
|
return u(y) === "[object WeakMap]";
|
|
4603
4611
|
}
|
|
@@ -4618,10 +4626,10 @@ var du = function(e) {
|
|
|
4618
4626
|
return u(y) === "[object ArrayBuffer]";
|
|
4619
4627
|
}
|
|
4620
4628
|
Be.working = typeof ArrayBuffer < "u" && Be(new ArrayBuffer());
|
|
4621
|
-
function
|
|
4629
|
+
function lt(y) {
|
|
4622
4630
|
return typeof ArrayBuffer > "u" ? !1 : Be.working ? Be(y) : y instanceof ArrayBuffer;
|
|
4623
4631
|
}
|
|
4624
|
-
t.isArrayBuffer =
|
|
4632
|
+
t.isArrayBuffer = lt;
|
|
4625
4633
|
function f(y) {
|
|
4626
4634
|
return u(y) === "[object DataView]";
|
|
4627
4635
|
}
|
|
@@ -4662,28 +4670,28 @@ var du = function(e) {
|
|
|
4662
4670
|
return w(y, d);
|
|
4663
4671
|
}
|
|
4664
4672
|
t.isNumberObject = ke;
|
|
4665
|
-
function
|
|
4673
|
+
function ft(y) {
|
|
4666
4674
|
return w(y, c);
|
|
4667
4675
|
}
|
|
4668
|
-
t.isStringObject =
|
|
4676
|
+
t.isStringObject = ft;
|
|
4669
4677
|
function Me(y) {
|
|
4670
4678
|
return w(y, l);
|
|
4671
4679
|
}
|
|
4672
4680
|
t.isBooleanObject = Me;
|
|
4673
|
-
function
|
|
4681
|
+
function pt(y) {
|
|
4674
4682
|
return s && w(y, p);
|
|
4675
4683
|
}
|
|
4676
|
-
t.isBigIntObject =
|
|
4684
|
+
t.isBigIntObject = pt;
|
|
4677
4685
|
function Mr(y) {
|
|
4678
4686
|
return a && w(y, g);
|
|
4679
4687
|
}
|
|
4680
4688
|
t.isSymbolObject = Mr;
|
|
4681
4689
|
function Ii(y) {
|
|
4682
|
-
return ke(y) ||
|
|
4690
|
+
return ke(y) || ft(y) || Me(y) || pt(y) || Mr(y);
|
|
4683
4691
|
}
|
|
4684
4692
|
t.isBoxedPrimitive = Ii;
|
|
4685
4693
|
function Oi(y) {
|
|
4686
|
-
return typeof Uint8Array < "u" && (
|
|
4694
|
+
return typeof Uint8Array < "u" && (lt(y) || R(y));
|
|
4687
4695
|
}
|
|
4688
4696
|
t.isAnyArrayBuffer = Oi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4689
4697
|
Object.defineProperty(t, y, {
|
|
@@ -4855,8 +4863,8 @@ var mu = vr.exports;
|
|
|
4855
4863
|
}
|
|
4856
4864
|
var M = "", Z = !1, ke = ["{", "}"];
|
|
4857
4865
|
if (E(h) && (Z = !0, ke = ["[", "]"]), ye(h)) {
|
|
4858
|
-
var
|
|
4859
|
-
M = " [Function" +
|
|
4866
|
+
var ft = h.name ? ": " + h.name : "";
|
|
4867
|
+
M = " [Function" + ft + "]";
|
|
4860
4868
|
}
|
|
4861
4869
|
if (ue(h) && (M = " " + RegExp.prototype.toString.call(h)), Re(h) && (M = " " + Date.prototype.toUTCString.call(h)), _e(h) && (M = " " + p(h)), F.length === 0 && (!Z || h.length == 0))
|
|
4862
4870
|
return ke[0] + M + ke[1];
|
|
@@ -4864,8 +4872,8 @@ var mu = vr.exports;
|
|
|
4864
4872
|
return ue(h) ? f.stylize(RegExp.prototype.toString.call(h), "regexp") : f.stylize("[Object]", "special");
|
|
4865
4873
|
f.seen.push(h);
|
|
4866
4874
|
var Me;
|
|
4867
|
-
return Z ? Me = g(f, h, m, k, F) : Me = F.map(function(
|
|
4868
|
-
return w(f, h, m, k,
|
|
4875
|
+
return Z ? Me = g(f, h, m, k, F) : Me = F.map(function(pt) {
|
|
4876
|
+
return w(f, h, m, k, pt, Z);
|
|
4869
4877
|
}), f.seen.pop(), v(Me, M, ke);
|
|
4870
4878
|
}
|
|
4871
4879
|
function l(f, h) {
|
|
@@ -4995,7 +5003,7 @@ var mu = vr.exports;
|
|
|
4995
5003
|
function Oe(f) {
|
|
4996
5004
|
return Object.prototype.toString.call(f);
|
|
4997
5005
|
}
|
|
4998
|
-
function
|
|
5006
|
+
function rt(f) {
|
|
4999
5007
|
return f < 10 ? "0" + f.toString(10) : f.toString(10);
|
|
5000
5008
|
}
|
|
5001
5009
|
var Fe = [
|
|
@@ -5014,9 +5022,9 @@ var mu = vr.exports;
|
|
|
5014
5022
|
];
|
|
5015
5023
|
function Qt() {
|
|
5016
5024
|
var f = /* @__PURE__ */ new Date(), h = [
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5025
|
+
rt(f.getHours()),
|
|
5026
|
+
rt(f.getMinutes()),
|
|
5027
|
+
rt(f.getSeconds())
|
|
5020
5028
|
].join(":");
|
|
5021
5029
|
return [f.getDate(), Fe[f.getMonth()], h].join(" ");
|
|
5022
5030
|
}
|
|
@@ -5078,7 +5086,7 @@ var mu = vr.exports;
|
|
|
5078
5086
|
}
|
|
5079
5087
|
return h(f);
|
|
5080
5088
|
}
|
|
5081
|
-
function
|
|
5089
|
+
function lt(f) {
|
|
5082
5090
|
if (typeof f != "function")
|
|
5083
5091
|
throw new TypeError('The "original" argument must be of type Function');
|
|
5084
5092
|
function h() {
|
|
@@ -5104,7 +5112,7 @@ var mu = vr.exports;
|
|
|
5104
5112
|
e(f)
|
|
5105
5113
|
), h;
|
|
5106
5114
|
}
|
|
5107
|
-
t.callbackify =
|
|
5115
|
+
t.callbackify = lt;
|
|
5108
5116
|
})(Mt);
|
|
5109
5117
|
const { inherits: gu, format: tr } = Mt;
|
|
5110
5118
|
function Pe(t, e, r = Error) {
|
|
@@ -5534,11 +5542,11 @@ function Lu() {
|
|
|
5534
5542
|
t.resolve = e, t.reject = r;
|
|
5535
5543
|
}), t;
|
|
5536
5544
|
}
|
|
5537
|
-
function
|
|
5545
|
+
function tt(t, e, r, n, i) {
|
|
5538
5546
|
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, Nu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
5539
5547
|
}
|
|
5540
|
-
_u(
|
|
5541
|
-
|
|
5548
|
+
_u(tt, Tu);
|
|
5549
|
+
tt.prototype.exec = function(t, e) {
|
|
5542
5550
|
const r = this.func;
|
|
5543
5551
|
let n = !1;
|
|
5544
5552
|
const i = this.name;
|
|
@@ -5574,7 +5582,7 @@ et.prototype.exec = function(t, e) {
|
|
|
5574
5582
|
(u) => O.nextTick(s, u)
|
|
5575
5583
|
));
|
|
5576
5584
|
};
|
|
5577
|
-
|
|
5585
|
+
tt.prototype.loadedSoFar = function() {
|
|
5578
5586
|
if (this.loaded)
|
|
5579
5587
|
return Promise.resolve();
|
|
5580
5588
|
const t = () => {
|
|
@@ -5585,10 +5593,10 @@ et.prototype.loadedSoFar = function() {
|
|
|
5585
5593
|
let e;
|
|
5586
5594
|
return this._promise ? e = Promise.resolve() : (this._promise = Lu(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
5587
5595
|
};
|
|
5588
|
-
|
|
5596
|
+
tt.prototype.enqueue = function(t, e) {
|
|
5589
5597
|
W("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
5590
5598
|
};
|
|
5591
|
-
|
|
5599
|
+
tt.prototype.finish = function(t, e) {
|
|
5592
5600
|
W("finish", this.name, t);
|
|
5593
5601
|
const r = () => {
|
|
5594
5602
|
this.loaded || (W("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -5633,16 +5641,16 @@ function Br(t, e) {
|
|
|
5633
5641
|
}
|
|
5634
5642
|
function Cu() {
|
|
5635
5643
|
}
|
|
5636
|
-
Vr.exports =
|
|
5644
|
+
Vr.exports = tt;
|
|
5637
5645
|
Vr.exports.loadPlugin = Br;
|
|
5638
5646
|
var Du = Vr.exports;
|
|
5639
5647
|
const Ln = zn, Ru = ni.EventEmitter, Fu = Mt.inherits, {
|
|
5640
5648
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: or,
|
|
5641
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
5649
|
+
AVV_ERR_CALLBACK_NOT_FN: st,
|
|
5642
5650
|
AVV_ERR_PLUGIN_NOT_VALID: Vu,
|
|
5643
5651
|
AVV_ERR_ROOT_PLG_BOOTED: Bu,
|
|
5644
5652
|
AVV_ERR_READY_TIMEOUT: Mu
|
|
5645
|
-
} = Si, $u = wu, wr = Du,
|
|
5653
|
+
} = Si, $u = wu, wr = Du, Ze = wi("avvio"), Dt = Symbol("kAvvio"), sr = Symbol("kThenifyDoNotWrap");
|
|
5646
5654
|
function Uu(t, e, r) {
|
|
5647
5655
|
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
5656
|
if (t[i])
|
|
@@ -5657,15 +5665,15 @@ function Uu(t, e, r) {
|
|
|
5657
5665
|
return typeof d != "function" ? r._loadRegistered() : (r.after(ar(d, this)), this);
|
|
5658
5666
|
}, t[s] = function(d) {
|
|
5659
5667
|
if (d && typeof d != "function")
|
|
5660
|
-
throw new
|
|
5668
|
+
throw new st(s, typeof d);
|
|
5661
5669
|
return r.ready(d ? ar(d, this) : void 0);
|
|
5662
5670
|
}, t[a] = function(d) {
|
|
5663
5671
|
if (typeof d != "function")
|
|
5664
|
-
throw new
|
|
5672
|
+
throw new st(a, typeof d);
|
|
5665
5673
|
return r.onClose(Gu(d, this)), this;
|
|
5666
5674
|
}, t[u] = function(d) {
|
|
5667
5675
|
if (d && typeof d != "function")
|
|
5668
|
-
throw new
|
|
5676
|
+
throw new st(u, typeof d);
|
|
5669
5677
|
return d ? (r.close(ar(d, this)), this) : r.close();
|
|
5670
5678
|
};
|
|
5671
5679
|
}
|
|
@@ -5684,7 +5692,7 @@ function Y(t, e, r) {
|
|
|
5684
5692
|
this.pluginTree.stop(s, d);
|
|
5685
5693
|
});
|
|
5686
5694
|
}), wr.loadPlugin.call(this, this._root, (n) => {
|
|
5687
|
-
|
|
5695
|
+
Ze("root plugin ready");
|
|
5688
5696
|
try {
|
|
5689
5697
|
this.emit("preReady"), this._root = null;
|
|
5690
5698
|
} catch (i) {
|
|
@@ -5759,7 +5767,7 @@ Y.prototype.close = function(t) {
|
|
|
5759
5767
|
let e;
|
|
5760
5768
|
if (t) {
|
|
5761
5769
|
if (typeof t != "function")
|
|
5762
|
-
throw new
|
|
5770
|
+
throw new st("close", typeof t);
|
|
5763
5771
|
} else
|
|
5764
5772
|
e = new Promise(function(r, n) {
|
|
5765
5773
|
t = function(i) {
|
|
@@ -5775,7 +5783,7 @@ Y.prototype.close = function(t) {
|
|
|
5775
5783
|
Y.prototype.ready = function(t) {
|
|
5776
5784
|
if (t) {
|
|
5777
5785
|
if (typeof t != "function")
|
|
5778
|
-
throw new
|
|
5786
|
+
throw new st("ready", typeof t);
|
|
5779
5787
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
5780
5788
|
return;
|
|
5781
5789
|
}
|
|
@@ -5797,14 +5805,14 @@ function Nn() {
|
|
|
5797
5805
|
}
|
|
5798
5806
|
function Ei() {
|
|
5799
5807
|
if (this.booted) {
|
|
5800
|
-
|
|
5808
|
+
Ze("thenify returning null because we are already booted");
|
|
5801
5809
|
return;
|
|
5802
5810
|
}
|
|
5803
5811
|
if (this[sr]) {
|
|
5804
5812
|
this[sr] = !1;
|
|
5805
5813
|
return;
|
|
5806
5814
|
}
|
|
5807
|
-
return
|
|
5815
|
+
return Ze("thenify"), (t, e) => this._loadRegistered().then(() => (this[sr] = !0, t(this._server)), e);
|
|
5808
5816
|
}
|
|
5809
5817
|
function Ai(t, e) {
|
|
5810
5818
|
const r = this._server, n = this._error;
|
|
@@ -5823,9 +5831,9 @@ function Ai(t, e) {
|
|
|
5823
5831
|
}
|
|
5824
5832
|
function xu(t, e, r, n) {
|
|
5825
5833
|
const i = t.name;
|
|
5826
|
-
|
|
5834
|
+
Ze("setting up ready timeout", i, this._timeout);
|
|
5827
5835
|
let o = setTimeout(() => {
|
|
5828
|
-
|
|
5836
|
+
Ze("timed out", i), o = null;
|
|
5829
5837
|
const a = new Mu(i);
|
|
5830
5838
|
a.fn = t, this._error = a, n(a);
|
|
5831
5839
|
}, this._timeout);
|
|
@@ -5838,7 +5846,7 @@ function Qu(t, e) {
|
|
|
5838
5846
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5839
5847
|
if (t.length === 0 || t.length === 1) {
|
|
5840
5848
|
let i;
|
|
5841
|
-
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (
|
|
5849
|
+
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (Ze("resolving close/onClose promise"), i.then(
|
|
5842
5850
|
() => O.nextTick(e),
|
|
5843
5851
|
(o) => O.nextTick(e, o)
|
|
5844
5852
|
)) : O.nextTick(e);
|