@streamlayer/sdk-web 0.33.0 → 0.33.1
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 +8 -8
- package/lib/es/index.js +901 -892
- package/package.json +6 -6
package/lib/es/index.js
CHANGED
|
@@ -1,139 +1,139 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as D, QuestionStatus as
|
|
1
|
+
import { pino as Wn } from "pino";
|
|
2
|
+
import { QuestionType as D, QuestionStatus as Ee, SilenceSetting as Jn } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
3
|
import { PickHistoryStatus as at } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
4
|
import { SdkOverlayType as N } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
|
-
import { InvitationCategory as
|
|
6
|
-
import { computed as
|
|
5
|
+
import { InvitationCategory as Sr, InvitationFrom as wr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
+
import { computed as Yn, map as Xn, atom as At, batched as Ar, onMount as sr } from "nanostores";
|
|
7
7
|
import { nanoid as Gt } from "nanoid";
|
|
8
|
-
import { ConnectError as et, Code as
|
|
9
|
-
import { createGrpcWebTransport as
|
|
10
|
-
import { nanoquery as
|
|
11
|
-
import { Events as
|
|
8
|
+
import { ConnectError as et, Code as ee, createContextKey as Er, createPromiseClient as Ir, createContextValues as Zn } from "@connectrpc/connect";
|
|
9
|
+
import { createGrpcWebTransport as Tr } from "@connectrpc/connect-web";
|
|
10
|
+
import { nanoquery as Or } from "@nanostores/query";
|
|
11
|
+
import { Events as ei } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
12
|
import { Client as rt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
|
-
import { Users as
|
|
13
|
+
import { Users as ar } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
14
|
import { Feed as be } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
-
import { Leaderboard as
|
|
15
|
+
import { Leaderboard as nn } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
|
|
16
16
|
import "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_pb";
|
|
17
|
-
import { LinksClient as
|
|
18
|
-
import { Kind as
|
|
19
|
-
import { AnalyticsService as
|
|
20
|
-
import { InteractionActionType as
|
|
21
|
-
import { NotificationKind as
|
|
22
|
-
function
|
|
17
|
+
import { LinksClient as ti } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
import { Kind as W, TopicType as K, Category as Q, PollOpenedFrom as De, ScreenOrientation as Cr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
|
+
import { AnalyticsService as on } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
|
+
import { InteractionActionType as Lr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
|
+
import { NotificationKind as ue, NotificationType as _r } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
+
function ri(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
26
|
-
function
|
|
25
|
+
var sn = { exports: {} }, V = sn.exports = {}, te, re;
|
|
26
|
+
function zt() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function Kt() {
|
|
30
30
|
throw new Error("clearTimeout has not been defined");
|
|
31
31
|
}
|
|
32
32
|
(function() {
|
|
33
33
|
try {
|
|
34
|
-
typeof setTimeout == "function" ?
|
|
34
|
+
typeof setTimeout == "function" ? te = setTimeout : te = zt;
|
|
35
35
|
} catch {
|
|
36
|
-
|
|
36
|
+
te = zt;
|
|
37
37
|
}
|
|
38
38
|
try {
|
|
39
|
-
typeof clearTimeout == "function" ?
|
|
39
|
+
typeof clearTimeout == "function" ? re = clearTimeout : re = Kt;
|
|
40
40
|
} catch {
|
|
41
|
-
|
|
41
|
+
re = Kt;
|
|
42
42
|
}
|
|
43
43
|
})();
|
|
44
|
-
function
|
|
45
|
-
if (
|
|
44
|
+
function an(t) {
|
|
45
|
+
if (te === setTimeout)
|
|
46
46
|
return setTimeout(t, 0);
|
|
47
|
-
if ((
|
|
48
|
-
return
|
|
47
|
+
if ((te === zt || !te) && setTimeout)
|
|
48
|
+
return te = setTimeout, setTimeout(t, 0);
|
|
49
49
|
try {
|
|
50
|
-
return
|
|
50
|
+
return te(t, 0);
|
|
51
51
|
} catch {
|
|
52
52
|
try {
|
|
53
|
-
return
|
|
53
|
+
return te.call(null, t, 0);
|
|
54
54
|
} catch {
|
|
55
|
-
return
|
|
55
|
+
return te.call(this, t, 0);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
if (
|
|
59
|
+
function ni(t) {
|
|
60
|
+
if (re === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
|
-
if ((
|
|
63
|
-
return
|
|
62
|
+
if ((re === Kt || !re) && clearTimeout)
|
|
63
|
+
return re = clearTimeout, clearTimeout(t);
|
|
64
64
|
try {
|
|
65
|
-
return
|
|
65
|
+
return re(t);
|
|
66
66
|
} catch {
|
|
67
67
|
try {
|
|
68
|
-
return
|
|
68
|
+
return re.call(null, t);
|
|
69
69
|
} catch {
|
|
70
|
-
return
|
|
70
|
+
return re.call(this, t);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var
|
|
75
|
-
function
|
|
76
|
-
!xe || !
|
|
74
|
+
var pe = [], xe = !1, Ie, lt = -1;
|
|
75
|
+
function ii() {
|
|
76
|
+
!xe || !Ie || (xe = !1, Ie.length ? pe = Ie.concat(pe) : lt = -1, pe.length && un());
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function un() {
|
|
79
79
|
if (!xe) {
|
|
80
|
-
var t =
|
|
80
|
+
var t = an(ii);
|
|
81
81
|
xe = !0;
|
|
82
|
-
for (var e =
|
|
83
|
-
for (
|
|
84
|
-
|
|
85
|
-
lt = -1, e =
|
|
82
|
+
for (var e = pe.length; e; ) {
|
|
83
|
+
for (Ie = pe, pe = []; ++lt < e; )
|
|
84
|
+
Ie && Ie[lt].run();
|
|
85
|
+
lt = -1, e = pe.length;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
Ie = null, xe = !1, ni(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
V.nextTick = function(t) {
|
|
91
91
|
var e = new Array(arguments.length - 1);
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
94
94
|
e[r - 1] = arguments[r];
|
|
95
|
-
|
|
95
|
+
pe.push(new cn(t, e)), pe.length === 1 && !xe && an(un);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function cn(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
cn.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
V.title = "browser";
|
|
104
|
+
V.browser = !0;
|
|
105
|
+
V.env = {};
|
|
106
|
+
V.argv = [];
|
|
107
|
+
V.version = "";
|
|
108
|
+
V.versions = {};
|
|
109
109
|
function ye() {
|
|
110
110
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
V.on = ye;
|
|
112
|
+
V.addListener = ye;
|
|
113
|
+
V.once = ye;
|
|
114
|
+
V.off = ye;
|
|
115
|
+
V.removeListener = ye;
|
|
116
|
+
V.removeAllListeners = ye;
|
|
117
|
+
V.emit = ye;
|
|
118
|
+
V.prependListener = ye;
|
|
119
|
+
V.prependOnceListener = ye;
|
|
120
|
+
V.listeners = function(t) {
|
|
121
121
|
return [];
|
|
122
122
|
};
|
|
123
|
-
|
|
123
|
+
V.binding = function(t) {
|
|
124
124
|
throw new Error("process.binding is not supported");
|
|
125
125
|
};
|
|
126
|
-
|
|
126
|
+
V.cwd = function() {
|
|
127
127
|
return "/";
|
|
128
128
|
};
|
|
129
|
-
|
|
129
|
+
V.chdir = function(t) {
|
|
130
130
|
throw new Error("process.chdir is not supported");
|
|
131
131
|
};
|
|
132
|
-
|
|
132
|
+
V.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
const S = /* @__PURE__ */
|
|
135
|
+
var oi = sn.exports;
|
|
136
|
+
const S = /* @__PURE__ */ ri(oi), si = Wn({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const S = /* @__PURE__ */ ni(si), ai = Jn({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), ve = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), ve = (t, e) => si.child({ name: t }, e);
|
|
145
|
+
class ai extends Event {
|
|
146
146
|
slEventBus;
|
|
147
147
|
constructor(e, r) {
|
|
148
148
|
super(e), this.slEventBus = r;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const
|
|
152
|
-
class
|
|
151
|
+
const ui = ve("event-bus");
|
|
152
|
+
class ci {
|
|
153
153
|
name;
|
|
154
154
|
listeners;
|
|
155
155
|
constructor(e = "sl-event-bus") {
|
|
156
156
|
this.name = e, this.listeners = /* @__PURE__ */ new Set();
|
|
157
157
|
}
|
|
158
158
|
emit = (e, r) => {
|
|
159
|
-
const n = new
|
|
160
|
-
|
|
159
|
+
const n = new ai(this.name, { ...r, type: e });
|
|
160
|
+
ui.debug(n, "Emitting event"), window.dispatchEvent(n);
|
|
161
161
|
};
|
|
162
162
|
listen(e) {
|
|
163
163
|
return window.addEventListener(this.name, e), this.listeners.add(e), () => {
|
|
@@ -173,7 +173,7 @@ class li {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class li {
|
|
177
177
|
}
|
|
178
178
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
179
179
|
class Et {
|
|
@@ -192,23 +192,23 @@ class Et {
|
|
|
192
192
|
return this.store;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const di = (t) => {
|
|
196
196
|
const e = Object.keys(t);
|
|
197
|
-
return
|
|
197
|
+
return Yn(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
198
198
|
};
|
|
199
|
-
class
|
|
199
|
+
class Te extends Et {
|
|
200
200
|
getValues = () => this.getStore().get();
|
|
201
201
|
getValue = (e) => this.getStore().get()[e];
|
|
202
202
|
setValue = (e, r) => this.getStore().setKey(e, r);
|
|
203
203
|
subscribe = (...e) => this.getStore().subscribe(...e);
|
|
204
204
|
unsubscribe = () => this.getStore().off();
|
|
205
205
|
}
|
|
206
|
-
const
|
|
207
|
-
var
|
|
206
|
+
const ie = (t) => Xn(t);
|
|
207
|
+
var le;
|
|
208
208
|
(function(t) {
|
|
209
209
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
210
|
-
})(
|
|
211
|
-
const
|
|
210
|
+
})(le || (le = {}));
|
|
211
|
+
const fi = {
|
|
212
212
|
[N.BETTING]: "betting",
|
|
213
213
|
[N.GAMES]: "games",
|
|
214
214
|
[N.PUBLIC_CHAT]: "publicChat",
|
|
@@ -218,7 +218,7 @@ var Je;
|
|
|
218
218
|
(function(t) {
|
|
219
219
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
220
220
|
})(Je || (Je = {}));
|
|
221
|
-
class
|
|
221
|
+
class ln {
|
|
222
222
|
status;
|
|
223
223
|
source;
|
|
224
224
|
config;
|
|
@@ -226,7 +226,7 @@ class dn {
|
|
|
226
226
|
listeners = /* @__PURE__ */ new Set();
|
|
227
227
|
settingsKey;
|
|
228
228
|
constructor({ settings: e, ...r }, n) {
|
|
229
|
-
this.settingsKey =
|
|
229
|
+
this.settingsKey = fi[r.type], this.status = At(Je.Suspended), this.config = new Te(ie(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Te(ie(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Te(ie({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
230
230
|
}
|
|
231
231
|
get featureConfig() {
|
|
232
232
|
return this.config.getStore();
|
|
@@ -257,7 +257,7 @@ class dn {
|
|
|
257
257
|
}
|
|
258
258
|
};
|
|
259
259
|
update = (e, r) => {
|
|
260
|
-
this.source ===
|
|
260
|
+
this.source === le.STREAM && r === le.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
|
|
261
261
|
};
|
|
262
262
|
fireEvent(e) {
|
|
263
263
|
for (const r of this.listeners.values())
|
|
@@ -283,8 +283,8 @@ class z extends Et {
|
|
|
283
283
|
return this.getStore().get();
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
287
|
-
class
|
|
286
|
+
const B = (t) => At(t);
|
|
287
|
+
class oe extends Et {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
290
290
|
super(e, `api:${r}`), this.atomStore = At(), n && e.subscribe((i) => {
|
|
@@ -315,8 +315,8 @@ class X extends Et {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const he = new
|
|
319
|
-
async function*
|
|
318
|
+
const he = new ci();
|
|
319
|
+
async function* pi(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
321
|
t.response.message = r, t.received_at = Date.now();
|
|
322
322
|
const n = {
|
|
@@ -326,7 +326,7 @@ async function* hi(t, e) {
|
|
|
326
326
|
window.postMessage(n), yield r;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
const
|
|
329
|
+
const hi = () => (t) => async (e) => {
|
|
330
330
|
const r = {
|
|
331
331
|
name: e.url,
|
|
332
332
|
stream: e.stream,
|
|
@@ -350,7 +350,7 @@ const yi = () => (t) => async (e) => {
|
|
|
350
350
|
};
|
|
351
351
|
return window.postMessage(i), {
|
|
352
352
|
...n,
|
|
353
|
-
message:
|
|
353
|
+
message: pi(r, n.message)
|
|
354
354
|
};
|
|
355
355
|
} else {
|
|
356
356
|
r.request.message = e.message, r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -378,7 +378,7 @@ var Y;
|
|
|
378
378
|
(function(t) {
|
|
379
379
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
380
380
|
})(Y || (Y = {}));
|
|
381
|
-
class
|
|
381
|
+
class yi {
|
|
382
382
|
params;
|
|
383
383
|
streamCancel;
|
|
384
384
|
method;
|
|
@@ -396,13 +396,13 @@ class gi {
|
|
|
396
396
|
ts: /* @__PURE__ */ new Date(),
|
|
397
397
|
log: []
|
|
398
398
|
};
|
|
399
|
-
this.state = new
|
|
399
|
+
this.state = new Te(ie(o), `subscription:${i.name}:state`), this.options = {
|
|
400
400
|
...i,
|
|
401
401
|
reconnectDelay: i.reconnectDelay ?? 1e3,
|
|
402
402
|
reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
|
|
403
403
|
reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
|
|
404
404
|
withStore: i.withStore ?? !1
|
|
405
|
-
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new z(
|
|
405
|
+
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new z(B(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
|
|
406
406
|
this.state.getValue("status") === Y.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
|
|
407
407
|
})), this.updateState(Y.Ready);
|
|
408
408
|
}
|
|
@@ -431,7 +431,7 @@ class gi {
|
|
|
431
431
|
for await (const o of i)
|
|
432
432
|
this.attempt = 0, this.onData(o);
|
|
433
433
|
} catch (n) {
|
|
434
|
-
n instanceof et && n.code !=
|
|
434
|
+
n instanceof et && n.code != ee.Canceled && this.onStreamError(n);
|
|
435
435
|
}
|
|
436
436
|
})(), this.updateState(Y.Connected);
|
|
437
437
|
};
|
|
@@ -471,7 +471,7 @@ class gi {
|
|
|
471
471
|
*/
|
|
472
472
|
onStreamError = (e) => {
|
|
473
473
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
474
|
-
if (e instanceof et && e.code !==
|
|
474
|
+
if (e instanceof et && e.code !== ee.Canceled) {
|
|
475
475
|
this.updateState(Y.Failed), this.state.setValue("error", e), this.reconnect();
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
@@ -479,41 +479,41 @@ class gi {
|
|
|
479
479
|
}
|
|
480
480
|
};
|
|
481
481
|
}
|
|
482
|
-
const
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
]),
|
|
482
|
+
const gi = /* @__PURE__ */ new Set([
|
|
483
|
+
ee.Unknown,
|
|
484
|
+
ee.Internal,
|
|
485
|
+
ee.DeadlineExceeded,
|
|
486
|
+
ee.ResourceExhausted,
|
|
487
|
+
ee.FailedPrecondition,
|
|
488
|
+
ee.Unavailable,
|
|
489
|
+
ee.DataLoss
|
|
490
|
+
]), kr = ve("grpc:retry"), mi = (t) => async (e) => {
|
|
491
491
|
const r = e.contextValues.get(Ht.retryAttempts), n = 300, i = e.contextValues.get(Ht.retryDelay);
|
|
492
492
|
if (e.stream || r === 0)
|
|
493
493
|
return t(e);
|
|
494
|
-
|
|
494
|
+
kr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
|
|
495
495
|
for (let o = 0; ; o++)
|
|
496
496
|
try {
|
|
497
497
|
return await t(e);
|
|
498
498
|
} catch (s) {
|
|
499
|
-
|
|
499
|
+
kr.trace({ attempt: o, error: s }, "retry attempt");
|
|
500
500
|
const a = et.from(s);
|
|
501
|
-
if (o >= r || !(a instanceof et) || !
|
|
501
|
+
if (o >= r || !(a instanceof et) || !gi.has(a.code))
|
|
502
502
|
throw s;
|
|
503
503
|
const u = Math.min(i, Math.pow(2, o) * n), d = Math.round(u * (1 + Math.random()) / 2);
|
|
504
504
|
await new Promise((c) => setTimeout(c, d));
|
|
505
505
|
}
|
|
506
506
|
}, Ht = {
|
|
507
|
-
retryAttempts:
|
|
508
|
-
retryDelay:
|
|
509
|
-
},
|
|
507
|
+
retryAttempts: Er(5, { description: "Number of attempts to retry" }),
|
|
508
|
+
retryDelay: Er(3e4, { description: "Max delay between retries in milliseconds" })
|
|
509
|
+
}, bi = () => {
|
|
510
510
|
const t = localStorage.getItem("sl-device-id");
|
|
511
511
|
if (t)
|
|
512
512
|
return t;
|
|
513
513
|
const e = Gt();
|
|
514
514
|
return localStorage.setItem("sl-device-id", e), e;
|
|
515
|
-
},
|
|
516
|
-
class
|
|
515
|
+
}, vi = () => navigator.userAgentData?.platform || navigator.platform;
|
|
516
|
+
class Pr {
|
|
517
517
|
toJsonOptions = {
|
|
518
518
|
emitDefaultValues: !1,
|
|
519
519
|
enumAsInteger: !0,
|
|
@@ -531,20 +531,20 @@ class kr {
|
|
|
531
531
|
streamClients;
|
|
532
532
|
subscriptions;
|
|
533
533
|
constructor(e) {
|
|
534
|
-
this.host = e, this.$headers = new
|
|
535
|
-
"sl-device-id":
|
|
536
|
-
"sl-device-os":
|
|
534
|
+
this.host = e, this.$headers = new Te(ie({
|
|
535
|
+
"sl-device-id": bi(),
|
|
536
|
+
"sl-device-os": vi()
|
|
537
537
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
538
|
-
const [r, n, i] =
|
|
538
|
+
const [r, n, i] = Or({
|
|
539
539
|
dedupeTime: 1e3 * 60 * 5,
|
|
540
540
|
refetchInterval: 1e3 * 60 * 5
|
|
541
541
|
});
|
|
542
|
-
this.nanoquery = { createFetcherStore: r, createMutatorStore: n, utils: i }, this.transport =
|
|
542
|
+
this.nanoquery = { createFetcherStore: r, createMutatorStore: n, utils: i }, this.transport = Tr({
|
|
543
543
|
baseUrl: e,
|
|
544
544
|
defaultTimeoutMs: 1e4,
|
|
545
545
|
interceptors: this.interceptors,
|
|
546
546
|
useBinaryFormat: !0
|
|
547
|
-
}), this.streamTransport =
|
|
547
|
+
}), this.streamTransport = Tr({
|
|
548
548
|
baseUrl: e,
|
|
549
549
|
interceptors: this.interceptors,
|
|
550
550
|
useBinaryFormat: !0
|
|
@@ -557,7 +557,7 @@ class kr {
|
|
|
557
557
|
const i = this.subscriptions.get(r);
|
|
558
558
|
if (i)
|
|
559
559
|
return i;
|
|
560
|
-
const o = new
|
|
560
|
+
const o = new yi(this.$headers, e, r, n);
|
|
561
561
|
return this.subscriptions.set(r, o), o;
|
|
562
562
|
};
|
|
563
563
|
removeSubscription = (e) => {
|
|
@@ -568,7 +568,7 @@ class kr {
|
|
|
568
568
|
for (const [i, o] of this.subscriptions)
|
|
569
569
|
o.disconnect(), this.subscriptions.delete(i);
|
|
570
570
|
this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
|
|
571
|
-
const [e, r, n] =
|
|
571
|
+
const [e, r, n] = Or();
|
|
572
572
|
this.nanoquery = { createFetcherStore: e, createMutatorStore: r, utils: n };
|
|
573
573
|
};
|
|
574
574
|
registerInterceptor = (e) => {
|
|
@@ -581,14 +581,14 @@ class kr {
|
|
|
581
581
|
const r = e.typeName;
|
|
582
582
|
if (this.clients.has(r))
|
|
583
583
|
return this.clients.get(r);
|
|
584
|
-
const n =
|
|
584
|
+
const n = Ir(e, this.transport);
|
|
585
585
|
return this.clients.set(r, n), n;
|
|
586
586
|
};
|
|
587
587
|
getStreamClient = (e) => {
|
|
588
588
|
const r = `stream-${e.typeName}`;
|
|
589
589
|
if (this.clients.has(r))
|
|
590
590
|
return this.clients.get(r);
|
|
591
|
-
const n =
|
|
591
|
+
const n = Ir(e, this.streamTransport);
|
|
592
592
|
return this.clients.set(r, n), n;
|
|
593
593
|
};
|
|
594
594
|
// create unary client, used for query request
|
|
@@ -599,7 +599,7 @@ class kr {
|
|
|
599
599
|
...Array.isArray(r) ? r : [r]
|
|
600
600
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
601
601
|
return { client: i, createRequestOptions: (d) => {
|
|
602
|
-
const c =
|
|
602
|
+
const c = Zn();
|
|
603
603
|
for (const f in d) {
|
|
604
604
|
const y = Ht[f];
|
|
605
605
|
c.set(y, d[f]);
|
|
@@ -627,11 +627,11 @@ class kr {
|
|
|
627
627
|
n.header.set(o, i[o]);
|
|
628
628
|
return r(n);
|
|
629
629
|
};
|
|
630
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
630
|
+
this.interceptors.push(e), this.interceptors.push(hi()), this.interceptors.push(mi);
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
633
|
+
const Si = (t, e) => {
|
|
634
|
+
const { client: r, queryKey: n } = e.createPromiseClient(ei, {
|
|
635
635
|
method: "retrieveEventId",
|
|
636
636
|
params: [t]
|
|
637
637
|
});
|
|
@@ -648,7 +648,7 @@ const wi = (t, e) => {
|
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
650
|
});
|
|
651
|
-
},
|
|
651
|
+
}, wi = (t, e) => {
|
|
652
652
|
const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getStream", params: [t] });
|
|
653
653
|
return e.nanoquery.createFetcherStore(n, {
|
|
654
654
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
@@ -656,23 +656,20 @@ const wi = (t, e) => {
|
|
|
656
656
|
// we are sure that id is a string
|
|
657
657
|
})).data?.attributes : void 0
|
|
658
658
|
});
|
|
659
|
-
},
|
|
660
|
-
const { queryKey: r, client: n } = e.createPromiseClient(
|
|
659
|
+
}, Ai = (t, e) => {
|
|
660
|
+
const { queryKey: r, client: n } = e.createPromiseClient(ar, { method: "me", params: [t] });
|
|
661
661
|
return e.nanoquery.createFetcherStore(r, {
|
|
662
662
|
fetcher: () => n.me({})
|
|
663
663
|
});
|
|
664
|
-
},
|
|
665
|
-
const { client: e, createRequestOptions: r } = t.createPromiseClient(
|
|
666
|
-
return
|
|
667
|
-
|
|
668
|
-
return u.meta && (u.meta.inviterKey = a), u;
|
|
669
|
-
};
|
|
670
|
-
}, Ti = (t, e) => {
|
|
664
|
+
}, Ei = (t) => {
|
|
665
|
+
const { client: e, createRequestOptions: r } = t.createPromiseClient(ar, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
666
|
+
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
667
|
+
}, Ii = (t, e) => {
|
|
671
668
|
const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "get", params: [t] });
|
|
672
669
|
return e.nanoquery.createFetcherStore(n, {
|
|
673
670
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
674
671
|
});
|
|
675
|
-
},
|
|
672
|
+
}, Ti = (t, e) => {
|
|
676
673
|
const { client: r, queryKey: n } = e.createPromiseClient(rt, { method: "getOrganization", params: [t] });
|
|
677
674
|
return e.nanoquery.createFetcherStore(n, {
|
|
678
675
|
fetcher: async () => {
|
|
@@ -683,7 +680,7 @@ const wi = (t, e) => {
|
|
|
683
680
|
} : void 0;
|
|
684
681
|
}
|
|
685
682
|
});
|
|
686
|
-
},
|
|
683
|
+
}, Oi = (t, e) => {
|
|
687
684
|
const { client: r, queryKey: n } = e.createPromiseClient(rt, {
|
|
688
685
|
method: "getOrganizationAdvertising",
|
|
689
686
|
params: [t]
|
|
@@ -691,8 +688,8 @@ const wi = (t, e) => {
|
|
|
691
688
|
return e.nanoquery.createFetcherStore(n, {
|
|
692
689
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
693
690
|
});
|
|
694
|
-
},
|
|
695
|
-
t.transport = new
|
|
691
|
+
}, Ci = (t, e, r) => {
|
|
692
|
+
t.transport = new Pr(e.host), t.analyticsTransport = new Pr(e.analyticsHost), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), t.transport.setHeader("sl-sdk-version", e.version || "-"), t.transport.$headers.subscribe((n) => {
|
|
696
693
|
t.analyticsTransport.$headers.getStore().set(n);
|
|
697
694
|
}), t.sdk.onMount(() => () => {
|
|
698
695
|
t.transport.disconnect(), t.analyticsTransport.disconnect();
|
|
@@ -722,50 +719,50 @@ class It {
|
|
|
722
719
|
this.storage.removeItem(this.generateKey(e));
|
|
723
720
|
};
|
|
724
721
|
}
|
|
725
|
-
var
|
|
722
|
+
var ce;
|
|
726
723
|
(function(t) {
|
|
727
724
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
728
|
-
})(
|
|
725
|
+
})(ce || (ce = {}));
|
|
729
726
|
class je extends It {
|
|
730
727
|
constructor() {
|
|
731
728
|
super("user");
|
|
732
729
|
}
|
|
733
730
|
// Schema
|
|
734
731
|
setSchema = (e) => {
|
|
735
|
-
this.write(
|
|
732
|
+
this.write(ce.SCHEMA, e);
|
|
736
733
|
};
|
|
737
|
-
getSchema = () => this.read(
|
|
734
|
+
getSchema = () => this.read(ce.SCHEMA);
|
|
738
735
|
// Token
|
|
739
736
|
setToken = (e) => {
|
|
740
|
-
this.write(
|
|
737
|
+
this.write(ce.TOKEN, e);
|
|
741
738
|
};
|
|
742
|
-
getToken = () => this.read(
|
|
739
|
+
getToken = () => this.read(ce.TOKEN);
|
|
743
740
|
// External Token
|
|
744
741
|
setExternalToken = (e) => {
|
|
745
|
-
this.write(
|
|
742
|
+
this.write(ce.EXTERNAL_TOKEN, e);
|
|
746
743
|
};
|
|
747
|
-
getExternalToken = () => this.read(
|
|
744
|
+
getExternalToken = () => this.read(ce.EXTERNAL_TOKEN);
|
|
748
745
|
removeToken = () => {
|
|
749
|
-
this.remove(
|
|
746
|
+
this.remove(ce.TOKEN);
|
|
750
747
|
};
|
|
751
748
|
}
|
|
752
|
-
var
|
|
749
|
+
var de;
|
|
753
750
|
(function(t) {
|
|
754
751
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
755
|
-
})(
|
|
752
|
+
})(de || (de = {}));
|
|
756
753
|
const Li = (t) => {
|
|
757
|
-
const e = new je(), r = new z(
|
|
754
|
+
const e = new je(), r = new z(B(e.getExternalToken()), "userKey"), n = new z(B(e.getToken()), "userToken"), i = new oe(Ai(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, d) => {
|
|
758
755
|
if (!a)
|
|
759
756
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : d;
|
|
760
|
-
}), o = new
|
|
757
|
+
}), o = new oe(Ii(n.getStore(), t), "userSettings");
|
|
761
758
|
return {
|
|
762
759
|
userKey: r,
|
|
763
760
|
userToken: n,
|
|
764
761
|
user: i,
|
|
765
762
|
userSettings: o
|
|
766
763
|
};
|
|
767
|
-
},
|
|
768
|
-
const e = new z(
|
|
764
|
+
}, _i = (t) => {
|
|
765
|
+
const e = new z(B(void 0), "providerStreamId"), r = new oe(Si(e.getStore(), t), "slStreamId", (i) => i?.data), n = new oe(wi(r.getAtomStore(), t), "streamSettings");
|
|
769
766
|
return r.getAtomStore().listen((i) => {
|
|
770
767
|
(i === "" || i === void 0) && n.getStore().mutate(void 0);
|
|
771
768
|
}), {
|
|
@@ -773,8 +770,8 @@ const Li = (t) => {
|
|
|
773
770
|
slStreamId: r,
|
|
774
771
|
streamSettings: n
|
|
775
772
|
};
|
|
776
|
-
},
|
|
777
|
-
const e = new z(
|
|
773
|
+
}, ki = (t) => {
|
|
774
|
+
const e = new z(B(void 0), "enabled"), r = new z(B(de.DISABLED), "status"), n = new oe(Ti(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new oe(Oi(n.getAtomStore(), t), "organizationAdvertising"), o = Li(t), s = _i(t);
|
|
778
775
|
return {
|
|
779
776
|
enabled: e,
|
|
780
777
|
status: r,
|
|
@@ -789,10 +786,10 @@ const Li = (t) => {
|
|
|
789
786
|
organizationAdvertising: i
|
|
790
787
|
};
|
|
791
788
|
};
|
|
792
|
-
class
|
|
789
|
+
class Pi extends Et {
|
|
793
790
|
stores;
|
|
794
791
|
constructor(e) {
|
|
795
|
-
const r =
|
|
792
|
+
const r = ki(e), n = di(r);
|
|
796
793
|
super(n, "core"), this.stores = r;
|
|
797
794
|
}
|
|
798
795
|
getValue() {
|
|
@@ -813,33 +810,25 @@ class Fi extends Et {
|
|
|
813
810
|
};
|
|
814
811
|
unsubscribe = () => this.getStore().off();
|
|
815
812
|
}
|
|
816
|
-
const
|
|
817
|
-
t.store = new
|
|
813
|
+
const Fi = (t, e, r) => {
|
|
814
|
+
t.store = new Pi(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = Object.fromEntries(Object.entries(t.stores).map(([n, i]) => [n, i.getStore()])), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.sdk.streamStore = () => t.stores.streamSettings.getStore(), t.storeUnsubscribe = () => {
|
|
818
815
|
t.store.unsubscribe();
|
|
819
816
|
}, r();
|
|
820
|
-
},
|
|
821
|
-
const { client:
|
|
822
|
-
method: "summary",
|
|
823
|
-
params: [t, e]
|
|
824
|
-
});
|
|
825
|
-
return r.nanoquery.createFetcherStore(i, {
|
|
826
|
-
fetcher: async (o, s, a, u) => (await n.summary({
|
|
827
|
-
eventId: a,
|
|
828
|
-
userId: u
|
|
829
|
-
})).data?.attributes
|
|
830
|
-
});
|
|
831
|
-
}, Ri = (t) => {
|
|
832
|
-
const { client: e } = t.createPromiseClient(on, { method: "list" });
|
|
817
|
+
}, Ni = (t) => {
|
|
818
|
+
const { client: e } = t.createPromiseClient(nn, { method: "list" });
|
|
833
819
|
return (r) => e.list(r);
|
|
834
|
-
},
|
|
835
|
-
const { client:
|
|
820
|
+
}, Di = (t) => {
|
|
821
|
+
const { client: e } = t.createPromiseClient(nn, { method: "summary" });
|
|
822
|
+
return (r) => e.summary(r);
|
|
823
|
+
}, Ri = (t, e) => {
|
|
824
|
+
const { client: r, queryKey: n } = e.createPromiseClient(ar, {
|
|
836
825
|
method: "getFriends",
|
|
837
826
|
params: [t]
|
|
838
827
|
});
|
|
839
828
|
return e.nanoquery.createFetcherStore(n, {
|
|
840
829
|
fetcher: async (i, o, s) => s ? (await r.getFriends({})).data : []
|
|
841
830
|
});
|
|
842
|
-
},
|
|
831
|
+
}, Vi = (t, e) => {
|
|
843
832
|
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "get", params: [t] });
|
|
844
833
|
return e.nanoquery.createFetcherStore(n, {
|
|
845
834
|
fetcher: async (i, o, s) => (await r.get({
|
|
@@ -848,7 +837,7 @@ const Ni = (t, e, r) => {
|
|
|
848
837
|
refetchInterval: 0,
|
|
849
838
|
dedupeTime: 1e3 * 60 * 60
|
|
850
839
|
});
|
|
851
|
-
},
|
|
840
|
+
}, $i = (t, e) => {
|
|
852
841
|
const { client: r, queryKey: n } = e.createPromiseClient(be, { method: "syncQuestion", params: [t] });
|
|
853
842
|
return e.nanoquery.createFetcherStore(n, {
|
|
854
843
|
fetcher: async (i, o, s) => s ? (await r.syncQuestion({
|
|
@@ -860,7 +849,7 @@ const Ni = (t, e, r) => {
|
|
|
860
849
|
// 10 minutes
|
|
861
850
|
refetchInterval: 0
|
|
862
851
|
});
|
|
863
|
-
},
|
|
852
|
+
}, ji = (t, e) => {
|
|
864
853
|
const { client: r } = e.createStreamClient(be), n = At({ eventId: t.get() || "", feedId: "" });
|
|
865
854
|
return t.subscribe((o = "") => {
|
|
866
855
|
n.set({ eventId: o, feedId: "" });
|
|
@@ -876,7 +865,7 @@ const Ni = (t, e, r) => {
|
|
|
876
865
|
})).data?.attributes?.question,
|
|
877
866
|
dedupeTime: 1e3 * 60 * 5
|
|
878
867
|
});
|
|
879
|
-
},
|
|
868
|
+
}, Mi = (t, e, r) => {
|
|
880
869
|
const { client: n, queryKey: i } = r.createPromiseClient(be, {
|
|
881
870
|
method: "list",
|
|
882
871
|
params: [t, e]
|
|
@@ -885,21 +874,21 @@ const Ni = (t, e, r) => {
|
|
|
885
874
|
fetcher: async (o, s, a, u) => a ? (await n.list({
|
|
886
875
|
eventId: a,
|
|
887
876
|
filter: {
|
|
888
|
-
types: u ===
|
|
889
|
-
statuses: [
|
|
877
|
+
types: u === Oe.ALLOWED ? [] : [D.FACTOID, D.PROMOTION, D.TWEET],
|
|
878
|
+
statuses: [Ee.ACTIVE, Ee.RESOLVED]
|
|
890
879
|
}
|
|
891
880
|
})).data : [],
|
|
892
881
|
dedupeTime: 0,
|
|
893
882
|
refetchInterval: 0
|
|
894
883
|
});
|
|
895
|
-
},
|
|
896
|
-
const n =
|
|
884
|
+
}, xi = (t, e, r) => {
|
|
885
|
+
const n = Ar([e, r], () => {
|
|
897
886
|
const a = e.get();
|
|
898
887
|
if (!a)
|
|
899
888
|
return;
|
|
900
889
|
const u = r.get().data?.find((c) => c.id === a?.questionId), d = a?.question?.openedFrom;
|
|
901
890
|
return u ? (u.openedFrom = d, u) : a.question;
|
|
902
|
-
}), i =
|
|
891
|
+
}), i = Ar(n, (a) => a && a.type === "question" ? a.id : void 0), o = Wt(i, t);
|
|
903
892
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
904
893
|
const u = o.get().data, d = (c, f) => {
|
|
905
894
|
if (!c || !f)
|
|
@@ -917,15 +906,18 @@ const Ni = (t, e, r) => {
|
|
|
917
906
|
};
|
|
918
907
|
o.mutate({
|
|
919
908
|
...a,
|
|
909
|
+
options: u?.options,
|
|
910
|
+
subject: u?.subject,
|
|
911
|
+
appearance: u?.appearance,
|
|
920
912
|
answers: d(u?.answers, a?.answers)
|
|
921
913
|
});
|
|
922
914
|
} };
|
|
923
915
|
};
|
|
924
|
-
var
|
|
916
|
+
var Oe;
|
|
925
917
|
(function(t) {
|
|
926
918
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
927
|
-
})(
|
|
928
|
-
class
|
|
919
|
+
})(Oe || (Oe = {}));
|
|
920
|
+
class Bi {
|
|
929
921
|
/** sl event id */
|
|
930
922
|
slStreamId;
|
|
931
923
|
/** organization id */
|
|
@@ -956,13 +948,13 @@ class qi {
|
|
|
956
948
|
log;
|
|
957
949
|
transport;
|
|
958
950
|
constructor(e) {
|
|
959
|
-
this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new z(
|
|
951
|
+
this.transport = e.transport, this.log = ve("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new z(B(void 0), "moderationId").getStore(), this.interactiveAllowed = new z(B(Oe.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new z(B(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new oe(Vi(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new oe(Mi(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = new oe($i(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = xi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
|
|
960
952
|
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = Ui(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
961
953
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
962
954
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
963
|
-
}), this.feedSubscription =
|
|
964
|
-
const n = this.activeQuestionId.
|
|
965
|
-
n && n.mutate(r.data?.attributes);
|
|
955
|
+
}), this.feedSubscription = ji(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
956
|
+
const n = this.activeQuestionId.store, i = n.get().data?.question?.id, o = r.data?.attributes?.question;
|
|
957
|
+
o && (i && o.status === Ee.RESOLVED && o.id !== i || n && n.mutate(r.data?.attributes));
|
|
966
958
|
}), this.feedSubscription.addListener("moderation update", (r) => {
|
|
967
959
|
window.requestAnimationFrame(() => {
|
|
968
960
|
r.data?.attributes?.question === void 0 && r.data?.attributes?.moderation && this.moderation.invalidate();
|
|
@@ -1001,7 +993,7 @@ class qi {
|
|
|
1001
993
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1002
994
|
};
|
|
1003
995
|
}
|
|
1004
|
-
class
|
|
996
|
+
class qi {
|
|
1005
997
|
notificationsList;
|
|
1006
998
|
notifications;
|
|
1007
999
|
store;
|
|
@@ -1011,7 +1003,7 @@ class Qi {
|
|
|
1011
1003
|
options;
|
|
1012
1004
|
logger;
|
|
1013
1005
|
constructor(e) {
|
|
1014
|
-
this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new z(
|
|
1006
|
+
this.options = e, this.logger = ve("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new z(B(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = this.notifications.getStore();
|
|
1015
1007
|
}
|
|
1016
1008
|
addToQueue = (e) => {
|
|
1017
1009
|
if (this.store.has(e.id)) {
|
|
@@ -1084,7 +1076,7 @@ var gt;
|
|
|
1084
1076
|
(function(t) {
|
|
1085
1077
|
t.OPENED = "opened";
|
|
1086
1078
|
})(gt || (gt = {}));
|
|
1087
|
-
class
|
|
1079
|
+
class Qi extends It {
|
|
1088
1080
|
constructor() {
|
|
1089
1081
|
super("notification");
|
|
1090
1082
|
}
|
|
@@ -1100,11 +1092,11 @@ var me;
|
|
|
1100
1092
|
(function(t) {
|
|
1101
1093
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1102
1094
|
})(me || (me = {}));
|
|
1103
|
-
class
|
|
1095
|
+
class Gi {
|
|
1104
1096
|
queue;
|
|
1105
1097
|
storage;
|
|
1106
1098
|
constructor(e = {}) {
|
|
1107
|
-
this.storage = new
|
|
1099
|
+
this.storage = new Qi(), this.queue = new qi({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1108
1100
|
}
|
|
1109
1101
|
add = (e) => {
|
|
1110
1102
|
if (!this.storage.isOpened(e.id)) {
|
|
@@ -1141,70 +1133,69 @@ class Ki {
|
|
|
1141
1133
|
};
|
|
1142
1134
|
}
|
|
1143
1135
|
const zi = (t, e, r) => {
|
|
1144
|
-
t.notifications = new
|
|
1136
|
+
t.notifications = new Gi(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), r();
|
|
1145
1137
|
};
|
|
1146
1138
|
var tt;
|
|
1147
1139
|
(function(t) {
|
|
1148
1140
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1149
1141
|
})(tt || (tt = {}));
|
|
1150
|
-
const
|
|
1142
|
+
const Ki = async (t, e) => {
|
|
1151
1143
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1152
1144
|
try {
|
|
1153
1145
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1154
1146
|
} catch (o) {
|
|
1155
|
-
throw et.from(o)?.code ===
|
|
1147
|
+
throw et.from(o)?.code === ee.AlreadyExists ? new Error(tt.ALREADY_VOTED) : new Error(tt.UNKNOWN);
|
|
1156
1148
|
}
|
|
1157
|
-
},
|
|
1149
|
+
}, Hi = (t, e) => {
|
|
1158
1150
|
const { client: r, createRequestOptions: n } = t.createPromiseClient(be, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1159
1151
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1160
1152
|
};
|
|
1161
|
-
var
|
|
1153
|
+
var Ue;
|
|
1162
1154
|
(function(t) {
|
|
1163
1155
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1164
|
-
})(
|
|
1165
|
-
class
|
|
1156
|
+
})(Ue || (Ue = {}));
|
|
1157
|
+
class dn extends It {
|
|
1166
1158
|
constructor() {
|
|
1167
1159
|
super("gamification");
|
|
1168
1160
|
}
|
|
1169
1161
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1170
|
-
this.write(
|
|
1162
|
+
this.write(Ue.ONBOARDING, n, e, r, i);
|
|
1171
1163
|
};
|
|
1172
|
-
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(
|
|
1164
|
+
getOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }) => this.read(Ue.ONBOARDING, n, e, r);
|
|
1173
1165
|
setOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
|
|
1174
|
-
const i = this.generateKey([
|
|
1166
|
+
const i = this.generateKey([Ue.ONBOARDING_IO, n, e, r]);
|
|
1175
1167
|
window.sessionStorage.setItem(i, "1");
|
|
1176
1168
|
};
|
|
1177
1169
|
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => {
|
|
1178
|
-
const i = this.generateKey([
|
|
1170
|
+
const i = this.generateKey([Ue.ONBOARDING_IO, n, e, r]);
|
|
1179
1171
|
return window.sessionStorage.getItem(i);
|
|
1180
1172
|
};
|
|
1181
1173
|
}
|
|
1182
|
-
const
|
|
1174
|
+
const Wi = {
|
|
1183
1175
|
pageSize: 10
|
|
1184
1176
|
}, Ji = (t, e, r, n, i) => {
|
|
1185
1177
|
let o = 0;
|
|
1186
|
-
const s =
|
|
1178
|
+
const s = B({ pageSize: i?.pageSize || Wi.pageSize, page: 0 }), a = ie({
|
|
1187
1179
|
data: [],
|
|
1188
1180
|
key: Date.now(),
|
|
1189
1181
|
hasMore: !0,
|
|
1190
1182
|
loading: void 0,
|
|
1191
1183
|
error: void 0
|
|
1192
|
-
}), u =
|
|
1184
|
+
}), u = Ni(t), d = async () => {
|
|
1193
1185
|
const y = e.get(), m = n.getStore().get().data?.map((b) => b.slId) || [];
|
|
1194
1186
|
if (y && m?.length) {
|
|
1195
1187
|
const b = r.get();
|
|
1196
1188
|
b && m.push(b), a.setKey("loading", !0), a.setKey("data", []);
|
|
1197
|
-
const
|
|
1189
|
+
const I = await u({
|
|
1198
1190
|
eventId: y,
|
|
1199
|
-
usersIds: m
|
|
1200
|
-
|
|
1201
|
-
}, A = await u(w);
|
|
1191
|
+
usersIds: m
|
|
1192
|
+
});
|
|
1202
1193
|
a.set({
|
|
1203
|
-
data:
|
|
1204
|
-
hasMore: !
|
|
1194
|
+
data: I.data.map((F) => F.attributes),
|
|
1195
|
+
hasMore: !1,
|
|
1205
1196
|
key: Date.now(),
|
|
1206
1197
|
loading: !1
|
|
1207
|
-
}),
|
|
1198
|
+
}), I.meta && (o = Math.round(I.meta.count / I.meta.pageSize));
|
|
1208
1199
|
}
|
|
1209
1200
|
}, c = () => {
|
|
1210
1201
|
d();
|
|
@@ -1212,27 +1203,10 @@ const Pr = {
|
|
|
1212
1203
|
const m = s.get(), b = y || m.page + 1;
|
|
1213
1204
|
b <= o && s.set({ ...m, page: b });
|
|
1214
1205
|
};
|
|
1215
|
-
return
|
|
1216
|
-
const y = e.listen(d), m = n.listen(d)
|
|
1217
|
-
const A = e.get();
|
|
1218
|
-
if (w.page > 0 && A)
|
|
1219
|
-
if (w.page < o) {
|
|
1220
|
-
a.setKey("loading", !0);
|
|
1221
|
-
const V = await u({
|
|
1222
|
-
eventId: A,
|
|
1223
|
-
pagination: w
|
|
1224
|
-
}), j = a.get().data || [];
|
|
1225
|
-
a.set({
|
|
1226
|
-
data: [...j, ...V.data.map((K) => K.attributes)],
|
|
1227
|
-
key: a.get().key,
|
|
1228
|
-
loading: !1,
|
|
1229
|
-
hasMore: !0
|
|
1230
|
-
});
|
|
1231
|
-
} else
|
|
1232
|
-
a.setKey("hasMore", !1);
|
|
1233
|
-
});
|
|
1206
|
+
return sr(a, () => {
|
|
1207
|
+
const y = e.listen(d), m = n.listen(d);
|
|
1234
1208
|
return () => {
|
|
1235
|
-
y(), m()
|
|
1209
|
+
y(), m();
|
|
1236
1210
|
};
|
|
1237
1211
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1238
1212
|
};
|
|
@@ -1244,7 +1218,7 @@ class Yi extends It {
|
|
|
1244
1218
|
super("deep-link-context", window.sessionStorage);
|
|
1245
1219
|
}
|
|
1246
1220
|
}
|
|
1247
|
-
const Fr = "sldl", Tt = "sldl_uid",
|
|
1221
|
+
const Fr = "sldl", Tt = "sldl_uid", fn = "sldl_eid", pn = "sldl_e_eid", Xi = /* @__PURE__ */ new Set([Tt, fn, pn]), Nr = (t) => {
|
|
1248
1222
|
const e = {}, r = {};
|
|
1249
1223
|
for (const [n, i] of t)
|
|
1250
1224
|
Xi.has(n) ? e[n] = i : r[n] = i;
|
|
@@ -1259,7 +1233,7 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
|
|
|
1259
1233
|
return { search: Nr(r) };
|
|
1260
1234
|
}
|
|
1261
1235
|
return null;
|
|
1262
|
-
}, Dr = ve("deep_link"),
|
|
1236
|
+
}, Dr = ve("deep_link"), ne = {
|
|
1263
1237
|
debug: (...t) => {
|
|
1264
1238
|
Dr.debug(...t), console.log(...t);
|
|
1265
1239
|
},
|
|
@@ -1268,20 +1242,20 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
|
|
|
1268
1242
|
}
|
|
1269
1243
|
}, eo = (t, e) => {
|
|
1270
1244
|
const { hash: r, search: n } = window.location;
|
|
1271
|
-
if (
|
|
1245
|
+
if (ne.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1272
1246
|
const i = Zi({ hash: r, search: n });
|
|
1273
|
-
if (
|
|
1247
|
+
if (ne.debug(i, "parse deep link result"), i) {
|
|
1274
1248
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1275
1249
|
if (Object.keys(a).length !== 0) {
|
|
1276
1250
|
t.setValue("data", a);
|
|
1277
1251
|
const d = Object.keys(u).length !== 0;
|
|
1278
1252
|
if (o) {
|
|
1279
1253
|
let c = "";
|
|
1280
|
-
d && (c = `#${new URLSearchParams(u).toString()}`,
|
|
1254
|
+
d && (c = `#${new URLSearchParams(u).toString()}`, ne.debug({ updatedHash: c }, "update hash")), window.history.replaceState(null, "", window.location.pathname + window.location.search + c);
|
|
1281
1255
|
}
|
|
1282
1256
|
if (s) {
|
|
1283
1257
|
let c = "";
|
|
1284
|
-
d && (c = `?${new URLSearchParams(u).toString()}`,
|
|
1258
|
+
d && (c = `?${new URLSearchParams(u).toString()}`, ne.debug({ updatedSearch: c }, "update search")), window.history.replaceState(null, "", window.location.pathname + c + window.location.hash);
|
|
1285
1259
|
}
|
|
1286
1260
|
e(a);
|
|
1287
1261
|
}
|
|
@@ -1295,17 +1269,17 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
|
|
|
1295
1269
|
try {
|
|
1296
1270
|
o = JSON.parse(i);
|
|
1297
1271
|
} catch (a) {
|
|
1298
|
-
|
|
1272
|
+
ne.debug(a);
|
|
1299
1273
|
}
|
|
1300
1274
|
t.deepLink = {
|
|
1301
|
-
$store: new
|
|
1275
|
+
$store: new Te(ie(o), "deep-link-context"),
|
|
1302
1276
|
getDeepLinkData: () => {
|
|
1303
1277
|
const { data: a, used: u } = t.deepLink.$store.getValues();
|
|
1304
1278
|
return { data: a, used: u };
|
|
1305
1279
|
},
|
|
1306
1280
|
// we are logged in with inviter id
|
|
1307
1281
|
deepLinkUsed: (a) => {
|
|
1308
|
-
|
|
1282
|
+
ne.debug(`logged in with inviterId: ${a}`), t.deepLink.$store.setValue("used", !0);
|
|
1309
1283
|
},
|
|
1310
1284
|
onDeepLinkHandlers: /* @__PURE__ */ new Set()
|
|
1311
1285
|
}, t.sdk.getInviter = () => {
|
|
@@ -1314,28 +1288,28 @@ const Fr = "sldl", Tt = "sldl_uid", pn = "sldl_eid", hn = "sldl_e_eid", Xi = /*
|
|
|
1314
1288
|
}, t.sdk.inviteDisplayed = () => {
|
|
1315
1289
|
t.deepLink.$store.getStore().set({}), t.deepLink.$store.getStore().off(), n.del("sl-deep-link-store");
|
|
1316
1290
|
}, t.deepLink.$store.subscribe((a) => n.set("sl-deep-link-store", JSON.stringify(a))), t.sdk.addDeepLinkHandler = (a) => {
|
|
1317
|
-
|
|
1291
|
+
ne.trace("adding deep link handler"), t.deepLink.onDeepLinkHandlers.add(a);
|
|
1318
1292
|
}, e.onDeepLinkHandled && t.sdk.addDeepLinkHandler(e.onDeepLinkHandled), t.sdk.removeDeepLinkHandler = (a) => {
|
|
1319
|
-
|
|
1293
|
+
ne.trace("removing deep link handler"), t.deepLink.onDeepLinkHandlers.delete(a);
|
|
1320
1294
|
};
|
|
1321
1295
|
const s = (a) => {
|
|
1322
|
-
t.deepLink.$store.setValue("handled", !0),
|
|
1296
|
+
t.deepLink.$store.setValue("handled", !0), ne.trace({ size: t.deepLink.onDeepLinkHandlers.size }, "deep link handled, call callbacks");
|
|
1323
1297
|
for (const u of t.deepLink.onDeepLinkHandlers)
|
|
1324
1298
|
try {
|
|
1325
|
-
|
|
1299
|
+
ne.trace("called handler"), u(a);
|
|
1326
1300
|
} catch (d) {
|
|
1327
1301
|
console.error(d);
|
|
1328
1302
|
}
|
|
1329
1303
|
};
|
|
1330
1304
|
eo(t.deepLink.$store, s), r();
|
|
1331
1305
|
}, ro = ve("bypass");
|
|
1332
|
-
class no extends
|
|
1306
|
+
class no extends li {
|
|
1333
1307
|
$coreStore;
|
|
1334
1308
|
deepLink;
|
|
1335
1309
|
transport;
|
|
1336
1310
|
bypassLogin;
|
|
1337
1311
|
constructor(e, r, n) {
|
|
1338
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1312
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Ei(this.transport), this.connect();
|
|
1339
1313
|
}
|
|
1340
1314
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1341
1315
|
/**
|
|
@@ -1418,7 +1392,7 @@ class no extends di {
|
|
|
1418
1392
|
}
|
|
1419
1393
|
const We = new je(), io = (t, e, r) => {
|
|
1420
1394
|
t.auth = new no(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1421
|
-
n ===
|
|
1395
|
+
n === de.READY && t.auth.reLogin();
|
|
1422
1396
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1423
1397
|
if (!(We.getSchema() === n && We.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
1424
1398
|
try {
|
|
@@ -1465,15 +1439,15 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1465
1439
|
}, t.sdk.initializeApp = async (o) => {
|
|
1466
1440
|
if (t.contextConfig = o, t.stores.enabled.get() === "on")
|
|
1467
1441
|
return { enabled: !0 };
|
|
1468
|
-
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(
|
|
1442
|
+
t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(de.INITIALIZATION);
|
|
1469
1443
|
try {
|
|
1470
1444
|
const s = await t.stores.organizationSettings.getValue();
|
|
1471
|
-
return s ? (t.stores.status.setValue(
|
|
1445
|
+
return s ? (t.stores.status.setValue(de.READY), { enabled: !!s }) : (t.stores.status.setValue(de.FAILED), { err: "failed" });
|
|
1472
1446
|
} catch (s) {
|
|
1473
|
-
return t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1447
|
+
return t.stores.enabled.setValue(), t.stores.status.setValue(de.FAILED), { err: `${s}` };
|
|
1474
1448
|
}
|
|
1475
1449
|
}, t.sdk.disableApp = () => {
|
|
1476
|
-
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(
|
|
1450
|
+
t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(de.DISABLED), t.stores.slStreamId.setValue(), t.stores.providerStreamId.setValue(), t.sdk.closeFeature(!0), t.storeUnsubscribe(), t.transport.disconnect());
|
|
1477
1451
|
}, t.sdk.createEventSession = (o) => {
|
|
1478
1452
|
t.stores.providerStreamId.setValue(o);
|
|
1479
1453
|
}, r();
|
|
@@ -1491,7 +1465,7 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1491
1465
|
refetchInterval: 0
|
|
1492
1466
|
});
|
|
1493
1467
|
}, uo = (t, { web: e, mobile: r }) => {
|
|
1494
|
-
const { client: n } = t.createPromiseClient(
|
|
1468
|
+
const { client: n } = t.createPromiseClient(ti, { method: "generate" });
|
|
1495
1469
|
return n.generate({ web: e, mobile: r });
|
|
1496
1470
|
}, Vr = (t, e) => {
|
|
1497
1471
|
const r = new URLSearchParams(t);
|
|
@@ -1499,30 +1473,30 @@ const We = new je(), io = (t, e, r) => {
|
|
|
1499
1473
|
r.append(n, i);
|
|
1500
1474
|
return r.toString();
|
|
1501
1475
|
}, co = (t, e, r, n) => {
|
|
1502
|
-
const i =
|
|
1503
|
-
return
|
|
1476
|
+
const i = ie({});
|
|
1477
|
+
return sr(i, () => ao(t, [e, r]).subscribe(async ({ data: a, error: u, loading: d }) => {
|
|
1504
1478
|
const c = u ? "https://masters.com" : a?.url, f = n.get() || "", y = e.get() || "", m = r.get() || "", b = {
|
|
1505
1479
|
[Tt]: f,
|
|
1506
|
-
[
|
|
1507
|
-
[
|
|
1480
|
+
[fn]: y,
|
|
1481
|
+
[pn]: m
|
|
1508
1482
|
};
|
|
1509
1483
|
if (!d && c) {
|
|
1510
1484
|
i.setKey("loading", !0);
|
|
1511
|
-
let
|
|
1512
|
-
|
|
1513
|
-
const
|
|
1485
|
+
let T = window.location.search, I = window.location.hash;
|
|
1486
|
+
T && I || I ? T = `?${Vr(T, b)}` : I = `#${Vr("", b)}`;
|
|
1487
|
+
const F = window.location.origin + window.location.pathname + T + I, $ = await uo(t, { web: F, mobile: c });
|
|
1514
1488
|
i.set({
|
|
1515
|
-
data:
|
|
1489
|
+
data: $.data?.link,
|
|
1516
1490
|
loading: !1
|
|
1517
1491
|
});
|
|
1518
1492
|
} else
|
|
1519
1493
|
i.setKey("loading", !0);
|
|
1520
1494
|
})), { $store: i, fetch };
|
|
1521
1495
|
};
|
|
1522
|
-
var
|
|
1496
|
+
var M;
|
|
1523
1497
|
(function(t) {
|
|
1524
1498
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1525
|
-
})(
|
|
1499
|
+
})(M || (M = {}));
|
|
1526
1500
|
const lo = (t, e, r, n) => {
|
|
1527
1501
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1528
1502
|
i && r.add({
|
|
@@ -1553,8 +1527,8 @@ const lo = (t, e, r, n) => {
|
|
|
1553
1527
|
userId: s,
|
|
1554
1528
|
organizationId: e.organizationId.get() || "",
|
|
1555
1529
|
eventId: e.slStreamId.get() || ""
|
|
1556
|
-
}) ===
|
|
1557
|
-
t.set(
|
|
1530
|
+
}) === M.Completed) {
|
|
1531
|
+
t.set(M.Completed);
|
|
1558
1532
|
for (const y of o)
|
|
1559
1533
|
y();
|
|
1560
1534
|
return;
|
|
@@ -1563,22 +1537,22 @@ const lo = (t, e, r, n) => {
|
|
|
1563
1537
|
if (u === void 0 || d === void 0)
|
|
1564
1538
|
return;
|
|
1565
1539
|
const c = u?.options?.onboardingEnabled, f = d?.titleCard?.optIn;
|
|
1566
|
-
c ? f ? t.set(
|
|
1540
|
+
c ? f ? t.set(M.Required) : t.set(M.Optional) : (f ? t.set(M.Unavailable) : t.set(M.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), !1));
|
|
1567
1541
|
} catch (s) {
|
|
1568
1542
|
console.error(s);
|
|
1569
1543
|
}
|
|
1570
1544
|
}, fo = (t, e, r, n) => {
|
|
1571
1545
|
let i = !1;
|
|
1572
|
-
const o = new
|
|
1546
|
+
const o = new dn(), s = B(M.Unset);
|
|
1573
1547
|
s.subscribe((d) => {
|
|
1574
|
-
d !==
|
|
1548
|
+
d !== M.Unset && ((d === M.Optional || d === M.Required) && i === !1 && (lo(t, e, n, o), i = !0), d === M.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1575
1549
|
userId: e.userId.get() || "",
|
|
1576
1550
|
organizationId: e.organizationId.get() || "",
|
|
1577
1551
|
eventId: e.slStreamId.get() || ""
|
|
1578
1552
|
}));
|
|
1579
1553
|
});
|
|
1580
1554
|
const a = [];
|
|
1581
|
-
return ct(s, e, t, n, o, a), s.get() !==
|
|
1555
|
+
return ct(s, e, t, n, o, a), s.get() !== M.Completed && (a.push(e.userId.listen((d) => {
|
|
1582
1556
|
d && ct(s, e, t, n, o, a);
|
|
1583
1557
|
})), a.push(e.moderation.listen((d) => {
|
|
1584
1558
|
d.data && ct(s, e, t, n, o, a);
|
|
@@ -1587,11 +1561,11 @@ const lo = (t, e, r, n) => {
|
|
|
1587
1561
|
}))), { $store: s, submitInplay: async () => {
|
|
1588
1562
|
const d = e.slStreamId.get();
|
|
1589
1563
|
if (d) {
|
|
1590
|
-
await
|
|
1564
|
+
await Hi(r, d), s.set(M.Completed), o.saveOnboardingStatus({
|
|
1591
1565
|
organizationId: e.organizationId.get() || "",
|
|
1592
1566
|
userId: e.userId.get() || "",
|
|
1593
1567
|
eventId: d
|
|
1594
|
-
},
|
|
1568
|
+
}, M.Completed), he.emit("poll", {
|
|
1595
1569
|
action: "onboardingPassed",
|
|
1596
1570
|
payload: {}
|
|
1597
1571
|
});
|
|
@@ -1599,8 +1573,25 @@ const lo = (t, e, r, n) => {
|
|
|
1599
1573
|
n.close(c);
|
|
1600
1574
|
}
|
|
1601
1575
|
} };
|
|
1602
|
-
}, po =
|
|
1603
|
-
|
|
1576
|
+
}, po = (t, e, r, n) => {
|
|
1577
|
+
const i = ie(void 0), o = Di(n), s = async () => {
|
|
1578
|
+
const u = t.get(), d = e.get(), c = r.getStore().get().data?.map((m) => m.slId) || [], f = {
|
|
1579
|
+
eventId: u,
|
|
1580
|
+
userId: d,
|
|
1581
|
+
usersIds: [...c, d]
|
|
1582
|
+
}, y = await o(f);
|
|
1583
|
+
i.set(y.data?.attributes);
|
|
1584
|
+
}, a = () => {
|
|
1585
|
+
s();
|
|
1586
|
+
};
|
|
1587
|
+
return sr(i, () => {
|
|
1588
|
+
const u = t.listen(s), d = r.listen(s), c = e.listen(s);
|
|
1589
|
+
return () => {
|
|
1590
|
+
u(), d(), c();
|
|
1591
|
+
};
|
|
1592
|
+
}), { $store: i, invalidate: a };
|
|
1593
|
+
}, ho = /* @__PURE__ */ new Set([D.POLL, D.PREDICTION, D.TRIVIA]);
|
|
1594
|
+
class yo extends ln {
|
|
1604
1595
|
/** user statistics (leaderboard panel) */
|
|
1605
1596
|
userSummary;
|
|
1606
1597
|
/** feed list (pick history) */
|
|
@@ -1633,16 +1624,16 @@ class ho extends dn {
|
|
|
1633
1624
|
storage;
|
|
1634
1625
|
submitAnswerTimeout;
|
|
1635
1626
|
constructor(e, r, n) {
|
|
1636
|
-
super(e, r), this.background = new
|
|
1637
|
-
this.leaderboardList.$store.lc !== 0 && i?.
|
|
1627
|
+
super(e, r), this.background = new Bi(n), this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new dn(), this.feedList = this.background.feedList, this.friends = new oe(Ri(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = B(void 0), this.leaderboardId = new z(B(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = fo(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = () => n.sdk.closeFeature(!0), this.openFeature = () => n.sdk.openFeature(N.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = co(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = po(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Ji(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.userSummary.$store.listen((i) => {
|
|
1628
|
+
this.leaderboardList.$store.lc !== 0 && i?.summary && this.leaderboardList.invalidate();
|
|
1638
1629
|
}), this.background.activeQuestionId.listen(this.showInApp), this.onboardingStatus.$store.listen(this.checkInteractiveFlag), this.background.moderation.getStore().listen(this.checkInteractiveFlag), this.settings.subscribe(this.checkInteractiveFlag);
|
|
1639
1630
|
}
|
|
1640
1631
|
get isInteractiveAllowed() {
|
|
1641
|
-
return this.background.interactiveAllowed.get() ===
|
|
1632
|
+
return this.background.interactiveAllowed.get() === Oe.ALLOWED;
|
|
1642
1633
|
}
|
|
1643
1634
|
checkInteractiveFlag = () => {
|
|
1644
|
-
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e ===
|
|
1645
|
-
this.background.interactiveAllowed.set(o ?
|
|
1635
|
+
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === M.Completed, o = !r || i || n !== !0;
|
|
1636
|
+
this.background.interactiveAllowed.set(o ? Oe.ALLOWED : Oe.DISALLOWED);
|
|
1646
1637
|
};
|
|
1647
1638
|
connect = () => {
|
|
1648
1639
|
this.background.feedSubscription.addListener("feed-subscription-prediction-close", async (e) => {
|
|
@@ -1652,47 +1643,47 @@ class ho extends dn {
|
|
|
1652
1643
|
if (!r || !n?.attributes)
|
|
1653
1644
|
return;
|
|
1654
1645
|
const { status: i, type: o, id: s, answers: a } = r;
|
|
1655
|
-
if (i ===
|
|
1646
|
+
if (i === Ee.RESOLVED && o === D.PREDICTION) {
|
|
1656
1647
|
const u = this.background.getCurrentSessionId({
|
|
1657
1648
|
prefix: `notification-id:${s}`
|
|
1658
|
-
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((
|
|
1649
|
+
}), d = [...this.feedList.getValues().data || []], c = d.findIndex((q) => q.id === s), f = d[c];
|
|
1659
1650
|
let y = f?.attributes?.attributes?.value?.answerId;
|
|
1660
1651
|
const m = Wt(s, this.transport), b = m.subscribe(() => {
|
|
1661
1652
|
});
|
|
1662
1653
|
await m.get().promise;
|
|
1663
|
-
const
|
|
1654
|
+
const T = m.get().data;
|
|
1664
1655
|
b(), window.requestAnimationFrame(() => {
|
|
1665
1656
|
m.invalidate();
|
|
1666
|
-
}), y || (y =
|
|
1667
|
-
const
|
|
1657
|
+
}), y || (y = T?.answers.find(({ youVoted: q }) => q)?.id);
|
|
1658
|
+
const I = a.find(({ correct: q }) => q), F = y ? a.find(({ id: q }) => q === y) : void 0, $ = !!F?.correct;
|
|
1668
1659
|
if (f && d[c]?.attributes?.attributes.case === "question") {
|
|
1669
1660
|
try {
|
|
1670
|
-
d[c].attributes.attributes.value.answerId = y, d[c].attributes.attributes.value.openForVoting = !1, y && (d[c].attributes.attributes.value.status =
|
|
1661
|
+
d[c].attributes.attributes.value.answerId = y, d[c].attributes.attributes.value.openForVoting = !1, y && (d[c].attributes.attributes.value.status = $ ? at.WON : at.LOST);
|
|
1671
1662
|
} catch {
|
|
1672
1663
|
}
|
|
1673
1664
|
this.feedList.getStore().mutate(d);
|
|
1674
1665
|
}
|
|
1675
|
-
if (!
|
|
1666
|
+
if (!F || !I)
|
|
1676
1667
|
return;
|
|
1677
1668
|
this.openedQuestionId.get()?.questionId !== r.id && this.notifications.add({
|
|
1678
1669
|
type: me.QUESTION_RESOLVED,
|
|
1679
1670
|
action: () => this.openQuestion(r.id, n),
|
|
1680
1671
|
close: () => this.closeQuestion(s),
|
|
1681
|
-
autoHideDuration:
|
|
1672
|
+
autoHideDuration: $ ? 15e3 : 12e3,
|
|
1682
1673
|
id: u,
|
|
1683
1674
|
emitEvent: !1,
|
|
1684
1675
|
data: {
|
|
1685
1676
|
questionId: s,
|
|
1686
1677
|
questionType: D.PREDICTION,
|
|
1687
1678
|
question: {
|
|
1688
|
-
title:
|
|
1679
|
+
title: $ ? `Congratulations! You answered correctly! You won ${I.points} pts!` : `Better luck next time! Correct: ${I?.text}!`,
|
|
1689
1680
|
votedAnswer: {
|
|
1690
|
-
title:
|
|
1691
|
-
points:
|
|
1681
|
+
title: F?.text,
|
|
1682
|
+
points: F?.points
|
|
1692
1683
|
},
|
|
1693
|
-
correctAnswerTitle:
|
|
1694
|
-
correct:
|
|
1695
|
-
predictionResult: i ===
|
|
1684
|
+
correctAnswerTitle: I?.text,
|
|
1685
|
+
correct: !!$,
|
|
1686
|
+
predictionResult: i === Ee.RESOLVED,
|
|
1696
1687
|
questionTitle: r?.subject
|
|
1697
1688
|
}
|
|
1698
1689
|
}
|
|
@@ -1728,8 +1719,24 @@ class ho extends dn {
|
|
|
1728
1719
|
}
|
|
1729
1720
|
}
|
|
1730
1721
|
});
|
|
1731
|
-
} else
|
|
1732
|
-
r[i]
|
|
1722
|
+
} else {
|
|
1723
|
+
const o = r[i];
|
|
1724
|
+
o.attributes && n.attributes && (r[i] = {
|
|
1725
|
+
...r[i],
|
|
1726
|
+
attributes: {
|
|
1727
|
+
...o.attributes,
|
|
1728
|
+
attributes: {
|
|
1729
|
+
...o.attributes.attributes,
|
|
1730
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1731
|
+
// @ts-ignore
|
|
1732
|
+
value: {
|
|
1733
|
+
...o.attributes.attributes.value,
|
|
1734
|
+
...n.attributes.attributes.value
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1733
1740
|
i === -1 && (r.unshift(n), he.emit("poll", {
|
|
1734
1741
|
action: "received",
|
|
1735
1742
|
payload: {
|
|
@@ -1762,7 +1769,9 @@ class ho extends dn {
|
|
|
1762
1769
|
}), c = n.get().data;
|
|
1763
1770
|
if (d(), c) {
|
|
1764
1771
|
const f = c.answers.find((b) => b.correct === !0), y = c.answers.findIndex((b) => b.id === r), m = c.answers[y];
|
|
1765
|
-
o[s].attributes.attributes.value.answerId = r, o[s].attributes.attributes.value.openForVoting = !1, o[s].attributes.attributes.value.text = m?.text || "", f && (o[s].attributes.attributes.value.status = f.id === r ? at.WON : at.LOST), this.feedList.getStore().mutate([...o]), c.answers[y].correct = f?.id === r, c.answers[y].youVoted = !0,
|
|
1772
|
+
o[s].attributes.attributes.value.answerId = r, o[s].attributes.attributes.value.openForVoting = !1, o[s].attributes.attributes.value.text = m?.text || "", f && (o[s].attributes.attributes.value.status = f.id === r ? at.WON : at.LOST), this.feedList.getStore().mutate([...o]), c.answers[y].correct = f?.id === r, c.answers[y].youVoted = !0, c.answers.forEach((b) => {
|
|
1773
|
+
b.percentageDecimal = 0;
|
|
1774
|
+
}), f?.id === r && (c.answers[y].pointsEarned = c.status === Ee.RESOLVED ? 0 : f.points), n.mutate({ ...c });
|
|
1766
1775
|
}
|
|
1767
1776
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
1768
1777
|
this.userSummary.invalidate();
|
|
@@ -1770,7 +1779,7 @@ class ho extends dn {
|
|
|
1770
1779
|
}
|
|
1771
1780
|
};
|
|
1772
1781
|
try {
|
|
1773
|
-
await
|
|
1782
|
+
await Ki(this.transport, { questionId: e, answerId: r }), i();
|
|
1774
1783
|
} catch (o) {
|
|
1775
1784
|
if (o.message === tt.ALREADY_VOTED) {
|
|
1776
1785
|
this.userSummary.invalidate();
|
|
@@ -1812,8 +1821,8 @@ class ho extends dn {
|
|
|
1812
1821
|
*/
|
|
1813
1822
|
showInApp = (e) => {
|
|
1814
1823
|
const r = this.onboardingStatus.$store.get();
|
|
1815
|
-
if (e && e.data && r && r !==
|
|
1816
|
-
if (
|
|
1824
|
+
if (e && e.data && r && r !== M.Unset && e.data.question?.id !== void 0 && e.data.question.notification !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== Jn.ON && e.data.question.status === Ee.ACTIVE && !e.data.question.marketClosed) {
|
|
1825
|
+
if (ho.has(e.data.question.type))
|
|
1817
1826
|
this.isInteractiveAllowed && this.notifications.add({
|
|
1818
1827
|
type: me.QUESTION,
|
|
1819
1828
|
action: () => e.data?.question && this.openQuestion(e.data.question.id, e.data.feedItem),
|
|
@@ -1836,7 +1845,7 @@ class ho extends dn {
|
|
|
1836
1845
|
const n = e.data.question.options?.options.value, i = {
|
|
1837
1846
|
heading: e.data.question.notification.title,
|
|
1838
1847
|
body: e.data.question.notification.body,
|
|
1839
|
-
imageMode: n
|
|
1848
|
+
imageMode: n?.imageMode,
|
|
1840
1849
|
image: n?.image,
|
|
1841
1850
|
video: {
|
|
1842
1851
|
id: n?.video?.id || "",
|
|
@@ -1888,16 +1897,16 @@ class ho extends dn {
|
|
|
1888
1897
|
}
|
|
1889
1898
|
};
|
|
1890
1899
|
}
|
|
1891
|
-
const
|
|
1900
|
+
const go = {
|
|
1892
1901
|
[N.GAMES]: !0
|
|
1893
1902
|
};
|
|
1894
|
-
class
|
|
1903
|
+
class mo extends ln {
|
|
1895
1904
|
constructor(e, r) {
|
|
1896
1905
|
super(e, r);
|
|
1897
1906
|
}
|
|
1898
1907
|
}
|
|
1899
|
-
const
|
|
1900
|
-
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new z(
|
|
1908
|
+
const bo = (t, e, r) => t.type === N.GAMES ? new yo(t, e, r) : new mo(t, e), vo = (t, e, r) => {
|
|
1909
|
+
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new z(B(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new z(B(N.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (n) => t.features.get(n), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (n) => {
|
|
1901
1910
|
t.activeFeature.setValue(n);
|
|
1902
1911
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
1903
1912
|
const i = t.activeFeature.getValue();
|
|
@@ -1906,9 +1915,9 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
|
|
|
1906
1915
|
const o = t.sdk.featuresList.getValue();
|
|
1907
1916
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
1908
1917
|
}
|
|
1909
|
-
}, t.initFeature = (n, i =
|
|
1910
|
-
if (n.type in
|
|
1911
|
-
const o =
|
|
1918
|
+
}, t.initFeature = (n, i = le.ORGANIZATION) => {
|
|
1919
|
+
if (n.type in go && !t.features.has(n.type)) {
|
|
1920
|
+
const o = bo(n, i, t);
|
|
1912
1921
|
t.features.set(n.type, o);
|
|
1913
1922
|
let s = t.sdk.featuresList.getValue();
|
|
1914
1923
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -1923,12 +1932,12 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
|
|
|
1923
1932
|
const n = await t.stores.organizationSettings.getValue();
|
|
1924
1933
|
t.features.clear(), t.sdk.featuresList.setValue(/* @__PURE__ */ new Set());
|
|
1925
1934
|
for (const i of n?.overlays || [])
|
|
1926
|
-
t.initFeature(i,
|
|
1935
|
+
t.initFeature(i, le.ORGANIZATION);
|
|
1927
1936
|
}, t.stores.providerStreamId.listen((n) => {
|
|
1928
1937
|
n || t.reinitializeFeatures();
|
|
1929
1938
|
}), t.storeSubscribe = () => {
|
|
1930
1939
|
const n = (o, s) => {
|
|
1931
|
-
if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o ===
|
|
1940
|
+
if (s?.overlays && !(t.contextConfig?.skipOrganizationSettings && o === le.ORGANIZATION))
|
|
1932
1941
|
for (const a of s.overlays)
|
|
1933
1942
|
a.sdkEnable === !0 && (t.features.has(a.type) ? t.updateFeature(a, o) : t.initFeature(a, o));
|
|
1934
1943
|
}, i = {
|
|
@@ -1944,7 +1953,7 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
|
|
|
1944
1953
|
organizationSettings: (o) => {
|
|
1945
1954
|
if (o.data)
|
|
1946
1955
|
try {
|
|
1947
|
-
n(
|
|
1956
|
+
n(le.ORGANIZATION, o.data);
|
|
1948
1957
|
} catch (s) {
|
|
1949
1958
|
console.log(s);
|
|
1950
1959
|
}
|
|
@@ -1952,7 +1961,7 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
|
|
|
1952
1961
|
streamSettings: (o) => {
|
|
1953
1962
|
if (o.data)
|
|
1954
1963
|
try {
|
|
1955
|
-
n(
|
|
1964
|
+
n(le.STREAM, o.data);
|
|
1956
1965
|
} catch (s) {
|
|
1957
1966
|
console.log(s);
|
|
1958
1967
|
}
|
|
@@ -1961,7 +1970,7 @@ const mo = (t, e, r) => t.type === N.GAMES ? new ho(t, e, r) : new go(t, e), bo
|
|
|
1961
1970
|
t.store.subscribe(i);
|
|
1962
1971
|
}, r();
|
|
1963
1972
|
};
|
|
1964
|
-
class
|
|
1973
|
+
class So {
|
|
1965
1974
|
analytics;
|
|
1966
1975
|
constructor(e) {
|
|
1967
1976
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -1980,24 +1989,24 @@ class vo {
|
|
|
1980
1989
|
this.analytics.write("invitation", {
|
|
1981
1990
|
common: {
|
|
1982
1991
|
...this.analytics.commonStore.getValues(),
|
|
1983
|
-
kind:
|
|
1992
|
+
kind: W.INVITATION_ACCEPTED
|
|
1984
1993
|
},
|
|
1985
|
-
category:
|
|
1986
|
-
from:
|
|
1994
|
+
category: Sr.GAMES,
|
|
1995
|
+
from: wr.UNSET
|
|
1987
1996
|
});
|
|
1988
1997
|
};
|
|
1989
1998
|
sent = ({ from: e }) => {
|
|
1990
1999
|
this.analytics.write("invitation", {
|
|
1991
2000
|
common: {
|
|
1992
2001
|
...this.analytics.commonStore.getValues(),
|
|
1993
|
-
kind:
|
|
2002
|
+
kind: W.INVITATION_SENT
|
|
1994
2003
|
},
|
|
1995
|
-
category:
|
|
1996
|
-
from: e ||
|
|
2004
|
+
category: Sr.GAMES,
|
|
2005
|
+
from: e || wr.UNSET
|
|
1997
2006
|
});
|
|
1998
2007
|
};
|
|
1999
2008
|
}
|
|
2000
|
-
class
|
|
2009
|
+
class wo {
|
|
2001
2010
|
analytics;
|
|
2002
2011
|
constructor(e) {
|
|
2003
2012
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2019,32 +2028,32 @@ class So {
|
|
|
2019
2028
|
this.analytics.write("interactions", {
|
|
2020
2029
|
common: {
|
|
2021
2030
|
...this.analytics.commonStore.getValues(),
|
|
2022
|
-
kind:
|
|
2031
|
+
kind: W.INTERACTIONS
|
|
2023
2032
|
},
|
|
2024
|
-
actionType:
|
|
2033
|
+
actionType: Lr.TAP
|
|
2025
2034
|
});
|
|
2026
2035
|
};
|
|
2027
2036
|
scroll = () => {
|
|
2028
2037
|
this.analytics.write("interactions", {
|
|
2029
2038
|
common: {
|
|
2030
2039
|
...this.analytics.commonStore.getValues(),
|
|
2031
|
-
kind:
|
|
2040
|
+
kind: W.INTERACTIONS
|
|
2032
2041
|
},
|
|
2033
|
-
actionType:
|
|
2042
|
+
actionType: Lr.SCROLL
|
|
2034
2043
|
});
|
|
2035
2044
|
};
|
|
2036
2045
|
}
|
|
2037
2046
|
const Ye = {
|
|
2038
|
-
[D.UNSET]:
|
|
2039
|
-
[D.FACTOID]:
|
|
2040
|
-
[D.POLL]:
|
|
2041
|
-
[D.PREDICTION]:
|
|
2042
|
-
[D.PROMOTION]:
|
|
2043
|
-
[D.TRIVIA]:
|
|
2044
|
-
[D.TWEET]:
|
|
2047
|
+
[D.UNSET]: K.UNSET,
|
|
2048
|
+
[D.FACTOID]: K.POLLS_INSIGHT,
|
|
2049
|
+
[D.POLL]: K.POLLS_POLL,
|
|
2050
|
+
[D.PREDICTION]: K.POLLS_PREDICTION,
|
|
2051
|
+
[D.PROMOTION]: K.POLLS_PROMOTION,
|
|
2052
|
+
[D.TRIVIA]: K.POLLS_TRIVIA,
|
|
2053
|
+
[D.TWEET]: K.POLLS_TWITTER
|
|
2045
2054
|
};
|
|
2046
|
-
D.UNSET + "",
|
|
2047
|
-
const
|
|
2055
|
+
D.UNSET + "", ue.UNSET, D.FACTOID + "", ue.POLLS, D.POLL + "", ue.POLLS, D.PREDICTION + "", ue.POLLS, D.PROMOTION + "", ue.POLLS, D.TRIVIA + "", ue.POLLS, D.TWEET + "", ue.POLLS;
|
|
2056
|
+
const Ao = {
|
|
2048
2057
|
[N.UNSET]: Q.UNSET,
|
|
2049
2058
|
[N.INPLAY]: Q.INPLAY,
|
|
2050
2059
|
[N.MESSAGING]: Q.MESSAGING,
|
|
@@ -2064,7 +2073,7 @@ const wo = {
|
|
|
2064
2073
|
[N.HIGHLIGHTS]: Q.HIGHLIGHTS,
|
|
2065
2074
|
[N.PUBLIC_CHAT]: Q.PUBLIC_CHAT
|
|
2066
2075
|
};
|
|
2067
|
-
class
|
|
2076
|
+
class Eo {
|
|
2068
2077
|
analytics;
|
|
2069
2078
|
constructor(e) {
|
|
2070
2079
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2086,11 +2095,11 @@ class Ao {
|
|
|
2086
2095
|
this.analytics.write("notification", {
|
|
2087
2096
|
common: {
|
|
2088
2097
|
...this.analytics.commonStore.getValues(),
|
|
2089
|
-
kind:
|
|
2098
|
+
kind: W.NOTIFICATION_RECEIVED,
|
|
2090
2099
|
topicId: e,
|
|
2091
|
-
topicType: r ? Ye[r] :
|
|
2100
|
+
topicType: r ? Ye[r] : K.UNSET
|
|
2092
2101
|
},
|
|
2093
|
-
notificationKind:
|
|
2102
|
+
notificationKind: ue.POLLS,
|
|
2094
2103
|
notificationType: _r.IN_APP
|
|
2095
2104
|
});
|
|
2096
2105
|
};
|
|
@@ -2098,16 +2107,16 @@ class Ao {
|
|
|
2098
2107
|
this.analytics.write("notification", {
|
|
2099
2108
|
common: {
|
|
2100
2109
|
...this.analytics.commonStore.getValues(),
|
|
2101
|
-
kind:
|
|
2110
|
+
kind: W.NOTIFICATION_OPENED,
|
|
2102
2111
|
topicId: e,
|
|
2103
|
-
topicType: r ? Ye[r] :
|
|
2112
|
+
topicType: r ? Ye[r] : K.UNSET
|
|
2104
2113
|
},
|
|
2105
|
-
notificationKind:
|
|
2114
|
+
notificationKind: ue.POLLS,
|
|
2106
2115
|
notificationType: _r.IN_APP
|
|
2107
2116
|
});
|
|
2108
2117
|
};
|
|
2109
2118
|
}
|
|
2110
|
-
class
|
|
2119
|
+
class Io {
|
|
2111
2120
|
analytics;
|
|
2112
2121
|
constructor(e) {
|
|
2113
2122
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2139,11 +2148,11 @@ class Eo {
|
|
|
2139
2148
|
this.analytics.write("games", {
|
|
2140
2149
|
common: {
|
|
2141
2150
|
...this.analytics.commonStore.getValues(),
|
|
2142
|
-
kind:
|
|
2151
|
+
kind: W.POLLS_RECEIVED,
|
|
2143
2152
|
topicId: e,
|
|
2144
|
-
topicType: r ? Ye[r] :
|
|
2153
|
+
topicType: r ? Ye[r] : K.UNSET
|
|
2145
2154
|
},
|
|
2146
|
-
pollOpenedFrom:
|
|
2155
|
+
pollOpenedFrom: De.UNSET
|
|
2147
2156
|
});
|
|
2148
2157
|
};
|
|
2149
2158
|
// poll is opened from notification or list
|
|
@@ -2151,11 +2160,11 @@ class Eo {
|
|
|
2151
2160
|
this.analytics.write("games", {
|
|
2152
2161
|
common: {
|
|
2153
2162
|
...this.analytics.commonStore.getValues(),
|
|
2154
|
-
kind:
|
|
2163
|
+
kind: W.POLLS_OPENED,
|
|
2155
2164
|
topicId: e,
|
|
2156
|
-
topicType: r ? Ye[r] :
|
|
2165
|
+
topicType: r ? Ye[r] : K.UNSET
|
|
2157
2166
|
},
|
|
2158
|
-
pollOpenedFrom: n === "list" ?
|
|
2167
|
+
pollOpenedFrom: n === "list" ? De.PICK_HISTORY : De.IN_APP
|
|
2159
2168
|
});
|
|
2160
2169
|
};
|
|
2161
2170
|
// poll is voted
|
|
@@ -2163,11 +2172,11 @@ class Eo {
|
|
|
2163
2172
|
this.analytics.write("games", {
|
|
2164
2173
|
common: {
|
|
2165
2174
|
...this.analytics.commonStore.getValues(),
|
|
2166
|
-
kind:
|
|
2175
|
+
kind: W.POLLS_VOTE,
|
|
2167
2176
|
topicId: e,
|
|
2168
|
-
topicType: r ? Ye[r] :
|
|
2177
|
+
topicType: r ? Ye[r] : K.UNSET
|
|
2169
2178
|
},
|
|
2170
|
-
pollOpenedFrom:
|
|
2179
|
+
pollOpenedFrom: De.UNSET
|
|
2171
2180
|
});
|
|
2172
2181
|
};
|
|
2173
2182
|
// onboarding passed, user is now able to vote
|
|
@@ -2175,9 +2184,9 @@ class Eo {
|
|
|
2175
2184
|
this.analytics.write("games", {
|
|
2176
2185
|
common: {
|
|
2177
2186
|
...this.analytics.commonStore.getValues(),
|
|
2178
|
-
kind:
|
|
2187
|
+
kind: W.GAMES_JOINED
|
|
2179
2188
|
},
|
|
2180
|
-
pollOpenedFrom:
|
|
2189
|
+
pollOpenedFrom: De.UNSET
|
|
2181
2190
|
});
|
|
2182
2191
|
};
|
|
2183
2192
|
// user clicked on link in poll and navigated to another page
|
|
@@ -2185,15 +2194,15 @@ class Eo {
|
|
|
2185
2194
|
this.analytics.write("games", {
|
|
2186
2195
|
common: {
|
|
2187
2196
|
...this.analytics.commonStore.getValues(),
|
|
2188
|
-
kind:
|
|
2197
|
+
kind: W.POLLS_NAVIGATED
|
|
2189
2198
|
},
|
|
2190
|
-
pollOpenedFrom:
|
|
2199
|
+
pollOpenedFrom: De.UNSET
|
|
2191
2200
|
});
|
|
2192
2201
|
};
|
|
2193
2202
|
}
|
|
2194
|
-
const
|
|
2203
|
+
const To = ({ transport: t, $commonStore: e }) => {
|
|
2195
2204
|
let r;
|
|
2196
|
-
const n =
|
|
2205
|
+
const n = B(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(on, {
|
|
2197
2206
|
method: "send",
|
|
2198
2207
|
params: [n]
|
|
2199
2208
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -2206,30 +2215,30 @@ const Io = ({ transport: t, $commonStore: e }) => {
|
|
|
2206
2215
|
value: {
|
|
2207
2216
|
common: {
|
|
2208
2217
|
...y,
|
|
2209
|
-
kind:
|
|
2218
|
+
kind: W.SESSION_HEARTBEAT
|
|
2210
2219
|
}
|
|
2211
2220
|
}
|
|
2212
2221
|
}
|
|
2213
2222
|
});
|
|
2214
2223
|
} catch (m) {
|
|
2215
|
-
|
|
2224
|
+
fe.error(m, "send heartbeat failed");
|
|
2216
2225
|
}
|
|
2217
2226
|
return Date.now();
|
|
2218
2227
|
},
|
|
2219
2228
|
refetchInterval: i
|
|
2220
2229
|
}), u = () => {
|
|
2221
|
-
|
|
2230
|
+
fe.debug("mounted heartbeat"), r = a.subscribe(() => {
|
|
2222
2231
|
});
|
|
2223
2232
|
}, d = () => {
|
|
2224
|
-
|
|
2233
|
+
fe.debug("enabled heartbeat"), n.set(!0), a.lc === 0 && u();
|
|
2225
2234
|
}, c = () => {
|
|
2226
|
-
|
|
2235
|
+
fe.debug("disabled heartbeat"), n.set(!1);
|
|
2227
2236
|
};
|
|
2228
2237
|
return { enable: d, disable: c, mount: u, unmount: () => {
|
|
2229
|
-
|
|
2238
|
+
fe.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2230
2239
|
} };
|
|
2231
|
-
},
|
|
2232
|
-
class
|
|
2240
|
+
}, fe = ve("analytics");
|
|
2241
|
+
class Oo {
|
|
2233
2242
|
commonStore;
|
|
2234
2243
|
notifications;
|
|
2235
2244
|
polls;
|
|
@@ -2241,23 +2250,23 @@ class To {
|
|
|
2241
2250
|
listenersCancels;
|
|
2242
2251
|
connected = !1;
|
|
2243
2252
|
constructor(e) {
|
|
2244
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new
|
|
2245
|
-
const { client: r } = e.analyticsTransport.createPromiseClient(
|
|
2253
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Te(ie({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = To({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new Eo(this), this.polls = new Io(this), this.invitation = new So(this), this.interactions = new wo(this);
|
|
2254
|
+
const { client: r } = e.analyticsTransport.createPromiseClient(on, {
|
|
2246
2255
|
method: "send"
|
|
2247
2256
|
});
|
|
2248
2257
|
this.analyticsClient = r;
|
|
2249
2258
|
}
|
|
2250
2259
|
connect = () => {
|
|
2251
|
-
this.writeCommon("sessionId", Gt()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0,
|
|
2260
|
+
this.writeCommon("sessionId", Gt()), this.heartbeat.enable(), this.listeners.forEach((e) => this.listenersCancels.add(e())), this.connected = !0, fe.debug("analytics connected");
|
|
2252
2261
|
};
|
|
2253
2262
|
disconnect = () => {
|
|
2254
|
-
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1,
|
|
2263
|
+
this.writeCommon("sessionId", ""), this.writeCommon("overlaySessionId", ""), this.heartbeat.unmount(), this.listenersCancels.forEach((e) => e()), this.connected = !1, fe.debug("analytics disconnected");
|
|
2255
2264
|
};
|
|
2256
2265
|
write = (e, r) => {
|
|
2257
2266
|
r && this.analyticsClient.unary({ message: { case: e, value: r } }).then(() => {
|
|
2258
|
-
|
|
2267
|
+
fe.trace("send analytics success", e, r);
|
|
2259
2268
|
}).catch((n) => {
|
|
2260
|
-
|
|
2269
|
+
fe.error(n, "send analytics failed");
|
|
2261
2270
|
});
|
|
2262
2271
|
};
|
|
2263
2272
|
writeCommon = (e, r) => {
|
|
@@ -2271,10 +2280,10 @@ class To {
|
|
|
2271
2280
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2272
2281
|
this.writeCommon("eventId", r);
|
|
2273
2282
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2274
|
-
r && this.writeCommon("category",
|
|
2283
|
+
r && this.writeCommon("category", Ao[r]), r !== N.UNSET ? this.writeCommon("overlaySessionId", Gt()) : this.writeCommon("overlaySessionId", "");
|
|
2275
2284
|
})), this.onConnect(() => {
|
|
2276
2285
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2277
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
2286
|
+
this.writeCommon("screenOrientation", i.matches ? Cr.PORTRAIT : Cr.LANDSCAPE);
|
|
2278
2287
|
};
|
|
2279
2288
|
return r.addEventListener("change", n), () => {
|
|
2280
2289
|
r.removeEventListener("change", n);
|
|
@@ -2284,16 +2293,16 @@ class To {
|
|
|
2284
2293
|
}));
|
|
2285
2294
|
};
|
|
2286
2295
|
}
|
|
2287
|
-
const
|
|
2288
|
-
t.analytics = new
|
|
2296
|
+
const Co = (t, e, r) => {
|
|
2297
|
+
t.analytics = new Oo(t), t.sdk.onMount(() => (t.analytics.connect(), () => {
|
|
2289
2298
|
t.analytics.disconnect();
|
|
2290
2299
|
})), r();
|
|
2291
2300
|
};
|
|
2292
|
-
var
|
|
2293
|
-
function
|
|
2301
|
+
var hn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2302
|
+
function Lo(t) {
|
|
2294
2303
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2295
2304
|
}
|
|
2296
|
-
var
|
|
2305
|
+
var ur = { exports: {} }, cr = { exports: {} };
|
|
2297
2306
|
function _o(t) {
|
|
2298
2307
|
var e = new t(), r = e;
|
|
2299
2308
|
function n() {
|
|
@@ -2308,14 +2317,14 @@ function _o(t) {
|
|
|
2308
2317
|
release: i
|
|
2309
2318
|
};
|
|
2310
2319
|
}
|
|
2311
|
-
var
|
|
2312
|
-
function
|
|
2320
|
+
var ko = _o, Po = ko;
|
|
2321
|
+
function yn(t, e, r) {
|
|
2313
2322
|
if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
|
|
2314
2323
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
2315
|
-
var n =
|
|
2316
|
-
push:
|
|
2317
|
-
drain:
|
|
2318
|
-
saturated:
|
|
2324
|
+
var n = Po(Fo), i = null, o = null, s = 0, a = null, u = {
|
|
2325
|
+
push: T,
|
|
2326
|
+
drain: H,
|
|
2327
|
+
saturated: H,
|
|
2319
2328
|
pause: c,
|
|
2320
2329
|
paused: !1,
|
|
2321
2330
|
concurrency: r,
|
|
@@ -2324,11 +2333,11 @@ function gn(t, e, r) {
|
|
|
2324
2333
|
idle: b,
|
|
2325
2334
|
length: f,
|
|
2326
2335
|
getQueue: y,
|
|
2327
|
-
unshift:
|
|
2328
|
-
empty:
|
|
2329
|
-
kill:
|
|
2330
|
-
killAndDrain:
|
|
2331
|
-
error:
|
|
2336
|
+
unshift: I,
|
|
2337
|
+
empty: H,
|
|
2338
|
+
kill: $,
|
|
2339
|
+
killAndDrain: q,
|
|
2340
|
+
error: J
|
|
2332
2341
|
};
|
|
2333
2342
|
return u;
|
|
2334
2343
|
function d() {
|
|
@@ -2338,90 +2347,90 @@ function gn(t, e, r) {
|
|
|
2338
2347
|
u.paused = !0;
|
|
2339
2348
|
}
|
|
2340
2349
|
function f() {
|
|
2341
|
-
for (var
|
|
2342
|
-
|
|
2350
|
+
for (var _ = i, R = 0; _; )
|
|
2351
|
+
_ = _.next, R++;
|
|
2343
2352
|
return R;
|
|
2344
2353
|
}
|
|
2345
2354
|
function y() {
|
|
2346
|
-
for (var
|
|
2347
|
-
R.push(
|
|
2355
|
+
for (var _ = i, R = []; _; )
|
|
2356
|
+
R.push(_.value), _ = _.next;
|
|
2348
2357
|
return R;
|
|
2349
2358
|
}
|
|
2350
2359
|
function m() {
|
|
2351
2360
|
if (u.paused) {
|
|
2352
2361
|
u.paused = !1;
|
|
2353
|
-
for (var
|
|
2354
|
-
s++,
|
|
2362
|
+
for (var _ = 0; _ < u.concurrency; _++)
|
|
2363
|
+
s++, F();
|
|
2355
2364
|
}
|
|
2356
2365
|
}
|
|
2357
2366
|
function b() {
|
|
2358
2367
|
return s === 0 && u.length() === 0;
|
|
2359
2368
|
}
|
|
2360
|
-
function
|
|
2361
|
-
var
|
|
2362
|
-
|
|
2369
|
+
function T(_, R) {
|
|
2370
|
+
var E = n.get();
|
|
2371
|
+
E.context = t, E.release = F, E.value = _, E.callback = R || H, E.errorHandler = a, s === u.concurrency || u.paused ? o ? (o.next = E, o = E) : (i = E, o = E, u.saturated()) : (s++, e.call(t, E.value, E.worked));
|
|
2363
2372
|
}
|
|
2364
|
-
function
|
|
2365
|
-
var
|
|
2366
|
-
|
|
2373
|
+
function I(_, R) {
|
|
2374
|
+
var E = n.get();
|
|
2375
|
+
E.context = t, E.release = F, E.value = _, E.callback = R || H, E.errorHandler = a, s === u.concurrency || u.paused ? i ? (E.next = i, i = E) : (i = E, o = E, u.saturated()) : (s++, e.call(t, E.value, E.worked));
|
|
2367
2376
|
}
|
|
2368
|
-
function
|
|
2369
|
-
|
|
2377
|
+
function F(_) {
|
|
2378
|
+
_ && n.release(_);
|
|
2370
2379
|
var R = i;
|
|
2371
2380
|
R ? u.paused ? s-- : (o === i && (o = null), i = R.next, R.next = null, e.call(t, R.value, R.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
2372
2381
|
}
|
|
2373
|
-
function
|
|
2374
|
-
i = null, o = null, u.drain =
|
|
2382
|
+
function $() {
|
|
2383
|
+
i = null, o = null, u.drain = H;
|
|
2375
2384
|
}
|
|
2376
|
-
function
|
|
2377
|
-
i = null, o = null, u.drain(), u.drain =
|
|
2385
|
+
function q() {
|
|
2386
|
+
i = null, o = null, u.drain(), u.drain = H;
|
|
2378
2387
|
}
|
|
2379
|
-
function
|
|
2380
|
-
a =
|
|
2388
|
+
function J(_) {
|
|
2389
|
+
a = _;
|
|
2381
2390
|
}
|
|
2382
2391
|
}
|
|
2383
|
-
function
|
|
2392
|
+
function H() {
|
|
2384
2393
|
}
|
|
2385
|
-
function
|
|
2386
|
-
this.value = null, this.callback =
|
|
2394
|
+
function Fo() {
|
|
2395
|
+
this.value = null, this.callback = H, this.next = null, this.release = H, this.context = null, this.errorHandler = null;
|
|
2387
2396
|
var t = this;
|
|
2388
2397
|
this.worked = function(r, n) {
|
|
2389
2398
|
var i = t.callback, o = t.errorHandler, s = t.value;
|
|
2390
|
-
t.value = null, t.callback =
|
|
2399
|
+
t.value = null, t.callback = H, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
2391
2400
|
};
|
|
2392
2401
|
}
|
|
2393
|
-
function
|
|
2402
|
+
function No(t, e, r) {
|
|
2394
2403
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
2395
2404
|
function n(c, f) {
|
|
2396
2405
|
e.call(this, c).then(function(y) {
|
|
2397
2406
|
f(null, y);
|
|
2398
2407
|
}, f);
|
|
2399
2408
|
}
|
|
2400
|
-
var i =
|
|
2409
|
+
var i = yn(t, n, r), o = i.push, s = i.unshift;
|
|
2401
2410
|
return i.push = a, i.unshift = u, i.drained = d, i;
|
|
2402
2411
|
function a(c) {
|
|
2403
2412
|
var f = new Promise(function(y, m) {
|
|
2404
|
-
o(c, function(b,
|
|
2413
|
+
o(c, function(b, T) {
|
|
2405
2414
|
if (b) {
|
|
2406
2415
|
m(b);
|
|
2407
2416
|
return;
|
|
2408
2417
|
}
|
|
2409
|
-
y(
|
|
2418
|
+
y(T);
|
|
2410
2419
|
});
|
|
2411
2420
|
});
|
|
2412
|
-
return f.catch(
|
|
2421
|
+
return f.catch(H), f;
|
|
2413
2422
|
}
|
|
2414
2423
|
function u(c) {
|
|
2415
2424
|
var f = new Promise(function(y, m) {
|
|
2416
|
-
s(c, function(b,
|
|
2425
|
+
s(c, function(b, T) {
|
|
2417
2426
|
if (b) {
|
|
2418
2427
|
m(b);
|
|
2419
2428
|
return;
|
|
2420
2429
|
}
|
|
2421
|
-
y(
|
|
2430
|
+
y(T);
|
|
2422
2431
|
});
|
|
2423
2432
|
});
|
|
2424
|
-
return f.catch(
|
|
2433
|
+
return f.catch(H), f;
|
|
2425
2434
|
}
|
|
2426
2435
|
function d() {
|
|
2427
2436
|
if (i.idle())
|
|
@@ -2436,9 +2445,9 @@ function Fo(t, e, r) {
|
|
|
2436
2445
|
return f;
|
|
2437
2446
|
}
|
|
2438
2447
|
}
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
var
|
|
2448
|
+
cr.exports = yn;
|
|
2449
|
+
cr.exports.promise = No;
|
|
2450
|
+
var gn = cr.exports, lr = { exports: {} }, Be = typeof Reflect == "object" ? Reflect : null, $r = Be && typeof Be.apply == "function" ? Be.apply : function(e, r, n) {
|
|
2442
2451
|
return Function.prototype.apply.call(e, r, n);
|
|
2443
2452
|
}, dt;
|
|
2444
2453
|
Be && typeof Be.ownKeys == "function" ? dt = Be.ownKeys : Object.getOwnPropertySymbols ? dt = function(e) {
|
|
@@ -2446,17 +2455,17 @@ Be && typeof Be.ownKeys == "function" ? dt = Be.ownKeys : Object.getOwnPropertyS
|
|
|
2446
2455
|
} : dt = function(e) {
|
|
2447
2456
|
return Object.getOwnPropertyNames(e);
|
|
2448
2457
|
};
|
|
2449
|
-
function
|
|
2458
|
+
function Do(t) {
|
|
2450
2459
|
console && console.warn && console.warn(t);
|
|
2451
2460
|
}
|
|
2452
|
-
var
|
|
2461
|
+
var mn = Number.isNaN || function(e) {
|
|
2453
2462
|
return e !== e;
|
|
2454
2463
|
};
|
|
2455
2464
|
function k() {
|
|
2456
2465
|
k.init.call(this);
|
|
2457
2466
|
}
|
|
2458
|
-
|
|
2459
|
-
|
|
2467
|
+
lr.exports = k;
|
|
2468
|
+
lr.exports.once = jo;
|
|
2460
2469
|
k.EventEmitter = k;
|
|
2461
2470
|
k.prototype._events = void 0;
|
|
2462
2471
|
k.prototype._eventsCount = 0;
|
|
@@ -2472,7 +2481,7 @@ Object.defineProperty(k, "defaultMaxListeners", {
|
|
|
2472
2481
|
return jr;
|
|
2473
2482
|
},
|
|
2474
2483
|
set: function(t) {
|
|
2475
|
-
if (typeof t != "number" || t < 0 ||
|
|
2484
|
+
if (typeof t != "number" || t < 0 || mn(t))
|
|
2476
2485
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
2477
2486
|
jr = t;
|
|
2478
2487
|
}
|
|
@@ -2481,15 +2490,15 @@ k.init = function() {
|
|
|
2481
2490
|
(this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
2482
2491
|
};
|
|
2483
2492
|
k.prototype.setMaxListeners = function(e) {
|
|
2484
|
-
if (typeof e != "number" || e < 0 ||
|
|
2493
|
+
if (typeof e != "number" || e < 0 || mn(e))
|
|
2485
2494
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
2486
2495
|
return this._maxListeners = e, this;
|
|
2487
2496
|
};
|
|
2488
|
-
function
|
|
2497
|
+
function bn(t) {
|
|
2489
2498
|
return t._maxListeners === void 0 ? k.defaultMaxListeners : t._maxListeners;
|
|
2490
2499
|
}
|
|
2491
2500
|
k.prototype.getMaxListeners = function() {
|
|
2492
|
-
return
|
|
2501
|
+
return bn(this);
|
|
2493
2502
|
};
|
|
2494
2503
|
k.prototype.emit = function(e) {
|
|
2495
2504
|
for (var r = [], n = 1; n < arguments.length; n++)
|
|
@@ -2512,11 +2521,11 @@ k.prototype.emit = function(e) {
|
|
|
2512
2521
|
if (typeof u == "function")
|
|
2513
2522
|
$r(u, this, r);
|
|
2514
2523
|
else
|
|
2515
|
-
for (var d = u.length, c =
|
|
2524
|
+
for (var d = u.length, c = En(u, d), n = 0; n < d; ++n)
|
|
2516
2525
|
$r(c[n], this, r);
|
|
2517
2526
|
return !0;
|
|
2518
2527
|
};
|
|
2519
|
-
function
|
|
2528
|
+
function vn(t, e, r, n) {
|
|
2520
2529
|
var i, o, s;
|
|
2521
2530
|
if (Ot(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
2522
2531
|
"newListener",
|
|
@@ -2524,33 +2533,33 @@ function Sn(t, e, r, n) {
|
|
|
2524
2533
|
r.listener ? r.listener : r
|
|
2525
2534
|
), o = t._events), s = o[e]), s === void 0)
|
|
2526
2535
|
s = o[e] = r, ++t._eventsCount;
|
|
2527
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
2536
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = bn(t), i > 0 && s.length > i && !s.warned) {
|
|
2528
2537
|
s.warned = !0;
|
|
2529
2538
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
2530
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
2539
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, Do(a);
|
|
2531
2540
|
}
|
|
2532
2541
|
return t;
|
|
2533
2542
|
}
|
|
2534
2543
|
k.prototype.addListener = function(e, r) {
|
|
2535
|
-
return
|
|
2544
|
+
return vn(this, e, r, !1);
|
|
2536
2545
|
};
|
|
2537
2546
|
k.prototype.on = k.prototype.addListener;
|
|
2538
2547
|
k.prototype.prependListener = function(e, r) {
|
|
2539
|
-
return
|
|
2548
|
+
return vn(this, e, r, !0);
|
|
2540
2549
|
};
|
|
2541
|
-
function
|
|
2550
|
+
function Ro() {
|
|
2542
2551
|
if (!this.fired)
|
|
2543
2552
|
return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
|
|
2544
2553
|
}
|
|
2545
|
-
function
|
|
2546
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
2554
|
+
function Sn(t, e, r) {
|
|
2555
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = Ro.bind(n);
|
|
2547
2556
|
return i.listener = r, n.wrapFn = i, i;
|
|
2548
2557
|
}
|
|
2549
2558
|
k.prototype.once = function(e, r) {
|
|
2550
|
-
return Ot(r), this.on(e,
|
|
2559
|
+
return Ot(r), this.on(e, Sn(this, e, r)), this;
|
|
2551
2560
|
};
|
|
2552
2561
|
k.prototype.prependOnceListener = function(e, r) {
|
|
2553
|
-
return Ot(r), this.prependListener(e,
|
|
2562
|
+
return Ot(r), this.prependListener(e, Sn(this, e, r)), this;
|
|
2554
2563
|
};
|
|
2555
2564
|
k.prototype.removeListener = function(e, r) {
|
|
2556
2565
|
var n, i, o, s, a;
|
|
@@ -2568,7 +2577,7 @@ k.prototype.removeListener = function(e, r) {
|
|
|
2568
2577
|
}
|
|
2569
2578
|
if (o < 0)
|
|
2570
2579
|
return this;
|
|
2571
|
-
o === 0 ? n.shift() :
|
|
2580
|
+
o === 0 ? n.shift() : Vo(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
2572
2581
|
}
|
|
2573
2582
|
return this;
|
|
2574
2583
|
};
|
|
@@ -2592,24 +2601,24 @@ k.prototype.removeAllListeners = function(e) {
|
|
|
2592
2601
|
this.removeListener(e, r[i]);
|
|
2593
2602
|
return this;
|
|
2594
2603
|
};
|
|
2595
|
-
function
|
|
2604
|
+
function wn(t, e, r) {
|
|
2596
2605
|
var n = t._events;
|
|
2597
2606
|
if (n === void 0)
|
|
2598
2607
|
return [];
|
|
2599
2608
|
var i = n[e];
|
|
2600
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
2609
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? $o(i) : En(i, i.length);
|
|
2601
2610
|
}
|
|
2602
2611
|
k.prototype.listeners = function(e) {
|
|
2603
|
-
return
|
|
2612
|
+
return wn(this, e, !0);
|
|
2604
2613
|
};
|
|
2605
2614
|
k.prototype.rawListeners = function(e) {
|
|
2606
|
-
return
|
|
2615
|
+
return wn(this, e, !1);
|
|
2607
2616
|
};
|
|
2608
2617
|
k.listenerCount = function(t, e) {
|
|
2609
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
2618
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : An.call(t, e);
|
|
2610
2619
|
};
|
|
2611
|
-
k.prototype.listenerCount =
|
|
2612
|
-
function
|
|
2620
|
+
k.prototype.listenerCount = An;
|
|
2621
|
+
function An(t) {
|
|
2613
2622
|
var e = this._events;
|
|
2614
2623
|
if (e !== void 0) {
|
|
2615
2624
|
var r = e[t];
|
|
@@ -2623,22 +2632,22 @@ function En(t) {
|
|
|
2623
2632
|
k.prototype.eventNames = function() {
|
|
2624
2633
|
return this._eventsCount > 0 ? dt(this._events) : [];
|
|
2625
2634
|
};
|
|
2626
|
-
function
|
|
2635
|
+
function En(t, e) {
|
|
2627
2636
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
2628
2637
|
r[n] = t[n];
|
|
2629
2638
|
return r;
|
|
2630
2639
|
}
|
|
2631
|
-
function
|
|
2640
|
+
function Vo(t, e) {
|
|
2632
2641
|
for (; e + 1 < t.length; e++)
|
|
2633
2642
|
t[e] = t[e + 1];
|
|
2634
2643
|
t.pop();
|
|
2635
2644
|
}
|
|
2636
|
-
function
|
|
2645
|
+
function $o(t) {
|
|
2637
2646
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
2638
2647
|
e[r] = t[r].listener || t[r];
|
|
2639
2648
|
return e;
|
|
2640
2649
|
}
|
|
2641
|
-
function
|
|
2650
|
+
function jo(t, e) {
|
|
2642
2651
|
return new Promise(function(r, n) {
|
|
2643
2652
|
function i(s) {
|
|
2644
2653
|
t.removeListener(e, o), n(s);
|
|
@@ -2646,13 +2655,13 @@ function $o(t, e) {
|
|
|
2646
2655
|
function o() {
|
|
2647
2656
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
2648
2657
|
}
|
|
2649
|
-
|
|
2658
|
+
In(t, e, o, { once: !0 }), e !== "error" && Uo(t, i, { once: !0 });
|
|
2650
2659
|
});
|
|
2651
2660
|
}
|
|
2652
|
-
function
|
|
2653
|
-
typeof t.on == "function" &&
|
|
2661
|
+
function Uo(t, e, r) {
|
|
2662
|
+
typeof t.on == "function" && In(t, "error", e, r);
|
|
2654
2663
|
}
|
|
2655
|
-
function
|
|
2664
|
+
function In(t, e, r, n) {
|
|
2656
2665
|
if (typeof t.on == "function")
|
|
2657
2666
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
2658
2667
|
else if (typeof t.addEventListener == "function")
|
|
@@ -2662,7 +2671,7 @@ function Tn(t, e, r, n) {
|
|
|
2662
2671
|
else
|
|
2663
2672
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
2664
2673
|
}
|
|
2665
|
-
var
|
|
2674
|
+
var Tn = lr.exports, Ct = {}, On = {}, Cn = function() {
|
|
2666
2675
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
2667
2676
|
return !1;
|
|
2668
2677
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -2685,33 +2694,33 @@ var On = cr.exports, Ct = {}, Cn = {}, _n = function() {
|
|
|
2685
2694
|
return !1;
|
|
2686
2695
|
}
|
|
2687
2696
|
return !0;
|
|
2688
|
-
}, Mo =
|
|
2697
|
+
}, Mo = Cn, dr = function() {
|
|
2689
2698
|
return Mo() && !!Symbol.toStringTag;
|
|
2690
|
-
},
|
|
2691
|
-
return typeof
|
|
2692
|
-
},
|
|
2699
|
+
}, Ur = typeof Symbol < "u" && Symbol, xo = Cn, Bo = function() {
|
|
2700
|
+
return typeof Ur != "function" || typeof Symbol != "function" || typeof Ur("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : xo();
|
|
2701
|
+
}, Mr = {
|
|
2693
2702
|
foo: {}
|
|
2694
|
-
},
|
|
2695
|
-
return { __proto__:
|
|
2696
|
-
},
|
|
2703
|
+
}, qo = Object, Qo = function() {
|
|
2704
|
+
return { __proto__: Mr }.foo === Mr.foo && !({ __proto__: null } instanceof qo);
|
|
2705
|
+
}, Go = "Function.prototype.bind called on incompatible ", zo = Object.prototype.toString, Ko = Math.max, Ho = "[object Function]", xr = function(e, r) {
|
|
2697
2706
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
2698
2707
|
n[i] = e[i];
|
|
2699
2708
|
for (var o = 0; o < r.length; o += 1)
|
|
2700
2709
|
n[o + e.length] = r[o];
|
|
2701
2710
|
return n;
|
|
2702
|
-
},
|
|
2711
|
+
}, Wo = function(e, r) {
|
|
2703
2712
|
for (var n = [], i = r || 0, o = 0; i < e.length; i += 1, o += 1)
|
|
2704
2713
|
n[o] = e[i];
|
|
2705
2714
|
return n;
|
|
2706
|
-
},
|
|
2715
|
+
}, Jo = function(t, e) {
|
|
2707
2716
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
2708
2717
|
r += t[n], n + 1 < t.length && (r += e);
|
|
2709
2718
|
return r;
|
|
2710
|
-
},
|
|
2719
|
+
}, Yo = function(e) {
|
|
2711
2720
|
var r = this;
|
|
2712
|
-
if (typeof r != "function" ||
|
|
2713
|
-
throw new TypeError(
|
|
2714
|
-
for (var n =
|
|
2721
|
+
if (typeof r != "function" || zo.apply(r) !== Ho)
|
|
2722
|
+
throw new TypeError(Go + r);
|
|
2723
|
+
for (var n = Wo(arguments, 1), i, o = function() {
|
|
2715
2724
|
if (this instanceof i) {
|
|
2716
2725
|
var c = r.apply(
|
|
2717
2726
|
this,
|
|
@@ -2725,54 +2734,54 @@ var On = cr.exports, Ct = {}, Cn = {}, _n = function() {
|
|
|
2725
2734
|
);
|
|
2726
2735
|
}, s = Ko(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
2727
2736
|
a[u] = "$" + u;
|
|
2728
|
-
if (i = Function("binder", "return function (" +
|
|
2737
|
+
if (i = Function("binder", "return function (" + Jo(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
2729
2738
|
var d = function() {
|
|
2730
2739
|
};
|
|
2731
2740
|
d.prototype = r.prototype, i.prototype = new d(), d.prototype = null;
|
|
2732
2741
|
}
|
|
2733
2742
|
return i;
|
|
2734
|
-
},
|
|
2743
|
+
}, Xo = Yo, fr = Function.prototype.bind || Xo, Zo = Function.prototype.call, es = Object.prototype.hasOwnProperty, ts = fr, rs = ts.call(Zo, es), A, Qe = SyntaxError, Ln = Function, qe = TypeError, Pt = function(t) {
|
|
2735
2744
|
try {
|
|
2736
2745
|
return Ln('"use strict"; return (' + t + ").constructor;")();
|
|
2737
2746
|
} catch {
|
|
2738
2747
|
}
|
|
2739
|
-
},
|
|
2740
|
-
if (
|
|
2748
|
+
}, Ce = Object.getOwnPropertyDescriptor;
|
|
2749
|
+
if (Ce)
|
|
2741
2750
|
try {
|
|
2742
|
-
|
|
2751
|
+
Ce({}, "");
|
|
2743
2752
|
} catch {
|
|
2744
|
-
|
|
2753
|
+
Ce = null;
|
|
2745
2754
|
}
|
|
2746
2755
|
var Ft = function() {
|
|
2747
2756
|
throw new qe();
|
|
2748
|
-
},
|
|
2757
|
+
}, ns = Ce ? function() {
|
|
2749
2758
|
try {
|
|
2750
2759
|
return arguments.callee, Ft;
|
|
2751
2760
|
} catch {
|
|
2752
2761
|
try {
|
|
2753
|
-
return
|
|
2762
|
+
return Ce(arguments, "callee").get;
|
|
2754
2763
|
} catch {
|
|
2755
2764
|
return Ft;
|
|
2756
2765
|
}
|
|
2757
2766
|
}
|
|
2758
|
-
}() : Ft,
|
|
2767
|
+
}() : Ft, Re = Bo(), is = Qo(), j = Object.getPrototypeOf || (is ? function(t) {
|
|
2759
2768
|
return t.__proto__;
|
|
2760
|
-
} : null),
|
|
2761
|
-
"%AggregateError%": typeof AggregateError > "u" ?
|
|
2769
|
+
} : null), $e = {}, os = typeof Uint8Array > "u" || !j ? A : j(Uint8Array), Le = {
|
|
2770
|
+
"%AggregateError%": typeof AggregateError > "u" ? A : AggregateError,
|
|
2762
2771
|
"%Array%": Array,
|
|
2763
|
-
"%ArrayBuffer%": typeof ArrayBuffer > "u" ?
|
|
2764
|
-
"%ArrayIteratorPrototype%":
|
|
2765
|
-
"%AsyncFromSyncIteratorPrototype%":
|
|
2766
|
-
"%AsyncFunction%":
|
|
2767
|
-
"%AsyncGenerator%":
|
|
2768
|
-
"%AsyncGeneratorFunction%":
|
|
2769
|
-
"%AsyncIteratorPrototype%":
|
|
2770
|
-
"%Atomics%": typeof Atomics > "u" ?
|
|
2771
|
-
"%BigInt%": typeof BigInt > "u" ?
|
|
2772
|
-
"%BigInt64Array%": typeof BigInt64Array > "u" ?
|
|
2773
|
-
"%BigUint64Array%": typeof BigUint64Array > "u" ?
|
|
2772
|
+
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? A : ArrayBuffer,
|
|
2773
|
+
"%ArrayIteratorPrototype%": Re && j ? j([][Symbol.iterator]()) : A,
|
|
2774
|
+
"%AsyncFromSyncIteratorPrototype%": A,
|
|
2775
|
+
"%AsyncFunction%": $e,
|
|
2776
|
+
"%AsyncGenerator%": $e,
|
|
2777
|
+
"%AsyncGeneratorFunction%": $e,
|
|
2778
|
+
"%AsyncIteratorPrototype%": $e,
|
|
2779
|
+
"%Atomics%": typeof Atomics > "u" ? A : Atomics,
|
|
2780
|
+
"%BigInt%": typeof BigInt > "u" ? A : BigInt,
|
|
2781
|
+
"%BigInt64Array%": typeof BigInt64Array > "u" ? A : BigInt64Array,
|
|
2782
|
+
"%BigUint64Array%": typeof BigUint64Array > "u" ? A : BigUint64Array,
|
|
2774
2783
|
"%Boolean%": Boolean,
|
|
2775
|
-
"%DataView%": typeof DataView > "u" ?
|
|
2784
|
+
"%DataView%": typeof DataView > "u" ? A : DataView,
|
|
2776
2785
|
"%Date%": Date,
|
|
2777
2786
|
"%decodeURI%": decodeURI,
|
|
2778
2787
|
"%decodeURIComponent%": decodeURIComponent,
|
|
@@ -2782,58 +2791,58 @@ var Ft = function() {
|
|
|
2782
2791
|
"%eval%": eval,
|
|
2783
2792
|
// eslint-disable-line no-eval
|
|
2784
2793
|
"%EvalError%": EvalError,
|
|
2785
|
-
"%Float32Array%": typeof Float32Array > "u" ?
|
|
2786
|
-
"%Float64Array%": typeof Float64Array > "u" ?
|
|
2787
|
-
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ?
|
|
2794
|
+
"%Float32Array%": typeof Float32Array > "u" ? A : Float32Array,
|
|
2795
|
+
"%Float64Array%": typeof Float64Array > "u" ? A : Float64Array,
|
|
2796
|
+
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? A : FinalizationRegistry,
|
|
2788
2797
|
"%Function%": Ln,
|
|
2789
|
-
"%GeneratorFunction%":
|
|
2790
|
-
"%Int8Array%": typeof Int8Array > "u" ?
|
|
2791
|
-
"%Int16Array%": typeof Int16Array > "u" ?
|
|
2792
|
-
"%Int32Array%": typeof Int32Array > "u" ?
|
|
2798
|
+
"%GeneratorFunction%": $e,
|
|
2799
|
+
"%Int8Array%": typeof Int8Array > "u" ? A : Int8Array,
|
|
2800
|
+
"%Int16Array%": typeof Int16Array > "u" ? A : Int16Array,
|
|
2801
|
+
"%Int32Array%": typeof Int32Array > "u" ? A : Int32Array,
|
|
2793
2802
|
"%isFinite%": isFinite,
|
|
2794
2803
|
"%isNaN%": isNaN,
|
|
2795
|
-
"%IteratorPrototype%":
|
|
2796
|
-
"%JSON%": typeof JSON == "object" ? JSON :
|
|
2797
|
-
"%Map%": typeof Map > "u" ?
|
|
2798
|
-
"%MapIteratorPrototype%": typeof Map > "u" || !
|
|
2804
|
+
"%IteratorPrototype%": Re && j ? j(j([][Symbol.iterator]())) : A,
|
|
2805
|
+
"%JSON%": typeof JSON == "object" ? JSON : A,
|
|
2806
|
+
"%Map%": typeof Map > "u" ? A : Map,
|
|
2807
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Re || !j ? A : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2799
2808
|
"%Math%": Math,
|
|
2800
2809
|
"%Number%": Number,
|
|
2801
2810
|
"%Object%": Object,
|
|
2802
2811
|
"%parseFloat%": parseFloat,
|
|
2803
2812
|
"%parseInt%": parseInt,
|
|
2804
|
-
"%Promise%": typeof Promise > "u" ?
|
|
2805
|
-
"%Proxy%": typeof Proxy > "u" ?
|
|
2813
|
+
"%Promise%": typeof Promise > "u" ? A : Promise,
|
|
2814
|
+
"%Proxy%": typeof Proxy > "u" ? A : Proxy,
|
|
2806
2815
|
"%RangeError%": RangeError,
|
|
2807
2816
|
"%ReferenceError%": ReferenceError,
|
|
2808
|
-
"%Reflect%": typeof Reflect > "u" ?
|
|
2817
|
+
"%Reflect%": typeof Reflect > "u" ? A : Reflect,
|
|
2809
2818
|
"%RegExp%": RegExp,
|
|
2810
|
-
"%Set%": typeof Set > "u" ?
|
|
2811
|
-
"%SetIteratorPrototype%": typeof Set > "u" || !
|
|
2812
|
-
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ?
|
|
2819
|
+
"%Set%": typeof Set > "u" ? A : Set,
|
|
2820
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Re || !j ? A : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2821
|
+
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? A : SharedArrayBuffer,
|
|
2813
2822
|
"%String%": String,
|
|
2814
|
-
"%StringIteratorPrototype%":
|
|
2815
|
-
"%Symbol%":
|
|
2823
|
+
"%StringIteratorPrototype%": Re && j ? j(""[Symbol.iterator]()) : A,
|
|
2824
|
+
"%Symbol%": Re ? Symbol : A,
|
|
2816
2825
|
"%SyntaxError%": Qe,
|
|
2817
|
-
"%ThrowTypeError%":
|
|
2818
|
-
"%TypedArray%":
|
|
2826
|
+
"%ThrowTypeError%": ns,
|
|
2827
|
+
"%TypedArray%": os,
|
|
2819
2828
|
"%TypeError%": qe,
|
|
2820
|
-
"%Uint8Array%": typeof Uint8Array > "u" ?
|
|
2821
|
-
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ?
|
|
2822
|
-
"%Uint16Array%": typeof Uint16Array > "u" ?
|
|
2823
|
-
"%Uint32Array%": typeof Uint32Array > "u" ?
|
|
2829
|
+
"%Uint8Array%": typeof Uint8Array > "u" ? A : Uint8Array,
|
|
2830
|
+
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? A : Uint8ClampedArray,
|
|
2831
|
+
"%Uint16Array%": typeof Uint16Array > "u" ? A : Uint16Array,
|
|
2832
|
+
"%Uint32Array%": typeof Uint32Array > "u" ? A : Uint32Array,
|
|
2824
2833
|
"%URIError%": URIError,
|
|
2825
|
-
"%WeakMap%": typeof WeakMap > "u" ?
|
|
2826
|
-
"%WeakRef%": typeof WeakRef > "u" ?
|
|
2827
|
-
"%WeakSet%": typeof WeakSet > "u" ?
|
|
2834
|
+
"%WeakMap%": typeof WeakMap > "u" ? A : WeakMap,
|
|
2835
|
+
"%WeakRef%": typeof WeakRef > "u" ? A : WeakRef,
|
|
2836
|
+
"%WeakSet%": typeof WeakSet > "u" ? A : WeakSet
|
|
2828
2837
|
};
|
|
2829
|
-
if (
|
|
2838
|
+
if (j)
|
|
2830
2839
|
try {
|
|
2831
2840
|
null.error;
|
|
2832
2841
|
} catch (t) {
|
|
2833
|
-
var
|
|
2834
|
-
|
|
2842
|
+
var ss = j(j(t));
|
|
2843
|
+
Le["%Error.prototype%"] = ss;
|
|
2835
2844
|
}
|
|
2836
|
-
var
|
|
2845
|
+
var as = function t(e) {
|
|
2837
2846
|
var r;
|
|
2838
2847
|
if (e === "%AsyncFunction%")
|
|
2839
2848
|
r = Pt("async function () {}");
|
|
@@ -2846,9 +2855,9 @@ var ss = function t(e) {
|
|
|
2846
2855
|
n && (r = n.prototype);
|
|
2847
2856
|
} else if (e === "%AsyncIteratorPrototype%") {
|
|
2848
2857
|
var i = t("%AsyncGenerator%");
|
|
2849
|
-
i &&
|
|
2858
|
+
i && j && (r = j(i.prototype));
|
|
2850
2859
|
}
|
|
2851
|
-
return
|
|
2860
|
+
return Le[e] = r, r;
|
|
2852
2861
|
}, Br = {
|
|
2853
2862
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
2854
2863
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -2901,21 +2910,21 @@ var ss = function t(e) {
|
|
|
2901
2910
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
2902
2911
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
2903
2912
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2904
|
-
}, nt =
|
|
2913
|
+
}, nt = fr, mt = rs, us = nt.call(Function.call, Array.prototype.concat), cs = nt.call(Function.apply, Array.prototype.splice), qr = nt.call(Function.call, String.prototype.replace), bt = nt.call(Function.call, String.prototype.slice), ls = nt.call(Function.call, RegExp.prototype.exec), ds = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, fs = /\\(\\)?/g, ps = function(e) {
|
|
2905
2914
|
var r = bt(e, 0, 1), n = bt(e, -1);
|
|
2906
2915
|
if (r === "%" && n !== "%")
|
|
2907
2916
|
throw new Qe("invalid intrinsic syntax, expected closing `%`");
|
|
2908
2917
|
if (n === "%" && r !== "%")
|
|
2909
2918
|
throw new Qe("invalid intrinsic syntax, expected opening `%`");
|
|
2910
2919
|
var i = [];
|
|
2911
|
-
return qr(e,
|
|
2912
|
-
i[i.length] = a ? qr(u,
|
|
2920
|
+
return qr(e, ds, function(o, s, a, u) {
|
|
2921
|
+
i[i.length] = a ? qr(u, fs, "$1") : s || o;
|
|
2913
2922
|
}), i;
|
|
2914
|
-
},
|
|
2923
|
+
}, hs = function(e, r) {
|
|
2915
2924
|
var n = e, i;
|
|
2916
|
-
if (mt(Br, n) && (i = Br[n], n = "%" + i[0] + "%"), mt(
|
|
2917
|
-
var o =
|
|
2918
|
-
if (o ===
|
|
2925
|
+
if (mt(Br, n) && (i = Br[n], n = "%" + i[0] + "%"), mt(Le, n)) {
|
|
2926
|
+
var o = Le[n];
|
|
2927
|
+
if (o === $e && (o = as(n)), typeof o > "u" && !r)
|
|
2919
2928
|
throw new qe("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
2920
2929
|
return {
|
|
2921
2930
|
alias: i,
|
|
@@ -2924,37 +2933,37 @@ var ss = function t(e) {
|
|
|
2924
2933
|
};
|
|
2925
2934
|
}
|
|
2926
2935
|
throw new Qe("intrinsic " + e + " does not exist!");
|
|
2927
|
-
},
|
|
2936
|
+
}, ze = function(e, r) {
|
|
2928
2937
|
if (typeof e != "string" || e.length === 0)
|
|
2929
2938
|
throw new qe("intrinsic name must be a non-empty string");
|
|
2930
2939
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
2931
2940
|
throw new qe('"allowMissing" argument must be a boolean');
|
|
2932
|
-
if (
|
|
2941
|
+
if (ls(/^%?[^%]*%?$/, e) === null)
|
|
2933
2942
|
throw new Qe("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
2934
|
-
var n =
|
|
2935
|
-
d && (i = d[0],
|
|
2943
|
+
var n = ps(e), i = n.length > 0 ? n[0] : "", o = hs("%" + i + "%", r), s = o.name, a = o.value, u = !1, d = o.alias;
|
|
2944
|
+
d && (i = d[0], cs(n, us([0, 1], d)));
|
|
2936
2945
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
2937
2946
|
var y = n[c], m = bt(y, 0, 1), b = bt(y, -1);
|
|
2938
2947
|
if ((m === '"' || m === "'" || m === "`" || b === '"' || b === "'" || b === "`") && m !== b)
|
|
2939
2948
|
throw new Qe("property names with quotes must have matching quotes");
|
|
2940
|
-
if ((y === "constructor" || !f) && (u = !0), i += "." + y, s = "%" + i + "%", mt(
|
|
2941
|
-
a =
|
|
2949
|
+
if ((y === "constructor" || !f) && (u = !0), i += "." + y, s = "%" + i + "%", mt(Le, s))
|
|
2950
|
+
a = Le[s];
|
|
2942
2951
|
else if (a != null) {
|
|
2943
2952
|
if (!(y in a)) {
|
|
2944
2953
|
if (!r)
|
|
2945
2954
|
throw new qe("base intrinsic for " + e + " exists, but the property is not available.");
|
|
2946
2955
|
return;
|
|
2947
2956
|
}
|
|
2948
|
-
if (
|
|
2949
|
-
var
|
|
2950
|
-
f = !!
|
|
2957
|
+
if (Ce && c + 1 >= n.length) {
|
|
2958
|
+
var T = Ce(a, y);
|
|
2959
|
+
f = !!T, f && "get" in T && !("originalValue" in T.get) ? a = T.get : a = a[y];
|
|
2951
2960
|
} else
|
|
2952
2961
|
f = mt(a, y), a = a[y];
|
|
2953
|
-
f && !u && (
|
|
2962
|
+
f && !u && (Le[s] = a);
|
|
2954
2963
|
}
|
|
2955
2964
|
}
|
|
2956
2965
|
return a;
|
|
2957
|
-
},
|
|
2966
|
+
}, _n = { exports: {} }, ys = ze, Jt = ys("%Object.defineProperty%", !0), Yt = function() {
|
|
2958
2967
|
if (Jt)
|
|
2959
2968
|
try {
|
|
2960
2969
|
return Jt({}, "a", { value: 1 }), !0;
|
|
@@ -2972,33 +2981,33 @@ Yt.hasArrayLengthDefineBug = function() {
|
|
|
2972
2981
|
return !0;
|
|
2973
2982
|
}
|
|
2974
2983
|
};
|
|
2975
|
-
var
|
|
2984
|
+
var kn = Yt, gs = ze, ft = gs("%Object.getOwnPropertyDescriptor%", !0);
|
|
2976
2985
|
if (ft)
|
|
2977
2986
|
try {
|
|
2978
2987
|
ft([], "length");
|
|
2979
2988
|
} catch {
|
|
2980
2989
|
ft = null;
|
|
2981
2990
|
}
|
|
2982
|
-
var
|
|
2991
|
+
var pr = ft, ms = kn(), hr = ze, Xe = ms && hr("%Object.defineProperty%", !0);
|
|
2983
2992
|
if (Xe)
|
|
2984
2993
|
try {
|
|
2985
2994
|
Xe({}, "a", { value: 1 });
|
|
2986
2995
|
} catch {
|
|
2987
2996
|
Xe = !1;
|
|
2988
2997
|
}
|
|
2989
|
-
var
|
|
2998
|
+
var bs = hr("%SyntaxError%"), Ve = hr("%TypeError%"), Qr = pr, vs = function(e, r, n) {
|
|
2990
2999
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
2991
|
-
throw new
|
|
3000
|
+
throw new Ve("`obj` must be an object or a function`");
|
|
2992
3001
|
if (typeof r != "string" && typeof r != "symbol")
|
|
2993
|
-
throw new
|
|
3002
|
+
throw new Ve("`property` must be a string or a symbol`");
|
|
2994
3003
|
if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
|
|
2995
|
-
throw new
|
|
3004
|
+
throw new Ve("`nonEnumerable`, if provided, must be a boolean or null");
|
|
2996
3005
|
if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
|
|
2997
|
-
throw new
|
|
3006
|
+
throw new Ve("`nonWritable`, if provided, must be a boolean or null");
|
|
2998
3007
|
if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
|
|
2999
|
-
throw new
|
|
3008
|
+
throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3000
3009
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3001
|
-
throw new
|
|
3010
|
+
throw new Ve("`loose`, if provided, must be a boolean");
|
|
3002
3011
|
var i = arguments.length > 3 ? arguments[3] : null, o = arguments.length > 4 ? arguments[4] : null, s = arguments.length > 5 ? arguments[5] : null, a = arguments.length > 6 ? arguments[6] : !1, u = !!Qr && Qr(e, r);
|
|
3003
3012
|
if (Xe)
|
|
3004
3013
|
Xe(e, r, {
|
|
@@ -3010,18 +3019,18 @@ var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e,
|
|
|
3010
3019
|
else if (a || !i && !o && !s)
|
|
3011
3020
|
e[r] = n;
|
|
3012
3021
|
else
|
|
3013
|
-
throw new
|
|
3014
|
-
},
|
|
3022
|
+
throw new bs("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3023
|
+
}, Pn = ze, Gr = vs, Ss = kn(), zr = pr, Kr = Pn("%TypeError%"), ws = Pn("%Math.floor%"), As = function(e, r) {
|
|
3015
3024
|
if (typeof e != "function")
|
|
3016
|
-
throw new
|
|
3017
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3018
|
-
throw new
|
|
3025
|
+
throw new Kr("`fn` is not a function");
|
|
3026
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || ws(r) !== r)
|
|
3027
|
+
throw new Kr("`length` must be a positive 32-bit integer");
|
|
3019
3028
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3020
|
-
if ("length" in e &&
|
|
3021
|
-
var s =
|
|
3029
|
+
if ("length" in e && zr) {
|
|
3030
|
+
var s = zr(e, "length");
|
|
3022
3031
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3023
3032
|
}
|
|
3024
|
-
return (i || o || !n) && (
|
|
3033
|
+
return (i || o || !n) && (Ss ? Gr(
|
|
3025
3034
|
/** @type {Parameters<define>[0]} */
|
|
3026
3035
|
e,
|
|
3027
3036
|
"length",
|
|
@@ -3036,7 +3045,7 @@ var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e,
|
|
|
3036
3045
|
)), e;
|
|
3037
3046
|
};
|
|
3038
3047
|
(function(t) {
|
|
3039
|
-
var e =
|
|
3048
|
+
var e = fr, r = ze, n = As, i = r("%TypeError%"), o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = r("%Object.defineProperty%", !0), d = r("%Math.max%");
|
|
3040
3049
|
if (u)
|
|
3041
3050
|
try {
|
|
3042
3051
|
u({}, "a", { value: 1 });
|
|
@@ -3057,91 +3066,91 @@ var ms = pr("%SyntaxError%"), Re = pr("%TypeError%"), Qr = fr, bs = function(e,
|
|
|
3057
3066
|
return a(e, o, arguments);
|
|
3058
3067
|
};
|
|
3059
3068
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3060
|
-
})(
|
|
3061
|
-
var
|
|
3062
|
-
var n =
|
|
3063
|
-
return typeof n == "function" &&
|
|
3064
|
-
},
|
|
3065
|
-
return
|
|
3066
|
-
},
|
|
3067
|
-
return
|
|
3068
|
-
},
|
|
3069
|
-
return
|
|
3069
|
+
})(_n);
|
|
3070
|
+
var Fn = _n.exports, Nn = ze, Dn = Fn, Es = Dn(Nn("String.prototype.indexOf")), Rn = function(e, r) {
|
|
3071
|
+
var n = Nn(e, !!r);
|
|
3072
|
+
return typeof n == "function" && Es(e, ".prototype.") > -1 ? Dn(n) : n;
|
|
3073
|
+
}, Is = dr(), Ts = Rn, Xt = Ts("Object.prototype.toString"), Lt = function(e) {
|
|
3074
|
+
return Is && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : Xt(e) === "[object Arguments]";
|
|
3075
|
+
}, Vn = function(e) {
|
|
3076
|
+
return Lt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && Xt(e) !== "[object Array]" && Xt(e.callee) === "[object Function]";
|
|
3077
|
+
}, Os = function() {
|
|
3078
|
+
return Lt(arguments);
|
|
3070
3079
|
}();
|
|
3071
|
-
|
|
3072
|
-
var
|
|
3073
|
-
if (
|
|
3080
|
+
Lt.isLegacyArguments = Vn;
|
|
3081
|
+
var Cs = Os ? Lt : Vn, Ls = Object.prototype.toString, _s = Function.prototype.toString, ks = /^\s*(?:function)?\*/, $n = dr(), Nt = Object.getPrototypeOf, Ps = function() {
|
|
3082
|
+
if (!$n)
|
|
3074
3083
|
return !1;
|
|
3075
3084
|
try {
|
|
3076
3085
|
return Function("return function*() {}")();
|
|
3077
3086
|
} catch {
|
|
3078
3087
|
}
|
|
3079
|
-
}, Dt,
|
|
3088
|
+
}, Dt, Fs = function(e) {
|
|
3080
3089
|
if (typeof e != "function")
|
|
3081
3090
|
return !1;
|
|
3082
|
-
if (
|
|
3091
|
+
if (ks.test(_s.call(e)))
|
|
3083
3092
|
return !0;
|
|
3084
|
-
if (
|
|
3085
|
-
var r =
|
|
3093
|
+
if (!$n) {
|
|
3094
|
+
var r = Ls.call(e);
|
|
3086
3095
|
return r === "[object GeneratorFunction]";
|
|
3087
3096
|
}
|
|
3088
3097
|
if (!Nt)
|
|
3089
3098
|
return !1;
|
|
3090
3099
|
if (typeof Dt > "u") {
|
|
3091
|
-
var n =
|
|
3100
|
+
var n = Ps();
|
|
3092
3101
|
Dt = n ? Nt(n) : !1;
|
|
3093
3102
|
}
|
|
3094
3103
|
return Nt(e) === Dt;
|
|
3095
|
-
},
|
|
3096
|
-
if (typeof
|
|
3104
|
+
}, jn = Function.prototype.toString, Me = typeof Reflect == "object" && Reflect !== null && Reflect.apply, Zt, pt;
|
|
3105
|
+
if (typeof Me == "function" && typeof Object.defineProperty == "function")
|
|
3097
3106
|
try {
|
|
3098
3107
|
Zt = Object.defineProperty({}, "length", {
|
|
3099
3108
|
get: function() {
|
|
3100
3109
|
throw pt;
|
|
3101
3110
|
}
|
|
3102
|
-
}), pt = {},
|
|
3111
|
+
}), pt = {}, Me(function() {
|
|
3103
3112
|
throw 42;
|
|
3104
3113
|
}, null, Zt);
|
|
3105
3114
|
} catch (t) {
|
|
3106
|
-
t !== pt && (
|
|
3115
|
+
t !== pt && (Me = null);
|
|
3107
3116
|
}
|
|
3108
3117
|
else
|
|
3109
|
-
|
|
3110
|
-
var
|
|
3118
|
+
Me = null;
|
|
3119
|
+
var Ns = /^\s*class\b/, er = function(e) {
|
|
3111
3120
|
try {
|
|
3112
|
-
var r =
|
|
3113
|
-
return
|
|
3121
|
+
var r = jn.call(e);
|
|
3122
|
+
return Ns.test(r);
|
|
3114
3123
|
} catch {
|
|
3115
3124
|
return !1;
|
|
3116
3125
|
}
|
|
3117
3126
|
}, Rt = function(e) {
|
|
3118
3127
|
try {
|
|
3119
|
-
return er(e) ? !1 : (
|
|
3128
|
+
return er(e) ? !1 : (jn.call(e), !0);
|
|
3120
3129
|
} catch {
|
|
3121
3130
|
return !1;
|
|
3122
3131
|
}
|
|
3123
|
-
}, ht = Object.prototype.toString,
|
|
3132
|
+
}, ht = Object.prototype.toString, Ds = "[object Object]", Rs = "[object Function]", Vs = "[object GeneratorFunction]", $s = "[object HTMLAllCollection]", js = "[object HTML document.all class]", Us = "[object HTMLCollection]", Ms = typeof Symbol == "function" && !!Symbol.toStringTag, xs = !(0 in [,]), tr = function() {
|
|
3124
3133
|
return !1;
|
|
3125
3134
|
};
|
|
3126
3135
|
if (typeof document == "object") {
|
|
3127
|
-
var
|
|
3128
|
-
ht.call(
|
|
3129
|
-
if ((
|
|
3136
|
+
var Bs = document.all;
|
|
3137
|
+
ht.call(Bs) === ht.call(document.all) && (tr = function(e) {
|
|
3138
|
+
if ((xs || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3130
3139
|
try {
|
|
3131
3140
|
var r = ht.call(e);
|
|
3132
|
-
return (r ===
|
|
3141
|
+
return (r === $s || r === js || r === Us || r === Ds) && e("") == null;
|
|
3133
3142
|
} catch {
|
|
3134
3143
|
}
|
|
3135
3144
|
return !1;
|
|
3136
3145
|
});
|
|
3137
3146
|
}
|
|
3138
|
-
var
|
|
3147
|
+
var qs = Me ? function(e) {
|
|
3139
3148
|
if (tr(e))
|
|
3140
3149
|
return !0;
|
|
3141
3150
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3142
3151
|
return !1;
|
|
3143
3152
|
try {
|
|
3144
|
-
|
|
3153
|
+
Me(e, null, Zt);
|
|
3145
3154
|
} catch (r) {
|
|
3146
3155
|
if (r !== pt)
|
|
3147
3156
|
return !1;
|
|
@@ -3157,22 +3166,22 @@ var Bs = Ue ? function(e) {
|
|
|
3157
3166
|
if (er(e))
|
|
3158
3167
|
return !1;
|
|
3159
3168
|
var r = ht.call(e);
|
|
3160
|
-
return r !==
|
|
3161
|
-
},
|
|
3169
|
+
return r !== Rs && r !== Vs && !/^\[object HTML/.test(r) ? !1 : Rt(e);
|
|
3170
|
+
}, Qs = qs, Gs = Object.prototype.toString, Un = Object.prototype.hasOwnProperty, zs = function(e, r, n) {
|
|
3162
3171
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3163
3172
|
Un.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3164
3173
|
}, Ks = function(e, r, n) {
|
|
3165
3174
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3166
3175
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3167
|
-
},
|
|
3176
|
+
}, Hs = function(e, r, n) {
|
|
3168
3177
|
for (var i in e)
|
|
3169
3178
|
Un.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3170
|
-
},
|
|
3171
|
-
if (!
|
|
3179
|
+
}, Ws = function(e, r, n) {
|
|
3180
|
+
if (!Qs(r))
|
|
3172
3181
|
throw new TypeError("iterator must be a function");
|
|
3173
3182
|
var i;
|
|
3174
|
-
arguments.length >= 3 && (i = n),
|
|
3175
|
-
},
|
|
3183
|
+
arguments.length >= 3 && (i = n), Gs.call(e) === "[object Array]" ? zs(e, r, i) : typeof e == "string" ? Ks(e, r, i) : Hs(e, r, i);
|
|
3184
|
+
}, Js = Ws, Vt = [
|
|
3176
3185
|
"BigInt64Array",
|
|
3177
3186
|
"BigUint64Array",
|
|
3178
3187
|
"Float32Array",
|
|
@@ -3184,17 +3193,17 @@ var Bs = Ue ? function(e) {
|
|
|
3184
3193
|
"Uint32Array",
|
|
3185
3194
|
"Uint8Array",
|
|
3186
3195
|
"Uint8ClampedArray"
|
|
3187
|
-
],
|
|
3196
|
+
], Ys = typeof globalThis > "u" ? hn : globalThis, Xs = function() {
|
|
3188
3197
|
for (var e = [], r = 0; r < Vt.length; r++)
|
|
3189
|
-
typeof
|
|
3198
|
+
typeof Ys[Vt[r]] == "function" && (e[e.length] = Vt[r]);
|
|
3190
3199
|
return e;
|
|
3191
|
-
}, vt =
|
|
3200
|
+
}, vt = Js, Zs = Xs, Hr = Fn, yr = Rn, yt = pr, ea = yr("Object.prototype.toString"), Mn = dr(), Wr = typeof globalThis > "u" ? hn : globalThis, rr = Zs(), gr = yr("String.prototype.slice"), $t = Object.getPrototypeOf, ta = yr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3192
3201
|
for (var n = 0; n < e.length; n += 1)
|
|
3193
3202
|
if (e[n] === r)
|
|
3194
3203
|
return n;
|
|
3195
3204
|
return -1;
|
|
3196
3205
|
}, St = { __proto__: null };
|
|
3197
|
-
|
|
3206
|
+
Mn && yt && $t ? vt(rr, function(t) {
|
|
3198
3207
|
var e = new Wr[t]();
|
|
3199
3208
|
if (Symbol.toStringTag in e) {
|
|
3200
3209
|
var r = $t(e), n = yt(r, Symbol.toStringTag);
|
|
@@ -3208,37 +3217,37 @@ xn && yt && $t ? vt(rr, function(t) {
|
|
|
3208
3217
|
var e = new Wr[t](), r = e.slice || e.set;
|
|
3209
3218
|
r && (St["$" + t] = Hr(r));
|
|
3210
3219
|
});
|
|
3211
|
-
var
|
|
3220
|
+
var ra = function(e) {
|
|
3212
3221
|
var r = !1;
|
|
3213
3222
|
return vt(St, function(n, i) {
|
|
3214
3223
|
if (!r)
|
|
3215
3224
|
try {
|
|
3216
|
-
"$" + n(e) === i && (r =
|
|
3225
|
+
"$" + n(e) === i && (r = gr(i, 1));
|
|
3217
3226
|
} catch {
|
|
3218
3227
|
}
|
|
3219
3228
|
}), r;
|
|
3220
|
-
},
|
|
3229
|
+
}, na = function(e) {
|
|
3221
3230
|
var r = !1;
|
|
3222
3231
|
return vt(St, function(n, i) {
|
|
3223
3232
|
if (!r)
|
|
3224
3233
|
try {
|
|
3225
|
-
n(e), r =
|
|
3234
|
+
n(e), r = gr(i, 1);
|
|
3226
3235
|
} catch {
|
|
3227
3236
|
}
|
|
3228
3237
|
}), r;
|
|
3229
|
-
},
|
|
3238
|
+
}, xn = function(e) {
|
|
3230
3239
|
if (!e || typeof e != "object")
|
|
3231
3240
|
return !1;
|
|
3232
|
-
if (!
|
|
3233
|
-
var r =
|
|
3234
|
-
return
|
|
3241
|
+
if (!Mn) {
|
|
3242
|
+
var r = gr(ea(e), 8, -1);
|
|
3243
|
+
return ta(rr, r) > -1 ? r : r !== "Object" ? !1 : na(e);
|
|
3235
3244
|
}
|
|
3236
|
-
return yt ?
|
|
3237
|
-
},
|
|
3238
|
-
return !!
|
|
3245
|
+
return yt ? ra(e) : null;
|
|
3246
|
+
}, ia = xn, oa = function(e) {
|
|
3247
|
+
return !!ia(e);
|
|
3239
3248
|
};
|
|
3240
3249
|
(function(t) {
|
|
3241
|
-
var e =
|
|
3250
|
+
var e = Cs, r = Fs, n = xn, i = oa;
|
|
3242
3251
|
function o(h) {
|
|
3243
3252
|
return h.call.bind(h);
|
|
3244
3253
|
}
|
|
@@ -3247,60 +3256,60 @@ var ta = function(e) {
|
|
|
3247
3256
|
var y = o(BigInt.prototype.valueOf);
|
|
3248
3257
|
if (a)
|
|
3249
3258
|
var m = o(Symbol.prototype.valueOf);
|
|
3250
|
-
function b(h,
|
|
3259
|
+
function b(h, Hn) {
|
|
3251
3260
|
if (typeof h != "object")
|
|
3252
3261
|
return !1;
|
|
3253
3262
|
try {
|
|
3254
|
-
return
|
|
3263
|
+
return Hn(h), !0;
|
|
3255
3264
|
} catch {
|
|
3256
3265
|
return !1;
|
|
3257
3266
|
}
|
|
3258
3267
|
}
|
|
3259
3268
|
t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = i;
|
|
3260
|
-
function
|
|
3269
|
+
function T(h) {
|
|
3261
3270
|
return typeof Promise < "u" && h instanceof Promise || h !== null && typeof h == "object" && typeof h.then == "function" && typeof h.catch == "function";
|
|
3262
3271
|
}
|
|
3263
|
-
t.isPromise =
|
|
3264
|
-
function
|
|
3272
|
+
t.isPromise = T;
|
|
3273
|
+
function I(h) {
|
|
3265
3274
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(h) : i(h) || p(h);
|
|
3266
3275
|
}
|
|
3267
|
-
t.isArrayBufferView =
|
|
3268
|
-
function
|
|
3276
|
+
t.isArrayBufferView = I;
|
|
3277
|
+
function F(h) {
|
|
3269
3278
|
return n(h) === "Uint8Array";
|
|
3270
3279
|
}
|
|
3271
|
-
t.isUint8Array =
|
|
3272
|
-
function
|
|
3280
|
+
t.isUint8Array = F;
|
|
3281
|
+
function $(h) {
|
|
3273
3282
|
return n(h) === "Uint8ClampedArray";
|
|
3274
3283
|
}
|
|
3275
|
-
t.isUint8ClampedArray =
|
|
3276
|
-
function
|
|
3284
|
+
t.isUint8ClampedArray = $;
|
|
3285
|
+
function q(h) {
|
|
3277
3286
|
return n(h) === "Uint16Array";
|
|
3278
3287
|
}
|
|
3279
|
-
t.isUint16Array =
|
|
3280
|
-
function
|
|
3288
|
+
t.isUint16Array = q;
|
|
3289
|
+
function J(h) {
|
|
3281
3290
|
return n(h) === "Uint32Array";
|
|
3282
3291
|
}
|
|
3283
|
-
t.isUint32Array =
|
|
3284
|
-
function
|
|
3292
|
+
t.isUint32Array = J;
|
|
3293
|
+
function _(h) {
|
|
3285
3294
|
return n(h) === "Int8Array";
|
|
3286
3295
|
}
|
|
3287
|
-
t.isInt8Array =
|
|
3296
|
+
t.isInt8Array = _;
|
|
3288
3297
|
function R(h) {
|
|
3289
3298
|
return n(h) === "Int16Array";
|
|
3290
3299
|
}
|
|
3291
3300
|
t.isInt16Array = R;
|
|
3292
|
-
function
|
|
3301
|
+
function E(h) {
|
|
3293
3302
|
return n(h) === "Int32Array";
|
|
3294
3303
|
}
|
|
3295
|
-
t.isInt32Array =
|
|
3296
|
-
function
|
|
3304
|
+
t.isInt32Array = E;
|
|
3305
|
+
function X(h) {
|
|
3297
3306
|
return n(h) === "Float32Array";
|
|
3298
3307
|
}
|
|
3299
|
-
t.isFloat32Array =
|
|
3300
|
-
function
|
|
3308
|
+
t.isFloat32Array = X;
|
|
3309
|
+
function Z(h) {
|
|
3301
3310
|
return n(h) === "Float64Array";
|
|
3302
3311
|
}
|
|
3303
|
-
t.isFloat64Array =
|
|
3312
|
+
t.isFloat64Array = Z;
|
|
3304
3313
|
function _e(h) {
|
|
3305
3314
|
return n(h) === "BigInt64Array";
|
|
3306
3315
|
}
|
|
@@ -3309,14 +3318,14 @@ var ta = function(e) {
|
|
|
3309
3318
|
return n(h) === "BigUint64Array";
|
|
3310
3319
|
}
|
|
3311
3320
|
t.isBigUint64Array = Se;
|
|
3312
|
-
function
|
|
3321
|
+
function se(h) {
|
|
3313
3322
|
return u(h) === "[object Map]";
|
|
3314
3323
|
}
|
|
3315
|
-
|
|
3316
|
-
function
|
|
3317
|
-
return typeof Map > "u" ? !1 :
|
|
3324
|
+
se.working = typeof Map < "u" && se(/* @__PURE__ */ new Map());
|
|
3325
|
+
function _t(h) {
|
|
3326
|
+
return typeof Map > "u" ? !1 : se.working ? se(h) : h instanceof Map;
|
|
3318
3327
|
}
|
|
3319
|
-
t.isMap =
|
|
3328
|
+
t.isMap = _t;
|
|
3320
3329
|
function ge(h) {
|
|
3321
3330
|
return u(h) === "[object Set]";
|
|
3322
3331
|
}
|
|
@@ -3325,28 +3334,28 @@ var ta = function(e) {
|
|
|
3325
3334
|
return typeof Set > "u" ? !1 : ge.working ? ge(h) : h instanceof Set;
|
|
3326
3335
|
}
|
|
3327
3336
|
t.isSet = He;
|
|
3328
|
-
function
|
|
3337
|
+
function ke(h) {
|
|
3329
3338
|
return u(h) === "[object WeakMap]";
|
|
3330
3339
|
}
|
|
3331
|
-
|
|
3340
|
+
ke.working = typeof WeakMap < "u" && ke(/* @__PURE__ */ new WeakMap());
|
|
3332
3341
|
function kt(h) {
|
|
3333
|
-
return typeof WeakMap > "u" ? !1 :
|
|
3342
|
+
return typeof WeakMap > "u" ? !1 : ke.working ? ke(h) : h instanceof WeakMap;
|
|
3334
3343
|
}
|
|
3335
3344
|
t.isWeakMap = kt;
|
|
3336
|
-
function
|
|
3345
|
+
function Pe(h) {
|
|
3337
3346
|
return u(h) === "[object WeakSet]";
|
|
3338
3347
|
}
|
|
3339
|
-
|
|
3340
|
-
function
|
|
3341
|
-
return
|
|
3348
|
+
Pe.working = typeof WeakSet < "u" && Pe(/* @__PURE__ */ new WeakSet());
|
|
3349
|
+
function ae(h) {
|
|
3350
|
+
return Pe(h);
|
|
3342
3351
|
}
|
|
3343
|
-
t.isWeakSet =
|
|
3344
|
-
function
|
|
3352
|
+
t.isWeakSet = ae;
|
|
3353
|
+
function Fe(h) {
|
|
3345
3354
|
return u(h) === "[object ArrayBuffer]";
|
|
3346
3355
|
}
|
|
3347
|
-
|
|
3356
|
+
Fe.working = typeof ArrayBuffer < "u" && Fe(new ArrayBuffer());
|
|
3348
3357
|
function it(h) {
|
|
3349
|
-
return typeof ArrayBuffer > "u" ? !1 :
|
|
3358
|
+
return typeof ArrayBuffer > "u" ? !1 : Fe.working ? Fe(h) : h instanceof ArrayBuffer;
|
|
3350
3359
|
}
|
|
3351
3360
|
t.isArrayBuffer = it;
|
|
3352
3361
|
function l(h) {
|
|
@@ -3365,22 +3374,22 @@ var ta = function(e) {
|
|
|
3365
3374
|
return typeof g > "u" ? !1 : (typeof v.working > "u" && (v.working = v(new g())), v.working ? v(h) : h instanceof g);
|
|
3366
3375
|
}
|
|
3367
3376
|
t.isSharedArrayBuffer = C;
|
|
3368
|
-
function
|
|
3377
|
+
function L(h) {
|
|
3369
3378
|
return u(h) === "[object AsyncFunction]";
|
|
3370
3379
|
}
|
|
3371
|
-
t.isAsyncFunction =
|
|
3372
|
-
function
|
|
3380
|
+
t.isAsyncFunction = L;
|
|
3381
|
+
function w(h) {
|
|
3373
3382
|
return u(h) === "[object Map Iterator]";
|
|
3374
3383
|
}
|
|
3375
|
-
t.isMapIterator =
|
|
3384
|
+
t.isMapIterator = w;
|
|
3376
3385
|
function O(h) {
|
|
3377
3386
|
return u(h) === "[object Set Iterator]";
|
|
3378
3387
|
}
|
|
3379
3388
|
t.isSetIterator = O;
|
|
3380
|
-
function
|
|
3389
|
+
function P(h) {
|
|
3381
3390
|
return u(h) === "[object Generator]";
|
|
3382
3391
|
}
|
|
3383
|
-
t.isGeneratorObject =
|
|
3392
|
+
t.isGeneratorObject = P;
|
|
3384
3393
|
function G(h) {
|
|
3385
3394
|
return u(h) === "[object WebAssembly.Module]";
|
|
3386
3395
|
}
|
|
@@ -3393,26 +3402,26 @@ var ta = function(e) {
|
|
|
3393
3402
|
return b(h, c);
|
|
3394
3403
|
}
|
|
3395
3404
|
t.isStringObject = ot;
|
|
3396
|
-
function
|
|
3405
|
+
function Ne(h) {
|
|
3397
3406
|
return b(h, f);
|
|
3398
3407
|
}
|
|
3399
|
-
t.isBooleanObject =
|
|
3408
|
+
t.isBooleanObject = Ne;
|
|
3400
3409
|
function st(h) {
|
|
3401
3410
|
return s && b(h, y);
|
|
3402
3411
|
}
|
|
3403
3412
|
t.isBigIntObject = st;
|
|
3404
|
-
function
|
|
3413
|
+
function vr(h) {
|
|
3405
3414
|
return a && b(h, m);
|
|
3406
3415
|
}
|
|
3407
|
-
t.isSymbolObject =
|
|
3416
|
+
t.isSymbolObject = vr;
|
|
3408
3417
|
function zn(h) {
|
|
3409
|
-
return we(h) || ot(h) ||
|
|
3418
|
+
return we(h) || ot(h) || Ne(h) || st(h) || vr(h);
|
|
3410
3419
|
}
|
|
3411
3420
|
t.isBoxedPrimitive = zn;
|
|
3412
|
-
function
|
|
3421
|
+
function Kn(h) {
|
|
3413
3422
|
return typeof Uint8Array < "u" && (it(h) || C(h));
|
|
3414
3423
|
}
|
|
3415
|
-
t.isAnyArrayBuffer =
|
|
3424
|
+
t.isAnyArrayBuffer = Kn, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(h) {
|
|
3416
3425
|
Object.defineProperty(t, h, {
|
|
3417
3426
|
enumerable: !1,
|
|
3418
3427
|
value: function() {
|
|
@@ -3420,8 +3429,8 @@ var ta = function(e) {
|
|
|
3420
3429
|
}
|
|
3421
3430
|
});
|
|
3422
3431
|
});
|
|
3423
|
-
})(
|
|
3424
|
-
var
|
|
3432
|
+
})(On);
|
|
3433
|
+
var sa = function(e) {
|
|
3425
3434
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
3426
3435
|
}, nr = { exports: {} };
|
|
3427
3436
|
typeof Object.create == "function" ? nr.exports = function(e, r) {
|
|
@@ -3441,7 +3450,7 @@ typeof Object.create == "function" ? nr.exports = function(e, r) {
|
|
|
3441
3450
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
3442
3451
|
}
|
|
3443
3452
|
};
|
|
3444
|
-
var
|
|
3453
|
+
var aa = nr.exports;
|
|
3445
3454
|
(function(t) {
|
|
3446
3455
|
var e = Object.getOwnPropertyDescriptors || function(p) {
|
|
3447
3456
|
for (var g = Object.keys(p), v = {}, C = 0; C < g.length; C++)
|
|
@@ -3449,12 +3458,12 @@ var sa = nr.exports;
|
|
|
3449
3458
|
return v;
|
|
3450
3459
|
}, r = /%[sdj%]/g;
|
|
3451
3460
|
t.format = function(l) {
|
|
3452
|
-
if (!
|
|
3461
|
+
if (!_(l)) {
|
|
3453
3462
|
for (var p = [], g = 0; g < arguments.length; g++)
|
|
3454
3463
|
p.push(s(arguments[g]));
|
|
3455
3464
|
return p.join(" ");
|
|
3456
3465
|
}
|
|
3457
|
-
for (var g = 1, v = arguments, C = v.length,
|
|
3466
|
+
for (var g = 1, v = arguments, C = v.length, L = String(l).replace(r, function(O) {
|
|
3458
3467
|
if (O === "%%")
|
|
3459
3468
|
return "%";
|
|
3460
3469
|
if (g >= C)
|
|
@@ -3473,9 +3482,9 @@ var sa = nr.exports;
|
|
|
3473
3482
|
default:
|
|
3474
3483
|
return O;
|
|
3475
3484
|
}
|
|
3476
|
-
}),
|
|
3477
|
-
|
|
3478
|
-
return
|
|
3485
|
+
}), w = v[g]; g < C; w = v[++g])
|
|
3486
|
+
$(w) || !Z(w) ? L += " " + w : L += " " + s(w);
|
|
3487
|
+
return L;
|
|
3479
3488
|
}, t.deprecate = function(l, p) {
|
|
3480
3489
|
if (typeof S < "u" && S.noDeprecation === !0)
|
|
3481
3490
|
return l;
|
|
@@ -3517,7 +3526,7 @@ var sa = nr.exports;
|
|
|
3517
3526
|
seen: [],
|
|
3518
3527
|
stylize: u
|
|
3519
3528
|
};
|
|
3520
|
-
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]),
|
|
3529
|
+
return arguments.length >= 3 && (g.depth = arguments[2]), arguments.length >= 4 && (g.colors = arguments[3]), F(p) ? g.showHidden = p : p && t._extend(g, p), E(g.showHidden) && (g.showHidden = !1), E(g.depth) && (g.depth = 2), E(g.colors) && (g.colors = !1), E(g.customInspect) && (g.customInspect = !0), g.colors && (g.stylize = a), c(g, l, g.depth);
|
|
3521
3530
|
}
|
|
3522
3531
|
t.inspect = s, s.colors = {
|
|
3523
3532
|
bold: [1, 22],
|
|
@@ -3558,87 +3567,87 @@ var sa = nr.exports;
|
|
|
3558
3567
|
}), p;
|
|
3559
3568
|
}
|
|
3560
3569
|
function c(l, p, g) {
|
|
3561
|
-
if (l.customInspect && p &&
|
|
3570
|
+
if (l.customInspect && p && se(p.inspect) && // Filter out the util module, it's inspect function is special
|
|
3562
3571
|
p.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
|
|
3563
3572
|
!(p.constructor && p.constructor.prototype === p)) {
|
|
3564
3573
|
var v = p.inspect(g, l);
|
|
3565
|
-
return
|
|
3574
|
+
return _(v) || (v = c(l, v, g)), v;
|
|
3566
3575
|
}
|
|
3567
3576
|
var C = f(l, p);
|
|
3568
3577
|
if (C)
|
|
3569
3578
|
return C;
|
|
3570
|
-
var
|
|
3571
|
-
if (l.showHidden && (
|
|
3579
|
+
var L = Object.keys(p), w = d(L);
|
|
3580
|
+
if (l.showHidden && (L = Object.getOwnPropertyNames(p)), Se(p) && (L.indexOf("message") >= 0 || L.indexOf("description") >= 0))
|
|
3572
3581
|
return y(p);
|
|
3573
|
-
if (
|
|
3574
|
-
if (
|
|
3582
|
+
if (L.length === 0) {
|
|
3583
|
+
if (se(p)) {
|
|
3575
3584
|
var O = p.name ? ": " + p.name : "";
|
|
3576
3585
|
return l.stylize("[Function" + O + "]", "special");
|
|
3577
3586
|
}
|
|
3578
|
-
if (
|
|
3587
|
+
if (X(p))
|
|
3579
3588
|
return l.stylize(RegExp.prototype.toString.call(p), "regexp");
|
|
3580
3589
|
if (_e(p))
|
|
3581
3590
|
return l.stylize(Date.prototype.toString.call(p), "date");
|
|
3582
3591
|
if (Se(p))
|
|
3583
3592
|
return y(p);
|
|
3584
3593
|
}
|
|
3585
|
-
var
|
|
3586
|
-
if (
|
|
3594
|
+
var P = "", G = !1, we = ["{", "}"];
|
|
3595
|
+
if (I(p) && (G = !0, we = ["[", "]"]), se(p)) {
|
|
3587
3596
|
var ot = p.name ? ": " + p.name : "";
|
|
3588
|
-
|
|
3597
|
+
P = " [Function" + ot + "]";
|
|
3589
3598
|
}
|
|
3590
|
-
if (
|
|
3591
|
-
return we[0] +
|
|
3599
|
+
if (X(p) && (P = " " + RegExp.prototype.toString.call(p)), _e(p) && (P = " " + Date.prototype.toUTCString.call(p)), Se(p) && (P = " " + y(p)), L.length === 0 && (!G || p.length == 0))
|
|
3600
|
+
return we[0] + P + we[1];
|
|
3592
3601
|
if (g < 0)
|
|
3593
|
-
return
|
|
3602
|
+
return X(p) ? l.stylize(RegExp.prototype.toString.call(p), "regexp") : l.stylize("[Object]", "special");
|
|
3594
3603
|
l.seen.push(p);
|
|
3595
|
-
var
|
|
3596
|
-
return G ?
|
|
3597
|
-
return b(l, p, g,
|
|
3598
|
-
}), l.seen.pop(),
|
|
3604
|
+
var Ne;
|
|
3605
|
+
return G ? Ne = m(l, p, g, w, L) : Ne = L.map(function(st) {
|
|
3606
|
+
return b(l, p, g, w, st, G);
|
|
3607
|
+
}), l.seen.pop(), T(Ne, P, we);
|
|
3599
3608
|
}
|
|
3600
3609
|
function f(l, p) {
|
|
3601
|
-
if (
|
|
3610
|
+
if (E(p))
|
|
3602
3611
|
return l.stylize("undefined", "undefined");
|
|
3603
|
-
if (
|
|
3612
|
+
if (_(p)) {
|
|
3604
3613
|
var g = "'" + JSON.stringify(p).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
3605
3614
|
return l.stylize(g, "string");
|
|
3606
3615
|
}
|
|
3607
|
-
if (
|
|
3616
|
+
if (J(p))
|
|
3608
3617
|
return l.stylize("" + p, "number");
|
|
3609
|
-
if (
|
|
3618
|
+
if (F(p))
|
|
3610
3619
|
return l.stylize("" + p, "boolean");
|
|
3611
|
-
if (
|
|
3620
|
+
if ($(p))
|
|
3612
3621
|
return l.stylize("null", "null");
|
|
3613
3622
|
}
|
|
3614
3623
|
function y(l) {
|
|
3615
3624
|
return "[" + Error.prototype.toString.call(l) + "]";
|
|
3616
3625
|
}
|
|
3617
3626
|
function m(l, p, g, v, C) {
|
|
3618
|
-
for (var
|
|
3619
|
-
|
|
3627
|
+
for (var L = [], w = 0, O = p.length; w < O; ++w)
|
|
3628
|
+
Pe(p, String(w)) ? L.push(b(
|
|
3620
3629
|
l,
|
|
3621
3630
|
p,
|
|
3622
3631
|
g,
|
|
3623
3632
|
v,
|
|
3624
|
-
String(
|
|
3633
|
+
String(w),
|
|
3625
3634
|
!0
|
|
3626
|
-
)) :
|
|
3627
|
-
return C.forEach(function(
|
|
3628
|
-
|
|
3635
|
+
)) : L.push("");
|
|
3636
|
+
return C.forEach(function(P) {
|
|
3637
|
+
P.match(/^\d+$/) || L.push(b(
|
|
3629
3638
|
l,
|
|
3630
3639
|
p,
|
|
3631
3640
|
g,
|
|
3632
3641
|
v,
|
|
3633
|
-
|
|
3642
|
+
P,
|
|
3634
3643
|
!0
|
|
3635
3644
|
));
|
|
3636
|
-
}),
|
|
3645
|
+
}), L;
|
|
3637
3646
|
}
|
|
3638
|
-
function b(l, p, g, v, C,
|
|
3639
|
-
var
|
|
3640
|
-
if (
|
|
3641
|
-
`) > -1 && (
|
|
3647
|
+
function b(l, p, g, v, C, L) {
|
|
3648
|
+
var w, O, P;
|
|
3649
|
+
if (P = Object.getOwnPropertyDescriptor(p, C) || { value: p[C] }, P.get ? P.set ? O = l.stylize("[Getter/Setter]", "special") : O = l.stylize("[Getter]", "special") : P.set && (O = l.stylize("[Setter]", "special")), Pe(v, C) || (w = "[" + C + "]"), O || (l.seen.indexOf(P.value) < 0 ? ($(g) ? O = c(l, P.value, null) : O = c(l, P.value, g - 1), O.indexOf(`
|
|
3650
|
+
`) > -1 && (L ? O = O.split(`
|
|
3642
3651
|
`).map(function(G) {
|
|
3643
3652
|
return " " + G;
|
|
3644
3653
|
}).join(`
|
|
@@ -3647,87 +3656,87 @@ var sa = nr.exports;
|
|
|
3647
3656
|
`).map(function(G) {
|
|
3648
3657
|
return " " + G;
|
|
3649
3658
|
}).join(`
|
|
3650
|
-
`))) : O = l.stylize("[Circular]", "special")),
|
|
3651
|
-
if (
|
|
3659
|
+
`))) : O = l.stylize("[Circular]", "special")), E(w)) {
|
|
3660
|
+
if (L && C.match(/^\d+$/))
|
|
3652
3661
|
return O;
|
|
3653
|
-
|
|
3662
|
+
w = JSON.stringify("" + C), w.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (w = w.slice(1, -1), w = l.stylize(w, "name")) : (w = w.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), w = l.stylize(w, "string"));
|
|
3654
3663
|
}
|
|
3655
|
-
return
|
|
3664
|
+
return w + ": " + O;
|
|
3656
3665
|
}
|
|
3657
|
-
function
|
|
3658
|
-
var v = l.reduce(function(C,
|
|
3659
|
-
return
|
|
3660
|
-
`) >= 0, C +
|
|
3666
|
+
function T(l, p, g) {
|
|
3667
|
+
var v = l.reduce(function(C, L) {
|
|
3668
|
+
return L.indexOf(`
|
|
3669
|
+
`) >= 0, C + L.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
3661
3670
|
}, 0);
|
|
3662
3671
|
return v > 60 ? g[0] + (p === "" ? "" : p + `
|
|
3663
3672
|
`) + " " + l.join(`,
|
|
3664
3673
|
`) + " " + g[1] : g[0] + p + " " + l.join(", ") + " " + g[1];
|
|
3665
3674
|
}
|
|
3666
|
-
t.types =
|
|
3667
|
-
function
|
|
3675
|
+
t.types = On;
|
|
3676
|
+
function I(l) {
|
|
3668
3677
|
return Array.isArray(l);
|
|
3669
3678
|
}
|
|
3670
|
-
t.isArray =
|
|
3671
|
-
function
|
|
3679
|
+
t.isArray = I;
|
|
3680
|
+
function F(l) {
|
|
3672
3681
|
return typeof l == "boolean";
|
|
3673
3682
|
}
|
|
3674
|
-
t.isBoolean =
|
|
3675
|
-
function
|
|
3683
|
+
t.isBoolean = F;
|
|
3684
|
+
function $(l) {
|
|
3676
3685
|
return l === null;
|
|
3677
3686
|
}
|
|
3678
|
-
t.isNull =
|
|
3679
|
-
function
|
|
3687
|
+
t.isNull = $;
|
|
3688
|
+
function q(l) {
|
|
3680
3689
|
return l == null;
|
|
3681
3690
|
}
|
|
3682
|
-
t.isNullOrUndefined =
|
|
3683
|
-
function
|
|
3691
|
+
t.isNullOrUndefined = q;
|
|
3692
|
+
function J(l) {
|
|
3684
3693
|
return typeof l == "number";
|
|
3685
3694
|
}
|
|
3686
|
-
t.isNumber =
|
|
3687
|
-
function
|
|
3695
|
+
t.isNumber = J;
|
|
3696
|
+
function _(l) {
|
|
3688
3697
|
return typeof l == "string";
|
|
3689
3698
|
}
|
|
3690
|
-
t.isString =
|
|
3699
|
+
t.isString = _;
|
|
3691
3700
|
function R(l) {
|
|
3692
3701
|
return typeof l == "symbol";
|
|
3693
3702
|
}
|
|
3694
3703
|
t.isSymbol = R;
|
|
3695
|
-
function
|
|
3704
|
+
function E(l) {
|
|
3696
3705
|
return l === void 0;
|
|
3697
3706
|
}
|
|
3698
|
-
t.isUndefined =
|
|
3699
|
-
function
|
|
3700
|
-
return
|
|
3707
|
+
t.isUndefined = E;
|
|
3708
|
+
function X(l) {
|
|
3709
|
+
return Z(l) && ge(l) === "[object RegExp]";
|
|
3701
3710
|
}
|
|
3702
|
-
t.isRegExp =
|
|
3703
|
-
function
|
|
3711
|
+
t.isRegExp = X, t.types.isRegExp = X;
|
|
3712
|
+
function Z(l) {
|
|
3704
3713
|
return typeof l == "object" && l !== null;
|
|
3705
3714
|
}
|
|
3706
|
-
t.isObject =
|
|
3715
|
+
t.isObject = Z;
|
|
3707
3716
|
function _e(l) {
|
|
3708
|
-
return
|
|
3717
|
+
return Z(l) && ge(l) === "[object Date]";
|
|
3709
3718
|
}
|
|
3710
3719
|
t.isDate = _e, t.types.isDate = _e;
|
|
3711
3720
|
function Se(l) {
|
|
3712
|
-
return
|
|
3721
|
+
return Z(l) && (ge(l) === "[object Error]" || l instanceof Error);
|
|
3713
3722
|
}
|
|
3714
3723
|
t.isError = Se, t.types.isNativeError = Se;
|
|
3715
|
-
function
|
|
3724
|
+
function se(l) {
|
|
3716
3725
|
return typeof l == "function";
|
|
3717
3726
|
}
|
|
3718
|
-
t.isFunction =
|
|
3719
|
-
function
|
|
3727
|
+
t.isFunction = se;
|
|
3728
|
+
function _t(l) {
|
|
3720
3729
|
return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
|
|
3721
3730
|
typeof l > "u";
|
|
3722
3731
|
}
|
|
3723
|
-
t.isPrimitive =
|
|
3732
|
+
t.isPrimitive = _t, t.isBuffer = sa;
|
|
3724
3733
|
function ge(l) {
|
|
3725
3734
|
return Object.prototype.toString.call(l);
|
|
3726
3735
|
}
|
|
3727
3736
|
function He(l) {
|
|
3728
3737
|
return l < 10 ? "0" + l.toString(10) : l.toString(10);
|
|
3729
3738
|
}
|
|
3730
|
-
var
|
|
3739
|
+
var ke = [
|
|
3731
3740
|
"Jan",
|
|
3732
3741
|
"Feb",
|
|
3733
3742
|
"Mar",
|
|
@@ -3747,29 +3756,29 @@ var sa = nr.exports;
|
|
|
3747
3756
|
He(l.getMinutes()),
|
|
3748
3757
|
He(l.getSeconds())
|
|
3749
3758
|
].join(":");
|
|
3750
|
-
return [l.getDate(),
|
|
3759
|
+
return [l.getDate(), ke[l.getMonth()], p].join(" ");
|
|
3751
3760
|
}
|
|
3752
3761
|
t.log = function() {
|
|
3753
3762
|
console.log("%s - %s", kt(), t.format.apply(t, arguments));
|
|
3754
|
-
}, t.inherits =
|
|
3755
|
-
if (!p || !
|
|
3763
|
+
}, t.inherits = aa, t._extend = function(l, p) {
|
|
3764
|
+
if (!p || !Z(p))
|
|
3756
3765
|
return l;
|
|
3757
3766
|
for (var g = Object.keys(p), v = g.length; v--; )
|
|
3758
3767
|
l[g[v]] = p[g[v]];
|
|
3759
3768
|
return l;
|
|
3760
3769
|
};
|
|
3761
|
-
function
|
|
3770
|
+
function Pe(l, p) {
|
|
3762
3771
|
return Object.prototype.hasOwnProperty.call(l, p);
|
|
3763
3772
|
}
|
|
3764
|
-
var
|
|
3773
|
+
var ae = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
|
|
3765
3774
|
t.promisify = function(p) {
|
|
3766
3775
|
if (typeof p != "function")
|
|
3767
3776
|
throw new TypeError('The "original" argument must be of type Function');
|
|
3768
|
-
if (
|
|
3769
|
-
var g = p[
|
|
3777
|
+
if (ae && p[ae]) {
|
|
3778
|
+
var g = p[ae];
|
|
3770
3779
|
if (typeof g != "function")
|
|
3771
3780
|
throw new TypeError('The "util.promisify.custom" argument must be of type Function');
|
|
3772
|
-
return Object.defineProperty(g,
|
|
3781
|
+
return Object.defineProperty(g, ae, {
|
|
3773
3782
|
value: g,
|
|
3774
3783
|
enumerable: !1,
|
|
3775
3784
|
writable: !1,
|
|
@@ -3777,21 +3786,21 @@ var sa = nr.exports;
|
|
|
3777
3786
|
}), g;
|
|
3778
3787
|
}
|
|
3779
3788
|
function g() {
|
|
3780
|
-
for (var v, C,
|
|
3781
|
-
v =
|
|
3782
|
-
}),
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3789
|
+
for (var v, C, L = new Promise(function(P, G) {
|
|
3790
|
+
v = P, C = G;
|
|
3791
|
+
}), w = [], O = 0; O < arguments.length; O++)
|
|
3792
|
+
w.push(arguments[O]);
|
|
3793
|
+
w.push(function(P, G) {
|
|
3794
|
+
P ? C(P) : v(G);
|
|
3786
3795
|
});
|
|
3787
3796
|
try {
|
|
3788
|
-
p.apply(this,
|
|
3789
|
-
} catch (
|
|
3790
|
-
C(
|
|
3797
|
+
p.apply(this, w);
|
|
3798
|
+
} catch (P) {
|
|
3799
|
+
C(P);
|
|
3791
3800
|
}
|
|
3792
|
-
return
|
|
3801
|
+
return L;
|
|
3793
3802
|
}
|
|
3794
|
-
return Object.setPrototypeOf(g, Object.getPrototypeOf(p)),
|
|
3803
|
+
return Object.setPrototypeOf(g, Object.getPrototypeOf(p)), ae && Object.defineProperty(g, ae, {
|
|
3795
3804
|
value: g,
|
|
3796
3805
|
enumerable: !1,
|
|
3797
3806
|
writable: !1,
|
|
@@ -3800,8 +3809,8 @@ var sa = nr.exports;
|
|
|
3800
3809
|
g,
|
|
3801
3810
|
e(p)
|
|
3802
3811
|
);
|
|
3803
|
-
}, t.promisify.custom =
|
|
3804
|
-
function
|
|
3812
|
+
}, t.promisify.custom = ae;
|
|
3813
|
+
function Fe(l, p) {
|
|
3805
3814
|
if (!l) {
|
|
3806
3815
|
var g = new Error("Promise was rejected with a falsy value");
|
|
3807
3816
|
g.reason = l, l = g;
|
|
@@ -3817,15 +3826,15 @@ var sa = nr.exports;
|
|
|
3817
3826
|
var C = g.pop();
|
|
3818
3827
|
if (typeof C != "function")
|
|
3819
3828
|
throw new TypeError("The last argument must be of type Function");
|
|
3820
|
-
var
|
|
3821
|
-
return C.apply(
|
|
3829
|
+
var L = this, w = function() {
|
|
3830
|
+
return C.apply(L, arguments);
|
|
3822
3831
|
};
|
|
3823
3832
|
l.apply(this, g).then(
|
|
3824
3833
|
function(O) {
|
|
3825
|
-
S.nextTick(
|
|
3834
|
+
S.nextTick(w.bind(null, null, O));
|
|
3826
3835
|
},
|
|
3827
3836
|
function(O) {
|
|
3828
|
-
S.nextTick(
|
|
3837
|
+
S.nextTick(Fe.bind(null, O, w));
|
|
3829
3838
|
}
|
|
3830
3839
|
);
|
|
3831
3840
|
}
|
|
@@ -3836,7 +3845,7 @@ var sa = nr.exports;
|
|
|
3836
3845
|
}
|
|
3837
3846
|
t.callbackify = it;
|
|
3838
3847
|
})(Ct);
|
|
3839
|
-
const { inherits:
|
|
3848
|
+
const { inherits: ua, format: jt } = Ct;
|
|
3840
3849
|
function Ae(t, e, r = Error) {
|
|
3841
3850
|
if (!t)
|
|
3842
3851
|
throw new Error("Avvio error code must not be empty");
|
|
@@ -3849,9 +3858,9 @@ function Ae(t, e, r = Error) {
|
|
|
3849
3858
|
}
|
|
3850
3859
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
3851
3860
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
3852
|
-
},
|
|
3861
|
+
}, ua(n, r), n;
|
|
3853
3862
|
}
|
|
3854
|
-
var
|
|
3863
|
+
var Bn = {
|
|
3855
3864
|
createError: Ae,
|
|
3856
3865
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Ae(
|
|
3857
3866
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -3877,7 +3886,7 @@ var qn = {
|
|
|
3877
3886
|
"AVV_ERR_READY_TIMEOUT",
|
|
3878
3887
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
3879
3888
|
)
|
|
3880
|
-
},
|
|
3889
|
+
}, ca = function t(e, r, n) {
|
|
3881
3890
|
r === void 0 && (r = ""), n || (n = {});
|
|
3882
3891
|
var i = function(u) {
|
|
3883
3892
|
var d = {
|
|
@@ -3899,12 +3908,12 @@ var qn = {
|
|
|
3899
3908
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, y, n).slice(r.length + 2);
|
|
3900
3909
|
}).join("");
|
|
3901
3910
|
};
|
|
3902
|
-
const
|
|
3903
|
-
let
|
|
3911
|
+
const la = ca, Jr = Symbol("avvio.TimeTree.untrackNode"), Ut = Symbol("avvio.TimeTree.trackNode"), Yr = Symbol("avvio.TimeTree.getParent"), Xr = Symbol("avvio.TimeTree.getNode"), Zr = Symbol("avvio.TimeTree.addNode");
|
|
3912
|
+
let da = class {
|
|
3904
3913
|
constructor() {
|
|
3905
3914
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
3906
3915
|
}
|
|
3907
|
-
[
|
|
3916
|
+
[Ut](e) {
|
|
3908
3917
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
3909
3918
|
}
|
|
3910
3919
|
[Jr](e) {
|
|
@@ -3932,7 +3941,7 @@ let la = class {
|
|
|
3932
3941
|
label: r,
|
|
3933
3942
|
start: n,
|
|
3934
3943
|
nodes: []
|
|
3935
|
-
}, this[
|
|
3944
|
+
}, this[Ut](this.root), this.root.id;
|
|
3936
3945
|
const o = this[Yr](e), s = `${r}-${Math.random()}`, a = {
|
|
3937
3946
|
id: s,
|
|
3938
3947
|
parent: e,
|
|
@@ -3940,7 +3949,7 @@ let la = class {
|
|
|
3940
3949
|
label: r,
|
|
3941
3950
|
nodes: []
|
|
3942
3951
|
};
|
|
3943
|
-
return o.nodes.push(a), this[
|
|
3952
|
+
return o.nodes.push(a), this[Ut](a), s;
|
|
3944
3953
|
}
|
|
3945
3954
|
start(e, r, n = Date.now()) {
|
|
3946
3955
|
return this[Zr](e, r, n);
|
|
@@ -3954,16 +3963,16 @@ let la = class {
|
|
|
3954
3963
|
}
|
|
3955
3964
|
prittyPrint() {
|
|
3956
3965
|
const e = (n) => (n.label = `${n.label} ${n.diff} ms`, n.nodes.length > 0 && (n.nodes = n.nodes.map((i) => e(i))), n), r = e(this.toJSON());
|
|
3957
|
-
return
|
|
3966
|
+
return la(r);
|
|
3958
3967
|
}
|
|
3959
3968
|
};
|
|
3960
|
-
var
|
|
3961
|
-
function
|
|
3969
|
+
var fa = da, mr = { exports: {} }, ir = { exports: {} }, Mt, en;
|
|
3970
|
+
function pa() {
|
|
3962
3971
|
if (en)
|
|
3963
|
-
return
|
|
3972
|
+
return Mt;
|
|
3964
3973
|
en = 1;
|
|
3965
3974
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
3966
|
-
|
|
3975
|
+
Mt = function(c, f) {
|
|
3967
3976
|
f = f || {};
|
|
3968
3977
|
var y = typeof c;
|
|
3969
3978
|
if (y === "string" && c.length > 0)
|
|
@@ -4038,10 +4047,10 @@ function fa() {
|
|
|
4038
4047
|
var b = f >= y * 1.5;
|
|
4039
4048
|
return Math.round(c / y) + " " + m + (b ? "s" : "");
|
|
4040
4049
|
}
|
|
4041
|
-
return
|
|
4050
|
+
return Mt;
|
|
4042
4051
|
}
|
|
4043
|
-
function
|
|
4044
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4052
|
+
function ha(t) {
|
|
4053
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = pa(), r.destroy = d, Object.keys(t).forEach((c) => {
|
|
4045
4054
|
r[c] = t[c];
|
|
4046
4055
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4047
4056
|
function e(c) {
|
|
@@ -4053,32 +4062,32 @@ function pa(t) {
|
|
|
4053
4062
|
r.selectColor = e;
|
|
4054
4063
|
function r(c) {
|
|
4055
4064
|
let f, y = null, m, b;
|
|
4056
|
-
function
|
|
4057
|
-
if (!
|
|
4065
|
+
function T(...I) {
|
|
4066
|
+
if (!T.enabled)
|
|
4058
4067
|
return;
|
|
4059
|
-
const
|
|
4060
|
-
|
|
4061
|
-
let
|
|
4062
|
-
|
|
4068
|
+
const F = T, $ = Number(/* @__PURE__ */ new Date()), q = $ - (f || $);
|
|
4069
|
+
F.diff = q, F.prev = f, F.curr = $, f = $, I[0] = r.coerce(I[0]), typeof I[0] != "string" && I.unshift("%O");
|
|
4070
|
+
let J = 0;
|
|
4071
|
+
I[0] = I[0].replace(/%([a-zA-Z%])/g, (R, E) => {
|
|
4063
4072
|
if (R === "%%")
|
|
4064
4073
|
return "%";
|
|
4065
|
-
|
|
4066
|
-
const
|
|
4067
|
-
if (typeof
|
|
4068
|
-
const
|
|
4069
|
-
R =
|
|
4074
|
+
J++;
|
|
4075
|
+
const X = r.formatters[E];
|
|
4076
|
+
if (typeof X == "function") {
|
|
4077
|
+
const Z = I[J];
|
|
4078
|
+
R = X.call(F, Z), I.splice(J, 1), J--;
|
|
4070
4079
|
}
|
|
4071
4080
|
return R;
|
|
4072
|
-
}), r.formatArgs.call(
|
|
4081
|
+
}), r.formatArgs.call(F, I), (F.log || r.log).apply(F, I);
|
|
4073
4082
|
}
|
|
4074
|
-
return
|
|
4083
|
+
return T.namespace = c, T.useColors = r.useColors(), T.color = r.selectColor(c), T.extend = n, T.destroy = r.destroy, Object.defineProperty(T, "enabled", {
|
|
4075
4084
|
enumerable: !0,
|
|
4076
4085
|
configurable: !1,
|
|
4077
4086
|
get: () => y !== null ? y : (m !== r.namespaces && (m = r.namespaces, b = r.enabled(c)), b),
|
|
4078
|
-
set: (
|
|
4079
|
-
y =
|
|
4087
|
+
set: (I) => {
|
|
4088
|
+
y = I;
|
|
4080
4089
|
}
|
|
4081
|
-
}), typeof r.init == "function" && r.init(
|
|
4090
|
+
}), typeof r.init == "function" && r.init(T), T;
|
|
4082
4091
|
}
|
|
4083
4092
|
function n(c, f) {
|
|
4084
4093
|
const y = r(this.namespace + (typeof f > "u" ? ":" : f) + c);
|
|
@@ -4121,7 +4130,7 @@ function pa(t) {
|
|
|
4121
4130
|
}
|
|
4122
4131
|
return r.enable(r.load()), r;
|
|
4123
4132
|
}
|
|
4124
|
-
var
|
|
4133
|
+
var ya = ha;
|
|
4125
4134
|
(function(t, e) {
|
|
4126
4135
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4127
4136
|
let u = !1;
|
|
@@ -4245,7 +4254,7 @@ var ha = pa;
|
|
|
4245
4254
|
} catch {
|
|
4246
4255
|
}
|
|
4247
4256
|
}
|
|
4248
|
-
t.exports =
|
|
4257
|
+
t.exports = ya(e);
|
|
4249
4258
|
const { formatters: a } = t.exports;
|
|
4250
4259
|
a.j = function(u) {
|
|
4251
4260
|
try {
|
|
@@ -4255,23 +4264,23 @@ var ha = pa;
|
|
|
4255
4264
|
}
|
|
4256
4265
|
};
|
|
4257
4266
|
})(ir, ir.exports);
|
|
4258
|
-
var
|
|
4259
|
-
const
|
|
4260
|
-
function
|
|
4267
|
+
var qn = ir.exports;
|
|
4268
|
+
const ga = gn, ma = Tn.EventEmitter, ba = Ct.inherits, U = qn("avvio"), { AVV_ERR_READY_TIMEOUT: va } = Bn, xt = Symbol.for("plugin-meta");
|
|
4269
|
+
function Sa(t, e) {
|
|
4261
4270
|
return t[xt] && t[xt].name ? t[xt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4262
4271
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4263
4272
|
}
|
|
4264
|
-
function
|
|
4273
|
+
function wa() {
|
|
4265
4274
|
const t = {};
|
|
4266
4275
|
return t.promise = new Promise((e, r) => {
|
|
4267
4276
|
t.resolve = e, t.reject = r;
|
|
4268
4277
|
}), t;
|
|
4269
4278
|
}
|
|
4270
|
-
function
|
|
4271
|
-
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 =
|
|
4279
|
+
function Ke(t, e, r, n, i) {
|
|
4280
|
+
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 = Sa(e, r), this.isAfter = n, this.q = ga(t, Aa, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4272
4281
|
}
|
|
4273
|
-
|
|
4274
|
-
|
|
4282
|
+
ba(Ke, ma);
|
|
4283
|
+
Ke.prototype.exec = function(t, e) {
|
|
4275
4284
|
const r = this.func;
|
|
4276
4285
|
let n = !1;
|
|
4277
4286
|
const i = this.name;
|
|
@@ -4298,7 +4307,7 @@ ze.prototype.exec = function(t, e) {
|
|
|
4298
4307
|
};
|
|
4299
4308
|
this.timeout > 0 && (U("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4300
4309
|
U("timed out", i), o = null;
|
|
4301
|
-
const u = new
|
|
4310
|
+
const u = new va(i);
|
|
4302
4311
|
u.fn = r, s(u);
|
|
4303
4312
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4304
4313
|
const a = r(this.server, this.opts, s);
|
|
@@ -4307,7 +4316,7 @@ ze.prototype.exec = function(t, e) {
|
|
|
4307
4316
|
(u) => S.nextTick(s, u)
|
|
4308
4317
|
));
|
|
4309
4318
|
};
|
|
4310
|
-
|
|
4319
|
+
Ke.prototype.loadedSoFar = function() {
|
|
4311
4320
|
if (this.loaded)
|
|
4312
4321
|
return Promise.resolve();
|
|
4313
4322
|
const t = () => {
|
|
@@ -4316,12 +4325,12 @@ ze.prototype.loadedSoFar = function() {
|
|
|
4316
4325
|
}), this.q.resume();
|
|
4317
4326
|
};
|
|
4318
4327
|
let e;
|
|
4319
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
4328
|
+
return this._promise ? e = Promise.resolve() : (this._promise = wa(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4320
4329
|
};
|
|
4321
|
-
|
|
4330
|
+
Ke.prototype.enqueue = function(t, e) {
|
|
4322
4331
|
U("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4323
4332
|
};
|
|
4324
|
-
|
|
4333
|
+
Ke.prototype.finish = function(t, e) {
|
|
4325
4334
|
U("finish", this.name, t);
|
|
4326
4335
|
const r = () => {
|
|
4327
4336
|
this.loaded || (U("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -4341,19 +4350,19 @@ ze.prototype.finish = function(t, e) {
|
|
|
4341
4350
|
r();
|
|
4342
4351
|
else
|
|
4343
4352
|
U("delayed", this.name), this.q.drain = () => {
|
|
4344
|
-
U("drain", this.name), this.q.drain =
|
|
4353
|
+
U("drain", this.name), this.q.drain = Ea, queueMicrotask(n);
|
|
4345
4354
|
};
|
|
4346
4355
|
};
|
|
4347
4356
|
queueMicrotask(n), this.q.resume();
|
|
4348
4357
|
};
|
|
4349
|
-
function
|
|
4358
|
+
function Aa(t, e) {
|
|
4350
4359
|
const r = this;
|
|
4351
|
-
S.nextTick(
|
|
4360
|
+
S.nextTick(br.bind(r), t, e);
|
|
4352
4361
|
}
|
|
4353
|
-
function
|
|
4362
|
+
function br(t, e) {
|
|
4354
4363
|
if (typeof t.func.then == "function") {
|
|
4355
4364
|
t.func.then((n) => {
|
|
4356
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
4365
|
+
typeof n.default == "function" && (n = n.default), t.func = n, br.call(this, t, e);
|
|
4357
4366
|
}, e);
|
|
4358
4367
|
return;
|
|
4359
4368
|
}
|
|
@@ -4364,19 +4373,19 @@ function mr(t, e) {
|
|
|
4364
4373
|
});
|
|
4365
4374
|
});
|
|
4366
4375
|
}
|
|
4367
|
-
function
|
|
4376
|
+
function Ea() {
|
|
4368
4377
|
}
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
var
|
|
4372
|
-
const tn =
|
|
4378
|
+
mr.exports = Ke;
|
|
4379
|
+
mr.exports.loadPlugin = br;
|
|
4380
|
+
var Ia = mr.exports;
|
|
4381
|
+
const tn = gn, Ta = Tn.EventEmitter, Oa = Ct.inherits, {
|
|
4373
4382
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Bt,
|
|
4374
4383
|
AVV_ERR_CALLBACK_NOT_FN: Ze,
|
|
4375
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
4376
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
4384
|
+
AVV_ERR_PLUGIN_NOT_VALID: Ca,
|
|
4385
|
+
AVV_ERR_ROOT_PLG_BOOTED: La,
|
|
4377
4386
|
AVV_ERR_READY_TIMEOUT: _a
|
|
4378
|
-
} =
|
|
4379
|
-
function
|
|
4387
|
+
} = Bn, ka = fa, or = Ia, Ge = qn("avvio"), wt = Symbol("kAvvio"), qt = Symbol("kThenifyDoNotWrap");
|
|
4388
|
+
function Pa(t, e, r) {
|
|
4380
4389
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
4381
4390
|
if (t[i])
|
|
4382
4391
|
throw new Bt(i);
|
|
@@ -4386,7 +4395,7 @@ function ka(t, e, r) {
|
|
|
4386
4395
|
throw new Bt(s);
|
|
4387
4396
|
t[i] = function(d, c) {
|
|
4388
4397
|
return r.use(d, c), this;
|
|
4389
|
-
}, Object.defineProperty(t, "then", { get:
|
|
4398
|
+
}, Object.defineProperty(t, "then", { get: Qn.bind(r) }), t[wt] = !0, t[o] = function(d) {
|
|
4390
4399
|
return typeof d != "function" ? r._loadRegistered() : (r.after(Qt(d, this)), this);
|
|
4391
4400
|
}, t[s] = function(d) {
|
|
4392
4401
|
if (d && typeof d != "function")
|
|
@@ -4395,23 +4404,23 @@ function ka(t, e, r) {
|
|
|
4395
4404
|
}, t[a] = function(d) {
|
|
4396
4405
|
if (typeof d != "function")
|
|
4397
4406
|
throw new Ze(a, typeof d);
|
|
4398
|
-
return r.onClose(
|
|
4407
|
+
return r.onClose(Va(d, this)), this;
|
|
4399
4408
|
}, t[u] = function(d) {
|
|
4400
4409
|
if (d && typeof d != "function")
|
|
4401
4410
|
throw new Ze(u, typeof d);
|
|
4402
4411
|
return d ? (r.close(Qt(d, this)), this) : r.close();
|
|
4403
4412
|
};
|
|
4404
4413
|
}
|
|
4405
|
-
function
|
|
4406
|
-
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof
|
|
4407
|
-
const n = new
|
|
4408
|
-
return t &&
|
|
4414
|
+
function x(t, e, r) {
|
|
4415
|
+
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof x)) {
|
|
4416
|
+
const n = new x(t, e, r);
|
|
4417
|
+
return t && Pa(t, e, n), n;
|
|
4409
4418
|
}
|
|
4410
|
-
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new
|
|
4419
|
+
e.autostart !== !1 && (e.autostart = !0), t = t || this, this._timeout = Number(e.timeout) || 0, this._server = t, this._current = [], this._error = null, this._isOnCloseHandlerKey = Symbol("isOnCloseHandler"), this._lastUsed = null, this.setMaxListeners(0), r && this.once("start", r), this.started = !1, this.booted = !1, this.pluginTree = new ka(), this._readyQ = tn(this, Gn, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
4411
4420
|
this.emit("start"), this._readyQ.drain = rn;
|
|
4412
|
-
}, this._closeQ = tn(this,
|
|
4421
|
+
}, this._closeQ = tn(this, Ra, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
4413
4422
|
this.emit("close"), this._closeQ.drain = rn;
|
|
4414
|
-
}, this._doStart = null, this._root = new or(this,
|
|
4423
|
+
}, this._doStart = null, this._root = new or(this, Fa.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
4415
4424
|
const s = this.pluginTree.start(null, i, o);
|
|
4416
4425
|
this._root.once("loaded", (a, u, d) => {
|
|
4417
4426
|
this.pluginTree.stop(s, d);
|
|
@@ -4431,33 +4440,33 @@ function B(t, e, r) {
|
|
|
4431
4440
|
this._readyQ.resume();
|
|
4432
4441
|
});
|
|
4433
4442
|
}
|
|
4434
|
-
function
|
|
4443
|
+
function Fa(t, e, r) {
|
|
4435
4444
|
this._doStart = r, e.autostart && this.start();
|
|
4436
4445
|
}
|
|
4437
|
-
|
|
4438
|
-
|
|
4446
|
+
Oa(x, Ta);
|
|
4447
|
+
x.prototype.start = function() {
|
|
4439
4448
|
return this.started = !0, S.nextTick(this._doStart), this;
|
|
4440
4449
|
};
|
|
4441
|
-
|
|
4450
|
+
x.prototype.override = function(t, e, r) {
|
|
4442
4451
|
return t;
|
|
4443
4452
|
};
|
|
4444
|
-
function
|
|
4453
|
+
function Na(t) {
|
|
4445
4454
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
4446
|
-
throw new
|
|
4455
|
+
throw new Ca(typeof t);
|
|
4447
4456
|
return t;
|
|
4448
4457
|
}
|
|
4449
|
-
|
|
4450
|
-
|
|
4458
|
+
x.prototype[wt] = !0;
|
|
4459
|
+
x.prototype.use = function(t, e) {
|
|
4451
4460
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
4452
4461
|
};
|
|
4453
|
-
|
|
4462
|
+
x.prototype._loadRegistered = function() {
|
|
4454
4463
|
const t = this._current[0];
|
|
4455
4464
|
return !this.started && !this.booted && S.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
4456
4465
|
};
|
|
4457
|
-
Object.defineProperty(
|
|
4458
|
-
|
|
4459
|
-
if (t =
|
|
4460
|
-
throw new
|
|
4466
|
+
Object.defineProperty(x.prototype, "then", { get: Qn });
|
|
4467
|
+
x.prototype._addPlugin = function(t, e, r) {
|
|
4468
|
+
if (t = Na(t), e = e || {}, this.booted)
|
|
4469
|
+
throw new La();
|
|
4461
4470
|
const n = this._current[0], i = new or(this, t, e, r);
|
|
4462
4471
|
if (i.once("start", (o, s, a) => {
|
|
4463
4472
|
const u = this.pluginTree.start(n.name, s, a);
|
|
@@ -4470,16 +4479,16 @@ B.prototype._addPlugin = function(t, e, r) {
|
|
|
4470
4479
|
o && (this._error = o);
|
|
4471
4480
|
}), i;
|
|
4472
4481
|
};
|
|
4473
|
-
|
|
4482
|
+
x.prototype.after = function(t) {
|
|
4474
4483
|
if (!t)
|
|
4475
4484
|
return this._loadRegistered();
|
|
4476
4485
|
this._addPlugin(e.bind(this), {}, !0);
|
|
4477
4486
|
function e(r, n, i) {
|
|
4478
|
-
|
|
4487
|
+
Gn.call(this, t, i);
|
|
4479
4488
|
}
|
|
4480
4489
|
return this;
|
|
4481
4490
|
};
|
|
4482
|
-
|
|
4491
|
+
x.prototype.onClose = function(t) {
|
|
4483
4492
|
if (typeof t != "function")
|
|
4484
4493
|
throw new Error("not a function");
|
|
4485
4494
|
t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
|
|
@@ -4488,7 +4497,7 @@ B.prototype.onClose = function(t) {
|
|
|
4488
4497
|
}
|
|
4489
4498
|
return this;
|
|
4490
4499
|
};
|
|
4491
|
-
|
|
4500
|
+
x.prototype.close = function(t) {
|
|
4492
4501
|
let e;
|
|
4493
4502
|
if (t) {
|
|
4494
4503
|
if (typeof t != "function")
|
|
@@ -4505,7 +4514,7 @@ B.prototype.close = function(t) {
|
|
|
4505
4514
|
this._error = null, this._closeQ.push(t), S.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
4506
4515
|
}), e;
|
|
4507
4516
|
};
|
|
4508
|
-
|
|
4517
|
+
x.prototype.ready = function(t) {
|
|
4509
4518
|
if (t) {
|
|
4510
4519
|
if (typeof t != "function")
|
|
4511
4520
|
throw new Ze("ready", typeof t);
|
|
@@ -4520,15 +4529,15 @@ B.prototype.ready = function(t) {
|
|
|
4520
4529
|
}
|
|
4521
4530
|
});
|
|
4522
4531
|
};
|
|
4523
|
-
|
|
4532
|
+
x.prototype.prettyPrint = function() {
|
|
4524
4533
|
return this.pluginTree.prittyPrint();
|
|
4525
4534
|
};
|
|
4526
|
-
|
|
4535
|
+
x.prototype.toJSON = function() {
|
|
4527
4536
|
return this.pluginTree.toJSON();
|
|
4528
4537
|
};
|
|
4529
4538
|
function rn() {
|
|
4530
4539
|
}
|
|
4531
|
-
function
|
|
4540
|
+
function Qn() {
|
|
4532
4541
|
if (this.booted) {
|
|
4533
4542
|
Ge("thenify returning null because we are already booted");
|
|
4534
4543
|
return;
|
|
@@ -4539,7 +4548,7 @@ function Gn() {
|
|
|
4539
4548
|
}
|
|
4540
4549
|
return Ge("thenify"), (t, e) => this._loadRegistered().then(() => (this[qt] = !0, t(this._server)), e);
|
|
4541
4550
|
}
|
|
4542
|
-
function
|
|
4551
|
+
function Gn(t, e) {
|
|
4543
4552
|
const r = this._server, n = this._error;
|
|
4544
4553
|
let i;
|
|
4545
4554
|
if (this._error = null, t.length === 0)
|
|
@@ -4552,9 +4561,9 @@ function Kn(t, e) {
|
|
|
4552
4561
|
};
|
|
4553
4562
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
4554
4563
|
} else
|
|
4555
|
-
|
|
4564
|
+
Da.call(this, t, n, r, e);
|
|
4556
4565
|
}
|
|
4557
|
-
function
|
|
4566
|
+
function Da(t, e, r, n) {
|
|
4558
4567
|
const i = t.name;
|
|
4559
4568
|
Ge("setting up ready timeout", i, this._timeout);
|
|
4560
4569
|
let o = setTimeout(() => {
|
|
@@ -4567,7 +4576,7 @@ function Na(t, e, r, n) {
|
|
|
4567
4576
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
4568
4577
|
}
|
|
4569
4578
|
}
|
|
4570
|
-
function
|
|
4579
|
+
function Ra(t, e) {
|
|
4571
4580
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
4572
4581
|
if (t.length === 0 || t.length === 1) {
|
|
4573
4582
|
let i;
|
|
@@ -4578,7 +4587,7 @@ function Da(t, e) {
|
|
|
4578
4587
|
} else
|
|
4579
4588
|
t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
4580
4589
|
}
|
|
4581
|
-
function
|
|
4590
|
+
function Va(t, e) {
|
|
4582
4591
|
return r.bind(e);
|
|
4583
4592
|
function r(n, i) {
|
|
4584
4593
|
let o;
|
|
@@ -4600,16 +4609,16 @@ function Qt(t, e) {
|
|
|
4600
4609
|
}, i) : S.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : S.nextTick(i);
|
|
4601
4610
|
}
|
|
4602
4611
|
}
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
return
|
|
4612
|
+
ur.exports = x;
|
|
4613
|
+
ur.exports.express = function(t) {
|
|
4614
|
+
return x(t, {
|
|
4606
4615
|
expose: {
|
|
4607
4616
|
use: "load"
|
|
4608
4617
|
}
|
|
4609
4618
|
});
|
|
4610
4619
|
};
|
|
4611
|
-
var
|
|
4612
|
-
const
|
|
4620
|
+
var $a = ur.exports;
|
|
4621
|
+
const ja = /* @__PURE__ */ Lo($a);
|
|
4613
4622
|
(function() {
|
|
4614
4623
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
4615
4624
|
return;
|
|
@@ -4627,10 +4636,10 @@ const $a = /* @__PURE__ */ Co(Va);
|
|
|
4627
4636
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
4628
4637
|
}
|
|
4629
4638
|
})();
|
|
4630
|
-
function
|
|
4639
|
+
function uu(t, e = !0, r = !0, n) {
|
|
4631
4640
|
console.log("start sdk");
|
|
4632
|
-
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s =
|
|
4633
|
-
return s.use(so), s.use(to, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(oo, { videoPlayerController: n?.videoPlayerController }), s.use(
|
|
4641
|
+
const i = e ? "https://grpc-sdk.streamlayer.io:443" : "https://grpc-sdk.next.streamlayer.io:443", o = e ? "https://grpc.streamlayer.io:443" : "https://grpc.next.streamlayer.io:443", s = ja(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
4642
|
+
return s.use(so), s.use(to, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(oo, { videoPlayerController: n?.videoPlayerController }), s.use(Ci, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(Fi), s.use(io), s.use(vo), s.use(zi), s.use(Co), s.after((a, u, d) => {
|
|
4634
4643
|
if (a)
|
|
4635
4644
|
throw a;
|
|
4636
4645
|
u.ready(), d();
|
|
@@ -4643,5 +4652,5 @@ function au(t, e = !0, r = !0, n) {
|
|
|
4643
4652
|
}), s;
|
|
4644
4653
|
}
|
|
4645
4654
|
export {
|
|
4646
|
-
|
|
4655
|
+
uu as StreamLayer
|
|
4647
4656
|
};
|