@aikaara/chat-sdk 1.5.4 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- class ql {
1
+ class Hl {
2
2
  identifier;
3
3
  callbacks = {};
4
4
  sendFn;
@@ -63,7 +63,7 @@ class To {
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 ql(t, (o) => {
66
+ const t = JSON.stringify(e), r = new Hl(t, (o) => {
67
67
  this.send({
68
68
  command: "message",
69
69
  identifier: t,
@@ -142,7 +142,7 @@ class To {
142
142
  }
143
143
  }
144
144
  }
145
- class Qs {
145
+ class Xs {
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 Qs {
163
163
  this.handlers.clear();
164
164
  }
165
165
  }
166
- const Hl = 1e3, Wl = 10, zl = 400, Vl = 600, Co = "#6366f1", Kl = 12, Gl = "system-ui, -apple-system, sans-serif", Oo = "Type a message...", Yl = "bottom-right", Jl = "light", Ql = { x: 20, y: 20 }, Xr = "aikaara_conversation_id";
167
- class Xl extends Qs {
166
+ const Wl = 1e3, zl = 10, Vl = 400, Kl = 600, Co = "#6366f1", Gl = 12, Yl = "system-ui, -apple-system, sans-serif", Oo = "Type a message...", Jl = "bottom-right", Ql = "light", Xl = { x: 20, y: 20 }, Xr = "aikaara_conversation_id";
167
+ class Zl extends Xs {
168
168
  client;
169
169
  config;
170
170
  state = "disconnected";
@@ -221,13 +221,13 @@ class Xl extends Qs {
221
221
  this.state !== e && (this.state = e, this.emit("connection:state", e));
222
222
  }
223
223
  scheduleReconnect() {
224
- const e = this.config.maxReconnectAttempts ?? Wl;
224
+ const e = this.config.maxReconnectAttempts ?? zl;
225
225
  if (this.reconnectAttempt >= e) {
226
226
  this.emit("error", new Error("Max reconnection attempts reached"));
227
227
  return;
228
228
  }
229
229
  this.setState("reconnecting");
230
- const r = (this.config.reconnectInterval ?? Hl) * Math.pow(2, this.reconnectAttempt);
230
+ const r = (this.config.reconnectInterval ?? Wl) * Math.pow(2, this.reconnectAttempt);
231
231
  this.reconnectAttempt++, this.reconnectTimer = setTimeout(async () => {
232
232
  try {
233
233
  const o = this.buildWsUrl(this.config.baseUrl, this.config.userToken);
@@ -247,7 +247,7 @@ class Xl extends Qs {
247
247
  return `${e.replace(/^http/, "ws")}/cable?token=${t}`;
248
248
  }
249
249
  }
250
- class Zl {
250
+ class ec {
251
251
  baseUrl;
252
252
  apiKey;
253
253
  authToken;
@@ -354,7 +354,7 @@ class Zl {
354
354
  return r && (n.body = JSON.stringify(r)), fetch(e, n);
355
355
  }
356
356
  }
357
- class ec {
357
+ class tc {
358
358
  _messages = [];
359
359
  optimisticCounter = 0;
360
360
  get messages() {
@@ -482,7 +482,7 @@ function Mo(s) {
482
482
  const e = s.attachments && s.attachments[0];
483
483
  if (e && typeof e.fileUrl == "string")
484
484
  return e.fileUrl;
485
- const t = Xs(s);
485
+ const t = Zs(s);
486
486
  if (t) return t;
487
487
  }
488
488
  function Ro(s) {
@@ -500,19 +500,19 @@ function qr(s) {
500
500
  return e.cloudFileId;
501
501
  const t = (s.metadata ?? {}).attributes;
502
502
  if (t && typeof t.cloudFileId == "string") return t.cloudFileId;
503
- const r = Xs(s);
503
+ const r = Zs(s);
504
504
  if (r) {
505
505
  const o = /[?&]cloudFileId=([^&]+)/.exec(r);
506
506
  if (o) return decodeURIComponent(o[1]);
507
507
  }
508
508
  }
509
- function Xs(s) {
509
+ function Zs(s) {
510
510
  const e = s.template;
511
511
  if (e?.templateId !== "7") return;
512
512
  const r = e.payload?.elements?.[0]?.action?.url;
513
513
  return typeof r == "string" ? r : void 0;
514
514
  }
515
- class tc {
515
+ class rc {
516
516
  _conversationId;
517
517
  persist;
518
518
  constructor(e, t = !0) {
@@ -546,23 +546,23 @@ class tc {
546
546
  }
547
547
  }
548
548
  }
549
- var ho = Object.defineProperty, rc = Object.getOwnPropertyDescriptor, nc = Object.getOwnPropertyNames, ic = Object.prototype.hasOwnProperty, Je = (s, e) => () => (s && (e = s(s = 0)), e), pe = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports), zt = (s, e) => {
549
+ var ho = Object.defineProperty, nc = Object.getOwnPropertyDescriptor, ic = Object.getOwnPropertyNames, oc = Object.prototype.hasOwnProperty, Je = (s, e) => () => (s && (e = s(s = 0)), e), pe = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports), zt = (s, e) => {
550
550
  for (var t in e) ho(s, t, { get: e[t], enumerable: !0 });
551
- }, oc = (s, e, t, r) => {
552
- if (e && typeof e == "object" || typeof e == "function") for (let o of nc(e)) !ic.call(s, o) && o !== t && ho(s, o, { get: () => e[o], enumerable: !(r = rc(e, o)) || r.enumerable });
551
+ }, sc = (s, e, t, r) => {
552
+ if (e && typeof e == "object" || typeof e == "function") for (let o of ic(e)) !oc.call(s, o) && o !== t && ho(s, o, { get: () => e[o], enumerable: !(r = nc(e, o)) || r.enumerable });
553
553
  return s;
554
- }, Me = (s) => oc(ho({}, "__esModule", { value: !0 }), s), le = Je(() => {
554
+ }, Me = (s) => sc(ho({}, "__esModule", { value: !0 }), s), le = Je(() => {
555
555
  }), Le = {};
556
- zt(Le, { _debugEnd: () => Wn, _debugProcess: () => Hn, _events: () => oi, _eventsCount: () => si, _exiting: () => Cn, _fatalExceptions: () => $n, _getActiveHandles: () => oa, _getActiveRequests: () => ia, _kill: () => Mn, _linkedBinding: () => ra, _maxListeners: () => ii, _preload_modules: () => ri, _rawDebug: () => An, _startProfilerIdleNotifier: () => zn, _stopProfilerIdleNotifier: () => Vn, _tickCallback: () => qn, abort: () => Jn, addListener: () => ai, allowedNodeEnvironmentFlags: () => Bn, arch: () => dn, argv: () => mn, argv0: () => ti, assert: () => sa, binding: () => wn, browser: () => En, chdir: () => xn, config: () => On, cpuUsage: () => tr, cwd: () => kn, debugPort: () => ei, default: () => po, dlopen: () => na, domain: () => Tn, emit: () => di, emitWarning: () => vn, env: () => pn, execArgv: () => gn, execPath: () => Zn, exit: () => jn, features: () => Dn, hasUncaughtExceptionCaptureCallback: () => aa, hrtime: () => br, kill: () => Nn, listeners: () => ca, memoryUsage: () => Ln, moduleLoadList: () => In, nextTick: () => ea, off: () => ci, on: () => ct, once: () => li, openStdin: () => Un, pid: () => Qn, platform: () => fn, ppid: () => Xn, prependListener: () => fi, prependOnceListener: () => pi, reallyExit: () => Pn, release: () => Sn, removeAllListeners: () => hi, removeListener: () => ui, resourceUsage: () => Rn, setSourceMapsEnabled: () => ni, setUncaughtExceptionCaptureCallback: () => Fn, stderr: () => Gn, stdin: () => Yn, stdout: () => Kn, title: () => hn, umask: () => _n, uptime: () => la, version: () => bn, versions: () => yn });
556
+ zt(Le, { _debugEnd: () => Wn, _debugProcess: () => Hn, _events: () => oi, _eventsCount: () => si, _exiting: () => Cn, _fatalExceptions: () => $n, _getActiveHandles: () => sa, _getActiveRequests: () => oa, _kill: () => Mn, _linkedBinding: () => na, _maxListeners: () => ii, _preload_modules: () => ri, _rawDebug: () => An, _startProfilerIdleNotifier: () => zn, _stopProfilerIdleNotifier: () => Vn, _tickCallback: () => qn, abort: () => Jn, addListener: () => ai, allowedNodeEnvironmentFlags: () => Bn, arch: () => dn, argv: () => mn, argv0: () => ti, assert: () => aa, binding: () => wn, browser: () => En, chdir: () => xn, config: () => On, cpuUsage: () => tr, cwd: () => kn, debugPort: () => ei, default: () => po, dlopen: () => ia, domain: () => Tn, emit: () => di, emitWarning: () => vn, env: () => pn, execArgv: () => gn, execPath: () => Zn, exit: () => jn, features: () => Dn, hasUncaughtExceptionCaptureCallback: () => la, hrtime: () => br, kill: () => Nn, listeners: () => ua, memoryUsage: () => Ln, moduleLoadList: () => In, nextTick: () => ta, off: () => ci, on: () => ct, once: () => li, openStdin: () => Un, pid: () => Qn, platform: () => fn, ppid: () => Xn, prependListener: () => fi, prependOnceListener: () => pi, reallyExit: () => Pn, release: () => Sn, removeAllListeners: () => hi, removeListener: () => ui, resourceUsage: () => Rn, setSourceMapsEnabled: () => ni, setUncaughtExceptionCaptureCallback: () => Fn, stderr: () => Gn, stdin: () => Yn, stdout: () => Kn, title: () => hn, umask: () => _n, uptime: () => ca, version: () => bn, versions: () => yn });
557
557
  function fo(s) {
558
558
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
559
559
  }
560
- function sc() {
561
- !Mt || !Ot || (Mt = !1, Ot.length ? st = Ot.concat(st) : or = -1, st.length && Zs());
560
+ function ac() {
561
+ !Mt || !Ot || (Mt = !1, Ot.length ? st = Ot.concat(st) : or = -1, st.length && ea());
562
562
  }
563
- function Zs() {
563
+ function ea() {
564
564
  if (!Mt) {
565
- var s = setTimeout(sc, 0);
565
+ var s = setTimeout(ac, 0);
566
566
  Mt = !0;
567
567
  for (var e = st.length; e; ) {
568
568
  for (Ot = st, st = []; ++or < e; ) Ot && Ot[or].run();
@@ -571,35 +571,35 @@ function Zs() {
571
571
  Ot = null, Mt = !1, clearTimeout(s);
572
572
  }
573
573
  }
574
- function ea(s) {
574
+ function ta(s) {
575
575
  var e = new Array(arguments.length - 1);
576
576
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
577
- st.push(new ta(s, e)), st.length === 1 && !Mt && setTimeout(Zs, 0);
577
+ st.push(new ra(s, e)), st.length === 1 && !Mt && setTimeout(ea, 0);
578
578
  }
579
- function ta(s, e) {
579
+ function ra(s, e) {
580
580
  this.fun = s, this.array = e;
581
581
  }
582
582
  function He() {
583
583
  }
584
- function ra(s) {
584
+ function na(s) {
585
585
  fo("_linkedBinding");
586
586
  }
587
- function na(s) {
587
+ function ia(s) {
588
588
  fo("dlopen");
589
589
  }
590
- function ia() {
590
+ function oa() {
591
591
  return [];
592
592
  }
593
- function oa() {
593
+ function sa() {
594
594
  return [];
595
595
  }
596
- function sa(s, e) {
596
+ function aa(s, e) {
597
597
  if (!s) throw new Error(e || "assertion error");
598
598
  }
599
- function aa() {
599
+ function la() {
600
600
  return !1;
601
601
  }
602
- function la() {
602
+ function ca() {
603
603
  return ht.now() / 1e3;
604
604
  }
605
605
  function br(s) {
@@ -609,11 +609,11 @@ function br(s) {
609
609
  function ct() {
610
610
  return po;
611
611
  }
612
- function ca(s) {
612
+ function ua(s) {
613
613
  return [];
614
614
  }
615
- var st, Mt, Ot, or, hn, dn, fn, pn, mn, gn, bn, yn, vn, wn, _n, kn, xn, Sn, En, An, In, Tn, Cn, On, Pn, Mn, tr, Rn, Ln, Nn, jn, Un, Bn, Dn, $n, Fn, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ht, Zr, yr, ii, oi, si, ai, li, ci, ui, hi, di, fi, pi, po, ac = Je(() => {
616
- le(), ue(), ce(), st = [], Mt = !1, or = -1, ta.prototype.run = function() {
615
+ var st, Mt, Ot, or, hn, dn, fn, pn, mn, gn, bn, yn, vn, wn, _n, kn, xn, Sn, En, An, In, Tn, Cn, On, Pn, Mn, tr, Rn, Ln, Nn, jn, Un, Bn, Dn, $n, Fn, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ht, Zr, yr, ii, oi, si, ai, li, ci, ui, hi, di, fi, pi, po, lc = Je(() => {
616
+ le(), ue(), ce(), st = [], Mt = !1, or = -1, ra.prototype.run = function() {
617
617
  this.fun.apply(null, this.array);
618
618
  }, hn = "browser", dn = "x64", fn = "browser", pn = { PATH: "/usr/bin", LANG: typeof navigator < "u" ? navigator.language + ".UTF-8" : void 0, PWD: "/", HOME: "/home", TMP: "/tmp" }, mn = ["/usr/bin/node"], gn = [], bn = "v16.8.0", yn = {}, vn = function(s, e) {
619
619
  console.warn((e ? e + ": " : "") + s);
@@ -629,11 +629,11 @@ var st, Mt, Ot, or, hn, dn, fn, pn, mn, gn, bn, yn, vn, wn, _n, kn, xn, Sn, En,
629
629
  }, Rn = tr, Ln = tr, Nn = He, jn = He, Un = He, Bn = {}, Dn = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, $n = He, Fn = He, qn = He, Hn = He, Wn = He, zn = He, Vn = He, Kn = void 0, Gn = void 0, Yn = void 0, Jn = He, Qn = 2, Xn = 1, Zn = "/bin/usr/node", ei = 9229, ti = "node", ri = [], ni = He, ht = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, ht.now === void 0 && (Zr = Date.now(), ht.timing && ht.timing.navigationStart && (Zr = ht.timing.navigationStart), ht.now = () => Date.now() - Zr), yr = 1e9, br.bigint = function(s) {
630
630
  var e = br(s);
631
631
  return typeof BigInt > "u" ? e[0] * yr + e[1] : BigInt(e[0] * yr) + BigInt(e[1]);
632
- }, ii = 10, oi = {}, si = 0, ai = ct, li = ct, ci = ct, ui = ct, hi = ct, di = He, fi = ct, pi = ct, po = { version: bn, versions: yn, arch: dn, platform: fn, browser: En, release: Sn, _rawDebug: An, moduleLoadList: In, binding: wn, _linkedBinding: ra, _events: oi, _eventsCount: si, _maxListeners: ii, on: ct, addListener: ai, once: li, off: ci, removeListener: ui, removeAllListeners: hi, emit: di, prependListener: fi, prependOnceListener: pi, listeners: ca, domain: Tn, _exiting: Cn, config: On, dlopen: na, uptime: la, _getActiveRequests: ia, _getActiveHandles: oa, reallyExit: Pn, _kill: Mn, cpuUsage: tr, resourceUsage: Rn, memoryUsage: Ln, kill: Nn, exit: jn, openStdin: Un, allowedNodeEnvironmentFlags: Bn, assert: sa, features: Dn, _fatalExceptions: $n, setUncaughtExceptionCaptureCallback: Fn, hasUncaughtExceptionCaptureCallback: aa, emitWarning: vn, nextTick: ea, _tickCallback: qn, _debugProcess: Hn, _debugEnd: Wn, _startProfilerIdleNotifier: zn, _stopProfilerIdleNotifier: Vn, stdout: Kn, stdin: Yn, stderr: Gn, abort: Jn, umask: _n, chdir: xn, cwd: kn, env: pn, title: hn, argv: mn, execArgv: gn, pid: Qn, ppid: Xn, execPath: Zn, debugPort: ei, hrtime: br, argv0: ti, _preload_modules: ri, setSourceMapsEnabled: ni };
632
+ }, ii = 10, oi = {}, si = 0, ai = ct, li = ct, ci = ct, ui = ct, hi = ct, di = He, fi = ct, pi = ct, po = { version: bn, versions: yn, arch: dn, platform: fn, browser: En, release: Sn, _rawDebug: An, moduleLoadList: In, binding: wn, _linkedBinding: na, _events: oi, _eventsCount: si, _maxListeners: ii, on: ct, addListener: ai, once: li, off: ci, removeListener: ui, removeAllListeners: hi, emit: di, prependListener: fi, prependOnceListener: pi, listeners: ua, domain: Tn, _exiting: Cn, config: On, dlopen: ia, uptime: ca, _getActiveRequests: oa, _getActiveHandles: sa, reallyExit: Pn, _kill: Mn, cpuUsage: tr, resourceUsage: Rn, memoryUsage: Ln, kill: Nn, exit: jn, openStdin: Un, allowedNodeEnvironmentFlags: Bn, assert: aa, features: Dn, _fatalExceptions: $n, setUncaughtExceptionCaptureCallback: Fn, hasUncaughtExceptionCaptureCallback: la, emitWarning: vn, nextTick: ta, _tickCallback: qn, _debugProcess: Hn, _debugEnd: Wn, _startProfilerIdleNotifier: zn, _stopProfilerIdleNotifier: Vn, stdout: Kn, stdin: Yn, stderr: Gn, abort: Jn, umask: _n, chdir: xn, cwd: kn, env: pn, title: hn, argv: mn, execArgv: gn, pid: Qn, ppid: Xn, execPath: Zn, debugPort: ei, hrtime: br, argv0: ti, _preload_modules: ri, setSourceMapsEnabled: ni };
633
633
  }), ce = Je(() => {
634
- ac();
634
+ lc();
635
635
  });
636
- function lc() {
636
+ function cc() {
637
637
  if (mi) return Dt;
638
638
  mi = !0, Dt.byteLength = a, Dt.toByteArray = c, Dt.fromByteArray = p;
639
639
  for (var s = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, n = r.length; o < n; ++o) s[o] = r[o], e[r.charCodeAt(o)] = o;
@@ -671,7 +671,7 @@ function lc() {
671
671
  }
672
672
  return Dt;
673
673
  }
674
- function cc() {
674
+ function uc() {
675
675
  return gi ? rr : (gi = !0, rr.read = function(s, e, t, r, o) {
676
676
  var n, i, a = o * 8 - r - 1, l = (1 << a) - 1, c = l >> 1, u = -7, h = t ? o - 1 : 0, p = t ? -1 : 1, b = s[e + h];
677
677
  for (h += p, n = b & (1 << -u) - 1, b >>= -u, u += a; u > 0; n = n * 256 + s[e + h], h += p, u -= 8) ;
@@ -689,10 +689,10 @@ function cc() {
689
689
  s[t + b - d] |= g * 128;
690
690
  }, rr);
691
691
  }
692
- function uc() {
692
+ function hc() {
693
693
  if (bi) return _t;
694
694
  bi = !0;
695
- let s = lc(), e = cc(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
695
+ let s = cc(), e = uc(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
696
696
  _t.Buffer = i, _t.SlowBuffer = w, _t.INSPECT_MAX_BYTES = 50;
697
697
  let r = 2147483647;
698
698
  _t.kMaxLength = r, i.TYPED_ARRAY_SUPPORT = o(), !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.");
@@ -1447,12 +1447,12 @@ function uc() {
1447
1447
  }
1448
1448
  return _t;
1449
1449
  }
1450
- var Dt, mi, rr, gi, _t, bi, hc = Je(() => {
1450
+ var Dt, mi, rr, gi, _t, bi, dc = Je(() => {
1451
1451
  le(), ue(), ce(), Dt = {}, mi = !1, rr = {}, gi = !1, _t = {}, bi = !1;
1452
1452
  }), $e = {};
1453
- zt($e, { Buffer: () => Hr, INSPECT_MAX_BYTES: () => ua, default: () => ut, kMaxLength: () => ha });
1454
- var ut, Hr, ua, ha, Fe = Je(() => {
1455
- le(), ue(), ce(), hc(), ut = uc(), ut.Buffer, ut.SlowBuffer, ut.INSPECT_MAX_BYTES, ut.kMaxLength, Hr = ut.Buffer, ua = ut.INSPECT_MAX_BYTES, ha = ut.kMaxLength;
1453
+ zt($e, { Buffer: () => Hr, INSPECT_MAX_BYTES: () => ha, default: () => ut, kMaxLength: () => da });
1454
+ var ut, Hr, ha, da, Fe = Je(() => {
1455
+ le(), ue(), ce(), dc(), ut = hc(), ut.Buffer, ut.SlowBuffer, ut.INSPECT_MAX_BYTES, ut.kMaxLength, Hr = ut.Buffer, ha = ut.INSPECT_MAX_BYTES, da = ut.kMaxLength;
1456
1456
  }), ue = Je(() => {
1457
1457
  Fe();
1458
1458
  }), Ue = pe((s, e) => {
@@ -1517,7 +1517,7 @@ var ut, Hr, ua, ha, Fe = Je(() => {
1517
1517
  }, 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, o, n) {
1518
1518
  return r.set(o, n);
1519
1519
  }, Boolean, Uint8Array };
1520
- }), da = pe((s, e) => {
1520
+ }), fa = pe((s, e) => {
1521
1521
  le(), ue(), ce(), e.exports = { format(t, ...r) {
1522
1522
  return t.replace(/%([sdifj])/g, function(...[o, n]) {
1523
1523
  let i = r.shift();
@@ -1543,7 +1543,7 @@ var ut, Hr, ua, ha, Fe = Je(() => {
1543
1543
  } };
1544
1544
  }), Ke = pe((s, e) => {
1545
1545
  le(), ue(), ce();
1546
- var { format: t, inspect: r } = da(), { AggregateError: o } = Ue(), n = globalThis.AggregateError || o, i = /* @__PURE__ */ Symbol("kIsNodeError"), a = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], l = /^([A-Z][a-z0-9]*)+$/, c = "__node_internal_", u = {};
1546
+ var { format: t, inspect: r } = fa(), { AggregateError: o } = Ue(), n = globalThis.AggregateError || o, i = /* @__PURE__ */ Symbol("kIsNodeError"), a = ["string", "function", "number", "object", "Function", "Object", "boolean", "bigint", "symbol"], l = /^([A-Z][a-z0-9]*)+$/, c = "__node_internal_", u = {};
1547
1547
  function h(m, _) {
1548
1548
  if (!m) throw new u.ERR_INTERNAL_ASSERTION(_);
1549
1549
  }
@@ -1698,8 +1698,8 @@ var ut, Hr, ua, ha, Fe = Je(() => {
1698
1698
  var { AbortController: t, AbortSignal: r } = typeof self < "u" ? self : typeof window < "u" ? window : void 0;
1699
1699
  e.exports = t, e.exports.AbortSignal = r, e.exports.default = t;
1700
1700
  }), St = {};
1701
- zt(St, { EventEmitter: () => fa, default: () => $t, defaultMaxListeners: () => pa, init: () => ma, listenerCount: () => ga, on: () => ba, once: () => ya });
1702
- function dc() {
1701
+ zt(St, { EventEmitter: () => pa, default: () => $t, defaultMaxListeners: () => ma, init: () => ga, listenerCount: () => ba, on: () => ya, once: () => va });
1702
+ function fc() {
1703
1703
  if (yi) return nr;
1704
1704
  yi = !0;
1705
1705
  var s = typeof Reflect == "object" ? Reflect : null, e = s && typeof s.apply == "function" ? s.apply : function(x, v, E) {
@@ -1870,8 +1870,8 @@ function dc() {
1870
1870
  }
1871
1871
  return nr;
1872
1872
  }
1873
- var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
1874
- le(), ue(), ce(), nr = {}, yi = !1, $t = dc(), $t.once, $t.once = function(s, e) {
1873
+ var nr, yi, $t, pa, ma, ga, ba, ya, va, Lt = Je(() => {
1874
+ le(), ue(), ce(), nr = {}, yi = !1, $t = fc(), $t.once, $t.once = function(s, e) {
1875
1875
  return new Promise((t, r) => {
1876
1876
  function o(...i) {
1877
1877
  n !== void 0 && s.removeListener("error", n), t(i);
@@ -1909,10 +1909,10 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
1909
1909
  let u = r.shift();
1910
1910
  u ? u.reject(c) : o = c, i.return();
1911
1911
  }
1912
- }, { EventEmitter: fa, defaultMaxListeners: pa, init: ma, listenerCount: ga, on: ba, once: ya } = $t;
1912
+ }, { EventEmitter: pa, defaultMaxListeners: ma, init: ga, listenerCount: ba, on: ya, once: va } = $t;
1913
1913
  }), Ye = pe((s, e) => {
1914
1914
  le(), ue(), ce();
1915
- var t = (Fe(), Me($e)), { format: r, inspect: o } = da(), { codes: { ERR_INVALID_ARG_TYPE: n } } = Ke(), { kResistStopPropagation: i, AggregateError: a, SymbolDispose: l } = Ue(), c = globalThis.AbortSignal || ar().AbortSignal, u = globalThis.AbortController || ar().AbortController, h = Object.getPrototypeOf(async function() {
1915
+ var t = (Fe(), Me($e)), { format: r, inspect: o } = fa(), { codes: { ERR_INVALID_ARG_TYPE: n } } = Ke(), { kResistStopPropagation: i, AggregateError: a, SymbolDispose: l } = Ue(), c = globalThis.AbortSignal || ar().AbortSignal, u = globalThis.AbortController || ar().AbortController, h = Object.getPrototypeOf(async function() {
1916
1916
  }).constructor, p = globalThis.Blob || t.Blob, b = typeof p < "u" ? function(y) {
1917
1917
  return y instanceof p;
1918
1918
  } : function(y) {
@@ -2507,7 +2507,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
2507
2507
  }
2508
2508
  return b;
2509
2509
  };
2510
- }), fc = pe((s, e) => {
2510
+ }), pc = pe((s, e) => {
2511
2511
  le(), ue(), ce();
2512
2512
  var { StringPrototypeSlice: t, SymbolIterator: r, TypedArrayPrototypeSet: o, Uint8Array: n } = Ue(), { Buffer: i } = (Fe(), Me($e)), { inspect: a } = Ye();
2513
2513
  e.exports = class {
@@ -2610,7 +2610,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
2610
2610
  return c(p.objectMode);
2611
2611
  }
2612
2612
  e.exports = { getHighWaterMark: h, getDefaultHighWaterMark: c, setDefaultHighWaterMark: u };
2613
- }), pc = pe((s, e) => {
2613
+ }), mc = pe((s, e) => {
2614
2614
  le(), ue(), ce();
2615
2615
  var t = (Fe(), Me($e)), r = t.Buffer;
2616
2616
  function o(i, a) {
@@ -2634,9 +2634,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
2634
2634
  if (typeof i != "number") throw new TypeError("Argument must be a number");
2635
2635
  return t.SlowBuffer(i);
2636
2636
  };
2637
- }), mc = pe((s) => {
2637
+ }), gc = pe((s) => {
2638
2638
  le(), ue(), ce();
2639
- var e = pc().Buffer, t = e.isEncoding || function(m) {
2639
+ var e = mc().Buffer, t = e.isEncoding || function(m) {
2640
2640
  switch (m = "" + m, m && m.toLowerCase()) {
2641
2641
  case "hex":
2642
2642
  case "utf8":
@@ -2780,7 +2780,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
2780
2780
  function w(m) {
2781
2781
  return m && m.length ? this.write(m) : "";
2782
2782
  }
2783
- }), va = pe((s, e) => {
2783
+ }), wa = pe((s, e) => {
2784
2784
  le(), ue(), ce();
2785
2785
  var t = Nt(), { PromisePrototypeThen: r, SymbolAsyncIterator: o, SymbolIterator: n } = Ue(), { Buffer: i } = (Fe(), Me($e)), { ERR_INVALID_ARG_TYPE: a, ERR_STREAM_NULL_VALUES: l } = Ke().codes;
2786
2786
  function c(u, h, p) {
@@ -2835,7 +2835,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
2835
2835
  e.exports = se, se.ReadableState = ve;
2836
2836
  var { EventEmitter: g } = (Lt(), Me(St)), { Stream: y, prependListener: w } = mo(), { Buffer: m } = (Fe(), Me($e)), { addAbortSignal: _ } = Vr(), x = Et(), v = Ye().debuglog("stream", (C) => {
2837
2837
  v = C;
2838
- }), E = fc(), S = Vt(), { getHighWaterMark: I, getDefaultHighWaterMark: O } = Kr(), { aggregateTwoErrors: P, codes: { ERR_INVALID_ARG_TYPE: j, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: q, ERR_STREAM_PUSH_AFTER_EOF: D, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: U }, AbortError: ae } = Ke(), { validateObject: Y } = lr(), V = d("kPaused"), { StringDecoder: re } = mc(), $ = va();
2838
+ }), E = pc(), S = Vt(), { getHighWaterMark: I, getDefaultHighWaterMark: O } = Kr(), { aggregateTwoErrors: P, codes: { ERR_INVALID_ARG_TYPE: j, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: q, ERR_STREAM_PUSH_AFTER_EOF: D, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: U }, AbortError: ae } = Ke(), { validateObject: Y } = lr(), V = d("kPaused"), { StringDecoder: re } = gc(), $ = wa();
2839
2839
  c(se.prototype, y.prototype), c(se, y);
2840
2840
  var Z = () => {
2841
2841
  }, { errorOrDestroy: M } = S, Q = 1, be = 2, te = 4, we = 8, K = 16, N = 32, ne = 64, W = 128, G = 256, J = 512, ge = 1024, oe = 2048, R = 4096, F = 8192, ee = 16384, de = 32768, fe = 65536, ye = 1 << 17, H = 1 << 18;
@@ -3415,9 +3415,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
3415
3415
  }, Y.toWeb = function(R) {
3416
3416
  return oe().newWritableStreamFromStreamWritable(R);
3417
3417
  };
3418
- }), gc = pe((s, e) => {
3418
+ }), bc = pe((s, e) => {
3419
3419
  le(), ue(), ce();
3420
- var t = Nt(), r = (Fe(), Me($e)), { isReadable: o, isWritable: n, isIterable: i, isNodeStream: a, isReadableNodeStream: l, isWritableNodeStream: c, isDuplexNodeStream: u, isReadableStream: h, isWritableStream: p } = mt(), b = Et(), { AbortError: d, codes: { ERR_INVALID_ARG_TYPE: g, ERR_INVALID_RETURN_VALUE: y } } = Ke(), { destroyer: w } = Vt(), m = ft(), _ = Gr(), x = go(), { createDeferredPromise: v } = Ye(), E = va(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function(D) {
3420
+ var t = Nt(), r = (Fe(), Me($e)), { isReadable: o, isWritable: n, isIterable: i, isNodeStream: a, isReadableNodeStream: l, isWritableNodeStream: c, isDuplexNodeStream: u, isReadableStream: h, isWritableStream: p } = mt(), b = Et(), { AbortError: d, codes: { ERR_INVALID_ARG_TYPE: g, ERR_INVALID_RETURN_VALUE: y } } = Ke(), { destroyer: w } = Vt(), m = ft(), _ = Gr(), x = go(), { createDeferredPromise: v } = Ye(), E = wa(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function(D) {
3421
3421
  return D instanceof S;
3422
3422
  } : function(D) {
3423
3423
  return !1;
@@ -3572,9 +3572,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
3572
3572
  };
3573
3573
  var h;
3574
3574
  l.from = function(p) {
3575
- return h || (h = gc()), h(p, "body");
3575
+ return h || (h = bc()), h(p, "body");
3576
3576
  };
3577
- }), wa = pe((s, e) => {
3577
+ }), _a = pe((s, e) => {
3578
3578
  le(), ue(), ce();
3579
3579
  var { ObjectSetPrototypeOf: t, Symbol: r } = Ue();
3580
3580
  e.exports = l;
@@ -3615,11 +3615,11 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
3615
3615
  this[a] = null, h();
3616
3616
  }
3617
3617
  };
3618
- }), _a = pe((s, e) => {
3618
+ }), ka = pe((s, e) => {
3619
3619
  le(), ue(), ce();
3620
3620
  var { ObjectSetPrototypeOf: t } = Ue();
3621
3621
  e.exports = o;
3622
- var r = wa();
3622
+ var r = _a();
3623
3623
  t(o.prototype, r.prototype), t(o, r);
3624
3624
  function o(n) {
3625
3625
  if (!(this instanceof o)) return new o(n);
@@ -3743,7 +3743,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
3743
3743
  if (!x(ye, !0)) throw new b("AsyncIterable", `transform[${ve - 1}]`, ye);
3744
3744
  } else {
3745
3745
  var me;
3746
- q || (q = _a());
3746
+ q || (q = ka());
3747
3747
  let B = new q({ objectMode: !0 }), X = (me = ye) === null || me === void 0 ? void 0 : me.then;
3748
3748
  if (typeof X == "function") ee++, X.call(ye, (z) => {
3749
3749
  R = z, z != null && B.write(z), k && B.end(), t.nextTick(de);
@@ -3796,7 +3796,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
3796
3796
  }), a(we, { readable: !1, writable: !0 }, K);
3797
3797
  }
3798
3798
  e.exports = { pipelineImpl: Q, pipeline: M };
3799
- }), ka = pe((s, e) => {
3799
+ }), xa = pe((s, e) => {
3800
3800
  le(), ue(), ce();
3801
3801
  var { pipeline: t } = bo(), r = ft(), { destroyer: o } = Vt(), { isNodeStream: n, isReadable: i, isWritable: a, isWebStream: l, isTransformStream: c, isWritableStream: u, isReadableStream: h } = mt(), { AbortError: p, codes: { ERR_INVALID_ARG_VALUE: b, ERR_MISSING_ARGS: d } } = Ke(), g = Et();
3802
3802
  e.exports = function(...y) {
@@ -3892,9 +3892,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
3892
3892
  !T && v !== null && (T = new p()), x = null, m = null, _ = null, v === null ? q(T) : (v = q, n(O) && o(O, T));
3893
3893
  }, E;
3894
3894
  };
3895
- }), bc = pe((s, e) => {
3895
+ }), yc = pe((s, e) => {
3896
3896
  le(), ue(), ce();
3897
- var t = globalThis.AbortController || ar().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: o, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: i }, AbortError: a } = Ke(), { validateAbortSignal: l, validateInteger: c, validateObject: u } = lr(), h = Ue().Symbol("kWeak"), p = Ue().Symbol("kResistStopPropagation"), { finished: b } = Et(), d = ka(), { addAbortSignalNoValidate: g } = Vr(), { isWritable: y, isNodeStream: w } = mt(), { deprecate: m } = Ye(), { ArrayPrototypePush: _, Boolean: x, MathFloor: v, Number: E, NumberIsNaN: S, Promise: I, PromiseReject: O, PromiseResolve: P, PromisePrototypeThen: j, Symbol: T } = Ue(), q = T("kEmpty"), D = T("kEof");
3897
+ var t = globalThis.AbortController || ar().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: o, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: i }, AbortError: a } = Ke(), { validateAbortSignal: l, validateInteger: c, validateObject: u } = lr(), h = Ue().Symbol("kWeak"), p = Ue().Symbol("kResistStopPropagation"), { finished: b } = Et(), d = xa(), { addAbortSignalNoValidate: g } = Vr(), { isWritable: y, isNodeStream: w } = mt(), { deprecate: m } = Ye(), { ArrayPrototypePush: _, Boolean: x, MathFloor: v, Number: E, NumberIsNaN: S, Promise: I, PromiseReject: O, PromiseResolve: P, PromisePrototypeThen: j, Symbol: T } = Ue(), q = T("kEmpty"), D = T("kEof");
3898
3898
  function U(W, G) {
3899
3899
  if (G != null && u(G, "options"), G?.signal != null && l(G.signal, "options.signal"), w(W) && !y(W)) throw new r("stream", W, "must be writable");
3900
3900
  let J = d(this, W);
@@ -4070,10 +4070,10 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4070
4070
  }).call(this);
4071
4071
  }
4072
4072
  e.exports.streamReturningOperators = { asIndexedPairs: m(Y, "readable.asIndexedPairs will be removed in a future version."), drop: N, filter: M, flatMap: we, map: ae, take: ne, compose: U }, e.exports.promiseReturningOperators = { every: re, forEach: Z, reduce: be, toArray: te, some: V, find: $ };
4073
- }), xa = pe((s, e) => {
4073
+ }), Sa = pe((s, e) => {
4074
4074
  le(), ue(), ce();
4075
4075
  var { ArrayPrototypePop: t, Promise: r } = Ue(), { isIterable: o, isNodeStream: n, isWebStream: i } = mt(), { pipelineImpl: a } = bo(), { finished: l } = Et();
4076
- Sa();
4076
+ Ea();
4077
4077
  function c(...u) {
4078
4078
  return new r((h, p) => {
4079
4079
  let b, d, g = u[u.length - 1];
@@ -4087,9 +4087,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4087
4087
  });
4088
4088
  }
4089
4089
  e.exports = { finished: l, pipeline: c };
4090
- }), Sa = pe((s, e) => {
4090
+ }), Ea = pe((s, e) => {
4091
4091
  le(), ue(), ce();
4092
- var { Buffer: t } = (Fe(), Me($e)), { ObjectDefineProperty: r, ObjectKeys: o, ReflectApply: n } = Ue(), { promisify: { custom: i } } = Ye(), { streamReturningOperators: a, promiseReturningOperators: l } = bc(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: c } } = Ke(), u = ka(), { setDefaultHighWaterMark: h, getDefaultHighWaterMark: p } = Kr(), { pipeline: b } = bo(), { destroyer: d } = Vt(), g = Et(), y = xa(), w = mt(), m = e.exports = mo().Stream;
4092
+ var { Buffer: t } = (Fe(), Me($e)), { ObjectDefineProperty: r, ObjectKeys: o, ReflectApply: n } = Ue(), { promisify: { custom: i } } = Ye(), { streamReturningOperators: a, promiseReturningOperators: l } = yc(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: c } } = Ke(), u = xa(), { setDefaultHighWaterMark: h, getDefaultHighWaterMark: p } = Kr(), { pipeline: b } = bo(), { destroyer: d } = Vt(), g = Et(), y = Sa(), w = mt(), m = e.exports = mo().Stream;
4093
4093
  m.isDestroyed = w.isDestroyed, m.isDisturbed = w.isDisturbed, m.isErrored = w.isErrored, m.isReadable = w.isReadable, m.isWritable = w.isWritable, m.Readable = Gr();
4094
4094
  for (let x of o(a)) {
4095
4095
  let v = function(...S) {
@@ -4105,7 +4105,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4105
4105
  }, E = l[x];
4106
4106
  r(v, "name", { __proto__: null, value: E.name }), r(v, "length", { __proto__: null, value: E.length }), r(m.Readable.prototype, x, { __proto__: null, value: v, enumerable: !1, configurable: !0, writable: !0 });
4107
4107
  }
4108
- m.Writable = go(), m.Duplex = ft(), m.Transform = wa(), m.PassThrough = _a(), m.pipeline = b;
4108
+ m.Writable = go(), m.Duplex = ft(), m.Transform = _a(), m.PassThrough = ka(), m.pipeline = b;
4109
4109
  var { addAbortSignal: _ } = Vr();
4110
4110
  m.addAbortSignal = _, m.finished = g, m.destroy = d, m.compose = u, m.setDefaultHighWaterMark = h, m.getDefaultHighWaterMark = p, r(m, "promises", { __proto__: null, configurable: !0, enumerable: !0, get() {
4111
4111
  return y;
@@ -4120,11 +4120,11 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4120
4120
  };
4121
4121
  }), jt = pe((s, e) => {
4122
4122
  le(), ue(), ce();
4123
- var t = Sa(), r = xa(), o = t.Readable.destroy;
4123
+ var t = Ea(), r = Sa(), o = t.Readable.destroy;
4124
4124
  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 = o, e.exports.pipeline = t.pipeline, e.exports.compose = t.compose, Object.defineProperty(t, "promises", { configurable: !0, enumerable: !0, get() {
4125
4125
  return r;
4126
4126
  } }), e.exports.Stream = t.Stream, e.exports.default = e.exports;
4127
- }), yc = pe((s, e) => {
4127
+ }), vc = pe((s, e) => {
4128
4128
  le(), ue(), ce(), typeof Object.create == "function" ? e.exports = function(t, r) {
4129
4129
  r && (t.super_ = r, t.prototype = Object.create(r.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } }));
4130
4130
  } : e.exports = function(t, r) {
@@ -4135,7 +4135,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4135
4135
  o.prototype = r.prototype, t.prototype = new o(), t.prototype.constructor = t;
4136
4136
  }
4137
4137
  };
4138
- }), vc = pe((s, e) => {
4138
+ }), wc = pe((s, e) => {
4139
4139
  le(), ue(), ce();
4140
4140
  var { Buffer: t } = (Fe(), Me($e)), r = /* @__PURE__ */ Symbol.for("BufferList");
4141
4141
  function o(n) {
@@ -4259,9 +4259,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4259
4259
  }, o.isBufferList = function(n) {
4260
4260
  return n != null && n[r];
4261
4261
  }, e.exports = o;
4262
- }), wc = pe((s, e) => {
4262
+ }), _c = pe((s, e) => {
4263
4263
  le(), ue(), ce();
4264
- var t = jt().Duplex, r = yc(), o = vc();
4264
+ var t = jt().Duplex, r = vc(), o = wc();
4265
4265
  function n(i) {
4266
4266
  if (!(this instanceof n)) return new n(i);
4267
4267
  if (typeof i == "function") {
@@ -4291,7 +4291,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4291
4291
  }, n.prototype._isBufferList = function(i) {
4292
4292
  return i instanceof n || i instanceof o || n.isBufferList(i);
4293
4293
  }, n.isBufferList = o.isBufferList, e.exports = n, e.exports.BufferListStream = n, e.exports.BufferList = o;
4294
- }), _c = pe((s, e) => {
4294
+ }), kc = pe((s, e) => {
4295
4295
  le(), ue(), ce();
4296
4296
  var t = class {
4297
4297
  constructor() {
@@ -4299,7 +4299,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4299
4299
  }
4300
4300
  };
4301
4301
  e.exports = t;
4302
- }), Ea = pe((s, e) => {
4302
+ }), Aa = pe((s, e) => {
4303
4303
  le(), ue(), ce();
4304
4304
  var t = e.exports, { Buffer: r } = (Fe(), Me($e));
4305
4305
  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 = {};
@@ -4325,7 +4325,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4325
4325
  })));
4326
4326
  }
4327
4327
  t.PUBLISH_HEADER = o("publish"), t.SUBSCRIBE_HEADER = o("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 = o("unsubscribe"), t.ACKS = { unsuback: o("unsuback"), puback: o("puback"), pubcomp: o("pubcomp"), pubrel: o("pubrel"), pubrec: o("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" };
4328
- }), kc = pe((s, e) => {
4328
+ }), xc = pe((s, e) => {
4329
4329
  le(), ue(), ce();
4330
4330
  var t = 1e3, r = t * 60, o = r * 60, n = o * 24, i = n * 7, a = n * 365.25;
4331
4331
  e.exports = function(p, b) {
@@ -4397,10 +4397,10 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4397
4397
  var y = b >= d * 1.5;
4398
4398
  return Math.round(p / d) + " " + g + (y ? "s" : "");
4399
4399
  }
4400
- }), xc = pe((s, e) => {
4400
+ }), Sc = pe((s, e) => {
4401
4401
  le(), ue(), ce();
4402
4402
  function t(r) {
4403
- n.debug = n, n.default = n, n.coerce = h, n.disable = c, n.enable = a, n.enabled = u, n.humanize = kc(), n.destroy = p, Object.keys(r).forEach((b) => {
4403
+ n.debug = n, n.default = n, n.coerce = h, n.disable = c, n.enable = a, n.enabled = u, n.humanize = xc(), n.destroy = p, Object.keys(r).forEach((b) => {
4404
4404
  n[b] = r[b];
4405
4405
  }), n.names = [], n.skips = [], n.formatters = {};
4406
4406
  function o(b) {
@@ -4510,7 +4510,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4510
4510
  } catch {
4511
4511
  }
4512
4512
  }
4513
- e.exports = xc()(s);
4513
+ e.exports = Sc()(s);
4514
4514
  var { formatters: a } = e.exports;
4515
4515
  a.j = function(l) {
4516
4516
  try {
@@ -4519,9 +4519,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4519
4519
  return "[UnexpectedJSONParseError]: " + c.message;
4520
4520
  }
4521
4521
  };
4522
- }), Sc = pe((s, e) => {
4522
+ }), Ec = pe((s, e) => {
4523
4523
  le(), ue(), ce();
4524
- var t = wc(), { EventEmitter: r } = (Lt(), Me(St)), o = _c(), n = Ea(), i = pt()("mqtt-packet:parser"), a = class vi extends r {
4524
+ var t = _c(), { EventEmitter: r } = (Lt(), Me(St)), o = kc(), n = Aa(), i = pt()("mqtt-packet:parser"), a = class vi extends r {
4525
4525
  constructor() {
4526
4526
  super(), this.parser = this.constructor.parser;
4527
4527
  }
@@ -4872,7 +4872,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4872
4872
  }
4873
4873
  };
4874
4874
  e.exports = a;
4875
- }), Ec = pe((s, e) => {
4875
+ }), Ac = pe((s, e) => {
4876
4876
  le(), ue(), ce();
4877
4877
  var { Buffer: t } = (Fe(), Me($e)), r = 65536, o = {}, n = t.isBuffer(t.from([1, 2]).subarray(0, 1));
4878
4878
  function i(u) {
@@ -4894,7 +4894,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4894
4894
  return h.writeUInt32BE(u, 0), h;
4895
4895
  }
4896
4896
  e.exports = { cache: o, generateCache: a, generateNumber: i, genBufVariableByteInt: l, generate4ByteBuffer: c };
4897
- }), Ac = pe((s, e) => {
4897
+ }), Ic = pe((s, e) => {
4898
4898
  le(), ue(), ce(), typeof Le > "u" || !Le.version || Le.version.indexOf("v0.") === 0 || Le.version.indexOf("v1.") === 0 && Le.version.indexOf("v1.8.") !== 0 ? e.exports = { nextTick: t } : e.exports = Le;
4899
4899
  function t(r, o, n, i) {
4900
4900
  if (typeof r != "function") throw new TypeError('"callback" argument must be a function');
@@ -4922,9 +4922,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
4922
4922
  });
4923
4923
  }
4924
4924
  }
4925
- }), Aa = pe((s, e) => {
4925
+ }), Ia = pe((s, e) => {
4926
4926
  le(), ue(), ce();
4927
- var t = Ea(), { Buffer: r } = (Fe(), Me($e)), o = r.allocUnsafe(0), n = r.from([0]), i = Ec(), a = Ac().nextTick, l = pt()("mqtt-packet:writeToStream"), c = i.cache, u = i.generateNumber, h = i.generateCache, p = i.genBufVariableByteInt, b = i.generate4ByteBuffer, d = Y, g = !0;
4927
+ var t = Aa(), { Buffer: r } = (Fe(), Me($e)), o = r.allocUnsafe(0), n = r.from([0]), i = Ac(), a = Ic().nextTick, l = pt()("mqtt-packet:writeToStream"), c = i.cache, u = i.generateNumber, h = i.generateCache, p = i.genBufVariableByteInt, b = i.generate4ByteBuffer, d = Y, g = !0;
4928
4928
  function y(K, N, ne) {
4929
4929
  switch (l("generate called"), N.cork && (N.cork(), a(w, N)), g && (g = !1, h()), l("generate: packet.cmd: %s", K.cmd), K.cmd) {
4930
4930
  case "connect":
@@ -5305,9 +5305,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5305
5305
  return typeof K == "string" || K instanceof r;
5306
5306
  }
5307
5307
  e.exports = y;
5308
- }), Ic = pe((s, e) => {
5308
+ }), Tc = pe((s, e) => {
5309
5309
  le(), ue(), ce();
5310
- var t = Aa(), { EventEmitter: r } = (Lt(), Me(St)), { Buffer: o } = (Fe(), Me($e));
5310
+ var t = Ia(), { EventEmitter: r } = (Lt(), Me(St)), { Buffer: o } = (Fe(), Me($e));
5311
5311
  function n(a, l) {
5312
5312
  let c = new i();
5313
5313
  return t(a, c, l), c.concat();
@@ -5331,9 +5331,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5331
5331
  }
5332
5332
  };
5333
5333
  e.exports = n;
5334
- }), Tc = pe((s) => {
5335
- le(), ue(), ce(), s.parser = Sc().parser, s.generate = Ic(), s.writeToStream = Aa();
5336
- }), Cc = pe((s, e) => {
5334
+ }), Cc = pe((s) => {
5335
+ le(), ue(), ce(), s.parser = Ec().parser, s.generate = Tc(), s.writeToStream = Ia();
5336
+ }), Oc = pe((s, e) => {
5337
5337
  le(), ue(), ce(), e.exports = r;
5338
5338
  function t(n) {
5339
5339
  return n instanceof Hr ? Hr.from(n) : new n.constructor(n.buffer.slice(), n.byteOffset, n.length);
@@ -5433,9 +5433,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5433
5433
  return i.pop(), a.pop(), d;
5434
5434
  }
5435
5435
  }
5436
- }), Oc = pe((s, e) => {
5437
- le(), ue(), ce(), e.exports = Cc()();
5438
- }), Ia = pe((s) => {
5436
+ }), Pc = pe((s, e) => {
5437
+ le(), ue(), ce(), e.exports = Oc()();
5438
+ }), Ta = pe((s) => {
5439
5439
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.validateTopic = e, s.validateTopics = t;
5440
5440
  function e(r) {
5441
5441
  let o = r.split("/");
@@ -5450,7 +5450,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5450
5450
  for (let o = 0; o < r.length; o++) if (!e(r[o])) return r[o];
5451
5451
  return null;
5452
5452
  }
5453
- }), Ta = pe((s) => {
5453
+ }), Ca = pe((s) => {
5454
5454
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
5455
5455
  var e = jt(), t = { objectMode: !0 }, r = { clean: !0 }, o = class {
5456
5456
  options;
@@ -5486,7 +5486,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5486
5486
  }
5487
5487
  };
5488
5488
  s.default = o;
5489
- }), Pc = pe((s) => {
5489
+ }), Mc = pe((s) => {
5490
5490
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
5491
5491
  var e = [0, 16, 128, 131, 135, 144, 145, 151, 153], t = (r, o, n) => {
5492
5492
  r.log("handlePublish: packet %o", o), n = typeof n < "u" ? n : r.noop;
@@ -5541,21 +5541,21 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5541
5541
  }
5542
5542
  };
5543
5543
  s.default = t;
5544
- }), Mc = pe((s, e) => {
5544
+ }), Rc = pe((s, e) => {
5545
5545
  e.exports = { version: "5.15.0" };
5546
5546
  }), Kt = pe((s) => {
5547
5547
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.MQTTJS_VERSION = s.nextTick = s.ErrorWithSubackPacket = s.ErrorWithReasonCode = void 0, s.applyMixin = r;
5548
- var e = class Ca extends Error {
5548
+ var e = class Oa extends Error {
5549
5549
  code;
5550
5550
  constructor(n, i) {
5551
- super(n), this.code = i, Object.setPrototypeOf(this, Ca.prototype), Object.getPrototypeOf(this).name = "ErrorWithReasonCode";
5551
+ super(n), this.code = i, Object.setPrototypeOf(this, Oa.prototype), Object.getPrototypeOf(this).name = "ErrorWithReasonCode";
5552
5552
  }
5553
5553
  };
5554
5554
  s.ErrorWithReasonCode = e;
5555
- var t = class Oa extends Error {
5555
+ var t = class Pa extends Error {
5556
5556
  packet;
5557
5557
  constructor(n, i) {
5558
- super(n), this.packet = i, Object.setPrototypeOf(this, Oa.prototype), Object.getPrototypeOf(this).name = "ErrorWithSubackPacket";
5558
+ super(n), this.packet = i, Object.setPrototypeOf(this, Pa.prototype), Object.getPrototypeOf(this).name = "ErrorWithSubackPacket";
5559
5559
  }
5560
5560
  };
5561
5561
  s.ErrorWithSubackPacket = t;
@@ -5570,7 +5570,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5570
5570
  }
5571
5571
  s.nextTick = typeof Le?.nextTick == "function" ? Le.nextTick : (o) => {
5572
5572
  setTimeout(o, 0);
5573
- }, s.MQTTJS_VERSION = Mc().version;
5573
+ }, s.MQTTJS_VERSION = Rc().version;
5574
5574
  }), Yr = pe((s) => {
5575
5575
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.ReasonCodes = void 0;
5576
5576
  var e = Kt();
@@ -5624,7 +5624,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5624
5624
  r.disconnecting && Object.keys(r.outgoing).length === 0 && r.emit("outgoingEmpty");
5625
5625
  };
5626
5626
  s.default = t;
5627
- }), Rc = pe((s) => {
5627
+ }), Lc = pe((s) => {
5628
5628
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
5629
5629
  var e = Kt(), t = Yr(), r = (o, n) => {
5630
5630
  let { options: i } = o, a = i.protocolVersion, l = a === 5 ? n.reasonCode : n.returnCode;
@@ -5646,7 +5646,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5646
5646
  });
5647
5647
  };
5648
5648
  s.default = r;
5649
- }), Lc = pe((s) => {
5649
+ }), Nc = pe((s) => {
5650
5650
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.LRUCache = void 0;
5651
5651
  var e = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, t = /* @__PURE__ */ new Set(), r = typeof Le == "object" && Le ? Le : {}, o = (b, d, g, y) => {
5652
5652
  typeof r.emitWarning == "function" ? r.emitWarning(b, d, g, y) : console.error(`[${g}] ${d}: ${b}`);
@@ -5702,7 +5702,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5702
5702
  pop() {
5703
5703
  return this.heap[--this.length];
5704
5704
  }
5705
- }, p = class Pa {
5705
+ }, p = class Ma {
5706
5706
  #l;
5707
5707
  #h;
5708
5708
  #m;
@@ -5795,7 +5795,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
5795
5795
  if (this.#l === 0 && this.ttl === 0 && this.#h === 0) throw new TypeError("At least one of max, maxSize, or ttl is required");
5796
5796
  if (!this.ttlAutopurge && !this.#l && !this.#h) {
5797
5797
  let Z = "LRU_CACHE_UNBOUNDED";
5798
- a(Z) && (t.add(Z), o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Z, Pa));
5798
+ a(Z) && (t.add(Z), o("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.", "UnboundedCacheWarning", Z, Ma));
5799
5799
  }
5800
5800
  }
5801
5801
  getRemainingTTL(d) {
@@ -6190,7 +6190,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6190
6190
  var r = class extends t {
6191
6191
  };
6192
6192
  s.Container = r;
6193
- }), Nc = pe((s) => {
6193
+ }), jc = pe((s) => {
6194
6194
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6195
6195
  var e = gt(), t = class extends e.Base {
6196
6196
  constructor(o = []) {
@@ -6214,7 +6214,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6214
6214
  }
6215
6215
  }, r = t;
6216
6216
  s.default = r;
6217
- }), jc = pe((s) => {
6217
+ }), Uc = pe((s) => {
6218
6218
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6219
6219
  var e = gt(), t = class extends e.Base {
6220
6220
  constructor(o = []) {
@@ -6246,7 +6246,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6246
6246
  }
6247
6247
  }, r = t;
6248
6248
  s.default = r;
6249
- }), Uc = pe((s) => {
6249
+ }), Bc = pe((s) => {
6250
6250
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6251
6251
  var e = gt(), t = class extends e.Base {
6252
6252
  constructor(o = [], n = function(a, l) {
@@ -6322,7 +6322,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6322
6322
  function e() {
6323
6323
  throw new RangeError("Iterator access denied!");
6324
6324
  }
6325
- }), Ma = pe((s) => {
6325
+ }), Ra = pe((s) => {
6326
6326
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.RandomIterator = void 0;
6327
6327
  var e = gt(), t = bt(), r = class extends e.ContainerIterator {
6328
6328
  constructor(o, n) {
@@ -6344,18 +6344,18 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6344
6344
  }
6345
6345
  };
6346
6346
  s.RandomIterator = r;
6347
- }), Bc = pe((s) => {
6347
+ }), Dc = pe((s) => {
6348
6348
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6349
- var e = r(yo()), t = Ma();
6349
+ var e = r(yo()), t = Ra();
6350
6350
  function r(a) {
6351
6351
  return a && a.t ? a : { default: a };
6352
6352
  }
6353
- var o = class Ra extends t.RandomIterator {
6353
+ var o = class La extends t.RandomIterator {
6354
6354
  constructor(l, c, u) {
6355
6355
  super(l, u), this.container = c;
6356
6356
  }
6357
6357
  copy() {
6358
- return new Ra(this.o, this.container, this.iteratorType);
6358
+ return new La(this.o, this.container, this.iteratorType);
6359
6359
  }
6360
6360
  }, n = class extends e.default {
6361
6361
  constructor(a = [], l = !0) {
@@ -6445,13 +6445,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6445
6445
  }
6446
6446
  }, i = n;
6447
6447
  s.default = i;
6448
- }), Dc = pe((s) => {
6448
+ }), $c = pe((s) => {
6449
6449
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6450
6450
  var e = o(yo()), t = gt(), r = bt();
6451
6451
  function o(l) {
6452
6452
  return l && l.t ? l : { default: l };
6453
6453
  }
6454
- var n = class La extends t.ContainerIterator {
6454
+ var n = class Na extends t.ContainerIterator {
6455
6455
  constructor(c, u, h, p) {
6456
6456
  super(p), this.o = c, this.h = u, this.container = h, this.iteratorType === 0 ? (this.pre = function() {
6457
6457
  return this.o.L === this.h && (0, r.throwIteratorAccessError)(), this.o = this.o.L, this;
@@ -6470,7 +6470,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6470
6470
  this.o === this.h && (0, r.throwIteratorAccessError)(), this.o.l = c;
6471
6471
  }
6472
6472
  copy() {
6473
- return new La(this.o, this.h, this.container, this.iteratorType);
6473
+ return new Na(this.o, this.h, this.container, this.iteratorType);
6474
6474
  }
6475
6475
  }, i = class extends e.default {
6476
6476
  constructor(l = []) {
@@ -6630,18 +6630,18 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6630
6630
  }
6631
6631
  }, a = i;
6632
6632
  s.default = a;
6633
- }), $c = pe((s) => {
6633
+ }), Fc = pe((s) => {
6634
6634
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6635
- var e = r(yo()), t = Ma();
6635
+ var e = r(yo()), t = Ra();
6636
6636
  function r(a) {
6637
6637
  return a && a.t ? a : { default: a };
6638
6638
  }
6639
- var o = class Na extends t.RandomIterator {
6639
+ var o = class ja extends t.RandomIterator {
6640
6640
  constructor(l, c, u) {
6641
6641
  super(l, u), this.container = c;
6642
6642
  }
6643
6643
  copy() {
6644
- return new Na(this.o, this.container, this.iteratorType);
6644
+ return new ja(this.o, this.container, this.iteratorType);
6645
6645
  }
6646
6646
  }, n = class extends e.default {
6647
6647
  constructor(a = [], l = 4096) {
@@ -6815,7 +6815,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6815
6815
  }
6816
6816
  }, i = n;
6817
6817
  s.default = i;
6818
- }), Fc = pe((s) => {
6818
+ }), qc = pe((s) => {
6819
6819
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.TreeNodeEnableIndex = s.TreeNode = void 0;
6820
6820
  var e = class {
6821
6821
  constructor(r, o) {
@@ -6870,9 +6870,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
6870
6870
  }
6871
6871
  };
6872
6872
  s.TreeNodeEnableIndex = t;
6873
- }), ja = pe((s) => {
6873
+ }), Ua = pe((s) => {
6874
6874
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6875
- var e = Fc(), t = gt(), r = bt(), o = class extends t.Container {
6875
+ var e = qc(), t = gt(), r = bt(), o = class extends t.Container {
6876
6876
  constructor(i = function(l, c) {
6877
6877
  return l < c ? -1 : l > c ? 1 : 0;
6878
6878
  }, a = !1) {
@@ -7124,7 +7124,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7124
7124
  }
7125
7125
  }, n = o;
7126
7126
  s.default = n;
7127
- }), Ua = pe((s) => {
7127
+ }), Ba = pe((s) => {
7128
7128
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7129
7129
  var e = gt(), t = bt(), r = class extends e.ContainerIterator {
7130
7130
  constructor(n, i, a) {
@@ -7150,13 +7150,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7150
7150
  }
7151
7151
  }, o = r;
7152
7152
  s.default = o;
7153
- }), qc = pe((s) => {
7153
+ }), Hc = pe((s) => {
7154
7154
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7155
- var e = o(ja()), t = o(Ua()), r = bt();
7155
+ var e = o(Ua()), t = o(Ba()), r = bt();
7156
7156
  function o(l) {
7157
7157
  return l && l.t ? l : { default: l };
7158
7158
  }
7159
- var n = class Ba extends t.default {
7159
+ var n = class Da extends t.default {
7160
7160
  constructor(c, u, h, p) {
7161
7161
  super(c, u, p), this.container = h;
7162
7162
  }
@@ -7164,7 +7164,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7164
7164
  return this.o === this.h && (0, r.throwIteratorAccessError)(), this.o.u;
7165
7165
  }
7166
7166
  copy() {
7167
- return new Ba(this.o, this.h, this.container, this.iteratorType);
7167
+ return new Da(this.o, this.h, this.container, this.iteratorType);
7168
7168
  }
7169
7169
  }, i = class extends e.default {
7170
7170
  constructor(l = [], c, u) {
@@ -7229,13 +7229,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7229
7229
  }
7230
7230
  }, a = i;
7231
7231
  s.default = a;
7232
- }), Hc = pe((s) => {
7232
+ }), Wc = pe((s) => {
7233
7233
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7234
- var e = o(ja()), t = o(Ua()), r = bt();
7234
+ var e = o(Ua()), t = o(Ba()), r = bt();
7235
7235
  function o(l) {
7236
7236
  return l && l.t ? l : { default: l };
7237
7237
  }
7238
- var n = class Da extends t.default {
7238
+ var n = class $a extends t.default {
7239
7239
  constructor(c, u, h, p) {
7240
7240
  super(c, u, p), this.container = h;
7241
7241
  }
@@ -7251,7 +7251,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7251
7251
  } });
7252
7252
  }
7253
7253
  copy() {
7254
- return new Da(this.o, this.h, this.container, this.iteratorType);
7254
+ return new $a(this.o, this.h, this.container, this.iteratorType);
7255
7255
  }
7256
7256
  }, i = class extends e.default {
7257
7257
  constructor(l = [], c, u) {
@@ -7323,15 +7323,15 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7323
7323
  }
7324
7324
  }, a = i;
7325
7325
  s.default = a;
7326
- }), $a = pe((s) => {
7326
+ }), Fa = pe((s) => {
7327
7327
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = e;
7328
7328
  function e(t) {
7329
7329
  let r = typeof t;
7330
7330
  return r === "object" && t !== null || r === "function";
7331
7331
  }
7332
- }), Fa = pe((s) => {
7332
+ }), qa = pe((s) => {
7333
7333
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.HashContainerIterator = s.HashContainer = void 0;
7334
- var e = gt(), t = o($a()), r = bt();
7334
+ var e = gt(), t = o(Fa()), r = bt();
7335
7335
  function o(a) {
7336
7336
  return a && a.t ? a : { default: a };
7337
7337
  }
@@ -7407,9 +7407,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7407
7407
  }
7408
7408
  };
7409
7409
  s.HashContainer = i;
7410
- }), Wc = pe((s) => {
7410
+ }), zc = pe((s) => {
7411
7411
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7412
- var e = Fa(), t = bt(), r = class qa extends e.HashContainerIterator {
7412
+ var e = qa(), t = bt(), r = class Ha extends e.HashContainerIterator {
7413
7413
  constructor(a, l, c, u) {
7414
7414
  super(a, l, u), this.container = c;
7415
7415
  }
@@ -7417,7 +7417,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7417
7417
  return this.o === this.h && (0, t.throwIteratorAccessError)(), this.o.u;
7418
7418
  }
7419
7419
  copy() {
7420
- return new qa(this.o, this.h, this.container, this.iteratorType);
7420
+ return new Ha(this.o, this.h, this.container, this.iteratorType);
7421
7421
  }
7422
7422
  }, o = class extends e.HashContainer {
7423
7423
  constructor(i = []) {
@@ -7470,13 +7470,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7470
7470
  }
7471
7471
  }, n = o;
7472
7472
  s.default = n;
7473
- }), zc = pe((s) => {
7473
+ }), Vc = pe((s) => {
7474
7474
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7475
- var e = Fa(), t = o($a()), r = bt();
7475
+ var e = qa(), t = o(Fa()), r = bt();
7476
7476
  function o(l) {
7477
7477
  return l && l.t ? l : { default: l };
7478
7478
  }
7479
- var n = class Ha extends e.HashContainerIterator {
7479
+ var n = class Wa extends e.HashContainerIterator {
7480
7480
  constructor(c, u, h, p) {
7481
7481
  super(c, u, p), this.container = h;
7482
7482
  }
@@ -7492,7 +7492,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7492
7492
  } });
7493
7493
  }
7494
7494
  copy() {
7495
- return new Ha(this.o, this.h, this.container, this.iteratorType);
7495
+ return new Wa(this.o, this.h, this.container, this.iteratorType);
7496
7496
  }
7497
7497
  }, i = class extends e.HashContainer {
7498
7498
  constructor(l = []) {
@@ -7553,7 +7553,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7553
7553
  }
7554
7554
  }, a = i;
7555
7555
  s.default = a;
7556
- }), Vc = pe((s) => {
7556
+ }), Kc = pe((s) => {
7557
7557
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), Object.defineProperty(s, "Deque", { enumerable: !0, get: function() {
7558
7558
  return i.default;
7559
7559
  } }), Object.defineProperty(s, "HashMap", { enumerable: !0, get: function() {
@@ -7575,13 +7575,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7575
7575
  } }), Object.defineProperty(s, "Vector", { enumerable: !0, get: function() {
7576
7576
  return o.default;
7577
7577
  } });
7578
- var e = h(Nc()), t = h(jc()), r = h(Uc()), o = h(Bc()), n = h(Dc()), i = h($c()), a = h(qc()), l = h(Hc()), c = h(Wc()), u = h(zc());
7578
+ var e = h(jc()), t = h(Uc()), r = h(Bc()), o = h(Dc()), n = h($c()), i = h(Fc()), a = h(Hc()), l = h(Wc()), c = h(zc()), u = h(Vc());
7579
7579
  function h(p) {
7580
7580
  return p && p.t ? p : { default: p };
7581
7581
  }
7582
- }), Kc = pe((s, e) => {
7582
+ }), Gc = pe((s, e) => {
7583
7583
  le(), ue(), ce();
7584
- var t = Vc().OrderedSet, r = pt()("number-allocator:trace"), o = pt()("number-allocator:error");
7584
+ var t = Kc().OrderedSet, r = pt()("number-allocator:trace"), o = pt()("number-allocator:error");
7585
7585
  function n(a, l) {
7586
7586
  this.low = a, this.high = l;
7587
7587
  }
@@ -7640,13 +7640,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7640
7640
  console.log("length:" + this.ss.size());
7641
7641
  for (let a of this.ss) console.log(a);
7642
7642
  }, e.exports = i;
7643
- }), Wa = pe((s, e) => {
7643
+ }), za = pe((s, e) => {
7644
7644
  le(), ue(), ce();
7645
- var t = Kc();
7645
+ var t = Gc();
7646
7646
  e.exports.NumberAllocator = t;
7647
- }), Gc = pe((s) => {
7647
+ }), Yc = pe((s) => {
7648
7648
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7649
- var e = Lc(), t = Wa(), r = class {
7649
+ var e = Nc(), t = za(), r = class {
7650
7650
  aliasToTopic;
7651
7651
  topicToAlias;
7652
7652
  max;
@@ -7675,13 +7675,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7675
7675
  }
7676
7676
  };
7677
7677
  s.default = r;
7678
- }), Yc = pe((s) => {
7678
+ }), Jc = pe((s) => {
7679
7679
  le(), ue(), ce();
7680
7680
  var e = s && s.__importDefault || function(i) {
7681
7681
  return i && i.__esModule ? i : { default: i };
7682
7682
  };
7683
7683
  Object.defineProperty(s, "__esModule", { value: !0 });
7684
- var t = Yr(), r = e(Gc()), o = Kt(), n = (i, a) => {
7684
+ var t = Yr(), r = e(Yc()), o = Kt(), n = (i, a) => {
7685
7685
  i.log("_handleConnack");
7686
7686
  let { options: l } = i, c = l.protocolVersion === 5 ? a.reasonCode : a.returnCode;
7687
7687
  if (clearTimeout(i.connackTimer), delete i.topicAliasSend, a.properties) {
@@ -7701,7 +7701,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7701
7701
  }
7702
7702
  };
7703
7703
  s.default = n;
7704
- }), Jc = pe((s) => {
7704
+ }), Qc = pe((s) => {
7705
7705
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7706
7706
  var e = (t, r, o) => {
7707
7707
  t.log("handling pubrel packet");
@@ -7714,13 +7714,13 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7714
7714
  });
7715
7715
  };
7716
7716
  s.default = e;
7717
- }), Qc = pe((s) => {
7717
+ }), Xc = pe((s) => {
7718
7718
  le(), ue(), ce();
7719
7719
  var e = s && s.__importDefault || function(l) {
7720
7720
  return l && l.__esModule ? l : { default: l };
7721
7721
  };
7722
7722
  Object.defineProperty(s, "__esModule", { value: !0 });
7723
- var t = e(Pc()), r = e(Rc()), o = e(Yc()), n = e(Yr()), i = e(Jc()), a = (l, c, u) => {
7723
+ var t = e(Mc()), r = e(Lc()), o = e(Jc()), n = e(Yr()), i = e(Qc()), a = (l, c, u) => {
7724
7724
  let { options: h } = l;
7725
7725
  if (h.protocolVersion === 5 && h.properties && h.properties.maximumPacketSize && h.properties.maximumPacketSize < c.length) return l.emit("error", new Error(`exceeding packets size ${c.cmd}`)), l.end({ reasonCode: 149, properties: { reasonString: "Maximum packet size was exceeded" } }), l;
7726
7726
  switch (l.log("_handlePacket :: emitting packetreceive"), l.emit("packetreceive", c), c.cmd) {
@@ -7755,7 +7755,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7755
7755
  }
7756
7756
  };
7757
7757
  s.default = a;
7758
- }), za = pe((s) => {
7758
+ }), Va = pe((s) => {
7759
7759
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7760
7760
  var e = class {
7761
7761
  nextId;
@@ -7778,7 +7778,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7778
7778
  }
7779
7779
  };
7780
7780
  s.default = e;
7781
- }), Xc = pe((s) => {
7781
+ }), Zc = pe((s) => {
7782
7782
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7783
7783
  var e = class {
7784
7784
  aliasToTopic;
@@ -7798,7 +7798,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7798
7798
  }
7799
7799
  };
7800
7800
  s.default = e;
7801
- }), Zc = pe((s) => {
7801
+ }), eu = pe((s) => {
7802
7802
  le(), ue(), ce();
7803
7803
  var e = s && s.__importDefault || function(n) {
7804
7804
  return n && n.__esModule ? n : { default: n };
@@ -7818,7 +7818,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7818
7818
  }, e.exports.__esModule = !0, e.exports.default = e.exports, t(r);
7819
7819
  }
7820
7820
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7821
- }), eu = pe((s, e) => {
7821
+ }), tu = pe((s, e) => {
7822
7822
  le(), ue(), ce();
7823
7823
  var t = Jr().default;
7824
7824
  function r(o, n) {
@@ -7832,28 +7832,28 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7832
7832
  return (n === "string" ? String : Number)(o);
7833
7833
  }
7834
7834
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7835
- }), tu = pe((s, e) => {
7835
+ }), ru = pe((s, e) => {
7836
7836
  le(), ue(), ce();
7837
- var t = Jr().default, r = eu();
7837
+ var t = Jr().default, r = tu();
7838
7838
  function o(n) {
7839
7839
  var i = r(n, "string");
7840
7840
  return t(i) == "symbol" ? i : i + "";
7841
7841
  }
7842
7842
  e.exports = o, e.exports.__esModule = !0, e.exports.default = e.exports;
7843
- }), ru = pe((s, e) => {
7843
+ }), nu = pe((s, e) => {
7844
7844
  le(), ue(), ce();
7845
- var t = tu();
7845
+ var t = ru();
7846
7846
  function r(o, n, i) {
7847
7847
  return (n = t(n)) in o ? Object.defineProperty(o, n, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : o[n] = i, o;
7848
7848
  }
7849
7849
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7850
- }), nu = pe((s, e) => {
7850
+ }), iu = pe((s, e) => {
7851
7851
  le(), ue(), ce();
7852
7852
  function t(r) {
7853
7853
  if (Array.isArray(r)) return r;
7854
7854
  }
7855
7855
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7856
- }), iu = pe((s, e) => {
7856
+ }), ou = pe((s, e) => {
7857
7857
  le(), ue(), ce();
7858
7858
  function t(r, o) {
7859
7859
  var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
@@ -7877,7 +7877,7 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7877
7877
  }
7878
7878
  }
7879
7879
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7880
- }), ou = pe((s, e) => {
7880
+ }), su = pe((s, e) => {
7881
7881
  le(), ue(), ce();
7882
7882
  function t(r, o) {
7883
7883
  (o == null || o > r.length) && (o = r.length);
@@ -7885,9 +7885,9 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7885
7885
  return i;
7886
7886
  }
7887
7887
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7888
- }), su = pe((s, e) => {
7888
+ }), au = pe((s, e) => {
7889
7889
  le(), ue(), ce();
7890
- var t = ou();
7890
+ var t = su();
7891
7891
  function r(o, n) {
7892
7892
  if (o) {
7893
7893
  if (typeof o == "string") return t(o, n);
@@ -7896,21 +7896,21 @@ var nr, yi, $t, fa, pa, ma, ga, ba, ya, Lt = Je(() => {
7896
7896
  }
7897
7897
  }
7898
7898
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7899
- }), au = pe((s, e) => {
7899
+ }), lu = pe((s, e) => {
7900
7900
  le(), ue(), ce();
7901
7901
  function t() {
7902
7902
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7903
7903
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
7904
7904
  }
7905
7905
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7906
- }), lu = pe((s, e) => {
7906
+ }), cu = pe((s, e) => {
7907
7907
  le(), ue(), ce();
7908
- var t = nu(), r = iu(), o = su(), n = au();
7908
+ var t = iu(), r = ou(), o = au(), n = lu();
7909
7909
  function i(a, l) {
7910
7910
  return t(a) || r(a, l) || o(a, l) || n();
7911
7911
  }
7912
7912
  e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
7913
- }), Va = pe((s, e) => {
7913
+ }), Ka = pe((s, e) => {
7914
7914
  le(), ue(), ce(), (function(t, r) {
7915
7915
  typeof s == "object" && typeof e < "u" ? r(s) : typeof define == "function" && define.amd ? define(["exports"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.fastUniqueNumbers = {}));
7916
7916
  })(s, function(t) {
@@ -7938,7 +7938,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7938
7938
  }, c = /* @__PURE__ */ new WeakMap(), u = o(c), h = l(u, c), p = r(h);
7939
7939
  t.addUniqueNumber = p, t.generateUniqueNumber = h;
7940
7940
  });
7941
- }), cu = pe((s, e) => {
7941
+ }), uu = pe((s, e) => {
7942
7942
  le(), ue(), ce();
7943
7943
  function t(o, n, i, a, l, c, u) {
7944
7944
  try {
@@ -7964,13 +7964,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7964
7964
  };
7965
7965
  }
7966
7966
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7967
- }), Ka = pe((s, e) => {
7967
+ }), Ga = pe((s, e) => {
7968
7968
  le(), ue(), ce();
7969
7969
  function t(r, o) {
7970
7970
  this.v = r, this.k = o;
7971
7971
  }
7972
7972
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7973
- }), Ga = pe((s, e) => {
7973
+ }), Ya = pe((s, e) => {
7974
7974
  le(), ue(), ce();
7975
7975
  function t(r, o, n, i) {
7976
7976
  var a = Object.defineProperty;
@@ -7989,9 +7989,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
7989
7989
  }, e.exports.__esModule = !0, e.exports.default = e.exports, t(r, o, n, i);
7990
7990
  }
7991
7991
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7992
- }), Ya = pe((s, e) => {
7992
+ }), Ja = pe((s, e) => {
7993
7993
  le(), ue(), ce();
7994
- var t = Ga();
7994
+ var t = Ya();
7995
7995
  function r() {
7996
7996
  var o, n, i = typeof Symbol == "function" ? Symbol : {}, a = i.iterator || "@@iterator", l = i.toStringTag || "@@toStringTag";
7997
7997
  function c(w, m, _, x) {
@@ -8054,9 +8054,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8054
8054
  }, e.exports.__esModule = !0, e.exports.default = e.exports)();
8055
8055
  }
8056
8056
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8057
- }), Ja = pe((s, e) => {
8057
+ }), Qa = pe((s, e) => {
8058
8058
  le(), ue(), ce();
8059
- var t = Ka(), r = Ga();
8059
+ var t = Ga(), r = Ya();
8060
8060
  function o(n, i) {
8061
8061
  function a(c, u, h, p) {
8062
8062
  try {
@@ -8087,16 +8087,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8087
8087
  }, !0);
8088
8088
  }
8089
8089
  e.exports = o, e.exports.__esModule = !0, e.exports.default = e.exports;
8090
- }), Qa = pe((s, e) => {
8090
+ }), Xa = pe((s, e) => {
8091
8091
  le(), ue(), ce();
8092
- var t = Ya(), r = Ja();
8092
+ var t = Ja(), r = Qa();
8093
8093
  function o(n, i, a, l, c) {
8094
8094
  return new r(t().w(n, i, a, l), c || Promise);
8095
8095
  }
8096
8096
  e.exports = o, e.exports.__esModule = !0, e.exports.default = e.exports;
8097
- }), uu = pe((s, e) => {
8097
+ }), hu = pe((s, e) => {
8098
8098
  le(), ue(), ce();
8099
- var t = Qa();
8099
+ var t = Xa();
8100
8100
  function r(o, n, i, a, l) {
8101
8101
  var c = t(o, n, i, a, l);
8102
8102
  return c.next().then(function(u) {
@@ -8104,7 +8104,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8104
8104
  });
8105
8105
  }
8106
8106
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8107
- }), hu = pe((s, e) => {
8107
+ }), du = pe((s, e) => {
8108
8108
  le(), ue(), ce();
8109
8109
  function t(r) {
8110
8110
  var o = Object(r), n = [];
@@ -8115,7 +8115,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8115
8115
  };
8116
8116
  }
8117
8117
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
8118
- }), du = pe((s, e) => {
8118
+ }), fu = pe((s, e) => {
8119
8119
  le(), ue(), ce();
8120
8120
  var t = Jr().default;
8121
8121
  function r(o) {
@@ -8130,9 +8130,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8130
8130
  throw new TypeError(t(o) + " is not iterable");
8131
8131
  }
8132
8132
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8133
- }), fu = pe((s, e) => {
8133
+ }), pu = pe((s, e) => {
8134
8134
  le(), ue(), ce();
8135
- var t = Ka(), r = Ya(), o = uu(), n = Qa(), i = Ja(), a = hu(), l = du();
8135
+ var t = Ga(), r = Ja(), o = hu(), n = Xa(), i = Qa(), a = du(), l = fu();
8136
8136
  function c() {
8137
8137
  var u = r(), h = u.m(c), p = (Object.getPrototypeOf ? Object.getPrototypeOf(h) : h.__proto__).constructor;
8138
8138
  function b(y) {
@@ -8179,18 +8179,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8179
8179
  }, e.exports.__esModule = !0, e.exports.default = e.exports)();
8180
8180
  }
8181
8181
  e.exports = c, e.exports.__esModule = !0, e.exports.default = e.exports;
8182
- }), pu = pe((s, e) => {
8182
+ }), mu = pe((s, e) => {
8183
8183
  le(), ue(), ce();
8184
- var t = fu()();
8184
+ var t = pu()();
8185
8185
  e.exports = t;
8186
8186
  try {
8187
8187
  regeneratorRuntime = t;
8188
8188
  } catch {
8189
8189
  typeof globalThis == "object" ? globalThis.regeneratorRuntime = t : Function("r", "regeneratorRuntime = r")(t);
8190
8190
  }
8191
- }), mu = pe((s, e) => {
8191
+ }), gu = pe((s, e) => {
8192
8192
  le(), ue(), ce(), (function(t, r) {
8193
- typeof s == "object" && typeof e < "u" ? r(s, ru(), lu(), Va(), cu(), pu()) : 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));
8193
+ typeof s == "object" && typeof e < "u" ? r(s, nu(), cu(), Ka(), uu(), mu()) : 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));
8194
8194
  })(s, function(t, r, o, n, i, a) {
8195
8195
  var l = function(m) {
8196
8196
  return typeof m.start == "function";
@@ -8319,9 +8319,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8319
8319
  };
8320
8320
  t.createBroker = w;
8321
8321
  });
8322
- }), gu = pe((s, e) => {
8322
+ }), bu = pe((s, e) => {
8323
8323
  le(), ue(), ce(), (function(t, r) {
8324
- typeof s == "object" && typeof e < "u" ? r(s, Jr(), mu(), 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));
8324
+ typeof s == "object" && typeof e < "u" ? r(s, Jr(), gu(), 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));
8325
8325
  })(s, function(t, r, o, n) {
8326
8326
  var i = /* @__PURE__ */ new Map([[0, null]]), a = /* @__PURE__ */ new Map([[0, null]]), l = o.createBroker({ clearInterval: function(u) {
8327
8327
  var h = u.call;
@@ -8369,9 +8369,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8369
8369
  };
8370
8370
  t.load = c, t.wrap = l;
8371
8371
  });
8372
- }), bu = pe((s, e) => {
8372
+ }), yu = pe((s, e) => {
8373
8373
  le(), ue(), ce(), (function(t, r) {
8374
- typeof s == "object" && typeof e < "u" ? r(s, gu()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
8374
+ typeof s == "object" && typeof e < "u" ? r(s, bu()) : typeof define == "function" && define.amd ? define(["exports", "worker-timers-broker"], r) : (t = typeof globalThis < "u" ? globalThis : t || self, r(t.workerTimers = {}, t.workerTimersBroker));
8375
8375
  })(s, function(t, r) {
8376
8376
  var o = function(h, p) {
8377
8377
  var b = null;
@@ -8399,7 +8399,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8399
8399
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.isReactNativeBrowser = s.isWebWorker = void 0;
8400
8400
  var e = () => typeof window < "u" ? typeof navigator < "u" && navigator.userAgent?.toLowerCase().indexOf(" electron/") > -1 && Le?.versions ? !Object.prototype.hasOwnProperty.call(Le.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", o = e() || t() || r();
8401
8401
  s.isWebWorker = t(), s.isReactNativeBrowser = r(), s.default = o;
8402
- }), yu = pe((s) => {
8402
+ }), vu = pe((s) => {
8403
8403
  le(), ue(), ce();
8404
8404
  var e = s && s.__createBinding || (Object.create ? function(c, u, h, p) {
8405
8405
  p === void 0 && (p = h);
@@ -8429,7 +8429,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8429
8429
  };
8430
8430
  })();
8431
8431
  Object.defineProperty(s, "__esModule", { value: !0 });
8432
- var o = bu(), n = r(Qr()), i = { set: o.setInterval, clear: o.clearInterval }, a = { set: (c, u) => setInterval(c, u), clear: (c) => clearInterval(c) }, l = (c) => {
8432
+ var o = yu(), n = r(Qr()), i = { set: o.setInterval, clear: o.clearInterval }, a = { set: (c, u) => setInterval(c, u), clear: (c) => clearInterval(c) }, l = (c) => {
8433
8433
  switch (c) {
8434
8434
  case "native":
8435
8435
  return a;
@@ -8440,13 +8440,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8440
8440
  }
8441
8441
  };
8442
8442
  s.default = l;
8443
- }), Xa = pe((s) => {
8443
+ }), Za = pe((s) => {
8444
8444
  le(), ue(), ce();
8445
8445
  var e = s && s.__importDefault || function(o) {
8446
8446
  return o && o.__esModule ? o : { default: o };
8447
8447
  };
8448
8448
  Object.defineProperty(s, "__esModule", { value: !0 });
8449
- var t = e(yu()), r = class {
8449
+ var t = e(vu()), r = class {
8450
8450
  _keepalive;
8451
8451
  timerId;
8452
8452
  timer;
@@ -8519,7 +8519,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8519
8519
  return v && v.__esModule ? v : { default: v };
8520
8520
  };
8521
8521
  Object.defineProperty(s, "__esModule", { value: !0 });
8522
- var n = o(Tc()), i = jt(), a = o(Oc()), l = o(pt()), c = r(Ia()), u = o(Ta()), h = o(Qc()), p = o(za()), b = o(Xc()), d = Kt(), g = Zc(), y = o(Xa()), w = r(Qr()), m = globalThis.setImmediate || ((...v) => {
8522
+ var n = o(Cc()), i = jt(), a = o(Pc()), l = o(pt()), c = r(Ta()), u = o(Ca()), h = o(Xc()), p = o(Va()), b = o(Zc()), d = Kt(), g = eu(), y = o(Za()), w = r(Qr()), m = globalThis.setImmediate || ((...v) => {
8523
8523
  let E = v.shift();
8524
8524
  (0, d.nextTick)(() => {
8525
8525
  E(...v);
@@ -9021,9 +9021,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
9021
9021
  }
9022
9022
  };
9023
9023
  s.default = x;
9024
- }), vu = pe((s) => {
9024
+ }), wu = pe((s) => {
9025
9025
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
9026
- var e = Wa(), t = class {
9026
+ var e = za(), t = class {
9027
9027
  numberAllocator;
9028
9028
  lastId;
9029
9029
  constructor() {
@@ -9047,7 +9047,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
9047
9047
  };
9048
9048
  s.default = t;
9049
9049
  });
9050
- function wu() {
9050
+ function _u() {
9051
9051
  if (ki) return vr;
9052
9052
  ki = !0;
9053
9053
  let s = 2147483647, e = 36, t = 1, r = 26, o = 38, n = 700, i = 72, a = 128, l = "-", c = /^xn--/, u = /[^\0-\x7F]/, h = /[\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" }, b = e - t, d = Math.floor, g = String.fromCharCode;
@@ -9138,10 +9138,10 @@ function wu() {
9138
9138
  });
9139
9139
  } }, vr;
9140
9140
  }
9141
- var vr, ki, kt, _u = Je(() => {
9142
- le(), ue(), ce(), vr = {}, ki = !1, kt = wu(), kt.decode, kt.encode, kt.toASCII, kt.toUnicode, kt.ucs2, kt.version;
9141
+ var vr, ki, kt, ku = Je(() => {
9142
+ le(), ue(), ce(), vr = {}, ki = !1, kt = _u(), kt.decode, kt.encode, kt.toASCII, kt.toUnicode, kt.ucs2, kt.version;
9143
9143
  });
9144
- function ku() {
9144
+ function xu() {
9145
9145
  return Si || (Si = !0, xi = function() {
9146
9146
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
9147
9147
  if (typeof Symbol.iterator == "symbol") return !0;
@@ -9160,36 +9160,36 @@ function ku() {
9160
9160
  return !0;
9161
9161
  }), xi;
9162
9162
  }
9163
- function xu() {
9163
+ function Su() {
9164
9164
  return Ai || (Ai = !0, Ei = Error), Ei;
9165
9165
  }
9166
- function Su() {
9166
+ function Eu() {
9167
9167
  return Ti || (Ti = !0, Ii = EvalError), Ii;
9168
9168
  }
9169
- function Eu() {
9169
+ function Au() {
9170
9170
  return Oi || (Oi = !0, Ci = RangeError), Ci;
9171
9171
  }
9172
- function Au() {
9172
+ function Iu() {
9173
9173
  return Mi || (Mi = !0, Pi = ReferenceError), Pi;
9174
9174
  }
9175
- function Za() {
9175
+ function el() {
9176
9176
  return Li || (Li = !0, Ri = SyntaxError), Ri;
9177
9177
  }
9178
9178
  function cr() {
9179
9179
  return ji || (ji = !0, Ni = TypeError), Ni;
9180
9180
  }
9181
- function Iu() {
9181
+ function Tu() {
9182
9182
  return Bi || (Bi = !0, Ui = URIError), Ui;
9183
9183
  }
9184
- function Tu() {
9184
+ function Cu() {
9185
9185
  if (Di) return wr;
9186
9186
  Di = !0;
9187
- var s = typeof Symbol < "u" && Symbol, e = ku();
9187
+ var s = typeof Symbol < "u" && Symbol, e = xu();
9188
9188
  return wr = function() {
9189
9189
  return typeof s != "function" || typeof Symbol != "function" || typeof s("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : e();
9190
9190
  }, wr;
9191
9191
  }
9192
- function Cu() {
9192
+ function Ou() {
9193
9193
  if ($i) return _r;
9194
9194
  $i = !0;
9195
9195
  var s = { __proto__: null, foo: {} }, e = Object;
@@ -9197,7 +9197,7 @@ function Cu() {
9197
9197
  return { __proto__: s }.foo === s.foo && !(s instanceof e);
9198
9198
  }, _r;
9199
9199
  }
9200
- function Ou() {
9200
+ function Pu() {
9201
9201
  if (Fi) return kr;
9202
9202
  Fi = !0;
9203
9203
  var s = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, r = "[object Function]", o = function(a, l) {
@@ -9232,10 +9232,10 @@ function Ou() {
9232
9232
  function vo() {
9233
9233
  if (qi) return xr;
9234
9234
  qi = !0;
9235
- var s = Ou();
9235
+ var s = Pu();
9236
9236
  return xr = Function.prototype.bind || s, xr;
9237
9237
  }
9238
- function Pu() {
9238
+ function Mu() {
9239
9239
  if (Hi) return Sr;
9240
9240
  Hi = !0;
9241
9241
  var s = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = vo();
@@ -9244,7 +9244,7 @@ function Pu() {
9244
9244
  function Gt() {
9245
9245
  if (Wi) return Er;
9246
9246
  Wi = !0;
9247
- var s, e = xu(), t = Su(), r = Eu(), o = Au(), n = Za(), i = cr(), a = Iu(), l = Function, c = function(Y) {
9247
+ var s, e = Su(), t = Eu(), r = Au(), o = Iu(), n = el(), i = cr(), a = Tu(), l = Function, c = function(Y) {
9248
9248
  try {
9249
9249
  return l('"use strict"; return (' + Y + ").constructor;")();
9250
9250
  } catch {
@@ -9267,7 +9267,7 @@ function Gt() {
9267
9267
  return h;
9268
9268
  }
9269
9269
  }
9270
- })() : h, b = Tu()(), d = Cu()(), g = Object.getPrototypeOf || (d ? function(Y) {
9270
+ })() : h, b = Cu()(), d = Ou()(), g = Object.getPrototypeOf || (d ? function(Y) {
9271
9271
  return Y.__proto__;
9272
9272
  } : null), y = {}, w = typeof Uint8Array > "u" || !g ? s : g(Uint8Array), m = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? s : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? s : ArrayBuffer, "%ArrayIteratorPrototype%": b && g ? g([][Symbol.iterator]()) : s, "%AsyncFromSyncIteratorPrototype%": s, "%AsyncFunction%": y, "%AsyncGenerator%": y, "%AsyncGeneratorFunction%": y, "%AsyncIteratorPrototype%": y, "%Atomics%": typeof Atomics > "u" ? s : Atomics, "%BigInt%": typeof BigInt > "u" ? s : BigInt, "%BigInt64Array%": typeof BigInt64Array > "u" ? s : BigInt64Array, "%BigUint64Array%": typeof BigUint64Array > "u" ? s : BigUint64Array, "%Boolean%": Boolean, "%DataView%": typeof DataView > "u" ? s : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": e, "%eval%": eval, "%EvalError%": t, "%Float32Array%": typeof Float32Array > "u" ? s : Float32Array, "%Float64Array%": typeof Float64Array > "u" ? s : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? s : FinalizationRegistry, "%Function%": l, "%GeneratorFunction%": y, "%Int8Array%": typeof Int8Array > "u" ? s : Int8Array, "%Int16Array%": typeof Int16Array > "u" ? s : Int16Array, "%Int32Array%": typeof Int32Array > "u" ? s : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": b && g ? g(g([][Symbol.iterator]())) : s, "%JSON%": typeof JSON == "object" ? JSON : s, "%Map%": typeof Map > "u" ? s : Map, "%MapIteratorPrototype%": typeof Map > "u" || !b || !g ? s : g((/* @__PURE__ */ new Map())[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise > "u" ? s : Promise, "%Proxy%": typeof Proxy > "u" ? s : Proxy, "%RangeError%": r, "%ReferenceError%": o, "%Reflect%": typeof Reflect > "u" ? s : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? s : Set, "%SetIteratorPrototype%": typeof Set > "u" || !b || !g ? s : g((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? s : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": b && g ? g(""[Symbol.iterator]()) : s, "%Symbol%": b ? Symbol : s, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": w, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array > "u" ? s : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? s : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array > "u" ? s : Uint16Array, "%Uint32Array%": typeof Uint32Array > "u" ? s : Uint32Array, "%URIError%": a, "%WeakMap%": typeof WeakMap > "u" ? s : WeakMap, "%WeakRef%": typeof WeakRef > "u" ? s : WeakRef, "%WeakSet%": typeof WeakSet > "u" ? s : WeakSet };
9273
9273
  if (g) try {
@@ -9289,7 +9289,7 @@ function Gt() {
9289
9289
  Z && g && (re = g(Z.prototype));
9290
9290
  }
9291
9291
  return m[V] = re, re;
9292
- }, 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"] }, E = vo(), S = Pu(), I = E.call(Function.call, Array.prototype.concat), O = E.call(Function.apply, Array.prototype.splice), P = E.call(Function.call, String.prototype.replace), j = E.call(Function.call, String.prototype.slice), T = E.call(Function.call, RegExp.prototype.exec), q = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, D = /\\(\\)?/g, U = function(Y) {
9292
+ }, 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"] }, E = vo(), S = Mu(), I = E.call(Function.call, Array.prototype.concat), O = E.call(Function.apply, Array.prototype.splice), P = E.call(Function.call, String.prototype.replace), j = E.call(Function.call, String.prototype.slice), T = E.call(Function.call, RegExp.prototype.exec), q = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, D = /\\(\\)?/g, U = function(Y) {
9293
9293
  var V = j(Y, 0, 1), re = j(Y, -1);
9294
9294
  if (V === "%" && re !== "%") throw new n("invalid intrinsic syntax, expected closing `%`");
9295
9295
  if (re === "%" && V !== "%") throw new n("invalid intrinsic syntax, expected opening `%`");
@@ -9342,7 +9342,7 @@ function wo() {
9342
9342
  }
9343
9343
  return Ar = e, Ar;
9344
9344
  }
9345
- function el() {
9345
+ function tl() {
9346
9346
  if (Vi) return Ir;
9347
9347
  Vi = !0;
9348
9348
  var s = Gt(), e = s("%Object.getOwnPropertyDescriptor%", !0);
@@ -9353,10 +9353,10 @@ function el() {
9353
9353
  }
9354
9354
  return Ir = e, Ir;
9355
9355
  }
9356
- function Mu() {
9356
+ function Ru() {
9357
9357
  if (Ki) return Tr;
9358
9358
  Ki = !0;
9359
- var s = wo(), e = Za(), t = cr(), r = el();
9359
+ var s = wo(), e = el(), t = cr(), r = tl();
9360
9360
  return Tr = function(o, n, i) {
9361
9361
  if (!o || typeof o != "object" && typeof o != "function") throw new t("`obj` must be an object or a function`");
9362
9362
  if (typeof n != "string" && typeof n != "symbol") throw new t("`property` must be a string or a symbol`");
@@ -9370,7 +9370,7 @@ function Mu() {
9370
9370
  else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
9371
9371
  }, Tr;
9372
9372
  }
9373
- function Ru() {
9373
+ function Lu() {
9374
9374
  if (Gi) return Cr;
9375
9375
  Gi = !0;
9376
9376
  var s = wo(), e = function() {
@@ -9385,10 +9385,10 @@ function Ru() {
9385
9385
  }
9386
9386
  }, Cr = e, Cr;
9387
9387
  }
9388
- function Lu() {
9388
+ function Nu() {
9389
9389
  if (Yi) return Or;
9390
9390
  Yi = !0;
9391
- var s = Gt(), e = Mu(), t = Ru()(), r = el(), o = cr(), n = s("%Math.floor%");
9391
+ var s = Gt(), e = Ru(), t = Lu()(), r = tl(), o = cr(), n = s("%Math.floor%");
9392
9392
  return Or = function(i, a) {
9393
9393
  if (typeof i != "function") throw new o("`fn` is not a function");
9394
9394
  if (typeof a != "number" || a < 0 || a > 4294967295 || n(a) !== a) throw new o("`length` must be a positive 32-bit integer");
@@ -9400,10 +9400,10 @@ function Lu() {
9400
9400
  return (c || u || !l) && (t ? e(i, "length", a, !0, !0) : e(i, "length", a)), i;
9401
9401
  }, Or;
9402
9402
  }
9403
- function Nu() {
9403
+ function ju() {
9404
9404
  if (Ji) return Ft;
9405
9405
  Ji = !0;
9406
- var s = vo(), e = Gt(), t = Lu(), r = cr(), o = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), i = e("%Reflect.apply%", !0) || s.call(n, o), a = wo(), l = e("%Math.max%");
9406
+ var s = vo(), e = Gt(), t = Nu(), r = cr(), o = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), i = e("%Reflect.apply%", !0) || s.call(n, o), a = wo(), l = e("%Math.max%");
9407
9407
  Ft = function(u) {
9408
9408
  if (typeof u != "function") throw new r("a function is required");
9409
9409
  var h = i(s, n, arguments);
@@ -9414,27 +9414,27 @@ function Nu() {
9414
9414
  };
9415
9415
  return a ? a(Ft, "apply", { value: c }) : Ft.apply = c, Ft;
9416
9416
  }
9417
- function ju() {
9417
+ function Uu() {
9418
9418
  if (Qi) return Pr;
9419
9419
  Qi = !0;
9420
- var s = Gt(), e = Nu(), t = e(s("String.prototype.indexOf"));
9420
+ var s = Gt(), e = ju(), t = e(s("String.prototype.indexOf"));
9421
9421
  return Pr = function(r, o) {
9422
9422
  var n = s(r, !!o);
9423
9423
  return typeof n == "function" && t(r, ".prototype.") > -1 ? e(n) : n;
9424
9424
  }, Pr;
9425
9425
  }
9426
- var xi, Si, Ei, Ai, Ii, Ti, Ci, Oi, Pi, Mi, Ri, Li, Ni, ji, Ui, Bi, wr, Di, _r, $i, kr, Fi, xr, qi, Sr, Hi, Er, Wi, Ar, zi, Ir, Vi, Tr, Ki, Cr, Gi, Or, Yi, Ft, Ji, Pr, Qi, Uu = Je(() => {
9426
+ var xi, Si, Ei, Ai, Ii, Ti, Ci, Oi, Pi, Mi, Ri, Li, Ni, ji, Ui, Bi, wr, Di, _r, $i, kr, Fi, xr, qi, Sr, Hi, Er, Wi, Ar, zi, Ir, Vi, Tr, Ki, Cr, Gi, Or, Yi, Ft, Ji, Pr, Qi, Bu = Je(() => {
9427
9427
  le(), ue(), ce(), xi = {}, Si = !1, Ei = {}, Ai = !1, Ii = {}, Ti = !1, Ci = {}, Oi = !1, Pi = {}, Mi = !1, Ri = {}, Li = !1, Ni = {}, ji = !1, Ui = {}, Bi = !1, wr = {}, Di = !1, _r = {}, $i = !1, kr = {}, Fi = !1, xr = {}, qi = !1, Sr = {}, Hi = !1, Er = {}, Wi = !1, Ar = {}, zi = !1, Ir = {}, Vi = !1, Tr = {}, Ki = !1, Cr = {}, Gi = !1, Or = {}, Yi = !1, Ft = {}, Ji = !1, Pr = {}, Qi = !1;
9428
9428
  });
9429
9429
  function _o(s) {
9430
9430
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
9431
9431
  }
9432
- function Bu() {
9433
- !Rt || !Pt || (Rt = !1, Pt.length ? at = Pt.concat(at) : sr = -1, at.length && tl());
9432
+ function Du() {
9433
+ !Rt || !Pt || (Rt = !1, Pt.length ? at = Pt.concat(at) : sr = -1, at.length && rl());
9434
9434
  }
9435
- function tl() {
9435
+ function rl() {
9436
9436
  if (!Rt) {
9437
- var s = setTimeout(Bu, 0);
9437
+ var s = setTimeout(Du, 0);
9438
9438
  Rt = !0;
9439
9439
  for (var e = at.length; e; ) {
9440
9440
  for (Pt = at, at = []; ++sr < e; ) Pt && Pt[sr].run();
@@ -9443,35 +9443,35 @@ function tl() {
9443
9443
  Pt = null, Rt = !1, clearTimeout(s);
9444
9444
  }
9445
9445
  }
9446
- function Du(s) {
9446
+ function $u(s) {
9447
9447
  var e = new Array(arguments.length - 1);
9448
9448
  if (arguments.length > 1) for (var t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
9449
- at.push(new rl(s, e)), at.length === 1 && !Rt && setTimeout(tl, 0);
9449
+ at.push(new nl(s, e)), at.length === 1 && !Rt && setTimeout(rl, 0);
9450
9450
  }
9451
- function rl(s, e) {
9451
+ function nl(s, e) {
9452
9452
  this.fun = s, this.array = e;
9453
9453
  }
9454
9454
  function We() {
9455
9455
  }
9456
- function $u(s) {
9456
+ function Fu(s) {
9457
9457
  _o("_linkedBinding");
9458
9458
  }
9459
- function Fu(s) {
9459
+ function qu(s) {
9460
9460
  _o("dlopen");
9461
9461
  }
9462
- function qu() {
9462
+ function Hu() {
9463
9463
  return [];
9464
9464
  }
9465
- function Hu() {
9465
+ function Wu() {
9466
9466
  return [];
9467
9467
  }
9468
- function Wu(s, e) {
9468
+ function zu(s, e) {
9469
9469
  if (!s) throw new Error(e || "assertion error");
9470
9470
  }
9471
- function zu() {
9471
+ function Vu() {
9472
9472
  return !1;
9473
9473
  }
9474
- function Vu() {
9474
+ function Ku() {
9475
9475
  return dt.now() / 1e3;
9476
9476
  }
9477
9477
  function en(s) {
@@ -9481,11 +9481,11 @@ function en(s) {
9481
9481
  function vt() {
9482
9482
  return ko;
9483
9483
  }
9484
- function Ku(s) {
9484
+ function Gu(s) {
9485
9485
  return [];
9486
9486
  }
9487
- var at, Rt, Pt, sr, Lo, No, jo, Uo, Bo, Do, $o, Fo, qo, Ho, Wo, zo, Vo, Ko, Go, Yo, Jo, Qo, Xo, Zo, es, fr, ts, rs, ns, is, os, ss, as, ls, cs, us, hs, ds, fs, ps, ms, gs, bs, ys, vs, ws, _s, ks, xs, Ss, Es, dt, tn, Mr, As, Is, Ts, Cs, Os, Ps, Ms, Rs, Ls, Ns, js, ko, nl = Je(() => {
9488
- le(), ue(), ce(), at = [], Rt = !1, sr = -1, rl.prototype.run = function() {
9487
+ var at, Rt, Pt, sr, Lo, No, jo, Uo, Bo, Do, $o, Fo, qo, Ho, Wo, zo, Vo, Ko, Go, Yo, Jo, Qo, Xo, Zo, es, fr, ts, rs, ns, is, os, ss, as, ls, cs, us, hs, ds, fs, ps, ms, gs, bs, ys, vs, ws, _s, ks, xs, Ss, Es, dt, tn, Mr, As, Is, Ts, Cs, Os, Ps, Ms, Rs, Ls, Ns, js, ko, il = Je(() => {
9488
+ le(), ue(), ce(), at = [], Rt = !1, sr = -1, nl.prototype.run = function() {
9489
9489
  this.fun.apply(null, this.array);
9490
9490
  }, Lo = "browser", No = "x64", jo = "browser", Uo = { PATH: "/usr/bin", LANG: navigator.language + ".UTF-8", PWD: "/", HOME: "/home", TMP: "/tmp" }, Bo = ["/usr/bin/node"], Do = [], $o = "v16.8.0", Fo = {}, qo = function(s, e) {
9491
9491
  console.warn((e ? e + ": " : "") + s);
@@ -9501,9 +9501,9 @@ var at, Rt, Pt, sr, Lo, No, jo, Uo, Bo, Do, $o, Fo, qo, Ho, Wo, zo, Vo, Ko, Go,
9501
9501
  }, ts = fr, rs = fr, ns = We, is = We, os = We, ss = {}, as = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, ls = We, cs = We, us = We, hs = We, ds = We, fs = We, ps = We, ms = void 0, gs = void 0, bs = void 0, ys = We, vs = 2, ws = 1, _s = "/bin/usr/node", ks = 9229, xs = "node", Ss = [], Es = We, dt = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, dt.now === void 0 && (tn = Date.now(), dt.timing && dt.timing.navigationStart && (tn = dt.timing.navigationStart), dt.now = () => Date.now() - tn), Mr = 1e9, en.bigint = function(s) {
9502
9502
  var e = en(s);
9503
9503
  return typeof BigInt > "u" ? e[0] * Mr + e[1] : BigInt(e[0] * Mr) + BigInt(e[1]);
9504
- }, As = 10, Is = {}, Ts = 0, Cs = vt, Os = vt, Ps = vt, Ms = vt, Rs = vt, Ls = We, Ns = vt, js = vt, ko = { version: $o, versions: Fo, arch: No, platform: jo, release: Ko, _rawDebug: Go, moduleLoadList: Yo, binding: Ho, _linkedBinding: $u, _events: Is, _eventsCount: Ts, _maxListeners: As, on: vt, addListener: Cs, once: Os, off: Ps, removeListener: Ms, removeAllListeners: Rs, emit: Ls, prependListener: Ns, prependOnceListener: js, listeners: Ku, domain: Jo, _exiting: Qo, config: Xo, dlopen: Fu, uptime: Vu, _getActiveRequests: qu, _getActiveHandles: Hu, reallyExit: Zo, _kill: es, cpuUsage: fr, resourceUsage: ts, memoryUsage: rs, kill: ns, exit: is, openStdin: os, allowedNodeEnvironmentFlags: ss, assert: Wu, features: as, _fatalExceptions: ls, setUncaughtExceptionCaptureCallback: cs, hasUncaughtExceptionCaptureCallback: zu, emitWarning: qo, nextTick: Du, _tickCallback: us, _debugProcess: hs, _debugEnd: ds, _startProfilerIdleNotifier: fs, _stopProfilerIdleNotifier: ps, stdout: ms, stdin: bs, stderr: gs, abort: ys, umask: Wo, chdir: Vo, cwd: zo, env: Uo, title: Lo, argv: Bo, execArgv: Do, pid: vs, ppid: ws, execPath: _s, debugPort: ks, hrtime: en, argv0: xs, _preload_modules: Ss, setSourceMapsEnabled: Es };
9504
+ }, As = 10, Is = {}, Ts = 0, Cs = vt, Os = vt, Ps = vt, Ms = vt, Rs = vt, Ls = We, Ns = vt, js = vt, ko = { version: $o, versions: Fo, arch: No, platform: jo, release: Ko, _rawDebug: Go, moduleLoadList: Yo, binding: Ho, _linkedBinding: Fu, _events: Is, _eventsCount: Ts, _maxListeners: As, on: vt, addListener: Cs, once: Os, off: Ps, removeListener: Ms, removeAllListeners: Rs, emit: Ls, prependListener: Ns, prependOnceListener: js, listeners: Gu, domain: Jo, _exiting: Qo, config: Xo, dlopen: qu, uptime: Ku, _getActiveRequests: Hu, _getActiveHandles: Wu, reallyExit: Zo, _kill: es, cpuUsage: fr, resourceUsage: ts, memoryUsage: rs, kill: ns, exit: is, openStdin: os, allowedNodeEnvironmentFlags: ss, assert: zu, features: as, _fatalExceptions: ls, setUncaughtExceptionCaptureCallback: cs, hasUncaughtExceptionCaptureCallback: Vu, emitWarning: qo, nextTick: $u, _tickCallback: us, _debugProcess: hs, _debugEnd: ds, _startProfilerIdleNotifier: fs, _stopProfilerIdleNotifier: ps, stdout: ms, stdin: bs, stderr: gs, abort: ys, umask: Wo, chdir: Vo, cwd: zo, env: Uo, title: Lo, argv: Bo, execArgv: Do, pid: vs, ppid: ws, execPath: _s, debugPort: ks, hrtime: en, argv0: xs, _preload_modules: Ss, setSourceMapsEnabled: Es };
9505
9505
  });
9506
- function Gu() {
9506
+ function Yu() {
9507
9507
  if (Xi) return Rr;
9508
9508
  Xi = !0;
9509
9509
  var s = ko;
@@ -9654,11 +9654,11 @@ function Gu() {
9654
9654
  }, sep: "/", delimiter: ":", win32: null, posix: null };
9655
9655
  return o.posix = o, Rr = o, Rr;
9656
9656
  }
9657
- var Rr, Xi, Zi, Yu = Je(() => {
9658
- le(), ue(), ce(), nl(), Rr = {}, Xi = !1, Zi = Gu();
9659
- }), il = {};
9660
- zt(il, { URL: () => pl, Url: () => cl, default: () => ze, fileURLToPath: () => sl, format: () => ul, parse: () => fl, pathToFileURL: () => al, resolve: () => hl, resolveObject: () => dl });
9661
- function Ju() {
9657
+ var Rr, Xi, Zi, Ju = Je(() => {
9658
+ le(), ue(), ce(), il(), Rr = {}, Xi = !1, Zi = Yu();
9659
+ }), ol = {};
9660
+ zt(ol, { URL: () => ml, Url: () => ul, default: () => ze, fileURLToPath: () => al, format: () => hl, parse: () => pl, pathToFileURL: () => ll, resolve: () => dl, resolveObject: () => fl });
9661
+ function Qu() {
9662
9662
  if (eo) return Lr;
9663
9663
  eo = !0;
9664
9664
  var s = typeof Map == "function" && Map.prototype, e = Object.getOwnPropertyDescriptor && s ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, t = s && e && typeof e.get == "function" ? e.get : null, r = s && Map.prototype.forEach, o = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, i = o && n && typeof n.get == "function" ? n.get : null, a = o && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, h = u ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, b = p ? WeakRef.prototype.deref : null, d = Boolean.prototype.valueOf, g = Object.prototype.toString, y = Function.prototype.toString, w = String.prototype.match, m = String.prototype.slice, _ = String.prototype.replace, x = String.prototype.toUpperCase, v = String.prototype.toLowerCase, E = RegExp.prototype.test, S = Array.prototype.concat, I = Array.prototype.join, O = Array.prototype.slice, P = Math.floor, j = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, q = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, D = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = 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) {
@@ -9676,7 +9676,7 @@ function Ju() {
9676
9676
  }
9677
9677
  return _.call(ie, Ee, "$&_");
9678
9678
  }
9679
- var re = ll, $ = re.custom, Z = G($) ? $ : null;
9679
+ var re = cl, $ = re.custom, Z = G($) ? $ : null;
9680
9680
  Lr = function z(ie, Ee, Ae, Te) {
9681
9681
  var Oe = Ee || {};
9682
9682
  if (oe(Oe, "quoteStyle") && Oe.quoteStyle !== "single" && Oe.quoteStyle !== "double") throw new TypeError('option "quoteStyle" must be "single" or "double"');
@@ -9953,10 +9953,10 @@ function Ju() {
9953
9953
  }
9954
9954
  return Lr;
9955
9955
  }
9956
- function Qu() {
9956
+ function Xu() {
9957
9957
  if (to) return jr;
9958
9958
  to = !0;
9959
- var s = Gt(), e = ju(), t = Ju(), r = cr(), o = s("%WeakMap%", !0), n = s("%Map%", !0), i = e("WeakMap.prototype.get", !0), a = e("WeakMap.prototype.set", !0), l = e("WeakMap.prototype.has", !0), c = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), h = e("Map.prototype.has", !0), p = function(y, w) {
9959
+ var s = Gt(), e = Uu(), t = Qu(), r = cr(), o = s("%WeakMap%", !0), n = s("%Map%", !0), i = e("WeakMap.prototype.get", !0), a = e("WeakMap.prototype.set", !0), l = e("WeakMap.prototype.has", !0), c = e("Map.prototype.get", !0), u = e("Map.prototype.set", !0), h = e("Map.prototype.has", !0), p = function(y, w) {
9960
9960
  for (var m = y, _; (_ = m.next) !== null; m = _) if (_.key === w) return m.next = _.next, _.next = y.next, y.next = _, _;
9961
9961
  }, b = function(y, w) {
9962
9962
  var m = p(y, w);
@@ -9999,7 +9999,7 @@ function xo() {
9999
9999
  return String(r);
10000
10000
  } }, RFC1738: t.RFC1738, RFC3986: t.RFC3986 }, Ur;
10001
10001
  }
10002
- function ol() {
10002
+ function sl() {
10003
10003
  if (no) return Br;
10004
10004
  no = !0;
10005
10005
  var s = xo(), e = Object.prototype.hasOwnProperty, t = Array.isArray, r = (function() {
@@ -10098,10 +10098,10 @@ function ol() {
10098
10098
  };
10099
10099
  return Br = { arrayToObject: n, assign: a, combine: d, compact: h, decode: l, encode: u, isBuffer: b, isRegExp: p, maybeMap: g, merge: i }, Br;
10100
10100
  }
10101
- function Xu() {
10101
+ function Zu() {
10102
10102
  if (io) return Dr;
10103
10103
  io = !0;
10104
- var s = Qu(), e = ol(), t = xo(), r = Object.prototype.hasOwnProperty, o = { brackets: function(g) {
10104
+ var s = Xu(), e = sl(), t = xo(), r = Object.prototype.hasOwnProperty, o = { brackets: function(g) {
10105
10105
  return g + "[]";
10106
10106
  }, comma: "comma", indices: function(g, y) {
10107
10107
  return g + "[" + y + "]";
@@ -10190,10 +10190,10 @@ function Xu() {
10190
10190
  return m.charsetSentinel && (m.charset === "iso-8859-1" ? T += "utf8=%26%2310003%3B&" : T += "utf8=%E2%9C%93&"), j.length > 0 ? T + j : "";
10191
10191
  }, Dr;
10192
10192
  }
10193
- function Zu() {
10193
+ function eh() {
10194
10194
  if (oo) return $r;
10195
10195
  oo = !0;
10196
- var s = ol(), 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: s.decode, delimiter: "&", depth: 5, duplicates: "combine", ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictDepth: !1, strictNullHandling: !1 }, o = function(p) {
10196
+ var s = sl(), 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: s.decode, delimiter: "&", depth: 5, duplicates: "combine", ignoreQueryPrefix: !1, interpretNumericEntities: !1, parameterLimit: 1e3, parseArrays: !0, plainObjects: !1, strictDepth: !1, strictNullHandling: !1 }, o = function(p) {
10197
10197
  return p.replace(/&#(\d+);/g, function(b, d) {
10198
10198
  return String.fromCharCode(parseInt(d, 10));
10199
10199
  });
@@ -10263,13 +10263,13 @@ function Zu() {
10263
10263
  return d.allowSparse === !0 ? y : s.compact(y);
10264
10264
  }, $r;
10265
10265
  }
10266
- function eh() {
10266
+ function th() {
10267
10267
  if (so) return Fr;
10268
10268
  so = !0;
10269
- var s = Xu(), e = Zu(), t = xo();
10269
+ var s = Zu(), e = eh(), t = xo();
10270
10270
  return Fr = { formats: t, parse: e, stringify: s }, Fr;
10271
10271
  }
10272
- function th() {
10272
+ function rh() {
10273
10273
  if (ao) return xt;
10274
10274
  ao = !0;
10275
10275
  var s = kt;
@@ -10277,7 +10277,7 @@ function th() {
10277
10277
  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;
10278
10278
  }
10279
10279
  var t = /^([a-z0-9.+-]+:)/i, r = /:[0-9]*$/, o = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, n = ["<", ">", '"', "`", " ", "\r", `
10280
- `, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(n), a = ["'"].concat(i), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], u = 255, h = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, b = { javascript: !0, "javascript:": !0 }, d = { 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 }, y = eh();
10280
+ `, " "], i = ["{", "}", "|", "\\", "^", "`"].concat(n), a = ["'"].concat(i), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], u = 255, h = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, b = { javascript: !0, "javascript:": !0 }, d = { 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 }, y = th();
10281
10281
  function w(v, E, S) {
10282
10282
  if (v && typeof v == "object" && v instanceof e) return v;
10283
10283
  var I = new e();
@@ -10430,26 +10430,26 @@ function th() {
10430
10430
  E && (E = E[0], E !== ":" && (this.port = E.substr(1)), v = v.substr(0, v.length - E.length)), v && (this.hostname = v);
10431
10431
  }, xt.parse = w, xt.resolve = _, xt.resolveObject = x, xt.format = m, xt.Url = e, xt;
10432
10432
  }
10433
- function sl(s) {
10433
+ function al(s) {
10434
10434
  if (typeof s == "string") s = new URL(s);
10435
10435
  else if (!(s instanceof URL)) throw new Deno.errors.InvalidData("invalid argument path , must be a string or URL");
10436
10436
  if (s.protocol !== "file:") throw new Deno.errors.InvalidData("invalid url scheme");
10437
- return Wr ? rh(s) : nh(s);
10437
+ return Wr ? nh(s) : ih(s);
10438
10438
  }
10439
- function rh(s) {
10439
+ function nh(s) {
10440
10440
  let e = s.hostname, t = s.pathname;
10441
10441
  for (let r = 0; r < t.length; r++) if (t[r] === "%") {
10442
10442
  let o = t.codePointAt(r + 2) || 32;
10443
10443
  if (t[r + 1] === "2" && o === 102 || t[r + 1] === "5" && o === 99) throw new Deno.errors.InvalidData("must not include encoded \\ or / characters");
10444
10444
  }
10445
- if (t = t.replace(vl, "\\"), t = decodeURIComponent(t), e !== "") return `\\\\${e}${t}`;
10445
+ if (t = t.replace(wl, "\\"), t = decodeURIComponent(t), e !== "") return `\\\\${e}${t}`;
10446
10446
  {
10447
10447
  let r = t.codePointAt(1) | 32, o = t[2];
10448
- if (r < bl || r > yl || o !== ":") throw new Deno.errors.InvalidData("file url path must be absolute");
10448
+ if (r < yl || r > vl || o !== ":") throw new Deno.errors.InvalidData("file url path must be absolute");
10449
10449
  return t.slice(1);
10450
10450
  }
10451
10451
  }
10452
- function nh(s) {
10452
+ function ih(s) {
10453
10453
  if (s.hostname !== "") throw new Deno.errors.InvalidData("invalid file url hostname");
10454
10454
  let e = s.pathname;
10455
10455
  for (let t = 0; t < e.length; t++) if (e[t] === "%") {
@@ -10458,16 +10458,16 @@ function nh(s) {
10458
10458
  }
10459
10459
  return decodeURIComponent(e);
10460
10460
  }
10461
- function al(s) {
10461
+ function ll(s) {
10462
10462
  let e = Zi.resolve(s), t = s.charCodeAt(s.length - 1);
10463
- (t === gl || Wr && t === ml) && e[e.length - 1] !== Zi.sep && (e += "/");
10463
+ (t === bl || Wr && t === gl) && e[e.length - 1] !== Zi.sep && (e += "/");
10464
10464
  let r = new URL("file://");
10465
- return e.includes("%") && (e = e.replace(wl, "%25")), !Wr && e.includes("\\") && (e = e.replace(_l, "%5C")), e.includes(`
10466
- `) && (e = e.replace(kl, "%0A")), e.includes("\r") && (e = e.replace(xl, "%0D")), e.includes(" ") && (e = e.replace(Sl, "%09")), r.pathname = e, r;
10465
+ return e.includes("%") && (e = e.replace(_l, "%25")), !Wr && e.includes("\\") && (e = e.replace(kl, "%5C")), e.includes(`
10466
+ `) && (e = e.replace(xl, "%0A")), e.includes("\r") && (e = e.replace(Sl, "%0D")), e.includes(" ") && (e = e.replace(El, "%09")), r.pathname = e, r;
10467
10467
  }
10468
- var ll, Lr, eo, Nr, jr, to, Ur, ro, Br, no, Dr, io, $r, oo, Fr, so, xt, ao, ze, Us, cl, ul, hl, dl, fl, pl, ml, gl, bl, yl, Wr, vl, wl, _l, kl, xl, Sl, ih = Je(() => {
10469
- le(), ue(), ce(), _u(), Uu(), Yu(), nl(), ll = Object.freeze(/* @__PURE__ */ Object.create(null)), Lr = {}, eo = !1, Nr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, jr = {}, to = !1, Ur = {}, ro = !1, Br = {}, no = !1, Dr = {}, io = !1, $r = {}, oo = !1, Fr = {}, so = !1, xt = {}, ao = !1, ze = th(), ze.parse, ze.resolve, ze.resolveObject, ze.format, ze.Url, Us = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, ze.URL = typeof URL < "u" ? URL : null, ze.pathToFileURL = al, ze.fileURLToPath = sl, cl = ze.Url, ul = ze.format, hl = ze.resolve, dl = ze.resolveObject, fl = ze.parse, pl = ze.URL, ml = 92, gl = 47, bl = 97, yl = 122, Wr = Us === "win32", vl = /\//g, wl = /%/g, _l = /\\/g, kl = /\n/g, xl = /\r/g, Sl = /\t/g;
10470
- }), oh = pe((s, e) => {
10468
+ var cl, Lr, eo, Nr, jr, to, Ur, ro, Br, no, Dr, io, $r, oo, Fr, so, xt, ao, ze, Us, ul, hl, dl, fl, pl, ml, gl, bl, yl, vl, Wr, wl, _l, kl, xl, Sl, El, oh = Je(() => {
10469
+ le(), ue(), ce(), ku(), Bu(), Ju(), il(), cl = Object.freeze(/* @__PURE__ */ Object.create(null)), Lr = {}, eo = !1, Nr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, jr = {}, to = !1, Ur = {}, ro = !1, Br = {}, no = !1, Dr = {}, io = !1, $r = {}, oo = !1, Fr = {}, so = !1, xt = {}, ao = !1, ze = rh(), ze.parse, ze.resolve, ze.resolveObject, ze.format, ze.Url, Us = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, ze.URL = typeof URL < "u" ? URL : null, ze.pathToFileURL = ll, ze.fileURLToPath = al, ul = ze.Url, hl = ze.format, dl = ze.resolve, fl = ze.resolveObject, pl = ze.parse, ml = ze.URL, gl = 92, bl = 47, yl = 97, vl = 122, Wr = Us === "win32", wl = /\//g, _l = /%/g, kl = /\\/g, xl = /\n/g, Sl = /\r/g, El = /\t/g;
10470
+ }), sh = pe((s, e) => {
10471
10471
  le(), ue(), ce(), e.exports = function() {
10472
10472
  throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object");
10473
10473
  };
@@ -10521,7 +10521,7 @@ var ll, Lr, eo, Nr, jr, to, Ur, ro, Br, no, Dr, io, $r, oo, Fr, so, xt, ao, ze,
10521
10521
  return w && w.__esModule ? w : { default: w };
10522
10522
  };
10523
10523
  Object.defineProperty(s, "__esModule", { value: !0 }), s.streamBuilder = s.browserStreamBuilder = void 0;
10524
- var t = (Fe(), Me($e)), r = e(oh()), o = e(pt()), n = jt(), i = e(Qr()), a = So(), l = (0, o.default)("mqttjs:ws"), c = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10524
+ var t = (Fe(), Me($e)), r = e(sh()), o = e(pt()), n = jt(), i = e(Qr()), a = So(), l = (0, o.default)("mqttjs:ws"), c = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10525
10525
  function u(w, m) {
10526
10526
  let _ = `${w.protocol}://${w.hostname}:${w.port}${w.path}`;
10527
10527
  return typeof w.transformWsUrl == "function" && (_ = w.transformWsUrl(_, w, m)), _;
@@ -10610,13 +10610,13 @@ var ll, Lr, eo, Nr, jr, to, Ur, ro, Br, no, Dr, io, $r, oo, Fr, so, xt, ao, ze,
10610
10610
  };
10611
10611
  s.browserStreamBuilder = y;
10612
10612
  }), Eo = {};
10613
- zt(Eo, { Server: () => je, Socket: () => je, Stream: () => je, _createServerHandle: () => je, _normalizeArgs: () => je, _setSimultaneousAccepts: () => je, connect: () => je, createConnection: () => je, createServer: () => je, default: () => El, isIP: () => je, isIPv4: () => je, isIPv6: () => je });
10613
+ zt(Eo, { Server: () => je, Socket: () => je, Stream: () => je, _createServerHandle: () => je, _normalizeArgs: () => je, _setSimultaneousAccepts: () => je, connect: () => je, createConnection: () => je, createServer: () => je, default: () => Al, isIP: () => je, isIPv4: () => je, isIPv6: () => je });
10614
10614
  function je() {
10615
10615
  throw new Error("Node.js net module is not supported by JSPM core outside of Node.js");
10616
10616
  }
10617
- var El, Al = Je(() => {
10618
- le(), ue(), ce(), El = { _createServerHandle: je, _normalizeArgs: je, _setSimultaneousAccepts: je, connect: je, createConnection: je, createServer: je, isIP: je, isIPv4: je, isIPv6: je, Server: je, Socket: je, Stream: je };
10619
- }), Il = pe((s, e) => {
10617
+ var Al, Il = Je(() => {
10618
+ le(), ue(), ce(), Al = { _createServerHandle: je, _normalizeArgs: je, _setSimultaneousAccepts: je, connect: je, createConnection: je, createServer: je, isIP: je, isIPv4: je, isIPv6: je, Server: je, Socket: je, Stream: je };
10619
+ }), Tl = pe((s, e) => {
10620
10620
  le(), ue(), ce(), e.exports = {};
10621
10621
  }), Bs = pe((s) => {
10622
10622
  le(), ue(), ce();
@@ -10624,23 +10624,23 @@ var El, Al = Je(() => {
10624
10624
  return a && a.__esModule ? a : { default: a };
10625
10625
  };
10626
10626
  Object.defineProperty(s, "__esModule", { value: !0 });
10627
- var t = e((Al(), Me(Eo))), r = e(pt()), o = e(Il()), n = (0, r.default)("mqttjs:tcp"), i = (a, l) => {
10627
+ var t = e((Il(), Me(Eo))), r = e(pt()), o = e(Tl()), n = (0, r.default)("mqttjs:tcp"), i = (a, l) => {
10628
10628
  if (l.port = l.port || 1883, l.hostname = l.hostname || l.host || "localhost", l.socksProxy) return (0, o.default)(l.hostname, l.port, l.socksProxy, { timeout: l.socksTimeout });
10629
10629
  let { port: c, path: u } = l, h = l.hostname;
10630
10630
  return n("port %d and host %s", c, h), t.default.createConnection({ port: c, host: h, path: u });
10631
10631
  };
10632
10632
  s.default = i;
10633
- }), Tl = {};
10634
- zt(Tl, { default: () => Cl });
10635
- var Cl, sh = Je(() => {
10636
- le(), ue(), ce(), Cl = {};
10633
+ }), Cl = {};
10634
+ zt(Cl, { default: () => Ol });
10635
+ var Ol, ah = Je(() => {
10636
+ le(), ue(), ce(), Ol = {};
10637
10637
  }), Ds = pe((s) => {
10638
10638
  le(), ue(), ce();
10639
10639
  var e = s && s.__importDefault || function(c) {
10640
10640
  return c && c.__esModule ? c : { default: c };
10641
10641
  };
10642
10642
  Object.defineProperty(s, "__esModule", { value: !0 });
10643
- var t = (sh(), Me(Tl)), r = e((Al(), Me(Eo))), o = e(pt()), n = e(Il()), i = (0, o.default)("mqttjs:tls");
10643
+ var t = (ah(), Me(Cl)), r = e((Il(), Me(Eo))), o = e(pt()), n = e(Tl()), i = (0, o.default)("mqttjs:tls");
10644
10644
  function a(c) {
10645
10645
  let { host: u, port: h, socksProxy: p, ...b } = c;
10646
10646
  if (p !== void 0) {
@@ -10771,13 +10771,13 @@ var Cl, sh = Je(() => {
10771
10771
  return o = d.my, o.connectSocket({ url: y, protocols: g }), n = l(), i = new r.BufferedDuplex(d, n, o), h(), i;
10772
10772
  };
10773
10773
  s.default = p;
10774
- }), ah = pe((s) => {
10774
+ }), lh = pe((s) => {
10775
10775
  le(), ue(), ce();
10776
10776
  var e = s && s.__importDefault || function(h) {
10777
10777
  return h && h.__esModule ? h : { default: h };
10778
10778
  };
10779
10779
  Object.defineProperty(s, "__esModule", { value: !0 }), s.connectAsync = u;
10780
- var t = e(pt()), r = e((ih(), Me(il))), o = e(wi()), n = e(Qr());
10780
+ var t = e(pt()), r = e((oh(), Me(ol))), o = e(wi()), n = e(Qr());
10781
10781
  typeof Le?.nextTick != "function" && (Le.nextTick = setImmediate);
10782
10782
  var i = (0, t.default)("mqttjs"), a = null;
10783
10783
  function l(h) {
@@ -10883,23 +10883,23 @@ var Cl, sh = Je(() => {
10883
10883
  Object.defineProperty(s, "__esModule", { value: !0 }), s.ReasonCodes = s.KeepaliveManager = s.UniqueMessageIdProvider = s.DefaultMessageIdProvider = s.Store = s.MqttClient = s.connectAsync = s.connect = s.Client = void 0;
10884
10884
  var i = n(wi());
10885
10885
  s.MqttClient = i.default;
10886
- var a = n(za());
10886
+ var a = n(Va());
10887
10887
  s.DefaultMessageIdProvider = a.default;
10888
- var l = n(vu());
10888
+ var l = n(wu());
10889
10889
  s.UniqueMessageIdProvider = l.default;
10890
- var c = n(Ta());
10890
+ var c = n(Ca());
10891
10891
  s.Store = c.default;
10892
- var u = r(ah());
10892
+ var u = r(lh());
10893
10893
  s.connect = u.default, Object.defineProperty(s, "connectAsync", { enumerable: !0, get: function() {
10894
10894
  return u.connectAsync;
10895
10895
  } });
10896
- var h = n(Xa());
10897
- s.KeepaliveManager = h.default, s.Client = i.default, o(wi(), s), o(Kt(), s), o(Ia(), s);
10896
+ var h = n(Za());
10897
+ s.KeepaliveManager = h.default, s.Client = i.default, o(wi(), s), o(Kt(), s), o(Ta(), s);
10898
10898
  var p = Yr();
10899
10899
  Object.defineProperty(s, "ReasonCodes", { enumerable: !0, get: function() {
10900
10900
  return p.ReasonCodes;
10901
10901
  } });
10902
- }), lh = pe((s) => {
10902
+ }), ch = pe((s) => {
10903
10903
  le(), ue(), ce();
10904
10904
  var e = s && s.__createBinding || (Object.create ? function(i, a, l, c) {
10905
10905
  c === void 0 && (c = l);
@@ -10934,25 +10934,25 @@ var Cl, sh = Je(() => {
10934
10934
  var n = r(qs());
10935
10935
  s.default = n, o(qs(), s);
10936
10936
  });
10937
- const ch = lh();
10938
- const uh = {
10937
+ const uh = ch();
10938
+ const hh = {
10939
10939
  inbound: "apps/{appId}/users/{userId}/messages/{conversationId}/clientadded",
10940
10940
  inboundUpdate: "apps/{appId}/users/{userId}/messages/{conversationId}/{messageId}/update",
10941
10941
  outbound: "apps/{appId}/outgoing/users/{userId}/messages/{conversationId}/outgoing",
10942
10942
  presence: "apps/{appId}/users/{userId}/presence/{clientId}",
10943
10943
  wildcardSubscribe: "apps/{appId}/users/{userId}/#"
10944
- }, hh = 300, dh = {
10944
+ }, dh = 300, fh = {
10945
10945
  templateId: "7",
10946
10946
  type: "link",
10947
10947
  isDeepLink: !0
10948
- }, fh = {
10948
+ }, ph = {
10949
10949
  channelType: "group",
10950
10950
  channel: "chat21",
10951
10951
  requestChannel: "chat21",
10952
10952
  platform: "WEBSITE",
10953
10953
  medium: "CHATBUDDY"
10954
10954
  };
10955
- class ph {
10955
+ class mh {
10956
10956
  client = null;
10957
10957
  config;
10958
10958
  currentToken;
@@ -10979,7 +10979,7 @@ class ph {
10979
10979
  inboundRegex;
10980
10980
  inboundUpdateRegex;
10981
10981
  constructor(e) {
10982
- this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? this.freshClientId(), this.topics = { ...uh, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 1 / 0, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
10982
+ this.config = e, this.currentToken = e.jwtToken, this.appId = e.appId ?? "tilechat", this.clientId = e.clientId ?? this.freshClientId(), this.topics = { ...hh, ...e.topicTemplates ?? {} }, this.maxReconnectAttempts = e.maxReconnectAttempts ?? 1 / 0, this.reconnectMaxDelayMs = e.reconnectMaxDelayMs ?? 3e4, this.inboundRegex = this.buildTopicRegex(
10983
10983
  this.topics.inbound,
10984
10984
  ["conversationId"]
10985
10985
  ), this.inboundUpdateRegex = this.buildTopicRegex(
@@ -11031,7 +11031,7 @@ class ph {
11031
11031
  () => c("connect-timeout"),
11032
11032
  r + 500
11033
11033
  );
11034
- this.client = ch.connect(this.config.mqttEndpoint, o), this.client.on("connect", () => {
11034
+ this.client = uh.connect(this.config.mqttEndpoint, o), this.client.on("connect", () => {
11035
11035
  if (this.connectedAt = Date.now(), a || l(() => n()), this.debugLog("CONNECT", { endpoint: this.config.mqttEndpoint, clientId: this.clientId }), this.notifyStateChange(!0), this.config.enablePresence !== !1) {
11036
11036
  const h = this.config.presencePayloadConnected ?? { connected: !0 };
11037
11037
  this.client.publish(e, JSON.stringify(h), { qos: 0, retain: !1 }), this.debugLog("PUBLISH", { topic: e, payload: h });
@@ -11096,9 +11096,9 @@ class ph {
11096
11096
  publishFileMessage(e, t) {
11097
11097
  if (!this.client) return;
11098
11098
  const r = {
11099
- ...dh,
11099
+ ...fh,
11100
11100
  ...this.config.fileTemplate ?? {},
11101
- ...mh(t)
11101
+ ...gh(t)
11102
11102
  }, o = {
11103
11103
  metadata: {
11104
11104
  contentType: "300",
@@ -11137,7 +11137,7 @@ class ph {
11137
11137
  * Send a read receipt for a message. Tiledesk widgets publish
11138
11138
  * `{"status":300}` to apps/{appId}/users/{userId}/messages/{convId}/{msgId}/update.
11139
11139
  */
11140
- publishReadReceipt(e, t, r = hh) {
11140
+ publishReadReceipt(e, t, r = dh) {
11141
11141
  if (!this.client) return;
11142
11142
  const o = this.renderTemplate(this.topics.inboundUpdate, { conversationId: e, messageId: t });
11143
11143
  this.client.publish(o, JSON.stringify({ status: r }), {
@@ -11268,7 +11268,7 @@ class ph {
11268
11268
  this.messageHandlers.forEach((c) => c(o, l));
11269
11269
  }
11270
11270
  buildOutgoingEnvelope(e, t) {
11271
- const r = { ...fh, ...this.config.messageDefaults ?? {} }, o = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), i = {
11271
+ const r = { ...ph, ...this.config.messageDefaults ?? {} }, o = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), i = {
11272
11272
  projectId: this.config.projectId,
11273
11273
  ...r.departmentId ? { departmentId: r.departmentId } : {},
11274
11274
  ...this.config.userName ? { userFullname: this.config.userName } : {},
@@ -11342,20 +11342,20 @@ class ph {
11342
11342
  return new RegExp(`^${r}$`);
11343
11343
  }
11344
11344
  }
11345
- function mh(s) {
11345
+ function gh(s) {
11346
11346
  const e = {};
11347
11347
  for (const [t, r] of Object.entries(s))
11348
11348
  r !== void 0 && (e[t] = r);
11349
11349
  return e;
11350
11350
  }
11351
- function gh(s, e) {
11351
+ function bh(s, e) {
11352
11352
  return (s.sender ?? "").toString() === e;
11353
11353
  }
11354
- function bh(s, e) {
11354
+ function yh(s, e) {
11355
11355
  const t = (s.sender ?? "").toString(), r = e.systemSenders ?? ["metadata", "system"], o = e.botSenderPrefix ?? "bot_";
11356
11356
  return t ? t === e.userId ? "user" : t.startsWith(o) ? "assistant" : r.includes(t) ? "system" : "agent" : "system";
11357
11357
  }
11358
- function Ol(s) {
11358
+ function Pl(s) {
11359
11359
  const e = { raw: s }, t = s.metadata;
11360
11360
  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 s.text == "string" && s.text.trim().startsWith("{"))
11361
11361
  try {
@@ -11372,8 +11372,8 @@ function Ol(s) {
11372
11372
  }
11373
11373
  return e;
11374
11374
  }
11375
- function yh(s) {
11376
- const e = Ol(s);
11375
+ function vh(s) {
11376
+ const e = Pl(s);
11377
11377
  if (e.contentType !== "300") return null;
11378
11378
  const t = e.payload, r = t && Array.isArray(t.elements) ? t.elements : null;
11379
11379
  if (!r || r.length === 0) return null;
@@ -11386,10 +11386,10 @@ function yh(s) {
11386
11386
  };
11387
11387
  }
11388
11388
  function Hs(s, e, t) {
11389
- const r = bh(s, t), o = Ol(s), n = yh(s);
11389
+ const r = yh(s, t), o = Pl(s), n = vh(s);
11390
11390
  let i = "";
11391
11391
  o.innerMessage ? i = o.innerMessage : typeof s.text == "string" && (s.text.trim().startsWith("{") ? o.contentType !== "300" && (i = s.text) : i = s.text);
11392
- const a = typeof s.message_id == "string" ? s.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, l = typeof s.timestamp == "number" ? new Date(s.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), c = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof s.status == "number" ? vh(s.status) : "delivered", h = {
11392
+ const a = typeof s.message_id == "string" ? s.message_id : `td_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`, l = typeof s.timestamp == "number" ? new Date(s.timestamp).toISOString() : (/* @__PURE__ */ new Date()).toISOString(), c = r === "assistant" ? "assistant" : r === "agent" ? "agent" : r === "system" ? "system" : "user", u = typeof s.status == "number" ? wh(s.status) : "delivered", h = {
11393
11393
  id: a,
11394
11394
  externalId: a,
11395
11395
  conversationId: e,
@@ -11416,10 +11416,10 @@ function Hs(s, e, t) {
11416
11416
  }
11417
11417
  ]), { message: h, template: o };
11418
11418
  }
11419
- function vh(s) {
11419
+ function wh(s) {
11420
11420
  return s < 0 ? "error" : s >= 250 ? "read" : s >= 150 ? "delivered" : "sent";
11421
11421
  }
11422
- class wh extends Qs {
11422
+ class _h extends Xs {
11423
11423
  connection = null;
11424
11424
  tiledesk = null;
11425
11425
  api;
@@ -11432,7 +11432,7 @@ class wh extends Qs {
11432
11432
  historyAdapter;
11433
11433
  tiledeskUnsubs = [];
11434
11434
  constructor(e, t) {
11435
- super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new Zl(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new ec(), this.conversationManager = new tc(e.conversationId), this.usesAikaara() && (this.connection = new Xl(e), this.connection.on("connection:state", (r) => {
11435
+ super(), this.config = e, this.mode = e.transport ?? "aikaara", this.uploadAdapter = t?.uploadAdapter ?? null, this.historyAdapter = t?.historyAdapter ?? null, this.api = new ec(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new tc(), this.conversationManager = new rc(e.conversationId), this.usesAikaara() && (this.connection = new Zl(e), this.connection.on("connection:state", (r) => {
11436
11436
  this.emit("connection:state", r), this.config.onConnectionStateChange?.(r);
11437
11437
  }), this.connection.on("error", (r) => {
11438
11438
  this.emit("error", r), this.config.onError?.(r);
@@ -11452,7 +11452,7 @@ class wh extends Qs {
11452
11452
  throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledesk` (TiledeskTransportConfig)");
11453
11453
  if (!t?.userId)
11454
11454
  throw new Error("AikaaraChatClient: tiledesk transport requires `config.tiledeskIdentity.userId`");
11455
- this.tiledesk = new ph({
11455
+ this.tiledesk = new mh({
11456
11456
  ...e,
11457
11457
  userId: t.userId,
11458
11458
  userName: t.userName ?? e.userName,
@@ -11668,7 +11668,7 @@ class wh extends Qs {
11668
11668
  systemSenders: this.config.tiledesk?.messageDefaults?.attributes?.systemSenders
11669
11669
  });
11670
11670
  if (this.mode === "dual" && i.role === "assistant") return;
11671
- if (gh(e, n)) {
11671
+ if (bh(e, n)) {
11672
11672
  const u = this.messageStore.reconcileOptimistic(i);
11673
11673
  if (u) {
11674
11674
  this.emit("message:updated", u);
@@ -11818,12 +11818,12 @@ const Ws = {
11818
11818
  doc: "application/msword",
11819
11819
  json: "application/json"
11820
11820
  };
11821
- function _h(s) {
11821
+ function kh(s) {
11822
11822
  const e = s.lastIndexOf(".");
11823
11823
  return e < 0 || e === s.length - 1 ? "" : s.slice(e + 1).toLowerCase();
11824
11824
  }
11825
- function kh(s, e, t) {
11826
- const r = _h(s.name || "");
11825
+ function xh(s, e, t) {
11826
+ const r = kh(s.name || "");
11827
11827
  if (r && e && e[r]) return e[r];
11828
11828
  const o = s.type;
11829
11829
  return o && o.trim().length > 0 ? o : r && Ws[r] ? Ws[r] : t;
@@ -11831,7 +11831,7 @@ function kh(s, e, t) {
11831
11831
  function rn(s, e) {
11832
11832
  return s.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
11833
11833
  }
11834
- function xh(s, e) {
11834
+ function Sh(s, e) {
11835
11835
  const t = e.split(".");
11836
11836
  let r = s;
11837
11837
  for (const o of t)
@@ -11840,11 +11840,11 @@ function xh(s, e) {
11840
11840
  else return "";
11841
11841
  return typeof r == "string" ? r : "";
11842
11842
  }
11843
- function Sh(s) {
11843
+ function Eh(s) {
11844
11844
  const e = s.signedUrlPath || "data.s3SignedUrl";
11845
11845
  return {
11846
11846
  async upload(t, r) {
11847
- const o = t.name || `upload-${Date.now()}`, n = kh(
11847
+ const o = t.name || `upload-${Date.now()}`, n = xh(
11848
11848
  t,
11849
11849
  s.contentTypeMap,
11850
11850
  s.contentTypeFallback ?? "application/octet-stream"
@@ -11870,7 +11870,7 @@ function Sh(s) {
11870
11870
  });
11871
11871
  if (!h.ok)
11872
11872
  throw new Error(`Sign request failed: ${h.status}`);
11873
- const p = await h.json().catch(() => ({})), b = xh(p, e);
11873
+ const p = await h.json().catch(() => ({})), b = Sh(p, e);
11874
11874
  if (!b) throw new Error(`Sign response missing path "${e}"`);
11875
11875
  const d = s.s3HostRewrite ? b.replace(/^https:\/\/[^/]+/i, s.s3HostRewrite) : b, g = await fetch(d, {
11876
11876
  method: "PUT",
@@ -11904,7 +11904,7 @@ function Sh(s) {
11904
11904
  }
11905
11905
  };
11906
11906
  }
11907
- function Pl(s) {
11907
+ function Ml(s) {
11908
11908
  return {
11909
11909
  async upload(e, t) {
11910
11910
  const r = new FormData(), o = s.fieldName ?? "file";
@@ -11937,9 +11937,9 @@ function Pl(s) {
11937
11937
  }
11938
11938
  };
11939
11939
  }
11940
- const Eh = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11941
- function Ah(s) {
11942
- const e = s.apiBase.replace(/\/$/, ""), t = s.pageSize ?? 200, r = s.pathTemplate ?? Eh;
11940
+ const Ah = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11941
+ function Ih(s) {
11942
+ const e = s.apiBase.replace(/\/$/, ""), t = s.pageSize ?? 200, r = s.pathTemplate ?? Ah;
11943
11943
  return {
11944
11944
  async fetchMessages(o, n) {
11945
11945
  const i = r.replace("{userId}", encodeURIComponent(n.userId)).replace("{conversationId}", encodeURIComponent(o)).replace("{appId}", encodeURIComponent(n.appId ?? "tilechat")).replace("{projectId}", encodeURIComponent(n.projectId ?? "")).replace("{pageSize}", String(t)), a = i.startsWith("http") ? i : `${e}${i.startsWith("/") ? i : `/${i}`}`, l = {
@@ -11965,7 +11965,35 @@ function Ah(s) {
11965
11965
  }
11966
11966
  };
11967
11967
  }
11968
- const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
11968
+ const Th = "^[A-Z]{4}[0-9]{5}[A-Z]$", Ch = "^[A-Z]{4}0[A-Z0-9]{6}$", Oh = {
11969
+ id: "house-property",
11970
+ title: "House Property",
11971
+ icon: "🏠",
11972
+ dataPath: "hpDetails[]",
11973
+ repeatable: { maxCount: 2, labelTemplate: "Property {index}" },
11974
+ entryIcon: "🏠",
11975
+ fields: [
11976
+ { id: "rentalIncome", type: "number", label: "Rental Income", currency: "₹", min: 0 },
11977
+ { id: "propertyTax", type: "number", label: "Municipal Taxes", currency: "₹", min: 0 },
11978
+ {
11979
+ id: "homeLoanDetails",
11980
+ type: "group",
11981
+ title: "Home Loan Details",
11982
+ fields: [
11983
+ { id: "lenderName", type: "text", label: "Bank / Institute Name", required: !0 },
11984
+ { id: "sanctionDate", type: "date", label: "Loan Sanction Date", format: "DD/MM/YYYY", required: !0 },
11985
+ { id: "loanAccountNumber", type: "text", label: "Loan Account No.", required: !0 },
11986
+ { id: "totalLoanAmount", type: "number", label: "Total Loan Amount", currency: "₹", min: 0 },
11987
+ { id: "outstandingAmount", type: "number", label: "Outstanding Loan", currency: "₹", min: 0 },
11988
+ // No max: the ₹2,00,000 figure is a *deduction* cap applied by the
11989
+ // return, not a limit on what the taxpayer actually paid. Capping the
11990
+ // input rejected real values (this payload has ₹2,21,200).
11991
+ { id: "homeLoanInterest", type: "number", label: "Interest Paid", currency: "₹", min: 0 }
11992
+ ]
11993
+ }
11994
+ ],
11995
+ submitLabel: "Save"
11996
+ }, Ph = {
11969
11997
  id: "salary-hra",
11970
11998
  title: "Salary / HRA / Allowances",
11971
11999
  icon: "💰",
@@ -11985,7 +12013,7 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
11985
12013
  // Optional: the pattern check only fires on a non-empty value, so a
11986
12014
  // blank TAN saves cleanly while a malformed one is still caught.
11987
12015
  label: "TAN (Tax Deduction Account Number)",
11988
- pattern: Ih,
12016
+ pattern: Th,
11989
12017
  maxLength: 10
11990
12018
  }
11991
12019
  ]
@@ -12001,7 +12029,7 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
12001
12029
  }
12002
12030
  ],
12003
12031
  submitLabel: "Save"
12004
- }, Oh = {
12032
+ }, Mh = {
12005
12033
  id: "other-sources",
12006
12034
  title: "Income from Other Sources",
12007
12035
  icon: "💵",
@@ -12027,7 +12055,7 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
12027
12055
  }
12028
12056
  ],
12029
12057
  submitLabel: "Save"
12030
- }, Ph = {
12058
+ }, Rh = {
12031
12059
  id: "crypto-income",
12032
12060
  title: "Crypto Income",
12033
12061
  icon: "🪙",
@@ -12044,7 +12072,7 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
12044
12072
  }
12045
12073
  ],
12046
12074
  submitLabel: "Save"
12047
- }, Mh = {
12075
+ }, Lh = {
12048
12076
  id: "business-profession",
12049
12077
  title: "Business / Profession",
12050
12078
  icon: "💼",
@@ -12084,7 +12112,7 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
12084
12112
  }
12085
12113
  ],
12086
12114
  submitLabel: "Save"
12087
- }, Rh = {
12115
+ }, Nh = {
12088
12116
  id: "bank-details",
12089
12117
  title: "Personal / Bank Details",
12090
12118
  icon: "🏦",
@@ -12098,7 +12126,7 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
12098
12126
  // pre-filled value still rides through to the bank-aadhaar PUT.
12099
12127
  { id: "aadhaarNumber", type: "text", label: "Aadhaar Number", maxLength: 12, readOnly: !0 },
12100
12128
  { id: "bankAccountNumber", type: "text", label: "Bank Account Number", required: !0 },
12101
- { id: "bankIfscCode", type: "text", label: "IFSC Code", required: !0, pattern: Th, maxLength: 11 }
12129
+ { id: "bankIfscCode", type: "text", label: "IFSC Code", required: !0, pattern: Ch, maxLength: 11 }
12102
12130
  ]
12103
12131
  }
12104
12132
  // Hidden for now — re-enable to restore the Immovable Assets group.
@@ -12119,26 +12147,30 @@ const Ih = "^[A-Z]{4}[0-9]{5}[A-Z]$", Th = "^[A-Z]{4}0[A-Z0-9]{6}$", Ch = {
12119
12147
  // },
12120
12148
  ],
12121
12149
  submitLabel: "Save"
12122
- }, Lh = [
12123
- Ch,
12150
+ }, jh = [
12151
+ Ph,
12152
+ Lh,
12124
12153
  Mh,
12154
+ Rh,
12125
12155
  Oh,
12126
- Ph,
12127
- Rh
12156
+ Nh
12128
12157
  // Hidden for now — re-enable to restore the full set:
12129
12158
  // capitalGains,
12130
12159
  // agriculturalIncome,
12131
12160
  // exemptIncome,
12132
- // houseProperty,
12133
12161
  // deductions,
12134
12162
  // taxPaidTds,
12135
12163
  // haveAQuestion,
12136
12164
  ];
12137
- function Nh(s, e) {
12165
+ function Uh(s, e) {
12138
12166
  const t = s || {}, r = {
12139
12167
  userId: Yt(e.userId),
12140
12168
  assessmentYear: e.assessmentYear,
12141
- isRevised: e.isRevised || "N"
12169
+ // Carried through from the pre-fill; the reference payload sends it even
12170
+ // though only the bank/aadhaar section exposes it for editing.
12171
+ aadhaarNumber: Pe(t.aadhaarNumber),
12172
+ isRevised: e.isRevised || "N",
12173
+ timestamp: zh()
12142
12174
  };
12143
12175
  r.us80cAmount = Ie(t.us80cAmount), r.us80dForSelfAndFamilyAmount = Ie(t.us80dForSelfAndFamilyAmount), r.us80dForParentsAmount = Ie(t.us80dForParentsAmount), r.hasParentOverSixty = lo(t.hasParentOverSixty), r.preventiveHealthCheckUp = Ie(t.preventiveHealthCheckUp), r.medicalExpenditure = Ie(t.medicalExpenditure), r.savingBankInterest = Ie(t.savingBankInterest), r.fdInterest = Ie(t.fdInterest), r.dividend = Ie(t.dividend), r.anyOtherIncome = Ie(t.anyOtherIncome), r.cryptoSellValue = Ie(t.cryptoSellPrice), r.cryptoPurchaseAmount = Ie(t.cryptoPurchasePrice), r.vdaPurchaseCost = Ie(t.cryptoPurchasePrice);
12144
12176
  const o = (Ie(t.bizReceiptsBank) ?? 0) + (Ie(t.bizReceiptsCash) ?? 0), n = (Ie(t.profReceiptsBank) ?? 0) + (Ie(t.profReceiptsCash) ?? 0), i = Pe(t.bizName) !== void 0 || o > 0;
@@ -12157,9 +12189,9 @@ function Nh(s, e) {
12157
12189
  amount: Ie(t.immovableAssetCost)
12158
12190
  };
12159
12191
  Object.values(a).some((u) => u !== void 0) && (r.immovableAsset = [a]);
12160
- const l = nn(t.hpDetails, jh);
12192
+ const l = nn(t.hpDetails, Bh);
12161
12193
  l.length && (r.hpDetails = l);
12162
- const c = nn(t.salaryDetails, Uh);
12194
+ const c = nn(t.salaryDetails, Dh);
12163
12195
  if (c.length) {
12164
12196
  r.salaryIncome = c;
12165
12197
  const u = nn(t.salaryDetails, (p) => ({
@@ -12167,19 +12199,20 @@ function Nh(s, e) {
12167
12199
  employerName: Pe(p.employerName)
12168
12200
  }));
12169
12201
  u.length && (r.salary = u);
12170
- const h = Ml(t.salaryDetails)[0] ?? {};
12202
+ const h = Rl(t.salaryDetails)[0] ?? {};
12171
12203
  r.hraAmount = Ie(h.hraReceived), r.leaveTravelAllowanceAmount = Ie(h.leaveTravelAllowance), r.leaveEncashmentAllowanceAmount = Ie(h.leaveEncashment), r.anyOtherAllowanceAmount = Ie(h.anyOtherAllowance), r.salaryIncomeFlag = !0;
12172
12204
  }
12173
12205
  return zr(r);
12174
12206
  }
12175
- function jh(s) {
12207
+ function Bh(s) {
12176
12208
  const e = {
12177
12209
  loanType: "HOME_LOAN",
12178
12210
  loanTakenFrom: Pe(s.loanTakenFrom),
12179
12211
  bankOrInstituteName: Pe(s.lenderName),
12180
12212
  loanAccountNo: Pe(s.loanAccountNumber),
12181
- loanSanctionDate: Hh(s.sanctionDate),
12213
+ loanSanctionDate: Vh(s.sanctionDate),
12182
12214
  totalLoanAmount: Ie(s.totalLoanAmount),
12215
+ loanOutstandingAmount: Ie(s.outstandingAmount),
12183
12216
  interest: Ie(s.homeLoanInterest)
12184
12217
  }, t = Object.entries(e).some(([r, o]) => r !== "loanType" && o !== void 0);
12185
12218
  return {
@@ -12199,7 +12232,7 @@ function jh(s) {
12199
12232
  loanDetails: t ? [e] : void 0
12200
12233
  };
12201
12234
  }
12202
- function Uh(s) {
12235
+ function Dh(s) {
12203
12236
  return {
12204
12237
  grossSalaryIncome: Ie(s.grossSalary),
12205
12238
  salary: Ie(s.basicSalary),
@@ -12215,7 +12248,7 @@ function Uh(s) {
12215
12248
  }
12216
12249
  };
12217
12250
  }
12218
- function Bh(s, e) {
12251
+ function $h(s, e) {
12219
12252
  const t = [];
12220
12253
  for (const r of s) {
12221
12254
  const o = Pe(r.employerName), n = Pe(r.employerTan), i = Ie(r.grossSalary), a = Ie(r.basicSalary), l = Ie(r.totalTdsDeposited);
@@ -12234,7 +12267,7 @@ function Bh(s, e) {
12234
12267
  salary: t
12235
12268
  } : null;
12236
12269
  }
12237
- function Dh(s, e) {
12270
+ function Fh(s, e) {
12238
12271
  const t = Pe(s.aadhaarNumber), r = Pe(s.bankAccountNumber), o = Pe(s.bankIfscCode);
12239
12272
  return t === void 0 && r === void 0 && o === void 0 ? null : {
12240
12273
  userId: Yt(e.userId),
@@ -12243,7 +12276,7 @@ function Dh(s, e) {
12243
12276
  bankDetails: [{ bankAccountNumber: r, bankIfscCode: o }]
12244
12277
  };
12245
12278
  }
12246
- function $h(s, e) {
12279
+ function qh(s, e) {
12247
12280
  return {
12248
12281
  userId: Yt(e.userId),
12249
12282
  assessmentYear: e.assessmentYear,
@@ -12254,7 +12287,7 @@ function $h(s, e) {
12254
12287
  familyPension: Ie(s.familyPension) ?? 0
12255
12288
  };
12256
12289
  }
12257
- function Fh(s, e) {
12290
+ function Hh(s, e) {
12258
12291
  const t = Ie(s.cryptoSellPrice), r = Ie(s.cryptoPurchasePrice);
12259
12292
  return t === void 0 && r === void 0 ? null : {
12260
12293
  userId: Yt(e.userId),
@@ -12263,7 +12296,7 @@ function Fh(s, e) {
12263
12296
  vdaSellCost: t ?? 0
12264
12297
  };
12265
12298
  }
12266
- function qh(s, e) {
12299
+ function Wh(s, e) {
12267
12300
  const t = (o, n, i, a) => {
12268
12301
  const l = Pe(s[o]), c = Pe(s[n]), u = Ie(s[i]), h = Ie(s[a]);
12269
12302
  return l === void 0 && c === void 0 && u === void 0 && h === void 0 ? null : {
@@ -12300,16 +12333,20 @@ function Pe(s) {
12300
12333
  function lo(s) {
12301
12334
  return s === !0 || s === !1 ? s : void 0;
12302
12335
  }
12303
- function Hh(s) {
12336
+ function zh() {
12337
+ const s = /* @__PURE__ */ new Date(), e = (t, r = 2) => String(t).padStart(r, "0");
12338
+ return `${s.getFullYear()}-${e(s.getMonth() + 1)}-${e(s.getDate())}T${e(s.getHours())}:${e(s.getMinutes())}:${e(s.getSeconds())}.${e(s.getMilliseconds(), 3)}`;
12339
+ }
12340
+ function Vh(s) {
12304
12341
  const e = Pe(s);
12305
12342
  if (e)
12306
12343
  return e.includes("T") ? e : /^\d{4}-\d{2}-\d{2}$/.test(e) ? `${e}T00:00:00Z` : e;
12307
12344
  }
12308
- function Ml(s) {
12345
+ function Rl(s) {
12309
12346
  return Array.isArray(s) ? s.filter((e) => e && typeof e == "object") : [];
12310
12347
  }
12311
12348
  function nn(s, e) {
12312
- return Ml(s).map((t) => zr(e(t))).filter((t) => t !== void 0);
12349
+ return Rl(s).map((t) => zr(e(t))).filter((t) => t !== void 0);
12313
12350
  }
12314
12351
  function zr(s) {
12315
12352
  if (Array.isArray(s)) {
@@ -12326,10 +12363,10 @@ function zr(s) {
12326
12363
  }
12327
12364
  return s;
12328
12365
  }
12329
- function Wh(s) {
12366
+ function Kh(s) {
12330
12367
  const e = s && typeof s == "object" ? s : {}, t = {}, r = De(e.employers), o = De(e.taxPaid?.onSalary);
12331
12368
  r.length && (t.salaryDetails = r.map((h) => {
12332
- const p = on(h.salary), b = on(h.perquisites), d = on(h.profitsInLieuOfSalaryType), g = p + b + d, y = Vh(h.allowance);
12369
+ const p = on(h.salary), b = on(h.perquisites), d = on(h.profitsInLieuOfSalaryType), g = p + b + d, y = Jh(h.allowance);
12333
12370
  return {
12334
12371
  employerName: Re(h.employerName),
12335
12372
  employerTan: Re(h.employerTAN),
@@ -12340,7 +12377,7 @@ function Wh(s) {
12340
12377
  leaveTravelAllowance: y.lta,
12341
12378
  leaveEncashment: y.leaveEncashment,
12342
12379
  anyOtherAllowance: y.other,
12343
- totalTdsDeposited: zh(h, o, r) ?? Ne(h.totalTdsDeposited)
12380
+ totalTdsDeposited: Yh(h, o, r) ?? Ne(h.totalTdsDeposited)
12344
12381
  };
12345
12382
  }));
12346
12383
  const n = De(e.houseProperties);
@@ -12351,7 +12388,7 @@ function Wh(s) {
12351
12388
  loanTakenFrom: Re(b?.loanTakenFrom),
12352
12389
  lenderName: Re(b?.bankOrInstituteName),
12353
12390
  loanAccountNumber: Re(b?.loanAccountNo),
12354
- sanctionDate: Re(b?.loanSanctionDate),
12391
+ sanctionDate: Gh(b?.loanSanctionDate),
12355
12392
  totalLoanAmount: Ne(b?.totalLoanAmount),
12356
12393
  outstandingAmount: Ne(b?.loanOutstandingAmount),
12357
12394
  homeLoanInterest: g,
@@ -12398,12 +12435,18 @@ function Wh(s) {
12398
12435
  const c = De(e.capitalGain).filter((h) => Re(h.assetType)?.toUpperCase() === "VDA").flatMap((h) => De(h.assetDetails));
12399
12436
  c.length && (t.cryptoSellPrice = Tt(c.map((h) => Ne(h.sellValue))), t.cryptoPurchasePrice = Tt(c.map((h) => Ne(h.purchaseCost)))), t.agricultureIncome = Ne(e.agriculturalDetails?.income), t.aadhaarNumber = Re(e.aadharNumber);
12400
12437
  const u = De(e.bankDetails)[0];
12401
- return u && (t.bankAccountNumber = Re(u.accountNumber), t.bankIfscCode = Re(u.ifsCode)), Rl(t);
12438
+ return u && (t.bankAccountNumber = Re(u.accountNumber), t.bankIfscCode = Re(u.ifsCode)), Ll(t);
12439
+ }
12440
+ function Gh(s) {
12441
+ const e = Re(s);
12442
+ if (!e) return;
12443
+ const t = /^(\d{4}-\d{2}-\d{2})/.exec(e);
12444
+ return t ? t[1] : e;
12402
12445
  }
12403
12446
  function on(s) {
12404
12447
  return De(s).reduce((e, t) => e + (Ne(t.taxableAmount) ?? 0), 0);
12405
12448
  }
12406
- function zh(s, e, t) {
12449
+ function Yh(s, e, t) {
12407
12450
  if (!e.length) return;
12408
12451
  const r = Re(s.employerTAN)?.trim().toUpperCase();
12409
12452
  if (r) {
@@ -12418,7 +12461,7 @@ function zh(s, e, t) {
12418
12461
  if (t.length === 1 && e.length === 1)
12419
12462
  return Ne(e[0].totalTdsDeposited);
12420
12463
  }
12421
- function Vh(s) {
12464
+ function Jh(s) {
12422
12465
  const e = De(s);
12423
12466
  if (!e.length) return {};
12424
12467
  let t, r, o, n;
@@ -12460,10 +12503,10 @@ function Re(s) {
12460
12503
  const e = String(s).trim();
12461
12504
  return e === "" ? void 0 : e;
12462
12505
  }
12463
- function Rl(s) {
12506
+ function Ll(s) {
12464
12507
  const e = {};
12465
12508
  for (const [t, r] of Object.entries(s))
12466
- r !== void 0 && (Array.isArray(r) ? e[t] = r.map((o) => o && typeof o == "object" ? Rl(o) : o) : e[t] = r);
12509
+ r !== void 0 && (Array.isArray(r) ? e[t] = r.map((o) => o && typeof o == "object" ? Ll(o) : o) : e[t] = r);
12467
12510
  return e;
12468
12511
  }
12469
12512
  function sn() {
@@ -12473,23 +12516,23 @@ function sn() {
12473
12516
  return console.warn(
12474
12517
  "[smart-edit] API disabled: window.__aikaara_runtime__.getChatJwt is missing — the chat was not mounted via the SDK mountFromSlug path."
12475
12518
  ), null;
12476
- const t = s.__aikaara_descriptor__ ?? {}, r = ed(t);
12519
+ const t = s.__aikaara_descriptor__ ?? {}, r = nd(t);
12477
12520
  if (!r)
12478
12521
  return console.warn(
12479
12522
  "[smart-edit] API disabled: could not resolve a TaxBuddy API host from the descriptor (cloud / upload / pan / leader endpoints)."
12480
12523
  ), null;
12481
- const o = td(e.slug), n = typeof o?.tenantJwt == "string" ? o.tenantJwt : "", i = e.getChatJwt, a = async () => n || await i(), l = (o && o.userId != null && o.userId !== "" ? String(o.userId) : nd(e.identity)) || void 0;
12524
+ const o = id(e.slug), n = typeof o?.tenantJwt == "string" ? o.tenantJwt : "", i = e.getChatJwt, a = async () => n || await i(), l = (o && o.userId != null && o.userId !== "" ? String(o.userId) : sd(e.identity)) || void 0;
12482
12525
  return console.info("[smart-edit] API config — base:", r, "· userId:", l ?? "(none)"), {
12483
12526
  baseUrl: r,
12484
12527
  getToken: a,
12485
- headers: rd(t.auth?.headers),
12486
- assessmentYear: t.itr?.assessmentYear || id(),
12528
+ headers: od(t.auth?.headers),
12529
+ assessmentYear: t.itr?.assessmentYear || ad(),
12487
12530
  isRevised: "N",
12488
12531
  userId: l,
12489
12532
  submitUrl: t.itr?.automationSubmitUrl || void 0
12490
12533
  };
12491
12534
  }
12492
- async function Kh(s) {
12535
+ async function Qh(s) {
12493
12536
  const e = await s.getToken(), t = s.userId;
12494
12537
  if (!t)
12495
12538
  throw new Error(
@@ -12507,11 +12550,11 @@ async function Kh(s) {
12507
12550
  const o = await r.text().catch(() => "");
12508
12551
  throw new Error(`[smart-edit] GET /itr/latest-itr → ${r.status} ${o.slice(0, 200)}`);
12509
12552
  }
12510
- return Wh(Ao(await r.json().catch(() => ({}))));
12553
+ return Kh(Ao(await r.json().catch(() => ({}))));
12511
12554
  }
12512
- async function Gh(s, e) {
12555
+ async function zs(s, e) {
12513
12556
  const t = await s.getToken(), r = s.userId, o = {
12514
- ...Nh(e, {
12557
+ ...Uh(e, {
12515
12558
  userId: r,
12516
12559
  assessmentYear: s.assessmentYear,
12517
12560
  isRevised: s.isRevised
@@ -12535,19 +12578,19 @@ async function Gh(s, e) {
12535
12578
  }
12536
12579
  return Ao(await a.json().catch(() => ({})));
12537
12580
  }
12538
- async function Yh(s, e) {
12581
+ async function Xh(s, e) {
12539
12582
  return ur(s, `${s.baseUrl}/itr/v1/automation/salary`, e);
12540
12583
  }
12541
- async function Jh(s, e) {
12584
+ async function Zh(s, e) {
12542
12585
  return ur(s, `${s.baseUrl}/itr/v1/automation/bank-aadhaar`, e);
12543
12586
  }
12544
- async function Qh(s, e) {
12587
+ async function ed(s, e) {
12545
12588
  return ur(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
12546
12589
  }
12547
- async function Xh(s, e) {
12590
+ async function td(s, e) {
12548
12591
  return ur(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
12549
12592
  }
12550
- async function Zh(s, e) {
12593
+ async function rd(s, e) {
12551
12594
  return ur(s, `${s.baseUrl}/itr/v1/automation/vda`, e);
12552
12595
  }
12553
12596
  async function ur(s, e, t) {
@@ -12565,7 +12608,7 @@ async function ur(s, e, t) {
12565
12608
  }
12566
12609
  return Ao(await n.json().catch(() => ({})));
12567
12610
  }
12568
- function ed(s) {
12611
+ function nd(s) {
12569
12612
  const e = [
12570
12613
  s.cloud?.listEndpoint,
12571
12614
  s.cloud?.downloadEndpoint,
@@ -12583,7 +12626,7 @@ function ed(s) {
12583
12626
  }
12584
12627
  return null;
12585
12628
  }
12586
- function td(s) {
12629
+ function id(s) {
12587
12630
  if (!s || typeof localStorage > "u") return null;
12588
12631
  try {
12589
12632
  const e = localStorage.getItem(`aikaara_sso:${s}`);
@@ -12594,7 +12637,7 @@ function td(s) {
12594
12637
  return null;
12595
12638
  }
12596
12639
  }
12597
- function rd(s) {
12640
+ function od(s) {
12598
12641
  const e = {};
12599
12642
  if (!s) return e;
12600
12643
  const t = /^(authorization|content-type|accept)$/i;
@@ -12602,7 +12645,7 @@ function rd(s) {
12602
12645
  !t.test(r) && typeof o == "string" && (e[r] = o);
12603
12646
  return e;
12604
12647
  }
12605
- function nd(s) {
12648
+ function sd(s) {
12606
12649
  if (!s) return;
12607
12650
  const e = s.userId ?? s.id ?? s.ext_uid ?? s.extUid;
12608
12651
  return e == null || e === "" ? void 0 : String(e);
@@ -12614,11 +12657,11 @@ function Ao(s) {
12614
12657
  }
12615
12658
  return {};
12616
12659
  }
12617
- function id() {
12660
+ function ad() {
12618
12661
  const s = /* @__PURE__ */ new Date(), e = s.getMonth() >= 3 ? s.getFullYear() : s.getFullYear() - 1;
12619
12662
  return `${e}-${e + 1}`;
12620
12663
  }
12621
- class od {
12664
+ class ld {
12622
12665
  client;
12623
12666
  panel;
12624
12667
  bubble;
@@ -12630,7 +12673,7 @@ class od {
12630
12673
  isEmbed = !1;
12631
12674
  smartEditModal = null;
12632
12675
  constructor(e, t, r) {
12633
- this.client = new wh(e, {
12676
+ this.client = new _h(e, {
12634
12677
  uploadAdapter: r?.uploadAdapter,
12635
12678
  historyAdapter: r?.historyAdapter
12636
12679
  }), 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), e.chatActions !== void 0 && this.header.setActions(e.chatActions), this.wireEvents();
@@ -12757,11 +12800,11 @@ class od {
12757
12800
  */
12758
12801
  async openSmartEdit() {
12759
12802
  const e = this.ensureSmartEditModal();
12760
- e.open({ schemas: Lh, data: {} });
12803
+ e.open({ schemas: jh, data: {} });
12761
12804
  const t = sn();
12762
12805
  if (!(!t || !t.baseUrl))
12763
12806
  try {
12764
- const r = await Kh(t);
12807
+ const r = await Qh(t);
12765
12808
  e.setData(r);
12766
12809
  } catch (r) {
12767
12810
  console.warn("[smart-edit] fetch failed", r), this.errorBanner.show(
@@ -12794,20 +12837,20 @@ class od {
12794
12837
  const o = { userId: r.userId, assessmentYear: r.assessmentYear };
12795
12838
  try {
12796
12839
  if (e === "salary-hra") {
12797
- const n = Array.isArray(t.salaryDetails) ? t.salaryDetails : [], i = Bh(n, o);
12798
- i && await Yh(r, i);
12840
+ const n = Array.isArray(t.salaryDetails) ? t.salaryDetails : [], i = $h(n, o);
12841
+ i && await Xh(r, i);
12799
12842
  } else if (e === "bank-details") {
12800
- const n = Dh(t, o);
12801
- n && await Jh(r, n);
12843
+ const n = Fh(t, o);
12844
+ n && await Zh(r, n);
12802
12845
  } else if (e === "other-sources")
12803
- await Qh(r, $h(t, o));
12846
+ await ed(r, qh(t, o));
12804
12847
  else if (e === "business-profession") {
12805
- const n = qh(t, o);
12806
- n && await Xh(r, n);
12848
+ const n = Wh(t, o);
12849
+ n && await td(r, n);
12807
12850
  } else if (e === "crypto-income") {
12808
- const n = Fh(t, o);
12809
- n && await Zh(r, n);
12810
- }
12851
+ const n = Hh(t, o);
12852
+ n && await rd(r, n);
12853
+ } else e === "house-property" && await zs(r, t);
12811
12854
  } catch (n) {
12812
12855
  console.warn("[smart-edit] section save failed", e, n), this.errorBanner.show("Failed to save. Please try again.", 4e3);
12813
12856
  }
@@ -12826,7 +12869,7 @@ class od {
12826
12869
  return;
12827
12870
  }
12828
12871
  try {
12829
- await Gh(t, e);
12872
+ await zs(t, e);
12830
12873
  } catch (r) {
12831
12874
  console.warn("[smart-edit] save failed", r), this.errorBanner.show(
12832
12875
  "Failed to save your ITR details. Please try again.",
@@ -12842,7 +12885,7 @@ class od {
12842
12885
  }, 200)));
12843
12886
  }
12844
12887
  }
12845
- class sd extends HTMLElement {
12888
+ class cd extends HTMLElement {
12846
12889
  shadow;
12847
12890
  controller = null;
12848
12891
  _config = {};
@@ -12888,13 +12931,13 @@ class sd extends HTMLElement {
12888
12931
  apiKey: this.getAttribute("api-key") || this._config.apiKey,
12889
12932
  title: this.getAttribute("title") || this._config.title || "Chat",
12890
12933
  subtitle: this.getAttribute("subtitle") || this._config.subtitle,
12891
- theme: this.getAttribute("theme") || this._config.theme || Jl,
12934
+ theme: this.getAttribute("theme") || this._config.theme || Ql,
12892
12935
  primaryColor: this.getAttribute("primary-color") || this._config.primaryColor || Co,
12893
- position: this.getAttribute("position") || this._config.position || Yl,
12894
- width: Number(this.getAttribute("width")) || this._config.width || zl,
12895
- height: Number(this.getAttribute("height")) || this._config.height || Vl,
12896
- fontFamily: this._config.fontFamily || Gl,
12897
- borderRadius: this._config.borderRadius ?? Kl,
12936
+ position: this.getAttribute("position") || this._config.position || Jl,
12937
+ width: Number(this.getAttribute("width")) || this._config.width || Vl,
12938
+ height: Number(this.getAttribute("height")) || this._config.height || Kl,
12939
+ fontFamily: this._config.fontFamily || Yl,
12940
+ borderRadius: this._config.borderRadius ?? Gl,
12898
12941
  placeholder: this.getAttribute("placeholder") || this._config.placeholder || Oo,
12899
12942
  welcomeMessage: this.getAttribute("welcome-message") || this._config.welcomeMessage,
12900
12943
  avatarUrl: this.getAttribute("avatar-url") || this._config.avatarUrl,
@@ -12908,7 +12951,7 @@ class sd extends HTMLElement {
12908
12951
  chatActions: this._config.chatActions,
12909
12952
  showBubble: this._config.showBubble ?? !0,
12910
12953
  display: (this.getAttribute("display") || this._config.display) ?? "popup",
12911
- offset: this._config.offset || Ql,
12954
+ offset: this._config.offset || Xl,
12912
12955
  conversationId: this._config.conversationId,
12913
12956
  systemPromptId: this._config.systemPromptId,
12914
12957
  channel: this._config.channel,
@@ -13111,7 +13154,7 @@ class sd extends HTMLElement {
13111
13154
  }
13112
13155
  async initController() {
13113
13156
  const e = this.getConfig(), t = e.transport ?? "aikaara";
13114
- (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new od(e, this.shadow, {
13157
+ (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new ld(e, this.shadow, {
13115
13158
  uploadAdapter: this._config.uploadAdapter,
13116
13159
  historyAdapter: this._config.historyAdapter
13117
13160
  }), await this.controller.connect());
@@ -13131,7 +13174,7 @@ class sd extends HTMLElement {
13131
13174
  }
13132
13175
  }
13133
13176
  }
13134
- class ad extends HTMLElement {
13177
+ class ud extends HTMLElement {
13135
13178
  shadow;
13136
13179
  constructor() {
13137
13180
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -13184,12 +13227,12 @@ class ad extends HTMLElement {
13184
13227
  t && (t.innerHTML = e);
13185
13228
  }
13186
13229
  }
13187
- const ld = [
13230
+ const hd = [
13188
13231
  { id: "edit-itr", label: "Edit ITR Details", icon: "edit" }
13189
13232
  ];
13190
- class cd extends HTMLElement {
13233
+ class dd extends HTMLElement {
13191
13234
  shadow;
13192
- actions = ld;
13235
+ actions = hd;
13193
13236
  menuOpen = !1;
13194
13237
  outsideClickHandler = null;
13195
13238
  static get observedAttributes() {
@@ -13415,7 +13458,7 @@ class cd extends HTMLElement {
13415
13458
  this.setAttribute("status", e);
13416
13459
  }
13417
13460
  }
13418
- const ud = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i, hd = /&(quot|apos|amp|lt|gt|nbsp|#\d+|#x[0-9a-f]+);/i, dd = {
13461
+ const fd = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i, pd = /&(quot|apos|amp|lt|gt|nbsp|#\d+|#x[0-9a-f]+);/i, md = {
13419
13462
  "&quot;": '"',
13420
13463
  "&apos;": "'",
13421
13464
  "&lt;": "<",
@@ -13423,14 +13466,14 @@ const ud = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|p
13423
13466
  "&amp;": "&",
13424
13467
  "&nbsp;": " "
13425
13468
  };
13426
- function fd(s) {
13427
- return s.replace(/&(quot|apos|lt|gt|nbsp);/gi, (e) => dd[e.toLowerCase()] ?? e).replace(/&#(\d+);/g, (e, t) => String.fromCharCode(parseInt(t, 10))).replace(/&#x([0-9a-f]+);/gi, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/&amp;/gi, "&");
13469
+ function gd(s) {
13470
+ return s.replace(/&(quot|apos|lt|gt|nbsp);/gi, (e) => md[e.toLowerCase()] ?? e).replace(/&#(\d+);/g, (e, t) => String.fromCharCode(parseInt(t, 10))).replace(/&#x([0-9a-f]+);/gi, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/&amp;/gi, "&");
13428
13471
  }
13429
13472
  function qt(s) {
13430
- if (ud.test(s))
13473
+ if (fd.test(s))
13431
13474
  return s;
13432
- const e = hd.test(s) ? fd(s) : s;
13433
- let t = pd(e);
13475
+ const e = pd.test(s) ? gd(s) : s;
13476
+ let t = bd(e);
13434
13477
  return t = t.replace(/```(\w*)\n([\s\S]*?)```/g, (r, o, n) => `<pre><code>${n.trim()}</code></pre>`), t = t.replace(/`([^`]+)`/g, "<code>$1</code>"), t = t.replace(/\*\*(.+?)\*\*/g, "<strong>$1</strong>"), t = t.replace(/\*(.+?)\*/g, "<em>$1</em>"), t = t.replace(
13435
13478
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
13436
13479
  '<a href="$2" target="_self" rel="noopener noreferrer">$1</a>'
@@ -13442,7 +13485,7 @@ function qt(s) {
13442
13485
  }
13443
13486
  ), t = t.replace(/\n/g, "<br>"), t;
13444
13487
  }
13445
- function pd(s) {
13488
+ function bd(s) {
13446
13489
  const e = {
13447
13490
  "&": "&amp;",
13448
13491
  "<": "&lt;",
@@ -13452,7 +13495,7 @@ function pd(s) {
13452
13495
  };
13453
13496
  return s.replace(/[&<>"']/g, (t) => e[t]);
13454
13497
  }
13455
- const md = /* @__PURE__ */ new Set([
13498
+ const yd = /* @__PURE__ */ new Set([
13456
13499
  "p",
13457
13500
  "br",
13458
13501
  "hr",
@@ -13487,7 +13530,7 @@ const md = /* @__PURE__ */ new Set([
13487
13530
  "tr",
13488
13531
  "th",
13489
13532
  "td"
13490
- ]), gd = {
13533
+ ]), vd = {
13491
13534
  a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
13492
13535
  img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
13493
13536
  code: /* @__PURE__ */ new Set(["class"]),
@@ -13497,29 +13540,29 @@ const md = /* @__PURE__ */ new Set([
13497
13540
  };
13498
13541
  function Ht(s) {
13499
13542
  const e = document.createElement("template");
13500
- return e.innerHTML = s, Ll(e.content), e.innerHTML;
13543
+ return e.innerHTML = s, Nl(e.content), e.innerHTML;
13501
13544
  }
13502
- function Ll(s) {
13545
+ function Nl(s) {
13503
13546
  const e = Array.from(s.childNodes);
13504
13547
  for (const t of e)
13505
13548
  if (t.nodeType === Node.ELEMENT_NODE) {
13506
13549
  const r = t, o = r.tagName.toLowerCase();
13507
- if (!md.has(o)) {
13550
+ if (!yd.has(o)) {
13508
13551
  const a = document.createTextNode(r.textContent || "");
13509
13552
  s.replaceChild(a, t);
13510
13553
  continue;
13511
13554
  }
13512
- const n = gd[o] || /* @__PURE__ */ new Set(), i = Array.from(r.attributes);
13555
+ const n = vd[o] || /* @__PURE__ */ new Set(), i = Array.from(r.attributes);
13513
13556
  for (const a of i)
13514
13557
  n.has(a.name) || r.removeAttribute(a.name);
13515
13558
  if (r.hasAttribute("href")) {
13516
13559
  const a = r.getAttribute("href") || "";
13517
13560
  !a.startsWith("http://") && !a.startsWith("https://") && !a.startsWith("/") && r.removeAttribute("href");
13518
13561
  }
13519
- Ll(t);
13562
+ Nl(t);
13520
13563
  }
13521
13564
  }
13522
- function bd(s, e = {}) {
13565
+ function wd(s, e = {}) {
13523
13566
  const { width: t = 600, height: r = 700, closeOnTypes: o } = e, n = Math.round(window.screenX + (window.outerWidth - t) / 2), i = Math.round(window.screenY + (window.outerHeight - r) / 2), a = window.open(
13524
13567
  s,
13525
13568
  "aikaara_popup",
@@ -13537,7 +13580,7 @@ function bd(s, e = {}) {
13537
13580
  }, 500);
13538
13581
  return a;
13539
13582
  }
13540
- function yd(s) {
13583
+ function _d(s) {
13541
13584
  const e = Date.now() - s.getTime(), t = Math.round(e / 1e3);
13542
13585
  if (t < 5) return "just now";
13543
13586
  if (t < 60) return `${t}s ago`;
@@ -13548,7 +13591,7 @@ function yd(s) {
13548
13591
  const n = Math.round(o / 24);
13549
13592
  return n === 1 ? "Yesterday" : n < 7 ? `${n} d ago` : s.toLocaleDateString(void 0, { month: "short", day: "2-digit" });
13550
13593
  }
13551
- class vd extends HTMLElement {
13594
+ class kd extends HTMLElement {
13552
13595
  shadow;
13553
13596
  container;
13554
13597
  welcomeMessage = "";
@@ -13598,7 +13641,7 @@ class vd extends HTMLElement {
13598
13641
  (i) => i && i.tagName === "A"
13599
13642
  );
13600
13643
  if (!r || !r.href || r.dataset.noModal !== void 0 || r.target === "_blank" || r.classList.contains("attachment")) return;
13601
- const o = this.linkHandlers.some((i) => zs(r.href, i.match));
13644
+ const o = this.linkHandlers.some((i) => Vs(r.href, i.match));
13602
13645
  r.target === "_self" && !o || t.some((i) => {
13603
13646
  if (!i || !i.classList) return !1;
13604
13647
  const a = i.classList;
@@ -13801,7 +13844,7 @@ class vd extends HTMLElement {
13801
13844
  if (n.role === "user") {
13802
13845
  const i = n.metadata?.attributes?.action;
13803
13846
  if (i) {
13804
- const a = wd(i);
13847
+ const a = xd(i);
13805
13848
  if (i.message_id && t.set(i.message_id, a), Object.keys(a).length > 0)
13806
13849
  for (let l = o - 1; l >= 0; l--) {
13807
13850
  const c = e[l];
@@ -13939,7 +13982,7 @@ class vd extends HTMLElement {
13939
13982
  case "date":
13940
13983
  return r;
13941
13984
  case "relative":
13942
- return yd(t);
13985
+ return _d(t);
13943
13986
  case "time-24":
13944
13987
  return t.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", hour12: !1 });
13945
13988
  case "time-seconds":
@@ -13959,13 +14002,13 @@ class vd extends HTMLElement {
13959
14002
  * data, or opens in a new tab depending on the matched handler.
13960
14003
  */
13961
14004
  async handleLinkClick(e, t) {
13962
- const r = this.linkHandlers.find((b) => zs(e, b.match)), o = r?.target ?? "iframe";
14005
+ const r = this.linkHandlers.find((b) => Vs(e, b.match)), o = r?.target ?? "iframe";
13963
14006
  if (o === "tab") {
13964
14007
  window.open(e, "_blank", "noopener,noreferrer");
13965
14008
  return;
13966
14009
  }
13967
14010
  if (o === "popup") {
13968
- bd(e);
14011
+ wd(e);
13969
14012
  return;
13970
14013
  }
13971
14014
  const n = this.getOrCreateModal(), i = r?.title ?? t ?? "Link";
@@ -13973,7 +14016,7 @@ class vd extends HTMLElement {
13973
14016
  requestAnimationFrame(() => n.show?.(e, i));
13974
14017
  return;
13975
14018
  }
13976
- const a = _d(e), l = Nl(r.fetch.url, a), c = {
14019
+ const a = Sd(e), l = jl(r.fetch.url, a), c = {
13977
14020
  accept: "application/json",
13978
14021
  ...r.fetch.headers ?? {}
13979
14022
  }, u = r.fetch.authHeader ?? "session";
@@ -14019,17 +14062,17 @@ class vd extends HTMLElement {
14019
14062
  return e || (e = document.createElement("aikaara-link-modal"), document.body.appendChild(e)), e;
14020
14063
  }
14021
14064
  }
14022
- function wd(s) {
14065
+ function xd(s) {
14023
14066
  const e = /* @__PURE__ */ new Set(["message_id", "formAction", "requestType"]), t = {};
14024
14067
  for (const [r, o] of Object.entries(s))
14025
14068
  e.has(r) || (Array.isArray(o) && o.every((n) => typeof n == "string") ? t[r] = o : typeof o == "string" && (t[r] = [o]));
14026
14069
  return t;
14027
14070
  }
14028
- function zs(s, e) {
14071
+ function Vs(s, e) {
14029
14072
  const t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&");
14030
14073
  return new RegExp("^" + t.replace(/\*/g, ".*").replace(/\?/g, ".") + "$", "i").test(s);
14031
14074
  }
14032
- function _d(s) {
14075
+ function Sd(s) {
14033
14076
  try {
14034
14077
  const e = new URL(s), t = {};
14035
14078
  return e.searchParams.forEach((r, o) => {
@@ -14039,11 +14082,11 @@ function _d(s) {
14039
14082
  return {};
14040
14083
  }
14041
14084
  }
14042
- function Nl(s, e) {
14085
+ function jl(s, e) {
14043
14086
  return s.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
14044
14087
  }
14045
14088
  function co(s, e) {
14046
- if (typeof s == "string") return Nl(s, e);
14089
+ if (typeof s == "string") return jl(s, e);
14047
14090
  if (Array.isArray(s)) return s.map((t) => co(t, e));
14048
14091
  if (s && typeof s == "object") {
14049
14092
  const t = {};
@@ -14052,7 +14095,7 @@ function co(s, e) {
14052
14095
  }
14053
14096
  return s;
14054
14097
  }
14055
- class kd extends HTMLElement {
14098
+ class Ed extends HTMLElement {
14056
14099
  shadow;
14057
14100
  templatePayload = null;
14058
14101
  attachments = [];
@@ -14144,7 +14187,7 @@ class kd extends HTMLElement {
14144
14187
  ${n ? `<aikaara-template-renderer
14145
14188
  content-type="${n}"
14146
14189
  template-id="${i}"
14147
- inner-message="${Vs(a)}"
14190
+ inner-message="${Ks(a)}"
14148
14191
  ></aikaara-template-renderer>` : ""}
14149
14192
  ${this.renderAttachments()}
14150
14193
  </div>
@@ -14167,19 +14210,19 @@ class kd extends HTMLElement {
14167
14210
  }
14168
14211
  renderAttachments() {
14169
14212
  return this.attachments.length ? `<div class="attachments">${this.attachments.map(
14170
- (t) => `<a class="attachment" href="${Vs(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
14171
- 📎 ${xd(t.fileName)}
14213
+ (t) => `<a class="attachment" href="${Ks(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
14214
+ 📎 ${Ad(t.fileName)}
14172
14215
  </a>`
14173
14216
  ).join("")}</div>` : "";
14174
14217
  }
14175
14218
  }
14176
- function Vs(s) {
14219
+ function Ks(s) {
14177
14220
  return String(s).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
14178
14221
  }
14179
- function xd(s) {
14222
+ function Ad(s) {
14180
14223
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
14181
14224
  }
14182
- class Sd extends HTMLElement {
14225
+ class Id extends HTMLElement {
14183
14226
  shadow;
14184
14227
  textarea;
14185
14228
  sendBtn;
@@ -14330,7 +14373,7 @@ class Sd extends HTMLElement {
14330
14373
  this.textarea.style.height = "auto", this.textarea.style.height = Math.min(this.textarea.scrollHeight, 120) + "px";
14331
14374
  }
14332
14375
  }
14333
- class Ed extends HTMLElement {
14376
+ class Td extends HTMLElement {
14334
14377
  shadow;
14335
14378
  constructor() {
14336
14379
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -14379,7 +14422,7 @@ class Ed extends HTMLElement {
14379
14422
  this.removeAttribute("visible");
14380
14423
  }
14381
14424
  }
14382
- class Ad extends HTMLElement {
14425
+ class Cd extends HTMLElement {
14383
14426
  shadow;
14384
14427
  bubble;
14385
14428
  constructor() {
@@ -14444,7 +14487,7 @@ class Ad extends HTMLElement {
14444
14487
  this.bubble?.classList.remove("cursor");
14445
14488
  }
14446
14489
  }
14447
- class Id extends HTMLElement {
14490
+ class Od extends HTMLElement {
14448
14491
  shadow;
14449
14492
  container;
14450
14493
  dismissTimer = null;
@@ -14491,7 +14534,7 @@ class Id extends HTMLElement {
14491
14534
  }
14492
14535
  }
14493
14536
  const an = /* @__PURE__ */ new Map();
14494
- function jl(s) {
14537
+ function Ul(s) {
14495
14538
  const e = an.get(s);
14496
14539
  if (e) return e;
14497
14540
  const t = new Promise((r, o) => {
@@ -14517,7 +14560,7 @@ function jl(s) {
14517
14560
  });
14518
14561
  return an.set(s, t), t;
14519
14562
  }
14520
- function Td(s, e = 5e3) {
14563
+ function Pd(s, e = 5e3) {
14521
14564
  return new Promise((t, r) => {
14522
14565
  const o = setTimeout(() => r(new Error(`Custom element <${s}> not registered within ${e}ms`)), e);
14523
14566
  customElements.whenDefined(s).then(() => {
@@ -14525,14 +14568,14 @@ function Td(s, e = 5e3) {
14525
14568
  });
14526
14569
  });
14527
14570
  }
14528
- const Cd = {
14571
+ const Md = {
14529
14572
  "aikaara-template-payment-link": () => import("./AikaaraPaymentLink-CL4O6gbc.mjs").then(({ registerAikaaraPaymentLink: s }) => s())
14530
14573
  };
14531
- function Od(s) {
14574
+ function Rd(s) {
14532
14575
  const e = `template:${s}`, t = window.__aikaara_descriptor__?.components?.[e];
14533
14576
  return t && t.kind === "iife-element" ? { render: t.tag, scriptUrl: t.scriptUrl, props: t.props } : window.__aikaara_descriptor__?.templates?.[s];
14534
14577
  }
14535
- class Pd extends HTMLElement {
14578
+ class Ld extends HTMLElement {
14536
14579
  shadow;
14537
14580
  payloadData = null;
14538
14581
  innerMessage = "";
@@ -14556,7 +14599,7 @@ class Pd extends HTMLElement {
14556
14599
  this.render(), this.addEventListener("template-action", (e) => {
14557
14600
  const t = e.detail, r = this.getAttribute("message-id");
14558
14601
  if (r && t?.attributes?.action) {
14559
- const o = Ld(t.attributes.action);
14602
+ const o = Ud(t.attributes.action);
14560
14603
  if (Object.keys(o).length > 0)
14561
14604
  try {
14562
14605
  localStorage.setItem(`aikaara_form:${r}`, JSON.stringify(o));
@@ -14632,8 +14675,8 @@ class Pd extends HTMLElement {
14632
14675
  <slot></slot>
14633
14676
  `; this.firstChild; ) this.removeChild(this.firstChild);
14634
14677
  if (!e) return;
14635
- const r = t ? Od(t) : void 0, o = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`), n = Cd[o];
14636
- if (n && !customElements.get(o) ? n().then(() => this.render()).catch((i) => console.warn(`[aikaara-template-renderer] native template ${o} failed to load`, i)) : r?.scriptUrl && !customElements.get(o) && jl(r.scriptUrl).then(() => Td(o)).then(() => this.render()).catch((i) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, i)), customElements.get(o)) {
14678
+ const r = t ? Rd(t) : void 0, o = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`), n = Md[o];
14679
+ if (n && !customElements.get(o) ? n().then(() => this.render()).catch((i) => console.warn(`[aikaara-template-renderer] native template ${o} failed to load`, i)) : r?.scriptUrl && !customElements.get(o) && Ul(r.scriptUrl).then(() => Pd(o)).then(() => this.render()).catch((i) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, i)), customElements.get(o)) {
14637
14680
  const i = document.createElement(o);
14638
14681
  if (r?.props) {
14639
14682
  for (const [a, l] of Object.entries(r.props))
@@ -14720,7 +14763,7 @@ class Pd extends HTMLElement {
14720
14763
  */
14721
14764
  mountLinkButton(e) {
14722
14765
  const t = this.renderGen;
14723
- import("./AikaaraLinkButton-DsJc3CEK.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: o }) => {
14766
+ import("./AikaaraLinkButton-hgl2FaWZ.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: o }) => {
14724
14767
  if (t !== this.renderGen) return;
14725
14768
  r();
14726
14769
  const n = document.createElement("aikaara-link-button");
@@ -14729,7 +14772,7 @@ class Pd extends HTMLElement {
14729
14772
  url: e.url ?? "",
14730
14773
  openLinkInNewTab: e.openLinkInNewTab,
14731
14774
  orderId: e.orderId,
14732
- extra: Rd(e),
14775
+ extra: jd(e),
14733
14776
  messageId: this.getAttribute("message-id") ?? void 0
14734
14777
  }), this.appendChild(n);
14735
14778
  });
@@ -14739,26 +14782,26 @@ class Pd extends HTMLElement {
14739
14782
  t.setPayload(e), this.appendChild(t);
14740
14783
  }
14741
14784
  }
14742
- const Md = /* @__PURE__ */ new Set([
14785
+ const Nd = /* @__PURE__ */ new Set([
14743
14786
  "type",
14744
14787
  "url",
14745
14788
  "name",
14746
14789
  "openLinkInNewTab",
14747
14790
  "orderId"
14748
14791
  ]);
14749
- function Rd(s) {
14792
+ function jd(s) {
14750
14793
  const e = {};
14751
14794
  for (const [t, r] of Object.entries(s))
14752
- Md.has(t) || (e[t] = r);
14795
+ Nd.has(t) || (e[t] = r);
14753
14796
  return e;
14754
14797
  }
14755
- function Ld(s) {
14798
+ function Ud(s) {
14756
14799
  const e = /* @__PURE__ */ new Set(["message_id", "formAction", "requestType", "serviceType"]), t = {};
14757
14800
  for (const [r, o] of Object.entries(s))
14758
14801
  e.has(r) || (Array.isArray(o) && o.every((n) => typeof n == "string") ? t[r] = o : typeof o == "string" && (t[r] = [o]));
14759
14802
  return t;
14760
14803
  }
14761
- class Nd extends HTMLElement {
14804
+ class Bd extends HTMLElement {
14762
14805
  shadow;
14763
14806
  static get observedAttributes() {
14764
14807
  return ["text", "subtext"];
@@ -14799,15 +14842,15 @@ class Nd extends HTMLElement {
14799
14842
  color: var(--aikaara-text-secondary, #9ca3af);
14800
14843
  }
14801
14844
  </style>
14802
- <span class="pill">${Ks(e)}</span>
14803
- ${t ? `<span class="sub">${Ks(t)}</span>` : ""}
14845
+ <span class="pill">${Gs(e)}</span>
14846
+ ${t ? `<span class="sub">${Gs(t)}</span>` : ""}
14804
14847
  `;
14805
14848
  }
14806
14849
  }
14807
- function Ks(s) {
14850
+ function Gs(s) {
14808
14851
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
14809
14852
  }
14810
- class jd extends HTMLElement {
14853
+ class Dd extends HTMLElement {
14811
14854
  shadow;
14812
14855
  data = null;
14813
14856
  selected = /* @__PURE__ */ new Set();
@@ -15032,7 +15075,7 @@ function Ct(s) {
15032
15075
  function ln(s) {
15033
15076
  return String(s).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
15034
15077
  }
15035
- class Ud extends HTMLElement {
15078
+ class $d extends HTMLElement {
15036
15079
  shadow;
15037
15080
  data = null;
15038
15081
  constructor() {
@@ -15101,14 +15144,14 @@ class Ud extends HTMLElement {
15101
15144
  button:hover { background: var(--aikaara-submit-hover-bg, var(--aikaara-primary-hover, #4f46e5)); }
15102
15145
  button:disabled { opacity: var(--aikaara-submit-disabled-opacity, 0.5); cursor: not-allowed; }
15103
15146
  </style>
15104
- <button type="button">${Bd(e)}</button>
15147
+ <button type="button">${Fd(e)}</button>
15105
15148
  `, this.shadow.querySelector("button").addEventListener("click", () => this.handleClick());
15106
15149
  }
15107
15150
  }
15108
- function Bd(s) {
15151
+ function Fd(s) {
15109
15152
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15110
15153
  }
15111
- class Dd extends HTMLElement {
15154
+ class qd extends HTMLElement {
15112
15155
  shadow;
15113
15156
  data = null;
15114
15157
  dismissed = !1;
@@ -15200,7 +15243,7 @@ class Dd extends HTMLElement {
15200
15243
  function cn(s) {
15201
15244
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15202
15245
  }
15203
- class $d extends HTMLElement {
15246
+ class Hd extends HTMLElement {
15204
15247
  shadow;
15205
15248
  data = null;
15206
15249
  _value = "";
@@ -15307,7 +15350,7 @@ function er(s) {
15307
15350
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
15308
15351
  );
15309
15352
  }
15310
- class Fd extends HTMLElement {
15353
+ class Wd extends HTMLElement {
15311
15354
  static get observedAttributes() {
15312
15355
  return ["slug", "user-id", "user-name", "user-token", "department-id", "config-base", "api-key"];
15313
15356
  }
@@ -15361,7 +15404,7 @@ class Fd extends HTMLElement {
15361
15404
  const l = Object.keys(n).length > 0 ? n : void 0;
15362
15405
  return this.mountInflight = (async () => {
15363
15406
  try {
15364
- this.mounted = await xf({
15407
+ this.mounted = await Af({
15365
15408
  container: this,
15366
15409
  slug: e,
15367
15410
  configBase: this.getAttribute("config-base") ?? void 0,
@@ -15390,7 +15433,7 @@ class Fd extends HTMLElement {
15390
15433
  })(), this.mountInflight;
15391
15434
  }
15392
15435
  }
15393
- class qd extends HTMLElement {
15436
+ class zd extends HTMLElement {
15394
15437
  shadow;
15395
15438
  root = null;
15396
15439
  iframe = null;
@@ -15507,7 +15550,7 @@ class qd extends HTMLElement {
15507
15550
  });
15508
15551
  }
15509
15552
  }
15510
- const Hd = [
15553
+ const Vd = [
15511
15554
  { label: "Self-filing guidance" },
15512
15555
  { label: "Smart tax suggestions" },
15513
15556
  { label: "Auto-fetch 26AS / AIS" },
@@ -15515,7 +15558,7 @@ const Hd = [
15515
15558
  { label: "Dedicated tax expert" },
15516
15559
  { label: "End-to-end filing" },
15517
15560
  { label: "Document handling" }
15518
- ], Wd = [
15561
+ ], Kd = [
15519
15562
  {
15520
15563
  label: "DIY",
15521
15564
  match: ["DIY", "DIY_SALARY"],
@@ -15538,11 +15581,11 @@ const Hd = [
15538
15581
  features: [!0, !0, !0, !0, !0, !0, !0]
15539
15582
  }
15540
15583
  ];
15541
- class zd extends HTMLElement {
15584
+ class Gd extends HTMLElement {
15542
15585
  shadow;
15543
15586
  data = null;
15544
- columns = Wd;
15545
- features = Hd;
15587
+ columns = Kd;
15588
+ features = Vd;
15546
15589
  constructor() {
15547
15590
  super(), this.shadow = this.attachShadow({ mode: "open" });
15548
15591
  }
@@ -15675,7 +15718,7 @@ function un(s) {
15675
15718
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
15676
15719
  );
15677
15720
  }
15678
- class Vd extends HTMLElement {
15721
+ class Yd extends HTMLElement {
15679
15722
  shadow;
15680
15723
  root = null;
15681
15724
  schemas = [];
@@ -15762,13 +15805,13 @@ class Vd extends HTMLElement {
15762
15805
  t.innerHTML = `
15763
15806
  <span class="header-spacer"></span>
15764
15807
  <div class="modal-title">Correct Your ITR Details</div>
15765
- <button class="icon-btn close-btn" type="button" aria-label="Close">${Gs}</button>
15808
+ <button class="icon-btn close-btn" type="button" aria-label="Close">${Ys}</button>
15766
15809
  `;
15767
15810
  const r = this.shadow.querySelector(".modal-body"), o = this.schemas.map(
15768
15811
  (i) => `
15769
- <button class="chip" type="button" data-section-id="${Gd(i.id)}">
15812
+ <button class="chip" type="button" data-section-id="${Qd(i.id)}">
15770
15813
  <span class="chip-icon">${i.icon ?? "📄"}</span>
15771
- <span class="chip-label">${Ys(i.title)}</span>
15814
+ <span class="chip-label">${Js(i.title)}</span>
15772
15815
  </button>`
15773
15816
  ).join("");
15774
15817
  r.innerHTML = `
@@ -15799,9 +15842,9 @@ class Vd extends HTMLElement {
15799
15842
  e.classList.remove("view-picker"), e.classList.add("view-form");
15800
15843
  const t = this.schemas.find((n) => n.id === this.activeSectionId), r = this.shadow.querySelector(".modal-header");
15801
15844
  r.innerHTML = `
15802
- <button class="icon-btn back-btn" type="button" aria-label="Back">${Kd}</button>
15803
- <div class="modal-title">${Ys(t?.title ?? "Edit")}</div>
15804
- <button class="icon-btn close-btn" type="button" aria-label="Close">${Gs}</button>
15845
+ <button class="icon-btn back-btn" type="button" aria-label="Back">${Jd}</button>
15846
+ <div class="modal-title">${Js(t?.title ?? "Edit")}</div>
15847
+ <button class="icon-btn close-btn" type="button" aria-label="Close">${Ys}</button>
15805
15848
  `;
15806
15849
  const o = this.shadow.querySelector(".modal-footer");
15807
15850
  o.style.display = "none", o.innerHTML = "", this.bindCommon(), r.querySelector(".back-btn")?.addEventListener("click", () => this.backToPicker()), this.mountActiveForm();
@@ -15975,14 +16018,14 @@ class Vd extends HTMLElement {
15975
16018
  `;
15976
16019
  }
15977
16020
  }
15978
- const Gs = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Kd = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>';
15979
- function Gd(s) {
16021
+ const Ys = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>', Jd = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>';
16022
+ function Qd(s) {
15980
16023
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
15981
16024
  }
15982
- function Ys(s) {
16025
+ function Js(s) {
15983
16026
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
15984
16027
  }
15985
- class Yd extends HTMLElement {
16028
+ class Xd extends HTMLElement {
15986
16029
  shadow;
15987
16030
  schema = null;
15988
16031
  value = {};
@@ -16438,33 +16481,33 @@ function wt(s) {
16438
16481
  function Ge(s) {
16439
16482
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
16440
16483
  }
16441
- function Jd() {
16484
+ function Zd() {
16442
16485
  const s = [
16443
- ["aikaara-chat-widget", sd],
16444
- ["aikaara-chat-bubble", ad],
16445
- ["aikaara-chat-header", cd],
16446
- ["aikaara-message-list", vd],
16447
- ["aikaara-message-bubble", kd],
16448
- ["aikaara-chat-input", Sd],
16449
- ["aikaara-typing-indicator", Ed],
16450
- ["aikaara-streaming-message", Ad],
16451
- ["aikaara-error-banner", Id],
16452
- ["aikaara-template-renderer", Pd],
16453
- ["aikaara-system-pill", Nd],
16454
- ["aikaara-option-list", jd],
16455
- ["aikaara-submit-action", Ud],
16456
- ["aikaara-modal-action", Dd],
16457
- ["aikaara-text-input", $d],
16458
- ["aikaara-chat", Fd],
16459
- ["aikaara-link-modal", qd],
16460
- ["aikaara-compare-plans", zd],
16461
- ["aikaara-smart-edit-modal", Vd],
16462
- ["aikaara-schema-form", Yd]
16486
+ ["aikaara-chat-widget", cd],
16487
+ ["aikaara-chat-bubble", ud],
16488
+ ["aikaara-chat-header", dd],
16489
+ ["aikaara-message-list", kd],
16490
+ ["aikaara-message-bubble", Ed],
16491
+ ["aikaara-chat-input", Id],
16492
+ ["aikaara-typing-indicator", Td],
16493
+ ["aikaara-streaming-message", Cd],
16494
+ ["aikaara-error-banner", Od],
16495
+ ["aikaara-template-renderer", Ld],
16496
+ ["aikaara-system-pill", Bd],
16497
+ ["aikaara-option-list", Dd],
16498
+ ["aikaara-submit-action", $d],
16499
+ ["aikaara-modal-action", qd],
16500
+ ["aikaara-text-input", Hd],
16501
+ ["aikaara-chat", Wd],
16502
+ ["aikaara-link-modal", zd],
16503
+ ["aikaara-compare-plans", Gd],
16504
+ ["aikaara-smart-edit-modal", Yd],
16505
+ ["aikaara-schema-form", Xd]
16463
16506
  ];
16464
16507
  for (const [e, t] of s)
16465
16508
  customElements.get(e) || customElements.define(e, t);
16466
16509
  }
16467
- Jd();
16510
+ Zd();
16468
16511
  function mr(s, e, t = "") {
16469
16512
  if (!e) return t;
16470
16513
  const r = e.split(".");
@@ -16475,7 +16518,7 @@ function mr(s, e, t = "") {
16475
16518
  else return t;
16476
16519
  return typeof o == "string" ? o : t;
16477
16520
  }
16478
- function Js(s) {
16521
+ function Qs(s) {
16479
16522
  try {
16480
16523
  const e = s.split(".")[1];
16481
16524
  if (!e) return 0;
@@ -16490,7 +16533,7 @@ function Js(s) {
16490
16533
  async function Wt(s) {
16491
16534
  return typeof s == "function" ? await s() : s;
16492
16535
  }
16493
- class Qd {
16536
+ class ef {
16494
16537
  constructor(e, t) {
16495
16538
  this.descriptor = e, this.sessionToken = t;
16496
16539
  }
@@ -16508,7 +16551,7 @@ class Qd {
16508
16551
  */
16509
16552
  prime(e, t = {}) {
16510
16553
  if (!e) return;
16511
- const r = Js(e) || Date.now() + 3600 * 1e3;
16554
+ const r = Qs(e) || Date.now() + 3600 * 1e3;
16512
16555
  this.cache = {
16513
16556
  token: e,
16514
16557
  requestId: t.requestId ?? this.cache?.requestId ?? "",
@@ -16537,14 +16580,14 @@ class Qd {
16537
16580
  }
16538
16581
  const l = await a.json().catch(() => ({})), c = mr(l, this.descriptor.tokenPath ?? "data.token"), u = this.descriptor.tokenStripPrefix, h = u ? c.replace(new RegExp(`^${u}`, "i"), "").trim() : c;
16539
16582
  if (!h) throw new Error("Session auth response missing token");
16540
- const p = mr(l, this.descriptor.requestIdPath ?? "data.requestId"), b = this.cache?.requestId || p || "", d = mr(l, this.descriptor.fullNamePath ?? "data.fullName"), g = mr(l, this.descriptor.userPath ?? "data.userId"), y = Js(h) || Date.now() + 3600 * 1e3;
16583
+ const p = mr(l, this.descriptor.requestIdPath ?? "data.requestId"), b = this.cache?.requestId || p || "", d = mr(l, this.descriptor.fullNamePath ?? "data.fullName"), g = mr(l, this.descriptor.userPath ?? "data.userId"), y = Qs(h) || Date.now() + 3600 * 1e3;
16541
16584
  return this.cache = { token: h, requestId: b, fullName: d, userId: g, expiresAt: y }, this.cache;
16542
16585
  }
16543
16586
  }
16544
- async function Xd(s) {
16587
+ async function tf(s) {
16545
16588
  const e = {};
16546
16589
  for (const t of s.spec) {
16547
- const r = await Zd(t, s.providers);
16590
+ const r = await rf(t, s.providers);
16548
16591
  if (r !== void 0 && r !== "")
16549
16592
  e[t.name] = r;
16550
16593
  else {
@@ -16557,11 +16600,11 @@ async function Xd(s) {
16557
16600
  }
16558
16601
  return e;
16559
16602
  }
16560
- async function Zd(s, e) {
16603
+ async function rf(s, e) {
16561
16604
  const t = s.key ?? s.name;
16562
16605
  switch (s.source) {
16563
16606
  case "cookie":
16564
- return ef(t);
16607
+ return nf(t);
16565
16608
  case "localStorage":
16566
16609
  return gr(() => window.localStorage.getItem(t) ?? void 0);
16567
16610
  case "sessionStorage":
@@ -16569,7 +16612,7 @@ async function Zd(s, e) {
16569
16612
  case "url_param":
16570
16613
  return gr(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
16571
16614
  case "header_meta":
16572
- return gr(() => document.querySelector(`meta[name="${tf(t)}"]`)?.content ?? void 0);
16615
+ return gr(() => document.querySelector(`meta[name="${of(t)}"]`)?.content ?? void 0);
16573
16616
  case "callback": {
16574
16617
  const r = e?.[s.name];
16575
16618
  if (!r) return;
@@ -16580,7 +16623,7 @@ async function Zd(s, e) {
16580
16623
  return;
16581
16624
  }
16582
16625
  }
16583
- function ef(s) {
16626
+ function nf(s) {
16584
16627
  if (typeof document > "u") return;
16585
16628
  const e = encodeURIComponent(s), t = document.cookie ? document.cookie.split("; ") : [];
16586
16629
  for (const r of t) {
@@ -16602,11 +16645,11 @@ function gr(s) {
16602
16645
  return;
16603
16646
  }
16604
16647
  }
16605
- function tf(s) {
16648
+ function of(s) {
16606
16649
  return s.replace(/["\\]/g, "\\$&");
16607
16650
  }
16608
- const rf = 1800;
16609
- class nf {
16651
+ const sf = 1800;
16652
+ class af {
16610
16653
  constructor(e) {
16611
16654
  this.opts = e, this.cache = this.loadCache();
16612
16655
  }
@@ -16635,7 +16678,7 @@ class nf {
16635
16678
  throw new Error(
16636
16679
  "[aikaara-chat-sdk] SsoExchangeAdapter.exchange() requires descriptor.sso.collect; v2 partner-token flow should be handled by TokenDiscoveryReader instead."
16637
16680
  );
16638
- const e = await Xd({
16681
+ const e = await tf({
16639
16682
  spec: this.opts.descriptor.collect,
16640
16683
  providers: this.opts.providers
16641
16684
  }), t = JSON.stringify({ credentials: e }), r = {
@@ -16673,7 +16716,7 @@ class nf {
16673
16716
  return this.cache = u, this.persistCache(u), u;
16674
16717
  }
16675
16718
  computeExpiry() {
16676
- const e = this.opts.descriptor.cacheTtlSec ?? rf;
16719
+ const e = this.opts.descriptor.cacheTtlSec ?? sf;
16677
16720
  if (!(!this.opts.descriptor.cacheKey || e <= 0))
16678
16721
  return Date.now() + e * 1e3;
16679
16722
  }
@@ -16706,8 +16749,8 @@ class nf {
16706
16749
  }
16707
16750
  }
16708
16751
  }
16709
- const of = 3e4, sf = 2e3, af = 100;
16710
- async function lf(s) {
16752
+ const lf = 3e4, cf = 2e3, uf = 100;
16753
+ async function hf(s) {
16711
16754
  const { descriptor: e } = s, t = e.tokenSourceConfig ?? {};
16712
16755
  switch (e.tokenSource) {
16713
16756
  case "init": {
@@ -16716,37 +16759,37 @@ async function lf(s) {
16716
16759
  return { token: s.initToken, source: "init" };
16717
16760
  }
16718
16761
  case "query": {
16719
- const r = typeof t.key == "string" && t.key ? t.key : "token", o = uf(r);
16762
+ const r = typeof t.key == "string" && t.key ? t.key : "token", o = ff(r);
16720
16763
  if (!o) throw new Xe("query", `?${r}= not present`);
16721
16764
  return { token: o, source: "query" };
16722
16765
  }
16723
16766
  case "hash": {
16724
- const r = typeof t.key == "string" && t.key ? t.key : "token", o = hf(r);
16767
+ const r = typeof t.key == "string" && t.key ? t.key : "token", o = pf(r);
16725
16768
  if (!o) throw new Xe("hash", `#${r}= not present`);
16726
16769
  return { token: o, source: "hash" };
16727
16770
  }
16728
16771
  case "postmsg": {
16729
- const r = typeof t.type == "string" ? t.type : "", o = typeof t.key == "string" && t.key ? t.key : "token", n = gf(typeof t.origins == "string" ? t.origins : ""), i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : of;
16730
- return { token: await mf({ type: r, key: o, origins: n, timeoutMs: i }), source: "postmsg" };
16772
+ const r = typeof t.type == "string" ? t.type : "", o = typeof t.key == "string" && t.key ? t.key : "token", n = vf(typeof t.origins == "string" ? t.origins : ""), i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : lf;
16773
+ return { token: await yf({ type: r, key: o, origins: n, timeoutMs: i }), source: "postmsg" };
16731
16774
  }
16732
16775
  case "cookie": {
16733
16776
  const r = typeof t.name == "string" && t.name ? t.name : "";
16734
16777
  if (!r) throw new Xe("cookie", "cookie.name not configured");
16735
- const o = df(r);
16778
+ const o = mf(r);
16736
16779
  if (!o) throw new Xe("cookie", `cookie "${r}" not set`);
16737
16780
  return { token: o, source: "cookie" };
16738
16781
  }
16739
16782
  case "storage": {
16740
16783
  const r = t.store === "session" ? "session" : "local", o = typeof t.key == "string" && t.key ? t.key : "", n = typeof t.path == "string" ? t.path : "";
16741
16784
  if (!o) throw new Xe("storage", "storage.key not configured");
16742
- const i = ff(r, o, n);
16785
+ const i = gf(r, o, n);
16743
16786
  if (!i) throw new Xe("storage", `${r}Storage["${o}"] not set`);
16744
16787
  return { token: i, source: "storage" };
16745
16788
  }
16746
16789
  case "global": {
16747
16790
  const r = typeof t.path == "string" ? t.path : "";
16748
16791
  if (!r) throw new Xe("global", "global.path not configured");
16749
- const o = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : sf, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : af, i = await pf(r, o, n);
16792
+ const o = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : cf, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : uf, i = await bf(r, o, n);
16750
16793
  if (!i) throw new Xe("global", `window.${r} not present`);
16751
16794
  return { token: i, source: "global" };
16752
16795
  }
@@ -16759,7 +16802,7 @@ async function lf(s) {
16759
16802
  }
16760
16803
  }
16761
16804
  }
16762
- class cf {
16805
+ class df {
16763
16806
  constructor(e) {
16764
16807
  this.opts = e;
16765
16808
  }
@@ -16770,7 +16813,7 @@ class cf {
16770
16813
  /** Resolve the token. Returns cache if present. */
16771
16814
  async get() {
16772
16815
  if (this.cached) return this.cached;
16773
- const e = await lf(this.opts);
16816
+ const e = await hf(this.opts);
16774
16817
  return this.cached = e, e;
16775
16818
  }
16776
16819
  /**
@@ -16787,7 +16830,7 @@ class Xe extends Error {
16787
16830
  super(`[aikaara-chat-sdk] token-discovery (${e}): ${t}`), this.source = e, this.name = "TokenDiscoveryError";
16788
16831
  }
16789
16832
  }
16790
- function uf(s) {
16833
+ function ff(s) {
16791
16834
  if (!(typeof window > "u"))
16792
16835
  try {
16793
16836
  const e = window.location.search.slice(1);
@@ -16801,7 +16844,7 @@ function uf(s) {
16801
16844
  return;
16802
16845
  }
16803
16846
  }
16804
- function hf(s) {
16847
+ function pf(s) {
16805
16848
  if (!(typeof window > "u"))
16806
16849
  try {
16807
16850
  const e = window.location.hash.replace(/^#/, "");
@@ -16810,7 +16853,7 @@ function hf(s) {
16810
16853
  return;
16811
16854
  }
16812
16855
  }
16813
- function df(s) {
16856
+ function mf(s) {
16814
16857
  if (typeof document > "u") return;
16815
16858
  const e = encodeURIComponent(s), t = document.cookie ? document.cookie.split("; ") : [];
16816
16859
  for (const r of t) {
@@ -16825,7 +16868,7 @@ function df(s) {
16825
16868
  }
16826
16869
  }
16827
16870
  }
16828
- function ff(s, e, t) {
16871
+ function gf(s, e, t) {
16829
16872
  if (!(typeof window > "u"))
16830
16873
  try {
16831
16874
  const o = (s === "session" ? window.sessionStorage : window.localStorage).getItem(e);
@@ -16837,17 +16880,17 @@ function ff(s, e, t) {
16837
16880
  } catch {
16838
16881
  return o;
16839
16882
  }
16840
- const i = Ul(n, t);
16883
+ const i = Bl(n, t);
16841
16884
  return typeof i == "string" ? i : void 0;
16842
16885
  } catch {
16843
16886
  return;
16844
16887
  }
16845
16888
  }
16846
- async function pf(s, e, t) {
16889
+ async function bf(s, e, t) {
16847
16890
  if (typeof window > "u") return;
16848
16891
  const r = Date.now() + e;
16849
16892
  for (; Date.now() < r; ) {
16850
- const o = Ul(window, s);
16893
+ const o = Bl(window, s);
16851
16894
  if (typeof o == "string" && o.length > 0) return o;
16852
16895
  if (typeof o == "function")
16853
16896
  try {
@@ -16858,7 +16901,7 @@ async function pf(s, e, t) {
16858
16901
  await new Promise((n) => setTimeout(n, t));
16859
16902
  }
16860
16903
  }
16861
- function mf(s) {
16904
+ function yf(s) {
16862
16905
  return new Promise((e, t) => {
16863
16906
  if (typeof window > "u") {
16864
16907
  t(new Xe("postmsg", "no window"));
@@ -16880,10 +16923,10 @@ function mf(s) {
16880
16923
  window.addEventListener("message", n);
16881
16924
  });
16882
16925
  }
16883
- function gf(s) {
16926
+ function vf(s) {
16884
16927
  return s ? s.split(/[,\s]+/).map((e) => e.trim()).filter(Boolean) : [];
16885
16928
  }
16886
- function Ul(s, e) {
16929
+ function Bl(s, e) {
16887
16930
  if (!e) return s;
16888
16931
  const t = e.split(".").filter(Boolean);
16889
16932
  let r = s;
@@ -16894,7 +16937,7 @@ function Ul(s, e) {
16894
16937
  return;
16895
16938
  return r;
16896
16939
  }
16897
- function bf() {
16940
+ function wf() {
16898
16941
  const s = typeof crypto < "u" ? crypto : null;
16899
16942
  if (s?.randomUUID) return s.randomUUID();
16900
16943
  if (s?.getRandomValues) {
@@ -16908,25 +16951,25 @@ function bf() {
16908
16951
  return (e === "x" ? t : t & 3 | 8).toString(16);
16909
16952
  });
16910
16953
  }
16911
- const yf = "aikaara_chat:requestId";
16954
+ const _f = "aikaara_chat:requestId";
16912
16955
  function Io(s, e, t) {
16913
- const r = `${yf}:${s}:${e}`;
16956
+ const r = `${_f}:${s}:${e}`;
16914
16957
  return t ? `${r}:${t}` : r;
16915
16958
  }
16916
- function Bl(s, e, t) {
16959
+ function Dl(s, e, t) {
16917
16960
  try {
16918
16961
  return localStorage.getItem(Io(s, e, t));
16919
16962
  } catch {
16920
16963
  return null;
16921
16964
  }
16922
16965
  }
16923
- function vf(s, e, t, r) {
16966
+ function kf(s, e, t, r) {
16924
16967
  try {
16925
16968
  localStorage.setItem(Io(s, e, r), t);
16926
16969
  } catch {
16927
16970
  }
16928
16971
  }
16929
- function Sf(s, e, t) {
16972
+ function If(s, e, t) {
16930
16973
  try {
16931
16974
  localStorage.removeItem(Io(s, e, t));
16932
16975
  } catch {
@@ -16975,7 +17018,7 @@ async function uo(s, e, t = "before-chat") {
16975
17018
  _ = x;
16976
17019
  break;
16977
17020
  }
16978
- if (y = x.status, w = await x.text().catch(() => ""), m < c.length && wf(y, w)) {
17021
+ if (y = x.status, w = await x.text().catch(() => ""), m < c.length && xf(y, w)) {
16979
17022
  const E = c[m++];
16980
17023
  console.warn(
16981
17024
  `[aikaara-chat-sdk] preflight #${u} ${b} ${p} → ${y} (transient). Retry #${m} in ${E}ms.`
@@ -17029,7 +17072,7 @@ async function uo(s, e, t = "before-chat") {
17029
17072
  }
17030
17073
  return { captured: l };
17031
17074
  }
17032
- async function Ef(s) {
17075
+ async function Tf(s) {
17033
17076
  const e = s.steps ?? [];
17034
17077
  return e.some((r) => r.trigger === "on-method-select") ? (await uo(
17035
17078
  e,
@@ -17045,7 +17088,7 @@ async function Ef(s) {
17045
17088
  "on-method-select"
17046
17089
  )).captured : {};
17047
17090
  }
17048
- function wf(s, e) {
17091
+ function xf(s, e) {
17049
17092
  if (s === 503 || s === 504 || s === 502) return !0;
17050
17093
  if (s === 401 || s === 403) return e.trim().length === 0;
17051
17094
  if (s === 500) {
@@ -17054,7 +17097,7 @@ function wf(s, e) {
17054
17097
  }
17055
17098
  return !1;
17056
17099
  }
17057
- async function Dl(s, e) {
17100
+ async function $l(s, e) {
17058
17101
  const t = await fetch(s, {
17059
17102
  method: "GET",
17060
17103
  headers: { accept: "application/json", ...e ?? {} }
@@ -17070,10 +17113,10 @@ async function Dl(s, e) {
17070
17113
  }
17071
17114
  return r;
17072
17115
  }
17073
- function $l(s, e) {
17074
- return s.replace("{projectId}", e).replace("{uuid}", bf().replace(/-/g, ""));
17116
+ function Fl(s, e) {
17117
+ return s.replace("{projectId}", e).replace("{uuid}", wf().replace(/-/g, ""));
17075
17118
  }
17076
- function Fl(s) {
17119
+ function ql(s) {
17077
17120
  const e = s._preload;
17078
17121
  if (!Array.isArray(e) || e.length === 0) return;
17079
17122
  const t = Array.from(
@@ -17081,19 +17124,19 @@ function Fl(s) {
17081
17124
  e.map((r) => r && typeof r == "object" ? r.scriptUrl : null).filter((r) => typeof r == "string" && r.length > 0)
17082
17125
  )
17083
17126
  );
17084
- t.length !== 0 && Promise.allSettled(t.map((r) => jl(r)));
17127
+ t.length !== 0 && Promise.allSettled(t.map((r) => Ul(r)));
17085
17128
  }
17086
- async function _f(s) {
17129
+ async function Sf(s) {
17087
17130
  const e = {
17088
- ...s.config ?? (s.configUrl ? await Dl(s.configUrl, s.configHeaders) : {}),
17131
+ ...s.config ?? (s.configUrl ? await $l(s.configUrl, s.configHeaders) : {}),
17089
17132
  ...s.overrides ?? {}
17090
17133
  };
17091
- Fl(e);
17134
+ ql(e);
17092
17135
  const t = e.transport ?? "tiledesk", r = e.tiledesk;
17093
17136
  if ((t === "tiledesk" || t === "dual") && !r)
17094
17137
  throw new Error("mount: descriptor.tiledesk is required for tiledesk/dual transport");
17095
- const o = r?.projectId ?? "", n = s.identity.userId, i = s.conversationScope || void 0, a = s.forceNewConversation ? null : Bl(n, o, i), l = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", c = s.conversationId ?? a ?? $l(l, o);
17096
- (s.conversationId || !a || s.forceNewConversation) && o && vf(n, o, c, i);
17138
+ const o = r?.projectId ?? "", n = s.identity.userId, i = s.conversationScope || void 0, a = s.forceNewConversation ? null : Dl(n, o, i), l = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", c = s.conversationId ?? a ?? Fl(l, o);
17139
+ (s.conversationId || !a || s.forceNewConversation) && o && kf(n, o, c, i);
17097
17140
  const u = await s.tokenProvider(), h = s.tokenProvider, p = s.historyTokenProvider ?? h, b = r ? {
17098
17141
  mqttEndpoint: r.mqttEndpoint,
17099
17142
  jwtToken: u,
@@ -17121,11 +17164,11 @@ async function _f(s) {
17121
17164
  debug: r.debug,
17122
17165
  senderFullname: s.identity.senderFullname ?? s.identity.userName,
17123
17166
  tokenProvider: h
17124
- } : void 0, d = s.uploadAdapter ?? (e.uploadEndpoint ? Pl({
17167
+ } : void 0, d = s.uploadAdapter ?? (e.uploadEndpoint ? Ml({
17125
17168
  endpoint: e.uploadEndpoint,
17126
17169
  fieldName: e.uploadFieldName,
17127
17170
  extraFields: e.uploadExtraFields
17128
- }) : void 0), g = s.historyAdapter ?? (e.historyApiBase ? Ah({
17171
+ }) : void 0), g = s.historyAdapter ?? (e.historyApiBase ? Ih({
17129
17172
  apiBase: e.historyApiBase,
17130
17173
  pageSize: e.historyPageSize ?? 200,
17131
17174
  pathTemplate: e.historyPathTemplate,
@@ -17181,17 +17224,17 @@ async function _f(s) {
17181
17224
  }
17182
17225
  };
17183
17226
  }
17184
- function kf(s) {
17227
+ function Ef(s) {
17185
17228
  if (typeof s != "string") return s;
17186
17229
  const e = document.querySelector(s);
17187
17230
  if (!e) throw new Error(`mountFromSlug: container "${s}" not found`);
17188
17231
  return e;
17189
17232
  }
17190
- async function xf(s) {
17233
+ async function Af(s) {
17191
17234
  const e = (s.configBase ?? "https://api.aikaara.com").replace(/\/$/, ""), t = `${e}/api/v1/widget_configs/${encodeURIComponent(s.slug)}`;
17192
17235
  let r = null;
17193
17236
  try {
17194
- r = await Dl(t, s.configHeaders);
17237
+ r = await $l(t, s.configHeaders);
17195
17238
  } catch (I) {
17196
17239
  if (!s.fallbackConfig) throw I;
17197
17240
  console.warn(
@@ -17204,7 +17247,7 @@ async function xf(s) {
17204
17247
  ...r ?? {},
17205
17248
  ...s.overrides ?? {}
17206
17249
  };
17207
- if (Fl(o), o.templates && Object.keys(o.templates).length > 0) {
17250
+ if (ql(o), o.templates && Object.keys(o.templates).length > 0) {
17208
17251
  o.components = { ...o.components ?? {} };
17209
17252
  for (const [I, O] of Object.entries(o.templates)) {
17210
17253
  const P = `template:${I}`;
@@ -17237,7 +17280,7 @@ async function xf(s) {
17237
17280
  let i = null, a = s.user.id, l = s.user.name, c = "", u = s.user.token, h = null;
17238
17281
  const p = await Wt(s.user.token).catch(() => ""), b = typeof p == "string" && p.length > 0;
17239
17282
  if (!b && o.sso?.tokenSource) {
17240
- h = new cf({
17283
+ h = new df({
17241
17284
  descriptor: {
17242
17285
  provider: o.sso.provider,
17243
17286
  flow: o.sso.flow,
@@ -17254,7 +17297,7 @@ async function xf(s) {
17254
17297
  u = async () => (await h.get()).token, s.user.identity && !s.user.identity.partnerToken && (s.user.identity.partnerToken = I.token);
17255
17298
  } else if (!b && o.sso && o.sso.collect && o.sso.collect.length > 0) {
17256
17299
  const I = `${e}/api/v1/projects/by-slug/${encodeURIComponent(s.slug)}/sso_exchange`;
17257
- i = await new nf({
17300
+ i = await new af({
17258
17301
  descriptor: o.sso,
17259
17302
  providers: s.user.credentialProviders,
17260
17303
  exchangeUrl: I
@@ -17276,9 +17319,9 @@ async function xf(s) {
17276
17319
  }
17277
17320
  I.captured.userId && (a = I.captured.userId), I.captured.requestId && (g = I.captured.requestId);
17278
17321
  }
17279
- const y = new Qd(o.auth, u);
17322
+ const y = new ef(o.auth, u);
17280
17323
  if (d) {
17281
- const I = o.tiledesk?.projectId ?? "", O = I ? Bl(a, I) : null, P = o.tiledesk?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", j = O ?? (I ? $l(P, I) : "");
17324
+ const I = o.tiledesk?.projectId ?? "", O = I ? Dl(a, I) : null, P = o.tiledesk?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", j = O ?? (I ? Fl(P, I) : "");
17282
17325
  y.prime(d, { requestId: j, fullName: l });
17283
17326
  }
17284
17327
  const w = await y.get();
@@ -17299,16 +17342,16 @@ async function xf(s) {
17299
17342
  } catch (I) {
17300
17343
  return console.warn("[aikaara-chat-sdk] partner auto-refresh failed", I), null;
17301
17344
  }
17302
- } : null, x = o.upload, v = async () => `Bearer ${x && "tokenSource" in x && x.tokenSource === "chat" ? (await y.get()).token : await Wt(s.user.token)}`, E = s.hooks?.upload ?? (x && x.mode === "presigned-3step" ? Sh({
17345
+ } : null, x = o.upload, v = async () => `Bearer ${x && "tokenSource" in x && x.tokenSource === "chat" ? (await y.get()).token : await Wt(s.user.token)}`, E = s.hooks?.upload ?? (x && x.mode === "presigned-3step" ? Eh({
17303
17346
  ...x,
17304
17347
  authHeader: v
17305
- }) : x && x.mode === "direct" ? Pl({
17348
+ }) : x && x.mode === "direct" ? Ml({
17306
17349
  endpoint: x.endpoint,
17307
17350
  fieldName: x.fieldName,
17308
17351
  extraFields: x.extraFields,
17309
17352
  headers: async () => ({ authorization: await v() })
17310
- }) : void 0), S = await _f({
17311
- container: kf(s.container),
17353
+ }) : void 0), S = await Sf({
17354
+ container: Ef(s.container),
17312
17355
  config: o,
17313
17356
  // SSO-issued Aikaara user token, used by the ActionCable transport.
17314
17357
  // Tiledesk-only widgets ignore this; falls back to `userId` inside `mount`.
@@ -17364,51 +17407,51 @@ async function xf(s) {
17364
17407
  }
17365
17408
  export {
17366
17409
  To as A,
17367
- xf as B,
17368
- ql as C,
17369
- _f as D,
17370
- Qs as E,
17371
- Ol as F,
17372
- Ef as G,
17373
- bd as H,
17374
- Fd as I,
17375
- zd as J,
17376
- qd as K,
17377
- Dd as L,
17378
- ec as M,
17379
- jd as N,
17380
- Yd as O,
17381
- Vd as P,
17382
- Ud as Q,
17383
- Nd as R,
17384
- Qd as S,
17385
- ph as T,
17386
- Pd as U,
17387
- $d as V,
17388
- ad as a,
17389
- wh as b,
17390
- cd as c,
17391
- Sd as d,
17392
- sd as e,
17393
- Id as f,
17394
- kd as g,
17395
- vd as h,
17396
- Ad as i,
17397
- Ed as j,
17398
- Zl as k,
17399
- Xl as l,
17400
- tc as m,
17401
- nf as n,
17410
+ Af as B,
17411
+ Hl as C,
17412
+ Sf as D,
17413
+ Xs as E,
17414
+ Pl as F,
17415
+ Tf as G,
17416
+ wd as H,
17417
+ Wd as I,
17418
+ Gd as J,
17419
+ zd as K,
17420
+ qd as L,
17421
+ tc as M,
17422
+ Dd as N,
17423
+ Xd as O,
17424
+ Yd as P,
17425
+ $d as Q,
17426
+ Bd as R,
17427
+ ef as S,
17428
+ mh as T,
17429
+ Ld as U,
17430
+ Hd as V,
17431
+ ud as a,
17432
+ _h as b,
17433
+ dd as c,
17434
+ Id as d,
17435
+ cd as e,
17436
+ Od as f,
17437
+ Ed as g,
17438
+ kd as h,
17439
+ Cd as i,
17440
+ Td as j,
17441
+ ec as k,
17442
+ Zl as l,
17443
+ rc as m,
17444
+ af as n,
17402
17445
  Xe as o,
17403
- cf as p,
17404
- Sf as q,
17405
- Jd as r,
17406
- Xd as s,
17407
- Pl as t,
17408
- Sh as u,
17409
- Ah as v,
17410
- lf as w,
17411
- yh as x,
17412
- bh as y,
17413
- gh as z
17446
+ df as p,
17447
+ If as q,
17448
+ Zd as r,
17449
+ tf as s,
17450
+ Ml as t,
17451
+ Eh as u,
17452
+ Ih as v,
17453
+ hf as w,
17454
+ vh as x,
17455
+ yh as y,
17456
+ bh as z
17414
17457
  };