@streamlayer/sdk-web 0.28.27 → 0.28.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/es/index.js CHANGED
@@ -18,13 +18,13 @@ var Yr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
18
18
  function Yn(t) {
19
19
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
20
20
  }
21
- var O = {}, Xr = {}, Ot = {};
21
+ var C = {}, Xr = {}, Ot = {};
22
22
  Ot.byteLength = ei;
23
23
  Ot.toByteArray = ri;
24
24
  Ot.fromByteArray = oi;
25
- var we = [], se = [], Xn = typeof Uint8Array < "u" ? Uint8Array : Array, Lt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
26
- for (var qe = 0, Zn = Lt.length; qe < Zn; ++qe)
27
- we[qe] = Lt[qe], se[Lt.charCodeAt(qe)] = qe;
25
+ var we = [], se = [], Xn = typeof Uint8Array < "u" ? Uint8Array : Array, Nt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
26
+ for (var qe = 0, Zn = Nt.length; qe < Zn; ++qe)
27
+ we[qe] = Nt[qe], se[Nt.charCodeAt(qe)] = qe;
28
28
  se["-".charCodeAt(0)] = 62;
29
29
  se["_".charCodeAt(0)] = 63;
30
30
  function Zr(t) {
@@ -84,12 +84,12 @@ fr.read = function(t, e, r, o, s) {
84
84
  return (F ? -1 : 1) * l * Math.pow(2, u - o);
85
85
  };
86
86
  fr.write = function(t, e, r, o, s, u) {
87
- var l, f, p, w = u * 8 - s - 1, g = (1 << w) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = o ? 0 : u - 1, N = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
88
- for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + m >= 1 ? e += E / p : e += E * Math.pow(2, 1 - m), e * p >= 2 && (l++, p /= 2), l + m >= g ? (f = 0, l = g) : l + m >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + m) : (f = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + F] = f & 255, F += N, f /= 256, s -= 8)
87
+ var l, f, p, w = u * 8 - s - 1, g = (1 << w) - 1, m = g >> 1, E = s === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, F = o ? 0 : u - 1, L = o ? 1 : -1, P = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
88
+ for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (f = isNaN(e) ? 1 : 0, l = g) : (l = Math.floor(Math.log(e) / Math.LN2), e * (p = Math.pow(2, -l)) < 1 && (l--, p *= 2), l + m >= 1 ? e += E / p : e += E * Math.pow(2, 1 - m), e * p >= 2 && (l++, p /= 2), l + m >= g ? (f = 0, l = g) : l + m >= 1 ? (f = (e * p - 1) * Math.pow(2, s), l = l + m) : (f = e * Math.pow(2, m - 1) * Math.pow(2, s), l = 0)); s >= 8; t[r + F] = f & 255, F += L, f /= 256, s -= 8)
89
89
  ;
90
- for (l = l << s | f, w += s; w > 0; t[r + F] = l & 255, F += N, l /= 256, w -= 8)
90
+ for (l = l << s | f, w += s; w > 0; t[r + F] = l & 255, F += L, l /= 256, w -= 8)
91
91
  ;
92
- t[r + F - N] |= P * 128;
92
+ t[r + F - L] |= P * 128;
93
93
  };
94
94
  /*!
95
95
  * The buffer module from node.js, for the browser.
@@ -148,7 +148,7 @@ fr.write = function(t, e, r, o, s, u) {
148
148
  if (typeof a == "string")
149
149
  return E(a, n);
150
150
  if (ArrayBuffer.isView(a))
151
- return N(a);
151
+ return L(a);
152
152
  if (a == null)
153
153
  throw new TypeError(
154
154
  "The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof a
@@ -208,7 +208,7 @@ fr.write = function(t, e, r, o, s, u) {
208
208
  i[c] = a[c] & 255;
209
209
  return i;
210
210
  }
211
- function N(a) {
211
+ function L(a) {
212
212
  if (ge(a, Uint8Array)) {
213
213
  const n = new Uint8Array(a);
214
214
  return P(n.buffer, n.byteOffset, n.byteLength);
@@ -229,7 +229,7 @@ fr.write = function(t, e, r, o, s, u) {
229
229
  return i.length === 0 || a.copy(i, 0, 0, n), i;
230
230
  }
231
231
  if (a.length !== void 0)
232
- return typeof a.length != "number" || Nt(a.length) ? l(0) : F(a);
232
+ return typeof a.length != "number" || Lt(a.length) ? l(0) : F(a);
233
233
  if (a.type === "Buffer" && Array.isArray(a.data))
234
234
  return F(a.data);
235
235
  }
@@ -432,7 +432,7 @@ fr.write = function(t, e, r, o, s, u) {
432
432
  function x(a, n, i, c, h) {
433
433
  if (a.length === 0)
434
434
  return -1;
435
- if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Nt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
435
+ if (typeof i == "string" ? (c = i, i = 0) : i > 2147483647 ? i = 2147483647 : i < -2147483648 && (i = -2147483648), i = +i, Lt(i) && (i = h ? 0 : a.length - 1), i < 0 && (i = a.length + i), i >= a.length) {
436
436
  if (h)
437
437
  return -1;
438
438
  i = a.length - 1;
@@ -495,7 +495,7 @@ fr.write = function(t, e, r, o, s, u) {
495
495
  let b;
496
496
  for (b = 0; b < c; ++b) {
497
497
  const R = parseInt(n.substr(b * 2, 2), 16);
498
- if (Nt(R))
498
+ if (Lt(R))
499
499
  return b;
500
500
  a[i + b] = R;
501
501
  }
@@ -812,14 +812,14 @@ fr.write = function(t, e, r, o, s, u) {
812
812
  }), f.prototype.writeBigInt64BE = Re(function(n, i = 0) {
813
813
  return A(this, n, i, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
814
814
  });
815
- function C(a, n, i, c, h, y) {
815
+ function O(a, n, i, c, h, y) {
816
816
  if (i + c > a.length)
817
817
  throw new RangeError("Index out of range");
818
818
  if (i < 0)
819
819
  throw new RangeError("Index out of range");
820
820
  }
821
821
  function j(a, n, i, c, h) {
822
- return n = +n, i = i >>> 0, h || C(a, n, i, 4), r.write(a, n, i, c, 23, 4), i + 4;
822
+ return n = +n, i = i >>> 0, h || O(a, n, i, 4), r.write(a, n, i, c, 23, 4), i + 4;
823
823
  }
824
824
  f.prototype.writeFloatLE = function(n, i, c) {
825
825
  return j(this, n, i, !0, c);
@@ -827,7 +827,7 @@ fr.write = function(t, e, r, o, s, u) {
827
827
  return j(this, n, i, !1, c);
828
828
  };
829
829
  function V(a, n, i, c, h) {
830
- return n = +n, i = i >>> 0, h || C(a, n, i, 8), r.write(a, n, i, c, 52, 8), i + 8;
830
+ return n = +n, i = i >>> 0, h || O(a, n, i, 8), r.write(a, n, i, c, 52, 8), i + 8;
831
831
  }
832
832
  f.prototype.writeDoubleLE = function(n, i, c) {
833
833
  return V(this, n, i, !0, c);
@@ -882,7 +882,7 @@ fr.write = function(t, e, r, o, s, u) {
882
882
  return this;
883
883
  };
884
884
  const B = {};
885
- function L(a, n, i) {
885
+ function N(a, n, i) {
886
886
  B[a] = class extends i {
887
887
  constructor() {
888
888
  super(), Object.defineProperty(this, "message", {
@@ -907,19 +907,19 @@ fr.write = function(t, e, r, o, s, u) {
907
907
  }
908
908
  };
909
909
  }
910
- L(
910
+ N(
911
911
  "ERR_BUFFER_OUT_OF_BOUNDS",
912
912
  function(a) {
913
913
  return a ? `${a} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
914
914
  },
915
915
  RangeError
916
- ), L(
916
+ ), N(
917
917
  "ERR_INVALID_ARG_TYPE",
918
918
  function(a, n) {
919
919
  return `The "${a}" argument must be of type number. Received type ${typeof n}`;
920
920
  },
921
921
  TypeError
922
- ), L(
922
+ ), N(
923
923
  "ERR_OUT_OF_RANGE",
924
924
  function(a, n, i) {
925
925
  let c = `The value of "${a}" is out of range.`, h = i;
@@ -1048,7 +1048,7 @@ fr.write = function(t, e, r, o, s, u) {
1048
1048
  function ge(a, n) {
1049
1049
  return a instanceof n || a != null && a.constructor != null && a.constructor.name != null && a.constructor.name === n.name;
1050
1050
  }
1051
- function Nt(a) {
1051
+ function Lt(a) {
1052
1052
  return a !== a;
1053
1053
  }
1054
1054
  const Vn = function() {
@@ -1182,7 +1182,7 @@ var ui = en.exports;
1182
1182
  Object.defineProperty(t, Symbol.toStringTag, { value: "Module" });
1183
1183
  const e = Xr, r = ui, o = (l) => l && l.__esModule ? l : { default: l }, s = o(r), u = globalThis || void 0 || self;
1184
1184
  Object.defineProperty(t, "Buffer", { enumerable: !0, get: () => e.Buffer }), Object.defineProperty(t, "process", { enumerable: !0, get: () => s.default }), t.global = u;
1185
- })(O);
1185
+ })(C);
1186
1186
  class ci {
1187
1187
  }
1188
1188
  window.slStore = /* @__PURE__ */ Object.create(null);
