@streamlayer/sdk-web 0.28.11 → 0.28.12
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 +1 -1
- package/lib/es/index.js +131 -126
- package/package.json +4 -4
package/lib/es/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { QuestionType as ze, SilenceSetting as Kr, QuestionStatus as Yt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
2
2
|
import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
3
3
|
import { SdkOverlayType as ae } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
4
|
-
import { computed as Hr, map as Mn, atom as
|
|
4
|
+
import { computed as Hr, map as Mn, atom as Ct } from "nanostores";
|
|
5
5
|
import "@nanostores/logger";
|
|
6
6
|
import "microdiff";
|
|
7
7
|
import { Code as Vn, createPromiseClient as qn, createCallbackClient as Gn } from "@connectrpc/connect";
|
|
8
8
|
import { createGrpcWebTransport as Qn } from "@connectrpc/connect-web";
|
|
9
9
|
import { nanoquery as zn } from "@nanostores/query";
|
|
10
10
|
import { Events as Kn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
11
|
-
import { Client as
|
|
11
|
+
import { Client as Tt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
12
12
|
import { Users as Wr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
13
13
|
import { pino as Hn } from "pino";
|
|
14
14
|
import { Feed as de } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
@@ -18,7 +18,7 @@ var Yr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18
18
|
function Wn(t) {
|
|
19
19
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
20
20
|
}
|
|
21
|
-
var
|
|
21
|
+
var T = {}, Xr = {}, _t = {};
|
|
22
22
|
_t.byteLength = Xn;
|
|
23
23
|
_t.toByteArray = ei;
|
|
24
24
|
_t.fromByteArray = ni;
|
|
@@ -69,8 +69,8 @@ function ni(t) {
|
|
|
69
69
|
var fr = {};
|
|
70
70
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
71
71
|
fr.read = function(t, e, r, o, s) {
|
|
72
|
-
var u, l, f = s * 8 - o - 1, d = (1 << f) - 1, A = d >> 1, g = -7, w = r ? s - 1 : 0, E = r ? -1 : 1,
|
|
73
|
-
for (w += E, u =
|
|
72
|
+
var u, l, f = s * 8 - o - 1, d = (1 << f) - 1, A = d >> 1, g = -7, w = r ? s - 1 : 0, E = r ? -1 : 1, C = t[e + w];
|
|
73
|
+
for (w += E, u = C & (1 << -g) - 1, C >>= -g, g += f; g > 0; u = u * 256 + t[e + w], w += E, g -= 8)
|
|
74
74
|
;
|
|
75
75
|
for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + w], w += E, g -= 8)
|
|
76
76
|
;
|
|
@@ -78,18 +78,18 @@ fr.read = function(t, e, r, o, s) {
|
|
|
78
78
|
u = 1 - A;
|
|
79
79
|
else {
|
|
80
80
|
if (u === d)
|
|
81
|
-
return l ? NaN : (
|
|
81
|
+
return l ? NaN : (C ? -1 : 1) * (1 / 0);
|
|
82
82
|
l = l + Math.pow(2, o), u = u - A;
|
|
83
83
|
}
|
|
84
|
-
return (
|
|
84
|
+
return (C ? -1 : 1) * l * Math.pow(2, u - o);
|
|
85
85
|
};
|
|
86
86
|
fr.write = function(t, e, r, o, s, u) {
|
|
87
|
-
var l, f, d, A = u * 8 - s - 1, g = (1 << A) - 1, w = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0,
|
|
88
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (d = Math.pow(2, -l)) < 1 && (l--, d *= 2), l + w >= 1 ? e += E / d : e += E * Math.pow(2, 1 - w), e * d >= 2 && (l++, d /= 2), l + w >= g ? (f = 0, l = g) : l + w >= 1 ? (f = (e * d - 1) * Math.pow(2, s), l = l + w) : (f = e * Math.pow(2, w - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r +
|
|
87
|
+
var l, f, d, A = u * 8 - s - 1, g = (1 << A) - 1, w = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, C = o ? 0 : u - 1, P = o ? 1 : -1, N = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
88
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (d = Math.pow(2, -l)) < 1 && (l--, d *= 2), l + w >= 1 ? e += E / d : e += E * Math.pow(2, 1 - w), e * d >= 2 && (l++, d /= 2), l + w >= g ? (f = 0, l = g) : l + w >= 1 ? (f = (e * d - 1) * Math.pow(2, s), l = l + w) : (f = e * Math.pow(2, w - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + C] = f & 255, C += P, f /= 256, s -= 8)
|
|
89
89
|
;
|
|
90
|
-
for (l = l << s | f, A += s; A > 0; t[r +
|
|
90
|
+
for (l = l << s | f, A += s; A > 0; t[r + C] = l & 255, C += P, l /= 256, A -= 8)
|
|
91
91
|
;
|
|
92
|
-
t[r +
|
|
92
|
+
t[r + C - P] |= N * 128;
|
|
93
93
|
};
|
|
94
94
|
/*!
|
|
95
95
|
* The buffer module from node.js, for the browser.
|
|
@@ -202,7 +202,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
202
202
|
const h = c.write(a, n);
|
|
203
203
|
return h !== i && (c = c.slice(0, h)), c;
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function C(a) {
|
|
206
206
|
const n = a.length < 0 ? 0 : z(a.length) | 0, i = l(n);
|
|
207
207
|
for (let c = 0; c < n; c += 1)
|
|
208
208
|
i[c] = a[c] & 255;
|
|
@@ -213,7 +213,7 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
213
213
|
const n = new Uint8Array(a);
|
|
214
214
|
return N(n.buffer, n.byteOffset, n.byteLength);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return C(a);
|
|
217
217
|
}
|
|
218
218
|
function N(a, n, i) {
|
|
219
219
|
if (n < 0 || a.byteLength < n)
|
|
@@ -229,9 +229,9 @@ fr.write = function(t, e, r, o, s, u) {
|
|
|
229
229
|
return i.length === 0 || a.copy(i, 0, 0, n), i;
|
|
230
230
|
}
|
|
231
231
|
if (a.length !== void 0)
|
|
232
|
-
return typeof a.length != "number" || Rt(a.length) ? l(0) :
|
|
232
|
+
return typeof a.length != "number" || Rt(a.length) ? l(0) : C(a);
|
|
233
233
|
if (a.type === "Buffer" && Array.isArray(a.data))
|
|
234
|
-
return
|
|
234
|
+
return C(a.data);
|
|
235
235
|
}
|
|
236
236
|
function z(a) {
|
|
237
237
|
if (a >= s)
|
|
@@ -1116,18 +1116,18 @@ function ii(t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var Ce = [], Ke = !1, Ne, pt = -1;
|
|
1120
1120
|
function oi() {
|
|
1121
|
-
!Ke || !Ne || (Ke = !1, Ne.length ?
|
|
1121
|
+
!Ke || !Ne || (Ke = !1, Ne.length ? Ce = Ne.concat(Ce) : pt = -1, Ce.length && rn());
|
|
1122
1122
|
}
|
|
1123
1123
|
function rn() {
|
|
1124
1124
|
if (!Ke) {
|
|
1125
1125
|
var t = tn(oi);
|
|
1126
1126
|
Ke = !0;
|
|
1127
|
-
for (var e =
|
|
1128
|
-
for (Ne =
|
|
1127
|
+
for (var e = Ce.length; e; ) {
|
|
1128
|
+
for (Ne = Ce, Ce = []; ++pt < e; )
|
|
1129
1129
|
Ne && Ne[pt].run();
|
|
1130
|
-
pt = -1, e =
|
|
1130
|
+
pt = -1, e = Ce.length;
|
|
1131
1131
|
}
|
|
1132
1132
|
Ne = null, Ke = !1, ii(t);
|
|
1133
1133
|
}
|
|
@@ -1137,7 +1137,7 @@ K.nextTick = function(t) {
|
|
|
1137
1137
|
if (arguments.length > 1)
|
|
1138
1138
|
for (var r = 1; r < arguments.length; r++)
|
|
1139
1139
|
e[r - 1] = arguments[r];
|
|
1140
|
-
|
|
1140
|
+
Ce.push(new nn(t, e)), Ce.length === 1 && !Ke && tn(rn);
|
|
1141
1141
|
};
|
|
1142
1142
|
function nn(t, e) {
|
|
1143
1143
|
this.fun = t, this.array = e;
|
|
@@ -1151,17 +1151,17 @@ K.env = {};
|
|
|
1151
1151
|
K.argv = [];
|
|
1152
1152
|
K.version = "";
|
|
1153
1153
|
K.versions = {};
|
|
1154
|
-
function
|
|
1154
|
+
function Te() {
|
|
1155
1155
|
}
|
|
1156
|
-
K.on =
|
|
1157
|
-
K.addListener =
|
|
1158
|
-
K.once =
|
|
1159
|
-
K.off =
|
|
1160
|
-
K.removeListener =
|
|
1161
|
-
K.removeAllListeners =
|
|
1162
|
-
K.emit =
|
|
1163
|
-
K.prependListener =
|
|
1164
|
-
K.prependOnceListener =
|
|
1156
|
+
K.on = Te;
|
|
1157
|
+
K.addListener = Te;
|
|
1158
|
+
K.once = Te;
|
|
1159
|
+
K.off = Te;
|
|
1160
|
+
K.removeListener = Te;
|
|
1161
|
+
K.removeAllListeners = Te;
|
|
1162
|
+
K.emit = Te;
|
|
1163
|
+
K.prependListener = Te;
|
|
1164
|
+
K.prependOnceListener = Te;
|
|
1165
1165
|
K.listeners = function(t) {
|
|
1166
1166
|
return [];
|
|
1167
1167
|
};
|
|
@@ -1182,7 +1182,7 @@ var si = en.exports;
|
|
|
1182
1182
|
Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
|
|
1183
1183
|
const e = Xr, r = si, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
|
|
1184
1184
|
Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
|
|
1185
|
-
})(
|
|
1185
|
+
})(T);
|
|
1186
1186
|
class ai {
|
|
1187
1187
|
}
|
|
1188
1188
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
@@ -1236,7 +1236,7 @@ class lr {
|
|
|
1236
1236
|
listeners = /* @__PURE__ */ new Set();
|
|
1237
1237
|
settingsKey;
|
|
1238
1238
|
constructor({ settings: e, ...r }, o) {
|
|
1239
|
-
this.settingsKey = ci[r.type], this.status =
|
|
1239
|
+
this.settingsKey = ci[r.type], this.status = Ct(Le.Suspended), this.config = new at(He(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new at(He(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new at(He({}), `feature:settings:${this.settingsKey}`), this.source = o;
|
|
1240
1240
|
}
|
|
1241
1241
|
get featureConfig() {
|
|
1242
1242
|
return this.config.getStore();
|
|
@@ -1293,11 +1293,11 @@ class ce extends Bt {
|
|
|
1293
1293
|
return this.getStore().get();
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
const te = (t) =>
|
|
1296
|
+
const te = (t) => Ct(t), hr = (t, e) => Hr(t, e);
|
|
1297
1297
|
class ue extends Bt {
|
|
1298
1298
|
atomStore;
|
|
1299
1299
|
constructor(e, r, o) {
|
|
1300
|
-
super(e, `api:${r}`), this.atomStore =
|
|
1300
|
+
super(e, `api:${r}`), this.atomStore = Ct(), o && e.subscribe((s) => {
|
|
1301
1301
|
this.atomStore.set(o(s));
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
@@ -1452,7 +1452,7 @@ class pi {
|
|
|
1452
1452
|
subscriptions;
|
|
1453
1453
|
constructor(e) {
|
|
1454
1454
|
this.host = e, this.$headers = new at(He({
|
|
1455
|
-
"sl-device-id":
|
|
1455
|
+
"sl-device-id": T.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
|
|
1456
1456
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
1457
1457
|
const [r, o, s] = zn();
|
|
1458
1458
|
this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Qn({
|
|
@@ -1515,8 +1515,8 @@ class pi {
|
|
|
1515
1515
|
setSdkKey = (e) => {
|
|
1516
1516
|
this.$headers.setValue("sdk", e);
|
|
1517
1517
|
};
|
|
1518
|
-
setAuth = (e) => {
|
|
1519
|
-
this.$headers.setValue("authorization", e);
|
|
1518
|
+
setAuth = (e, r) => {
|
|
1519
|
+
this.$headers.setValue("authorization", e), this.$headers.setValue("sl-user-id", r);
|
|
1520
1520
|
};
|
|
1521
1521
|
setHeader = (e, r) => this.$headers.setValue(e, r);
|
|
1522
1522
|
getHeader = (e) => this.$headers.getValue(e);
|
|
@@ -1552,7 +1552,7 @@ const di = (t, e) => {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
});
|
|
1554
1554
|
}, yi = (t, e) => {
|
|
1555
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1555
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "getStream", params: [t] });
|
|
1556
1556
|
return e.nanoquery.createFetcherStore(o, {
|
|
1557
1557
|
fetcher: async (s, u, l) => l ? (await r.getStream({
|
|
1558
1558
|
id: l
|
|
@@ -1568,12 +1568,12 @@ const di = (t, e) => {
|
|
|
1568
1568
|
const { client: e } = t.createPromiseClient(Wr, { method: "bypassAuth" });
|
|
1569
1569
|
return ({ userKey: r, schema: o, init: s }) => e.bypassAuth({ userKey: r, schema: o, init: s });
|
|
1570
1570
|
}, bi = (t, e) => {
|
|
1571
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1571
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "get", params: [t] });
|
|
1572
1572
|
return e.nanoquery.createFetcherStore(o, {
|
|
1573
1573
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
1574
1574
|
});
|
|
1575
1575
|
}, wi = (t, e) => {
|
|
1576
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1576
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "getOrganization", params: [t] });
|
|
1577
1577
|
return e.nanoquery.createFetcherStore(o, {
|
|
1578
1578
|
fetcher: async () => {
|
|
1579
1579
|
const s = await r.getOrganization({});
|
|
@@ -1584,7 +1584,7 @@ const di = (t, e) => {
|
|
|
1584
1584
|
}
|
|
1585
1585
|
});
|
|
1586
1586
|
}, vi = (t, e) => {
|
|
1587
|
-
const { client: r, queryKey: o } = e.createPromiseClient(
|
|
1587
|
+
const { client: r, queryKey: o } = e.createPromiseClient(Tt, {
|
|
1588
1588
|
method: "getOrganizationAdvertising",
|
|
1589
1589
|
params: [t]
|
|
1590
1590
|
});
|
|
@@ -1705,7 +1705,7 @@ class Fi extends Bt {
|
|
|
1705
1705
|
};
|
|
1706
1706
|
unsubscribe = () => this.getStore().off();
|
|
1707
1707
|
}
|
|
1708
|
-
class
|
|
1708
|
+
class Ci extends ai {
|
|
1709
1709
|
$coreStore;
|
|
1710
1710
|
transport;
|
|
1711
1711
|
bypassLogin;
|
|
@@ -1721,17 +1721,17 @@ class Ti extends ai {
|
|
|
1721
1721
|
*/
|
|
1722
1722
|
login = async (e, r) => {
|
|
1723
1723
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1724
|
-
const o = await this.bypassLogin({ schema: e, userKey: r, init: !1 }), s = o.meta?.jwt;
|
|
1725
|
-
if (!s)
|
|
1724
|
+
const o = await this.bypassLogin({ schema: e, userKey: r, init: !1 }), s = o.meta?.jwt, u = o.data?.id;
|
|
1725
|
+
if (!s || !u)
|
|
1726
1726
|
throw new Error("internal: token missing");
|
|
1727
|
-
return this.$coreStore.getValues().user.getStore().mutate(o), this.
|
|
1727
|
+
return this.$coreStore.getValues().user.getStore().mutate(o), this.saveUser(s, u), s;
|
|
1728
1728
|
};
|
|
1729
1729
|
isAuthenticated = () => this.me();
|
|
1730
1730
|
/**
|
|
1731
1731
|
* Logout user. Clears the all user data from the store.
|
|
1732
1732
|
*/
|
|
1733
1733
|
logout = () => {
|
|
1734
|
-
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth(""), new Ge().clear();
|
|
1734
|
+
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), new Ge().clear();
|
|
1735
1735
|
};
|
|
1736
1736
|
/**
|
|
1737
1737
|
* Soft logout, only clears the StreamLayer user data from the store.
|
|
@@ -1739,7 +1739,7 @@ class Ti extends ai {
|
|
|
1739
1739
|
*/
|
|
1740
1740
|
softLogout = () => {
|
|
1741
1741
|
const e = new Ge();
|
|
1742
|
-
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth(""), e.setToken(""), this.reLogin();
|
|
1742
|
+
this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("", ""), e.setToken(""), this.reLogin();
|
|
1743
1743
|
};
|
|
1744
1744
|
/**
|
|
1745
1745
|
* Try to re-login.
|
|
@@ -1751,7 +1751,12 @@ class Ti extends ai {
|
|
|
1751
1751
|
reLogin = () => {
|
|
1752
1752
|
const e = new Ge(), r = e.getToken(), o = e.getExternalToken();
|
|
1753
1753
|
if (this.$coreStore.getValues().userKey.setValue(o), this.$coreStore.getValues().userToken.setValue(r), r)
|
|
1754
|
-
return this.
|
|
1754
|
+
return this.saveUser(r, ""), this.me().then((s) => {
|
|
1755
|
+
if (console.log("user", s), s?.id) {
|
|
1756
|
+
const u = s.id;
|
|
1757
|
+
this.saveUser(r, u);
|
|
1758
|
+
}
|
|
1759
|
+
});
|
|
1755
1760
|
if (o && !r) {
|
|
1756
1761
|
const s = e.getSchema();
|
|
1757
1762
|
s && o && this.login(s, o).catch(() => {
|
|
@@ -1762,8 +1767,8 @@ class Ti extends ai {
|
|
|
1762
1767
|
/**
|
|
1763
1768
|
* Write token to the Transport and UserStore
|
|
1764
1769
|
*/
|
|
1765
|
-
|
|
1766
|
-
this.transport.setAuth(e), this.$coreStore.getValues().userToken.setValue(e), new Ge().setToken(e);
|
|
1770
|
+
saveUser = (e, r) => {
|
|
1771
|
+
this.transport.setAuth(e, r), this.$coreStore.getValues().userToken.setValue(e), new Ge().setToken(e);
|
|
1767
1772
|
};
|
|
1768
1773
|
/**
|
|
1769
1774
|
* Add interceptor to the Transport to handle 401 and 403 errors.
|
|
@@ -1779,8 +1784,8 @@ class Ti extends ai {
|
|
|
1779
1784
|
});
|
|
1780
1785
|
};
|
|
1781
1786
|
}
|
|
1782
|
-
const st = new Ge(),
|
|
1783
|
-
t.auth = new
|
|
1787
|
+
const st = new Ge(), Ti = (t, e, r) => {
|
|
1788
|
+
t.auth = new Ci(t.store, t.transport), t.stores.status.listen((o) => {
|
|
1784
1789
|
o === Fe.READY && t.auth.reLogin();
|
|
1785
1790
|
}), t.sdk.authorizationBypass = async (o, s) => {
|
|
1786
1791
|
st.getSchema() === o && st.getExternalToken() === s && t.transport.getHeader("authorization") || (await t.auth.login(o, s), st.setSchema(o), st.setExternalToken(s));
|
|
@@ -1840,7 +1845,7 @@ const st = new Ge(), Ci = (t, e, r) => {
|
|
|
1840
1845
|
})).data?.attributes : void 0
|
|
1841
1846
|
});
|
|
1842
1847
|
}, Ni = (t, e) => {
|
|
1843
|
-
const { client: r } = e.createCallbackClient(de), o =
|
|
1848
|
+
const { client: r } = e.createCallbackClient(de), o = Ct({ eventId: t.get() || "", feedId: "" });
|
|
1844
1849
|
return t.subscribe((u = "") => {
|
|
1845
1850
|
o.set({ eventId: u, feedId: "" });
|
|
1846
1851
|
}), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
|
|
@@ -2094,12 +2099,12 @@ const Ir = {
|
|
|
2094
2099
|
const g = e.get(), w = s.get().data?.length || 0;
|
|
2095
2100
|
if (A.page > 0 && g && w >= A.page * A.pageSize) {
|
|
2096
2101
|
s.setKey("loading", !0);
|
|
2097
|
-
const
|
|
2102
|
+
const C = await u({
|
|
2098
2103
|
eventId: g,
|
|
2099
2104
|
pagination: A
|
|
2100
2105
|
}), P = s.get().data || [];
|
|
2101
2106
|
s.set({
|
|
2102
|
-
data: [...P, ...
|
|
2107
|
+
data: [...P, ...C.data.map((N) => N.attributes)],
|
|
2103
2108
|
loading: !1
|
|
2104
2109
|
});
|
|
2105
2110
|
}
|
|
@@ -2385,7 +2390,7 @@ function an(t, e, r) {
|
|
|
2385
2390
|
paused: !1,
|
|
2386
2391
|
concurrency: r,
|
|
2387
2392
|
running: A,
|
|
2388
|
-
resume:
|
|
2393
|
+
resume: C,
|
|
2389
2394
|
idle: P,
|
|
2390
2395
|
length: w,
|
|
2391
2396
|
getQueue: E,
|
|
@@ -2412,7 +2417,7 @@ function an(t, e, r) {
|
|
|
2412
2417
|
j.push(x.value), x = x.next;
|
|
2413
2418
|
return j;
|
|
2414
2419
|
}
|
|
2415
|
-
function
|
|
2420
|
+
function C() {
|
|
2416
2421
|
if (d.paused) {
|
|
2417
2422
|
d.paused = !1;
|
|
2418
2423
|
for (var x = 0; x < d.concurrency; x++)
|
|
@@ -2465,10 +2470,10 @@ function so(t, e, r) {
|
|
|
2465
2470
|
var s = an(t, o, r), u = s.push, l = s.unshift;
|
|
2466
2471
|
return s.push = f, s.unshift = d, s.drained = A, s;
|
|
2467
2472
|
function f(g) {
|
|
2468
|
-
var w = new Promise(function(E,
|
|
2473
|
+
var w = new Promise(function(E, C) {
|
|
2469
2474
|
u(g, function(P, N) {
|
|
2470
2475
|
if (P) {
|
|
2471
|
-
|
|
2476
|
+
C(P);
|
|
2472
2477
|
return;
|
|
2473
2478
|
}
|
|
2474
2479
|
E(N);
|
|
@@ -2477,10 +2482,10 @@ function so(t, e, r) {
|
|
|
2477
2482
|
return w.catch(se), w;
|
|
2478
2483
|
}
|
|
2479
2484
|
function d(g) {
|
|
2480
|
-
var w = new Promise(function(E,
|
|
2485
|
+
var w = new Promise(function(E, C) {
|
|
2481
2486
|
l(g, function(P, N) {
|
|
2482
2487
|
if (P) {
|
|
2483
|
-
|
|
2488
|
+
C(P);
|
|
2484
2489
|
return;
|
|
2485
2490
|
}
|
|
2486
2491
|
E(N);
|
|
@@ -2503,7 +2508,7 @@ function so(t, e, r) {
|
|
|
2503
2508
|
}
|
|
2504
2509
|
yr.exports = an;
|
|
2505
2510
|
yr.exports.promise = so;
|
|
2506
|
-
var un = yr.exports, gr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null,
|
|
2511
|
+
var un = yr.exports, gr = { exports: {} }, Je = typeof Reflect == "object" ? Reflect : null, Cr = Je && typeof Je.apply == "function" ? Je.apply : function(e, r, o) {
|
|
2507
2512
|
return Function.prototype.apply.call(e, r, o);
|
|
2508
2513
|
}, dt;
|
|
2509
2514
|
Je && typeof Je.ownKeys == "function" ? dt = Je.ownKeys : Object.getOwnPropertySymbols ? dt = function(e) {
|
|
@@ -2526,7 +2531,7 @@ $.EventEmitter = $;
|
|
|
2526
2531
|
$.prototype._events = void 0;
|
|
2527
2532
|
$.prototype._eventsCount = 0;
|
|
2528
2533
|
$.prototype._maxListeners = void 0;
|
|
2529
|
-
var
|
|
2534
|
+
var Tr = 10;
|
|
2530
2535
|
function Ot(t) {
|
|
2531
2536
|
if (typeof t != "function")
|
|
2532
2537
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
@@ -2534,12 +2539,12 @@ function Ot(t) {
|
|
|
2534
2539
|
Object.defineProperty($, "defaultMaxListeners", {
|
|
2535
2540
|
enumerable: !0,
|
|
2536
2541
|
get: function() {
|
|
2537
|
-
return
|
|
2542
|
+
return Tr;
|
|
2538
2543
|
},
|
|
2539
2544
|
set: function(t) {
|
|
2540
2545
|
if (typeof t != "number" || t < 0 || cn(t))
|
|
2541
2546
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2542
|
-
|
|
2547
|
+
Tr = t;
|
|
2543
2548
|
}
|
|
2544
2549
|
});
|
|
2545
2550
|
$.init = function() {
|
|
@@ -2575,10 +2580,10 @@ $.prototype.emit = function(e) {
|
|
|
2575
2580
|
if (d === void 0)
|
|
2576
2581
|
return !1;
|
|
2577
2582
|
if (typeof d == "function")
|
|
2578
|
-
|
|
2583
|
+
Cr(d, this, r);
|
|
2579
2584
|
else
|
|
2580
2585
|
for (var A = d.length, g = yn(d, A), o = 0; o < A; ++o)
|
|
2581
|
-
|
|
2586
|
+
Cr(g[o], this, r);
|
|
2582
2587
|
return !0;
|
|
2583
2588
|
};
|
|
2584
2589
|
function ln(t, e, r, o) {
|
|
@@ -2796,7 +2801,7 @@ var mn = gr.exports, xt = {}, bn = {}, wn = function() {
|
|
|
2796
2801
|
A.prototype = r.prototype, s.prototype = new A(), A.prototype = null;
|
|
2797
2802
|
}
|
|
2798
2803
|
return s;
|
|
2799
|
-
},
|
|
2804
|
+
}, Co = Fo, vn = Function.prototype.bind || Co, xr = {}.hasOwnProperty, Lt = Function.prototype.call, To = Lt.bind ? Lt.bind(xr) : function(t, e) {
|
|
2800
2805
|
return Lt.call(xr, t, e);
|
|
2801
2806
|
}, k, Xe = SyntaxError, Sn = Function, Ye = TypeError, Ut = function(t) {
|
|
2802
2807
|
try {
|
|
@@ -2968,7 +2973,7 @@ var ko = function t(e) {
|
|
|
2968
2973
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2969
2974
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2970
2975
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2971
|
-
}, ft = vn, St =
|
|
2976
|
+
}, ft = vn, St = To, Po = ft.call(Function.call, Array.prototype.concat), Ro = ft.call(Function.apply, Array.prototype.splice), Pr = ft.call(Function.call, String.prototype.replace), At = ft.call(Function.call, String.prototype.slice), No = ft.call(Function.call, RegExp.prototype.exec), Lo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Uo = /\\(\\)?/g, $o = function(e) {
|
|
2972
2977
|
var r = At(e, 0, 1), o = At(e, -1);
|
|
2973
2978
|
if (r === "%" && o !== "%")
|
|
2974
2979
|
throw new Xe("invalid intrinsic syntax, expected closing `%`");
|
|
@@ -3001,8 +3006,8 @@ var ko = function t(e) {
|
|
|
3001
3006
|
var o = $o(e), s = o.length > 0 ? o[0] : "", u = Do("%" + s + "%", r), l = u.name, f = u.value, d = !1, A = u.alias;
|
|
3002
3007
|
A && (s = A[0], Ro(o, Po([0, 1], A)));
|
|
3003
3008
|
for (var g = 1, w = !0; g < o.length; g += 1) {
|
|
3004
|
-
var E = o[g],
|
|
3005
|
-
if ((
|
|
3009
|
+
var E = o[g], C = At(E, 0, 1), P = At(E, -1);
|
|
3010
|
+
if ((C === '"' || C === "'" || C === "`" || P === '"' || P === "'" || P === "`") && C !== P)
|
|
3006
3011
|
throw new Xe("property names with quotes must have matching quotes");
|
|
3007
3012
|
if ((E === "constructor" || !w) && (d = !0), s += "." + E, l = "%" + s + "%", St($e, l))
|
|
3008
3013
|
f = $e[l];
|
|
@@ -3101,9 +3106,9 @@ var qo = wr("%SyntaxError%"), Ve = wr("%TypeError%"), Rr = br, Go = function(e,
|
|
|
3101
3106
|
t.exports = function(E) {
|
|
3102
3107
|
if (typeof E != "function")
|
|
3103
3108
|
throw new s("a function is required");
|
|
3104
|
-
var
|
|
3109
|
+
var C = f(e, l, arguments);
|
|
3105
3110
|
return o(
|
|
3106
|
-
|
|
3111
|
+
C,
|
|
3107
3112
|
1 + A(0, E.length - (arguments.length - 1)),
|
|
3108
3113
|
!0
|
|
3109
3114
|
);
|
|
@@ -3113,9 +3118,9 @@ var qo = wr("%SyntaxError%"), Ve = wr("%TypeError%"), Rr = br, Go = function(e,
|
|
|
3113
3118
|
};
|
|
3114
3119
|
d ? d(t.exports, "apply", { value: g }) : t.exports.apply = g;
|
|
3115
3120
|
})(An);
|
|
3116
|
-
var Fn = An.exports,
|
|
3117
|
-
var o =
|
|
3118
|
-
return typeof o == "function" && Ho(e, ".prototype.") > -1 ?
|
|
3121
|
+
var Fn = An.exports, Cn = et, Tn = Fn, Ho = Tn(Cn("String.prototype.indexOf")), _n = function(e, r) {
|
|
3122
|
+
var o = Cn(e, !!r);
|
|
3123
|
+
return typeof o == "function" && Ho(e, ".prototype.") > -1 ? Tn(o) : o;
|
|
3119
3124
|
}, Wo = mr(), Jo = _n, rr = Jo("Object.prototype.toString"), kt = function(e) {
|
|
3120
3125
|
return Wo && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : rr(e) === "[object Arguments]";
|
|
3121
3126
|
}, Bn = function(e) {
|
|
@@ -3243,7 +3248,7 @@ var ds = Qe ? function(e) {
|
|
|
3243
3248
|
for (var e = [], r = 0; r < Vt.length; r++)
|
|
3244
3249
|
typeof As[Vt[r]] == "function" && (e[e.length] = Vt[r]);
|
|
3245
3250
|
return e;
|
|
3246
|
-
}, Et = Ss, Is = Es, $r = Fn, vr = _n, bt = br, Fs = vr("Object.prototype.toString"), Pn = mr(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = Is(), Sr = vr("String.prototype.slice"), qt = Object.getPrototypeOf,
|
|
3251
|
+
}, Et = Ss, Is = Es, $r = Fn, vr = _n, bt = br, Fs = vr("Object.prototype.toString"), Pn = mr(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = Is(), Sr = vr("String.prototype.slice"), qt = Object.getPrototypeOf, Cs = vr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3247
3252
|
for (var o = 0; o < e.length; o += 1)
|
|
3248
3253
|
if (e[o] === r)
|
|
3249
3254
|
return o;
|
|
@@ -3263,7 +3268,7 @@ Pn && bt && qt ? Et(sr, function(t) {
|
|
|
3263
3268
|
var e = new Dr[t](), r = e.slice || e.set;
|
|
3264
3269
|
r && (It["$" + t] = $r(r));
|
|
3265
3270
|
});
|
|
3266
|
-
var
|
|
3271
|
+
var Ts = function(e) {
|
|
3267
3272
|
var r = !1;
|
|
3268
3273
|
return Et(It, function(o, s) {
|
|
3269
3274
|
if (!r)
|
|
@@ -3286,9 +3291,9 @@ var Cs = function(e) {
|
|
|
3286
3291
|
return !1;
|
|
3287
3292
|
if (!Pn) {
|
|
3288
3293
|
var r = Sr(Fs(e), 8, -1);
|
|
3289
|
-
return
|
|
3294
|
+
return Cs(sr, r) > -1 ? r : r !== "Object" ? !1 : _s(e);
|
|
3290
3295
|
}
|
|
3291
|
-
return bt ?
|
|
3296
|
+
return bt ? Ts(e) : null;
|
|
3292
3297
|
}, Bs = Rn, Os = function(e) {
|
|
3293
3298
|
return !!Bs(e);
|
|
3294
3299
|
};
|
|
@@ -3301,7 +3306,7 @@ var Cs = function(e) {
|
|
|
3301
3306
|
if (l)
|
|
3302
3307
|
var E = u(BigInt.prototype.valueOf);
|
|
3303
3308
|
if (f)
|
|
3304
|
-
var
|
|
3309
|
+
var C = u(Symbol.prototype.valueOf);
|
|
3305
3310
|
function P(v, ht) {
|
|
3306
3311
|
if (typeof v != "object")
|
|
3307
3312
|
return !1;
|
|
@@ -3457,7 +3462,7 @@ var Cs = function(e) {
|
|
|
3457
3462
|
}
|
|
3458
3463
|
t.isBigIntObject = De;
|
|
3459
3464
|
function lt(v) {
|
|
3460
|
-
return f && P(v,
|
|
3465
|
+
return f && P(v, C);
|
|
3461
3466
|
}
|
|
3462
3467
|
t.isSymbolObject = lt;
|
|
3463
3468
|
function it(v) {
|
|
@@ -3532,32 +3537,32 @@ var ks = ar.exports;
|
|
|
3532
3537
|
X(F) || !ne(F) ? L += " " + F : L += " " + l(F);
|
|
3533
3538
|
return L;
|
|
3534
3539
|
}, t.deprecate = function(p, b) {
|
|
3535
|
-
if (typeof
|
|
3540
|
+
if (typeof T.process < "u" && T.process.noDeprecation === !0)
|
|
3536
3541
|
return p;
|
|
3537
|
-
if (typeof
|
|
3542
|
+
if (typeof T.process > "u")
|
|
3538
3543
|
return function() {
|
|
3539
3544
|
return t.deprecate(p, b).apply(this, arguments);
|
|
3540
3545
|
};
|
|
3541
3546
|
var S = !1;
|
|
3542
3547
|
function I() {
|
|
3543
3548
|
if (!S) {
|
|
3544
|
-
if (
|
|
3549
|
+
if (T.process.throwDeprecation)
|
|
3545
3550
|
throw new Error(b);
|
|
3546
|
-
|
|
3551
|
+
T.process.traceDeprecation ? console.trace(b) : console.error(b), S = !0;
|
|
3547
3552
|
}
|
|
3548
3553
|
return p.apply(this, arguments);
|
|
3549
3554
|
}
|
|
3550
3555
|
return I;
|
|
3551
3556
|
};
|
|
3552
3557
|
var o = {}, s = /^$/;
|
|
3553
|
-
if (
|
|
3554
|
-
var u =
|
|
3558
|
+
if (T.process.env.NODE_DEBUG) {
|
|
3559
|
+
var u = T.process.env.NODE_DEBUG;
|
|
3555
3560
|
u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
|
|
3556
3561
|
}
|
|
3557
3562
|
t.debuglog = function(p) {
|
|
3558
3563
|
if (p = p.toUpperCase(), !o[p])
|
|
3559
3564
|
if (s.test(p)) {
|
|
3560
|
-
var b =
|
|
3565
|
+
var b = T.process.pid;
|
|
3561
3566
|
o[p] = function() {
|
|
3562
3567
|
var S = t.format.apply(t, arguments);
|
|
3563
3568
|
console.error("%s %d: %s", p, b, S);
|
|
@@ -3648,7 +3653,7 @@ var ks = ar.exports;
|
|
|
3648
3653
|
return re(b) ? p.stylize(RegExp.prototype.toString.call(b), "regexp") : p.stylize("[Object]", "special");
|
|
3649
3654
|
p.seen.push(b);
|
|
3650
3655
|
var ie;
|
|
3651
|
-
return Y ? ie =
|
|
3656
|
+
return Y ? ie = C(p, b, S, F, L) : ie = L.map(function(De) {
|
|
3652
3657
|
return P(p, b, S, F, De, Y);
|
|
3653
3658
|
}), p.seen.pop(), N(ie, U, ge);
|
|
3654
3659
|
}
|
|
@@ -3669,7 +3674,7 @@ var ks = ar.exports;
|
|
|
3669
3674
|
function E(p) {
|
|
3670
3675
|
return "[" + Error.prototype.toString.call(p) + "]";
|
|
3671
3676
|
}
|
|
3672
|
-
function
|
|
3677
|
+
function C(p, b, S, I, R) {
|
|
3673
3678
|
for (var L = [], F = 0, O = b.length; F < O; ++F)
|
|
3674
3679
|
xe(b, String(F)) ? L.push(P(
|
|
3675
3680
|
p,
|
|
@@ -3877,10 +3882,10 @@ var ks = ar.exports;
|
|
|
3877
3882
|
};
|
|
3878
3883
|
p.apply(this, S).then(
|
|
3879
3884
|
function(O) {
|
|
3880
|
-
|
|
3885
|
+
T.process.nextTick(F.bind(null, null, O));
|
|
3881
3886
|
},
|
|
3882
3887
|
function(O) {
|
|
3883
|
-
|
|
3888
|
+
T.process.nextTick(ke.bind(null, O, F));
|
|
3884
3889
|
}
|
|
3885
3890
|
);
|
|
3886
3891
|
}
|
|
@@ -4035,8 +4040,8 @@ function $s() {
|
|
|
4035
4040
|
g
|
|
4036
4041
|
);
|
|
4037
4042
|
if (w) {
|
|
4038
|
-
var E = parseFloat(w[1]),
|
|
4039
|
-
switch (
|
|
4043
|
+
var E = parseFloat(w[1]), C = (w[2] || "ms").toLowerCase();
|
|
4044
|
+
switch (C) {
|
|
4040
4045
|
case "years":
|
|
4041
4046
|
case "year":
|
|
4042
4047
|
case "yrs":
|
|
@@ -4089,9 +4094,9 @@ function $s() {
|
|
|
4089
4094
|
var w = Math.abs(g);
|
|
4090
4095
|
return w >= o ? A(g, w, o, "day") : w >= r ? A(g, w, r, "hour") : w >= e ? A(g, w, e, "minute") : w >= t ? A(g, w, t, "second") : g + " ms";
|
|
4091
4096
|
}
|
|
4092
|
-
function A(g, w, E,
|
|
4097
|
+
function A(g, w, E, C) {
|
|
4093
4098
|
var P = w >= E * 1.5;
|
|
4094
|
-
return Math.round(g / E) + " " +
|
|
4099
|
+
return Math.round(g / E) + " " + C + (P ? "s" : "");
|
|
4095
4100
|
}
|
|
4096
4101
|
return zt;
|
|
4097
4102
|
}
|
|
@@ -4107,7 +4112,7 @@ function Ds(t) {
|
|
|
4107
4112
|
}
|
|
4108
4113
|
r.selectColor = e;
|
|
4109
4114
|
function r(g) {
|
|
4110
|
-
let w, E = null,
|
|
4115
|
+
let w, E = null, C, P;
|
|
4111
4116
|
function N(...Q) {
|
|
4112
4117
|
if (!N.enabled)
|
|
4113
4118
|
return;
|
|
@@ -4129,7 +4134,7 @@ function Ds(t) {
|
|
|
4129
4134
|
return N.namespace = g, N.useColors = r.useColors(), N.color = r.selectColor(g), N.extend = o, N.destroy = r.destroy, Object.defineProperty(N, "enabled", {
|
|
4130
4135
|
enumerable: !0,
|
|
4131
4136
|
configurable: !1,
|
|
4132
|
-
get: () => E !== null ? E : (
|
|
4137
|
+
get: () => E !== null ? E : (C !== r.namespaces && (C = r.namespaces, P = r.enabled(g)), P),
|
|
4133
4138
|
set: (Q) => {
|
|
4134
4139
|
E = Q;
|
|
4135
4140
|
}
|
|
@@ -4142,8 +4147,8 @@ function Ds(t) {
|
|
|
4142
4147
|
function s(g) {
|
|
4143
4148
|
r.save(g), r.namespaces = g, r.names = [], r.skips = [];
|
|
4144
4149
|
let w;
|
|
4145
|
-
const E = (typeof g == "string" ? g : "").split(/[\s,]+/),
|
|
4146
|
-
for (w = 0; w <
|
|
4150
|
+
const E = (typeof g == "string" ? g : "").split(/[\s,]+/), C = E.length;
|
|
4151
|
+
for (w = 0; w < C; w++)
|
|
4147
4152
|
E[w] && (g = E[w].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
|
|
4148
4153
|
}
|
|
4149
4154
|
function u() {
|
|
@@ -4292,7 +4297,7 @@ var js = Ds;
|
|
|
4292
4297
|
d = e.storage.getItem("debug");
|
|
4293
4298
|
} catch {
|
|
4294
4299
|
}
|
|
4295
|
-
return !d && typeof
|
|
4300
|
+
return !d && typeof T.process < "u" && "env" in T.process && (d = T.process.env.DEBUG), d;
|
|
4296
4301
|
}
|
|
4297
4302
|
function l() {
|
|
4298
4303
|
try {
|
|
@@ -4331,7 +4336,7 @@ tt.prototype.exec = function(t, e) {
|
|
|
4331
4336
|
let o = !1;
|
|
4332
4337
|
const s = this.name;
|
|
4333
4338
|
if (this.parent._error && !this.isAfter) {
|
|
4334
|
-
W("skipping loading of plugin as parent errored and it is not an after", s),
|
|
4339
|
+
W("skipping loading of plugin as parent errored and it is not an after", s), T.process.nextTick(e);
|
|
4335
4340
|
return;
|
|
4336
4341
|
}
|
|
4337
4342
|
if (this.isAfter)
|
|
@@ -4358,8 +4363,8 @@ tt.prototype.exec = function(t, e) {
|
|
|
4358
4363
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4359
4364
|
const f = r(this.server, this.opts, l);
|
|
4360
4365
|
f && typeof f.then == "function" && (W("exec: resolving promise", s), f.then(
|
|
4361
|
-
() =>
|
|
4362
|
-
(d) =>
|
|
4366
|
+
() => T.process.nextTick(l),
|
|
4367
|
+
(d) => T.process.nextTick(l, d)
|
|
4363
4368
|
));
|
|
4364
4369
|
};
|
|
4365
4370
|
tt.prototype.loadedSoFar = function() {
|
|
@@ -4367,7 +4372,7 @@ tt.prototype.loadedSoFar = function() {
|
|
|
4367
4372
|
return Promise.resolve();
|
|
4368
4373
|
const t = () => {
|
|
4369
4374
|
this.server.after((r, o) => {
|
|
4370
|
-
this._error = r, this.q.pause(), r ? (W("rejecting promise", this.name, r), this._promise.reject(r)) : (W("resolving promise", this.name), this._promise.resolve()), this._promise = null,
|
|
4375
|
+
this._error = r, this.q.pause(), r ? (W("rejecting promise", this.name, r), this._promise.reject(r)) : (W("resolving promise", this.name), this._promise.resolve()), this._promise = null, T.process.nextTick(o, r);
|
|
4371
4376
|
}), this.q.resume();
|
|
4372
4377
|
};
|
|
4373
4378
|
let e;
|
|
@@ -4403,7 +4408,7 @@ tt.prototype.finish = function(t, e) {
|
|
|
4403
4408
|
};
|
|
4404
4409
|
function Ks(t, e) {
|
|
4405
4410
|
const r = this;
|
|
4406
|
-
|
|
4411
|
+
T.process.nextTick(Er.bind(r), t, e);
|
|
4407
4412
|
}
|
|
4408
4413
|
function Er(t, e) {
|
|
4409
4414
|
if (typeof t.func.then == "function") {
|
|
@@ -4491,7 +4496,7 @@ function na(t, e, r) {
|
|
|
4491
4496
|
}
|
|
4492
4497
|
Ys(J, Js);
|
|
4493
4498
|
J.prototype.start = function() {
|
|
4494
|
-
return this.started = !0,
|
|
4499
|
+
return this.started = !0, T.process.nextTick(this._doStart), this;
|
|
4495
4500
|
};
|
|
4496
4501
|
J.prototype.override = function(t, e, r) {
|
|
4497
4502
|
return t;
|
|
@@ -4507,7 +4512,7 @@ J.prototype.use = function(t, e) {
|
|
|
4507
4512
|
};
|
|
4508
4513
|
J.prototype._loadRegistered = function() {
|
|
4509
4514
|
const t = this._current[0];
|
|
4510
|
-
return !this.started && !this.booted &&
|
|
4515
|
+
return !this.started && !this.booted && T.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4511
4516
|
};
|
|
4512
4517
|
Object.defineProperty(J.prototype, "then", { get: Un });
|
|
4513
4518
|
J.prototype._addPlugin = function(t, e, r) {
|
|
@@ -4557,7 +4562,7 @@ J.prototype.close = function(t) {
|
|
|
4557
4562
|
};
|
|
4558
4563
|
});
|
|
4559
4564
|
return this.ready(() => {
|
|
4560
|
-
this._error = null, this._closeQ.push(t),
|
|
4565
|
+
this._error = null, this._closeQ.push(t), T.process.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4561
4566
|
}), e;
|
|
4562
4567
|
};
|
|
4563
4568
|
J.prototype.ready = function(t) {
|
|
@@ -4571,7 +4576,7 @@ J.prototype.ready = function(t) {
|
|
|
4571
4576
|
this._readyQ.push(s), this.start();
|
|
4572
4577
|
const o = this._current[0].server;
|
|
4573
4578
|
function s(u, l, f) {
|
|
4574
|
-
u ? r(u) : e(o),
|
|
4579
|
+
u ? r(u) : e(o), T.process.nextTick(f);
|
|
4575
4580
|
}
|
|
4576
4581
|
});
|
|
4577
4582
|
};
|
|
@@ -4598,9 +4603,9 @@ function $n(t, e) {
|
|
|
4598
4603
|
const r = this._server, o = this._error;
|
|
4599
4604
|
let s;
|
|
4600
4605
|
if (this._error = null, t.length === 0)
|
|
4601
|
-
this._error = o, s = t(), s && !s[Ft] && typeof s.then == "function" ? s.then(() =>
|
|
4606
|
+
this._error = o, s = t(), s && !s[Ft] && typeof s.then == "function" ? s.then(() => T.process.nextTick(e), (u) => T.process.nextTick(e, u)) : T.process.nextTick(e);
|
|
4602
4607
|
else if (t.length === 1)
|
|
4603
|
-
s = t(o), s && !s[Ft] && typeof s.then == "function" ? s.then(() =>
|
|
4608
|
+
s = t(o), s && !s[Ft] && typeof s.then == "function" ? s.then(() => T.process.nextTick(e), (u) => T.process.nextTick(e, u)) : T.process.nextTick(e);
|
|
4604
4609
|
else if (this._timeout === 0) {
|
|
4605
4610
|
const u = (l) => {
|
|
4606
4611
|
this._error = l, e(this._error);
|
|
@@ -4627,9 +4632,9 @@ function sa(t, e) {
|
|
|
4627
4632
|
if (t.length === 0 || t.length === 1) {
|
|
4628
4633
|
let s;
|
|
4629
4634
|
o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (Ze("resolving close/onClose promise"), s.then(
|
|
4630
|
-
() =>
|
|
4631
|
-
(u) =>
|
|
4632
|
-
)) :
|
|
4635
|
+
() => T.process.nextTick(e),
|
|
4636
|
+
(u) => T.process.nextTick(e, u)
|
|
4637
|
+
)) : T.process.nextTick(e);
|
|
4633
4638
|
} else
|
|
4634
4639
|
t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
|
|
4635
4640
|
}
|
|
@@ -4638,10 +4643,10 @@ function aa(t, e) {
|
|
|
4638
4643
|
function r(o, s) {
|
|
4639
4644
|
let u;
|
|
4640
4645
|
t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4641
|
-
|
|
4642
|
-
}, s) :
|
|
4643
|
-
|
|
4644
|
-
}, s) :
|
|
4646
|
+
T.process.nextTick(s);
|
|
4647
|
+
}, s) : T.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
|
|
4648
|
+
T.process.nextTick(s);
|
|
4649
|
+
}, s) : T.process.nextTick(s)) : t(this, s);
|
|
4645
4650
|
}
|
|
4646
4651
|
}
|
|
4647
4652
|
function Jt(t, e) {
|
|
@@ -4649,10 +4654,10 @@ function Jt(t, e) {
|
|
|
4649
4654
|
function r(o, s) {
|
|
4650
4655
|
let u;
|
|
4651
4656
|
t ? t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
|
|
4652
|
-
|
|
4653
|
-
}, s) :
|
|
4654
|
-
|
|
4655
|
-
}, s) :
|
|
4657
|
+
T.process.nextTick(s, o);
|
|
4658
|
+
}, s) : T.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
|
|
4659
|
+
T.process.nextTick(s);
|
|
4660
|
+
}, s) : T.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : T.process.nextTick(s);
|
|
4656
4661
|
}
|
|
4657
4662
|
}
|
|
4658
4663
|
dr.exports = J;
|
|
@@ -4667,7 +4672,7 @@ var ua = dr.exports;
|
|
|
4667
4672
|
const ca = /* @__PURE__ */ Wn(ua);
|
|
4668
4673
|
function _a(t, e = !0, r = !0) {
|
|
4669
4674
|
const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = ca(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4670
|
-
return s.use(Bi), s.use(Si, { sdkKey: t, host: o }), s.use(_i), s.use(
|
|
4675
|
+
return s.use(Bi), s.use(Si, { sdkKey: t, host: o }), s.use(_i), s.use(Ti), s.use(to), s.use(Qi), r && s.after(async (u, l, f) => {
|
|
4671
4676
|
if (u)
|
|
4672
4677
|
throw u;
|
|
4673
4678
|
await l.sdk.initializeApp(), f();
|