@streamlayer/sdk-web 1.6.3 → 1.6.5
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 +7 -7
- package/lib/es/index.js +953 -900
- package/package.json +11 -11
package/lib/es/index.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { pino as
|
|
2
|
-
import { QuestionType as
|
|
3
|
-
import { PickHistoryStatus as
|
|
4
|
-
import { SdkOverlayType as
|
|
5
|
-
import { InvitationCategory as
|
|
6
|
-
import { computed as
|
|
1
|
+
import { pino as Si } from "pino";
|
|
2
|
+
import { QuestionType as _, QuestionStatus as Z, PromotionType as W, NotificationEnabled as $r, SilenceSetting as wi } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
|
|
3
|
+
import { PickHistoryStatus as lt } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
|
|
4
|
+
import { SdkOverlayType as R } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
|
|
5
|
+
import { InvitationCategory as Br, InvitationFrom as Mr } from "@streamlayer/sl-eslib/analytics/v1/invitations/invitations_pb";
|
|
6
|
+
import { computed as Ai, map as Ei, atom as kt, batched as qr, onMount as Sr } from "nanostores";
|
|
7
7
|
import { nanoid as ir } from "nanoid";
|
|
8
|
-
import { ConnectError as
|
|
9
|
-
import { createGrpcWebTransport as
|
|
10
|
-
import { nanoquery as
|
|
11
|
-
import { Events as
|
|
12
|
-
import { Client as
|
|
13
|
-
import { Users as
|
|
14
|
-
import { Feed as
|
|
15
|
-
import { Leaderboard as
|
|
8
|
+
import { ConnectError as rt, Code as se, createContextKey as jr, createPromiseClient as Ur, createContextValues as Ii } from "@connectrpc/connect";
|
|
9
|
+
import { createGrpcWebTransport as xr } from "@connectrpc/connect-web";
|
|
10
|
+
import { nanoquery as Qr } from "@nanostores/query";
|
|
11
|
+
import { Events as Tn } from "@streamlayer/sl-eslib/sports/events/events_connect";
|
|
12
|
+
import { Client as it } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
|
|
13
|
+
import { Users as wr } from "@streamlayer/sl-eslib/users/users_connect";
|
|
14
|
+
import { Feed as te } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
|
|
15
|
+
import { Leaderboard as On } 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 Q, TopicSubType as Ae, TopicType as x, PollOpenedFrom as
|
|
19
|
-
import { AnalyticsService as
|
|
20
|
-
import { InteractionActionType as
|
|
21
|
-
import { NotificationKind as pe, NotificationType as
|
|
22
|
-
function
|
|
17
|
+
import { LinksClient as Ti } from "@streamlayer/sl-eslib/shortLinks/linksClient_connect";
|
|
18
|
+
import { Kind as Q, TopicSubType as Ae, TopicType as x, PollOpenedFrom as Y, Category as z, ScreenOrientation as Gr } from "@streamlayer/sl-eslib/analytics/v1/common/analytics.common_pb";
|
|
19
|
+
import { AnalyticsService as _n } from "@streamlayer/sl-eslib/analytics/v2/streaming/streaming_connect";
|
|
20
|
+
import { InteractionActionType as Kr } from "@streamlayer/sl-eslib/analytics/v1/interactions/interactions_pb";
|
|
21
|
+
import { NotificationKind as pe, NotificationType as zr } from "@streamlayer/sl-eslib/analytics/v1/notifications/notifications_pb";
|
|
22
|
+
function Oi(t) {
|
|
23
23
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
24
24
|
}
|
|
25
|
-
var
|
|
25
|
+
var Ln = { exports: {} }, $ = Ln.exports = {}, ae, ue;
|
|
26
26
|
function or() {
|
|
27
27
|
throw new Error("setTimeout has not been defined");
|
|
28
28
|
}
|
|
@@ -56,7 +56,7 @@ function Cn(t) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function _i(t) {
|
|
60
60
|
if (ue === clearTimeout)
|
|
61
61
|
return clearTimeout(t);
|
|
62
62
|
if ((ue === sr || !ue) && clearTimeout)
|
|
@@ -71,20 +71,20 @@ function Oi(t) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var be = [],
|
|
75
|
-
function
|
|
76
|
-
!
|
|
74
|
+
var be = [], Qe = !1, _e, ht = -1;
|
|
75
|
+
function Li() {
|
|
76
|
+
!Qe || !_e || (Qe = !1, _e.length ? be = _e.concat(be) : ht = -1, be.length && kn());
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
if (!
|
|
80
|
-
var t = Cn(
|
|
81
|
-
|
|
78
|
+
function kn() {
|
|
79
|
+
if (!Qe) {
|
|
80
|
+
var t = Cn(Li);
|
|
81
|
+
Qe = !0;
|
|
82
82
|
for (var e = be.length; e; ) {
|
|
83
83
|
for (_e = be, be = []; ++ht < e; )
|
|
84
84
|
_e && _e[ht].run();
|
|
85
85
|
ht = -1, e = be.length;
|
|
86
86
|
}
|
|
87
|
-
_e = null,
|
|
87
|
+
_e = null, Qe = !1, _i(t);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
$.nextTick = function(t) {
|
|
@@ -92,12 +92,12 @@ $.nextTick = function(t) {
|
|
|
92
92
|
if (arguments.length > 1)
|
|
93
93
|
for (var r = 1; r < arguments.length; r++)
|
|
94
94
|
e[r - 1] = arguments[r];
|
|
95
|
-
be.push(new
|
|
95
|
+
be.push(new Pn(t, e)), be.length === 1 && !Qe && Cn(kn);
|
|
96
96
|
};
|
|
97
|
-
function
|
|
97
|
+
function Pn(t, e) {
|
|
98
98
|
this.fun = t, this.array = e;
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
Pn.prototype.run = function() {
|
|
101
101
|
this.fun.apply(null, this.array);
|
|
102
102
|
};
|
|
103
103
|
$.title = "browser";
|
|
@@ -132,8 +132,8 @@ $.chdir = function(t) {
|
|
|
132
132
|
$.umask = function() {
|
|
133
133
|
return 0;
|
|
134
134
|
};
|
|
135
|
-
var Ci =
|
|
136
|
-
const E = /* @__PURE__ */
|
|
135
|
+
var Ci = Ln.exports;
|
|
136
|
+
const E = /* @__PURE__ */ Oi(Ci), ki = Si({
|
|
137
137
|
level: "trace",
|
|
138
138
|
enabled: typeof window < "u" && !!window.localStorage.getItem("SL_DEBUG"),
|
|
139
139
|
browser: {
|
|
@@ -141,23 +141,23 @@ const E = /* @__PURE__ */ Ti(Ci), Li = vi({
|
|
|
141
141
|
console.log(t);
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}), Se = (t, e) =>
|
|
145
|
-
class
|
|
144
|
+
}), Se = (t, e) => ki.child({ name: t }, e);
|
|
145
|
+
class Pi 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 Ni = Se("event-bus");
|
|
152
|
+
class Fi {
|
|
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 Pi(this.name, { ...r, type: e });
|
|
160
|
+
Ni.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 Ni {
|
|
|
173
173
|
}), this.listeners.clear();
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
class
|
|
176
|
+
class Di {
|
|
177
177
|
}
|
|
178
178
|
window.slStore = /* @__PURE__ */ Object.create(null);
|
|
179
179
|
class Pt {
|
|
@@ -192,33 +192,33 @@ class Pt {
|
|
|
192
192
|
return this.store;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const Ri = (t) => {
|
|
196
196
|
const e = Object.keys(t);
|
|
197
|
-
return
|
|
197
|
+
return Ai(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((n, i) => [n, r[i]])));
|
|
198
198
|
};
|
|
199
|
-
class
|
|
199
|
+
class Le extends Pt {
|
|
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
|
|
206
|
+
const J = (t) => Ei(t);
|
|
207
207
|
var ye;
|
|
208
208
|
(function(t) {
|
|
209
209
|
t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
|
|
210
210
|
})(ye || (ye = {}));
|
|
211
|
-
const
|
|
212
|
-
[
|
|
213
|
-
[
|
|
214
|
-
[
|
|
215
|
-
[
|
|
211
|
+
const Vi = {
|
|
212
|
+
[R.BETTING]: "betting",
|
|
213
|
+
[R.GAMES]: "games",
|
|
214
|
+
[R.PUBLIC_CHAT]: "publicChat",
|
|
215
|
+
[R.TWITTER]: "twitter"
|
|
216
216
|
};
|
|
217
|
-
var
|
|
217
|
+
var Ze;
|
|
218
218
|
(function(t) {
|
|
219
219
|
t.Ready = "ready", t.Suspended = "suspended";
|
|
220
|
-
})(
|
|
221
|
-
class
|
|
220
|
+
})(Ze || (Ze = {}));
|
|
221
|
+
class Nn {
|
|
222
222
|
status;
|
|
223
223
|
source;
|
|
224
224
|
config;
|
|
@@ -226,7 +226,7 @@ class Pn {
|
|
|
226
226
|
listeners = /* @__PURE__ */ new Set();
|
|
227
227
|
settingsKey;
|
|
228
228
|
constructor({ settings: e, ...r }, n) {
|
|
229
|
-
this.settingsKey =
|
|
229
|
+
this.settingsKey = Vi[r.type], this.status = kt(Ze.Suspended), this.config = new Le(J(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new Le(J(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new Le(J({}), `feature:settings:${this.settingsKey}`), this.source = n;
|
|
230
230
|
}
|
|
231
231
|
get featureConfig() {
|
|
232
232
|
return this.config.getStore();
|
|
@@ -238,10 +238,10 @@ class Pn {
|
|
|
238
238
|
this.listeners.add(e);
|
|
239
239
|
}
|
|
240
240
|
enable = () => {
|
|
241
|
-
this.status.set(
|
|
241
|
+
this.status.set(Ze.Ready);
|
|
242
242
|
};
|
|
243
243
|
disable = () => {
|
|
244
|
-
this.status.set(
|
|
244
|
+
this.status.set(Ze.Suspended);
|
|
245
245
|
};
|
|
246
246
|
setFeatureConfig = ({ settings: e, ...r }) => {
|
|
247
247
|
let n;
|
|
@@ -268,7 +268,7 @@ class Pn {
|
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
class
|
|
271
|
+
class ee extends Pt {
|
|
272
272
|
getValue = () => this.getStore().get();
|
|
273
273
|
getValues() {
|
|
274
274
|
throw new Error("not implemented");
|
|
@@ -283,7 +283,7 @@ class Z extends Pt {
|
|
|
283
283
|
return this.getStore().get();
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
const
|
|
286
|
+
const q = (t) => kt(t);
|
|
287
287
|
class le extends Pt {
|
|
288
288
|
atomStore;
|
|
289
289
|
constructor(e, r, n) {
|
|
@@ -315,10 +315,10 @@ class le extends Pt {
|
|
|
315
315
|
key = () => this.getStore().key;
|
|
316
316
|
off = () => this.getStore().off();
|
|
317
317
|
}
|
|
318
|
-
const
|
|
319
|
-
async function*
|
|
318
|
+
const M = new Fi();
|
|
319
|
+
async function* $i(t, e) {
|
|
320
320
|
for await (const r of e) {
|
|
321
|
-
t.response.message = r, t.received_at = Date.now(), t.id =
|
|
321
|
+
t.response.message = r, t.received_at = Date.now(), t.id = Fn++;
|
|
322
322
|
const n = {
|
|
323
323
|
type: "__GRPC_DEVTOOLS_EXTENSION__",
|
|
324
324
|
data: t
|
|
@@ -326,10 +326,10 @@ async function* Vi(t, e) {
|
|
|
326
326
|
window.postMessage(n), yield r;
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
|
-
let
|
|
330
|
-
const
|
|
329
|
+
let Fn = 0;
|
|
330
|
+
const Bi = () => (t) => async (e) => {
|
|
331
331
|
const r = {
|
|
332
|
-
id:
|
|
332
|
+
id: Fn++,
|
|
333
333
|
name: e.url,
|
|
334
334
|
stream: e.stream,
|
|
335
335
|
sent_at: Date.now(),
|
|
@@ -356,7 +356,7 @@ const $i = () => (t) => async (e) => {
|
|
|
356
356
|
};
|
|
357
357
|
return window.postMessage(i), {
|
|
358
358
|
...n,
|
|
359
|
-
message:
|
|
359
|
+
message: $i(r, n.message)
|
|
360
360
|
};
|
|
361
361
|
} else {
|
|
362
362
|
r.response.message = n.message, r.latency = r.received_at - r.sent_at;
|
|
@@ -380,7 +380,7 @@ const $i = () => (t) => async (e) => {
|
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
382
|
window.dispatchEvent(new CustomEvent("grpc_devtools_loaded"));
|
|
383
|
-
function
|
|
383
|
+
function Dn(t) {
|
|
384
384
|
return t instanceof DOMException && // everything except Firefox
|
|
385
385
|
(t.code === 22 || // Firefox
|
|
386
386
|
t.code === 1014 || // test name field too, because code might not be present
|
|
@@ -388,7 +388,7 @@ function Fn(t) {
|
|
|
388
388
|
t.name === "QuotaExceededError" || // Firefox
|
|
389
389
|
t.name === "NS_ERROR_DOM_QUOTA_REACHED");
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class We {
|
|
392
392
|
delimiter = ":";
|
|
393
393
|
prefix;
|
|
394
394
|
storage;
|
|
@@ -405,7 +405,7 @@ class He {
|
|
|
405
405
|
try {
|
|
406
406
|
this.storage.setItem(n, r);
|
|
407
407
|
} catch (i) {
|
|
408
|
-
|
|
408
|
+
Dn(i) && this.storage === window.sessionStorage && (window.sessionStorage.removeItem("slstreamlogs"), this.storage.setItem(n, r));
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
411
|
read = (...e) => {
|
|
@@ -416,10 +416,10 @@ class He {
|
|
|
416
416
|
this.storage.removeItem(this.generateKey(e));
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
var
|
|
419
|
+
var ne;
|
|
420
420
|
(function(t) {
|
|
421
421
|
t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnect = "reconnect", t.Reconnecting = "reconnecting";
|
|
422
|
-
})(
|
|
422
|
+
})(ne || (ne = {}));
|
|
423
423
|
class Mi {
|
|
424
424
|
params;
|
|
425
425
|
streamCancel;
|
|
@@ -434,19 +434,19 @@ class Mi {
|
|
|
434
434
|
attempt = 0;
|
|
435
435
|
constructor(e, r, n, i) {
|
|
436
436
|
const o = {
|
|
437
|
-
status:
|
|
437
|
+
status: ne.Init,
|
|
438
438
|
ts: /* @__PURE__ */ new Date(),
|
|
439
439
|
log: []
|
|
440
440
|
};
|
|
441
|
-
this.state = new
|
|
441
|
+
this.state = new Le(J(o), `subscription:${i.name}:state`), this.options = {
|
|
442
442
|
...i,
|
|
443
443
|
reconnectDelay: i.reconnectDelay ?? 1e3,
|
|
444
444
|
reconnectMaxDelay: i.reconnectMaxDelay ?? 3e4,
|
|
445
445
|
reconnectMaxAttempts: i.reconnectMaxAttempts ?? 10,
|
|
446
446
|
withStore: i.withStore ?? !1
|
|
447
|
-
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new
|
|
448
|
-
this.state.getValue("status") ===
|
|
449
|
-
})), this.updateState(
|
|
447
|
+
}, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = n, this.method = r, i.withStore && (this.store = new ee(q(null), `subscription:${i.name}:store`)), "subscribe" in n && typeof n.subscribe == "function" && (this.paramsListener = n.subscribe((s) => {
|
|
448
|
+
this.state.getValue("status") === ne.Connected && (this.addStateLog(`params updated, reconnect => ${JSON.stringify(s)}`), this.reconnect());
|
|
449
|
+
})), this.updateState(ne.Ready);
|
|
450
450
|
}
|
|
451
451
|
updateState = (e) => {
|
|
452
452
|
this.state.setValue("status", e), this.state.setValue("ts", /* @__PURE__ */ new Date()), this.addStateLog(`status => ${e}`);
|
|
@@ -458,7 +458,7 @@ class Mi {
|
|
|
458
458
|
window.sessionStorage.setItem("slstreamlogs", window.sessionStorage.getItem("slstreamlogs") + `
|
|
459
459
|
` + n);
|
|
460
460
|
} catch (i) {
|
|
461
|
-
|
|
461
|
+
Dn(i) && window.sessionStorage.removeItem("slstreamlogs"), window.sessionStorage.setItem("slstreamlogs", n);
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
464
|
addListener = (e, r) => this.listeners.has(e) ? (this.addStateLog(`listener '${e}' not added, already exists`), () => {
|
|
@@ -467,7 +467,7 @@ class Mi {
|
|
|
467
467
|
this.listeners.delete(e), this.addStateLog(`listener '${e}' removed`);
|
|
468
468
|
};
|
|
469
469
|
connect = () => {
|
|
470
|
-
this.updateState(
|
|
470
|
+
this.updateState(ne.Connecting), this.streamCancel && (this.addStateLog("disconnect prev connection"), this.streamCancel.abort(), this.streamCancel = void 0);
|
|
471
471
|
const e = "get" in this.params && typeof this.params.get == "function" ? this.params.get() : this.params;
|
|
472
472
|
(async () => {
|
|
473
473
|
this.streamCancel = new AbortController();
|
|
@@ -479,12 +479,12 @@ class Mi {
|
|
|
479
479
|
for await (const o of i)
|
|
480
480
|
this.attempt = 0, this.onData(o);
|
|
481
481
|
} catch (n) {
|
|
482
|
-
n instanceof
|
|
482
|
+
n instanceof rt && n.code != se.Canceled && this.onStreamError(n);
|
|
483
483
|
}
|
|
484
|
-
})(), this.updateState(
|
|
484
|
+
})(), this.updateState(ne.Connected);
|
|
485
485
|
};
|
|
486
486
|
disconnect = () => {
|
|
487
|
-
this.streamCancel && this.streamCancel.abort(), this.listeners.clear(), this.paramsListener?.(), clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0, this.updateState(
|
|
487
|
+
this.streamCancel && this.streamCancel.abort(), this.listeners.clear(), this.paramsListener?.(), clearTimeout(this.reconnectTimeout), this.reconnectTimeout = void 0, this.updateState(ne.Disconnected);
|
|
488
488
|
};
|
|
489
489
|
/**
|
|
490
490
|
* Reconnect after delay, if not already reconnecting, otherwise do nothing
|
|
@@ -493,10 +493,10 @@ class Mi {
|
|
|
493
493
|
if (this.reconnectTimeout)
|
|
494
494
|
this.addStateLog("already reconnecting");
|
|
495
495
|
else if (this.attempt < this.options.reconnectMaxAttempts) {
|
|
496
|
-
this.updateState(
|
|
496
|
+
this.updateState(ne.Reconnect);
|
|
497
497
|
const e = Math.min(this.options.reconnectMaxDelay, Math.pow(2, this.attempt) * this.options.reconnectDelay), r = Math.round(e * (1 + Math.random()) / 2);
|
|
498
498
|
this.reconnectTimeout = setTimeout(() => {
|
|
499
|
-
this.attempt++, this.updateState(
|
|
499
|
+
this.attempt++, this.updateState(ne.Reconnecting), this.addStateLog(`reconnect attempt ${this.attempt} after ${r}ms`), this.connect(), this.reconnectTimeout = void 0;
|
|
500
500
|
}, r);
|
|
501
501
|
} else
|
|
502
502
|
this.addStateLog("max reconnect attempts reached"), this.disconnect();
|
|
@@ -519,15 +519,15 @@ class Mi {
|
|
|
519
519
|
*/
|
|
520
520
|
onStreamError = (e) => {
|
|
521
521
|
if (this.addStateLog(`error => ${e ? JSON.stringify(e) : "undefined"}}`), e !== void 0) {
|
|
522
|
-
if (e instanceof
|
|
523
|
-
this.updateState(
|
|
522
|
+
if (e instanceof rt && e.code !== se.Canceled) {
|
|
523
|
+
this.updateState(ne.Failed), this.state.setValue("error", e), this.reconnect();
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
526
526
|
this.disconnect();
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
const
|
|
530
|
+
const qi = /* @__PURE__ */ new Set([
|
|
531
531
|
se.Unknown,
|
|
532
532
|
se.Internal,
|
|
533
533
|
se.DeadlineExceeded,
|
|
@@ -535,18 +535,18 @@ const Bi = /* @__PURE__ */ new Set([
|
|
|
535
535
|
se.FailedPrecondition,
|
|
536
536
|
se.Unavailable,
|
|
537
537
|
se.DataLoss
|
|
538
|
-
]),
|
|
538
|
+
]), Hr = Se("grpc:retry"), ji = (t) => async (e) => {
|
|
539
539
|
const r = e.contextValues.get(ar.retryAttempts), n = 300, i = e.contextValues.get(ar.retryDelay);
|
|
540
540
|
if (e.stream || r === 0)
|
|
541
541
|
return t(e);
|
|
542
|
-
|
|
542
|
+
Hr.trace({ url: e.url, attempts: r, maxDelay: i }, "retry options");
|
|
543
543
|
for (let o = 0; ; o++)
|
|
544
544
|
try {
|
|
545
545
|
return await t(e);
|
|
546
546
|
} catch (s) {
|
|
547
|
-
|
|
548
|
-
const a =
|
|
549
|
-
if (o >= r || !(a instanceof
|
|
547
|
+
Hr.trace({ attempt: o, error: s }, "retry attempt");
|
|
548
|
+
const a = rt.from(s);
|
|
549
|
+
if (o >= r || !(a instanceof rt) || !qi.has(a.code))
|
|
550
550
|
throw s;
|
|
551
551
|
const u = Math.min(i, Math.pow(2, o) * n), l = Math.round(u * (1 + Math.random()) / 2);
|
|
552
552
|
await new Promise((c) => setTimeout(c, l));
|
|
@@ -560,8 +560,8 @@ const Bi = /* @__PURE__ */ new Set([
|
|
|
560
560
|
return t;
|
|
561
561
|
const e = ir();
|
|
562
562
|
return localStorage.setItem("sl-device-id", e), e;
|
|
563
|
-
},
|
|
564
|
-
class
|
|
563
|
+
}, xi = () => navigator.userAgentData?.platform || navigator.platform;
|
|
564
|
+
class Wr {
|
|
565
565
|
toJsonOptions = {
|
|
566
566
|
emitDefaultValues: !1,
|
|
567
567
|
enumAsInteger: !0,
|
|
@@ -580,20 +580,20 @@ class Hr {
|
|
|
580
580
|
subscriptions;
|
|
581
581
|
opts;
|
|
582
582
|
constructor(e, r) {
|
|
583
|
-
this.host = e, this.opts = r, this.$headers = new
|
|
583
|
+
this.host = e, this.opts = r, this.$headers = new Le(J({
|
|
584
584
|
"sl-device-id": Ui(),
|
|
585
|
-
"sl-device-os":
|
|
585
|
+
"sl-device-os": xi()
|
|
586
586
|
}), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.streamClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
|
|
587
|
-
const [n, i, o] =
|
|
587
|
+
const [n, i, o] = Qr({
|
|
588
588
|
dedupeTime: r?.dedupeTime,
|
|
589
589
|
refetchInterval: r?.refetchInterval
|
|
590
590
|
});
|
|
591
|
-
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport =
|
|
591
|
+
this.nanoquery = { createFetcherStore: n, createMutatorStore: i, utils: o }, this.transport = xr({
|
|
592
592
|
baseUrl: e,
|
|
593
593
|
defaultTimeoutMs: 1e4,
|
|
594
594
|
interceptors: this.interceptors
|
|
595
595
|
// useBinaryFormat: true,
|
|
596
|
-
}), this.streamTransport =
|
|
596
|
+
}), this.streamTransport = xr({
|
|
597
597
|
baseUrl: e,
|
|
598
598
|
interceptors: this.interceptors
|
|
599
599
|
// useBinaryFormat: true,
|
|
@@ -617,7 +617,7 @@ class Hr {
|
|
|
617
617
|
for (const [i, o] of this.subscriptions)
|
|
618
618
|
o.disconnect(), this.subscriptions.delete(i);
|
|
619
619
|
this.clients.clear(), this.streamClients.clear(), this.subscriptions.clear();
|
|
620
|
-
const [e, r, n] =
|
|
620
|
+
const [e, r, n] = Qr({
|
|
621
621
|
dedupeTime: this.opts?.dedupeTime,
|
|
622
622
|
refetchInterval: this.opts?.refetchInterval
|
|
623
623
|
});
|
|
@@ -651,7 +651,7 @@ class Hr {
|
|
|
651
651
|
...Array.isArray(r) ? r : [r]
|
|
652
652
|
], a = [e.typeName, o.charAt(0).toLowerCase() + o.slice(1)];
|
|
653
653
|
return { client: i, createRequestOptions: (l) => {
|
|
654
|
-
const c =
|
|
654
|
+
const c = Ii();
|
|
655
655
|
for (const f in l) {
|
|
656
656
|
const p = ar[f];
|
|
657
657
|
c.set(p, l[f]);
|
|
@@ -679,11 +679,11 @@ class Hr {
|
|
|
679
679
|
n.header.set(o, i[o]);
|
|
680
680
|
return r(n);
|
|
681
681
|
};
|
|
682
|
-
this.interceptors.push(e), this.interceptors.push(
|
|
682
|
+
this.interceptors.push(e), this.interceptors.push(Bi()), this.opts?.retryable && this.interceptors.push(ji);
|
|
683
683
|
};
|
|
684
684
|
}
|
|
685
|
-
const
|
|
686
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
685
|
+
const Qi = (t, e) => {
|
|
686
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Tn, {
|
|
687
687
|
method: "retrieveEventId",
|
|
688
688
|
params: [t]
|
|
689
689
|
});
|
|
@@ -700,39 +700,39 @@ const xi = (t, e) => {
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
});
|
|
703
|
-
},
|
|
704
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
703
|
+
}, Gi = (t, e) => {
|
|
704
|
+
const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "getStream", params: [t] });
|
|
705
705
|
return e.nanoquery.createFetcherStore(n, {
|
|
706
706
|
fetcher: async (i, o, s) => s ? (await r.getStream({
|
|
707
707
|
id: s
|
|
708
708
|
// we are sure that id is a string
|
|
709
709
|
})).data?.attributes : void 0
|
|
710
710
|
});
|
|
711
|
-
},
|
|
712
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
711
|
+
}, Ki = (t, e) => {
|
|
712
|
+
const { client: r, queryKey: n } = e.createPromiseClient(Tn, { method: "summary", params: [t] });
|
|
713
713
|
return e.nanoquery.createFetcherStore(n, {
|
|
714
714
|
fetcher: async (i, o, s) => s ? (await r.summary({
|
|
715
715
|
id: s
|
|
716
716
|
})).data?.attributes : void 0
|
|
717
717
|
});
|
|
718
|
-
},
|
|
719
|
-
const { queryKey: r, client: n } = e.createPromiseClient(
|
|
718
|
+
}, zi = (t, e) => {
|
|
719
|
+
const { queryKey: r, client: n } = e.createPromiseClient(wr, { method: "me", params: [t] });
|
|
720
720
|
return e.nanoquery.createFetcherStore(r, {
|
|
721
721
|
fetcher: async () => {
|
|
722
722
|
const { data: i } = await n.me({});
|
|
723
723
|
return { data: i };
|
|
724
724
|
}
|
|
725
725
|
});
|
|
726
|
-
},
|
|
727
|
-
const { client: e, createRequestOptions: r } = t.createPromiseClient(
|
|
726
|
+
}, Hi = (t) => {
|
|
727
|
+
const { client: e, createRequestOptions: r } = t.createPromiseClient(wr, { method: "bypassAuth" }), n = r({ retryAttempts: 0 });
|
|
728
728
|
return ({ userKey: i, schema: o, init: s, inviterKey: a }) => e.bypassAuth({ userKey: i, schema: o, init: s, inviterKey: a }, { contextValues: n });
|
|
729
|
-
},
|
|
730
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
729
|
+
}, Wi = (t, e) => {
|
|
730
|
+
const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "get", params: [t] });
|
|
731
731
|
return e.nanoquery.createFetcherStore(n, {
|
|
732
732
|
fetcher: async () => (await r.get({})).data?.attributes
|
|
733
733
|
});
|
|
734
|
-
},
|
|
735
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
734
|
+
}, Yi = (t, e) => {
|
|
735
|
+
const { client: r, queryKey: n } = e.createPromiseClient(it, { method: "getOrganization", params: [t] });
|
|
736
736
|
return e.nanoquery.createFetcherStore(n, {
|
|
737
737
|
fetcher: async () => {
|
|
738
738
|
const i = await r.getOrganization({});
|
|
@@ -742,20 +742,20 @@ const xi = (t, e) => {
|
|
|
742
742
|
} : void 0;
|
|
743
743
|
}
|
|
744
744
|
});
|
|
745
|
-
},
|
|
746
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
745
|
+
}, Ji = (t, e) => {
|
|
746
|
+
const { client: r, queryKey: n } = e.createPromiseClient(it, {
|
|
747
747
|
method: "getOrganizationAdvertising",
|
|
748
748
|
params: [t]
|
|
749
749
|
});
|
|
750
750
|
return e.nanoquery.createFetcherStore(n, {
|
|
751
751
|
fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
|
|
752
752
|
});
|
|
753
|
-
},
|
|
754
|
-
t.transport = new
|
|
753
|
+
}, Xi = (t, e, r) => {
|
|
754
|
+
t.transport = new Wr(e.host, {
|
|
755
755
|
dedupeTime: 1e3 * 60 * 5,
|
|
756
756
|
refetchInterval: 1e3 * 60 * 5,
|
|
757
757
|
retryable: !0
|
|
758
|
-
}), t.analyticsTransport = new
|
|
758
|
+
}), t.analyticsTransport = new Wr(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) => {
|
|
759
759
|
t.analyticsTransport.$headers.getStore().set(n);
|
|
760
760
|
}), t.sdk.onMount({ name: "transport" }, () => () => {
|
|
761
761
|
t.transport.disconnect(), t.analyticsTransport.disconnect();
|
|
@@ -765,7 +765,7 @@ var he;
|
|
|
765
765
|
(function(t) {
|
|
766
766
|
t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
|
|
767
767
|
})(he || (he = {}));
|
|
768
|
-
class je extends
|
|
768
|
+
class je extends We {
|
|
769
769
|
constructor() {
|
|
770
770
|
super("user");
|
|
771
771
|
}
|
|
@@ -792,19 +792,19 @@ var me;
|
|
|
792
792
|
(function(t) {
|
|
793
793
|
t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
|
|
794
794
|
})(me || (me = {}));
|
|
795
|
-
const
|
|
796
|
-
const e = new je(), r = new
|
|
795
|
+
const Zi = (t) => {
|
|
796
|
+
const e = new je(), r = new ee(q(e.getExternalToken()), "userKey"), n = new ee(q(e.getToken()), "userToken"), i = new le(zi(n.getStore(), t), "user", ({ data: s, error: a, loading: u }, l) => {
|
|
797
797
|
if (!a)
|
|
798
798
|
return s?.data?.id ? s.data.id : u === !1 ? void 0 : l;
|
|
799
|
-
}), o = new le(
|
|
799
|
+
}), o = new le(Wi(n.getStore(), t), "userSettings");
|
|
800
800
|
return {
|
|
801
801
|
userKey: r,
|
|
802
802
|
userToken: n,
|
|
803
803
|
user: i,
|
|
804
804
|
userSettings: o
|
|
805
805
|
};
|
|
806
|
-
},
|
|
807
|
-
const e = new
|
|
806
|
+
}, eo = (t) => {
|
|
807
|
+
const e = new ee(q(void 0), "providerStreamId"), r = new le(Qi(e.getStore(), t), "slStreamId", (o) => o?.data), n = new le(Gi(r.getAtomStore(), t), "streamSettings"), i = new le(Ki(r.getAtomStore(), t), "streamSettings");
|
|
808
808
|
return r.getAtomStore().listen((o) => {
|
|
809
809
|
(o === "" || o === void 0) && (n.getStore().mutate(void 0), i.getStore().mutate(void 0));
|
|
810
810
|
}), {
|
|
@@ -813,8 +813,8 @@ const Xi = (t) => {
|
|
|
813
813
|
streamSettings: n,
|
|
814
814
|
streamSummary: i
|
|
815
815
|
};
|
|
816
|
-
},
|
|
817
|
-
const e = new
|
|
816
|
+
}, to = (t) => {
|
|
817
|
+
const e = new ee(q(void 0), "enabled"), r = new ee(q(me.DISABLED), "status"), n = new le(Yi(e.getStore(), t), "organizationSettings", (a) => a?.data?.id), i = new le(Ji(n.getAtomStore(), t), "organizationAdvertising"), o = Zi(t), s = eo(t);
|
|
818
818
|
return {
|
|
819
819
|
enabled: e,
|
|
820
820
|
status: r,
|
|
@@ -830,10 +830,10 @@ const Xi = (t) => {
|
|
|
830
830
|
organizationAdvertising: i
|
|
831
831
|
};
|
|
832
832
|
};
|
|
833
|
-
class
|
|
833
|
+
class ro extends Pt {
|
|
834
834
|
stores;
|
|
835
835
|
constructor(e) {
|
|
836
|
-
const r =
|
|
836
|
+
const r = to(e), n = Ri(r);
|
|
837
837
|
super(n, "core"), this.stores = r;
|
|
838
838
|
}
|
|
839
839
|
getValue() {
|
|
@@ -854,18 +854,18 @@ class to extends Pt {
|
|
|
854
854
|
};
|
|
855
855
|
unsubscribe = () => this.getStore().off();
|
|
856
856
|
}
|
|
857
|
-
const
|
|
858
|
-
t.store = new
|
|
857
|
+
const no = (t, e, r) => {
|
|
858
|
+
t.store = new ro(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.sdk.streamSummary = () => t.stores.streamSummary.getStore(), t.storeUnsubscribe = () => {
|
|
859
859
|
t.store.unsubscribe();
|
|
860
860
|
}, r();
|
|
861
|
-
},
|
|
862
|
-
const { client: e } = t.createPromiseClient(
|
|
861
|
+
}, io = (t) => {
|
|
862
|
+
const { client: e } = t.createPromiseClient(On, { method: "list" });
|
|
863
863
|
return (r) => e.list(r);
|
|
864
|
-
},
|
|
865
|
-
const { client: e } = t.createPromiseClient(
|
|
864
|
+
}, Rn = (t) => {
|
|
865
|
+
const { client: e } = t.createPromiseClient(On, { method: "summary" });
|
|
866
866
|
return (r) => e.summary(r);
|
|
867
|
-
},
|
|
868
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
867
|
+
}, oo = (t, e) => {
|
|
868
|
+
const { client: r, queryKey: n } = e.createPromiseClient(wr, {
|
|
869
869
|
method: "getFriends",
|
|
870
870
|
params: [t]
|
|
871
871
|
});
|
|
@@ -880,8 +880,8 @@ const ro = (t, e, r) => {
|
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
});
|
|
883
|
-
},
|
|
884
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
883
|
+
}, so = (t, e) => {
|
|
884
|
+
const { client: r, queryKey: n } = e.createPromiseClient(te, { method: "get", params: [t] });
|
|
885
885
|
return e.nanoquery.createFetcherStore(n, {
|
|
886
886
|
fetcher: async (i, o, s) => (await r.get({
|
|
887
887
|
eventId: s
|
|
@@ -889,8 +889,8 @@ const ro = (t, e, r) => {
|
|
|
889
889
|
refetchInterval: 0,
|
|
890
890
|
dedupeTime: 1e3 * 60 * 60
|
|
891
891
|
});
|
|
892
|
-
},
|
|
893
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
892
|
+
}, ao = (t, e) => {
|
|
893
|
+
const { client: r, queryKey: n } = e.createPromiseClient(te, { method: "syncQuestion", params: [t] });
|
|
894
894
|
return e.nanoquery.createFetcherStore(n, {
|
|
895
895
|
fetcher: async (i, o, s) => {
|
|
896
896
|
if (!s)
|
|
@@ -900,51 +900,51 @@ const ro = (t, e, r) => {
|
|
|
900
900
|
eventId: s
|
|
901
901
|
}
|
|
902
902
|
});
|
|
903
|
-
if (a.data?.attributes?.question?.type !==
|
|
903
|
+
if (a.data?.attributes?.question?.type !== _.PROMOTION)
|
|
904
904
|
return a.data?.attributes;
|
|
905
905
|
},
|
|
906
906
|
dedupeTime: 1e3 * 60 * 10,
|
|
907
907
|
// 10 minutes
|
|
908
908
|
refetchInterval: 0
|
|
909
909
|
});
|
|
910
|
-
},
|
|
911
|
-
const { client: r } = e.createPromiseClient(
|
|
910
|
+
}, uo = async (t, e) => {
|
|
911
|
+
const { client: r } = e.createPromiseClient(te, { method: "item", params: [t] });
|
|
912
912
|
return (await r.item({
|
|
913
913
|
id: t
|
|
914
914
|
})).data;
|
|
915
|
-
},
|
|
916
|
-
const { client: r } = e.createStreamClient(
|
|
915
|
+
}, co = (t, e) => {
|
|
916
|
+
const { client: r } = e.createStreamClient(te), n = kt({ eventId: t.get() || "", feedId: "" });
|
|
917
917
|
return t.subscribe((o = "") => {
|
|
918
918
|
n.set({ eventId: o, feedId: "" });
|
|
919
919
|
}), e.addSubscription(r.subscription, n, { name: "feedSubscription" });
|
|
920
|
-
},
|
|
921
|
-
const { client: r } = e.createStreamClient(
|
|
920
|
+
}, lo = (t, e) => {
|
|
921
|
+
const { client: r } = e.createStreamClient(te);
|
|
922
922
|
return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
|
|
923
|
-
},
|
|
924
|
-
const { client: r } = e.createPromiseClient(
|
|
923
|
+
}, fo = async (t, e) => {
|
|
924
|
+
const { client: r } = e.createPromiseClient(te, { method: "questionByUser", params: [t] });
|
|
925
925
|
return (await r.questionByUser({
|
|
926
926
|
questionId: t
|
|
927
927
|
})).data?.attributes?.question;
|
|
928
928
|
}, ur = (t, e) => {
|
|
929
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
929
|
+
const { client: r, queryKey: n } = e.createPromiseClient(te, { method: "questionByUser", params: [t] });
|
|
930
930
|
return e.nanoquery.createFetcherStore(n, {
|
|
931
931
|
fetcher: async (i, o, s) => (await r.questionByUser({
|
|
932
932
|
questionId: s
|
|
933
933
|
})).data?.attributes?.question,
|
|
934
934
|
dedupeTime: 1e3 * 60 * 5
|
|
935
935
|
});
|
|
936
|
-
},
|
|
936
|
+
}, Vn = async (t, e) => {
|
|
937
937
|
if (!t)
|
|
938
938
|
return;
|
|
939
|
-
const { client: r } = e.createPromiseClient(
|
|
939
|
+
const { client: r } = e.createPromiseClient(te, { method: "getQuestion", params: [t] }), n = await r.getQuestion({
|
|
940
940
|
id: t
|
|
941
941
|
});
|
|
942
942
|
if (!n.data?.attributes)
|
|
943
943
|
return;
|
|
944
944
|
const { options: i, notification: o, ...s } = n.data.attributes, a = i?.options.case === "promotion" ? i?.options.value : void 0;
|
|
945
945
|
return { id: s.id, question: s, promotion: a, notification: o };
|
|
946
|
-
},
|
|
947
|
-
const { client: n, queryKey: i } = r.createPromiseClient(
|
|
946
|
+
}, po = (t, e, r) => {
|
|
947
|
+
const { client: n, queryKey: i } = r.createPromiseClient(te, {
|
|
948
948
|
method: "list",
|
|
949
949
|
params: [t, e]
|
|
950
950
|
});
|
|
@@ -952,15 +952,15 @@ const ro = (t, e, r) => {
|
|
|
952
952
|
fetcher: async (o, s, a, u) => a ? (await n.list({
|
|
953
953
|
eventId: a,
|
|
954
954
|
filter: {
|
|
955
|
-
types: u ===
|
|
956
|
-
statuses: [
|
|
955
|
+
types: u === Ce.ALLOWED ? [] : [_.FACTOID, _.PROMOTION, _.TWEET],
|
|
956
|
+
statuses: [Z.ACTIVE, Z.RESOLVED]
|
|
957
957
|
}
|
|
958
958
|
})).data : [],
|
|
959
959
|
dedupeTime: 0,
|
|
960
960
|
refetchInterval: 0
|
|
961
961
|
});
|
|
962
|
-
},
|
|
963
|
-
const { client: r, queryKey: n } = e.createPromiseClient(
|
|
962
|
+
}, ho = (t, e) => {
|
|
963
|
+
const { client: r, queryKey: n } = e.createPromiseClient(te, {
|
|
964
964
|
method: "list",
|
|
965
965
|
params: [t]
|
|
966
966
|
});
|
|
@@ -971,8 +971,8 @@ const ro = (t, e, r) => {
|
|
|
971
971
|
const u = (await r.list({
|
|
972
972
|
eventId: s,
|
|
973
973
|
filter: {
|
|
974
|
-
types: [
|
|
975
|
-
statuses: [
|
|
974
|
+
types: [_.PROMOTION],
|
|
975
|
+
statuses: [Z.ACTIVE]
|
|
976
976
|
},
|
|
977
977
|
pagination: {
|
|
978
978
|
page: 0,
|
|
@@ -980,19 +980,19 @@ const ro = (t, e, r) => {
|
|
|
980
980
|
}
|
|
981
981
|
})).data?.[0];
|
|
982
982
|
if (u.type === "promotion")
|
|
983
|
-
return
|
|
983
|
+
return Vn(u.id, e);
|
|
984
984
|
},
|
|
985
985
|
dedupeTime: 0,
|
|
986
986
|
refetchInterval: 0
|
|
987
987
|
});
|
|
988
|
-
},
|
|
989
|
-
const n =
|
|
988
|
+
}, yo = (t, e, r) => {
|
|
989
|
+
const n = qr([e, r], () => {
|
|
990
990
|
const a = e.get();
|
|
991
991
|
if (!a)
|
|
992
992
|
return;
|
|
993
993
|
const u = r.get().data?.find((c) => c.id === a?.questionId), l = a?.question?.openedFrom;
|
|
994
994
|
return u ? (u.openedFrom = l, u) : a.question;
|
|
995
|
-
}), i =
|
|
995
|
+
}), i = qr(n, (a) => a && a.type === "question" ? a.id : void 0), o = ur(i, t);
|
|
996
996
|
return { $store: n, $extendedStore: o, updateExtendedQuestion: (a) => {
|
|
997
997
|
const u = o.get().data, l = (c, f) => {
|
|
998
998
|
if (!c || !f)
|
|
@@ -1021,7 +1021,7 @@ var wt;
|
|
|
1021
1021
|
(function(t) {
|
|
1022
1022
|
t.SHOWED = "showed";
|
|
1023
1023
|
})(wt || (wt = {}));
|
|
1024
|
-
class
|
|
1024
|
+
class mo extends We {
|
|
1025
1025
|
constructor() {
|
|
1026
1026
|
super("advertisement");
|
|
1027
1027
|
}
|
|
@@ -1030,7 +1030,7 @@ class yo extends He {
|
|
|
1030
1030
|
};
|
|
1031
1031
|
isViewed = (e) => this.read(wt.SHOWED, e);
|
|
1032
1032
|
}
|
|
1033
|
-
const
|
|
1033
|
+
const go = (t) => {
|
|
1034
1034
|
const e = t.data?.attributes?.question;
|
|
1035
1035
|
if ((t.data?.attributes?.feedItem?.type === "promotion" ? t.data.attributes.feedItem : void 0) === void 0 || !e)
|
|
1036
1036
|
return;
|
|
@@ -1041,42 +1041,52 @@ const mo = (t) => {
|
|
|
1041
1041
|
notification: i,
|
|
1042
1042
|
promotion: s
|
|
1043
1043
|
};
|
|
1044
|
-
},
|
|
1044
|
+
}, dt = (t) => t.startsWith("http://") || t.startsWith("https://") ? new URL(t).toString() : t, bo = ({ gamOptions: t, gamBaseUrl: e }) => {
|
|
1045
1045
|
const r = `${e}?`, n = [];
|
|
1046
1046
|
for (const i in t) {
|
|
1047
1047
|
const o = i.replace(/([a-zA-Z])(?=[A-Z])/g, "$1_").toLowerCase(), s = t[i];
|
|
1048
1048
|
if (s)
|
|
1049
1049
|
if (typeof s == "string")
|
|
1050
|
-
n.push(`${o}=${
|
|
1050
|
+
n.push(`${o}=${dt(s)}`);
|
|
1051
1051
|
else if (Array.isArray(s))
|
|
1052
|
-
n.push(`${o}=${s.map(
|
|
1052
|
+
n.push(`${o}=${s.map(dt).join(",")}`);
|
|
1053
1053
|
else {
|
|
1054
|
-
const a = Object.entries(s).map(([u, l]) => Array.isArray(l) ? `${u}=${l.map(
|
|
1054
|
+
const a = Object.entries(s).map(([u, l]) => Array.isArray(l) ? `${u}=${l.map(dt).join(",")}` : typeof l == "string" ? `${u}=${dt(l)}` : `${u}=${l}`).join("&").replaceAll("=", "%3D").replaceAll("&", "%26").replaceAll(",", "%2C");
|
|
1055
1055
|
n.push(`${o}=${a}`);
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
1058
|
return r + n.join("&");
|
|
1059
|
-
},
|
|
1059
|
+
}, $e = (t) => (t?.promotion?.type === W.INGAME_IAB11_LBAR || t?.promotion?.type === W.INGAME_IAB21_LBAR) && !!t.promotion.additionalBanner?.imageUrl, vo = (t, e, r) => {
|
|
1060
1060
|
let n = !1;
|
|
1061
|
-
const i = r.transport, o = Se("advertisement"), s = new
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1061
|
+
const i = r.transport, o = Se("advertisement"), s = new mo(), a = J({}), u = ho(t, i), l = (b) => {
|
|
1062
|
+
if (b?.fromNotification) {
|
|
1063
|
+
a.setKey("hasNotification", !1);
|
|
1064
|
+
const g = a.get(), S = g.data?.question.id, F = g.data?.promotion?.type;
|
|
1065
|
+
S && (M.emit("advertisement", {
|
|
1066
|
+
action: "opened",
|
|
1067
|
+
payload: {
|
|
1068
|
+
id: S,
|
|
1069
|
+
type: F,
|
|
1070
|
+
hasBanner: $e(g.data),
|
|
1071
|
+
openedFrom: "notification"
|
|
1072
|
+
}
|
|
1073
|
+
}), M.emit("advertisement", {
|
|
1074
|
+
action: "notification-opened",
|
|
1075
|
+
payload: {
|
|
1076
|
+
id: S,
|
|
1077
|
+
type: F,
|
|
1078
|
+
hasBanner: $e(g.data)
|
|
1079
|
+
}
|
|
1080
|
+
}));
|
|
1081
|
+
}
|
|
1072
1082
|
}, c = () => {
|
|
1073
|
-
const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type,
|
|
1074
|
-
g && !
|
|
1075
|
-
action: "
|
|
1083
|
+
const b = a.get(), g = b.data?.question.id, S = b.data?.promotion?.type, F = a.get()?.isOpened;
|
|
1084
|
+
g && !F && (o.debug({ id: g }, "markAsViewed: %o"), s.setShowed(g), a.setKey("isOpened", !0), M.emit("advertisement", {
|
|
1085
|
+
action: "viewed",
|
|
1076
1086
|
payload: {
|
|
1077
1087
|
id: g,
|
|
1078
1088
|
type: S,
|
|
1079
|
-
hasBanner:
|
|
1089
|
+
hasBanner: $e(b.data)
|
|
1080
1090
|
}
|
|
1081
1091
|
}));
|
|
1082
1092
|
}, f = (b, g) => {
|
|
@@ -1084,17 +1094,17 @@ const mo = (t) => {
|
|
|
1084
1094
|
loading: !1,
|
|
1085
1095
|
error: void 0,
|
|
1086
1096
|
data: g,
|
|
1087
|
-
hasNotification: g?.notification?.enabled ===
|
|
1097
|
+
hasNotification: g?.notification?.enabled === $r.NOTIFICATION_ENABLED,
|
|
1088
1098
|
close: () => p(g.question.id),
|
|
1089
1099
|
togglePause: (S) => v(g.question.id, S),
|
|
1090
1100
|
isViewed: !!s.isViewed(g.question.id)
|
|
1091
|
-
}) : (a.setKey("loading", !0),
|
|
1101
|
+
}) : (a.setKey("loading", !0), Vn(b, i).then((S) => a.set({
|
|
1092
1102
|
loading: !1,
|
|
1093
1103
|
error: void 0,
|
|
1094
1104
|
data: S,
|
|
1095
|
-
hasNotification: S?.notification?.enabled ===
|
|
1105
|
+
hasNotification: S?.notification?.enabled === $r.NOTIFICATION_ENABLED,
|
|
1096
1106
|
close: () => p(S?.question.id),
|
|
1097
|
-
togglePause: (
|
|
1107
|
+
togglePause: (F) => v(S?.question.id, F),
|
|
1098
1108
|
isViewed: S && !!s.isViewed(S.question.id)
|
|
1099
1109
|
})).catch((S) => a.set({
|
|
1100
1110
|
loading: !1,
|
|
@@ -1105,26 +1115,35 @@ const mo = (t) => {
|
|
|
1105
1115
|
a.subscribe((b, g) => {
|
|
1106
1116
|
if (!(b.data?.id === g?.data?.id && b.isPaused !== g?.isPaused)) {
|
|
1107
1117
|
if (b.data?.promotion?.type === W.EXTERNAL_AD && !b?.externalAd && b.data.promotion.adCampaigns?.gamOptions && b.data.promotion.adCampaigns?.gamBaseUrl) {
|
|
1108
|
-
const S =
|
|
1118
|
+
const S = bo(b.data.promotion.adCampaigns);
|
|
1109
1119
|
a.setKey("externalAd", { type: "gam", url: S });
|
|
1110
1120
|
}
|
|
1111
|
-
b.data?.promotion && !b.isOpened &&
|
|
1121
|
+
b.data?.promotion && !b.isOpened && (M.emit("advertisement", {
|
|
1112
1122
|
action: "received",
|
|
1113
1123
|
payload: {
|
|
1114
1124
|
id: b.data.question.id,
|
|
1115
1125
|
type: b.data.promotion.type,
|
|
1116
1126
|
hasNotification: !!b.hasNotification,
|
|
1117
|
-
hasBanner:
|
|
1127
|
+
hasBanner: $e(b.data),
|
|
1118
1128
|
isViewed: !!s.isViewed(b.data.question.id)
|
|
1119
1129
|
},
|
|
1120
1130
|
skipAnalytics: b.data.question.id === g?.data?.question.id
|
|
1121
|
-
}),
|
|
1131
|
+
}), b.data.question.id !== g?.data?.question.id && !s.isViewed(b.data.question.id) && M.emit("advertisement", {
|
|
1132
|
+
action: "notification-received",
|
|
1133
|
+
payload: {
|
|
1134
|
+
id: b.data.question.id,
|
|
1135
|
+
type: b.data.promotion.type,
|
|
1136
|
+
hasNotification: !0,
|
|
1137
|
+
hasBanner: $e(b.data),
|
|
1138
|
+
isViewed: !1
|
|
1139
|
+
}
|
|
1140
|
+
})), !b?.data && g?.data && M.emit("advertisement", {
|
|
1122
1141
|
action: "closed",
|
|
1123
1142
|
payload: {
|
|
1124
1143
|
id: g.data.question.id,
|
|
1125
1144
|
type: g.data.promotion?.type,
|
|
1126
1145
|
hasNotification: !!g.hasNotification,
|
|
1127
|
-
hasBanner:
|
|
1146
|
+
hasBanner: $e(g.data),
|
|
1128
1147
|
isViewed: !!s.isViewed(g.data.question.id)
|
|
1129
1148
|
}
|
|
1130
1149
|
});
|
|
@@ -1139,13 +1158,13 @@ const mo = (t) => {
|
|
|
1139
1158
|
n || (n = !0, u.subscribe((b, g) => {
|
|
1140
1159
|
b.data && (!g?.data || b.data.id !== g.data.id) && f(b.data.question.id, b.data);
|
|
1141
1160
|
}), e.addListener("promotion", (b) => {
|
|
1142
|
-
const g =
|
|
1161
|
+
const g = go(b);
|
|
1143
1162
|
if (g) {
|
|
1144
|
-
if (g.question.status ===
|
|
1163
|
+
if (g.question.status === Z.RESOLVED) {
|
|
1145
1164
|
p(g.question.id), o.debug({ promotion: g }, "resolved: %o");
|
|
1146
1165
|
return;
|
|
1147
1166
|
}
|
|
1148
|
-
if (g.question.status ===
|
|
1167
|
+
if (g.question.status === Z.ACTIVE) {
|
|
1149
1168
|
o.debug({ promotion: g }, "active: %o"), f(g.question.id, g);
|
|
1150
1169
|
return;
|
|
1151
1170
|
}
|
|
@@ -1154,11 +1173,11 @@ const mo = (t) => {
|
|
|
1154
1173
|
}));
|
|
1155
1174
|
}, hide: p, show: f, open: l, markAsViewed: c, $store: a };
|
|
1156
1175
|
};
|
|
1157
|
-
var
|
|
1176
|
+
var Ce;
|
|
1158
1177
|
(function(t) {
|
|
1159
1178
|
t.ALLOWED = "allowed", t.DISALLOWED = "disallowed";
|
|
1160
|
-
})(
|
|
1161
|
-
class
|
|
1179
|
+
})(Ce || (Ce = {}));
|
|
1180
|
+
class So {
|
|
1162
1181
|
/** sl event id */
|
|
1163
1182
|
slStreamId;
|
|
1164
1183
|
/** organization id */
|
|
@@ -1191,14 +1210,14 @@ class vo {
|
|
|
1191
1210
|
transport;
|
|
1192
1211
|
cancels = /* @__PURE__ */ new Set();
|
|
1193
1212
|
constructor(e) {
|
|
1194
|
-
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new
|
|
1195
|
-
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription =
|
|
1213
|
+
this.transport = e.transport, this.log = Se("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ee(q(void 0), "moderationId").getStore(), this.interactiveAllowed = new ee(q(Ce.DISALLOWED), "interactiveAllowed").getStore(), this.openedQuestionId = new ee(q(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new le(so(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new le(po(this.slStreamId, this.interactiveAllowed, e.transport), "gamification:feedList"), this.activeQuestionId = ao(this.slStreamId, e.transport), this.openedQuestion = yo(e.transport, this.openedQuestionId, this.feedList.getStore()), this.cancels.add(this.openedQuestionId.listen((r) => {
|
|
1214
|
+
this.log.debug({ item: r }, "received question"), r?.questionId ? (this.questionSubscription = lo(r.questionId, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (n) => {
|
|
1196
1215
|
this.openedQuestion.updateExtendedQuestion(n.data?.attributes?.question);
|
|
1197
1216
|
}), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
|
|
1198
|
-
})), this.feedSubscription =
|
|
1217
|
+
})), this.feedSubscription = co(this.slStreamId, e.transport), this.cancels.add(this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
|
|
1199
1218
|
const n = this.activeQuestionId.get().data?.question?.id, i = r.data?.attributes?.question;
|
|
1200
|
-
if (!(!i || i.type ===
|
|
1201
|
-
if (i.status ===
|
|
1219
|
+
if (!(!i || i.type === _.PROMOTION)) {
|
|
1220
|
+
if (i.status === Z.RESOLVED) {
|
|
1202
1221
|
n === i.id && this.activeQuestionId.mutate(void 0);
|
|
1203
1222
|
return;
|
|
1204
1223
|
}
|
|
@@ -1238,7 +1257,7 @@ class vo {
|
|
|
1238
1257
|
this.activeQuestionId.off();
|
|
1239
1258
|
for (const r of this.cancels)
|
|
1240
1259
|
r(), this.cancels.delete(r);
|
|
1241
|
-
}), this.advertisement =
|
|
1260
|
+
}), this.advertisement = vo(this.slStreamId, this.feedSubscription, e);
|
|
1242
1261
|
}
|
|
1243
1262
|
/**
|
|
1244
1263
|
* Get id for notifications and link with current session
|
|
@@ -1268,7 +1287,7 @@ class vo {
|
|
|
1268
1287
|
this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
|
|
1269
1288
|
};
|
|
1270
1289
|
}
|
|
1271
|
-
class
|
|
1290
|
+
class wo {
|
|
1272
1291
|
notificationsList;
|
|
1273
1292
|
store;
|
|
1274
1293
|
timeouts;
|
|
@@ -1277,7 +1296,7 @@ class So {
|
|
|
1277
1296
|
options;
|
|
1278
1297
|
logger;
|
|
1279
1298
|
constructor(e) {
|
|
1280
|
-
this.options = e, this.logger = Se("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList =
|
|
1299
|
+
this.options = e, this.logger = Se("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notificationsList = q(/* @__PURE__ */ new Map());
|
|
1281
1300
|
}
|
|
1282
1301
|
addToQueue = (e) => {
|
|
1283
1302
|
if (this.store.has(e.id)) {
|
|
@@ -1321,7 +1340,7 @@ class So {
|
|
|
1321
1340
|
this.logger.debug({ notificationId: e }, "active queue tick skipped, notification not exist");
|
|
1322
1341
|
return;
|
|
1323
1342
|
}
|
|
1324
|
-
|
|
1343
|
+
M.emit("notification", {
|
|
1325
1344
|
action: "received",
|
|
1326
1345
|
payload: {
|
|
1327
1346
|
questionId: r.data.questionId,
|
|
@@ -1346,7 +1365,7 @@ class So {
|
|
|
1346
1365
|
const s = new Map(this.notificationsList.get());
|
|
1347
1366
|
s.delete(e), this.notificationsList.set(s);
|
|
1348
1367
|
const a = this.timeouts.get(e);
|
|
1349
|
-
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding &&
|
|
1368
|
+
a !== void 0 && (clearTimeout(a), this.timeouts.delete(e)), this.logger.debug({ notificationId: e }, "notification hidden"), i.hiding && M.emit("notification", {
|
|
1350
1369
|
action: "closed",
|
|
1351
1370
|
payload: {
|
|
1352
1371
|
questionId: i.data.questionId,
|
|
@@ -1366,7 +1385,7 @@ var At;
|
|
|
1366
1385
|
(function(t) {
|
|
1367
1386
|
t.OPENED = "opened";
|
|
1368
1387
|
})(At || (At = {}));
|
|
1369
|
-
class
|
|
1388
|
+
class Ao extends We {
|
|
1370
1389
|
constructor() {
|
|
1371
1390
|
super("notification");
|
|
1372
1391
|
}
|
|
@@ -1382,11 +1401,11 @@ var Ee;
|
|
|
1382
1401
|
(function(t) {
|
|
1383
1402
|
t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
|
|
1384
1403
|
})(Ee || (Ee = {}));
|
|
1385
|
-
class
|
|
1404
|
+
class Eo {
|
|
1386
1405
|
queue;
|
|
1387
1406
|
storage;
|
|
1388
1407
|
constructor(e = {}) {
|
|
1389
|
-
this.storage = new
|
|
1408
|
+
this.storage = new Ao(), this.queue = new wo({ concurrency: 1, animationDelay: 1600, ...e });
|
|
1390
1409
|
}
|
|
1391
1410
|
isViewed = (e) => this.storage.isOpened(e);
|
|
1392
1411
|
add = (e) => {
|
|
@@ -1394,7 +1413,7 @@ class Ao {
|
|
|
1394
1413
|
if (e.data && e.emitEvent) {
|
|
1395
1414
|
const n = e.action;
|
|
1396
1415
|
e.action = (...i) => {
|
|
1397
|
-
n && n(...i),
|
|
1416
|
+
n && n(...i), M.emit("notification", {
|
|
1398
1417
|
action: "opened",
|
|
1399
1418
|
payload: {
|
|
1400
1419
|
questionId: e.data.questionId,
|
|
@@ -1423,31 +1442,31 @@ class Ao {
|
|
|
1423
1442
|
this.storage.setOpened(e);
|
|
1424
1443
|
};
|
|
1425
1444
|
}
|
|
1426
|
-
const
|
|
1427
|
-
t.notifications = new
|
|
1445
|
+
const Io = (t, e, r) => {
|
|
1446
|
+
t.notifications = new Eo(void 0), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), t.sdk.getActiveNotification = () => t.notifications.getActiveNotification(), t.sdk.onMount({ name: "notifications" }, () => () => {
|
|
1428
1447
|
t.notifications.queue.drain();
|
|
1429
1448
|
}), r();
|
|
1430
1449
|
};
|
|
1431
|
-
var
|
|
1450
|
+
var nt;
|
|
1432
1451
|
(function(t) {
|
|
1433
1452
|
t.UNKNOWN = "unknown", t.ALREADY_VOTED = "already_voted";
|
|
1434
|
-
})(
|
|
1435
|
-
const
|
|
1436
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1453
|
+
})(nt || (nt = {}));
|
|
1454
|
+
const To = async (t, e) => {
|
|
1455
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(te, { method: "submitAnswer" }), i = n({ retryAttempts: 0 });
|
|
1437
1456
|
try {
|
|
1438
1457
|
return await r.submitAnswer({ data: e }, { contextValues: i });
|
|
1439
1458
|
} catch (o) {
|
|
1440
|
-
throw
|
|
1459
|
+
throw rt.from(o)?.code === se.AlreadyExists ? new Error(nt.ALREADY_VOTED) : new Error(nt.UNKNOWN);
|
|
1441
1460
|
}
|
|
1442
|
-
},
|
|
1443
|
-
const { client: r, createRequestOptions: n } = t.createPromiseClient(
|
|
1461
|
+
}, Oo = (t, e) => {
|
|
1462
|
+
const { client: r, createRequestOptions: n } = t.createPromiseClient(te, { method: "submitInplay" }), i = n({ retryAttempts: 0 });
|
|
1444
1463
|
return r.submitInplay({ data: { eventId: +e } }, { contextValues: i });
|
|
1445
1464
|
};
|
|
1446
1465
|
var Ue;
|
|
1447
1466
|
(function(t) {
|
|
1448
1467
|
t.ONBOARDING = "onboarding", t.ONBOARDING_IO = "onboarding_io";
|
|
1449
1468
|
})(Ue || (Ue = {}));
|
|
1450
|
-
class
|
|
1469
|
+
class _o extends We {
|
|
1451
1470
|
constructor() {
|
|
1452
1471
|
super("gamification-session", window.sessionStorage);
|
|
1453
1472
|
}
|
|
@@ -1456,10 +1475,10 @@ class Oo extends He {
|
|
|
1456
1475
|
};
|
|
1457
1476
|
readValue = (e) => this.read(...e);
|
|
1458
1477
|
}
|
|
1459
|
-
class
|
|
1478
|
+
class $n extends We {
|
|
1460
1479
|
sessionStorage;
|
|
1461
1480
|
constructor() {
|
|
1462
|
-
super("gamification"), this.sessionStorage = new
|
|
1481
|
+
super("gamification"), this.sessionStorage = new _o();
|
|
1463
1482
|
}
|
|
1464
1483
|
saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: n }, i) => {
|
|
1465
1484
|
this.write(Ue.ONBOARDING, n, e, r, i);
|
|
@@ -1470,17 +1489,17 @@ class Vn extends He {
|
|
|
1470
1489
|
};
|
|
1471
1490
|
getOnboardingInstantOpen = ({ userId: e, eventId: r, organizationId: n }) => this.sessionStorage.readValue([Ue.ONBOARDING_IO, n, e, r]);
|
|
1472
1491
|
}
|
|
1473
|
-
const
|
|
1492
|
+
const Lo = {
|
|
1474
1493
|
pageSize: 10
|
|
1475
1494
|
}, Co = (t, e, r, n, i) => {
|
|
1476
1495
|
let o = 0;
|
|
1477
|
-
const s =
|
|
1496
|
+
const s = q({ pageSize: Lo.pageSize, page: 0 }), a = J({
|
|
1478
1497
|
data: [],
|
|
1479
1498
|
key: Date.now(),
|
|
1480
1499
|
hasMore: !0,
|
|
1481
1500
|
loading: void 0,
|
|
1482
1501
|
error: void 0
|
|
1483
|
-
}), u =
|
|
1502
|
+
}), u = io(t), l = async () => {
|
|
1484
1503
|
const p = e.get(), v = n.getStore().get().data?.map((w) => w.slId) || [];
|
|
1485
1504
|
if (p && v?.length) {
|
|
1486
1505
|
const w = r.get();
|
|
@@ -1490,9 +1509,9 @@ const _o = {
|
|
|
1490
1509
|
usersIds: v
|
|
1491
1510
|
});
|
|
1492
1511
|
a.set({
|
|
1493
|
-
data: g.data.map((S,
|
|
1512
|
+
data: g.data.map((S, F) => ({
|
|
1494
1513
|
...S.attributes,
|
|
1495
|
-
friendsRank:
|
|
1514
|
+
friendsRank: F + 1
|
|
1496
1515
|
})),
|
|
1497
1516
|
hasMore: !1,
|
|
1498
1517
|
key: Date.now(),
|
|
@@ -1505,14 +1524,14 @@ const _o = {
|
|
|
1505
1524
|
const v = s.get(), w = p || v.page + 1;
|
|
1506
1525
|
w <= o && s.set({ ...v, page: w });
|
|
1507
1526
|
};
|
|
1508
|
-
return
|
|
1527
|
+
return Sr(a, () => {
|
|
1509
1528
|
const p = e.listen(l), v = n.listen(l);
|
|
1510
1529
|
return () => {
|
|
1511
1530
|
p(), v();
|
|
1512
1531
|
};
|
|
1513
1532
|
}), { $store: a, fetchMore: f, invalidate: c };
|
|
1514
1533
|
};
|
|
1515
|
-
class
|
|
1534
|
+
class ko extends We {
|
|
1516
1535
|
get = this.read;
|
|
1517
1536
|
set = this.write;
|
|
1518
1537
|
del = this.remove;
|
|
@@ -1520,32 +1539,32 @@ class Lo extends He {
|
|
|
1520
1539
|
super("deep-link-context", window.sessionStorage);
|
|
1521
1540
|
}
|
|
1522
1541
|
}
|
|
1523
|
-
const
|
|
1542
|
+
const Yr = "sldl", Nt = "sldl_uid", Bn = "sldl_eid", Mn = "sldl_e_eid", Po = /* @__PURE__ */ new Set([Nt, Bn, Mn]), Jr = (t) => {
|
|
1524
1543
|
const e = {}, r = {};
|
|
1525
1544
|
for (const [n, i] of t)
|
|
1526
|
-
|
|
1545
|
+
Po.has(n) ? e[n] = i : r[n] = i;
|
|
1527
1546
|
return { result: e, remain: r };
|
|
1528
|
-
},
|
|
1529
|
-
if (t && t.includes(
|
|
1547
|
+
}, No = ({ hash: t, search: e }) => {
|
|
1548
|
+
if (t && t.includes(Yr)) {
|
|
1530
1549
|
const r = new URLSearchParams(t.substr(1));
|
|
1531
|
-
return { hash:
|
|
1550
|
+
return { hash: Jr(r) };
|
|
1532
1551
|
}
|
|
1533
|
-
if (e && e.includes(
|
|
1552
|
+
if (e && e.includes(Yr)) {
|
|
1534
1553
|
const r = new URLSearchParams(e);
|
|
1535
|
-
return { search:
|
|
1554
|
+
return { search: Jr(r) };
|
|
1536
1555
|
}
|
|
1537
1556
|
return null;
|
|
1538
|
-
},
|
|
1557
|
+
}, Xr = Se("deep_link"), ce = {
|
|
1539
1558
|
debug: (...t) => {
|
|
1540
|
-
|
|
1559
|
+
Xr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1541
1560
|
},
|
|
1542
1561
|
trace: (...t) => {
|
|
1543
|
-
|
|
1562
|
+
Xr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1544
1563
|
}
|
|
1545
|
-
},
|
|
1564
|
+
}, Fo = (t, e) => {
|
|
1546
1565
|
const { hash: r, search: n } = window.location;
|
|
1547
1566
|
if (ce.debug({ hash: r, search: n }, "get deep link data from"), r || n) {
|
|
1548
|
-
const i =
|
|
1567
|
+
const i = No({ hash: r, search: n });
|
|
1549
1568
|
if (ce.debug(i, "parse deep link result"), i) {
|
|
1550
1569
|
const { hash: o, search: s } = i, { result: a, remain: u } = o || s;
|
|
1551
1570
|
if (Object.keys(a).length !== 0) {
|
|
@@ -1564,8 +1583,8 @@ const Wr = "sldl", Nt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", ko = /*
|
|
|
1564
1583
|
}
|
|
1565
1584
|
}
|
|
1566
1585
|
t.setValue("parsed", !0);
|
|
1567
|
-
},
|
|
1568
|
-
const n = new
|
|
1586
|
+
}, Do = (t, e, r) => {
|
|
1587
|
+
const n = new ko(), i = n.get("sl-deep-link-store");
|
|
1569
1588
|
let o = {};
|
|
1570
1589
|
if (i)
|
|
1571
1590
|
try {
|
|
@@ -1574,7 +1593,7 @@ const Wr = "sldl", Nt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", ko = /*
|
|
|
1574
1593
|
ce.debug(a);
|
|
1575
1594
|
}
|
|
1576
1595
|
t.deepLink = {
|
|
1577
|
-
$store: new
|
|
1596
|
+
$store: new Le(J(o), "deep-link-context"),
|
|
1578
1597
|
getDeepLinkData: () => {
|
|
1579
1598
|
const { data: a, used: u } = t.deepLink.$store.getValues();
|
|
1580
1599
|
return { data: a, used: u };
|
|
@@ -1603,15 +1622,15 @@ const Wr = "sldl", Nt = "sldl_uid", $n = "sldl_eid", Mn = "sldl_e_eid", ko = /*
|
|
|
1603
1622
|
console.error(l);
|
|
1604
1623
|
}
|
|
1605
1624
|
};
|
|
1606
|
-
|
|
1607
|
-
},
|
|
1608
|
-
class
|
|
1625
|
+
Fo(t.deepLink.$store, s), r();
|
|
1626
|
+
}, Ro = Se("bypass");
|
|
1627
|
+
class Vo extends Di {
|
|
1609
1628
|
$coreStore;
|
|
1610
1629
|
deepLink;
|
|
1611
1630
|
transport;
|
|
1612
1631
|
bypassLogin;
|
|
1613
1632
|
constructor(e, r, n) {
|
|
1614
|
-
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin =
|
|
1633
|
+
super(), this.$coreStore = e, this.deepLink = n, this.transport = r, this.bypassLogin = Hi(this.transport), this.connect();
|
|
1615
1634
|
}
|
|
1616
1635
|
me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
|
|
1617
1636
|
/**
|
|
@@ -1623,7 +1642,7 @@ class Ro extends Fi {
|
|
|
1623
1642
|
login = async (e, r) => {
|
|
1624
1643
|
this.$coreStore.getValues().userKey.setValue(r);
|
|
1625
1644
|
const { used: n, data: i } = this.deepLink.getDeepLinkData(), o = n ? "" : i?.[Nt];
|
|
1626
|
-
|
|
1645
|
+
Ro.debug({ inviterKey: o }, "login with inviterKey");
|
|
1627
1646
|
const s = await this.bypassLogin({
|
|
1628
1647
|
schema: e,
|
|
1629
1648
|
userKey: r,
|
|
@@ -1692,27 +1711,27 @@ class Ro extends Fi {
|
|
|
1692
1711
|
});
|
|
1693
1712
|
};
|
|
1694
1713
|
}
|
|
1695
|
-
const
|
|
1696
|
-
t.auth = new
|
|
1714
|
+
const Xe = new je(), $o = (t, e, r) => {
|
|
1715
|
+
t.auth = new Vo(t.store, t.transport, t.deepLink), t.stores.status.listen((n) => {
|
|
1697
1716
|
n === me.READY && t.auth.reLogin();
|
|
1698
1717
|
}), t.sdk.userId = t.stores.user.getAtomStore, t.sdk.authorizationBypass = async (n, i) => {
|
|
1699
|
-
if (!(
|
|
1718
|
+
if (!(Xe.getSchema() === n && Xe.getExternalToken() === i && t.transport.getHeader("authorization")))
|
|
1700
1719
|
try {
|
|
1701
|
-
await t.auth.login(n, i),
|
|
1720
|
+
await t.auth.login(n, i), Xe.setSchema(n), Xe.setExternalToken(i);
|
|
1702
1721
|
} catch {
|
|
1703
1722
|
t.sdk.logout();
|
|
1704
1723
|
}
|
|
1705
1724
|
}, t.sdk.logout = () => {
|
|
1706
|
-
t.auth.logout(),
|
|
1725
|
+
t.auth.logout(), Xe.clear();
|
|
1707
1726
|
}, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
|
|
1708
|
-
},
|
|
1727
|
+
}, Zr = Se("video_player"), ft = {
|
|
1709
1728
|
debug: (...t) => {
|
|
1710
|
-
|
|
1729
|
+
Zr.debug(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1711
1730
|
},
|
|
1712
1731
|
trace: (...t) => {
|
|
1713
|
-
|
|
1732
|
+
Zr.trace(...t), localStorage.getItem("SL_DEBUG") && console.log(...t);
|
|
1714
1733
|
}
|
|
1715
|
-
},
|
|
1734
|
+
}, Bo = (t, e, r) => {
|
|
1716
1735
|
t.videoPlayer = {
|
|
1717
1736
|
controllers: /* @__PURE__ */ new Set()
|
|
1718
1737
|
}, t.sdk.addVideoPlayerController = (n) => {
|
|
@@ -1731,13 +1750,13 @@ const Je = new je(), Vo = (t, e, r) => {
|
|
|
1731
1750
|
}
|
|
1732
1751
|
}, r();
|
|
1733
1752
|
}, Mo = {
|
|
1734
|
-
[
|
|
1735
|
-
[
|
|
1736
|
-
[
|
|
1737
|
-
[
|
|
1738
|
-
[
|
|
1739
|
-
},
|
|
1740
|
-
t.sdk.uiState =
|
|
1753
|
+
[_.FACTOID]: "insight",
|
|
1754
|
+
[_.POLL]: "poll",
|
|
1755
|
+
[_.TRIVIA]: "trivia",
|
|
1756
|
+
[_.PREDICTION]: "prediction",
|
|
1757
|
+
[_.TWEET]: "tweet"
|
|
1758
|
+
}, qo = (t, e, r) => {
|
|
1759
|
+
t.sdk.uiState = J({}), t.ui = {
|
|
1741
1760
|
enableAppNotification: function() {
|
|
1742
1761
|
t.sdk.uiState.setKey("appNotification", !0);
|
|
1743
1762
|
},
|
|
@@ -1832,7 +1851,7 @@ const Je = new je(), Vo = (t, e, r) => {
|
|
|
1832
1851
|
break;
|
|
1833
1852
|
}
|
|
1834
1853
|
}
|
|
1835
|
-
}, o =
|
|
1854
|
+
}, o = M.listen(i), s = t.activeFeature.subscribe((a) => {
|
|
1836
1855
|
a ? t.ui.enableApp() : t.ui.disableApp();
|
|
1837
1856
|
});
|
|
1838
1857
|
return () => {
|
|
@@ -1841,7 +1860,7 @@ const Je = new je(), Vo = (t, e, r) => {
|
|
|
1841
1860
|
}), r();
|
|
1842
1861
|
}, jo = (t, e, r) => {
|
|
1843
1862
|
const n = { onMountedFired: !1 }, i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1844
|
-
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options =
|
|
1863
|
+
t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.options = J(e), t.sdk.withAuth = !1, t.sdk.onMount = ({ name: s, clear: a }, u) => {
|
|
1845
1864
|
if (i.has(s)) {
|
|
1846
1865
|
const l = o.get(s);
|
|
1847
1866
|
l && l(), i.delete(s), o.delete(s);
|
|
@@ -1867,7 +1886,7 @@ const Je = new je(), Vo = (t, e, r) => {
|
|
|
1867
1886
|
t.stores.providerStreamId.setValue(s);
|
|
1868
1887
|
}, r();
|
|
1869
1888
|
}, Uo = (t, e) => {
|
|
1870
|
-
const { client: r, queryKey: n } = t.createPromiseClient(
|
|
1889
|
+
const { client: r, queryKey: n } = t.createPromiseClient(it, {
|
|
1871
1890
|
method: "generateDeepLink",
|
|
1872
1891
|
params: e
|
|
1873
1892
|
});
|
|
@@ -1887,29 +1906,29 @@ const Je = new je(), Vo = (t, e, r) => {
|
|
|
1887
1906
|
// 24 hours
|
|
1888
1907
|
refetchInterval: 0
|
|
1889
1908
|
});
|
|
1890
|
-
},
|
|
1891
|
-
const { client: n } = t.createPromiseClient(
|
|
1909
|
+
}, xo = (t, { web: e, mobile: r }) => {
|
|
1910
|
+
const { client: n } = t.createPromiseClient(Ti, { method: "generate" });
|
|
1892
1911
|
return n.generate({ web: e, mobile: r });
|
|
1893
|
-
},
|
|
1912
|
+
}, en = (t, e) => {
|
|
1894
1913
|
const r = new URLSearchParams(t);
|
|
1895
1914
|
for (const [n, i] of Object.entries(e))
|
|
1896
1915
|
r.append(n, i);
|
|
1897
1916
|
return r.toString();
|
|
1898
|
-
},
|
|
1899
|
-
const i =
|
|
1900
|
-
return
|
|
1917
|
+
}, Qo = (t, e, r, n) => {
|
|
1918
|
+
const i = J({});
|
|
1919
|
+
return Sr(i, () => Uo(t, [e, r]).subscribe(async ({ data: a, loading: u }) => {
|
|
1901
1920
|
const l = a === void 0 && u === !1 ? "https://streamlayer.io" : a?.url, c = n.get() || "", f = e.get() || "", p = r.get() || "", v = {
|
|
1902
1921
|
[Nt]: c,
|
|
1903
|
-
[
|
|
1922
|
+
[Bn]: f,
|
|
1904
1923
|
[Mn]: p
|
|
1905
1924
|
};
|
|
1906
1925
|
if (!u && l) {
|
|
1907
1926
|
i.setKey("loading", !0);
|
|
1908
1927
|
let w = window.location.search, b = window.location.hash;
|
|
1909
|
-
w && b || b ? w = `?${
|
|
1928
|
+
w && b || b ? w = `?${en(w, v)}` : b = `#${en("", v)}`;
|
|
1910
1929
|
const g = window.location.origin + window.location.pathname + w + b;
|
|
1911
1930
|
try {
|
|
1912
|
-
const S = await
|
|
1931
|
+
const S = await xo(t, { web: g, mobile: l });
|
|
1913
1932
|
i.set({
|
|
1914
1933
|
data: S.data?.link,
|
|
1915
1934
|
loading: !1
|
|
@@ -1925,11 +1944,11 @@ const Je = new je(), Vo = (t, e, r) => {
|
|
|
1925
1944
|
i.setKey("loading", !0);
|
|
1926
1945
|
})), { $store: i, fetch };
|
|
1927
1946
|
};
|
|
1928
|
-
var
|
|
1947
|
+
var B;
|
|
1929
1948
|
(function(t) {
|
|
1930
1949
|
t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
|
|
1931
|
-
})(
|
|
1932
|
-
const
|
|
1950
|
+
})(B || (B = {}));
|
|
1951
|
+
const Go = (t, e, r, n) => {
|
|
1933
1952
|
const { inplayGame: i } = t.featureSettings.get(), o = e.getCurrentSessionId({ prefix: "onboarding" });
|
|
1934
1953
|
i && r.add({
|
|
1935
1954
|
type: Ee.ONBOARDING,
|
|
@@ -1942,7 +1961,7 @@ const Qo = (t, e, r, n) => {
|
|
|
1942
1961
|
autoHideDuration: 1e6,
|
|
1943
1962
|
data: {
|
|
1944
1963
|
questionId: "onboarding",
|
|
1945
|
-
questionType:
|
|
1964
|
+
questionType: _.UNSET,
|
|
1946
1965
|
onboarding: {
|
|
1947
1966
|
...i,
|
|
1948
1967
|
instantOpen: !n.getOnboardingInstantOpen({
|
|
@@ -1962,8 +1981,8 @@ const Qo = (t, e, r, n) => {
|
|
|
1962
1981
|
userId: s,
|
|
1963
1982
|
organizationId: e.organizationId.get() || "",
|
|
1964
1983
|
eventId: e.slStreamId.get() || ""
|
|
1965
|
-
}) ===
|
|
1966
|
-
t.set(
|
|
1984
|
+
}) === B.Completed) {
|
|
1985
|
+
t.set(B.Completed);
|
|
1967
1986
|
for (const p of o)
|
|
1968
1987
|
p();
|
|
1969
1988
|
return;
|
|
@@ -1972,22 +1991,22 @@ const Qo = (t, e, r, n) => {
|
|
|
1972
1991
|
if (u === void 0 || l === void 0)
|
|
1973
1992
|
return;
|
|
1974
1993
|
const c = u?.options?.onboardingEnabled, f = l?.titleCard?.optIn;
|
|
1975
|
-
c ? f ? t.set(
|
|
1994
|
+
c ? f ? t.set(B.Required) : t.set(B.Optional) : (f ? t.set(B.Unavailable) : t.set(B.Disabled), n.close(e.getCurrentSessionId({ prefix: "onboarding" }), { markAsViewed: !1 }));
|
|
1976
1995
|
} catch (s) {
|
|
1977
1996
|
console.error(s);
|
|
1978
1997
|
}
|
|
1979
|
-
},
|
|
1998
|
+
}, Ko = (t, e, r, n) => {
|
|
1980
1999
|
let i = !1;
|
|
1981
|
-
const o = new
|
|
2000
|
+
const o = new $n(), s = q(B.Unset);
|
|
1982
2001
|
s.subscribe((l) => {
|
|
1983
|
-
l !==
|
|
2002
|
+
l !== B.Unset && (l === B.Optional || l === B.Required ? i === !1 && (Go(t, e, n, o), i = !0) : t.onboardingProcessed.set(!0), l === B.Completed && e.activeQuestionId.invalidate(), o.setOnboardingInstantOpen({
|
|
1984
2003
|
userId: e.userId.get() || "",
|
|
1985
2004
|
organizationId: e.organizationId.get() || "",
|
|
1986
2005
|
eventId: e.slStreamId.get() || ""
|
|
1987
2006
|
}));
|
|
1988
2007
|
});
|
|
1989
2008
|
const a = [];
|
|
1990
|
-
return pt(s, e, t, n, o, a), s.get() !==
|
|
2009
|
+
return pt(s, e, t, n, o, a), s.get() !== B.Completed && (a.push(e.userId.listen((l) => {
|
|
1991
2010
|
l && pt(s, e, t, n, o, a);
|
|
1992
2011
|
})), a.push(e.moderation.listen((l) => {
|
|
1993
2012
|
l.data && pt(s, e, t, n, o, a);
|
|
@@ -1996,11 +2015,11 @@ const Qo = (t, e, r, n) => {
|
|
|
1996
2015
|
}))), { $store: s, submitInplay: async () => {
|
|
1997
2016
|
const l = e.slStreamId.get();
|
|
1998
2017
|
if (l) {
|
|
1999
|
-
await
|
|
2018
|
+
await Oo(r, l), s.set(B.Completed), o.saveOnboardingStatus({
|
|
2000
2019
|
organizationId: e.organizationId.get() || "",
|
|
2001
2020
|
userId: e.userId.get() || "",
|
|
2002
2021
|
eventId: l
|
|
2003
|
-
},
|
|
2022
|
+
}, B.Completed), M.emit("poll", {
|
|
2004
2023
|
action: "onboardingPassed",
|
|
2005
2024
|
payload: {}
|
|
2006
2025
|
}), t.openFeature();
|
|
@@ -2008,8 +2027,8 @@ const Qo = (t, e, r, n) => {
|
|
|
2008
2027
|
n.close(c);
|
|
2009
2028
|
}
|
|
2010
2029
|
} };
|
|
2011
|
-
},
|
|
2012
|
-
const i =
|
|
2030
|
+
}, zo = (t, e, r, n) => {
|
|
2031
|
+
const i = J(void 0), o = Rn(n), s = async () => {
|
|
2013
2032
|
const u = t.get(), l = e.get(), c = r.getStore().get().data?.map((v) => v.slId);
|
|
2014
2033
|
if (!c)
|
|
2015
2034
|
return;
|
|
@@ -2022,21 +2041,21 @@ const Qo = (t, e, r, n) => {
|
|
|
2022
2041
|
}, a = () => {
|
|
2023
2042
|
s();
|
|
2024
2043
|
};
|
|
2025
|
-
return
|
|
2044
|
+
return Sr(i, () => {
|
|
2026
2045
|
const u = t.listen(s), l = r.listen(s), c = e.listen(s);
|
|
2027
2046
|
return () => {
|
|
2028
2047
|
u(), l(), c();
|
|
2029
2048
|
};
|
|
2030
2049
|
}), { $store: i, invalidate: a };
|
|
2031
|
-
},
|
|
2032
|
-
const o =
|
|
2050
|
+
}, Ho = async (t, e, r, n, i) => {
|
|
2051
|
+
const o = Rn(i), s = t.get(), a = e.get(), u = r.getStore().get().data?.map((p) => p.slId) || [], l = {
|
|
2033
2052
|
eventId: s,
|
|
2034
2053
|
userId: n,
|
|
2035
2054
|
usersIds: [...u, a]
|
|
2036
2055
|
};
|
|
2037
2056
|
return (await o(l)).data?.attributes?.summary;
|
|
2038
|
-
},
|
|
2039
|
-
class
|
|
2057
|
+
}, Wo = /* @__PURE__ */ new Set([_.POLL, _.PREDICTION, _.TRIVIA]);
|
|
2058
|
+
class Yo extends Nn {
|
|
2040
2059
|
/** user statistics (leaderboard panel) */
|
|
2041
2060
|
userSummary;
|
|
2042
2061
|
/** feed list (pick history) */
|
|
@@ -2074,11 +2093,11 @@ class Wo extends Pn {
|
|
|
2074
2093
|
cancels = /* @__PURE__ */ new Set();
|
|
2075
2094
|
onQuestionActivate;
|
|
2076
2095
|
constructor(e, r, n) {
|
|
2077
|
-
super(e, r), this.background = new
|
|
2096
|
+
super(e, r), this.background = new So(n), this.advertisement = this.background.advertisement, this.onQuestionActivate = n.onQuestionActivate, this.feedSubscription = this.background.feedSubscription, this.activeQuestionId = this.background.activeQuestionId, this.openedQuestionId = this.background.openedQuestionId, this.storage = new $n(), this.feedList = this.background.feedList, this.friends = new le(oo(this.background.userId, n.transport), "gamification:friends"), this.currentUserId = this.background.userId, this.openedUser = q(void 0), this.onboardingProcessed = q(!n.sdk.withAuth), this.leaderboardId = new ee(q(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = Ko(this, this.background, n.transport, n.notifications), this.notifications = n.notifications, this.transport = n.transport, this.closeFeature = (i = !0) => n.sdk.closeFeature(i), this.openFeature = () => n.sdk.openFeature(R.GAMES), this.openedQuestion = this.background.openedQuestion, this.deepLink = Qo(this.transport, this.background.slStreamId, n.stores.providerStreamId.getStore(), this.background.userId), this.userSummary = zo(this.background.slStreamId, this.background.userId, this.friends, this.transport), this.leaderboardList = Co(this.transport, this.background.slStreamId, this.background.userId, this.friends), this.connect(), this.cancels.add(this.userSummary.$store.listen((i, o) => {
|
|
2078
2097
|
o?.summary && i?.summary && this.leaderboardList.invalidate();
|
|
2079
2098
|
})), this.cancels.add(this.onboardingStatus.$store.listen(this.checkInteractiveFlag)), this.cancels.add(this.background.moderation.getStore().listen(this.checkInteractiveFlag)), this.cancels.add(this.settings.subscribe(this.checkInteractiveFlag)), this.cancels.add(this.onboardingStatus.$store.listen((i, o) => {
|
|
2080
|
-
(o === void 0 || i !==
|
|
2081
|
-
})), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled =
|
|
2099
|
+
(o === void 0 || i !== B.Unset) && this.background.activeQuestionId.invalidate();
|
|
2100
|
+
})), this.background.activeQuestionId.listen(this.showInApp), this.friendsTabEnabled = q(!1), this.cancels.add(n.sdk.options.subscribe((i) => {
|
|
2082
2101
|
i.friendsTab === "disabled" ? this.friendsTabEnabled.set(!1) : i.friendsTab === "enabled" && this.friendsTabEnabled.set(!0);
|
|
2083
2102
|
})), this.cancels.add(this.settings.subscribe((i) => {
|
|
2084
2103
|
n.sdk.options.get().friendsTab === "activatedGame" && this.friendsTabEnabled.set(!!i.inplayGame?.titleCard?.optIn);
|
|
@@ -2088,11 +2107,11 @@ class Wo extends Pn {
|
|
|
2088
2107
|
});
|
|
2089
2108
|
}
|
|
2090
2109
|
get isInteractiveAllowed() {
|
|
2091
|
-
return this.background.interactiveAllowed.get() ===
|
|
2110
|
+
return this.background.interactiveAllowed.get() === Ce.ALLOWED;
|
|
2092
2111
|
}
|
|
2093
2112
|
checkInteractiveFlag = () => {
|
|
2094
|
-
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e ===
|
|
2095
|
-
this.background.interactiveAllowed.set(o ?
|
|
2113
|
+
const e = this.onboardingStatus.$store.get(), r = this.background.moderation.getStore().value?.data?.options?.onboardingEnabled, n = this.settings.getValues().inplayGame?.titleCard?.optIn, i = e === B.Completed, o = !r || i || n !== !0;
|
|
2114
|
+
this.background.interactiveAllowed.set(o ? Ce.ALLOWED : Ce.DISALLOWED);
|
|
2096
2115
|
};
|
|
2097
2116
|
connect = () => {
|
|
2098
2117
|
this.onboardingProcessed.subscribe((e) => {
|
|
@@ -2104,7 +2123,7 @@ class Wo extends Pn {
|
|
|
2104
2123
|
if (!r || !n?.attributes)
|
|
2105
2124
|
return;
|
|
2106
2125
|
const { status: i, type: o, id: s, answers: a } = r;
|
|
2107
|
-
if (i ===
|
|
2126
|
+
if (i === Z.RESOLVED && o === _.PREDICTION) {
|
|
2108
2127
|
const u = this.background.getCurrentSessionId({
|
|
2109
2128
|
prefix: `notification-id:${s}`
|
|
2110
2129
|
}), l = [...this.feedList.getValues().data || []], c = l.findIndex((K) => K.id === s), f = l[c];
|
|
@@ -2113,13 +2132,13 @@ class Wo extends Pn {
|
|
|
2113
2132
|
});
|
|
2114
2133
|
await v.get().promise;
|
|
2115
2134
|
let b = v.get().data;
|
|
2116
|
-
b || (b = await
|
|
2135
|
+
b || (b = await fo(s, this.transport)), w(), window.requestAnimationFrame(() => {
|
|
2117
2136
|
v.invalidate();
|
|
2118
2137
|
}), p || (p = b?.answers.find(({ youVoted: K }) => K)?.id);
|
|
2119
|
-
const g = a.find(({ correct: K }) => K), S = p ? a.find(({ id: K }) => K === p) : void 0,
|
|
2138
|
+
const g = a.find(({ correct: K }) => K), S = p ? a.find(({ id: K }) => K === p) : void 0, F = !!S?.correct;
|
|
2120
2139
|
if (f && l[c]?.attributes?.attributes.case === "question") {
|
|
2121
2140
|
try {
|
|
2122
|
-
l[c].attributes.attributes.value.answerId = p, l[c].attributes.attributes.value.openForVoting = !1, p && (l[c].attributes.attributes.value.status =
|
|
2141
|
+
l[c].attributes.attributes.value.answerId = p, l[c].attributes.attributes.value.openForVoting = !1, p && (l[c].attributes.attributes.value.status = F ? lt.WON : lt.LOST);
|
|
2123
2142
|
} catch {
|
|
2124
2143
|
}
|
|
2125
2144
|
this.feedList.getStore().mutate(l);
|
|
@@ -2130,21 +2149,21 @@ class Wo extends Pn {
|
|
|
2130
2149
|
type: Ee.QUESTION_RESOLVED,
|
|
2131
2150
|
action: () => this.openQuestion(r.id, n),
|
|
2132
2151
|
close: () => this.closeQuestion(s),
|
|
2133
|
-
autoHideDuration:
|
|
2152
|
+
autoHideDuration: F ? 15e3 : 12e3,
|
|
2134
2153
|
id: u,
|
|
2135
2154
|
emitEvent: !1,
|
|
2136
2155
|
data: {
|
|
2137
2156
|
questionId: s,
|
|
2138
|
-
questionType:
|
|
2157
|
+
questionType: _.PREDICTION,
|
|
2139
2158
|
question: {
|
|
2140
|
-
title:
|
|
2159
|
+
title: F ? `Congratulations! You answered correctly! You won ${g.points} pts!` : `Better luck next time! Correct: ${g?.text}!`,
|
|
2141
2160
|
votedAnswer: {
|
|
2142
2161
|
title: S?.text,
|
|
2143
2162
|
points: S?.points
|
|
2144
2163
|
},
|
|
2145
2164
|
correctAnswerTitle: g?.text,
|
|
2146
|
-
correct: !!
|
|
2147
|
-
predictionResult: i ===
|
|
2165
|
+
correct: !!F,
|
|
2166
|
+
predictionResult: i === Z.RESOLVED,
|
|
2148
2167
|
questionTitle: r?.subject
|
|
2149
2168
|
}
|
|
2150
2169
|
}
|
|
@@ -2152,7 +2171,7 @@ class Wo extends Pn {
|
|
|
2152
2171
|
}
|
|
2153
2172
|
})), this.cancels.add(this.background.feedSubscription.addListener("feed-subscription-questions-list", (e) => {
|
|
2154
2173
|
const r = [...this.feedList.getStore().value?.data || []], n = e.data?.attributes?.feedItem, i = r.findIndex((o) => o.id === n?.id);
|
|
2155
|
-
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !==
|
|
2174
|
+
if (n?.attributes && n.attributes.attributes.case !== "promotion" && !(n.attributes.status !== Z.ACTIVE && n.attributes.status !== Z.RESOLVED)) {
|
|
2156
2175
|
if (i !== -1)
|
|
2157
2176
|
if (n.attributes.attributes.case === "question" && r[i].attributes?.attributes.case === "question") {
|
|
2158
2177
|
const o = r[i];
|
|
@@ -2198,7 +2217,7 @@ class Wo extends Pn {
|
|
|
2198
2217
|
}
|
|
2199
2218
|
});
|
|
2200
2219
|
}
|
|
2201
|
-
i === -1 && (r.unshift(n),
|
|
2220
|
+
i === -1 && (r.unshift(n), M.emit("poll", {
|
|
2202
2221
|
action: "received",
|
|
2203
2222
|
payload: {
|
|
2204
2223
|
questionId: n.id,
|
|
@@ -2220,7 +2239,7 @@ class Wo extends Pn {
|
|
|
2220
2239
|
return;
|
|
2221
2240
|
const u = a.findIndex((f) => f.id === e), l = a[u], c = l?.attributes?.attributes.case === "question" && l.attributes.attributes.value;
|
|
2222
2241
|
if (c) {
|
|
2223
|
-
|
|
2242
|
+
M.emit("poll", {
|
|
2224
2243
|
action: "voted",
|
|
2225
2244
|
payload: {
|
|
2226
2245
|
questionId: e,
|
|
@@ -2230,9 +2249,9 @@ class Wo extends Pn {
|
|
|
2230
2249
|
const f = n.get().data;
|
|
2231
2250
|
if (i(), f) {
|
|
2232
2251
|
const p = f.answers.find((g) => g.correct === !0), v = f.answers.findIndex((g) => g.id === r), w = f.answers[v], b = f.answers.every(({ percentageDecimal: g }, S) => g === o?.answers[S].percentageDecimal);
|
|
2233
|
-
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = w?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ?
|
|
2252
|
+
a[u].attributes.attributes.value.answerId = r, a[u].attributes.attributes.value.openForVoting = !1, a[u].attributes.attributes.value.text = w?.text || "", p && (a[u].attributes.attributes.value.status = p.id === r ? lt.WON : lt.LOST), this.feedList.getStore().mutate([...a]), f.answers[v].correct = p?.id === r, f.answers[v].youVoted = !0, b && f.answers.forEach((g) => {
|
|
2234
2253
|
g.percentageDecimal = 0;
|
|
2235
|
-
}), p?.id === r && (f.answers[v].pointsEarned = f.status ===
|
|
2254
|
+
}), p?.id === r && (f.answers[v].pointsEarned = f.status === Z.RESOLVED ? 0 : p.points), n.mutate({ ...f });
|
|
2236
2255
|
}
|
|
2237
2256
|
this.submitAnswerTimeout && clearTimeout(this.submitAnswerTimeout), this.submitAnswerTimeout = setTimeout(() => {
|
|
2238
2257
|
this.userSummary.invalidate();
|
|
@@ -2240,9 +2259,9 @@ class Wo extends Pn {
|
|
|
2240
2259
|
}
|
|
2241
2260
|
};
|
|
2242
2261
|
try {
|
|
2243
|
-
await
|
|
2262
|
+
await To(this.transport, { questionId: e, answerId: r }), s();
|
|
2244
2263
|
} catch (a) {
|
|
2245
|
-
if (a.message ===
|
|
2264
|
+
if (a.message === nt.ALREADY_VOTED) {
|
|
2246
2265
|
this.userSummary.invalidate();
|
|
2247
2266
|
const u = n.subscribe(() => {
|
|
2248
2267
|
});
|
|
@@ -2262,7 +2281,7 @@ class Wo extends Pn {
|
|
|
2262
2281
|
animateHiding: !1
|
|
2263
2282
|
});
|
|
2264
2283
|
let n = r?.attributes?.type;
|
|
2265
|
-
return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type),
|
|
2284
|
+
return n || (n = (this.feedList.getStore().value?.data || []).find((o) => o.id === e)?.attributes?.type), M.emit("poll", {
|
|
2266
2285
|
action: "opened",
|
|
2267
2286
|
payload: {
|
|
2268
2287
|
questionId: e,
|
|
@@ -2271,7 +2290,7 @@ class Wo extends Pn {
|
|
|
2271
2290
|
}
|
|
2272
2291
|
}), this.background.openQuestion(e, r);
|
|
2273
2292
|
};
|
|
2274
|
-
getFeedItem = (e) =>
|
|
2293
|
+
getFeedItem = (e) => uo(e, this.transport);
|
|
2275
2294
|
isOpenedQuestion = (e) => !!this.notifications.isViewed(e);
|
|
2276
2295
|
closeQuestion = (e) => (e && this.onQuestionActivate({
|
|
2277
2296
|
stage: "deactivate",
|
|
@@ -2293,7 +2312,7 @@ class Wo extends Pn {
|
|
|
2293
2312
|
}
|
|
2294
2313
|
const n = { ...r };
|
|
2295
2314
|
try {
|
|
2296
|
-
const i = await
|
|
2315
|
+
const i = await Ho(this.background.slStreamId, this.background.userId, this.friends, e, this.transport);
|
|
2297
2316
|
i?.inTop !== void 0 && (this.leaderboardList.$store.setKey("data", this.leaderboardList.$store.get().data?.map((o) => (o.userId === e && (o.inTop = i.inTop), o))), n.inTop = i.inTop);
|
|
2298
2317
|
} catch (i) {
|
|
2299
2318
|
console.error(i);
|
|
@@ -2311,8 +2330,8 @@ class Wo extends Pn {
|
|
|
2311
2330
|
*/
|
|
2312
2331
|
showInApp = (e) => {
|
|
2313
2332
|
const r = this.onboardingStatus.$store.get();
|
|
2314
|
-
if (e && e.data && r && r !==
|
|
2315
|
-
if (
|
|
2333
|
+
if (e && e.data && r && r !== B.Unset && e.data.question?.id !== void 0 && e.data.question?.bypassNotifications?.inAppSilence !== wi.ON && e.data.question.status === Z.ACTIVE && !e.data.question.marketClosed) {
|
|
2334
|
+
if (Wo.has(e.data.question.type))
|
|
2316
2335
|
this.isInteractiveAllowed && e.data.question.notification !== void 0 && this.notifications.add({
|
|
2317
2336
|
type: Ee.QUESTION,
|
|
2318
2337
|
action: () => this.openQuestion(e.data?.question?.id, e.data?.feedItem),
|
|
@@ -2331,7 +2350,7 @@ class Wo extends Pn {
|
|
|
2331
2350
|
}
|
|
2332
2351
|
}
|
|
2333
2352
|
});
|
|
2334
|
-
else if (e.data.question.type ===
|
|
2353
|
+
else if (e.data.question.type === _.FACTOID) {
|
|
2335
2354
|
const n = e.data.question.options?.options.value, i = e.data.question.notification?.title || e.data.question.subject || "", o = e.data.question.notification?.body || n.body, s = {
|
|
2336
2355
|
heading: i,
|
|
2337
2356
|
body: o,
|
|
@@ -2360,7 +2379,7 @@ class Wo extends Pn {
|
|
|
2360
2379
|
insight: s
|
|
2361
2380
|
}
|
|
2362
2381
|
});
|
|
2363
|
-
} else if (e.data.question.type ===
|
|
2382
|
+
} else if (e.data.question.type === _.TWEET && e.data.question.notification !== void 0) {
|
|
2364
2383
|
const n = e.data.question.options?.options.value, i = {
|
|
2365
2384
|
title: e.data.question.notification?.title,
|
|
2366
2385
|
body: e.data.question.notification?.body,
|
|
@@ -2387,27 +2406,27 @@ class Wo extends Pn {
|
|
|
2387
2406
|
}
|
|
2388
2407
|
};
|
|
2389
2408
|
}
|
|
2390
|
-
const
|
|
2391
|
-
[
|
|
2409
|
+
const Jo = {
|
|
2410
|
+
[R.GAMES]: !0
|
|
2392
2411
|
};
|
|
2393
|
-
class
|
|
2412
|
+
class Xo extends Nn {
|
|
2394
2413
|
constructor(e, r) {
|
|
2395
2414
|
super(e, r);
|
|
2396
2415
|
}
|
|
2397
2416
|
}
|
|
2398
|
-
const
|
|
2399
|
-
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new
|
|
2417
|
+
const Zo = (t, e, r) => t.type === R.GAMES ? new Yo(t, e, r) : new Xo(t, e), es = (t, e, r) => {
|
|
2418
|
+
t.features = /* @__PURE__ */ new Map(), t.sdk.featuresList = new ee(q(/* @__PURE__ */ new Set()), "features-list"), t.activeFeature = new ee(q(R.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) => {
|
|
2400
2419
|
t.activeFeature.setValue(n);
|
|
2401
2420
|
}, t.sdk.closeFeature = (n = !1) => {
|
|
2402
2421
|
const i = t.activeFeature.getValue();
|
|
2403
|
-
if (t.activeFeature.setValue(
|
|
2422
|
+
if (t.activeFeature.setValue(R.UNSET), n && i) {
|
|
2404
2423
|
t.features.delete(i);
|
|
2405
2424
|
const o = t.sdk.featuresList.getValue();
|
|
2406
2425
|
o && o.delete(i), t.sdk.featuresList.setValue(o);
|
|
2407
2426
|
}
|
|
2408
2427
|
}, t.initFeature = (n, i = ye.ORGANIZATION) => {
|
|
2409
|
-
if (n.type in
|
|
2410
|
-
const o =
|
|
2428
|
+
if (n.type in Jo && !t.features.has(n.type)) {
|
|
2429
|
+
const o = Zo(n, i, t);
|
|
2411
2430
|
t.features.set(n.type, o);
|
|
2412
2431
|
let s = t.sdk.featuresList.getValue();
|
|
2413
2432
|
s ? s.add(n.type) : s = /* @__PURE__ */ new Set([n.type]), t.sdk.featuresList.setValue(new Set(s));
|
|
@@ -2460,7 +2479,7 @@ const Xo = (t, e, r) => t.type === D.GAMES ? new Wo(t, e, r) : new Jo(t, e), Zo
|
|
|
2460
2479
|
t.store.subscribe(i);
|
|
2461
2480
|
}, r();
|
|
2462
2481
|
};
|
|
2463
|
-
class
|
|
2482
|
+
class ts {
|
|
2464
2483
|
analytics;
|
|
2465
2484
|
constructor(e) {
|
|
2466
2485
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2472,7 +2491,7 @@ class es {
|
|
|
2472
2491
|
break;
|
|
2473
2492
|
}
|
|
2474
2493
|
};
|
|
2475
|
-
return
|
|
2494
|
+
return M.listen(r);
|
|
2476
2495
|
});
|
|
2477
2496
|
}
|
|
2478
2497
|
accepted = () => {
|
|
@@ -2481,7 +2500,7 @@ class es {
|
|
|
2481
2500
|
...this.analytics.commonStore.getValues(),
|
|
2482
2501
|
kind: Q.INVITATION_ACCEPTED
|
|
2483
2502
|
},
|
|
2484
|
-
category:
|
|
2503
|
+
category: Br.GAMES,
|
|
2485
2504
|
from: Mr.UNSET
|
|
2486
2505
|
});
|
|
2487
2506
|
};
|
|
@@ -2491,12 +2510,12 @@ class es {
|
|
|
2491
2510
|
...this.analytics.commonStore.getValues(),
|
|
2492
2511
|
kind: Q.INVITATION_SENT
|
|
2493
2512
|
},
|
|
2494
|
-
category:
|
|
2513
|
+
category: Br.GAMES,
|
|
2495
2514
|
from: e || Mr.UNSET
|
|
2496
2515
|
});
|
|
2497
2516
|
};
|
|
2498
2517
|
}
|
|
2499
|
-
class
|
|
2518
|
+
class rs {
|
|
2500
2519
|
analytics;
|
|
2501
2520
|
constructor(e) {
|
|
2502
2521
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2511,7 +2530,7 @@ class ts {
|
|
|
2511
2530
|
break;
|
|
2512
2531
|
}
|
|
2513
2532
|
};
|
|
2514
|
-
return
|
|
2533
|
+
return M.listen(r);
|
|
2515
2534
|
});
|
|
2516
2535
|
}
|
|
2517
2536
|
tap = () => {
|
|
@@ -2520,7 +2539,7 @@ class ts {
|
|
|
2520
2539
|
...this.analytics.commonStore.getValues(),
|
|
2521
2540
|
kind: Q.INTERACTIONS
|
|
2522
2541
|
},
|
|
2523
|
-
actionType:
|
|
2542
|
+
actionType: Kr.TAP
|
|
2524
2543
|
});
|
|
2525
2544
|
};
|
|
2526
2545
|
scroll = () => {
|
|
@@ -2529,11 +2548,11 @@ class ts {
|
|
|
2529
2548
|
...this.analytics.commonStore.getValues(),
|
|
2530
2549
|
kind: Q.INTERACTIONS
|
|
2531
2550
|
},
|
|
2532
|
-
actionType:
|
|
2551
|
+
actionType: Kr.SCROLL
|
|
2533
2552
|
});
|
|
2534
2553
|
};
|
|
2535
2554
|
}
|
|
2536
|
-
const
|
|
2555
|
+
const ns = {
|
|
2537
2556
|
[W.UNSET]: Ae.UNSET,
|
|
2538
2557
|
[W.INGAME_IAB21]: Ae.PROMOTION_INGAME_IAB21,
|
|
2539
2558
|
[W.INGAME_IAB11_LBAR]: Ae.PROMOTION_INGAME_IAB11_LBAR,
|
|
@@ -2541,14 +2560,14 @@ const rs = {
|
|
|
2541
2560
|
[W.INGAME_IAB21_LBAR]: Ae.PROMOTION_INGAME_IAB21_LBAR,
|
|
2542
2561
|
[W.INGAME_IAB61]: Ae.PROMOTION_INGAME_IAB61,
|
|
2543
2562
|
[W.EXTERNAL_AD]: Ae.PROMOTION_GAM
|
|
2544
|
-
};
|
|
2545
|
-
class
|
|
2563
|
+
}, cr = (t) => t ? ns[t] : Ae.UNSET;
|
|
2564
|
+
class is {
|
|
2546
2565
|
analytics;
|
|
2547
2566
|
constructor(e) {
|
|
2548
2567
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
2549
2568
|
const r = (n) => {
|
|
2550
2569
|
if (!n.slEventBus?.skipAnalytics && n.slEventBus?.type === "advertisement") {
|
|
2551
|
-
const i = n.slEventBus.payload.type
|
|
2570
|
+
const i = cr(n.slEventBus.payload.type);
|
|
2552
2571
|
switch (n.slEventBus.action) {
|
|
2553
2572
|
case "videoPlay":
|
|
2554
2573
|
this.videoPlay(n.slEventBus.payload, { topicSubType: i });
|
|
@@ -2565,10 +2584,13 @@ class ns {
|
|
|
2565
2584
|
case "opened":
|
|
2566
2585
|
this.opened(n.slEventBus.payload, { topicSubType: i });
|
|
2567
2586
|
break;
|
|
2587
|
+
case "viewed":
|
|
2588
|
+
this.viewed(n.slEventBus.payload, { topicSubType: i });
|
|
2589
|
+
break;
|
|
2568
2590
|
}
|
|
2569
2591
|
}
|
|
2570
2592
|
};
|
|
2571
|
-
return
|
|
2593
|
+
return M.listen(r);
|
|
2572
2594
|
});
|
|
2573
2595
|
}
|
|
2574
2596
|
received = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -2580,10 +2602,22 @@ class ns {
|
|
|
2580
2602
|
topicType: x.POLLS_PROMOTION,
|
|
2581
2603
|
topicSubType: r
|
|
2582
2604
|
},
|
|
2583
|
-
pollOpenedFrom:
|
|
2605
|
+
pollOpenedFrom: Y.UNSET
|
|
2584
2606
|
});
|
|
2585
2607
|
};
|
|
2586
|
-
opened = ({ id: e }, { topicSubType:
|
|
2608
|
+
opened = ({ id: e, openedFrom: r }, { topicSubType: n }) => {
|
|
2609
|
+
this.analytics.write("games", {
|
|
2610
|
+
common: {
|
|
2611
|
+
...this.analytics.commonStore.getValues(),
|
|
2612
|
+
kind: Q.POLLS_OPENED,
|
|
2613
|
+
topicId: e,
|
|
2614
|
+
topicType: x.POLLS_PROMOTION,
|
|
2615
|
+
topicSubType: n
|
|
2616
|
+
},
|
|
2617
|
+
pollOpenedFrom: r === "notification" ? Y.IN_APP : Y.UNSET
|
|
2618
|
+
});
|
|
2619
|
+
};
|
|
2620
|
+
viewed = ({ id: e }, { topicSubType: r }) => {
|
|
2587
2621
|
this.analytics.write("games", {
|
|
2588
2622
|
common: {
|
|
2589
2623
|
...this.analytics.commonStore.getValues(),
|
|
@@ -2592,7 +2626,7 @@ class ns {
|
|
|
2592
2626
|
topicType: x.POLLS_PROMOTION,
|
|
2593
2627
|
topicSubType: r
|
|
2594
2628
|
},
|
|
2595
|
-
pollOpenedFrom:
|
|
2629
|
+
pollOpenedFrom: Y.UNSET
|
|
2596
2630
|
});
|
|
2597
2631
|
};
|
|
2598
2632
|
videoPlay = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -2604,7 +2638,7 @@ class ns {
|
|
|
2604
2638
|
topicType: x.POLLS_PROMOTION,
|
|
2605
2639
|
topicSubType: r
|
|
2606
2640
|
},
|
|
2607
|
-
pollOpenedFrom:
|
|
2641
|
+
pollOpenedFrom: Y.UNSET
|
|
2608
2642
|
});
|
|
2609
2643
|
};
|
|
2610
2644
|
buttonSelect = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -2616,7 +2650,7 @@ class ns {
|
|
|
2616
2650
|
topicType: x.POLLS_PROMOTION,
|
|
2617
2651
|
topicSubType: r
|
|
2618
2652
|
},
|
|
2619
|
-
pollOpenedFrom:
|
|
2653
|
+
pollOpenedFrom: Y.UNSET
|
|
2620
2654
|
});
|
|
2621
2655
|
};
|
|
2622
2656
|
bannerSelect = ({ id: e }, { topicSubType: r }) => {
|
|
@@ -2628,41 +2662,41 @@ class ns {
|
|
|
2628
2662
|
topicType: x.POLLS_PROMOTION,
|
|
2629
2663
|
topicSubType: r
|
|
2630
2664
|
},
|
|
2631
|
-
pollOpenedFrom:
|
|
2665
|
+
pollOpenedFrom: Y.UNSET
|
|
2632
2666
|
});
|
|
2633
2667
|
};
|
|
2634
2668
|
}
|
|
2635
|
-
const
|
|
2636
|
-
[
|
|
2637
|
-
[
|
|
2638
|
-
[
|
|
2639
|
-
[
|
|
2640
|
-
[
|
|
2641
|
-
[
|
|
2642
|
-
[
|
|
2669
|
+
const et = {
|
|
2670
|
+
[_.UNSET]: x.UNSET,
|
|
2671
|
+
[_.FACTOID]: x.POLLS_INSIGHT,
|
|
2672
|
+
[_.POLL]: x.POLLS_POLL,
|
|
2673
|
+
[_.PREDICTION]: x.POLLS_PREDICTION,
|
|
2674
|
+
[_.PROMOTION]: x.POLLS_PROMOTION,
|
|
2675
|
+
[_.TRIVIA]: x.POLLS_TRIVIA,
|
|
2676
|
+
[_.TWEET]: x.POLLS_TWITTER
|
|
2643
2677
|
};
|
|
2644
|
-
|
|
2645
|
-
const
|
|
2646
|
-
[
|
|
2647
|
-
[
|
|
2648
|
-
[
|
|
2649
|
-
[
|
|
2650
|
-
[
|
|
2651
|
-
[
|
|
2652
|
-
[
|
|
2653
|
-
[
|
|
2654
|
-
[
|
|
2655
|
-
[
|
|
2656
|
-
[
|
|
2657
|
-
[
|
|
2658
|
-
[
|
|
2678
|
+
_.UNSET + "", pe.UNSET, _.FACTOID + "", pe.POLLS, _.POLL + "", pe.POLLS, _.PREDICTION + "", pe.POLLS, _.PROMOTION + "", pe.POLLS, _.TRIVIA + "", pe.POLLS, _.TWEET + "", pe.POLLS;
|
|
2679
|
+
const os = {
|
|
2680
|
+
[R.UNSET]: z.UNSET,
|
|
2681
|
+
[R.INPLAY]: z.INPLAY,
|
|
2682
|
+
[R.MESSAGING]: z.MESSAGING,
|
|
2683
|
+
[R.STATISTICS]: z.STATS,
|
|
2684
|
+
[R.BETTING]: z.BETTING,
|
|
2685
|
+
[R.TWITTER]: z.TWITTER,
|
|
2686
|
+
[R.MERCHANDISE]: z.MERCHANDISE,
|
|
2687
|
+
[R.CONTESTS]: z.CONTESTS,
|
|
2688
|
+
[R.VOICE_CHAT]: z.CALLING,
|
|
2689
|
+
[R.TICKETS]: z.TICKETS,
|
|
2690
|
+
[R.WHOIS_WATCHING]: z.WHOISWATCHING,
|
|
2691
|
+
[R.PROFILE]: z.PROFILE,
|
|
2692
|
+
[R.GAMES]: z.POLLS,
|
|
2659
2693
|
// ??
|
|
2660
|
-
[
|
|
2694
|
+
[R.GOLF_STATISTICS]: z.STATS,
|
|
2661
2695
|
// ??
|
|
2662
|
-
[
|
|
2663
|
-
[
|
|
2696
|
+
[R.HIGHLIGHTS]: z.HIGHLIGHTS,
|
|
2697
|
+
[R.PUBLIC_CHAT]: z.PUBLIC_CHAT
|
|
2664
2698
|
};
|
|
2665
|
-
class
|
|
2699
|
+
class ss {
|
|
2666
2700
|
analytics;
|
|
2667
2701
|
constructor(e) {
|
|
2668
2702
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2676,36 +2710,55 @@ class os {
|
|
|
2676
2710
|
this.opened(n.slEventBus.payload);
|
|
2677
2711
|
break;
|
|
2678
2712
|
}
|
|
2713
|
+
if (n.slEventBus?.type === "advertisement")
|
|
2714
|
+
switch (n.slEventBus.action) {
|
|
2715
|
+
case "notification-received":
|
|
2716
|
+
this.received({
|
|
2717
|
+
questionId: n.slEventBus.payload.id,
|
|
2718
|
+
questionType: _.PROMOTION,
|
|
2719
|
+
topicSubType: cr(n.slEventBus.payload.type)
|
|
2720
|
+
});
|
|
2721
|
+
break;
|
|
2722
|
+
case "notification-opened":
|
|
2723
|
+
this.opened({
|
|
2724
|
+
questionId: n.slEventBus.payload.id,
|
|
2725
|
+
questionType: _.PROMOTION,
|
|
2726
|
+
topicSubType: cr(n.slEventBus.payload.type)
|
|
2727
|
+
});
|
|
2728
|
+
break;
|
|
2729
|
+
}
|
|
2679
2730
|
};
|
|
2680
|
-
return
|
|
2731
|
+
return M.listen(r);
|
|
2681
2732
|
});
|
|
2682
2733
|
}
|
|
2683
|
-
received = ({ questionId: e, questionType: r }) => {
|
|
2734
|
+
received = ({ questionId: e, questionType: r, topicSubType: n }) => {
|
|
2684
2735
|
this.analytics.write("notification", {
|
|
2685
2736
|
common: {
|
|
2686
2737
|
...this.analytics.commonStore.getValues(),
|
|
2687
2738
|
kind: Q.NOTIFICATION_RECEIVED,
|
|
2688
2739
|
topicId: e,
|
|
2689
|
-
topicType: r ?
|
|
2740
|
+
topicType: r ? et[r] : x.UNSET,
|
|
2741
|
+
topicSubType: n
|
|
2690
2742
|
},
|
|
2691
2743
|
notificationKind: pe.POLLS,
|
|
2692
|
-
notificationType:
|
|
2744
|
+
notificationType: zr.IN_APP
|
|
2693
2745
|
});
|
|
2694
2746
|
};
|
|
2695
|
-
opened = ({ questionId: e, questionType: r }) => {
|
|
2747
|
+
opened = ({ questionId: e, questionType: r, topicSubType: n }) => {
|
|
2696
2748
|
this.analytics.write("notification", {
|
|
2697
2749
|
common: {
|
|
2698
2750
|
...this.analytics.commonStore.getValues(),
|
|
2699
2751
|
kind: Q.NOTIFICATION_OPENED,
|
|
2700
2752
|
topicId: e,
|
|
2701
|
-
topicType: r ?
|
|
2753
|
+
topicType: r ? et[r] : x.UNSET,
|
|
2754
|
+
topicSubType: n
|
|
2702
2755
|
},
|
|
2703
2756
|
notificationKind: pe.POLLS,
|
|
2704
|
-
notificationType:
|
|
2757
|
+
notificationType: zr.IN_APP
|
|
2705
2758
|
});
|
|
2706
2759
|
};
|
|
2707
2760
|
}
|
|
2708
|
-
class
|
|
2761
|
+
class as {
|
|
2709
2762
|
analytics;
|
|
2710
2763
|
constructor(e) {
|
|
2711
2764
|
this.analytics = e, this.analytics.onConnect(() => {
|
|
@@ -2729,7 +2782,7 @@ class ss {
|
|
|
2729
2782
|
break;
|
|
2730
2783
|
}
|
|
2731
2784
|
};
|
|
2732
|
-
return
|
|
2785
|
+
return M.listen(r);
|
|
2733
2786
|
});
|
|
2734
2787
|
}
|
|
2735
2788
|
// event when a poll is received from subscription or active question request
|
|
@@ -2739,9 +2792,9 @@ class ss {
|
|
|
2739
2792
|
...this.analytics.commonStore.getValues(),
|
|
2740
2793
|
kind: Q.POLLS_RECEIVED,
|
|
2741
2794
|
topicId: e,
|
|
2742
|
-
topicType: r ?
|
|
2795
|
+
topicType: r ? et[r] : x.UNSET
|
|
2743
2796
|
},
|
|
2744
|
-
pollOpenedFrom:
|
|
2797
|
+
pollOpenedFrom: Y.UNSET
|
|
2745
2798
|
});
|
|
2746
2799
|
};
|
|
2747
2800
|
// poll is opened from notification or list
|
|
@@ -2751,9 +2804,9 @@ class ss {
|
|
|
2751
2804
|
...this.analytics.commonStore.getValues(),
|
|
2752
2805
|
kind: Q.POLLS_OPENED,
|
|
2753
2806
|
topicId: e,
|
|
2754
|
-
topicType: r ?
|
|
2807
|
+
topicType: r ? et[r] : x.UNSET
|
|
2755
2808
|
},
|
|
2756
|
-
pollOpenedFrom: n === "list" ?
|
|
2809
|
+
pollOpenedFrom: n === "list" ? Y.PICK_HISTORY : Y.IN_APP
|
|
2757
2810
|
});
|
|
2758
2811
|
};
|
|
2759
2812
|
// poll is voted
|
|
@@ -2763,9 +2816,9 @@ class ss {
|
|
|
2763
2816
|
...this.analytics.commonStore.getValues(),
|
|
2764
2817
|
kind: Q.POLLS_VOTE,
|
|
2765
2818
|
topicId: e,
|
|
2766
|
-
topicType: r ?
|
|
2819
|
+
topicType: r ? et[r] : x.UNSET
|
|
2767
2820
|
},
|
|
2768
|
-
pollOpenedFrom:
|
|
2821
|
+
pollOpenedFrom: Y.UNSET
|
|
2769
2822
|
});
|
|
2770
2823
|
};
|
|
2771
2824
|
// onboarding passed, user is now able to vote
|
|
@@ -2775,7 +2828,7 @@ class ss {
|
|
|
2775
2828
|
...this.analytics.commonStore.getValues(),
|
|
2776
2829
|
kind: Q.GAMES_JOINED
|
|
2777
2830
|
},
|
|
2778
|
-
pollOpenedFrom:
|
|
2831
|
+
pollOpenedFrom: Y.UNSET
|
|
2779
2832
|
});
|
|
2780
2833
|
};
|
|
2781
2834
|
// user clicked on link in poll and navigated to another page
|
|
@@ -2785,13 +2838,13 @@ class ss {
|
|
|
2785
2838
|
...this.analytics.commonStore.getValues(),
|
|
2786
2839
|
kind: Q.POLLS_NAVIGATED
|
|
2787
2840
|
},
|
|
2788
|
-
pollOpenedFrom:
|
|
2841
|
+
pollOpenedFrom: Y.UNSET
|
|
2789
2842
|
});
|
|
2790
2843
|
};
|
|
2791
2844
|
}
|
|
2792
|
-
const
|
|
2845
|
+
const us = ({ transport: t, $commonStore: e }) => {
|
|
2793
2846
|
let r;
|
|
2794
|
-
const n =
|
|
2847
|
+
const n = q(!1), i = 5e3, { client: o, queryKey: s } = t.createPromiseClient(_n, {
|
|
2795
2848
|
method: "send",
|
|
2796
2849
|
params: [n]
|
|
2797
2850
|
}), a = t.nanoquery.createFetcherStore(s, {
|
|
@@ -2827,7 +2880,7 @@ const as = ({ transport: t, $commonStore: e }) => {
|
|
|
2827
2880
|
ge.debug("unmounted heartbeat"), a.off(), r?.(), r = void 0, c();
|
|
2828
2881
|
} };
|
|
2829
2882
|
}, ge = Se("analytics");
|
|
2830
|
-
class
|
|
2883
|
+
class cs {
|
|
2831
2884
|
commonStore;
|
|
2832
2885
|
notifications;
|
|
2833
2886
|
polls;
|
|
@@ -2840,8 +2893,8 @@ class us {
|
|
|
2840
2893
|
listenersCancels;
|
|
2841
2894
|
connected = !1;
|
|
2842
2895
|
constructor(e) {
|
|
2843
|
-
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new
|
|
2844
|
-
const { client: r } = e.analyticsTransport.createPromiseClient(
|
|
2896
|
+
this.listeners = /* @__PURE__ */ new Set(), this.listenersCancels = /* @__PURE__ */ new Set(), this.commonStore = new Le(J({}), "common-analytics"), this.connectToSDK(e), this.heartbeat = us({ transport: e.analyticsTransport, $commonStore: this.commonStore }), this.notifications = new ss(this), this.polls = new as(this), this.invitation = new ts(this), this.interactions = new rs(this), this.advertisement = new is(this);
|
|
2897
|
+
const { client: r } = e.analyticsTransport.createPromiseClient(_n, {
|
|
2845
2898
|
method: "send"
|
|
2846
2899
|
});
|
|
2847
2900
|
this.analyticsClient = r;
|
|
@@ -2870,10 +2923,10 @@ class us {
|
|
|
2870
2923
|
this.onConnect(() => e.stores.slStreamId.getAtomStore().subscribe((r) => {
|
|
2871
2924
|
this.writeCommon("eventId", r);
|
|
2872
2925
|
})), this.onConnect(() => e.sdk.getActiveFeature().subscribe((r) => {
|
|
2873
|
-
r && this.writeCommon("category",
|
|
2926
|
+
r && this.writeCommon("category", os[r]), r !== R.UNSET ? this.writeCommon("overlaySessionId", ir()) : this.writeCommon("overlaySessionId", "");
|
|
2874
2927
|
})), this.onConnect(() => {
|
|
2875
2928
|
const r = window.matchMedia("(orientation: portrait)"), n = (i) => {
|
|
2876
|
-
this.writeCommon("screenOrientation", i.matches ?
|
|
2929
|
+
this.writeCommon("screenOrientation", i.matches ? Gr.PORTRAIT : Gr.LANDSCAPE);
|
|
2877
2930
|
};
|
|
2878
2931
|
return r.addEventListener("change", n), () => {
|
|
2879
2932
|
r.removeEventListener("change", n);
|
|
@@ -2883,17 +2936,17 @@ class us {
|
|
|
2883
2936
|
}));
|
|
2884
2937
|
};
|
|
2885
2938
|
}
|
|
2886
|
-
const
|
|
2887
|
-
t.analytics = new
|
|
2939
|
+
const ls = (t, e, r) => {
|
|
2940
|
+
t.analytics = new cs(t), t.sdk.onMount({ name: "analytics" }, () => (t.analytics.connect(), () => {
|
|
2888
2941
|
t.analytics.disconnect();
|
|
2889
2942
|
})), r();
|
|
2890
2943
|
};
|
|
2891
|
-
var
|
|
2892
|
-
function
|
|
2944
|
+
var Ar = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2945
|
+
function ds(t) {
|
|
2893
2946
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2894
2947
|
}
|
|
2895
|
-
var
|
|
2896
|
-
function
|
|
2948
|
+
var Er = { exports: {} }, Ir = { exports: {} };
|
|
2949
|
+
function fs(t) {
|
|
2897
2950
|
var e = new t(), r = e;
|
|
2898
2951
|
function n() {
|
|
2899
2952
|
var o = e;
|
|
@@ -2907,14 +2960,14 @@ function ds(t) {
|
|
|
2907
2960
|
release: i
|
|
2908
2961
|
};
|
|
2909
2962
|
}
|
|
2910
|
-
var
|
|
2911
|
-
function
|
|
2963
|
+
var ps = fs, hs = ps;
|
|
2964
|
+
function qn(t, e, r) {
|
|
2912
2965
|
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
2913
2966
|
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2914
|
-
var n =
|
|
2967
|
+
var n = hs(ys), i = null, o = null, s = 0, a = null, u = {
|
|
2915
2968
|
push: b,
|
|
2916
|
-
drain:
|
|
2917
|
-
saturated:
|
|
2969
|
+
drain: X,
|
|
2970
|
+
saturated: X,
|
|
2918
2971
|
pause: c,
|
|
2919
2972
|
paused: !1,
|
|
2920
2973
|
get concurrency() {
|
|
@@ -2933,10 +2986,10 @@ function Bn(t, e, r) {
|
|
|
2933
2986
|
length: f,
|
|
2934
2987
|
getQueue: p,
|
|
2935
2988
|
unshift: g,
|
|
2936
|
-
empty:
|
|
2937
|
-
kill:
|
|
2989
|
+
empty: X,
|
|
2990
|
+
kill: F,
|
|
2938
2991
|
killAndDrain: K,
|
|
2939
|
-
error:
|
|
2992
|
+
error: re
|
|
2940
2993
|
};
|
|
2941
2994
|
return u;
|
|
2942
2995
|
function l() {
|
|
@@ -2970,45 +3023,45 @@ function Bn(t, e, r) {
|
|
|
2970
3023
|
}
|
|
2971
3024
|
function b(P, V) {
|
|
2972
3025
|
var O = n.get();
|
|
2973
|
-
O.context = t, O.release = S, O.value = P, O.callback = V ||
|
|
3026
|
+
O.context = t, O.release = S, O.value = P, O.callback = V || X, O.errorHandler = a, s >= r || u.paused ? o ? (o.next = O, o = O) : (i = O, o = O, u.saturated()) : (s++, e.call(t, O.value, O.worked));
|
|
2974
3027
|
}
|
|
2975
3028
|
function g(P, V) {
|
|
2976
3029
|
var O = n.get();
|
|
2977
|
-
O.context = t, O.release = S, O.value = P, O.callback = V ||
|
|
3030
|
+
O.context = t, O.release = S, O.value = P, O.callback = V || X, O.errorHandler = a, s >= r || u.paused ? i ? (O.next = i, i = O) : (i = O, o = O, u.saturated()) : (s++, e.call(t, O.value, O.worked));
|
|
2978
3031
|
}
|
|
2979
3032
|
function S(P) {
|
|
2980
3033
|
P && n.release(P);
|
|
2981
3034
|
var V = i;
|
|
2982
3035
|
V && s <= r ? u.paused ? s-- : (o === i && (o = null), i = V.next, V.next = null, e.call(t, V.value, V.worked), o === null && u.empty()) : --s === 0 && u.drain();
|
|
2983
3036
|
}
|
|
2984
|
-
function
|
|
2985
|
-
i = null, o = null, u.drain =
|
|
3037
|
+
function F() {
|
|
3038
|
+
i = null, o = null, u.drain = X;
|
|
2986
3039
|
}
|
|
2987
3040
|
function K() {
|
|
2988
|
-
i = null, o = null, u.drain(), u.drain =
|
|
3041
|
+
i = null, o = null, u.drain(), u.drain = X;
|
|
2989
3042
|
}
|
|
2990
|
-
function
|
|
3043
|
+
function re(P) {
|
|
2991
3044
|
a = P;
|
|
2992
3045
|
}
|
|
2993
3046
|
}
|
|
2994
|
-
function
|
|
3047
|
+
function X() {
|
|
2995
3048
|
}
|
|
2996
|
-
function
|
|
2997
|
-
this.value = null, this.callback =
|
|
3049
|
+
function ys() {
|
|
3050
|
+
this.value = null, this.callback = X, this.next = null, this.release = X, this.context = null, this.errorHandler = null;
|
|
2998
3051
|
var t = this;
|
|
2999
3052
|
this.worked = function(r, n) {
|
|
3000
3053
|
var i = t.callback, o = t.errorHandler, s = t.value;
|
|
3001
|
-
t.value = null, t.callback =
|
|
3054
|
+
t.value = null, t.callback = X, t.errorHandler && o(r, s), i.call(t.context, r, n), t.release(t);
|
|
3002
3055
|
};
|
|
3003
3056
|
}
|
|
3004
|
-
function
|
|
3057
|
+
function ms(t, e, r) {
|
|
3005
3058
|
typeof t == "function" && (r = e, e = t, t = null);
|
|
3006
3059
|
function n(c, f) {
|
|
3007
3060
|
e.call(this, c).then(function(p) {
|
|
3008
3061
|
f(null, p);
|
|
3009
3062
|
}, f);
|
|
3010
3063
|
}
|
|
3011
|
-
var i =
|
|
3064
|
+
var i = qn(t, n, r), o = i.push, s = i.unshift;
|
|
3012
3065
|
return i.push = a, i.unshift = u, i.drained = l, i;
|
|
3013
3066
|
function a(c) {
|
|
3014
3067
|
var f = new Promise(function(p, v) {
|
|
@@ -3020,7 +3073,7 @@ function ys(t, e, r) {
|
|
|
3020
3073
|
p(b);
|
|
3021
3074
|
});
|
|
3022
3075
|
});
|
|
3023
|
-
return f.catch(
|
|
3076
|
+
return f.catch(X), f;
|
|
3024
3077
|
}
|
|
3025
3078
|
function u(c) {
|
|
3026
3079
|
var f = new Promise(function(p, v) {
|
|
@@ -3032,7 +3085,7 @@ function ys(t, e, r) {
|
|
|
3032
3085
|
p(b);
|
|
3033
3086
|
});
|
|
3034
3087
|
});
|
|
3035
|
-
return f.catch(
|
|
3088
|
+
return f.catch(X), f;
|
|
3036
3089
|
}
|
|
3037
3090
|
function l() {
|
|
3038
3091
|
if (i.idle())
|
|
@@ -3047,17 +3100,17 @@ function ys(t, e, r) {
|
|
|
3047
3100
|
return f;
|
|
3048
3101
|
}
|
|
3049
3102
|
}
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
var jn =
|
|
3103
|
+
Ir.exports = qn;
|
|
3104
|
+
Ir.exports.promise = ms;
|
|
3105
|
+
var jn = Ir.exports, Tr = { exports: {} }, Ge = typeof Reflect == "object" ? Reflect : null, tn = Ge && typeof Ge.apply == "function" ? Ge.apply : function(e, r, n) {
|
|
3053
3106
|
return Function.prototype.apply.call(e, r, n);
|
|
3054
3107
|
}, yt;
|
|
3055
|
-
|
|
3108
|
+
Ge && typeof Ge.ownKeys == "function" ? yt = Ge.ownKeys : Object.getOwnPropertySymbols ? yt = function(e) {
|
|
3056
3109
|
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
|
|
3057
3110
|
} : yt = function(e) {
|
|
3058
3111
|
return Object.getOwnPropertyNames(e);
|
|
3059
3112
|
};
|
|
3060
|
-
function
|
|
3113
|
+
function gs(t) {
|
|
3061
3114
|
console && console.warn && console.warn(t);
|
|
3062
3115
|
}
|
|
3063
3116
|
var Un = Number.isNaN || function(e) {
|
|
@@ -3066,13 +3119,13 @@ var Un = Number.isNaN || function(e) {
|
|
|
3066
3119
|
function N() {
|
|
3067
3120
|
N.init.call(this);
|
|
3068
3121
|
}
|
|
3069
|
-
|
|
3070
|
-
|
|
3122
|
+
Tr.exports = N;
|
|
3123
|
+
Tr.exports.once = ws;
|
|
3071
3124
|
N.EventEmitter = N;
|
|
3072
3125
|
N.prototype._events = void 0;
|
|
3073
3126
|
N.prototype._eventsCount = 0;
|
|
3074
3127
|
N.prototype._maxListeners = void 0;
|
|
3075
|
-
var
|
|
3128
|
+
var rn = 10;
|
|
3076
3129
|
function Ft(t) {
|
|
3077
3130
|
if (typeof t != "function")
|
|
3078
3131
|
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
|
|
@@ -3080,12 +3133,12 @@ function Ft(t) {
|
|
|
3080
3133
|
Object.defineProperty(N, "defaultMaxListeners", {
|
|
3081
3134
|
enumerable: !0,
|
|
3082
3135
|
get: function() {
|
|
3083
|
-
return
|
|
3136
|
+
return rn;
|
|
3084
3137
|
},
|
|
3085
3138
|
set: function(t) {
|
|
3086
3139
|
if (typeof t != "number" || t < 0 || Un(t))
|
|
3087
3140
|
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
|
|
3088
|
-
|
|
3141
|
+
rn = t;
|
|
3089
3142
|
}
|
|
3090
3143
|
});
|
|
3091
3144
|
N.init = function() {
|
|
@@ -3096,11 +3149,11 @@ N.prototype.setMaxListeners = function(e) {
|
|
|
3096
3149
|
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
|
|
3097
3150
|
return this._maxListeners = e, this;
|
|
3098
3151
|
};
|
|
3099
|
-
function
|
|
3152
|
+
function xn(t) {
|
|
3100
3153
|
return t._maxListeners === void 0 ? N.defaultMaxListeners : t._maxListeners;
|
|
3101
3154
|
}
|
|
3102
3155
|
N.prototype.getMaxListeners = function() {
|
|
3103
|
-
return
|
|
3156
|
+
return xn(this);
|
|
3104
3157
|
};
|
|
3105
3158
|
N.prototype.emit = function(e) {
|
|
3106
3159
|
for (var r = [], n = 1; n < arguments.length; n++) r.push(arguments[n]);
|
|
@@ -3120,13 +3173,13 @@ N.prototype.emit = function(e) {
|
|
|
3120
3173
|
if (u === void 0)
|
|
3121
3174
|
return !1;
|
|
3122
3175
|
if (typeof u == "function")
|
|
3123
|
-
|
|
3176
|
+
tn(u, this, r);
|
|
3124
3177
|
else
|
|
3125
|
-
for (var l = u.length, c =
|
|
3126
|
-
|
|
3178
|
+
for (var l = u.length, c = Hn(u, l), n = 0; n < l; ++n)
|
|
3179
|
+
tn(c[n], this, r);
|
|
3127
3180
|
return !0;
|
|
3128
3181
|
};
|
|
3129
|
-
function
|
|
3182
|
+
function Qn(t, e, r, n) {
|
|
3130
3183
|
var i, o, s;
|
|
3131
3184
|
if (Ft(r), o = t._events, o === void 0 ? (o = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (o.newListener !== void 0 && (t.emit(
|
|
3132
3185
|
"newListener",
|
|
@@ -3134,33 +3187,33 @@ function xn(t, e, r, n) {
|
|
|
3134
3187
|
r.listener ? r.listener : r
|
|
3135
3188
|
), o = t._events), s = o[e]), s === void 0)
|
|
3136
3189
|
s = o[e] = r, ++t._eventsCount;
|
|
3137
|
-
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i =
|
|
3190
|
+
else if (typeof s == "function" ? s = o[e] = n ? [r, s] : [s, r] : n ? s.unshift(r) : s.push(r), i = xn(t), i > 0 && s.length > i && !s.warned) {
|
|
3138
3191
|
s.warned = !0;
|
|
3139
3192
|
var a = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
3140
|
-
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length,
|
|
3193
|
+
a.name = "MaxListenersExceededWarning", a.emitter = t, a.type = e, a.count = s.length, gs(a);
|
|
3141
3194
|
}
|
|
3142
3195
|
return t;
|
|
3143
3196
|
}
|
|
3144
3197
|
N.prototype.addListener = function(e, r) {
|
|
3145
|
-
return
|
|
3198
|
+
return Qn(this, e, r, !1);
|
|
3146
3199
|
};
|
|
3147
3200
|
N.prototype.on = N.prototype.addListener;
|
|
3148
3201
|
N.prototype.prependListener = function(e, r) {
|
|
3149
|
-
return
|
|
3202
|
+
return Qn(this, e, r, !0);
|
|
3150
3203
|
};
|
|
3151
|
-
function
|
|
3204
|
+
function bs() {
|
|
3152
3205
|
if (!this.fired)
|
|
3153
3206
|
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);
|
|
3154
3207
|
}
|
|
3155
|
-
function
|
|
3156
|
-
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i =
|
|
3208
|
+
function Gn(t, e, r) {
|
|
3209
|
+
var n = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, i = bs.bind(n);
|
|
3157
3210
|
return i.listener = r, n.wrapFn = i, i;
|
|
3158
3211
|
}
|
|
3159
3212
|
N.prototype.once = function(e, r) {
|
|
3160
|
-
return Ft(r), this.on(e,
|
|
3213
|
+
return Ft(r), this.on(e, Gn(this, e, r)), this;
|
|
3161
3214
|
};
|
|
3162
3215
|
N.prototype.prependOnceListener = function(e, r) {
|
|
3163
|
-
return Ft(r), this.prependListener(e,
|
|
3216
|
+
return Ft(r), this.prependListener(e, Gn(this, e, r)), this;
|
|
3164
3217
|
};
|
|
3165
3218
|
N.prototype.removeListener = function(e, r) {
|
|
3166
3219
|
var n, i, o, s, a;
|
|
@@ -3178,7 +3231,7 @@ N.prototype.removeListener = function(e, r) {
|
|
|
3178
3231
|
}
|
|
3179
3232
|
if (o < 0)
|
|
3180
3233
|
return this;
|
|
3181
|
-
o === 0 ? n.shift() :
|
|
3234
|
+
o === 0 ? n.shift() : vs(n, o), n.length === 1 && (i[e] = n[0]), i.removeListener !== void 0 && this.emit("removeListener", e, a || r);
|
|
3182
3235
|
}
|
|
3183
3236
|
return this;
|
|
3184
3237
|
};
|
|
@@ -3202,24 +3255,24 @@ N.prototype.removeAllListeners = function(e) {
|
|
|
3202
3255
|
this.removeListener(e, r[i]);
|
|
3203
3256
|
return this;
|
|
3204
3257
|
};
|
|
3205
|
-
function
|
|
3258
|
+
function Kn(t, e, r) {
|
|
3206
3259
|
var n = t._events;
|
|
3207
3260
|
if (n === void 0)
|
|
3208
3261
|
return [];
|
|
3209
3262
|
var i = n[e];
|
|
3210
|
-
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ?
|
|
3263
|
+
return i === void 0 ? [] : typeof i == "function" ? r ? [i.listener || i] : [i] : r ? Ss(i) : Hn(i, i.length);
|
|
3211
3264
|
}
|
|
3212
3265
|
N.prototype.listeners = function(e) {
|
|
3213
|
-
return
|
|
3266
|
+
return Kn(this, e, !0);
|
|
3214
3267
|
};
|
|
3215
3268
|
N.prototype.rawListeners = function(e) {
|
|
3216
|
-
return
|
|
3269
|
+
return Kn(this, e, !1);
|
|
3217
3270
|
};
|
|
3218
3271
|
N.listenerCount = function(t, e) {
|
|
3219
|
-
return typeof t.listenerCount == "function" ? t.listenerCount(e) :
|
|
3272
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : zn.call(t, e);
|
|
3220
3273
|
};
|
|
3221
|
-
N.prototype.listenerCount =
|
|
3222
|
-
function
|
|
3274
|
+
N.prototype.listenerCount = zn;
|
|
3275
|
+
function zn(t) {
|
|
3223
3276
|
var e = this._events;
|
|
3224
3277
|
if (e !== void 0) {
|
|
3225
3278
|
var r = e[t];
|
|
@@ -3233,22 +3286,22 @@ function Kn(t) {
|
|
|
3233
3286
|
N.prototype.eventNames = function() {
|
|
3234
3287
|
return this._eventsCount > 0 ? yt(this._events) : [];
|
|
3235
3288
|
};
|
|
3236
|
-
function
|
|
3289
|
+
function Hn(t, e) {
|
|
3237
3290
|
for (var r = new Array(e), n = 0; n < e; ++n)
|
|
3238
3291
|
r[n] = t[n];
|
|
3239
3292
|
return r;
|
|
3240
3293
|
}
|
|
3241
|
-
function
|
|
3294
|
+
function vs(t, e) {
|
|
3242
3295
|
for (; e + 1 < t.length; e++)
|
|
3243
3296
|
t[e] = t[e + 1];
|
|
3244
3297
|
t.pop();
|
|
3245
3298
|
}
|
|
3246
|
-
function
|
|
3299
|
+
function Ss(t) {
|
|
3247
3300
|
for (var e = new Array(t.length), r = 0; r < e.length; ++r)
|
|
3248
3301
|
e[r] = t[r].listener || t[r];
|
|
3249
3302
|
return e;
|
|
3250
3303
|
}
|
|
3251
|
-
function
|
|
3304
|
+
function ws(t, e) {
|
|
3252
3305
|
return new Promise(function(r, n) {
|
|
3253
3306
|
function i(s) {
|
|
3254
3307
|
t.removeListener(e, o), n(s);
|
|
@@ -3256,13 +3309,13 @@ function Ss(t, e) {
|
|
|
3256
3309
|
function o() {
|
|
3257
3310
|
typeof t.removeListener == "function" && t.removeListener("error", i), r([].slice.call(arguments));
|
|
3258
3311
|
}
|
|
3259
|
-
|
|
3312
|
+
Wn(t, e, o, { once: !0 }), e !== "error" && As(t, i, { once: !0 });
|
|
3260
3313
|
});
|
|
3261
3314
|
}
|
|
3262
|
-
function
|
|
3263
|
-
typeof t.on == "function" &&
|
|
3315
|
+
function As(t, e, r) {
|
|
3316
|
+
typeof t.on == "function" && Wn(t, "error", e, r);
|
|
3264
3317
|
}
|
|
3265
|
-
function
|
|
3318
|
+
function Wn(t, e, r, n) {
|
|
3266
3319
|
if (typeof t.on == "function")
|
|
3267
3320
|
n.once ? t.once(e, r) : t.on(e, r);
|
|
3268
3321
|
else if (typeof t.addEventListener == "function")
|
|
@@ -3272,7 +3325,7 @@ function Hn(t, e, r, n) {
|
|
|
3272
3325
|
else
|
|
3273
3326
|
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
|
|
3274
3327
|
}
|
|
3275
|
-
var
|
|
3328
|
+
var Yn = Tr.exports, Dt = {}, Jn = {}, Xn = function() {
|
|
3276
3329
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
|
|
3277
3330
|
return !1;
|
|
3278
3331
|
if (typeof Symbol.iterator == "symbol")
|
|
@@ -3295,56 +3348,56 @@ var Wn = Ir.exports, Dt = {}, Yn = {}, Jn = function() {
|
|
|
3295
3348
|
return !1;
|
|
3296
3349
|
}
|
|
3297
3350
|
return !0;
|
|
3298
|
-
},
|
|
3299
|
-
return
|
|
3300
|
-
},
|
|
3301
|
-
return typeof
|
|
3302
|
-
},
|
|
3351
|
+
}, Es = Xn, Rt = function() {
|
|
3352
|
+
return Es() && !!Symbol.toStringTag;
|
|
3353
|
+
}, Is = Error, Ts = EvalError, Os = RangeError, _s = ReferenceError, Zn = SyntaxError, Vt = TypeError, Ls = URIError, nn = typeof Symbol < "u" && Symbol, Cs = Xn, ks = function() {
|
|
3354
|
+
return typeof nn != "function" || typeof Symbol != "function" || typeof nn("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : Cs();
|
|
3355
|
+
}, jt = {
|
|
3303
3356
|
__proto__: null,
|
|
3304
3357
|
foo: {}
|
|
3305
|
-
},
|
|
3306
|
-
return { __proto__:
|
|
3307
|
-
},
|
|
3358
|
+
}, Ps = Object, Ns = function() {
|
|
3359
|
+
return { __proto__: jt }.foo === jt.foo && !(jt instanceof Ps);
|
|
3360
|
+
}, Fs = "Function.prototype.bind called on incompatible ", Ds = Object.prototype.toString, Rs = Math.max, Vs = "[object Function]", on = function(e, r) {
|
|
3308
3361
|
for (var n = [], i = 0; i < e.length; i += 1)
|
|
3309
3362
|
n[i] = e[i];
|
|
3310
3363
|
for (var o = 0; o < r.length; o += 1)
|
|
3311
3364
|
n[o + e.length] = r[o];
|
|
3312
3365
|
return n;
|
|
3313
|
-
},
|
|
3366
|
+
}, $s = function(e, r) {
|
|
3314
3367
|
for (var n = [], i = r, o = 0; i < e.length; i += 1, o += 1)
|
|
3315
3368
|
n[o] = e[i];
|
|
3316
3369
|
return n;
|
|
3317
|
-
},
|
|
3370
|
+
}, Bs = function(t, e) {
|
|
3318
3371
|
for (var r = "", n = 0; n < t.length; n += 1)
|
|
3319
3372
|
r += t[n], n + 1 < t.length && (r += e);
|
|
3320
3373
|
return r;
|
|
3321
3374
|
}, Ms = function(e) {
|
|
3322
3375
|
var r = this;
|
|
3323
|
-
if (typeof r != "function" ||
|
|
3324
|
-
throw new TypeError(
|
|
3325
|
-
for (var n =
|
|
3376
|
+
if (typeof r != "function" || Ds.apply(r) !== Vs)
|
|
3377
|
+
throw new TypeError(Fs + r);
|
|
3378
|
+
for (var n = $s(arguments, 1), i, o = function() {
|
|
3326
3379
|
if (this instanceof i) {
|
|
3327
3380
|
var c = r.apply(
|
|
3328
3381
|
this,
|
|
3329
|
-
|
|
3382
|
+
on(n, arguments)
|
|
3330
3383
|
);
|
|
3331
3384
|
return Object(c) === c ? c : this;
|
|
3332
3385
|
}
|
|
3333
3386
|
return r.apply(
|
|
3334
3387
|
e,
|
|
3335
|
-
|
|
3388
|
+
on(n, arguments)
|
|
3336
3389
|
);
|
|
3337
|
-
}, s =
|
|
3390
|
+
}, s = Rs(0, r.length - n.length), a = [], u = 0; u < s; u++)
|
|
3338
3391
|
a[u] = "$" + u;
|
|
3339
|
-
if (i = Function("binder", "return function (" +
|
|
3392
|
+
if (i = Function("binder", "return function (" + Bs(a, ",") + "){ return binder.apply(this,arguments); }")(o), r.prototype) {
|
|
3340
3393
|
var l = function() {
|
|
3341
3394
|
};
|
|
3342
3395
|
l.prototype = r.prototype, i.prototype = new l(), l.prototype = null;
|
|
3343
3396
|
}
|
|
3344
3397
|
return i;
|
|
3345
|
-
},
|
|
3398
|
+
}, qs = Ms, Or = Function.prototype.bind || qs, js = Function.prototype.call, Us = Object.prototype.hasOwnProperty, xs = Or, Qs = xs.call(js, Us), T, Gs = Is, Ks = Ts, zs = Os, Hs = _s, ze = Zn, Ke = Vt, Ws = Ls, ei = Function, Ut = function(t) {
|
|
3346
3399
|
try {
|
|
3347
|
-
return
|
|
3400
|
+
return ei('"use strict"; return (' + t + ").constructor;")();
|
|
3348
3401
|
} catch {
|
|
3349
3402
|
}
|
|
3350
3403
|
}, ke = Object.getOwnPropertyDescriptor;
|
|
@@ -3355,8 +3408,8 @@ if (ke)
|
|
|
3355
3408
|
ke = null;
|
|
3356
3409
|
}
|
|
3357
3410
|
var xt = function() {
|
|
3358
|
-
throw new
|
|
3359
|
-
},
|
|
3411
|
+
throw new Ke();
|
|
3412
|
+
}, Ys = ke ? function() {
|
|
3360
3413
|
try {
|
|
3361
3414
|
return arguments.callee, xt;
|
|
3362
3415
|
} catch {
|
|
@@ -3366,19 +3419,19 @@ var xt = function() {
|
|
|
3366
3419
|
return xt;
|
|
3367
3420
|
}
|
|
3368
3421
|
}
|
|
3369
|
-
}() : xt,
|
|
3422
|
+
}() : xt, Be = ks(), Js = Ns(), j = Object.getPrototypeOf || (Js ? function(t) {
|
|
3370
3423
|
return t.__proto__;
|
|
3371
|
-
} : null),
|
|
3424
|
+
} : null), qe = {}, Xs = typeof Uint8Array > "u" || !j ? T : j(Uint8Array), Pe = {
|
|
3372
3425
|
__proto__: null,
|
|
3373
3426
|
"%AggregateError%": typeof AggregateError > "u" ? T : AggregateError,
|
|
3374
3427
|
"%Array%": Array,
|
|
3375
3428
|
"%ArrayBuffer%": typeof ArrayBuffer > "u" ? T : ArrayBuffer,
|
|
3376
|
-
"%ArrayIteratorPrototype%":
|
|
3429
|
+
"%ArrayIteratorPrototype%": Be && j ? j([][Symbol.iterator]()) : T,
|
|
3377
3430
|
"%AsyncFromSyncIteratorPrototype%": T,
|
|
3378
|
-
"%AsyncFunction%":
|
|
3379
|
-
"%AsyncGenerator%":
|
|
3380
|
-
"%AsyncGeneratorFunction%":
|
|
3381
|
-
"%AsyncIteratorPrototype%":
|
|
3431
|
+
"%AsyncFunction%": qe,
|
|
3432
|
+
"%AsyncGenerator%": qe,
|
|
3433
|
+
"%AsyncGeneratorFunction%": qe,
|
|
3434
|
+
"%AsyncIteratorPrototype%": qe,
|
|
3382
3435
|
"%Atomics%": typeof Atomics > "u" ? T : Atomics,
|
|
3383
3436
|
"%BigInt%": typeof BigInt > "u" ? T : BigInt,
|
|
3384
3437
|
"%BigInt64Array%": typeof BigInt64Array > "u" ? T : BigInt64Array,
|
|
@@ -3390,24 +3443,24 @@ var xt = function() {
|
|
|
3390
3443
|
"%decodeURIComponent%": decodeURIComponent,
|
|
3391
3444
|
"%encodeURI%": encodeURI,
|
|
3392
3445
|
"%encodeURIComponent%": encodeURIComponent,
|
|
3393
|
-
"%Error%":
|
|
3446
|
+
"%Error%": Gs,
|
|
3394
3447
|
"%eval%": eval,
|
|
3395
3448
|
// eslint-disable-line no-eval
|
|
3396
|
-
"%EvalError%":
|
|
3449
|
+
"%EvalError%": Ks,
|
|
3397
3450
|
"%Float32Array%": typeof Float32Array > "u" ? T : Float32Array,
|
|
3398
3451
|
"%Float64Array%": typeof Float64Array > "u" ? T : Float64Array,
|
|
3399
3452
|
"%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? T : FinalizationRegistry,
|
|
3400
|
-
"%Function%":
|
|
3401
|
-
"%GeneratorFunction%":
|
|
3453
|
+
"%Function%": ei,
|
|
3454
|
+
"%GeneratorFunction%": qe,
|
|
3402
3455
|
"%Int8Array%": typeof Int8Array > "u" ? T : Int8Array,
|
|
3403
3456
|
"%Int16Array%": typeof Int16Array > "u" ? T : Int16Array,
|
|
3404
3457
|
"%Int32Array%": typeof Int32Array > "u" ? T : Int32Array,
|
|
3405
3458
|
"%isFinite%": isFinite,
|
|
3406
3459
|
"%isNaN%": isNaN,
|
|
3407
|
-
"%IteratorPrototype%":
|
|
3460
|
+
"%IteratorPrototype%": Be && j ? j(j([][Symbol.iterator]())) : T,
|
|
3408
3461
|
"%JSON%": typeof JSON == "object" ? JSON : T,
|
|
3409
3462
|
"%Map%": typeof Map > "u" ? T : Map,
|
|
3410
|
-
"%MapIteratorPrototype%": typeof Map > "u" ||
|
|
3463
|
+
"%MapIteratorPrototype%": typeof Map > "u" || !Be || !j ? T : j((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
3411
3464
|
"%Math%": Math,
|
|
3412
3465
|
"%Number%": Number,
|
|
3413
3466
|
"%Object%": Object,
|
|
@@ -3415,25 +3468,25 @@ var xt = function() {
|
|
|
3415
3468
|
"%parseInt%": parseInt,
|
|
3416
3469
|
"%Promise%": typeof Promise > "u" ? T : Promise,
|
|
3417
3470
|
"%Proxy%": typeof Proxy > "u" ? T : Proxy,
|
|
3418
|
-
"%RangeError%":
|
|
3419
|
-
"%ReferenceError%":
|
|
3471
|
+
"%RangeError%": zs,
|
|
3472
|
+
"%ReferenceError%": Hs,
|
|
3420
3473
|
"%Reflect%": typeof Reflect > "u" ? T : Reflect,
|
|
3421
3474
|
"%RegExp%": RegExp,
|
|
3422
3475
|
"%Set%": typeof Set > "u" ? T : Set,
|
|
3423
|
-
"%SetIteratorPrototype%": typeof Set > "u" ||
|
|
3476
|
+
"%SetIteratorPrototype%": typeof Set > "u" || !Be || !j ? T : j((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
3424
3477
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? T : SharedArrayBuffer,
|
|
3425
3478
|
"%String%": String,
|
|
3426
|
-
"%StringIteratorPrototype%":
|
|
3427
|
-
"%Symbol%":
|
|
3428
|
-
"%SyntaxError%":
|
|
3429
|
-
"%ThrowTypeError%":
|
|
3430
|
-
"%TypedArray%":
|
|
3431
|
-
"%TypeError%":
|
|
3479
|
+
"%StringIteratorPrototype%": Be && j ? j(""[Symbol.iterator]()) : T,
|
|
3480
|
+
"%Symbol%": Be ? Symbol : T,
|
|
3481
|
+
"%SyntaxError%": ze,
|
|
3482
|
+
"%ThrowTypeError%": Ys,
|
|
3483
|
+
"%TypedArray%": Xs,
|
|
3484
|
+
"%TypeError%": Ke,
|
|
3432
3485
|
"%Uint8Array%": typeof Uint8Array > "u" ? T : Uint8Array,
|
|
3433
3486
|
"%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? T : Uint8ClampedArray,
|
|
3434
3487
|
"%Uint16Array%": typeof Uint16Array > "u" ? T : Uint16Array,
|
|
3435
3488
|
"%Uint32Array%": typeof Uint32Array > "u" ? T : Uint32Array,
|
|
3436
|
-
"%URIError%":
|
|
3489
|
+
"%URIError%": Ws,
|
|
3437
3490
|
"%WeakMap%": typeof WeakMap > "u" ? T : WeakMap,
|
|
3438
3491
|
"%WeakRef%": typeof WeakRef > "u" ? T : WeakRef,
|
|
3439
3492
|
"%WeakSet%": typeof WeakSet > "u" ? T : WeakSet
|
|
@@ -3442,17 +3495,17 @@ if (j)
|
|
|
3442
3495
|
try {
|
|
3443
3496
|
null.error;
|
|
3444
3497
|
} catch (t) {
|
|
3445
|
-
var
|
|
3446
|
-
Pe["%Error.prototype%"] =
|
|
3498
|
+
var Zs = j(j(t));
|
|
3499
|
+
Pe["%Error.prototype%"] = Zs;
|
|
3447
3500
|
}
|
|
3448
|
-
var
|
|
3501
|
+
var ea = function t(e) {
|
|
3449
3502
|
var r;
|
|
3450
3503
|
if (e === "%AsyncFunction%")
|
|
3451
|
-
r =
|
|
3504
|
+
r = Ut("async function () {}");
|
|
3452
3505
|
else if (e === "%GeneratorFunction%")
|
|
3453
|
-
r =
|
|
3506
|
+
r = Ut("function* () {}");
|
|
3454
3507
|
else if (e === "%AsyncGeneratorFunction%")
|
|
3455
|
-
r =
|
|
3508
|
+
r = Ut("async function* () {}");
|
|
3456
3509
|
else if (e === "%AsyncGenerator%") {
|
|
3457
3510
|
var n = t("%AsyncGeneratorFunction%");
|
|
3458
3511
|
n && (r = n.prototype);
|
|
@@ -3461,7 +3514,7 @@ var Zs = function t(e) {
|
|
|
3461
3514
|
i && j && (r = j(i.prototype));
|
|
3462
3515
|
}
|
|
3463
3516
|
return Pe[e] = r, r;
|
|
3464
|
-
},
|
|
3517
|
+
}, sn = {
|
|
3465
3518
|
__proto__: null,
|
|
3466
3519
|
"%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
|
|
3467
3520
|
"%ArrayPrototype%": ["Array", "prototype"],
|
|
@@ -3514,48 +3567,48 @@ var Zs = function t(e) {
|
|
|
3514
3567
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
3515
3568
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3516
3569
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3517
|
-
},
|
|
3570
|
+
}, ot = Or, Et = Qs, ta = ot.call(Function.call, Array.prototype.concat), ra = ot.call(Function.apply, Array.prototype.splice), an = ot.call(Function.call, String.prototype.replace), It = ot.call(Function.call, String.prototype.slice), na = ot.call(Function.call, RegExp.prototype.exec), ia = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, oa = /\\(\\)?/g, sa = function(e) {
|
|
3518
3571
|
var r = It(e, 0, 1), n = It(e, -1);
|
|
3519
3572
|
if (r === "%" && n !== "%")
|
|
3520
|
-
throw new
|
|
3573
|
+
throw new ze("invalid intrinsic syntax, expected closing `%`");
|
|
3521
3574
|
if (n === "%" && r !== "%")
|
|
3522
|
-
throw new
|
|
3575
|
+
throw new ze("invalid intrinsic syntax, expected opening `%`");
|
|
3523
3576
|
var i = [];
|
|
3524
|
-
return
|
|
3525
|
-
i[i.length] = a ?
|
|
3577
|
+
return an(e, ia, function(o, s, a, u) {
|
|
3578
|
+
i[i.length] = a ? an(u, oa, "$1") : s || o;
|
|
3526
3579
|
}), i;
|
|
3527
|
-
},
|
|
3580
|
+
}, aa = function(e, r) {
|
|
3528
3581
|
var n = e, i;
|
|
3529
|
-
if (Et(
|
|
3582
|
+
if (Et(sn, n) && (i = sn[n], n = "%" + i[0] + "%"), Et(Pe, n)) {
|
|
3530
3583
|
var o = Pe[n];
|
|
3531
|
-
if (o ===
|
|
3532
|
-
throw new
|
|
3584
|
+
if (o === qe && (o = ea(n)), typeof o > "u" && !r)
|
|
3585
|
+
throw new Ke("intrinsic " + e + " exists, but is not available. Please file an issue!");
|
|
3533
3586
|
return {
|
|
3534
3587
|
alias: i,
|
|
3535
3588
|
name: n,
|
|
3536
3589
|
value: o
|
|
3537
3590
|
};
|
|
3538
3591
|
}
|
|
3539
|
-
throw new
|
|
3540
|
-
},
|
|
3592
|
+
throw new ze("intrinsic " + e + " does not exist!");
|
|
3593
|
+
}, st = function(e, r) {
|
|
3541
3594
|
if (typeof e != "string" || e.length === 0)
|
|
3542
|
-
throw new
|
|
3595
|
+
throw new Ke("intrinsic name must be a non-empty string");
|
|
3543
3596
|
if (arguments.length > 1 && typeof r != "boolean")
|
|
3544
|
-
throw new
|
|
3545
|
-
if (
|
|
3546
|
-
throw new
|
|
3547
|
-
var n =
|
|
3548
|
-
l && (i = l[0],
|
|
3597
|
+
throw new Ke('"allowMissing" argument must be a boolean');
|
|
3598
|
+
if (na(/^%?[^%]*%?$/, e) === null)
|
|
3599
|
+
throw new ze("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
3600
|
+
var n = sa(e), i = n.length > 0 ? n[0] : "", o = aa("%" + i + "%", r), s = o.name, a = o.value, u = !1, l = o.alias;
|
|
3601
|
+
l && (i = l[0], ra(n, ta([0, 1], l)));
|
|
3549
3602
|
for (var c = 1, f = !0; c < n.length; c += 1) {
|
|
3550
3603
|
var p = n[c], v = It(p, 0, 1), w = It(p, -1);
|
|
3551
3604
|
if ((v === '"' || v === "'" || v === "`" || w === '"' || w === "'" || w === "`") && v !== w)
|
|
3552
|
-
throw new
|
|
3605
|
+
throw new ze("property names with quotes must have matching quotes");
|
|
3553
3606
|
if ((p === "constructor" || !f) && (u = !0), i += "." + p, s = "%" + i + "%", Et(Pe, s))
|
|
3554
3607
|
a = Pe[s];
|
|
3555
3608
|
else if (a != null) {
|
|
3556
3609
|
if (!(p in a)) {
|
|
3557
3610
|
if (!r)
|
|
3558
|
-
throw new
|
|
3611
|
+
throw new Ke("base intrinsic for " + e + " exists, but the property is not available.");
|
|
3559
3612
|
return;
|
|
3560
3613
|
}
|
|
3561
3614
|
if (ke && c + 1 >= n.length) {
|
|
@@ -3567,11 +3620,11 @@ var Zs = function t(e) {
|
|
|
3567
3620
|
}
|
|
3568
3621
|
}
|
|
3569
3622
|
return a;
|
|
3570
|
-
},
|
|
3571
|
-
function
|
|
3572
|
-
if (
|
|
3573
|
-
|
|
3574
|
-
var t =
|
|
3623
|
+
}, ti = { exports: {} }, Qt, un;
|
|
3624
|
+
function _r() {
|
|
3625
|
+
if (un) return Qt;
|
|
3626
|
+
un = 1;
|
|
3627
|
+
var t = st, e = t("%Object.defineProperty%", !0) || !1;
|
|
3575
3628
|
if (e)
|
|
3576
3629
|
try {
|
|
3577
3630
|
e({}, "a", { value: 1 });
|
|
@@ -3580,14 +3633,14 @@ function Or() {
|
|
|
3580
3633
|
}
|
|
3581
3634
|
return Qt = e, Qt;
|
|
3582
3635
|
}
|
|
3583
|
-
var
|
|
3636
|
+
var ua = st, mt = ua("%Object.getOwnPropertyDescriptor%", !0);
|
|
3584
3637
|
if (mt)
|
|
3585
3638
|
try {
|
|
3586
3639
|
mt([], "length");
|
|
3587
3640
|
} catch {
|
|
3588
3641
|
mt = null;
|
|
3589
3642
|
}
|
|
3590
|
-
var $t = mt,
|
|
3643
|
+
var $t = mt, cn = _r(), ca = Zn, Me = Vt, ln = $t, la = function(e, r, n) {
|
|
3591
3644
|
if (!e || typeof e != "object" && typeof e != "function")
|
|
3592
3645
|
throw new Me("`obj` must be an object or a function`");
|
|
3593
3646
|
if (typeof r != "string" && typeof r != "symbol")
|
|
@@ -3600,9 +3653,9 @@ var $t = mt, un = Or(), ua = Xn, Me = Vt, cn = $t, ca = function(e, r, n) {
|
|
|
3600
3653
|
throw new Me("`nonConfigurable`, if provided, must be a boolean or null");
|
|
3601
3654
|
if (arguments.length > 6 && typeof arguments[6] != "boolean")
|
|
3602
3655
|
throw new Me("`loose`, if provided, must be a boolean");
|
|
3603
|
-
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 = !!
|
|
3604
|
-
if (
|
|
3605
|
-
|
|
3656
|
+
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 = !!ln && ln(e, r);
|
|
3657
|
+
if (cn)
|
|
3658
|
+
cn(e, r, {
|
|
3606
3659
|
configurable: s === null && u ? u.configurable : !s,
|
|
3607
3660
|
enumerable: i === null && u ? u.enumerable : !i,
|
|
3608
3661
|
value: n,
|
|
@@ -3611,37 +3664,37 @@ var $t = mt, un = Or(), ua = Xn, Me = Vt, cn = $t, ca = function(e, r, n) {
|
|
|
3611
3664
|
else if (a || !i && !o && !s)
|
|
3612
3665
|
e[r] = n;
|
|
3613
3666
|
else
|
|
3614
|
-
throw new
|
|
3615
|
-
},
|
|
3616
|
-
return !!
|
|
3667
|
+
throw new ca("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
3668
|
+
}, lr = _r(), ri = function() {
|
|
3669
|
+
return !!lr;
|
|
3617
3670
|
};
|
|
3618
|
-
|
|
3619
|
-
if (!
|
|
3671
|
+
ri.hasArrayLengthDefineBug = function() {
|
|
3672
|
+
if (!lr)
|
|
3620
3673
|
return null;
|
|
3621
3674
|
try {
|
|
3622
|
-
return
|
|
3675
|
+
return lr([], "length", { value: 1 }).length !== 1;
|
|
3623
3676
|
} catch {
|
|
3624
3677
|
return !0;
|
|
3625
3678
|
}
|
|
3626
3679
|
};
|
|
3627
|
-
var
|
|
3680
|
+
var da = ri, fa = st, dn = la, pa = da(), fn = $t, pn = Vt, ha = fa("%Math.floor%"), ya = function(e, r) {
|
|
3628
3681
|
if (typeof e != "function")
|
|
3629
|
-
throw new
|
|
3630
|
-
if (typeof r != "number" || r < 0 || r > 4294967295 ||
|
|
3631
|
-
throw new
|
|
3682
|
+
throw new pn("`fn` is not a function");
|
|
3683
|
+
if (typeof r != "number" || r < 0 || r > 4294967295 || ha(r) !== r)
|
|
3684
|
+
throw new pn("`length` must be a positive 32-bit integer");
|
|
3632
3685
|
var n = arguments.length > 2 && !!arguments[2], i = !0, o = !0;
|
|
3633
|
-
if ("length" in e &&
|
|
3634
|
-
var s =
|
|
3686
|
+
if ("length" in e && fn) {
|
|
3687
|
+
var s = fn(e, "length");
|
|
3635
3688
|
s && !s.configurable && (i = !1), s && !s.writable && (o = !1);
|
|
3636
3689
|
}
|
|
3637
|
-
return (i || o || !n) && (
|
|
3690
|
+
return (i || o || !n) && (pa ? dn(
|
|
3638
3691
|
/** @type {Parameters<define>[0]} */
|
|
3639
3692
|
e,
|
|
3640
3693
|
"length",
|
|
3641
3694
|
r,
|
|
3642
3695
|
!0,
|
|
3643
3696
|
!0
|
|
3644
|
-
) :
|
|
3697
|
+
) : dn(
|
|
3645
3698
|
/** @type {Parameters<define>[0]} */
|
|
3646
3699
|
e,
|
|
3647
3700
|
"length",
|
|
@@ -3649,7 +3702,7 @@ var la = ti, da = ot, ln = ca, fa = la(), dn = $t, fn = Vt, pa = da("%Math.floor
|
|
|
3649
3702
|
)), e;
|
|
3650
3703
|
};
|
|
3651
3704
|
(function(t) {
|
|
3652
|
-
var e =
|
|
3705
|
+
var e = Or, r = st, n = ya, i = Vt, o = r("%Function.prototype.apply%"), s = r("%Function.prototype.call%"), a = r("%Reflect.apply%", !0) || e.call(s, o), u = _r(), l = r("%Math.max%");
|
|
3653
3706
|
t.exports = function(p) {
|
|
3654
3707
|
if (typeof p != "function")
|
|
3655
3708
|
throw new i("a function is required");
|
|
@@ -3664,122 +3717,122 @@ var la = ti, da = ot, ln = ca, fa = la(), dn = $t, fn = Vt, pa = da("%Math.floor
|
|
|
3664
3717
|
return a(e, o, arguments);
|
|
3665
3718
|
};
|
|
3666
3719
|
u ? u(t.exports, "apply", { value: c }) : t.exports.apply = c;
|
|
3667
|
-
})(
|
|
3668
|
-
var
|
|
3669
|
-
var n =
|
|
3670
|
-
return typeof n == "function" &&
|
|
3671
|
-
},
|
|
3672
|
-
return
|
|
3673
|
-
},
|
|
3674
|
-
return
|
|
3675
|
-
},
|
|
3676
|
-
return
|
|
3720
|
+
})(ti);
|
|
3721
|
+
var Lr = ti.exports, ni = st, ii = Lr, ma = ii(ni("String.prototype.indexOf")), Cr = function(e, r) {
|
|
3722
|
+
var n = ni(e, !!r);
|
|
3723
|
+
return typeof n == "function" && ma(e, ".prototype.") > -1 ? ii(n) : n;
|
|
3724
|
+
}, ga = Rt(), ba = Cr, dr = ba("Object.prototype.toString"), Bt = function(e) {
|
|
3725
|
+
return ga && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : dr(e) === "[object Arguments]";
|
|
3726
|
+
}, oi = function(e) {
|
|
3727
|
+
return Bt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && dr(e) !== "[object Array]" && dr(e.callee) === "[object Function]";
|
|
3728
|
+
}, va = function() {
|
|
3729
|
+
return Bt(arguments);
|
|
3677
3730
|
}();
|
|
3678
|
-
|
|
3679
|
-
var
|
|
3680
|
-
if (!
|
|
3731
|
+
Bt.isLegacyArguments = oi;
|
|
3732
|
+
var Sa = va ? Bt : oi, wa = Object.prototype.toString, Aa = Function.prototype.toString, Ea = /^\s*(?:function)?\*/, si = Rt(), Gt = Object.getPrototypeOf, Ia = function() {
|
|
3733
|
+
if (!si)
|
|
3681
3734
|
return !1;
|
|
3682
3735
|
try {
|
|
3683
3736
|
return Function("return function*() {}")();
|
|
3684
3737
|
} catch {
|
|
3685
3738
|
}
|
|
3686
|
-
}, Kt,
|
|
3739
|
+
}, Kt, Ta = function(e) {
|
|
3687
3740
|
if (typeof e != "function")
|
|
3688
3741
|
return !1;
|
|
3689
|
-
if (
|
|
3742
|
+
if (Ea.test(Aa.call(e)))
|
|
3690
3743
|
return !0;
|
|
3691
|
-
if (!
|
|
3692
|
-
var r =
|
|
3744
|
+
if (!si) {
|
|
3745
|
+
var r = wa.call(e);
|
|
3693
3746
|
return r === "[object GeneratorFunction]";
|
|
3694
3747
|
}
|
|
3695
3748
|
if (!Gt)
|
|
3696
3749
|
return !1;
|
|
3697
3750
|
if (typeof Kt > "u") {
|
|
3698
|
-
var n =
|
|
3751
|
+
var n = Ia();
|
|
3699
3752
|
Kt = n ? Gt(n) : !1;
|
|
3700
3753
|
}
|
|
3701
3754
|
return Gt(e) === Kt;
|
|
3702
|
-
},
|
|
3703
|
-
if (typeof
|
|
3755
|
+
}, ai = Function.prototype.toString, xe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, fr, gt;
|
|
3756
|
+
if (typeof xe == "function" && typeof Object.defineProperty == "function")
|
|
3704
3757
|
try {
|
|
3705
|
-
|
|
3758
|
+
fr = Object.defineProperty({}, "length", {
|
|
3706
3759
|
get: function() {
|
|
3707
3760
|
throw gt;
|
|
3708
3761
|
}
|
|
3709
|
-
}), gt = {},
|
|
3762
|
+
}), gt = {}, xe(function() {
|
|
3710
3763
|
throw 42;
|
|
3711
|
-
}, null,
|
|
3764
|
+
}, null, fr);
|
|
3712
3765
|
} catch (t) {
|
|
3713
|
-
t !== gt && (
|
|
3766
|
+
t !== gt && (xe = null);
|
|
3714
3767
|
}
|
|
3715
3768
|
else
|
|
3716
|
-
|
|
3717
|
-
var
|
|
3769
|
+
xe = null;
|
|
3770
|
+
var Oa = /^\s*class\b/, pr = function(e) {
|
|
3718
3771
|
try {
|
|
3719
|
-
var r =
|
|
3720
|
-
return
|
|
3772
|
+
var r = ai.call(e);
|
|
3773
|
+
return Oa.test(r);
|
|
3721
3774
|
} catch {
|
|
3722
3775
|
return !1;
|
|
3723
3776
|
}
|
|
3724
3777
|
}, zt = function(e) {
|
|
3725
3778
|
try {
|
|
3726
|
-
return
|
|
3779
|
+
return pr(e) ? !1 : (ai.call(e), !0);
|
|
3727
3780
|
} catch {
|
|
3728
3781
|
return !1;
|
|
3729
3782
|
}
|
|
3730
|
-
}, bt = Object.prototype.toString,
|
|
3783
|
+
}, bt = Object.prototype.toString, _a = "[object Object]", La = "[object Function]", Ca = "[object GeneratorFunction]", ka = "[object HTMLAllCollection]", Pa = "[object HTML document.all class]", Na = "[object HTMLCollection]", Fa = typeof Symbol == "function" && !!Symbol.toStringTag, Da = !(0 in [,]), hr = function() {
|
|
3731
3784
|
return !1;
|
|
3732
3785
|
};
|
|
3733
3786
|
if (typeof document == "object") {
|
|
3734
|
-
var
|
|
3735
|
-
bt.call(
|
|
3736
|
-
if ((
|
|
3787
|
+
var Ra = document.all;
|
|
3788
|
+
bt.call(Ra) === bt.call(document.all) && (hr = function(e) {
|
|
3789
|
+
if ((Da || !e) && (typeof e > "u" || typeof e == "object"))
|
|
3737
3790
|
try {
|
|
3738
3791
|
var r = bt.call(e);
|
|
3739
|
-
return (r ===
|
|
3792
|
+
return (r === ka || r === Pa || r === Na || r === _a) && e("") == null;
|
|
3740
3793
|
} catch {
|
|
3741
3794
|
}
|
|
3742
3795
|
return !1;
|
|
3743
3796
|
});
|
|
3744
3797
|
}
|
|
3745
|
-
var
|
|
3746
|
-
if (
|
|
3798
|
+
var Va = xe ? function(e) {
|
|
3799
|
+
if (hr(e))
|
|
3747
3800
|
return !0;
|
|
3748
3801
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3749
3802
|
return !1;
|
|
3750
3803
|
try {
|
|
3751
|
-
|
|
3804
|
+
xe(e, null, fr);
|
|
3752
3805
|
} catch (r) {
|
|
3753
3806
|
if (r !== gt)
|
|
3754
3807
|
return !1;
|
|
3755
3808
|
}
|
|
3756
|
-
return !
|
|
3809
|
+
return !pr(e) && zt(e);
|
|
3757
3810
|
} : function(e) {
|
|
3758
|
-
if (
|
|
3811
|
+
if (hr(e))
|
|
3759
3812
|
return !0;
|
|
3760
3813
|
if (!e || typeof e != "function" && typeof e != "object")
|
|
3761
3814
|
return !1;
|
|
3762
|
-
if (
|
|
3815
|
+
if (Fa)
|
|
3763
3816
|
return zt(e);
|
|
3764
|
-
if (
|
|
3817
|
+
if (pr(e))
|
|
3765
3818
|
return !1;
|
|
3766
3819
|
var r = bt.call(e);
|
|
3767
|
-
return r !==
|
|
3768
|
-
},
|
|
3820
|
+
return r !== La && r !== Ca && !/^\[object HTML/.test(r) ? !1 : zt(e);
|
|
3821
|
+
}, $a = Va, Ba = Object.prototype.toString, ui = Object.prototype.hasOwnProperty, Ma = function(e, r, n) {
|
|
3769
3822
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3770
|
-
|
|
3771
|
-
},
|
|
3823
|
+
ui.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3824
|
+
}, qa = function(e, r, n) {
|
|
3772
3825
|
for (var i = 0, o = e.length; i < o; i++)
|
|
3773
3826
|
n == null ? r(e.charAt(i), i, e) : r.call(n, e.charAt(i), i, e);
|
|
3774
3827
|
}, ja = function(e, r, n) {
|
|
3775
3828
|
for (var i in e)
|
|
3776
|
-
|
|
3829
|
+
ui.call(e, i) && (n == null ? r(e[i], i, e) : r.call(n, e[i], i, e));
|
|
3777
3830
|
}, Ua = function(e, r, n) {
|
|
3778
|
-
if (
|
|
3831
|
+
if (!$a(r))
|
|
3779
3832
|
throw new TypeError("iterator must be a function");
|
|
3780
3833
|
var i;
|
|
3781
|
-
arguments.length >= 3 && (i = n),
|
|
3782
|
-
},
|
|
3834
|
+
arguments.length >= 3 && (i = n), Ba.call(e) === "[object Array]" ? Ma(e, r, i) : typeof e == "string" ? qa(e, r, i) : ja(e, r, i);
|
|
3835
|
+
}, ci = Ua, xa = [
|
|
3783
3836
|
"Float32Array",
|
|
3784
3837
|
"Float64Array",
|
|
3785
3838
|
"Int8Array",
|
|
@@ -3791,121 +3844,121 @@ var Ra = qe ? function(e) {
|
|
|
3791
3844
|
"Uint32Array",
|
|
3792
3845
|
"BigInt64Array",
|
|
3793
3846
|
"BigUint64Array"
|
|
3794
|
-
], Ht =
|
|
3847
|
+
], Ht = xa, Qa = typeof globalThis > "u" ? Ar : globalThis, li = function() {
|
|
3795
3848
|
for (var e = [], r = 0; r < Ht.length; r++)
|
|
3796
|
-
typeof
|
|
3849
|
+
typeof Qa[Ht[r]] == "function" && (e[e.length] = Ht[r]);
|
|
3797
3850
|
return e;
|
|
3798
|
-
}, Tt =
|
|
3851
|
+
}, Tt = ci, Ga = li, hn = Lr, kr = Cr, vt = $t, Ka = kr("Object.prototype.toString"), di = Rt(), yn = typeof globalThis > "u" ? Ar : globalThis, yr = Ga(), Pr = kr("String.prototype.slice"), Wt = Object.getPrototypeOf, za = kr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3799
3852
|
for (var n = 0; n < e.length; n += 1)
|
|
3800
3853
|
if (e[n] === r)
|
|
3801
3854
|
return n;
|
|
3802
3855
|
return -1;
|
|
3803
3856
|
}, Ot = { __proto__: null };
|
|
3804
|
-
|
|
3805
|
-
var e = new
|
|
3857
|
+
di && vt && Wt ? Tt(yr, function(t) {
|
|
3858
|
+
var e = new yn[t]();
|
|
3806
3859
|
if (Symbol.toStringTag in e) {
|
|
3807
3860
|
var r = Wt(e), n = vt(r, Symbol.toStringTag);
|
|
3808
3861
|
if (!n) {
|
|
3809
3862
|
var i = Wt(r);
|
|
3810
3863
|
n = vt(i, Symbol.toStringTag);
|
|
3811
3864
|
}
|
|
3812
|
-
Ot["$" + t] =
|
|
3865
|
+
Ot["$" + t] = hn(n.get);
|
|
3813
3866
|
}
|
|
3814
|
-
}) : Tt(
|
|
3815
|
-
var e = new
|
|
3816
|
-
r && (Ot["$" + t] =
|
|
3867
|
+
}) : Tt(yr, function(t) {
|
|
3868
|
+
var e = new yn[t](), r = e.slice || e.set;
|
|
3869
|
+
r && (Ot["$" + t] = hn(r));
|
|
3817
3870
|
});
|
|
3818
|
-
var
|
|
3871
|
+
var Ha = function(e) {
|
|
3819
3872
|
var r = !1;
|
|
3820
3873
|
return Tt(Ot, function(n, i) {
|
|
3821
3874
|
if (!r)
|
|
3822
3875
|
try {
|
|
3823
|
-
"$" + n(e) === i && (r =
|
|
3876
|
+
"$" + n(e) === i && (r = Pr(i, 1));
|
|
3824
3877
|
} catch {
|
|
3825
3878
|
}
|
|
3826
3879
|
}), r;
|
|
3827
|
-
},
|
|
3880
|
+
}, Wa = function(e) {
|
|
3828
3881
|
var r = !1;
|
|
3829
3882
|
return Tt(Ot, function(n, i) {
|
|
3830
3883
|
if (!r)
|
|
3831
3884
|
try {
|
|
3832
|
-
n(e), r =
|
|
3885
|
+
n(e), r = Pr(i, 1);
|
|
3833
3886
|
} catch {
|
|
3834
3887
|
}
|
|
3835
3888
|
}), r;
|
|
3836
|
-
},
|
|
3889
|
+
}, Ya = function(e) {
|
|
3837
3890
|
if (!e || typeof e != "object")
|
|
3838
3891
|
return !1;
|
|
3839
|
-
if (!
|
|
3840
|
-
var r =
|
|
3841
|
-
return
|
|
3892
|
+
if (!di) {
|
|
3893
|
+
var r = Pr(Ka(e), 8, -1);
|
|
3894
|
+
return za(yr, r) > -1 ? r : r !== "Object" ? !1 : Wa(e);
|
|
3842
3895
|
}
|
|
3843
|
-
return vt ?
|
|
3844
|
-
}, _t =
|
|
3896
|
+
return vt ? Ha(e) : null;
|
|
3897
|
+
}, _t = ci, Ja = li, mn = Lr, Nr = Cr, St = $t, Xa = Nr("Object.prototype.toString"), fi = Rt(), gn = typeof globalThis > "u" ? Ar : globalThis, mr = Ja(), Fr = Nr("String.prototype.slice"), Yt = Object.getPrototypeOf, Za = Nr("Array.prototype.indexOf", !0) || function(e, r) {
|
|
3845
3898
|
for (var n = 0; n < e.length; n += 1)
|
|
3846
3899
|
if (e[n] === r)
|
|
3847
3900
|
return n;
|
|
3848
3901
|
return -1;
|
|
3849
|
-
},
|
|
3850
|
-
|
|
3851
|
-
var e = new
|
|
3902
|
+
}, Lt = { __proto__: null };
|
|
3903
|
+
fi && St && Yt ? _t(mr, function(t) {
|
|
3904
|
+
var e = new gn[t]();
|
|
3852
3905
|
if (Symbol.toStringTag in e) {
|
|
3853
3906
|
var r = Yt(e), n = St(r, Symbol.toStringTag);
|
|
3854
3907
|
if (!n) {
|
|
3855
3908
|
var i = Yt(r);
|
|
3856
3909
|
n = St(i, Symbol.toStringTag);
|
|
3857
3910
|
}
|
|
3858
|
-
|
|
3911
|
+
Lt["$" + t] = mn(n.get);
|
|
3859
3912
|
}
|
|
3860
|
-
}) : _t(
|
|
3861
|
-
var e = new
|
|
3862
|
-
r && (
|
|
3913
|
+
}) : _t(mr, function(t) {
|
|
3914
|
+
var e = new gn[t](), r = e.slice || e.set;
|
|
3915
|
+
r && (Lt["$" + t] = mn(r));
|
|
3863
3916
|
});
|
|
3864
|
-
var
|
|
3917
|
+
var eu = function(e) {
|
|
3865
3918
|
var r = !1;
|
|
3866
3919
|
return _t(
|
|
3867
3920
|
// eslint-disable-next-line no-extra-parens
|
|
3868
3921
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3869
3922
|
/** @type {any} */
|
|
3870
|
-
|
|
3923
|
+
Lt,
|
|
3871
3924
|
/** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3872
3925
|
function(n, i) {
|
|
3873
3926
|
if (!r)
|
|
3874
3927
|
try {
|
|
3875
|
-
"$" + n(e) === i && (r =
|
|
3928
|
+
"$" + n(e) === i && (r = Fr(i, 1));
|
|
3876
3929
|
} catch {
|
|
3877
3930
|
}
|
|
3878
3931
|
}
|
|
3879
3932
|
), r;
|
|
3880
|
-
},
|
|
3933
|
+
}, tu = function(e) {
|
|
3881
3934
|
var r = !1;
|
|
3882
3935
|
return _t(
|
|
3883
3936
|
// eslint-disable-next-line no-extra-parens
|
|
3884
3937
|
/** @type {Record<`\$${TypedArrayName}`, Getter>} */
|
|
3885
3938
|
/** @type {any} */
|
|
3886
|
-
|
|
3939
|
+
Lt,
|
|
3887
3940
|
/** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
|
|
3888
3941
|
function(n, i) {
|
|
3889
3942
|
if (!r)
|
|
3890
3943
|
try {
|
|
3891
|
-
n(e), r =
|
|
3944
|
+
n(e), r = Fr(i, 1);
|
|
3892
3945
|
} catch {
|
|
3893
3946
|
}
|
|
3894
3947
|
}
|
|
3895
3948
|
), r;
|
|
3896
|
-
},
|
|
3949
|
+
}, ru = function(e) {
|
|
3897
3950
|
if (!e || typeof e != "object")
|
|
3898
3951
|
return !1;
|
|
3899
|
-
if (!
|
|
3900
|
-
var r =
|
|
3901
|
-
return
|
|
3952
|
+
if (!fi) {
|
|
3953
|
+
var r = Fr(Xa(e), 8, -1);
|
|
3954
|
+
return Za(mr, r) > -1 ? r : r !== "Object" ? !1 : tu(e);
|
|
3902
3955
|
}
|
|
3903
|
-
return St ?
|
|
3904
|
-
},
|
|
3905
|
-
return !!
|
|
3956
|
+
return St ? eu(e) : null;
|
|
3957
|
+
}, nu = ru, iu = function(e) {
|
|
3958
|
+
return !!nu(e);
|
|
3906
3959
|
};
|
|
3907
3960
|
(function(t) {
|
|
3908
|
-
var e =
|
|
3961
|
+
var e = Sa, r = Ta, n = Ya, i = iu;
|
|
3909
3962
|
function o(y) {
|
|
3910
3963
|
return y.call.bind(y);
|
|
3911
3964
|
}
|
|
@@ -3914,11 +3967,11 @@ var Za = function(e) {
|
|
|
3914
3967
|
var p = o(BigInt.prototype.valueOf);
|
|
3915
3968
|
if (a)
|
|
3916
3969
|
var v = o(Symbol.prototype.valueOf);
|
|
3917
|
-
function w(y,
|
|
3970
|
+
function w(y, vi) {
|
|
3918
3971
|
if (typeof y != "object")
|
|
3919
3972
|
return !1;
|
|
3920
3973
|
try {
|
|
3921
|
-
return
|
|
3974
|
+
return vi(y), !0;
|
|
3922
3975
|
} catch {
|
|
3923
3976
|
return !1;
|
|
3924
3977
|
}
|
|
@@ -3936,18 +3989,18 @@ var Za = function(e) {
|
|
|
3936
3989
|
return n(y) === "Uint8Array";
|
|
3937
3990
|
}
|
|
3938
3991
|
t.isUint8Array = S;
|
|
3939
|
-
function
|
|
3992
|
+
function F(y) {
|
|
3940
3993
|
return n(y) === "Uint8ClampedArray";
|
|
3941
3994
|
}
|
|
3942
|
-
t.isUint8ClampedArray =
|
|
3995
|
+
t.isUint8ClampedArray = F;
|
|
3943
3996
|
function K(y) {
|
|
3944
3997
|
return n(y) === "Uint16Array";
|
|
3945
3998
|
}
|
|
3946
3999
|
t.isUint16Array = K;
|
|
3947
|
-
function
|
|
4000
|
+
function re(y) {
|
|
3948
4001
|
return n(y) === "Uint32Array";
|
|
3949
4002
|
}
|
|
3950
|
-
t.isUint32Array =
|
|
4003
|
+
t.isUint32Array = re;
|
|
3951
4004
|
function P(y) {
|
|
3952
4005
|
return n(y) === "Int8Array";
|
|
3953
4006
|
}
|
|
@@ -3980,26 +4033,26 @@ var Za = function(e) {
|
|
|
3980
4033
|
return u(y) === "[object Map]";
|
|
3981
4034
|
}
|
|
3982
4035
|
de.working = typeof Map < "u" && de(/* @__PURE__ */ new Map());
|
|
3983
|
-
function
|
|
4036
|
+
function Mt(y) {
|
|
3984
4037
|
return typeof Map > "u" ? !1 : de.working ? de(y) : y instanceof Map;
|
|
3985
4038
|
}
|
|
3986
|
-
t.isMap =
|
|
4039
|
+
t.isMap = Mt;
|
|
3987
4040
|
function we(y) {
|
|
3988
4041
|
return u(y) === "[object Set]";
|
|
3989
4042
|
}
|
|
3990
4043
|
we.working = typeof Set < "u" && we(/* @__PURE__ */ new Set());
|
|
3991
|
-
function
|
|
4044
|
+
function Je(y) {
|
|
3992
4045
|
return typeof Set > "u" ? !1 : we.working ? we(y) : y instanceof Set;
|
|
3993
4046
|
}
|
|
3994
|
-
t.isSet =
|
|
4047
|
+
t.isSet = Je;
|
|
3995
4048
|
function Fe(y) {
|
|
3996
4049
|
return u(y) === "[object WeakMap]";
|
|
3997
4050
|
}
|
|
3998
4051
|
Fe.working = typeof WeakMap < "u" && Fe(/* @__PURE__ */ new WeakMap());
|
|
3999
|
-
function
|
|
4052
|
+
function qt(y) {
|
|
4000
4053
|
return typeof WeakMap > "u" ? !1 : Fe.working ? Fe(y) : y instanceof WeakMap;
|
|
4001
4054
|
}
|
|
4002
|
-
t.isWeakMap =
|
|
4055
|
+
t.isWeakMap = qt;
|
|
4003
4056
|
function De(y) {
|
|
4004
4057
|
return u(y) === "[object WeakSet]";
|
|
4005
4058
|
}
|
|
@@ -4012,10 +4065,10 @@ var Za = function(e) {
|
|
|
4012
4065
|
return u(y) === "[object ArrayBuffer]";
|
|
4013
4066
|
}
|
|
4014
4067
|
Re.working = typeof ArrayBuffer < "u" && Re(new ArrayBuffer());
|
|
4015
|
-
function
|
|
4068
|
+
function at(y) {
|
|
4016
4069
|
return typeof ArrayBuffer > "u" ? !1 : Re.working ? Re(y) : y instanceof ArrayBuffer;
|
|
4017
4070
|
}
|
|
4018
|
-
t.isArrayBuffer =
|
|
4071
|
+
t.isArrayBuffer = at;
|
|
4019
4072
|
function d(y) {
|
|
4020
4073
|
return u(y) === "[object DataView]";
|
|
4021
4074
|
}
|
|
@@ -4028,10 +4081,10 @@ var Za = function(e) {
|
|
|
4028
4081
|
function A(y) {
|
|
4029
4082
|
return u(y) === "[object SharedArrayBuffer]";
|
|
4030
4083
|
}
|
|
4031
|
-
function
|
|
4084
|
+
function C(y) {
|
|
4032
4085
|
return typeof m > "u" ? !1 : (typeof A.working > "u" && (A.working = A(new m())), A.working ? A(y) : y instanceof m);
|
|
4033
4086
|
}
|
|
4034
|
-
t.isSharedArrayBuffer =
|
|
4087
|
+
t.isSharedArrayBuffer = C;
|
|
4035
4088
|
function k(y) {
|
|
4036
4089
|
return u(y) === "[object AsyncFunction]";
|
|
4037
4090
|
}
|
|
@@ -4040,14 +4093,14 @@ var Za = function(e) {
|
|
|
4040
4093
|
return u(y) === "[object Map Iterator]";
|
|
4041
4094
|
}
|
|
4042
4095
|
t.isMapIterator = I;
|
|
4043
|
-
function
|
|
4096
|
+
function L(y) {
|
|
4044
4097
|
return u(y) === "[object Set Iterator]";
|
|
4045
4098
|
}
|
|
4046
|
-
t.isSetIterator =
|
|
4047
|
-
function
|
|
4099
|
+
t.isSetIterator = L;
|
|
4100
|
+
function D(y) {
|
|
4048
4101
|
return u(y) === "[object Generator]";
|
|
4049
4102
|
}
|
|
4050
|
-
t.isGeneratorObject =
|
|
4103
|
+
t.isGeneratorObject = D;
|
|
4051
4104
|
function H(y) {
|
|
4052
4105
|
return u(y) === "[object WebAssembly.Module]";
|
|
4053
4106
|
}
|
|
@@ -4056,30 +4109,30 @@ var Za = function(e) {
|
|
|
4056
4109
|
return w(y, l);
|
|
4057
4110
|
}
|
|
4058
4111
|
t.isNumberObject = Te;
|
|
4059
|
-
function
|
|
4112
|
+
function ut(y) {
|
|
4060
4113
|
return w(y, c);
|
|
4061
4114
|
}
|
|
4062
|
-
t.isStringObject =
|
|
4115
|
+
t.isStringObject = ut;
|
|
4063
4116
|
function Ve(y) {
|
|
4064
4117
|
return w(y, f);
|
|
4065
4118
|
}
|
|
4066
4119
|
t.isBooleanObject = Ve;
|
|
4067
|
-
function
|
|
4120
|
+
function ct(y) {
|
|
4068
4121
|
return s && w(y, p);
|
|
4069
4122
|
}
|
|
4070
|
-
t.isBigIntObject =
|
|
4071
|
-
function
|
|
4123
|
+
t.isBigIntObject = ct;
|
|
4124
|
+
function Vr(y) {
|
|
4072
4125
|
return a && w(y, v);
|
|
4073
4126
|
}
|
|
4074
|
-
t.isSymbolObject =
|
|
4075
|
-
function mi(y) {
|
|
4076
|
-
return Te(y) || at(y) || Ve(y) || ut(y) || Rr(y);
|
|
4077
|
-
}
|
|
4078
|
-
t.isBoxedPrimitive = mi;
|
|
4127
|
+
t.isSymbolObject = Vr;
|
|
4079
4128
|
function gi(y) {
|
|
4080
|
-
return
|
|
4129
|
+
return Te(y) || ut(y) || Ve(y) || ct(y) || Vr(y);
|
|
4081
4130
|
}
|
|
4082
|
-
t.
|
|
4131
|
+
t.isBoxedPrimitive = gi;
|
|
4132
|
+
function bi(y) {
|
|
4133
|
+
return typeof Uint8Array < "u" && (at(y) || C(y));
|
|
4134
|
+
}
|
|
4135
|
+
t.isAnyArrayBuffer = bi, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(y) {
|
|
4083
4136
|
Object.defineProperty(t, y, {
|
|
4084
4137
|
enumerable: !1,
|
|
4085
4138
|
value: function() {
|
|
@@ -4087,11 +4140,11 @@ var Za = function(e) {
|
|
|
4087
4140
|
}
|
|
4088
4141
|
});
|
|
4089
4142
|
});
|
|
4090
|
-
})(
|
|
4091
|
-
var
|
|
4143
|
+
})(Jn);
|
|
4144
|
+
var ou = function(e) {
|
|
4092
4145
|
return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
|
|
4093
|
-
},
|
|
4094
|
-
typeof Object.create == "function" ?
|
|
4146
|
+
}, gr = { exports: {} };
|
|
4147
|
+
typeof Object.create == "function" ? gr.exports = function(e, r) {
|
|
4095
4148
|
r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
|
|
4096
4149
|
constructor: {
|
|
4097
4150
|
value: e,
|
|
@@ -4100,7 +4153,7 @@ typeof Object.create == "function" ? mr.exports = function(e, r) {
|
|
|
4100
4153
|
configurable: !0
|
|
4101
4154
|
}
|
|
4102
4155
|
}));
|
|
4103
|
-
} :
|
|
4156
|
+
} : gr.exports = function(e, r) {
|
|
4104
4157
|
if (r) {
|
|
4105
4158
|
e.super_ = r;
|
|
4106
4159
|
var n = function() {
|
|
@@ -4108,11 +4161,11 @@ typeof Object.create == "function" ? mr.exports = function(e, r) {
|
|
|
4108
4161
|
n.prototype = r.prototype, e.prototype = new n(), e.prototype.constructor = e;
|
|
4109
4162
|
}
|
|
4110
4163
|
};
|
|
4111
|
-
var
|
|
4164
|
+
var su = gr.exports;
|
|
4112
4165
|
(function(t) {
|
|
4113
4166
|
var e = Object.getOwnPropertyDescriptors || function(h) {
|
|
4114
|
-
for (var m = Object.keys(h), A = {},
|
|
4115
|
-
A[m[
|
|
4167
|
+
for (var m = Object.keys(h), A = {}, C = 0; C < m.length; C++)
|
|
4168
|
+
A[m[C]] = Object.getOwnPropertyDescriptor(h, m[C]);
|
|
4116
4169
|
return A;
|
|
4117
4170
|
}, r = /%[sdj%]/g;
|
|
4118
4171
|
t.format = function(d) {
|
|
@@ -4121,10 +4174,10 @@ var ou = mr.exports;
|
|
|
4121
4174
|
h.push(s(arguments[m]));
|
|
4122
4175
|
return h.join(" ");
|
|
4123
4176
|
}
|
|
4124
|
-
for (var m = 1, A = arguments,
|
|
4125
|
-
if (
|
|
4126
|
-
if (m >=
|
|
4127
|
-
switch (
|
|
4177
|
+
for (var m = 1, A = arguments, C = A.length, k = String(d).replace(r, function(L) {
|
|
4178
|
+
if (L === "%%") return "%";
|
|
4179
|
+
if (m >= C) return L;
|
|
4180
|
+
switch (L) {
|
|
4128
4181
|
case "%s":
|
|
4129
4182
|
return String(A[m++]);
|
|
4130
4183
|
case "%d":
|
|
@@ -4136,10 +4189,10 @@ var ou = mr.exports;
|
|
|
4136
4189
|
return "[Circular]";
|
|
4137
4190
|
}
|
|
4138
4191
|
default:
|
|
4139
|
-
return
|
|
4192
|
+
return L;
|
|
4140
4193
|
}
|
|
4141
|
-
}), I = A[m]; m <
|
|
4142
|
-
|
|
4194
|
+
}), I = A[m]; m < C; I = A[++m])
|
|
4195
|
+
F(I) || !oe(I) ? k += " " + I : k += " " + s(I);
|
|
4143
4196
|
return k;
|
|
4144
4197
|
}, t.deprecate = function(d, h) {
|
|
4145
4198
|
if (typeof E < "u" && E.noDeprecation === !0)
|
|
@@ -4229,16 +4282,16 @@ var ou = mr.exports;
|
|
|
4229
4282
|
var A = h.inspect(m, d);
|
|
4230
4283
|
return P(A) || (A = c(d, A, m)), A;
|
|
4231
4284
|
}
|
|
4232
|
-
var
|
|
4233
|
-
if (
|
|
4234
|
-
return
|
|
4285
|
+
var C = f(d, h);
|
|
4286
|
+
if (C)
|
|
4287
|
+
return C;
|
|
4235
4288
|
var k = Object.keys(h), I = l(k);
|
|
4236
4289
|
if (d.showHidden && (k = Object.getOwnPropertyNames(h)), Ie(h) && (k.indexOf("message") >= 0 || k.indexOf("description") >= 0))
|
|
4237
4290
|
return p(h);
|
|
4238
4291
|
if (k.length === 0) {
|
|
4239
4292
|
if (de(h)) {
|
|
4240
|
-
var
|
|
4241
|
-
return d.stylize("[Function" +
|
|
4293
|
+
var L = h.name ? ": " + h.name : "";
|
|
4294
|
+
return d.stylize("[Function" + L + "]", "special");
|
|
4242
4295
|
}
|
|
4243
4296
|
if (ie(h))
|
|
4244
4297
|
return d.stylize(RegExp.prototype.toString.call(h), "regexp");
|
|
@@ -4247,20 +4300,20 @@ var ou = mr.exports;
|
|
|
4247
4300
|
if (Ie(h))
|
|
4248
4301
|
return p(h);
|
|
4249
4302
|
}
|
|
4250
|
-
var
|
|
4303
|
+
var D = "", H = !1, Te = ["{", "}"];
|
|
4251
4304
|
if (g(h) && (H = !0, Te = ["[", "]"]), de(h)) {
|
|
4252
|
-
var
|
|
4253
|
-
|
|
4305
|
+
var ut = h.name ? ": " + h.name : "";
|
|
4306
|
+
D = " [Function" + ut + "]";
|
|
4254
4307
|
}
|
|
4255
|
-
if (ie(h) && (
|
|
4256
|
-
return Te[0] +
|
|
4308
|
+
if (ie(h) && (D = " " + RegExp.prototype.toString.call(h)), Ne(h) && (D = " " + Date.prototype.toUTCString.call(h)), Ie(h) && (D = " " + p(h)), k.length === 0 && (!H || h.length == 0))
|
|
4309
|
+
return Te[0] + D + Te[1];
|
|
4257
4310
|
if (m < 0)
|
|
4258
4311
|
return ie(h) ? d.stylize(RegExp.prototype.toString.call(h), "regexp") : d.stylize("[Object]", "special");
|
|
4259
4312
|
d.seen.push(h);
|
|
4260
4313
|
var Ve;
|
|
4261
|
-
return H ? Ve = v(d, h, m, I, k) : Ve = k.map(function(
|
|
4262
|
-
return w(d, h, m, I,
|
|
4263
|
-
}), d.seen.pop(), b(Ve,
|
|
4314
|
+
return H ? Ve = v(d, h, m, I, k) : Ve = k.map(function(ct) {
|
|
4315
|
+
return w(d, h, m, I, ct, H);
|
|
4316
|
+
}), d.seen.pop(), b(Ve, D, Te);
|
|
4264
4317
|
}
|
|
4265
4318
|
function f(d, h) {
|
|
4266
4319
|
if (O(h))
|
|
@@ -4269,18 +4322,18 @@ var ou = mr.exports;
|
|
|
4269
4322
|
var m = "'" + JSON.stringify(h).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
4270
4323
|
return d.stylize(m, "string");
|
|
4271
4324
|
}
|
|
4272
|
-
if (
|
|
4325
|
+
if (re(h))
|
|
4273
4326
|
return d.stylize("" + h, "number");
|
|
4274
4327
|
if (S(h))
|
|
4275
4328
|
return d.stylize("" + h, "boolean");
|
|
4276
|
-
if (
|
|
4329
|
+
if (F(h))
|
|
4277
4330
|
return d.stylize("null", "null");
|
|
4278
4331
|
}
|
|
4279
4332
|
function p(d) {
|
|
4280
4333
|
return "[" + Error.prototype.toString.call(d) + "]";
|
|
4281
4334
|
}
|
|
4282
|
-
function v(d, h, m, A,
|
|
4283
|
-
for (var k = [], I = 0,
|
|
4335
|
+
function v(d, h, m, A, C) {
|
|
4336
|
+
for (var k = [], I = 0, L = h.length; I < L; ++I)
|
|
4284
4337
|
De(h, String(I)) ? k.push(w(
|
|
4285
4338
|
d,
|
|
4286
4339
|
h,
|
|
@@ -4289,46 +4342,46 @@ var ou = mr.exports;
|
|
|
4289
4342
|
String(I),
|
|
4290
4343
|
!0
|
|
4291
4344
|
)) : k.push("");
|
|
4292
|
-
return
|
|
4293
|
-
|
|
4345
|
+
return C.forEach(function(D) {
|
|
4346
|
+
D.match(/^\d+$/) || k.push(w(
|
|
4294
4347
|
d,
|
|
4295
4348
|
h,
|
|
4296
4349
|
m,
|
|
4297
4350
|
A,
|
|
4298
|
-
|
|
4351
|
+
D,
|
|
4299
4352
|
!0
|
|
4300
4353
|
));
|
|
4301
4354
|
}), k;
|
|
4302
4355
|
}
|
|
4303
|
-
function w(d, h, m, A,
|
|
4304
|
-
var I,
|
|
4305
|
-
if (
|
|
4306
|
-
`) > -1 && (k ?
|
|
4356
|
+
function w(d, h, m, A, C, k) {
|
|
4357
|
+
var I, L, D;
|
|
4358
|
+
if (D = Object.getOwnPropertyDescriptor(h, C) || { value: h[C] }, D.get ? D.set ? L = d.stylize("[Getter/Setter]", "special") : L = d.stylize("[Getter]", "special") : D.set && (L = d.stylize("[Setter]", "special")), De(A, C) || (I = "[" + C + "]"), L || (d.seen.indexOf(D.value) < 0 ? (F(m) ? L = c(d, D.value, null) : L = c(d, D.value, m - 1), L.indexOf(`
|
|
4359
|
+
`) > -1 && (k ? L = L.split(`
|
|
4307
4360
|
`).map(function(H) {
|
|
4308
4361
|
return " " + H;
|
|
4309
4362
|
}).join(`
|
|
4310
|
-
`).slice(2) :
|
|
4311
|
-
` +
|
|
4363
|
+
`).slice(2) : L = `
|
|
4364
|
+
` + L.split(`
|
|
4312
4365
|
`).map(function(H) {
|
|
4313
4366
|
return " " + H;
|
|
4314
4367
|
}).join(`
|
|
4315
|
-
`))) :
|
|
4316
|
-
if (k &&
|
|
4317
|
-
return
|
|
4318
|
-
I = JSON.stringify("" +
|
|
4368
|
+
`))) : L = d.stylize("[Circular]", "special")), O(I)) {
|
|
4369
|
+
if (k && C.match(/^\d+$/))
|
|
4370
|
+
return L;
|
|
4371
|
+
I = JSON.stringify("" + C), I.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (I = I.slice(1, -1), I = d.stylize(I, "name")) : (I = I.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), I = d.stylize(I, "string"));
|
|
4319
4372
|
}
|
|
4320
|
-
return I + ": " +
|
|
4373
|
+
return I + ": " + L;
|
|
4321
4374
|
}
|
|
4322
4375
|
function b(d, h, m) {
|
|
4323
|
-
var A = d.reduce(function(
|
|
4376
|
+
var A = d.reduce(function(C, k) {
|
|
4324
4377
|
return k.indexOf(`
|
|
4325
|
-
`) >= 0,
|
|
4378
|
+
`) >= 0, C + k.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
4326
4379
|
}, 0);
|
|
4327
4380
|
return A > 60 ? m[0] + (h === "" ? "" : h + `
|
|
4328
4381
|
`) + " " + d.join(`,
|
|
4329
4382
|
`) + " " + m[1] : m[0] + h + " " + d.join(", ") + " " + m[1];
|
|
4330
4383
|
}
|
|
4331
|
-
t.types =
|
|
4384
|
+
t.types = Jn;
|
|
4332
4385
|
function g(d) {
|
|
4333
4386
|
return Array.isArray(d);
|
|
4334
4387
|
}
|
|
@@ -4337,18 +4390,18 @@ var ou = mr.exports;
|
|
|
4337
4390
|
return typeof d == "boolean";
|
|
4338
4391
|
}
|
|
4339
4392
|
t.isBoolean = S;
|
|
4340
|
-
function
|
|
4393
|
+
function F(d) {
|
|
4341
4394
|
return d === null;
|
|
4342
4395
|
}
|
|
4343
|
-
t.isNull =
|
|
4396
|
+
t.isNull = F;
|
|
4344
4397
|
function K(d) {
|
|
4345
4398
|
return d == null;
|
|
4346
4399
|
}
|
|
4347
4400
|
t.isNullOrUndefined = K;
|
|
4348
|
-
function
|
|
4401
|
+
function re(d) {
|
|
4349
4402
|
return typeof d == "number";
|
|
4350
4403
|
}
|
|
4351
|
-
t.isNumber =
|
|
4404
|
+
t.isNumber = re;
|
|
4352
4405
|
function P(d) {
|
|
4353
4406
|
return typeof d == "string";
|
|
4354
4407
|
}
|
|
@@ -4381,15 +4434,15 @@ var ou = mr.exports;
|
|
|
4381
4434
|
return typeof d == "function";
|
|
4382
4435
|
}
|
|
4383
4436
|
t.isFunction = de;
|
|
4384
|
-
function
|
|
4437
|
+
function Mt(d) {
|
|
4385
4438
|
return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
|
|
4386
4439
|
typeof d > "u";
|
|
4387
4440
|
}
|
|
4388
|
-
t.isPrimitive =
|
|
4441
|
+
t.isPrimitive = Mt, t.isBuffer = ou;
|
|
4389
4442
|
function we(d) {
|
|
4390
4443
|
return Object.prototype.toString.call(d);
|
|
4391
4444
|
}
|
|
4392
|
-
function
|
|
4445
|
+
function Je(d) {
|
|
4393
4446
|
return d < 10 ? "0" + d.toString(10) : d.toString(10);
|
|
4394
4447
|
}
|
|
4395
4448
|
var Fe = [
|
|
@@ -4406,17 +4459,17 @@ var ou = mr.exports;
|
|
|
4406
4459
|
"Nov",
|
|
4407
4460
|
"Dec"
|
|
4408
4461
|
];
|
|
4409
|
-
function
|
|
4462
|
+
function qt() {
|
|
4410
4463
|
var d = /* @__PURE__ */ new Date(), h = [
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4464
|
+
Je(d.getHours()),
|
|
4465
|
+
Je(d.getMinutes()),
|
|
4466
|
+
Je(d.getSeconds())
|
|
4414
4467
|
].join(":");
|
|
4415
4468
|
return [d.getDate(), Fe[d.getMonth()], h].join(" ");
|
|
4416
4469
|
}
|
|
4417
4470
|
t.log = function() {
|
|
4418
|
-
console.log("%s - %s",
|
|
4419
|
-
}, t.inherits =
|
|
4471
|
+
console.log("%s - %s", qt(), t.format.apply(t, arguments));
|
|
4472
|
+
}, t.inherits = su, t._extend = function(d, h) {
|
|
4420
4473
|
if (!h || !oe(h)) return d;
|
|
4421
4474
|
for (var m = Object.keys(h), A = m.length; A--; )
|
|
4422
4475
|
d[m[A]] = h[m[A]];
|
|
@@ -4441,17 +4494,17 @@ var ou = mr.exports;
|
|
|
4441
4494
|
}), m;
|
|
4442
4495
|
}
|
|
4443
4496
|
function m() {
|
|
4444
|
-
for (var A,
|
|
4445
|
-
A =
|
|
4446
|
-
}), I = [],
|
|
4447
|
-
I.push(arguments[
|
|
4448
|
-
I.push(function(
|
|
4449
|
-
|
|
4497
|
+
for (var A, C, k = new Promise(function(D, H) {
|
|
4498
|
+
A = D, C = H;
|
|
4499
|
+
}), I = [], L = 0; L < arguments.length; L++)
|
|
4500
|
+
I.push(arguments[L]);
|
|
4501
|
+
I.push(function(D, H) {
|
|
4502
|
+
D ? C(D) : A(H);
|
|
4450
4503
|
});
|
|
4451
4504
|
try {
|
|
4452
4505
|
h.apply(this, I);
|
|
4453
|
-
} catch (
|
|
4454
|
-
|
|
4506
|
+
} catch (D) {
|
|
4507
|
+
C(D);
|
|
4455
4508
|
}
|
|
4456
4509
|
return k;
|
|
4457
4510
|
}
|
|
@@ -4472,24 +4525,24 @@ var ou = mr.exports;
|
|
|
4472
4525
|
}
|
|
4473
4526
|
return h(d);
|
|
4474
4527
|
}
|
|
4475
|
-
function
|
|
4528
|
+
function at(d) {
|
|
4476
4529
|
if (typeof d != "function")
|
|
4477
4530
|
throw new TypeError('The "original" argument must be of type Function');
|
|
4478
4531
|
function h() {
|
|
4479
4532
|
for (var m = [], A = 0; A < arguments.length; A++)
|
|
4480
4533
|
m.push(arguments[A]);
|
|
4481
|
-
var
|
|
4482
|
-
if (typeof
|
|
4534
|
+
var C = m.pop();
|
|
4535
|
+
if (typeof C != "function")
|
|
4483
4536
|
throw new TypeError("The last argument must be of type Function");
|
|
4484
4537
|
var k = this, I = function() {
|
|
4485
|
-
return
|
|
4538
|
+
return C.apply(k, arguments);
|
|
4486
4539
|
};
|
|
4487
4540
|
d.apply(this, m).then(
|
|
4488
|
-
function(
|
|
4489
|
-
E.nextTick(I.bind(null, null,
|
|
4541
|
+
function(L) {
|
|
4542
|
+
E.nextTick(I.bind(null, null, L));
|
|
4490
4543
|
},
|
|
4491
|
-
function(
|
|
4492
|
-
E.nextTick(Re.bind(null,
|
|
4544
|
+
function(L) {
|
|
4545
|
+
E.nextTick(Re.bind(null, L, I));
|
|
4493
4546
|
}
|
|
4494
4547
|
);
|
|
4495
4548
|
}
|
|
@@ -4498,9 +4551,9 @@ var ou = mr.exports;
|
|
|
4498
4551
|
e(d)
|
|
4499
4552
|
), h;
|
|
4500
4553
|
}
|
|
4501
|
-
t.callbackify =
|
|
4554
|
+
t.callbackify = at;
|
|
4502
4555
|
})(Dt);
|
|
4503
|
-
const { inherits:
|
|
4556
|
+
const { inherits: au, format: Jt } = Dt;
|
|
4504
4557
|
function Oe(t, e, r = Error) {
|
|
4505
4558
|
if (!t) throw new Error("Avvio error code must not be empty");
|
|
4506
4559
|
if (!e) throw new Error("Avvio base error message must not be empty");
|
|
@@ -4511,9 +4564,9 @@ function Oe(t, e, r = Error) {
|
|
|
4511
4564
|
}
|
|
4512
4565
|
return n.prototype[Symbol.toStringTag] = "Error", n.prototype.toString = function() {
|
|
4513
4566
|
return `${this.name} [${this.code}]: ${this.message}`;
|
|
4514
|
-
},
|
|
4567
|
+
}, au(n, r), n;
|
|
4515
4568
|
}
|
|
4516
|
-
var
|
|
4569
|
+
var pi = {
|
|
4517
4570
|
createError: Oe,
|
|
4518
4571
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: Oe(
|
|
4519
4572
|
"AVV_ERR_EXPOSE_ALREADY_DEFINED",
|
|
@@ -4539,7 +4592,7 @@ var fi = {
|
|
|
4539
4592
|
"AVV_ERR_READY_TIMEOUT",
|
|
4540
4593
|
"Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
|
|
4541
4594
|
)
|
|
4542
|
-
},
|
|
4595
|
+
}, uu = function t(e, r, n) {
|
|
4543
4596
|
r === void 0 && (r = ""), n || (n = {});
|
|
4544
4597
|
var i = function(u) {
|
|
4545
4598
|
var l = {
|
|
@@ -4561,15 +4614,15 @@ var fi = {
|
|
|
4561
4614
|
return r + i(c ? "└" : "├") + i("─") + i(f ? "┬" : "─") + " " + t(u, p, n).slice(r.length + 2);
|
|
4562
4615
|
}).join("");
|
|
4563
4616
|
};
|
|
4564
|
-
const
|
|
4565
|
-
let
|
|
4617
|
+
const cu = uu, bn = Symbol("avvio.TimeTree.untrackNode"), Xt = Symbol("avvio.TimeTree.trackNode"), vn = Symbol("avvio.TimeTree.getParent"), Sn = Symbol("avvio.TimeTree.getNode"), wn = Symbol("avvio.TimeTree.addNode");
|
|
4618
|
+
let lu = class {
|
|
4566
4619
|
constructor() {
|
|
4567
4620
|
this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
|
|
4568
4621
|
}
|
|
4569
4622
|
[Xt](e) {
|
|
4570
4623
|
this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
|
|
4571
4624
|
}
|
|
4572
|
-
[
|
|
4625
|
+
[bn](e) {
|
|
4573
4626
|
this.tableId.delete(e.id);
|
|
4574
4627
|
const r = this.tableLabel.get(e.label);
|
|
4575
4628
|
if (r.id) {
|
|
@@ -4578,16 +4631,16 @@ let cu = class {
|
|
|
4578
4631
|
}
|
|
4579
4632
|
r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
|
|
4580
4633
|
}
|
|
4581
|
-
[
|
|
4634
|
+
[vn](e) {
|
|
4582
4635
|
if (e === null)
|
|
4583
4636
|
return this.root;
|
|
4584
4637
|
const r = this.tableLabel.get(e);
|
|
4585
4638
|
return r.id ? r : r[r.length - 1];
|
|
4586
4639
|
}
|
|
4587
|
-
[
|
|
4640
|
+
[Sn](e) {
|
|
4588
4641
|
return this.tableId.get(e);
|
|
4589
4642
|
}
|
|
4590
|
-
[
|
|
4643
|
+
[wn](e, r, n) {
|
|
4591
4644
|
if (e === null)
|
|
4592
4645
|
return this.root = {
|
|
4593
4646
|
id: "root",
|
|
@@ -4595,7 +4648,7 @@ let cu = class {
|
|
|
4595
4648
|
start: n,
|
|
4596
4649
|
nodes: []
|
|
4597
4650
|
}, this[Xt](this.root), this.root.id;
|
|
4598
|
-
const o = this[
|
|
4651
|
+
const o = this[vn](e), s = `${r}-${Math.random()}`, a = {
|
|
4599
4652
|
id: s,
|
|
4600
4653
|
parent: e,
|
|
4601
4654
|
start: n,
|
|
@@ -4605,24 +4658,24 @@ let cu = class {
|
|
|
4605
4658
|
return o.nodes.push(a), this[Xt](a), s;
|
|
4606
4659
|
}
|
|
4607
4660
|
start(e, r, n = Date.now()) {
|
|
4608
|
-
return this[
|
|
4661
|
+
return this[wn](e, r, n);
|
|
4609
4662
|
}
|
|
4610
4663
|
stop(e, r = Date.now()) {
|
|
4611
|
-
const n = this[
|
|
4612
|
-
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[
|
|
4664
|
+
const n = this[Sn](e);
|
|
4665
|
+
n && (n.stop = r, n.diff = n.stop - n.start || 0, this[bn](n));
|
|
4613
4666
|
}
|
|
4614
4667
|
toJSON() {
|
|
4615
4668
|
return Object.assign({}, this.root);
|
|
4616
4669
|
}
|
|
4617
4670
|
prittyPrint() {
|
|
4618
4671
|
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());
|
|
4619
|
-
return
|
|
4672
|
+
return cu(r);
|
|
4620
4673
|
}
|
|
4621
4674
|
};
|
|
4622
|
-
var
|
|
4623
|
-
function
|
|
4624
|
-
if (
|
|
4625
|
-
|
|
4675
|
+
var du = lu, Dr = { exports: {} }, br = { exports: {} }, Zt, An;
|
|
4676
|
+
function fu() {
|
|
4677
|
+
if (An) return Zt;
|
|
4678
|
+
An = 1;
|
|
4626
4679
|
var t = 1e3, e = t * 60, r = e * 60, n = r * 24, i = n * 7, o = n * 365.25;
|
|
4627
4680
|
Zt = function(c, f) {
|
|
4628
4681
|
f = f || {};
|
|
@@ -4701,8 +4754,8 @@ function du() {
|
|
|
4701
4754
|
}
|
|
4702
4755
|
return Zt;
|
|
4703
4756
|
}
|
|
4704
|
-
function
|
|
4705
|
-
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize =
|
|
4757
|
+
function pu(t) {
|
|
4758
|
+
r.debug = r, r.default = r, r.coerce = u, r.disable = o, r.enable = i, r.enabled = s, r.humanize = fu(), r.destroy = l, Object.keys(t).forEach((c) => {
|
|
4706
4759
|
r[c] = t[c];
|
|
4707
4760
|
}), r.names = [], r.skips = [], r.formatters = {};
|
|
4708
4761
|
function e(c) {
|
|
@@ -4717,17 +4770,17 @@ function fu(t) {
|
|
|
4717
4770
|
function b(...g) {
|
|
4718
4771
|
if (!b.enabled)
|
|
4719
4772
|
return;
|
|
4720
|
-
const S = b,
|
|
4721
|
-
S.diff = K, S.prev = f, S.curr =
|
|
4722
|
-
let
|
|
4773
|
+
const S = b, F = Number(/* @__PURE__ */ new Date()), K = F - (f || F);
|
|
4774
|
+
S.diff = K, S.prev = f, S.curr = F, f = F, g[0] = r.coerce(g[0]), typeof g[0] != "string" && g.unshift("%O");
|
|
4775
|
+
let re = 0;
|
|
4723
4776
|
g[0] = g[0].replace(/%([a-zA-Z%])/g, (V, O) => {
|
|
4724
4777
|
if (V === "%%")
|
|
4725
4778
|
return "%";
|
|
4726
|
-
|
|
4779
|
+
re++;
|
|
4727
4780
|
const ie = r.formatters[O];
|
|
4728
4781
|
if (typeof ie == "function") {
|
|
4729
|
-
const oe = g[
|
|
4730
|
-
V = ie.call(S, oe), g.splice(
|
|
4782
|
+
const oe = g[re];
|
|
4783
|
+
V = ie.call(S, oe), g.splice(re, 1), re--;
|
|
4731
4784
|
}
|
|
4732
4785
|
return V;
|
|
4733
4786
|
}), r.formatArgs.call(S, g), (S.log || r.log).apply(S, g);
|
|
@@ -4782,7 +4835,7 @@ function fu(t) {
|
|
|
4782
4835
|
}
|
|
4783
4836
|
return r.enable(r.load()), r;
|
|
4784
4837
|
}
|
|
4785
|
-
var
|
|
4838
|
+
var hu = pu;
|
|
4786
4839
|
(function(t, e) {
|
|
4787
4840
|
e.formatArgs = n, e.save = i, e.load = o, e.useColors = r, e.storage = s(), e.destroy = /* @__PURE__ */ (() => {
|
|
4788
4841
|
let u = !1;
|
|
@@ -4906,7 +4959,7 @@ var pu = fu;
|
|
|
4906
4959
|
} catch {
|
|
4907
4960
|
}
|
|
4908
4961
|
}
|
|
4909
|
-
t.exports =
|
|
4962
|
+
t.exports = hu(e);
|
|
4910
4963
|
const { formatters: a } = t.exports;
|
|
4911
4964
|
a.j = function(u) {
|
|
4912
4965
|
try {
|
|
@@ -4915,24 +4968,24 @@ var pu = fu;
|
|
|
4915
4968
|
return "[UnexpectedJSONParseError]: " + l.message;
|
|
4916
4969
|
}
|
|
4917
4970
|
};
|
|
4918
|
-
})(
|
|
4919
|
-
var
|
|
4920
|
-
const
|
|
4921
|
-
function
|
|
4971
|
+
})(br, br.exports);
|
|
4972
|
+
var hi = br.exports;
|
|
4973
|
+
const yu = jn, mu = Yn.EventEmitter, gu = Dt.inherits, U = hi("avvio"), { AVV_ERR_READY_TIMEOUT: bu } = pi, er = Symbol.for("plugin-meta");
|
|
4974
|
+
function vu(t, e) {
|
|
4922
4975
|
return t[er] && t[er].name ? t[er].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
|
|
4923
4976
|
`).slice(0, 2).map((r) => r.trim()).join(" -- ");
|
|
4924
4977
|
}
|
|
4925
|
-
function
|
|
4978
|
+
function Su() {
|
|
4926
4979
|
const t = {};
|
|
4927
4980
|
return t.promise = new Promise((e, r) => {
|
|
4928
4981
|
t.resolve = e, t.reject = r;
|
|
4929
4982
|
}), t;
|
|
4930
4983
|
}
|
|
4931
|
-
function
|
|
4932
|
-
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 =
|
|
4984
|
+
function Ye(t, e, r, n, i) {
|
|
4985
|
+
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 = vu(e, r), this.isAfter = n, this.q = yu(t, wu, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
|
|
4933
4986
|
}
|
|
4934
|
-
|
|
4935
|
-
|
|
4987
|
+
gu(Ye, mu);
|
|
4988
|
+
Ye.prototype.exec = function(t, e) {
|
|
4936
4989
|
const r = this.func;
|
|
4937
4990
|
let n = !1;
|
|
4938
4991
|
const i = this.name;
|
|
@@ -4959,7 +5012,7 @@ We.prototype.exec = function(t, e) {
|
|
|
4959
5012
|
};
|
|
4960
5013
|
this.timeout > 0 && (U("setting up timeout", i, this.timeout), o = setTimeout(function() {
|
|
4961
5014
|
U("timed out", i), o = null;
|
|
4962
|
-
const u = new
|
|
5015
|
+
const u = new bu(i);
|
|
4963
5016
|
u.fn = r, s(u);
|
|
4964
5017
|
}, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
|
|
4965
5018
|
const a = r(this.server, this.opts, s);
|
|
@@ -4968,7 +5021,7 @@ We.prototype.exec = function(t, e) {
|
|
|
4968
5021
|
(u) => E.nextTick(s, u)
|
|
4969
5022
|
));
|
|
4970
5023
|
};
|
|
4971
|
-
|
|
5024
|
+
Ye.prototype.loadedSoFar = function() {
|
|
4972
5025
|
if (this.loaded)
|
|
4973
5026
|
return Promise.resolve();
|
|
4974
5027
|
const t = () => {
|
|
@@ -4977,12 +5030,12 @@ We.prototype.loadedSoFar = function() {
|
|
|
4977
5030
|
}), this.q.resume();
|
|
4978
5031
|
};
|
|
4979
5032
|
let e;
|
|
4980
|
-
return this._promise ? e = Promise.resolve() : (this._promise =
|
|
5033
|
+
return this._promise ? e = Promise.resolve() : (this._promise = Su(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
|
|
4981
5034
|
};
|
|
4982
|
-
|
|
5035
|
+
Ye.prototype.enqueue = function(t, e) {
|
|
4983
5036
|
U("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
|
|
4984
5037
|
};
|
|
4985
|
-
|
|
5038
|
+
Ye.prototype.finish = function(t, e) {
|
|
4986
5039
|
U("finish", this.name, t);
|
|
4987
5040
|
const r = () => {
|
|
4988
5041
|
this.loaded || (U("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
|
|
@@ -5002,19 +5055,19 @@ We.prototype.finish = function(t, e) {
|
|
|
5002
5055
|
r();
|
|
5003
5056
|
else
|
|
5004
5057
|
U("delayed", this.name), this.q.drain = () => {
|
|
5005
|
-
U("drain", this.name), this.q.drain =
|
|
5058
|
+
U("drain", this.name), this.q.drain = Au, queueMicrotask(n);
|
|
5006
5059
|
};
|
|
5007
5060
|
};
|
|
5008
5061
|
queueMicrotask(n), this.q.resume();
|
|
5009
5062
|
};
|
|
5010
|
-
function
|
|
5063
|
+
function wu(t, e) {
|
|
5011
5064
|
const r = this;
|
|
5012
|
-
E.nextTick(
|
|
5065
|
+
E.nextTick(Rr.bind(r), t, e);
|
|
5013
5066
|
}
|
|
5014
|
-
function
|
|
5067
|
+
function Rr(t, e) {
|
|
5015
5068
|
if (typeof t.func.then == "function") {
|
|
5016
5069
|
t.func.then((n) => {
|
|
5017
|
-
typeof n.default == "function" && (n = n.default), t.func = n,
|
|
5070
|
+
typeof n.default == "function" && (n = n.default), t.func = n, Rr.call(this, t, e);
|
|
5018
5071
|
}, e);
|
|
5019
5072
|
return;
|
|
5020
5073
|
}
|
|
@@ -5025,19 +5078,19 @@ function Dr(t, e) {
|
|
|
5025
5078
|
});
|
|
5026
5079
|
});
|
|
5027
5080
|
}
|
|
5028
|
-
function
|
|
5081
|
+
function Au() {
|
|
5029
5082
|
}
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
var
|
|
5033
|
-
const
|
|
5083
|
+
Dr.exports = Ye;
|
|
5084
|
+
Dr.exports.loadPlugin = Rr;
|
|
5085
|
+
var Eu = Dr.exports;
|
|
5086
|
+
const En = jn, Iu = Yn.EventEmitter, Tu = Dt.inherits, {
|
|
5034
5087
|
AVV_ERR_EXPOSE_ALREADY_DEFINED: tr,
|
|
5035
|
-
AVV_ERR_CALLBACK_NOT_FN:
|
|
5036
|
-
AVV_ERR_PLUGIN_NOT_VALID:
|
|
5037
|
-
AVV_ERR_ROOT_PLG_BOOTED:
|
|
5038
|
-
AVV_ERR_READY_TIMEOUT:
|
|
5039
|
-
} =
|
|
5040
|
-
function
|
|
5088
|
+
AVV_ERR_CALLBACK_NOT_FN: tt,
|
|
5089
|
+
AVV_ERR_PLUGIN_NOT_VALID: Ou,
|
|
5090
|
+
AVV_ERR_ROOT_PLG_BOOTED: _u,
|
|
5091
|
+
AVV_ERR_READY_TIMEOUT: Lu
|
|
5092
|
+
} = pi, Cu = du, vr = Eu, He = hi("avvio"), Ct = Symbol("kAvvio"), rr = Symbol("kThenifyDoNotWrap");
|
|
5093
|
+
function ku(t, e, r) {
|
|
5041
5094
|
const n = e.expose || {}, i = n.use || "use", o = n.after || "after", s = n.ready || "ready", a = n.onClose || "onClose", u = n.close || "close";
|
|
5042
5095
|
if (t[i])
|
|
5043
5096
|
throw new tr(i);
|
|
@@ -5047,38 +5100,38 @@ function Lu(t, e, r) {
|
|
|
5047
5100
|
throw new tr(s);
|
|
5048
5101
|
t[i] = function(l, c) {
|
|
5049
5102
|
return r.use(l, c), this;
|
|
5050
|
-
}, Object.defineProperty(t, "then", { get:
|
|
5103
|
+
}, Object.defineProperty(t, "then", { get: yi.bind(r) }), t[Ct] = !0, t[o] = function(l) {
|
|
5051
5104
|
return typeof l != "function" ? r._loadRegistered() : (r.after(nr(l, this)), this);
|
|
5052
5105
|
}, t[s] = function(l) {
|
|
5053
5106
|
if (l && typeof l != "function")
|
|
5054
|
-
throw new
|
|
5107
|
+
throw new tt(s, typeof l);
|
|
5055
5108
|
return r.ready(l ? nr(l, this) : void 0);
|
|
5056
5109
|
}, t[a] = function(l) {
|
|
5057
5110
|
if (typeof l != "function")
|
|
5058
|
-
throw new
|
|
5059
|
-
return r.onClose(
|
|
5111
|
+
throw new tt(a, typeof l);
|
|
5112
|
+
return r.onClose(Ru(l, this)), this;
|
|
5060
5113
|
}, t[u] = function(l) {
|
|
5061
5114
|
if (l && typeof l != "function")
|
|
5062
|
-
throw new
|
|
5115
|
+
throw new tt(u, typeof l);
|
|
5063
5116
|
return l ? (r.close(nr(l, this)), this) : r.close();
|
|
5064
5117
|
};
|
|
5065
5118
|
}
|
|
5066
|
-
function
|
|
5067
|
-
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof
|
|
5068
|
-
const n = new
|
|
5069
|
-
return t &&
|
|
5070
|
-
}
|
|
5071
|
-
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 Cu(), this._readyQ =
|
|
5072
|
-
this.emit("start"), this._readyQ.drain =
|
|
5073
|
-
}, this._closeQ =
|
|
5074
|
-
this.emit("close"), this._closeQ.drain =
|
|
5075
|
-
}, this._doStart = null, this._root = new
|
|
5119
|
+
function G(t, e, r) {
|
|
5120
|
+
if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof G)) {
|
|
5121
|
+
const n = new G(t, e, r);
|
|
5122
|
+
return t && ku(t, e, n), n;
|
|
5123
|
+
}
|
|
5124
|
+
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 Cu(), this._readyQ = En(this, mi, 1), this._readyQ.pause(), this._readyQ.drain = () => {
|
|
5125
|
+
this.emit("start"), this._readyQ.drain = In;
|
|
5126
|
+
}, this._closeQ = En(this, Du, 1), this._closeQ.pause(), this._closeQ.drain = () => {
|
|
5127
|
+
this.emit("close"), this._closeQ.drain = In;
|
|
5128
|
+
}, this._doStart = null, this._root = new vr(this, Pu.bind(this), e, !1, 0), this._root.once("start", (n, i, o) => {
|
|
5076
5129
|
const s = this.pluginTree.start(null, i, o);
|
|
5077
5130
|
this._root.once("loaded", (a, u, l) => {
|
|
5078
5131
|
this.pluginTree.stop(s, l);
|
|
5079
5132
|
});
|
|
5080
|
-
}),
|
|
5081
|
-
|
|
5133
|
+
}), vr.loadPlugin.call(this, this._root, (n) => {
|
|
5134
|
+
He("root plugin ready");
|
|
5082
5135
|
try {
|
|
5083
5136
|
this.emit("preReady"), this._root = null;
|
|
5084
5137
|
} catch (i) {
|
|
@@ -5092,34 +5145,34 @@ function q(t, e, r) {
|
|
|
5092
5145
|
this._readyQ.resume();
|
|
5093
5146
|
});
|
|
5094
5147
|
}
|
|
5095
|
-
function
|
|
5148
|
+
function Pu(t, e, r) {
|
|
5096
5149
|
this._doStart = r, e.autostart && this.start();
|
|
5097
5150
|
}
|
|
5098
|
-
|
|
5099
|
-
|
|
5151
|
+
Tu(G, Iu);
|
|
5152
|
+
G.prototype.start = function() {
|
|
5100
5153
|
return this.started = !0, E.nextTick(this._doStart), this;
|
|
5101
5154
|
};
|
|
5102
|
-
|
|
5155
|
+
G.prototype.override = function(t, e, r) {
|
|
5103
5156
|
return t;
|
|
5104
5157
|
};
|
|
5105
|
-
function
|
|
5158
|
+
function Nu(t) {
|
|
5106
5159
|
if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
|
|
5107
|
-
throw new
|
|
5160
|
+
throw new Ou(typeof t);
|
|
5108
5161
|
return t;
|
|
5109
5162
|
}
|
|
5110
|
-
|
|
5111
|
-
|
|
5163
|
+
G.prototype[Ct] = !0;
|
|
5164
|
+
G.prototype.use = function(t, e) {
|
|
5112
5165
|
return this._lastUsed = this._addPlugin(t, e, !1), this;
|
|
5113
5166
|
};
|
|
5114
|
-
|
|
5167
|
+
G.prototype._loadRegistered = function() {
|
|
5115
5168
|
const t = this._current[0];
|
|
5116
5169
|
return !this.started && !this.booted && E.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
|
|
5117
5170
|
};
|
|
5118
|
-
Object.defineProperty(
|
|
5119
|
-
|
|
5120
|
-
if (t =
|
|
5121
|
-
throw new
|
|
5122
|
-
const n = this._current[0], i = new
|
|
5171
|
+
Object.defineProperty(G.prototype, "then", { get: yi });
|
|
5172
|
+
G.prototype._addPlugin = function(t, e, r) {
|
|
5173
|
+
if (t = Nu(t), e = e || {}, this.booted)
|
|
5174
|
+
throw new _u();
|
|
5175
|
+
const n = this._current[0], i = new vr(this, t, e, r);
|
|
5123
5176
|
if (i.once("start", (o, s, a) => {
|
|
5124
5177
|
const u = this.pluginTree.start(n.name, s, a);
|
|
5125
5178
|
i.once("loaded", (l, c, f) => {
|
|
@@ -5131,16 +5184,16 @@ q.prototype._addPlugin = function(t, e, r) {
|
|
|
5131
5184
|
o && (this._error = o);
|
|
5132
5185
|
}), i;
|
|
5133
5186
|
};
|
|
5134
|
-
|
|
5187
|
+
G.prototype.after = function(t) {
|
|
5135
5188
|
if (!t)
|
|
5136
5189
|
return this._loadRegistered();
|
|
5137
5190
|
this._addPlugin(e.bind(this), {}, !0);
|
|
5138
5191
|
function e(r, n, i) {
|
|
5139
|
-
|
|
5192
|
+
mi.call(this, t, i);
|
|
5140
5193
|
}
|
|
5141
5194
|
return this;
|
|
5142
5195
|
};
|
|
5143
|
-
|
|
5196
|
+
G.prototype.onClose = function(t) {
|
|
5144
5197
|
if (typeof t != "function")
|
|
5145
5198
|
throw new Error("not a function");
|
|
5146
5199
|
t[this._isOnCloseHandlerKey] = !0, this._closeQ.unshift(t, e.bind(this));
|
|
@@ -5149,11 +5202,11 @@ q.prototype.onClose = function(t) {
|
|
|
5149
5202
|
}
|
|
5150
5203
|
return this;
|
|
5151
5204
|
};
|
|
5152
|
-
|
|
5205
|
+
G.prototype.close = function(t) {
|
|
5153
5206
|
let e;
|
|
5154
5207
|
if (t) {
|
|
5155
5208
|
if (typeof t != "function")
|
|
5156
|
-
throw new
|
|
5209
|
+
throw new tt("close", typeof t);
|
|
5157
5210
|
} else
|
|
5158
5211
|
e = new Promise(function(r, n) {
|
|
5159
5212
|
t = function(i) {
|
|
@@ -5166,10 +5219,10 @@ q.prototype.close = function(t) {
|
|
|
5166
5219
|
this._error = null, this._closeQ.push(t), E.nextTick(this._closeQ.resume.bind(this._closeQ));
|
|
5167
5220
|
}), e;
|
|
5168
5221
|
};
|
|
5169
|
-
|
|
5222
|
+
G.prototype.ready = function(t) {
|
|
5170
5223
|
if (t) {
|
|
5171
5224
|
if (typeof t != "function")
|
|
5172
|
-
throw new
|
|
5225
|
+
throw new tt("ready", typeof t);
|
|
5173
5226
|
this._readyQ.push(t), queueMicrotask(this.start.bind(this));
|
|
5174
5227
|
return;
|
|
5175
5228
|
}
|
|
@@ -5181,46 +5234,46 @@ q.prototype.ready = function(t) {
|
|
|
5181
5234
|
}
|
|
5182
5235
|
});
|
|
5183
5236
|
};
|
|
5184
|
-
|
|
5237
|
+
G.prototype.prettyPrint = function() {
|
|
5185
5238
|
return this.pluginTree.prittyPrint();
|
|
5186
5239
|
};
|
|
5187
|
-
|
|
5240
|
+
G.prototype.toJSON = function() {
|
|
5188
5241
|
return this.pluginTree.toJSON();
|
|
5189
5242
|
};
|
|
5190
|
-
function
|
|
5243
|
+
function In() {
|
|
5191
5244
|
}
|
|
5192
|
-
function
|
|
5245
|
+
function yi() {
|
|
5193
5246
|
if (this.booted) {
|
|
5194
|
-
|
|
5247
|
+
He("thenify returning null because we are already booted");
|
|
5195
5248
|
return;
|
|
5196
5249
|
}
|
|
5197
5250
|
if (this[rr]) {
|
|
5198
5251
|
this[rr] = !1;
|
|
5199
5252
|
return;
|
|
5200
5253
|
}
|
|
5201
|
-
return
|
|
5254
|
+
return He("thenify"), (t, e) => this._loadRegistered().then(() => (this[rr] = !0, t(this._server)), e);
|
|
5202
5255
|
}
|
|
5203
|
-
function
|
|
5256
|
+
function mi(t, e) {
|
|
5204
5257
|
const r = this._server, n = this._error;
|
|
5205
5258
|
let i;
|
|
5206
5259
|
if (this._error = null, t.length === 0)
|
|
5207
|
-
this._error = n, i = t(), i && !i[
|
|
5260
|
+
this._error = n, i = t(), i && !i[Ct] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
|
|
5208
5261
|
else if (t.length === 1)
|
|
5209
|
-
i = t(n), i && !i[
|
|
5262
|
+
i = t(n), i && !i[Ct] && typeof i.then == "function" ? i.then(() => E.nextTick(e), (o) => E.nextTick(e, o)) : E.nextTick(e);
|
|
5210
5263
|
else if (this._timeout === 0) {
|
|
5211
5264
|
const o = (s) => {
|
|
5212
5265
|
this._error = s, e(this._error);
|
|
5213
5266
|
};
|
|
5214
5267
|
t.length === 2 ? t(n, o) : t(n, r, o);
|
|
5215
5268
|
} else
|
|
5216
|
-
|
|
5269
|
+
Fu.call(this, t, n, r, e);
|
|
5217
5270
|
}
|
|
5218
|
-
function
|
|
5271
|
+
function Fu(t, e, r, n) {
|
|
5219
5272
|
const i = t.name;
|
|
5220
|
-
|
|
5273
|
+
He("setting up ready timeout", i, this._timeout);
|
|
5221
5274
|
let o = setTimeout(() => {
|
|
5222
|
-
|
|
5223
|
-
const a = new
|
|
5275
|
+
He("timed out", i), o = null;
|
|
5276
|
+
const a = new Lu(i);
|
|
5224
5277
|
a.fn = t, this._error = a, n(a);
|
|
5225
5278
|
}, this._timeout);
|
|
5226
5279
|
t.length === 2 ? t(e, s.bind(this)) : t(e, r, s.bind(this));
|
|
@@ -5228,17 +5281,17 @@ function Nu(t, e, r, n) {
|
|
|
5228
5281
|
o && (clearTimeout(o), this._error = a, n(this._error));
|
|
5229
5282
|
}
|
|
5230
5283
|
}
|
|
5231
|
-
function
|
|
5284
|
+
function Du(t, e) {
|
|
5232
5285
|
const r = this._server, n = t[this._isOnCloseHandlerKey];
|
|
5233
5286
|
if (t.length === 0 || t.length === 1) {
|
|
5234
5287
|
let i;
|
|
5235
|
-
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (
|
|
5288
|
+
n ? i = t(r) : i = t(this._error), i && typeof i.then == "function" ? (He("resolving close/onClose promise"), i.then(
|
|
5236
5289
|
() => E.nextTick(e),
|
|
5237
5290
|
(o) => E.nextTick(e, o)
|
|
5238
5291
|
)) : E.nextTick(e);
|
|
5239
5292
|
} else t.length === 2 ? t(n ? r : this._error, e) : n ? t(r, e) : t(this._error, r, e);
|
|
5240
5293
|
}
|
|
5241
|
-
function
|
|
5294
|
+
function Ru(t, e) {
|
|
5242
5295
|
return r.bind(e);
|
|
5243
5296
|
function r(n, i) {
|
|
5244
5297
|
let o;
|
|
@@ -5260,16 +5313,16 @@ function nr(t, e) {
|
|
|
5260
5313
|
}, i) : E.nextTick(i)) : t.length === 2 ? t(n, i) : t(n, this, i) : E.nextTick(i);
|
|
5261
5314
|
}
|
|
5262
5315
|
}
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
return
|
|
5316
|
+
Er.exports = G;
|
|
5317
|
+
Er.exports.express = function(t) {
|
|
5318
|
+
return G(t, {
|
|
5266
5319
|
expose: {
|
|
5267
5320
|
use: "load"
|
|
5268
5321
|
}
|
|
5269
5322
|
});
|
|
5270
5323
|
};
|
|
5271
|
-
var
|
|
5272
|
-
const
|
|
5324
|
+
var Vu = Er.exports;
|
|
5325
|
+
const $u = /* @__PURE__ */ ds(Vu);
|
|
5273
5326
|
(function() {
|
|
5274
5327
|
if (window.requestAnimationFrame && window.cancelAnimationFrame)
|
|
5275
5328
|
return;
|
|
@@ -5287,13 +5340,13 @@ const Vu = /* @__PURE__ */ ls(Ru);
|
|
|
5287
5340
|
}, window.cancelAnimationFrame = clearTimeout;
|
|
5288
5341
|
}
|
|
5289
5342
|
})();
|
|
5290
|
-
function
|
|
5291
|
-
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 =
|
|
5292
|
-
return s.use(jo, { friendsTab: n.friendsTab }), s.use(
|
|
5343
|
+
function ac(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
5344
|
+
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 = $u(/* @__PURE__ */ Object.create({}), { autostart: !1 });
|
|
5345
|
+
return s.use(jo, { friendsTab: n.friendsTab }), s.use(Do, { onDeepLinkHandled: n?.onDeepLinkHandled }), s.use(Bo, { videoPlayerController: n?.videoPlayerController }), s.use(qo, {
|
|
5293
5346
|
onContentActivate: n?.onContentActivate,
|
|
5294
5347
|
withAd: n?.withAd,
|
|
5295
5348
|
withAdNotification: n?.withAdNotification
|
|
5296
|
-
}), s.use(
|
|
5349
|
+
}), s.use(Xi, { sdkKey: t, host: i, analyticsHost: o, version: n?.version }), s.use(no), s.use($o), s.use(es), s.use(Io), s.use(ls), s.after((a, u, l) => {
|
|
5297
5350
|
if (a)
|
|
5298
5351
|
throw a;
|
|
5299
5352
|
u.ready(), l();
|
|
@@ -5306,5 +5359,5 @@ function sc(t, e = !0, r = !0, n = { friendsTab: "enabled" }) {
|
|
|
5306
5359
|
}), s;
|
|
5307
5360
|
}
|
|
5308
5361
|
export {
|
|
5309
|
-
|
|
5362
|
+
ac as StreamLayer
|
|
5310
5363
|
};
|