@@ -1453,7 +1453,7 @@ class yi {
1453
1453
  subscriptions;
1454
1454
  constructor(e) {
1455
1455
  this.host = e, this.$headers = new at($e({
1456
- "sl-device-id": O.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
1456
+ "sl-device-id": C.process?.env?.NX_DEVICE_ID || "sdk-web-dev"
1457
1457
  }), "transport:headers"), this.initInterceptors(), this.clients = /* @__PURE__ */ new Map(), this.callbackClients = /* @__PURE__ */ new Map(), this.subscriptions = /* @__PURE__ */ new Map();
1458
1458
  const [r, o, s] = Hn();
1459
1459
  this.nanoquery = { createFetcherStore: r, createMutatorStore: o, utils: s }, this.transport = Kn({
@@ -1756,7 +1756,7 @@ class Ci extends ci {
1756
1756
  const e = new Ke(), r = e.getToken(), o = e.getExternalToken();
1757
1757
  if (this.$coreStore.getValues().userKey.setValue(o), r)
1758
1758
  return this.saveUser(r, ""), this.me().then((s) => {
1759
- if (console.log("user", s), s?.id) {
1759
+ if (s?.id) {
1760
1760
  const u = s.id;
1761
1761
  this.saveUser(r, u);
1762
1762
  }
@@ -1822,7 +1822,13 @@ const st = new Ke(), Oi = (t, e, r) => {
1822
1822
  t.stores.providerStreamId.setValue(o);
1823
1823
  }, r();
1824
1824
  }, ki = Jn({
1825
- level: "trace"
1825
+ level: "trace",
1826
+ enabled: C.process.env.DEBUG === '"SL"',
1827
+ browser: {
1828
+ write: (t) => {
1829
+ console.log(t);
1830
+ }
1831
+ }
1826
1832
  }), on = (t, e) => ki.child({ name: t }, e), Pi = (t, e, r) => {
1827
1833
  const { client: o, queryKey: s } = r.createPromiseClient(Jr, {
1828
1834
  method: "summary",
@@ -1837,14 +1843,14 @@ const st = new Ke(), Oi = (t, e, r) => {
1837
1843
  }, Ri = (t) => {
1838
1844
  const { client: e } = t.createPromiseClient(Jr, { method: "list" });
1839
1845
  return (r) => e.list(r);
1840
- }, Ni = (t, e) => {
1846
+ }, Li = (t, e) => {
1841
1847
  const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "get", params: [t] });
1842
1848
  return e.nanoquery.createFetcherStore(o, {
1843
1849
  fetcher: async (s, u, l) => (await r.get({
1844
1850
  eventId: l
1845
1851
  })).data?.attributes
1846
1852
  });
1847
- }, Li = (t, e) => {
1853
+ }, Ni = (t, e) => {
1848
1854
  const { client: r, queryKey: o } = e.createPromiseClient(ve, { method: "syncQuestion", params: [t] });
1849
1855
  return e.nanoquery.createFetcherStore(o, {
1850
1856
  fetcher: async (s, u, l) => l ? (await r.syncQuestion({
@@ -1928,11 +1934,11 @@ function dr(t) {
1928
1934
  function g(I) {
1929
1935
  return typeof I != "object" || I === null;
1930
1936
  }
1931
- const m = typeof O.Buffer < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof O.Buffer : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: P, getKeys: f, isMergeableObject: w }) : s;
1937
+ const m = typeof C.Buffer < "u" ? (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date || I instanceof C.Buffer : (I) => typeof I != "object" || I === null || I instanceof RegExp || I instanceof Date, E = t && typeof t.mergeArray == "function" ? t.mergeArray({ clone: F, deepmerge: P, getKeys: f, isMergeableObject: w }) : s;
1932
1938
  function F(I) {
1933
1939
  return w(I) ? Array.isArray(I) ? r(I) : o(I) : I;
1934
1940
  }
1935
- function N(I, _) {
1941
+ function L(I, _) {
1936
1942
  const D = {}, U = f(I), T = f(_);
1937
1943
  let x, k, G;
1938
1944
  for (x = 0, k = U.length; x < k; ++x)
@@ -1944,7 +1950,7 @@ function dr(t) {
1944
1950
  }
1945
1951
  function P(I, _) {
1946
1952
  const D = Array.isArray(_), U = Array.isArray(I);
1947
- return g(_) ? _ : m(I) ? F(_) : D && U ? E(I, _) : D !== U ? F(_) : N(I, _);
1953
+ return g(_) ? _ : m(I) ? F(_) : D && U ? E(I, _) : D !== U ? F(_) : L(I, _);
1948
1954
  }
1949
1955
  function K() {
1950
1956
  switch (arguments.length) {
@@ -2023,7 +2029,7 @@ class zi {
2023
2029
  constructor(e) {
2024
2030
  if (e.gamification)
2025
2031
  throw new Error("GamificationBackground Singleton error");
2026
- this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe(Ni(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Di(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Li(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Gi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
2032
+ this.log = on("gamification-background"), this.slStreamId = e.stores.slStreamId.getAtomStore(), this.organizationId = e.stores.organizationSettings.getAtomStore(), this.userId = e.stores.user.getAtomStore(), this.moderationId = new de(ne(void 0), "moderationId").getStore(), this.openedQuestionId = new de(ne(void 0), "openedQuestionId").getStore(), this.notifications = e.notifications, this.moderation = new pe(Li(this.slStreamId, e.transport), "gamification:moderation"), this.feedList = new pe(Di(this.slStreamId, e.transport), "gamification:feedList"), this.activeQuestionId = new pe(Ni(this.slStreamId, e.transport), "gamification:activeQuestionId"), this.openedQuestion = Gi(e.transport, this.openedQuestionId, this.feedList.getStore()), this.openedQuestionId.listen((r) => {
2027
2033
  this.log.debug({ questionId: r }, "received question"), r ? (this.questionSubscription = $i(r, e.transport), this.questionSubscription.addListener("feed-subscription-opened-question", (o) => {
2028
2034
  window.requestAnimationFrame(() => {
2029
2035
  this.openedQuestion.updateExtendedQuestion(o.data?.attributes?.question);
@@ -2122,7 +2128,7 @@ class Ki {
2122
2128
  closeNotification = (e) => {
2123
2129
  const r = new Map(this.notifications.getValue()), o = r.get(e);
2124
2130
  if (o) {
2125
- o.hiding = !0, this.notifications.setValue(r);
2131
+ o.hiding = !(this.waitingQueue.size >= this.options.concurrency), this.notifications.setValue(r);
2126
2132
  const s = setTimeout(() => {
2127
2133
  const u = new Map(this.notifications.getValue());
2128
2134
  u.delete(e), this.notifications.setValue(u);
@@ -2150,10 +2156,10 @@ class Hi extends hr {
2150
2156
  this.clear();
2151
2157
  };
2152
2158
  }
2153
- var Ne;
2159
+ var Le;
2154
2160
  (function(t) {
2155
2161
  t[t.ONBOARDING = 1] = "ONBOARDING", t[t.QUESTION = 2] = "QUESTION", t[t.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
2156
- })(Ne || (Ne = {}));
2162
+ })(Le || (Le = {}));
2157
2163
  class Wi {
2158
2164
  queue;
2159
2165
  storage;
@@ -2220,9 +2226,9 @@ const Fr = {
2220
2226
  const F = await u({
2221
2227
  eventId: g,
2222
2228
  pagination: w
2223
- }), N = s.get().data || [];
2229
+ }), L = s.get().data || [];
2224
2230
  s.set({
2225
- data: [...N, ...F.data.map((P) => P.attributes)],
2231
+ data: [...L, ...F.data.map((P) => P.attributes)],
2226
2232
  loading: !1
2227
2233
  });
2228
2234
  }
@@ -2247,7 +2253,7 @@ const no = (t, e, r, o) => {
2247
2253
  const s = new un(), u = ne(re.Unset), l = () => {
2248
2254
  const { inplayGame: w } = t.featureSettings.get(), g = e.getCurrentSessionId({ prefix: "onboarding" });
2249
2255
  w && o.add({
2250
- type: Ne.ONBOARDING,
2256
+ type: Le.ONBOARDING,
2251
2257
  id: g,
2252
2258
  action: t.openFeature,
2253
2259
  close: () => {
@@ -2328,7 +2334,7 @@ class oo extends lr {
2328
2334
  if (s && s.data && this.onboardingStatus.$store.get() && s.data.question?.id !== void 0 && s.data.question.notification !== void 0 && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.status === dt.ACTIVE) {
2329
2335
  if (io.has(s.data.question.type))
2330
2336
  this.notifications.add({
2331
- type: Ne.QUESTION,
2337
+ type: Le.QUESTION,
2332
2338
  action: () => s.data?.question && this.openQuestion(s.data.question.id),
2333
2339
  close: () => s.data?.question && this.closeQuestion(s.data.question.id),
2334
2340
  autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
@@ -2356,7 +2362,7 @@ class oo extends lr {
2356
2362
  }
2357
2363
  };
2358
2364
  this.notifications.add({
2359
- type: Ne.QUESTION,
2365
+ type: Le.QUESTION,
2360
2366
  action: () => s.data?.question && this.openQuestion(s.data.question.id),
2361
2367
  close: () => s.data?.question && this.closeQuestion(s.data.question.id),
2362
2368
  autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
@@ -2381,7 +2387,7 @@ class oo extends lr {
2381
2387
  }
2382
2388
  };
2383
2389
  this.notifications.add({
2384
- type: Ne.QUESTION,
2390
+ type: Le.QUESTION,
2385
2391
  action: () => s.data?.question && this.openQuestion(s.data.question.id),
2386
2392
  close: () => s.data?.question && this.closeQuestion(s.data.question.id),
2387
2393
  autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
@@ -2406,8 +2412,10 @@ class oo extends lr {
2406
2412
  const f = this.background.getCurrentSessionId({
2407
2413
  prefix: `notification-id:${l}`
2408
2414
  }), p = await sn(l, e), w = p?.answers.find(({ correct: m }) => m), g = p?.answers.find(({ youVoted: m }) => m);
2415
+ if (!g)
2416
+ return;
2409
2417
  this.notifications.add({
2410
- type: Ne.QUESTION_RESOLVED,
2418
+ type: Le.QUESTION_RESOLVED,
2411
2419
  action: () => this.openQuestion(l),
2412
2420
  close: () => this.closeQuestion(l),
2413
2421
  autoHideDuration: 35e3,
@@ -2466,7 +2474,7 @@ class so extends lr {
2466
2474
  s === De.Ready ? this.connect() : this.disconnect();
2467
2475
  }), this.background.activeQuestionId.listen((s) => {
2468
2476
  s?.data?.question?.id && s?.data?.question?.notification && s.data.moderation?.bypassNotifications?.inAppSilence !== Kr.ON && s.data.question.type === Te.FACTOID && s.data.question.status === dt.ACTIVE && this.notifications.add({
2469
- type: Ne.QUESTION,
2477
+ type: Le.QUESTION,
2470
2478
  action: () => s.data?.question && this.openHighlight(s.data.question.id),
2471
2479
  close: () => s.data?.question && this.closeHighlight(s.data.question.id),
2472
2480
  autoHideDuration: 1e3 * +(s.data.question?.appearance?.autoHideInterval || "5"),
@@ -2583,7 +2591,7 @@ function cn(t, e, r) {
2583
2591
  concurrency: r,
2584
2592
  running: w,
2585
2593
  resume: F,
2586
- idle: N,
2594
+ idle: L,
2587
2595
  length: m,
2588
2596
  getQueue: E,
2589
2597
  unshift: K,
@@ -2616,7 +2624,7 @@ function cn(t, e, r) {
2616
2624
  l++, I();
2617
2625
  }
2618
2626
  }
2619
- function N() {
2627
+ function L() {
2620
2628
  return l === 0 && p.length() === 0;
2621
2629
  }
2622
2630
  function P(T, x) {
@@ -2663,9 +2671,9 @@ function yo(t, e, r) {
2663
2671
  return s.push = f, s.unshift = p, s.drained = w, s;
2664
2672
  function f(g) {
2665
2673
  var m = new Promise(function(E, F) {
2666
- u(g, function(N, P) {
2667
- if (N) {
2668
- F(N);
2674
+ u(g, function(L, P) {
2675
+ if (L) {
2676
+ F(L);
2669
2677
  return;
2670
2678
  }
2671
2679
  E(P);
@@ -2675,9 +2683,9 @@ function yo(t, e, r) {
2675
2683
  }
2676
2684
  function p(g) {
2677
2685
  var m = new Promise(function(E, F) {
2678
- l(g, function(N, P) {
2679
- if (N) {
2680
- F(N);
2686
+ l(g, function(L, P) {
2687
+ if (L) {
2688
+ F(L);
2681
2689
  return;
2682
2690
  }
2683
2691
  E(P);
@@ -2993,7 +3001,7 @@ var wn = mr.exports, kt = {}, vn = {}, Sn = function() {
2993
3001
  w.prototype = r.prototype, s.prototype = new w(), w.prototype = null;
2994
3002
  }
2995
3003
  return s;
2996
- }, Ro = Po, An = Function.prototype.bind || Ro, Br = {}.hasOwnProperty, Ut = Function.prototype.call, No = Ut.bind ? Ut.bind(Br) : function(t, e) {
3004
+ }, Ro = Po, An = Function.prototype.bind || Ro, Br = {}.hasOwnProperty, Ut = Function.prototype.call, Lo = Ut.bind ? Ut.bind(Br) : function(t, e) {
2997
3005
  return Ut.call(Br, t, e);
2998
3006
  }, $, Xe = SyntaxError, En = Function, Ye = TypeError, $t = function(t) {
2999
3007
  try {
@@ -3009,7 +3017,7 @@ if (je)
3009
3017
  }
3010
3018
  var Dt = function() {
3011
3019
  throw new Ye();
3012
- }, Lo = je ? function() {
3020
+ }, No = je ? function() {
3013
3021
  try {
3014
3022
  return arguments.callee, Dt;
3015
3023
  } catch {
@@ -3078,7 +3086,7 @@ var Dt = function() {
3078
3086
  "%StringIteratorPrototype%": Qe && X ? X(""[Symbol.iterator]()) : $,
3079
3087
  "%Symbol%": Qe ? Symbol : $,
3080
3088
  "%SyntaxError%": Xe,
3081
- "%ThrowTypeError%": Lo,
3089
+ "%ThrowTypeError%": No,
3082
3090
  "%TypedArray%": $o,
3083
3091
  "%TypeError%": Ye,
3084
3092
  "%Uint8Array%": typeof Uint8Array > "u" ? $ : Uint8Array,
@@ -3165,7 +3173,7 @@ var jo = function t(e) {
3165
3173
  "%URIErrorPrototype%": ["URIError", "prototype"],
3166
3174
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3167
3175
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3168
- }, lt = An, Et = No, Vo = lt.call(Function.call, Array.prototype.concat), Mo = lt.call(Function.apply, Array.prototype.splice), Pr = lt.call(Function.call, String.prototype.replace), It = lt.call(Function.call, String.prototype.slice), qo = lt.call(Function.call, RegExp.prototype.exec), Qo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Go = /\\(\\)?/g, zo = function(e) {
3176
+ }, lt = An, Et = Lo, Vo = lt.call(Function.call, Array.prototype.concat), Mo = lt.call(Function.apply, Array.prototype.splice), Pr = lt.call(Function.call, String.prototype.replace), It = lt.call(Function.call, String.prototype.slice), qo = lt.call(Function.call, RegExp.prototype.exec), Qo = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Go = /\\(\\)?/g, zo = function(e) {
3169
3177
  var r = It(e, 0, 1), o = It(e, -1);
3170
3178
  if (r === "%" && o !== "%")
3171
3179
  throw new Xe("invalid intrinsic syntax, expected closing `%`");
@@ -3198,8 +3206,8 @@ var jo = function t(e) {
3198
3206
  var o = zo(e), s = o.length > 0 ? o[0] : "", u = Ko("%" + s + "%", r), l = u.name, f = u.value, p = !1, w = u.alias;
3199
3207
  w && (s = w[0], Mo(o, Vo([0, 1], w)));
3200
3208
  for (var g = 1, m = !0; g < o.length; g += 1) {
3201
- var E = o[g], F = It(E, 0, 1), N = It(E, -1);
3202
- if ((F === '"' || F === "'" || F === "`" || N === '"' || N === "'" || N === "`") && F !== N)
3209
+ var E = o[g], F = It(E, 0, 1), L = It(E, -1);
3210
+ if ((F === '"' || F === "'" || F === "`" || L === '"' || L === "'" || L === "`") && F !== L)
3203
3211
  throw new Xe("property names with quotes must have matching quotes");
3204
3212
  if ((E === "constructor" || !m) && (p = !0), s += "." + E, l = "%" + s + "%", Et(Ve, l))
3205
3213
  f = Ve[l];
@@ -3275,17 +3283,17 @@ var Yo = vr("%SyntaxError%"), Ge = vr("%TypeError%"), Rr = wr, Xo = function(e,
3275
3283
  e[r] = o;
3276
3284
  else
3277
3285
  throw new Yo("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
3278
- }, Tn = et, Nr = Xo, Zo = Fn(), Lr = wr, Ur = Tn("%TypeError%"), es = Tn("%Math.floor%"), ts = function(e, r) {
3286
+ }, Tn = et, Lr = Xo, Zo = Fn(), Nr = wr, Ur = Tn("%TypeError%"), es = Tn("%Math.floor%"), ts = function(e, r) {
3279
3287
  if (typeof e != "function")
3280
3288
  throw new Ur("`fn` is not a function");
3281
3289
  if (typeof r != "number" || r < 0 || r > 4294967295 || es(r) !== r)
3282
3290
  throw new Ur("`length` must be a positive 32-bit integer");
3283
3291
  var o = arguments.length > 2 && !!arguments[2], s = !0, u = !0;
3284
- if ("length" in e && Lr) {
3285
- var l = Lr(e, "length");
3292
+ if ("length" in e && Nr) {
3293
+ var l = Nr(e, "length");
3286
3294
  l && !l.configurable && (s = !1), l && !l.writable && (u = !1);
3287
3295
  }
3288
- return (s || u || !o) && (Zo ? Nr(e, "length", r, !0, !0) : Nr(e, "length", r)), e;
3296
+ return (s || u || !o) && (Zo ? Lr(e, "length", r, !0, !0) : Lr(e, "length", r)), e;
3289
3297
  };
3290
3298
  (function(t) {
3291
3299
  var e = An, r = et, o = ts, 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), w = r("%Math.max%");
@@ -3440,13 +3448,13 @@ var As = He ? function(e) {
3440
3448
  for (var e = [], r = 0; r < qt.length; r++)
3441
3449
  typeof xs[qt[r]] == "function" && (e[e.length] = qt[r]);
3442
3450
  return e;
3443
- }, Ft = Os, ks = Bs, $r = _n, Sr = xn, vt = wr, Ps = Sr("Object.prototype.toString"), Nn = br(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = ks(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Rs = Sr("Array.prototype.indexOf", !0) || function(e, r) {
3451
+ }, Ft = Os, ks = Bs, $r = _n, Sr = xn, vt = wr, Ps = Sr("Object.prototype.toString"), Ln = br(), Dr = typeof globalThis > "u" ? Yr : globalThis, sr = ks(), Ar = Sr("String.prototype.slice"), Qt = Object.getPrototypeOf, Rs = Sr("Array.prototype.indexOf", !0) || function(e, r) {
3444
3452
  for (var o = 0; o < e.length; o += 1)
3445
3453
  if (e[o] === r)
3446
3454
  return o;
3447
3455
  return -1;
3448
3456
  }, Tt = { __proto__: null };
3449
- Nn && vt && Qt ? Ft(sr, function(t) {
3457
+ Ln && vt && Qt ? Ft(sr, function(t) {
3450
3458
  var e = new Dr[t]();
3451
3459
  if (Symbol.toStringTag in e) {
3452
3460
  var r = Qt(e), o = vt(r, Symbol.toStringTag);
@@ -3460,7 +3468,7 @@ Nn && vt && Qt ? Ft(sr, function(t) {
3460
3468
  var e = new Dr[t](), r = e.slice || e.set;
3461
3469
  r && (Tt["$" + t] = $r(r));
3462
3470
  });
3463
- var Ns = function(e) {
3471
+ var Ls = function(e) {
3464
3472
  var r = !1;
3465
3473
  return Ft(Tt, function(o, s) {
3466
3474
  if (!r)
@@ -3469,7 +3477,7 @@ var Ns = function(e) {
3469
3477
  } catch {
3470
3478
  }
3471
3479
  }), r;
3472
- }, Ls = function(e) {
3480
+ }, Ns = function(e) {
3473
3481
  var r = !1;
3474
3482
  return Ft(Tt, function(o, s) {
3475
3483
  if (!r)
@@ -3478,19 +3486,19 @@ var Ns = function(e) {
3478
3486
  } catch {
3479
3487
  }
3480
3488
  }), r;
3481
- }, Ln = function(e) {
3489
+ }, Nn = function(e) {
3482
3490
  if (!e || typeof e != "object")
3483
3491
  return !1;
3484
- if (!Nn) {
3492
+ if (!Ln) {
3485
3493
  var r = Ar(Ps(e), 8, -1);
3486
- return Rs(sr, r) > -1 ? r : r !== "Object" ? !1 : Ls(e);
3494
+ return Rs(sr, r) > -1 ? r : r !== "Object" ? !1 : Ns(e);
3487
3495
  }
3488
- return vt ? Ns(e) : null;
3489
- }, Us = Ln, $s = function(e) {
3496
+ return vt ? Ls(e) : null;
3497
+ }, Us = Nn, $s = function(e) {
3490
3498
  return !!Us(e);
3491
3499
  };
3492
3500
  (function(t) {
3493
- var e = ss, r = ls, o = Ln, s = $s;
3501
+ var e = ss, r = ls, o = Nn, s = $s;
3494
3502
  function u(S) {
3495
3503
  return S.call.bind(S);
3496
3504
  }
@@ -3499,7 +3507,7 @@ var Ns = function(e) {
3499
3507
  var E = u(BigInt.prototype.valueOf);
3500
3508
  if (f)
3501
3509
  var F = u(Symbol.prototype.valueOf);
3502
- function N(S, pt) {
3510
+ function L(S, pt) {
3503
3511
  if (typeof S != "object")
3504
3512
  return !1;
3505
3513
  try {
@@ -3610,11 +3618,11 @@ var Ns = function(e) {
3610
3618
  }
3611
3619
  t.isDataView = v;
3612
3620
  var A = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
3613
- function C(S) {
3621
+ function O(S) {
3614
3622
  return p(S) === "[object SharedArrayBuffer]";
3615
3623
  }
3616
3624
  function j(S) {
3617
- return typeof A > "u" ? !1 : (typeof C.working > "u" && (C.working = C(new A())), C.working ? C(S) : S instanceof A);
3625
+ return typeof A > "u" ? !1 : (typeof O.working > "u" && (O.working = O(new A())), O.working ? O(S) : S instanceof A);
3618
3626
  }
3619
3627
  t.isSharedArrayBuffer = j;
3620
3628
  function V(S) {
@@ -3625,10 +3633,10 @@ var Ns = function(e) {
3625
3633
  return p(S) === "[object Map Iterator]";
3626
3634
  }
3627
3635
  t.isMapIterator = B;
3628
- function L(S) {
3636
+ function N(S) {
3629
3637
  return p(S) === "[object Set Iterator]";
3630
3638
  }
3631
- t.isSetIterator = L;
3639
+ t.isSetIterator = N;
3632
3640
  function M(S) {
3633
3641
  return p(S) === "[object Generator]";
3634
3642
  }
@@ -3638,23 +3646,23 @@ var Ns = function(e) {
3638
3646
  }
3639
3647
  t.isWebAssemblyCompiledModule = te;
3640
3648
  function ye(S) {
3641
- return N(S, w);
3649
+ return L(S, w);
3642
3650
  }
3643
3651
  t.isNumberObject = ye;
3644
3652
  function he(S) {
3645
- return N(S, g);
3653
+ return L(S, g);
3646
3654
  }
3647
3655
  t.isStringObject = he;
3648
3656
  function oe(S) {
3649
- return N(S, m);
3657
+ return L(S, m);
3650
3658
  }
3651
3659
  t.isBooleanObject = oe;
3652
3660
  function Me(S) {
3653
- return l && N(S, E);
3661
+ return l && L(S, E);
3654
3662
  }
3655
3663
  t.isBigIntObject = Me;
3656
3664
  function ht(S) {
3657
- return f && N(S, F);
3665
+ return f && L(S, F);
3658
3666
  }
3659
3667
  t.isSymbolObject = ht;
3660
3668
  function it(S) {
@@ -3696,9 +3704,9 @@ typeof Object.create == "function" ? ar.exports = function(e, r) {
3696
3704
  var js = ar.exports;
3697
3705
  (function(t) {
3698
3706
  var e = Object.getOwnPropertyDescriptors || function(v) {
3699
- for (var A = Object.keys(v), C = {}, j = 0; j < A.length; j++)
3700
- C[A[j]] = Object.getOwnPropertyDescriptor(v, A[j]);
3701
- return C;
3707
+ for (var A = Object.keys(v), O = {}, j = 0; j < A.length; j++)
3708
+ O[A[j]] = Object.getOwnPropertyDescriptor(v, A[j]);
3709
+ return O;
3702
3710
  }, r = /%[sdj%]/g;
3703
3711
  t.format = function(d) {
3704
3712
  if (!T(d)) {
@@ -3706,55 +3714,55 @@ var js = ar.exports;
3706
3714
  v.push(l(arguments[A]));
3707
3715
  return v.join(" ");
3708
3716
  }
3709
- for (var A = 1, C = arguments, j = C.length, V = String(d).replace(r, function(L) {
3710
- if (L === "%%")
3717
+ for (var A = 1, O = arguments, j = O.length, V = String(d).replace(r, function(N) {
3718
+ if (N === "%%")
3711
3719
  return "%";
3712
3720
  if (A >= j)
3713
- return L;
3714
- switch (L) {
3721
+ return N;
3722
+ switch (N) {
3715
3723
  case "%s":
3716
- return String(C[A++]);
3724
+ return String(O[A++]);
3717
3725
  case "%d":
3718
- return Number(C[A++]);
3726
+ return Number(O[A++]);
3719
3727
  case "%j":
3720
3728
  try {
3721
- return JSON.stringify(C[A++]);
3729
+ return JSON.stringify(O[A++]);
3722
3730
  } catch {
3723
3731
  return "[Circular]";
3724
3732
  }
3725
3733
  default:
3726
- return L;
3734
+ return N;
3727
3735
  }
3728
- }), B = C[A]; A < j; B = C[++A])
3736
+ }), B = O[A]; A < j; B = O[++A])
3729
3737
  _(B) || !ie(B) ? V += " " + B : V += " " + l(B);
3730
3738
  return V;
3731
3739
  }, t.deprecate = function(d, v) {
3732
- if (typeof O.process < "u" && O.process.noDeprecation === !0)
3740
+ if (typeof C.process < "u" && C.process.noDeprecation === !0)
3733
3741
  return d;
3734
- if (typeof O.process > "u")
3742
+ if (typeof C.process > "u")
3735
3743
  return function() {
3736
3744
  return t.deprecate(d, v).apply(this, arguments);
3737
3745
  };
3738
3746
  var A = !1;
3739
- function C() {
3747
+ function O() {
3740
3748
  if (!A) {
3741
- if (O.process.throwDeprecation)
3749
+ if (C.process.throwDeprecation)
3742
3750
  throw new Error(v);
3743
- O.process.traceDeprecation ? console.trace(v) : console.error(v), A = !0;
3751
+ C.process.traceDeprecation ? console.trace(v) : console.error(v), A = !0;
3744
3752
  }
3745
3753
  return d.apply(this, arguments);
3746
3754
  }
3747
- return C;
3755
+ return O;
3748
3756
  };
3749
3757
  var o = {}, s = /^$/;
3750
- if (O.process.env.NODE_DEBUG) {
3751
- var u = O.process.env.NODE_DEBUG;
3758
+ if (C.process.env.NODE_DEBUG) {
3759
+ var u = C.process.env.NODE_DEBUG;
3752
3760
  u = u.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), s = new RegExp("^" + u + "$", "i");
3753
3761
  }
3754
3762
  t.debuglog = function(d) {
3755
3763
  if (d = d.toUpperCase(), !o[d])
3756
3764
  if (s.test(d)) {
3757
- var v = O.process.pid;
3765
+ var v = C.process.pid;
3758
3766
  o[d] = function() {
3759
3767
  var A = t.format.apply(t, arguments);
3760
3768
  console.error("%s %d: %s", d, v, A);
@@ -3805,7 +3813,7 @@ var js = ar.exports;
3805
3813
  }
3806
3814
  function w(d) {
3807
3815
  var v = {};
3808
- return d.forEach(function(A, C) {
3816
+ return d.forEach(function(A, O) {
3809
3817
  v[A] = !0;
3810
3818
  }), v;
3811
3819
  }
@@ -3813,8 +3821,8 @@ var js = ar.exports;
3813
3821
  if (d.customInspect && v && ce(v.inspect) && // Filter out the util module, it's inspect function is special
3814
3822
  v.inspect !== t.inspect && // Also filter out any prototype objects using the circular check.
3815
3823
  !(v.constructor && v.constructor.prototype === v)) {
3816
- var C = v.inspect(A, d);
3817
- return T(C) || (C = g(d, C, A)), C;
3824
+ var O = v.inspect(A, d);
3825
+ return T(O) || (O = g(d, O, A)), O;
3818
3826
  }
3819
3827
  var j = m(d, v);
3820
3828
  if (j)
@@ -3824,8 +3832,8 @@ var js = ar.exports;
3824
3832
  return E(v);
3825
3833
  if (V.length === 0) {
3826
3834
  if (ce(v)) {
3827
- var L = v.name ? ": " + v.name : "";
3828
- return d.stylize("[Function" + L + "]", "special");
3835
+ var N = v.name ? ": " + v.name : "";
3836
+ return d.stylize("[Function" + N + "]", "special");
3829
3837
  }
3830
3838
  if (G(v))
3831
3839
  return d.stylize(RegExp.prototype.toString.call(v), "regexp");
@@ -3846,7 +3854,7 @@ var js = ar.exports;
3846
3854
  d.seen.push(v);
3847
3855
  var oe;
3848
3856
  return te ? oe = F(d, v, A, B, V) : oe = V.map(function(Me) {
3849
- return N(d, v, A, B, Me, te);
3857
+ return L(d, v, A, B, Me, te);
3850
3858
  }), d.seen.pop(), P(oe, M, ye);
3851
3859
  }
3852
3860
  function m(d, v) {
@@ -3866,52 +3874,52 @@ var js = ar.exports;
3866
3874
  function E(d) {
3867
3875
  return "[" + Error.prototype.toString.call(d) + "]";
3868
3876
  }
3869
- function F(d, v, A, C, j) {
3870
- for (var V = [], B = 0, L = v.length; B < L; ++B)
3871
- ke(v, String(B)) ? V.push(N(
3877
+ function F(d, v, A, O, j) {
3878
+ for (var V = [], B = 0, N = v.length; B < N; ++B)
3879
+ ke(v, String(B)) ? V.push(L(
3872
3880
  d,
3873
3881
  v,
3874
3882
  A,
3875
- C,
3883
+ O,
3876
3884
  String(B),
3877
3885
  !0
3878
3886
  )) : V.push("");
3879
3887
  return j.forEach(function(M) {
3880
- M.match(/^\d+$/) || V.push(N(
3888
+ M.match(/^\d+$/) || V.push(L(
3881
3889
  d,
3882
3890
  v,
3883
3891
  A,
3884
- C,
3892
+ O,
3885
3893
  M,
3886
3894
  !0
3887
3895
  ));
3888
3896
  }), V;
3889
3897
  }
3890
- function N(d, v, A, C, j, V) {
3891
- var B, L, M;
3892
- if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? L = d.stylize("[Getter/Setter]", "special") : L = d.stylize("[Getter]", "special") : M.set && (L = d.stylize("[Setter]", "special")), ke(C, j) || (B = "[" + j + "]"), L || (d.seen.indexOf(M.value) < 0 ? (_(A) ? L = g(d, M.value, null) : L = g(d, M.value, A - 1), L.indexOf(`
3893
- `) > -1 && (V ? L = L.split(`
3898
+ function L(d, v, A, O, j, V) {
3899
+ var B, N, M;
3900
+ if (M = Object.getOwnPropertyDescriptor(v, j) || { value: v[j] }, M.get ? M.set ? N = d.stylize("[Getter/Setter]", "special") : N = d.stylize("[Getter]", "special") : M.set && (N = d.stylize("[Setter]", "special")), ke(O, j) || (B = "[" + j + "]"), N || (d.seen.indexOf(M.value) < 0 ? (_(A) ? N = g(d, M.value, null) : N = g(d, M.value, A - 1), N.indexOf(`
3901
+ `) > -1 && (V ? N = N.split(`
3894
3902
  `).map(function(te) {
3895
3903
  return " " + te;
3896
3904
  }).join(`
3897
- `).slice(2) : L = `
3898
- ` + L.split(`
3905
+ `).slice(2) : N = `
3906
+ ` + N.split(`
3899
3907
  `).map(function(te) {
3900
3908
  return " " + te;
3901
3909
  }).join(`
3902
- `))) : L = d.stylize("[Circular]", "special")), k(B)) {
3910
+ `))) : N = d.stylize("[Circular]", "special")), k(B)) {
3903
3911
  if (V && j.match(/^\d+$/))
3904
- return L;
3912
+ return N;
3905
3913
  B = JSON.stringify("" + j), B.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (B = B.slice(1, -1), B = d.stylize(B, "name")) : (B = B.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), B = d.stylize(B, "string"));
3906
3914
  }
3907
- return B + ": " + L;
3915
+ return B + ": " + N;
3908
3916
  }
3909
3917
  function P(d, v, A) {
3910
- var C = d.reduce(function(j, V) {
3918
+ var O = d.reduce(function(j, V) {
3911
3919
  return V.indexOf(`
3912
3920
  `) >= 0, j + V.replace(/\u001b\[\d\d?m/g, "").length + 1;
3913
3921
  }, 0);
3914
- return C > 60 ? A[0] + (v === "" ? "" : v + `
3922
+ return O > 60 ? A[0] + (v === "" ? "" : v + `
3915
3923
  `) + " " + d.join(`,
3916
3924
  `) + " " + A[1] : A[0] + v + " " + d.join(", ") + " " + A[1];
3917
3925
  }
@@ -4006,8 +4014,8 @@ var js = ar.exports;
4006
4014
  }, t.inherits = js, t._extend = function(d, v) {
4007
4015
  if (!v || !ie(v))
4008
4016
  return d;
4009
- for (var A = Object.keys(v), C = A.length; C--; )
4010
- d[A[C]] = v[A[C]];
4017
+ for (var A = Object.keys(v), O = A.length; O--; )
4018
+ d[A[O]] = v[A[O]];
4011
4019
  return d;
4012
4020
  };
4013
4021
  function ke(d, v) {
@@ -4029,12 +4037,12 @@ var js = ar.exports;
4029
4037
  }), A;
4030
4038
  }
4031
4039
  function A() {
4032
- for (var C, j, V = new Promise(function(M, te) {
4033
- C = M, j = te;
4034
- }), B = [], L = 0; L < arguments.length; L++)
4035
- B.push(arguments[L]);
4040
+ for (var O, j, V = new Promise(function(M, te) {
4041
+ O = M, j = te;
4042
+ }), B = [], N = 0; N < arguments.length; N++)
4043
+ B.push(arguments[N]);
4036
4044
  B.push(function(M, te) {
4037
- M ? j(M) : C(te);
4045
+ M ? j(M) : O(te);
4038
4046
  });
4039
4047
  try {
4040
4048
  v.apply(this, B);
@@ -4064,8 +4072,8 @@ var js = ar.exports;
4064
4072
  if (typeof d != "function")
4065
4073
  throw new TypeError('The "original" argument must be of type Function');
4066
4074
  function v() {
4067
- for (var A = [], C = 0; C < arguments.length; C++)
4068
- A.push(arguments[C]);
4075
+ for (var A = [], O = 0; O < arguments.length; O++)
4076
+ A.push(arguments[O]);
4069
4077
  var j = A.pop();
4070
4078
  if (typeof j != "function")
4071
4079
  throw new TypeError("The last argument must be of type Function");
@@ -4073,11 +4081,11 @@ var js = ar.exports;
4073
4081
  return j.apply(V, arguments);
4074
4082
  };
4075
4083
  d.apply(this, A).then(
4076
- function(L) {
4077
- O.process.nextTick(B.bind(null, null, L));
4084
+ function(N) {
4085
+ C.process.nextTick(B.bind(null, null, N));
4078
4086
  },
4079
- function(L) {
4080
- O.process.nextTick(Pe.bind(null, L, B));
4087
+ function(N) {
4088
+ C.process.nextTick(Pe.bind(null, N, B));
4081
4089
  }
4082
4090
  );
4083
4091
  }
@@ -4089,7 +4097,7 @@ var js = ar.exports;
4089
4097
  t.callbackify = H;
4090
4098
  })(kt);
4091
4099
  const { inherits: Vs, format: Gt } = kt;
4092
- function Le(t, e, r = Error) {
4100
+ function Ne(t, e, r = Error) {
4093
4101
  if (!t)
4094
4102
  throw new Error("Avvio error code must not be empty");
4095
4103
  if (!e)
@@ -4104,28 +4112,28 @@ function Le(t, e, r = Error) {
4104
4112
  }, Vs(o, r), o;
4105
4113
  }
4106
4114
  var Un = {
4107
- createError: Le,
4108
- AVV_ERR_EXPOSE_ALREADY_DEFINED: Le(
4115
+ createError: Ne,
4116
+ AVV_ERR_EXPOSE_ALREADY_DEFINED: Ne(
4109
4117
  "AVV_ERR_EXPOSE_ALREADY_DEFINED",
4110
4118
  "'%s' () is already defined, specify an expose option"
4111
4119
  ),
4112
- AVV_ERR_CALLBACK_NOT_FN: Le(
4120
+ AVV_ERR_CALLBACK_NOT_FN: Ne(
4113
4121
  "AVV_ERR_CALLBACK_NOT_FN",
4114
4122
  "Callback for '%s' hook is not a function. Received: '%s'"
4115
4123
  ),
4116
- AVV_ERR_PLUGIN_NOT_VALID: Le(
4124
+ AVV_ERR_PLUGIN_NOT_VALID: Ne(
4117
4125
  "AVV_ERR_PLUGIN_NOT_VALID",
4118
4126
  "Plugin must be a function or a promise. Received: '%s'"
4119
4127
  ),
4120
- AVV_ERR_ROOT_PLG_BOOTED: Le(
4128
+ AVV_ERR_ROOT_PLG_BOOTED: Ne(
4121
4129
  "AVV_ERR_PLUGIN_NOT_VALID",
4122
4130
  "Root plugin has already booted"
4123
4131
  ),
4124
- AVV_ERR_PARENT_PLG_LOADED: Le(
4132
+ AVV_ERR_PARENT_PLG_LOADED: Ne(
4125
4133
  "AVV_ERR_PARENT_PLG_LOADED",
4126
4134
  "Impossible to load '%s' plugin because the parent '%s' was already loaded"
4127
4135
  ),
4128
- AVV_ERR_READY_TIMEOUT: Le(
4136
+ AVV_ERR_READY_TIMEOUT: Ne(
4129
4137
  "AVV_ERR_READY_TIMEOUT",
4130
4138
  "Plugin did not start in time: '%s'. You may have forgotten to call 'done' function or to resolve a Promise"
4131
4139
  )
@@ -4287,8 +4295,8 @@ function zs() {
4287
4295
  return m >= o ? w(g, m, o, "day") : m >= r ? w(g, m, r, "hour") : m >= e ? w(g, m, e, "minute") : m >= t ? w(g, m, t, "second") : g + " ms";
4288
4296
  }
4289
4297
  function w(g, m, E, F) {
4290
- var N = m >= E * 1.5;
4291
- return Math.round(g / E) + " " + F + (N ? "s" : "");
4298
+ var L = m >= E * 1.5;
4299
+ return Math.round(g / E) + " " + F + (L ? "s" : "");
4292
4300
  }
4293
4301
  return Kt;
4294
4302
  }
@@ -4304,7 +4312,7 @@ function Ks(t) {
4304
4312
  }
4305
4313
  r.selectColor = e;
4306
4314
  function r(g) {
4307
- let m, E = null, F, N;
4315
+ let m, E = null, F, L;
4308
4316
  function P(...K) {
4309
4317
  if (!P.enabled)
4310
4318
  return;
@@ -4326,7 +4334,7 @@ function Ks(t) {
4326
4334
  return P.namespace = g, P.useColors = r.useColors(), P.color = r.selectColor(g), P.extend = o, P.destroy = r.destroy, Object.defineProperty(P, "enabled", {
4327
4335
  enumerable: !0,
4328
4336
  configurable: !1,
4329
- get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, N = r.enabled(g)), N),
4337
+ get: () => E !== null ? E : (F !== r.namespaces && (F = r.namespaces, L = r.enabled(g)), L),
4330
4338
  set: (K) => {
4331
4339
  E = K;
4332
4340
  }
@@ -4489,7 +4497,7 @@ var Hs = Ks;
4489
4497
  p = e.storage.getItem("debug");
4490
4498
  } catch {
4491
4499
  }
4492
- return !p && typeof O.process < "u" && "env" in O.process && (p = O.process.env.DEBUG), p;
4500
+ return !p && typeof C.process < "u" && "env" in C.process && (p = C.process.env.DEBUG), p;
4493
4501
  }
4494
4502
  function l() {
4495
4503
  try {
@@ -4528,7 +4536,7 @@ tt.prototype.exec = function(t, e) {
4528
4536
  let o = !1;
4529
4537
  const s = this.name;
4530
4538
  if (this.parent._error && !this.isAfter) {
4531
- Z("skipping loading of plugin as parent errored and it is not an after", s), O.process.nextTick(e);
4539
+ Z("skipping loading of plugin as parent errored and it is not an after", s), C.process.nextTick(e);
4532
4540
  return;
4533
4541
  }
4534
4542
  if (this.isAfter)
@@ -4555,8 +4563,8 @@ tt.prototype.exec = function(t, e) {
4555
4563
  }, this.timeout)), this.started = !0, this.emit("start", this.server ? this.server.name : null, this.name, Date.now());
4556
4564
  const f = r(this.server, this.opts, l);
4557
4565
  f && typeof f.then == "function" && (Z("exec: resolving promise", s), f.then(
4558
- () => O.process.nextTick(l),
4559
- (p) => O.process.nextTick(l, p)
4566
+ () => C.process.nextTick(l),
4567
+ (p) => C.process.nextTick(l, p)
4560
4568
  ));
4561
4569
  };
4562
4570
  tt.prototype.loadedSoFar = function() {
@@ -4564,7 +4572,7 @@ tt.prototype.loadedSoFar = function() {
4564
4572
  return Promise.resolve();
4565
4573
  const t = () => {
4566
4574
  this.server.after((r, o) => {
4567
- this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null, O.process.nextTick(o, r);
4575
+ this._error = r, this.q.pause(), r ? (Z("rejecting promise", this.name, r), this._promise.reject(r)) : (Z("resolving promise", this.name), this._promise.resolve()), this._promise = null, C.process.nextTick(o, r);
4568
4576
  }), this.q.resume();
4569
4577
  };
4570
4578
  let e;
@@ -4600,7 +4608,7 @@ tt.prototype.finish = function(t, e) {
4600
4608
  };
4601
4609
  function ta(t, e) {
4602
4610
  const r = this;
4603
- O.process.nextTick(Ir.bind(r), t, e);
4611
+ C.process.nextTick(Ir.bind(r), t, e);
4604
4612
  }
4605
4613
  function Ir(t, e) {
4606
4614
  if (typeof t.func.then == "function") {
@@ -4688,7 +4696,7 @@ function la(t, e, r) {
4688
4696
  }
4689
4697
  oa(ee, ia);
4690
4698
  ee.prototype.start = function() {
4691
- return this.started = !0, O.process.nextTick(this._doStart), this;
4699
+ return this.started = !0, C.process.nextTick(this._doStart), this;
4692
4700
  };
4693
4701
  ee.prototype.override = function(t, e, r) {
4694
4702
  return t;
@@ -4704,7 +4712,7 @@ ee.prototype.use = function(t, e) {
4704
4712
  };
4705
4713
  ee.prototype._loadRegistered = function() {
4706
4714
  const t = this._current[0];
4707
- return !this.started && !this.booted && O.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4715
+ return !this.started && !this.booted && C.process.nextTick(() => this._root.q.resume()), t ? t.loadedSoFar() : Promise.resolve();
4708
4716
  };
4709
4717
  Object.defineProperty(ee.prototype, "then", { get: Dn });
4710
4718
  ee.prototype._addPlugin = function(t, e, r) {
@@ -4754,7 +4762,7 @@ ee.prototype.close = function(t) {
4754
4762
  };
4755
4763
  });
4756
4764
  return this.ready(() => {
4757
- this._error = null, this._closeQ.push(t), O.process.nextTick(this._closeQ.resume.bind(this._closeQ));
4765
+ this._error = null, this._closeQ.push(t), C.process.nextTick(this._closeQ.resume.bind(this._closeQ));
4758
4766
  }), e;
4759
4767
  };
4760
4768
  ee.prototype.ready = function(t) {
@@ -4768,7 +4776,7 @@ ee.prototype.ready = function(t) {
4768
4776
  this._readyQ.push(s), this.start();
4769
4777
  const o = this._current[0].server;
4770
4778
  function s(u, l, f) {
4771
- u ? r(u) : e(o), O.process.nextTick(f);
4779
+ u ? r(u) : e(o), C.process.nextTick(f);
4772
4780
  }
4773
4781
  });
4774
4782
  };
@@ -4795,9 +4803,9 @@ function jn(t, e) {
4795
4803
  const r = this._server, o = this._error;
4796
4804
  let s;
4797
4805
  if (this._error = null, t.length === 0)
4798
- this._error = o, s = t(), s && !s[_t] && typeof s.then == "function" ? s.then(() => O.process.nextTick(e), (u) => O.process.nextTick(e, u)) : O.process.nextTick(e);
4806
+ this._error = o, s = t(), s && !s[_t] && typeof s.then == "function" ? s.then(() => C.process.nextTick(e), (u) => C.process.nextTick(e, u)) : C.process.nextTick(e);
4799
4807
  else if (t.length === 1)
4800
- s = t(o), s && !s[_t] && typeof s.then == "function" ? s.then(() => O.process.nextTick(e), (u) => O.process.nextTick(e, u)) : O.process.nextTick(e);
4808
+ s = t(o), s && !s[_t] && typeof s.then == "function" ? s.then(() => C.process.nextTick(e), (u) => C.process.nextTick(e, u)) : C.process.nextTick(e);
4801
4809
  else if (this._timeout === 0) {
4802
4810
  const u = (l) => {
4803
4811
  this._error = l, e(this._error);
@@ -4824,9 +4832,9 @@ function da(t, e) {
4824
4832
  if (t.length === 0 || t.length === 1) {
4825
4833
  let s;
4826
4834
  o ? s = t(r) : s = t(this._error), s && typeof s.then == "function" ? (Ze("resolving close/onClose promise"), s.then(
4827
- () => O.process.nextTick(e),
4828
- (u) => O.process.nextTick(e, u)
4829
- )) : O.process.nextTick(e);
4835
+ () => C.process.nextTick(e),
4836
+ (u) => C.process.nextTick(e, u)
4837
+ )) : C.process.nextTick(e);
4830
4838
  } else
4831
4839
  t.length === 2 ? t(o ? r : this._error, e) : o ? t(r, e) : t(this._error, r, e);
4832
4840
  }
@@ -4835,10 +4843,10 @@ function ya(t, e) {
4835
4843
  function r(o, s) {
4836
4844
  let u;
4837
4845
  t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
4838
- O.process.nextTick(s);
4839
- }, s) : O.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
4840
- O.process.nextTick(s);
4841
- }, s) : O.process.nextTick(s)) : t(this, s);
4846
+ C.process.nextTick(s);
4847
+ }, s) : C.process.nextTick(s)) : t.length === 1 ? (u = t(this), u && u.then ? u.then(function() {
4848
+ C.process.nextTick(s);
4849
+ }, s) : C.process.nextTick(s)) : t(this, s);
4842
4850
  }
4843
4851
  }
4844
4852
  function Yt(t, e) {
@@ -4846,10 +4854,10 @@ function Yt(t, e) {
4846
4854
  function r(o, s) {
4847
4855
  let u;
4848
4856
  t ? t.length === 0 ? (u = t(), u && u.then ? u.then(function() {
4849
- O.process.nextTick(s, o);
4850
- }, s) : O.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
4851
- O.process.nextTick(s);
4852
- }, s) : O.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : O.process.nextTick(s);
4857
+ C.process.nextTick(s, o);
4858
+ }, s) : C.process.nextTick(s, o)) : t.length === 1 ? (u = t(o), u && u.then ? u.then(function() {
4859
+ C.process.nextTick(s);
4860
+ }, s) : C.process.nextTick(s)) : t.length === 2 ? t(o, s) : t(o, this, s) : C.process.nextTick(s);
4853
4861
  }
4854
4862
  }
4855
4863
  yr.exports = ee;
@@ -4862,7 +4870,7 @@ yr.exports.express = function(t) {
4862
4870
  };
4863
4871
  var ga = yr.exports;
4864
4872
  const ma = /* @__PURE__ */ Yn(ga);
4865
- function La(t, e = !0, r = !0) {
4873
+ function Na(t, e = !0, r = !0) {
4866
4874
  const o = e ? "https://grpc-web.streamlayer.io:443" : "https://grpc-web.next.streamlayer.io:443", s = ma(/* @__PURE__ */ Object.create({}), { autostart: !1 });
4867
4875
  return s.use(Bi), s.use(Ei, { sdkKey: t, host: o }), s.use(xi), s.use(Oi), s.use(co), s.use(Ji), r && s.after(async (u, l, f) => {
4868
4876
  if (u)
@@ -4873,5 +4881,5 @@ function La(t, e = !0, r = !0) {
4873
4881
  }), s;
4874
4882
  }
4875
4883
  export {
4876
- La as StreamLayer
4884
+ Na as StreamLayer
4877
4885
  };