@streamlayer/sdk-web 0.28.4 → 0.28.6

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.
Files changed (3) hide show
  1. package/lib/cjs/index.js +8 -8
  2. package/lib/es/index.js +1239 -1184
  3. package/package.json +10 -10
package/lib/es/index.js CHANGED
@@ -1,32 +1,32 @@
1
- import { QuestionType as Qe, SilenceSetting as Gr, QuestionStatus as Wt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
1
+ import { QuestionType as ze, SilenceSetting as zr, QuestionStatus as Yt } from "@streamlayer/sl-eslib/interactive/interactive.common_pb";
2
2
  import "@streamlayer/sl-eslib/interactive/feed/interactive.feed_pb";
3
- import { SdkOverlayType as ce } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
4
- import { computed as Qr, map as Dn, atom as It } from "nanostores";
3
+ import { SdkOverlayType as ae } from "@streamlayer/sl-eslib/sdkSettings/sdkSettings.common_pb";
4
+ import { computed as Kr, map as jn, atom as Ft } from "nanostores";
5
5
  import "@nanostores/logger";
6
6
  import "microdiff";
7
- import { Code as jn, createPromiseClient as Mn, createCallbackClient as Vn } from "@connectrpc/connect";
8
- import { createGrpcWebTransport as qn } from "@connectrpc/connect-web";
9
- import { nanoquery as Gn } from "@nanostores/query";
10
- import { Events as Qn } from "@streamlayer/sl-eslib/sports/events/events_connect";
11
- import { Client as Ft } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
12
- import { Users as zr } from "@streamlayer/sl-eslib/users/users_connect";
13
- import { pino as zn } from "pino";
7
+ import { Code as Mn, createPromiseClient as Vn, createCallbackClient as qn } from "@connectrpc/connect";
8
+ import { createGrpcWebTransport as Gn } from "@connectrpc/connect-web";
9
+ import { nanoquery as Qn } from "@nanostores/query";
10
+ import { Events as zn } from "@streamlayer/sl-eslib/sports/events/events_connect";
11
+ import { Client as Tt } from "@streamlayer/sl-eslib/sdkSettings/client/client_connect";
12
+ import { Users as Hr } from "@streamlayer/sl-eslib/users/users_connect";
13
+ import { pino as Kn } from "pino";
14
14
  import { Feed as de } from "@streamlayer/sl-eslib/interactive/feed/interactive.feed_connect";
15
- import { Leaderboard as Hr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
- var Kr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
15
+ import { Leaderboard as Wr } from "@streamlayer/sl-eslib/interactive/leaderboard/interactive.leaderboard_connect";
16
+ var Jr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
17
17
  function Hn(t) {
18
18
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
19
19
  }
20
- var _ = {}, Wr = {}, Ct = {};
21
- Ct.byteLength = Jn;
22
- Ct.toByteArray = Xn;
23
- Ct.fromByteArray = ti;
24
- var ve = [], oe = [], Kn = typeof Uint8Array < "u" ? Uint8Array : Array, Pt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
25
- for (var je = 0, Wn = Pt.length; je < Wn; ++je)
26
- ve[je] = Pt[je], oe[Pt.charCodeAt(je)] = je;
20
+ var T = {}, Yr = {}, Ct = {};
21
+ Ct.byteLength = Yn;
22
+ Ct.toByteArray = Zn;
23
+ Ct.fromByteArray = ri;
24
+ var ve = [], oe = [], Wn = typeof Uint8Array < "u" ? Uint8Array : Array, Rt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
25
+ for (var je = 0, Jn = Rt.length; je < Jn; ++je)
26
+ ve[je] = Rt[je], oe[Rt.charCodeAt(je)] = je;
27
27
  oe["-".charCodeAt(0)] = 62;
28
28
  oe["_".charCodeAt(0)] = 63;
29
- function Jr(t) {
29
+ function Xr(t) {
30
30
  var e = t.length;
31
31
  if (e % 4 > 0)
32
32
  throw new Error("Invalid string. Length must be a multiple of 4");
@@ -35,60 +35,60 @@ function Jr(t) {
35
35
  var o = r === e ? 0 : 4 - r % 4;
36
36
  return [r, o];
37
37
  }
38
- function Jn(t) {
39
- var e = Jr(t), r = e[0], o = e[1];
38
+ function Yn(t) {
39
+ var e = Xr(t), r = e[0], o = e[1];
40
40
  return (r + o) * 3 / 4 - o;
41
41
  }
42
- function Yn(t, e, r) {
42
+ function Xn(t, e, r) {
43
43
  return (e + r) * 3 / 4 - r;
44
44
  }
45
- function Xn(t) {
46
- var e, r = Jr(t), o = r[0], s = r[1], u = new Kn(Yn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, p;
47
- for (p = 0; p < f; p += 4)
48
- e = oe[t.charCodeAt(p)] << 18 | oe[t.charCodeAt(p + 1)] << 12 | oe[t.charCodeAt(p + 2)] << 6 | oe[t.charCodeAt(p + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
49
- return s === 2 && (e = oe[t.charCodeAt(p)] << 2 | oe[t.charCodeAt(p + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = oe[t.charCodeAt(p)] << 10 | oe[t.charCodeAt(p + 1)] << 4 | oe[t.charCodeAt(p + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
50
- }
51
45
  function Zn(t) {
46
+ var e, r = Xr(t), o = r[0], s = r[1], u = new Wn(Xn(t, o, s)), l = 0, f = s > 0 ? o - 4 : o, d;
47
+ for (d = 0; d < f; d += 4)
48
+ e = oe[t.charCodeAt(d)] << 18 | oe[t.charCodeAt(d + 1)] << 12 | oe[t.charCodeAt(d + 2)] << 6 | oe[t.charCodeAt(d + 3)], u[l++] = e >> 16 & 255, u[l++] = e >> 8 & 255, u[l++] = e & 255;
49
+ return s === 2 && (e = oe[t.charCodeAt(d)] << 2 | oe[t.charCodeAt(d + 1)] >> 4, u[l++] = e & 255), s === 1 && (e = oe[t.charCodeAt(d)] << 10 | oe[t.charCodeAt(d + 1)] << 4 | oe[t.charCodeAt(d + 2)] >> 2, u[l++] = e >> 8 & 255, u[l++] = e & 255), u;
50
+ }
51
+ function ei(t) {
52
52
  return ve[t >> 18 & 63] + ve[t >> 12 & 63] + ve[t >> 6 & 63] + ve[t & 63];
53
53
  }
54
- function ei(t, e, r) {
54
+ function ti(t, e, r) {
55
55
  for (var o, s = [], u = e; u < r; u += 3)
56
- o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(Zn(o));
56
+ o = (t[u] << 16 & 16711680) + (t[u + 1] << 8 & 65280) + (t[u + 2] & 255), s.push(ei(o));
57
57
  return s.join("");
58
58
  }
59
- function ti(t) {
59
+ function ri(t) {
60
60
  for (var e, r = t.length, o = r % 3, s = [], u = 16383, l = 0, f = r - o; l < f; l += u)
61
- s.push(ei(t, l, l + u > f ? f : l + u));
61
+ s.push(ti(t, l, l + u > f ? f : l + u));
62
62
  return o === 1 ? (e = t[r - 1], s.push(
63
63
  ve[e >> 2] + ve[e << 4 & 63] + "=="
64
64
  )) : o === 2 && (e = (t[r - 2] << 8) + t[r - 1], s.push(
65
65
  ve[e >> 10] + ve[e >> 4 & 63] + ve[e << 2 & 63] + "="
66
66
  )), s.join("");
67
67
  }
68
- var ur = {};
68
+ var fr = {};
69
69
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
70
- ur.read = function(t, e, r, o, s) {
71
- var u, l, f = s * 8 - o - 1, p = (1 << f) - 1, A = p >> 1, g = -7, w = r ? s - 1 : 0, E = r ? -1 : 1, I = t[e + w];
72
- for (w += E, u = I & (1 << -g) - 1, I >>= -g, g += f; g > 0; u = u * 256 + t[e + w], w += E, g -= 8)
70
+ fr.read = function(t, e, r, o, s) {
71
+ var u, l, f = s * 8 - o - 1, d = (1 << f) - 1, A = d >> 1, g = -7, v = r ? s - 1 : 0, E = r ? -1 : 1, C = t[e + v];
72
+ for (v += E, u = C & (1 << -g) - 1, C >>= -g, g += f; g > 0; u = u * 256 + t[e + v], v += E, g -= 8)
73
73
  ;
74
- for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + w], w += E, g -= 8)
74
+ for (l = u & (1 << -g) - 1, u >>= -g, g += o; g > 0; l = l * 256 + t[e + v], v += E, g -= 8)
75
75
  ;
76
76
  if (u === 0)
77
77
  u = 1 - A;
78
78
  else {
79
- if (u === p)
80
- return l ? NaN : (I ? -1 : 1) * (1 / 0);
79
+ if (u === d)
80
+ return l ? NaN : (C ? -1 : 1) * (1 / 0);
81
81
  l = l + Math.pow(2, o), u = u - A;
82
82
  }
83
- return (I ? -1 : 1) * l * Math.pow(2, u - o);
83
+ return (C ? -1 : 1) * l * Math.pow(2, u - o);
84
84
  };
85
- ur.write = function(t, e, r, o, s, u) {
86
- var l, f, p, A = u * 8 - s - 1, g = (1 << A) - 1, w = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, I = o ? 0 : u - 1, R = o ? 1 : -1, U = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
87
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + w >= 1 ? e += E / p : e += E * Math.pow(2, 1 - w), e * p >= 2 && (l++, p /= 2), l + w >= g ? (f = 0, l = g) : l + w >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + w) : (f = e * Math.pow(2, w - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + I] = f & 255, I += R, f /= 256, s -= 8)
85
+ fr.write = function(t, e, r, o, s, u) {
86
+ var l, f, d, A = u * 8 - s - 1, g = (1 << A) - 1, v = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, C = o ? 0 : u - 1, R = o ? 1 : -1, L = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
87
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (d = Math.pow(2, -l)) < 1 && (l--, d *= 2), l + v >= 1 ? e += E / d : e += E * Math.pow(2, 1 - v), e * d >= 2 && (l++, d /= 2), l + v >= g ? (f = 0, l = g) : l + v >= 1 ? (f = (e * d - 1) * Math.pow(2, s), l = l + v) : (f = e * Math.pow(2, v - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + C] = f & 255, C += R, f /= 256, s -= 8)
88
88
  ;
89
- for (l = l << s | f, A += s; A > 0; t[r + I] = l & 255, I += R, l /= 256, A -= 8)
89
+ for (l = l << s | f, A += s; A > 0; t[r + C] = l & 255, C += R, l /= 256, A -= 8)
90
90
  ;
91
- t[r + I - R] |= U * 128;
91
+ t[r + C - R] |= L * 128;
92
92
  };
93
93
  /*!
94
94
  * The buffer module from node.js, for the browser.
@@ -97,7 +97,7 @@ ur.write = function(t, e, r, o, s, u) {
97
97
  * @license MIT
98
98
  */
99
99
  (function(t) {
100
- const e = Ct, r = ur, o = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
100
+ const e = Ct, r = fr, o = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
101
101
  t.Buffer = f, t.SlowBuffer = X, t.INSPECT_MAX_BYTES = 50;
102
102
  const s = 2147483647;
103
103
  t.kMaxLength = s, f.TYPED_ARRAY_SUPPORT = u(), !f.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error(
@@ -138,12 +138,12 @@ ur.write = function(t, e, r, o, s, u) {
138
138
  throw new TypeError(
139
139
  'The "string" argument must be of type string. Received type number'
140
140
  );
141
- return w(a);
141
+ return v(a);
142
142
  }
143
- return p(a, n, i);
143
+ return d(a, n, i);
144
144
  }
145
145
  f.poolSize = 8192;
146
- function p(a, n, i) {
146
+ function d(a, n, i) {
147
147
  if (typeof a == "string")
148
148
  return E(a, n);
149
149
  if (ArrayBuffer.isView(a))
@@ -153,7 +153,7 @@ ur.write = function(t, e, r, o, s, u) {
153
153
  "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
154
154
  );
155
155
  if (me(a, ArrayBuffer) || a && me(a.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (me(a, SharedArrayBuffer) || a && me(a.buffer, SharedArrayBuffer)))
156
- return U(a, n, i);
156
+ return L(a, n, i);
157
157
  if (typeof a == "number")
158
158
  throw new TypeError(
159
159
  'The "value" argument must not be of type number. Received type number'
@@ -171,7 +171,7 @@ ur.write = function(t, e, r, o, s, u) {
171
171
  );
172
172
  }
173
173
  f.from = function(a, n, i) {
174
- return p(a, n, i);
174
+ return d(a, n, i);
175
175
  }, Object.setPrototypeOf(f.prototype, Uint8Array.prototype), Object.setPrototypeOf(f, Uint8Array);
176
176
  function A(a) {
177
177
  if (typeof a != "number")
@@ -185,13 +185,13 @@ ur.write = function(t, e, r, o, s, u) {
185
185
  f.alloc = function(a, n, i) {
186
186
  return g(a, n, i);
187
187
  };
188
- function w(a) {
188
+ function v(a) {
189
189
  return A(a), l(a < 0 ? 0 : z(a) | 0);
190
190
  }
191
191
  f.allocUnsafe = function(a) {
192
- return w(a);
192
+ return v(a);
193
193
  }, f.allocUnsafeSlow = function(a) {
194
- return w(a);
194
+ return v(a);
195
195
  };
196
196
  function E(a, n) {
197
197
  if ((typeof n != "string" || n === "") && (n = "utf8"), !f.isEncoding(n))
@@ -201,7 +201,7 @@ ur.write = function(t, e, r, o, s, u) {
201
201
  const h = c.write(a, n);
202
202
  return h !== i && (c = c.slice(0, h)), c;
203
203
  }
204
- function I(a) {
204
+ function C(a) {
205
205
  const n = a.length < 0 ? 0 : z(a.length) | 0, i = l(n);
206
206
  for (let c = 0; c < n; c += 1)
207
207
  i[c] = a[c] & 255;
@@ -210,11 +210,11 @@ ur.write = function(t, e, r, o, s, u) {
210
210
  function R(a) {
211
211
  if (me(a, Uint8Array)) {
212
212
  const n = new Uint8Array(a);
213
- return U(n.buffer, n.byteOffset, n.byteLength);
213
+ return L(n.buffer, n.byteOffset, n.byteLength);
214
214
  }
215
- return I(a);
215
+ return C(a);
216
216
  }
217
- function U(a, n, i) {
217
+ function L(a, n, i) {
218
218
  if (n < 0 || a.byteLength < n)
219
219
  throw new RangeError('"offset" is outside of buffer bounds');
220
220
  if (a.byteLength < n + (i || 0))
@@ -228,9 +228,9 @@ ur.write = function(t, e, r, o, s, u) {
228
228
  return i.length === 0 || a.copy(i, 0, 0, n), i;
229
229
  }
230
230
  if (a.length !== void 0)
231
- return typeof a.length != "number" || kt(a.length) ? l(0) : I(a);
231
+ return typeof a.length != "number" || Pt(a.length) ? l(0) : C(a);
232
232
  if (a.type === "Buffer" && Array.isArray(a.data))
233
- return I(a.data);
233
+ return C(a.data);
234
234
  }
235
235
  function z(a) {
236
236
  if (a >= s)
@@ -321,7 +321,7 @@ ur.write = function(t, e, r, o, s, u) {
321
321
  return i;
322
322
  case "utf8":
323
323
  case "utf-8":
324
- return rt(a).length;
324
+ return nt(a).length;
325
325
  case "ucs2":
326
326
  case "ucs-2":
327
327
  case "utf16le":
@@ -330,10 +330,10 @@ ur.write = function(t, e, r, o, s, u) {
330
330
  case "hex":
331
331
  return i >>> 1;
332
332
  case "base64":
333
- return ft(a).length;
333
+ return lt(a).length;
334
334
  default:
335
335
  if (h)
336
- return c ? -1 : rt(a).length;
336
+ return c ? -1 : nt(a).length;
337
337
  n = ("" + n).toLowerCase(), h = !0;
338
338
  }
339
339
  }
@@ -350,17 +350,17 @@ ur.write = function(t, e, r, o, s, u) {
350
350
  case "utf-8":
351
351
  return le(this, n, i);
352
352
  case "ascii":
353
- return tt(this, n, i);
353
+ return rt(this, n, i);
354
354
  case "latin1":
355
355
  case "binary":
356
- return Oe(this, n, i);
356
+ return xe(this, n, i);
357
357
  case "base64":
358
- return et(this, n, i);
358
+ return tt(this, n, i);
359
359
  case "ucs2":
360
360
  case "ucs-2":
361
361
  case "utf16le":
362
362
  case "utf-16le":
363
- return xe(this, n, i);
363
+ return ke(this, n, i);
364
364
  default:
365
365
  if (c)
366
366
  throw new TypeError("Unknown encoding: " + a);
@@ -419,19 +419,19 @@ ur.write = function(t, e, r, o, s, u) {
419
419
  return 1;
420
420
  if (i >>>= 0, c >>>= 0, h >>>= 0, y >>>= 0, this === n)
421
421
  return 0;
422
- let m = y - h, T = c - i;
423
- const q = Math.min(m, T), M = this.slice(h, y), G = n.slice(i, c);
422
+ let m = y - h, _ = c - i;
423
+ const q = Math.min(m, _), M = this.slice(h, y), G = n.slice(i, c);
424
424
  for (let D = 0; D < q; ++D)
425
425
  if (M[D] !== G[D]) {
426
- m = M[D], T = G[D];
426
+ m = M[D], _ = G[D];
427
427
  break;
428
428
  }
429
- return m < T ? -1 : T < m ? 1 : 0;
429
+ return m < _ ? -1 : _ < m ? 1 : 0;
430
430
  };
431
431
  function j(a, n, i, c, h) {
432
432
  if (a.length === 0)
433
433
  return -1;
434
- if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, kt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
434
+ if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Pt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
435
435
  if (h)
436
436
  return -1;
437
437
  i = a.length - 1;
@@ -447,11 +447,11 @@ ur.write = function(t, e, r, o, s, u) {
447
447
  throw new TypeError("val must be string, number or Buffer");
448
448
  }
449
449
  function B(a, n, i, c, h) {
450
- let y = 1, m = a.length, T = n.length;
450
+ let y = 1, m = a.length, _ = n.length;
451
451
  if (c !== void 0 && (c = String(c).toLowerCase(), c === "ucs2" || c === "ucs-2" || c === "utf16le" || c === "utf-16le")) {
452
452
  if (a.length < 2 || n.length < 2)
453
453
  return -1;
454
- y = 2, m /= 2, T /= 2, i /= 2;
454
+ y = 2, m /= 2, _ /= 2, i /= 2;
455
455
  }
456
456
  function q(G, D) {
457
457
  return y === 1 ? G[D] : G.readUInt16BE(D * y);
@@ -461,14 +461,14 @@ ur.write = function(t, e, r, o, s, u) {
461
461
  let G = -1;
462
462
  for (M = i; M < m; M++)
463
463
  if (q(a, M) === q(n, G === -1 ? 0 : M - G)) {
464
- if (G === -1 && (G = M), M - G + 1 === T)
464
+ if (G === -1 && (G = M), M - G + 1 === _)
465
465
  return G * y;
466
466
  } else
467
467
  G !== -1 && (M -= M - G), G = -1;
468
468
  } else
469
- for (i + T > m && (i = m - T), M = i; M >= 0; M--) {
469
+ for (i + _ > m && (i = m - _), M = i; M >= 0; M--) {
470
470
  let G = !0;
471
- for (let D = 0; D < T; D++)
471
+ for (let D = 0; D < _; D++)
472
472
  if (q(a, M + D) !== q(n, D)) {
473
473
  G = !1;
474
474
  break;
@@ -493,24 +493,24 @@ ur.write = function(t, e, r, o, s, u) {
493
493
  c > y / 2 && (c = y / 2);
494
494
  let m;
495
495
  for (m = 0; m < c; ++m) {
496
- const T = parseInt(n.substr(m * 2, 2), 16);
497
- if (kt(T))
496
+ const _ = parseInt(n.substr(m * 2, 2), 16);
497
+ if (Pt(_))
498
498
  return m;
499
- a[i + m] = T;
499
+ a[i + m] = _;
500
500
  }
501
501
  return m;
502
502
  }
503
503
  function ne(a, n, i, c) {
504
- return nt(rt(n, a.length - i), a, i, c);
504
+ return it(nt(n, a.length - i), a, i, c);
505
505
  }
506
506
  function _e(a, n, i, c) {
507
- return nt(xt(n), a, i, c);
507
+ return it(kt(n), a, i, c);
508
508
  }
509
509
  function Se(a, n, i, c) {
510
- return nt(ft(n), a, i, c);
510
+ return it(lt(n), a, i, c);
511
511
  }
512
512
  function fe(a, n, i, c) {
513
- return nt(v(n, a.length - i), a, i, c);
513
+ return it(w(n, a.length - i), a, i, c);
514
514
  }
515
515
  f.prototype.write = function(n, i, c, h) {
516
516
  if (i === void 0)
@@ -557,7 +557,7 @@ ur.write = function(t, e, r, o, s, u) {
557
557
  data: Array.prototype.slice.call(this._arr || this, 0)
558
558
  };
559
559
  };
560
- function et(a, n, i) {
560
+ function tt(a, n, i) {
561
561
  return n === 0 && i === a.length ? e.fromByteArray(a) : e.fromByteArray(a.slice(n, i));
562
562
  }
563
563
  function le(a, n, i) {
@@ -566,10 +566,10 @@ ur.write = function(t, e, r, o, s, u) {
566
566
  let h = n;
567
567
  for (; h < i; ) {
568
568
  const y = a[h];
569
- let m = null, T = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
570
- if (h + T <= i) {
569
+ let m = null, _ = y > 239 ? 4 : y > 223 ? 3 : y > 191 ? 2 : 1;
570
+ if (h + _ <= i) {
571
571
  let q, M, G, D;
572
- switch (T) {
572
+ switch (_) {
573
573
  case 1:
574
574
  y < 128 && (m = y);
575
575
  break;
@@ -583,31 +583,31 @@ ur.write = function(t, e, r, o, s, u) {
583
583
  q = a[h + 1], M = a[h + 2], G = a[h + 3], (q & 192) === 128 && (M & 192) === 128 && (G & 192) === 128 && (D = (y & 15) << 18 | (q & 63) << 12 | (M & 63) << 6 | G & 63, D > 65535 && D < 1114112 && (m = D));
584
584
  }
585
585
  }
586
- m === null ? (m = 65533, T = 1) : m > 65535 && (m -= 65536, c.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), c.push(m), h += T;
586
+ m === null ? (m = 65533, _ = 1) : m > 65535 && (m -= 65536, c.push(m >>> 10 & 1023 | 55296), m = 56320 | m & 1023), c.push(m), h += _;
587
587
  }
588
- return Be(c);
588
+ return Oe(c);
589
589
  }
590
- const Te = 4096;
591
- function Be(a) {
590
+ const Be = 4096;
591
+ function Oe(a) {
592
592
  const n = a.length;
593
- if (n <= Te)
593
+ if (n <= Be)
594
594
  return String.fromCharCode.apply(String, a);
595
595
  let i = "", c = 0;
596
596
  for (; c < n; )
597
597
  i += String.fromCharCode.apply(
598
598
  String,
599
- a.slice(c, c += Te)
599
+ a.slice(c, c += Be)
600
600
  );
601
601
  return i;
602
602
  }
603
- function tt(a, n, i) {
603
+ function rt(a, n, i) {
604
604
  let c = "";
605
605
  i = Math.min(a.length, i);
606
606
  for (let h = n; h < i; ++h)
607
607
  c += String.fromCharCode(a[h] & 127);
608
608
  return c;
609
609
  }
610
- function Oe(a, n, i) {
610
+ function xe(a, n, i) {
611
611
  let c = "";
612
612
  i = Math.min(a.length, i);
613
613
  for (let h = n; h < i; ++h)
@@ -619,10 +619,10 @@ ur.write = function(t, e, r, o, s, u) {
619
619
  (!n || n < 0) && (n = 0), (!i || i < 0 || i > c) && (i = c);
620
620
  let h = "";
621
621
  for (let y = n; y < i; ++y)
622
- h += Ln[a[y]];
622
+ h += $n[a[y]];
623
623
  return h;
624
624
  }
625
- function xe(a, n, i) {
625
+ function ke(a, n, i) {
626
626
  const c = a.slice(n, i);
627
627
  let h = "";
628
628
  for (let y = 0; y < c.length - 1; y += 2)
@@ -663,13 +663,13 @@ ur.write = function(t, e, r, o, s, u) {
663
663
  return n = n >>> 0, i || V(n, 4, this.length), (this[n] | this[n + 1] << 8 | this[n + 2] << 16) + this[n + 3] * 16777216;
664
664
  }, f.prototype.readUint32BE = f.prototype.readUInt32BE = function(n, i) {
665
665
  return n = n >>> 0, i || V(n, 4, this.length), this[n] * 16777216 + (this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3]);
666
- }, f.prototype.readBigUInt64LE = ke(function(n) {
666
+ }, f.prototype.readBigUInt64LE = Pe(function(n) {
667
667
  n = n >>> 0, pe(n, "offset");
668
668
  const i = this[n], c = this[n + 7];
669
669
  (i === void 0 || c === void 0) && ie(n, this.length - 8);
670
670
  const h = i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24, y = this[++n] + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + c * 2 ** 24;
671
671
  return BigInt(h) + (BigInt(y) << BigInt(32));
672
- }), f.prototype.readBigUInt64BE = ke(function(n) {
672
+ }), f.prototype.readBigUInt64BE = Pe(function(n) {
673
673
  n = n >>> 0, pe(n, "offset");
674
674
  const i = this[n], c = this[n + 7];
675
675
  (i === void 0 || c === void 0) && ie(n, this.length - 8);
@@ -701,13 +701,13 @@ ur.write = function(t, e, r, o, s, u) {
701
701
  return n = n >>> 0, i || V(n, 4, this.length), this[n] | this[n + 1] << 8 | this[n + 2] << 16 | this[n + 3] << 24;
702
702
  }, f.prototype.readInt32BE = function(n, i) {
703
703
  return n = n >>> 0, i || V(n, 4, this.length), this[n] << 24 | this[n + 1] << 16 | this[n + 2] << 8 | this[n + 3];
704
- }, f.prototype.readBigInt64LE = ke(function(n) {
704
+ }, f.prototype.readBigInt64LE = Pe(function(n) {
705
705
  n = n >>> 0, pe(n, "offset");
706
706
  const i = this[n], c = this[n + 7];
707
707
  (i === void 0 || c === void 0) && ie(n, this.length - 8);
708
708
  const h = this[n + 4] + this[n + 5] * 2 ** 8 + this[n + 6] * 2 ** 16 + (c << 24);
709
709
  return (BigInt(h) << BigInt(32)) + BigInt(i + this[++n] * 2 ** 8 + this[++n] * 2 ** 16 + this[++n] * 2 ** 24);
710
- }), f.prototype.readBigInt64BE = ke(function(n) {
710
+ }), f.prototype.readBigInt64BE = Pe(function(n) {
711
711
  n = n >>> 0, pe(n, "offset");
712
712
  const i = this[n], c = this[n + 7];
713
713
  (i === void 0 || c === void 0) && ie(n, this.length - 8);
@@ -723,7 +723,7 @@ ur.write = function(t, e, r, o, s, u) {
723
723
  }, f.prototype.readDoubleBE = function(n, i) {
724
724
  return n = n >>> 0, i || V(n, 8, this.length), r.read(this, n, !1, 52, 8);
725
725
  };
726
- function d(a, n, i, c, h, y) {
726
+ function p(a, n, i, c, h, y) {
727
727
  if (!f.isBuffer(a))
728
728
  throw new TypeError('"buffer" argument must be a Buffer instance');
729
729
  if (n > h || n < y)
@@ -733,8 +733,8 @@ ur.write = function(t, e, r, o, s, u) {
733
733
  }
734
734
  f.prototype.writeUintLE = f.prototype.writeUIntLE = function(n, i, c, h) {
735
735
  if (n = +n, i = i >>> 0, c = c >>> 0, !h) {
736
- const T = Math.pow(2, 8 * c) - 1;
737
- d(this, n, i, c, T, 0);
736
+ const _ = Math.pow(2, 8 * c) - 1;
737
+ p(this, n, i, c, _, 0);
738
738
  }
739
739
  let y = 1, m = 0;
740
740
  for (this[i] = n & 255; ++m < c && (y *= 256); )
@@ -742,23 +742,23 @@ ur.write = function(t, e, r, o, s, u) {
742
742
  return i + c;
743
743
  }, f.prototype.writeUintBE = f.prototype.writeUIntBE = function(n, i, c, h) {
744
744
  if (n = +n, i = i >>> 0, c = c >>> 0, !h) {
745
- const T = Math.pow(2, 8 * c) - 1;
746
- d(this, n, i, c, T, 0);
745
+ const _ = Math.pow(2, 8 * c) - 1;
746
+ p(this, n, i, c, _, 0);
747
747
  }
748
748
  let y = c - 1, m = 1;
749
749
  for (this[i + y] = n & 255; --y >= 0 && (m *= 256); )
750
750
  this[i + y] = n / m & 255;
751
751
  return i + c;
752
752
  }, f.prototype.writeUint8 = f.prototype.writeUInt8 = function(n, i, c) {
753
- return n = +n, i = i >>> 0, c || d(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
753
+ return n = +n, i = i >>> 0, c || p(this, n, i, 1, 255, 0), this[i] = n & 255, i + 1;
754
754
  }, f.prototype.writeUint16LE = f.prototype.writeUInt16LE = function(n, i, c) {
755
- return n = +n, i = i >>> 0, c || d(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
755
+ return n = +n, i = i >>> 0, c || p(this, n, i, 2, 65535, 0), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
756
756
  }, f.prototype.writeUint16BE = f.prototype.writeUInt16BE = function(n, i, c) {
757
- return n = +n, i = i >>> 0, c || d(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
757
+ return n = +n, i = i >>> 0, c || p(this, n, i, 2, 65535, 0), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
758
758
  }, f.prototype.writeUint32LE = f.prototype.writeUInt32LE = function(n, i, c) {
759
- return n = +n, i = i >>> 0, c || d(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
759
+ return n = +n, i = i >>> 0, c || p(this, n, i, 4, 4294967295, 0), this[i + 3] = n >>> 24, this[i + 2] = n >>> 16, this[i + 1] = n >>> 8, this[i] = n & 255, i + 4;
760
760
  }, f.prototype.writeUint32BE = f.prototype.writeUInt32BE = function(n, i, c) {
761
- return n = +n, i = i >>> 0, c || d(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
761
+ return n = +n, i = i >>> 0, c || p(this, n, i, 4, 4294967295, 0), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
762
762
  };
763
763
  function b(a, n, i, c, h) {
764
764
  ge(n, c, h, a, i, 7);
@@ -774,51 +774,51 @@ ur.write = function(t, e, r, o, s, u) {
774
774
  let m = Number(n >> BigInt(32) & BigInt(4294967295));
775
775
  return a[i + 3] = m, m = m >> 8, a[i + 2] = m, m = m >> 8, a[i + 1] = m, m = m >> 8, a[i] = m, i + 8;
776
776
  }
777
- f.prototype.writeBigUInt64LE = ke(function(n, i = 0) {
777
+ f.prototype.writeBigUInt64LE = Pe(function(n, i = 0) {
778
778
  return b(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
779
- }), f.prototype.writeBigUInt64BE = ke(function(n, i = 0) {
779
+ }), f.prototype.writeBigUInt64BE = Pe(function(n, i = 0) {
780
780
  return S(this, n, i, BigInt(0), BigInt("0xffffffffffffffff"));
781
781
  }), f.prototype.writeIntLE = function(n, i, c, h) {
782
782
  if (n = +n, i = i >>> 0, !h) {
783
783
  const q = Math.pow(2, 8 * c - 1);
784
- d(this, n, i, c, q - 1, -q);
784
+ p(this, n, i, c, q - 1, -q);
785
785
  }
786
- let y = 0, m = 1, T = 0;
786
+ let y = 0, m = 1, _ = 0;
787
787
  for (this[i] = n & 255; ++y < c && (m *= 256); )
788
- n < 0 && T === 0 && this[i + y - 1] !== 0 && (T = 1), this[i + y] = (n / m >> 0) - T & 255;
788
+ n < 0 && _ === 0 && this[i + y - 1] !== 0 && (_ = 1), this[i + y] = (n / m >> 0) - _ & 255;
789
789
  return i + c;
790
790
  }, f.prototype.writeIntBE = function(n, i, c, h) {
791
791
  if (n = +n, i = i >>> 0, !h) {
792
792
  const q = Math.pow(2, 8 * c - 1);
793
- d(this, n, i, c, q - 1, -q);
793
+ p(this, n, i, c, q - 1, -q);
794
794
  }
795
- let y = c - 1, m = 1, T = 0;
795
+ let y = c - 1, m = 1, _ = 0;
796
796
  for (this[i + y] = n & 255; --y >= 0 && (m *= 256); )
797
- n < 0 && T === 0 && this[i + y + 1] !== 0 && (T = 1), this[i + y] = (n / m >> 0) - T & 255;
797
+ n < 0 && _ === 0 && this[i + y + 1] !== 0 && (_ = 1), this[i + y] = (n / m >> 0) - _ & 255;
798
798
  return i + c;
799
799
  }, f.prototype.writeInt8 = function(n, i, c) {
800
- return n = +n, i = i >>> 0, c || d(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
800
+ return n = +n, i = i >>> 0, c || p(this, n, i, 1, 127, -128), n < 0 && (n = 255 + n + 1), this[i] = n & 255, i + 1;
801
801
  }, f.prototype.writeInt16LE = function(n, i, c) {
802
- return n = +n, i = i >>> 0, c || d(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
802
+ return n = +n, i = i >>> 0, c || p(this, n, i, 2, 32767, -32768), this[i] = n & 255, this[i + 1] = n >>> 8, i + 2;
803
803
  }, f.prototype.writeInt16BE = function(n, i, c) {
804
- return n = +n, i = i >>> 0, c || d(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
804
+ return n = +n, i = i >>> 0, c || p(this, n, i, 2, 32767, -32768), this[i] = n >>> 8, this[i + 1] = n & 255, i + 2;
805
805
  }, f.prototype.writeInt32LE = function(n, i, c) {
806
- return n = +n, i = i >>> 0, c || d(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
806
+ return n = +n, i = i >>> 0, c || p(this, n, i, 4, 2147483647, -2147483648), this[i] = n & 255, this[i + 1] = n >>> 8, this[i + 2] = n >>> 16, this[i + 3] = n >>> 24, i + 4;
807
807
  }, f.prototype.writeInt32BE = function(n, i, c) {
808
- return n = +n, i = i >>> 0, c || d(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
809
- }, f.prototype.writeBigInt64LE = ke(function(n, i = 0) {
808
+ return n = +n, i = i >>> 0, c || p(this, n, i, 4, 2147483647, -2147483648), n < 0 && (n = 4294967295 + n + 1), this[i] = n >>> 24, this[i + 1] = n >>> 16, this[i + 2] = n >>> 8, this[i + 3] = n & 255, i + 4;
809
+ }, f.prototype.writeBigInt64LE = Pe(function(n, i = 0) {
810
810
  return b(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
811
- }), f.prototype.writeBigInt64BE = ke(function(n, i = 0) {
811
+ }), f.prototype.writeBigInt64BE = Pe(function(n, i = 0) {
812
812
  return S(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
813
813
  });
814
- function F(a, n, i, c, h, y) {
814
+ function I(a, n, i, c, h, y) {
815
815
  if (i + c > a.length)
816
816
  throw new RangeError("Index out of range");
817
817
  if (i < 0)
818
818
  throw new RangeError("Index out of range");
819
819
  }
820
820
  function P(a, n, i, c, h) {
821
- return n = +n, i = i >>> 0, h || F(a, n, i, 4), r.write(a, n, i, c, 23, 4), i + 4;
821
+ return n = +n, i = i >>> 0, h || I(a, n, i, 4), r.write(a, n, i, c, 23, 4), i + 4;
822
822
  }
823
823
  f.prototype.writeFloatLE = function(n, i, c) {
824
824
  return P(this, n, i, !0, c);
@@ -826,7 +826,7 @@ ur.write = function(t, e, r, o, s, u) {
826
826
  return P(this, n, i, !1, c);
827
827
  };
828
828
  function N(a, n, i, c, h) {
829
- return n = +n, i = i >>> 0, h || F(a, n, i, 8), r.write(a, n, i, c, 52, 8), i + 8;
829
+ return n = +n, i = i >>> 0, h || I(a, n, i, 8), r.write(a, n, i, c, 52, 8), i + 8;
830
830
  }
831
831
  f.prototype.writeDoubleLE = function(n, i, c) {
832
832
  return N(this, n, i, !0, c);
@@ -872,17 +872,17 @@ ur.write = function(t, e, r, o, s, u) {
872
872
  for (y = i; y < c; ++y)
873
873
  this[y] = n;
874
874
  else {
875
- const m = f.isBuffer(n) ? n : f.from(n, h), T = m.length;
876
- if (T === 0)
875
+ const m = f.isBuffer(n) ? n : f.from(n, h), _ = m.length;
876
+ if (_ === 0)
877
877
  throw new TypeError('The value "' + n + '" is invalid for argument "value"');
878
878
  for (y = 0; y < c - i; ++y)
879
- this[y + i] = m[y % T];
879
+ this[y + i] = m[y % _];
880
880
  }
881
881
  return this;
882
882
  };
883
- const C = {};
883
+ const F = {};
884
884
  function O(a, n, i) {
885
- C[a] = class extends i {
885
+ F[a] = class extends i {
886
886
  constructor() {
887
887
  super(), Object.defineProperty(this, "message", {
888
888
  value: n.apply(this, arguments),
@@ -922,11 +922,11 @@ ur.write = function(t, e, r, o, s, u) {
922
922
  "ERR_OUT_OF_RANGE",
923
923
  function(a, n, i) {
924
924
  let c = `The value of "${a}" is out of range.`, h = i;
925
- return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = L(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = L(h)), h += "n"), c += ` It must be ${n}. Received ${h}`, c;
925
+ return Number.isInteger(i) && Math.abs(i) > 2 ** 32 ? h = U(String(i)) : typeof i == "bigint" && (h = String(i), (i > BigInt(2) ** BigInt(32) || i < -(BigInt(2) ** BigInt(32))) && (h = U(h)), h += "n"), c += ` It must be ${n}. Received ${h}`, c;
926
926
  },
927
927
  RangeError
928
928
  );
929
- function L(a) {
929
+ function U(a) {
930
930
  let n = "", i = a.length;
931
931
  const c = a[0] === "-" ? 1 : 0;
932
932
  for (; i >= c + 4; i -= 3)
@@ -939,31 +939,31 @@ ur.write = function(t, e, r, o, s, u) {
939
939
  function ge(a, n, i, c, h, y) {
940
940
  if (a > i || a < n) {
941
941
  const m = typeof n == "bigint" ? "n" : "";
942
- let T;
943
- throw y > 3 ? n === 0 || n === BigInt(0) ? T = `>= 0${m} and < 2${m} ** ${(y + 1) * 8}${m}` : T = `>= -(2${m} ** ${(y + 1) * 8 - 1}${m}) and < 2 ** ${(y + 1) * 8 - 1}${m}` : T = `>= ${n}${m} and <= ${i}${m}`, new C.ERR_OUT_OF_RANGE("value", T, a);
942
+ let _;
943
+ throw y > 3 ? n === 0 || n === BigInt(0) ? _ = `>= 0${m} and < 2${m} ** ${(y + 1) * 8}${m}` : _ = `>= -(2${m} ** ${(y + 1) * 8 - 1}${m}) and < 2 ** ${(y + 1) * 8 - 1}${m}` : _ = `>= ${n}${m} and <= ${i}${m}`, new F.ERR_OUT_OF_RANGE("value", _, a);
944
944
  }
945
945
  Y(c, h, y);
946
946
  }
947
947
  function pe(a, n) {
948
948
  if (typeof a != "number")
949
- throw new C.ERR_INVALID_ARG_TYPE(n, "number", a);
949
+ throw new F.ERR_INVALID_ARG_TYPE(n, "number", a);
950
950
  }
951
951
  function ie(a, n, i) {
952
- throw Math.floor(a) !== a ? (pe(a, i), new C.ERR_OUT_OF_RANGE(i || "offset", "an integer", a)) : n < 0 ? new C.ERR_BUFFER_OUT_OF_BOUNDS() : new C.ERR_OUT_OF_RANGE(
952
+ throw Math.floor(a) !== a ? (pe(a, i), new F.ERR_OUT_OF_RANGE(i || "offset", "an integer", a)) : n < 0 ? new F.ERR_BUFFER_OUT_OF_BOUNDS() : new F.ERR_OUT_OF_RANGE(
953
953
  i || "offset",
954
954
  `>= ${i ? 1 : 0} and <= ${n}`,
955
955
  a
956
956
  );
957
957
  }
958
958
  const De = /[^+/0-9A-Za-z-_]/g;
959
- function ct(a) {
959
+ function ft(a) {
960
960
  if (a = a.split("=")[0], a = a.trim().replace(De, ""), a.length < 2)
961
961
  return "";
962
962
  for (; a.length % 4 !== 0; )
963
963
  a = a + "=";
964
964
  return a;
965
965
  }
966
- function rt(a, n) {
966
+ function nt(a, n) {
967
967
  n = n || 1 / 0;
968
968
  let i;
969
969
  const c = a.length;
@@ -1022,23 +1022,23 @@ ur.write = function(t, e, r, o, s, u) {
1022
1022
  }
1023
1023
  return y;
1024
1024
  }
1025
- function xt(a) {
1025
+ function kt(a) {
1026
1026
  const n = [];
1027
1027
  for (let i = 0; i < a.length; ++i)
1028
1028
  n.push(a.charCodeAt(i) & 255);
1029
1029
  return n;
1030
1030
  }
1031
- function v(a, n) {
1031
+ function w(a, n) {
1032
1032
  let i, c, h;
1033
1033
  const y = [];
1034
1034
  for (let m = 0; m < a.length && !((n -= 2) < 0); ++m)
1035
1035
  i = a.charCodeAt(m), c = i >> 8, h = i % 256, y.push(h), y.push(c);
1036
1036
  return y;
1037
1037
  }
1038
- function ft(a) {
1039
- return e.toByteArray(ct(a));
1038
+ function lt(a) {
1039
+ return e.toByteArray(ft(a));
1040
1040
  }
1041
- function nt(a, n, i, c) {
1041
+ function it(a, n, i, c) {
1042
1042
  let h;
1043
1043
  for (h = 0; h < c && !(h + i >= n.length || h >= a.length); ++h)
1044
1044
  n[h + i] = a[h];
@@ -1047,10 +1047,10 @@ ur.write = function(t, e, r, o, s, u) {
1047
1047
  function me(a, n) {
1048
1048
  return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
1049
1049
  }
1050
- function kt(a) {
1050
+ function Pt(a) {
1051
1051
  return a !== a;
1052
1052
  }
1053
- const Ln = function() {
1053
+ const $n = function() {
1054
1054
  const a = "0123456789abcdef", n = new Array(256);
1055
1055
  for (let i = 0; i < 16; ++i) {
1056
1056
  const c = i * 16;
@@ -1059,36 +1059,36 @@ ur.write = function(t, e, r, o, s, u) {
1059
1059
  }
1060
1060
  return n;
1061
1061
  }();
1062
- function ke(a) {
1063
- return typeof BigInt > "u" ? $n : a;
1062
+ function Pe(a) {
1063
+ return typeof BigInt > "u" ? Dn : a;
1064
1064
  }
1065
- function $n() {
1065
+ function Dn() {
1066
1066
  throw new Error("BigInt not supported");
1067
1067
  }
1068
- })(Wr);
1069
- var Yr = { exports: {} }, H = Yr.exports = {}, be, we;
1070
- function Jt() {
1068
+ })(Yr);
1069
+ var Zr = { exports: {} }, K = Zr.exports = {}, be, we;
1070
+ function Xt() {
1071
1071
  throw new Error("setTimeout has not been defined");
1072
1072
  }
1073
- function Yt() {
1073
+ function Zt() {
1074
1074
  throw new Error("clearTimeout has not been defined");
1075
1075
  }
1076
1076
  (function() {
1077
1077
  try {
1078
- typeof setTimeout == "function" ? be = setTimeout : be = Jt;
1078
+ typeof setTimeout == "function" ? be = setTimeout : be = Xt;
1079
1079
  } catch {
1080
- be = Jt;
1080
+ be = Xt;
1081
1081
  }
1082
1082
  try {
1083
- typeof clearTimeout == "function" ? we = clearTimeout : we = Yt;
1083
+ typeof clearTimeout == "function" ? we = clearTimeout : we = Zt;
1084
1084
  } catch {
1085
- we = Yt;
1085
+ we = Zt;
1086
1086
  }
1087
1087
  })();
1088
- function Xr(t) {
1088
+ function en(t) {
1089
1089
  if (be === setTimeout)
1090
1090
  return setTimeout(t, 0);
1091
- if ((be === Jt || !be) && setTimeout)
1091
+ if ((be === Xt || !be) && setTimeout)
1092
1092
  return be = setTimeout, setTimeout(t, 0);
1093
1093
  try {
1094
1094
  return be(t, 0);
@@ -1100,10 +1100,10 @@ function Xr(t) {
1100
1100
  }
1101
1101
  }
1102
1102
  }
1103
- function ri(t) {
1103
+ function ni(t) {
1104
1104
  if (we === clearTimeout)
1105
1105
  return clearTimeout(t);
1106
- if ((we === Yt || !we) && clearTimeout)
1106
+ if ((we === Zt || !we) && clearTimeout)
1107
1107
  return we = clearTimeout, clearTimeout(t);
1108
1108
  try {
1109
1109
  return we(t);
@@ -1115,74 +1115,74 @@ function ri(t) {
1115
1115
  }
1116
1116
  }
1117
1117
  }
1118
- var Fe = [], ze = !1, Ne, lt = -1;
1119
- function ni() {
1120
- !ze || !Ne || (ze = !1, Ne.length ? Fe = Ne.concat(Fe) : lt = -1, Fe.length && Zr());
1118
+ var Te = [], Ke = !1, Ne, ht = -1;
1119
+ function ii() {
1120
+ !Ke || !Ne || (Ke = !1, Ne.length ? Te = Ne.concat(Te) : ht = -1, Te.length && tn());
1121
1121
  }
1122
- function Zr() {
1123
- if (!ze) {
1124
- var t = Xr(ni);
1125
- ze = !0;
1126
- for (var e = Fe.length; e; ) {
1127
- for (Ne = Fe, Fe = []; ++lt < e; )
1128
- Ne && Ne[lt].run();
1129
- lt = -1, e = Fe.length;
1122
+ function tn() {
1123
+ if (!Ke) {
1124
+ var t = en(ii);
1125
+ Ke = !0;
1126
+ for (var e = Te.length; e; ) {
1127
+ for (Ne = Te, Te = []; ++ht < e; )
1128
+ Ne && Ne[ht].run();
1129
+ ht = -1, e = Te.length;
1130
1130
  }
1131
- Ne = null, ze = !1, ri(t);
1131
+ Ne = null, Ke = !1, ni(t);
1132
1132
  }
1133
1133
  }
1134
- H.nextTick = function(t) {
1134
+ K.nextTick = function(t) {
1135
1135
  var e = new Array(arguments.length - 1);
1136
1136
  if (arguments.length > 1)
1137
1137
  for (var r = 1; r < arguments.length; r++)
1138
1138
  e[r - 1] = arguments[r];
1139
- Fe.push(new en(t, e)), Fe.length === 1 && !ze && Xr(Zr);
1139
+ Te.push(new rn(t, e)), Te.length === 1 && !Ke && en(tn);
1140
1140
  };
1141
- function en(t, e) {
1141
+ function rn(t, e) {
1142
1142
  this.fun = t, this.array = e;
1143
1143
  }
1144
- en.prototype.run = function() {
1144
+ rn.prototype.run = function() {
1145
1145
  this.fun.apply(null, this.array);
1146
1146
  };
1147
- H.title = "browser";
1148
- H.browser = !0;
1149
- H.env = {};
1150
- H.argv = [];
1151
- H.version = "";
1152
- H.versions = {};
1147
+ K.title = "browser";
1148
+ K.browser = !0;
1149
+ K.env = {};
1150
+ K.argv = [];
1151
+ K.version = "";
1152
+ K.versions = {};
1153
1153
  function Ce() {
1154
1154
  }
1155
- H.on = Ce;
1156
- H.addListener = Ce;
1157
- H.once = Ce;
1158
- H.off = Ce;
1159
- H.removeListener = Ce;
1160
- H.removeAllListeners = Ce;
1161
- H.emit = Ce;
1162
- H.prependListener = Ce;
1163
- H.prependOnceListener = Ce;
1164
- H.listeners = function(t) {
1155
+ K.on = Ce;
1156
+ K.addListener = Ce;
1157
+ K.once = Ce;
1158
+ K.off = Ce;
1159
+ K.removeListener = Ce;
1160
+ K.removeAllListeners = Ce;
1161
+ K.emit = Ce;
1162
+ K.prependListener = Ce;
1163
+ K.prependOnceListener = Ce;
1164
+ K.listeners = function(t) {
1165
1165
  return [];
1166
1166
  };
1167
- H.binding = function(t) {
1167
+ K.binding = function(t) {
1168
1168
  throw new Error("process.binding is not supported");
1169
1169
  };
1170
- H.cwd = function() {
1170
+ K.cwd = function() {
1171
1171
  return "/";
1172
1172
  };
1173
- H.chdir = function(t) {
1173
+ K.chdir = function(t) {
1174
1174
  throw new Error("process.chdir is not supported");
1175
1175
  };
1176
- H.umask = function() {
1176
+ K.umask = function() {
1177
1177
  return 0;
1178
1178
  };
1179
- var ii = Yr.exports;
1179
+ var oi = Zr.exports;
1180
1180
  (function(t) {
1181
1181
  Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
1182
- const e = Wr, r = ii, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
1182
+ const e = Yr, r = oi, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
1183
1183
  Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
1184
- })(_);
1185
- class oi {
1184
+ })(T);
1185
+ class si {
1186
1186
  }
1187
1187
  window.slStore = /* @__PURE__ */ Object.create(null);
1188
1188
  class _t {
@@ -1201,33 +1201,33 @@ class _t {
1201
1201
  return this.store;
1202
1202
  }
1203
1203
  }
1204
- const si = (t) => {
1204
+ const ai = (t) => {
1205
1205
  const e = Object.keys(t);
1206
- return Qr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
1206
+ return Kr(e.map((r) => t[r].getStore()), (...r) => Object.fromEntries(e.map((o, s) => [o, r[s]])));
1207
1207
  };
1208
- class it extends _t {
1208
+ class ot extends _t {
1209
1209
  getValues = () => this.getStore().get();
1210
1210
  getValue = (e) => this.getStore().get()[e];
1211
1211
  setValue = (e, r) => this.getStore().setKey(e, r);
1212
1212
  subscribe = (...e) => this.getStore().subscribe(...e);
1213
1213
  unsubscribe = () => this.getStore().off();
1214
1214
  }
1215
- const ot = (t) => Dn(t);
1216
- var Ee;
1215
+ const st = (t) => jn(t);
1216
+ var Ie;
1217
1217
  (function(t) {
1218
1218
  t.ORGANIZATION = "ORGANIZATION", t.STREAM = "STREAM";
1219
- })(Ee || (Ee = {}));
1220
- const ai = {
1221
- [ce.BETTING]: "betting",
1222
- [ce.GAMES]: "games",
1223
- [ce.PUBLIC_CHAT]: "publicChat",
1224
- [ce.TWITTER]: "twitter"
1219
+ })(Ie || (Ie = {}));
1220
+ const ui = {
1221
+ [ae.BETTING]: "betting",
1222
+ [ae.GAMES]: "games",
1223
+ [ae.PUBLIC_CHAT]: "publicChat",
1224
+ [ae.TWITTER]: "twitter"
1225
1225
  };
1226
- var Ue;
1226
+ var Le;
1227
1227
  (function(t) {
1228
1228
  t.Ready = "ready", t.Suspended = "suspended";
1229
- })(Ue || (Ue = {}));
1230
- class cr {
1229
+ })(Le || (Le = {}));
1230
+ class lr {
1231
1231
  status;
1232
1232
  source;
1233
1233
  config;
@@ -1235,7 +1235,7 @@ class cr {
1235
1235
  listeners = /* @__PURE__ */ new Set();
1236
1236
  settingsKey;
1237
1237
  constructor({ settings: e, ...r }, o) {
1238
- this.settingsKey = ai[r.type], this.status = It(Ue.Suspended), this.config = new it(ot(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new it(ot(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new it(ot({}), `feature:settings:${this.settingsKey}`), this.source = o;
1238
+ this.settingsKey = ui[r.type], this.status = Ft(Le.Suspended), this.config = new ot(st(r), `feature:config:${this.settingsKey}`), this.settingsKey !== void 0 && e?.overlaySettings.case === this.settingsKey ? this.settings = new ot(st(e.overlaySettings.value), `feature:settings:${this.settingsKey}`) : this.settings = new ot(st({}), `feature:settings:${this.settingsKey}`), this.source = o;
1239
1239
  }
1240
1240
  get featureConfig() {
1241
1241
  return this.config.getStore();
@@ -1247,10 +1247,10 @@ class cr {
1247
1247
  this.listeners.add(e);
1248
1248
  }
1249
1249
  enable = () => {
1250
- this.status.set(Ue.Ready);
1250
+ this.status.set(Le.Ready);
1251
1251
  };
1252
1252
  disable = () => {
1253
- this.status.set(Ue.Suspended);
1253
+ this.status.set(Le.Suspended);
1254
1254
  };
1255
1255
  setFeatureConfig = ({ settings: e, ...r }) => {
1256
1256
  let o;
@@ -1266,7 +1266,7 @@ class cr {
1266
1266
  }
1267
1267
  };
1268
1268
  update = (e, r) => {
1269
- this.source === Ee.STREAM && r === Ee.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
1269
+ this.source === Ie.STREAM && r === Ie.ORGANIZATION || (this.setFeatureConfig(e), this.source = r);
1270
1270
  };
1271
1271
  fireEvent(e) {
1272
1272
  for (const r of this.listeners.values())
@@ -1277,7 +1277,7 @@ class cr {
1277
1277
  }
1278
1278
  }
1279
1279
  }
1280
- class ae extends _t {
1280
+ class ue extends _t {
1281
1281
  getValue = () => this.getStore().get();
1282
1282
  getValues() {
1283
1283
  throw new Error("not implemented");
@@ -1292,11 +1292,11 @@ class ae extends _t {
1292
1292
  return this.getStore().get();
1293
1293
  }
1294
1294
  }
1295
- const ue = (t) => It(t), fr = (t, e) => Qr(t, e);
1295
+ const ce = (t) => Ft(t), hr = (t, e) => Kr(t, e);
1296
1296
  class te extends _t {
1297
1297
  atomStore;
1298
1298
  constructor(e, r, o) {
1299
- super(e, `api:${r}`), this.atomStore = It(), o && e.subscribe((s) => {
1299
+ super(e, `api:${r}`), this.atomStore = Ft(), o && e.subscribe((s) => {
1300
1300
  this.atomStore.set(o(s));
1301
1301
  });
1302
1302
  }
@@ -1325,7 +1325,7 @@ class te extends _t {
1325
1325
  key = () => this.getStore().key;
1326
1326
  off = () => this.getStore().off();
1327
1327
  }
1328
- async function* ui(t, e) {
1328
+ async function* ci(t, e) {
1329
1329
  for await (const r of e) {
1330
1330
  t.response.message = r, t.received_at = Date.now();
1331
1331
  const o = {
@@ -1335,7 +1335,7 @@ async function* ui(t, e) {
1335
1335
  window.postMessage(o), yield r;
1336
1336
  }
1337
1337
  }
1338
- const ci = () => (t) => async (e) => {
1338
+ const fi = () => (t) => async (e) => {
1339
1339
  const r = {
1340
1340
  name: e.url,
1341
1341
  request: {},
@@ -1347,7 +1347,7 @@ const ci = () => (t) => async (e) => {
1347
1347
  if (r.received_at = Date.now(), r.stream = o.stream, r.response.header = Object.fromEntries(o.header.entries()), r.response.trailer = Object.fromEntries(o.trailer.entries()), o.stream)
1348
1348
  return {
1349
1349
  ...o,
1350
- message: ui(r, o.message)
1350
+ message: ci(r, o.message)
1351
1351
  };
1352
1352
  {
1353
1353
  r.request.message = e.message, r.response.message = o.message, r.latency = r.received_at - r.sent_at;
@@ -1375,7 +1375,7 @@ var Ae;
1375
1375
  (function(t) {
1376
1376
  t.Init = "init", t.Ready = "ready", t.Connecting = "connecting", t.Connected = "connected", t.Disconnected = "disconnected", t.Failed = "failed", t.Reconnecting = "reconnecting";
1377
1377
  })(Ae || (Ae = {}));
1378
- class fi {
1378
+ class li {
1379
1379
  params;
1380
1380
  stream;
1381
1381
  method;
@@ -1390,7 +1390,7 @@ class fi {
1390
1390
  ts: /* @__PURE__ */ new Date(),
1391
1391
  log: []
1392
1392
  };
1393
- this.state = new it(ot(u), `subscription:${s.name}:state`), this.name = s.name, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = o, this.method = r, s.withStore && (this.store = new ae(ue(null), `subscription:${s.name}:store`)), "subscribe" in o && typeof o.subscribe == "function" && o.subscribe(() => {
1393
+ this.state = new ot(st(u), `subscription:${s.name}:state`), this.name = s.name, this.headers = e, this.listeners = /* @__PURE__ */ new Map(), this.params = o, this.method = r, s.withStore && (this.store = new ue(ce(null), `subscription:${s.name}:store`)), "subscribe" in o && typeof o.subscribe == "function" && o.subscribe(() => {
1394
1394
  this.reconnect();
1395
1395
  }), this.updateState(Ae.Ready);
1396
1396
  }
@@ -1432,10 +1432,10 @@ class fi {
1432
1432
  this.addStateLog(`data routed to ${this.listeners.size} listeners`);
1433
1433
  };
1434
1434
  onStreamError = (e) => {
1435
- e !== void 0 && (e.code !== jn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
1435
+ e !== void 0 && (e.code !== Mn.Canceled && e.rawMessage !== "[canceled] BodyStreamBuffer was aborted" ? (this.updateState(Ae.Failed), this.state.setValue("error", e)) : this.disconnect());
1436
1436
  };
1437
1437
  }
1438
- class li {
1438
+ class hi {
1439
1439
  toJsonOptions = {
1440
1440
  emitDefaultValues: !1,
1441
1441
  enumAsInteger: !0,
@@ -1450,11 +1450,11 @@ class li {
1450
1450
  callbackClients;
1451
1451
  subscriptions;
1452
1452
  constructor(e) {
1453
- this.host = e, this.$headers = new it(ot({
1454
- "sl-device-id": _.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
1453
+ this.host = e, this.$headers = new ot(st({
1454
+ "sl-device-id": T.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
1455
1455
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
1456
- const [r, o, s] = Gn();
1457
- this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = qn({
1456
+ const [r, o, s] = Qn();
1457
+ this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Gn({
1458
1458
  baseUrl: e,
1459
1459
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1460
1460
  // @ts-ignore
@@ -1469,7 +1469,7 @@ class li {
1469
1469
  const s = this.subscriptions.get(r);
1470
1470
  if (s)
1471
1471
  return s;
1472
- const u = new fi(this.$headers, e, r, o);
1472
+ const u = new li(this.$headers, e, r, o);
1473
1473
  return this.subscriptions.set(r, u), u;
1474
1474
  };
1475
1475
  removeSubscription = (e) => {
@@ -1490,14 +1490,14 @@ class li {
1490
1490
  const r = e.typeName;
1491
1491
  if (this.clients.has(r))
1492
1492
  return this.clients.get(r);
1493
- const o = Mn(e, this.transport);
1493
+ const o = Vn(e, this.transport);
1494
1494
  return this.clients.set(r, o), o;
1495
1495
  };
1496
1496
  getCallbackClient = (e) => {
1497
1497
  const r = e.typeName;
1498
1498
  if (this.callbackClients.has(r))
1499
1499
  return this.callbackClients.get(r);
1500
- const o = Vn(e, this.transport);
1500
+ const o = qn(e, this.transport);
1501
1501
  return this.callbackClients.set(r, o), o;
1502
1502
  };
1503
1503
  // create unary client, used for query request
@@ -1529,11 +1529,11 @@ class li {
1529
1529
  o.header.set(u, s[u]);
1530
1530
  return r(o);
1531
1531
  };
1532
- this.interceptors.push(e), this.interceptors.push(ci());
1532
+ this.interceptors.push(e), this.interceptors.push(fi());
1533
1533
  };
1534
1534
  }
1535
- const hi = (t, e) => {
1536
- const { client: r, queryKey: o } = e.createPromiseClient(Qn, {
1535
+ const pi = (t, e) => {
1536
+ const { client: r, queryKey: o } = e.createPromiseClient(zn, {
1537
1537
  method: "retrieveEventId",
1538
1538
  params: [t]
1539
1539
  });
@@ -1550,32 +1550,29 @@ const hi = (t, e) => {
1550
1550
  }
1551
1551
  }
1552
1552
  });
1553
- }, pi = (t, e) => {
1554
- const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "getStream", params: [t] });
1553
+ }, di = (t, e) => {
1554
+ const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "getStream", params: [t] });
1555
1555
  return e.nanoquery.createFetcherStore(o, {
1556
1556
  fetcher: async (s, u, l) => l ? (await r.getStream({
1557
1557
  id: l
1558
1558
  // we are sure that id is a string
1559
1559
  })).data?.attributes : void 0
1560
1560
  });
1561
- }, di = (t, e) => {
1562
- const { queryKey: r, client: o } = e.createPromiseClient(zr, { method: "me", params: [t] });
1561
+ }, yi = (t, e) => {
1562
+ const { queryKey: r, client: o } = e.createPromiseClient(Hr, { method: "me", params: [t] });
1563
1563
  return e.nanoquery.createFetcherStore(r, {
1564
1564
  fetcher: () => o.me({})
1565
1565
  });
1566
- }, yi = (t) => {
1567
- const { client: e, queryKeyStr: r } = t.createPromiseClient(zr, { method: "bypassAuth" });
1568
- return t.nanoquery.createMutatorStore(async ({ data: { userKey: o, schema: s, init: u }, getCacheUpdater: l }) => {
1569
- const [f] = l(r), p = await e.bypassAuth({ userKey: o, schema: s, init: u });
1570
- return f(p), p;
1571
- });
1572
- }, gi = (t, e) => {
1573
- const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "get", params: [t] });
1566
+ }, gi = (t) => {
1567
+ const { client: e } = t.createPromiseClient(Hr, { method: "bypassAuth" });
1568
+ return ({ userKey: r, schema: o, init: s }) => e.bypassAuth({ userKey: r, schema: o, init: s });
1569
+ }, mi = (t, e) => {
1570
+ const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "get", params: [t] });
1574
1571
  return e.nanoquery.createFetcherStore(o, {
1575
1572
  fetcher: async () => (await r.get({})).data?.attributes
1576
1573
  });
1577
- }, mi = (t, e) => {
1578
- const { client: r, queryKey: o } = e.createPromiseClient(Ft, { method: "getOrganization", params: [t] });
1574
+ }, bi = (t, e) => {
1575
+ const { client: r, queryKey: o } = e.createPromiseClient(Tt, { method: "getOrganization", params: [t] });
1579
1576
  return e.nanoquery.createFetcherStore(o, {
1580
1577
  fetcher: async () => {
1581
1578
  const s = await r.getOrganization({});
@@ -1585,18 +1582,18 @@ const hi = (t, e) => {
1585
1582
  } : void 0;
1586
1583
  }
1587
1584
  });
1588
- }, bi = (t, e) => {
1589
- const { client: r, queryKey: o } = e.createPromiseClient(Ft, {
1585
+ }, wi = (t, e) => {
1586
+ const { client: r, queryKey: o } = e.createPromiseClient(Tt, {
1590
1587
  method: "getOrganizationAdvertising",
1591
1588
  params: [t]
1592
1589
  });
1593
1590
  return e.nanoquery.createFetcherStore(o, {
1594
1591
  fetcher: async () => (await r.getOrganizationAdvertising({})).data?.attributes
1595
1592
  });
1596
- }, wi = (t, e, r) => {
1597
- t.transport = new li(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
1593
+ }, vi = (t, e, r) => {
1594
+ t.transport = new hi(e.host), t.sdk.host = t.transport.host, t.transport.setSdkKey(e.sdkKey), r();
1598
1595
  };
1599
- class lr {
1596
+ class pr {
1600
1597
  delimiter = ":";
1601
1598
  prefix;
1602
1599
  constructor(e = "main") {
@@ -1619,63 +1616,74 @@ class lr {
1619
1616
  window.localStorage.removeItem(this.generateKey(e));
1620
1617
  };
1621
1618
  }
1622
- var Re;
1619
+ var Ee;
1623
1620
  (function(t) {
1624
- t.SCHEMA = "schema", t.TOKEN = "token";
1625
- })(Re || (Re = {}));
1626
- class tn extends lr {
1621
+ t.SCHEMA = "schema", t.EXTERNAL_TOKEN = "eToken", t.TOKEN = "token";
1622
+ })(Ee || (Ee = {}));
1623
+ class Ge extends pr {
1627
1624
  constructor() {
1628
1625
  super("user");
1629
1626
  }
1630
1627
  // Schema
1631
1628
  setSchema = (e) => {
1632
- this.write(Re.SCHEMA, e);
1629
+ this.write(Ee.SCHEMA, e);
1633
1630
  };
1634
- getSchema = () => this.read(Re.SCHEMA);
1631
+ getSchema = () => this.read(Ee.SCHEMA);
1635
1632
  // Token
1636
1633
  setToken = (e) => {
1637
- this.write(Re.TOKEN, e);
1634
+ this.write(Ee.TOKEN, e);
1638
1635
  };
1639
- getToken = () => this.read(Re.TOKEN);
1640
- removeToken = () => {
1641
- this.remove(Re.TOKEN);
1636
+ getToken = () => this.read(Ee.TOKEN);
1637
+ // External Token
1638
+ setExternalToken = (e) => {
1639
+ this.write(Ee.EXTERNAL_TOKEN, e);
1642
1640
  };
1643
- clearNotification = () => {
1644
- this.clear();
1641
+ getExternalToken = () => this.read(Ee.EXTERNAL_TOKEN);
1642
+ removeToken = () => {
1643
+ this.remove(Ee.TOKEN);
1645
1644
  };
1646
1645
  }
1647
- var Ie;
1646
+ var Fe;
1648
1647
  (function(t) {
1649
1648
  t.DISABLED = "disabled", t.INITIALIZATION = "initialization", t.READY = "ready", t.FAILED = "failed", t.SUSPENDED = "suspended";
1650
- })(Ie || (Ie = {}));
1651
- const vi = (t) => {
1652
- const e = new ae(ue(void 0), "enabled"), r = new ae(ue(Ie.DISABLED), "status"), o = new ae(ue(void 0), "userKey"), s = new ae(ue(void 0), "userToken"), u = new tn();
1653
- s.listen((I) => {
1654
- I ? u.setToken(I) : u.removeToken();
1655
- });
1656
- const l = new ae(ue(void 0), "providerStreamId"), f = new te(hi(l.getStore(), t), "slStreamId", (I) => I?.data), p = new te(di(s.getStore(), t), "user", (I) => I?.data?.data?.id), A = new te(gi(s.getStore(), t), "userSettings"), g = new te(pi(f.getAtomStore(), t), "streamSettings");
1657
- f.getAtomStore().listen((I) => {
1658
- (I === "" || I === void 0) && g.getStore().mutate(void 0);
1659
- });
1660
- const w = new te(mi(e.getStore(), t), "organizationSettings", (I) => I?.data?.id), E = new te(bi(w.getAtomStore(), t), "organizationAdvertising");
1649
+ })(Fe || (Fe = {}));
1650
+ const Si = (t) => {
1651
+ const e = new Ge(), r = new ue(ce(e.getExternalToken()), "userKey"), o = new ue(ce(e.getToken()), "userToken"), s = new te(yi(o.getStore(), t), "user", (l) => l?.data?.data?.id), u = new te(mi(o.getStore(), t), "userSettings");
1652
+ return {
1653
+ userKey: r,
1654
+ userToken: o,
1655
+ user: s,
1656
+ userSettings: u
1657
+ };
1658
+ }, Ai = (t) => {
1659
+ const e = new ue(ce(void 0), "providerStreamId"), r = new te(pi(e.getStore(), t), "slStreamId", (s) => s?.data), o = new te(di(r.getAtomStore(), t), "streamSettings");
1660
+ return r.getAtomStore().listen((s) => {
1661
+ (s === "" || s === void 0) && o.getStore().mutate(void 0);
1662
+ }), {
1663
+ providerStreamId: e,
1664
+ slStreamId: r,
1665
+ streamSettings: o
1666
+ };
1667
+ }, Ei = (t) => {
1668
+ const e = new ue(ce(void 0), "enabled"), r = new ue(ce(Fe.DISABLED), "status"), o = new te(bi(e.getStore(), t), "organizationSettings", (f) => f?.data?.id), s = new te(wi(o.getAtomStore(), t), "organizationAdvertising"), u = Si(t), l = Ai(t);
1661
1669
  return {
1662
1670
  enabled: e,
1663
1671
  status: r,
1664
- providerStreamId: l,
1665
- slStreamId: f,
1666
- streamSettings: g,
1667
- user: p,
1668
- userKey: o,
1669
- userToken: s,
1670
- userSettings: A,
1671
- organizationSettings: w,
1672
- organizationAdvertising: E
1672
+ providerStreamId: l.providerStreamId,
1673
+ slStreamId: l.slStreamId,
1674
+ streamSettings: l.streamSettings,
1675
+ user: u.user,
1676
+ userKey: u.userKey,
1677
+ userToken: u.userToken,
1678
+ userSettings: u.userSettings,
1679
+ organizationSettings: o,
1680
+ organizationAdvertising: s
1673
1681
  };
1674
1682
  };
1675
- class Si extends _t {
1683
+ class Ii extends _t {
1676
1684
  stores;
1677
1685
  constructor(e) {
1678
- const r = vi(e), o = si(r);
1686
+ const r = Ei(e), o = ai(r);
1679
1687
  super(o, "core"), this.stores = r;
1680
1688
  }
1681
1689
  getValue() {
@@ -1696,93 +1704,140 @@ class Si extends _t {
1696
1704
  };
1697
1705
  unsubscribe = () => this.getStore().off();
1698
1706
  }
1699
- class Ai extends oi {
1707
+ class Fi extends si {
1700
1708
  $coreStore;
1701
1709
  transport;
1702
- $bypassLogin;
1710
+ bypassLogin;
1703
1711
  constructor(e, r) {
1704
- super(), this.$coreStore = e, this.transport = r, this.$bypassLogin = yi(this.transport), this.subscribe();
1712
+ super(), this.$coreStore = e, this.transport = r, this.bypassLogin = gi(this.transport), this.connect();
1705
1713
  }
1706
- me = async () => (await this.$coreStore.getValues().user.getValue())?.data;
1707
- login = async (e, r) => (this.$coreStore.getValues().userKey.setValue(r), await this.$bypassLogin.mutate({ schema: e, userKey: r, init: !1 }), this.me());
1714
+ me = async () => (this.$coreStore.getValues().user.invalidate(), (await this.$coreStore.getValues().user.getValue())?.data);
1715
+ /**
1716
+ * Login user by token and schema.
1717
+ * On success, save the user and update the token to the Transport, UserStore and cache.
1718
+ * @param schema - schema created by the host app and provided to the StreamLayer SDK.
1719
+ * @param userKey - user token received from the host app.
1720
+ */
1721
+ login = async (e, r) => {
1722
+ this.$coreStore.getValues().userKey.setValue(r);
1723
+ const o = await this.bypassLogin({ schema: e, userKey: r, init: !1 }), s = o.meta?.jwt;
1724
+ if (!s)
1725
+ throw new Error("internal: token missing");
1726
+ return this.$coreStore.getValues().user.getStore().mutate(o), this.saveToken(s), s;
1727
+ };
1708
1728
  isAuthenticated = () => this.me();
1729
+ /**
1730
+ * Logout user. Clears the all user data from the store.
1731
+ */
1709
1732
  logout = () => {
1710
- this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth("");
1733
+ this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userKey.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth(""), new Ge().clear();
1734
+ };
1735
+ /**
1736
+ * Soft logout, only clears the StreamLayer user data from the store.
1737
+ * Does not clear the external token. And automatically tries to re-login by external token.
1738
+ */
1739
+ softLogout = () => {
1740
+ const e = new Ge();
1741
+ this.$coreStore.getValues().user.setValue(), this.$coreStore.getValues().userToken.setValue(), this.transport.setAuth(""), e.setToken(""), this.reLogin();
1711
1742
  };
1712
1743
  /**
1713
- * subscribe to user store and set auth header to the Transport on user update
1744
+ * Try to re-login.
1745
+ * - If the user has an token, then try to login by it, by calling the me() method.
1746
+ * - If the user has an external token, then try to login by it, by calling the login() method. On failure, logout.
1747
+ * -
1748
+ * - If no one of the above is true, then logout.
1714
1749
  */
1715
- subscribe = () => {
1716
- this.$bypassLogin.subscribe((e, r) => {
1717
- r === "data" && (this.transport.setAuth(e?.data?.meta?.jwt), this.$coreStore.getValues().userToken.setValue(e?.data?.meta?.jwt));
1750
+ reLogin = () => {
1751
+ const e = new Ge(), r = e.getToken(), o = e.getExternalToken();
1752
+ if (this.$coreStore.getValues().userKey.setValue(o), this.$coreStore.getValues().userToken.setValue(r), r)
1753
+ return this.saveToken(r), this.me();
1754
+ if (o && !r) {
1755
+ const s = e.getSchema();
1756
+ s && o && this.login(s, o).catch(() => {
1757
+ this.logout();
1758
+ });
1759
+ }
1760
+ };
1761
+ /**
1762
+ * Write token to the Transport and UserStore
1763
+ */
1764
+ saveToken = (e) => {
1765
+ this.transport.setAuth(e), this.$coreStore.getValues().userToken.setValue(e), new Ge().setToken(e);
1766
+ };
1767
+ /**
1768
+ * Add interceptor to the Transport to handle 401 and 403 errors.
1769
+ * If the user is logged in (auth header is set), then make a soft logout.
1770
+ */
1771
+ connect = () => {
1772
+ this.transport.registerInterceptor((e) => async (r) => {
1773
+ try {
1774
+ return await e(r);
1775
+ } catch (o) {
1776
+ throw o.code && (o.code === 7 || o.code === 16) && this.transport.getHeader("authorization") && this.softLogout(), o;
1777
+ }
1718
1778
  });
1719
1779
  };
1720
1780
  }
1721
- const Ei = (t, e, r) => {
1722
- t.auth = new Ai(t.store, t.transport);
1723
- const o = new tn();
1724
- t.stores.status.listen(async (s) => {
1725
- if (s === Ie.READY) {
1726
- const u = o.getSchema(), l = o.getToken();
1727
- u && l && await t.auth.login(u, l);
1728
- }
1729
- }), t.sdk.authorizationBypass = async (s, u) => {
1730
- await t.auth.login(s, u), o.setSchema("streamlayer:streamlayer");
1781
+ const Nt = new Ge(), Ti = (t, e, r) => {
1782
+ t.auth = new Fi(t.store, t.transport), t.stores.status.listen((o) => {
1783
+ o === Fe.READY && t.auth.reLogin();
1784
+ }), t.sdk.authorizationBypass = async (o, s) => {
1785
+ await t.auth.login(o, s), Nt.setSchema(o), Nt.setExternalToken(s);
1731
1786
  }, t.sdk.logout = () => {
1732
- t.auth.logout();
1787
+ t.auth.logout(), Nt.clear();
1733
1788
  }, t.sdk.getUserStore = () => t.stores.user.getStore(), t.sdk.isUserAuthorized = () => t.auth.isAuthenticated(), r();
1734
- }, Ii = (t, e, r) => {
1735
- t.store = new Si(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = t.store.getStore(), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.storeUnsubscribe = () => {
1789
+ }, Ci = (t, e, r) => {
1790
+ t.store = new Ii(t.transport), t.stores = t.store.getValues(), t.sdk.enabled = t.stores.enabled.getStore(), t.sdk.status = t.stores.status.getStore(), t.sdk.sdkStore = t.store.getStore(), t.sdk.organizationStore = () => t.stores.organizationSettings.getStore(), t.storeUnsubscribe = () => {
1736
1791
  t.store.unsubscribe();
1737
1792
  }, r();
1738
- }, Fi = (t, e, r) => {
1793
+ }, _i = (t, e, r) => {
1739
1794
  t.sdk = /* @__PURE__ */ Object.create(null), t.sdk.initializeApp = async () => {
1740
1795
  if (t.stores.enabled.get() === "on")
1741
1796
  return { enabled: !0 };
1742
- t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Ie.INITIALIZATION);
1797
+ t.storeSubscribe(), t.stores.enabled.setValue("on"), t.stores.status.setValue(Fe.INITIALIZATION);
1743
1798
  try {
1744
1799
  const o = await t.stores.organizationSettings.getValue();
1745
- return o ? (t.stores.status.setValue(Ie.READY), { enabled: !!o }) : (t.stores.status.setValue(Ie.FAILED), { err: "failed" });
1800
+ return o ? (t.stores.status.setValue(Fe.READY), { enabled: !!o }) : (t.stores.status.setValue(Fe.FAILED), { err: "failed" });
1746
1801
  } catch (o) {
1747
- return t.stores.enabled.setValue(), t.stores.status.setValue(Ie.FAILED), { err: `${o}` };
1802
+ return t.stores.enabled.setValue(), t.stores.status.setValue(Fe.FAILED), { err: `${o}` };
1748
1803
  }
1749
1804
  }, t.sdk.disableApp = () => {
1750
- t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Ie.DISABLED), t.storeUnsubscribe());
1805
+ t.stores.enabled.get() === "on" && (t.stores.enabled.setValue(), t.stores.status.setValue(Fe.DISABLED), t.storeUnsubscribe());
1751
1806
  }, t.sdk.createEventSession = (o) => {
1752
1807
  t.stores.providerStreamId.setValue(o);
1753
1808
  }, r();
1754
- }, Ci = zn({
1809
+ }, Bi = Kn({
1755
1810
  level: "trace"
1756
- }), rn = (t, e) => Ci.child({ name: t }, e), _i = (t, e, r) => {
1757
- const { client: o, queryKey: s } = r.createPromiseClient(Hr, {
1811
+ }), nn = (t, e) => Bi.child({ name: t }, e), Oi = (t, e, r) => {
1812
+ const { client: o, queryKey: s } = r.createPromiseClient(Wr, {
1758
1813
  method: "summary",
1759
1814
  params: [t, e]
1760
1815
  });
1761
1816
  return r.nanoquery.createFetcherStore(s, {
1762
- fetcher: async (u, l, f, p) => (await o.summary({
1817
+ fetcher: async (u, l, f, d) => (await o.summary({
1763
1818
  eventId: f,
1764
- userId: p
1819
+ userId: d
1765
1820
  })).data?.attributes
1766
1821
  });
1767
- }, Ti = (t, e, r) => {
1768
- const { client: o, queryKey: s } = r.createPromiseClient(Hr, {
1822
+ }, xi = (t, e, r) => {
1823
+ const { client: o, queryKey: s } = r.createPromiseClient(Wr, {
1769
1824
  method: "list",
1770
1825
  params: [t, e]
1771
1826
  });
1772
1827
  return r.nanoquery.createFetcherStore(s, {
1773
- fetcher: async (u, l, f, p) => {
1828
+ fetcher: async (u, l, f, d) => {
1774
1829
  const A = { usersIds: [] };
1775
- return f && (A.eventId = f), p && (A.leaderboardId = p), (await o.list(A)).data;
1830
+ return f && !d && (A.eventId = f), d && (A.leaderboardId = d), !f && !d ? [] : (await o.list(A)).data;
1776
1831
  }
1777
1832
  });
1778
- }, Bi = (t, e) => {
1833
+ }, ki = (t, e) => {
1779
1834
  const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "get", params: [t] });
1780
1835
  return e.nanoquery.createFetcherStore(o, {
1781
1836
  fetcher: async (s, u, l) => (await r.get({
1782
1837
  eventId: l
1783
1838
  })).data?.attributes
1784
1839
  });
1785
- }, Oi = (t, e) => {
1840
+ }, Pi = (t, e) => {
1786
1841
  const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "syncQuestion", params: [t] });
1787
1842
  return e.nanoquery.createFetcherStore(o, {
1788
1843
  fetcher: async (s, u, l) => l ? (await r.syncQuestion({
@@ -1791,42 +1846,42 @@ const Ei = (t, e, r) => {
1791
1846
  }
1792
1847
  })).data?.attributes : void 0
1793
1848
  });
1794
- }, xi = (t, e) => {
1795
- const { client: r } = e.createCallbackClient(de), o = It({ eventId: t.get() || "", feedId: "" });
1849
+ }, Ri = (t, e) => {
1850
+ const { client: r } = e.createCallbackClient(de), o = Ft({ eventId: t.get() || "", feedId: "" });
1796
1851
  return t.subscribe((u = "") => {
1797
1852
  o.set({ eventId: u, feedId: "" });
1798
1853
  }), e.addSubscription(r.subscription, o, { name: "feedSubscription" });
1799
- }, ki = (t, e) => {
1854
+ }, Ni = (t, e) => {
1800
1855
  const { client: r } = e.createCallbackClient(de);
1801
1856
  return e.addSubscription(r.questionSubscription, { questionId: t }, { name: "questionSubscription" });
1802
- }, Pi = async (t, e) => {
1857
+ }, Li = async (t, e) => {
1803
1858
  const { client: r } = e.createPromiseClient(de, { method: "questionByUser", params: [t] });
1804
1859
  return (await r.questionByUser({
1805
1860
  questionId: t
1806
1861
  })).data?.attributes?.question;
1807
- }, Ri = (t, e) => {
1862
+ }, Ui = (t, e) => {
1808
1863
  const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "questionByUser", params: [t] });
1809
1864
  return e.nanoquery.createFetcherStore(o, {
1810
1865
  fetcher: async (s, u, l) => (await r.questionByUser({
1811
1866
  questionId: l
1812
1867
  })).data?.attributes?.question
1813
1868
  });
1814
- }, Ni = (t, e) => {
1869
+ }, $i = (t, e) => {
1815
1870
  const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "pickHistory", params: [t] });
1816
1871
  return e.nanoquery.createFetcherStore(o, {
1817
1872
  fetcher: async (s, u, l) => l ? (await r.pickHistory({
1818
1873
  eventId: l
1819
- })).data?.map(({ attributes: p }) => p) : []
1874
+ })).data?.map(({ attributes: d }) => d) : []
1820
1875
  });
1821
- }, Ui = (t, e) => {
1876
+ }, Di = (t, e) => {
1822
1877
  const { client: r, queryKey: o } = e.createPromiseClient(de, { method: "insightHistory", params: [t] });
1823
1878
  return e.nanoquery.createFetcherStore(o, {
1824
1879
  fetcher: async (s, u, l) => l ? (await r.insightHistory({
1825
1880
  eventId: l
1826
- })).data?.map(({ attributes: p }) => p) : void 0
1881
+ })).data?.map(({ attributes: d }) => d) : void 0
1827
1882
  });
1828
- }, nn = (t) => (t.gamification || (t.gamification = new Li(t)), t.gamification);
1829
- class Li {
1883
+ }, on = (t) => (t.gamification || (t.gamification = new ji(t)), t.gamification);
1884
+ class ji {
1830
1885
  /** sl event id */
1831
1886
  slStreamId;
1832
1887
  /** organization id */
@@ -1852,13 +1907,13 @@ class Li {
1852
1907
  constructor(e) {
1853
1908
  if (e.gamification)
1854
1909
  throw new Error("GamificationBackground Singleton error");
1855
- this.log = rn("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ae(ue(void 0), "moderationId").getStore(), this.openedQuestionId = new ae(ue(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new te(Bi(this.slStreamId, e.transport), "gamification:moderation"), this.activeQuestionId = new te(Oi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = new te(Ri(this.openedQuestionId, e.transport), "gamification:openedQuestion"), this.openedQuestionId.listen((r) => {
1856
- this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = ki(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
1910
+ this.log = nn("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new ue(ce(void 0), "moderationId").getStore(), this.openedQuestionId = new ue(ce(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new te(ki(this.slStreamId, e.transport), "gamification:moderation"), this.activeQuestionId = new te(Pi(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = new te(Ui(this.openedQuestionId, e.transport), "gamification:openedQuestion"), this.openedQuestionId.listen((r) => {
1911
+ this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = Ni(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
1857
1912
  window.requestAnimationFrame(() => {
1858
1913
  this.openedQuestion.getStore().mutate(o.data?.attributes?.question);
1859
1914
  });
1860
1915
  }), this.questionSubscription.connect()) : (this.log.info("cleanup on close question"), this.questionSubscription !== void 0 && (e.transport.removeSubscription(this.questionSubscription), this.questionSubscription = void 0));
1861
- }), this.feedSubscription = xi(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1916
+ }), this.feedSubscription = Ri(this.slStreamId, e.transport), this.feedSubscription.addListener("feed-subscription-active-question", (r) => {
1862
1917
  window.requestAnimationFrame(() => {
1863
1918
  const o = this.activeQuestionId.getStore();
1864
1919
  o && o.mutate(r.data?.attributes);
@@ -1893,7 +1948,7 @@ class Li {
1893
1948
  this.openedQuestionId.set(void 0), e && this.notifications.markAsViewed(this.getCurrentSessionId({ prefix: "notification", entity: e }));
1894
1949
  };
1895
1950
  }
1896
- class $i {
1951
+ class Mi {
1897
1952
  notificationsList;
1898
1953
  notifications;
1899
1954
  store;
@@ -1903,7 +1958,7 @@ class $i {
1903
1958
  options;
1904
1959
  logger;
1905
1960
  constructor(e) {
1906
- this.options = e, this.logger = rn("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new ae(ue(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = fr(this.notifications.getStore(), (r) => r ? [...r.values()] : []);
1961
+ this.options = e, this.logger = nn("notifications"), this.store = /* @__PURE__ */ new Map(), this.timeouts = /* @__PURE__ */ new Map(), this.waitingQueue = /* @__PURE__ */ new Set(), this.activeQueue = /* @__PURE__ */ new Set(), this.notifications = new ue(ce(/* @__PURE__ */ new Map()), "notifications-queue"), this.notificationsList = hr(this.notifications.getStore(), (r) => r ? [...r.values()] : []);
1907
1962
  }
1908
1963
  addToQueue = (e) => {
1909
1964
  if (this.store.has(e.id)) {
@@ -1963,18 +2018,18 @@ class $i {
1963
2018
  this.store.delete(e), this.activeQueue.delete(e), this.waitingQueue.delete(e), this.tickWaitingQueue(), this.logger.debug({ notificationId: e }, "notification hiding");
1964
2019
  };
1965
2020
  }
1966
- var mt;
2021
+ var bt;
1967
2022
  (function(t) {
1968
2023
  t.OPENED = "opened";
1969
- })(mt || (mt = {}));
1970
- class Di extends lr {
2024
+ })(bt || (bt = {}));
2025
+ class Vi extends pr {
1971
2026
  constructor() {
1972
2027
  super("notification");
1973
2028
  }
1974
2029
  setOpened = (e) => {
1975
- this.write(mt.OPENED, e, "true");
2030
+ this.write(bt.OPENED, e, "true");
1976
2031
  };
1977
- isOpened = (e) => this.read(mt.OPENED, e);
2032
+ isOpened = (e) => this.read(bt.OPENED, e);
1978
2033
  clearNotification = () => {
1979
2034
  this.clear();
1980
2035
  };
@@ -1983,11 +2038,11 @@ var He;
1983
2038
  (function(t) {
1984
2039
  t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION";
1985
2040
  })(He || (He = {}));
1986
- class ji {
2041
+ class qi {
1987
2042
  queue;
1988
2043
  storage;
1989
2044
  constructor(e = {}) {
1990
- this.storage = new Di(), this.queue = new $i({ concurrency: 1, animationDelay: 300, ...e });
2045
+ this.storage = new Vi(), this.queue = new Mi({ concurrency: 1, animationDelay: 300, ...e });
1991
2046
  }
1992
2047
  add = (e) => {
1993
2048
  this.storage.isOpened(e.id) || this.queue.addToQueue(e);
@@ -2000,37 +2055,37 @@ class ji {
2000
2055
  this.storage.setOpened(e);
2001
2056
  };
2002
2057
  }
2003
- const Mi = (t, e, r) => {
2004
- t.notifications = new ji(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
2005
- }, Vi = (t, e) => {
2058
+ const Gi = (t, e, r) => {
2059
+ t.notifications = new qi(), t.addNotification = t.notifications.add, t.sdk.getNotificationsStore = () => t.notifications.getQueueStore(), r();
2060
+ }, Qi = (t, e) => {
2006
2061
  const { client: r } = t.createPromiseClient(de, { method: "submitAnswer" });
2007
2062
  return r.submitAnswer({ data: e });
2008
- }, qi = (t, e) => {
2063
+ }, zi = (t, e) => {
2009
2064
  const { client: r } = t.createPromiseClient(de, { method: "submitInplay" });
2010
2065
  return r.submitInplay({ data: { eventId: +e } });
2011
- }, Gi = (t, e) => {
2066
+ }, Ki = (t, e) => {
2012
2067
  const { client: r } = t.createPromiseClient(de, { method: "skipQuestion" });
2013
2068
  return r.skipQuestion({ data: { id: e } });
2014
2069
  };
2015
- var bt;
2070
+ var wt;
2016
2071
  (function(t) {
2017
2072
  t.ONBOARDING = "onboarding";
2018
- })(bt || (bt = {}));
2019
- class Qi extends lr {
2073
+ })(wt || (wt = {}));
2074
+ class Hi extends pr {
2020
2075
  constructor() {
2021
2076
  super("gamification");
2022
2077
  }
2023
2078
  saveOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }, s) => {
2024
- this.write(bt.ONBOARDING, o, e, r, s);
2079
+ this.write(wt.ONBOARDING, o, e, r, s);
2025
2080
  };
2026
- getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(bt.ONBOARDING, o, e, r);
2081
+ getOnboardingStatus = ({ userId: e, eventId: r, organizationId: o }) => this.read(wt.ONBOARDING, o, e, r);
2027
2082
  }
2028
- const Ar = /* @__PURE__ */ new Set([Qe.POLL, Qe.PREDICTION, Qe.TRIVIA]);
2083
+ const Ir = /* @__PURE__ */ new Set([ze.POLL, ze.PREDICTION, ze.TRIVIA]);
2029
2084
  var Z;
2030
2085
  (function(t) {
2031
2086
  t.Unset = "unset", t.Required = "required", t.Optional = "optional", t.Completed = "completed", t.Disabled = "disabled", t.Unavailable = "unavailable";
2032
2087
  })(Z || (Z = {}));
2033
- class zi extends cr {
2088
+ class Wi extends lr {
2034
2089
  /** user statistics (leaderboard panel) */
2035
2090
  userSummary;
2036
2091
  /** questions list (pick history) */
@@ -2052,14 +2107,14 @@ class zi extends cr {
2052
2107
  /** Browser cache */
2053
2108
  storage;
2054
2109
  constructor(e, r, o) {
2055
- super(e, r), this.background = nn(o), this.storage = new Qi(), this.userSummary = new te(_i(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.questions = new te(Ni(this.background.slStreamId, o.transport), "gamification:questions"), this.leaderboardId = new ae(ue(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = new ae(ue(Z.Unset), "onboardingStatus").getStore(), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ce.GAMES), this.openedQuestion = fr(this.background.openedQuestion.getStore(), (s) => s.data?.type && Ar.has(s.data.type) ? { loading: !1, data: s.data } : { loading: s.loading, data: void 0 }), this.leaderboardList = new te(Ti(this.background.slStreamId, this.leaderboardId, o.transport), "gamification:leaderboardList"), this.onboardingStatus.subscribe((s) => {
2110
+ super(e, r), this.background = on(o), this.storage = new Hi(), this.userSummary = new te(Oi(this.background.slStreamId, this.background.userId, o.transport), "gamification:userSummary"), this.questions = new te($i(this.background.slStreamId, o.transport), "gamification:questions"), this.leaderboardId = new ue(ce(this.settings.getValue("pinnedLeaderboardId")), "pinnedLeaderboardId").getStore(), this.onboardingStatus = new ue(ce(Z.Unset), "onboardingStatus").getStore(), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ae.GAMES), this.openedQuestion = hr(this.background.openedQuestion.getStore(), (s) => s.data?.type && Ir.has(s.data.type) ? { loading: !1, data: s.data } : { loading: s.loading, data: void 0 }), this.leaderboardList = new te(xi(this.background.slStreamId, this.leaderboardId, o.transport), "gamification:leaderboardList"), this.onboardingStatus.subscribe((s) => {
2056
2111
  (s === Z.Optional || Z.Required) && this.showOnboardingInApp();
2057
2112
  }), this.status.subscribe((s) => {
2058
- s === Ue.Ready ? (this.notifications.close(this.background.getCurrentSessionId({ prefix: "onboarding" })), this.connect(o.transport)) : this.disconnect();
2113
+ s === Le.Ready ? (this.notifications.close(this.background.getCurrentSessionId({ prefix: "onboarding" })), this.connect(o.transport)) : this.disconnect();
2059
2114
  }), this.onboardingStatus.subscribe((s) => {
2060
2115
  s && this.background.activeQuestionId.invalidate();
2061
2116
  }), this.background.activeQuestionId.listen((s) => {
2062
- s && s.data && this.onboardingStatus.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Gr.ON && Ar.has(s.data.question.type) && s.data.question.status === Wt.ACTIVE && this.notifications.add({
2117
+ s && s.data && this.onboardingStatus.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== zr.ON && Ir.has(s.data.question.type) && s.data.question.status === Yt.ACTIVE && this.notifications.add({
2063
2118
  type: He.QUESTION,
2064
2119
  action: () => s.data?.question && this.openQuestion(s.data.question.id),
2065
2120
  close: () => s.data?.question && this.closeQuestion(s.data.question.id),
@@ -2127,10 +2182,10 @@ class zi extends cr {
2127
2182
  if (!o)
2128
2183
  return;
2129
2184
  const { status: s, type: u, id: l } = o;
2130
- if (s === Wt.RESOLVED && u === Qe.PREDICTION) {
2185
+ if (s === Yt.RESOLVED && u === ze.PREDICTION) {
2131
2186
  const f = this.background.getCurrentSessionId({
2132
2187
  prefix: `notification-id:${l}`
2133
- }), A = (await Pi(l, e))?.answers.find(({ correct: g }) => g);
2188
+ }), A = (await Li(l, e))?.answers.find(({ correct: g }) => g);
2134
2189
  this.notifications.add({
2135
2190
  type: He.ONBOARDING,
2136
2191
  action: () => this.openQuestion(l),
@@ -2155,22 +2210,22 @@ class zi extends cr {
2155
2210
  // onboarding
2156
2211
  submitInplay = async () => {
2157
2212
  const e = this.background.slStreamId.get();
2158
- e && (await qi(this.transport, e), this.onboardingStatus.set(Z.Completed), this.storage.saveOnboardingStatus({
2213
+ e && (await zi(this.transport, e), this.onboardingStatus.set(Z.Completed), this.storage.saveOnboardingStatus({
2159
2214
  organizationId: this.background.organizationId.get() || "",
2160
2215
  userId: this.background.userId.get() || "",
2161
2216
  eventId: e
2162
2217
  }, Z.Completed));
2163
2218
  };
2164
2219
  submitAnswer = async (e, r) => {
2165
- await Vi(this.transport, { questionId: e, answerId: r }), this.questions?.invalidate();
2220
+ await Qi(this.transport, { questionId: e, answerId: r }), this.questions?.invalidate();
2166
2221
  };
2167
2222
  skipQuestion = async (e) => {
2168
- await Gi(this.transport, e), this.questions?.invalidate();
2223
+ await Ki(this.transport, e), this.questions?.invalidate();
2169
2224
  };
2170
2225
  openQuestion = (e) => (this.openFeature(), this.background.openQuestion(e));
2171
2226
  closeQuestion = (e) => this.background.closeQuestion(e);
2172
2227
  }
2173
- class Hi extends cr {
2228
+ class Ji extends lr {
2174
2229
  insights;
2175
2230
  closeFeature;
2176
2231
  openFeature;
@@ -2179,10 +2234,10 @@ class Hi extends cr {
2179
2234
  transport;
2180
2235
  background;
2181
2236
  constructor(e, r, o) {
2182
- super(e, r), this.background = nn(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ce.HIGHLIGHTS), this.status.subscribe((s) => {
2183
- s === Ue.Ready ? this.connect() : this.disconnect();
2237
+ super(e, r), this.background = on(o), this.notifications = o.notifications, this.transport = o.transport, this.closeFeature = o.sdk.closeFeature, this.openFeature = () => o.sdk.openFeature(ae.HIGHLIGHTS), this.status.subscribe((s) => {
2238
+ s === Le.Ready ? this.connect() : this.disconnect();
2184
2239
  }), this.background.activeQuestionId.listen((s) => {
2185
- s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Gr.ON && s.data.question.type === Qe.FACTOID && s.data.question.status === Wt.ACTIVE && this.notifications.add({
2240
+ s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== zr.ON && s.data.question.type === ze.FACTOID && s.data.question.status === Yt.ACTIVE && this.notifications.add({
2186
2241
  type: He.QUESTION,
2187
2242
  action: () => s.data?.question && this.openHighlight(s.data.question.id),
2188
2243
  close: () => s.data?.question && this.closeHighlight(s.data.question.id),
@@ -2196,13 +2251,13 @@ class Hi extends cr {
2196
2251
  imagePosition: s.data.question.notification.imagePosition
2197
2252
  }
2198
2253
  });
2199
- }), this.openedInsight = fr(this.background.openedQuestion.getStore(), (s) => {
2200
- if (s.data?.type === Qe.FACTOID)
2254
+ }), this.openedInsight = hr(this.background.openedQuestion.getStore(), (s) => {
2255
+ if (s.data?.type === ze.FACTOID)
2201
2256
  return s.data;
2202
2257
  });
2203
2258
  }
2204
2259
  connect = () => {
2205
- this.insights ? this.insights.invalidate() : this.insights = new te(Ui(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
2260
+ this.insights ? this.insights.invalidate() : this.insights = new te(Di(this.background.slStreamId, this.transport), "gamification:insights"), this.background.feedSubscription.addListener("feed-subscription-insights-list", () => {
2206
2261
  window.requestAnimationFrame(() => {
2207
2262
  this.insights?.invalidate();
2208
2263
  });
@@ -2214,19 +2269,19 @@ class Hi extends cr {
2214
2269
  openHighlight = (e) => (this.openFeature(), this.background.openQuestion(e));
2215
2270
  closeHighlight = (e) => this.background.closeQuestion(e);
2216
2271
  }
2217
- ce.GAMES + "", ce.HIGHLIGHTS + "";
2218
- class Ki extends cr {
2272
+ ae.GAMES + "", ae.HIGHLIGHTS + "";
2273
+ class Yi extends lr {
2219
2274
  constructor(e, r) {
2220
2275
  super(e, r);
2221
2276
  }
2222
2277
  }
2223
- const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HIGHLIGHTS ? new Hi(t, e, r) : new Ki(t, e), Ji = (t, e, r) => {
2224
- t.features = /* @__PURE__ */ new Map(), t.activeFeature = new ae(ue(ce.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
2278
+ const Xi = (t, e, r) => t.type === ae.GAMES ? new Wi(t, e, r) : t.type === ae.HIGHLIGHTS ? new Ji(t, e, r) : new Yi(t, e), Zi = (t, e, r) => {
2279
+ t.features = /* @__PURE__ */ new Map(), t.activeFeature = new ue(ce(ae.UNSET), "activeFeature"), t.sdk.getFeatures = () => t.features, t.sdk.getFeature = (o) => t.features.get(o), t.sdk.getActiveFeature = () => t.activeFeature.getStore(), t.sdk.openFeature = (o) => {
2225
2280
  t.activeFeature.setValue(o);
2226
2281
  }, t.sdk.closeFeature = () => {
2227
- t.activeFeature.setValue(ce.UNSET);
2228
- }, t.initFeature = (o, s = Ee.ORGANIZATION) => {
2229
- const u = Wi(o, s, t);
2282
+ t.activeFeature.setValue(ae.UNSET);
2283
+ }, t.initFeature = (o, s = Ie.ORGANIZATION) => {
2284
+ const u = Xi(o, s, t);
2230
2285
  t.features.set(o.type, u);
2231
2286
  }, t.updateFeature = (o, s) => {
2232
2287
  t.features.get(o.type)?.update(o, s);
@@ -2236,13 +2291,13 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
2236
2291
  const o = await t.stores.organizationSettings.getValue();
2237
2292
  t.features.clear();
2238
2293
  for (const s of o?.overlays || [])
2239
- t.initFeature(s, Ee.ORGANIZATION);
2294
+ t.initFeature(s, Ie.ORGANIZATION);
2240
2295
  }, t.stores.providerStreamId.listen((o) => {
2241
2296
  o || t.reinitializeFeatures();
2242
2297
  }), t.storeSubscribe = () => {
2243
2298
  const o = (u, l) => {
2244
2299
  if (l?.overlays) {
2245
- u === Ee.STREAM && t.features.clear();
2300
+ u === Ie.STREAM && t.features.clear();
2246
2301
  for (const f of l.overlays)
2247
2302
  f.sdkEnable === !0 && (t.features.has(f.type) ? t.updateFeature(f, u) : t.initFeature(f, u));
2248
2303
  }
@@ -2259,7 +2314,7 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
2259
2314
  organizationSettings: (u) => {
2260
2315
  if (u.data)
2261
2316
  try {
2262
- o(Ee.ORGANIZATION, u.data);
2317
+ o(Ie.ORGANIZATION, u.data);
2263
2318
  } catch (l) {
2264
2319
  console.log(l);
2265
2320
  }
@@ -2267,7 +2322,7 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
2267
2322
  streamSettings: (u) => {
2268
2323
  if (u.data)
2269
2324
  try {
2270
- o(Ee.STREAM, u.data);
2325
+ o(Ie.STREAM, u.data);
2271
2326
  } catch (l) {
2272
2327
  console.log(l);
2273
2328
  }
@@ -2276,8 +2331,8 @@ const Wi = (t, e, r) => t.type === ce.GAMES ? new zi(t, e, r) : t.type === ce.HI
2276
2331
  t.store.subscribe(s);
2277
2332
  }, r();
2278
2333
  };
2279
- var hr = { exports: {} }, pr = { exports: {} };
2280
- function Yi(t) {
2334
+ var dr = { exports: {} }, yr = { exports: {} };
2335
+ function eo(t) {
2281
2336
  var e = new t(), r = e;
2282
2337
  function o() {
2283
2338
  var u = e;
@@ -2291,21 +2346,21 @@ function Yi(t) {
2291
2346
  release: s
2292
2347
  };
2293
2348
  }
2294
- var Xi = Yi, Zi = Xi;
2295
- function on(t, e, r) {
2349
+ var to = eo, ro = to;
2350
+ function sn(t, e, r) {
2296
2351
  if (typeof t == "function" && (r = e, e = t, t = null), r < 1)
2297
2352
  throw new Error("fastqueue concurrency must be greater than 1");
2298
- var o = Zi(eo), s = null, u = null, l = 0, f = null, p = {
2299
- push: U,
2353
+ var o = ro(no), s = null, u = null, l = 0, f = null, d = {
2354
+ push: L,
2300
2355
  drain: se,
2301
2356
  saturated: se,
2302
2357
  pause: g,
2303
2358
  paused: !1,
2304
2359
  concurrency: r,
2305
2360
  running: A,
2306
- resume: I,
2361
+ resume: C,
2307
2362
  idle: R,
2308
- length: w,
2363
+ length: v,
2309
2364
  getQueue: E,
2310
2365
  unshift: Q,
2311
2366
  empty: se,
@@ -2313,14 +2368,14 @@ function on(t, e, r) {
2313
2368
  killAndDrain: ye,
2314
2369
  error: ee
2315
2370
  };
2316
- return p;
2371
+ return d;
2317
2372
  function A() {
2318
2373
  return l;
2319
2374
  }
2320
2375
  function g() {
2321
- p.paused = !0;
2376
+ d.paused = !0;
2322
2377
  }
2323
- function w() {
2378
+ function v() {
2324
2379
  for (var x = s, j = 0; x; )
2325
2380
  x = x.next, j++;
2326
2381
  return j;
@@ -2330,34 +2385,34 @@ function on(t, e, r) {
2330
2385
  j.push(x.value), x = x.next;
2331
2386
  return j;
2332
2387
  }
2333
- function I() {
2334
- if (p.paused) {
2335
- p.paused = !1;
2336
- for (var x = 0; x < p.concurrency; x++)
2388
+ function C() {
2389
+ if (d.paused) {
2390
+ d.paused = !1;
2391
+ for (var x = 0; x < d.concurrency; x++)
2337
2392
  l++, z();
2338
2393
  }
2339
2394
  }
2340
2395
  function R() {
2341
- return l === 0 && p.length() === 0;
2396
+ return l === 0 && d.length() === 0;
2342
2397
  }
2343
- function U(x, j) {
2398
+ function L(x, j) {
2344
2399
  var B = o.get();
2345
- B.context = t, B.release = z, B.value = x, B.callback = j || se, B.errorHandler = f, l === p.concurrency || p.paused ? u ? (u.next = B, u = B) : (s = B, u = B, p.saturated()) : (l++, e.call(t, B.value, B.worked));
2400
+ B.context = t, B.release = z, B.value = x, B.callback = j || se, B.errorHandler = f, l === d.concurrency || d.paused ? u ? (u.next = B, u = B) : (s = B, u = B, d.saturated()) : (l++, e.call(t, B.value, B.worked));
2346
2401
  }
2347
2402
  function Q(x, j) {
2348
2403
  var B = o.get();
2349
- B.context = t, B.release = z, B.value = x, B.callback = j || se, l === p.concurrency || p.paused ? s ? (B.next = s, s = B) : (s = B, u = B, p.saturated()) : (l++, e.call(t, B.value, B.worked));
2404
+ B.context = t, B.release = z, B.value = x, B.callback = j || se, l === d.concurrency || d.paused ? s ? (B.next = s, s = B) : (s = B, u = B, d.saturated()) : (l++, e.call(t, B.value, B.worked));
2350
2405
  }
2351
2406
  function z(x) {
2352
2407
  x && o.release(x);
2353
2408
  var j = s;
2354
- j ? p.paused ? l-- : (u === s && (u = null), s = j.next, j.next = null, e.call(t, j.value, j.worked), u === null && p.empty()) : --l === 0 && p.drain();
2409
+ j ? d.paused ? l-- : (u === s && (u = null), s = j.next, j.next = null, e.call(t, j.value, j.worked), u === null && d.empty()) : --l === 0 && d.drain();
2355
2410
  }
2356
2411
  function X() {
2357
- s = null, u = null, p.drain = se;
2412
+ s = null, u = null, d.drain = se;
2358
2413
  }
2359
2414
  function ye() {
2360
- s = null, u = null, p.drain(), p.drain = se;
2415
+ s = null, u = null, d.drain(), d.drain = se;
2361
2416
  }
2362
2417
  function ee(x) {
2363
2418
  f = x;
@@ -2365,7 +2420,7 @@ function on(t, e, r) {
2365
2420
  }
2366
2421
  function se() {
2367
2422
  }
2368
- function eo() {
2423
+ function no() {
2369
2424
  this.value = null, this.callback = se, this.next = null, this.release = se, this.context = null, this.errorHandler = null;
2370
2425
  var t = this;
2371
2426
  this.worked = function(r, o) {
@@ -2373,106 +2428,106 @@ function eo() {
2373
2428
  t.value = null, t.callback = se, t.errorHandler && u(r, l), s.call(t.context, r, o), t.release(t);
2374
2429
  };
2375
2430
  }
2376
- function to(t, e, r) {
2431
+ function io(t, e, r) {
2377
2432
  typeof t == "function" && (r = e, e = t, t = null);
2378
- function o(g, w) {
2433
+ function o(g, v) {
2379
2434
  e.call(this, g).then(function(E) {
2380
- w(null, E);
2381
- }, w);
2435
+ v(null, E);
2436
+ }, v);
2382
2437
  }
2383
- var s = on(t, o, r), u = s.push, l = s.unshift;
2384
- return s.push = f, s.unshift = p, s.drained = A, s;
2438
+ var s = sn(t, o, r), u = s.push, l = s.unshift;
2439
+ return s.push = f, s.unshift = d, s.drained = A, s;
2385
2440
  function f(g) {
2386
- var w = new Promise(function(E, I) {
2387
- u(g, function(R, U) {
2441
+ var v = new Promise(function(E, C) {
2442
+ u(g, function(R, L) {
2388
2443
  if (R) {
2389
- I(R);
2444
+ C(R);
2390
2445
  return;
2391
2446
  }
2392
- E(U);
2447
+ E(L);
2393
2448
  });
2394
2449
  });
2395
- return w.catch(se), w;
2450
+ return v.catch(se), v;
2396
2451
  }
2397
- function p(g) {
2398
- var w = new Promise(function(E, I) {
2399
- l(g, function(R, U) {
2452
+ function d(g) {
2453
+ var v = new Promise(function(E, C) {
2454
+ l(g, function(R, L) {
2400
2455
  if (R) {
2401
- I(R);
2456
+ C(R);
2402
2457
  return;
2403
2458
  }
2404
- E(U);
2459
+ E(L);
2405
2460
  });
2406
2461
  });
2407
- return w.catch(se), w;
2462
+ return v.catch(se), v;
2408
2463
  }
2409
2464
  function A() {
2410
2465
  if (s.idle())
2411
2466
  return new Promise(function(E) {
2412
2467
  E();
2413
2468
  });
2414
- var g = s.drain, w = new Promise(function(E) {
2469
+ var g = s.drain, v = new Promise(function(E) {
2415
2470
  s.drain = function() {
2416
2471
  g(), E();
2417
2472
  };
2418
2473
  });
2419
- return w;
2474
+ return v;
2420
2475
  }
2421
2476
  }
2422
- pr.exports = on;
2423
- pr.exports.promise = to;
2424
- var sn = pr.exports, dr = { exports: {} }, Ke = typeof Reflect == "object" ? Reflect : null, Er = Ke && typeof Ke.apply == "function" ? Ke.apply : function(e, r, o) {
2477
+ yr.exports = sn;
2478
+ yr.exports.promise = io;
2479
+ var an = yr.exports, gr = { exports: {} }, We = typeof Reflect == "object" ? Reflect : null, Fr = We && typeof We.apply == "function" ? We.apply : function(e, r, o) {
2425
2480
  return Function.prototype.apply.call(e, r, o);
2426
- }, ht;
2427
- Ke && typeof Ke.ownKeys == "function" ? ht = Ke.ownKeys : Object.getOwnPropertySymbols ? ht = function(e) {
2481
+ }, pt;
2482
+ We && typeof We.ownKeys == "function" ? pt = We.ownKeys : Object.getOwnPropertySymbols ? pt = function(e) {
2428
2483
  return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
2429
- } : ht = function(e) {
2484
+ } : pt = function(e) {
2430
2485
  return Object.getOwnPropertyNames(e);
2431
2486
  };
2432
- function ro(t) {
2487
+ function oo(t) {
2433
2488
  console && console.warn && console.warn(t);
2434
2489
  }
2435
- var an = Number.isNaN || function(e) {
2490
+ var un = Number.isNaN || function(e) {
2436
2491
  return e !== e;
2437
2492
  };
2438
2493
  function $() {
2439
2494
  $.init.call(this);
2440
2495
  }
2441
- dr.exports = $;
2442
- dr.exports.once = so;
2496
+ gr.exports = $;
2497
+ gr.exports.once = co;
2443
2498
  $.EventEmitter = $;
2444
2499
  $.prototype._events = void 0;
2445
2500
  $.prototype._eventsCount = 0;
2446
2501
  $.prototype._maxListeners = void 0;
2447
- var Ir = 10;
2448
- function Tt(t) {
2502
+ var Tr = 10;
2503
+ function Bt(t) {
2449
2504
  if (typeof t != "function")
2450
2505
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof t);
2451
2506
  }
2452
2507
  Object.defineProperty($, "defaultMaxListeners", {
2453
2508
  enumerable: !0,
2454
2509
  get: function() {
2455
- return Ir;
2510
+ return Tr;
2456
2511
  },
2457
2512
  set: function(t) {
2458
- if (typeof t != "number" || t < 0 || an(t))
2513
+ if (typeof t != "number" || t < 0 || un(t))
2459
2514
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + t + ".");
2460
- Ir = t;
2515
+ Tr = t;
2461
2516
  }
2462
2517
  });
2463
2518
  $.init = function() {
2464
2519
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
2465
2520
  };
2466
2521
  $.prototype.setMaxListeners = function(e) {
2467
- if (typeof e != "number" || e < 0 || an(e))
2522
+ if (typeof e != "number" || e < 0 || un(e))
2468
2523
  throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
2469
2524
  return this._maxListeners = e, this;
2470
2525
  };
2471
- function un(t) {
2526
+ function cn(t) {
2472
2527
  return t._maxListeners === void 0 ? $.defaultMaxListeners : t._maxListeners;
2473
2528
  }
2474
2529
  $.prototype.getMaxListeners = function() {
2475
- return un(this);
2530
+ return cn(this);
2476
2531
  };
2477
2532
  $.prototype.emit = function(e) {
2478
2533
  for (var r = [], o = 1; o < arguments.length; o++)
@@ -2489,55 +2544,55 @@ $.prototype.emit = function(e) {
2489
2544
  var f = new Error("Unhandled error." + (l ? " (" + l.message + ")" : ""));
2490
2545
  throw f.context = l, f;
2491
2546
  }
2492
- var p = u[e];
2493
- if (p === void 0)
2547
+ var d = u[e];
2548
+ if (d === void 0)
2494
2549
  return !1;
2495
- if (typeof p == "function")
2496
- Er(p, this, r);
2550
+ if (typeof d == "function")
2551
+ Fr(d, this, r);
2497
2552
  else
2498
- for (var A = p.length, g = pn(p, A), o = 0; o < A; ++o)
2499
- Er(g[o], this, r);
2553
+ for (var A = d.length, g = dn(d, A), o = 0; o < A; ++o)
2554
+ Fr(g[o], this, r);
2500
2555
  return !0;
2501
2556
  };
2502
- function cn(t, e, r, o) {
2557
+ function fn(t, e, r, o) {
2503
2558
  var s, u, l;
2504
- if (Tt(r), u = t._events, u === void 0 ? (u = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (u.newListener !== void 0 && (t.emit(
2559
+ if (Bt(r), u = t._events, u === void 0 ? (u = t._events = /* @__PURE__ */ Object.create(null), t._eventsCount = 0) : (u.newListener !== void 0 && (t.emit(
2505
2560
  "newListener",
2506
2561
  e,
2507
2562
  r.listener ? r.listener : r
2508
2563
  ), u = t._events), l = u[e]), l === void 0)
2509
2564
  l = u[e] = r, ++t._eventsCount;
2510
- else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = un(t), s > 0 && l.length > s && !l.warned) {
2565
+ else if (typeof l == "function" ? l = u[e] = o ? [r, l] : [l, r] : o ? l.unshift(r) : l.push(r), s = cn(t), s > 0 && l.length > s && !l.warned) {
2511
2566
  l.warned = !0;
2512
2567
  var f = new Error("Possible EventEmitter memory leak detected. " + l.length + " " + String(e) + " listeners added. Use emitter.setMaxListeners() to increase limit");
2513
- f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length, ro(f);
2568
+ f.name = "MaxListenersExceededWarning", f.emitter = t, f.type = e, f.count = l.length, oo(f);
2514
2569
  }
2515
2570
  return t;
2516
2571
  }
2517
2572
  $.prototype.addListener = function(e, r) {
2518
- return cn(this, e, r, !1);
2573
+ return fn(this, e, r, !1);
2519
2574
  };
2520
2575
  $.prototype.on = $.prototype.addListener;
2521
2576
  $.prototype.prependListener = function(e, r) {
2522
- return cn(this, e, r, !0);
2577
+ return fn(this, e, r, !0);
2523
2578
  };
2524
- function no() {
2579
+ function so() {
2525
2580
  if (!this.fired)
2526
2581
  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);
2527
2582
  }
2528
- function fn(t, e, r) {
2529
- var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = no.bind(o);
2583
+ function ln(t, e, r) {
2584
+ var o = { fired: !1, wrapFn: void 0, target: t, type: e, listener: r }, s = so.bind(o);
2530
2585
  return s.listener = r, o.wrapFn = s, s;
2531
2586
  }
2532
2587
  $.prototype.once = function(e, r) {
2533
- return Tt(r), this.on(e, fn(this, e, r)), this;
2588
+ return Bt(r), this.on(e, ln(this, e, r)), this;
2534
2589
  };
2535
2590
  $.prototype.prependOnceListener = function(e, r) {
2536
- return Tt(r), this.prependListener(e, fn(this, e, r)), this;
2591
+ return Bt(r), this.prependListener(e, ln(this, e, r)), this;
2537
2592
  };
2538
2593
  $.prototype.removeListener = function(e, r) {
2539
2594
  var o, s, u, l, f;
2540
- if (Tt(r), s = this._events, s === void 0)
2595
+ if (Bt(r), s = this._events, s === void 0)
2541
2596
  return this;
2542
2597
  if (o = s[e], o === void 0)
2543
2598
  return this;
@@ -2551,7 +2606,7 @@ $.prototype.removeListener = function(e, r) {
2551
2606
  }
2552
2607
  if (u < 0)
2553
2608
  return this;
2554
- u === 0 ? o.shift() : io(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, f || r);
2609
+ u === 0 ? o.shift() : ao(o, u), o.length === 1 && (s[e] = o[0]), s.removeListener !== void 0 && this.emit("removeListener", e, f || r);
2555
2610
  }
2556
2611
  return this;
2557
2612
  };
@@ -2575,24 +2630,24 @@ $.prototype.removeAllListeners = function(e) {
2575
2630
  this.removeListener(e, r[s]);
2576
2631
  return this;
2577
2632
  };
2578
- function ln(t, e, r) {
2633
+ function hn(t, e, r) {
2579
2634
  var o = t._events;
2580
2635
  if (o === void 0)
2581
2636
  return [];
2582
2637
  var s = o[e];
2583
- return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? oo(s) : pn(s, s.length);
2638
+ return s === void 0 ? [] : typeof s == "function" ? r ? [s.listener || s] : [s] : r ? uo(s) : dn(s, s.length);
2584
2639
  }
2585
2640
  $.prototype.listeners = function(e) {
2586
- return ln(this, e, !0);
2641
+ return hn(this, e, !0);
2587
2642
  };
2588
2643
  $.prototype.rawListeners = function(e) {
2589
- return ln(this, e, !1);
2644
+ return hn(this, e, !1);
2590
2645
  };
2591
2646
  $.listenerCount = function(t, e) {
2592
- return typeof t.listenerCount == "function" ? t.listenerCount(e) : hn.call(t, e);
2647
+ return typeof t.listenerCount == "function" ? t.listenerCount(e) : pn.call(t, e);
2593
2648
  };
2594
- $.prototype.listenerCount = hn;
2595
- function hn(t) {
2649
+ $.prototype.listenerCount = pn;
2650
+ function pn(t) {
2596
2651
  var e = this._events;
2597
2652
  if (e !== void 0) {
2598
2653
  var r = e[t];
@@ -2604,24 +2659,24 @@ function hn(t) {
2604
2659
  return 0;
2605
2660
  }
2606
2661
  $.prototype.eventNames = function() {
2607
- return this._eventsCount > 0 ? ht(this._events) : [];
2662
+ return this._eventsCount > 0 ? pt(this._events) : [];
2608
2663
  };
2609
- function pn(t, e) {
2664
+ function dn(t, e) {
2610
2665
  for (var r = new Array(e), o = 0; o < e; ++o)
2611
2666
  r[o] = t[o];
2612
2667
  return r;
2613
2668
  }
2614
- function io(t, e) {
2669
+ function ao(t, e) {
2615
2670
  for (; e + 1 < t.length; e++)
2616
2671
  t[e] = t[e + 1];
2617
2672
  t.pop();
2618
2673
  }
2619
- function oo(t) {
2674
+ function uo(t) {
2620
2675
  for (var e = new Array(t.length), r = 0; r < e.length; ++r)
2621
2676
  e[r] = t[r].listener || t[r];
2622
2677
  return e;
2623
2678
  }
2624
- function so(t, e) {
2679
+ function co(t, e) {
2625
2680
  return new Promise(function(r, o) {
2626
2681
  function s(l) {
2627
2682
  t.removeListener(e, u), o(l);
@@ -2629,13 +2684,13 @@ function so(t, e) {
2629
2684
  function u() {
2630
2685
  typeof t.removeListener == "function" && t.removeListener("error", s), r([].slice.call(arguments));
2631
2686
  }
2632
- dn(t, e, u, { once: !0 }), e !== "error" && ao(t, s, { once: !0 });
2687
+ yn(t, e, u, { once: !0 }), e !== "error" && fo(t, s, { once: !0 });
2633
2688
  });
2634
2689
  }
2635
- function ao(t, e, r) {
2636
- typeof t.on == "function" && dn(t, "error", e, r);
2690
+ function fo(t, e, r) {
2691
+ typeof t.on == "function" && yn(t, "error", e, r);
2637
2692
  }
2638
- function dn(t, e, r, o) {
2693
+ function yn(t, e, r, o) {
2639
2694
  if (typeof t.on == "function")
2640
2695
  o.once ? t.once(e, r) : t.on(e, r);
2641
2696
  else if (typeof t.addEventListener == "function")
@@ -2645,7 +2700,7 @@ function dn(t, e, r, o) {
2645
2700
  else
2646
2701
  throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof t);
2647
2702
  }
2648
- var yn = dr.exports, Bt = {}, gn = {}, mn = function() {
2703
+ var gn = gr.exports, Ot = {}, mn = {}, bn = function() {
2649
2704
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
2650
2705
  return !1;
2651
2706
  if (typeof Symbol.iterator == "symbol")
@@ -2668,85 +2723,85 @@ var yn = dr.exports, Bt = {}, gn = {}, mn = function() {
2668
2723
  return !1;
2669
2724
  }
2670
2725
  return !0;
2671
- }, uo = mn, yr = function() {
2672
- return uo() && !!Symbol.toStringTag;
2673
- }, Fr = typeof Symbol < "u" && Symbol, co = mn, fo = function() {
2674
- return typeof Fr != "function" || typeof Symbol != "function" || typeof Fr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : co();
2675
- }, Cr = {
2726
+ }, lo = bn, mr = function() {
2727
+ return lo() && !!Symbol.toStringTag;
2728
+ }, Cr = typeof Symbol < "u" && Symbol, ho = bn, po = function() {
2729
+ return typeof Cr != "function" || typeof Symbol != "function" || typeof Cr("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : ho();
2730
+ }, _r = {
2676
2731
  foo: {}
2677
- }, lo = Object, ho = function() {
2678
- return { __proto__: Cr }.foo === Cr.foo && !({ __proto__: null } instanceof lo);
2679
- }, po = "Function.prototype.bind called on incompatible ", yo = Object.prototype.toString, go = Math.max, mo = "[object Function]", _r = function(e, r) {
2732
+ }, yo = Object, go = function() {
2733
+ return { __proto__: _r }.foo === _r.foo && !({ __proto__: null } instanceof yo);
2734
+ }, mo = "Function.prototype.bind called on incompatible ", bo = Object.prototype.toString, wo = Math.max, vo = "[object Function]", Br = function(e, r) {
2680
2735
  for (var o = [], s = 0; s < e.length; s += 1)
2681
2736
  o[s] = e[s];
2682
2737
  for (var u = 0; u < r.length; u += 1)
2683
2738
  o[u + e.length] = r[u];
2684
2739
  return o;
2685
- }, bo = function(e, r) {
2740
+ }, So = function(e, r) {
2686
2741
  for (var o = [], s = r || 0, u = 0; s < e.length; s += 1, u += 1)
2687
2742
  o[u] = e[s];
2688
2743
  return o;
2689
- }, wo = function(t, e) {
2744
+ }, Ao = function(t, e) {
2690
2745
  for (var r = "", o = 0; o < t.length; o += 1)
2691
2746
  r += t[o], o + 1 < t.length && (r += e);
2692
2747
  return r;
2693
- }, vo = function(e) {
2748
+ }, Eo = function(e) {
2694
2749
  var r = this;
2695
- if (typeof r != "function" || yo.apply(r) !== mo)
2696
- throw new TypeError(po + r);
2697
- for (var o = bo(arguments, 1), s, u = function() {
2750
+ if (typeof r != "function" || bo.apply(r) !== vo)
2751
+ throw new TypeError(mo + r);
2752
+ for (var o = So(arguments, 1), s, u = function() {
2698
2753
  if (this instanceof s) {
2699
2754
  var g = r.apply(
2700
2755
  this,
2701
- _r(o, arguments)
2756
+ Br(o, arguments)
2702
2757
  );
2703
2758
  return Object(g) === g ? g : this;
2704
2759
  }
2705
2760
  return r.apply(
2706
2761
  e,
2707
- _r(o, arguments)
2762
+ Br(o, arguments)
2708
2763
  );
2709
- }, l = go(0, r.length - o.length), f = [], p = 0; p < l; p++)
2710
- f[p] = "$" + p;
2711
- if (s = Function("binder", "return function (" + wo(f, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
2764
+ }, l = wo(0, r.length - o.length), f = [], d = 0; d < l; d++)
2765
+ f[d] = "$" + d;
2766
+ if (s = Function("binder", "return function (" + Ao(f, ",") + "){ return binder.apply(this,arguments); }")(u), r.prototype) {
2712
2767
  var A = function() {
2713
2768
  };
2714
2769
  A.prototype = r.prototype, s.prototype = new A(), A.prototype = null;
2715
2770
  }
2716
2771
  return s;
2717
- }, So = vo, bn = Function.prototype.bind || So, Tr = {}.hasOwnProperty, Rt = Function.prototype.call, Ao = Rt.bind ? Rt.bind(Tr) : function(t, e) {
2718
- return Rt.call(Tr, t, e);
2719
- }, k, Je = SyntaxError, wn = Function, We = TypeError, Nt = function(t) {
2772
+ }, Io = Eo, wn = Function.prototype.bind || Io, Or = {}.hasOwnProperty, Lt = Function.prototype.call, Fo = Lt.bind ? Lt.bind(Or) : function(t, e) {
2773
+ return Lt.call(Or, t, e);
2774
+ }, k, Ye = SyntaxError, vn = Function, Je = TypeError, Ut = function(t) {
2720
2775
  try {
2721
- return wn('"use strict"; return (' + t + ").constructor;")();
2776
+ return vn('"use strict"; return (' + t + ").constructor;")();
2722
2777
  } catch {
2723
2778
  }
2724
- }, Le = Object.getOwnPropertyDescriptor;
2725
- if (Le)
2779
+ }, Ue = Object.getOwnPropertyDescriptor;
2780
+ if (Ue)
2726
2781
  try {
2727
- Le({}, "");
2782
+ Ue({}, "");
2728
2783
  } catch {
2729
- Le = null;
2784
+ Ue = null;
2730
2785
  }
2731
- var Ut = function() {
2732
- throw new We();
2733
- }, Eo = Le ? function() {
2786
+ var $t = function() {
2787
+ throw new Je();
2788
+ }, To = Ue ? function() {
2734
2789
  try {
2735
- return arguments.callee, Ut;
2790
+ return arguments.callee, $t;
2736
2791
  } catch {
2737
2792
  try {
2738
- return Le(arguments, "callee").get;
2793
+ return Ue(arguments, "callee").get;
2739
2794
  } catch {
2740
- return Ut;
2795
+ return $t;
2741
2796
  }
2742
2797
  }
2743
- }() : Ut, Me = fo(), Io = ho(), K = Object.getPrototypeOf || (Io ? function(t) {
2798
+ }() : $t, Me = po(), Co = go(), H = Object.getPrototypeOf || (Co ? function(t) {
2744
2799
  return t.__proto__;
2745
- } : null), qe = {}, Fo = typeof Uint8Array > "u" || !K ? k : K(Uint8Array), $e = {
2800
+ } : null), qe = {}, _o = typeof Uint8Array > "u" || !H ? k : H(Uint8Array), $e = {
2746
2801
  "%AggregateError%": typeof AggregateError > "u" ? k : AggregateError,
2747
2802
  "%Array%": Array,
2748
2803
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? k : ArrayBuffer,
2749
- "%ArrayIteratorPrototype%": Me && K ? K([][Symbol.iterator]()) : k,
2804
+ "%ArrayIteratorPrototype%": Me && H ? H([][Symbol.iterator]()) : k,
2750
2805
  "%AsyncFromSyncIteratorPrototype%": k,
2751
2806
  "%AsyncFunction%": qe,
2752
2807
  "%AsyncGenerator%": qe,
@@ -2770,17 +2825,17 @@ var Ut = function() {
2770
2825
  "%Float32Array%": typeof Float32Array > "u" ? k : Float32Array,
2771
2826
  "%Float64Array%": typeof Float64Array > "u" ? k : Float64Array,
2772
2827
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? k : FinalizationRegistry,
2773
- "%Function%": wn,
2828
+ "%Function%": vn,
2774
2829
  "%GeneratorFunction%": qe,
2775
2830
  "%Int8Array%": typeof Int8Array > "u" ? k : Int8Array,
2776
2831
  "%Int16Array%": typeof Int16Array > "u" ? k : Int16Array,
2777
2832
  "%Int32Array%": typeof Int32Array > "u" ? k : Int32Array,
2778
2833
  "%isFinite%": isFinite,
2779
2834
  "%isNaN%": isNaN,
2780
- "%IteratorPrototype%": Me && K ? K(K([][Symbol.iterator]())) : k,
2835
+ "%IteratorPrototype%": Me && H ? H(H([][Symbol.iterator]())) : k,
2781
2836
  "%JSON%": typeof JSON == "object" ? JSON : k,
2782
2837
  "%Map%": typeof Map > "u" ? k : Map,
2783
- "%MapIteratorPrototype%": typeof Map > "u" || !Me || !K ? k : K((/* @__PURE__ */ new Map())[Symbol.iterator]()),
2838
+ "%MapIteratorPrototype%": typeof Map > "u" || !Me || !H ? k : H((/* @__PURE__ */ new Map())[Symbol.iterator]()),
2784
2839
  "%Math%": Math,
2785
2840
  "%Number%": Number,
2786
2841
  "%Object%": Object,
@@ -2793,15 +2848,15 @@ var Ut = function() {
2793
2848
  "%Reflect%": typeof Reflect > "u" ? k : Reflect,
2794
2849
  "%RegExp%": RegExp,
2795
2850
  "%Set%": typeof Set > "u" ? k : Set,
2796
- "%SetIteratorPrototype%": typeof Set > "u" || !Me || !K ? k : K((/* @__PURE__ */ new Set())[Symbol.iterator]()),
2851
+ "%SetIteratorPrototype%": typeof Set > "u" || !Me || !H ? k : H((/* @__PURE__ */ new Set())[Symbol.iterator]()),
2797
2852
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? k : SharedArrayBuffer,
2798
2853
  "%String%": String,
2799
- "%StringIteratorPrototype%": Me && K ? K(""[Symbol.iterator]()) : k,
2854
+ "%StringIteratorPrototype%": Me && H ? H(""[Symbol.iterator]()) : k,
2800
2855
  "%Symbol%": Me ? Symbol : k,
2801
- "%SyntaxError%": Je,
2802
- "%ThrowTypeError%": Eo,
2803
- "%TypedArray%": Fo,
2804
- "%TypeError%": We,
2856
+ "%SyntaxError%": Ye,
2857
+ "%ThrowTypeError%": To,
2858
+ "%TypedArray%": _o,
2859
+ "%TypeError%": Je,
2805
2860
  "%Uint8Array%": typeof Uint8Array > "u" ? k : Uint8Array,
2806
2861
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? k : Uint8ClampedArray,
2807
2862
  "%Uint16Array%": typeof Uint16Array > "u" ? k : Uint16Array,
@@ -2811,30 +2866,30 @@ var Ut = function() {
2811
2866
  "%WeakRef%": typeof WeakRef > "u" ? k : WeakRef,
2812
2867
  "%WeakSet%": typeof WeakSet > "u" ? k : WeakSet
2813
2868
  };
2814
- if (K)
2869
+ if (H)
2815
2870
  try {
2816
2871
  null.error;
2817
2872
  } catch (t) {
2818
- var Co = K(K(t));
2819
- $e["%Error.prototype%"] = Co;
2873
+ var Bo = H(H(t));
2874
+ $e["%Error.prototype%"] = Bo;
2820
2875
  }
2821
- var _o = function t(e) {
2876
+ var Oo = function t(e) {
2822
2877
  var r;
2823
2878
  if (e === "%AsyncFunction%")
2824
- r = Nt("async function () {}");
2879
+ r = Ut("async function () {}");
2825
2880
  else if (e === "%GeneratorFunction%")
2826
- r = Nt("function* () {}");
2881
+ r = Ut("function* () {}");
2827
2882
  else if (e === "%AsyncGeneratorFunction%")
2828
- r = Nt("async function* () {}");
2883
+ r = Ut("async function* () {}");
2829
2884
  else if (e === "%AsyncGenerator%") {
2830
2885
  var o = t("%AsyncGeneratorFunction%");
2831
2886
  o && (r = o.prototype);
2832
2887
  } else if (e === "%AsyncIteratorPrototype%") {
2833
2888
  var s = t("%AsyncGenerator%");
2834
- s && K && (r = K(s.prototype));
2889
+ s && H && (r = H(s.prototype));
2835
2890
  }
2836
2891
  return $e[e] = r, r;
2837
- }, Br = {
2892
+ }, xr = {
2838
2893
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
2839
2894
  "%ArrayPrototype%": ["Array", "prototype"],
2840
2895
  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
@@ -2886,92 +2941,92 @@ var _o = function t(e) {
2886
2941
  "%URIErrorPrototype%": ["URIError", "prototype"],
2887
2942
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
2888
2943
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
2889
- }, ut = bn, wt = Ao, To = ut.call(Function.call, Array.prototype.concat), Bo = ut.call(Function.apply, Array.prototype.splice), Or = ut.call(Function.call, String.prototype.replace), vt = ut.call(Function.call, String.prototype.slice), Oo = ut.call(Function.call, RegExp.prototype.exec), xo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ko = /\\(\\)?/g, Po = function(e) {
2890
- var r = vt(e, 0, 1), o = vt(e, -1);
2944
+ }, ct = wn, vt = Fo, xo = ct.call(Function.call, Array.prototype.concat), ko = ct.call(Function.apply, Array.prototype.splice), kr = ct.call(Function.call, String.prototype.replace), St = ct.call(Function.call, String.prototype.slice), Po = ct.call(Function.call, RegExp.prototype.exec), Ro = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, No = /\\(\\)?/g, Lo = function(e) {
2945
+ var r = St(e, 0, 1), o = St(e, -1);
2891
2946
  if (r === "%" && o !== "%")
2892
- throw new Je("invalid intrinsic syntax, expected closing `%`");
2947
+ throw new Ye("invalid intrinsic syntax, expected closing `%`");
2893
2948
  if (o === "%" && r !== "%")
2894
- throw new Je("invalid intrinsic syntax, expected opening `%`");
2949
+ throw new Ye("invalid intrinsic syntax, expected opening `%`");
2895
2950
  var s = [];
2896
- return Or(e, xo, function(u, l, f, p) {
2897
- s[s.length] = f ? Or(p, ko, "$1") : l || u;
2951
+ return kr(e, Ro, function(u, l, f, d) {
2952
+ s[s.length] = f ? kr(d, No, "$1") : l || u;
2898
2953
  }), s;
2899
- }, Ro = function(e, r) {
2954
+ }, Uo = function(e, r) {
2900
2955
  var o = e, s;
2901
- if (wt(Br, o) && (s = Br[o], o = "%" + s[0] + "%"), wt($e, o)) {
2956
+ if (vt(xr, o) && (s = xr[o], o = "%" + s[0] + "%"), vt($e, o)) {
2902
2957
  var u = $e[o];
2903
- if (u === qe && (u = _o(o)), typeof u > "u" && !r)
2904
- throw new We("intrinsic " + e + " exists, but is not available. Please file an issue!");
2958
+ if (u === qe && (u = Oo(o)), typeof u > "u" && !r)
2959
+ throw new Je("intrinsic " + e + " exists, but is not available. Please file an issue!");
2905
2960
  return {
2906
2961
  alias: s,
2907
2962
  name: o,
2908
2963
  value: u
2909
2964
  };
2910
2965
  }
2911
- throw new Je("intrinsic " + e + " does not exist!");
2912
- }, Xe = function(e, r) {
2966
+ throw new Ye("intrinsic " + e + " does not exist!");
2967
+ }, Ze = function(e, r) {
2913
2968
  if (typeof e != "string" || e.length === 0)
2914
- throw new We("intrinsic name must be a non-empty string");
2969
+ throw new Je("intrinsic name must be a non-empty string");
2915
2970
  if (arguments.length > 1 && typeof r != "boolean")
2916
- throw new We('"allowMissing" argument must be a boolean');
2917
- if (Oo(/^%?[^%]*%?$/, e) === null)
2918
- throw new Je("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2919
- var o = Po(e), s = o.length > 0 ? o[0] : "", u = Ro("%" + s + "%", r), l = u.name, f = u.value, p = !1, A = u.alias;
2920
- A && (s = A[0], Bo(o, To([0, 1], A)));
2921
- for (var g = 1, w = !0; g < o.length; g += 1) {
2922
- var E = o[g], I = vt(E, 0, 1), R = vt(E, -1);
2923
- if ((I === '"' || I === "'" || I === "`" || R === '"' || R === "'" || R === "`") && I !== R)
2924
- throw new Je("property names with quotes must have matching quotes");
2925
- if ((E === "constructor" || !w) && (p = !0), s += "." + E, l = "%" + s + "%", wt($e, l))
2971
+ throw new Je('"allowMissing" argument must be a boolean');
2972
+ if (Po(/^%?[^%]*%?$/, e) === null)
2973
+ throw new Ye("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
2974
+ var o = Lo(e), s = o.length > 0 ? o[0] : "", u = Uo("%" + s + "%", r), l = u.name, f = u.value, d = !1, A = u.alias;
2975
+ A && (s = A[0], ko(o, xo([0, 1], A)));
2976
+ for (var g = 1, v = !0; g < o.length; g += 1) {
2977
+ var E = o[g], C = St(E, 0, 1), R = St(E, -1);
2978
+ if ((C === '"' || C === "'" || C === "`" || R === '"' || R === "'" || R === "`") && C !== R)
2979
+ throw new Ye("property names with quotes must have matching quotes");
2980
+ if ((E === "constructor" || !v) && (d = !0), s += "." + E, l = "%" + s + "%", vt($e, l))
2926
2981
  f = $e[l];
2927
2982
  else if (f != null) {
2928
2983
  if (!(E in f)) {
2929
2984
  if (!r)
2930
- throw new We("base intrinsic for " + e + " exists, but the property is not available.");
2985
+ throw new Je("base intrinsic for " + e + " exists, but the property is not available.");
2931
2986
  return;
2932
2987
  }
2933
- if (Le && g + 1 >= o.length) {
2934
- var U = Le(f, E);
2935
- w = !!U, w && "get" in U && !("originalValue" in U.get) ? f = U.get : f = f[E];
2988
+ if (Ue && g + 1 >= o.length) {
2989
+ var L = Ue(f, E);
2990
+ v = !!L, v && "get" in L && !("originalValue" in L.get) ? f = L.get : f = f[E];
2936
2991
  } else
2937
- w = wt(f, E), f = f[E];
2938
- w && !p && ($e[l] = f);
2992
+ v = vt(f, E), f = f[E];
2993
+ v && !d && ($e[l] = f);
2939
2994
  }
2940
2995
  }
2941
2996
  return f;
2942
- }, vn = { exports: {} }, No = Xe, Xt = No("%Object.defineProperty%", !0), Zt = function() {
2943
- if (Xt)
2997
+ }, Sn = { exports: {} }, $o = Ze, er = $o("%Object.defineProperty%", !0), tr = function() {
2998
+ if (er)
2944
2999
  try {
2945
- return Xt({}, "a", { value: 1 }), !0;
3000
+ return er({}, "a", { value: 1 }), !0;
2946
3001
  } catch {
2947
3002
  return !1;
2948
3003
  }
2949
3004
  return !1;
2950
3005
  };
2951
- Zt.hasArrayLengthDefineBug = function() {
2952
- if (!Zt())
3006
+ tr.hasArrayLengthDefineBug = function() {
3007
+ if (!tr())
2953
3008
  return null;
2954
3009
  try {
2955
- return Xt([], "length", { value: 1 }).length !== 1;
3010
+ return er([], "length", { value: 1 }).length !== 1;
2956
3011
  } catch {
2957
3012
  return !0;
2958
3013
  }
2959
3014
  };
2960
- var Sn = Zt, Uo = Xe, pt = Uo("%Object.getOwnPropertyDescriptor%", !0);
2961
- if (pt)
3015
+ var An = tr, Do = Ze, dt = Do("%Object.getOwnPropertyDescriptor%", !0);
3016
+ if (dt)
2962
3017
  try {
2963
- pt([], "length");
3018
+ dt([], "length");
2964
3019
  } catch {
2965
- pt = null;
3020
+ dt = null;
2966
3021
  }
2967
- var gr = pt, Lo = Sn(), mr = Xe, st = Lo && mr("%Object.defineProperty%", !0);
2968
- if (st)
3022
+ var br = dt, jo = An(), wr = Ze, at = jo && wr("%Object.defineProperty%", !0);
3023
+ if (at)
2969
3024
  try {
2970
- st({}, "a", { value: 1 });
3025
+ at({}, "a", { value: 1 });
2971
3026
  } catch {
2972
- st = !1;
3027
+ at = !1;
2973
3028
  }
2974
- var $o = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Do = function(e, r, o) {
3029
+ var Mo = wr("%SyntaxError%"), Ve = wr("%TypeError%"), Pr = br, Vo = function(e, r, o) {
2975
3030
  if (!e || typeof e != "object" && typeof e != "function")
2976
3031
  throw new Ve("`obj` must be an object or a function`");
2977
3032
  if (typeof r != "string" && typeof r != "symbol")
@@ -2984,44 +3039,44 @@ var $o = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Do = function(e,
2984
3039
  throw new Ve("`nonConfigurable`, if provided, must be a boolean or null");
2985
3040
  if (arguments.length > 6 && typeof arguments[6] != "boolean")
2986
3041
  throw new Ve("`loose`, if provided, must be a boolean");
2987
- var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, p = !!xr && xr(e, r);
2988
- if (st)
2989
- st(e, r, {
2990
- configurable: l === null && p ? p.configurable : !l,
2991
- enumerable: s === null && p ? p.enumerable : !s,
3042
+ var s = arguments.length > 3 ? arguments[3] : null, u = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, f = arguments.length > 6 ? arguments[6] : !1, d = !!Pr && Pr(e, r);
3043
+ if (at)
3044
+ at(e, r, {
3045
+ configurable: l === null && d ? d.configurable : !l,
3046
+ enumerable: s === null && d ? d.enumerable : !s,
2992
3047
  value: o,
2993
- writable: u === null && p ? p.writable : !u
3048
+ writable: u === null && d ? d.writable : !u
2994
3049
  });
2995
3050
  else if (f || !s && !u && !l)
2996
3051
  e[r] = o;
2997
3052
  else
2998
- throw new $o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
2999
- }, An = Xe, kr = Do, jo = Sn(), Pr = gr, Rr = An("%TypeError%"), Mo = An("%Math.floor%"), Vo = function(e, r) {
3053
+ throw new Mo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3054
+ }, En = Ze, Rr = Vo, qo = An(), Nr = br, Lr = En("%TypeError%"), Go = En("%Math.floor%"), Qo = function(e, r) {
3000
3055
  if (typeof e != "function")
3001
- throw new Rr("`fn` is not a function");
3002
- if (typeof r != "number" || r < 0 || r > 4294967295 || Mo(r) !== r)
3003
- throw new Rr("`length` must be a positive 32-bit integer");
3056
+ throw new Lr("`fn` is not a function");
3057
+ if (typeof r != "number" || r < 0 || r > 4294967295 || Go(r) !== r)
3058
+ throw new Lr("`length` must be a positive 32-bit integer");
3004
3059
  var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
3005
- if ("length" in e && Pr) {
3006
- var l = Pr(e, "length");
3060
+ if ("length" in e && Nr) {
3061
+ var l = Nr(e, "length");
3007
3062
  l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
3008
3063
  }
3009
- return (s || u || !o) && (jo ? kr(e, "length", r, !0, !0) : kr(e, "length", r)), e;
3064
+ return (s || u || !o) && (qo ? Rr(e, "length", r, !0, !0) : Rr(e, "length", r)), e;
3010
3065
  };
3011
3066
  (function(t) {
3012
- var e = bn, r = Xe, o = Vo, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), p = r("%Object.defineProperty%", !0), A = r("%Math.max%");
3013
- if (p)
3067
+ var e = wn, r = Ze, o = Qo, s = r("%TypeError%"), u = r("%Function.prototype.apply%"), l = r("%Function.prototype.call%"), f = r("%Reflect.apply%", !0) || e.call(l, u), d = r("%Object.defineProperty%", !0), A = r("%Math.max%");
3068
+ if (d)
3014
3069
  try {
3015
- p({}, "a", { value: 1 });
3070
+ d({}, "a", { value: 1 });
3016
3071
  } catch {
3017
- p = null;
3072
+ d = null;
3018
3073
  }
3019
3074
  t.exports = function(E) {
3020
3075
  if (typeof E != "function")
3021
3076
  throw new s("a function is required");
3022
- var I = f(e, l, arguments);
3077
+ var C = f(e, l, arguments);
3023
3078
  return o(
3024
- I,
3079
+ C,
3025
3080
  1 + A(0, E.length - (arguments.length - 1)),
3026
3081
  !0
3027
3082
  );
@@ -3029,123 +3084,123 @@ var $o = mr("%SyntaxError%"), Ve = mr("%TypeError%"), xr = gr, Do = function(e,
3029
3084
  var g = function() {
3030
3085
  return f(e, u, arguments);
3031
3086
  };
3032
- p ? p(t.exports, "apply", { value: g }) : t.exports.apply = g;
3033
- })(vn);
3034
- var En = vn.exports, In = Xe, Fn = En, qo = Fn(In("String.prototype.indexOf")), Cn = function(e, r) {
3035
- var o = In(e, !!r);
3036
- return typeof o == "function" && qo(e, ".prototype.") > -1 ? Fn(o) : o;
3037
- }, Go = yr(), Qo = Cn, er = Qo("Object.prototype.toString"), Ot = function(e) {
3038
- return Go && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : er(e) === "[object Arguments]";
3087
+ d ? d(t.exports, "apply", { value: g }) : t.exports.apply = g;
3088
+ })(Sn);
3089
+ var In = Sn.exports, Fn = Ze, Tn = In, zo = Tn(Fn("String.prototype.indexOf")), Cn = function(e, r) {
3090
+ var o = Fn(e, !!r);
3091
+ return typeof o == "function" && zo(e, ".prototype.") > -1 ? Tn(o) : o;
3092
+ }, Ko = mr(), Ho = Cn, rr = Ho("Object.prototype.toString"), xt = function(e) {
3093
+ return Ko && e && typeof e == "object" && Symbol.toStringTag in e ? !1 : rr(e) === "[object Arguments]";
3039
3094
  }, _n = function(e) {
3040
- return Ot(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && er(e) !== "[object Array]" && er(e.callee) === "[object Function]";
3041
- }, zo = function() {
3042
- return Ot(arguments);
3095
+ return xt(e) ? !0 : e !== null && typeof e == "object" && typeof e.length == "number" && e.length >= 0 && rr(e) !== "[object Array]" && rr(e.callee) === "[object Function]";
3096
+ }, Wo = function() {
3097
+ return xt(arguments);
3043
3098
  }();
3044
- Ot.isLegacyArguments = _n;
3045
- var Ho = zo ? Ot : _n, Ko = Object.prototype.toString, Wo = Function.prototype.toString, Jo = /^\s*(?:function)?\*/, Tn = yr(), Lt = Object.getPrototypeOf, Yo = function() {
3046
- if (!Tn)
3099
+ xt.isLegacyArguments = _n;
3100
+ var Jo = Wo ? xt : _n, Yo = Object.prototype.toString, Xo = Function.prototype.toString, Zo = /^\s*(?:function)?\*/, Bn = mr(), Dt = Object.getPrototypeOf, es = function() {
3101
+ if (!Bn)
3047
3102
  return !1;
3048
3103
  try {
3049
3104
  return Function("return function*() {}")();
3050
3105
  } catch {
3051
3106
  }
3052
- }, $t, Xo = function(e) {
3107
+ }, jt, ts = function(e) {
3053
3108
  if (typeof e != "function")
3054
3109
  return !1;
3055
- if (Jo.test(Wo.call(e)))
3110
+ if (Zo.test(Xo.call(e)))
3056
3111
  return !0;
3057
- if (!Tn) {
3058
- var r = Ko.call(e);
3112
+ if (!Bn) {
3113
+ var r = Yo.call(e);
3059
3114
  return r === "[object GeneratorFunction]";
3060
3115
  }
3061
- if (!Lt)
3116
+ if (!Dt)
3062
3117
  return !1;
3063
- if (typeof $t > "u") {
3064
- var o = Yo();
3065
- $t = o ? Lt(o) : !1;
3118
+ if (typeof jt > "u") {
3119
+ var o = es();
3120
+ jt = o ? Dt(o) : !1;
3066
3121
  }
3067
- return Lt(e) === $t;
3068
- }, Bn = Function.prototype.toString, Ge = typeof Reflect == "object" && Reflect !== null && Reflect.apply, tr, dt;
3069
- if (typeof Ge == "function" && typeof Object.defineProperty == "function")
3122
+ return Dt(e) === jt;
3123
+ }, On = Function.prototype.toString, Qe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, nr, yt;
3124
+ if (typeof Qe == "function" && typeof Object.defineProperty == "function")
3070
3125
  try {
3071
- tr = Object.defineProperty({}, "length", {
3126
+ nr = Object.defineProperty({}, "length", {
3072
3127
  get: function() {
3073
- throw dt;
3128
+ throw yt;
3074
3129
  }
3075
- }), dt = {}, Ge(function() {
3130
+ }), yt = {}, Qe(function() {
3076
3131
  throw 42;
3077
- }, null, tr);
3132
+ }, null, nr);
3078
3133
  } catch (t) {
3079
- t !== dt && (Ge = null);
3134
+ t !== yt && (Qe = null);
3080
3135
  }
3081
3136
  else
3082
- Ge = null;
3083
- var Zo = /^\s*class\b/, rr = function(e) {
3137
+ Qe = null;
3138
+ var rs = /^\s*class\b/, ir = function(e) {
3084
3139
  try {
3085
- var r = Bn.call(e);
3086
- return Zo.test(r);
3140
+ var r = On.call(e);
3141
+ return rs.test(r);
3087
3142
  } catch {
3088
3143
  return !1;
3089
3144
  }
3090
- }, Dt = function(e) {
3145
+ }, Mt = function(e) {
3091
3146
  try {
3092
- return rr(e) ? !1 : (Bn.call(e), !0);
3147
+ return ir(e) ? !1 : (On.call(e), !0);
3093
3148
  } catch {
3094
3149
  return !1;
3095
3150
  }
3096
- }, yt = Object.prototype.toString, es = "[object Object]", ts = "[object Function]", rs = "[object GeneratorFunction]", ns = "[object HTMLAllCollection]", is = "[object HTML document.all class]", os = "[object HTMLCollection]", ss = typeof Symbol == "function" && !!Symbol.toStringTag, as = !(0 in [,]), nr = function() {
3151
+ }, gt = Object.prototype.toString, ns = "[object Object]", is = "[object Function]", os = "[object GeneratorFunction]", ss = "[object HTMLAllCollection]", as = "[object HTML document.all class]", us = "[object HTMLCollection]", cs = typeof Symbol == "function" && !!Symbol.toStringTag, fs = !(0 in [,]), or = function() {
3097
3152
  return !1;
3098
3153
  };
3099
3154
  if (typeof document == "object") {
3100
- var us = document.all;
3101
- yt.call(us) === yt.call(document.all) && (nr = function(e) {
3102
- if ((as || !e) && (typeof e > "u" || typeof e == "object"))
3155
+ var ls = document.all;
3156
+ gt.call(ls) === gt.call(document.all) && (or = function(e) {
3157
+ if ((fs || !e) && (typeof e > "u" || typeof e == "object"))
3103
3158
  try {
3104
- var r = yt.call(e);
3105
- return (r === ns || r === is || r === os || r === es) && e("") == null;
3159
+ var r = gt.call(e);
3160
+ return (r === ss || r === as || r === us || r === ns) && e("") == null;
3106
3161
  } catch {
3107
3162
  }
3108
3163
  return !1;
3109
3164
  });
3110
3165
  }
3111
- var cs = Ge ? function(e) {
3112
- if (nr(e))
3166
+ var hs = Qe ? function(e) {
3167
+ if (or(e))
3113
3168
  return !0;
3114
3169
  if (!e || typeof e != "function" && typeof e != "object")
3115
3170
  return !1;
3116
3171
  try {
3117
- Ge(e, null, tr);
3172
+ Qe(e, null, nr);
3118
3173
  } catch (r) {
3119
- if (r !== dt)
3174
+ if (r !== yt)
3120
3175
  return !1;
3121
3176
  }
3122
- return !rr(e) && Dt(e);
3177
+ return !ir(e) && Mt(e);
3123
3178
  } : function(e) {
3124
- if (nr(e))
3179
+ if (or(e))
3125
3180
  return !0;
3126
3181
  if (!e || typeof e != "function" && typeof e != "object")
3127
3182
  return !1;
3128
- if (ss)
3129
- return Dt(e);
3130
- if (rr(e))
3183
+ if (cs)
3184
+ return Mt(e);
3185
+ if (ir(e))
3131
3186
  return !1;
3132
- var r = yt.call(e);
3133
- return r !== ts && r !== rs && !/^\[object HTML/.test(r) ? !1 : Dt(e);
3134
- }, fs = cs, ls = Object.prototype.toString, On = Object.prototype.hasOwnProperty, hs = function(e, r, o) {
3187
+ var r = gt.call(e);
3188
+ return r !== is && r !== os && !/^\[object HTML/.test(r) ? !1 : Mt(e);
3189
+ }, ps = hs, ds = Object.prototype.toString, xn = Object.prototype.hasOwnProperty, ys = function(e, r, o) {
3135
3190
  for (var s = 0, u = e.length; s < u; s++)
3136
- On.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3137
- }, ps = function(e, r, o) {
3191
+ xn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3192
+ }, gs = function(e, r, o) {
3138
3193
  for (var s = 0, u = e.length; s < u; s++)
3139
3194
  o == null ? r(e.charAt(s), s, e) : r.call(o, e.charAt(s), s, e);
3140
- }, ds = function(e, r, o) {
3195
+ }, ms = function(e, r, o) {
3141
3196
  for (var s in e)
3142
- On.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3143
- }, ys = function(e, r, o) {
3144
- if (!fs(r))
3197
+ xn.call(e, s) && (o == null ? r(e[s], s, e) : r.call(o, e[s], s, e));
3198
+ }, bs = function(e, r, o) {
3199
+ if (!ps(r))
3145
3200
  throw new TypeError("iterator must be a function");
3146
3201
  var s;
3147
- arguments.length >= 3 && (s = o), ls.call(e) === "[object Array]" ? hs(e, r, s) : typeof e == "string" ? ps(e, r, s) : ds(e, r, s);
3148
- }, gs = ys, jt = [
3202
+ arguments.length >= 3 && (s = o), ds.call(e) === "[object Array]" ? ys(e, r, s) : typeof e == "string" ? gs(e, r, s) : ms(e, r, s);
3203
+ }, ws = bs, Vt = [
3149
3204
  "BigInt64Array",
3150
3205
  "BigUint64Array",
3151
3206
  "Float32Array",
@@ -3157,247 +3212,247 @@ var cs = Ge ? function(e) {
3157
3212
  "Uint32Array",
3158
3213
  "Uint8Array",
3159
3214
  "Uint8ClampedArray"
3160
- ], ms = typeof globalThis > "u" ? Kr : globalThis, bs = function() {
3161
- for (var e = [], r = 0; r < jt.length; r++)
3162
- typeof ms[jt[r]] == "function" && (e[e.length] = jt[r]);
3215
+ ], vs = typeof globalThis > "u" ? Jr : globalThis, Ss = function() {
3216
+ for (var e = [], r = 0; r < Vt.length; r++)
3217
+ typeof vs[Vt[r]] == "function" && (e[e.length] = Vt[r]);
3163
3218
  return e;
3164
- }, St = gs, ws = bs, Nr = En, br = Cn, gt = gr, vs = br("Object.prototype.toString"), xn = yr(), Ur = typeof globalThis > "u" ? Kr : globalThis, ir = ws(), wr = br("String.prototype.slice"), Mt = Object.getPrototypeOf, Ss = br("Array.prototype.indexOf", !0) || function(e, r) {
3219
+ }, At = ws, As = Ss, Ur = In, vr = Cn, mt = br, Es = vr("Object.prototype.toString"), kn = mr(), $r = typeof globalThis > "u" ? Jr : globalThis, sr = As(), Sr = vr("String.prototype.slice"), qt = Object.getPrototypeOf, Is = vr("Array.prototype.indexOf", !0) || function(e, r) {
3165
3220
  for (var o = 0; o < e.length; o += 1)
3166
3221
  if (e[o] === r)
3167
3222
  return o;
3168
3223
  return -1;
3169
- }, At = { __proto__: null };
3170
- xn && gt && Mt ? St(ir, function(t) {
3171
- var e = new Ur[t]();
3224
+ }, Et = { __proto__: null };
3225
+ kn && mt && qt ? At(sr, function(t) {
3226
+ var e = new $r[t]();
3172
3227
  if (Symbol.toStringTag in e) {
3173
- var r = Mt(e), o = gt(r, Symbol.toStringTag);
3228
+ var r = qt(e), o = mt(r, Symbol.toStringTag);
3174
3229
  if (!o) {
3175
- var s = Mt(r);
3176
- o = gt(s, Symbol.toStringTag);
3230
+ var s = qt(r);
3231
+ o = mt(s, Symbol.toStringTag);
3177
3232
  }
3178
- At["$" + t] = Nr(o.get);
3233
+ Et["$" + t] = Ur(o.get);
3179
3234
  }
3180
- }) : St(ir, function(t) {
3181
- var e = new Ur[t](), r = e.slice || e.set;
3182
- r && (At["$" + t] = Nr(r));
3235
+ }) : At(sr, function(t) {
3236
+ var e = new $r[t](), r = e.slice || e.set;
3237
+ r && (Et["$" + t] = Ur(r));
3183
3238
  });
3184
- var As = function(e) {
3239
+ var Fs = function(e) {
3185
3240
  var r = !1;
3186
- return St(At, function(o, s) {
3241
+ return At(Et, function(o, s) {
3187
3242
  if (!r)
3188
3243
  try {
3189
- "$" + o(e) === s && (r = wr(s, 1));
3244
+ "$" + o(e) === s && (r = Sr(s, 1));
3190
3245
  } catch {
3191
3246
  }
3192
3247
  }), r;
3193
- }, Es = function(e) {
3248
+ }, Ts = function(e) {
3194
3249
  var r = !1;
3195
- return St(At, function(o, s) {
3250
+ return At(Et, function(o, s) {
3196
3251
  if (!r)
3197
3252
  try {
3198
- o(e), r = wr(s, 1);
3253
+ o(e), r = Sr(s, 1);
3199
3254
  } catch {
3200
3255
  }
3201
3256
  }), r;
3202
- }, kn = function(e) {
3257
+ }, Pn = function(e) {
3203
3258
  if (!e || typeof e != "object")
3204
3259
  return !1;
3205
- if (!xn) {
3206
- var r = wr(vs(e), 8, -1);
3207
- return Ss(ir, r) > -1 ? r : r !== "Object" ? !1 : Es(e);
3260
+ if (!kn) {
3261
+ var r = Sr(Es(e), 8, -1);
3262
+ return Is(sr, r) > -1 ? r : r !== "Object" ? !1 : Ts(e);
3208
3263
  }
3209
- return gt ? As(e) : null;
3210
- }, Is = kn, Fs = function(e) {
3211
- return !!Is(e);
3264
+ return mt ? Fs(e) : null;
3265
+ }, Cs = Pn, _s = function(e) {
3266
+ return !!Cs(e);
3212
3267
  };
3213
3268
  (function(t) {
3214
- var e = Ho, r = Xo, o = kn, s = Fs;
3215
- function u(v) {
3216
- return v.call.bind(v);
3269
+ var e = Jo, r = ts, o = Pn, s = _s;
3270
+ function u(w) {
3271
+ return w.call.bind(w);
3217
3272
  }
3218
- var l = typeof BigInt < "u", f = typeof Symbol < "u", p = u(Object.prototype.toString), A = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), w = u(Boolean.prototype.valueOf);
3273
+ var l = typeof BigInt < "u", f = typeof Symbol < "u", d = u(Object.prototype.toString), A = u(Number.prototype.valueOf), g = u(String.prototype.valueOf), v = u(Boolean.prototype.valueOf);
3219
3274
  if (l)
3220
3275
  var E = u(BigInt.prototype.valueOf);
3221
3276
  if (f)
3222
- var I = u(Symbol.prototype.valueOf);
3223
- function R(v, ft) {
3224
- if (typeof v != "object")
3277
+ var C = u(Symbol.prototype.valueOf);
3278
+ function R(w, lt) {
3279
+ if (typeof w != "object")
3225
3280
  return !1;
3226
3281
  try {
3227
- return ft(v), !0;
3282
+ return lt(w), !0;
3228
3283
  } catch {
3229
3284
  return !1;
3230
3285
  }
3231
3286
  }
3232
3287
  t.isArgumentsObject = e, t.isGeneratorFunction = r, t.isTypedArray = s;
3233
- function U(v) {
3234
- return typeof Promise < "u" && v instanceof Promise || v !== null && typeof v == "object" && typeof v.then == "function" && typeof v.catch == "function";
3288
+ function L(w) {
3289
+ return typeof Promise < "u" && w instanceof Promise || w !== null && typeof w == "object" && typeof w.then == "function" && typeof w.catch == "function";
3235
3290
  }
3236
- t.isPromise = U;
3237
- function Q(v) {
3238
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(v) : s(v) || b(v);
3291
+ t.isPromise = L;
3292
+ function Q(w) {
3293
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(w) : s(w) || b(w);
3239
3294
  }
3240
3295
  t.isArrayBufferView = Q;
3241
- function z(v) {
3242
- return o(v) === "Uint8Array";
3296
+ function z(w) {
3297
+ return o(w) === "Uint8Array";
3243
3298
  }
3244
3299
  t.isUint8Array = z;
3245
- function X(v) {
3246
- return o(v) === "Uint8ClampedArray";
3300
+ function X(w) {
3301
+ return o(w) === "Uint8ClampedArray";
3247
3302
  }
3248
3303
  t.isUint8ClampedArray = X;
3249
- function ye(v) {
3250
- return o(v) === "Uint16Array";
3304
+ function ye(w) {
3305
+ return o(w) === "Uint16Array";
3251
3306
  }
3252
3307
  t.isUint16Array = ye;
3253
- function ee(v) {
3254
- return o(v) === "Uint32Array";
3308
+ function ee(w) {
3309
+ return o(w) === "Uint32Array";
3255
3310
  }
3256
3311
  t.isUint32Array = ee;
3257
- function x(v) {
3258
- return o(v) === "Int8Array";
3312
+ function x(w) {
3313
+ return o(w) === "Int8Array";
3259
3314
  }
3260
3315
  t.isInt8Array = x;
3261
- function j(v) {
3262
- return o(v) === "Int16Array";
3316
+ function j(w) {
3317
+ return o(w) === "Int16Array";
3263
3318
  }
3264
3319
  t.isInt16Array = j;
3265
- function B(v) {
3266
- return o(v) === "Int32Array";
3320
+ function B(w) {
3321
+ return o(w) === "Int32Array";
3267
3322
  }
3268
3323
  t.isInt32Array = B;
3269
- function re(v) {
3270
- return o(v) === "Float32Array";
3324
+ function re(w) {
3325
+ return o(w) === "Float32Array";
3271
3326
  }
3272
3327
  t.isFloat32Array = re;
3273
- function ne(v) {
3274
- return o(v) === "Float64Array";
3328
+ function ne(w) {
3329
+ return o(w) === "Float64Array";
3275
3330
  }
3276
3331
  t.isFloat64Array = ne;
3277
- function _e(v) {
3278
- return o(v) === "BigInt64Array";
3332
+ function _e(w) {
3333
+ return o(w) === "BigInt64Array";
3279
3334
  }
3280
3335
  t.isBigInt64Array = _e;
3281
- function Se(v) {
3282
- return o(v) === "BigUint64Array";
3336
+ function Se(w) {
3337
+ return o(w) === "BigUint64Array";
3283
3338
  }
3284
3339
  t.isBigUint64Array = Se;
3285
- function fe(v) {
3286
- return p(v) === "[object Map]";
3340
+ function fe(w) {
3341
+ return d(w) === "[object Map]";
3287
3342
  }
3288
3343
  fe.working = typeof Map < "u" && fe(/* @__PURE__ */ new Map());
3289
- function et(v) {
3290
- return typeof Map > "u" ? !1 : fe.working ? fe(v) : v instanceof Map;
3344
+ function tt(w) {
3345
+ return typeof Map > "u" ? !1 : fe.working ? fe(w) : w instanceof Map;
3291
3346
  }
3292
- t.isMap = et;
3293
- function le(v) {
3294
- return p(v) === "[object Set]";
3347
+ t.isMap = tt;
3348
+ function le(w) {
3349
+ return d(w) === "[object Set]";
3295
3350
  }
3296
3351
  le.working = typeof Set < "u" && le(/* @__PURE__ */ new Set());
3297
- function Te(v) {
3298
- return typeof Set > "u" ? !1 : le.working ? le(v) : v instanceof Set;
3352
+ function Be(w) {
3353
+ return typeof Set > "u" ? !1 : le.working ? le(w) : w instanceof Set;
3299
3354
  }
3300
- t.isSet = Te;
3301
- function Be(v) {
3302
- return p(v) === "[object WeakMap]";
3355
+ t.isSet = Be;
3356
+ function Oe(w) {
3357
+ return d(w) === "[object WeakMap]";
3303
3358
  }
3304
- Be.working = typeof WeakMap < "u" && Be(/* @__PURE__ */ new WeakMap());
3305
- function tt(v) {
3306
- return typeof WeakMap > "u" ? !1 : Be.working ? Be(v) : v instanceof WeakMap;
3359
+ Oe.working = typeof WeakMap < "u" && Oe(/* @__PURE__ */ new WeakMap());
3360
+ function rt(w) {
3361
+ return typeof WeakMap > "u" ? !1 : Oe.working ? Oe(w) : w instanceof WeakMap;
3307
3362
  }
3308
- t.isWeakMap = tt;
3309
- function Oe(v) {
3310
- return p(v) === "[object WeakSet]";
3363
+ t.isWeakMap = rt;
3364
+ function xe(w) {
3365
+ return d(w) === "[object WeakSet]";
3311
3366
  }
3312
- Oe.working = typeof WeakSet < "u" && Oe(/* @__PURE__ */ new WeakSet());
3313
- function he(v) {
3314
- return Oe(v);
3367
+ xe.working = typeof WeakSet < "u" && xe(/* @__PURE__ */ new WeakSet());
3368
+ function he(w) {
3369
+ return xe(w);
3315
3370
  }
3316
3371
  t.isWeakSet = he;
3317
- function xe(v) {
3318
- return p(v) === "[object ArrayBuffer]";
3372
+ function ke(w) {
3373
+ return d(w) === "[object ArrayBuffer]";
3319
3374
  }
3320
- xe.working = typeof ArrayBuffer < "u" && xe(new ArrayBuffer());
3321
- function V(v) {
3322
- return typeof ArrayBuffer > "u" ? !1 : xe.working ? xe(v) : v instanceof ArrayBuffer;
3375
+ ke.working = typeof ArrayBuffer < "u" && ke(new ArrayBuffer());
3376
+ function V(w) {
3377
+ return typeof ArrayBuffer > "u" ? !1 : ke.working ? ke(w) : w instanceof ArrayBuffer;
3323
3378
  }
3324
3379
  t.isArrayBuffer = V;
3325
- function d(v) {
3326
- return p(v) === "[object DataView]";
3380
+ function p(w) {
3381
+ return d(w) === "[object DataView]";
3327
3382
  }
3328
- d.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && d(new DataView(new ArrayBuffer(1), 0, 1));
3329
- function b(v) {
3330
- return typeof DataView > "u" ? !1 : d.working ? d(v) : v instanceof DataView;
3383
+ p.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && p(new DataView(new ArrayBuffer(1), 0, 1));
3384
+ function b(w) {
3385
+ return typeof DataView > "u" ? !1 : p.working ? p(w) : w instanceof DataView;
3331
3386
  }
3332
3387
  t.isDataView = b;
3333
3388
  var S = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
3334
- function F(v) {
3335
- return p(v) === "[object SharedArrayBuffer]";
3389
+ function I(w) {
3390
+ return d(w) === "[object SharedArrayBuffer]";
3336
3391
  }
3337
- function P(v) {
3338
- return typeof S > "u" ? !1 : (typeof F.working > "u" && (F.working = F(new S())), F.working ? F(v) : v instanceof S);
3392
+ function P(w) {
3393
+ return typeof S > "u" ? !1 : (typeof I.working > "u" && (I.working = I(new S())), I.working ? I(w) : w instanceof S);
3339
3394
  }
3340
3395
  t.isSharedArrayBuffer = P;
3341
- function N(v) {
3342
- return p(v) === "[object AsyncFunction]";
3396
+ function N(w) {
3397
+ return d(w) === "[object AsyncFunction]";
3343
3398
  }
3344
3399
  t.isAsyncFunction = N;
3345
- function C(v) {
3346
- return p(v) === "[object Map Iterator]";
3400
+ function F(w) {
3401
+ return d(w) === "[object Map Iterator]";
3347
3402
  }
3348
- t.isMapIterator = C;
3349
- function O(v) {
3350
- return p(v) === "[object Set Iterator]";
3403
+ t.isMapIterator = F;
3404
+ function O(w) {
3405
+ return d(w) === "[object Set Iterator]";
3351
3406
  }
3352
3407
  t.isSetIterator = O;
3353
- function L(v) {
3354
- return p(v) === "[object Generator]";
3408
+ function U(w) {
3409
+ return d(w) === "[object Generator]";
3355
3410
  }
3356
- t.isGeneratorObject = L;
3357
- function Y(v) {
3358
- return p(v) === "[object WebAssembly.Module]";
3411
+ t.isGeneratorObject = U;
3412
+ function Y(w) {
3413
+ return d(w) === "[object WebAssembly.Module]";
3359
3414
  }
3360
3415
  t.isWebAssemblyCompiledModule = Y;
3361
- function ge(v) {
3362
- return R(v, A);
3416
+ function ge(w) {
3417
+ return R(w, A);
3363
3418
  }
3364
3419
  t.isNumberObject = ge;
3365
- function pe(v) {
3366
- return R(v, g);
3420
+ function pe(w) {
3421
+ return R(w, g);
3367
3422
  }
3368
3423
  t.isStringObject = pe;
3369
- function ie(v) {
3370
- return R(v, w);
3424
+ function ie(w) {
3425
+ return R(w, v);
3371
3426
  }
3372
3427
  t.isBooleanObject = ie;
3373
- function De(v) {
3374
- return l && R(v, E);
3428
+ function De(w) {
3429
+ return l && R(w, E);
3375
3430
  }
3376
3431
  t.isBigIntObject = De;
3377
- function ct(v) {
3378
- return f && R(v, I);
3432
+ function ft(w) {
3433
+ return f && R(w, C);
3379
3434
  }
3380
- t.isSymbolObject = ct;
3381
- function rt(v) {
3382
- return ge(v) || pe(v) || ie(v) || De(v) || ct(v);
3435
+ t.isSymbolObject = ft;
3436
+ function nt(w) {
3437
+ return ge(w) || pe(w) || ie(w) || De(w) || ft(w);
3383
3438
  }
3384
- t.isBoxedPrimitive = rt;
3385
- function xt(v) {
3386
- return typeof Uint8Array < "u" && (V(v) || P(v));
3439
+ t.isBoxedPrimitive = nt;
3440
+ function kt(w) {
3441
+ return typeof Uint8Array < "u" && (V(w) || P(w));
3387
3442
  }
3388
- t.isAnyArrayBuffer = xt, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(v) {
3389
- Object.defineProperty(t, v, {
3443
+ t.isAnyArrayBuffer = kt, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(w) {
3444
+ Object.defineProperty(t, w, {
3390
3445
  enumerable: !1,
3391
3446
  value: function() {
3392
- throw new Error(v + " is not supported in userland");
3447
+ throw new Error(w + " is not supported in userland");
3393
3448
  }
3394
3449
  });
3395
3450
  });
3396
- })(gn);
3397
- var Cs = function(e) {
3451
+ })(mn);
3452
+ var Bs = function(e) {
3398
3453
  return e && typeof e == "object" && typeof e.copy == "function" && typeof e.fill == "function" && typeof e.readUInt8 == "function";
3399
- }, or = { exports: {} };
3400
- typeof Object.create == "function" ? or.exports = function(e, r) {
3454
+ }, ar = { exports: {} };
3455
+ typeof Object.create == "function" ? ar.exports = function(e, r) {
3401
3456
  r && (e.super_ = r, e.prototype = Object.create(r.prototype, {
3402
3457
  constructor: {
3403
3458
  value: e,
@@ -3406,7 +3461,7 @@ typeof Object.create == "function" ? or.exports = function(e, r) {
3406
3461
  configurable: !0
3407
3462
  }
3408
3463
  }));
3409
- } : or.exports = function(e, r) {
3464
+ } : ar.exports = function(e, r) {
3410
3465
  if (r) {
3411
3466
  e.super_ = r;
3412
3467
  var o = function() {
@@ -3414,83 +3469,83 @@ typeof Object.create == "function" ? or.exports = function(e, r) {
3414
3469
  o.prototype = r.prototype, e.prototype = new o(), e.prototype.constructor = e;
3415
3470
  }
3416
3471
  };
3417
- var _s = or.exports;
3472
+ var Os = ar.exports;
3418
3473
  (function(t) {
3419
3474
  var e = Object.getOwnPropertyDescriptors || function(b) {
3420
- for (var S = Object.keys(b), F = {}, P = 0; P < S.length; P++)
3421
- F[S[P]] = Object.getOwnPropertyDescriptor(b, S[P]);
3422
- return F;
3475
+ for (var S = Object.keys(b), I = {}, P = 0; P < S.length; P++)
3476
+ I[S[P]] = Object.getOwnPropertyDescriptor(b, S[P]);
3477
+ return I;
3423
3478
  }, r = /%[sdj%]/g;
3424
- t.format = function(d) {
3425
- if (!x(d)) {
3479
+ t.format = function(p) {
3480
+ if (!x(p)) {
3426
3481
  for (var b = [], S = 0; S < arguments.length; S++)
3427
3482
  b.push(l(arguments[S]));
3428
3483
  return b.join(" ");
3429
3484
  }
3430
- for (var S = 1, F = arguments, P = F.length, N = String(d).replace(r, function(O) {
3485
+ for (var S = 1, I = arguments, P = I.length, N = String(p).replace(r, function(O) {
3431
3486
  if (O === "%%")
3432
3487
  return "%";
3433
3488
  if (S >= P)
3434
3489
  return O;
3435
3490
  switch (O) {
3436
3491
  case "%s":
3437
- return String(F[S++]);
3492
+ return String(I[S++]);
3438
3493
  case "%d":
3439
- return Number(F[S++]);
3494
+ return Number(I[S++]);
3440
3495
  case "%j":
3441
3496
  try {
3442
- return JSON.stringify(F[S++]);
3497
+ return JSON.stringify(I[S++]);
3443
3498
  } catch {
3444
3499
  return "[Circular]";
3445
3500
  }
3446
3501
  default:
3447
3502
  return O;
3448
3503
  }
3449
- }), C = F[S]; S < P; C = F[++S])
3450
- X(C) || !ne(C) ? N += " " + C : N += " " + l(C);
3504
+ }), F = I[S]; S < P; F = I[++S])
3505
+ X(F) || !ne(F) ? N += " " + F : N += " " + l(F);
3451
3506
  return N;
3452
- }, t.deprecate = function(d, b) {
3453
- if (typeof _.process < "u" && _.process.noDeprecation === !0)
3454
- return d;
3455
- if (typeof _.process > "u")
3507
+ }, t.deprecate = function(p, b) {
3508
+ if (typeof T.process < "u" && T.process.noDeprecation === !0)
3509
+ return p;
3510
+ if (typeof T.process > "u")
3456
3511
  return function() {
3457
- return t.deprecate(d, b).apply(this, arguments);
3512
+ return t.deprecate(p, b).apply(this, arguments);
3458
3513
  };
3459
3514
  var S = !1;
3460
- function F() {
3515
+ function I() {
3461
3516
  if (!S) {
3462
- if (_.process.throwDeprecation)
3517
+ if (T.process.throwDeprecation)
3463
3518
  throw new Error(b);
3464
- _.process.traceDeprecation ? console.trace(b) : console.error(b), S = !0;
3519
+ T.process.traceDeprecation ? console.trace(b) : console.error(b), S = !0;
3465
3520
  }
3466
- return d.apply(this, arguments);
3521
+ return p.apply(this, arguments);
3467
3522
  }
3468
- return F;
3523
+ return I;
3469
3524
  };
3470
3525
  var o = {}, s = /^$/;
3471
- if (_.process.env.NODE_DEBUG) {
3472
- var u = _.process.env.NODE_DEBUG;
3526
+ if (T.process.env.NODE_DEBUG) {
3527
+ var u = T.process.env.NODE_DEBUG;
3473
3528
  u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
3474
3529
  }
3475
- t.debuglog = function(d) {
3476
- if (d = d.toUpperCase(), !o[d])
3477
- if (s.test(d)) {
3478
- var b = _.process.pid;
3479
- o[d] = function() {
3530
+ t.debuglog = function(p) {
3531
+ if (p = p.toUpperCase(), !o[p])
3532
+ if (s.test(p)) {
3533
+ var b = T.process.pid;
3534
+ o[p] = function() {
3480
3535
  var S = t.format.apply(t, arguments);
3481
- console.error("%s %d: %s", d, b, S);
3536
+ console.error("%s %d: %s", p, b, S);
3482
3537
  };
3483
3538
  } else
3484
- o[d] = function() {
3539
+ o[p] = function() {
3485
3540
  };
3486
- return o[d];
3541
+ return o[p];
3487
3542
  };
3488
- function l(d, b) {
3543
+ function l(p, b) {
3489
3544
  var S = {
3490
3545
  seen: [],
3491
- stylize: p
3546
+ stylize: d
3492
3547
  };
3493
- return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), z(b) ? S.showHidden = b : b && t._extend(S, b), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = f), g(S, d, S.depth);
3548
+ return arguments.length >= 3 && (S.depth = arguments[2]), arguments.length >= 4 && (S.colors = arguments[3]), z(b) ? S.showHidden = b : b && t._extend(S, b), B(S.showHidden) && (S.showHidden = !1), B(S.depth) && (S.depth = 2), B(S.colors) && (S.colors = !1), B(S.customInspect) && (S.customInspect = !0), S.colors && (S.stylize = f), g(S, p, S.depth);
3494
3549
  }
3495
3550
  t.inspect = l, l.colors = {
3496
3551
  bold: [1, 22],
@@ -3517,100 +3572,100 @@ var _s = or.exports;
3517
3572
  // "name": intentionally not styling
3518
3573
  regexp: "red"
3519
3574
  };
3520
- function f(d, b) {
3575
+ function f(p, b) {
3521
3576
  var S = l.styles[b];
3522
- return S ? "\x1B[" + l.colors[S][0] + "m" + d + "\x1B[" + l.colors[S][1] + "m" : d;
3577
+ return S ? "\x1B[" + l.colors[S][0] + "m" + p + "\x1B[" + l.colors[S][1] + "m" : p;
3523
3578
  }
3524
- function p(d, b) {
3525
- return d;
3579
+ function d(p, b) {
3580
+ return p;
3526
3581
  }
3527
- function A(d) {
3582
+ function A(p) {
3528
3583
  var b = {};
3529
- return d.forEach(function(S, F) {
3584
+ return p.forEach(function(S, I) {
3530
3585
  b[S] = !0;
3531
3586
  }), b;
3532
3587
  }
3533
- function g(d, b, S) {
3534
- if (d.customInspect && b && fe(b.inspect) && // Filter out the util module, it's inspect function is special
3588
+ function g(p, b, S) {
3589
+ if (p.customInspect && b && fe(b.inspect) && // Filter out the util module, it's inspect function is special
3535
3590
  b.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
3536
3591
  !(b.constructor && b.constructor.prototype === b)) {
3537
- var F = b.inspect(S, d);
3538
- return x(F) || (F = g(d, F, S)), F;
3592
+ var I = b.inspect(S, p);
3593
+ return x(I) || (I = g(p, I, S)), I;
3539
3594
  }
3540
- var P = w(d, b);
3595
+ var P = v(p, b);
3541
3596
  if (P)
3542
3597
  return P;
3543
- var N = Object.keys(b), C = A(N);
3544
- if (d.showHidden && (N = Object.getOwnPropertyNames(b)), Se(b) && (N.indexOf("message") >= 0 || N.indexOf("description") >= 0))
3598
+ var N = Object.keys(b), F = A(N);
3599
+ if (p.showHidden && (N = Object.getOwnPropertyNames(b)), Se(b) && (N.indexOf("message") >= 0 || N.indexOf("description") >= 0))
3545
3600
  return E(b);
3546
3601
  if (N.length === 0) {
3547
3602
  if (fe(b)) {
3548
3603
  var O = b.name ? ": " + b.name : "";
3549
- return d.stylize("[Function" + O + "]", "special");
3604
+ return p.stylize("[Function" + O + "]", "special");
3550
3605
  }
3551
3606
  if (re(b))
3552
- return d.stylize(RegExp.prototype.toString.call(b), "regexp");
3607
+ return p.stylize(RegExp.prototype.toString.call(b), "regexp");
3553
3608
  if (_e(b))
3554
- return d.stylize(Date.prototype.toString.call(b), "date");
3609
+ return p.stylize(Date.prototype.toString.call(b), "date");
3555
3610
  if (Se(b))
3556
3611
  return E(b);
3557
3612
  }
3558
- var L = "", Y = !1, ge = ["{", "}"];
3613
+ var U = "", Y = !1, ge = ["{", "}"];
3559
3614
  if (Q(b) && (Y = !0, ge = ["[", "]"]), fe(b)) {
3560
3615
  var pe = b.name ? ": " + b.name : "";
3561
- L = " [Function" + pe + "]";
3616
+ U = " [Function" + pe + "]";
3562
3617
  }
3563
- if (re(b) && (L = " " + RegExp.prototype.toString.call(b)), _e(b) && (L = " " + Date.prototype.toUTCString.call(b)), Se(b) && (L = " " + E(b)), N.length === 0 && (!Y || b.length == 0))
3564
- return ge[0] + L + ge[1];
3618
+ if (re(b) && (U = " " + RegExp.prototype.toString.call(b)), _e(b) && (U = " " + Date.prototype.toUTCString.call(b)), Se(b) && (U = " " + E(b)), N.length === 0 && (!Y || b.length == 0))
3619
+ return ge[0] + U + ge[1];
3565
3620
  if (S < 0)
3566
- return re(b) ? d.stylize(RegExp.prototype.toString.call(b), "regexp") : d.stylize("[Object]", "special");
3567
- d.seen.push(b);
3621
+ return re(b) ? p.stylize(RegExp.prototype.toString.call(b), "regexp") : p.stylize("[Object]", "special");
3622
+ p.seen.push(b);
3568
3623
  var ie;
3569
- return Y ? ie = I(d, b, S, C, N) : ie = N.map(function(De) {
3570
- return R(d, b, S, C, De, Y);
3571
- }), d.seen.pop(), U(ie, L, ge);
3624
+ return Y ? ie = C(p, b, S, F, N) : ie = N.map(function(De) {
3625
+ return R(p, b, S, F, De, Y);
3626
+ }), p.seen.pop(), L(ie, U, ge);
3572
3627
  }
3573
- function w(d, b) {
3628
+ function v(p, b) {
3574
3629
  if (B(b))
3575
- return d.stylize("undefined", "undefined");
3630
+ return p.stylize("undefined", "undefined");
3576
3631
  if (x(b)) {
3577
3632
  var S = "'" + JSON.stringify(b).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
3578
- return d.stylize(S, "string");
3633
+ return p.stylize(S, "string");
3579
3634
  }
3580
3635
  if (ee(b))
3581
- return d.stylize("" + b, "number");
3636
+ return p.stylize("" + b, "number");
3582
3637
  if (z(b))
3583
- return d.stylize("" + b, "boolean");
3638
+ return p.stylize("" + b, "boolean");
3584
3639
  if (X(b))
3585
- return d.stylize("null", "null");
3640
+ return p.stylize("null", "null");
3586
3641
  }
3587
- function E(d) {
3588
- return "[" + Error.prototype.toString.call(d) + "]";
3642
+ function E(p) {
3643
+ return "[" + Error.prototype.toString.call(p) + "]";
3589
3644
  }
3590
- function I(d, b, S, F, P) {
3591
- for (var N = [], C = 0, O = b.length; C < O; ++C)
3592
- Oe(b, String(C)) ? N.push(R(
3593
- d,
3645
+ function C(p, b, S, I, P) {
3646
+ for (var N = [], F = 0, O = b.length; F < O; ++F)
3647
+ xe(b, String(F)) ? N.push(R(
3648
+ p,
3594
3649
  b,
3595
3650
  S,
3596
- F,
3597
- String(C),
3651
+ I,
3652
+ String(F),
3598
3653
  !0
3599
3654
  )) : N.push("");
3600
- return P.forEach(function(L) {
3601
- L.match(/^\d+$/) || N.push(R(
3602
- d,
3655
+ return P.forEach(function(U) {
3656
+ U.match(/^\d+$/) || N.push(R(
3657
+ p,
3603
3658
  b,
3604
3659
  S,
3605
- F,
3606
- L,
3660
+ I,
3661
+ U,
3607
3662
  !0
3608
3663
  ));
3609
3664
  }), N;
3610
3665
  }
3611
- function R(d, b, S, F, P, N) {
3612
- var C, O, L;
3613
- if (L = Object.getOwnPropertyDescriptor(b, P) || { value: b[P] }, L.get ? L.set ? O = d.stylize("[Getter/Setter]", "special") : O = d.stylize("[Getter]", "special") : L.set && (O = d.stylize("[Setter]", "special")), Oe(F, P) || (C = "[" + P + "]"), O || (d.seen.indexOf(L.value) < 0 ? (X(S) ? O = g(d, L.value, null) : O = g(d, L.value, S - 1), O.indexOf(`
3666
+ function R(p, b, S, I, P, N) {
3667
+ var F, O, U;
3668
+ if (U = Object.getOwnPropertyDescriptor(b, P) || { value: b[P] }, U.get ? U.set ? O = p.stylize("[Getter/Setter]", "special") : O = p.stylize("[Getter]", "special") : U.set && (O = p.stylize("[Setter]", "special")), xe(I, P) || (F = "[" + P + "]"), O || (p.seen.indexOf(U.value) < 0 ? (X(S) ? O = g(p, U.value, null) : O = g(p, U.value, S - 1), O.indexOf(`
3614
3669
  `) > -1 && (N ? O = O.split(`
3615
3670
  `).map(function(Y) {
3616
3671
  return " " + Y;
@@ -3620,87 +3675,87 @@ var _s = or.exports;
3620
3675
  `).map(function(Y) {
3621
3676
  return " " + Y;
3622
3677
  }).join(`
3623
- `))) : O = d.stylize("[Circular]", "special")), B(C)) {
3678
+ `))) : O = p.stylize("[Circular]", "special")), B(F)) {
3624
3679
  if (N && P.match(/^\d+$/))
3625
3680
  return O;
3626
- C = JSON.stringify("" + P), C.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (C = C.slice(1, -1), C = d.stylize(C, "name")) : (C = C.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), C = d.stylize(C, "string"));
3681
+ F = JSON.stringify("" + P), F.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (F = F.slice(1, -1), F = p.stylize(F, "name")) : (F = F.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), F = p.stylize(F, "string"));
3627
3682
  }
3628
- return C + ": " + O;
3683
+ return F + ": " + O;
3629
3684
  }
3630
- function U(d, b, S) {
3631
- var F = d.reduce(function(P, N) {
3685
+ function L(p, b, S) {
3686
+ var I = p.reduce(function(P, N) {
3632
3687
  return N.indexOf(`
3633
3688
  `) >= 0, P + N.replace(/\u001b\[\d\d?m/g, "").length + 1;
3634
3689
  }, 0);
3635
- return F > 60 ? S[0] + (b === "" ? "" : b + `
3636
- `) + " " + d.join(`,
3637
- `) + " " + S[1] : S[0] + b + " " + d.join(", ") + " " + S[1];
3690
+ return I > 60 ? S[0] + (b === "" ? "" : b + `
3691
+ `) + " " + p.join(`,
3692
+ `) + " " + S[1] : S[0] + b + " " + p.join(", ") + " " + S[1];
3638
3693
  }
3639
- t.types = gn;
3640
- function Q(d) {
3641
- return Array.isArray(d);
3694
+ t.types = mn;
3695
+ function Q(p) {
3696
+ return Array.isArray(p);
3642
3697
  }
3643
3698
  t.isArray = Q;
3644
- function z(d) {
3645
- return typeof d == "boolean";
3699
+ function z(p) {
3700
+ return typeof p == "boolean";
3646
3701
  }
3647
3702
  t.isBoolean = z;
3648
- function X(d) {
3649
- return d === null;
3703
+ function X(p) {
3704
+ return p === null;
3650
3705
  }
3651
3706
  t.isNull = X;
3652
- function ye(d) {
3653
- return d == null;
3707
+ function ye(p) {
3708
+ return p == null;
3654
3709
  }
3655
3710
  t.isNullOrUndefined = ye;
3656
- function ee(d) {
3657
- return typeof d == "number";
3711
+ function ee(p) {
3712
+ return typeof p == "number";
3658
3713
  }
3659
3714
  t.isNumber = ee;
3660
- function x(d) {
3661
- return typeof d == "string";
3715
+ function x(p) {
3716
+ return typeof p == "string";
3662
3717
  }
3663
3718
  t.isString = x;
3664
- function j(d) {
3665
- return typeof d == "symbol";
3719
+ function j(p) {
3720
+ return typeof p == "symbol";
3666
3721
  }
3667
3722
  t.isSymbol = j;
3668
- function B(d) {
3669
- return d === void 0;
3723
+ function B(p) {
3724
+ return p === void 0;
3670
3725
  }
3671
3726
  t.isUndefined = B;
3672
- function re(d) {
3673
- return ne(d) && le(d) === "[object RegExp]";
3727
+ function re(p) {
3728
+ return ne(p) && le(p) === "[object RegExp]";
3674
3729
  }
3675
3730
  t.isRegExp = re, t.types.isRegExp = re;
3676
- function ne(d) {
3677
- return typeof d == "object" && d !== null;
3731
+ function ne(p) {
3732
+ return typeof p == "object" && p !== null;
3678
3733
  }
3679
3734
  t.isObject = ne;
3680
- function _e(d) {
3681
- return ne(d) && le(d) === "[object Date]";
3735
+ function _e(p) {
3736
+ return ne(p) && le(p) === "[object Date]";
3682
3737
  }
3683
3738
  t.isDate = _e, t.types.isDate = _e;
3684
- function Se(d) {
3685
- return ne(d) && (le(d) === "[object Error]" || d instanceof Error);
3739
+ function Se(p) {
3740
+ return ne(p) && (le(p) === "[object Error]" || p instanceof Error);
3686
3741
  }
3687
3742
  t.isError = Se, t.types.isNativeError = Se;
3688
- function fe(d) {
3689
- return typeof d == "function";
3743
+ function fe(p) {
3744
+ return typeof p == "function";
3690
3745
  }
3691
3746
  t.isFunction = fe;
3692
- function et(d) {
3693
- return d === null || typeof d == "boolean" || typeof d == "number" || typeof d == "string" || typeof d == "symbol" || // ES6 symbol
3694
- typeof d > "u";
3747
+ function tt(p) {
3748
+ return p === null || typeof p == "boolean" || typeof p == "number" || typeof p == "string" || typeof p == "symbol" || // ES6 symbol
3749
+ typeof p > "u";
3695
3750
  }
3696
- t.isPrimitive = et, t.isBuffer = Cs;
3697
- function le(d) {
3698
- return Object.prototype.toString.call(d);
3751
+ t.isPrimitive = tt, t.isBuffer = Bs;
3752
+ function le(p) {
3753
+ return Object.prototype.toString.call(p);
3699
3754
  }
3700
- function Te(d) {
3701
- return d < 10 ? "0" + d.toString(10) : d.toString(10);
3755
+ function Be(p) {
3756
+ return p < 10 ? "0" + p.toString(10) : p.toString(10);
3702
3757
  }
3703
- var Be = [
3758
+ var Oe = [
3704
3759
  "Jan",
3705
3760
  "Feb",
3706
3761
  "Mar",
@@ -3714,25 +3769,25 @@ var _s = or.exports;
3714
3769
  "Nov",
3715
3770
  "Dec"
3716
3771
  ];
3717
- function tt() {
3718
- var d = /* @__PURE__ */ new Date(), b = [
3719
- Te(d.getHours()),
3720
- Te(d.getMinutes()),
3721
- Te(d.getSeconds())
3772
+ function rt() {
3773
+ var p = /* @__PURE__ */ new Date(), b = [
3774
+ Be(p.getHours()),
3775
+ Be(p.getMinutes()),
3776
+ Be(p.getSeconds())
3722
3777
  ].join(":");
3723
- return [d.getDate(), Be[d.getMonth()], b].join(" ");
3778
+ return [p.getDate(), Oe[p.getMonth()], b].join(" ");
3724
3779
  }
3725
3780
  t.log = function() {
3726
- console.log("%s - %s", tt(), t.format.apply(t, arguments));
3727
- }, t.inherits = _s, t._extend = function(d, b) {
3781
+ console.log("%s - %s", rt(), t.format.apply(t, arguments));
3782
+ }, t.inherits = Os, t._extend = function(p, b) {
3728
3783
  if (!b || !ne(b))
3729
- return d;
3730
- for (var S = Object.keys(b), F = S.length; F--; )
3731
- d[S[F]] = b[S[F]];
3732
- return d;
3784
+ return p;
3785
+ for (var S = Object.keys(b), I = S.length; I--; )
3786
+ p[S[I]] = b[S[I]];
3787
+ return p;
3733
3788
  };
3734
- function Oe(d, b) {
3735
- return Object.prototype.hasOwnProperty.call(d, b);
3789
+ function xe(p, b) {
3790
+ return Object.prototype.hasOwnProperty.call(p, b);
3736
3791
  }
3737
3792
  var he = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
3738
3793
  t.promisify = function(b) {
@@ -3750,17 +3805,17 @@ var _s = or.exports;
3750
3805
  }), S;
3751
3806
  }
3752
3807
  function S() {
3753
- for (var F, P, N = new Promise(function(L, Y) {
3754
- F = L, P = Y;
3755
- }), C = [], O = 0; O < arguments.length; O++)
3756
- C.push(arguments[O]);
3757
- C.push(function(L, Y) {
3758
- L ? P(L) : F(Y);
3808
+ for (var I, P, N = new Promise(function(U, Y) {
3809
+ I = U, P = Y;
3810
+ }), F = [], O = 0; O < arguments.length; O++)
3811
+ F.push(arguments[O]);
3812
+ F.push(function(U, Y) {
3813
+ U ? P(U) : I(Y);
3759
3814
  });
3760
3815
  try {
3761
- b.apply(this, C);
3762
- } catch (L) {
3763
- P(L);
3816
+ b.apply(this, F);
3817
+ } catch (U) {
3818
+ P(U);
3764
3819
  }
3765
3820
  return N;
3766
3821
  }
@@ -3774,43 +3829,43 @@ var _s = or.exports;
3774
3829
  e(b)
3775
3830
  );
3776
3831
  }, t.promisify.custom = he;
3777
- function xe(d, b) {
3778
- if (!d) {
3832
+ function ke(p, b) {
3833
+ if (!p) {
3779
3834
  var S = new Error("Promise was rejected with a falsy value");
3780
- S.reason = d, d = S;
3835
+ S.reason = p, p = S;
3781
3836
  }
3782
- return b(d);
3837
+ return b(p);
3783
3838
  }
3784
- function V(d) {
3785
- if (typeof d != "function")
3839
+ function V(p) {
3840
+ if (typeof p != "function")
3786
3841
  throw new TypeError('The "original" argument must be of type Function');
3787
3842
  function b() {
3788
- for (var S = [], F = 0; F < arguments.length; F++)
3789
- S.push(arguments[F]);
3843
+ for (var S = [], I = 0; I < arguments.length; I++)
3844
+ S.push(arguments[I]);
3790
3845
  var P = S.pop();
3791
3846
  if (typeof P != "function")
3792
3847
  throw new TypeError("The last argument must be of type Function");
3793
- var N = this, C = function() {
3848
+ var N = this, F = function() {
3794
3849
  return P.apply(N, arguments);
3795
3850
  };
3796
- d.apply(this, S).then(
3851
+ p.apply(this, S).then(
3797
3852
  function(O) {
3798
- _.process.nextTick(C.bind(null, null, O));
3853
+ T.process.nextTick(F.bind(null, null, O));
3799
3854
  },
3800
3855
  function(O) {
3801
- _.process.nextTick(xe.bind(null, O, C));
3856
+ T.process.nextTick(ke.bind(null, O, F));
3802
3857
  }
3803
3858
  );
3804
3859
  }
3805
- return Object.setPrototypeOf(b, Object.getPrototypeOf(d)), Object.defineProperties(
3860
+ return Object.setPrototypeOf(b, Object.getPrototypeOf(p)), Object.defineProperties(
3806
3861
  b,
3807
- e(d)
3862
+ e(p)
3808
3863
  ), b;
3809
3864
  }
3810
3865
  t.callbackify = V;
3811
- })(Bt);
3812
- const { inherits: Ts, format: Vt } = Bt;
3813
- function Pe(t, e, r = Error) {
3866
+ })(Ot);
3867
+ const { inherits: xs, format: Gt } = Ot;
3868
+ function Re(t, e, r = Error) {
3814
3869
  if (!t)
3815
3870
  throw new Error("Avvio error code must not be empty");
3816
3871
  if (!e)
@@ -3818,41 +3873,41 @@ function Pe(t, e, r = Error) {
3818
3873
  function o(s, u, l) {
3819
3874
  if (!new.target)
3820
3875
  return new o(s, u, l);
3821
- Error.captureStackTrace(this, o), this.code = t, this.message = e, this.name = "AvvioError", s && u && l ? this.message = Vt(e, s, u, l) : s && u ? this.message = Vt(e, s, u) : s ? this.message = Vt(e, s) : this.message = e;
3876
+ Error.captureStackTrace(this, o), this.code = t, this.message = e, this.name = "AvvioError", s && u && l ? this.message = Gt(e, s, u, l) : s && u ? this.message = Gt(e, s, u) : s ? this.message = Gt(e, s) : this.message = e;
3822
3877
  }
3823
3878
  return o.prototype[Symbol.toStringTag] = "Error", o.prototype.toString = function() {
3824
3879
  return `${this.name} [${this.code}]: ${this.message}`;
3825
- }, Ts(o, r), o;
3880
+ }, xs(o, r), o;
3826
3881
  }
3827
- var Pn = {
3828
- createError: Pe,
3829
- AVV_ERR_EXPOSE_ALREADY_DEFINED: Pe(
3882
+ var Rn = {
3883
+ createError: Re,
3884
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: Re(
3830
3885
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
3831
3886
  "'%s' () is already defined, specify an expose option"
3832
3887
  ),
3833
- AVV_ERR_CALLBACK_NOT_FN: Pe(
3888
+ AVV_ERR_CALLBACK_NOT_FN: Re(
3834
3889
  "AVV_ERR_CALLBACK_NOT_FN",
3835
3890
  "Callback for '%s' hook is not a function. Received: '%s'"
3836
3891
  ),
3837
- AVV_ERR_PLUGIN_NOT_VALID: Pe(
3892
+ AVV_ERR_PLUGIN_NOT_VALID: Re(
3838
3893
  "AVV_ERR_PLUGIN_NOT_VALID",
3839
3894
  "Plugin must be a function or a promise. Received: '%s'"
3840
3895
  ),
3841
- AVV_ERR_ROOT_PLG_BOOTED: Pe(
3896
+ AVV_ERR_ROOT_PLG_BOOTED: Re(
3842
3897
  "AVV_ERR_PLUGIN_NOT_VALID",
3843
3898
  "Root plugin has already booted"
3844
3899
  ),
3845
- AVV_ERR_PARENT_PLG_LOADED: Pe(
3900
+ AVV_ERR_PARENT_PLG_LOADED: Re(
3846
3901
  "AVV_ERR_PARENT_PLG_LOADED",
3847
3902
  "Impossible to load '%s' plugin because the parent '%s' was already loaded"
3848
3903
  ),
3849
- AVV_ERR_READY_TIMEOUT: Pe(
3904
+ AVV_ERR_READY_TIMEOUT: Re(
3850
3905
  "AVV_ERR_READY_TIMEOUT",
3851
3906
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
3852
3907
  )
3853
- }, Bs = function t(e, r, o) {
3908
+ }, ks = function t(e, r, o) {
3854
3909
  r === void 0 && (r = ""), o || (o = {});
3855
- var s = function(p) {
3910
+ var s = function(d) {
3856
3911
  var A = {
3857
3912
  "│": "|",
3858
3913
  "└": "`",
@@ -3860,27 +3915,27 @@ var Pn = {
3860
3915
  "─": "-",
3861
3916
  "┬": "-"
3862
3917
  };
3863
- return o.unicode === !1 ? A[p] : p;
3918
+ return o.unicode === !1 ? A[d] : d;
3864
3919
  };
3865
3920
  typeof e == "string" && (e = { label: e });
3866
3921
  var u = e.nodes || [], l = (e.label || "").split(`
3867
3922
  `), f = `
3868
3923
  ` + r + (u.length ? s("│") : " ") + " ";
3869
3924
  return r + l.join(f) + `
3870
- ` + u.map(function(p, A) {
3871
- var g = A === u.length - 1, w = p.nodes && p.nodes.length, E = r + (g ? " " : s("│")) + " ";
3872
- return r + s(g ? "└" : "├") + s("─") + s(w ? "┬" : "─") + " " + t(p, E, o).slice(r.length + 2);
3925
+ ` + u.map(function(d, A) {
3926
+ var g = A === u.length - 1, v = d.nodes && d.nodes.length, E = r + (g ? " " : s("│")) + " ";
3927
+ return r + s(g ? "└" : "├") + s("─") + s(v ? "┬" : "─") + " " + t(d, E, o).slice(r.length + 2);
3873
3928
  }).join("");
3874
3929
  };
3875
- const Os = Bs, Lr = Symbol("avvio.TimeTree.untrackNode"), qt = Symbol("avvio.TimeTree.trackNode"), $r = Symbol("avvio.TimeTree.getParent"), Dr = Symbol("avvio.TimeTree.getNode"), jr = Symbol("avvio.TimeTree.addNode");
3876
- let xs = class {
3930
+ const Ps = ks, Dr = Symbol("avvio.TimeTree.untrackNode"), Qt = Symbol("avvio.TimeTree.trackNode"), jr = Symbol("avvio.TimeTree.getParent"), Mr = Symbol("avvio.TimeTree.getNode"), Vr = Symbol("avvio.TimeTree.addNode");
3931
+ let Rs = class {
3877
3932
  constructor() {
3878
3933
  this.root = null, this.tableId = /* @__PURE__ */ new Map(), this.tableLabel = /* @__PURE__ */ new Map();
3879
3934
  }
3880
- [qt](e) {
3935
+ [Qt](e) {
3881
3936
  this.tableId.set(e.id, e), this.tableLabel.has(e.label) ? this.tableLabel.get(e.label).push(e) : this.tableLabel.set(e.label, [e]);
3882
3937
  }
3883
- [Lr](e) {
3938
+ [Dr](e) {
3884
3939
  this.tableId.delete(e.id);
3885
3940
  const r = this.tableLabel.get(e.label);
3886
3941
  if (r.id) {
@@ -3889,72 +3944,72 @@ let xs = class {
3889
3944
  }
3890
3945
  r.pop(), r.length === 0 && this.tableLabel.delete(e.label);
3891
3946
  }
3892
- [$r](e) {
3947
+ [jr](e) {
3893
3948
  if (e === null)
3894
3949
  return this.root;
3895
3950
  const r = this.tableLabel.get(e);
3896
3951
  return r.id ? r : r[r.length - 1];
3897
3952
  }
3898
- [Dr](e) {
3953
+ [Mr](e) {
3899
3954
  return this.tableId.get(e);
3900
3955
  }
3901
- [jr](e, r, o) {
3956
+ [Vr](e, r, o) {
3902
3957
  if (e === null)
3903
3958
  return this.root = {
3904
3959
  id: "root",
3905
3960
  label: r,
3906
3961
  start: o,
3907
3962
  nodes: []
3908
- }, this[qt](this.root), this.root.id;
3909
- const u = this[$r](e), l = `${r}-${Math.random()}`, f = {
3963
+ }, this[Qt](this.root), this.root.id;
3964
+ const u = this[jr](e), l = `${r}-${Math.random()}`, f = {
3910
3965
  id: l,
3911
3966
  parent: e,
3912
3967
  start: o,
3913
3968
  label: r,
3914
3969
  nodes: []
3915
3970
  };
3916
- return u.nodes.push(f), this[qt](f), l;
3971
+ return u.nodes.push(f), this[Qt](f), l;
3917
3972
  }
3918
3973
  start(e, r, o = Date.now()) {
3919
- return this[jr](e, r, o);
3974
+ return this[Vr](e, r, o);
3920
3975
  }
3921
3976
  stop(e, r = Date.now()) {
3922
- const o = this[Dr](e);
3923
- o && (o.stop = r, o.diff = o.stop - o.start || 0, this[Lr](o));
3977
+ const o = this[Mr](e);
3978
+ o && (o.stop = r, o.diff = o.stop - o.start || 0, this[Dr](o));
3924
3979
  }
3925
3980
  toJSON() {
3926
3981
  return Object.assign({}, this.root);
3927
3982
  }
3928
3983
  prittyPrint() {
3929
3984
  const e = (o) => (o.label = `${o.label} ${o.diff} ms`, o.nodes.length > 0 && (o.nodes = o.nodes.map((s) => e(s))), o), r = e(this.toJSON());
3930
- return Os(r);
3985
+ return Ps(r);
3931
3986
  }
3932
3987
  };
3933
- var ks = xs, vr = { exports: {} }, sr = { exports: {} }, Gt, Mr;
3934
- function Ps() {
3935
- if (Mr)
3936
- return Gt;
3937
- Mr = 1;
3988
+ var Ns = Rs, Ar = { exports: {} }, ur = { exports: {} }, zt, qr;
3989
+ function Ls() {
3990
+ if (qr)
3991
+ return zt;
3992
+ qr = 1;
3938
3993
  var t = 1e3, e = t * 60, r = e * 60, o = r * 24, s = o * 7, u = o * 365.25;
3939
- Gt = function(g, w) {
3940
- w = w || {};
3994
+ zt = function(g, v) {
3995
+ v = v || {};
3941
3996
  var E = typeof g;
3942
3997
  if (E === "string" && g.length > 0)
3943
3998
  return l(g);
3944
3999
  if (E === "number" && isFinite(g))
3945
- return w.long ? p(g) : f(g);
4000
+ return v.long ? d(g) : f(g);
3946
4001
  throw new Error(
3947
4002
  "val is not a non-empty string or a valid number. val=" + JSON.stringify(g)
3948
4003
  );
3949
4004
  };
3950
4005
  function l(g) {
3951
4006
  if (g = String(g), !(g.length > 100)) {
3952
- var w = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
4007
+ var v = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
3953
4008
  g
3954
4009
  );
3955
- if (w) {
3956
- var E = parseFloat(w[1]), I = (w[2] || "ms").toLowerCase();
3957
- switch (I) {
4010
+ if (v) {
4011
+ var E = parseFloat(v[1]), C = (v[2] || "ms").toLowerCase();
4012
+ switch (C) {
3958
4013
  case "years":
3959
4014
  case "year":
3960
4015
  case "yrs":
@@ -4000,37 +4055,37 @@ function Ps() {
4000
4055
  }
4001
4056
  }
4002
4057
  function f(g) {
4003
- var w = Math.abs(g);
4004
- return w >= o ? Math.round(g / o) + "d" : w >= r ? Math.round(g / r) + "h" : w >= e ? Math.round(g / e) + "m" : w >= t ? Math.round(g / t) + "s" : g + "ms";
4058
+ var v = Math.abs(g);
4059
+ return v >= o ? Math.round(g / o) + "d" : v >= r ? Math.round(g / r) + "h" : v >= e ? Math.round(g / e) + "m" : v >= t ? Math.round(g / t) + "s" : g + "ms";
4005
4060
  }
4006
- function p(g) {
4007
- var w = Math.abs(g);
4008
- return w >= o ? A(g, w, o, "day") : w >= r ? A(g, w, r, "hour") : w >= e ? A(g, w, e, "minute") : w >= t ? A(g, w, t, "second") : g + " ms";
4061
+ function d(g) {
4062
+ var v = Math.abs(g);
4063
+ return v >= o ? A(g, v, o, "day") : v >= r ? A(g, v, r, "hour") : v >= e ? A(g, v, e, "minute") : v >= t ? A(g, v, t, "second") : g + " ms";
4009
4064
  }
4010
- function A(g, w, E, I) {
4011
- var R = w >= E * 1.5;
4012
- return Math.round(g / E) + " " + I + (R ? "s" : "");
4065
+ function A(g, v, E, C) {
4066
+ var R = v >= E * 1.5;
4067
+ return Math.round(g / E) + " " + C + (R ? "s" : "");
4013
4068
  }
4014
- return Gt;
4069
+ return zt;
4015
4070
  }
4016
- function Rs(t) {
4017
- r.debug = r, r.default = r, r.coerce = p, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ps(), r.destroy = A, Object.keys(t).forEach((g) => {
4071
+ function Us(t) {
4072
+ r.debug = r, r.default = r, r.coerce = d, r.disable = u, r.enable = s, r.enabled = l, r.humanize = Ls(), r.destroy = A, Object.keys(t).forEach((g) => {
4018
4073
  r[g] = t[g];
4019
4074
  }), r.names = [], r.skips = [], r.formatters = {};
4020
4075
  function e(g) {
4021
- let w = 0;
4076
+ let v = 0;
4022
4077
  for (let E = 0; E < g.length; E++)
4023
- w = (w << 5) - w + g.charCodeAt(E), w |= 0;
4024
- return r.colors[Math.abs(w) % r.colors.length];
4078
+ v = (v << 5) - v + g.charCodeAt(E), v |= 0;
4079
+ return r.colors[Math.abs(v) % r.colors.length];
4025
4080
  }
4026
4081
  r.selectColor = e;
4027
4082
  function r(g) {
4028
- let w, E = null, I, R;
4029
- function U(...Q) {
4030
- if (!U.enabled)
4083
+ let v, E = null, C, R;
4084
+ function L(...Q) {
4085
+ if (!L.enabled)
4031
4086
  return;
4032
- const z = U, X = Number(/* @__PURE__ */ new Date()), ye = X - (w || X);
4033
- z.diff = ye, z.prev = w, z.curr = X, w = X, Q[0] = r.coerce(Q[0]), typeof Q[0] != "string" && Q.unshift("%O");
4087
+ const z = L, X = Number(/* @__PURE__ */ new Date()), ye = X - (v || X);
4088
+ z.diff = ye, z.prev = v, z.curr = X, v = X, Q[0] = r.coerce(Q[0]), typeof Q[0] != "string" && Q.unshift("%O");
4034
4089
  let ee = 0;
4035
4090
  Q[0] = Q[0].replace(/%([a-zA-Z%])/g, (j, B) => {
4036
4091
  if (j === "%%")
@@ -4044,49 +4099,49 @@ function Rs(t) {
4044
4099
  return j;
4045
4100
  }), r.formatArgs.call(z, Q), (z.log || r.log).apply(z, Q);
4046
4101
  }
4047
- return U.namespace = g, U.useColors = r.useColors(), U.color = r.selectColor(g), U.extend = o, U.destroy = r.destroy, Object.defineProperty(U, "enabled", {
4102
+ return L.namespace = g, L.useColors = r.useColors(), L.color = r.selectColor(g), L.extend = o, L.destroy = r.destroy, Object.defineProperty(L, "enabled", {
4048
4103
  enumerable: !0,
4049
4104
  configurable: !1,
4050
- get: () => E !== null ? E : (I !== r.namespaces && (I = r.namespaces, R = r.enabled(g)), R),
4105
+ get: () => E !== null ? E : (C !== r.namespaces && (C = r.namespaces, R = r.enabled(g)), R),
4051
4106
  set: (Q) => {
4052
4107
  E = Q;
4053
4108
  }
4054
- }), typeof r.init == "function" && r.init(U), U;
4109
+ }), typeof r.init == "function" && r.init(L), L;
4055
4110
  }
4056
- function o(g, w) {
4057
- const E = r(this.namespace + (typeof w > "u" ? ":" : w) + g);
4111
+ function o(g, v) {
4112
+ const E = r(this.namespace + (typeof v > "u" ? ":" : v) + g);
4058
4113
  return E.log = this.log, E;
4059
4114
  }
4060
4115
  function s(g) {
4061
4116
  r.save(g), r.namespaces = g, r.names = [], r.skips = [];
4062
- let w;
4063
- const E = (typeof g == "string" ? g : "").split(/[\s,]+/), I = E.length;
4064
- for (w = 0; w < I; w++)
4065
- E[w] && (g = E[w].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
4117
+ let v;
4118
+ const E = (typeof g == "string" ? g : "").split(/[\s,]+/), C = E.length;
4119
+ for (v = 0; v < C; v++)
4120
+ E[v] && (g = E[v].replace(/\*/g, ".*?"), g[0] === "-" ? r.skips.push(new RegExp("^" + g.slice(1) + "$")) : r.names.push(new RegExp("^" + g + "$")));
4066
4121
  }
4067
4122
  function u() {
4068
4123
  const g = [
4069
4124
  ...r.names.map(f),
4070
- ...r.skips.map(f).map((w) => "-" + w)
4125
+ ...r.skips.map(f).map((v) => "-" + v)
4071
4126
  ].join(",");
4072
4127
  return r.enable(""), g;
4073
4128
  }
4074
4129
  function l(g) {
4075
4130
  if (g[g.length - 1] === "*")
4076
4131
  return !0;
4077
- let w, E;
4078
- for (w = 0, E = r.skips.length; w < E; w++)
4079
- if (r.skips[w].test(g))
4132
+ let v, E;
4133
+ for (v = 0, E = r.skips.length; v < E; v++)
4134
+ if (r.skips[v].test(g))
4080
4135
  return !1;
4081
- for (w = 0, E = r.names.length; w < E; w++)
4082
- if (r.names[w].test(g))
4136
+ for (v = 0, E = r.names.length; v < E; v++)
4137
+ if (r.names[v].test(g))
4083
4138
  return !0;
4084
4139
  return !1;
4085
4140
  }
4086
4141
  function f(g) {
4087
4142
  return g.toString().substring(2, g.toString().length - 2).replace(/\.\*\?$/, "*");
4088
4143
  }
4089
- function p(g) {
4144
+ function d(g) {
4090
4145
  return g instanceof Error ? g.stack || g.message : g;
4091
4146
  }
4092
4147
  function A() {
@@ -4094,12 +4149,12 @@ function Rs(t) {
4094
4149
  }
4095
4150
  return r.enable(r.load()), r;
4096
4151
  }
4097
- var Ns = Rs;
4152
+ var $s = Us;
4098
4153
  (function(t, e) {
4099
4154
  e.formatArgs = o, e.save = s, e.load = u, e.useColors = r, e.storage = l(), e.destroy = (() => {
4100
- let p = !1;
4155
+ let d = !1;
4101
4156
  return () => {
4102
- p || (p = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
4157
+ d || (d = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
4103
4158
  };
4104
4159
  })(), e.colors = [
4105
4160
  "#0000CC",
@@ -4186,31 +4241,31 @@ var Ns = Rs;
4186
4241
  typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
4187
4242
  typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
4188
4243
  }
4189
- function o(p) {
4190
- if (p[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + p[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
4244
+ function o(d) {
4245
+ if (d[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + d[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors)
4191
4246
  return;
4192
4247
  const A = "color: " + this.color;
4193
- p.splice(1, 0, A, "color: inherit");
4194
- let g = 0, w = 0;
4195
- p[0].replace(/%[a-zA-Z%]/g, (E) => {
4196
- E !== "%%" && (g++, E === "%c" && (w = g));
4197
- }), p.splice(w, 0, A);
4248
+ d.splice(1, 0, A, "color: inherit");
4249
+ let g = 0, v = 0;
4250
+ d[0].replace(/%[a-zA-Z%]/g, (E) => {
4251
+ E !== "%%" && (g++, E === "%c" && (v = g));
4252
+ }), d.splice(v, 0, A);
4198
4253
  }
4199
4254
  e.log = console.debug || console.log || (() => {
4200
4255
  });
4201
- function s(p) {
4256
+ function s(d) {
4202
4257
  try {
4203
- p ? e.storage.setItem("debug", p) : e.storage.removeItem("debug");
4258
+ d ? e.storage.setItem("debug", d) : e.storage.removeItem("debug");
4204
4259
  } catch {
4205
4260
  }
4206
4261
  }
4207
4262
  function u() {
4208
- let p;
4263
+ let d;
4209
4264
  try {
4210
- p = e.storage.getItem("debug");
4265
+ d = e.storage.getItem("debug");
4211
4266
  } catch {
4212
4267
  }
4213
- return !p && typeof _.process < "u" && "env" in _.process && (p = _.process.env.DEBUG), p;
4268
+ return !d && typeof T.process < "u" && "env" in T.process && (d = T.process.env.DEBUG), d;
4214
4269
  }
4215
4270
  function l() {
4216
4271
  try {
@@ -4218,38 +4273,38 @@ var Ns = Rs;
4218
4273
  } catch {
4219
4274
  }
4220
4275
  }
4221
- t.exports = Ns(e);
4276
+ t.exports = $s(e);
4222
4277
  const { formatters: f } = t.exports;
4223
- f.j = function(p) {
4278
+ f.j = function(d) {
4224
4279
  try {
4225
- return JSON.stringify(p);
4280
+ return JSON.stringify(d);
4226
4281
  } catch (A) {
4227
4282
  return "[UnexpectedJSONParseError]: " + A.message;
4228
4283
  }
4229
4284
  };
4230
- })(sr, sr.exports);
4231
- var Rn = sr.exports;
4232
- const Us = sn, Ls = yn.EventEmitter, $s = Bt.inherits, W = Rn("avvio"), { AVV_ERR_READY_TIMEOUT: Ds } = Pn, Qt = Symbol.for("plugin-meta");
4233
- function js(t, e) {
4234
- return t[Qt] && t[Qt].name ? t[Qt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4285
+ })(ur, ur.exports);
4286
+ var Nn = ur.exports;
4287
+ const Ds = an, js = gn.EventEmitter, Ms = Ot.inherits, W = Nn("avvio"), { AVV_ERR_READY_TIMEOUT: Vs } = Rn, Kt = Symbol.for("plugin-meta");
4288
+ function qs(t, e) {
4289
+ return t[Kt] && t[Kt].name ? t[Kt].name : typeof e < "u" && typeof e != "function" && e.name ? e.name : t.name ? t.name : t.toString().split(`
4235
4290
  `).slice(0, 2).map((r) => r.trim()).join(" -- ");
4236
4291
  }
4237
- function Ms() {
4292
+ function Gs() {
4238
4293
  const t = {};
4239
4294
  return t.promise = new Promise((e, r) => {
4240
4295
  t.resolve = e, t.reject = r;
4241
4296
  }), t;
4242
4297
  }
4243
- function Ze(t, e, r, o, s) {
4244
- this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = js(e, r), this.isAfter = o, this.q = Us(t, Vs, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4298
+ function et(t, e, r, o, s) {
4299
+ this.started = !1, this.func = e, this.opts = r, this.onFinish = null, this.parent = t, this.timeout = s === void 0 ? t._timeout : s, this.name = qs(e, r), this.isAfter = o, this.q = Ds(t, Qs, 1), this.q.pause(), this._error = null, this.loaded = !1, this._promise = null;
4245
4300
  }
4246
- $s(Ze, Ls);
4247
- Ze.prototype.exec = function(t, e) {
4301
+ Ms(et, js);
4302
+ et.prototype.exec = function(t, e) {
4248
4303
  const r = this.func;
4249
4304
  let o = !1;
4250
4305
  const s = this.name;
4251
4306
  if (this.parent._error && !this.isAfter) {
4252
- W("skipping loading of plugin as parent errored and it is not an after", s), _.process.nextTick(e);
4307
+ W("skipping loading of plugin as parent errored and it is not an after", s), T.process.nextTick(e);
4253
4308
  return;
4254
4309
  }
4255
4310
  if (this.isAfter)
@@ -4257,44 +4312,44 @@ Ze.prototype.exec = function(t, e) {
4257
4312
  else
4258
4313
  try {
4259
4314
  this.server = this.parent.override(t, r, this.opts);
4260
- } catch (p) {
4261
- return W("override errored", s), e(p);
4315
+ } catch (d) {
4316
+ return W("override errored", s), e(d);
4262
4317
  }
4263
4318
  this.opts = typeof this.opts == "function" ? this.opts(this.server) : this.opts, W("exec", s);
4264
4319
  let u;
4265
- const l = (p) => {
4320
+ const l = (d) => {
4266
4321
  if (o) {
4267
4322
  W("loading complete", s);
4268
4323
  return;
4269
4324
  }
4270
- this._error = p, W(p ? "exec errored" : "exec completed", s), o = !0, u && clearTimeout(u), e(p);
4325
+ this._error = d, W(d ? "exec errored" : "exec completed", s), o = !0, u && clearTimeout(u), e(d);
4271
4326
  };
4272
4327
  this.timeout > 0 && (W("setting up timeout", s, this.timeout), u = setTimeout(function() {
4273
4328
  W("timed out", s), u = null;
4274
- const p = new Ds(s);
4275
- p.fn = r, l(p);
4329
+ const d = new Vs(s);
4330
+ d.fn = r, l(d);
4276
4331
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4277
4332
  const f = r(this.server, this.opts, l);
4278
4333
  f && typeof f.then == "function" && (W("exec: resolving promise", s), f.then(
4279
- () => _.process.nextTick(l),
4280
- (p) => _.process.nextTick(l, p)
4334
+ () => T.process.nextTick(l),
4335
+ (d) => T.process.nextTick(l, d)
4281
4336
  ));
4282
4337
  };
4283
- Ze.prototype.loadedSoFar = function() {
4338
+ et.prototype.loadedSoFar = function() {
4284
4339
  if (this.loaded)
4285
4340
  return Promise.resolve();
4286
4341
  const t = () => {
4287
4342
  this.server.after((r, o) => {
4288
- this._error = r, this.q.pause(), r ? (W("rejecting promise", this.name, r), this._promise.reject(r)) : (W("resolving promise", this.name), this._promise.resolve()), this._promise = null, _.process.nextTick(o, r);
4343
+ this._error = r, this.q.pause(), r ? (W("rejecting promise", this.name, r), this._promise.reject(r)) : (W("resolving promise", this.name), this._promise.resolve()), this._promise = null, T.process.nextTick(o, r);
4289
4344
  }), this.q.resume();
4290
4345
  };
4291
4346
  let e;
4292
- return this._promise ? e = Promise.resolve() : (this._promise = Ms(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4347
+ return this._promise ? e = Promise.resolve() : (this._promise = Gs(), e = this._promise.promise, this.server ? t() : this.on("start", t)), e;
4293
4348
  };
4294
- Ze.prototype.enqueue = function(t, e) {
4349
+ et.prototype.enqueue = function(t, e) {
4295
4350
  W("enqueue", this.name, t.name), this.emit("enqueue", this.server ? this.server.name : null, this.name, Date.now()), this.q.push(t, e);
4296
4351
  };
4297
- Ze.prototype.finish = function(t, e) {
4352
+ et.prototype.finish = function(t, e) {
4298
4353
  W("finish", this.name, t);
4299
4354
  const r = () => {
4300
4355
  this.loaded || (W("loaded", this.name), this.emit("loaded", this.server ? this.server.name : null, this.name, Date.now()), this.loaded = !0, e(t));
@@ -4314,19 +4369,19 @@ Ze.prototype.finish = function(t, e) {
4314
4369
  r();
4315
4370
  else
4316
4371
  W("delayed", this.name), this.q.drain = () => {
4317
- W("drain", this.name), this.q.drain = qs, queueMicrotask(o);
4372
+ W("drain", this.name), this.q.drain = zs, queueMicrotask(o);
4318
4373
  };
4319
4374
  };
4320
4375
  queueMicrotask(o), this.q.resume();
4321
4376
  };
4322
- function Vs(t, e) {
4377
+ function Qs(t, e) {
4323
4378
  const r = this;
4324
- _.process.nextTick(Sr.bind(r), t, e);
4379
+ T.process.nextTick(Er.bind(r), t, e);
4325
4380
  }
4326
- function Sr(t, e) {
4381
+ function Er(t, e) {
4327
4382
  if (typeof t.func.then == "function") {
4328
4383
  t.func.then((o) => {
4329
- typeof o.default == "function" && (o = o.default), t.func = o, Sr.call(this, t, e);
4384
+ typeof o.default == "function" && (o = o.default), t.func = o, Er.call(this, t, e);
4330
4385
  }, e);
4331
4386
  return;
4332
4387
  }
@@ -4337,60 +4392,60 @@ function Sr(t, e) {
4337
4392
  });
4338
4393
  });
4339
4394
  }
4340
- function qs() {
4395
+ function zs() {
4341
4396
  }
4342
- vr.exports = Ze;
4343
- vr.exports.loadPlugin = Sr;
4344
- var Gs = vr.exports;
4345
- const Vr = sn, Qs = yn.EventEmitter, zs = Bt.inherits, {
4346
- AVV_ERR_EXPOSE_ALREADY_DEFINED: zt,
4347
- AVV_ERR_CALLBACK_NOT_FN: at,
4348
- AVV_ERR_PLUGIN_NOT_VALID: Hs,
4349
- AVV_ERR_ROOT_PLG_BOOTED: Ks,
4350
- AVV_ERR_READY_TIMEOUT: Ws
4351
- } = Pn, Js = ks, ar = Gs, Ye = Rn("avvio"), Et = Symbol("kAvvio"), Ht = Symbol("kThenifyDoNotWrap");
4352
- function Ys(t, e, r) {
4353
- const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose", p = o.close || "close";
4397
+ Ar.exports = et;
4398
+ Ar.exports.loadPlugin = Er;
4399
+ var Ks = Ar.exports;
4400
+ const Gr = an, Hs = gn.EventEmitter, Ws = Ot.inherits, {
4401
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: Ht,
4402
+ AVV_ERR_CALLBACK_NOT_FN: ut,
4403
+ AVV_ERR_PLUGIN_NOT_VALID: Js,
4404
+ AVV_ERR_ROOT_PLG_BOOTED: Ys,
4405
+ AVV_ERR_READY_TIMEOUT: Xs
4406
+ } = Rn, Zs = Ns, cr = Ks, Xe = Nn("avvio"), It = Symbol("kAvvio"), Wt = Symbol("kThenifyDoNotWrap");
4407
+ function ea(t, e, r) {
4408
+ const o = e.expose || {}, s = o.use || "use", u = o.after || "after", l = o.ready || "ready", f = o.onClose || "onClose", d = o.close || "close";
4354
4409
  if (t[s])
4355
- throw new zt(s);
4410
+ throw new Ht(s);
4356
4411
  if (t[u])
4357
- throw new zt(u);
4412
+ throw new Ht(u);
4358
4413
  if (t[l])
4359
- throw new zt(l);
4414
+ throw new Ht(l);
4360
4415
  t[s] = function(A, g) {
4361
4416
  return r.use(A, g), this;
4362
- }, Object.defineProperty(t, "then", { get: Nn.bind(r) }), t[Et] = !0, t[u] = function(A) {
4363
- return typeof A != "function" ? r._loadRegistered() : (r.after(Kt(A, this)), this);
4417
+ }, Object.defineProperty(t, "then", { get: Ln.bind(r) }), t[It] = !0, t[u] = function(A) {
4418
+ return typeof A != "function" ? r._loadRegistered() : (r.after(Jt(A, this)), this);
4364
4419
  }, t[l] = function(A) {
4365
4420
  if (A && typeof A != "function")
4366
- throw new at(l, typeof A);
4367
- return r.ready(A ? Kt(A, this) : void 0);
4421
+ throw new ut(l, typeof A);
4422
+ return r.ready(A ? Jt(A, this) : void 0);
4368
4423
  }, t[f] = function(A) {
4369
4424
  if (typeof A != "function")
4370
- throw new at(f, typeof A);
4371
- return r.onClose(ra(A, this)), this;
4372
- }, t[p] = function(A) {
4425
+ throw new ut(f, typeof A);
4426
+ return r.onClose(oa(A, this)), this;
4427
+ }, t[d] = function(A) {
4373
4428
  if (A && typeof A != "function")
4374
- throw new at(p, typeof A);
4375
- return A ? (r.close(Kt(A, this)), this) : r.close();
4429
+ throw new ut(d, typeof A);
4430
+ return A ? (r.close(Jt(A, this)), this) : r.close();
4376
4431
  };
4377
4432
  }
4378
4433
  function J(t, e, r) {
4379
4434
  if (typeof t == "function" && arguments.length === 1 && (r = t, e = {}, t = null), typeof e == "function" && (r = e, e = {}), e = e || {}, !(this instanceof J)) {
4380
4435
  const o = new J(t, e, r);
4381
- return t && Ys(t, e, o), o;
4436
+ return t && ea(t, e, o), o;
4382
4437
  }
4383
- 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 Js(), this._readyQ = Vr(this, Un, 1), this._readyQ.pause(), this._readyQ.drain = () => {
4384
- this.emit("start"), this._readyQ.drain = qr;
4385
- }, this._closeQ = Vr(this, ta, 1), this._closeQ.pause(), this._closeQ.drain = () => {
4386
- this.emit("close"), this._closeQ.drain = qr;
4387
- }, this._doStart = null, this._root = new ar(this, Xs.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
4438
+ 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 Zs(), this._readyQ = Gr(this, Un, 1), this._readyQ.pause(), this._readyQ.drain = () => {
4439
+ this.emit("start"), this._readyQ.drain = Qr;
4440
+ }, this._closeQ = Gr(this, ia, 1), this._closeQ.pause(), this._closeQ.drain = () => {
4441
+ this.emit("close"), this._closeQ.drain = Qr;
4442
+ }, this._doStart = null, this._root = new cr(this, ta.bind(this), e, !1, 0), this._root.once("start", (o, s, u) => {
4388
4443
  const l = this.pluginTree.start(null, s, u);
4389
- this._root.once("loaded", (f, p, A) => {
4444
+ this._root.once("loaded", (f, d, A) => {
4390
4445
  this.pluginTree.stop(l, A);
4391
4446
  });
4392
- }), ar.loadPlugin.call(this, this._root, (o) => {
4393
- Ye("root plugin ready");
4447
+ }), cr.loadPlugin.call(this, this._root, (o) => {
4448
+ Xe("root plugin ready");
4394
4449
  try {
4395
4450
  this.emit("preReady"), this._root = null;
4396
4451
  } catch (s) {
@@ -4404,38 +4459,38 @@ function J(t, e, r) {
4404
4459
  this._readyQ.resume();
4405
4460
  });
4406
4461
  }
4407
- function Xs(t, e, r) {
4462
+ function ta(t, e, r) {
4408
4463
  this._doStart = r, e.autostart && this.start();
4409
4464
  }
4410
- zs(J, Qs);
4465
+ Ws(J, Hs);
4411
4466
  J.prototype.start = function() {
4412
- return this.started = !0, _.process.nextTick(this._doStart), this;
4467
+ return this.started = !0, T.process.nextTick(this._doStart), this;
4413
4468
  };
4414
4469
  J.prototype.override = function(t, e, r) {
4415
4470
  return t;
4416
4471
  };
4417
- function Zs(t) {
4472
+ function ra(t) {
4418
4473
  if (t && typeof t == "object" && typeof t.default == "function" && (t = t.default), !(t && (typeof t == "function" || typeof t.then == "function")))
4419
- throw new Hs(typeof t);
4474
+ throw new Js(typeof t);
4420
4475
  return t;
4421
4476
  }
4422
- J.prototype[Et] = !0;
4477
+ J.prototype[It] = !0;
4423
4478
  J.prototype.use = function(t, e) {
4424
4479
  return this._lastUsed = this._addPlugin(t, e, !1), this;
4425
4480
  };
4426
4481
  J.prototype._loadRegistered = function() {
4427
4482
  const t = this._current[0];
4428
- return !this.started && !this.booted && _.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4483
+ return !this.started && !this.booted && T.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4429
4484
  };
4430
- Object.defineProperty(J.prototype, "then", { get: Nn });
4485
+ Object.defineProperty(J.prototype, "then", { get: Ln });
4431
4486
  J.prototype._addPlugin = function(t, e, r) {
4432
- if (t = Zs(t), e = e || {}, this.booted)
4433
- throw new Ks();
4434
- const o = this._current[0], s = new ar(this, t, e, r);
4487
+ if (t = ra(t), e = e || {}, this.booted)
4488
+ throw new Ys();
4489
+ const o = this._current[0], s = new cr(this, t, e, r);
4435
4490
  if (s.once("start", (u, l, f) => {
4436
- const p = this.pluginTree.start(o.name, l, f);
4437
- s.once("loaded", (A, g, w) => {
4438
- this.pluginTree.stop(p, w);
4491
+ const d = this.pluginTree.start(o.name, l, f);
4492
+ s.once("loaded", (A, g, v) => {
4493
+ this.pluginTree.stop(d, v);
4439
4494
  });
4440
4495
  }), o.loaded)
4441
4496
  throw new Error(s.name, o.name);
@@ -4465,7 +4520,7 @@ J.prototype.close = function(t) {
4465
4520
  let e;
4466
4521
  if (t) {
4467
4522
  if (typeof t != "function")
4468
- throw new at("close", typeof t);
4523
+ throw new ut("close", typeof t);
4469
4524
  } else
4470
4525
  e = new Promise(function(r, o) {
4471
4526
  t = function(s) {
@@ -4475,13 +4530,13 @@ J.prototype.close = function(t) {
4475
4530
  };
4476
4531
  });
4477
4532
  return this.ready(() => {
4478
- this._error = null, this._closeQ.push(t), _.process.nextTick(this._closeQ.resume.bind(this._closeQ));
4533
+ this._error = null, this._closeQ.push(t), T.process.nextTick(this._closeQ.resume.bind(this._closeQ));
4479
4534
  }), e;
4480
4535
  };
4481
4536
  J.prototype.ready = function(t) {
4482
4537
  if (t) {
4483
4538
  if (typeof t != "function")
4484
- throw new at("ready", typeof t);
4539
+ throw new ut("ready", typeof t);
4485
4540
  this._readyQ.push(t), queueMicrotask(this.start.bind(this));
4486
4541
  return;
4487
4542
  }
@@ -4489,7 +4544,7 @@ J.prototype.ready = function(t) {
4489
4544
  this._readyQ.push(s), this.start();
4490
4545
  const o = this._current[0].server;
4491
4546
  function s(u, l, f) {
4492
- u ? r(u) : e(o), _.process.nextTick(f);
4547
+ u ? r(u) : e(o), T.process.nextTick(f);
4493
4548
  }
4494
4549
  });
4495
4550
  };
@@ -4499,40 +4554,40 @@ J.prototype.prettyPrint = function() {
4499
4554
  J.prototype.toJSON = function() {
4500
4555
  return this.pluginTree.toJSON();
4501
4556
  };
4502
- function qr() {
4557
+ function Qr() {
4503
4558
  }
4504
- function Nn() {
4559
+ function Ln() {
4505
4560
  if (this.booted) {
4506
- Ye("thenify returning null because we are already booted");
4561
+ Xe("thenify returning null because we are already booted");
4507
4562
  return;
4508
4563
  }
4509
- if (this[Ht]) {
4510
- this[Ht] = !1;
4564
+ if (this[Wt]) {
4565
+ this[Wt] = !1;
4511
4566
  return;
4512
4567
  }
4513
- return Ye("thenify"), (t, e) => this._loadRegistered().then(() => (this[Ht] = !0, t(this._server)), e);
4568
+ return Xe("thenify"), (t, e) => this._loadRegistered().then(() => (this[Wt] = !0, t(this._server)), e);
4514
4569
  }
4515
4570
  function Un(t, e) {
4516
4571
  const r = this._server, o = this._error;
4517
4572
  let s;
4518
4573
  if (this._error = null, t.length === 0)
4519
- this._error = o, s = t(), s && !s[Et] && typeof s.then == "function" ? s.then(() => _.process.nextTick(e), (u) => _.process.nextTick(e, u)) : _.process.nextTick(e);
4574
+ this._error = o, s = t(), s && !s[It] && typeof s.then == "function" ? s.then(() => T.process.nextTick(e), (u) => T.process.nextTick(e, u)) : T.process.nextTick(e);
4520
4575
  else if (t.length === 1)
4521
- s = t(o), s && !s[Et] && typeof s.then == "function" ? s.then(() => _.process.nextTick(e), (u) => _.process.nextTick(e, u)) : _.process.nextTick(e);
4576
+ s = t(o), s && !s[It] && typeof s.then == "function" ? s.then(() => T.process.nextTick(e), (u) => T.process.nextTick(e, u)) : T.process.nextTick(e);
4522
4577
  else if (this._timeout === 0) {
4523
4578
  const u = (l) => {
4524
4579
  this._error = l, e(this._error);
4525
4580
  };
4526
4581
  t.length === 2 ? t(o, u) : t(o, r, u);
4527
4582
  } else
4528
- ea.call(this, t, o, r, e);
4583
+ na.call(this, t, o, r, e);
4529
4584
  }
4530
- function ea(t, e, r, o) {
4585
+ function na(t, e, r, o) {
4531
4586
  const s = t.name;
4532
- Ye("setting up ready timeout", s, this._timeout);
4587
+ Xe("setting up ready timeout", s, this._timeout);
4533
4588
  let u = setTimeout(() => {
4534
- Ye("timed out", s), u = null;
4535
- const f = new Ws(s);
4589
+ Xe("timed out", s), u = null;
4590
+ const f = new Xs(s);
4536
4591
  f.fn = t, this._error = f, o(f);
4537
4592
  }, this._timeout);
4538
4593
  t.length === 2 ? t(e, l.bind(this)) : t(e, r, l.bind(this));
@@ -4540,52 +4595,52 @@ function ea(t, e, r, o) {
4540
4595
  u && (clearTimeout(u), this._error = f, o(this._error));
4541
4596
  }
4542
4597
  }
4543
- function ta(t, e) {
4598
+ function ia(t, e) {
4544
4599
  const r = this._server, o = t[this._isOnCloseHandlerKey];
4545
4600
  if (t.length === 0 || t.length === 1) {
4546
4601
  let s;
4547
- o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (Ye("resolving close/onClose promise"), s.then(
4548
- () => _.process.nextTick(e),
4549
- (u) => _.process.nextTick(e, u)
4550
- )) : _.process.nextTick(e);
4602
+ o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (Xe("resolving close/onClose promise"), s.then(
4603
+ () => T.process.nextTick(e),
4604
+ (u) => T.process.nextTick(e, u)
4605
+ )) : T.process.nextTick(e);
4551
4606
  } else
4552
4607
  t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
4553
4608
  }
4554
- function ra(t, e) {
4609
+ function oa(t, e) {
4555
4610
  return r.bind(e);
4556
4611
  function r(o, s) {
4557
4612
  let u;
4558
4613
  t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
4559
- _.process.nextTick(s);
4560
- }, s) : _.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
4561
- _.process.nextTick(s);
4562
- }, s) : _.process.nextTick(s)) : t(this, s);
4614
+ T.process.nextTick(s);
4615
+ }, s) : T.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
4616
+ T.process.nextTick(s);
4617
+ }, s) : T.process.nextTick(s)) : t(this, s);
4563
4618
  }
4564
4619
  }
4565
- function Kt(t, e) {
4620
+ function Jt(t, e) {
4566
4621
  return r.bind(e);
4567
4622
  function r(o, s) {
4568
4623
  let u;
4569
4624
  t ? t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
4570
- _.process.nextTick(s, o);
4571
- }, s) : _.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
4572
- _.process.nextTick(s);
4573
- }, s) : _.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : _.process.nextTick(s);
4625
+ T.process.nextTick(s, o);
4626
+ }, s) : T.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
4627
+ T.process.nextTick(s);
4628
+ }, s) : T.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : T.process.nextTick(s);
4574
4629
  }
4575
4630
  }
4576
- hr.exports = J;
4577
- hr.exports.express = function(t) {
4631
+ dr.exports = J;
4632
+ dr.exports.express = function(t) {
4578
4633
  return J(t, {
4579
4634
  expose: {
4580
4635
  use: "load"
4581
4636
  }
4582
4637
  });
4583
4638
  };
4584
- var na = hr.exports;
4585
- const ia = /* @__PURE__ */ Hn(na);
4586
- function Aa(t, e = !0, r = !0) {
4587
- const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = ia(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4588
- return s.use(Fi), s.use(wi, { sdkKey: t, host: o }), s.use(Ii), s.use(Ei), s.use(Ji), s.use(Mi), r && s.after(async (u, l, f) => {
4639
+ var sa = dr.exports;
4640
+ const aa = /* @__PURE__ */ Hn(sa);
4641
+ function Fa(t, e = !0, r = !0) {
4642
+ const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = aa(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4643
+ return s.use(_i), s.use(vi, { sdkKey: t, host: o }), s.use(Ci), s.use(Ti), s.use(Zi), s.use(Gi), r && s.after(async (u, l, f) => {
4589
4644
  if (u)
4590
4645
  throw u;
4591
4646
  await l.sdk.initializeApp(), f();
@@ -4594,5 +4649,5 @@ function Aa(t, e = !0, r = !0) {
4594
4649
  }), s;
4595
4650
  }
4596
4651
  export {
4597
- Aa as StreamLayer
4652
+ Fa as StreamLayer
4598
4653
  };