@aikaara/chat-sdk 0.8.9 → 0.9.0

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.
@@ -1,4 +1,4 @@
1
- class hl {
1
+ class pl {
2
2
  identifier;
3
3
  callbacks = {};
4
4
  sendFn;
@@ -63,7 +63,7 @@ class ao {
63
63
  this.ws && (this.ws.onclose = null, this.ws.close(), this.ws = null), this.subscriptions.forEach((e) => e._notifyDisconnected()), this.subscriptions.clear();
64
64
  }
65
65
  subscribe(e) {
66
- const t = JSON.stringify(e), r = new hl(t, (a) => {
66
+ const t = JSON.stringify(e), r = new pl(t, (a) => {
67
67
  this.send({
68
68
  command: "message",
69
69
  identifier: t,
@@ -142,7 +142,7 @@ class ao {
142
142
  }
143
143
  }
144
144
  }
145
- class xs {
145
+ class Ts {
146
146
  handlers = /* @__PURE__ */ new Map();
147
147
  on(e, t) {
148
148
  return this.handlers.has(e) || this.handlers.set(e, /* @__PURE__ */ new Set()), this.handlers.get(e).add(t), () => this.off(e, t);
@@ -163,8 +163,8 @@ class xs {
163
163
  this.handlers.clear();
164
164
  }
165
165
  }
166
- const fl = 1e3, dl = 10, pl = 400, gl = 600, lo = "#6366f1", ml = 12, bl = "system-ui, -apple-system, sans-serif", co = "Type a message...", yl = "bottom-right", vl = "light", wl = { x: 20, y: 20 }, Br = "aikaara_conversation_id";
167
- class _l extends xs {
166
+ const gl = 1e3, ml = 10, bl = 400, yl = 600, lo = "#6366f1", vl = 12, wl = "system-ui, -apple-system, sans-serif", co = "Type a message...", _l = "bottom-right", kl = "light", Sl = { x: 20, y: 20 }, Br = "aikaara_conversation_id";
167
+ class El extends Ts {
168
168
  client;
169
169
  config;
170
170
  state = "disconnected";
@@ -220,13 +220,13 @@ class _l extends xs {
220
220
  this.state !== e && (this.state = e, this.emit("connection:state", e));
221
221
  }
222
222
  scheduleReconnect() {
223
- const e = this.config.maxReconnectAttempts ?? dl;
223
+ const e = this.config.maxReconnectAttempts ?? ml;
224
224
  if (this.reconnectAttempt >= e) {
225
225
  this.emit("error", new Error("Max reconnection attempts reached"));
226
226
  return;
227
227
  }
228
228
  this.setState("reconnecting");
229
- const r = (this.config.reconnectInterval ?? fl) * Math.pow(2, this.reconnectAttempt);
229
+ const r = (this.config.reconnectInterval ?? gl) * Math.pow(2, this.reconnectAttempt);
230
230
  this.reconnectAttempt++, this.reconnectTimer = setTimeout(async () => {
231
231
  try {
232
232
  const a = this.buildWsUrl(this.config.baseUrl, this.config.userToken);
@@ -246,7 +246,7 @@ class _l extends xs {
246
246
  return `${e.replace(/^http/, "ws")}/cable?token=${t}`;
247
247
  }
248
248
  }
249
- class kl {
249
+ class xl {
250
250
  baseUrl;
251
251
  apiKey;
252
252
  authToken;
@@ -353,7 +353,7 @@ class kl {
353
353
  return r && (n.body = JSON.stringify(r)), fetch(e, n);
354
354
  }
355
355
  }
356
- class Sl {
356
+ class Al {
357
357
  _messages = [];
358
358
  optimisticCounter = 0;
359
359
  get messages() {
@@ -385,12 +385,23 @@ class Sl {
385
385
  /**
386
386
  * Append a remote-originated message (e.g. from Tiledesk MQTT). If a matching
387
387
  * optimistic message exists it is reconciled in place; otherwise appended.
388
+ *
389
+ * File-message dedupe: file uploads don't add an optimistic bubble (the
390
+ * upload happens before publish), so if the MQTT subscriber fires twice
391
+ * — common when a router effect double-mounts in dev StrictMode, or when
392
+ * Tiledesk fan-out misbehaves — the same file lands twice as separate
393
+ * remotes with different `externalId`s. Match on `cloudFileId` (or
394
+ * fileUrl as a fallback) within a short window so the second copy
395
+ * collapses onto the first instead of rendering a duplicate bubble.
388
396
  */
389
397
  upsertRemoteMessage(e) {
390
398
  const t = this.reconcileOptimistic(e);
391
399
  if (t) return { message: t, deduped: !0 };
392
- const r = e.externalId ? this._messages.find((a) => a.externalId && a.externalId === e.externalId) : void 0;
393
- return r ? (Object.assign(r, e, { id: r.id }), { message: r, deduped: !0 }) : (this._messages.push(e), { message: e, deduped: !1 });
400
+ const r = e.externalId ? this._messages.find((n) => n.externalId && n.externalId === e.externalId) : void 0;
401
+ if (r)
402
+ return Object.assign(r, e, { id: r.id }), { message: r, deduped: !0 };
403
+ const a = Il(this._messages, e);
404
+ return a ? (Object.assign(a, e, { id: a.id }), { message: a, deduped: !0 }) : (this._messages.push(e), { message: e, deduped: !1 });
394
405
  }
395
406
  updateMessageStatus(e, t) {
396
407
  const r = this._messages.find((a) => a.externalId === e || a.id === e);
@@ -436,7 +447,44 @@ class Sl {
436
447
  this._messages = [];
437
448
  }
438
449
  }
439
- class El {
450
+ function Il(c, e, t = 15e3) {
451
+ const r = e.attachments && e.attachments[0], a = (e.metadata ?? {}).attributes;
452
+ if (!(!!r || !!(a && a.fileMessage))) return null;
453
+ const i = fo(e), s = uo(e), o = ho(e);
454
+ if (!i && !s && !o) return null;
455
+ const l = new Date(e.createdAt).getTime();
456
+ for (let u = c.length - 1; u >= 0; u--) {
457
+ const d = c[u];
458
+ if (d.role !== e.role) continue;
459
+ const p = d.attachments && d.attachments[0], y = (d.metadata ?? {}).attributes;
460
+ if (!(!!p || !!(y && y.fileMessage)) || Math.abs(l - new Date(d.createdAt).getTime()) > t) continue;
461
+ const g = fo(d);
462
+ if (i && g && i === g) return d;
463
+ const b = uo(d);
464
+ if (s && b && s === b) return d;
465
+ const k = ho(d);
466
+ if (o && k && o === k) return d;
467
+ }
468
+ return null;
469
+ }
470
+ function uo(c) {
471
+ const e = c.attachments && c.attachments[0];
472
+ if (e && typeof e.fileUrl == "string")
473
+ return e.fileUrl;
474
+ }
475
+ function ho(c) {
476
+ const e = c.attachments && c.attachments[0];
477
+ if (e && typeof e.fileName == "string")
478
+ return e.fileName;
479
+ }
480
+ function fo(c) {
481
+ const e = c.attachments && c.attachments[0];
482
+ if (e && typeof e.cloudFileId == "string")
483
+ return e.cloudFileId;
484
+ const t = (c.metadata ?? {}).attributes;
485
+ if (t && typeof t.cloudFileId == "string") return t.cloudFileId;
486
+ }
487
+ class Tl {
440
488
  _conversationId;
441
489
  persist;
442
490
  constructor(e, t = !0) {
@@ -470,23 +518,23 @@ class El {
470
518
  }
471
519
  }
472
520
  }
473
- var Ki = Object.defineProperty, xl = Object.getOwnPropertyDescriptor, Al = Object.getOwnPropertyNames, Il = Object.prototype.hasOwnProperty, He = (c, e) => () => (c && (e = c(c = 0)), e), pe = (c, e) => () => (e || c((e = { exports: {} }).exports, e), e.exports), Lt = (c, e) => {
521
+ var Ki = Object.defineProperty, Cl = Object.getOwnPropertyDescriptor, Ol = Object.getOwnPropertyNames, Pl = Object.prototype.hasOwnProperty, He = (c, e) => () => (c && (e = c(c = 0)), e), pe = (c, e) => () => (e || c((e = { exports: {} }).exports, e), e.exports), Lt = (c, e) => {
474
522
  for (var t in e) Ki(c, t, { get: e[t], enumerable: !0 });
475
- }, Tl = (c, e, t, r) => {
476
- if (e && typeof e == "object" || typeof e == "function") for (let a of Al(e)) !Il.call(c, a) && a !== t && Ki(c, a, { get: () => e[a], enumerable: !(r = xl(e, a)) || r.enumerable });
523
+ }, Ml = (c, e, t, r) => {
524
+ if (e && typeof e == "object" || typeof e == "function") for (let a of Ol(e)) !Pl.call(c, a) && a !== t && Ki(c, a, { get: () => e[a], enumerable: !(r = Cl(e, a)) || r.enumerable });
477
525
  return c;
478
- }, Oe = (c) => Tl(Ki({}, "__esModule", { value: !0 }), c), le = He(() => {
526
+ }, Oe = (c) => Ml(Ki({}, "__esModule", { value: !0 }), c), le = He(() => {
479
527
  }), Pe = {};
480
- Lt(Pe, { _debugEnd: () => In, _debugProcess: () => An, _events: () => Wn, _eventsCount: () => qn, _exiting: () => fn, _fatalExceptions: () => Sn, _getActiveHandles: () => Ms, _getActiveRequests: () => Ps, _kill: () => gn, _linkedBinding: () => Cs, _maxListeners: () => $n, _preload_modules: () => Dn, _rawDebug: () => cn, _startProfilerIdleNotifier: () => Tn, _stopProfilerIdleNotifier: () => Cn, _tickCallback: () => xn, abort: () => Rn, addListener: () => Hn, allowedNodeEnvironmentFlags: () => _n, arch: () => Gr, argv: () => Jr, argv0: () => Bn, assert: () => Rs, binding: () => rn, browser: () => ln, chdir: () => sn, config: () => dn, cpuUsage: () => qt, cwd: () => on, debugPort: () => Un, default: () => Gi, dlopen: () => Os, domain: () => hn, emit: () => Yn, emitWarning: () => tn, env: () => Qr, execArgv: () => Xr, execPath: () => Nn, exit: () => vn, features: () => kn, hasUncaughtExceptionCaptureCallback: () => js, hrtime: () => ir, kill: () => yn, listeners: () => Ns, memoryUsage: () => bn, moduleLoadList: () => un, nextTick: () => Is, off: () => Kn, on: () => nt, once: () => zn, openStdin: () => wn, pid: () => jn, platform: () => Yr, ppid: () => Ln, prependListener: () => Qn, prependOnceListener: () => Jn, reallyExit: () => pn, release: () => an, removeAllListeners: () => Gn, removeListener: () => Vn, resourceUsage: () => mn, setSourceMapsEnabled: () => Fn, setUncaughtExceptionCaptureCallback: () => En, stderr: () => Pn, stdin: () => Mn, stdout: () => On, title: () => Vr, umask: () => nn, uptime: () => Ls, version: () => Zr, versions: () => en });
528
+ Lt(Pe, { _debugEnd: () => In, _debugProcess: () => An, _events: () => Wn, _eventsCount: () => qn, _exiting: () => fn, _fatalExceptions: () => Sn, _getActiveHandles: () => Ls, _getActiveRequests: () => js, _kill: () => gn, _linkedBinding: () => Ms, _maxListeners: () => $n, _preload_modules: () => Fn, _rawDebug: () => cn, _startProfilerIdleNotifier: () => Tn, _stopProfilerIdleNotifier: () => Cn, _tickCallback: () => xn, abort: () => Rn, addListener: () => Hn, allowedNodeEnvironmentFlags: () => _n, arch: () => Gr, argv: () => Jr, argv0: () => Bn, assert: () => Ns, binding: () => rn, browser: () => ln, chdir: () => sn, config: () => dn, cpuUsage: () => qt, cwd: () => on, debugPort: () => Un, default: () => Gi, dlopen: () => Rs, domain: () => hn, emit: () => Yn, emitWarning: () => tn, env: () => Qr, execArgv: () => Xr, execPath: () => Nn, exit: () => vn, features: () => kn, hasUncaughtExceptionCaptureCallback: () => Us, hrtime: () => ir, kill: () => yn, listeners: () => Fs, memoryUsage: () => bn, moduleLoadList: () => un, nextTick: () => Os, off: () => Kn, on: () => nt, once: () => zn, openStdin: () => wn, pid: () => jn, platform: () => Yr, ppid: () => Ln, prependListener: () => Qn, prependOnceListener: () => Jn, reallyExit: () => pn, release: () => an, removeAllListeners: () => Gn, removeListener: () => Vn, resourceUsage: () => mn, setSourceMapsEnabled: () => Dn, setUncaughtExceptionCaptureCallback: () => En, stderr: () => Pn, stdin: () => Mn, stdout: () => On, title: () => Vr, umask: () => nn, uptime: () => Bs, version: () => Zr, versions: () => en });
481
529
  function Vi(c) {
482
530
  throw new Error("Node.js process " + c + " is not supported by JSPM core outside of Node.js");
483
531
  }
484
- function Cl() {
485
- !St || !_t || (St = !1, _t.length ? et = _t.concat(et) : Vt = -1, et.length && As());
532
+ function Rl() {
533
+ !St || !_t || (St = !1, _t.length ? et = _t.concat(et) : Vt = -1, et.length && Cs());
486
534
  }
487
- function As() {
535
+ function Cs() {
488
536
  if (!St) {
489
- var c = setTimeout(Cl, 0);
537
+ var c = setTimeout(Rl, 0);
490
538
  St = !0;
491
539
  for (var e = et.length; e; ) {
492
540
  for (_t = et, et = []; ++Vt < e; ) _t && _t[Vt].run();
@@ -495,35 +543,35 @@ function As() {
495
543
  _t = null, St = !1, clearTimeout(c);
496
544
  }
497
545
  }
498
- function Is(c) {
546
+ function Os(c) {
499
547
  var e = new Array(arguments.length - 1);
500
548
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
501
- et.push(new Ts(c, e)), et.length === 1 && !St && setTimeout(As, 0);
549
+ et.push(new Ps(c, e)), et.length === 1 && !St && setTimeout(Cs, 0);
502
550
  }
503
- function Ts(c, e) {
551
+ function Ps(c, e) {
504
552
  this.fun = c, this.array = e;
505
553
  }
506
554
  function Be() {
507
555
  }
508
- function Cs(c) {
556
+ function Ms(c) {
509
557
  Vi("_linkedBinding");
510
558
  }
511
- function Os(c) {
559
+ function Rs(c) {
512
560
  Vi("dlopen");
513
561
  }
514
- function Ps() {
562
+ function js() {
515
563
  return [];
516
564
  }
517
- function Ms() {
565
+ function Ls() {
518
566
  return [];
519
567
  }
520
- function Rs(c, e) {
568
+ function Ns(c, e) {
521
569
  if (!c) throw new Error(e || "assertion error");
522
570
  }
523
- function js() {
571
+ function Us() {
524
572
  return !1;
525
573
  }
526
- function Ls() {
574
+ function Bs() {
527
575
  return ot.now() / 1e3;
528
576
  }
529
577
  function ir(c) {
@@ -533,11 +581,11 @@ function ir(c) {
533
581
  function nt() {
534
582
  return Gi;
535
583
  }
536
- function Ns(c) {
584
+ function Fs(c) {
537
585
  return [];
538
586
  }
539
- var et, St, _t, Vt, Vr, Gr, Yr, Qr, Jr, Xr, Zr, en, tn, rn, nn, on, sn, an, ln, cn, un, hn, fn, dn, pn, gn, qt, mn, bn, yn, vn, wn, _n, kn, Sn, En, xn, An, In, Tn, Cn, On, Pn, Mn, Rn, jn, Ln, Nn, Un, Bn, Dn, Fn, ot, Dr, or, $n, Wn, qn, Hn, zn, Kn, Vn, Gn, Yn, Qn, Jn, Gi, Ol = He(() => {
540
- le(), ue(), ce(), et = [], St = !1, Vt = -1, Ts.prototype.run = function() {
587
+ var et, St, _t, Vt, Vr, Gr, Yr, Qr, Jr, Xr, Zr, en, tn, rn, nn, on, sn, an, ln, cn, un, hn, fn, dn, pn, gn, qt, mn, bn, yn, vn, wn, _n, kn, Sn, En, xn, An, In, Tn, Cn, On, Pn, Mn, Rn, jn, Ln, Nn, Un, Bn, Fn, Dn, ot, Fr, or, $n, Wn, qn, Hn, zn, Kn, Vn, Gn, Yn, Qn, Jn, Gi, jl = He(() => {
588
+ le(), ue(), ce(), et = [], St = !1, Vt = -1, Ps.prototype.run = function() {
541
589
  this.fun.apply(null, this.array);
542
590
  }, Vr = "browser", Gr = "x64", Yr = "browser", Qr = { PATH: "/usr/bin", LANG: typeof navigator < "u" ? navigator.language + ".UTF-8" : void 0, PWD: "/", HOME: "/home", TMP: "/tmp" }, Jr = ["/usr/bin/node"], Xr = [], Zr = "v16.8.0", en = {}, tn = function(c, e) {
543
591
  console.warn((e ? e + ": " : "") + c);
@@ -550,14 +598,14 @@ var et, St, _t, Vt, Vr, Gr, Yr, Qr, Jr, Xr, Zr, en, tn, rn, nn, on, sn, an, ln,
550
598
  }, sn = function(c) {
551
599
  }, an = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, ln = !0, cn = Be, un = [], hn = {}, fn = !1, dn = {}, pn = Be, gn = Be, qt = function() {
552
600
  return {};
553
- }, mn = qt, bn = qt, yn = Be, vn = Be, wn = Be, _n = {}, kn = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, Sn = Be, En = Be, xn = Be, An = Be, In = Be, Tn = Be, Cn = Be, On = void 0, Pn = void 0, Mn = void 0, Rn = Be, jn = 2, Ln = 1, Nn = "/bin/usr/node", Un = 9229, Bn = "node", Dn = [], Fn = Be, ot = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, ot.now === void 0 && (Dr = Date.now(), ot.timing && ot.timing.navigationStart && (Dr = ot.timing.navigationStart), ot.now = () => Date.now() - Dr), or = 1e9, ir.bigint = function(c) {
601
+ }, mn = qt, bn = qt, yn = Be, vn = Be, wn = Be, _n = {}, kn = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, Sn = Be, En = Be, xn = Be, An = Be, In = Be, Tn = Be, Cn = Be, On = void 0, Pn = void 0, Mn = void 0, Rn = Be, jn = 2, Ln = 1, Nn = "/bin/usr/node", Un = 9229, Bn = "node", Fn = [], Dn = Be, ot = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, ot.now === void 0 && (Fr = Date.now(), ot.timing && ot.timing.navigationStart && (Fr = ot.timing.navigationStart), ot.now = () => Date.now() - Fr), or = 1e9, ir.bigint = function(c) {
554
602
  var e = ir(c);
555
603
  return typeof BigInt > "u" ? e[0] * or + e[1] : BigInt(e[0] * or) + BigInt(e[1]);
556
- }, $n = 10, Wn = {}, qn = 0, Hn = nt, zn = nt, Kn = nt, Vn = nt, Gn = nt, Yn = Be, Qn = nt, Jn = nt, Gi = { version: Zr, versions: en, arch: Gr, platform: Yr, browser: ln, release: an, _rawDebug: cn, moduleLoadList: un, binding: rn, _linkedBinding: Cs, _events: Wn, _eventsCount: qn, _maxListeners: $n, on: nt, addListener: Hn, once: zn, off: Kn, removeListener: Vn, removeAllListeners: Gn, emit: Yn, prependListener: Qn, prependOnceListener: Jn, listeners: Ns, domain: hn, _exiting: fn, config: dn, dlopen: Os, uptime: Ls, _getActiveRequests: Ps, _getActiveHandles: Ms, reallyExit: pn, _kill: gn, cpuUsage: qt, resourceUsage: mn, memoryUsage: bn, kill: yn, exit: vn, openStdin: wn, allowedNodeEnvironmentFlags: _n, assert: Rs, features: kn, _fatalExceptions: Sn, setUncaughtExceptionCaptureCallback: En, hasUncaughtExceptionCaptureCallback: js, emitWarning: tn, nextTick: Is, _tickCallback: xn, _debugProcess: An, _debugEnd: In, _startProfilerIdleNotifier: Tn, _stopProfilerIdleNotifier: Cn, stdout: On, stdin: Mn, stderr: Pn, abort: Rn, umask: nn, chdir: sn, cwd: on, env: Qr, title: Vr, argv: Jr, execArgv: Xr, pid: jn, ppid: Ln, execPath: Nn, debugPort: Un, hrtime: ir, argv0: Bn, _preload_modules: Dn, setSourceMapsEnabled: Fn };
604
+ }, $n = 10, Wn = {}, qn = 0, Hn = nt, zn = nt, Kn = nt, Vn = nt, Gn = nt, Yn = Be, Qn = nt, Jn = nt, Gi = { version: Zr, versions: en, arch: Gr, platform: Yr, browser: ln, release: an, _rawDebug: cn, moduleLoadList: un, binding: rn, _linkedBinding: Ms, _events: Wn, _eventsCount: qn, _maxListeners: $n, on: nt, addListener: Hn, once: zn, off: Kn, removeListener: Vn, removeAllListeners: Gn, emit: Yn, prependListener: Qn, prependOnceListener: Jn, listeners: Fs, domain: hn, _exiting: fn, config: dn, dlopen: Rs, uptime: Bs, _getActiveRequests: js, _getActiveHandles: Ls, reallyExit: pn, _kill: gn, cpuUsage: qt, resourceUsage: mn, memoryUsage: bn, kill: yn, exit: vn, openStdin: wn, allowedNodeEnvironmentFlags: _n, assert: Ns, features: kn, _fatalExceptions: Sn, setUncaughtExceptionCaptureCallback: En, hasUncaughtExceptionCaptureCallback: Us, emitWarning: tn, nextTick: Os, _tickCallback: xn, _debugProcess: An, _debugEnd: In, _startProfilerIdleNotifier: Tn, _stopProfilerIdleNotifier: Cn, stdout: On, stdin: Mn, stderr: Pn, abort: Rn, umask: nn, chdir: sn, cwd: on, env: Qr, title: Vr, argv: Jr, execArgv: Xr, pid: jn, ppid: Ln, execPath: Nn, debugPort: Un, hrtime: ir, argv0: Bn, _preload_modules: Fn, setSourceMapsEnabled: Dn };
557
605
  }), ce = He(() => {
558
- Ol();
606
+ jl();
559
607
  });
560
- function Pl() {
608
+ function Ll() {
561
609
  if (Xn) return Ot;
562
610
  Xn = !0, Ot.byteLength = s, Ot.toByteArray = l, Ot.fromByteArray = p;
563
611
  for (var c = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", a = 0, n = r.length; a < n; ++a) c[a] = r[a], e[r.charCodeAt(a)] = a;
@@ -595,7 +643,7 @@ function Pl() {
595
643
  }
596
644
  return Ot;
597
645
  }
598
- function Ml() {
646
+ function Nl() {
599
647
  return Zn ? Ht : (Zn = !0, Ht.read = function(c, e, t, r, a) {
600
648
  var n, i, s = a * 8 - r - 1, o = (1 << s) - 1, l = o >> 1, u = -7, d = t ? a - 1 : 0, p = t ? -1 : 1, y = c[e + d];
601
649
  for (d += p, n = y & (1 << -u) - 1, y >>= -u, u += s; u > 0; n = n * 256 + c[e + d], d += p, u -= 8) ;
@@ -613,10 +661,10 @@ function Ml() {
613
661
  c[t + y - f] |= g * 128;
614
662
  }, Ht);
615
663
  }
616
- function Rl() {
664
+ function Ul() {
617
665
  if (ei) return pt;
618
666
  ei = !0;
619
- let c = Pl(), e = Ml(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
667
+ let c = Ll(), e = Nl(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
620
668
  pt.Buffer = i, pt.SlowBuffer = k, pt.INSPECT_MAX_BYTES = 50;
621
669
  let r = 2147483647;
622
670
  pt.kMaxLength = r, i.TYPED_ARRAY_SUPPORT = a(), !i.TYPED_ARRAY_SUPPORT && typeof console < "u" && typeof console.error == "function" && console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");
@@ -992,12 +1040,12 @@ function Rl() {
992
1040
  }
993
1041
  return N(U);
994
1042
  }
995
- let D = 4096;
1043
+ let F = 4096;
996
1044
  function N(h) {
997
1045
  let _ = h.length;
998
- if (_ <= D) return String.fromCharCode.apply(String, h);
1046
+ if (_ <= F) return String.fromCharCode.apply(String, h);
999
1047
  let A = "", U = 0;
1000
- for (; U < _; ) A += String.fromCharCode.apply(String, h.slice(U, U += D));
1048
+ for (; U < _; ) A += String.fromCharCode.apply(String, h.slice(U, U += F));
1001
1049
  return A;
1002
1050
  }
1003
1051
  function ae(h, _, A) {
@@ -1030,30 +1078,30 @@ function Rl() {
1030
1078
  let U = this.subarray(h, _);
1031
1079
  return Object.setPrototypeOf(U, i.prototype), U;
1032
1080
  };
1033
- function F(h, _, A) {
1081
+ function D(h, _, A) {
1034
1082
  if (h % 1 !== 0 || h < 0) throw new RangeError("offset is not uint");
1035
1083
  if (h + _ > A) throw new RangeError("Trying to access beyond buffer length");
1036
1084
  }
1037
1085
  i.prototype.readUintLE = i.prototype.readUIntLE = function(h, _, A) {
1038
- h = h >>> 0, _ = _ >>> 0, A || F(h, _, this.length);
1086
+ h = h >>> 0, _ = _ >>> 0, A || D(h, _, this.length);
1039
1087
  let U = this[h], X = 1, he = 0;
1040
1088
  for (; ++he < _ && (X *= 256); ) U += this[h + he] * X;
1041
1089
  return U;
1042
1090
  }, i.prototype.readUintBE = i.prototype.readUIntBE = function(h, _, A) {
1043
- h = h >>> 0, _ = _ >>> 0, A || F(h, _, this.length);
1091
+ h = h >>> 0, _ = _ >>> 0, A || D(h, _, this.length);
1044
1092
  let U = this[h + --_], X = 1;
1045
1093
  for (; _ > 0 && (X *= 256); ) U += this[h + --_] * X;
1046
1094
  return U;
1047
1095
  }, i.prototype.readUint8 = i.prototype.readUInt8 = function(h, _) {
1048
- return h = h >>> 0, _ || F(h, 1, this.length), this[h];
1096
+ return h = h >>> 0, _ || D(h, 1, this.length), this[h];
1049
1097
  }, i.prototype.readUint16LE = i.prototype.readUInt16LE = function(h, _) {
1050
- return h = h >>> 0, _ || F(h, 2, this.length), this[h] | this[h + 1] << 8;
1098
+ return h = h >>> 0, _ || D(h, 2, this.length), this[h] | this[h + 1] << 8;
1051
1099
  }, i.prototype.readUint16BE = i.prototype.readUInt16BE = function(h, _) {
1052
- return h = h >>> 0, _ || F(h, 2, this.length), this[h] << 8 | this[h + 1];
1100
+ return h = h >>> 0, _ || D(h, 2, this.length), this[h] << 8 | this[h + 1];
1053
1101
  }, i.prototype.readUint32LE = i.prototype.readUInt32LE = function(h, _) {
1054
- return h = h >>> 0, _ || F(h, 4, this.length), (this[h] | this[h + 1] << 8 | this[h + 2] << 16) + this[h + 3] * 16777216;
1102
+ return h = h >>> 0, _ || D(h, 4, this.length), (this[h] | this[h + 1] << 8 | this[h + 2] << 16) + this[h + 3] * 16777216;
1055
1103
  }, i.prototype.readUint32BE = i.prototype.readUInt32BE = function(h, _) {
1056
- return h = h >>> 0, _ || F(h, 4, this.length), this[h] * 16777216 + (this[h + 1] << 16 | this[h + 2] << 8 | this[h + 3]);
1104
+ return h = h >>> 0, _ || D(h, 4, this.length), this[h] * 16777216 + (this[h + 1] << 16 | this[h + 2] << 8 | this[h + 3]);
1057
1105
  }, i.prototype.readBigUInt64LE = se(function(h) {
1058
1106
  h = h >>> 0, Q(h, "offset");
1059
1107
  let _ = this[h], A = this[h + 7];
@@ -1067,29 +1115,29 @@ function Rl() {
1067
1115
  let U = _ * 2 ** 24 + this[++h] * 2 ** 16 + this[++h] * 2 ** 8 + this[++h], X = this[++h] * 2 ** 24 + this[++h] * 2 ** 16 + this[++h] * 2 ** 8 + A;
1068
1116
  return (BigInt(U) << BigInt(32)) + BigInt(X);
1069
1117
  }), i.prototype.readIntLE = function(h, _, A) {
1070
- h = h >>> 0, _ = _ >>> 0, A || F(h, _, this.length);
1118
+ h = h >>> 0, _ = _ >>> 0, A || D(h, _, this.length);
1071
1119
  let U = this[h], X = 1, he = 0;
1072
1120
  for (; ++he < _ && (X *= 256); ) U += this[h + he] * X;
1073
1121
  return X *= 128, U >= X && (U -= Math.pow(2, 8 * _)), U;
1074
1122
  }, i.prototype.readIntBE = function(h, _, A) {
1075
- h = h >>> 0, _ = _ >>> 0, A || F(h, _, this.length);
1123
+ h = h >>> 0, _ = _ >>> 0, A || D(h, _, this.length);
1076
1124
  let U = _, X = 1, he = this[h + --U];
1077
1125
  for (; U > 0 && (X *= 256); ) he += this[h + --U] * X;
1078
1126
  return X *= 128, he >= X && (he -= Math.pow(2, 8 * _)), he;
1079
1127
  }, i.prototype.readInt8 = function(h, _) {
1080
- return h = h >>> 0, _ || F(h, 1, this.length), this[h] & 128 ? (255 - this[h] + 1) * -1 : this[h];
1128
+ return h = h >>> 0, _ || D(h, 1, this.length), this[h] & 128 ? (255 - this[h] + 1) * -1 : this[h];
1081
1129
  }, i.prototype.readInt16LE = function(h, _) {
1082
- h = h >>> 0, _ || F(h, 2, this.length);
1130
+ h = h >>> 0, _ || D(h, 2, this.length);
1083
1131
  let A = this[h] | this[h + 1] << 8;
1084
1132
  return A & 32768 ? A | 4294901760 : A;
1085
1133
  }, i.prototype.readInt16BE = function(h, _) {
1086
- h = h >>> 0, _ || F(h, 2, this.length);
1134
+ h = h >>> 0, _ || D(h, 2, this.length);
1087
1135
  let A = this[h + 1] | this[h] << 8;
1088
1136
  return A & 32768 ? A | 4294901760 : A;
1089
1137
  }, i.prototype.readInt32LE = function(h, _) {
1090
- return h = h >>> 0, _ || F(h, 4, this.length), this[h] | this[h + 1] << 8 | this[h + 2] << 16 | this[h + 3] << 24;
1138
+ return h = h >>> 0, _ || D(h, 4, this.length), this[h] | this[h + 1] << 8 | this[h + 2] << 16 | this[h + 3] << 24;
1091
1139
  }, i.prototype.readInt32BE = function(h, _) {
1092
- return h = h >>> 0, _ || F(h, 4, this.length), this[h] << 24 | this[h + 1] << 16 | this[h + 2] << 8 | this[h + 3];
1140
+ return h = h >>> 0, _ || D(h, 4, this.length), this[h] << 24 | this[h + 1] << 16 | this[h + 2] << 8 | this[h + 3];
1093
1141
  }, i.prototype.readBigInt64LE = se(function(h) {
1094
1142
  h = h >>> 0, Q(h, "offset");
1095
1143
  let _ = this[h], A = this[h + 7];
@@ -1103,13 +1151,13 @@ function Rl() {
1103
1151
  let U = (_ << 24) + this[++h] * 2 ** 16 + this[++h] * 2 ** 8 + this[++h];
1104
1152
  return (BigInt(U) << BigInt(32)) + BigInt(this[++h] * 2 ** 24 + this[++h] * 2 ** 16 + this[++h] * 2 ** 8 + A);
1105
1153
  }), i.prototype.readFloatLE = function(h, _) {
1106
- return h = h >>> 0, _ || F(h, 4, this.length), e.read(this, h, !0, 23, 4);
1154
+ return h = h >>> 0, _ || D(h, 4, this.length), e.read(this, h, !0, 23, 4);
1107
1155
  }, i.prototype.readFloatBE = function(h, _) {
1108
- return h = h >>> 0, _ || F(h, 4, this.length), e.read(this, h, !1, 23, 4);
1156
+ return h = h >>> 0, _ || D(h, 4, this.length), e.read(this, h, !1, 23, 4);
1109
1157
  }, i.prototype.readDoubleLE = function(h, _) {
1110
- return h = h >>> 0, _ || F(h, 8, this.length), e.read(this, h, !0, 52, 8);
1158
+ return h = h >>> 0, _ || D(h, 8, this.length), e.read(this, h, !0, 52, 8);
1111
1159
  }, i.prototype.readDoubleBE = function(h, _) {
1112
- return h = h >>> 0, _ || F(h, 8, this.length), e.read(this, h, !1, 52, 8);
1160
+ return h = h >>> 0, _ || D(h, 8, this.length), e.read(this, h, !1, 52, 8);
1113
1161
  };
1114
1162
  function Z(h, _, A, U, X, he) {
1115
1163
  if (!i.isBuffer(h)) throw new TypeError('"buffer" argument must be a Buffer instance');
@@ -1371,12 +1419,12 @@ function Rl() {
1371
1419
  }
1372
1420
  return pt;
1373
1421
  }
1374
- var Ot, Xn, Ht, Zn, pt, ei, jl = He(() => {
1422
+ var Ot, Xn, Ht, Zn, pt, ei, Bl = He(() => {
1375
1423
  le(), ue(), ce(), Ot = {}, Xn = !1, Ht = {}, Zn = !1, pt = {}, ei = !1;
1376
1424
  }), Le = {};
1377
- Lt(Le, { Buffer: () => Cr, INSPECT_MAX_BYTES: () => Us, default: () => it, kMaxLength: () => Bs });
1378
- var it, Cr, Us, Bs, Ne = He(() => {
1379
- le(), ue(), ce(), jl(), it = Rl(), it.Buffer, it.SlowBuffer, it.INSPECT_MAX_BYTES, it.kMaxLength, Cr = it.Buffer, Us = it.INSPECT_MAX_BYTES, Bs = it.kMaxLength;
1425
+ Lt(Le, { Buffer: () => Cr, INSPECT_MAX_BYTES: () => Ds, default: () => it, kMaxLength: () => $s });
1426
+ var it, Cr, Ds, $s, Ne = He(() => {
1427
+ le(), ue(), ce(), Bl(), it = Ul(), it.Buffer, it.SlowBuffer, it.INSPECT_MAX_BYTES, it.kMaxLength, Cr = it.Buffer, Ds = it.INSPECT_MAX_BYTES, $s = it.kMaxLength;
1380
1428
  }), ue = He(() => {
1381
1429
  Ne();
1382
1430
  }), Re = pe((c, e) => {
@@ -1441,7 +1489,7 @@ var it, Cr, Us, Bs, Ne = He(() => {
1441
1489
  }, Symbol, SymbolFor: Symbol.for, SymbolAsyncIterator: Symbol.asyncIterator, SymbolHasInstance: Symbol.hasInstance, SymbolIterator: Symbol.iterator, SymbolDispose: Symbol.dispose || /* @__PURE__ */ Symbol("Symbol.dispose"), SymbolAsyncDispose: Symbol.asyncDispose || /* @__PURE__ */ Symbol("Symbol.asyncDispose"), TypedArrayPrototypeSet(r, a, n) {
1442
1490
  return r.set(a, n);
1443
1491
  }, Boolean, Uint8Array };
1444
- }), Ds = pe((c, e) => {
1492
+ }), Ws = pe((c, e) => {
1445
1493
  le(), ue(), ce(), e.exports = { format(t, ...r) {
1446
1494
  return t.replace(/%([sdifj])/g, function(...[a, n]) {
1447
1495
  let i = r.shift();
@@ -1467,7 +1515,7 @@ var it, Cr, Us, Bs, Ne = He(() => {
1467
1515
  } };
1468
1516
  }), We = pe((c, e) => {
1469
1517
  le(), ue(), ce();
1470
- var { format: t, inspect: r } = Ds(), { AggregateError: a } = Re(), n = globalThis.AggregateError || a, i = /* @__PURE__ */ Symbol("kIsNodeError"), s = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], o = /^([A-Z][a-z0-9]*)+$/, l = "__node_internal_", u = {};
1518
+ var { format: t, inspect: r } = Ws(), { AggregateError: a } = Re(), n = globalThis.AggregateError || a, i = /* @__PURE__ */ Symbol("kIsNodeError"), s = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], o = /^([A-Z][a-z0-9]*)+$/, l = "__node_internal_", u = {};
1471
1519
  function d(m, w) {
1472
1520
  if (!m) throw new u.ERR_INTERNAL_ASSERTION(w);
1473
1521
  }
@@ -1622,8 +1670,8 @@ var it, Cr, Us, Bs, Ne = He(() => {
1622
1670
  var { AbortController: t, AbortSignal: r } = typeof self < "u" ? self : typeof window < "u" ? window : void 0;
1623
1671
  e.exports = t, e.exports.AbortSignal = r, e.exports.default = t;
1624
1672
  }), bt = {};
1625
- Lt(bt, { EventEmitter: () => Fs, default: () => Pt, defaultMaxListeners: () => $s, init: () => Ws, listenerCount: () => qs, on: () => Hs, once: () => zs });
1626
- function Ll() {
1673
+ Lt(bt, { EventEmitter: () => qs, default: () => Pt, defaultMaxListeners: () => Hs, init: () => zs, listenerCount: () => Ks, on: () => Vs, once: () => Gs });
1674
+ function Fl() {
1627
1675
  if (ti) return zt;
1628
1676
  ti = !0;
1629
1677
  var c = typeof Reflect == "object" ? Reflect : null, e = c && typeof c.apply == "function" ? c.apply : function(E, v, x) {
@@ -1794,8 +1842,8 @@ function Ll() {
1794
1842
  }
1795
1843
  return zt;
1796
1844
  }
1797
- var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
1798
- le(), ue(), ce(), zt = {}, ti = !1, Pt = Ll(), Pt.once, Pt.once = function(c, e) {
1845
+ var zt, ti, Pt, qs, Hs, zs, Ks, Vs, Gs, xt = He(() => {
1846
+ le(), ue(), ce(), zt = {}, ti = !1, Pt = Fl(), Pt.once, Pt.once = function(c, e) {
1799
1847
  return new Promise((t, r) => {
1800
1848
  function a(...i) {
1801
1849
  n !== void 0 && c.removeListener("error", n), t(i);
@@ -1833,10 +1881,10 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
1833
1881
  let u = r.shift();
1834
1882
  u ? u.reject(l) : a = l, i.return();
1835
1883
  }
1836
- }, { EventEmitter: Fs, defaultMaxListeners: $s, init: Ws, listenerCount: qs, on: Hs, once: zs } = Pt;
1884
+ }, { EventEmitter: qs, defaultMaxListeners: Hs, init: zs, listenerCount: Ks, on: Vs, once: Gs } = Pt;
1837
1885
  }), qe = pe((c, e) => {
1838
1886
  le(), ue(), ce();
1839
- var t = (Ne(), Oe(Le)), { format: r, inspect: a } = Ds(), { codes: { ERR_INVALID_ARG_TYPE: n } } = We(), { kResistStopPropagation: i, AggregateError: s, SymbolDispose: o } = Re(), l = globalThis.AbortSignal || Yt().AbortSignal, u = globalThis.AbortController || Yt().AbortController, d = Object.getPrototypeOf(async function() {
1887
+ var t = (Ne(), Oe(Le)), { format: r, inspect: a } = Ws(), { codes: { ERR_INVALID_ARG_TYPE: n } } = We(), { kResistStopPropagation: i, AggregateError: s, SymbolDispose: o } = Re(), l = globalThis.AbortSignal || Yt().AbortSignal, u = globalThis.AbortController || Yt().AbortController, d = Object.getPrototypeOf(async function() {
1840
1888
  }).constructor, p = globalThis.Blob || t.Blob, y = typeof p < "u" ? function(b) {
1841
1889
  return b instanceof p;
1842
1890
  } : function(b) {
@@ -1898,7 +1946,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
1898
1946
  return q === q >>> 0;
1899
1947
  }
1900
1948
  var T = /^[0-7]+$/, W = "must be a 32-bit unsigned integer or an octal string";
1901
- function D(q, ge, ve) {
1949
+ function F(q, ge, ve) {
1902
1950
  if (typeof q > "u" && (q = ve), typeof q == "string") {
1903
1951
  if (p(T, q) === null) throw new w(ge, q, W);
1904
1952
  q = u(q, 8);
@@ -1926,7 +1974,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
1926
1974
  if (typeof q != "number") throw new m(ge, "number", q);
1927
1975
  if (ve != null && q < ve || se != null && q > se || (ve != null || se != null) && s(q)) throw new E(ge, `${ve != null ? `>= ${ve}` : ""}${ve != null && se != null ? " && " : ""}${se != null ? `<= ${se}` : ""}`, q);
1928
1976
  }
1929
- var F = b((q, ge, ve) => {
1977
+ var D = b((q, ge, ve) => {
1930
1978
  if (!r(ve, q)) {
1931
1979
  let se = "must be one of: " + a(n(ve, (Te) => typeof Te == "string" ? `'${Te}'` : y(Te)), ", ");
1932
1980
  throw new w(ge, q, se);
@@ -2009,7 +2057,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2009
2057
  }
2010
2058
  throw new w("hints", q, 'must be an array or string of format "</styles.css>; rel=preload; as=style"');
2011
2059
  }
2012
- e.exports = { isInt32: O, isUint32: B, parseFileMode: D, validateArray: te, validateStringArray: we, validateBooleanArray: V, validateAbortSignalArray: L, validateBoolean: Z, validateBuffer: H, validateDictionary: be, validateEncoding: G, validateFunction: oe, validateInt32: ae, validateInteger: N, validateNumber: re, validateObject: J, validateOneOf: F, validatePlainFunction: R, validatePort: Q, validateSignalName: ne, validateString: K, validateUint32: Y, validateUndefined: $, validateUnion: ee, validateAbortSignal: me, validateLinkHeaderValue: ye };
2060
+ e.exports = { isInt32: O, isUint32: B, parseFileMode: F, validateArray: te, validateStringArray: we, validateBooleanArray: V, validateAbortSignalArray: L, validateBoolean: Z, validateBuffer: H, validateDictionary: be, validateEncoding: G, validateFunction: oe, validateInt32: ae, validateInteger: N, validateNumber: re, validateObject: J, validateOneOf: D, validatePlainFunction: R, validatePort: Q, validateSignalName: ne, validateString: K, validateUint32: Y, validateUndefined: $, validateUnion: ee, validateAbortSignal: me, validateLinkHeaderValue: ye };
2013
2061
  }), At = pe((c, e) => {
2014
2062
  le(), ue(), ce();
2015
2063
  var t = e.exports = {}, r, a;
@@ -2169,7 +2217,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2169
2217
  var J, be;
2170
2218
  return g(P) ? P.writableErrored ? P.writableErrored : (J = (be = P._writableState) === null || be === void 0 ? void 0 : be.errored) !== null && J !== void 0 ? J : null : null;
2171
2219
  }
2172
- function D(P) {
2220
+ function F(P) {
2173
2221
  var J, be;
2174
2222
  return g(P) ? P.readableErrored ? P.readableErrored : (J = (be = P._readableState) === null || be === void 0 ? void 0 : be.errored) !== null && J !== void 0 ? J : null : null;
2175
2223
  }
@@ -2194,7 +2242,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2194
2242
  let J = P._writableState, be = P._readableState, te = J || be;
2195
2243
  return !te && Y(P) || !!(te && te.autoDestroy && te.emitClose && te.closed === !1);
2196
2244
  }
2197
- function F(P) {
2245
+ function D(P) {
2198
2246
  var J;
2199
2247
  return !!(P && ((J = P[l]) !== null && J !== void 0 ? J : P.readableDidRead || P.readableAborted));
2200
2248
  }
@@ -2202,84 +2250,84 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2202
2250
  var J, be, te, we, V, L, ne, H, G, Q;
2203
2251
  return !!(P && ((J = (be = (te = (we = (V = (L = P[i]) !== null && L !== void 0 ? L : P.readableErrored) !== null && V !== void 0 ? V : P.writableErrored) !== null && we !== void 0 ? we : (ne = P._readableState) === null || ne === void 0 ? void 0 : ne.errorEmitted) !== null && te !== void 0 ? te : (H = P._writableState) === null || H === void 0 ? void 0 : H.errorEmitted) !== null && be !== void 0 ? be : (G = P._readableState) === null || G === void 0 ? void 0 : G.errored) !== null && J !== void 0 ? J : !((Q = P._writableState) === null || Q === void 0) && Q.errored));
2204
2252
  }
2205
- e.exports = { isDestroyed: v, kIsDestroyed: n, isDisturbed: F, kIsDisturbed: l, isErrored: Z, kIsErrored: i, isReadable: O, kIsReadable: s, kIsClosedPromise: u, kControllerErrorFunction: d, kIsWritable: o, isClosed: N, isDuplexNodeStream: f, isFinished: T, isIterable: E, isReadableNodeStream: p, isReadableStream: b, isReadableEnded: I, isReadableFinished: M, isReadableErrored: D, isNodeStream: g, isWebStream: w, isWritable: B, isWritableNodeStream: y, isWritableStream: k, isWritableEnded: x, isWritableFinished: S, isWritableErrored: W, isServerRequest: K, isServerResponse: Y, willEmitClose: re, isTransformStream: m };
2253
+ e.exports = { isDestroyed: v, kIsDestroyed: n, isDisturbed: D, kIsDisturbed: l, isErrored: Z, kIsErrored: i, isReadable: O, kIsReadable: s, kIsClosedPromise: u, kControllerErrorFunction: d, kIsWritable: o, isClosed: N, isDuplexNodeStream: f, isFinished: T, isIterable: E, isReadableNodeStream: p, isReadableStream: b, isReadableEnded: I, isReadableFinished: M, isReadableErrored: F, isNodeStream: g, isWebStream: w, isWritable: B, isWritableNodeStream: y, isWritableStream: k, isWritableEnded: x, isWritableFinished: S, isWritableErrored: W, isServerRequest: K, isServerResponse: Y, willEmitClose: re, isTransformStream: m };
2206
2254
  }), yt = pe((c, e) => {
2207
2255
  le(), ue(), ce();
2208
- var t = At(), { AbortError: r, codes: a } = We(), { ERR_INVALID_ARG_TYPE: n, ERR_STREAM_PREMATURE_CLOSE: i } = a, { kEmptyObject: s, once: o } = qe(), { validateAbortSignal: l, validateFunction: u, validateObject: d, validateBoolean: p } = Qt(), { Promise: y, PromisePrototypeThen: f, SymbolDispose: g } = Re(), { isClosed: b, isReadable: k, isReadableNodeStream: m, isReadableStream: w, isReadableFinished: E, isReadableErrored: v, isWritable: x, isWritableNodeStream: S, isWritableStream: I, isWritableFinished: M, isWritableErrored: O, isNodeStream: B, willEmitClose: T, kIsClosedPromise: W } = ct(), D;
2209
- function N(F) {
2210
- return F.setHeader && typeof F.abort == "function";
2256
+ var t = At(), { AbortError: r, codes: a } = We(), { ERR_INVALID_ARG_TYPE: n, ERR_STREAM_PREMATURE_CLOSE: i } = a, { kEmptyObject: s, once: o } = qe(), { validateAbortSignal: l, validateFunction: u, validateObject: d, validateBoolean: p } = Qt(), { Promise: y, PromisePrototypeThen: f, SymbolDispose: g } = Re(), { isClosed: b, isReadable: k, isReadableNodeStream: m, isReadableStream: w, isReadableFinished: E, isReadableErrored: v, isWritable: x, isWritableNodeStream: S, isWritableStream: I, isWritableFinished: M, isWritableErrored: O, isNodeStream: B, willEmitClose: T, kIsClosedPromise: W } = ct(), F;
2257
+ function N(D) {
2258
+ return D.setHeader && typeof D.abort == "function";
2211
2259
  }
2212
2260
  var ae = () => {
2213
2261
  };
2214
- function Y(F, Z, P) {
2262
+ function Y(D, Z, P) {
2215
2263
  var J, be;
2216
- if (arguments.length === 2 ? (P = Z, Z = s) : Z == null ? Z = s : d(Z, "options"), u(P, "callback"), l(Z.signal, "options.signal"), P = o(P), w(F) || I(F)) return K(F, Z, P);
2217
- if (!B(F)) throw new n("stream", ["ReadableStream", "WritableStream", "Stream"], F);
2218
- let te = (J = Z.readable) !== null && J !== void 0 ? J : m(F), we = (be = Z.writable) !== null && be !== void 0 ? be : S(F), V = F._writableState, L = F._readableState, ne = () => {
2219
- F.writable || Q();
2220
- }, H = T(F) && m(F) === te && S(F) === we, G = M(F, !1), Q = () => {
2221
- G = !0, F.destroyed && (H = !1), !(H && (!F.readable || te)) && (!te || me) && P.call(F);
2222
- }, me = E(F, !1), oe = () => {
2223
- me = !0, F.destroyed && (H = !1), !(H && (!F.writable || we)) && (!we || G) && P.call(F);
2264
+ if (arguments.length === 2 ? (P = Z, Z = s) : Z == null ? Z = s : d(Z, "options"), u(P, "callback"), l(Z.signal, "options.signal"), P = o(P), w(D) || I(D)) return K(D, Z, P);
2265
+ if (!B(D)) throw new n("stream", ["ReadableStream", "WritableStream", "Stream"], D);
2266
+ let te = (J = Z.readable) !== null && J !== void 0 ? J : m(D), we = (be = Z.writable) !== null && be !== void 0 ? be : S(D), V = D._writableState, L = D._readableState, ne = () => {
2267
+ D.writable || Q();
2268
+ }, H = T(D) && m(D) === te && S(D) === we, G = M(D, !1), Q = () => {
2269
+ G = !0, D.destroyed && (H = !1), !(H && (!D.readable || te)) && (!te || me) && P.call(D);
2270
+ }, me = E(D, !1), oe = () => {
2271
+ me = !0, D.destroyed && (H = !1), !(H && (!D.writable || we)) && (!we || G) && P.call(D);
2224
2272
  }, R = (q) => {
2225
- P.call(F, q);
2226
- }, $ = b(F), ee = () => {
2273
+ P.call(D, q);
2274
+ }, $ = b(D), ee = () => {
2227
2275
  $ = !0;
2228
- let q = O(F) || v(F);
2229
- if (q && typeof q != "boolean") return P.call(F, q);
2230
- if (te && !me && m(F, !0) && !E(F, !1)) return P.call(F, new i());
2231
- if (we && !G && !M(F, !1)) return P.call(F, new i());
2232
- P.call(F);
2276
+ let q = O(D) || v(D);
2277
+ if (q && typeof q != "boolean") return P.call(D, q);
2278
+ if (te && !me && m(D, !0) && !E(D, !1)) return P.call(D, new i());
2279
+ if (we && !G && !M(D, !1)) return P.call(D, new i());
2280
+ P.call(D);
2233
2281
  }, fe = () => {
2234
2282
  $ = !0;
2235
- let q = O(F) || v(F);
2236
- if (q && typeof q != "boolean") return P.call(F, q);
2237
- P.call(F);
2283
+ let q = O(D) || v(D);
2284
+ if (q && typeof q != "boolean") return P.call(D, q);
2285
+ P.call(D);
2238
2286
  }, de = () => {
2239
- F.req.on("finish", Q);
2287
+ D.req.on("finish", Q);
2240
2288
  };
2241
- N(F) ? (F.on("complete", Q), H || F.on("abort", ee), F.req ? de() : F.on("request", de)) : we && !V && (F.on("end", ne), F.on("close", ne)), !H && typeof F.aborted == "boolean" && F.on("aborted", ee), F.on("end", oe), F.on("finish", Q), Z.error !== !1 && F.on("error", R), F.on("close", ee), $ ? t.nextTick(ee) : V != null && V.errorEmitted || L != null && L.errorEmitted ? H || t.nextTick(fe) : (!te && (!H || k(F)) && (G || x(F) === !1) || !we && (!H || x(F)) && (me || k(F) === !1) || L && F.req && F.aborted) && t.nextTick(fe);
2289
+ N(D) ? (D.on("complete", Q), H || D.on("abort", ee), D.req ? de() : D.on("request", de)) : we && !V && (D.on("end", ne), D.on("close", ne)), !H && typeof D.aborted == "boolean" && D.on("aborted", ee), D.on("end", oe), D.on("finish", Q), Z.error !== !1 && D.on("error", R), D.on("close", ee), $ ? t.nextTick(ee) : V != null && V.errorEmitted || L != null && L.errorEmitted ? H || t.nextTick(fe) : (!te && (!H || k(D)) && (G || x(D) === !1) || !we && (!H || x(D)) && (me || k(D) === !1) || L && D.req && D.aborted) && t.nextTick(fe);
2242
2290
  let ye = () => {
2243
- P = ae, F.removeListener("aborted", ee), F.removeListener("complete", Q), F.removeListener("abort", ee), F.removeListener("request", de), F.req && F.req.removeListener("finish", Q), F.removeListener("end", ne), F.removeListener("close", ne), F.removeListener("finish", Q), F.removeListener("end", oe), F.removeListener("error", R), F.removeListener("close", ee);
2291
+ P = ae, D.removeListener("aborted", ee), D.removeListener("complete", Q), D.removeListener("abort", ee), D.removeListener("request", de), D.req && D.req.removeListener("finish", Q), D.removeListener("end", ne), D.removeListener("close", ne), D.removeListener("finish", Q), D.removeListener("end", oe), D.removeListener("error", R), D.removeListener("close", ee);
2244
2292
  };
2245
2293
  if (Z.signal && !$) {
2246
2294
  let q = () => {
2247
2295
  let ge = P;
2248
- ye(), ge.call(F, new r(void 0, { cause: Z.signal.reason }));
2296
+ ye(), ge.call(D, new r(void 0, { cause: Z.signal.reason }));
2249
2297
  };
2250
2298
  if (Z.signal.aborted) t.nextTick(q);
2251
2299
  else {
2252
- D = D || qe().addAbortListener;
2253
- let ge = D(Z.signal, q), ve = P;
2300
+ F = F || qe().addAbortListener;
2301
+ let ge = F(Z.signal, q), ve = P;
2254
2302
  P = o((...se) => {
2255
- ge[g](), ve.apply(F, se);
2303
+ ge[g](), ve.apply(D, se);
2256
2304
  });
2257
2305
  }
2258
2306
  }
2259
2307
  return ye;
2260
2308
  }
2261
- function K(F, Z, P) {
2309
+ function K(D, Z, P) {
2262
2310
  let J = !1, be = ae;
2263
2311
  if (Z.signal) if (be = () => {
2264
- J = !0, P.call(F, new r(void 0, { cause: Z.signal.reason }));
2312
+ J = !0, P.call(D, new r(void 0, { cause: Z.signal.reason }));
2265
2313
  }, Z.signal.aborted) t.nextTick(be);
2266
2314
  else {
2267
- D = D || qe().addAbortListener;
2268
- let we = D(Z.signal, be), V = P;
2315
+ F = F || qe().addAbortListener;
2316
+ let we = F(Z.signal, be), V = P;
2269
2317
  P = o((...L) => {
2270
- we[g](), V.apply(F, L);
2318
+ we[g](), V.apply(D, L);
2271
2319
  });
2272
2320
  }
2273
2321
  let te = (...we) => {
2274
- J || t.nextTick(() => P.apply(F, we));
2322
+ J || t.nextTick(() => P.apply(D, we));
2275
2323
  };
2276
- return f(F[W].promise, te, te), ae;
2324
+ return f(D[W].promise, te, te), ae;
2277
2325
  }
2278
- function re(F, Z) {
2326
+ function re(D, Z) {
2279
2327
  var P;
2280
2328
  let J = !1;
2281
2329
  return Z === null && (Z = s), (P = Z) !== null && P !== void 0 && P.cleanup && (p(Z.cleanup, "cleanup"), J = Z.cleanup), new y((be, te) => {
2282
- let we = Y(F, Z, (V) => {
2330
+ let we = Y(D, Z, (V) => {
2283
2331
  J && we(), V ? te(V) : be();
2284
2332
  });
2285
2333
  });
@@ -2288,22 +2336,22 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2288
2336
  }), Nt = pe((c, e) => {
2289
2337
  le(), ue(), ce();
2290
2338
  var t = At(), { aggregateTwoErrors: r, codes: { ERR_MULTIPLE_CALLBACK: a }, AbortError: n } = We(), { Symbol: i } = Re(), { kIsDestroyed: s, isDestroyed: o, isFinished: l, isServerRequest: u } = ct(), d = i("kDestroy"), p = i("kConstruct");
2291
- function y(T, W, D) {
2292
- T && (T.stack, W && !W.errored && (W.errored = T), D && !D.errored && (D.errored = T));
2339
+ function y(T, W, F) {
2340
+ T && (T.stack, W && !W.errored && (W.errored = T), F && !F.errored && (F.errored = T));
2293
2341
  }
2294
2342
  function f(T, W) {
2295
- let D = this._readableState, N = this._writableState, ae = N || D;
2296
- return N != null && N.destroyed || D != null && D.destroyed ? (typeof W == "function" && W(), this) : (y(T, N, D), N && (N.destroyed = !0), D && (D.destroyed = !0), ae.constructed ? g(this, T, W) : this.once(d, function(Y) {
2343
+ let F = this._readableState, N = this._writableState, ae = N || F;
2344
+ return N != null && N.destroyed || F != null && F.destroyed ? (typeof W == "function" && W(), this) : (y(T, N, F), N && (N.destroyed = !0), F && (F.destroyed = !0), ae.constructed ? g(this, T, W) : this.once(d, function(Y) {
2297
2345
  g(this, r(Y, T), W);
2298
2346
  }), this);
2299
2347
  }
2300
- function g(T, W, D) {
2348
+ function g(T, W, F) {
2301
2349
  let N = !1;
2302
2350
  function ae(Y) {
2303
2351
  if (N) return;
2304
2352
  N = !0;
2305
2353
  let K = T._readableState, re = T._writableState;
2306
- y(Y, re, K), re && (re.closed = !0), K && (K.closed = !0), typeof D == "function" && D(Y), Y ? t.nextTick(b, T, Y) : t.nextTick(k, T);
2354
+ y(Y, re, K), re && (re.closed = !0), K && (K.closed = !0), typeof F == "function" && F(Y), Y ? t.nextTick(b, T, Y) : t.nextTick(k, T);
2307
2355
  }
2308
2356
  try {
2309
2357
  T._destroy(W || null, ae);
@@ -2315,30 +2363,30 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2315
2363
  m(T, W), k(T);
2316
2364
  }
2317
2365
  function k(T) {
2318
- let W = T._readableState, D = T._writableState;
2319
- D && (D.closeEmitted = !0), W && (W.closeEmitted = !0), (D != null && D.emitClose || W != null && W.emitClose) && T.emit("close");
2366
+ let W = T._readableState, F = T._writableState;
2367
+ F && (F.closeEmitted = !0), W && (W.closeEmitted = !0), (F != null && F.emitClose || W != null && W.emitClose) && T.emit("close");
2320
2368
  }
2321
2369
  function m(T, W) {
2322
- let D = T._readableState, N = T._writableState;
2323
- N != null && N.errorEmitted || D != null && D.errorEmitted || (N && (N.errorEmitted = !0), D && (D.errorEmitted = !0), T.emit("error", W));
2370
+ let F = T._readableState, N = T._writableState;
2371
+ N != null && N.errorEmitted || F != null && F.errorEmitted || (N && (N.errorEmitted = !0), F && (F.errorEmitted = !0), T.emit("error", W));
2324
2372
  }
2325
2373
  function w() {
2326
2374
  let T = this._readableState, W = this._writableState;
2327
2375
  T && (T.constructed = !0, T.closed = !1, T.closeEmitted = !1, T.destroyed = !1, T.errored = null, T.errorEmitted = !1, T.reading = !1, T.ended = T.readable === !1, T.endEmitted = T.readable === !1), W && (W.constructed = !0, W.destroyed = !1, W.closed = !1, W.closeEmitted = !1, W.errored = null, W.errorEmitted = !1, W.finalCalled = !1, W.prefinished = !1, W.ended = W.writable === !1, W.ending = W.writable === !1, W.finished = W.writable === !1);
2328
2376
  }
2329
- function E(T, W, D) {
2377
+ function E(T, W, F) {
2330
2378
  let N = T._readableState, ae = T._writableState;
2331
2379
  if (ae != null && ae.destroyed || N != null && N.destroyed) return this;
2332
- N != null && N.autoDestroy || ae != null && ae.autoDestroy ? T.destroy(W) : W && (W.stack, ae && !ae.errored && (ae.errored = W), N && !N.errored && (N.errored = W), D ? t.nextTick(m, T, W) : m(T, W));
2380
+ N != null && N.autoDestroy || ae != null && ae.autoDestroy ? T.destroy(W) : W && (W.stack, ae && !ae.errored && (ae.errored = W), N && !N.errored && (N.errored = W), F ? t.nextTick(m, T, W) : m(T, W));
2333
2381
  }
2334
2382
  function v(T, W) {
2335
2383
  if (typeof T._construct != "function") return;
2336
- let D = T._readableState, N = T._writableState;
2337
- D && (D.constructed = !1), N && (N.constructed = !1), T.once(p, W), !(T.listenerCount(p) > 1) && t.nextTick(x, T);
2384
+ let F = T._readableState, N = T._writableState;
2385
+ F && (F.constructed = !1), N && (N.constructed = !1), T.once(p, W), !(T.listenerCount(p) > 1) && t.nextTick(x, T);
2338
2386
  }
2339
2387
  function x(T) {
2340
2388
  let W = !1;
2341
- function D(N) {
2389
+ function F(N) {
2342
2390
  if (W) {
2343
2391
  E(T, N ?? new a());
2344
2392
  return;
@@ -2349,10 +2397,10 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2349
2397
  }
2350
2398
  try {
2351
2399
  T._construct((N) => {
2352
- t.nextTick(D, N);
2400
+ t.nextTick(F, N);
2353
2401
  });
2354
2402
  } catch (N) {
2355
- t.nextTick(D, N);
2403
+ t.nextTick(F, N);
2356
2404
  }
2357
2405
  }
2358
2406
  function S(T) {
@@ -2431,7 +2479,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2431
2479
  }
2432
2480
  return y;
2433
2481
  };
2434
- }), Nl = pe((c, e) => {
2482
+ }), Dl = pe((c, e) => {
2435
2483
  le(), ue(), ce();
2436
2484
  var { StringPrototypeSlice: t, SymbolIterator: r, TypedArrayPrototypeSet: a, Uint8Array: n } = Re(), { Buffer: i } = (Ne(), Oe(Le)), { inspect: s } = qe();
2437
2485
  e.exports = class {
@@ -2534,7 +2582,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2534
2582
  return l(p.objectMode);
2535
2583
  }
2536
2584
  e.exports = { getHighWaterMark: d, getDefaultHighWaterMark: l, setDefaultHighWaterMark: u };
2537
- }), Ul = pe((c, e) => {
2585
+ }), $l = pe((c, e) => {
2538
2586
  le(), ue(), ce();
2539
2587
  var t = (Ne(), Oe(Le)), r = t.Buffer;
2540
2588
  function a(i, s) {
@@ -2558,9 +2606,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2558
2606
  if (typeof i != "number") throw new TypeError("Argument must be a number");
2559
2607
  return t.SlowBuffer(i);
2560
2608
  };
2561
- }), Bl = pe((c) => {
2609
+ }), Wl = pe((c) => {
2562
2610
  le(), ue(), ce();
2563
- var e = Ul().Buffer, t = e.isEncoding || function(m) {
2611
+ var e = $l().Buffer, t = e.isEncoding || function(m) {
2564
2612
  switch (m = "" + m, m && m.toLowerCase()) {
2565
2613
  case "hex":
2566
2614
  case "utf8":
@@ -2704,7 +2752,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2704
2752
  function k(m) {
2705
2753
  return m && m.length ? this.write(m) : "";
2706
2754
  }
2707
- }), Ks = pe((c, e) => {
2755
+ }), Ys = pe((c, e) => {
2708
2756
  le(), ue(), ce();
2709
2757
  var t = At(), { PromisePrototypeThen: r, SymbolAsyncIterator: a, SymbolIterator: n } = Re(), { Buffer: i } = (Ne(), Oe(Le)), { ERR_INVALID_ARG_TYPE: s, ERR_STREAM_NULL_VALUES: o } = We().codes;
2710
2758
  function l(u, d, p) {
@@ -2759,7 +2807,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2759
2807
  e.exports = se, se.ReadableState = ve;
2760
2808
  var { EventEmitter: g } = (xt(), Oe(bt)), { Stream: b, prependListener: k } = Yi(), { Buffer: m } = (Ne(), Oe(Le)), { addAbortSignal: w } = Mr(), E = yt(), v = qe().debuglog("stream", (C) => {
2761
2809
  v = C;
2762
- }), x = Nl(), S = Nt(), { getHighWaterMark: I, getDefaultHighWaterMark: M } = Rr(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: B, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: W, ERR_STREAM_PUSH_AFTER_EOF: D, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: N }, AbortError: ae } = We(), { validateObject: Y } = Qt(), K = f("kPaused"), { StringDecoder: re } = Bl(), F = Ks();
2810
+ }), x = Dl(), S = Nt(), { getHighWaterMark: I, getDefaultHighWaterMark: M } = Rr(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: B, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: W, ERR_STREAM_PUSH_AFTER_EOF: F, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: N }, AbortError: ae } = We(), { validateObject: Y } = Qt(), K = f("kPaused"), { StringDecoder: re } = Wl(), D = Ys();
2763
2811
  l(se.prototype, b.prototype), l(se, b);
2764
2812
  var Z = () => {
2765
2813
  }, { errorOrDestroy: P } = S, J = 1, be = 2, te = 4, we = 8, V = 16, L = 32, ne = 64, H = 128, G = 256, Q = 512, me = 1024, oe = 2048, R = 4096, $ = 8192, ee = 16384, fe = 32768, de = 65536, ye = 1 << 17, q = 1 << 18;
@@ -2803,7 +2851,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2803
2851
  if (Ee.destroyed || Ee.errored) return !1;
2804
2852
  h(C, Ee, j, !0);
2805
2853
  }
2806
- else if (Ee.ended) P(C, new D());
2854
+ else if (Ee.ended) P(C, new F());
2807
2855
  else {
2808
2856
  if (Ee.destroyed || Ee.errored) return !1;
2809
2857
  Ee.state &= ~we, Ee.decoder && !_e ? (j = Ee.decoder.write(j), Ee.objectMode || j.length !== 0 ? h(C, Ee, j, !1) : z(C, Ee)) : h(C, Ee, j, !1);
@@ -2891,12 +2939,12 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
2891
2939
  function $e() {
2892
2940
  v("onend"), C.end();
2893
2941
  }
2894
- let Ve, Ft = !1;
2942
+ let Ve, Dt = !1;
2895
2943
  function $t() {
2896
- v("cleanup"), C.removeListener("close", Xe), C.removeListener("finish", ft), Ve && C.removeListener("drain", Ve), C.removeListener("error", vt), C.removeListener("unpipe", je), _e.removeListener("end", $e), _e.removeListener("end", wt), _e.removeListener("data", Zt), Ft = !0, Ve && Se.awaitDrainWriters && (!C._writableState || C._writableState.needDrain) && Ve();
2944
+ v("cleanup"), C.removeListener("close", Xe), C.removeListener("finish", ft), Ve && C.removeListener("drain", Ve), C.removeListener("error", vt), C.removeListener("unpipe", je), _e.removeListener("end", $e), _e.removeListener("end", wt), _e.removeListener("data", Zt), Dt = !0, Ve && Se.awaitDrainWriters && (!C._writableState || C._writableState.needDrain) && Ve();
2897
2945
  }
2898
2946
  function Wt() {
2899
- Ft || (Se.pipes.length === 1 && Se.pipes[0] === C ? (v("false write response, pause", 0), Se.awaitDrainWriters = C, Se.multiAwaitDrain = !1) : Se.pipes.length > 1 && Se.pipes.includes(C) && (v("false write response, pause", Se.awaitDrainWriters.size), Se.awaitDrainWriters.add(C)), _e.pause()), Ve || (Ve = xe(_e, C), C.on("drain", Ve));
2947
+ Dt || (Se.pipes.length === 1 && Se.pipes[0] === C ? (v("false write response, pause", 0), Se.awaitDrainWriters = C, Se.multiAwaitDrain = !1) : Se.pipes.length > 1 && Se.pipes.includes(C) && (v("false write response, pause", Se.awaitDrainWriters.size), Se.awaitDrainWriters.add(C)), _e.pause()), Ve || (Ve = xe(_e, C), C.on("drain", Ve));
2900
2948
  }
2901
2949
  _e.on("data", Zt);
2902
2950
  function Zt(Ze) {
@@ -3093,16 +3141,16 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3093
3141
  C.writable && !C.writableEnded && !C.destroyed && C.end();
3094
3142
  }
3095
3143
  se.from = function(C, j) {
3096
- return F(se, C, j);
3144
+ return D(se, C, j);
3097
3145
  };
3098
3146
  var Ct;
3099
- function Dt() {
3147
+ function Ft() {
3100
3148
  return Ct === void 0 && (Ct = {}), Ct;
3101
3149
  }
3102
3150
  se.fromWeb = function(C, j) {
3103
- return Dt().newStreamReadableFromReadableStream(C, j);
3151
+ return Ft().newStreamReadableFromReadableStream(C, j);
3104
3152
  }, se.toWeb = function(C, j) {
3105
- return Dt().newReadableStreamFromStreamReadable(C, j);
3153
+ return Ft().newReadableStreamFromStreamReadable(C, j);
3106
3154
  }, se.wrap = function(C, j) {
3107
3155
  var _e, Se;
3108
3156
  return new se({ objectMode: (_e = (Se = C.readableObjectMode) !== null && Se !== void 0 ? Se : C.objectMode) !== null && _e !== void 0 ? _e : !0, ...j, destroy(Ee, je) {
@@ -3117,11 +3165,11 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3117
3165
  o(Y.prototype, y.prototype), o(Y, y);
3118
3166
  function W() {
3119
3167
  }
3120
- var D = u("kOnFinished");
3168
+ var F = u("kOnFinished");
3121
3169
  function N(R, $, ee) {
3122
3170
  typeof ee != "boolean" && (ee = $ instanceof at()), this.objectMode = !!(R && R.objectMode), ee && (this.objectMode = this.objectMode || !!(R && R.writableObjectMode)), this.highWaterMark = R ? k(this, R, "writableHighWaterMark", ee) : m(!1), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
3123
3171
  let fe = !!(R && R.decodeStrings === !1);
3124
- this.decodeStrings = !fe, this.defaultEncoding = R && R.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = P.bind(void 0, $), this.writecb = null, this.writelen = 0, this.afterWriteTickInfo = null, ae(this), this.pendingcb = 0, this.constructed = !0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !R || R.emitClose !== !1, this.autoDestroy = !R || R.autoDestroy !== !1, this.errored = null, this.closed = !1, this.closeEmitted = !1, this[D] = [];
3172
+ this.decodeStrings = !fe, this.defaultEncoding = R && R.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = P.bind(void 0, $), this.writecb = null, this.writelen = 0, this.afterWriteTickInfo = null, ae(this), this.pendingcb = 0, this.constructed = !0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = !R || R.emitClose !== !1, this.autoDestroy = !R || R.autoDestroy !== !1, this.errored = null, this.closed = !1, this.closeEmitted = !1, this[F] = [];
3125
3173
  }
3126
3174
  function ae(R) {
3127
3175
  R.buffered = [], R.bufferedIndex = 0, R.allBuffers = !0, R.allNoop = !0;
@@ -3177,7 +3225,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3177
3225
  let q = $.length < $.highWaterMark;
3178
3226
  return q || ($.needDrain = !0), $.writing || $.corked || $.errored || !$.constructed ? ($.buffered.push({ chunk: ee, encoding: fe, callback: de }), $.allBuffers && fe !== "buffer" && ($.allBuffers = !1), $.allNoop && de !== W && ($.allNoop = !1)) : ($.writelen = ye, $.writecb = de, $.writing = !0, $.sync = !0, R._write(ee, fe, $.onwrite), $.sync = !1), q && !$.errored && !$.destroyed;
3179
3227
  }
3180
- function F(R, $, ee, fe, de, ye, q) {
3228
+ function D(R, $, ee, fe, de, ye, q) {
3181
3229
  $.writelen = fe, $.writecb = q, $.writing = !0, $.sync = !0, $.destroyed ? $.onwrite(new S("write")) : ee ? R._writev(de, $.onwrite) : R._write(de, ye, $.onwrite), $.sync = !1;
3182
3230
  }
3183
3231
  function Z(R, $, ee, fe) {
@@ -3205,7 +3253,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3205
3253
  let { chunk: ye, callback: q } = R.buffered[de], ge = R.objectMode ? 1 : ye.length;
3206
3254
  R.length -= ge, q(($ = R.errored) !== null && $ !== void 0 ? $ : new S("write"));
3207
3255
  }
3208
- let ee = R[D].splice(0);
3256
+ let ee = R[F].splice(0);
3209
3257
  for (let de = 0; de < ee.length; de++) {
3210
3258
  var fe;
3211
3259
  ee[de]((fe = R.errored) !== null && fe !== void 0 ? fe : new S("end"));
@@ -3222,13 +3270,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3222
3270
  let ge = $.allNoop ? W : (se) => {
3223
3271
  for (let Te = q; Te < ee.length; ++Te) ee[Te].callback(se);
3224
3272
  }, ve = $.allNoop && q === 0 ? ee : r(ee, q);
3225
- ve.allBuffers = $.allBuffers, F(R, $, !0, $.length, ve, "", ge), ae($);
3273
+ ve.allBuffers = $.allBuffers, D(R, $, !0, $.length, ve, "", ge), ae($);
3226
3274
  } else {
3227
3275
  do {
3228
3276
  let { chunk: ge, encoding: ve, callback: se } = ee[q];
3229
3277
  ee[q++] = null;
3230
3278
  let Te = de ? 1 : ge.length;
3231
- F(R, $, !1, Te, ge, ve, se);
3279
+ D(R, $, !1, Te, ge, ve, se);
3232
3280
  } while (q < ee.length && !$.writing);
3233
3281
  q === ee.length ? ae($) : q > 256 ? (ee.splice(0, q), $.bufferedIndex = 0) : $.bufferedIndex = q;
3234
3282
  }
@@ -3245,7 +3293,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3245
3293
  let ye = K(this, R, $);
3246
3294
  ye instanceof a && (de = ye);
3247
3295
  }
3248
- return fe.corked && (fe.corked = 1, this.uncork()), de || (!fe.errored && !fe.ending ? (fe.ending = !0, H(this, fe, !0), fe.ended = !0) : fe.finished ? de = new I("end") : fe.destroyed && (de = new S("end"))), typeof ee == "function" && (de || fe.finished ? t.nextTick(ee, de) : fe[D].push(ee)), this;
3296
+ return fe.corked && (fe.corked = 1, this.uncork()), de || (!fe.errored && !fe.ending ? (fe.ending = !0, H(this, fe, !0), fe.ended = !0) : fe.finished ? de = new I("end") : fe.destroyed && (de = new S("end"))), typeof ee == "function" && (de || fe.finished ? t.nextTick(ee, de) : fe[F].push(ee)), this;
3249
3297
  };
3250
3298
  function V(R) {
3251
3299
  return R.ending && !R.destroyed && R.constructed && R.length === 0 && !R.errored && R.buffered.length === 0 && !R.finished && !R.writing && !R.errorEmitted && !R.closeEmitted;
@@ -3258,7 +3306,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3258
3306
  return;
3259
3307
  }
3260
3308
  if (ee = !0, $.pendingcb--, de) {
3261
- let ye = $[D].splice(0);
3309
+ let ye = $[F].splice(0);
3262
3310
  for (let q = 0; q < ye.length; q++) ye[q](de);
3263
3311
  T(R, de, $.sync);
3264
3312
  } else V($) && ($.prefinished = !0, R.emit("prefinish"), $.pendingcb++, t.nextTick(G, R, $));
@@ -3281,7 +3329,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3281
3329
  }
3282
3330
  function G(R, $) {
3283
3331
  $.pendingcb--, $.finished = !0;
3284
- let ee = $[D].splice(0);
3332
+ let ee = $[F].splice(0);
3285
3333
  for (let fe = 0; fe < ee.length; fe++) ee[fe]();
3286
3334
  if (R.emit("finish"), $.autoDestroy) {
3287
3335
  let fe = R._readableState;
@@ -3324,7 +3372,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3324
3372
  var Q = g.destroy;
3325
3373
  Y.prototype.destroy = function(R, $) {
3326
3374
  let ee = this._writableState;
3327
- return !ee.destroyed && (ee.bufferedIndex < ee.buffered.length || ee[D].length) && t.nextTick(te, ee), Q.call(this, R, $), this;
3375
+ return !ee.destroyed && (ee.bufferedIndex < ee.buffered.length || ee[F].length) && t.nextTick(te, ee), Q.call(this, R, $), this;
3328
3376
  }, Y.prototype._undestroy = g.undestroy, Y.prototype._destroy = function(R, $) {
3329
3377
  $(R);
3330
3378
  }, Y.prototype[p.captureRejectionSymbol] = function(R) {
@@ -3339,18 +3387,18 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3339
3387
  }, Y.toWeb = function(R) {
3340
3388
  return oe().newWritableStreamFromStreamWritable(R);
3341
3389
  };
3342
- }), Dl = pe((c, e) => {
3390
+ }), ql = pe((c, e) => {
3343
3391
  le(), ue(), ce();
3344
- var t = At(), r = (Ne(), Oe(Le)), { isReadable: a, isWritable: n, isIterable: i, isNodeStream: s, isReadableNodeStream: o, isWritableNodeStream: l, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = ct(), y = yt(), { AbortError: f, codes: { ERR_INVALID_ARG_TYPE: g, ERR_INVALID_RETURN_VALUE: b } } = We(), { destroyer: k } = Nt(), m = at(), w = jr(), E = Qi(), { createDeferredPromise: v } = qe(), x = Ks(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function(D) {
3345
- return D instanceof S;
3346
- } : function(D) {
3392
+ var t = At(), r = (Ne(), Oe(Le)), { isReadable: a, isWritable: n, isIterable: i, isNodeStream: s, isReadableNodeStream: o, isWritableNodeStream: l, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = ct(), y = yt(), { AbortError: f, codes: { ERR_INVALID_ARG_TYPE: g, ERR_INVALID_RETURN_VALUE: b } } = We(), { destroyer: k } = Nt(), m = at(), w = jr(), E = Qi(), { createDeferredPromise: v } = qe(), x = Ys(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function(F) {
3393
+ return F instanceof S;
3394
+ } : function(F) {
3347
3395
  return !1;
3348
3396
  }, M = globalThis.AbortController || Yt().AbortController, { FunctionPrototypeCall: O } = Re(), B = class extends m {
3349
- constructor(D) {
3350
- super(D), D?.readable === !1 && (this._readableState.readable = !1, this._readableState.ended = !0, this._readableState.endEmitted = !0), D?.writable === !1 && (this._writableState.writable = !1, this._writableState.ending = !0, this._writableState.ended = !0, this._writableState.finished = !0);
3397
+ constructor(F) {
3398
+ super(F), F?.readable === !1 && (this._readableState.readable = !1, this._readableState.ended = !0, this._readableState.endEmitted = !0), F?.writable === !1 && (this._writableState.writable = !1, this._writableState.ending = !0, this._writableState.ended = !0, this._writableState.finished = !0);
3351
3399
  }
3352
3400
  };
3353
- e.exports = function D(N, ae) {
3401
+ e.exports = function F(N, ae) {
3354
3402
  if (u(N)) return N;
3355
3403
  if (o(N)) return W({ readable: N });
3356
3404
  if (l(N)) return W({ writable: N });
@@ -3358,8 +3406,8 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3358
3406
  if (d(N)) return W({ readable: w.fromWeb(N) });
3359
3407
  if (p(N)) return W({ writable: E.fromWeb(N) });
3360
3408
  if (typeof N == "function") {
3361
- let { value: K, write: re, final: F, destroy: Z } = T(N);
3362
- if (i(K)) return x(B, K, { objectMode: !0, write: re, final: F, destroy: Z });
3409
+ let { value: K, write: re, final: D, destroy: Z } = T(N);
3410
+ if (i(K)) return x(B, K, { objectMode: !0, write: re, final: D, destroy: Z });
3363
3411
  let P = K?.then;
3364
3412
  if (typeof P == "function") {
3365
3413
  let J, be = O(P, K, (te) => {
@@ -3368,7 +3416,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3368
3416
  k(J, te);
3369
3417
  });
3370
3418
  return J = new B({ objectMode: !0, readable: !1, write: re, final(te) {
3371
- F(async () => {
3419
+ D(async () => {
3372
3420
  try {
3373
3421
  await be, t.nextTick(te, null);
3374
3422
  } catch (we) {
@@ -3379,11 +3427,11 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3379
3427
  }
3380
3428
  throw new b("Iterable, AsyncIterable or AsyncFunction", ae, K);
3381
3429
  }
3382
- if (I(N)) return D(N.arrayBuffer());
3430
+ if (I(N)) return F(N.arrayBuffer());
3383
3431
  if (i(N)) return x(B, N, { objectMode: !0, writable: !1 });
3384
3432
  if (d(N?.readable) && p(N?.writable)) return B.fromWeb(N);
3385
3433
  if (typeof N?.writable == "object" || typeof N?.readable == "object") {
3386
- let K = N != null && N.readable ? o(N?.readable) ? N?.readable : D(N.readable) : void 0, re = N != null && N.writable ? l(N?.writable) ? N?.writable : D(N.writable) : void 0;
3434
+ let K = N != null && N.readable ? o(N?.readable) ? N?.readable : F(N.readable) : void 0, re = N != null && N.writable ? l(N?.writable) ? N?.writable : F(N.writable) : void 0;
3387
3435
  return W({ readable: K, writable: re });
3388
3436
  }
3389
3437
  let Y = N?.then;
@@ -3398,29 +3446,29 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3398
3446
  }
3399
3447
  throw new g(ae, ["Blob", "ReadableStream", "WritableStream", "Stream", "Iterable", "AsyncIterable", "Function", "{ readable, writable } pair", "Promise"], N);
3400
3448
  };
3401
- function T(D) {
3449
+ function T(F) {
3402
3450
  let { promise: N, resolve: ae } = v(), Y = new M(), K = Y.signal;
3403
- return { value: D((async function* () {
3451
+ return { value: F((async function* () {
3404
3452
  for (; ; ) {
3405
3453
  let re = N;
3406
3454
  N = null;
3407
- let { chunk: F, done: Z, cb: P } = await re;
3455
+ let { chunk: D, done: Z, cb: P } = await re;
3408
3456
  if (t.nextTick(P), Z) return;
3409
3457
  if (K.aborted) throw new f(void 0, { cause: K.reason });
3410
- ({ promise: N, resolve: ae } = v()), yield F;
3458
+ ({ promise: N, resolve: ae } = v()), yield D;
3411
3459
  }
3412
- })(), { signal: K }), write(re, F, Z) {
3460
+ })(), { signal: K }), write(re, D, Z) {
3413
3461
  let P = ae;
3414
3462
  ae = null, P({ chunk: re, done: !1, cb: Z });
3415
3463
  }, final(re) {
3416
- let F = ae;
3417
- ae = null, F({ done: !0, cb: re });
3418
- }, destroy(re, F) {
3419
- Y.abort(), F(re);
3464
+ let D = ae;
3465
+ ae = null, D({ done: !0, cb: re });
3466
+ }, destroy(re, D) {
3467
+ Y.abort(), D(re);
3420
3468
  } };
3421
3469
  }
3422
- function W(D) {
3423
- let N = D.readable && typeof D.readable.read != "function" ? w.wrap(D.readable) : D.readable, ae = D.writable, Y = !!a(N), K = !!n(ae), re, F, Z, P, J;
3470
+ function W(F) {
3471
+ let N = F.readable && typeof F.readable.read != "function" ? w.wrap(F.readable) : F.readable, ae = F.writable, Y = !!a(N), K = !!n(ae), re, D, Z, P, J;
3424
3472
  function be(te) {
3425
3473
  let we = P;
3426
3474
  P = null, we ? we(te) : te && J.destroy(te);
@@ -3430,16 +3478,16 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3430
3478
  }), J._write = function(te, we, V) {
3431
3479
  ae.write(te, we) ? V() : re = V;
3432
3480
  }, J._final = function(te) {
3433
- ae.end(), F = te;
3481
+ ae.end(), D = te;
3434
3482
  }, ae.on("drain", function() {
3435
3483
  if (re) {
3436
3484
  let te = re;
3437
3485
  re = null, te();
3438
3486
  }
3439
3487
  }), ae.on("finish", function() {
3440
- if (F) {
3441
- let te = F;
3442
- F = null, te();
3488
+ if (D) {
3489
+ let te = D;
3490
+ D = null, te();
3443
3491
  }
3444
3492
  })), Y && (y(N, (te) => {
3445
3493
  Y = !1, te && k(N, te), be(te);
@@ -3460,7 +3508,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3460
3508
  if (!J.push(te)) return;
3461
3509
  }
3462
3510
  }), J._destroy = function(te, we) {
3463
- !te && P !== null && (te = new f()), Z = null, re = null, F = null, P === null ? we(te) : (P = we, k(ae, te), k(N, te));
3511
+ !te && P !== null && (te = new f()), Z = null, re = null, D = null, P === null ? we(te) : (P = we, k(ae, te), k(N, te));
3464
3512
  }, J;
3465
3513
  }
3466
3514
  }), at = pe((c, e) => {
@@ -3496,9 +3544,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3496
3544
  };
3497
3545
  var d;
3498
3546
  o.from = function(p) {
3499
- return d || (d = Dl()), d(p, "body");
3547
+ return d || (d = ql()), d(p, "body");
3500
3548
  };
3501
- }), Vs = pe((c, e) => {
3549
+ }), Qs = pe((c, e) => {
3502
3550
  le(), ue(), ce();
3503
3551
  var { ObjectSetPrototypeOf: t, Symbol: r } = Re();
3504
3552
  e.exports = o;
@@ -3539,11 +3587,11 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3539
3587
  this[s] = null, d();
3540
3588
  }
3541
3589
  };
3542
- }), Gs = pe((c, e) => {
3590
+ }), Js = pe((c, e) => {
3543
3591
  le(), ue(), ce();
3544
3592
  var { ObjectSetPrototypeOf: t } = Re();
3545
3593
  e.exports = a;
3546
- var r = Vs();
3594
+ var r = Qs();
3547
3595
  t(a.prototype, r.prototype), t(a, r);
3548
3596
  function a(n) {
3549
3597
  if (!(this instanceof a)) return new a(n);
@@ -3554,7 +3602,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3554
3602
  };
3555
3603
  }), Ji = pe((c, e) => {
3556
3604
  le(), ue(), ce();
3557
- var t = At(), { ArrayIsArray: r, Promise: a, SymbolAsyncIterator: n, SymbolDispose: i } = Re(), s = yt(), { once: o } = qe(), l = Nt(), u = at(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: y, ERR_MISSING_ARGS: f, ERR_STREAM_DESTROYED: g, ERR_STREAM_PREMATURE_CLOSE: b }, AbortError: k } = We(), { validateFunction: m, validateAbortSignal: w } = Qt(), { isIterable: E, isReadable: v, isReadableNodeStream: x, isNodeStream: S, isTransformStream: I, isWebStream: M, isReadableStream: O, isReadableFinished: B } = ct(), T = globalThis.AbortController || Yt().AbortController, W, D, N;
3605
+ var t = At(), { ArrayIsArray: r, Promise: a, SymbolAsyncIterator: n, SymbolDispose: i } = Re(), s = yt(), { once: o } = qe(), l = Nt(), u = at(), { aggregateTwoErrors: d, codes: { ERR_INVALID_ARG_TYPE: p, ERR_INVALID_RETURN_VALUE: y, ERR_MISSING_ARGS: f, ERR_STREAM_DESTROYED: g, ERR_STREAM_PREMATURE_CLOSE: b }, AbortError: k } = We(), { validateFunction: m, validateAbortSignal: w } = Qt(), { isIterable: E, isReadable: v, isReadableNodeStream: x, isNodeStream: S, isTransformStream: I, isWebStream: M, isReadableStream: O, isReadableFinished: B } = ct(), T = globalThis.AbortController || Yt().AbortController, W, F, N;
3558
3606
  function ae(te, we, V) {
3559
3607
  let L = !1;
3560
3608
  te.on("close", () => {
@@ -3576,9 +3624,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3576
3624
  throw new p("val", ["Readable", "Iterable", "AsyncIterable"], te);
3577
3625
  }
3578
3626
  async function* re(te) {
3579
- D || (D = jr()), yield* D.prototype[n].call(te);
3627
+ F || (F = jr()), yield* F.prototype[n].call(te);
3580
3628
  }
3581
- async function F(te, we, V, { end: L }) {
3629
+ async function D(te, we, V, { end: L }) {
3582
3630
  let ne, H = null, G = (oe) => {
3583
3631
  if (oe && (ne = oe), H) {
3584
3632
  let R = H;
@@ -3667,17 +3715,17 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3667
3715
  if (!E(ye, !0)) throw new y("AsyncIterable", `transform[${ve - 1}]`, ye);
3668
3716
  } else {
3669
3717
  var ge;
3670
- W || (W = Gs());
3718
+ W || (W = Js());
3671
3719
  let U = new W({ objectMode: !0 }), X = (ge = ye) === null || ge === void 0 ? void 0 : ge.then;
3672
3720
  if (typeof X == "function") ee++, X.call(ye, (z) => {
3673
3721
  R = z, z != null && U.write(z), _ && U.end(), t.nextTick(fe);
3674
3722
  }, (z) => {
3675
3723
  U.destroy(z), t.nextTick(fe, z);
3676
3724
  });
3677
- else if (E(ye, !0)) ee++, F(ye, U, fe, { end: _ });
3725
+ else if (E(ye, !0)) ee++, D(ye, U, fe, { end: _ });
3678
3726
  else if (O(ye) || I(ye)) {
3679
3727
  let z = ye.readable || ye;
3680
- ee++, F(z, U, fe, { end: _ });
3728
+ ee++, D(z, U, fe, { end: _ });
3681
3729
  } else throw new y("AsyncIterable or Promise", "destination", ye);
3682
3730
  ye = U;
3683
3731
  let { destroy: he, cleanup: ke } = ae(ye, !1, !0);
@@ -3690,8 +3738,8 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3690
3738
  v(se) && A && G.push(U);
3691
3739
  } else if (I(ye) || O(ye)) {
3692
3740
  let U = ye.readable || ye;
3693
- ee++, F(U, se, fe, { end: _ });
3694
- } else if (E(ye)) ee++, F(ye, se, fe, { end: _ });
3741
+ ee++, D(U, se, fe, { end: _ });
3742
+ } else if (E(ye)) ee++, D(ye, se, fe, { end: _ });
3695
3743
  else throw new p("val", ["Readable", "Iterable", "AsyncIterable", "ReadableStream", "TransformStream"], ye);
3696
3744
  ye = se;
3697
3745
  } else if (M(se)) {
@@ -3720,7 +3768,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3720
3768
  }), s(we, { readable: !1, writable: !0 }, V);
3721
3769
  }
3722
3770
  e.exports = { pipelineImpl: J, pipeline: P };
3723
- }), Ys = pe((c, e) => {
3771
+ }), Xs = pe((c, e) => {
3724
3772
  le(), ue(), ce();
3725
3773
  var { pipeline: t } = Ji(), r = at(), { destroyer: a } = Nt(), { isNodeStream: n, isReadable: i, isWritable: s, isWebStream: o, isTransformStream: l, isWritableStream: u, isReadableStream: d } = ct(), { AbortError: p, codes: { ERR_INVALID_ARG_VALUE: y, ERR_MISSING_ARGS: f } } = We(), g = yt();
3726
3774
  e.exports = function(...b) {
@@ -3742,8 +3790,8 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3742
3790
  }
3743
3791
  let I = b[0], M = t(b, S), O = !!(s(I) || u(I) || l(I)), B = !!(i(M) || d(M) || l(M));
3744
3792
  if (x = new r({ writableObjectMode: !!(I != null && I.writableObjectMode), readableObjectMode: !!(M != null && M.readableObjectMode), writable: O, readable: B }), O) {
3745
- if (n(I)) x._write = function(W, D, N) {
3746
- I.write(W, D) ? N() : m = N;
3793
+ if (n(I)) x._write = function(W, F, N) {
3794
+ I.write(W, F) ? N() : m = N;
3747
3795
  }, x._final = function(W) {
3748
3796
  I.end(), w = W;
3749
3797
  }, I.on("drain", function() {
@@ -3754,19 +3802,19 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3754
3802
  });
3755
3803
  else if (o(I)) {
3756
3804
  let W = (l(I) ? I.writable : I).getWriter();
3757
- x._write = async function(D, N, ae) {
3805
+ x._write = async function(F, N, ae) {
3758
3806
  try {
3759
- await W.ready, W.write(D).catch(() => {
3807
+ await W.ready, W.write(F).catch(() => {
3760
3808
  }), ae();
3761
3809
  } catch (Y) {
3762
3810
  ae(Y);
3763
3811
  }
3764
- }, x._final = async function(D) {
3812
+ }, x._final = async function(F) {
3765
3813
  try {
3766
3814
  await W.ready, W.close().catch(() => {
3767
- }), w = D;
3815
+ }), w = F;
3768
3816
  } catch (N) {
3769
- D(N);
3817
+ F(N);
3770
3818
  }
3771
3819
  };
3772
3820
  }
@@ -3800,9 +3848,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3800
3848
  let T = (l(M) ? M.readable : M).getReader();
3801
3849
  x._read = async function() {
3802
3850
  for (; ; ) try {
3803
- let { value: W, done: D } = await T.read();
3851
+ let { value: W, done: F } = await T.read();
3804
3852
  if (!x.push(W)) return;
3805
- if (D) {
3853
+ if (F) {
3806
3854
  x.push(null);
3807
3855
  return;
3808
3856
  }
@@ -3816,9 +3864,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3816
3864
  !T && v !== null && (T = new p()), E = null, m = null, w = null, v === null ? W(T) : (v = W, n(M) && a(M, T));
3817
3865
  }, x;
3818
3866
  };
3819
- }), Fl = pe((c, e) => {
3867
+ }), Hl = pe((c, e) => {
3820
3868
  le(), ue(), ce();
3821
- var t = globalThis.AbortController || Yt().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: a, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: i }, AbortError: s } = We(), { validateAbortSignal: o, validateInteger: l, validateObject: u } = Qt(), d = Re().Symbol("kWeak"), p = Re().Symbol("kResistStopPropagation"), { finished: y } = yt(), f = Ys(), { addAbortSignalNoValidate: g } = Mr(), { isWritable: b, isNodeStream: k } = ct(), { deprecate: m } = qe(), { ArrayPrototypePush: w, Boolean: E, MathFloor: v, Number: x, NumberIsNaN: S, Promise: I, PromiseReject: M, PromiseResolve: O, PromisePrototypeThen: B, Symbol: T } = Re(), W = T("kEmpty"), D = T("kEof");
3869
+ var t = globalThis.AbortController || Yt().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: a, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: i }, AbortError: s } = We(), { validateAbortSignal: o, validateInteger: l, validateObject: u } = Qt(), d = Re().Symbol("kWeak"), p = Re().Symbol("kResistStopPropagation"), { finished: y } = yt(), f = Xs(), { addAbortSignalNoValidate: g } = Mr(), { isWritable: b, isNodeStream: k } = ct(), { deprecate: m } = qe(), { ArrayPrototypePush: w, Boolean: E, MathFloor: v, Number: x, NumberIsNaN: S, Promise: I, PromiseReject: M, PromiseResolve: O, PromisePrototypeThen: B, Symbol: T } = Re(), W = T("kEmpty"), F = T("kEof");
3822
3870
  function N(H, G) {
3823
3871
  if (G != null && u(G, "options"), G?.signal != null && o(G.signal, "options.signal"), k(H) && !b(H)) throw new r("stream", H, "must be writable");
3824
3872
  let Q = f(this, H);
@@ -3856,7 +3904,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3856
3904
  de = _;
3857
3905
  });
3858
3906
  }
3859
- $.push(D);
3907
+ $.push(F);
3860
3908
  } catch (h) {
3861
3909
  let _ = M(h);
3862
3910
  B(_, ve, ge), $.push(_);
@@ -3869,7 +3917,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3869
3917
  for (; ; ) {
3870
3918
  for (; $.length > 0; ) {
3871
3919
  let h = await $[0];
3872
- if (h === D) return;
3920
+ if (h === F) return;
3873
3921
  if (oe.aborted) throw new s();
3874
3922
  h !== W && (yield h), $.shift(), se();
3875
3923
  }
@@ -3900,7 +3948,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3900
3948
  if (typeof H != "function") throw new a("fn", ["Function", "AsyncFunction"], H);
3901
3949
  return !await K.call(this, async (...Q) => !await H(...Q), G);
3902
3950
  }
3903
- async function F(H, G) {
3951
+ async function D(H, G) {
3904
3952
  for await (let Q of P.call(this, H, G)) return Q;
3905
3953
  }
3906
3954
  async function Z(H, G) {
@@ -3993,11 +4041,11 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
3993
4041
  }
3994
4042
  }).call(this);
3995
4043
  }
3996
- e.exports.streamReturningOperators = { asIndexedPairs: m(Y, "readable.asIndexedPairs will be removed in a future version."), drop: L, filter: P, flatMap: we, map: ae, take: ne, compose: N }, e.exports.promiseReturningOperators = { every: re, forEach: Z, reduce: be, toArray: te, some: K, find: F };
3997
- }), Qs = pe((c, e) => {
4044
+ e.exports.streamReturningOperators = { asIndexedPairs: m(Y, "readable.asIndexedPairs will be removed in a future version."), drop: L, filter: P, flatMap: we, map: ae, take: ne, compose: N }, e.exports.promiseReturningOperators = { every: re, forEach: Z, reduce: be, toArray: te, some: K, find: D };
4045
+ }), Zs = pe((c, e) => {
3998
4046
  le(), ue(), ce();
3999
4047
  var { ArrayPrototypePop: t, Promise: r } = Re(), { isIterable: a, isNodeStream: n, isWebStream: i } = ct(), { pipelineImpl: s } = Ji(), { finished: o } = yt();
4000
- Js();
4048
+ ea();
4001
4049
  function l(...u) {
4002
4050
  return new r((d, p) => {
4003
4051
  let y, f, g = u[u.length - 1];
@@ -4011,9 +4059,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4011
4059
  });
4012
4060
  }
4013
4061
  e.exports = { finished: o, pipeline: l };
4014
- }), Js = pe((c, e) => {
4062
+ }), ea = pe((c, e) => {
4015
4063
  le(), ue(), ce();
4016
- var { Buffer: t } = (Ne(), Oe(Le)), { ObjectDefineProperty: r, ObjectKeys: a, ReflectApply: n } = Re(), { promisify: { custom: i } } = qe(), { streamReturningOperators: s, promiseReturningOperators: o } = Fl(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: l } } = We(), u = Ys(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = Rr(), { pipeline: y } = Ji(), { destroyer: f } = Nt(), g = yt(), b = Qs(), k = ct(), m = e.exports = Yi().Stream;
4064
+ var { Buffer: t } = (Ne(), Oe(Le)), { ObjectDefineProperty: r, ObjectKeys: a, ReflectApply: n } = Re(), { promisify: { custom: i } } = qe(), { streamReturningOperators: s, promiseReturningOperators: o } = Hl(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: l } } = We(), u = Xs(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = Rr(), { pipeline: y } = Ji(), { destroyer: f } = Nt(), g = yt(), b = Zs(), k = ct(), m = e.exports = Yi().Stream;
4017
4065
  m.isDestroyed = k.isDestroyed, m.isDisturbed = k.isDisturbed, m.isErrored = k.isErrored, m.isReadable = k.isReadable, m.isWritable = k.isWritable, m.Readable = jr();
4018
4066
  for (let E of a(s)) {
4019
4067
  let v = function(...S) {
@@ -4029,7 +4077,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4029
4077
  }, x = o[E];
4030
4078
  r(v, "name", { __proto__: null, value: x.name }), r(v, "length", { __proto__: null, value: x.length }), r(m.Readable.prototype, E, { __proto__: null, value: v, enumerable: !1, configurable: !0, writable: !0 });
4031
4079
  }
4032
- m.Writable = Qi(), m.Duplex = at(), m.Transform = Vs(), m.PassThrough = Gs(), m.pipeline = y;
4080
+ m.Writable = Qi(), m.Duplex = at(), m.Transform = Qs(), m.PassThrough = Js(), m.pipeline = y;
4033
4081
  var { addAbortSignal: w } = Mr();
4034
4082
  m.addAbortSignal = w, m.finished = g, m.destroy = f, m.compose = u, m.setDefaultHighWaterMark = d, m.getDefaultHighWaterMark = p, r(m, "promises", { __proto__: null, configurable: !0, enumerable: !0, get() {
4035
4083
  return b;
@@ -4044,11 +4092,11 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4044
4092
  };
4045
4093
  }), It = pe((c, e) => {
4046
4094
  le(), ue(), ce();
4047
- var t = Js(), r = Qs(), a = t.Readable.destroy;
4095
+ var t = ea(), r = Zs(), a = t.Readable.destroy;
4048
4096
  e.exports = t.Readable, e.exports._uint8ArrayToBuffer = t._uint8ArrayToBuffer, e.exports._isUint8Array = t._isUint8Array, e.exports.isDisturbed = t.isDisturbed, e.exports.isErrored = t.isErrored, e.exports.isReadable = t.isReadable, e.exports.Readable = t.Readable, e.exports.Writable = t.Writable, e.exports.Duplex = t.Duplex, e.exports.Transform = t.Transform, e.exports.PassThrough = t.PassThrough, e.exports.addAbortSignal = t.addAbortSignal, e.exports.finished = t.finished, e.exports.destroy = t.destroy, e.exports.destroy = a, e.exports.pipeline = t.pipeline, e.exports.compose = t.compose, Object.defineProperty(t, "promises", { configurable: !0, enumerable: !0, get() {
4049
4097
  return r;
4050
4098
  } }), e.exports.Stream = t.Stream, e.exports.default = e.exports;
4051
- }), $l = pe((c, e) => {
4099
+ }), zl = pe((c, e) => {
4052
4100
  le(), ue(), ce(), typeof Object.create == "function" ? e.exports = function(t, r) {
4053
4101
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }));
4054
4102
  } : e.exports = function(t, r) {
@@ -4059,7 +4107,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4059
4107
  a.prototype = r.prototype, t.prototype = new a(), t.prototype.constructor = t;
4060
4108
  }
4061
4109
  };
4062
- }), Wl = pe((c, e) => {
4110
+ }), Kl = pe((c, e) => {
4063
4111
  le(), ue(), ce();
4064
4112
  var { Buffer: t } = (Ne(), Oe(Le)), r = /* @__PURE__ */ Symbol.for("BufferList");
4065
4113
  function a(n) {
@@ -4183,9 +4231,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4183
4231
  }, a.isBufferList = function(n) {
4184
4232
  return n != null && n[r];
4185
4233
  }, e.exports = a;
4186
- }), ql = pe((c, e) => {
4234
+ }), Vl = pe((c, e) => {
4187
4235
  le(), ue(), ce();
4188
- var t = It().Duplex, r = $l(), a = Wl();
4236
+ var t = It().Duplex, r = zl(), a = Kl();
4189
4237
  function n(i) {
4190
4238
  if (!(this instanceof n)) return new n(i);
4191
4239
  if (typeof i == "function") {
@@ -4215,7 +4263,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4215
4263
  }, n.prototype._isBufferList = function(i) {
4216
4264
  return i instanceof n || i instanceof a || n.isBufferList(i);
4217
4265
  }, n.isBufferList = a.isBufferList, e.exports = n, e.exports.BufferListStream = n, e.exports.BufferList = a;
4218
- }), Hl = pe((c, e) => {
4266
+ }), Gl = pe((c, e) => {
4219
4267
  le(), ue(), ce();
4220
4268
  var t = class {
4221
4269
  constructor() {
@@ -4223,7 +4271,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4223
4271
  }
4224
4272
  };
4225
4273
  e.exports = t;
4226
- }), Xs = pe((c, e) => {
4274
+ }), ta = pe((c, e) => {
4227
4275
  le(), ue(), ce();
4228
4276
  var t = e.exports, { Buffer: r } = (Ne(), Oe(Le));
4229
4277
  t.types = { 0: "reserved", 1: "connect", 2: "connack", 3: "publish", 4: "puback", 5: "pubrec", 6: "pubrel", 7: "pubcomp", 8: "subscribe", 9: "suback", 10: "unsubscribe", 11: "unsuback", 12: "pingreq", 13: "pingresp", 14: "disconnect", 15: "auth" }, t.requiredHeaderFlags = { 1: 0, 2: 0, 4: 0, 5: 0, 6: 2, 7: 0, 8: 2, 9: 0, 10: 2, 11: 0, 12: 0, 13: 0, 14: 0, 15: 0 }, t.requiredHeaderFlagsErrors = {};
@@ -4249,7 +4297,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4249
4297
  })));
4250
4298
  }
4251
4299
  t.PUBLISH_HEADER = a("publish"), t.SUBSCRIBE_HEADER = a("subscribe"), t.SUBSCRIBE_OPTIONS_QOS_MASK = 3, t.SUBSCRIBE_OPTIONS_NL_MASK = 1, t.SUBSCRIBE_OPTIONS_NL_SHIFT = 2, t.SUBSCRIBE_OPTIONS_RAP_MASK = 1, t.SUBSCRIBE_OPTIONS_RAP_SHIFT = 3, t.SUBSCRIBE_OPTIONS_RH_MASK = 3, t.SUBSCRIBE_OPTIONS_RH_SHIFT = 4, t.SUBSCRIBE_OPTIONS_RH = [0, 16, 32], t.SUBSCRIBE_OPTIONS_NL = 4, t.SUBSCRIBE_OPTIONS_RAP = 8, t.SUBSCRIBE_OPTIONS_QOS = [0, 1, 2], t.UNSUBSCRIBE_HEADER = a("unsubscribe"), t.ACKS = { unsuback: a("unsuback"), puback: a("puback"), pubcomp: a("pubcomp"), pubrel: a("pubrel"), pubrec: a("pubrec") }, t.SUBACK_HEADER = r.from([t.codes.suback << t.CMD_SHIFT]), t.VERSION3 = r.from([3]), t.VERSION4 = r.from([4]), t.VERSION5 = r.from([5]), t.VERSION131 = r.from([131]), t.VERSION132 = r.from([132]), t.QOS = [0, 1, 2].map((n) => r.from([n])), t.EMPTY = { pingreq: r.from([t.codes.pingreq << 4, 0]), pingresp: r.from([t.codes.pingresp << 4, 0]), disconnect: r.from([t.codes.disconnect << 4, 0]) }, t.MQTT5_PUBACK_PUBREC_CODES = { 0: "Success", 16: "No matching subscribers", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 144: "Topic Name invalid", 145: "Packet identifier in use", 151: "Quota exceeded", 153: "Payload format invalid" }, t.MQTT5_PUBREL_PUBCOMP_CODES = { 0: "Success", 146: "Packet Identifier not found" }, t.MQTT5_SUBACK_CODES = { 0: "Granted QoS 0", 1: "Granted QoS 1", 2: "Granted QoS 2", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 143: "Topic Filter invalid", 145: "Packet Identifier in use", 151: "Quota exceeded", 158: "Shared Subscriptions not supported", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" }, t.MQTT5_UNSUBACK_CODES = { 0: "Success", 17: "No subscription existed", 128: "Unspecified error", 131: "Implementation specific error", 135: "Not authorized", 143: "Topic Filter invalid", 145: "Packet Identifier in use" }, t.MQTT5_DISCONNECT_CODES = { 0: "Normal disconnection", 4: "Disconnect with Will Message", 128: "Unspecified error", 129: "Malformed Packet", 130: "Protocol Error", 131: "Implementation specific error", 135: "Not authorized", 137: "Server busy", 139: "Server shutting down", 141: "Keep Alive timeout", 142: "Session taken over", 143: "Topic Filter invalid", 144: "Topic Name invalid", 147: "Receive Maximum exceeded", 148: "Topic Alias invalid", 149: "Packet too large", 150: "Message rate too high", 151: "Quota exceeded", 152: "Administrative action", 153: "Payload format invalid", 154: "Retain not supported", 155: "QoS not supported", 156: "Use another server", 157: "Server moved", 158: "Shared Subscriptions not supported", 159: "Connection rate exceeded", 160: "Maximum connect time", 161: "Subscription Identifiers not supported", 162: "Wildcard Subscriptions not supported" }, t.MQTT5_AUTH_CODES = { 0: "Success", 24: "Continue authentication", 25: "Re-authenticate" };
4252
- }), zl = pe((c, e) => {
4300
+ }), Yl = pe((c, e) => {
4253
4301
  le(), ue(), ce();
4254
4302
  var t = 1e3, r = t * 60, a = r * 60, n = a * 24, i = n * 7, s = n * 365.25;
4255
4303
  e.exports = function(p, y) {
@@ -4321,10 +4369,10 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4321
4369
  var b = y >= f * 1.5;
4322
4370
  return Math.round(p / f) + " " + g + (b ? "s" : "");
4323
4371
  }
4324
- }), Kl = pe((c, e) => {
4372
+ }), Ql = pe((c, e) => {
4325
4373
  le(), ue(), ce();
4326
4374
  function t(r) {
4327
- n.debug = n, n.default = n, n.coerce = d, n.disable = l, n.enable = s, n.enabled = u, n.humanize = zl(), n.destroy = p, Object.keys(r).forEach((y) => {
4375
+ n.debug = n, n.default = n, n.coerce = d, n.disable = l, n.enable = s, n.enabled = u, n.humanize = Yl(), n.destroy = p, Object.keys(r).forEach((y) => {
4328
4376
  n[y] = r[y];
4329
4377
  }), n.names = [], n.skips = [], n.formatters = {};
4330
4378
  function a(y) {
@@ -4434,7 +4482,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4434
4482
  } catch {
4435
4483
  }
4436
4484
  }
4437
- e.exports = Kl()(c);
4485
+ e.exports = Ql()(c);
4438
4486
  var { formatters: s } = e.exports;
4439
4487
  s.j = function(o) {
4440
4488
  try {
@@ -4443,9 +4491,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4443
4491
  return "[UnexpectedJSONParseError]: " + l.message;
4444
4492
  }
4445
4493
  };
4446
- }), Vl = pe((c, e) => {
4494
+ }), Jl = pe((c, e) => {
4447
4495
  le(), ue(), ce();
4448
- var t = ql(), { EventEmitter: r } = (xt(), Oe(bt)), a = Hl(), n = Xs(), i = lt()("mqtt-packet:parser"), s = class ri extends r {
4496
+ var t = Vl(), { EventEmitter: r } = (xt(), Oe(bt)), a = Gl(), n = ta(), i = lt()("mqtt-packet:parser"), s = class ri extends r {
4449
4497
  constructor() {
4450
4498
  super(), this.parser = this.constructor.parser;
4451
4499
  }
@@ -4796,7 +4844,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4796
4844
  }
4797
4845
  };
4798
4846
  e.exports = s;
4799
- }), Gl = pe((c, e) => {
4847
+ }), Xl = pe((c, e) => {
4800
4848
  le(), ue(), ce();
4801
4849
  var { Buffer: t } = (Ne(), Oe(Le)), r = 65536, a = {}, n = t.isBuffer(t.from([1, 2]).subarray(0, 1));
4802
4850
  function i(u) {
@@ -4818,7 +4866,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4818
4866
  return d.writeUInt32BE(u, 0), d;
4819
4867
  }
4820
4868
  e.exports = { cache: a, generateCache: s, generateNumber: i, genBufVariableByteInt: o, generate4ByteBuffer: l };
4821
- }), Yl = pe((c, e) => {
4869
+ }), Zl = pe((c, e) => {
4822
4870
  le(), ue(), ce(), typeof Pe > "u" || !Pe.version || Pe.version.indexOf("v0.") === 0 || Pe.version.indexOf("v1.") === 0 && Pe.version.indexOf("v1.8.") !== 0 ? e.exports = { nextTick: t } : e.exports = Pe;
4823
4871
  function t(r, a, n, i) {
4824
4872
  if (typeof r != "function") throw new TypeError('"callback" argument must be a function');
@@ -4846,9 +4894,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4846
4894
  });
4847
4895
  }
4848
4896
  }
4849
- }), Zs = pe((c, e) => {
4897
+ }), ra = pe((c, e) => {
4850
4898
  le(), ue(), ce();
4851
- var t = Xs(), { Buffer: r } = (Ne(), Oe(Le)), a = r.allocUnsafe(0), n = r.from([0]), i = Gl(), s = Yl().nextTick, o = lt()("mqtt-packet:writeToStream"), l = i.cache, u = i.generateNumber, d = i.generateCache, p = i.genBufVariableByteInt, y = i.generate4ByteBuffer, f = Y, g = !0;
4899
+ var t = ta(), { Buffer: r } = (Ne(), Oe(Le)), a = r.allocUnsafe(0), n = r.from([0]), i = Xl(), s = Zl().nextTick, o = lt()("mqtt-packet:writeToStream"), l = i.cache, u = i.generateNumber, d = i.generateCache, p = i.genBufVariableByteInt, y = i.generate4ByteBuffer, f = Y, g = !0;
4852
4900
  function b(V, L, ne) {
4853
4901
  switch (o("generate called"), L.cork && (L.cork(), s(k, L)), g && (g = !1, d()), o("generate: packet.cmd: %s", V.cmd), V.cmd) {
4854
4902
  case "connect":
@@ -4925,9 +4973,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4925
4973
  if (we(fe)) ye += te(fe) + 2;
4926
4974
  else return L.destroy(new Error("Invalid password")), !1;
4927
4975
  }
4928
- L.write(t.CONNECT_HEADER), D(L, ye), F(L, G), H.bridgeMode && (Q += 128), L.write(Q === 131 ? t.VERSION131 : Q === 132 ? t.VERSION132 : Q === 4 ? t.VERSION4 : Q === 5 ? t.VERSION5 : t.VERSION3);
4976
+ L.write(t.CONNECT_HEADER), F(L, ye), D(L, G), H.bridgeMode && (Q += 128), L.write(Q === 131 ? t.VERSION131 : Q === 132 ? t.VERSION132 : Q === 4 ? t.VERSION4 : Q === 5 ? t.VERSION5 : t.VERSION3);
4929
4977
  let se = 0;
4930
- return se |= ee != null ? t.USERNAME_MASK : 0, se |= fe != null ? t.PASSWORD_MASK : 0, se |= me && me.retain ? t.WILL_RETAIN_MASK : 0, se |= me && me.qos ? me.qos << t.WILL_QOS_SHIFT : 0, se |= me ? t.WILL_FLAG_MASK : 0, se |= oe ? t.CLEAN_SESSION_MASK : 0, L.write(r.from([se])), f(L, R), Q === 5 && q.write(), F(L, $), me && (Q === 5 && ge.write(), N(L, me.topic), F(L, me.payload)), ee != null && F(L, ee), fe != null && F(L, fe), !0;
4978
+ return se |= ee != null ? t.USERNAME_MASK : 0, se |= fe != null ? t.PASSWORD_MASK : 0, se |= me && me.retain ? t.WILL_RETAIN_MASK : 0, se |= me && me.qos ? me.qos << t.WILL_QOS_SHIFT : 0, se |= me ? t.WILL_FLAG_MASK : 0, se |= oe ? t.CLEAN_SESSION_MASK : 0, L.write(r.from([se])), f(L, R), Q === 5 && q.write(), D(L, $), me && (Q === 5 && ge.write(), N(L, me.topic), D(L, me.payload)), ee != null && D(L, ee), fe != null && D(L, fe), !0;
4931
4979
  }
4932
4980
  function w(V, L, ne) {
4933
4981
  let H = ne ? ne.protocolVersion : 4, G = V || {}, Q = H === 5 ? G.reasonCode : G.returnCode, me = G.properties, oe = 2;
@@ -4937,7 +4985,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4937
4985
  if (R = Z(L, me), !R) return !1;
4938
4986
  oe += R.length;
4939
4987
  }
4940
- return L.write(t.CONNACK_HEADER), D(L, oe), L.write(G.sessionPresent ? t.SESSIONPRESENT_HEADER : n), L.write(r.from([Q])), R?.write(), !0;
4988
+ return L.write(t.CONNACK_HEADER), F(L, oe), L.write(G.sessionPresent ? t.SESSIONPRESENT_HEADER : n), L.write(r.from([Q])), R?.write(), !0;
4941
4989
  }
4942
4990
  function E(V, L, ne) {
4943
4991
  o("publish: packet: %o", V);
@@ -4952,7 +5000,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4952
5000
  if (de = Z(L, ee), !de) return !1;
4953
5001
  fe += de.length;
4954
5002
  }
4955
- return L.write(t.PUBLISH_HEADER[Q][G.dup ? 1 : 0][me ? 1 : 0]), D(L, fe), f(L, te(oe)), L.write(oe), Q > 0 && f(L, $), de?.write(), o("publish: payload: %o", R), L.write(R);
5003
+ return L.write(t.PUBLISH_HEADER[Q][G.dup ? 1 : 0][me ? 1 : 0]), F(L, fe), f(L, te(oe)), L.write(oe), Q > 0 && f(L, $), de?.write(), o("publish: payload: %o", R), L.write(R);
4956
5004
  }
4957
5005
  function v(V, L, ne) {
4958
5006
  let H = ne ? ne.protocolVersion : 4, G = V || {}, Q = G.cmd || "puback", me = G.messageId, oe = G.dup && Q === "pubrel" ? t.DUP_MASK : 0, R = 0, $ = G.reasonCode, ee = G.properties, fe = H === 5 ? 3 : 2;
@@ -4962,7 +5010,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4962
5010
  if (de = P(L, ee, ne, fe), !de) return !1;
4963
5011
  fe += de.length;
4964
5012
  }
4965
- return L.write(t.ACKS[Q][R][oe][0]), fe === 3 && (fe += $ !== 0 ? 1 : -1), D(L, fe), f(L, me), H === 5 && fe !== 2 && L.write(r.from([$])), de !== null ? de.write() : fe === 4 && L.write(r.from([0])), !0;
5013
+ return L.write(t.ACKS[Q][R][oe][0]), fe === 3 && (fe += $ !== 0 ? 1 : -1), F(L, fe), f(L, me), H === 5 && fe !== 2 && L.write(r.from([$])), de !== null ? de.write() : fe === 4 && L.write(r.from([0])), !0;
4966
5014
  }
4967
5015
  function x(V, L, ne) {
4968
5016
  o("subscribe: packet: ");
@@ -4987,7 +5035,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
4987
5035
  $ += r.byteLength(ye) + 2 + 1;
4988
5036
  }
4989
5037
  else return L.destroy(new Error("Invalid subscriptions")), !1;
4990
- o("subscribe: writing to stream: %o", t.SUBSCRIBE_HEADER), L.write(t.SUBSCRIBE_HEADER[1][Q ? 1 : 0][0]), D(L, $), f(L, me), ee !== null && ee.write();
5038
+ o("subscribe: writing to stream: %o", t.SUBSCRIBE_HEADER), L.write(t.SUBSCRIBE_HEADER[1][Q ? 1 : 0][0]), F(L, $), f(L, me), ee !== null && ee.write();
4991
5039
  let fe = !0;
4992
5040
  for (let de of oe) {
4993
5041
  let ye = de.topic, q = de.qos, ge = +de.nl, ve = +de.rap, se = de.rh, Te;
@@ -5008,7 +5056,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5008
5056
  if ($ = P(L, oe, ne, R), !$) return !1;
5009
5057
  R += $.length;
5010
5058
  }
5011
- return L.write(t.SUBACK_HEADER), D(L, R), f(L, Q), $ !== null && $.write(), L.write(r.from(me));
5059
+ return L.write(t.SUBACK_HEADER), F(L, R), f(L, Q), $ !== null && $.write(), L.write(r.from(me));
5012
5060
  }
5013
5061
  function I(V, L, ne) {
5014
5062
  let H = ne ? ne.protocolVersion : 4, G = V || {}, Q = G.messageId, me = G.dup ? t.DUP_MASK : 0, oe = G.unsubscriptions, R = G.properties, $ = 0;
@@ -5023,7 +5071,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5023
5071
  if (ee = Z(L, R), !ee) return !1;
5024
5072
  $ += ee.length;
5025
5073
  }
5026
- L.write(t.UNSUBSCRIBE_HEADER[1][me ? 1 : 0][0]), D(L, $), f(L, Q), ee !== null && ee.write();
5074
+ L.write(t.UNSUBSCRIBE_HEADER[1][me ? 1 : 0][0]), F(L, $), f(L, Q), ee !== null && ee.write();
5027
5075
  let fe = !0;
5028
5076
  for (let de = 0; de < oe.length; de++) fe = N(L, oe[de]);
5029
5077
  return fe;
@@ -5041,7 +5089,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5041
5089
  if (de = P(L, R, ne, fe), !de) return !1;
5042
5090
  fe += de.length;
5043
5091
  }
5044
- return L.write(t.ACKS[$][ee][me][0]), D(L, fe), f(L, Q), de !== null && de.write(), H === 5 && L.write(r.from(oe)), !0;
5092
+ return L.write(t.ACKS[$][ee][me][0]), F(L, fe), f(L, Q), de !== null && de.write(), H === 5 && L.write(r.from(oe)), !0;
5045
5093
  }
5046
5094
  function O(V, L, ne) {
5047
5095
  return L.write(t.EMPTY[V.cmd]);
@@ -5052,16 +5100,16 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5052
5100
  if (R = P(L, me, ne, oe), !R) return !1;
5053
5101
  oe += R.length;
5054
5102
  }
5055
- return L.write(r.from([t.codes.disconnect << 4])), D(L, oe), H === 5 && L.write(r.from([Q])), R !== null && R.write(), !0;
5103
+ return L.write(r.from([t.codes.disconnect << 4])), F(L, oe), H === 5 && L.write(r.from([Q])), R !== null && R.write(), !0;
5056
5104
  }
5057
5105
  function T(V, L, ne) {
5058
5106
  let H = ne ? ne.protocolVersion : 4, G = V || {}, Q = G.reasonCode, me = G.properties, oe = H === 5 ? 1 : 0;
5059
5107
  H !== 5 && L.destroy(new Error("Invalid mqtt version for auth packet"));
5060
5108
  let R = P(L, me, ne, oe);
5061
- return R ? (oe += R.length, L.write(r.from([t.codes.auth << 4])), D(L, oe), L.write(r.from([Q])), R !== null && R.write(), !0) : !1;
5109
+ return R ? (oe += R.length, L.write(r.from([t.codes.auth << 4])), F(L, oe), L.write(r.from([Q])), R !== null && R.write(), !0) : !1;
5062
5110
  }
5063
5111
  var W = {};
5064
- function D(V, L) {
5112
+ function F(V, L) {
5065
5113
  if (L > t.VARBYTEINT_MAX) return V.destroy(new Error(`Invalid variable byte integer: ${L}`)), !1;
5066
5114
  let ne = W[L];
5067
5115
  return ne || (ne = p(L), L < 16384 && (W[L] = ne)), o("writeVarByteInt: writing to stream: %o", ne), V.write(ne);
@@ -5084,7 +5132,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5084
5132
  let ne = y(L);
5085
5133
  return o("write4ByteNumber: %o", ne), V.write(ne);
5086
5134
  }
5087
- function F(V, L) {
5135
+ function D(V, L) {
5088
5136
  typeof L == "string" ? N(V, L) : L ? (f(V, L.length), V.write(L)) : f(V, 0);
5089
5137
  }
5090
5138
  function Z(V, L) {
@@ -5182,7 +5230,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5182
5230
  break;
5183
5231
  }
5184
5232
  case "binary": {
5185
- V.write(r.from([t.properties[L]])), F(V, ne);
5233
+ V.write(r.from([t.properties[L]])), D(V, ne);
5186
5234
  break;
5187
5235
  }
5188
5236
  case "int16": {
@@ -5194,7 +5242,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5194
5242
  break;
5195
5243
  }
5196
5244
  case "var": {
5197
- V.write(r.from([t.properties[L]])), D(V, ne);
5245
+ V.write(r.from([t.properties[L]])), F(V, ne);
5198
5246
  break;
5199
5247
  }
5200
5248
  case "string": {
@@ -5215,7 +5263,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5215
5263
  }
5216
5264
  }
5217
5265
  function be(V, L, ne) {
5218
- D(V, ne);
5266
+ F(V, ne);
5219
5267
  for (let H in L) if (Object.prototype.hasOwnProperty.call(L, H) && L[H] != null) {
5220
5268
  let G = L[H];
5221
5269
  if (Array.isArray(G)) for (let Q = 0; Q < G.length; Q++) J(V, H, G[Q]);
@@ -5229,9 +5277,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5229
5277
  return typeof V == "string" || V instanceof r;
5230
5278
  }
5231
5279
  e.exports = b;
5232
- }), Ql = pe((c, e) => {
5280
+ }), ec = pe((c, e) => {
5233
5281
  le(), ue(), ce();
5234
- var t = Zs(), { EventEmitter: r } = (xt(), Oe(bt)), { Buffer: a } = (Ne(), Oe(Le));
5282
+ var t = ra(), { EventEmitter: r } = (xt(), Oe(bt)), { Buffer: a } = (Ne(), Oe(Le));
5235
5283
  function n(s, o) {
5236
5284
  let l = new i();
5237
5285
  return t(s, l, o), l.concat();
@@ -5255,9 +5303,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5255
5303
  }
5256
5304
  };
5257
5305
  e.exports = n;
5258
- }), Jl = pe((c) => {
5259
- le(), ue(), ce(), c.parser = Vl().parser, c.generate = Ql(), c.writeToStream = Zs();
5260
- }), Xl = pe((c, e) => {
5306
+ }), tc = pe((c) => {
5307
+ le(), ue(), ce(), c.parser = Jl().parser, c.generate = ec(), c.writeToStream = ra();
5308
+ }), rc = pe((c, e) => {
5261
5309
  le(), ue(), ce(), e.exports = r;
5262
5310
  function t(n) {
5263
5311
  return n instanceof Cr ? Cr.from(n) : new n.constructor(n.buffer.slice(), n.byteOffset, n.length);
@@ -5357,9 +5405,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5357
5405
  return i.pop(), s.pop(), f;
5358
5406
  }
5359
5407
  }
5360
- }), Zl = pe((c, e) => {
5361
- le(), ue(), ce(), e.exports = Xl()();
5362
- }), ea = pe((c) => {
5408
+ }), nc = pe((c, e) => {
5409
+ le(), ue(), ce(), e.exports = rc()();
5410
+ }), na = pe((c) => {
5363
5411
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.validateTopic = e, c.validateTopics = t;
5364
5412
  function e(r) {
5365
5413
  let a = r.split("/");
@@ -5374,7 +5422,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5374
5422
  for (let a = 0; a < r.length; a++) if (!e(r[a])) return r[a];
5375
5423
  return null;
5376
5424
  }
5377
- }), ta = pe((c) => {
5425
+ }), ia = pe((c) => {
5378
5426
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
5379
5427
  var e = It(), t = { objectMode: !0 }, r = { clean: !0 }, a = class {
5380
5428
  options;
@@ -5410,7 +5458,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5410
5458
  }
5411
5459
  };
5412
5460
  c.default = a;
5413
- }), ec = pe((c) => {
5461
+ }), ic = pe((c) => {
5414
5462
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
5415
5463
  var e = [0, 16, 128, 131, 135, 144, 145, 151, 153], t = (r, a, n) => {
5416
5464
  r.log("handlePublish: packet %o", a), n = typeof n < "u" ? n : r.noop;
@@ -5465,21 +5513,21 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5465
5513
  }
5466
5514
  };
5467
5515
  c.default = t;
5468
- }), tc = pe((c, e) => {
5516
+ }), oc = pe((c, e) => {
5469
5517
  e.exports = { version: "5.15.0" };
5470
5518
  }), Ut = pe((c) => {
5471
5519
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.MQTTJS_VERSION = c.nextTick = c.ErrorWithSubackPacket = c.ErrorWithReasonCode = void 0, c.applyMixin = r;
5472
- var e = class ra extends Error {
5520
+ var e = class oa extends Error {
5473
5521
  code;
5474
5522
  constructor(n, i) {
5475
- super(n), this.code = i, Object.setPrototypeOf(this, ra.prototype), Object.getPrototypeOf(this).name = "ErrorWithReasonCode";
5523
+ super(n), this.code = i, Object.setPrototypeOf(this, oa.prototype), Object.getPrototypeOf(this).name = "ErrorWithReasonCode";
5476
5524
  }
5477
5525
  };
5478
5526
  c.ErrorWithReasonCode = e;
5479
- var t = class na extends Error {
5527
+ var t = class sa extends Error {
5480
5528
  packet;
5481
5529
  constructor(n, i) {
5482
- super(n), this.packet = i, Object.setPrototypeOf(this, na.prototype), Object.getPrototypeOf(this).name = "ErrorWithSubackPacket";
5530
+ super(n), this.packet = i, Object.setPrototypeOf(this, sa.prototype), Object.getPrototypeOf(this).name = "ErrorWithSubackPacket";
5483
5531
  }
5484
5532
  };
5485
5533
  c.ErrorWithSubackPacket = t;
@@ -5494,7 +5542,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5494
5542
  }
5495
5543
  c.nextTick = typeof Pe?.nextTick == "function" ? Pe.nextTick : (a) => {
5496
5544
  setTimeout(a, 0);
5497
- }, c.MQTTJS_VERSION = tc().version;
5545
+ }, c.MQTTJS_VERSION = oc().version;
5498
5546
  }), Lr = pe((c) => {
5499
5547
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.ReasonCodes = void 0;
5500
5548
  var e = Ut();
@@ -5548,7 +5596,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5548
5596
  r.disconnecting && Object.keys(r.outgoing).length === 0 && r.emit("outgoingEmpty");
5549
5597
  };
5550
5598
  c.default = t;
5551
- }), rc = pe((c) => {
5599
+ }), sc = pe((c) => {
5552
5600
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
5553
5601
  var e = Ut(), t = Lr(), r = (a, n) => {
5554
5602
  let { options: i } = a, s = i.protocolVersion, o = s === 5 ? n.reasonCode : n.returnCode;
@@ -5570,7 +5618,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5570
5618
  });
5571
5619
  };
5572
5620
  c.default = r;
5573
- }), nc = pe((c) => {
5621
+ }), ac = pe((c) => {
5574
5622
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.LRUCache = void 0;
5575
5623
  var e = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, t = /* @__PURE__ */ new Set(), r = typeof Pe == "object" && Pe ? Pe : {}, a = (y, f, g, b) => {
5576
5624
  typeof r.emitWarning == "function" ? r.emitWarning(y, f, g, b) : console.error(`[${g}] ${f}: ${y}`);
@@ -5626,7 +5674,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5626
5674
  pop() {
5627
5675
  return this.heap[--this.length];
5628
5676
  }
5629
- }, p = class ia {
5677
+ }, p = class aa {
5630
5678
  #l;
5631
5679
  #h;
5632
5680
  #g;
@@ -5697,17 +5745,17 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5697
5745
  return this.#m;
5698
5746
  }
5699
5747
  constructor(f) {
5700
- let { max: g = 0, ttl: b, ttlResolution: k = 1, ttlAutopurge: m, updateAgeOnGet: w, updateAgeOnHas: E, allowStale: v, dispose: x, disposeAfter: S, noDisposeOnSet: I, noUpdateTTL: M, maxSize: O = 0, maxEntrySize: B = 0, sizeCalculation: T, fetchMethod: W, memoMethod: D, noDeleteOnFetchRejection: N, noDeleteOnStaleGet: ae, allowStaleOnFetchRejection: Y, allowStaleOnFetchAbort: K, ignoreFetchAbort: re } = f;
5748
+ let { max: g = 0, ttl: b, ttlResolution: k = 1, ttlAutopurge: m, updateAgeOnGet: w, updateAgeOnHas: E, allowStale: v, dispose: x, disposeAfter: S, noDisposeOnSet: I, noUpdateTTL: M, maxSize: O = 0, maxEntrySize: B = 0, sizeCalculation: T, fetchMethod: W, memoMethod: F, noDeleteOnFetchRejection: N, noDeleteOnStaleGet: ae, allowStaleOnFetchRejection: Y, allowStaleOnFetchAbort: K, ignoreFetchAbort: re } = f;
5701
5749
  if (g !== 0 && !o(g)) throw new TypeError("max option must be a nonnegative integer");
5702
- let F = g ? l(g) : Array;
5703
- if (!F) throw new Error("invalid max value: " + g);
5750
+ let D = g ? l(g) : Array;
5751
+ if (!D) throw new Error("invalid max value: " + g);
5704
5752
  if (this.#l = g, this.#h = O, this.maxEntrySize = B || this.#h, this.sizeCalculation = T, this.sizeCalculation) {
5705
5753
  if (!this.#h && !this.maxEntrySize) throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");
5706
5754
  if (typeof this.sizeCalculation != "function") throw new TypeError("sizeCalculation set to non-function");
5707
5755
  }
5708
- if (D !== void 0 && typeof D != "function") throw new TypeError("memoMethod must be a function if defined");
5709
- if (this.#P = D, W !== void 0 && typeof W != "function") throw new TypeError("fetchMethod must be a function if specified");
5710
- if (this.#O = W, this.#A = !!W, this.#n = /* @__PURE__ */ new Map(), this.#r = new Array(g).fill(void 0), this.#e = new Array(g).fill(void 0), this.#c = new F(g), this.#f = new F(g), this.#a = 0, this.#o = 0, this.#y = d.create(g), this.#i = 0, this.#b = 0, typeof x == "function" && (this.#g = x), typeof S == "function" ? (this.#m = S, this.#s = []) : (this.#m = void 0, this.#s = void 0), this.#_ = !!this.#g, this.#u = !!this.#m, this.noDisposeOnSet = !!I, this.noUpdateTTL = !!M, this.noDeleteOnFetchRejection = !!N, this.allowStaleOnFetchRejection = !!Y, this.allowStaleOnFetchAbort = !!K, this.ignoreFetchAbort = !!re, this.maxEntrySize !== 0) {
5756
+ if (F !== void 0 && typeof F != "function") throw new TypeError("memoMethod must be a function if defined");
5757
+ if (this.#P = F, W !== void 0 && typeof W != "function") throw new TypeError("fetchMethod must be a function if specified");
5758
+ if (this.#O = W, this.#A = !!W, this.#n = /* @__PURE__ */ new Map(), this.#r = new Array(g).fill(void 0), this.#e = new Array(g).fill(void 0), this.#c = new D(g), this.#f = new D(g), this.#a = 0, this.#o = 0, this.#y = d.create(g), this.#i = 0, this.#b = 0, typeof x == "function" && (this.#g = x), typeof S == "function" ? (this.#m = S, this.#s = []) : (this.#m = void 0, this.#s = void 0), this.#_ = !!this.#g, this.#u = !!this.#m, this.noDisposeOnSet = !!I, this.noUpdateTTL = !!M, this.noDeleteOnFetchRejection = !!N, this.allowStaleOnFetchRejection = !!Y, this.allowStaleOnFetchAbort = !!K, this.ignoreFetchAbort = !!re, this.maxEntrySize !== 0) {
5711
5759
  if (this.#h !== 0 && !o(this.#h)) throw new TypeError("maxSize must be a positive integer if specified");
5712
5760
  if (!o(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
5713
5761
  this.#$();
@@ -5719,7 +5767,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5719
5767
  if (this.#l === 0 && this.ttl === 0 && this.#h === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
5720
5768
  if (!this.ttlAutopurge && !this.#l && !this.#h) {
5721
5769
  let Z = "LRU_CACHE_UNBOUNDED";
5722
- s(Z) && (t.add(Z), a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Z, ia));
5770
+ s(Z) && (t.add(Z), a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Z, aa));
5723
5771
  }
5724
5772
  }
5725
5773
  getRemainingTTL(f) {
@@ -5969,17 +6017,17 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5969
6017
  let w = new n(), { signal: E } = b;
5970
6018
  E?.addEventListener("abort", () => w.abort(E.reason), { signal: w.signal });
5971
6019
  let v = { signal: w.signal, options: b, context: k }, x = (T, W = !1) => {
5972
- let { aborted: D } = w.signal, N = b.ignoreFetchAbort && T !== void 0;
5973
- if (b.status && (D && !W ? (b.status.fetchAborted = !0, b.status.fetchError = w.signal.reason, N && (b.status.fetchAbortIgnored = !0)) : b.status.fetchResolved = !0), D && !N && !W) return I(w.signal.reason);
6020
+ let { aborted: F } = w.signal, N = b.ignoreFetchAbort && T !== void 0;
6021
+ if (b.status && (F && !W ? (b.status.fetchAborted = !0, b.status.fetchError = w.signal.reason, N && (b.status.fetchAbortIgnored = !0)) : b.status.fetchResolved = !0), F && !N && !W) return I(w.signal.reason);
5974
6022
  let ae = O;
5975
6023
  return this.#e[g] === O && (T === void 0 ? ae.__staleWhileFetching ? this.#e[g] = ae.__staleWhileFetching : this.#E(f, "fetch") : (b.status && (b.status.fetchUpdated = !0), this.set(f, T, v.options))), T;
5976
6024
  }, S = (T) => (b.status && (b.status.fetchRejected = !0, b.status.fetchError = T), I(T)), I = (T) => {
5977
- let { aborted: W } = w.signal, D = W && b.allowStaleOnFetchAbort, N = D || b.allowStaleOnFetchRejection, ae = N || b.noDeleteOnFetchRejection, Y = O;
5978
- if (this.#e[g] === O && (!ae || Y.__staleWhileFetching === void 0 ? this.#E(f, "fetch") : D || (this.#e[g] = Y.__staleWhileFetching)), N) return b.status && Y.__staleWhileFetching !== void 0 && (b.status.returnedStale = !0), Y.__staleWhileFetching;
6025
+ let { aborted: W } = w.signal, F = W && b.allowStaleOnFetchAbort, N = F || b.allowStaleOnFetchRejection, ae = N || b.noDeleteOnFetchRejection, Y = O;
6026
+ if (this.#e[g] === O && (!ae || Y.__staleWhileFetching === void 0 ? this.#E(f, "fetch") : F || (this.#e[g] = Y.__staleWhileFetching)), N) return b.status && Y.__staleWhileFetching !== void 0 && (b.status.returnedStale = !0), Y.__staleWhileFetching;
5979
6027
  if (Y.__returned === Y) throw T;
5980
6028
  }, M = (T, W) => {
5981
- let D = this.#O?.(f, m, v);
5982
- D && D instanceof Promise && D.then((N) => T(N === void 0 ? void 0 : N), W), w.signal.addEventListener("abort", () => {
6029
+ let F = this.#O?.(f, m, v);
6030
+ F && F instanceof Promise && F.then((N) => T(N === void 0 ? void 0 : N), W), w.signal.addEventListener("abort", () => {
5983
6031
  (!b.ignoreFetchAbort || b.allowStaleOnFetchAbort) && (T(void 0), b.allowStaleOnFetchAbort && (T = (N) => x(N, !0)));
5984
6032
  });
5985
6033
  };
@@ -5993,23 +6041,23 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
5993
6041
  return !!g && g instanceof Promise && g.hasOwnProperty("__staleWhileFetching") && g.__abortController instanceof n;
5994
6042
  }
5995
6043
  async fetch(f, g = {}) {
5996
- let { allowStale: b = this.allowStale, updateAgeOnGet: k = this.updateAgeOnGet, noDeleteOnStaleGet: m = this.noDeleteOnStaleGet, ttl: w = this.ttl, noDisposeOnSet: E = this.noDisposeOnSet, size: v = 0, sizeCalculation: x = this.sizeCalculation, noUpdateTTL: S = this.noUpdateTTL, noDeleteOnFetchRejection: I = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: M = this.allowStaleOnFetchRejection, ignoreFetchAbort: O = this.ignoreFetchAbort, allowStaleOnFetchAbort: B = this.allowStaleOnFetchAbort, context: T, forceRefresh: W = !1, status: D, signal: N } = g;
5997
- if (!this.#A) return D && (D.fetch = "get"), this.get(f, { allowStale: b, updateAgeOnGet: k, noDeleteOnStaleGet: m, status: D });
5998
- let ae = { allowStale: b, updateAgeOnGet: k, noDeleteOnStaleGet: m, ttl: w, noDisposeOnSet: E, size: v, sizeCalculation: x, noUpdateTTL: S, noDeleteOnFetchRejection: I, allowStaleOnFetchRejection: M, allowStaleOnFetchAbort: B, ignoreFetchAbort: O, status: D, signal: N }, Y = this.#n.get(f);
6044
+ let { allowStale: b = this.allowStale, updateAgeOnGet: k = this.updateAgeOnGet, noDeleteOnStaleGet: m = this.noDeleteOnStaleGet, ttl: w = this.ttl, noDisposeOnSet: E = this.noDisposeOnSet, size: v = 0, sizeCalculation: x = this.sizeCalculation, noUpdateTTL: S = this.noUpdateTTL, noDeleteOnFetchRejection: I = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: M = this.allowStaleOnFetchRejection, ignoreFetchAbort: O = this.ignoreFetchAbort, allowStaleOnFetchAbort: B = this.allowStaleOnFetchAbort, context: T, forceRefresh: W = !1, status: F, signal: N } = g;
6045
+ if (!this.#A) return F && (F.fetch = "get"), this.get(f, { allowStale: b, updateAgeOnGet: k, noDeleteOnStaleGet: m, status: F });
6046
+ let ae = { allowStale: b, updateAgeOnGet: k, noDeleteOnStaleGet: m, ttl: w, noDisposeOnSet: E, size: v, sizeCalculation: x, noUpdateTTL: S, noDeleteOnFetchRejection: I, allowStaleOnFetchRejection: M, allowStaleOnFetchAbort: B, ignoreFetchAbort: O, status: F, signal: N }, Y = this.#n.get(f);
5999
6047
  if (Y === void 0) {
6000
- D && (D.fetch = "miss");
6048
+ F && (F.fetch = "miss");
6001
6049
  let K = this.#j(f, Y, ae, T);
6002
6050
  return K.__returned = K;
6003
6051
  } else {
6004
6052
  let K = this.#e[Y];
6005
6053
  if (this.#t(K)) {
6006
6054
  let P = b && K.__staleWhileFetching !== void 0;
6007
- return D && (D.fetch = "inflight", P && (D.returnedStale = !0)), P ? K.__staleWhileFetching : K.__returned = K;
6055
+ return F && (F.fetch = "inflight", P && (F.returnedStale = !0)), P ? K.__staleWhileFetching : K.__returned = K;
6008
6056
  }
6009
6057
  let re = this.#p(Y);
6010
- if (!W && !re) return D && (D.fetch = "hit"), this.#C(Y), k && this.#I(Y), D && this.#x(D, Y), K;
6011
- let F = this.#j(f, Y, ae, T), Z = F.__staleWhileFetching !== void 0 && b;
6012
- return D && (D.fetch = re ? "stale" : "refresh", Z && re && (D.returnedStale = !0)), Z ? F.__staleWhileFetching : F.__returned = F;
6058
+ if (!W && !re) return F && (F.fetch = "hit"), this.#C(Y), k && this.#I(Y), F && this.#x(F, Y), K;
6059
+ let D = this.#j(f, Y, ae, T), Z = D.__staleWhileFetching !== void 0 && b;
6060
+ return F && (F.fetch = re ? "stale" : "refresh", Z && re && (F.returnedStale = !0)), Z ? D.__staleWhileFetching : D.__returned = D;
6013
6061
  }
6014
6062
  }
6015
6063
  async forceFetch(f, g = {}) {
@@ -6032,11 +6080,11 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6032
6080
  return w && this.#x(w, E), this.#p(E) ? (w && (w.get = "stale"), x ? (w && b && v.__staleWhileFetching !== void 0 && (w.returnedStale = !0), b ? v.__staleWhileFetching : void 0) : (m || this.#E(f, "expire"), w && b && (w.returnedStale = !0), b ? v : void 0)) : (w && (w.get = "hit"), x ? v.__staleWhileFetching : (this.#C(E), k && this.#I(E), v));
6033
6081
  } else w && (w.get = "miss");
6034
6082
  }
6035
- #D(f, g) {
6083
+ #F(f, g) {
6036
6084
  this.#f[g] = f, this.#c[f] = g;
6037
6085
  }
6038
6086
  #C(f) {
6039
- f !== this.#o && (f === this.#a ? this.#a = this.#c[f] : this.#D(this.#f[f], this.#c[f]), this.#D(this.#o, f), this.#o = f);
6087
+ f !== this.#o && (f === this.#a ? this.#a = this.#c[f] : this.#F(this.#f[f], this.#c[f]), this.#F(this.#o, f), this.#o = f);
6040
6088
  }
6041
6089
  delete(f) {
6042
6090
  return this.#E(f, "delete");
@@ -6045,7 +6093,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6045
6093
  let b = !1;
6046
6094
  if (this.#i !== 0) {
6047
6095
  let k = this.#n.get(f);
6048
- if (k !== void 0) if (b = !0, this.#i === 1) this.#F(g);
6096
+ if (k !== void 0) if (b = !0, this.#i === 1) this.#D(g);
6049
6097
  else {
6050
6098
  this.#T(k);
6051
6099
  let m = this.#e[k];
@@ -6067,9 +6115,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6067
6115
  return b;
6068
6116
  }
6069
6117
  clear() {
6070
- return this.#F("delete");
6118
+ return this.#D("delete");
6071
6119
  }
6072
- #F(f) {
6120
+ #D(f) {
6073
6121
  for (let g of this.#S({ allowStale: !0 })) {
6074
6122
  let b = this.#e[g];
6075
6123
  if (this.#t(b)) b.__abortController.abort(new Error("deleted"));
@@ -6114,7 +6162,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6114
6162
  var r = class extends t {
6115
6163
  };
6116
6164
  c.Container = r;
6117
- }), ic = pe((c) => {
6165
+ }), lc = pe((c) => {
6118
6166
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6119
6167
  var e = ut(), t = class extends e.Base {
6120
6168
  constructor(a = []) {
@@ -6138,7 +6186,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6138
6186
  }
6139
6187
  }, r = t;
6140
6188
  c.default = r;
6141
- }), oc = pe((c) => {
6189
+ }), cc = pe((c) => {
6142
6190
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6143
6191
  var e = ut(), t = class extends e.Base {
6144
6192
  constructor(a = []) {
@@ -6170,7 +6218,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6170
6218
  }
6171
6219
  }, r = t;
6172
6220
  c.default = r;
6173
- }), sc = pe((c) => {
6221
+ }), uc = pe((c) => {
6174
6222
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6175
6223
  var e = ut(), t = class extends e.Base {
6176
6224
  constructor(a = [], n = function(s, o) {
@@ -6246,7 +6294,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6246
6294
  function e() {
6247
6295
  throw new RangeError("Iterator access denied!");
6248
6296
  }
6249
- }), oa = pe((c) => {
6297
+ }), la = pe((c) => {
6250
6298
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.RandomIterator = void 0;
6251
6299
  var e = ut(), t = ht(), r = class extends e.ContainerIterator {
6252
6300
  constructor(a, n) {
@@ -6268,18 +6316,18 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6268
6316
  }
6269
6317
  };
6270
6318
  c.RandomIterator = r;
6271
- }), ac = pe((c) => {
6319
+ }), hc = pe((c) => {
6272
6320
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6273
- var e = r(Xi()), t = oa();
6321
+ var e = r(Xi()), t = la();
6274
6322
  function r(s) {
6275
6323
  return s && s.t ? s : { default: s };
6276
6324
  }
6277
- var a = class sa extends t.RandomIterator {
6325
+ var a = class ca extends t.RandomIterator {
6278
6326
  constructor(o, l, u) {
6279
6327
  super(o, u), this.container = l;
6280
6328
  }
6281
6329
  copy() {
6282
- return new sa(this.o, this.container, this.iteratorType);
6330
+ return new ca(this.o, this.container, this.iteratorType);
6283
6331
  }
6284
6332
  }, n = class extends e.default {
6285
6333
  constructor(s = [], o = !0) {
@@ -6369,13 +6417,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6369
6417
  }
6370
6418
  }, i = n;
6371
6419
  c.default = i;
6372
- }), lc = pe((c) => {
6420
+ }), fc = pe((c) => {
6373
6421
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6374
6422
  var e = a(Xi()), t = ut(), r = ht();
6375
6423
  function a(o) {
6376
6424
  return o && o.t ? o : { default: o };
6377
6425
  }
6378
- var n = class aa extends t.ContainerIterator {
6426
+ var n = class ua extends t.ContainerIterator {
6379
6427
  constructor(l, u, d, p) {
6380
6428
  super(p), this.o = l, this.h = u, this.container = d, this.iteratorType === 0 ? (this.pre = function() {
6381
6429
  return this.o.L === this.h && (0, r.throwIteratorAccessError)(), this.o = this.o.L, this;
@@ -6394,7 +6442,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6394
6442
  this.o === this.h && (0, r.throwIteratorAccessError)(), this.o.l = l;
6395
6443
  }
6396
6444
  copy() {
6397
- return new aa(this.o, this.h, this.container, this.iteratorType);
6445
+ return new ua(this.o, this.h, this.container, this.iteratorType);
6398
6446
  }
6399
6447
  }, i = class extends e.default {
6400
6448
  constructor(o = []) {
@@ -6554,18 +6602,18 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6554
6602
  }
6555
6603
  }, s = i;
6556
6604
  c.default = s;
6557
- }), cc = pe((c) => {
6605
+ }), dc = pe((c) => {
6558
6606
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6559
- var e = r(Xi()), t = oa();
6607
+ var e = r(Xi()), t = la();
6560
6608
  function r(s) {
6561
6609
  return s && s.t ? s : { default: s };
6562
6610
  }
6563
- var a = class la extends t.RandomIterator {
6611
+ var a = class ha extends t.RandomIterator {
6564
6612
  constructor(o, l, u) {
6565
6613
  super(o, u), this.container = l;
6566
6614
  }
6567
6615
  copy() {
6568
- return new la(this.o, this.container, this.iteratorType);
6616
+ return new ha(this.o, this.container, this.iteratorType);
6569
6617
  }
6570
6618
  }, n = class extends e.default {
6571
6619
  constructor(s = [], o = 4096) {
@@ -6739,7 +6787,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6739
6787
  }
6740
6788
  }, i = n;
6741
6789
  c.default = i;
6742
- }), uc = pe((c) => {
6790
+ }), pc = pe((c) => {
6743
6791
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.TreeNodeEnableIndex = c.TreeNode = void 0;
6744
6792
  var e = class {
6745
6793
  constructor(r, a) {
@@ -6794,9 +6842,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
6794
6842
  }
6795
6843
  };
6796
6844
  c.TreeNodeEnableIndex = t;
6797
- }), ca = pe((c) => {
6845
+ }), fa = pe((c) => {
6798
6846
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
6799
- var e = uc(), t = ut(), r = ht(), a = class extends t.Container {
6847
+ var e = pc(), t = ut(), r = ht(), a = class extends t.Container {
6800
6848
  constructor(i = function(o, l) {
6801
6849
  return o < l ? -1 : o > l ? 1 : 0;
6802
6850
  }, s = !1) {
@@ -7048,7 +7096,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7048
7096
  }
7049
7097
  }, n = a;
7050
7098
  c.default = n;
7051
- }), ua = pe((c) => {
7099
+ }), da = pe((c) => {
7052
7100
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
7053
7101
  var e = ut(), t = ht(), r = class extends e.ContainerIterator {
7054
7102
  constructor(n, i, s) {
@@ -7074,13 +7122,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7074
7122
  }
7075
7123
  }, a = r;
7076
7124
  c.default = a;
7077
- }), hc = pe((c) => {
7125
+ }), gc = pe((c) => {
7078
7126
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
7079
- var e = a(ca()), t = a(ua()), r = ht();
7127
+ var e = a(fa()), t = a(da()), r = ht();
7080
7128
  function a(o) {
7081
7129
  return o && o.t ? o : { default: o };
7082
7130
  }
7083
- var n = class ha extends t.default {
7131
+ var n = class pa extends t.default {
7084
7132
  constructor(l, u, d, p) {
7085
7133
  super(l, u, p), this.container = d;
7086
7134
  }
@@ -7088,7 +7136,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7088
7136
  return this.o === this.h && (0, r.throwIteratorAccessError)(), this.o.u;
7089
7137
  }
7090
7138
  copy() {
7091
- return new ha(this.o, this.h, this.container, this.iteratorType);
7139
+ return new pa(this.o, this.h, this.container, this.iteratorType);
7092
7140
  }
7093
7141
  }, i = class extends e.default {
7094
7142
  constructor(o = [], l, u) {
@@ -7153,13 +7201,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7153
7201
  }
7154
7202
  }, s = i;
7155
7203
  c.default = s;
7156
- }), fc = pe((c) => {
7204
+ }), mc = pe((c) => {
7157
7205
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
7158
- var e = a(ca()), t = a(ua()), r = ht();
7206
+ var e = a(fa()), t = a(da()), r = ht();
7159
7207
  function a(o) {
7160
7208
  return o && o.t ? o : { default: o };
7161
7209
  }
7162
- var n = class fa extends t.default {
7210
+ var n = class ga extends t.default {
7163
7211
  constructor(l, u, d, p) {
7164
7212
  super(l, u, p), this.container = d;
7165
7213
  }
@@ -7175,7 +7223,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7175
7223
  } });
7176
7224
  }
7177
7225
  copy() {
7178
- return new fa(this.o, this.h, this.container, this.iteratorType);
7226
+ return new ga(this.o, this.h, this.container, this.iteratorType);
7179
7227
  }
7180
7228
  }, i = class extends e.default {
7181
7229
  constructor(o = [], l, u) {
@@ -7247,15 +7295,15 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7247
7295
  }
7248
7296
  }, s = i;
7249
7297
  c.default = s;
7250
- }), da = pe((c) => {
7298
+ }), ma = pe((c) => {
7251
7299
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = e;
7252
7300
  function e(t) {
7253
7301
  let r = typeof t;
7254
7302
  return r === "object" && t !== null || r === "function";
7255
7303
  }
7256
- }), pa = pe((c) => {
7304
+ }), ba = pe((c) => {
7257
7305
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.HashContainerIterator = c.HashContainer = void 0;
7258
- var e = ut(), t = a(da()), r = ht();
7306
+ var e = ut(), t = a(ma()), r = ht();
7259
7307
  function a(s) {
7260
7308
  return s && s.t ? s : { default: s };
7261
7309
  }
@@ -7331,9 +7379,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7331
7379
  }
7332
7380
  };
7333
7381
  c.HashContainer = i;
7334
- }), dc = pe((c) => {
7382
+ }), bc = pe((c) => {
7335
7383
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
7336
- var e = pa(), t = ht(), r = class ga extends e.HashContainerIterator {
7384
+ var e = ba(), t = ht(), r = class ya extends e.HashContainerIterator {
7337
7385
  constructor(s, o, l, u) {
7338
7386
  super(s, o, u), this.container = l;
7339
7387
  }
@@ -7341,7 +7389,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7341
7389
  return this.o === this.h && (0, t.throwIteratorAccessError)(), this.o.u;
7342
7390
  }
7343
7391
  copy() {
7344
- return new ga(this.o, this.h, this.container, this.iteratorType);
7392
+ return new ya(this.o, this.h, this.container, this.iteratorType);
7345
7393
  }
7346
7394
  }, a = class extends e.HashContainer {
7347
7395
  constructor(i = []) {
@@ -7394,13 +7442,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7394
7442
  }
7395
7443
  }, n = a;
7396
7444
  c.default = n;
7397
- }), pc = pe((c) => {
7445
+ }), yc = pe((c) => {
7398
7446
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), c.default = void 0;
7399
- var e = pa(), t = a(da()), r = ht();
7447
+ var e = ba(), t = a(ma()), r = ht();
7400
7448
  function a(o) {
7401
7449
  return o && o.t ? o : { default: o };
7402
7450
  }
7403
- var n = class ma extends e.HashContainerIterator {
7451
+ var n = class va extends e.HashContainerIterator {
7404
7452
  constructor(l, u, d, p) {
7405
7453
  super(l, u, p), this.container = d;
7406
7454
  }
@@ -7416,7 +7464,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7416
7464
  } });
7417
7465
  }
7418
7466
  copy() {
7419
- return new ma(this.o, this.h, this.container, this.iteratorType);
7467
+ return new va(this.o, this.h, this.container, this.iteratorType);
7420
7468
  }
7421
7469
  }, i = class extends e.HashContainer {
7422
7470
  constructor(o = []) {
@@ -7477,7 +7525,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7477
7525
  }
7478
7526
  }, s = i;
7479
7527
  c.default = s;
7480
- }), gc = pe((c) => {
7528
+ }), vc = pe((c) => {
7481
7529
  le(), ue(), ce(), Object.defineProperty(c, "t", { value: !0 }), Object.defineProperty(c, "Deque", { enumerable: !0, get: function() {
7482
7530
  return i.default;
7483
7531
  } }), Object.defineProperty(c, "HashMap", { enumerable: !0, get: function() {
@@ -7499,13 +7547,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7499
7547
  } }), Object.defineProperty(c, "Vector", { enumerable: !0, get: function() {
7500
7548
  return a.default;
7501
7549
  } });
7502
- var e = d(ic()), t = d(oc()), r = d(sc()), a = d(ac()), n = d(lc()), i = d(cc()), s = d(hc()), o = d(fc()), l = d(dc()), u = d(pc());
7550
+ var e = d(lc()), t = d(cc()), r = d(uc()), a = d(hc()), n = d(fc()), i = d(dc()), s = d(gc()), o = d(mc()), l = d(bc()), u = d(yc());
7503
7551
  function d(p) {
7504
7552
  return p && p.t ? p : { default: p };
7505
7553
  }
7506
- }), mc = pe((c, e) => {
7554
+ }), wc = pe((c, e) => {
7507
7555
  le(), ue(), ce();
7508
- var t = gc().OrderedSet, r = lt()("number-allocator:trace"), a = lt()("number-allocator:error");
7556
+ var t = vc().OrderedSet, r = lt()("number-allocator:trace"), a = lt()("number-allocator:error");
7509
7557
  function n(s, o) {
7510
7558
  this.low = s, this.high = o;
7511
7559
  }
@@ -7564,13 +7612,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7564
7612
  console.log("length:" + this.ss.size());
7565
7613
  for (let s of this.ss) console.log(s);
7566
7614
  }, e.exports = i;
7567
- }), ba = pe((c, e) => {
7615
+ }), wa = pe((c, e) => {
7568
7616
  le(), ue(), ce();
7569
- var t = mc();
7617
+ var t = wc();
7570
7618
  e.exports.NumberAllocator = t;
7571
- }), bc = pe((c) => {
7619
+ }), _c = pe((c) => {
7572
7620
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
7573
- var e = nc(), t = ba(), r = class {
7621
+ var e = ac(), t = wa(), r = class {
7574
7622
  aliasToTopic;
7575
7623
  topicToAlias;
7576
7624
  max;
@@ -7599,13 +7647,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7599
7647
  }
7600
7648
  };
7601
7649
  c.default = r;
7602
- }), yc = pe((c) => {
7650
+ }), kc = pe((c) => {
7603
7651
  le(), ue(), ce();
7604
7652
  var e = c && c.__importDefault || function(i) {
7605
7653
  return i && i.__esModule ? i : { default: i };
7606
7654
  };
7607
7655
  Object.defineProperty(c, "__esModule", { value: !0 });
7608
- var t = Lr(), r = e(bc()), a = Ut(), n = (i, s) => {
7656
+ var t = Lr(), r = e(_c()), a = Ut(), n = (i, s) => {
7609
7657
  i.log("_handleConnack");
7610
7658
  let { options: o } = i, l = o.protocolVersion === 5 ? s.reasonCode : s.returnCode;
7611
7659
  if (clearTimeout(i.connackTimer), delete i.topicAliasSend, s.properties) {
@@ -7625,7 +7673,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7625
7673
  }
7626
7674
  };
7627
7675
  c.default = n;
7628
- }), vc = pe((c) => {
7676
+ }), Sc = pe((c) => {
7629
7677
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
7630
7678
  var e = (t, r, a) => {
7631
7679
  t.log("handling pubrel packet");
@@ -7638,13 +7686,13 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7638
7686
  });
7639
7687
  };
7640
7688
  c.default = e;
7641
- }), wc = pe((c) => {
7689
+ }), Ec = pe((c) => {
7642
7690
  le(), ue(), ce();
7643
7691
  var e = c && c.__importDefault || function(o) {
7644
7692
  return o && o.__esModule ? o : { default: o };
7645
7693
  };
7646
7694
  Object.defineProperty(c, "__esModule", { value: !0 });
7647
- var t = e(ec()), r = e(rc()), a = e(yc()), n = e(Lr()), i = e(vc()), s = (o, l, u) => {
7695
+ var t = e(ic()), r = e(sc()), a = e(kc()), n = e(Lr()), i = e(Sc()), s = (o, l, u) => {
7648
7696
  let { options: d } = o;
7649
7697
  if (d.protocolVersion === 5 && d.properties && d.properties.maximumPacketSize && d.properties.maximumPacketSize < l.length) return o.emit("error", new Error(`exceeding packets size ${l.cmd}`)), o.end({ reasonCode: 149, properties: { reasonString: "Maximum packet size was exceeded" } }), o;
7650
7698
  switch (o.log("_handlePacket :: emitting packetreceive"), o.emit("packetreceive", l), l.cmd) {
@@ -7679,7 +7727,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7679
7727
  }
7680
7728
  };
7681
7729
  c.default = s;
7682
- }), ya = pe((c) => {
7730
+ }), _a = pe((c) => {
7683
7731
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
7684
7732
  var e = class {
7685
7733
  nextId;
@@ -7702,7 +7750,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7702
7750
  }
7703
7751
  };
7704
7752
  c.default = e;
7705
- }), _c = pe((c) => {
7753
+ }), xc = pe((c) => {
7706
7754
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
7707
7755
  var e = class {
7708
7756
  aliasToTopic;
@@ -7722,7 +7770,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7722
7770
  }
7723
7771
  };
7724
7772
  c.default = e;
7725
- }), kc = pe((c) => {
7773
+ }), Ac = pe((c) => {
7726
7774
  le(), ue(), ce();
7727
7775
  var e = c && c.__importDefault || function(n) {
7728
7776
  return n && n.__esModule ? n : { default: n };
@@ -7742,7 +7790,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7742
7790
  }, e.exports.__esModule = !0, e.exports.default = e.exports, t(r);
7743
7791
  }
7744
7792
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7745
- }), Sc = pe((c, e) => {
7793
+ }), Ic = pe((c, e) => {
7746
7794
  le(), ue(), ce();
7747
7795
  var t = Nr().default;
7748
7796
  function r(a, n) {
@@ -7756,28 +7804,28 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7756
7804
  return (n === "string" ? String : Number)(a);
7757
7805
  }
7758
7806
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7759
- }), Ec = pe((c, e) => {
7807
+ }), Tc = pe((c, e) => {
7760
7808
  le(), ue(), ce();
7761
- var t = Nr().default, r = Sc();
7809
+ var t = Nr().default, r = Ic();
7762
7810
  function a(n) {
7763
7811
  var i = r(n, "string");
7764
7812
  return t(i) == "symbol" ? i : i + "";
7765
7813
  }
7766
7814
  e.exports = a, e.exports.__esModule = !0, e.exports.default = e.exports;
7767
- }), xc = pe((c, e) => {
7815
+ }), Cc = pe((c, e) => {
7768
7816
  le(), ue(), ce();
7769
- var t = Ec();
7817
+ var t = Tc();
7770
7818
  function r(a, n, i) {
7771
7819
  return (n = t(n)) in a ? Object.defineProperty(a, n, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : a[n] = i, a;
7772
7820
  }
7773
7821
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7774
- }), Ac = pe((c, e) => {
7822
+ }), Oc = pe((c, e) => {
7775
7823
  le(), ue(), ce();
7776
7824
  function t(r) {
7777
7825
  if (Array.isArray(r)) return r;
7778
7826
  }
7779
7827
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7780
- }), Ic = pe((c, e) => {
7828
+ }), Pc = pe((c, e) => {
7781
7829
  le(), ue(), ce();
7782
7830
  function t(r, a) {
7783
7831
  var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
@@ -7801,7 +7849,7 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7801
7849
  }
7802
7850
  }
7803
7851
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7804
- }), Tc = pe((c, e) => {
7852
+ }), Mc = pe((c, e) => {
7805
7853
  le(), ue(), ce();
7806
7854
  function t(r, a) {
7807
7855
  (a == null || a > r.length) && (a = r.length);
@@ -7809,9 +7857,9 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7809
7857
  return i;
7810
7858
  }
7811
7859
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7812
- }), Cc = pe((c, e) => {
7860
+ }), Rc = pe((c, e) => {
7813
7861
  le(), ue(), ce();
7814
- var t = Tc();
7862
+ var t = Mc();
7815
7863
  function r(a, n) {
7816
7864
  if (a) {
7817
7865
  if (typeof a == "string") return t(a, n);
@@ -7820,21 +7868,21 @@ var zt, ti, Pt, Fs, $s, Ws, qs, Hs, zs, xt = He(() => {
7820
7868
  }
7821
7869
  }
7822
7870
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7823
- }), Oc = pe((c, e) => {
7871
+ }), jc = pe((c, e) => {
7824
7872
  le(), ue(), ce();
7825
7873
  function t() {
7826
7874
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7827
7875
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
7828
7876
  }
7829
7877
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7830
- }), Pc = pe((c, e) => {
7878
+ }), Lc = pe((c, e) => {
7831
7879
  le(), ue(), ce();
7832
- var t = Ac(), r = Ic(), a = Cc(), n = Oc();
7880
+ var t = Oc(), r = Pc(), a = Rc(), n = jc();
7833
7881
  function i(s, o) {
7834
7882
  return t(s) || r(s, o) || a(s, o) || n();
7835
7883
  }
7836
7884
  e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
7837
- }), va = pe((c, e) => {
7885
+ }), ka = pe((c, e) => {
7838
7886
  le(), ue(), ce(), (function(t, r) {
7839
7887
  typeof c == "object" && typeof e < "u" ? r(c) : typeof define == "function" && define.amd ? define(["exports"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.fastUniqueNumbers = {}));
7840
7888
  })(c, function(t) {
@@ -7862,7 +7910,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7862
7910
  }, l = /* @__PURE__ */ new WeakMap(), u = a(l), d = o(u, l), p = r(d);
7863
7911
  t.addUniqueNumber = p, t.generateUniqueNumber = d;
7864
7912
  });
7865
- }), Mc = pe((c, e) => {
7913
+ }), Nc = pe((c, e) => {
7866
7914
  le(), ue(), ce();
7867
7915
  function t(a, n, i, s, o, l, u) {
7868
7916
  try {
@@ -7888,13 +7936,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7888
7936
  };
7889
7937
  }
7890
7938
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7891
- }), wa = pe((c, e) => {
7939
+ }), Sa = pe((c, e) => {
7892
7940
  le(), ue(), ce();
7893
7941
  function t(r, a) {
7894
7942
  this.v = r, this.k = a;
7895
7943
  }
7896
7944
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7897
- }), _a = pe((c, e) => {
7945
+ }), Ea = pe((c, e) => {
7898
7946
  le(), ue(), ce();
7899
7947
  function t(r, a, n, i) {
7900
7948
  var s = Object.defineProperty;
@@ -7913,28 +7961,28 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7913
7961
  }, e.exports.__esModule = !0, e.exports.default = e.exports, t(r, a, n, i);
7914
7962
  }
7915
7963
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7916
- }), ka = pe((c, e) => {
7964
+ }), xa = pe((c, e) => {
7917
7965
  le(), ue(), ce();
7918
- var t = _a();
7966
+ var t = Ea();
7919
7967
  function r() {
7920
7968
  var a, n, i = typeof Symbol == "function" ? Symbol : {}, s = i.iterator || "@@iterator", o = i.toStringTag || "@@toStringTag";
7921
7969
  function l(k, m, w, E) {
7922
7970
  var v = m && m.prototype instanceof d ? m : d, x = Object.create(v.prototype);
7923
7971
  return t(x, "_invoke", (function(S, I, M) {
7924
- var O, B, T, W = 0, D = M || [], N = !1, ae = { p: 0, n: 0, v: a, a: Y, f: Y.bind(a, 4), d: function(K, re) {
7972
+ var O, B, T, W = 0, F = M || [], N = !1, ae = { p: 0, n: 0, v: a, a: Y, f: Y.bind(a, 4), d: function(K, re) {
7925
7973
  return O = K, B = 0, T = a, ae.n = re, u;
7926
7974
  } };
7927
7975
  function Y(K, re) {
7928
- for (B = K, T = re, n = 0; !N && W && !F && n < D.length; n++) {
7929
- var F, Z = D[n], P = ae.p, J = Z[2];
7930
- K > 3 ? (F = J === re) && (T = Z[(B = Z[4]) ? 5 : (B = 3, 3)], Z[4] = Z[5] = a) : Z[0] <= P && ((F = K < 2 && P < Z[1]) ? (B = 0, ae.v = re, ae.n = Z[1]) : P < J && (F = K < 3 || Z[0] > re || re > J) && (Z[4] = K, Z[5] = re, ae.n = J, B = 0));
7976
+ for (B = K, T = re, n = 0; !N && W && !D && n < F.length; n++) {
7977
+ var D, Z = F[n], P = ae.p, J = Z[2];
7978
+ K > 3 ? (D = J === re) && (T = Z[(B = Z[4]) ? 5 : (B = 3, 3)], Z[4] = Z[5] = a) : Z[0] <= P && ((D = K < 2 && P < Z[1]) ? (B = 0, ae.v = re, ae.n = Z[1]) : P < J && (D = K < 3 || Z[0] > re || re > J) && (Z[4] = K, Z[5] = re, ae.n = J, B = 0));
7931
7979
  }
7932
- if (F || K > 1) return u;
7980
+ if (D || K > 1) return u;
7933
7981
  throw N = !0, re;
7934
7982
  }
7935
- return function(K, re, F) {
7983
+ return function(K, re, D) {
7936
7984
  if (W > 1) throw TypeError("Generator is already running");
7937
- for (N && re === 1 && Y(re, F), B = re, T = F; (n = B < 2 ? a : T) || !N; ) {
7985
+ for (N && re === 1 && Y(re, D), B = re, T = D; (n = B < 2 ? a : T) || !N; ) {
7938
7986
  O || (B ? B < 3 ? (B > 1 && (ae.n = -1), Y(B, T)) : ae.n = T : ae.v = T);
7939
7987
  try {
7940
7988
  if (W = 2, O) {
@@ -7978,9 +8026,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7978
8026
  }, e.exports.__esModule = !0, e.exports.default = e.exports)();
7979
8027
  }
7980
8028
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7981
- }), Sa = pe((c, e) => {
8029
+ }), Aa = pe((c, e) => {
7982
8030
  le(), ue(), ce();
7983
- var t = wa(), r = _a();
8031
+ var t = Sa(), r = Ea();
7984
8032
  function a(n, i) {
7985
8033
  function s(l, u, d, p) {
7986
8034
  try {
@@ -8011,16 +8059,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8011
8059
  }, !0);
8012
8060
  }
8013
8061
  e.exports = a, e.exports.__esModule = !0, e.exports.default = e.exports;
8014
- }), Ea = pe((c, e) => {
8062
+ }), Ia = pe((c, e) => {
8015
8063
  le(), ue(), ce();
8016
- var t = ka(), r = Sa();
8064
+ var t = xa(), r = Aa();
8017
8065
  function a(n, i, s, o, l) {
8018
8066
  return new r(t().w(n, i, s, o), l || Promise);
8019
8067
  }
8020
8068
  e.exports = a, e.exports.__esModule = !0, e.exports.default = e.exports;
8021
- }), Rc = pe((c, e) => {
8069
+ }), Uc = pe((c, e) => {
8022
8070
  le(), ue(), ce();
8023
- var t = Ea();
8071
+ var t = Ia();
8024
8072
  function r(a, n, i, s, o) {
8025
8073
  var l = t(a, n, i, s, o);
8026
8074
  return l.next().then(function(u) {
@@ -8028,7 +8076,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8028
8076
  });
8029
8077
  }
8030
8078
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8031
- }), jc = pe((c, e) => {
8079
+ }), Bc = pe((c, e) => {
8032
8080
  le(), ue(), ce();
8033
8081
  function t(r) {
8034
8082
  var a = Object(r), n = [];
@@ -8039,7 +8087,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8039
8087
  };
8040
8088
  }
8041
8089
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
8042
- }), Lc = pe((c, e) => {
8090
+ }), Fc = pe((c, e) => {
8043
8091
  le(), ue(), ce();
8044
8092
  var t = Nr().default;
8045
8093
  function r(a) {
@@ -8054,9 +8102,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8054
8102
  throw new TypeError(t(a) + " is not iterable");
8055
8103
  }
8056
8104
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8057
- }), Nc = pe((c, e) => {
8105
+ }), Dc = pe((c, e) => {
8058
8106
  le(), ue(), ce();
8059
- var t = wa(), r = ka(), a = Rc(), n = Ea(), i = Sa(), s = jc(), o = Lc();
8107
+ var t = Sa(), r = xa(), a = Uc(), n = Ia(), i = Aa(), s = Bc(), o = Fc();
8060
8108
  function l() {
8061
8109
  var u = r(), d = u.m(l), p = (Object.getPrototypeOf ? Object.getPrototypeOf(d) : d.__proto__).constructor;
8062
8110
  function y(b) {
@@ -8103,18 +8151,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8103
8151
  }, e.exports.__esModule = !0, e.exports.default = e.exports)();
8104
8152
  }
8105
8153
  e.exports = l, e.exports.__esModule = !0, e.exports.default = e.exports;
8106
- }), Uc = pe((c, e) => {
8154
+ }), $c = pe((c, e) => {
8107
8155
  le(), ue(), ce();
8108
- var t = Nc()();
8156
+ var t = Dc()();
8109
8157
  e.exports = t;
8110
8158
  try {
8111
8159
  regeneratorRuntime = t;
8112
8160
  } catch {
8113
8161
  typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
8114
8162
  }
8115
- }), Bc = pe((c, e) => {
8163
+ }), Wc = pe((c, e) => {
8116
8164
  le(), ue(), ce(), (function(t, r) {
8117
- typeof c == "object" && typeof e < "u" ? r(c, xc(), Pc(), va(), Mc(), Uc()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/defineProperty", "@babel/runtime/helpers/slicedToArray", "fast-unique-numbers", "@babel/runtime/helpers/asyncToGenerator", "@babel/runtime/regenerator"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.brokerFactory = {}, t._defineProperty, t._slicedToArray, t.fastUniqueNumbers, t._asyncToGenerator, t._regeneratorRuntime));
8165
+ typeof c == "object" && typeof e < "u" ? r(c, Cc(), Lc(), ka(), Nc(), $c()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/defineProperty", "@babel/runtime/helpers/slicedToArray", "fast-unique-numbers", "@babel/runtime/helpers/asyncToGenerator", "@babel/runtime/regenerator"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.brokerFactory = {}, t._defineProperty, t._slicedToArray, t.fastUniqueNumbers, t._asyncToGenerator, t._regeneratorRuntime));
8118
8166
  })(c, function(t, r, a, n, i, s) {
8119
8167
  var o = function(m) {
8120
8168
  return typeof m.start == "function";
@@ -8218,22 +8266,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8218
8266
  var w = p(m);
8219
8267
  return function(E) {
8220
8268
  var v = b(E);
8221
- E.addEventListener("message", function(D) {
8222
- var N = D.data, ae = N.id;
8269
+ E.addEventListener("message", function(F) {
8270
+ var N = F.data, ae = N.id;
8223
8271
  if (ae !== null && v.has(ae)) {
8224
8272
  var Y = v.get(ae), K = Y.reject, re = Y.resolve;
8225
8273
  v.delete(ae), N.error === void 0 ? re(N.result) : K(new Error(N.error.message));
8226
8274
  }
8227
8275
  }), o(E) && E.start();
8228
- for (var x = function(D) {
8276
+ for (var x = function(F) {
8229
8277
  var N = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, ae = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
8230
8278
  return new Promise(function(Y, K) {
8231
8279
  var re = n.generateUniqueNumber(v);
8232
- v.set(re, { reject: K, resolve: Y }), N === null ? E.postMessage({ id: re, method: D }, ae) : E.postMessage({ id: re, method: D, params: N }, ae);
8280
+ v.set(re, { reject: K, resolve: Y }), N === null ? E.postMessage({ id: re, method: F }, ae) : E.postMessage({ id: re, method: F, params: N }, ae);
8233
8281
  });
8234
- }, S = function(D, N) {
8282
+ }, S = function(F, N) {
8235
8283
  var ae = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [];
8236
- E.postMessage({ id: null, method: D, params: N }, ae);
8284
+ E.postMessage({ id: null, method: F, params: N }, ae);
8237
8285
  }, I = {}, M = 0, O = Object.entries(w); M < O.length; M++) {
8238
8286
  var B = a(O[M], 2), T = B[0], W = B[1];
8239
8287
  I = f(f({}, I), {}, r({}, T, W({ call: x, notify: S })));
@@ -8243,9 +8291,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8243
8291
  };
8244
8292
  t.createBroker = k;
8245
8293
  });
8246
- }), Dc = pe((c, e) => {
8294
+ }), qc = pe((c, e) => {
8247
8295
  le(), ue(), ce(), (function(t, r) {
8248
- typeof c == "object" && typeof e < "u" ? r(c, Nr(), Bc(), va()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/typeof", "broker-factory", "fast-unique-numbers"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimersBroker = {}, t._typeof, t.brokerFactory, t.fastUniqueNumbers));
8296
+ typeof c == "object" && typeof e < "u" ? r(c, Nr(), Wc(), ka()) : typeof define == "function" && define.amd ? define(["exports", "@babel/runtime/helpers/typeof", "broker-factory", "fast-unique-numbers"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimersBroker = {}, t._typeof, t.brokerFactory, t.fastUniqueNumbers));
8249
8297
  })(c, function(t, r, a, n) {
8250
8298
  var i = /* @__PURE__ */ new Map([[0, null]]), s = /* @__PURE__ */ new Map([[0, null]]), o = a.createBroker({ clearInterval: function(u) {
8251
8299
  var d = u.call;
@@ -8293,9 +8341,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8293
8341
  };
8294
8342
  t.load = l, t.wrap = o;
8295
8343
  });
8296
- }), Fc = pe((c, e) => {
8344
+ }), Hc = pe((c, e) => {
8297
8345
  le(), ue(), ce(), (function(t, r) {
8298
- typeof c == "object" && typeof e < "u" ? r(c, Dc()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
8346
+ typeof c == "object" && typeof e < "u" ? r(c, qc()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
8299
8347
  })(c, function(t, r) {
8300
8348
  var a = function(d, p) {
8301
8349
  var y = null;
@@ -8323,7 +8371,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8323
8371
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 }), c.isReactNativeBrowser = c.isWebWorker = void 0;
8324
8372
  var e = () => typeof window < "u" ? typeof navigator < "u" && navigator.userAgent?.toLowerCase().indexOf(" electron/") > -1 && Pe?.versions ? !Object.prototype.hasOwnProperty.call(Pe.versions, "electron") : typeof window.document < "u" : !1, t = () => !!(typeof self == "object" && self?.constructor?.name?.includes("WorkerGlobalScope") && typeof Deno > "u"), r = () => typeof navigator < "u" && navigator.product === "ReactNative", a = e() || t() || r();
8325
8373
  c.isWebWorker = t(), c.isReactNativeBrowser = r(), c.default = a;
8326
- }), $c = pe((c) => {
8374
+ }), zc = pe((c) => {
8327
8375
  le(), ue(), ce();
8328
8376
  var e = c && c.__createBinding || (Object.create ? function(l, u, d, p) {
8329
8377
  p === void 0 && (p = d);
@@ -8353,7 +8401,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8353
8401
  };
8354
8402
  })();
8355
8403
  Object.defineProperty(c, "__esModule", { value: !0 });
8356
- var a = Fc(), n = r(Ur()), i = { set: a.setInterval, clear: a.clearInterval }, s = { set: (l, u) => setInterval(l, u), clear: (l) => clearInterval(l) }, o = (l) => {
8404
+ var a = Hc(), n = r(Ur()), i = { set: a.setInterval, clear: a.clearInterval }, s = { set: (l, u) => setInterval(l, u), clear: (l) => clearInterval(l) }, o = (l) => {
8357
8405
  switch (l) {
8358
8406
  case "native":
8359
8407
  return s;
@@ -8364,13 +8412,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8364
8412
  }
8365
8413
  };
8366
8414
  c.default = o;
8367
- }), xa = pe((c) => {
8415
+ }), Ta = pe((c) => {
8368
8416
  le(), ue(), ce();
8369
8417
  var e = c && c.__importDefault || function(a) {
8370
8418
  return a && a.__esModule ? a : { default: a };
8371
8419
  };
8372
8420
  Object.defineProperty(c, "__esModule", { value: !0 });
8373
- var t = e($c()), r = class {
8421
+ var t = e(zc()), r = class {
8374
8422
  _keepalive;
8375
8423
  timerId;
8376
8424
  timer;
@@ -8443,7 +8491,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8443
8491
  return v && v.__esModule ? v : { default: v };
8444
8492
  };
8445
8493
  Object.defineProperty(c, "__esModule", { value: !0 });
8446
- var n = a(Jl()), i = It(), s = a(Zl()), o = a(lt()), l = r(ea()), u = a(ta()), d = a(wc()), p = a(ya()), y = a(_c()), f = Ut(), g = kc(), b = a(xa()), k = r(Ur()), m = globalThis.setImmediate || ((...v) => {
8494
+ var n = a(tc()), i = It(), s = a(nc()), o = a(lt()), l = r(na()), u = a(ia()), d = a(Ec()), p = a(_a()), y = a(xc()), f = Ut(), g = Ac(), b = a(Ta()), k = r(Ur()), m = globalThis.setImmediate || ((...v) => {
8447
8495
  let x = v.shift();
8448
8496
  (0, f.nextTick)(() => {
8449
8497
  x(...v);
@@ -8521,13 +8569,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8521
8569
  }
8522
8570
  connect() {
8523
8571
  let x = new i.Writable(), S = n.default.parser(this.options), I = null, M = [];
8524
- this.log("connect :: calling method to clear reconnect"), this._clearReconnect(), this.disconnected && !this.reconnecting && (this.incomingStore = this.options.incomingStore || new u.default(), this.outgoingStore = this.options.outgoingStore || new u.default(), this.disconnecting = !1, this.disconnected = !1), this.log("connect :: using streamBuilder provided to client to create stream"), this.stream = this.streamBuilder(this), S.on("packet", (D) => {
8525
- this.log("parser :: on packet push to packets array."), M.push(D);
8572
+ this.log("connect :: calling method to clear reconnect"), this._clearReconnect(), this.disconnected && !this.reconnecting && (this.incomingStore = this.options.incomingStore || new u.default(), this.outgoingStore = this.options.outgoingStore || new u.default(), this.disconnecting = !1, this.disconnected = !1), this.log("connect :: using streamBuilder provided to client to create stream"), this.stream = this.streamBuilder(this), S.on("packet", (F) => {
8573
+ this.log("parser :: on packet push to packets array."), M.push(F);
8526
8574
  });
8527
8575
  let O = () => {
8528
8576
  this.log("work :: getting next packet in queue");
8529
- let D = M.shift();
8530
- if (D) this.log("work :: packet pulled from queue"), (0, d.default)(this, D, B);
8577
+ let F = M.shift();
8578
+ if (F) this.log("work :: packet pulled from queue"), (0, d.default)(this, F, B);
8531
8579
  else {
8532
8580
  this.log("work :: no packets in queue");
8533
8581
  let N = I;
@@ -8536,15 +8584,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8536
8584
  }, B = () => {
8537
8585
  if (M.length) (0, f.nextTick)(O);
8538
8586
  else {
8539
- let D = I;
8540
- I = null, D();
8587
+ let F = I;
8588
+ I = null, F();
8541
8589
  }
8542
8590
  };
8543
- x._write = (D, N, ae) => {
8544
- I = ae, this.log("writable stream :: parsing buffer"), S.parse(D), O();
8591
+ x._write = (F, N, ae) => {
8592
+ I = ae, this.log("writable stream :: parsing buffer"), S.parse(F), O();
8545
8593
  };
8546
- let T = (D) => {
8547
- this.log("streamErrorHandler :: error", D.message), D.code ? (this.log("streamErrorHandler :: emitting error"), this.emit("error", D)) : this.noop(D);
8594
+ let T = (F) => {
8595
+ this.log("streamErrorHandler :: error", F.message), F.code ? (this.log("streamErrorHandler :: emitting error"), this.emit("error", F)) : this.noop(F);
8548
8596
  };
8549
8597
  this.log("connect :: pipe stream to writable stream"), this.stream.pipe(x), this.stream.on("error", T), this.stream.on("close", () => {
8550
8598
  this.log("(%s)stream :: on close", this.options.clientId), this._flushVolatile(), this.log("stream: emit close to MqttClient"), this.emit("close");
@@ -8553,8 +8601,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8553
8601
  if (this.options.will && (W.will = { ...this.options.will, payload: this.options.will?.payload }), this.topicAliasRecv && (W.properties || (W.properties = {}), this.topicAliasRecv && (W.properties.topicAliasMaximum = this.topicAliasRecv.max)), this._writePacket(W), S.on("error", this.emit.bind(this, "error")), this.options.properties) {
8554
8602
  if (!this.options.properties.authenticationMethod && this.options.properties.authenticationData) return this.end(() => this.emit("error", new Error("Packet has no Authentication Method"))), this;
8555
8603
  if (this.options.properties.authenticationMethod && this.options.authPacket && typeof this.options.authPacket == "object") {
8556
- let D = { cmd: "auth", reasonCode: 0, ...this.options.authPacket };
8557
- this._writePacket(D);
8604
+ let F = { cmd: "auth", reasonCode: 0, ...this.options.authPacket };
8605
+ this._writePacket(F);
8558
8606
  }
8559
8607
  }
8560
8608
  return this.stream.setMaxListeners(1e3), clearTimeout(this.connackTimer), this.connackTimer = setTimeout(() => {
@@ -8565,13 +8613,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8565
8613
  this.log("publish :: message `%s` to topic `%s`", S, x);
8566
8614
  let { options: O } = this;
8567
8615
  typeof I == "function" && (M = I, I = null), I = I || {}, I = { qos: 0, retain: !1, dup: !1, ...I };
8568
- let { qos: B, retain: T, dup: W, properties: D, cbStorePut: N } = I;
8616
+ let { qos: B, retain: T, dup: W, properties: F, cbStorePut: N } = I;
8569
8617
  if (this._checkDisconnecting(M)) return this;
8570
8618
  let ae = () => {
8571
8619
  let Y = 0;
8572
8620
  if ((B === 1 || B === 2) && (Y = this._nextId(), Y === null)) return this.log("No messageId left"), !1;
8573
8621
  let K = { cmd: "publish", topic: x, payload: S, qos: B, retain: T, messageId: Y, dup: W };
8574
- switch (O.protocolVersion === 5 && (K.properties = D), this.log("publish :: qos", B), B) {
8622
+ switch (O.protocolVersion === 5 && (K.properties = F), this.log("publish :: qos", B), B) {
8575
8623
  case 1:
8576
8624
  case 2:
8577
8625
  this.outgoing[K.messageId] = { volatile: !1, cb: M || this.noop }, this.log("MqttClient:publish: packet cmd: %s", K.cmd), this._sendPacket(K, void 0, N);
@@ -8601,10 +8649,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8601
8649
  if (this._checkDisconnecting(I)) return this.log("subscribe: discconecting true"), this;
8602
8650
  let W = { qos: 0 };
8603
8651
  M === 5 && (W.nl = !1, W.rap = !1, W.rh = 0), S = { ...W, ...S };
8604
- let { properties: D } = S, N = [], ae = (re, F) => {
8605
- if (F = F || S, !Object.prototype.hasOwnProperty.call(this._resubscribeTopics, re) || this._resubscribeTopics[re].qos < F.qos || O) {
8606
- let Z = { topic: re, qos: F.qos };
8607
- M === 5 && (Z.nl = F.nl, Z.rap = F.rap, Z.rh = F.rh, Z.properties = D), this.log("subscribe: pushing topic `%s` and qos `%s` to subs list", Z.topic, Z.qos), N.push(Z);
8652
+ let { properties: F } = S, N = [], ae = (re, D) => {
8653
+ if (D = D || S, !Object.prototype.hasOwnProperty.call(this._resubscribeTopics, re) || this._resubscribeTopics[re].qos < D.qos || O) {
8654
+ let Z = { topic: re, qos: D.qos };
8655
+ M === 5 && (Z.nl = D.nl, Z.rap = D.rap, Z.rh = D.rh, Z.properties = F), this.log("subscribe: pushing topic `%s` and qos `%s` to subs list", Z.topic, Z.qos), N.push(Z);
8608
8656
  }
8609
8657
  };
8610
8658
  if (Array.isArray(x) ? x.forEach((re) => {
@@ -8612,9 +8660,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8612
8660
  }) : Object.keys(x).forEach((re) => {
8613
8661
  this.log("subscribe: object topic %s, %o", re, x[re]), ae(re, x[re]);
8614
8662
  }), !N.length) return I(null, []), this;
8615
- let Y = (re, F) => {
8616
- let Z = { cmd: "subscribe", subscriptions: re, messageId: F };
8617
- if (D && (Z.properties = D), this.options.resubscribe) {
8663
+ let Y = (re, D) => {
8664
+ let Z = { cmd: "subscribe", subscriptions: re, messageId: D };
8665
+ if (F && (Z.properties = F), this.options.resubscribe) {
8618
8666
  this.log("subscribe :: resubscribe true");
8619
8667
  let J = [];
8620
8668
  re.forEach((be) => {
@@ -8635,13 +8683,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8635
8683
  });
8636
8684
  return this.log("subscribe :: call _sendPacket"), this._sendPacket(Z), P;
8637
8685
  }, K = () => {
8638
- let re = this.options.subscribeBatchSize ?? N.length, F = [];
8686
+ let re = this.options.subscribeBatchSize ?? N.length, D = [];
8639
8687
  for (let Z = 0; Z < N.length; Z += re) {
8640
8688
  let P = N.slice(Z, Z + re), J = this._nextId();
8641
8689
  if (J === null) return this.log("No messageId left"), !1;
8642
- F.push(Y(P, J));
8690
+ D.push(Y(P, J));
8643
8691
  }
8644
- return Promise.all(F).then((Z) => {
8692
+ return Promise.all(D).then((Z) => {
8645
8693
  I(null, N, Z.at(-1));
8646
8694
  }).catch((Z) => {
8647
8695
  I(Z, N, Z.packet);
@@ -8909,8 +8957,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8909
8957
  B();
8910
8958
  return;
8911
8959
  }
8912
- !this.disconnecting && !this.reconnectTimer ? (W = this.outgoing[T.messageId] ? this.outgoing[T.messageId].cb : null, this.outgoing[T.messageId] = { volatile: !1, cb(D, N) {
8913
- W && W(D, N), B();
8960
+ !this.disconnecting && !this.reconnectTimer ? (W = this.outgoing[T.messageId] ? this.outgoing[T.messageId].cb : null, this.outgoing[T.messageId] = { volatile: !1, cb(F, N) {
8961
+ W && W(F, N), B();
8914
8962
  } }, this._packetIdsDuringStoreProcessing[T.messageId] = !0, this.messageIdProvider.register(T.messageId) ? this._sendPacket(T, void 0, void 0, !0) : this.log("messageId: %d has already used.", T.messageId)) : I.destroy && I.destroy();
8915
8963
  };
8916
8964
  I.on("end", () => {
@@ -8945,9 +8993,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8945
8993
  }
8946
8994
  };
8947
8995
  c.default = E;
8948
- }), Wc = pe((c) => {
8996
+ }), Kc = pe((c) => {
8949
8997
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
8950
- var e = ba(), t = class {
8998
+ var e = wa(), t = class {
8951
8999
  numberAllocator;
8952
9000
  lastId;
8953
9001
  constructor() {
@@ -8971,7 +9019,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8971
9019
  };
8972
9020
  c.default = t;
8973
9021
  });
8974
- function qc() {
9022
+ function Vc() {
8975
9023
  if (oi) return sr;
8976
9024
  oi = !0;
8977
9025
  let c = 2147483647, e = 36, t = 1, r = 26, a = 38, n = 700, i = 72, s = 128, o = "-", l = /^xn--/, u = /[^\0-\x7F]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, p = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, y = e - t, f = Math.floor, g = String.fromCharCode;
@@ -8986,17 +9034,17 @@ function qc() {
8986
9034
  function m(O, B) {
8987
9035
  let T = O.split("@"), W = "";
8988
9036
  T.length > 1 && (W = T[0] + "@", O = T[1]), O = O.replace(d, ".");
8989
- let D = O.split("."), N = k(D, B).join(".");
9037
+ let F = O.split("."), N = k(F, B).join(".");
8990
9038
  return W + N;
8991
9039
  }
8992
9040
  function w(O) {
8993
9041
  let B = [], T = 0, W = O.length;
8994
9042
  for (; T < W; ) {
8995
- let D = O.charCodeAt(T++);
8996
- if (D >= 55296 && D <= 56319 && T < W) {
9043
+ let F = O.charCodeAt(T++);
9044
+ if (F >= 55296 && F <= 56319 && T < W) {
8997
9045
  let N = O.charCodeAt(T++);
8998
- (N & 64512) == 56320 ? B.push(((D & 1023) << 10) + (N & 1023) + 65536) : (B.push(D), T--);
8999
- } else B.push(D);
9046
+ (N & 64512) == 56320 ? B.push(((F & 1023) << 10) + (N & 1023) + 65536) : (B.push(F), T--);
9047
+ } else B.push(F);
9000
9048
  }
9001
9049
  return B;
9002
9050
  }
@@ -9009,46 +9057,46 @@ function qc() {
9009
9057
  for (O = T ? f(O / n) : O >> 1, O += f(O / B); O > y * r >> 1; W += e) O = f(O / y);
9010
9058
  return f(W + (y + 1) * O / (O + a));
9011
9059
  }, I = function(O) {
9012
- let B = [], T = O.length, W = 0, D = s, N = i, ae = O.lastIndexOf(o);
9060
+ let B = [], T = O.length, W = 0, F = s, N = i, ae = O.lastIndexOf(o);
9013
9061
  ae < 0 && (ae = 0);
9014
9062
  for (let Y = 0; Y < ae; ++Y) O.charCodeAt(Y) >= 128 && b("not-basic"), B.push(O.charCodeAt(Y));
9015
9063
  for (let Y = ae > 0 ? ae + 1 : 0; Y < T; ) {
9016
9064
  let K = W;
9017
- for (let F = 1, Z = e; ; Z += e) {
9065
+ for (let D = 1, Z = e; ; Z += e) {
9018
9066
  Y >= T && b("invalid-input");
9019
9067
  let P = v(O.charCodeAt(Y++));
9020
- P >= e && b("invalid-input"), P > f((c - W) / F) && b("overflow"), W += P * F;
9068
+ P >= e && b("invalid-input"), P > f((c - W) / D) && b("overflow"), W += P * D;
9021
9069
  let J = Z <= N ? t : Z >= N + r ? r : Z - N;
9022
9070
  if (P < J) break;
9023
9071
  let be = e - J;
9024
- F > f(c / be) && b("overflow"), F *= be;
9072
+ D > f(c / be) && b("overflow"), D *= be;
9025
9073
  }
9026
9074
  let re = B.length + 1;
9027
- N = S(W - K, re, K == 0), f(W / re) > c - D && b("overflow"), D += f(W / re), W %= re, B.splice(W++, 0, D);
9075
+ N = S(W - K, re, K == 0), f(W / re) > c - F && b("overflow"), F += f(W / re), W %= re, B.splice(W++, 0, F);
9028
9076
  }
9029
9077
  return String.fromCodePoint(...B);
9030
9078
  }, M = function(O) {
9031
9079
  let B = [];
9032
9080
  O = w(O);
9033
- let T = O.length, W = s, D = 0, N = i;
9081
+ let T = O.length, W = s, F = 0, N = i;
9034
9082
  for (let K of O) K < 128 && B.push(g(K));
9035
9083
  let ae = B.length, Y = ae;
9036
9084
  for (ae && B.push(o); Y < T; ) {
9037
9085
  let K = c;
9038
- for (let F of O) F >= W && F < K && (K = F);
9086
+ for (let D of O) D >= W && D < K && (K = D);
9039
9087
  let re = Y + 1;
9040
- K - W > f((c - D) / re) && b("overflow"), D += (K - W) * re, W = K;
9041
- for (let F of O) if (F < W && ++D > c && b("overflow"), F === W) {
9042
- let Z = D;
9088
+ K - W > f((c - F) / re) && b("overflow"), F += (K - W) * re, W = K;
9089
+ for (let D of O) if (D < W && ++F > c && b("overflow"), D === W) {
9090
+ let Z = F;
9043
9091
  for (let P = e; ; P += e) {
9044
9092
  let J = P <= N ? t : P >= N + r ? r : P - N;
9045
9093
  if (Z < J) break;
9046
9094
  let be = Z - J, te = e - J;
9047
9095
  B.push(g(x(J + be % te, 0))), Z = f(be / te);
9048
9096
  }
9049
- B.push(g(x(Z, 0))), N = S(D, re, Y === ae), D = 0, ++Y;
9097
+ B.push(g(x(Z, 0))), N = S(F, re, Y === ae), F = 0, ++Y;
9050
9098
  }
9051
- ++D, ++W;
9099
+ ++F, ++W;
9052
9100
  }
9053
9101
  return B.join("");
9054
9102
  };
@@ -9062,10 +9110,10 @@ function qc() {
9062
9110
  });
9063
9111
  } }, sr;
9064
9112
  }
9065
- var sr, oi, gt, Hc = He(() => {
9066
- le(), ue(), ce(), sr = {}, oi = !1, gt = qc(), gt.decode, gt.encode, gt.toASCII, gt.toUnicode, gt.ucs2, gt.version;
9113
+ var sr, oi, gt, Gc = He(() => {
9114
+ le(), ue(), ce(), sr = {}, oi = !1, gt = Vc(), gt.decode, gt.encode, gt.toASCII, gt.toUnicode, gt.ucs2, gt.version;
9067
9115
  });
9068
- function zc() {
9116
+ function Yc() {
9069
9117
  return ai || (ai = !0, si = function() {
9070
9118
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
9071
9119
  if (typeof Symbol.iterator == "symbol") return !0;
@@ -9084,36 +9132,36 @@ function zc() {
9084
9132
  return !0;
9085
9133
  }), si;
9086
9134
  }
9087
- function Kc() {
9135
+ function Qc() {
9088
9136
  return ci || (ci = !0, li = Error), li;
9089
9137
  }
9090
- function Vc() {
9138
+ function Jc() {
9091
9139
  return hi || (hi = !0, ui = EvalError), ui;
9092
9140
  }
9093
- function Gc() {
9141
+ function Xc() {
9094
9142
  return di || (di = !0, fi = RangeError), fi;
9095
9143
  }
9096
- function Yc() {
9144
+ function Zc() {
9097
9145
  return gi || (gi = !0, pi = ReferenceError), pi;
9098
9146
  }
9099
- function Aa() {
9147
+ function Ca() {
9100
9148
  return bi || (bi = !0, mi = SyntaxError), mi;
9101
9149
  }
9102
9150
  function Jt() {
9103
9151
  return vi || (vi = !0, yi = TypeError), yi;
9104
9152
  }
9105
- function Qc() {
9153
+ function eu() {
9106
9154
  return _i || (_i = !0, wi = URIError), wi;
9107
9155
  }
9108
- function Jc() {
9156
+ function tu() {
9109
9157
  if (ki) return ar;
9110
9158
  ki = !0;
9111
- var c = typeof Symbol < "u" && Symbol, e = zc();
9159
+ var c = typeof Symbol < "u" && Symbol, e = Yc();
9112
9160
  return ar = function() {
9113
9161
  return typeof c != "function" || typeof Symbol != "function" || typeof c("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : e();
9114
9162
  }, ar;
9115
9163
  }
9116
- function Xc() {
9164
+ function ru() {
9117
9165
  if (Si) return lr;
9118
9166
  Si = !0;
9119
9167
  var c = { __proto__: null, foo: {} }, e = Object;
@@ -9121,7 +9169,7 @@ function Xc() {
9121
9169
  return { __proto__: c }.foo === c.foo && !(c instanceof e);
9122
9170
  }, lr;
9123
9171
  }
9124
- function Zc() {
9172
+ function nu() {
9125
9173
  if (Ei) return cr;
9126
9174
  Ei = !0;
9127
9175
  var c = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, r = "[object Function]", a = function(s, o) {
@@ -9156,10 +9204,10 @@ function Zc() {
9156
9204
  function Zi() {
9157
9205
  if (xi) return ur;
9158
9206
  xi = !0;
9159
- var c = Zc();
9207
+ var c = nu();
9160
9208
  return ur = Function.prototype.bind || c, ur;
9161
9209
  }
9162
- function eu() {
9210
+ function iu() {
9163
9211
  if (Ai) return hr;
9164
9212
  Ai = !0;
9165
9213
  var c = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = Zi();
@@ -9168,7 +9216,7 @@ function eu() {
9168
9216
  function Bt() {
9169
9217
  if (Ii) return fr;
9170
9218
  Ii = !0;
9171
- var c, e = Kc(), t = Vc(), r = Gc(), a = Yc(), n = Aa(), i = Jt(), s = Qc(), o = Function, l = function(Y) {
9219
+ var c, e = Qc(), t = Jc(), r = Xc(), a = Zc(), n = Ca(), i = Jt(), s = eu(), o = Function, l = function(Y) {
9172
9220
  try {
9173
9221
  return o('"use strict"; return (' + Y + ").constructor;")();
9174
9222
  } catch {
@@ -9191,7 +9239,7 @@ function Bt() {
9191
9239
  return d;
9192
9240
  }
9193
9241
  }
9194
- })() : d, y = Jc()(), f = Xc()(), g = Object.getPrototypeOf || (f ? function(Y) {
9242
+ })() : d, y = tu()(), f = ru()(), g = Object.getPrototypeOf || (f ? function(Y) {
9195
9243
  return Y.__proto__;
9196
9244
  } : null), b = {}, k = typeof Uint8Array > "u" || !g ? c : g(Uint8Array), m = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? c : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? c : ArrayBuffer, "%ArrayIteratorPrototype%": y && g ? g([][Symbol.iterator]()) : c, "%AsyncFromSyncIteratorPrototype%": c, "%AsyncFunction%": b, "%AsyncGenerator%": b, "%AsyncGeneratorFunction%": b, "%AsyncIteratorPrototype%": b, "%Atomics%": typeof Atomics > "u" ? c : Atomics, "%BigInt%": typeof BigInt > "u" ? c : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? c : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? c : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? c : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": e, "%eval%": eval, "%EvalError%": t, "%Float32Array%": typeof Float32Array > "u" ? c : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? c : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? c : FinalizationRegistry, "%Function%": o, "%GeneratorFunction%": b, "%Int8Array%": typeof Int8Array > "u" ? c : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? c : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? c : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": y && g ? g(g([][Symbol.iterator]())) : c, "%JSON%": typeof JSON == "object" ? JSON : c, "%Map%": typeof Map > "u" ? c : Map, "%MapIteratorPrototype%": typeof Map > "u" || !y || !g ? c : g((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? c : Promise, "%Proxy%": typeof Proxy > "u" ? c : Proxy, "%RangeError%": r, "%ReferenceError%": a, "%Reflect%": typeof Reflect > "u" ? c : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? c : Set, "%SetIteratorPrototype%": typeof Set > "u" || !y || !g ? c : g((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? c : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": y && g ? g(""[Symbol.iterator]()) : c, "%Symbol%": y ? Symbol : c, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": k, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array > "u" ? c : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? c : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? c : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? c : Uint32Array, "%URIError%": s, "%WeakMap%": typeof WeakMap > "u" ? c : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? c : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? c : WeakSet };
9197
9245
  if (g) try {
@@ -9206,27 +9254,27 @@ function Bt() {
9206
9254
  else if (K === "%GeneratorFunction%") re = l("function* () {}");
9207
9255
  else if (K === "%AsyncGeneratorFunction%") re = l("async function* () {}");
9208
9256
  else if (K === "%AsyncGenerator%") {
9209
- var F = Y("%AsyncGeneratorFunction%");
9210
- F && (re = F.prototype);
9257
+ var D = Y("%AsyncGeneratorFunction%");
9258
+ D && (re = D.prototype);
9211
9259
  } else if (K === "%AsyncIteratorPrototype%") {
9212
9260
  var Z = Y("%AsyncGenerator%");
9213
9261
  Z && g && (re = g(Z.prototype));
9214
9262
  }
9215
9263
  return m[K] = re, re;
9216
- }, v = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, x = Zi(), S = eu(), I = x.call(Function.call, Array.prototype.concat), M = x.call(Function.apply, Array.prototype.splice), O = x.call(Function.call, String.prototype.replace), B = x.call(Function.call, String.prototype.slice), T = x.call(Function.call, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, D = /\\(\\)?/g, N = function(Y) {
9264
+ }, v = { __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], "%ArrayProto_forEach%": ["Array", "prototype", "forEach"], "%ArrayProto_keys%": ["Array", "prototype", "keys"], "%ArrayProto_values%": ["Array", "prototype", "values"], "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"], "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"], "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"], "%BooleanPrototype%": ["Boolean", "prototype"], "%DataViewPrototype%": ["DataView", "prototype"], "%DatePrototype%": ["Date", "prototype"], "%ErrorPrototype%": ["Error", "prototype"], "%EvalErrorPrototype%": ["EvalError", "prototype"], "%Float32ArrayPrototype%": ["Float32Array", "prototype"], "%Float64ArrayPrototype%": ["Float64Array", "prototype"], "%FunctionPrototype%": ["Function", "prototype"], "%Generator%": ["GeneratorFunction", "prototype"], "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"], "%Int8ArrayPrototype%": ["Int8Array", "prototype"], "%Int16ArrayPrototype%": ["Int16Array", "prototype"], "%Int32ArrayPrototype%": ["Int32Array", "prototype"], "%JSONParse%": ["JSON", "parse"], "%JSONStringify%": ["JSON", "stringify"], "%MapPrototype%": ["Map", "prototype"], "%NumberPrototype%": ["Number", "prototype"], "%ObjectPrototype%": ["Object", "prototype"], "%ObjProto_toString%": ["Object", "prototype", "toString"], "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"], "%PromisePrototype%": ["Promise", "prototype"], "%PromiseProto_then%": ["Promise", "prototype", "then"], "%Promise_all%": ["Promise", "all"], "%Promise_reject%": ["Promise", "reject"], "%Promise_resolve%": ["Promise", "resolve"], "%RangeErrorPrototype%": ["RangeError", "prototype"], "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"], "%RegExpPrototype%": ["RegExp", "prototype"], "%SetPrototype%": ["Set", "prototype"], "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"], "%StringPrototype%": ["String", "prototype"], "%SymbolPrototype%": ["Symbol", "prototype"], "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"], "%TypedArrayPrototype%": ["TypedArray", "prototype"], "%TypeErrorPrototype%": ["TypeError", "prototype"], "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"], "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"], "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"], "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"], "%URIErrorPrototype%": ["URIError", "prototype"], "%WeakMapPrototype%": ["WeakMap", "prototype"], "%WeakSetPrototype%": ["WeakSet", "prototype"] }, x = Zi(), S = iu(), I = x.call(Function.call, Array.prototype.concat), M = x.call(Function.apply, Array.prototype.splice), O = x.call(Function.call, String.prototype.replace), B = x.call(Function.call, String.prototype.slice), T = x.call(Function.call, RegExp.prototype.exec), W = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, F = /\\(\\)?/g, N = function(Y) {
9217
9265
  var K = B(Y, 0, 1), re = B(Y, -1);
9218
9266
  if (K === "%" && re !== "%") throw new n("invalid intrinsic syntax, expected closing `%`");
9219
9267
  if (re === "%" && K !== "%") throw new n("invalid intrinsic syntax, expected opening `%`");
9220
- var F = [];
9268
+ var D = [];
9221
9269
  return O(Y, W, function(Z, P, J, be) {
9222
- F[F.length] = J ? O(be, D, "$1") : P || Z;
9223
- }), F;
9270
+ D[D.length] = J ? O(be, F, "$1") : P || Z;
9271
+ }), D;
9224
9272
  }, ae = function(Y, K) {
9225
- var re = Y, F;
9226
- if (S(v, re) && (F = v[re], re = "%" + F[0] + "%"), S(m, re)) {
9273
+ var re = Y, D;
9274
+ if (S(v, re) && (D = v[re], re = "%" + D[0] + "%"), S(m, re)) {
9227
9275
  var Z = m[re];
9228
9276
  if (Z === b && (Z = E(re)), typeof Z > "u" && !K) throw new i("intrinsic " + Y + " exists, but is not available. Please file an issue!");
9229
- return { alias: F, name: re, value: Z };
9277
+ return { alias: D, name: re, value: Z };
9230
9278
  }
9231
9279
  throw new n("intrinsic " + Y + " does not exist!");
9232
9280
  };
@@ -9234,12 +9282,12 @@ function Bt() {
9234
9282
  if (typeof Y != "string" || Y.length === 0) throw new i("intrinsic name must be a non-empty string");
9235
9283
  if (arguments.length > 1 && typeof K != "boolean") throw new i('"allowMissing" argument must be a boolean');
9236
9284
  if (T(/^%?[^%]*%?$/, Y) === null) throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
9237
- var re = N(Y), F = re.length > 0 ? re[0] : "", Z = ae("%" + F + "%", K), P = Z.name, J = Z.value, be = !1, te = Z.alias;
9238
- te && (F = te[0], M(re, I([0, 1], te)));
9285
+ var re = N(Y), D = re.length > 0 ? re[0] : "", Z = ae("%" + D + "%", K), P = Z.name, J = Z.value, be = !1, te = Z.alias;
9286
+ te && (D = te[0], M(re, I([0, 1], te)));
9239
9287
  for (var we = 1, V = !0; we < re.length; we += 1) {
9240
9288
  var L = re[we], ne = B(L, 0, 1), H = B(L, -1);
9241
9289
  if ((ne === '"' || ne === "'" || ne === "`" || H === '"' || H === "'" || H === "`") && ne !== H) throw new n("property names with quotes must have matching quotes");
9242
- if ((L === "constructor" || !V) && (be = !0), F += "." + L, P = "%" + F + "%", S(m, P)) J = m[P];
9290
+ if ((L === "constructor" || !V) && (be = !0), D += "." + L, P = "%" + D + "%", S(m, P)) J = m[P];
9243
9291
  else if (J != null) {
9244
9292
  if (!(L in J)) {
9245
9293
  if (!K) throw new i("base intrinsic for " + Y + " exists, but the property is not available.");
@@ -9266,7 +9314,7 @@ function eo() {
9266
9314
  }
9267
9315
  return dr = e, dr;
9268
9316
  }
9269
- function Ia() {
9317
+ function Oa() {
9270
9318
  if (Ci) return pr;
9271
9319
  Ci = !0;
9272
9320
  var c = Bt(), e = c("%Object.getOwnPropertyDescriptor%", !0);
@@ -9277,10 +9325,10 @@ function Ia() {
9277
9325
  }
9278
9326
  return pr = e, pr;
9279
9327
  }
9280
- function tu() {
9328
+ function ou() {
9281
9329
  if (Oi) return gr;
9282
9330
  Oi = !0;
9283
- var c = eo(), e = Aa(), t = Jt(), r = Ia();
9331
+ var c = eo(), e = Ca(), t = Jt(), r = Oa();
9284
9332
  return gr = function(a, n, i) {
9285
9333
  if (!a || typeof a != "object" && typeof a != "function") throw new t("`obj` must be an object or a function`");
9286
9334
  if (typeof n != "string" && typeof n != "symbol") throw new t("`property` must be a string or a symbol`");
@@ -9294,7 +9342,7 @@ function tu() {
9294
9342
  else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
9295
9343
  }, gr;
9296
9344
  }
9297
- function ru() {
9345
+ function su() {
9298
9346
  if (Pi) return mr;
9299
9347
  Pi = !0;
9300
9348
  var c = eo(), e = function() {
@@ -9309,10 +9357,10 @@ function ru() {
9309
9357
  }
9310
9358
  }, mr = e, mr;
9311
9359
  }
9312
- function nu() {
9360
+ function au() {
9313
9361
  if (Mi) return br;
9314
9362
  Mi = !0;
9315
- var c = Bt(), e = tu(), t = ru()(), r = Ia(), a = Jt(), n = c("%Math.floor%");
9363
+ var c = Bt(), e = ou(), t = su()(), r = Oa(), a = Jt(), n = c("%Math.floor%");
9316
9364
  return br = function(i, s) {
9317
9365
  if (typeof i != "function") throw new a("`fn` is not a function");
9318
9366
  if (typeof s != "number" || s < 0 || s > 4294967295 || n(s) !== s) throw new a("`length` must be a positive 32-bit integer");
@@ -9324,10 +9372,10 @@ function nu() {
9324
9372
  return (l || u || !o) && (t ? e(i, "length", s, !0, !0) : e(i, "length", s)), i;
9325
9373
  }, br;
9326
9374
  }
9327
- function iu() {
9375
+ function lu() {
9328
9376
  if (Ri) return Mt;
9329
9377
  Ri = !0;
9330
- var c = Zi(), e = Bt(), t = nu(), r = Jt(), a = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), i = e("%Reflect.apply%", !0) || c.call(n, a), s = eo(), o = e("%Math.max%");
9378
+ var c = Zi(), e = Bt(), t = au(), r = Jt(), a = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), i = e("%Reflect.apply%", !0) || c.call(n, a), s = eo(), o = e("%Math.max%");
9331
9379
  Mt = function(u) {
9332
9380
  if (typeof u != "function") throw new r("a function is required");
9333
9381
  var d = i(c, n, arguments);
@@ -9338,27 +9386,27 @@ function iu() {
9338
9386
  };
9339
9387
  return s ? s(Mt, "apply", { value: l }) : Mt.apply = l, Mt;
9340
9388
  }
9341
- function ou() {
9389
+ function cu() {
9342
9390
  if (ji) return yr;
9343
9391
  ji = !0;
9344
- var c = Bt(), e = iu(), t = e(c("String.prototype.indexOf"));
9392
+ var c = Bt(), e = lu(), t = e(c("String.prototype.indexOf"));
9345
9393
  return yr = function(r, a) {
9346
9394
  var n = c(r, !!a);
9347
9395
  return typeof n == "function" && t(r, ".prototype.") > -1 ? e(n) : n;
9348
9396
  }, yr;
9349
9397
  }
9350
- var si, ai, li, ci, ui, hi, fi, di, pi, gi, mi, bi, yi, vi, wi, _i, ar, ki, lr, Si, cr, Ei, ur, xi, hr, Ai, fr, Ii, dr, Ti, pr, Ci, gr, Oi, mr, Pi, br, Mi, Mt, Ri, yr, ji, su = He(() => {
9398
+ var si, ai, li, ci, ui, hi, fi, di, pi, gi, mi, bi, yi, vi, wi, _i, ar, ki, lr, Si, cr, Ei, ur, xi, hr, Ai, fr, Ii, dr, Ti, pr, Ci, gr, Oi, mr, Pi, br, Mi, Mt, Ri, yr, ji, uu = He(() => {
9351
9399
  le(), ue(), ce(), si = {}, ai = !1, li = {}, ci = !1, ui = {}, hi = !1, fi = {}, di = !1, pi = {}, gi = !1, mi = {}, bi = !1, yi = {}, vi = !1, wi = {}, _i = !1, ar = {}, ki = !1, lr = {}, Si = !1, cr = {}, Ei = !1, ur = {}, xi = !1, hr = {}, Ai = !1, fr = {}, Ii = !1, dr = {}, Ti = !1, pr = {}, Ci = !1, gr = {}, Oi = !1, mr = {}, Pi = !1, br = {}, Mi = !1, Mt = {}, Ri = !1, yr = {}, ji = !1;
9352
9400
  });
9353
9401
  function to(c) {
9354
9402
  throw new Error("Node.js process " + c + " is not supported by JSPM core outside of Node.js");
9355
9403
  }
9356
- function au() {
9357
- !Et || !kt || (Et = !1, kt.length ? tt = kt.concat(tt) : Gt = -1, tt.length && Ta());
9404
+ function hu() {
9405
+ !Et || !kt || (Et = !1, kt.length ? tt = kt.concat(tt) : Gt = -1, tt.length && Pa());
9358
9406
  }
9359
- function Ta() {
9407
+ function Pa() {
9360
9408
  if (!Et) {
9361
- var c = setTimeout(au, 0);
9409
+ var c = setTimeout(hu, 0);
9362
9410
  Et = !0;
9363
9411
  for (var e = tt.length; e; ) {
9364
9412
  for (kt = tt, tt = []; ++Gt < e; ) kt && kt[Gt].run();
@@ -9367,67 +9415,67 @@ function Ta() {
9367
9415
  kt = null, Et = !1, clearTimeout(c);
9368
9416
  }
9369
9417
  }
9370
- function lu(c) {
9418
+ function fu(c) {
9371
9419
  var e = new Array(arguments.length - 1);
9372
9420
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
9373
- tt.push(new Ca(c, e)), tt.length === 1 && !Et && setTimeout(Ta, 0);
9421
+ tt.push(new Ma(c, e)), tt.length === 1 && !Et && setTimeout(Pa, 0);
9374
9422
  }
9375
- function Ca(c, e) {
9423
+ function Ma(c, e) {
9376
9424
  this.fun = c, this.array = e;
9377
9425
  }
9378
- function De() {
9426
+ function Fe() {
9379
9427
  }
9380
- function cu(c) {
9428
+ function du(c) {
9381
9429
  to("_linkedBinding");
9382
9430
  }
9383
- function uu(c) {
9431
+ function pu(c) {
9384
9432
  to("dlopen");
9385
9433
  }
9386
- function hu() {
9434
+ function gu() {
9387
9435
  return [];
9388
9436
  }
9389
- function fu() {
9437
+ function mu() {
9390
9438
  return [];
9391
9439
  }
9392
- function du(c, e) {
9440
+ function bu(c, e) {
9393
9441
  if (!c) throw new Error(e || "assertion error");
9394
9442
  }
9395
- function pu() {
9443
+ function yu() {
9396
9444
  return !1;
9397
9445
  }
9398
- function gu() {
9446
+ function vu() {
9399
9447
  return st.now() / 1e3;
9400
9448
  }
9401
- function Fr(c) {
9449
+ function Dr(c) {
9402
9450
  var e = Math.floor((Date.now() - st.now()) * 1e-3), t = st.now() * 1e-3, r = Math.floor(t) + e, a = Math.floor(t % 1 * 1e9);
9403
9451
  return c && (r = r - c[0], a = a - c[1], a < 0 && (r--, a += vr)), [r, a];
9404
9452
  }
9405
9453
  function dt() {
9406
9454
  return ro;
9407
9455
  }
9408
- function mu(c) {
9456
+ function wu(c) {
9409
9457
  return [];
9410
9458
  }
9411
- var tt, Et, kt, Gt, uo, ho, fo, po, go, mo, bo, yo, vo, wo, _o, ko, So, Eo, xo, Ao, Io, To, Co, Oo, Po, er, Mo, Ro, jo, Lo, No, Uo, Bo, Do, Fo, $o, Wo, qo, Ho, zo, Ko, Vo, Go, Yo, Qo, Jo, Xo, Zo, es, ts, rs, st, $r, vr, ns, is, os, ss, as, ls, cs, us, hs, fs, ds, ro, Oa = He(() => {
9412
- le(), ue(), ce(), tt = [], Et = !1, Gt = -1, Ca.prototype.run = function() {
9459
+ var tt, Et, kt, Gt, po, go, mo, bo, yo, vo, wo, _o, ko, So, Eo, xo, Ao, Io, To, Co, Oo, Po, Mo, Ro, jo, er, Lo, No, Uo, Bo, Fo, Do, $o, Wo, qo, Ho, zo, Ko, Vo, Go, Yo, Qo, Jo, Xo, Zo, es, ts, rs, ns, is, os, st, $r, vr, ss, as, ls, cs, us, hs, fs, ds, ps, gs, ms, ro, Ra = He(() => {
9460
+ le(), ue(), ce(), tt = [], Et = !1, Gt = -1, Ma.prototype.run = function() {
9413
9461
  this.fun.apply(null, this.array);
9414
- }, uo = "browser", ho = "x64", fo = "browser", po = { PATH: "/usr/bin", LANG: navigator.language + ".UTF-8", PWD: "/", HOME: "/home", TMP: "/tmp" }, go = ["/usr/bin/node"], mo = [], bo = "v16.8.0", yo = {}, vo = function(c, e) {
9462
+ }, po = "browser", go = "x64", mo = "browser", bo = { PATH: "/usr/bin", LANG: navigator.language + ".UTF-8", PWD: "/", HOME: "/home", TMP: "/tmp" }, yo = ["/usr/bin/node"], vo = [], wo = "v16.8.0", _o = {}, ko = function(c, e) {
9415
9463
  console.warn((e ? e + ": " : "") + c);
9416
- }, wo = function(c) {
9464
+ }, So = function(c) {
9417
9465
  to("binding");
9418
- }, _o = function(c) {
9466
+ }, Eo = function(c) {
9419
9467
  return 0;
9420
- }, ko = function() {
9468
+ }, xo = function() {
9421
9469
  return "/";
9422
- }, So = function(c) {
9423
- }, Eo = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, xo = De, Ao = [], Io = {}, To = !1, Co = {}, Oo = De, Po = De, er = function() {
9470
+ }, Ao = function(c) {
9471
+ }, Io = { name: "node", sourceUrl: "", headersUrl: "", libUrl: "" }, To = Fe, Co = [], Oo = {}, Po = !1, Mo = {}, Ro = Fe, jo = Fe, er = function() {
9424
9472
  return {};
9425
- }, Mo = er, Ro = er, jo = De, Lo = De, No = De, Uo = {}, Bo = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, Do = De, Fo = De, $o = De, Wo = De, qo = De, Ho = De, zo = De, Ko = void 0, Vo = void 0, Go = void 0, Yo = De, Qo = 2, Jo = 1, Xo = "/bin/usr/node", Zo = 9229, es = "node", ts = [], rs = De, st = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, st.now === void 0 && ($r = Date.now(), st.timing && st.timing.navigationStart && ($r = st.timing.navigationStart), st.now = () => Date.now() - $r), vr = 1e9, Fr.bigint = function(c) {
9426
- var e = Fr(c);
9473
+ }, Lo = er, No = er, Uo = Fe, Bo = Fe, Fo = Fe, Do = {}, $o = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, Wo = Fe, qo = Fe, Ho = Fe, zo = Fe, Ko = Fe, Vo = Fe, Go = Fe, Yo = void 0, Qo = void 0, Jo = void 0, Xo = Fe, Zo = 2, es = 1, ts = "/bin/usr/node", rs = 9229, ns = "node", is = [], os = Fe, st = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, st.now === void 0 && ($r = Date.now(), st.timing && st.timing.navigationStart && ($r = st.timing.navigationStart), st.now = () => Date.now() - $r), vr = 1e9, Dr.bigint = function(c) {
9474
+ var e = Dr(c);
9427
9475
  return typeof BigInt > "u" ? e[0] * vr + e[1] : BigInt(e[0] * vr) + BigInt(e[1]);
9428
- }, ns = 10, is = {}, os = 0, ss = dt, as = dt, ls = dt, cs = dt, us = dt, hs = De, fs = dt, ds = dt, ro = { version: bo, versions: yo, arch: ho, platform: fo, release: Eo, _rawDebug: xo, moduleLoadList: Ao, binding: wo, _linkedBinding: cu, _events: is, _eventsCount: os, _maxListeners: ns, on: dt, addListener: ss, once: as, off: ls, removeListener: cs, removeAllListeners: us, emit: hs, prependListener: fs, prependOnceListener: ds, listeners: mu, domain: Io, _exiting: To, config: Co, dlopen: uu, uptime: gu, _getActiveRequests: hu, _getActiveHandles: fu, reallyExit: Oo, _kill: Po, cpuUsage: er, resourceUsage: Mo, memoryUsage: Ro, kill: jo, exit: Lo, openStdin: No, allowedNodeEnvironmentFlags: Uo, assert: du, features: Bo, _fatalExceptions: Do, setUncaughtExceptionCaptureCallback: Fo, hasUncaughtExceptionCaptureCallback: pu, emitWarning: vo, nextTick: lu, _tickCallback: $o, _debugProcess: Wo, _debugEnd: qo, _startProfilerIdleNotifier: Ho, _stopProfilerIdleNotifier: zo, stdout: Ko, stdin: Go, stderr: Vo, abort: Yo, umask: _o, chdir: So, cwd: ko, env: po, title: uo, argv: go, execArgv: mo, pid: Qo, ppid: Jo, execPath: Xo, debugPort: Zo, hrtime: Fr, argv0: es, _preload_modules: ts, setSourceMapsEnabled: rs };
9476
+ }, ss = 10, as = {}, ls = 0, cs = dt, us = dt, hs = dt, fs = dt, ds = dt, ps = Fe, gs = dt, ms = dt, ro = { version: wo, versions: _o, arch: go, platform: mo, release: Io, _rawDebug: To, moduleLoadList: Co, binding: So, _linkedBinding: du, _events: as, _eventsCount: ls, _maxListeners: ss, on: dt, addListener: cs, once: us, off: hs, removeListener: fs, removeAllListeners: ds, emit: ps, prependListener: gs, prependOnceListener: ms, listeners: wu, domain: Oo, _exiting: Po, config: Mo, dlopen: pu, uptime: vu, _getActiveRequests: gu, _getActiveHandles: mu, reallyExit: Ro, _kill: jo, cpuUsage: er, resourceUsage: Lo, memoryUsage: No, kill: Uo, exit: Bo, openStdin: Fo, allowedNodeEnvironmentFlags: Do, assert: bu, features: $o, _fatalExceptions: Wo, setUncaughtExceptionCaptureCallback: qo, hasUncaughtExceptionCaptureCallback: yu, emitWarning: ko, nextTick: fu, _tickCallback: Ho, _debugProcess: zo, _debugEnd: Ko, _startProfilerIdleNotifier: Vo, _stopProfilerIdleNotifier: Go, stdout: Yo, stdin: Jo, stderr: Qo, abort: Xo, umask: Eo, chdir: Ao, cwd: xo, env: bo, title: po, argv: yo, execArgv: vo, pid: Zo, ppid: es, execPath: ts, debugPort: rs, hrtime: Dr, argv0: ns, _preload_modules: is, setSourceMapsEnabled: os };
9429
9477
  });
9430
- function bu() {
9478
+ function _u() {
9431
9479
  if (Li) return wr;
9432
9480
  Li = !0;
9433
9481
  var c = ro;
@@ -9578,14 +9626,14 @@ function bu() {
9578
9626
  }, sep: "/", delimiter: ":", win32: null, posix: null };
9579
9627
  return a.posix = a, wr = a, wr;
9580
9628
  }
9581
- var wr, Li, Ni, yu = He(() => {
9582
- le(), ue(), ce(), Oa(), wr = {}, Li = !1, Ni = bu();
9583
- }), Pa = {};
9584
- Lt(Pa, { URL: () => $a, Url: () => Na, default: () => Fe, fileURLToPath: () => Ra, format: () => Ua, parse: () => Fa, pathToFileURL: () => ja, resolve: () => Ba, resolveObject: () => Da });
9585
- function vu() {
9629
+ var wr, Li, Ni, ku = He(() => {
9630
+ le(), ue(), ce(), Ra(), wr = {}, Li = !1, Ni = _u();
9631
+ }), ja = {};
9632
+ Lt(ja, { URL: () => Ha, Url: () => Fa, default: () => De, fileURLToPath: () => Na, format: () => Da, parse: () => qa, pathToFileURL: () => Ua, resolve: () => $a, resolveObject: () => Wa });
9633
+ function Su() {
9586
9634
  if (Ui) return _r;
9587
9635
  Ui = !0;
9588
- var c = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = c && e && typeof e.get == "function" ? e.get : null, r = c && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, i = a && n && typeof n.get == "function" ? n.get : null, s = a && Set.prototype.forEach, o = typeof WeakMap == "function" && WeakMap.prototype, l = o ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, d = u ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, y = p ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, g = Object.prototype.toString, b = Function.prototype.toString, k = String.prototype.match, m = String.prototype.slice, w = String.prototype.replace, E = String.prototype.toUpperCase, v = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, I = Array.prototype.join, M = Array.prototype.slice, O = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, D = typeof Symbol == "function" && typeof Symbol.iterator == "object", N = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === D || !0) ? Symbol.toStringTag : null, ae = Object.prototype.propertyIsEnumerable, Y = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(z) {
9636
+ var c = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = c && e && typeof e.get == "function" ? e.get : null, r = c && Map.prototype.forEach, a = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && a ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, i = a && n && typeof n.get == "function" ? n.get : null, s = a && Set.prototype.forEach, o = typeof WeakMap == "function" && WeakMap.prototype, l = o ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, d = u ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, y = p ? WeakRef.prototype.deref : null, f = Boolean.prototype.valueOf, g = Object.prototype.toString, b = Function.prototype.toString, k = String.prototype.match, m = String.prototype.slice, w = String.prototype.replace, E = String.prototype.toUpperCase, v = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, I = Array.prototype.join, M = Array.prototype.slice, O = Math.floor, B = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, W = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, F = typeof Symbol == "function" && typeof Symbol.iterator == "object", N = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === F || !0) ? Symbol.toStringTag : null, ae = Object.prototype.propertyIsEnumerable, Y = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(z) {
9589
9637
  return z.__proto__;
9590
9638
  } : null);
9591
9639
  function K(z, ie) {
@@ -9600,7 +9648,7 @@ function vu() {
9600
9648
  }
9601
9649
  return w.call(ie, xe, "$&_");
9602
9650
  }
9603
- var re = La, F = re.custom, Z = G(F) ? F : null;
9651
+ var re = Ba, D = re.custom, Z = G(D) ? D : null;
9604
9652
  _r = function z(ie, xe, Ae, Ie) {
9605
9653
  var Ce = xe || {};
9606
9654
  if (oe(Ce, "quoteStyle") && Ce.quoteStyle !== "single" && Ce.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"');
@@ -9640,8 +9688,8 @@ function vu() {
9640
9688
  return "[Function" + (Xt ? ": " + Xt : " (anonymous)") + "]" + (Ct.length > 0 ? " { " + I.call(Ct, ", ") + " }" : "");
9641
9689
  }
9642
9690
  if (G(ie)) {
9643
- var Dt = D ? w.call(String(ie), /^(Symbol\(.*\))_[^)]*$/, "$1") : W.call(ie);
9644
- return typeof ie == "object" && !D ? h(Dt) : Dt;
9691
+ var Ft = F ? w.call(String(ie), /^(Symbol\(.*\))_[^)]*$/, "$1") : W.call(ie);
9692
+ return typeof ie == "object" && !F ? h(Ft) : Ft;
9645
9693
  }
9646
9694
  if (ve(ie)) {
9647
9695
  for (var C = "<" + v.call(String(ie.nodeName)), j = ie.attributes || [], _e = 0; _e < j.length; _e++) C += " " + j[_e].name + "=" + P(J(j[_e].value), "double", Ce);
@@ -9682,7 +9730,7 @@ function vu() {
9682
9730
  if (typeof window < "u" && ie === window) return "{ [object Window] }";
9683
9731
  if (typeof globalThis < "u" && ie === globalThis || typeof kr < "u" && ie === kr) return "{ [object globalThis] }";
9684
9732
  if (!te(ie) && !we(ie)) {
9685
- var Ve = ke(ie, ze), Ft = Y ? Y(ie) === Object.prototype : ie instanceof Object || ie.constructor === Object, $t = ie instanceof Object ? "" : "null prototype", Wt = !Ft && N && Object(ie) === ie && N in ie ? m.call(R(ie), 8, -1) : $t ? "Object" : "", Zt = Ft || typeof ie.constructor != "function" ? "" : ie.constructor.name ? ie.constructor.name + " " : "", vt = Zt + (Wt || $t ? "[" + I.call(S.call([], Wt || [], $t || []), ": ") + "] " : "");
9733
+ var Ve = ke(ie, ze), Dt = Y ? Y(ie) === Object.prototype : ie instanceof Object || ie.constructor === Object, $t = ie instanceof Object ? "" : "null prototype", Wt = !Dt && N && Object(ie) === ie && N in ie ? m.call(R(ie), 8, -1) : $t ? "Object" : "", Zt = Dt || typeof ie.constructor != "function" ? "" : ie.constructor.name ? ie.constructor.name + " " : "", vt = Zt + (Wt || $t ? "[" + I.call(S.call([], Wt || [], $t || []), ": ") + "] " : "");
9686
9734
  return Ve.length === 0 ? vt + "{}" : Je ? vt + "{" + he(Ve, Je) + "}" : vt + "{ " + I.call(Ve, ", ") + " }";
9687
9735
  }
9688
9736
  return String(ie);
@@ -9716,7 +9764,7 @@ function vu() {
9716
9764
  return R(z) === "[object Boolean]" && (!N || !(typeof z == "object" && N in z));
9717
9765
  }
9718
9766
  function G(z) {
9719
- if (D) return z && typeof z == "object" && z instanceof Symbol;
9767
+ if (F) return z && typeof z == "object" && z instanceof Symbol;
9720
9768
  if (typeof z == "symbol") return !0;
9721
9769
  if (!z || typeof z != "object" || !W) return !1;
9722
9770
  try {
@@ -9867,20 +9915,20 @@ function vu() {
9867
9915
  for (var Ie = 0; Ie < z.length; Ie++) Ae[Ie] = oe(z, Ie) ? ie(z[Ie], z) : "";
9868
9916
  }
9869
9917
  var Ce = typeof T == "function" ? T(z) : [], Ge;
9870
- if (D) {
9918
+ if (F) {
9871
9919
  Ge = {};
9872
9920
  for (var Ye = 0; Ye < Ce.length; Ye++) Ge["$" + Ce[Ye]] = Ce[Ye];
9873
9921
  }
9874
- for (var Ue in z) oe(z, Ue) && (xe && String(Number(Ue)) === Ue && Ue < z.length || D && Ge["$" + Ue] instanceof Symbol || (x.call(/[^\w$]/, Ue) ? Ae.push(ie(Ue, z) + ": " + ie(z[Ue], z)) : Ae.push(Ue + ": " + ie(z[Ue], z))));
9922
+ for (var Ue in z) oe(z, Ue) && (xe && String(Number(Ue)) === Ue && Ue < z.length || F && Ge["$" + Ue] instanceof Symbol || (x.call(/[^\w$]/, Ue) ? Ae.push(ie(Ue, z) + ": " + ie(z[Ue], z)) : Ae.push(Ue + ": " + ie(z[Ue], z))));
9875
9923
  if (typeof T == "function") for (var Qe = 0; Qe < Ce.length; Qe++) ae.call(z, Ce[Qe]) && Ae.push("[" + ie(Ce[Qe]) + "]: " + ie(z[Ce[Qe]], z));
9876
9924
  return Ae;
9877
9925
  }
9878
9926
  return _r;
9879
9927
  }
9880
- function wu() {
9928
+ function Eu() {
9881
9929
  if (Bi) return Sr;
9882
9930
  Bi = !0;
9883
- var c = Bt(), e = ou(), t = vu(), r = Jt(), a = c("%WeakMap%", !0), n = c("%Map%", !0), i = e("WeakMap.prototype.get", !0), s = e("WeakMap.prototype.set", !0), o = e("WeakMap.prototype.has", !0), l = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(b, k) {
9931
+ var c = Bt(), e = cu(), t = Su(), r = Jt(), a = c("%WeakMap%", !0), n = c("%Map%", !0), i = e("WeakMap.prototype.get", !0), s = e("WeakMap.prototype.set", !0), o = e("WeakMap.prototype.has", !0), l = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), d = e("Map.prototype.has", !0), p = function(b, k) {
9884
9932
  for (var m = b, w; (w = m.next) !== null; m = w) if (w.key === k) return m.next = w.next, w.next = b.next, b.next = w, w;
9885
9933
  }, y = function(b, k) {
9886
9934
  var m = p(b, k);
@@ -9914,8 +9962,8 @@ function wu() {
9914
9962
  }, Sr;
9915
9963
  }
9916
9964
  function no() {
9917
- if (Di) return Er;
9918
- Di = !0;
9965
+ if (Fi) return Er;
9966
+ Fi = !0;
9919
9967
  var c = String.prototype.replace, e = /%20/g, t = { RFC1738: "RFC1738", RFC3986: "RFC3986" };
9920
9968
  return Er = { default: t.RFC3986, formatters: { RFC1738: function(r) {
9921
9969
  return c.call(r, e, "+");
@@ -9923,9 +9971,9 @@ function no() {
9923
9971
  return String(r);
9924
9972
  } }, RFC1738: t.RFC1738, RFC3986: t.RFC3986 }, Er;
9925
9973
  }
9926
- function Ma() {
9927
- if (Fi) return xr;
9928
- Fi = !0;
9974
+ function La() {
9975
+ if (Di) return xr;
9976
+ Di = !0;
9929
9977
  var c = no(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = (function() {
9930
9978
  for (var b = [], k = 0; k < 256; ++k) b.push("%" + ((k < 16 ? "0" : "") + k.toString(16)).toUpperCase());
9931
9979
  return b;
@@ -10022,10 +10070,10 @@ function Ma() {
10022
10070
  };
10023
10071
  return xr = { arrayToObject: n, assign: s, combine: f, compact: d, decode: o, encode: u, isBuffer: y, isRegExp: p, maybeMap: g, merge: i }, xr;
10024
10072
  }
10025
- function _u() {
10073
+ function xu() {
10026
10074
  if ($i) return Ar;
10027
10075
  $i = !0;
10028
- var c = wu(), e = Ma(), t = no(), r = Object.prototype.hasOwnProperty, a = { brackets: function(g) {
10076
+ var c = Eu(), e = La(), t = no(), r = Object.prototype.hasOwnProperty, a = { brackets: function(g) {
10029
10077
  return g + "[]";
10030
10078
  }, comma: "comma", indices: function(g, b) {
10031
10079
  return g + "[" + b + "]";
@@ -10037,14 +10085,14 @@ function _u() {
10037
10085
  return o.call(g);
10038
10086
  }, skipNulls: !1, strictNullHandling: !1 }, d = function(g) {
10039
10087
  return typeof g == "string" || typeof g == "number" || typeof g == "boolean" || typeof g == "symbol" || typeof g == "bigint";
10040
- }, p = {}, y = function g(b, k, m, w, E, v, x, S, I, M, O, B, T, W, D, N, ae, Y) {
10041
- for (var K = b, re = Y, F = 0, Z = !1; (re = re.get(p)) !== void 0 && !Z; ) {
10088
+ }, p = {}, y = function g(b, k, m, w, E, v, x, S, I, M, O, B, T, W, F, N, ae, Y) {
10089
+ for (var K = b, re = Y, D = 0, Z = !1; (re = re.get(p)) !== void 0 && !Z; ) {
10042
10090
  var P = re.get(b);
10043
- if (F += 1, typeof P < "u") {
10044
- if (P === F) throw new RangeError("Cyclic object value");
10091
+ if (D += 1, typeof P < "u") {
10092
+ if (P === D) throw new RangeError("Cyclic object value");
10045
10093
  Z = !0;
10046
10094
  }
10047
- typeof re.get(p) > "u" && (F = 0);
10095
+ typeof re.get(p) > "u" && (D = 0);
10048
10096
  }
10049
10097
  if (typeof M == "function" ? K = M(k, K) : K instanceof Date ? K = T(K) : m === "comma" && n(K) && (K = e.maybeMap(K, function(R) {
10050
10098
  return R instanceof Date ? T(R) : R;
@@ -10055,9 +10103,9 @@ function _u() {
10055
10103
  if (d(K) || e.isBuffer(K)) {
10056
10104
  if (I) {
10057
10105
  var J = N ? k : I(k, u.encoder, ae, "key", W);
10058
- return [D(J) + "=" + D(I(K, u.encoder, ae, "value", W))];
10106
+ return [F(J) + "=" + F(I(K, u.encoder, ae, "value", W))];
10059
10107
  }
10060
- return [D(k) + "=" + D(String(K))];
10108
+ return [F(k) + "=" + F(String(K))];
10061
10109
  }
10062
10110
  var be = [];
10063
10111
  if (typeof K > "u") return be;
@@ -10074,9 +10122,9 @@ function _u() {
10074
10122
  var H = te[ne], G = typeof H == "object" && typeof H.value < "u" ? H.value : K[H];
10075
10123
  if (!(x && G === null)) {
10076
10124
  var Q = B && S ? H.replace(/\./g, "%2E") : H, me = n(K) ? typeof m == "function" ? m(L, Q) : L : L + (B ? "." + Q : "[" + Q + "]");
10077
- Y.set(b, F);
10125
+ Y.set(b, D);
10078
10126
  var oe = c();
10079
- oe.set(p, Y), s(be, g(G, me, m, w, E, v, x, S, m === "comma" && N && n(K) ? null : I, M, O, B, T, W, D, N, ae, oe));
10127
+ oe.set(p, Y), s(be, g(G, me, m, w, E, v, x, S, m === "comma" && N && n(K) ? null : I, M, O, B, T, W, F, N, ae, oe));
10080
10128
  }
10081
10129
  }
10082
10130
  return be;
@@ -10114,10 +10162,10 @@ function _u() {
10114
10162
  return m.charsetSentinel && (m.charset === "iso-8859-1" ? T += "utf8=%26%2310003%3B&" : T += "utf8=%E2%9C%93&"), B.length > 0 ? T + B : "";
10115
10163
  }, Ar;
10116
10164
  }
10117
- function ku() {
10165
+ function Au() {
10118
10166
  if (Wi) return Ir;
10119
10167
  Wi = !0;
10120
- var c = Ma(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = { allowDots: !1, allowEmptyArrays: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decodeDotInKeys: !1, decoder: c.decode, delimiter: "&", depth: 5, duplicates: "combine", ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictDepth: !1, strictNullHandling: !1 }, a = function(p) {
10168
+ var c = La(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = { allowDots: !1, allowEmptyArrays: !1, allowPrototypes: !1, allowSparse: !1, arrayLimit: 20, charset: "utf-8", charsetSentinel: !1, comma: !1, decodeDotInKeys: !1, decoder: c.decode, delimiter: "&", depth: 5, duplicates: "combine", ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictDepth: !1, strictNullHandling: !1 }, a = function(p) {
10121
10169
  return p.replace(/&#(\d+);/g, function(y, f) {
10122
10170
  return String.fromCharCode(parseInt(f, 10));
10123
10171
  });
@@ -10187,13 +10235,13 @@ function ku() {
10187
10235
  return f.allowSparse === !0 ? b : c.compact(b);
10188
10236
  }, Ir;
10189
10237
  }
10190
- function Su() {
10238
+ function Iu() {
10191
10239
  if (qi) return Tr;
10192
10240
  qi = !0;
10193
- var c = _u(), e = ku(), t = no();
10241
+ var c = xu(), e = Au(), t = no();
10194
10242
  return Tr = { formats: t, parse: e, stringify: c }, Tr;
10195
10243
  }
10196
- function Eu() {
10244
+ function Tu() {
10197
10245
  if (Hi) return mt;
10198
10246
  Hi = !0;
10199
10247
  var c = gt;
@@ -10201,7 +10249,7 @@ function Eu() {
10201
10249
  this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
10202
10250
  }
10203
10251
  var t = /^([a-z0-9.+-]+:)/i, r = /:[0-9]*$/, a = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, n = ["<", ">", '"', "`", " ", "\r", `
10204
- `, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(n), s = ["'"].concat(i), o = ["%", "/", "?", ";", "#"].concat(s), l = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = { javascript: !0, "javascript:": !0 }, f = { javascript: !0, "javascript:": !0 }, g = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, b = Su();
10252
+ `, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(n), s = ["'"].concat(i), o = ["%", "/", "?", ";", "#"].concat(s), l = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, y = { javascript: !0, "javascript:": !0 }, f = { javascript: !0, "javascript:": !0 }, g = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, b = Iu();
10205
10253
  function k(v, x, S) {
10206
10254
  if (v && typeof v == "object" && v instanceof e) return v;
10207
10255
  var I = new e();
@@ -10216,23 +10264,23 @@ function Eu() {
10216
10264
  var W = a.exec(T);
10217
10265
  if (W) return this.path = T, this.href = T, this.pathname = W[1], W[2] ? (this.search = W[2], x ? this.query = b.parse(this.search.substr(1)) : this.query = this.search.substr(1)) : x && (this.search = "", this.query = {}), this;
10218
10266
  }
10219
- var D = t.exec(T);
10220
- if (D) {
10221
- D = D[0];
10222
- var N = D.toLowerCase();
10223
- this.protocol = N, T = T.substr(D.length);
10267
+ var F = t.exec(T);
10268
+ if (F) {
10269
+ F = F[0];
10270
+ var N = F.toLowerCase();
10271
+ this.protocol = N, T = T.substr(F.length);
10224
10272
  }
10225
- if (S || D || T.match(/^\/\/[^@/]+@[^@/]+/)) {
10273
+ if (S || F || T.match(/^\/\/[^@/]+@[^@/]+/)) {
10226
10274
  var ae = T.substr(0, 2) === "//";
10227
- ae && !(D && f[D]) && (T = T.substr(2), this.slashes = !0);
10275
+ ae && !(F && f[F]) && (T = T.substr(2), this.slashes = !0);
10228
10276
  }
10229
- if (!f[D] && (ae || D && !g[D])) {
10277
+ if (!f[F] && (ae || F && !g[F])) {
10230
10278
  for (var Y = -1, K = 0; K < l.length; K++) {
10231
10279
  var re = T.indexOf(l[K]);
10232
10280
  re !== -1 && (Y === -1 || re < Y) && (Y = re);
10233
10281
  }
10234
- var F, Z;
10235
- Y === -1 ? Z = T.lastIndexOf("@") : Z = T.lastIndexOf("@", Y), Z !== -1 && (F = T.slice(0, Z), T = T.slice(Z + 1), this.auth = decodeURIComponent(F)), Y = -1;
10282
+ var D, Z;
10283
+ Y === -1 ? Z = T.lastIndexOf("@") : Z = T.lastIndexOf("@", Y), Z !== -1 && (D = T.slice(0, Z), T = T.slice(Z + 1), this.auth = decodeURIComponent(D)), Y = -1;
10236
10284
  for (var K = 0; K < o.length; K++) {
10237
10285
  var re = T.indexOf(o[K]);
10238
10286
  re !== -1 && (Y === -1 || re < Y) && (Y = re);
@@ -10311,8 +10359,8 @@ function Eu() {
10311
10359
  }
10312
10360
  if (v.protocol && v.protocol !== S.protocol) {
10313
10361
  if (!g[v.protocol]) {
10314
- for (var D = Object.keys(v), N = 0; N < D.length; N++) {
10315
- var ae = D[N];
10362
+ for (var F = Object.keys(v), N = 0; N < F.length; N++) {
10363
+ var ae = F[N];
10316
10364
  S[ae] = v[ae];
10317
10365
  }
10318
10366
  return S.href = S.format(), S;
@@ -10327,8 +10375,8 @@ function Eu() {
10327
10375
  }
10328
10376
  return S.slashes = S.slashes || v.slashes, S.href = S.format(), S;
10329
10377
  }
10330
- var re = S.pathname && S.pathname.charAt(0) === "/", F = v.host || v.pathname && v.pathname.charAt(0) === "/", Z = F || re || S.host && v.pathname, P = Z, J = S.pathname && S.pathname.split("/") || [], be = v.pathname && v.pathname.split("/") || [], te = S.protocol && !g[S.protocol];
10331
- if (te && (S.hostname = "", S.port = null, S.host && (J[0] === "" ? J[0] = S.host : J.unshift(S.host)), S.host = "", v.protocol && (v.hostname = null, v.port = null, v.host && (be[0] === "" ? be[0] = v.host : be.unshift(v.host)), v.host = null), Z = Z && (be[0] === "" || J[0] === "")), F) S.host = v.host || v.host === "" ? v.host : S.host, S.hostname = v.hostname || v.hostname === "" ? v.hostname : S.hostname, S.search = v.search, S.query = v.query, J = be;
10378
+ var re = S.pathname && S.pathname.charAt(0) === "/", D = v.host || v.pathname && v.pathname.charAt(0) === "/", Z = D || re || S.host && v.pathname, P = Z, J = S.pathname && S.pathname.split("/") || [], be = v.pathname && v.pathname.split("/") || [], te = S.protocol && !g[S.protocol];
10379
+ if (te && (S.hostname = "", S.port = null, S.host && (J[0] === "" ? J[0] = S.host : J.unshift(S.host)), S.host = "", v.protocol && (v.hostname = null, v.port = null, v.host && (be[0] === "" ? be[0] = v.host : be.unshift(v.host)), v.host = null), Z = Z && (be[0] === "" || J[0] === "")), D) S.host = v.host || v.host === "" ? v.host : S.host, S.hostname = v.hostname || v.hostname === "" ? v.hostname : S.hostname, S.search = v.search, S.query = v.query, J = be;
10332
10380
  else if (be.length) J || (J = []), J.pop(), J = J.concat(be), S.search = v.search, S.query = v.query;
10333
10381
  else if (v.search != null) {
10334
10382
  if (te) {
@@ -10354,26 +10402,26 @@ function Eu() {
10354
10402
  x && (x = x[0], x !== ":" && (this.port = x.substr(1)), v = v.substr(0, v.length - x.length)), v && (this.hostname = v);
10355
10403
  }, mt.parse = k, mt.resolve = w, mt.resolveObject = E, mt.format = m, mt.Url = e, mt;
10356
10404
  }
10357
- function Ra(c) {
10405
+ function Na(c) {
10358
10406
  if (typeof c == "string") c = new URL(c);
10359
10407
  else if (!(c instanceof URL)) throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");
10360
10408
  if (c.protocol !== "file:") throw new Deno.errors.InvalidData("invalid url scheme");
10361
- return Or ? xu(c) : Au(c);
10409
+ return Or ? Cu(c) : Ou(c);
10362
10410
  }
10363
- function xu(c) {
10411
+ function Cu(c) {
10364
10412
  let e = c.hostname, t = c.pathname;
10365
10413
  for (let r = 0; r < t.length; r++) if (t[r] === "%") {
10366
10414
  let a = t.codePointAt(r + 2) || 32;
10367
10415
  if (t[r + 1] === "2" && a === 102 || t[r + 1] === "5" && a === 99) throw new Deno.errors.InvalidData("must not include encoded \\ or / characters");
10368
10416
  }
10369
- if (t = t.replace(Ka, "\\"), t = decodeURIComponent(t), e !== "") return `\\\\${e}${t}`;
10417
+ if (t = t.replace(Ya, "\\"), t = decodeURIComponent(t), e !== "") return `\\\\${e}${t}`;
10370
10418
  {
10371
10419
  let r = t.codePointAt(1) | 32, a = t[2];
10372
- if (r < Ha || r > za || a !== ":") throw new Deno.errors.InvalidData("file url path must be absolute");
10420
+ if (r < Va || r > Ga || a !== ":") throw new Deno.errors.InvalidData("file url path must be absolute");
10373
10421
  return t.slice(1);
10374
10422
  }
10375
10423
  }
10376
- function Au(c) {
10424
+ function Ou(c) {
10377
10425
  if (c.hostname !== "") throw new Deno.errors.InvalidData("invalid file url hostname");
10378
10426
  let e = c.pathname;
10379
10427
  for (let t = 0; t < e.length; t++) if (e[t] === "%") {
@@ -10382,16 +10430,16 @@ function Au(c) {
10382
10430
  }
10383
10431
  return decodeURIComponent(e);
10384
10432
  }
10385
- function ja(c) {
10433
+ function Ua(c) {
10386
10434
  let e = Ni.resolve(c), t = c.charCodeAt(c.length - 1);
10387
- (t === qa || Or && t === Wa) && e[e.length - 1] !== Ni.sep && (e += "/");
10435
+ (t === Ka || Or && t === za) && e[e.length - 1] !== Ni.sep && (e += "/");
10388
10436
  let r = new URL("file://");
10389
- return e.includes("%") && (e = e.replace(Va, "%25")), !Or && e.includes("\\") && (e = e.replace(Ga, "%5C")), e.includes(`
10390
- `) && (e = e.replace(Ya, "%0A")), e.includes("\r") && (e = e.replace(Qa, "%0D")), e.includes(" ") && (e = e.replace(Ja, "%09")), r.pathname = e, r;
10437
+ return e.includes("%") && (e = e.replace(Qa, "%25")), !Or && e.includes("\\") && (e = e.replace(Ja, "%5C")), e.includes(`
10438
+ `) && (e = e.replace(Xa, "%0A")), e.includes("\r") && (e = e.replace(Za, "%0D")), e.includes(" ") && (e = e.replace(el, "%09")), r.pathname = e, r;
10391
10439
  }
10392
- var La, _r, Ui, kr, Sr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, Fe, ps, Na, Ua, Ba, Da, Fa, $a, Wa, qa, Ha, za, Or, Ka, Va, Ga, Ya, Qa, Ja, Iu = He(() => {
10393
- le(), ue(), ce(), Hc(), su(), yu(), Oa(), La = Object.freeze(/* @__PURE__ */ Object.create(null)), _r = {}, Ui = !1, kr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, Sr = {}, Bi = !1, Er = {}, Di = !1, xr = {}, Fi = !1, Ar = {}, $i = !1, Ir = {}, Wi = !1, Tr = {}, qi = !1, mt = {}, Hi = !1, Fe = Eu(), Fe.parse, Fe.resolve, Fe.resolveObject, Fe.format, Fe.Url, ps = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, Fe.URL = typeof URL < "u" ? URL : null, Fe.pathToFileURL = ja, Fe.fileURLToPath = Ra, Na = Fe.Url, Ua = Fe.format, Ba = Fe.resolve, Da = Fe.resolveObject, Fa = Fe.parse, $a = Fe.URL, Wa = 92, qa = 47, Ha = 97, za = 122, Or = ps === "win32", Ka = /\//g, Va = /%/g, Ga = /\\/g, Ya = /\n/g, Qa = /\r/g, Ja = /\t/g;
10394
- }), Tu = pe((c, e) => {
10440
+ var Ba, _r, Ui, kr, Sr, Bi, Er, Fi, xr, Di, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, De, bs, Fa, Da, $a, Wa, qa, Ha, za, Ka, Va, Ga, Or, Ya, Qa, Ja, Xa, Za, el, Pu = He(() => {
10441
+ le(), ue(), ce(), Gc(), uu(), ku(), Ra(), Ba = Object.freeze(/* @__PURE__ */ Object.create(null)), _r = {}, Ui = !1, kr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, Sr = {}, Bi = !1, Er = {}, Fi = !1, xr = {}, Di = !1, Ar = {}, $i = !1, Ir = {}, Wi = !1, Tr = {}, qi = !1, mt = {}, Hi = !1, De = Tu(), De.parse, De.resolve, De.resolveObject, De.format, De.Url, bs = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, De.URL = typeof URL < "u" ? URL : null, De.pathToFileURL = Ua, De.fileURLToPath = Na, Fa = De.Url, Da = De.format, $a = De.resolve, Wa = De.resolveObject, qa = De.parse, Ha = De.URL, za = 92, Ka = 47, Va = 97, Ga = 122, Or = bs === "win32", Ya = /\//g, Qa = /%/g, Ja = /\\/g, Xa = /\n/g, Za = /\r/g, el = /\t/g;
10442
+ }), Mu = pe((c, e) => {
10395
10443
  le(), ue(), ce(), e.exports = function() {
10396
10444
  throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object");
10397
10445
  };
@@ -10445,7 +10493,7 @@ var La, _r, Ui, kr, Sr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, Fe,
10445
10493
  return k && k.__esModule ? k : { default: k };
10446
10494
  };
10447
10495
  Object.defineProperty(c, "__esModule", { value: !0 }), c.streamBuilder = c.browserStreamBuilder = void 0;
10448
- var t = (Ne(), Oe(Le)), r = e(Tu()), a = e(lt()), n = It(), i = e(Ur()), s = io(), o = (0, a.default)("mqttjs:ws"), l = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10496
+ var t = (Ne(), Oe(Le)), r = e(Mu()), a = e(lt()), n = It(), i = e(Ur()), s = io(), o = (0, a.default)("mqttjs:ws"), l = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10449
10497
  function u(k, m) {
10450
10498
  let w = `${k.protocol}://${k.hostname}:${k.port}${k.path}`;
10451
10499
  return typeof k.transformWsUrl == "function" && (w = k.transformWsUrl(w, k, m)), w;
@@ -10493,10 +10541,10 @@ var La, _r, Ui, kr, Sr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, Fe,
10493
10541
  S.close();
10494
10542
  });
10495
10543
  let M = typeof S.addEventListener < "u";
10496
- S.readyState === S.OPEN ? (w = I, w.socket = S) : (w = new s.BufferedDuplex(m, I, S), M ? S.addEventListener("open", B) : S.onopen = B), M ? (S.addEventListener("close", T), S.addEventListener("error", W), S.addEventListener("message", D)) : (S.onclose = T, S.onerror = W, S.onmessage = D);
10544
+ S.readyState === S.OPEN ? (w = I, w.socket = S) : (w = new s.BufferedDuplex(m, I, S), M ? S.addEventListener("open", B) : S.onopen = B), M ? (S.addEventListener("close", T), S.addEventListener("error", W), S.addEventListener("message", F)) : (S.onclose = T, S.onerror = W, S.onmessage = F);
10497
10545
  function O(Y, K, re) {
10498
- let F = new n.Transform({ objectMode: Y.objectMode });
10499
- return F._write = K, F._flush = re, F;
10546
+ let D = new n.Transform({ objectMode: Y.objectMode });
10547
+ return D._write = K, D._flush = re, D;
10500
10548
  }
10501
10549
  function B() {
10502
10550
  o("WebSocket onOpen"), w instanceof s.BufferedDuplex && w.socketReady();
@@ -10509,7 +10557,7 @@ var La, _r, Ui, kr, Sr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, Fe,
10509
10557
  let K = new Error("WebSocket error");
10510
10558
  K.event = Y, w.destroy(K);
10511
10559
  }
10512
- async function D(Y) {
10560
+ async function F(Y) {
10513
10561
  if (!I || !I.readable || !I.writable) return;
10514
10562
  let { data: K } = Y;
10515
10563
  K instanceof ArrayBuffer ? K = t.Buffer.from(K) : K instanceof Blob ? K = t.Buffer.from(await new Response(K).arrayBuffer()) : K = t.Buffer.from(K, "utf8"), I.push(K);
@@ -10522,8 +10570,8 @@ var La, _r, Ui, kr, Sr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, Fe,
10522
10570
  x && typeof Y == "string" && (Y = t.Buffer.from(Y, "utf8"));
10523
10571
  try {
10524
10572
  S.send(Y);
10525
- } catch (F) {
10526
- return re(F);
10573
+ } catch (D) {
10574
+ return re(D);
10527
10575
  }
10528
10576
  re();
10529
10577
  }
@@ -10534,37 +10582,37 @@ var La, _r, Ui, kr, Sr, Bi, Er, Di, xr, Fi, Ar, $i, Ir, Wi, Tr, qi, mt, Hi, Fe,
10534
10582
  };
10535
10583
  c.browserStreamBuilder = b;
10536
10584
  }), oo = {};
10537
- Lt(oo, { Server: () => Me, Socket: () => Me, Stream: () => Me, _createServerHandle: () => Me, _normalizeArgs: () => Me, _setSimultaneousAccepts: () => Me, connect: () => Me, createConnection: () => Me, createServer: () => Me, default: () => Xa, isIP: () => Me, isIPv4: () => Me, isIPv6: () => Me });
10585
+ Lt(oo, { Server: () => Me, Socket: () => Me, Stream: () => Me, _createServerHandle: () => Me, _normalizeArgs: () => Me, _setSimultaneousAccepts: () => Me, connect: () => Me, createConnection: () => Me, createServer: () => Me, default: () => tl, isIP: () => Me, isIPv4: () => Me, isIPv6: () => Me });
10538
10586
  function Me() {
10539
10587
  throw new Error("Node.js net module is not supported by JSPM core outside of Node.js");
10540
10588
  }
10541
- var Xa, Za = He(() => {
10542
- le(), ue(), ce(), Xa = { _createServerHandle: Me, _normalizeArgs: Me, _setSimultaneousAccepts: Me, connect: Me, createConnection: Me, createServer: Me, isIP: Me, isIPv4: Me, isIPv6: Me, Server: Me, Socket: Me, Stream: Me };
10543
- }), el = pe((c, e) => {
10589
+ var tl, rl = He(() => {
10590
+ le(), ue(), ce(), tl = { _createServerHandle: Me, _normalizeArgs: Me, _setSimultaneousAccepts: Me, connect: Me, createConnection: Me, createServer: Me, isIP: Me, isIPv4: Me, isIPv6: Me, Server: Me, Socket: Me, Stream: Me };
10591
+ }), nl = pe((c, e) => {
10544
10592
  le(), ue(), ce(), e.exports = {};
10545
- }), gs = pe((c) => {
10593
+ }), ys = pe((c) => {
10546
10594
  le(), ue(), ce();
10547
10595
  var e = c && c.__importDefault || function(s) {
10548
10596
  return s && s.__esModule ? s : { default: s };
10549
10597
  };
10550
10598
  Object.defineProperty(c, "__esModule", { value: !0 });
10551
- var t = e((Za(), Oe(oo))), r = e(lt()), a = e(el()), n = (0, r.default)("mqttjs:tcp"), i = (s, o) => {
10599
+ var t = e((rl(), Oe(oo))), r = e(lt()), a = e(nl()), n = (0, r.default)("mqttjs:tcp"), i = (s, o) => {
10552
10600
  if (o.port = o.port || 1883, o.hostname = o.hostname || o.host || "localhost", o.socksProxy) return (0, a.default)(o.hostname, o.port, o.socksProxy, { timeout: o.socksTimeout });
10553
10601
  let { port: l, path: u } = o, d = o.hostname;
10554
10602
  return n("port %d and host %s", l, d), t.default.createConnection({ port: l, host: d, path: u });
10555
10603
  };
10556
10604
  c.default = i;
10557
- }), tl = {};
10558
- Lt(tl, { default: () => rl });
10559
- var rl, Cu = He(() => {
10560
- le(), ue(), ce(), rl = {};
10561
- }), ms = pe((c) => {
10605
+ }), il = {};
10606
+ Lt(il, { default: () => ol });
10607
+ var ol, Ru = He(() => {
10608
+ le(), ue(), ce(), ol = {};
10609
+ }), vs = pe((c) => {
10562
10610
  le(), ue(), ce();
10563
10611
  var e = c && c.__importDefault || function(l) {
10564
10612
  return l && l.__esModule ? l : { default: l };
10565
10613
  };
10566
10614
  Object.defineProperty(c, "__esModule", { value: !0 });
10567
- var t = (Cu(), Oe(tl)), r = e((Za(), Oe(oo))), a = e(lt()), n = e(el()), i = (0, a.default)("mqttjs:tls");
10615
+ var t = (Ru(), Oe(il)), r = e((rl(), Oe(oo))), a = e(lt()), n = e(nl()), i = (0, a.default)("mqttjs:tls");
10568
10616
  function s(l) {
10569
10617
  let { host: u, port: d, socksProxy: p, ...y } = l;
10570
10618
  if (p !== void 0) {
@@ -10585,7 +10633,7 @@ var rl, Cu = He(() => {
10585
10633
  return d.on("error", p), d;
10586
10634
  };
10587
10635
  c.default = o;
10588
- }), bs = pe((c) => {
10636
+ }), ws = pe((c) => {
10589
10637
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
10590
10638
  var e = (Ne(), Oe(Le)), t = It(), r = io(), a, n, i;
10591
10639
  function s() {
@@ -10640,7 +10688,7 @@ var rl, Cu = He(() => {
10640
10688
  }, 0), i), u(), i;
10641
10689
  };
10642
10690
  c.default = d;
10643
- }), ys = pe((c) => {
10691
+ }), _s = pe((c) => {
10644
10692
  le(), ue(), ce(), Object.defineProperty(c, "__esModule", { value: !0 });
10645
10693
  var e = (Ne(), Oe(Le)), t = It(), r = io(), a, n, i, s = !1;
10646
10694
  function o() {
@@ -10695,13 +10743,13 @@ var rl, Cu = He(() => {
10695
10743
  return a = f.my, a.connectSocket({ url: b, protocols: g }), n = o(), i = new r.BufferedDuplex(f, n, a), d(), i;
10696
10744
  };
10697
10745
  c.default = p;
10698
- }), Ou = pe((c) => {
10746
+ }), ju = pe((c) => {
10699
10747
  le(), ue(), ce();
10700
10748
  var e = c && c.__importDefault || function(d) {
10701
10749
  return d && d.__esModule ? d : { default: d };
10702
10750
  };
10703
10751
  Object.defineProperty(c, "__esModule", { value: !0 }), c.connectAsync = u;
10704
- var t = e(lt()), r = e((Iu(), Oe(Pa))), a = e(ni()), n = e(Ur());
10752
+ var t = e(lt()), r = e((Pu(), Oe(ja))), a = e(ni()), n = e(Ur());
10705
10753
  typeof Pe?.nextTick != "function" && (Pe.nextTick = setImmediate);
10706
10754
  var i = (0, t.default)("mqttjs"), s = null;
10707
10755
  function o(d) {
@@ -10735,7 +10783,7 @@ var rl, Cu = He(() => {
10735
10783
  throw new Error(`Unknown protocol for secure connection: "${p.protocol}"!`);
10736
10784
  }
10737
10785
  } else throw new Error("Missing secure protocol key");
10738
- if (s || (s = {}, !n.default && !p.forceNativeWebSocket ? (s.ws = tr().streamBuilder, s.wss = tr().streamBuilder, s.mqtt = gs().default, s.tcp = gs().default, s.ssl = ms().default, s.tls = s.ssl, s.mqtts = ms().default) : (s.ws = tr().browserStreamBuilder, s.wss = tr().browserStreamBuilder, s.wx = bs().default, s.wxs = bs().default, s.ali = ys().default, s.alis = ys().default)), !s[p.protocol]) {
10786
+ if (s || (s = {}, !n.default && !p.forceNativeWebSocket ? (s.ws = tr().streamBuilder, s.wss = tr().streamBuilder, s.mqtt = ys().default, s.tcp = ys().default, s.ssl = vs().default, s.tls = s.ssl, s.mqtts = vs().default) : (s.ws = tr().browserStreamBuilder, s.wss = tr().browserStreamBuilder, s.wx = ws().default, s.wxs = ws().default, s.ali = _s().default, s.alis = _s().default)), !s[p.protocol]) {
10739
10787
  let g = ["mqtts", "wss"].indexOf(p.protocol) !== -1;
10740
10788
  p.protocol = ["mqtt", "mqtts", "ws", "wss", "wx", "wxs", "ali", "alis"].filter((b, k) => g && k % 2 === 0 ? !1 : typeof s[b] == "function")[0];
10741
10789
  }
@@ -10771,7 +10819,7 @@ var rl, Cu = He(() => {
10771
10819
  });
10772
10820
  }
10773
10821
  c.default = l;
10774
- }), vs = pe((c) => {
10822
+ }), ks = pe((c) => {
10775
10823
  le(), ue(), ce();
10776
10824
  var e = c && c.__createBinding || (Object.create ? function(y, f, g, b) {
10777
10825
  b === void 0 && (b = g);
@@ -10807,23 +10855,23 @@ var rl, Cu = He(() => {
10807
10855
  Object.defineProperty(c, "__esModule", { value: !0 }), c.ReasonCodes = c.KeepaliveManager = c.UniqueMessageIdProvider = c.DefaultMessageIdProvider = c.Store = c.MqttClient = c.connectAsync = c.connect = c.Client = void 0;
10808
10856
  var i = n(ni());
10809
10857
  c.MqttClient = i.default;
10810
- var s = n(ya());
10858
+ var s = n(_a());
10811
10859
  c.DefaultMessageIdProvider = s.default;
10812
- var o = n(Wc());
10860
+ var o = n(Kc());
10813
10861
  c.UniqueMessageIdProvider = o.default;
10814
- var l = n(ta());
10862
+ var l = n(ia());
10815
10863
  c.Store = l.default;
10816
- var u = r(Ou());
10864
+ var u = r(ju());
10817
10865
  c.connect = u.default, Object.defineProperty(c, "connectAsync", { enumerable: !0, get: function() {
10818
10866
  return u.connectAsync;
10819
10867
  } });
10820
- var d = n(xa());
10821
- c.KeepaliveManager = d.default, c.Client = i.default, a(ni(), c), a(Ut(), c), a(ea(), c);
10868
+ var d = n(Ta());
10869
+ c.KeepaliveManager = d.default, c.Client = i.default, a(ni(), c), a(Ut(), c), a(na(), c);
10822
10870
  var p = Lr();
10823
10871
  Object.defineProperty(c, "ReasonCodes", { enumerable: !0, get: function() {
10824
10872
  return p.ReasonCodes;
10825
10873
  } });
10826
- }), Pu = pe((c) => {
10874
+ }), Lu = pe((c) => {
10827
10875
  le(), ue(), ce();
10828
10876
  var e = c && c.__createBinding || (Object.create ? function(i, s, o, l) {
10829
10877
  l === void 0 && (l = o);
@@ -10855,28 +10903,28 @@ var rl, Cu = He(() => {
10855
10903
  for (var o in i) o !== "default" && !Object.prototype.hasOwnProperty.call(s, o) && e(s, i, o);
10856
10904
  };
10857
10905
  Object.defineProperty(c, "__esModule", { value: !0 });
10858
- var n = r(vs());
10859
- c.default = n, a(vs(), c);
10906
+ var n = r(ks());
10907
+ c.default = n, a(ks(), c);
10860
10908
  });
10861
- const Mu = Pu();
10862
- const Ru = {
10909
+ const Nu = Lu();
10910
+ const Uu = {
10863
10911
  inbound: "apps/{appId}/users/{userId}/messages/{conversationId}/clientadded",
10864
10912
  inboundUpdate: "apps/{appId}/users/{userId}/messages/{conversationId}/{messageId}/update",
10865
10913
  outbound: "apps/{appId}/outgoing/users/{userId}/messages/{conversationId}/outgoing",
10866
10914
  presence: "apps/{appId}/users/{userId}/presence/{clientId}",
10867
10915
  wildcardSubscribe: "apps/{appId}/users/{userId}/#"
10868
- }, ju = 300, Lu = {
10916
+ }, Bu = 300, Fu = {
10869
10917
  templateId: "7",
10870
10918
  type: "link",
10871
10919
  isDeepLink: !0
10872
- }, Nu = {
10920
+ }, Du = {
10873
10921
  channelType: "group",
10874
10922
  channel: "chat21",
10875
10923
  requestChannel: "chat21",
10876
10924
  platform: "WEBSITE",
10877
10925
  medium: "CHATBUDDY"
10878
10926
  };
10879
- class Uu {
10927
+ class $u {
10880
10928
  client = null;
10881
10929
  config;
10882
10930
  currentToken;
@@ -10895,7 +10943,7 @@ class Uu {
10895
10943
  inboundRegex;
10896
10944
  inboundUpdateRegex;
10897
10945
  constructor(e) {
10898
- this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? `aikaara_${e.userId}_${Date.now()}`, this.topics = { ...Ru, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 10, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
10946
+ this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? `aikaara_${e.userId}_${Date.now()}`, this.topics = { ...Uu, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 10, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
10899
10947
  this.topics.inbound,
10900
10948
  ["conversationId"]
10901
10949
  ), this.inboundUpdateRegex = this.buildTopicRegex(
@@ -10925,7 +10973,7 @@ class Uu {
10925
10973
  qos: 0,
10926
10974
  retain: !1
10927
10975
  }), new Promise((a, n) => {
10928
- this.client = Mu.connect(this.config.mqttEndpoint, r), this.client.on("connect", () => {
10976
+ this.client = Nu.connect(this.config.mqttEndpoint, r), this.client.on("connect", () => {
10929
10977
  if (this.reconnectAttempt = 0, this.debugLog("CONNECT", { endpoint: this.config.mqttEndpoint, clientId: this.clientId }), this.notifyStateChange(!0), this.config.enablePresence !== !1) {
10930
10978
  const i = this.config.presencePayloadConnected ?? { connected: !0 };
10931
10979
  this.client.publish(e, JSON.stringify(i), { qos: 0, retain: !1 }), this.debugLog("PUBLISH", { topic: e, payload: i });
@@ -10976,9 +11024,9 @@ class Uu {
10976
11024
  publishFileMessage(e, t) {
10977
11025
  if (!this.client) return;
10978
11026
  const r = {
10979
- ...Lu,
11027
+ ...Fu,
10980
11028
  ...this.config.fileTemplate ?? {},
10981
- ...Bu(t)
11029
+ ...Wu(t)
10982
11030
  }, a = {
10983
11031
  metadata: {
10984
11032
  contentType: "300",
@@ -11017,7 +11065,7 @@ class Uu {
11017
11065
  * Send a read receipt for a message. Tiledesk widgets publish
11018
11066
  * `{"status":300}` to apps/{appId}/users/{userId}/messages/{convId}/{msgId}/update.
11019
11067
  */
11020
- publishReadReceipt(e, t, r = ju) {
11068
+ publishReadReceipt(e, t, r = Bu) {
11021
11069
  if (!this.client) return;
11022
11070
  const a = this.renderTemplate(this.topics.inboundUpdate, { conversationId: e, messageId: t });
11023
11071
  this.client.publish(a, JSON.stringify({ status: r }), {
@@ -11125,7 +11173,7 @@ class Uu {
11125
11173
  this.messageHandlers.forEach((l) => l(a, o));
11126
11174
  }
11127
11175
  buildOutgoingEnvelope(e, t) {
11128
- const r = { ...Nu, ...this.config.messageDefaults ?? {} }, a = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), i = {
11176
+ const r = { ...Du, ...this.config.messageDefaults ?? {} }, a = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), i = {
11129
11177
  projectId: this.config.projectId,
11130
11178
  ...r.departmentId ? { departmentId: r.departmentId } : {},
11131
11179
  ...this.config.userName ? { userFullname: this.config.userName } : {},
@@ -11199,20 +11247,20 @@ class Uu {
11199
11247
  return new RegExp(`^${r}$`);
11200
11248
  }
11201
11249
  }
11202
- function Bu(c) {
11250
+ function Wu(c) {
11203
11251
  const e = {};
11204
11252
  for (const [t, r] of Object.entries(c))
11205
11253
  r !== void 0 && (e[t] = r);
11206
11254
  return e;
11207
11255
  }
11208
- function Du(c, e) {
11256
+ function qu(c, e) {
11209
11257
  return (c.sender ?? "").toString() === e;
11210
11258
  }
11211
- function Fu(c, e) {
11259
+ function Hu(c, e) {
11212
11260
  const t = (c.sender ?? "").toString(), r = e.systemSenders ?? ["metadata", "system"], a = e.botSenderPrefix ?? "bot_";
11213
11261
  return t ? t === e.userId ? "user" : t.startsWith(a) ? "assistant" : r.includes(t) ? "system" : "agent" : "system";
11214
11262
  }
11215
- function nl(c) {
11263
+ function sl(c) {
11216
11264
  const e = { raw: c }, t = c.metadata;
11217
11265
  if (t && typeof t == "object" && (typeof t.contentType == "string" && (e.contentType = t.contentType), typeof t.templateId == "string" && (e.templateId = t.templateId), t.payload !== void 0 && (e.payload = t.payload)), typeof c.text == "string" && c.text.trim().startsWith("{"))
11218
11266
  try {
@@ -11224,8 +11272,8 @@ function nl(c) {
11224
11272
  }
11225
11273
  return e;
11226
11274
  }
11227
- function $u(c) {
11228
- const e = nl(c);
11275
+ function zu(c) {
11276
+ const e = sl(c);
11229
11277
  if (e.contentType !== "300") return null;
11230
11278
  const t = e.payload, r = t && Array.isArray(t.elements) ? t.elements : null;
11231
11279
  if (!r || r.length === 0) return null;
@@ -11237,11 +11285,11 @@ function $u(c) {
11237
11285
  templateId: e.templateId
11238
11286
  };
11239
11287
  }
11240
- function ws(c, e, t) {
11241
- const r = Fu(c, t), a = nl(c), n = $u(c);
11288
+ function Ss(c, e, t) {
11289
+ const r = Hu(c, t), a = sl(c), n = zu(c);
11242
11290
  let i = "";
11243
11291
  a.innerMessage ? i = a.innerMessage : typeof c.text == "string" && (c.text.trim().startsWith("{") ? a.contentType !== "300" && (i = c.text) : i = c.text);
11244
- const s = typeof c.message_id == "string" ? c.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, o = typeof c.timestamp == "number" ? new Date(c.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), l = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof c.status == "number" ? Wu(c.status) : "delivered", d = {
11292
+ const s = typeof c.message_id == "string" ? c.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, o = typeof c.timestamp == "number" ? new Date(c.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), l = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof c.status == "number" ? Ku(c.status) : "delivered", d = {
11245
11293
  id: s,
11246
11294
  externalId: s,
11247
11295
  conversationId: e,
@@ -11268,10 +11316,10 @@ function ws(c, e, t) {
11268
11316
  }
11269
11317
  ]), { message: d, template: a };
11270
11318
  }
11271
- function Wu(c) {
11319
+ function Ku(c) {
11272
11320
  return c < 0 ? "error" : c >= 250 ? "read" : c >= 150 ? "delivered" : "sent";
11273
11321
  }
11274
- class qu extends xs {
11322
+ class Vu extends Ts {
11275
11323
  connection = null;
11276
11324
  tiledesk = null;
11277
11325
  api;
@@ -11284,7 +11332,7 @@ class qu extends xs {
11284
11332
  historyAdapter;
11285
11333
  tiledeskUnsubs = [];
11286
11334
  constructor(e, t) {
11287
- super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new kl(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new Sl(), this.conversationManager = new El(e.conversationId), this.usesAikaara() && (this.connection = new _l(e), this.connection.on("connection:state", (r) => {
11335
+ super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new xl(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new Al(), this.conversationManager = new Tl(e.conversationId), this.usesAikaara() && (this.connection = new El(e), this.connection.on("connection:state", (r) => {
11288
11336
  this.emit("connection:state", r), this.config.onConnectionStateChange?.(r);
11289
11337
  }), this.connection.on("error", (r) => {
11290
11338
  this.emit("error", r), this.config.onError?.(r);
@@ -11302,7 +11350,7 @@ class qu extends xs {
11302
11350
  throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledesk` (TiledeskTransportConfig)");
11303
11351
  if (!t?.userId)
11304
11352
  throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledeskIdentity.userId`");
11305
- this.tiledesk = new Uu({
11353
+ this.tiledesk = new $u({
11306
11354
  ...e,
11307
11355
  userId: t.userId,
11308
11356
  userName: t.userName ?? e.userName,
@@ -11361,7 +11409,7 @@ class qu extends xs {
11361
11409
  return this.config.onError?.(s instanceof Error ? s : new Error(String(s))), "unknown";
11362
11410
  }
11363
11411
  if (!r.length) return "empty";
11364
- const a = r.map((s) => ws(s, e, { userId: t }).message).sort((s, o) => new Date(s.createdAt).getTime() - new Date(o.createdAt).getTime()), n = this.messageStore.messages, i = [...a, ...n.filter((s) => !a.some((o) => o.externalId && o.externalId === s.externalId))];
11412
+ const a = r.map((s) => Ss(s, e, { userId: t }).message).sort((s, o) => new Date(s.createdAt).getTime() - new Date(o.createdAt).getTime()), n = this.messageStore.messages, i = [...a, ...n.filter((s) => !a.some((o) => o.externalId && o.externalId === s.externalId))];
11365
11413
  if (this.messageStore.setMessages(i), this.config.onMessage)
11366
11414
  for (const s of a)
11367
11415
  try {
@@ -11492,12 +11540,12 @@ class qu extends xs {
11492
11540
  if (t.kind === "update") return;
11493
11541
  const r = t.conversationId ?? this.conversationManager.conversationId;
11494
11542
  if (!r) return;
11495
- const a = this.config.tiledeskIdentity?.userId ?? "", { message: n, template: i } = ws(e, r, {
11543
+ const a = this.config.tiledeskIdentity?.userId ?? "", { message: n, template: i } = Ss(e, r, {
11496
11544
  userId: a,
11497
11545
  systemSenders: this.config.tiledesk?.messageDefaults?.attributes?.systemSenders
11498
11546
  });
11499
11547
  if (this.mode === "dual" && n.role === "assistant") return;
11500
- if (Du(e, a)) {
11548
+ if (qu(e, a)) {
11501
11549
  const l = this.messageStore.reconcileOptimistic(n);
11502
11550
  if (l) {
11503
11551
  this.emit("message:updated", l);
@@ -11606,7 +11654,7 @@ class qu extends xs {
11606
11654
  }
11607
11655
  }
11608
11656
  }
11609
- const _s = {
11657
+ const Es = {
11610
11658
  txt: "text/plain",
11611
11659
  pdf: "application/pdf",
11612
11660
  jpg: "image/jpeg",
@@ -11616,20 +11664,20 @@ const _s = {
11616
11664
  doc: "application/msword",
11617
11665
  json: "application/json"
11618
11666
  };
11619
- function Hu(c) {
11667
+ function Gu(c) {
11620
11668
  const e = c.lastIndexOf(".");
11621
11669
  return e < 0 || e === c.length - 1 ? "" : c.slice(e + 1).toLowerCase();
11622
11670
  }
11623
- function zu(c, e, t) {
11624
- const r = Hu(c.name || "");
11671
+ function Yu(c, e, t) {
11672
+ const r = Gu(c.name || "");
11625
11673
  if (r && e && e[r]) return e[r];
11626
11674
  const a = c.type;
11627
- return a && a.trim().length > 0 ? a : r && _s[r] ? _s[r] : t;
11675
+ return a && a.trim().length > 0 ? a : r && Es[r] ? Es[r] : t;
11628
11676
  }
11629
11677
  function Wr(c, e) {
11630
11678
  return c.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
11631
11679
  }
11632
- function Ku(c, e) {
11680
+ function Qu(c, e) {
11633
11681
  const t = e.split(".");
11634
11682
  let r = c;
11635
11683
  for (const a of t)
@@ -11638,7 +11686,7 @@ function Ku(c, e) {
11638
11686
  else return "";
11639
11687
  return typeof r == "string" ? r : "";
11640
11688
  }
11641
- function Vu(c) {
11689
+ function Ju(c) {
11642
11690
  const e = c.signedUrlPath ?? "data.s3SignedUrl";
11643
11691
  return {
11644
11692
  async upload(t, r) {
@@ -11660,9 +11708,9 @@ function Vu(c) {
11660
11708
  });
11661
11709
  if (!l.ok)
11662
11710
  throw new Error(`Sign request failed: ${l.status}`);
11663
- const u = await l.json().catch(() => ({})), d = Ku(u, e);
11711
+ const u = await l.json().catch(() => ({})), d = Qu(u, e);
11664
11712
  if (!d) throw new Error(`Sign response missing path "${e}"`);
11665
- const p = zu(
11713
+ const p = Yu(
11666
11714
  t,
11667
11715
  c.contentTypeMap,
11668
11716
  c.contentTypeFallback ?? "application/octet-stream"
@@ -11698,7 +11746,7 @@ function Vu(c) {
11698
11746
  }
11699
11747
  };
11700
11748
  }
11701
- function il(c) {
11749
+ function al(c) {
11702
11750
  return {
11703
11751
  async upload(e, t) {
11704
11752
  const r = new FormData(), a = c.fieldName ?? "file";
@@ -11731,9 +11779,9 @@ function il(c) {
11731
11779
  }
11732
11780
  };
11733
11781
  }
11734
- const Gu = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11735
- function Yu(c) {
11736
- const e = c.apiBase.replace(/\/$/, ""), t = c.pageSize ?? 200, r = c.pathTemplate ?? Gu;
11782
+ const Xu = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11783
+ function Zu(c) {
11784
+ const e = c.apiBase.replace(/\/$/, ""), t = c.pageSize ?? 200, r = c.pathTemplate ?? Xu;
11737
11785
  return {
11738
11786
  async fetchMessages(a, n) {
11739
11787
  const i = r.replace("{userId}", encodeURIComponent(n.userId)).replace("{conversationId}", encodeURIComponent(a)).replace("{appId}", encodeURIComponent(n.appId ?? "tilechat")).replace("{projectId}", encodeURIComponent(n.projectId ?? "")).replace("{pageSize}", String(t)), s = i.startsWith("http") ? i : `${e}${i.startsWith("/") ? i : `/${i}`}`, o = {
@@ -11757,7 +11805,7 @@ function Yu(c) {
11757
11805
  }
11758
11806
  };
11759
11807
  }
11760
- class Qu {
11808
+ class eh {
11761
11809
  client;
11762
11810
  panel;
11763
11811
  bubble;
@@ -11768,7 +11816,7 @@ class Qu {
11768
11816
  isOpen = !1;
11769
11817
  isEmbed = !1;
11770
11818
  constructor(e, t, r) {
11771
- this.client = new qu(e, {
11819
+ this.client = new Vu(e, {
11772
11820
  uploadAdapter: r?.uploadAdapter,
11773
11821
  historyAdapter: r?.historyAdapter
11774
11822
  }), this.isEmbed = e.display === "embed", this.bubble = t.querySelector("aikaara-chat-bubble"), this.panel = t.querySelector(".aikaara-panel"), this.header = t.querySelector("aikaara-chat-header"), this.messageList = t.querySelector("aikaara-message-list"), this.input = t.querySelector("aikaara-chat-input"), this.errorBanner = t.querySelector("aikaara-error-banner"), e.welcomeMessage && this.messageList.setWelcomeMessage(e.welcomeMessage), e.showTimestamps !== void 0 && this.messageList.setShowTimestamps(e.showTimestamps), (e.linkHandlers || e.getLinkBearer) && this.messageList.setLinkConfig(e.linkHandlers ?? [], e.getLinkBearer), this.wireEvents();
@@ -11859,7 +11907,7 @@ class Qu {
11859
11907
  }, 200)));
11860
11908
  }
11861
11909
  }
11862
- class Ju extends HTMLElement {
11910
+ class th extends HTMLElement {
11863
11911
  shadow;
11864
11912
  controller = null;
11865
11913
  _config = {};
@@ -11905,13 +11953,13 @@ class Ju extends HTMLElement {
11905
11953
  apiKey: this.getAttribute("api-key") || this._config.apiKey,
11906
11954
  title: this.getAttribute("title") || this._config.title || "Chat",
11907
11955
  subtitle: this.getAttribute("subtitle") || this._config.subtitle,
11908
- theme: this.getAttribute("theme") || this._config.theme || vl,
11956
+ theme: this.getAttribute("theme") || this._config.theme || kl,
11909
11957
  primaryColor: this.getAttribute("primary-color") || this._config.primaryColor || lo,
11910
- position: this.getAttribute("position") || this._config.position || yl,
11911
- width: Number(this.getAttribute("width")) || this._config.width || pl,
11912
- height: Number(this.getAttribute("height")) || this._config.height || gl,
11913
- fontFamily: this._config.fontFamily || bl,
11914
- borderRadius: this._config.borderRadius ?? ml,
11958
+ position: this.getAttribute("position") || this._config.position || _l,
11959
+ width: Number(this.getAttribute("width")) || this._config.width || bl,
11960
+ height: Number(this.getAttribute("height")) || this._config.height || yl,
11961
+ fontFamily: this._config.fontFamily || wl,
11962
+ borderRadius: this._config.borderRadius ?? vl,
11915
11963
  placeholder: this.getAttribute("placeholder") || this._config.placeholder || co,
11916
11964
  welcomeMessage: this.getAttribute("welcome-message") || this._config.welcomeMessage,
11917
11965
  avatarUrl: this.getAttribute("avatar-url") || this._config.avatarUrl,
@@ -11924,7 +11972,7 @@ class Ju extends HTMLElement {
11924
11972
  templateLayout: this._config.templateLayout,
11925
11973
  showBubble: this._config.showBubble ?? !0,
11926
11974
  display: (this.getAttribute("display") || this._config.display) ?? "popup",
11927
- offset: this._config.offset || wl,
11975
+ offset: this._config.offset || Sl,
11928
11976
  conversationId: this._config.conversationId,
11929
11977
  systemPromptId: this._config.systemPromptId,
11930
11978
  channel: this._config.channel,
@@ -12127,7 +12175,7 @@ class Ju extends HTMLElement {
12127
12175
  }
12128
12176
  async initController() {
12129
12177
  const e = this.getConfig(), t = e.transport ?? "aikaara";
12130
- (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new Qu(e, this.shadow, {
12178
+ (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new eh(e, this.shadow, {
12131
12179
  uploadAdapter: this._config.uploadAdapter,
12132
12180
  historyAdapter: this._config.historyAdapter
12133
12181
  }), await this.controller.connect());
@@ -12147,7 +12195,7 @@ class Ju extends HTMLElement {
12147
12195
  }
12148
12196
  }
12149
12197
  }
12150
- class Xu extends HTMLElement {
12198
+ class rh extends HTMLElement {
12151
12199
  shadow;
12152
12200
  constructor() {
12153
12201
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -12200,7 +12248,7 @@ class Xu extends HTMLElement {
12200
12248
  t && (t.innerHTML = e);
12201
12249
  }
12202
12250
  }
12203
- class Zu extends HTMLElement {
12251
+ class nh extends HTMLElement {
12204
12252
  shadow;
12205
12253
  static get observedAttributes() {
12206
12254
  return ["title", "subtitle", "avatar-url", "status"];
@@ -12321,17 +12369,17 @@ class Zu extends HTMLElement {
12321
12369
  this.setAttribute("status", e);
12322
12370
  }
12323
12371
  }
12324
- const eh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i;
12372
+ const ih = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i;
12325
12373
  function Rt(c) {
12326
- if (eh.test(c))
12374
+ if (ih.test(c))
12327
12375
  return c;
12328
- let e = th(c);
12376
+ let e = oh(c);
12329
12377
  return e = e.replace(/```(\w*)\n([\s\S]*?)```/g, (t, r, a) => `<pre><code>${a.trim()}</code></pre>`), e = e.replace(/`([^`]+)`/g, "<code>$1</code>"), e = e.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), e = e.replace(/\*(.+?)\*/g, "<em>$1</em>"), e = e.replace(
12330
12378
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
12331
12379
  '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>'
12332
12380
  ), e = e.replace(/\n/g, "<br>"), e;
12333
12381
  }
12334
- function th(c) {
12382
+ function oh(c) {
12335
12383
  const e = {
12336
12384
  "&": "&amp;",
12337
12385
  "<": "&lt;",
@@ -12341,7 +12389,7 @@ function th(c) {
12341
12389
  };
12342
12390
  return c.replace(/[&<>"']/g, (t) => e[t]);
12343
12391
  }
12344
- const rh = /* @__PURE__ */ new Set([
12392
+ const sh = /* @__PURE__ */ new Set([
12345
12393
  "p",
12346
12394
  "br",
12347
12395
  "hr",
@@ -12376,7 +12424,7 @@ const rh = /* @__PURE__ */ new Set([
12376
12424
  "tr",
12377
12425
  "th",
12378
12426
  "td"
12379
- ]), nh = {
12427
+ ]), ah = {
12380
12428
  a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
12381
12429
  img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
12382
12430
  code: /* @__PURE__ */ new Set(["class"]),
@@ -12386,29 +12434,29 @@ const rh = /* @__PURE__ */ new Set([
12386
12434
  };
12387
12435
  function jt(c) {
12388
12436
  const e = document.createElement("template");
12389
- return e.innerHTML = c, ol(e.content), e.innerHTML;
12437
+ return e.innerHTML = c, ll(e.content), e.innerHTML;
12390
12438
  }
12391
- function ol(c) {
12439
+ function ll(c) {
12392
12440
  const e = Array.from(c.childNodes);
12393
12441
  for (const t of e)
12394
12442
  if (t.nodeType === Node.ELEMENT_NODE) {
12395
12443
  const r = t, a = r.tagName.toLowerCase();
12396
- if (!rh.has(a)) {
12444
+ if (!sh.has(a)) {
12397
12445
  const s = document.createTextNode(r.textContent || "");
12398
12446
  c.replaceChild(s, t);
12399
12447
  continue;
12400
12448
  }
12401
- const n = nh[a] || /* @__PURE__ */ new Set(), i = Array.from(r.attributes);
12449
+ const n = ah[a] || /* @__PURE__ */ new Set(), i = Array.from(r.attributes);
12402
12450
  for (const s of i)
12403
12451
  n.has(s.name) || r.removeAttribute(s.name);
12404
12452
  if (r.hasAttribute("href")) {
12405
12453
  const s = r.getAttribute("href") || "";
12406
12454
  !s.startsWith("http://") && !s.startsWith("https://") && !s.startsWith("/") && r.removeAttribute("href");
12407
12455
  }
12408
- ol(t);
12456
+ ll(t);
12409
12457
  }
12410
12458
  }
12411
- class ih extends HTMLElement {
12459
+ class lh extends HTMLElement {
12412
12460
  shadow;
12413
12461
  container;
12414
12462
  welcomeMessage = "";
@@ -12753,7 +12801,7 @@ class ih extends HTMLElement {
12753
12801
  * data, or opens in a new tab depending on the matched handler.
12754
12802
  */
12755
12803
  async handleLinkClick(e, t) {
12756
- const r = this.linkHandlers.find((y) => oh(e, y.match)), a = r?.target ?? "iframe";
12804
+ const r = this.linkHandlers.find((y) => ch(e, y.match)), a = r?.target ?? "iframe";
12757
12805
  if (a === "tab") {
12758
12806
  window.open(e, "_blank", "noopener,noreferrer");
12759
12807
  return;
@@ -12763,7 +12811,7 @@ class ih extends HTMLElement {
12763
12811
  requestAnimationFrame(() => n.show?.(e, i));
12764
12812
  return;
12765
12813
  }
12766
- const s = sh(e), o = sl(r.fetch.url, s), l = {
12814
+ const s = uh(e), o = cl(r.fetch.url, s), l = {
12767
12815
  accept: "application/json",
12768
12816
  ...r.fetch.headers ?? {}
12769
12817
  }, u = r.fetch.authHeader ?? "session";
@@ -12809,11 +12857,11 @@ class ih extends HTMLElement {
12809
12857
  return e || (e = document.createElement("aikaara-link-modal"), document.body.appendChild(e)), e;
12810
12858
  }
12811
12859
  }
12812
- function oh(c, e) {
12860
+ function ch(c, e) {
12813
12861
  const t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&");
12814
12862
  return new RegExp("^" + t.replace(/\*/g, ".*").replace(/\?/g, ".") + "$", "i").test(c);
12815
12863
  }
12816
- function sh(c) {
12864
+ function uh(c) {
12817
12865
  try {
12818
12866
  const e = new URL(c), t = {};
12819
12867
  return e.searchParams.forEach((r, a) => {
@@ -12823,11 +12871,11 @@ function sh(c) {
12823
12871
  return {};
12824
12872
  }
12825
12873
  }
12826
- function sl(c, e) {
12874
+ function cl(c, e) {
12827
12875
  return c.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
12828
12876
  }
12829
12877
  function zi(c, e) {
12830
- if (typeof c == "string") return sl(c, e);
12878
+ if (typeof c == "string") return cl(c, e);
12831
12879
  if (Array.isArray(c)) return c.map((t) => zi(t, e));
12832
12880
  if (c && typeof c == "object") {
12833
12881
  const t = {};
@@ -12836,7 +12884,7 @@ function zi(c, e) {
12836
12884
  }
12837
12885
  return c;
12838
12886
  }
12839
- class ah extends HTMLElement {
12887
+ class hh extends HTMLElement {
12840
12888
  shadow;
12841
12889
  templatePayload = null;
12842
12890
  attachments = [];
@@ -12928,7 +12976,7 @@ class ah extends HTMLElement {
12928
12976
  ${n ? `<aikaara-template-renderer
12929
12977
  content-type="${n}"
12930
12978
  template-id="${i}"
12931
- inner-message="${ks(s)}"
12979
+ inner-message="${xs(s)}"
12932
12980
  ></aikaara-template-renderer>` : ""}
12933
12981
  ${this.renderAttachments()}
12934
12982
  </div>
@@ -12951,19 +12999,19 @@ class ah extends HTMLElement {
12951
12999
  }
12952
13000
  renderAttachments() {
12953
13001
  return this.attachments.length ? `<div class="attachments">${this.attachments.map(
12954
- (t) => `<a class="attachment" href="${ks(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
12955
- 📎 ${lh(t.fileName)}
13002
+ (t) => `<a class="attachment" href="${xs(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
13003
+ 📎 ${fh(t.fileName)}
12956
13004
  </a>`
12957
13005
  ).join("")}</div>` : "";
12958
13006
  }
12959
13007
  }
12960
- function ks(c) {
13008
+ function xs(c) {
12961
13009
  return String(c).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
12962
13010
  }
12963
- function lh(c) {
13011
+ function fh(c) {
12964
13012
  return String(c).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
12965
13013
  }
12966
- class ch extends HTMLElement {
13014
+ class dh extends HTMLElement {
12967
13015
  shadow;
12968
13016
  textarea;
12969
13017
  sendBtn;
@@ -13114,7 +13162,7 @@ class ch extends HTMLElement {
13114
13162
  this.textarea.style.height = "auto", this.textarea.style.height = Math.min(this.textarea.scrollHeight, 120) + "px";
13115
13163
  }
13116
13164
  }
13117
- class uh extends HTMLElement {
13165
+ class ph extends HTMLElement {
13118
13166
  shadow;
13119
13167
  constructor() {
13120
13168
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -13163,7 +13211,7 @@ class uh extends HTMLElement {
13163
13211
  this.removeAttribute("visible");
13164
13212
  }
13165
13213
  }
13166
- class hh extends HTMLElement {
13214
+ class gh extends HTMLElement {
13167
13215
  shadow;
13168
13216
  bubble;
13169
13217
  constructor() {
@@ -13228,7 +13276,7 @@ class hh extends HTMLElement {
13228
13276
  this.bubble?.classList.remove("cursor");
13229
13277
  }
13230
13278
  }
13231
- class fh extends HTMLElement {
13279
+ class mh extends HTMLElement {
13232
13280
  shadow;
13233
13281
  container;
13234
13282
  dismissTimer = null;
@@ -13275,7 +13323,7 @@ class fh extends HTMLElement {
13275
13323
  }
13276
13324
  }
13277
13325
  const qr = /* @__PURE__ */ new Map();
13278
- function al(c) {
13326
+ function ul(c) {
13279
13327
  const e = qr.get(c);
13280
13328
  if (e) return e;
13281
13329
  const t = new Promise((r, a) => {
@@ -13301,7 +13349,7 @@ function al(c) {
13301
13349
  });
13302
13350
  return qr.set(c, t), t;
13303
13351
  }
13304
- function dh(c, e = 5e3) {
13352
+ function bh(c, e = 5e3) {
13305
13353
  return new Promise((t, r) => {
13306
13354
  const a = setTimeout(() => r(new Error(`Custom element <${c}> not registered within ${e}ms`)), e);
13307
13355
  customElements.whenDefined(c).then(() => {
@@ -13309,11 +13357,11 @@ function dh(c, e = 5e3) {
13309
13357
  });
13310
13358
  });
13311
13359
  }
13312
- function ph(c) {
13360
+ function yh(c) {
13313
13361
  const e = `template:${c}`, t = window.__aikaara_descriptor__?.components?.[e];
13314
13362
  return t && t.kind === "iife-element" ? { render: t.tag, scriptUrl: t.scriptUrl, props: t.props } : window.__aikaara_descriptor__?.templates?.[c];
13315
13363
  }
13316
- class gh extends HTMLElement {
13364
+ class vh extends HTMLElement {
13317
13365
  shadow;
13318
13366
  payloadData = null;
13319
13367
  innerMessage = "";
@@ -13345,8 +13393,8 @@ class gh extends HTMLElement {
13345
13393
  <slot></slot>
13346
13394
  `; this.firstChild; ) this.removeChild(this.firstChild);
13347
13395
  if (!e) return;
13348
- const r = t ? ph(t) : void 0, a = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`);
13349
- if (r?.scriptUrl && !customElements.get(a) && al(r.scriptUrl).then(() => dh(a)).then(() => this.render()).catch((n) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, n)), customElements.get(a)) {
13396
+ const r = t ? yh(t) : void 0, a = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`);
13397
+ if (r?.scriptUrl && !customElements.get(a) && ul(r.scriptUrl).then(() => bh(a)).then(() => this.render()).catch((n) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, n)), customElements.get(a)) {
13350
13398
  const n = document.createElement(a);
13351
13399
  if (r?.props) {
13352
13400
  for (const [i, s] of Object.entries(r.props))
@@ -13434,7 +13482,7 @@ class gh extends HTMLElement {
13434
13482
  url: e.url ?? "",
13435
13483
  openLinkInNewTab: e.openLinkInNewTab,
13436
13484
  orderId: e.orderId,
13437
- extra: bh(e),
13485
+ extra: _h(e),
13438
13486
  messageId: this.getAttribute("message-id") ?? void 0
13439
13487
  }), this.appendChild(a);
13440
13488
  });
@@ -13444,20 +13492,20 @@ class gh extends HTMLElement {
13444
13492
  t.setPayload(e), this.appendChild(t);
13445
13493
  }
13446
13494
  }
13447
- const mh = /* @__PURE__ */ new Set([
13495
+ const wh = /* @__PURE__ */ new Set([
13448
13496
  "type",
13449
13497
  "url",
13450
13498
  "name",
13451
13499
  "openLinkInNewTab",
13452
13500
  "orderId"
13453
13501
  ]);
13454
- function bh(c) {
13502
+ function _h(c) {
13455
13503
  const e = {};
13456
13504
  for (const [t, r] of Object.entries(c))
13457
- mh.has(t) || (e[t] = r);
13505
+ wh.has(t) || (e[t] = r);
13458
13506
  return e;
13459
13507
  }
13460
- class yh extends HTMLElement {
13508
+ class kh extends HTMLElement {
13461
13509
  shadow;
13462
13510
  static get observedAttributes() {
13463
13511
  return ["text", "subtext"];
@@ -13498,15 +13546,15 @@ class yh extends HTMLElement {
13498
13546
  color: var(--aikaara-text-secondary, #9ca3af);
13499
13547
  }
13500
13548
  </style>
13501
- <span class="pill">${Ss(e)}</span>
13502
- ${t ? `<span class="sub">${Ss(t)}</span>` : ""}
13549
+ <span class="pill">${As(e)}</span>
13550
+ ${t ? `<span class="sub">${As(t)}</span>` : ""}
13503
13551
  `;
13504
13552
  }
13505
13553
  }
13506
- function Ss(c) {
13554
+ function As(c) {
13507
13555
  return String(c).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
13508
13556
  }
13509
- class vh extends HTMLElement {
13557
+ class Sh extends HTMLElement {
13510
13558
  shadow;
13511
13559
  data = null;
13512
13560
  selected = /* @__PURE__ */ new Set();
@@ -13583,7 +13631,7 @@ class vh extends HTMLElement {
13583
13631
  .row[aria-checked="true"] .check { opacity: 1; }
13584
13632
  .text { flex: 1; }
13585
13633
  </style>
13586
- <div class="row" role="checkbox" tabindex="0" aria-checked="${s}" data-value="${Es(i.value)}">
13634
+ <div class="row" role="checkbox" tabindex="0" aria-checked="${s}" data-value="${Is(i.value)}">
13587
13635
  <span class="box" aria-hidden="true">
13588
13636
  <svg class="check" viewBox="0 0 16 16" fill="none" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
13589
13637
  <path d="M3 8 L7 12 L13 4" />
@@ -13639,7 +13687,7 @@ class vh extends HTMLElement {
13639
13687
  ${t.map(
13640
13688
  (i) => `
13641
13689
  <button class="opt" type="button"
13642
- data-value="${Es(i.value)}"
13690
+ data-value="${Is(i.value)}"
13643
13691
  role="${a ? "checkbox" : "radio"}"
13644
13692
  aria-pressed="${this.selected.has(i.value)}">
13645
13693
  ${rr(i.label)}
@@ -13654,10 +13702,10 @@ class vh extends HTMLElement {
13654
13702
  function rr(c) {
13655
13703
  return String(c).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
13656
13704
  }
13657
- function Es(c) {
13705
+ function Is(c) {
13658
13706
  return String(c).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
13659
13707
  }
13660
- class wh extends HTMLElement {
13708
+ class Eh extends HTMLElement {
13661
13709
  shadow;
13662
13710
  data = null;
13663
13711
  constructor() {
@@ -13717,14 +13765,14 @@ class wh extends HTMLElement {
13717
13765
  button:hover { background: var(--aikaara-submit-hover-bg, var(--aikaara-primary-hover, #4f46e5)); }
13718
13766
  button:disabled { opacity: var(--aikaara-submit-disabled-opacity, 0.5); cursor: not-allowed; }
13719
13767
  </style>
13720
- <button type="button">${_h(e)}</button>
13768
+ <button type="button">${xh(e)}</button>
13721
13769
  `, this.shadow.querySelector("button").addEventListener("click", () => this.handleClick());
13722
13770
  }
13723
13771
  }
13724
- function _h(c) {
13772
+ function xh(c) {
13725
13773
  return String(c).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
13726
13774
  }
13727
- class kh extends HTMLElement {
13775
+ class Ah extends HTMLElement {
13728
13776
  shadow;
13729
13777
  data = null;
13730
13778
  dismissed = !1;
@@ -13816,7 +13864,7 @@ class kh extends HTMLElement {
13816
13864
  function Hr(c) {
13817
13865
  return String(c).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
13818
13866
  }
13819
- class Sh extends HTMLElement {
13867
+ class Ih extends HTMLElement {
13820
13868
  static get observedAttributes() {
13821
13869
  return ["slug", "user-id", "user-name", "user-token", "department-id", "config-base", "api-key"];
13822
13870
  }
@@ -13870,7 +13918,7 @@ class Sh extends HTMLElement {
13870
13918
  const o = Object.keys(n).length > 0 ? n : void 0;
13871
13919
  return this.mountInflight = (async () => {
13872
13920
  try {
13873
- this.mounted = await of({
13921
+ this.mounted = await cf({
13874
13922
  container: this,
13875
13923
  slug: e,
13876
13924
  configBase: this.getAttribute("config-base") ?? void 0,
@@ -13899,7 +13947,7 @@ class Sh extends HTMLElement {
13899
13947
  })(), this.mountInflight;
13900
13948
  }
13901
13949
  }
13902
- class Eh extends HTMLElement {
13950
+ class Th extends HTMLElement {
13903
13951
  shadow;
13904
13952
  root = null;
13905
13953
  iframe = null;
@@ -14016,7 +14064,7 @@ class Eh extends HTMLElement {
14016
14064
  });
14017
14065
  }
14018
14066
  }
14019
- const xh = [
14067
+ const Ch = [
14020
14068
  { label: "Self-filing guidance" },
14021
14069
  { label: "Smart tax suggestions" },
14022
14070
  { label: "Auto-fetch 26AS / AIS" },
@@ -14024,7 +14072,7 @@ const xh = [
14024
14072
  { label: "Dedicated tax expert" },
14025
14073
  { label: "End-to-end filing" },
14026
14074
  { label: "Document handling" }
14027
- ], Ah = [
14075
+ ], Oh = [
14028
14076
  {
14029
14077
  label: "DIY",
14030
14078
  match: ["DIY", "DIY_SALARY"],
@@ -14047,11 +14095,11 @@ const xh = [
14047
14095
  features: [!0, !0, !0, !0, !0, !0, !0]
14048
14096
  }
14049
14097
  ];
14050
- class Ih extends HTMLElement {
14098
+ class Ph extends HTMLElement {
14051
14099
  shadow;
14052
14100
  data = null;
14053
- columns = Ah;
14054
- features = xh;
14101
+ columns = Oh;
14102
+ features = Ch;
14055
14103
  constructor() {
14056
14104
  super(), this.shadow = this.attachShadow({ mode: "open" });
14057
14105
  }
@@ -14184,30 +14232,30 @@ function zr(c) {
14184
14232
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
14185
14233
  );
14186
14234
  }
14187
- function Th() {
14235
+ function Mh() {
14188
14236
  const c = [
14189
- ["aikaara-chat-widget", Ju],
14190
- ["aikaara-chat-bubble", Xu],
14191
- ["aikaara-chat-header", Zu],
14192
- ["aikaara-message-list", ih],
14193
- ["aikaara-message-bubble", ah],
14194
- ["aikaara-chat-input", ch],
14195
- ["aikaara-typing-indicator", uh],
14196
- ["aikaara-streaming-message", hh],
14197
- ["aikaara-error-banner", fh],
14198
- ["aikaara-template-renderer", gh],
14199
- ["aikaara-system-pill", yh],
14200
- ["aikaara-option-list", vh],
14201
- ["aikaara-submit-action", wh],
14202
- ["aikaara-modal-action", kh],
14203
- ["aikaara-chat", Sh],
14204
- ["aikaara-link-modal", Eh],
14205
- ["aikaara-compare-plans", Ih]
14237
+ ["aikaara-chat-widget", th],
14238
+ ["aikaara-chat-bubble", rh],
14239
+ ["aikaara-chat-header", nh],
14240
+ ["aikaara-message-list", lh],
14241
+ ["aikaara-message-bubble", hh],
14242
+ ["aikaara-chat-input", dh],
14243
+ ["aikaara-typing-indicator", ph],
14244
+ ["aikaara-streaming-message", gh],
14245
+ ["aikaara-error-banner", mh],
14246
+ ["aikaara-template-renderer", vh],
14247
+ ["aikaara-system-pill", kh],
14248
+ ["aikaara-option-list", Sh],
14249
+ ["aikaara-submit-action", Eh],
14250
+ ["aikaara-modal-action", Ah],
14251
+ ["aikaara-chat", Ih],
14252
+ ["aikaara-link-modal", Th],
14253
+ ["aikaara-compare-plans", Ph]
14206
14254
  ];
14207
14255
  for (const [e, t] of c)
14208
14256
  customElements.get(e) || customElements.define(e, t);
14209
14257
  }
14210
- Th();
14258
+ Mh();
14211
14259
  function Kr(c, e, t = "") {
14212
14260
  if (!e) return t;
14213
14261
  const r = e.split(".");
@@ -14218,7 +14266,7 @@ function Kr(c, e, t = "") {
14218
14266
  else return t;
14219
14267
  return typeof a == "string" ? a : t;
14220
14268
  }
14221
- function Ch(c) {
14269
+ function Rh(c) {
14222
14270
  try {
14223
14271
  const e = c.split(".")[1];
14224
14272
  if (!e) return 0;
@@ -14233,7 +14281,7 @@ function Ch(c) {
14233
14281
  async function Pr(c) {
14234
14282
  return typeof c == "function" ? await c() : c;
14235
14283
  }
14236
- class Oh {
14284
+ class jh {
14237
14285
  constructor(e, t) {
14238
14286
  this.descriptor = e, this.sessionToken = t;
14239
14287
  }
@@ -14265,14 +14313,14 @@ class Oh {
14265
14313
  if (!d) throw new Error("Session auth response missing token");
14266
14314
  const p = Kr(o, this.descriptor.requestIdPath ?? "data.requestId"), y = this.cache?.requestId || p;
14267
14315
  if (!y) throw new Error("Session auth response missing requestId");
14268
- const f = Kr(o, this.descriptor.fullNamePath ?? "data.fullName"), g = Ch(d) || Date.now() + 3600 * 1e3;
14316
+ const f = Kr(o, this.descriptor.fullNamePath ?? "data.fullName"), g = Rh(d) || Date.now() + 3600 * 1e3;
14269
14317
  return this.cache = { token: d, requestId: y, fullName: f, expiresAt: g }, this.cache;
14270
14318
  }
14271
14319
  }
14272
- async function Ph(c) {
14320
+ async function Lh(c) {
14273
14321
  const e = {};
14274
14322
  for (const t of c.spec) {
14275
- const r = await Mh(t, c.providers);
14323
+ const r = await Nh(t, c.providers);
14276
14324
  if (r !== void 0 && r !== "")
14277
14325
  e[t.name] = r;
14278
14326
  else {
@@ -14285,11 +14333,11 @@ async function Ph(c) {
14285
14333
  }
14286
14334
  return e;
14287
14335
  }
14288
- async function Mh(c, e) {
14336
+ async function Nh(c, e) {
14289
14337
  const t = c.key ?? c.name;
14290
14338
  switch (c.source) {
14291
14339
  case "cookie":
14292
- return Rh(t);
14340
+ return Uh(t);
14293
14341
  case "localStorage":
14294
14342
  return nr(() => window.localStorage.getItem(t) ?? void 0);
14295
14343
  case "sessionStorage":
@@ -14297,7 +14345,7 @@ async function Mh(c, e) {
14297
14345
  case "url_param":
14298
14346
  return nr(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
14299
14347
  case "header_meta":
14300
- return nr(() => document.querySelector(`meta[name="${jh(t)}"]`)?.content ?? void 0);
14348
+ return nr(() => document.querySelector(`meta[name="${Bh(t)}"]`)?.content ?? void 0);
14301
14349
  case "callback": {
14302
14350
  const r = e?.[c.name];
14303
14351
  if (!r) return;
@@ -14308,7 +14356,7 @@ async function Mh(c, e) {
14308
14356
  return;
14309
14357
  }
14310
14358
  }
14311
- function Rh(c) {
14359
+ function Uh(c) {
14312
14360
  if (typeof document > "u") return;
14313
14361
  const e = encodeURIComponent(c), t = document.cookie ? document.cookie.split("; ") : [];
14314
14362
  for (const r of t) {
@@ -14330,11 +14378,11 @@ function nr(c) {
14330
14378
  return;
14331
14379
  }
14332
14380
  }
14333
- function jh(c) {
14381
+ function Bh(c) {
14334
14382
  return c.replace(/["\\]/g, "\\$&");
14335
14383
  }
14336
- const Lh = 1800;
14337
- class Nh {
14384
+ const Fh = 1800;
14385
+ class Dh {
14338
14386
  constructor(e) {
14339
14387
  this.opts = e, this.cache = this.loadCache();
14340
14388
  }
@@ -14363,7 +14411,7 @@ class Nh {
14363
14411
  throw new Error(
14364
14412
  "[aikaara-chat-sdk] SsoExchangeAdapter.exchange() requires descriptor.sso.collect; v2 partner-token flow should be handled by TokenDiscoveryReader instead."
14365
14413
  );
14366
- const e = await Ph({
14414
+ const e = await Lh({
14367
14415
  spec: this.opts.descriptor.collect,
14368
14416
  providers: this.opts.providers
14369
14417
  }), t = JSON.stringify({ credentials: e }), r = {
@@ -14401,7 +14449,7 @@ class Nh {
14401
14449
  return this.cache = u, this.persistCache(u), u;
14402
14450
  }
14403
14451
  computeExpiry() {
14404
- const e = this.opts.descriptor.cacheTtlSec ?? Lh;
14452
+ const e = this.opts.descriptor.cacheTtlSec ?? Fh;
14405
14453
  if (!(!this.opts.descriptor.cacheKey || e <= 0))
14406
14454
  return Date.now() + e * 1e3;
14407
14455
  }
@@ -14434,8 +14482,8 @@ class Nh {
14434
14482
  }
14435
14483
  }
14436
14484
  }
14437
- const Uh = 3e4, Bh = 2e3, Dh = 100;
14438
- async function Fh(c) {
14485
+ const $h = 3e4, Wh = 2e3, qh = 100;
14486
+ async function Hh(c) {
14439
14487
  const { descriptor: e } = c, t = e.tokenSourceConfig ?? {};
14440
14488
  switch (e.tokenSource) {
14441
14489
  case "init": {
@@ -14444,37 +14492,37 @@ async function Fh(c) {
14444
14492
  return { token: c.initToken, source: "init" };
14445
14493
  }
14446
14494
  case "query": {
14447
- const r = typeof t.key == "string" && t.key ? t.key : "token", a = Wh(r);
14495
+ const r = typeof t.key == "string" && t.key ? t.key : "token", a = Kh(r);
14448
14496
  if (!a) throw new Ke("query", `?${r}= not present`);
14449
14497
  return { token: a, source: "query" };
14450
14498
  }
14451
14499
  case "hash": {
14452
- const r = typeof t.key == "string" && t.key ? t.key : "token", a = qh(r);
14500
+ const r = typeof t.key == "string" && t.key ? t.key : "token", a = Vh(r);
14453
14501
  if (!a) throw new Ke("hash", `#${r}= not present`);
14454
14502
  return { token: a, source: "hash" };
14455
14503
  }
14456
14504
  case "postmsg": {
14457
- const r = typeof t.type == "string" ? t.type : "", a = typeof t.key == "string" && t.key ? t.key : "token", n = Gh(typeof t.origins == "string" ? t.origins : ""), i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : Uh;
14458
- return { token: await Vh({ type: r, key: a, origins: n, timeoutMs: i }), source: "postmsg" };
14505
+ const r = typeof t.type == "string" ? t.type : "", a = typeof t.key == "string" && t.key ? t.key : "token", n = Xh(typeof t.origins == "string" ? t.origins : ""), i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : $h;
14506
+ return { token: await Jh({ type: r, key: a, origins: n, timeoutMs: i }), source: "postmsg" };
14459
14507
  }
14460
14508
  case "cookie": {
14461
14509
  const r = typeof t.name == "string" && t.name ? t.name : "";
14462
14510
  if (!r) throw new Ke("cookie", "cookie.name not configured");
14463
- const a = Hh(r);
14511
+ const a = Gh(r);
14464
14512
  if (!a) throw new Ke("cookie", `cookie "${r}" not set`);
14465
14513
  return { token: a, source: "cookie" };
14466
14514
  }
14467
14515
  case "storage": {
14468
14516
  const r = t.store === "session" ? "session" : "local", a = typeof t.key == "string" && t.key ? t.key : "", n = typeof t.path == "string" ? t.path : "";
14469
14517
  if (!a) throw new Ke("storage", "storage.key not configured");
14470
- const i = zh(r, a, n);
14518
+ const i = Yh(r, a, n);
14471
14519
  if (!i) throw new Ke("storage", `${r}Storage["${a}"] not set`);
14472
14520
  return { token: i, source: "storage" };
14473
14521
  }
14474
14522
  case "global": {
14475
14523
  const r = typeof t.path == "string" ? t.path : "";
14476
14524
  if (!r) throw new Ke("global", "global.path not configured");
14477
- const a = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : Bh, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : Dh, i = await Kh(r, a, n);
14525
+ const a = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : Wh, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : qh, i = await Qh(r, a, n);
14478
14526
  if (!i) throw new Ke("global", `window.${r} not present`);
14479
14527
  return { token: i, source: "global" };
14480
14528
  }
@@ -14487,7 +14535,7 @@ async function Fh(c) {
14487
14535
  }
14488
14536
  }
14489
14537
  }
14490
- class $h {
14538
+ class zh {
14491
14539
  constructor(e) {
14492
14540
  this.opts = e;
14493
14541
  }
@@ -14498,7 +14546,7 @@ class $h {
14498
14546
  /** Resolve the token. Returns cache if present. */
14499
14547
  async get() {
14500
14548
  if (this.cached) return this.cached;
14501
- const e = await Fh(this.opts);
14549
+ const e = await Hh(this.opts);
14502
14550
  return this.cached = e, e;
14503
14551
  }
14504
14552
  /**
@@ -14515,7 +14563,7 @@ class Ke extends Error {
14515
14563
  super(`[aikaara-chat-sdk] token-discovery (${e}): ${t}`), this.source = e, this.name = "TokenDiscoveryError";
14516
14564
  }
14517
14565
  }
14518
- function Wh(c) {
14566
+ function Kh(c) {
14519
14567
  if (!(typeof window > "u"))
14520
14568
  try {
14521
14569
  return new URL(window.location.href).searchParams.get(c) ?? void 0;
@@ -14523,7 +14571,7 @@ function Wh(c) {
14523
14571
  return;
14524
14572
  }
14525
14573
  }
14526
- function qh(c) {
14574
+ function Vh(c) {
14527
14575
  if (!(typeof window > "u"))
14528
14576
  try {
14529
14577
  const e = window.location.hash.replace(/^#/, "");
@@ -14532,7 +14580,7 @@ function qh(c) {
14532
14580
  return;
14533
14581
  }
14534
14582
  }
14535
- function Hh(c) {
14583
+ function Gh(c) {
14536
14584
  if (typeof document > "u") return;
14537
14585
  const e = encodeURIComponent(c), t = document.cookie ? document.cookie.split("; ") : [];
14538
14586
  for (const r of t) {
@@ -14547,7 +14595,7 @@ function Hh(c) {
14547
14595
  }
14548
14596
  }
14549
14597
  }
14550
- function zh(c, e, t) {
14598
+ function Yh(c, e, t) {
14551
14599
  if (!(typeof window > "u"))
14552
14600
  try {
14553
14601
  const a = (c === "session" ? window.sessionStorage : window.localStorage).getItem(e);
@@ -14559,17 +14607,17 @@ function zh(c, e, t) {
14559
14607
  } catch {
14560
14608
  return a;
14561
14609
  }
14562
- const i = ll(n, t);
14610
+ const i = hl(n, t);
14563
14611
  return typeof i == "string" ? i : void 0;
14564
14612
  } catch {
14565
14613
  return;
14566
14614
  }
14567
14615
  }
14568
- async function Kh(c, e, t) {
14616
+ async function Qh(c, e, t) {
14569
14617
  if (typeof window > "u") return;
14570
14618
  const r = Date.now() + e;
14571
14619
  for (; Date.now() < r; ) {
14572
- const a = ll(window, c);
14620
+ const a = hl(window, c);
14573
14621
  if (typeof a == "string" && a.length > 0) return a;
14574
14622
  if (typeof a == "function")
14575
14623
  try {
@@ -14580,7 +14628,7 @@ async function Kh(c, e, t) {
14580
14628
  await new Promise((n) => setTimeout(n, t));
14581
14629
  }
14582
14630
  }
14583
- function Vh(c) {
14631
+ function Jh(c) {
14584
14632
  return new Promise((e, t) => {
14585
14633
  if (typeof window > "u") {
14586
14634
  t(new Ke("postmsg", "no window"));
@@ -14602,10 +14650,10 @@ function Vh(c) {
14602
14650
  window.addEventListener("message", n);
14603
14651
  });
14604
14652
  }
14605
- function Gh(c) {
14653
+ function Xh(c) {
14606
14654
  return c ? c.split(/[,\s]+/).map((e) => e.trim()).filter(Boolean) : [];
14607
14655
  }
14608
- function ll(c, e) {
14656
+ function hl(c, e) {
14609
14657
  if (!e) return c;
14610
14658
  const t = e.split(".").filter(Boolean);
14611
14659
  let r = c;
@@ -14616,7 +14664,7 @@ function ll(c, e) {
14616
14664
  return;
14617
14665
  return r;
14618
14666
  }
14619
- function Yh() {
14667
+ function Zh() {
14620
14668
  const c = typeof crypto < "u" ? crypto : null;
14621
14669
  if (c?.randomUUID) return c.randomUUID();
14622
14670
  if (c?.getRandomValues) {
@@ -14630,30 +14678,30 @@ function Yh() {
14630
14678
  return (e === "x" ? t : t & 3 | 8).toString(16);
14631
14679
  });
14632
14680
  }
14633
- const Qh = "aikaara_chat:requestId";
14681
+ const ef = "aikaara_chat:requestId";
14634
14682
  function so(c, e) {
14635
- return `${Qh}:${c}:${e}`;
14683
+ return `${ef}:${c}:${e}`;
14636
14684
  }
14637
- function Jh(c, e) {
14685
+ function tf(c, e) {
14638
14686
  try {
14639
14687
  return localStorage.getItem(so(c, e));
14640
14688
  } catch {
14641
14689
  return null;
14642
14690
  }
14643
14691
  }
14644
- function Xh(c, e, t) {
14692
+ function rf(c, e, t) {
14645
14693
  try {
14646
14694
  localStorage.setItem(so(c, e), t);
14647
14695
  } catch {
14648
14696
  }
14649
14697
  }
14650
- function sf(c, e) {
14698
+ function uf(c, e) {
14651
14699
  try {
14652
14700
  localStorage.removeItem(so(c, e));
14653
14701
  } catch {
14654
14702
  }
14655
14703
  }
14656
- async function Zh(c, e) {
14704
+ async function nf(c, e) {
14657
14705
  console.log("[aikaara-chat-sdk] preflight running", c.length, "steps");
14658
14706
  const t = {
14659
14707
  userId: e.userId,
@@ -14686,7 +14734,7 @@ async function Zh(c, e) {
14686
14734
  try {
14687
14735
  const b = await fetch(l, p);
14688
14736
  if (b.ok) break;
14689
- if (y = b.status, f = await b.text().catch(() => ""), g < i.length && ef(y, f)) {
14737
+ if (y = b.status, f = await b.text().catch(() => ""), g < i.length && of(y, f)) {
14690
14738
  const m = i[g++];
14691
14739
  console.warn(
14692
14740
  `[aikaara-chat-sdk] preflight #${s} ${u} ${l} → ${y} (transient). Retry #${g} in ${m}ms.`
@@ -14716,7 +14764,7 @@ async function Zh(c, e) {
14716
14764
  }
14717
14765
  }
14718
14766
  }
14719
- function ef(c, e) {
14767
+ function of(c, e) {
14720
14768
  if (c === 503 || c === 504 || c === 502) return !0;
14721
14769
  if (c === 401 || c === 403) return e.trim().length === 0;
14722
14770
  if (c === 500) {
@@ -14725,7 +14773,7 @@ function ef(c, e) {
14725
14773
  }
14726
14774
  return !1;
14727
14775
  }
14728
- async function cl(c, e) {
14776
+ async function fl(c, e) {
14729
14777
  const t = await fetch(c, {
14730
14778
  method: "GET",
14731
14779
  headers: { accept: "application/json", ...e ?? {} }
@@ -14741,10 +14789,10 @@ async function cl(c, e) {
14741
14789
  }
14742
14790
  return r;
14743
14791
  }
14744
- function tf(c, e) {
14745
- return c.replace("{projectId}", e).replace("{uuid}", Yh().replace(/-/g, ""));
14792
+ function sf(c, e) {
14793
+ return c.replace("{projectId}", e).replace("{uuid}", Zh().replace(/-/g, ""));
14746
14794
  }
14747
- function ul(c) {
14795
+ function dl(c) {
14748
14796
  const e = c._preload;
14749
14797
  if (!Array.isArray(e) || e.length === 0) return;
14750
14798
  const t = Array.from(
@@ -14752,19 +14800,19 @@ function ul(c) {
14752
14800
  e.map((r) => r && typeof r == "object" ? r.scriptUrl : null).filter((r) => typeof r == "string" && r.length > 0)
14753
14801
  )
14754
14802
  );
14755
- t.length !== 0 && Promise.allSettled(t.map((r) => al(r)));
14803
+ t.length !== 0 && Promise.allSettled(t.map((r) => ul(r)));
14756
14804
  }
14757
- async function rf(c) {
14805
+ async function af(c) {
14758
14806
  const e = {
14759
- ...c.config ?? (c.configUrl ? await cl(c.configUrl, c.configHeaders) : {}),
14807
+ ...c.config ?? (c.configUrl ? await fl(c.configUrl, c.configHeaders) : {}),
14760
14808
  ...c.overrides ?? {}
14761
14809
  };
14762
- ul(e);
14810
+ dl(e);
14763
14811
  const t = e.transport ?? "tiledesk", r = e.tiledesk;
14764
14812
  if ((t === "tiledesk" || t === "dual") && !r)
14765
14813
  throw new Error("mount: descriptor.tiledesk is required for tiledesk/dual transport");
14766
- const a = r?.projectId ?? "", n = c.identity.userId, i = c.forceNewConversation ? null : Jh(n, a), s = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", o = c.conversationId ?? i ?? tf(s, a);
14767
- (!i || c.forceNewConversation) && a && Xh(n, a, o);
14814
+ const a = r?.projectId ?? "", n = c.identity.userId, i = c.forceNewConversation ? null : tf(n, a), s = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", o = c.conversationId ?? i ?? sf(s, a);
14815
+ (!i || c.forceNewConversation) && a && rf(n, a, o);
14768
14816
  const l = await c.tokenProvider(), u = c.tokenProvider, d = c.historyTokenProvider ?? u, p = r ? {
14769
14817
  mqttEndpoint: r.mqttEndpoint,
14770
14818
  jwtToken: l,
@@ -14792,11 +14840,11 @@ async function rf(c) {
14792
14840
  debug: r.debug,
14793
14841
  senderFullname: c.identity.senderFullname ?? c.identity.userName,
14794
14842
  tokenProvider: u
14795
- } : void 0, y = c.uploadAdapter ?? (e.uploadEndpoint ? il({
14843
+ } : void 0, y = c.uploadAdapter ?? (e.uploadEndpoint ? al({
14796
14844
  endpoint: e.uploadEndpoint,
14797
14845
  fieldName: e.uploadFieldName,
14798
14846
  extraFields: e.uploadExtraFields
14799
- }) : void 0), f = c.historyAdapter ?? (e.historyApiBase ? Yu({
14847
+ }) : void 0), f = c.historyAdapter ?? (e.historyApiBase ? Zu({
14800
14848
  apiBase: e.historyApiBase,
14801
14849
  pageSize: e.historyPageSize ?? 200,
14802
14850
  pathTemplate: e.historyPathTemplate,
@@ -14851,17 +14899,17 @@ async function rf(c) {
14851
14899
  }
14852
14900
  };
14853
14901
  }
14854
- function nf(c) {
14902
+ function lf(c) {
14855
14903
  if (typeof c != "string") return c;
14856
14904
  const e = document.querySelector(c);
14857
14905
  if (!e) throw new Error(`mountFromSlug: container "${c}" not found`);
14858
14906
  return e;
14859
14907
  }
14860
- async function of(c) {
14908
+ async function cf(c) {
14861
14909
  const e = (c.configBase ?? "https://api.aikaara.com").replace(/\/$/, ""), t = `${e}/api/v1/widget_configs/${encodeURIComponent(c.slug)}`;
14862
14910
  let r = null;
14863
14911
  try {
14864
- r = await cl(t, c.configHeaders);
14912
+ r = await fl(t, c.configHeaders);
14865
14913
  } catch (w) {
14866
14914
  if (!c.fallbackConfig) throw w;
14867
14915
  console.warn(
@@ -14874,7 +14922,7 @@ async function of(c) {
14874
14922
  ...r ?? {},
14875
14923
  ...c.overrides ?? {}
14876
14924
  };
14877
- if (ul(a), a.templates && Object.keys(a.templates).length > 0) {
14925
+ if (dl(a), a.templates && Object.keys(a.templates).length > 0) {
14878
14926
  a.components = { ...a.components ?? {} };
14879
14927
  for (const [w, E] of Object.entries(a.templates)) {
14880
14928
  const v = `template:${w}`;
@@ -14897,7 +14945,7 @@ async function of(c) {
14897
14945
  );
14898
14946
  let n = null, i = c.user.id, s = c.user.name, o = "", l = c.user.token, u = null;
14899
14947
  if (a.sso?.tokenSource) {
14900
- u = new $h({
14948
+ u = new zh({
14901
14949
  descriptor: {
14902
14950
  provider: a.sso.provider,
14903
14951
  flow: a.sso.flow,
@@ -14914,20 +14962,20 @@ async function of(c) {
14914
14962
  l = async () => (await u.get()).token, c.user.identity && !c.user.identity.partnerToken && (c.user.identity.partnerToken = w.token);
14915
14963
  } else if (a.sso && a.sso.collect && a.sso.collect.length > 0) {
14916
14964
  const w = `${e}/api/v1/projects/by-slug/${encodeURIComponent(c.slug)}/sso_exchange`;
14917
- n = await new Nh({
14965
+ n = await new Dh({
14918
14966
  descriptor: a.sso,
14919
14967
  providers: c.user.credentialProviders,
14920
14968
  exchangeUrl: w
14921
14969
  }).get(), i = n.extUid || i, s = s ?? n.displayName, o = n.userToken;
14922
14970
  }
14923
- a.preflight && a.preflight.length && await Zh(a.preflight, {
14971
+ a.preflight && a.preflight.length && await nf(a.preflight, {
14924
14972
  sessionToken: l,
14925
14973
  userId: i,
14926
14974
  projectId: a.tiledesk?.projectId ?? "",
14927
14975
  slug: c.slug,
14928
14976
  identity: c.user.identity
14929
14977
  });
14930
- const d = new Oh(a.auth, l), p = await d.get(), y = p.fullName || s || i;
14978
+ const d = new jh(a.auth, l), p = await d.get(), y = p.fullName || s || i;
14931
14979
  window.__aikaara_runtime__ = {
14932
14980
  getChatJwt: async () => (await d.get()).token,
14933
14981
  identity: c.user.identity,
@@ -14939,16 +14987,16 @@ async function of(c) {
14939
14987
  } catch (w) {
14940
14988
  return console.warn("[aikaara-chat-sdk] partner auto-refresh failed", w), null;
14941
14989
  }
14942
- } : null, g = a.upload, b = async () => `Bearer ${g && "tokenSource" in g && g.tokenSource === "chat" ? (await d.get()).token : await Pr(c.user.token)}`, k = c.hooks?.upload ?? (g && g.mode === "presigned-3step" ? Vu({
14990
+ } : null, g = a.upload, b = async () => `Bearer ${g && "tokenSource" in g && g.tokenSource === "chat" ? (await d.get()).token : await Pr(c.user.token)}`, k = c.hooks?.upload ?? (g && g.mode === "presigned-3step" ? Ju({
14943
14991
  ...g,
14944
14992
  authHeader: b
14945
- }) : g && g.mode === "direct" ? il({
14993
+ }) : g && g.mode === "direct" ? al({
14946
14994
  endpoint: g.endpoint,
14947
14995
  fieldName: g.fieldName,
14948
14996
  extraFields: g.extraFields,
14949
14997
  headers: async () => ({ authorization: await b() })
14950
- }) : void 0), m = await rf({
14951
- container: nf(c.container),
14998
+ }) : void 0), m = await af({
14999
+ container: lf(c.container),
14952
15000
  config: a,
14953
15001
  // SSO-issued Aikaara user token, used by the ActionCable transport.
14954
15002
  // Tiledesk-only widgets ignore this; falls back to `userId` inside `mount`.
@@ -14982,46 +15030,46 @@ async function of(c) {
14982
15030
  }
14983
15031
  export {
14984
15032
  ao as A,
14985
- of as B,
14986
- hl as C,
14987
- rf as D,
14988
- xs as E,
14989
- nl as F,
14990
- Sh as G,
14991
- Ih as H,
14992
- Eh as I,
14993
- kh as J,
14994
- vh as K,
14995
- wh as L,
14996
- Sl as M,
14997
- yh as N,
14998
- gh as O,
14999
- Oh as S,
15000
- Uu as T,
15001
- Xu as a,
15002
- qu as b,
15003
- Zu as c,
15004
- ch as d,
15005
- Ju as e,
15006
- fh as f,
15007
- ah as g,
15008
- ih as h,
15009
- hh as i,
15010
- uh as j,
15011
- kl as k,
15012
- _l as l,
15013
- El as m,
15014
- Nh as n,
15033
+ cf as B,
15034
+ pl as C,
15035
+ af as D,
15036
+ Ts as E,
15037
+ sl as F,
15038
+ Ih as G,
15039
+ Ph as H,
15040
+ Th as I,
15041
+ Ah as J,
15042
+ Sh as K,
15043
+ Eh as L,
15044
+ Al as M,
15045
+ kh as N,
15046
+ vh as O,
15047
+ jh as S,
15048
+ $u as T,
15049
+ rh as a,
15050
+ Vu as b,
15051
+ nh as c,
15052
+ dh as d,
15053
+ th as e,
15054
+ mh as f,
15055
+ hh as g,
15056
+ lh as h,
15057
+ gh as i,
15058
+ ph as j,
15059
+ xl as k,
15060
+ El as l,
15061
+ Tl as m,
15062
+ Dh as n,
15015
15063
  Ke as o,
15016
- $h as p,
15017
- sf as q,
15018
- Th as r,
15019
- Ph as s,
15020
- il as t,
15021
- Vu as u,
15022
- Yu as v,
15023
- Fh as w,
15024
- $u as x,
15025
- Fu as y,
15026
- Du as z
15064
+ zh as p,
15065
+ uf as q,
15066
+ Mh as r,
15067
+ Lh as s,
15068
+ al as t,
15069
+ Ju as u,
15070
+ Zu as v,
15071
+ Hh as w,
15072
+ zu as x,
15073
+ Hu as y,
15074
+ qu as z
15027
15075
  };