@aikaara/chat-sdk 1.5.26 → 1.5.28

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 sc {
1
+ class oc {
2
2
  identifier;
3
3
  callbacks = {};
4
4
  sendFn;
@@ -63,7 +63,7 @@ class Ds {
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 sc(t, (i) => {
66
+ const t = JSON.stringify(e), r = new oc(t, (i) => {
67
67
  this.send({
68
68
  command: "message",
69
69
  identifier: t,
@@ -163,8 +163,8 @@ class da {
163
163
  this.handlers.clear();
164
164
  }
165
165
  }
166
- const oc = 1e3, ac = 10, lc = 400, cc = 600, $s = "#6366f1", uc = 12, dc = "system-ui, -apple-system, sans-serif", Us = "Type a message...", hc = "bottom-right", fc = "light", pc = { x: 20, y: 20 }, ln = "aikaara_conversation_id";
167
- class mc extends da {
166
+ const ac = 1e3, lc = 10, cc = 400, uc = 600, $s = "#6366f1", dc = 12, hc = "system-ui, -apple-system, sans-serif", Us = "Type a message...", fc = "bottom-right", pc = "light", mc = { x: 20, y: 20 }, ln = "aikaara_conversation_id";
167
+ class gc extends da {
168
168
  client;
169
169
  config;
170
170
  state = "disconnected";
@@ -221,13 +221,13 @@ class mc extends da {
221
221
  this.state !== e && (this.state = e, this.emit("connection:state", e));
222
222
  }
223
223
  scheduleReconnect() {
224
- const e = this.config.maxReconnectAttempts ?? ac;
224
+ const e = this.config.maxReconnectAttempts ?? lc;
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 ?? oc) * Math.pow(2, this.reconnectAttempt);
230
+ const r = (this.config.reconnectInterval ?? ac) * Math.pow(2, this.reconnectAttempt);
231
231
  this.reconnectAttempt++, this.reconnectTimer = setTimeout(async () => {
232
232
  try {
233
233
  const i = this.buildWsUrl(this.config.baseUrl, this.config.userToken);
@@ -247,7 +247,7 @@ class mc extends da {
247
247
  return `${e.replace(/^http/, "ws")}/cable?token=${t}`;
248
248
  }
249
249
  }
250
- class gc {
250
+ class bc {
251
251
  baseUrl;
252
252
  apiKey;
253
253
  authToken;
@@ -354,7 +354,7 @@ class gc {
354
354
  return r && (n.body = JSON.stringify(r)), fetch(e, n);
355
355
  }
356
356
  }
357
- class bc {
357
+ class yc {
358
358
  _messages = [];
359
359
  optimisticCounter = 0;
360
360
  get messages() {
@@ -512,7 +512,7 @@ function ha(s) {
512
512
  const r = e.payload?.elements?.[0]?.action?.url;
513
513
  return typeof r == "string" ? r : void 0;
514
514
  }
515
- class yc {
515
+ class vc {
516
516
  _conversationId;
517
517
  persist;
518
518
  constructor(e, t = !0) {
@@ -546,23 +546,23 @@ class yc {
546
546
  }
547
547
  }
548
548
  }
549
- var ws = Object.defineProperty, vc = Object.getOwnPropertyDescriptor, wc = Object.getOwnPropertyNames, kc = Object.prototype.hasOwnProperty, Qe = (s, e) => () => (s && (e = s(s = 0)), e), me = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports), Qt = (s, e) => {
549
+ var ws = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, kc = Object.getOwnPropertyNames, xc = Object.prototype.hasOwnProperty, Qe = (s, e) => () => (s && (e = s(s = 0)), e), me = (s, e) => () => (e || s((e = { exports: {} }).exports, e), e.exports), Qt = (s, e) => {
550
550
  for (var t in e) ws(s, t, { get: e[t], enumerable: !0 });
551
- }, xc = (s, e, t, r) => {
552
- if (e && typeof e == "object" || typeof e == "function") for (let i of wc(e)) !kc.call(s, i) && i !== t && ws(s, i, { get: () => e[i], enumerable: !(r = vc(e, i)) || r.enumerable });
551
+ }, _c = (s, e, t, r) => {
552
+ if (e && typeof e == "object" || typeof e == "function") for (let i of kc(e)) !xc.call(s, i) && i !== t && ws(s, i, { get: () => e[i], enumerable: !(r = wc(e, i)) || r.enumerable });
553
553
  return s;
554
- }, Re = (s) => xc(ws({}, "__esModule", { value: !0 }), s), le = Qe(() => {
554
+ }, Re = (s) => _c(ws({}, "__esModule", { value: !0 }), s), le = Qe(() => {
555
555
  }), je = {};
556
556
  Qt(je, { _debugEnd: () => Zn, _debugProcess: () => Xn, _events: () => pi, _eventsCount: () => mi, _exiting: () => $n, _fatalExceptions: () => Yn, _getActiveHandles: () => va, _getActiveRequests: () => ya, _kill: () => Fn, _linkedBinding: () => ga, _maxListeners: () => fi, _preload_modules: () => di, _rawDebug: () => Rn, _startProfilerIdleNotifier: () => ei, _stopProfilerIdleNotifier: () => ti, _tickCallback: () => Qn, abort: () => si, addListener: () => gi, allowedNodeEnvironmentFlags: () => Kn, arch: () => kn, argv: () => Sn, argv0: () => ui, assert: () => wa, binding: () => Cn, browser: () => Nn, chdir: () => Ln, config: () => Un, cpuUsage: () => ar, cwd: () => On, debugPort: () => ci, default: () => xs, dlopen: () => ba, domain: () => Dn, emit: () => ki, emitWarning: () => Tn, env: () => _n, execArgv: () => En, execPath: () => li, exit: () => zn, features: () => Gn, hasUncaughtExceptionCaptureCallback: () => ka, hrtime: () => Sr, kill: () => Wn, listeners: () => _a, memoryUsage: () => Hn, moduleLoadList: () => jn, nextTick: () => pa, off: () => yi, on: () => pt, once: () => bi, openStdin: () => Vn, pid: () => oi, platform: () => xn, ppid: () => ai, prependListener: () => xi, prependOnceListener: () => _i, reallyExit: () => Bn, release: () => Mn, removeAllListeners: () => wi, removeListener: () => vi, resourceUsage: () => qn, setSourceMapsEnabled: () => hi, setUncaughtExceptionCaptureCallback: () => Jn, stderr: () => ni, stdin: () => ii, stdout: () => ri, title: () => wn, umask: () => Pn, uptime: () => xa, version: () => An, versions: () => In });
557
557
  function ks(s) {
558
558
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
559
559
  }
560
- function _c() {
560
+ function Sc() {
561
561
  !Dt || !Rt || (Dt = !1, Rt.length ? dt = Rt.concat(dt) : hr = -1, dt.length && fa());
562
562
  }
563
563
  function fa() {
564
564
  if (!Dt) {
565
- var s = setTimeout(_c, 0);
565
+ var s = setTimeout(Sc, 0);
566
566
  Dt = !0;
567
567
  for (var e = dt.length; e; ) {
568
568
  for (Rt = dt, dt = []; ++hr < e; ) Rt && Rt[hr].run();
@@ -612,7 +612,7 @@ function pt() {
612
612
  function _a(s) {
613
613
  return [];
614
614
  }
615
- var dt, Dt, Rt, hr, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn, Rn, jn, Dn, $n, Un, Bn, Fn, ar, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ii, si, oi, ai, li, ci, ui, di, hi, gt, cn, Er, fi, pi, mi, gi, bi, yi, vi, wi, ki, xi, _i, xs, Sc = Qe(() => {
615
+ var dt, Dt, Rt, hr, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn, Rn, jn, Dn, $n, Un, Bn, Fn, ar, qn, Hn, Wn, zn, Vn, Kn, Gn, Yn, Jn, Qn, Xn, Zn, ei, ti, ri, ni, ii, si, oi, ai, li, ci, ui, di, hi, gt, cn, Er, fi, pi, mi, gi, bi, yi, vi, wi, ki, xi, _i, xs, Ec = Qe(() => {
616
616
  le(), ue(), ce(), dt = [], Dt = !1, hr = -1, ma.prototype.run = function() {
617
617
  this.fun.apply(null, this.array);
618
618
  }, wn = "browser", kn = "x64", xn = "browser", _n = { PATH: "/usr/bin", LANG: typeof navigator < "u" ? navigator.language + ".UTF-8" : void 0, PWD: "/", HOME: "/home", TMP: "/tmp" }, Sn = ["/usr/bin/node"], En = [], An = "v16.8.0", In = {}, Tn = function(s, e) {
@@ -631,9 +631,9 @@ var dt, Dt, Rt, hr, wn, kn, xn, _n, Sn, En, An, In, Tn, Cn, Pn, On, Ln, Mn, Nn,
631
631
  return typeof BigInt > "u" ? e[0] * Er + e[1] : BigInt(e[0] * Er) + BigInt(e[1]);
632
632
  }, fi = 10, pi = {}, mi = 0, gi = pt, bi = pt, yi = pt, vi = pt, wi = pt, ki = We, xi = pt, _i = pt, xs = { version: An, versions: In, arch: kn, platform: xn, browser: Nn, release: Mn, _rawDebug: Rn, moduleLoadList: jn, binding: Cn, _linkedBinding: ga, _events: pi, _eventsCount: mi, _maxListeners: fi, on: pt, addListener: gi, once: bi, off: yi, removeListener: vi, removeAllListeners: wi, emit: ki, prependListener: xi, prependOnceListener: _i, listeners: _a, domain: Dn, _exiting: $n, config: Un, dlopen: ba, uptime: xa, _getActiveRequests: ya, _getActiveHandles: va, reallyExit: Bn, _kill: Fn, cpuUsage: ar, resourceUsage: qn, memoryUsage: Hn, kill: Wn, exit: zn, openStdin: Vn, allowedNodeEnvironmentFlags: Kn, assert: wa, features: Gn, _fatalExceptions: Yn, setUncaughtExceptionCaptureCallback: Jn, hasUncaughtExceptionCaptureCallback: ka, emitWarning: Tn, nextTick: pa, _tickCallback: Qn, _debugProcess: Xn, _debugEnd: Zn, _startProfilerIdleNotifier: ei, _stopProfilerIdleNotifier: ti, stdout: ri, stdin: ii, stderr: ni, abort: si, umask: Pn, chdir: Ln, cwd: On, env: _n, title: wn, argv: Sn, execArgv: En, pid: oi, ppid: ai, execPath: li, debugPort: ci, hrtime: Sr, argv0: ui, _preload_modules: di, setSourceMapsEnabled: hi };
633
633
  }), ce = Qe(() => {
634
- Sc();
634
+ Ec();
635
635
  });
636
- function Ec() {
636
+ function Ac() {
637
637
  if (Si) return Wt;
638
638
  Si = !0, Wt.byteLength = a, Wt.toByteArray = c, Wt.fromByteArray = p;
639
639
  for (var s = [], e = [], t = typeof Uint8Array < "u" ? Uint8Array : Array, r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, n = r.length; i < n; ++i) s[i] = r[i], e[r.charCodeAt(i)] = i;
@@ -671,7 +671,7 @@ function Ec() {
671
671
  }
672
672
  return Wt;
673
673
  }
674
- function Ac() {
674
+ function Ic() {
675
675
  return Ei ? lr : (Ei = !0, lr.read = function(s, e, t, r, i) {
676
676
  var n, o, a = i * 8 - r - 1, l = (1 << a) - 1, c = l >> 1, u = -7, d = t ? i - 1 : 0, p = t ? -1 : 1, g = s[e + d];
677
677
  for (d += p, n = g & (1 << -u) - 1, g >>= -u, u += a; u > 0; n = n * 256 + s[e + d], d += p, u -= 8) ;
@@ -689,10 +689,10 @@ function Ac() {
689
689
  s[t + g - h] |= b * 128;
690
690
  }, lr);
691
691
  }
692
- function Ic() {
692
+ function Tc() {
693
693
  if (Ai) return It;
694
694
  Ai = !0;
695
- let s = Ec(), e = Ac(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
695
+ let s = Ac(), e = Ic(), t = typeof Symbol == "function" && typeof Symbol.for == "function" ? /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom") : null;
696
696
  It.Buffer = o, It.SlowBuffer = w, It.INSPECT_MAX_BYTES = 50;
697
697
  let r = 2147483647;
698
698
  It.kMaxLength = r, o.TYPED_ARRAY_SUPPORT = i(), !o.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 Ic() {
1447
1447
  }
1448
1448
  return It;
1449
1449
  }
1450
- var Wt, Si, lr, Ei, It, Ai, Tc = Qe(() => {
1450
+ var Wt, Si, lr, Ei, It, Ai, Cc = Qe(() => {
1451
1451
  le(), ue(), ce(), Wt = {}, Si = !1, lr = {}, Ei = !1, It = {}, Ai = !1;
1452
1452
  }), Fe = {};
1453
1453
  Qt(Fe, { Buffer: () => Jr, INSPECT_MAX_BYTES: () => Sa, default: () => mt, kMaxLength: () => Ea });
1454
1454
  var mt, Jr, Sa, Ea, qe = Qe(() => {
1455
- le(), ue(), ce(), Tc(), mt = Ic(), mt.Buffer, mt.SlowBuffer, mt.INSPECT_MAX_BYTES, mt.kMaxLength, Jr = mt.Buffer, Sa = mt.INSPECT_MAX_BYTES, Ea = mt.kMaxLength;
1455
+ le(), ue(), ce(), Cc(), mt = Tc(), mt.Buffer, mt.SlowBuffer, mt.INSPECT_MAX_BYTES, mt.kMaxLength, Jr = mt.Buffer, Sa = mt.INSPECT_MAX_BYTES, Ea = mt.kMaxLength;
1456
1456
  }), ue = Qe(() => {
1457
1457
  qe();
1458
1458
  }), Ue = me((s, e) => {
@@ -1699,7 +1699,7 @@ var mt, Jr, Sa, Ea, qe = Qe(() => {
1699
1699
  e.exports = t, e.exports.AbortSignal = r, e.exports.default = t;
1700
1700
  }), Pt = {};
1701
1701
  Qt(Pt, { EventEmitter: () => Ia, default: () => zt, defaultMaxListeners: () => Ta, init: () => Ca, listenerCount: () => Pa, on: () => Oa, once: () => La });
1702
- function Cc() {
1702
+ function Pc() {
1703
1703
  if (Ii) return cr;
1704
1704
  Ii = !0;
1705
1705
  var s = typeof Reflect == "object" ? Reflect : null, e = s && typeof s.apply == "function" ? s.apply : function(_, v, E) {
@@ -1871,7 +1871,7 @@ function Cc() {
1871
1871
  return cr;
1872
1872
  }
1873
1873
  var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
1874
- le(), ue(), ce(), cr = {}, Ii = !1, zt = Cc(), zt.once, zt.once = function(s, e) {
1874
+ le(), ue(), ce(), cr = {}, Ii = !1, zt = Pc(), zt.once, zt.once = function(s, e) {
1875
1875
  return new Promise((t, r) => {
1876
1876
  function i(...o) {
1877
1877
  n !== void 0 && s.removeListener("error", n), t(o);
@@ -2507,7 +2507,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2507
2507
  }
2508
2508
  return g;
2509
2509
  };
2510
- }), Pc = me((s, e) => {
2510
+ }), Oc = me((s, e) => {
2511
2511
  le(), ue(), ce();
2512
2512
  var { StringPrototypeSlice: t, SymbolIterator: r, TypedArrayPrototypeSet: i, Uint8Array: n } = Ue(), { Buffer: o } = (qe(), Re(Fe)), { inspect: a } = Je();
2513
2513
  e.exports = class {
@@ -2610,7 +2610,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2610
2610
  return c(p.objectMode);
2611
2611
  }
2612
2612
  e.exports = { getHighWaterMark: d, getDefaultHighWaterMark: c, setDefaultHighWaterMark: u };
2613
- }), Oc = me((s, e) => {
2613
+ }), Lc = me((s, e) => {
2614
2614
  le(), ue(), ce();
2615
2615
  var t = (qe(), Re(Fe)), r = t.Buffer;
2616
2616
  function i(o, a) {
@@ -2634,9 +2634,9 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2634
2634
  if (typeof o != "number") throw new TypeError("Argument must be a number");
2635
2635
  return t.SlowBuffer(o);
2636
2636
  };
2637
- }), Lc = me((s) => {
2637
+ }), Mc = me((s) => {
2638
2638
  le(), ue(), ce();
2639
- var e = Oc().Buffer, t = e.isEncoding || function(m) {
2639
+ var e = Lc().Buffer, t = e.isEncoding || function(m) {
2640
2640
  switch (m = "" + m, m && m.toLowerCase()) {
2641
2641
  case "hex":
2642
2642
  case "utf8":
@@ -2835,7 +2835,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
2835
2835
  e.exports = ae, ae.ReadableState = we;
2836
2836
  var { EventEmitter: b } = (Ut(), Re(Pt)), { Stream: y, prependListener: w } = _s(), { Buffer: m } = (qe(), Re(Fe)), { addAbortSignal: k } = en(), _ = Ot(), v = Je().debuglog("stream", (C) => {
2837
2837
  v = C;
2838
- }), E = Pc(), S = Xt(), { getHighWaterMark: I, getDefaultHighWaterMark: P } = tn(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: j, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: F, ERR_STREAM_PUSH_AFTER_EOF: $, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: U }, AbortError: X } = Ye(), { validateObject: z } = gr(), W = h("kPaused"), { StringDecoder: ne } = Lc(), D = Ma();
2838
+ }), E = Oc(), S = Xt(), { getHighWaterMark: I, getDefaultHighWaterMark: P } = tn(), { aggregateTwoErrors: O, codes: { ERR_INVALID_ARG_TYPE: j, ERR_METHOD_NOT_IMPLEMENTED: T, ERR_OUT_OF_RANGE: F, ERR_STREAM_PUSH_AFTER_EOF: $, ERR_STREAM_UNSHIFT_AFTER_END_EVENT: U }, AbortError: X } = Ye(), { validateObject: z } = gr(), W = h("kPaused"), { StringDecoder: ne } = Mc(), D = Ma();
2839
2839
  c(ae.prototype, y.prototype), c(ae, y);
2840
2840
  var G = () => {
2841
2841
  }, { errorOrDestroy: L } = S, Y = 1, pe = 2, te = 4, ve = 8, J = 16, R = 32, ie = 64, V = 128, Q = 256, Z = 512, be = 1024, oe = 2048, M = 4096, q = 8192, re = 16384, he = 32768, fe = 65536, ye = 1 << 17, H = 1 << 18;
@@ -3415,7 +3415,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3415
3415
  }, z.toWeb = function(M) {
3416
3416
  return oe().newWritableStreamFromStreamWritable(M);
3417
3417
  };
3418
- }), Mc = me((s, e) => {
3418
+ }), Nc = me((s, e) => {
3419
3419
  le(), ue(), ce();
3420
3420
  var t = Bt(), r = (qe(), Re(Fe)), { isReadable: i, isWritable: n, isIterable: o, isNodeStream: a, isReadableNodeStream: l, isWritableNodeStream: c, isDuplexNodeStream: u, isReadableStream: d, isWritableStream: p } = wt(), g = Ot(), { AbortError: h, codes: { ERR_INVALID_ARG_TYPE: b, ERR_INVALID_RETURN_VALUE: y } } = Ye(), { destroyer: w } = Xt(), m = yt(), k = rn(), _ = Ss(), { createDeferredPromise: v } = Je(), E = Ma(), S = globalThis.Blob || r.Blob, I = typeof S < "u" ? function($) {
3421
3421
  return $ instanceof S;
@@ -3572,7 +3572,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3572
3572
  };
3573
3573
  var d;
3574
3574
  l.from = function(p) {
3575
- return d || (d = Mc()), d(p, "body");
3575
+ return d || (d = Nc()), d(p, "body");
3576
3576
  };
3577
3577
  }), Na = me((s, e) => {
3578
3578
  le(), ue(), ce();
@@ -3892,7 +3892,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
3892
3892
  !T && v !== null && (T = new p()), _ = null, m = null, k = null, v === null ? F(T) : (v = F, n(P) && i(P, T));
3893
3893
  }, E;
3894
3894
  };
3895
- }), Nc = me((s, e) => {
3895
+ }), Rc = me((s, e) => {
3896
3896
  le(), ue(), ce();
3897
3897
  var t = globalThis.AbortController || pr().AbortController, { codes: { ERR_INVALID_ARG_VALUE: r, ERR_INVALID_ARG_TYPE: i, ERR_MISSING_ARGS: n, ERR_OUT_OF_RANGE: o }, AbortError: a } = Ye(), { validateAbortSignal: l, validateInteger: c, validateObject: u } = gr(), d = Ue().Symbol("kWeak"), p = Ue().Symbol("kResistStopPropagation"), { finished: g } = Ot(), h = ja(), { addAbortSignalNoValidate: b } = en(), { isWritable: y, isNodeStream: w } = wt(), { deprecate: m } = Je(), { ArrayPrototypePush: k, Boolean: _, MathFloor: v, Number: E, NumberIsNaN: S, Promise: I, PromiseReject: P, PromiseResolve: O, PromisePrototypeThen: j, Symbol: T } = Ue(), F = T("kEmpty"), $ = T("kEof");
3898
3898
  function U(V, Q) {
@@ -4089,7 +4089,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4089
4089
  e.exports = { finished: l, pipeline: c };
4090
4090
  }), $a = me((s, e) => {
4091
4091
  le(), ue(), ce();
4092
- var { Buffer: t } = (qe(), Re(Fe)), { ObjectDefineProperty: r, ObjectKeys: i, ReflectApply: n } = Ue(), { promisify: { custom: o } } = Je(), { streamReturningOperators: a, promiseReturningOperators: l } = Nc(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: c } } = Ye(), u = ja(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = tn(), { pipeline: g } = Es(), { destroyer: h } = Xt(), b = Ot(), y = Da(), w = wt(), m = e.exports = _s().Stream;
4092
+ var { Buffer: t } = (qe(), Re(Fe)), { ObjectDefineProperty: r, ObjectKeys: i, ReflectApply: n } = Ue(), { promisify: { custom: o } } = Je(), { streamReturningOperators: a, promiseReturningOperators: l } = Rc(), { codes: { ERR_ILLEGAL_CONSTRUCTOR: c } } = Ye(), u = ja(), { setDefaultHighWaterMark: d, getDefaultHighWaterMark: p } = tn(), { pipeline: g } = Es(), { destroyer: h } = Xt(), b = Ot(), y = Da(), w = wt(), m = e.exports = _s().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 = rn();
4094
4094
  for (let _ of i(a)) {
4095
4095
  let v = function(...S) {
@@ -4124,7 +4124,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
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 = i, 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
- }), Rc = me((s, e) => {
4127
+ }), jc = me((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 cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4135
4135
  i.prototype = r.prototype, t.prototype = new i(), t.prototype.constructor = t;
4136
4136
  }
4137
4137
  };
4138
- }), jc = me((s, e) => {
4138
+ }), Dc = me((s, e) => {
4139
4139
  le(), ue(), ce();
4140
4140
  var { Buffer: t } = (qe(), Re(Fe)), r = /* @__PURE__ */ Symbol.for("BufferList");
4141
4141
  function i(n) {
@@ -4259,9 +4259,9 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4259
4259
  }, i.isBufferList = function(n) {
4260
4260
  return n != null && n[r];
4261
4261
  }, e.exports = i;
4262
- }), Dc = me((s, e) => {
4262
+ }), $c = me((s, e) => {
4263
4263
  le(), ue(), ce();
4264
- var t = Ft().Duplex, r = Rc(), i = jc();
4264
+ var t = Ft().Duplex, r = jc(), i = Dc();
4265
4265
  function n(o) {
4266
4266
  if (!(this instanceof n)) return new n(o);
4267
4267
  if (typeof o == "function") {
@@ -4291,7 +4291,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4291
4291
  }, n.prototype._isBufferList = function(o) {
4292
4292
  return o instanceof n || o instanceof i || n.isBufferList(o);
4293
4293
  }, n.isBufferList = i.isBufferList, e.exports = n, e.exports.BufferListStream = n, e.exports.BufferList = i;
4294
- }), $c = me((s, e) => {
4294
+ }), Uc = me((s, e) => {
4295
4295
  le(), ue(), ce();
4296
4296
  var t = class {
4297
4297
  constructor() {
@@ -4325,7 +4325,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4325
4325
  })));
4326
4326
  }
4327
4327
  t.PUBLISH_HEADER = i("publish"), t.SUBSCRIBE_HEADER = i("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 = i("unsubscribe"), t.ACKS = { unsuback: i("unsuback"), puback: i("puback"), pubcomp: i("pubcomp"), pubrel: i("pubrel"), pubrec: i("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
- }), Uc = me((s, e) => {
4328
+ }), Bc = me((s, e) => {
4329
4329
  le(), ue(), ce();
4330
4330
  var t = 1e3, r = t * 60, i = r * 60, n = i * 24, o = n * 7, a = n * 365.25;
4331
4331
  e.exports = function(p, g) {
@@ -4397,10 +4397,10 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4397
4397
  var y = g >= h * 1.5;
4398
4398
  return Math.round(p / h) + " " + b + (y ? "s" : "");
4399
4399
  }
4400
- }), Bc = me((s, e) => {
4400
+ }), Fc = me((s, e) => {
4401
4401
  le(), ue(), ce();
4402
4402
  function t(r) {
4403
- n.debug = n, n.default = n, n.coerce = d, n.disable = c, n.enable = a, n.enabled = u, n.humanize = Uc(), n.destroy = p, Object.keys(r).forEach((g) => {
4403
+ n.debug = n, n.default = n, n.coerce = d, n.disable = c, n.enable = a, n.enabled = u, n.humanize = Bc(), n.destroy = p, Object.keys(r).forEach((g) => {
4404
4404
  n[g] = r[g];
4405
4405
  }), n.names = [], n.skips = [], n.formatters = {};
4406
4406
  function i(g) {
@@ -4510,7 +4510,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4510
4510
  } catch {
4511
4511
  }
4512
4512
  }
4513
- e.exports = Bc()(s);
4513
+ e.exports = Fc()(s);
4514
4514
  var { formatters: a } = e.exports;
4515
4515
  a.j = function(l) {
4516
4516
  try {
@@ -4519,9 +4519,9 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4519
4519
  return "[UnexpectedJSONParseError]: " + c.message;
4520
4520
  }
4521
4521
  };
4522
- }), Fc = me((s, e) => {
4522
+ }), qc = me((s, e) => {
4523
4523
  le(), ue(), ce();
4524
- var t = Dc(), { EventEmitter: r } = (Ut(), Re(Pt)), i = $c(), n = Ua(), o = vt()("mqtt-packet:parser"), a = class Ti extends r {
4524
+ var t = $c(), { EventEmitter: r } = (Ut(), Re(Pt)), i = Uc(), n = Ua(), o = vt()("mqtt-packet:parser"), a = class Ti extends r {
4525
4525
  constructor() {
4526
4526
  super(), this.parser = this.constructor.parser;
4527
4527
  }
@@ -4872,7 +4872,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4872
4872
  }
4873
4873
  };
4874
4874
  e.exports = a;
4875
- }), qc = me((s, e) => {
4875
+ }), Hc = me((s, e) => {
4876
4876
  le(), ue(), ce();
4877
4877
  var { Buffer: t } = (qe(), Re(Fe)), r = 65536, i = {}, n = t.isBuffer(t.from([1, 2]).subarray(0, 1));
4878
4878
  function o(u) {
@@ -4894,7 +4894,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4894
4894
  return d.writeUInt32BE(u, 0), d;
4895
4895
  }
4896
4896
  e.exports = { cache: i, generateCache: a, generateNumber: o, genBufVariableByteInt: l, generate4ByteBuffer: c };
4897
- }), Hc = me((s, e) => {
4897
+ }), Wc = me((s, e) => {
4898
4898
  le(), ue(), ce(), typeof je > "u" || !je.version || je.version.indexOf("v0.") === 0 || je.version.indexOf("v1.") === 0 && je.version.indexOf("v1.8.") !== 0 ? e.exports = { nextTick: t } : e.exports = je;
4899
4899
  function t(r, i, n, o) {
4900
4900
  if (typeof r != "function") throw new TypeError('"callback" argument must be a function');
@@ -4924,7 +4924,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
4924
4924
  }
4925
4925
  }), Ba = me((s, e) => {
4926
4926
  le(), ue(), ce();
4927
- var t = Ua(), { Buffer: r } = (qe(), Re(Fe)), i = r.allocUnsafe(0), n = r.from([0]), o = qc(), a = Hc().nextTick, l = vt()("mqtt-packet:writeToStream"), c = o.cache, u = o.generateNumber, d = o.generateCache, p = o.genBufVariableByteInt, g = o.generate4ByteBuffer, h = z, b = !0;
4927
+ var t = Ua(), { Buffer: r } = (qe(), Re(Fe)), i = r.allocUnsafe(0), n = r.from([0]), o = Hc(), a = Wc().nextTick, l = vt()("mqtt-packet:writeToStream"), c = o.cache, u = o.generateNumber, d = o.generateCache, p = o.genBufVariableByteInt, g = o.generate4ByteBuffer, h = z, b = !0;
4928
4928
  function y(J, R, ie) {
4929
4929
  switch (l("generate called"), R.cork && (R.cork(), a(w, R)), b && (b = !1, d()), l("generate: packet.cmd: %s", J.cmd), J.cmd) {
4930
4930
  case "connect":
@@ -5305,7 +5305,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5305
5305
  return typeof J == "string" || J instanceof r;
5306
5306
  }
5307
5307
  e.exports = y;
5308
- }), Wc = me((s, e) => {
5308
+ }), zc = me((s, e) => {
5309
5309
  le(), ue(), ce();
5310
5310
  var t = Ba(), { EventEmitter: r } = (Ut(), Re(Pt)), { Buffer: i } = (qe(), Re(Fe));
5311
5311
  function n(a, l) {
@@ -5331,9 +5331,9 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5331
5331
  }
5332
5332
  };
5333
5333
  e.exports = n;
5334
- }), zc = me((s) => {
5335
- le(), ue(), ce(), s.parser = Fc().parser, s.generate = Wc(), s.writeToStream = Ba();
5336
- }), Vc = me((s, e) => {
5334
+ }), Vc = me((s) => {
5335
+ le(), ue(), ce(), s.parser = qc().parser, s.generate = zc(), s.writeToStream = Ba();
5336
+ }), Kc = me((s, e) => {
5337
5337
  le(), ue(), ce(), e.exports = r;
5338
5338
  function t(n) {
5339
5339
  return n instanceof Jr ? Jr.from(n) : new n.constructor(n.buffer.slice(), n.byteOffset, n.length);
@@ -5433,8 +5433,8 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5433
5433
  return o.pop(), a.pop(), h;
5434
5434
  }
5435
5435
  }
5436
- }), Kc = me((s, e) => {
5437
- le(), ue(), ce(), e.exports = Vc()();
5436
+ }), Gc = me((s, e) => {
5437
+ le(), ue(), ce(), e.exports = Kc()();
5438
5438
  }), Fa = me((s) => {
5439
5439
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.validateTopic = e, s.validateTopics = t;
5440
5440
  function e(r) {
@@ -5486,7 +5486,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5486
5486
  }
5487
5487
  };
5488
5488
  s.default = i;
5489
- }), Gc = me((s) => {
5489
+ }), Yc = me((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, i, n) => {
5492
5492
  r.log("handlePublish: packet %o", i), n = typeof n < "u" ? n : r.noop;
@@ -5541,7 +5541,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5541
5541
  }
5542
5542
  };
5543
5543
  s.default = t;
5544
- }), Yc = me((s, e) => {
5544
+ }), Jc = me((s, e) => {
5545
5545
  e.exports = { version: "5.15.0" };
5546
5546
  }), Zt = me((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;
@@ -5570,7 +5570,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5570
5570
  }
5571
5571
  s.nextTick = typeof je?.nextTick == "function" ? je.nextTick : (i) => {
5572
5572
  setTimeout(i, 0);
5573
- }, s.MQTTJS_VERSION = Yc().version;
5573
+ }, s.MQTTJS_VERSION = Jc().version;
5574
5574
  }), nn = me((s) => {
5575
5575
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 }), s.ReasonCodes = void 0;
5576
5576
  var e = Zt();
@@ -5624,7 +5624,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5624
5624
  r.disconnecting && Object.keys(r.outgoing).length === 0 && r.emit("outgoingEmpty");
5625
5625
  };
5626
5626
  s.default = t;
5627
- }), Jc = me((s) => {
5627
+ }), Qc = me((s) => {
5628
5628
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
5629
5629
  var e = Zt(), t = nn(), r = (i, n) => {
5630
5630
  let { options: o } = i, a = o.protocolVersion, l = a === 5 ? n.reasonCode : n.returnCode;
@@ -5646,7 +5646,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
5646
5646
  });
5647
5647
  };
5648
5648
  s.default = r;
5649
- }), Qc = me((s) => {
5649
+ }), Xc = me((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 je == "object" && je ? je : {}, i = (g, h, b, y) => {
5652
5652
  typeof r.emitWarning == "function" ? r.emitWarning(g, h, b, y) : console.error(`[${b}] ${h}: ${g}`);
@@ -6190,7 +6190,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6190
6190
  var r = class extends t {
6191
6191
  };
6192
6192
  s.Container = r;
6193
- }), Xc = me((s) => {
6193
+ }), Zc = me((s) => {
6194
6194
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6195
6195
  var e = kt(), t = class extends e.Base {
6196
6196
  constructor(i = []) {
@@ -6214,7 +6214,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6214
6214
  }
6215
6215
  }, r = t;
6216
6216
  s.default = r;
6217
- }), Zc = me((s) => {
6217
+ }), eu = me((s) => {
6218
6218
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6219
6219
  var e = kt(), t = class extends e.Base {
6220
6220
  constructor(i = []) {
@@ -6246,7 +6246,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6246
6246
  }
6247
6247
  }, r = t;
6248
6248
  s.default = r;
6249
- }), eu = me((s) => {
6249
+ }), tu = me((s) => {
6250
6250
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6251
6251
  var e = kt(), t = class extends e.Base {
6252
6252
  constructor(i = [], n = function(a, l) {
@@ -6344,7 +6344,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6344
6344
  }
6345
6345
  };
6346
6346
  s.RandomIterator = r;
6347
- }), tu = me((s) => {
6347
+ }), ru = me((s) => {
6348
6348
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6349
6349
  var e = r(As()), t = Va();
6350
6350
  function r(a) {
@@ -6445,7 +6445,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6445
6445
  }
6446
6446
  }, o = n;
6447
6447
  s.default = o;
6448
- }), ru = me((s) => {
6448
+ }), nu = me((s) => {
6449
6449
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6450
6450
  var e = i(As()), t = kt(), r = xt();
6451
6451
  function i(l) {
@@ -6630,7 +6630,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6630
6630
  }
6631
6631
  }, a = o;
6632
6632
  s.default = a;
6633
- }), nu = me((s) => {
6633
+ }), iu = me((s) => {
6634
6634
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6635
6635
  var e = r(As()), t = Va();
6636
6636
  function r(a) {
@@ -6815,7 +6815,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6815
6815
  }
6816
6816
  }, o = n;
6817
6817
  s.default = o;
6818
- }), iu = me((s) => {
6818
+ }), su = me((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, i) {
@@ -6872,7 +6872,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
6872
6872
  s.TreeNodeEnableIndex = t;
6873
6873
  }), Ja = me((s) => {
6874
6874
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
6875
- var e = iu(), t = kt(), r = xt(), i = class extends t.Container {
6875
+ var e = su(), t = kt(), r = xt(), i = class extends t.Container {
6876
6876
  constructor(o = function(l, c) {
6877
6877
  return l < c ? -1 : l > c ? 1 : 0;
6878
6878
  }, a = !1) {
@@ -7150,7 +7150,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7150
7150
  }
7151
7151
  }, i = r;
7152
7152
  s.default = i;
7153
- }), su = me((s) => {
7153
+ }), ou = me((s) => {
7154
7154
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7155
7155
  var e = i(Ja()), t = i(Qa()), r = xt();
7156
7156
  function i(l) {
@@ -7229,7 +7229,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7229
7229
  }
7230
7230
  }, a = o;
7231
7231
  s.default = a;
7232
- }), ou = me((s) => {
7232
+ }), au = me((s) => {
7233
7233
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7234
7234
  var e = i(Ja()), t = i(Qa()), r = xt();
7235
7235
  function i(l) {
@@ -7407,7 +7407,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7407
7407
  }
7408
7408
  };
7409
7409
  s.HashContainer = o;
7410
- }), au = me((s) => {
7410
+ }), lu = me((s) => {
7411
7411
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7412
7412
  var e = tl(), t = xt(), r = class rl extends e.HashContainerIterator {
7413
7413
  constructor(a, l, c, u) {
@@ -7470,7 +7470,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7470
7470
  }
7471
7471
  }, n = i;
7472
7472
  s.default = n;
7473
- }), lu = me((s) => {
7473
+ }), cu = me((s) => {
7474
7474
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), s.default = void 0;
7475
7475
  var e = tl(), t = i(el()), r = xt();
7476
7476
  function i(l) {
@@ -7553,7 +7553,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7553
7553
  }
7554
7554
  }, a = o;
7555
7555
  s.default = a;
7556
- }), cu = me((s) => {
7556
+ }), uu = me((s) => {
7557
7557
  le(), ue(), ce(), Object.defineProperty(s, "t", { value: !0 }), Object.defineProperty(s, "Deque", { enumerable: !0, get: function() {
7558
7558
  return o.default;
7559
7559
  } }), Object.defineProperty(s, "HashMap", { enumerable: !0, get: function() {
@@ -7575,13 +7575,13 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7575
7575
  } }), Object.defineProperty(s, "Vector", { enumerable: !0, get: function() {
7576
7576
  return i.default;
7577
7577
  } });
7578
- var e = d(Xc()), t = d(Zc()), r = d(eu()), i = d(tu()), n = d(ru()), o = d(nu()), a = d(su()), l = d(ou()), c = d(au()), u = d(lu());
7578
+ var e = d(Zc()), t = d(eu()), r = d(tu()), i = d(ru()), n = d(nu()), o = d(iu()), a = d(ou()), l = d(au()), c = d(lu()), u = d(cu());
7579
7579
  function d(p) {
7580
7580
  return p && p.t ? p : { default: p };
7581
7581
  }
7582
- }), uu = me((s, e) => {
7582
+ }), du = me((s, e) => {
7583
7583
  le(), ue(), ce();
7584
- var t = cu().OrderedSet, r = vt()("number-allocator:trace"), i = vt()("number-allocator:error");
7584
+ var t = uu().OrderedSet, r = vt()("number-allocator:trace"), i = vt()("number-allocator:error");
7585
7585
  function n(a, l) {
7586
7586
  this.low = a, this.high = l;
7587
7587
  }
@@ -7642,11 +7642,11 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7642
7642
  }, e.exports = o;
7643
7643
  }), il = me((s, e) => {
7644
7644
  le(), ue(), ce();
7645
- var t = uu();
7645
+ var t = du();
7646
7646
  e.exports.NumberAllocator = t;
7647
- }), du = me((s) => {
7647
+ }), hu = me((s) => {
7648
7648
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7649
- var e = Qc(), t = il(), r = class {
7649
+ var e = Xc(), t = il(), r = class {
7650
7650
  aliasToTopic;
7651
7651
  topicToAlias;
7652
7652
  max;
@@ -7675,13 +7675,13 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7675
7675
  }
7676
7676
  };
7677
7677
  s.default = r;
7678
- }), hu = me((s) => {
7678
+ }), fu = me((s) => {
7679
7679
  le(), ue(), ce();
7680
7680
  var e = s && s.__importDefault || function(o) {
7681
7681
  return o && o.__esModule ? o : { default: o };
7682
7682
  };
7683
7683
  Object.defineProperty(s, "__esModule", { value: !0 });
7684
- var t = nn(), r = e(du()), i = Zt(), n = (o, a) => {
7684
+ var t = nn(), r = e(hu()), i = Zt(), n = (o, a) => {
7685
7685
  o.log("_handleConnack");
7686
7686
  let { options: l } = o, c = l.protocolVersion === 5 ? a.reasonCode : a.returnCode;
7687
7687
  if (clearTimeout(o.connackTimer), delete o.topicAliasSend, a.properties) {
@@ -7701,7 +7701,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7701
7701
  }
7702
7702
  };
7703
7703
  s.default = n;
7704
- }), fu = me((s) => {
7704
+ }), pu = me((s) => {
7705
7705
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
7706
7706
  var e = (t, r, i) => {
7707
7707
  t.log("handling pubrel packet");
@@ -7714,13 +7714,13 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7714
7714
  });
7715
7715
  };
7716
7716
  s.default = e;
7717
- }), pu = me((s) => {
7717
+ }), mu = me((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(Gc()), r = e(Jc()), i = e(hu()), n = e(nn()), o = e(fu()), a = (l, c, u) => {
7723
+ var t = e(Yc()), r = e(Qc()), i = e(fu()), n = e(nn()), o = e(pu()), a = (l, c, u) => {
7724
7724
  let { options: d } = l;
7725
7725
  if (d.protocolVersion === 5 && d.properties && d.properties.maximumPacketSize && d.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) {
@@ -7778,7 +7778,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7778
7778
  }
7779
7779
  };
7780
7780
  s.default = e;
7781
- }), mu = me((s) => {
7781
+ }), gu = me((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 cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7798
7798
  }
7799
7799
  };
7800
7800
  s.default = e;
7801
- }), gu = me((s) => {
7801
+ }), bu = me((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 cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
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
- }), bu = me((s, e) => {
7821
+ }), yu = me((s, e) => {
7822
7822
  le(), ue(), ce();
7823
7823
  var t = sn().default;
7824
7824
  function r(i, n) {
@@ -7832,28 +7832,28 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7832
7832
  return (n === "string" ? String : Number)(i);
7833
7833
  }
7834
7834
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7835
- }), yu = me((s, e) => {
7835
+ }), vu = me((s, e) => {
7836
7836
  le(), ue(), ce();
7837
- var t = sn().default, r = bu();
7837
+ var t = sn().default, r = yu();
7838
7838
  function i(n) {
7839
7839
  var o = r(n, "string");
7840
7840
  return t(o) == "symbol" ? o : o + "";
7841
7841
  }
7842
7842
  e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
7843
- }), vu = me((s, e) => {
7843
+ }), wu = me((s, e) => {
7844
7844
  le(), ue(), ce();
7845
- var t = yu();
7845
+ var t = vu();
7846
7846
  function r(i, n, o) {
7847
7847
  return (n = t(n)) in i ? Object.defineProperty(i, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : i[n] = o, i;
7848
7848
  }
7849
7849
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7850
- }), wu = me((s, e) => {
7850
+ }), ku = me((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
- }), ku = me((s, e) => {
7856
+ }), xu = me((s, e) => {
7857
7857
  le(), ue(), ce();
7858
7858
  function t(r, i) {
7859
7859
  var n = r == null ? null : typeof Symbol < "u" && r[Symbol.iterator] || r["@@iterator"];
@@ -7877,7 +7877,7 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7877
7877
  }
7878
7878
  }
7879
7879
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7880
- }), xu = me((s, e) => {
7880
+ }), _u = me((s, e) => {
7881
7881
  le(), ue(), ce();
7882
7882
  function t(r, i) {
7883
7883
  (i == null || i > r.length) && (i = r.length);
@@ -7885,9 +7885,9 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7885
7885
  return o;
7886
7886
  }
7887
7887
  e.exports = t, e.exports.__esModule = !0, e.exports.default = e.exports;
7888
- }), _u = me((s, e) => {
7888
+ }), Su = me((s, e) => {
7889
7889
  le(), ue(), ce();
7890
- var t = xu();
7890
+ var t = _u();
7891
7891
  function r(i, n) {
7892
7892
  if (i) {
7893
7893
  if (typeof i == "string") return t(i, n);
@@ -7896,16 +7896,16 @@ var cr, Ii, zt, Ia, Ta, Ca, Pa, Oa, La, Ut = Qe(() => {
7896
7896
  }
7897
7897
  }
7898
7898
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
7899
- }), Su = me((s, e) => {
7899
+ }), Eu = me((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
- }), Eu = me((s, e) => {
7906
+ }), Au = me((s, e) => {
7907
7907
  le(), ue(), ce();
7908
- var t = wu(), r = ku(), i = _u(), n = Su();
7908
+ var t = ku(), r = xu(), i = Su(), n = Eu();
7909
7909
  function o(a, l) {
7910
7910
  return t(a) || r(a, l) || i(a, l) || n();
7911
7911
  }
@@ -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 = i(c), d = l(u, c), p = r(d);
7939
7939
  t.addUniqueNumber = p, t.generateUniqueNumber = d;
7940
7940
  });
7941
- }), Au = me((s, e) => {
7941
+ }), Iu = me((s, e) => {
7942
7942
  le(), ue(), ce();
7943
7943
  function t(i, n, o, a, l, c, u) {
7944
7944
  try {
@@ -8094,7 +8094,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8094
8094
  return new r(t().w(n, o, a, l), c || Promise);
8095
8095
  }
8096
8096
  e.exports = i, e.exports.__esModule = !0, e.exports.default = e.exports;
8097
- }), Iu = me((s, e) => {
8097
+ }), Tu = me((s, e) => {
8098
8098
  le(), ue(), ce();
8099
8099
  var t = dl();
8100
8100
  function r(i, n, o, a, l) {
@@ -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
- }), Tu = me((s, e) => {
8107
+ }), Cu = me((s, e) => {
8108
8108
  le(), ue(), ce();
8109
8109
  function t(r) {
8110
8110
  var i = 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
- }), Cu = me((s, e) => {
8118
+ }), Pu = me((s, e) => {
8119
8119
  le(), ue(), ce();
8120
8120
  var t = sn().default;
8121
8121
  function r(i) {
@@ -8130,9 +8130,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8130
8130
  throw new TypeError(t(i) + " is not iterable");
8131
8131
  }
8132
8132
  e.exports = r, e.exports.__esModule = !0, e.exports.default = e.exports;
8133
- }), Pu = me((s, e) => {
8133
+ }), Ou = me((s, e) => {
8134
8134
  le(), ue(), ce();
8135
- var t = al(), r = cl(), i = Iu(), n = dl(), o = ul(), a = Tu(), l = Cu();
8135
+ var t = al(), r = cl(), i = Tu(), n = dl(), o = ul(), a = Cu(), l = Pu();
8136
8136
  function c() {
8137
8137
  var u = r(), d = u.m(c), p = (Object.getPrototypeOf ? Object.getPrototypeOf(d) : d.__proto__).constructor;
8138
8138
  function g(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
- }), Ou = me((s, e) => {
8182
+ }), Lu = me((s, e) => {
8183
8183
  le(), ue(), ce();
8184
- var t = Pu()();
8184
+ var t = Ou()();
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
- }), Lu = me((s, e) => {
8191
+ }), Mu = me((s, e) => {
8192
8192
  le(), ue(), ce(), (function(t, r) {
8193
- typeof s == "object" && typeof e < "u" ? r(s, vu(), Eu(), ol(), Au(), Ou()) : 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, wu(), Au(), ol(), Iu(), Lu()) : 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, i, n, o, 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
- }), Mu = me((s, e) => {
8322
+ }), Nu = me((s, e) => {
8323
8323
  le(), ue(), ce(), (function(t, r) {
8324
- typeof s == "object" && typeof e < "u" ? r(s, sn(), Lu(), ol()) : 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, sn(), Mu(), ol()) : 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, i, n) {
8326
8326
  var o = /* @__PURE__ */ new Map([[0, null]]), a = /* @__PURE__ */ new Map([[0, null]]), l = i.createBroker({ clearInterval: function(u) {
8327
8327
  var d = 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
- }), Nu = me((s, e) => {
8372
+ }), Ru = me((s, e) => {
8373
8373
  le(), ue(), ce(), (function(t, r) {
8374
- typeof s == "object" && typeof e < "u" ? r(s, Mu()) : 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, Nu()) : 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 i = function(d, p) {
8377
8377
  var g = 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 && je?.versions ? !Object.prototype.hasOwnProperty.call(je.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", i = e() || t() || r();
8401
8401
  s.isWebWorker = t(), s.isReactNativeBrowser = r(), s.default = i;
8402
- }), Ru = me((s) => {
8402
+ }), ju = me((s) => {
8403
8403
  le(), ue(), ce();
8404
8404
  var e = s && s.__createBinding || (Object.create ? function(c, u, d, p) {
8405
8405
  p === void 0 && (p = d);
@@ -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 i = Nu(), n = r(on()), o = { set: i.setInterval, clear: i.clearInterval }, a = { set: (c, u) => setInterval(c, u), clear: (c) => clearInterval(c) }, l = (c) => {
8432
+ var i = Ru(), n = r(on()), o = { set: i.setInterval, clear: i.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;
@@ -8446,7 +8446,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
8446
8446
  return i && i.__esModule ? i : { default: i };
8447
8447
  };
8448
8448
  Object.defineProperty(s, "__esModule", { value: !0 });
8449
- var t = e(Ru()), r = class {
8449
+ var t = e(ju()), 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 = i(zc()), o = Ft(), a = i(Kc()), l = i(vt()), c = r(Fa()), u = i(qa()), d = i(pu()), p = i(sl()), g = i(mu()), h = Zt(), b = gu(), y = i(hl()), w = r(on()), m = globalThis.setImmediate || ((...v) => {
8522
+ var n = i(Vc()), o = Ft(), a = i(Gc()), l = i(vt()), c = r(Fa()), u = i(qa()), d = i(mu()), p = i(sl()), g = i(gu()), h = Zt(), b = bu(), y = i(hl()), w = r(on()), m = globalThis.setImmediate || ((...v) => {
8523
8523
  let E = v.shift();
8524
8524
  (0, h.nextTick)(() => {
8525
8525
  E(...v);
@@ -9021,7 +9021,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
9021
9021
  }
9022
9022
  };
9023
9023
  s.default = _;
9024
- }), ju = me((s) => {
9024
+ }), Du = me((s) => {
9025
9025
  le(), ue(), ce(), Object.defineProperty(s, "__esModule", { value: !0 });
9026
9026
  var e = il(), t = class {
9027
9027
  numberAllocator;
@@ -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 Du() {
9050
+ function $u() {
9051
9051
  if (Oi) return Ar;
9052
9052
  Oi = !0;
9053
9053
  let s = 2147483647, e = 36, t = 1, r = 26, i = 38, n = 700, o = 72, a = 128, l = "-", c = /^xn--/, u = /[^\0-\x7F]/, d = /[\x2E\u3002\uFF0E\uFF61]/g, p = { overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input" }, g = e - t, h = Math.floor, b = String.fromCharCode;
@@ -9138,10 +9138,10 @@ function Du() {
9138
9138
  });
9139
9139
  } }, Ar;
9140
9140
  }
9141
- var Ar, Oi, Tt, $u = Qe(() => {
9142
- le(), ue(), ce(), Ar = {}, Oi = !1, Tt = Du(), Tt.decode, Tt.encode, Tt.toASCII, Tt.toUnicode, Tt.ucs2, Tt.version;
9141
+ var Ar, Oi, Tt, Uu = Qe(() => {
9142
+ le(), ue(), ce(), Ar = {}, Oi = !1, Tt = $u(), Tt.decode, Tt.encode, Tt.toASCII, Tt.toUnicode, Tt.ucs2, Tt.version;
9143
9143
  });
9144
- function Uu() {
9144
+ function Bu() {
9145
9145
  return Mi || (Mi = !0, Li = function() {
9146
9146
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
9147
9147
  if (typeof Symbol.iterator == "symbol") return !0;
@@ -9160,16 +9160,16 @@ function Uu() {
9160
9160
  return !0;
9161
9161
  }), Li;
9162
9162
  }
9163
- function Bu() {
9163
+ function Fu() {
9164
9164
  return Ri || (Ri = !0, Ni = Error), Ni;
9165
9165
  }
9166
- function Fu() {
9166
+ function qu() {
9167
9167
  return Di || (Di = !0, ji = EvalError), ji;
9168
9168
  }
9169
- function qu() {
9169
+ function Hu() {
9170
9170
  return Ui || (Ui = !0, $i = RangeError), $i;
9171
9171
  }
9172
- function Hu() {
9172
+ function Wu() {
9173
9173
  return Fi || (Fi = !0, Bi = ReferenceError), Bi;
9174
9174
  }
9175
9175
  function fl() {
@@ -9178,18 +9178,18 @@ function fl() {
9178
9178
  function br() {
9179
9179
  return zi || (zi = !0, Wi = TypeError), Wi;
9180
9180
  }
9181
- function Wu() {
9181
+ function zu() {
9182
9182
  return Ki || (Ki = !0, Vi = URIError), Vi;
9183
9183
  }
9184
- function zu() {
9184
+ function Vu() {
9185
9185
  if (Gi) return Ir;
9186
9186
  Gi = !0;
9187
- var s = typeof Symbol < "u" && Symbol, e = Uu();
9187
+ var s = typeof Symbol < "u" && Symbol, e = Bu();
9188
9188
  return Ir = function() {
9189
9189
  return typeof s != "function" || typeof Symbol != "function" || typeof s("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : e();
9190
9190
  }, Ir;
9191
9191
  }
9192
- function Vu() {
9192
+ function Ku() {
9193
9193
  if (Yi) return Tr;
9194
9194
  Yi = !0;
9195
9195
  var s = { __proto__: null, foo: {} }, e = Object;
@@ -9197,7 +9197,7 @@ function Vu() {
9197
9197
  return { __proto__: s }.foo === s.foo && !(s instanceof e);
9198
9198
  }, Tr;
9199
9199
  }
9200
- function Ku() {
9200
+ function Gu() {
9201
9201
  if (Ji) return Cr;
9202
9202
  Ji = !0;
9203
9203
  var s = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, t = Math.max, r = "[object Function]", i = function(a, l) {
@@ -9232,10 +9232,10 @@ function Ku() {
9232
9232
  function Is() {
9233
9233
  if (Qi) return Pr;
9234
9234
  Qi = !0;
9235
- var s = Ku();
9235
+ var s = Gu();
9236
9236
  return Pr = Function.prototype.bind || s, Pr;
9237
9237
  }
9238
- function Gu() {
9238
+ function Yu() {
9239
9239
  if (Xi) return Or;
9240
9240
  Xi = !0;
9241
9241
  var s = Function.prototype.call, e = Object.prototype.hasOwnProperty, t = Is();
@@ -9244,7 +9244,7 @@ function Gu() {
9244
9244
  function er() {
9245
9245
  if (Zi) return Lr;
9246
9246
  Zi = !0;
9247
- var s, e = Bu(), t = Fu(), r = qu(), i = Hu(), n = fl(), o = br(), a = Wu(), l = Function, c = function(z) {
9247
+ var s, e = Fu(), t = qu(), r = Hu(), i = Wu(), n = fl(), o = br(), a = zu(), l = Function, c = function(z) {
9248
9248
  try {
9249
9249
  return l('"use strict"; return (' + z + ").constructor;")();
9250
9250
  } catch {
@@ -9267,7 +9267,7 @@ function er() {
9267
9267
  return d;
9268
9268
  }
9269
9269
  }
9270
- })() : d, g = zu()(), h = Vu()(), b = Object.getPrototypeOf || (h ? function(z) {
9270
+ })() : d, g = Vu()(), h = Ku()(), b = Object.getPrototypeOf || (h ? function(z) {
9271
9271
  return z.__proto__;
9272
9272
  } : null), y = {}, w = typeof Uint8Array > "u" || !b ? s : b(Uint8Array), m = { __proto__: null, "%AggregateError%": typeof AggregateError > "u" ? s : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer > "u" ? s : ArrayBuffer, "%ArrayIteratorPrototype%": g && b ? b([][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%": g && b ? b(b([][Symbol.iterator]())) : s, "%JSON%": typeof JSON == "object" ? JSON : s, "%Map%": typeof Map > "u" ? s : Map, "%MapIteratorPrototype%": typeof Map > "u" || !g || !b ? s : b((/* @__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%": i, "%Reflect%": typeof Reflect > "u" ? s : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set > "u" ? s : Set, "%SetIteratorPrototype%": typeof Set > "u" || !g || !b ? s : b((/* @__PURE__ */ new Set())[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? s : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": g && b ? b(""[Symbol.iterator]()) : s, "%Symbol%": g ? Symbol : s, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": w, "%TypeError%": o, "%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 (b) try {
@@ -9289,7 +9289,7 @@ function er() {
9289
9289
  G && b && (ne = b(G.prototype));
9290
9290
  }
9291
9291
  return m[W] = ne, ne;
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 = Is(), S = Gu(), I = E.call(Function.call, Array.prototype.concat), P = E.call(Function.apply, Array.prototype.splice), O = E.call(Function.call, String.prototype.replace), j = E.call(Function.call, String.prototype.slice), T = E.call(Function.call, RegExp.prototype.exec), F = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $ = /\\(\\)?/g, U = function(z) {
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 = Is(), S = Yu(), I = E.call(Function.call, Array.prototype.concat), P = E.call(Function.apply, Array.prototype.splice), O = E.call(Function.call, String.prototype.replace), j = E.call(Function.call, String.prototype.slice), T = E.call(Function.call, RegExp.prototype.exec), F = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, $ = /\\(\\)?/g, U = function(z) {
9293
9293
  var W = j(z, 0, 1), ne = j(z, -1);
9294
9294
  if (W === "%" && ne !== "%") throw new n("invalid intrinsic syntax, expected closing `%`");
9295
9295
  if (ne === "%" && W !== "%") throw new n("invalid intrinsic syntax, expected opening `%`");
@@ -9353,7 +9353,7 @@ function pl() {
9353
9353
  }
9354
9354
  return Nr = e, Nr;
9355
9355
  }
9356
- function Yu() {
9356
+ function Ju() {
9357
9357
  if (rs) return Rr;
9358
9358
  rs = !0;
9359
9359
  var s = Ts(), e = fl(), t = br(), r = pl();
@@ -9370,7 +9370,7 @@ function Yu() {
9370
9370
  else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
9371
9371
  }, Rr;
9372
9372
  }
9373
- function Ju() {
9373
+ function Qu() {
9374
9374
  if (ns) return jr;
9375
9375
  ns = !0;
9376
9376
  var s = Ts(), e = function() {
@@ -9385,10 +9385,10 @@ function Ju() {
9385
9385
  }
9386
9386
  }, jr = e, jr;
9387
9387
  }
9388
- function Qu() {
9388
+ function Xu() {
9389
9389
  if (is) return Dr;
9390
9390
  is = !0;
9391
- var s = er(), e = Yu(), t = Ju()(), r = pl(), i = br(), n = s("%Math.floor%");
9391
+ var s = er(), e = Ju(), t = Qu()(), r = pl(), i = br(), n = s("%Math.floor%");
9392
9392
  return Dr = function(o, a) {
9393
9393
  if (typeof o != "function") throw new i("`fn` is not a function");
9394
9394
  if (typeof a != "number" || a < 0 || a > 4294967295 || n(a) !== a) throw new i("`length` must be a positive 32-bit integer");
@@ -9400,10 +9400,10 @@ function Qu() {
9400
9400
  return (c || u || !l) && (t ? e(o, "length", a, !0, !0) : e(o, "length", a)), o;
9401
9401
  }, Dr;
9402
9402
  }
9403
- function Xu() {
9403
+ function Zu() {
9404
9404
  if (ss) return Vt;
9405
9405
  ss = !0;
9406
- var s = Is(), e = er(), t = Qu(), r = br(), i = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), o = e("%Reflect.apply%", !0) || s.call(n, i), a = Ts(), l = e("%Math.max%");
9406
+ var s = Is(), e = er(), t = Xu(), r = br(), i = e("%Function.prototype.apply%"), n = e("%Function.prototype.call%"), o = e("%Reflect.apply%", !0) || s.call(n, i), a = Ts(), l = e("%Math.max%");
9407
9407
  Vt = function(u) {
9408
9408
  if (typeof u != "function") throw new r("a function is required");
9409
9409
  var d = o(s, n, arguments);
@@ -9414,27 +9414,27 @@ function Xu() {
9414
9414
  };
9415
9415
  return a ? a(Vt, "apply", { value: c }) : Vt.apply = c, Vt;
9416
9416
  }
9417
- function Zu() {
9417
+ function ed() {
9418
9418
  if (os) return $r;
9419
9419
  os = !0;
9420
- var s = er(), e = Xu(), t = e(s("String.prototype.indexOf"));
9420
+ var s = er(), e = Zu(), t = e(s("String.prototype.indexOf"));
9421
9421
  return $r = function(r, i) {
9422
9422
  var n = s(r, !!i);
9423
9423
  return typeof n == "function" && t(r, ".prototype.") > -1 ? e(n) : n;
9424
9424
  }, $r;
9425
9425
  }
9426
- var Li, Mi, Ni, Ri, ji, Di, $i, Ui, Bi, Fi, qi, Hi, Wi, zi, Vi, Ki, Ir, Gi, Tr, Yi, Cr, Ji, Pr, Qi, Or, Xi, Lr, Zi, Mr, es, Nr, ts, Rr, rs, jr, ns, Dr, is, Vt, ss, $r, os, ed = Qe(() => {
9426
+ var Li, Mi, Ni, Ri, ji, Di, $i, Ui, Bi, Fi, qi, Hi, Wi, zi, Vi, Ki, Ir, Gi, Tr, Yi, Cr, Ji, Pr, Qi, Or, Xi, Lr, Zi, Mr, es, Nr, ts, Rr, rs, jr, ns, Dr, is, Vt, ss, $r, os, td = Qe(() => {
9427
9427
  le(), ue(), ce(), Li = {}, Mi = !1, Ni = {}, Ri = !1, ji = {}, Di = !1, $i = {}, Ui = !1, Bi = {}, Fi = !1, qi = {}, Hi = !1, Wi = {}, zi = !1, Vi = {}, Ki = !1, Ir = {}, Gi = !1, Tr = {}, Yi = !1, Cr = {}, Ji = !1, Pr = {}, Qi = !1, Or = {}, Xi = !1, Lr = {}, Zi = !1, Mr = {}, es = !1, Nr = {}, ts = !1, Rr = {}, rs = !1, jr = {}, ns = !1, Dr = {}, is = !1, Vt = {}, ss = !1, $r = {}, os = !1;
9428
9428
  });
9429
9429
  function Cs(s) {
9430
9430
  throw new Error("Node.js process " + s + " is not supported by JSPM core outside of Node.js");
9431
9431
  }
9432
- function td() {
9432
+ function rd() {
9433
9433
  !$t || !jt || ($t = !1, jt.length ? ht = jt.concat(ht) : fr = -1, ht.length && ml());
9434
9434
  }
9435
9435
  function ml() {
9436
9436
  if (!$t) {
9437
- var s = setTimeout(td, 0);
9437
+ var s = setTimeout(rd, 0);
9438
9438
  $t = !0;
9439
9439
  for (var e = ht.length; e; ) {
9440
9440
  for (jt = ht, ht = []; ++fr < e; ) jt && jt[fr].run();
@@ -9443,7 +9443,7 @@ function ml() {
9443
9443
  jt = null, $t = !1, clearTimeout(s);
9444
9444
  }
9445
9445
  }
9446
- function rd(s) {
9446
+ function nd(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
9449
  ht.push(new gl(s, e)), ht.length === 1 && !$t && setTimeout(ml, 0);
@@ -9453,25 +9453,25 @@ function gl(s, e) {
9453
9453
  }
9454
9454
  function ze() {
9455
9455
  }
9456
- function nd(s) {
9456
+ function id(s) {
9457
9457
  Cs("_linkedBinding");
9458
9458
  }
9459
- function id(s) {
9459
+ function sd(s) {
9460
9460
  Cs("dlopen");
9461
9461
  }
9462
- function sd() {
9462
+ function od() {
9463
9463
  return [];
9464
9464
  }
9465
- function od() {
9465
+ function ad() {
9466
9466
  return [];
9467
9467
  }
9468
- function ad(s, e) {
9468
+ function ld(s, e) {
9469
9469
  if (!s) throw new Error(e || "assertion error");
9470
9470
  }
9471
- function ld() {
9471
+ function cd() {
9472
9472
  return !1;
9473
9473
  }
9474
- function cd() {
9474
+ function ud() {
9475
9475
  return bt.now() / 1e3;
9476
9476
  }
9477
9477
  function un(s) {
@@ -9481,7 +9481,7 @@ function un(s) {
9481
9481
  function Et() {
9482
9482
  return Ps;
9483
9483
  }
9484
- function ud(s) {
9484
+ function dd(s) {
9485
9485
  return [];
9486
9486
  }
9487
9487
  var ht, $t, jt, fr, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no, io, so, oo, ao, lo, co, wr, uo, ho, fo, po, mo, go, bo, yo, vo, wo, ko, xo, _o, So, Eo, Ao, Io, To, Co, Po, Oo, Lo, Mo, No, Ro, bt, dn, Ur, jo, Do, $o, Uo, Bo, Fo, qo, Ho, Wo, zo, Vo, Ps, bl = Qe(() => {
@@ -9501,9 +9501,9 @@ var ht, $t, jt, fr, Hs, Ws, zs, Vs, Ks, Gs, Ys, Js, Qs, Xs, Zs, eo, to, ro, no,
9501
9501
  }, uo = wr, ho = wr, fo = ze, po = ze, mo = ze, go = {}, bo = { inspector: !1, debug: !1, uv: !1, ipv6: !1, tls_alpn: !1, tls_sni: !1, tls_ocsp: !1, tls: !1, cached_builtins: !0 }, yo = ze, vo = ze, wo = ze, ko = ze, xo = ze, _o = ze, So = ze, Eo = void 0, Ao = void 0, Io = void 0, To = ze, Co = 2, Po = 1, Oo = "/bin/usr/node", Lo = 9229, Mo = "node", No = [], Ro = ze, bt = { now: typeof performance < "u" ? performance.now.bind(performance) : void 0, timing: typeof performance < "u" ? performance.timing : void 0 }, bt.now === void 0 && (dn = Date.now(), bt.timing && bt.timing.navigationStart && (dn = bt.timing.navigationStart), bt.now = () => Date.now() - dn), Ur = 1e9, un.bigint = function(s) {
9502
9502
  var e = un(s);
9503
9503
  return typeof BigInt > "u" ? e[0] * Ur + e[1] : BigInt(e[0] * Ur) + BigInt(e[1]);
9504
- }, jo = 10, Do = {}, $o = 0, Uo = Et, Bo = Et, Fo = Et, qo = Et, Ho = Et, Wo = ze, zo = Et, Vo = Et, Ps = { version: Ys, versions: Js, arch: Ws, platform: zs, release: ro, _rawDebug: no, moduleLoadList: io, binding: Xs, _linkedBinding: nd, _events: Do, _eventsCount: $o, _maxListeners: jo, on: Et, addListener: Uo, once: Bo, off: Fo, removeListener: qo, removeAllListeners: Ho, emit: Wo, prependListener: zo, prependOnceListener: Vo, listeners: ud, domain: so, _exiting: oo, config: ao, dlopen: id, uptime: cd, _getActiveRequests: sd, _getActiveHandles: od, reallyExit: lo, _kill: co, cpuUsage: wr, resourceUsage: uo, memoryUsage: ho, kill: fo, exit: po, openStdin: mo, allowedNodeEnvironmentFlags: go, assert: ad, features: bo, _fatalExceptions: yo, setUncaughtExceptionCaptureCallback: vo, hasUncaughtExceptionCaptureCallback: ld, emitWarning: Qs, nextTick: rd, _tickCallback: wo, _debugProcess: ko, _debugEnd: xo, _startProfilerIdleNotifier: _o, _stopProfilerIdleNotifier: So, stdout: Eo, stdin: Io, stderr: Ao, abort: To, umask: Zs, chdir: to, cwd: eo, env: Vs, title: Hs, argv: Ks, execArgv: Gs, pid: Co, ppid: Po, execPath: Oo, debugPort: Lo, hrtime: un, argv0: Mo, _preload_modules: No, setSourceMapsEnabled: Ro };
9504
+ }, jo = 10, Do = {}, $o = 0, Uo = Et, Bo = Et, Fo = Et, qo = Et, Ho = Et, Wo = ze, zo = Et, Vo = Et, Ps = { version: Ys, versions: Js, arch: Ws, platform: zs, release: ro, _rawDebug: no, moduleLoadList: io, binding: Xs, _linkedBinding: id, _events: Do, _eventsCount: $o, _maxListeners: jo, on: Et, addListener: Uo, once: Bo, off: Fo, removeListener: qo, removeAllListeners: Ho, emit: Wo, prependListener: zo, prependOnceListener: Vo, listeners: dd, domain: so, _exiting: oo, config: ao, dlopen: sd, uptime: ud, _getActiveRequests: od, _getActiveHandles: ad, reallyExit: lo, _kill: co, cpuUsage: wr, resourceUsage: uo, memoryUsage: ho, kill: fo, exit: po, openStdin: mo, allowedNodeEnvironmentFlags: go, assert: ld, features: bo, _fatalExceptions: yo, setUncaughtExceptionCaptureCallback: vo, hasUncaughtExceptionCaptureCallback: cd, emitWarning: Qs, nextTick: nd, _tickCallback: wo, _debugProcess: ko, _debugEnd: xo, _startProfilerIdleNotifier: _o, _stopProfilerIdleNotifier: So, stdout: Eo, stdin: Io, stderr: Ao, abort: To, umask: Zs, chdir: to, cwd: eo, env: Vs, title: Hs, argv: Ks, execArgv: Gs, pid: Co, ppid: Po, execPath: Oo, debugPort: Lo, hrtime: un, argv0: Mo, _preload_modules: No, setSourceMapsEnabled: Ro };
9505
9505
  });
9506
- function dd() {
9506
+ function hd() {
9507
9507
  if (as) return Br;
9508
9508
  as = !0;
9509
9509
  var s = Ps;
@@ -9654,11 +9654,11 @@ function dd() {
9654
9654
  }, sep: "/", delimiter: ":", win32: null, posix: null };
9655
9655
  return i.posix = i, Br = i, Br;
9656
9656
  }
9657
- var Br, as, ls, hd = Qe(() => {
9658
- le(), ue(), ce(), bl(), Br = {}, as = !1, ls = dd();
9657
+ var Br, as, ls, fd = Qe(() => {
9658
+ le(), ue(), ce(), bl(), Br = {}, as = !1, ls = hd();
9659
9659
  }), yl = {};
9660
9660
  Qt(yl, { URL: () => Tl, Url: () => _l, default: () => Ke, fileURLToPath: () => wl, format: () => Sl, parse: () => Il, pathToFileURL: () => kl, resolve: () => El, resolveObject: () => Al });
9661
- function fd() {
9661
+ function pd() {
9662
9662
  if (cs) return Fr;
9663
9663
  cs = !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, i = typeof Set == "function" && Set.prototype, n = Object.getOwnPropertyDescriptor && i ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, o = i && n && typeof n.get == "function" ? n.get : null, a = i && Set.prototype.forEach, l = typeof WeakMap == "function" && WeakMap.prototype, c = l ? WeakMap.prototype.has : null, u = typeof WeakSet == "function" && WeakSet.prototype, d = u ? WeakSet.prototype.has : null, p = typeof WeakRef == "function" && WeakRef.prototype, g = p ? WeakRef.prototype.deref : null, h = Boolean.prototype.valueOf, b = Object.prototype.toString, y = Function.prototype.toString, w = String.prototype.match, m = String.prototype.slice, k = String.prototype.replace, _ = String.prototype.toUpperCase, v = String.prototype.toLowerCase, E = RegExp.prototype.test, S = Array.prototype.concat, I = Array.prototype.join, P = Array.prototype.slice, O = Math.floor, j = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, T = Object.getOwnPropertySymbols, F = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, $ = typeof Symbol == "function" && typeof Symbol.iterator == "object", U = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === $ || !0) ? Symbol.toStringTag : null, X = Object.prototype.propertyIsEnumerable, z = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(K) {
@@ -9953,10 +9953,10 @@ function fd() {
9953
9953
  }
9954
9954
  return Fr;
9955
9955
  }
9956
- function pd() {
9956
+ function md() {
9957
9957
  if (us) return Hr;
9958
9958
  us = !0;
9959
- var s = er(), e = Zu(), t = fd(), r = br(), i = s("%WeakMap%", !0), n = s("%Map%", !0), o = 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), d = e("Map.prototype.has", !0), p = function(y, w) {
9959
+ var s = er(), e = ed(), t = pd(), r = br(), i = s("%WeakMap%", !0), n = s("%Map%", !0), o = 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), d = e("Map.prototype.has", !0), p = function(y, w) {
9960
9960
  for (var m = y, k; (k = m.next) !== null; m = k) if (k.key === w) return m.next = k.next, k.next = y.next, y.next = k, k;
9961
9961
  }, g = function(y, w) {
9962
9962
  var m = p(y, w);
@@ -10098,10 +10098,10 @@ function vl() {
10098
10098
  };
10099
10099
  return zr = { arrayToObject: n, assign: a, combine: h, compact: d, decode: l, encode: u, isBuffer: g, isRegExp: p, maybeMap: b, merge: o }, zr;
10100
10100
  }
10101
- function md() {
10101
+ function gd() {
10102
10102
  if (fs) return Vr;
10103
10103
  fs = !0;
10104
- var s = pd(), e = vl(), t = Os(), r = Object.prototype.hasOwnProperty, i = { brackets: function(b) {
10104
+ var s = md(), e = vl(), t = Os(), r = Object.prototype.hasOwnProperty, i = { brackets: function(b) {
10105
10105
  return b + "[]";
10106
10106
  }, comma: "comma", indices: function(b, y) {
10107
10107
  return b + "[" + y + "]";
@@ -10190,7 +10190,7 @@ function md() {
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
  }, Vr;
10192
10192
  }
10193
- function gd() {
10193
+ function bd() {
10194
10194
  if (ps) return Kr;
10195
10195
  ps = !0;
10196
10196
  var s = vl(), 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 }, i = function(p) {
@@ -10263,13 +10263,13 @@ function gd() {
10263
10263
  return h.allowSparse === !0 ? y : s.compact(y);
10264
10264
  }, Kr;
10265
10265
  }
10266
- function bd() {
10266
+ function yd() {
10267
10267
  if (ms) return Gr;
10268
10268
  ms = !0;
10269
- var s = md(), e = gd(), t = Os();
10269
+ var s = gd(), e = bd(), t = Os();
10270
10270
  return Gr = { formats: t, parse: e, stringify: s }, Gr;
10271
10271
  }
10272
- function yd() {
10272
+ function vd() {
10273
10273
  if (gs) return Ct;
10274
10274
  gs = !0;
10275
10275
  var s = Tt;
@@ -10277,7 +10277,7 @@ function yd() {
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]*$/, i = /^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/, n = ["<", ">", '"', "`", " ", "\r", `
10280
- `, " "], o = ["{", "}", "|", "\\", "^", "`"].concat(n), a = ["'"].concat(o), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = { javascript: !0, "javascript:": !0 }, h = { javascript: !0, "javascript:": !0 }, b = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, y = bd();
10280
+ `, " "], o = ["{", "}", "|", "\\", "^", "`"].concat(n), a = ["'"].concat(o), l = ["%", "/", "?", ";", "#"].concat(a), c = ["/", "?", "#"], u = 255, d = /^[+a-z0-9A-Z_-]{0,63}$/, p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, g = { javascript: !0, "javascript:": !0 }, h = { javascript: !0, "javascript:": !0 }, b = { http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0 }, y = yd();
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();
@@ -10434,9 +10434,9 @@ function wl(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 Qr ? vd(s) : wd(s);
10437
+ return Qr ? wd(s) : kd(s);
10438
10438
  }
10439
- function vd(s) {
10439
+ function wd(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 i = t.codePointAt(r + 2) || 32;
@@ -10449,7 +10449,7 @@ function vd(s) {
10449
10449
  return t.slice(1);
10450
10450
  }
10451
10451
  }
10452
- function wd(s) {
10452
+ function kd(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] === "%") {
@@ -10465,9 +10465,9 @@ function kl(s) {
10465
10465
  return e.includes("%") && (e = e.replace(Nl, "%25")), !Qr && e.includes("\\") && (e = e.replace(Rl, "%5C")), e.includes(`
10466
10466
  `) && (e = e.replace(jl, "%0A")), e.includes("\r") && (e = e.replace(Dl, "%0D")), e.includes(" ") && (e = e.replace($l, "%09")), r.pathname = e, r;
10467
10467
  }
10468
- var xl, Fr, cs, qr, Hr, us, Wr, ds, zr, hs, Vr, fs, Kr, ps, Gr, ms, Ct, gs, Ke, Ko, _l, Sl, El, Al, Il, Tl, Cl, Pl, Ol, Ll, Qr, Ml, Nl, Rl, jl, Dl, $l, kd = Qe(() => {
10469
- le(), ue(), ce(), $u(), ed(), hd(), bl(), xl = Object.freeze(/* @__PURE__ */ Object.create(null)), Fr = {}, cs = !1, qr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, Hr = {}, us = !1, Wr = {}, ds = !1, zr = {}, hs = !1, Vr = {}, fs = !1, Kr = {}, ps = !1, Gr = {}, ms = !1, Ct = {}, gs = !1, Ke = yd(), Ke.parse, Ke.resolve, Ke.resolveObject, Ke.format, Ke.Url, Ko = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, Ke.URL = typeof URL < "u" ? URL : null, Ke.pathToFileURL = kl, Ke.fileURLToPath = wl, _l = Ke.Url, Sl = Ke.format, El = Ke.resolve, Al = Ke.resolveObject, Il = Ke.parse, Tl = Ke.URL, Cl = 92, Pl = 47, Ol = 97, Ll = 122, Qr = Ko === "win32", Ml = /\//g, Nl = /%/g, Rl = /\\/g, jl = /\n/g, Dl = /\r/g, $l = /\t/g;
10470
- }), xd = me((s, e) => {
10468
+ var xl, Fr, cs, qr, Hr, us, Wr, ds, zr, hs, Vr, fs, Kr, ps, Gr, ms, Ct, gs, Ke, Ko, _l, Sl, El, Al, Il, Tl, Cl, Pl, Ol, Ll, Qr, Ml, Nl, Rl, jl, Dl, $l, xd = Qe(() => {
10469
+ le(), ue(), ce(), Uu(), td(), fd(), bl(), xl = Object.freeze(/* @__PURE__ */ Object.create(null)), Fr = {}, cs = !1, qr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : global, Hr = {}, us = !1, Wr = {}, ds = !1, zr = {}, hs = !1, Vr = {}, fs = !1, Kr = {}, ps = !1, Gr = {}, ms = !1, Ct = {}, gs = !1, Ke = vd(), Ke.parse, Ke.resolve, Ke.resolveObject, Ke.format, Ke.Url, Ko = typeof Deno < "u" ? Deno.build.os === "windows" ? "win32" : Deno.build.os : void 0, Ke.URL = typeof URL < "u" ? URL : null, Ke.pathToFileURL = kl, Ke.fileURLToPath = wl, _l = Ke.Url, Sl = Ke.format, El = Ke.resolve, Al = Ke.resolveObject, Il = Ke.parse, Tl = Ke.URL, Cl = 92, Pl = 47, Ol = 97, Ll = 122, Qr = Ko === "win32", Ml = /\//g, Nl = /%/g, Rl = /\\/g, jl = /\n/g, Dl = /\r/g, $l = /\t/g;
10470
+ }), _d = me((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 xl, Fr, cs, qr, Hr, us, Wr, ds, zr, hs, Vr, fs, Kr, ps, Gr, ms, Ct, gs, Ke,
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 = (qe(), Re(Fe)), r = e(xd()), i = e(vt()), n = Ft(), o = e(on()), a = Ls(), l = (0, i.default)("mqttjs:ws"), c = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10524
+ var t = (qe(), Re(Fe)), r = e(_d()), i = e(vt()), n = Ft(), o = e(on()), a = Ls(), l = (0, i.default)("mqttjs:ws"), c = ["rejectUnauthorized", "ca", "cert", "key", "pfx", "passphrase"];
10525
10525
  function u(w, m) {
10526
10526
  let k = `${w.protocol}://${w.hostname}:${w.port}${w.path}`;
10527
10527
  return typeof w.transformWsUrl == "function" && (k = w.transformWsUrl(k, w, m)), k;
@@ -10632,7 +10632,7 @@ var Ul, Bl = Qe(() => {
10632
10632
  s.default = o;
10633
10633
  }), ql = {};
10634
10634
  Qt(ql, { default: () => Hl });
10635
- var Hl, _d = Qe(() => {
10635
+ var Hl, Sd = Qe(() => {
10636
10636
  le(), ue(), ce(), Hl = {};
10637
10637
  }), Yo = me((s) => {
10638
10638
  le(), ue(), ce();
@@ -10640,7 +10640,7 @@ var Hl, _d = Qe(() => {
10640
10640
  return c && c.__esModule ? c : { default: c };
10641
10641
  };
10642
10642
  Object.defineProperty(s, "__esModule", { value: !0 });
10643
- var t = (_d(), Re(ql)), r = e((Bl(), Re(Ms))), i = e(vt()), n = e(Fl()), o = (0, i.default)("mqttjs:tls");
10643
+ var t = (Sd(), Re(ql)), r = e((Bl(), Re(Ms))), i = e(vt()), n = e(Fl()), o = (0, i.default)("mqttjs:tls");
10644
10644
  function a(c) {
10645
10645
  let { host: u, port: d, socksProxy: p, ...g } = c;
10646
10646
  if (p !== void 0) {
@@ -10771,13 +10771,13 @@ var Hl, _d = Qe(() => {
10771
10771
  return i = h.my, i.connectSocket({ url: y, protocols: b }), n = l(), o = new r.BufferedDuplex(h, n, i), d(), o;
10772
10772
  };
10773
10773
  s.default = p;
10774
- }), Sd = me((s) => {
10774
+ }), Ed = me((s) => {
10775
10775
  le(), ue(), ce();
10776
10776
  var e = s && s.__importDefault || function(d) {
10777
10777
  return d && d.__esModule ? d : { default: d };
10778
10778
  };
10779
10779
  Object.defineProperty(s, "__esModule", { value: !0 }), s.connectAsync = u;
10780
- var t = e(vt()), r = e((kd(), Re(yl))), i = e(Ci()), n = e(on());
10780
+ var t = e(vt()), r = e((xd(), Re(yl))), i = e(Ci()), n = e(on());
10781
10781
  typeof je?.nextTick != "function" && (je.nextTick = setImmediate);
10782
10782
  var o = (0, t.default)("mqttjs"), a = null;
10783
10783
  function l(d) {
@@ -10885,11 +10885,11 @@ var Hl, _d = Qe(() => {
10885
10885
  s.MqttClient = o.default;
10886
10886
  var a = n(sl());
10887
10887
  s.DefaultMessageIdProvider = a.default;
10888
- var l = n(ju());
10888
+ var l = n(Du());
10889
10889
  s.UniqueMessageIdProvider = l.default;
10890
10890
  var c = n(qa());
10891
10891
  s.Store = c.default;
10892
- var u = r(Sd());
10892
+ var u = r(Ed());
10893
10893
  s.connect = u.default, Object.defineProperty(s, "connectAsync", { enumerable: !0, get: function() {
10894
10894
  return u.connectAsync;
10895
10895
  } });
@@ -10899,7 +10899,7 @@ var Hl, _d = Qe(() => {
10899
10899
  Object.defineProperty(s, "ReasonCodes", { enumerable: !0, get: function() {
10900
10900
  return p.ReasonCodes;
10901
10901
  } });
10902
- }), Ed = me((s) => {
10902
+ }), Ad = me((s) => {
10903
10903
  le(), ue(), ce();
10904
10904
  var e = s && s.__createBinding || (Object.create ? function(o, a, l, c) {
10905
10905
  c === void 0 && (c = l);
@@ -10934,25 +10934,25 @@ var Hl, _d = Qe(() => {
10934
10934
  var n = r(Xo());
10935
10935
  s.default = n, i(Xo(), s);
10936
10936
  });
10937
- const Ad = Ed();
10938
- const Id = {
10937
+ const Id = Ad();
10938
+ const Td = {
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
- }, Td = 300, Cd = {
10944
+ }, Cd = 300, Pd = {
10945
10945
  templateId: "7",
10946
10946
  type: "link",
10947
10947
  isDeepLink: !0
10948
- }, Pd = {
10948
+ }, Od = {
10949
10949
  channelType: "group",
10950
10950
  channel: "chat21",
10951
10951
  requestChannel: "chat21",
10952
10952
  platform: "WEBSITE",
10953
10953
  medium: "CHATBUDDY"
10954
10954
  };
10955
- class Od {
10955
+ class Ld {
10956
10956
  client = null;
10957
10957
  config;
10958
10958
  currentToken;
@@ -10979,7 +10979,7 @@ class Od {
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 = { ...Id, ...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 = { ...Td, ...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 Od {
11031
11031
  () => c("connect-timeout"),
11032
11032
  r + 500
11033
11033
  );
11034
- this.client = Ad.connect(this.config.mqttEndpoint, i), this.client.on("connect", () => {
11034
+ this.client = Id.connect(this.config.mqttEndpoint, i), 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 d = this.config.presencePayloadConnected ?? { connected: !0 };
11037
11037
  this.client.publish(e, JSON.stringify(d), { qos: 0, retain: !1 }), this.debugLog("PUBLISH", { topic: e, payload: d });
@@ -11096,9 +11096,9 @@ class Od {
11096
11096
  publishFileMessage(e, t) {
11097
11097
  if (!this.client) return;
11098
11098
  const r = {
11099
- ...Cd,
11099
+ ...Pd,
11100
11100
  ...this.config.fileTemplate ?? {},
11101
- ...Ld(t)
11101
+ ...Md(t)
11102
11102
  }, i = {
11103
11103
  metadata: {
11104
11104
  contentType: "300",
@@ -11137,7 +11137,7 @@ class Od {
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 = Td) {
11140
+ publishReadReceipt(e, t, r = Cd) {
11141
11141
  if (!this.client) return;
11142
11142
  const i = this.renderTemplate(this.topics.inboundUpdate, { conversationId: e, messageId: t });
11143
11143
  this.client.publish(i, JSON.stringify({ status: r }), {
@@ -11268,7 +11268,7 @@ class Od {
11268
11268
  this.messageHandlers.forEach((c) => c(i, l));
11269
11269
  }
11270
11270
  buildOutgoingEnvelope(e, t) {
11271
- const r = { ...Pd, ...this.config.messageDefaults ?? {} }, i = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), o = {
11271
+ const r = { ...Od, ...this.config.messageDefaults ?? {} }, i = this.config.senderFullname ?? this.config.userName ?? this.config.userId, n = this.config.recipientFullnameResolver?.(e), o = {
11272
11272
  projectId: this.config.projectId,
11273
11273
  ...r.departmentId ? { departmentId: r.departmentId } : {},
11274
11274
  ...this.config.userName ? { userFullname: this.config.userName } : {},
@@ -11342,16 +11342,16 @@ class Od {
11342
11342
  return new RegExp(`^${r}$`);
11343
11343
  }
11344
11344
  }
11345
- function Ld(s) {
11345
+ function Md(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 Md(s, e) {
11351
+ function Nd(s, e) {
11352
11352
  return (s.sender ?? "").toString() === e;
11353
11353
  }
11354
- function Nd(s, e) {
11354
+ function Rd(s, e) {
11355
11355
  const t = (s.sender ?? "").toString(), r = e.systemSenders ?? ["metadata", "system"], i = e.botSenderPrefix ?? "bot_";
11356
11356
  return t ? t === e.userId ? "user" : t.startsWith(i) ? "assistant" : r.includes(t) ? "system" : "agent" : "system";
11357
11357
  }
@@ -11372,7 +11372,7 @@ function Wl(s) {
11372
11372
  }
11373
11373
  return e;
11374
11374
  }
11375
- function Rd(s) {
11375
+ function jd(s) {
11376
11376
  const e = Wl(s);
11377
11377
  if (e.contentType !== "300") return null;
11378
11378
  const t = e.payload, r = t && Array.isArray(t.elements) ? t.elements : null;
@@ -11386,10 +11386,10 @@ function Rd(s) {
11386
11386
  };
11387
11387
  }
11388
11388
  function Zo(s, e, t) {
11389
- const r = Nd(s, t), i = Wl(s), n = Rd(s);
11389
+ const r = Rd(s, t), i = Wl(s), n = jd(s);
11390
11390
  let o = "";
11391
11391
  i.innerMessage ? o = i.innerMessage : typeof s.text == "string" && (s.text.trim().startsWith("{") ? i.contentType !== "300" && (o = s.text) : o = 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" ? jd(s.status) : "delivered", d = {
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" ? Dd(s.status) : "delivered", d = {
11393
11393
  id: a,
11394
11394
  externalId: a,
11395
11395
  conversationId: e,
@@ -11416,10 +11416,10 @@ function Zo(s, e, t) {
11416
11416
  }
11417
11417
  ]), { message: d, template: i };
11418
11418
  }
11419
- function jd(s) {
11419
+ function Dd(s) {
11420
11420
  return s < 0 ? "error" : s >= 250 ? "read" : s >= 150 ? "delivered" : "sent";
11421
11421
  }
11422
- class Dd extends da {
11422
+ class $d extends da {
11423
11423
  connection = null;
11424
11424
  tiledesk = null;
11425
11425
  api;
@@ -11432,7 +11432,7 @@ class Dd extends da {
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 gc(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new bc(), this.conversationManager = new yc(e.conversationId), this.usesAikaara() && (this.connection = new mc(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 bc(e.baseUrl, e.userToken, e.apiKey, e.authToken), this.messageStore = new yc(), this.conversationManager = new vc(e.conversationId), this.usesAikaara() && (this.connection = new gc(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 Dd extends da {
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 Od({
11455
+ this.tiledesk = new Ld({
11456
11456
  ...e,
11457
11457
  userId: t.userId,
11458
11458
  userName: t.userName ?? e.userName,
@@ -11668,7 +11668,7 @@ class Dd extends da {
11668
11668
  systemSenders: this.config.tiledesk?.messageDefaults?.attributes?.systemSenders
11669
11669
  });
11670
11670
  if (this.mode === "dual" && o.role === "assistant") return;
11671
- if (Md(e, n)) {
11671
+ if (Nd(e, n)) {
11672
11672
  const u = this.messageStore.reconcileOptimistic(o);
11673
11673
  if (u) {
11674
11674
  this.emit("message:updated", u);
@@ -11818,12 +11818,12 @@ const ea = {
11818
11818
  doc: "application/msword",
11819
11819
  json: "application/json"
11820
11820
  };
11821
- function $d(s) {
11821
+ function Ud(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 Ud(s, e, t) {
11826
- const r = $d(s.name || "");
11825
+ function Bd(s, e, t) {
11826
+ const r = Ud(s.name || "");
11827
11827
  if (r && e && e[r]) return e[r];
11828
11828
  const i = s.type;
11829
11829
  return i && i.trim().length > 0 ? i : r && ea[r] ? ea[r] : t;
@@ -11831,7 +11831,7 @@ function Ud(s, e, t) {
11831
11831
  function sr(s, e) {
11832
11832
  return s.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
11833
11833
  }
11834
- function Bd(s, e) {
11834
+ function Fd(s, e) {
11835
11835
  const t = e.split(".");
11836
11836
  let r = s;
11837
11837
  for (const i of t)
@@ -11840,11 +11840,11 @@ function Bd(s, e) {
11840
11840
  else return "";
11841
11841
  return typeof r == "string" ? r : "";
11842
11842
  }
11843
- function Fd(s) {
11843
+ function qd(s) {
11844
11844
  const e = s.signedUrlPath || "data.s3SignedUrl";
11845
11845
  return {
11846
11846
  async upload(t, r) {
11847
- const i = t.name || `upload-${Date.now()}`, n = Ud(
11847
+ const i = t.name || `upload-${Date.now()}`, n = Bd(
11848
11848
  t,
11849
11849
  s.contentTypeMap,
11850
11850
  s.contentTypeFallback ?? "application/octet-stream"
@@ -11882,7 +11882,7 @@ function Fd(s) {
11882
11882
  const d = await fetch(c, u);
11883
11883
  if (!d.ok)
11884
11884
  throw new Error(`Sign request failed: ${d.status}`);
11885
- const p = await d.json().catch(() => ({})), g = Bd(p, e);
11885
+ const p = await d.json().catch(() => ({})), g = Fd(p, e);
11886
11886
  if (!g) throw new Error(`Sign response missing path "${e}"`);
11887
11887
  const h = s.s3HostRewrite ? g.replace(/^https:\/\/[^/]+/i, s.s3HostRewrite) : g, b = await fetch(h, {
11888
11888
  method: "PUT",
@@ -11949,9 +11949,9 @@ function zl(s) {
11949
11949
  }
11950
11950
  };
11951
11951
  }
11952
- const qd = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11953
- function Hd(s) {
11954
- const e = s.apiBase.replace(/\/$/, ""), t = s.pageSize ?? 200, r = s.pathTemplate ?? qd;
11952
+ const Hd = "/tilechat/{userId}/conversations/{conversationId}/messages?pageSize={pageSize}";
11953
+ function Wd(s) {
11954
+ const e = s.apiBase.replace(/\/$/, ""), t = s.pageSize ?? 200, r = s.pathTemplate ?? Hd;
11955
11955
  return {
11956
11956
  async fetchMessages(i, n) {
11957
11957
  const o = r.replace("{userId}", encodeURIComponent(n.userId)).replace("{conversationId}", encodeURIComponent(i)).replace("{appId}", encodeURIComponent(n.appId ?? "tilechat")).replace("{projectId}", encodeURIComponent(n.projectId ?? "")).replace("{pageSize}", String(t)), a = o.startsWith("http") ? o : `${e}${o.startsWith("/") ? o : `/${o}`}`, l = {
@@ -11977,7 +11977,7 @@ function Hd(s) {
11977
11977
  }
11978
11978
  };
11979
11979
  }
11980
- const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]{6}$", Kl = "^[0-9]{6}$", Vd = {
11980
+ const zd = "^[A-Z]{4}[0-9]{5}[A-Z]$", Vd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]{6}$", Kl = "^[0-9]{6}$", Kd = {
11981
11981
  id: "house-property",
11982
11982
  title: "House Property",
11983
11983
  icon: "🏠",
@@ -12049,7 +12049,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12049
12049
  }
12050
12050
  ],
12051
12051
  submitLabel: "Save"
12052
- }, Kd = {
12052
+ }, Gd = {
12053
12053
  id: "salary-hra",
12054
12054
  title: "Salary / HRA / Allowances",
12055
12055
  icon: "💰",
@@ -12074,7 +12074,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12074
12074
  // Optional: the pattern check only fires on a non-empty value, so a
12075
12075
  // blank TAN saves cleanly while a malformed one is still caught.
12076
12076
  label: "TAN (Tax Deduction Account Number)",
12077
- pattern: Wd,
12077
+ pattern: zd,
12078
12078
  uppercase: !0,
12079
12079
  maxLength: 10
12080
12080
  }
@@ -12103,7 +12103,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12103
12103
  }
12104
12104
  ],
12105
12105
  submitLabel: "Save"
12106
- }, Gd = {
12106
+ }, Yd = {
12107
12107
  id: "deductions",
12108
12108
  title: "Deductions",
12109
12109
  icon: "📋",
@@ -12147,7 +12147,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12147
12147
  id: "us80ccd1bPanNo",
12148
12148
  type: "text",
12149
12149
  label: "PRAN No.",
12150
- pattern: zd,
12150
+ pattern: Vd,
12151
12151
  maxLength: 12
12152
12152
  }
12153
12153
  ]
@@ -12383,7 +12383,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12383
12383
  }
12384
12384
  ],
12385
12385
  submitLabel: "Save"
12386
- }, Yd = {
12386
+ }, Jd = {
12387
12387
  id: "other-sources",
12388
12388
  title: "Income from Other Sources",
12389
12389
  icon: "💵",
@@ -12439,7 +12439,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12439
12439
  }
12440
12440
  ],
12441
12441
  submitLabel: "Save"
12442
- }, Jd = {
12442
+ }, Qd = {
12443
12443
  id: "crypto-income",
12444
12444
  title: "Crypto Income",
12445
12445
  icon: "🪙",
@@ -12468,7 +12468,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12468
12468
  }
12469
12469
  ],
12470
12470
  submitLabel: "Save"
12471
- }, Qd = {
12471
+ }, Xd = {
12472
12472
  id: "business-profession",
12473
12473
  title: "Business / Profession",
12474
12474
  icon: "💼",
@@ -12541,7 +12541,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12541
12541
  }
12542
12542
  ],
12543
12543
  submitLabel: "Save"
12544
- }, Xd = {
12544
+ }, Zd = {
12545
12545
  id: "agricultural-income",
12546
12546
  title: "Agricultural Income",
12547
12547
  icon: "🌾",
@@ -12605,7 +12605,7 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12605
12605
  }
12606
12606
  ],
12607
12607
  submitLabel: "Save"
12608
- }, Zd = {
12608
+ }, eh = {
12609
12609
  id: "bank-details",
12610
12610
  title: "Personal / Bank Details",
12611
12611
  icon: "🏦",
@@ -12658,22 +12658,22 @@ const Wd = "^[A-Z]{4}[0-9]{5}[A-Z]$", zd = "^\\S{12}$", Vl = "^[A-Z]{4}0[A-Z0-9]
12658
12658
  // },
12659
12659
  ],
12660
12660
  submitLabel: "Save"
12661
- }, eh = [
12662
- Kd,
12663
- Qd,
12664
- Yd,
12665
- Jd,
12666
- Vd,
12661
+ }, th = [
12667
12662
  Gd,
12668
12663
  Xd,
12669
- Zd
12664
+ Jd,
12665
+ Qd,
12666
+ Kd,
12667
+ Yd,
12668
+ Zd,
12669
+ eh
12670
12670
  // Hidden for now — re-enable to restore the full set:
12671
12671
  // capitalGains,
12672
12672
  // exemptIncome,
12673
12673
  // taxPaidTds,
12674
12674
  // haveAQuestion,
12675
12675
  ];
12676
- function th(s, e) {
12676
+ function rh(s, e) {
12677
12677
  const t = s || {}, r = {
12678
12678
  userId: nt(e.userId),
12679
12679
  assessmentYear: e.assessmentYear,
@@ -12681,7 +12681,7 @@ function th(s, e) {
12681
12681
  // though only the bank/aadhaar section exposes it for editing.
12682
12682
  aadhaarNumber: Ee(t.aadhaarNumber),
12683
12683
  isRevised: e.isRevised || "N",
12684
- timestamp: mh()
12684
+ timestamp: gh()
12685
12685
  };
12686
12686
  r.us80cAmount = _e(t.us80cAmount), r.us80dForSelfAndFamilyAmount = _e(t.us80dForSelfAndFamilyAmount), r.us80dForParentsAmount = _e(t.us80dForParentsAmount), r.hasParentOverSixty = mr(t.hasParentOverSixty), r.preventiveHealthCheckUp = _e(t.preventiveHealthCheckUp), r.medicalExpenditure = _e(t.medicalExpenditure), r.savingBankInterest = _e(t.savingBankInterest), r.fdInterest = _e(t.fdInterest), r.dividend = _e(t.dividend), r.anyOtherIncome = _e(t.anyOtherIncome), r.familyPension = _e(t.familyPension), r.cryptoSellValue = _e(t.cryptoSellPrice), r.cryptoPurchaseAmount = _e(t.cryptoPurchasePrice), r.vdaPurchaseCost = _e(t.cryptoPurchasePrice);
12687
12687
  const i = (_e(t.bizReceiptsBank) ?? 0) + (_e(t.bizReceiptsCash) ?? 0), n = (_e(t.profReceiptsBank) ?? 0) + (_e(t.profReceiptsCash) ?? 0), o = Ee(t.bizName) !== void 0 || i > 0;
@@ -12698,9 +12698,9 @@ function th(s, e) {
12698
12698
  amount: _e(t.immovableAssetCost)
12699
12699
  };
12700
12700
  Object.values(a).some((u) => u !== void 0) && (r.immovableAsset = [a]);
12701
- const l = hn(t.hpDetails, rh);
12701
+ const l = hn(t.hpDetails, nh);
12702
12702
  l.length && (r.hpDetails = l);
12703
- const c = hn(t.salaryDetails, nh);
12703
+ const c = hn(t.salaryDetails, ih);
12704
12704
  if (c.length) {
12705
12705
  r.salaryIncome = c;
12706
12706
  const u = hn(t.salaryDetails, (p) => ({
@@ -12713,7 +12713,7 @@ function th(s, e) {
12713
12713
  }
12714
12714
  return rt(r);
12715
12715
  }
12716
- function rh(s) {
12716
+ function nh(s) {
12717
12717
  const e = {
12718
12718
  loanType: "HOME_LOAN",
12719
12719
  loanTakenFrom: Ee(s.loanTakenFrom),
@@ -12741,7 +12741,7 @@ function rh(s) {
12741
12741
  loanDetails: t ? [e] : void 0
12742
12742
  };
12743
12743
  }
12744
- function nh(s) {
12744
+ function ih(s) {
12745
12745
  return {
12746
12746
  grossSalaryIncome: _e(s.grossSalary),
12747
12747
  salary: _e(s.basicSalary),
@@ -12760,7 +12760,7 @@ function nh(s) {
12760
12760
  }
12761
12761
  };
12762
12762
  }
12763
- function ih(s, e) {
12763
+ function sh(s, e) {
12764
12764
  const t = [];
12765
12765
  for (const r of s) {
12766
12766
  const i = Ee(r.employerName), n = Ee(r.employerTan), o = _e(r.grossSalary), a = _e(r.basicSalary), l = _e(r.totalTdsDeposited);
@@ -12779,7 +12779,7 @@ function ih(s, e) {
12779
12779
  salary: t
12780
12780
  } : null;
12781
12781
  }
12782
- function sh(s, e) {
12782
+ function oh(s, e) {
12783
12783
  const t = Ee(s.aadhaarNumber), r = Ee(s.bankAccountNumber), i = Ee(s.bankIfscCode);
12784
12784
  return t === void 0 && r === void 0 && i === void 0 ? null : {
12785
12785
  userId: nt(e.userId),
@@ -12788,7 +12788,7 @@ function sh(s, e) {
12788
12788
  bankDetails: [{ bankAccountNumber: r, bankIfscCode: i }]
12789
12789
  };
12790
12790
  }
12791
- function oh(s, e) {
12791
+ function ah(s, e) {
12792
12792
  return {
12793
12793
  userId: nt(e.userId),
12794
12794
  assessmentYear: e.assessmentYear,
@@ -12799,7 +12799,7 @@ function oh(s, e) {
12799
12799
  familyPension: _e(s.familyPension) ?? 0
12800
12800
  };
12801
12801
  }
12802
- function ah(s, e) {
12802
+ function lh(s, e) {
12803
12803
  const t = _e(s.cryptoSellPrice), r = _e(s.cryptoPurchasePrice);
12804
12804
  return t === void 0 && r === void 0 ? null : {
12805
12805
  userId: nt(e.userId),
@@ -12808,7 +12808,7 @@ function ah(s, e) {
12808
12808
  vdaSellCost: t ?? 0
12809
12809
  };
12810
12810
  }
12811
- function lh(s, e) {
12811
+ function ch(s, e) {
12812
12812
  const t = (i, n, o, a) => {
12813
12813
  const l = Ee(s[n]), c = _e(s[o]), u = _e(s[a]);
12814
12814
  return l === void 0 && c === void 0 && u === void 0 ? null : {
@@ -12827,15 +12827,15 @@ function lh(s, e) {
12827
12827
  presumptiveIncome: r
12828
12828
  } : null;
12829
12829
  }
12830
- function ch(s) {
12830
+ function uh(s) {
12831
12831
  return Ee(s.lenderName) !== void 0 || Ee(s.loanAccountNumber) !== void 0 || _e(s.totalLoanAmount) !== void 0 || _e(s.outstandingAmount) !== void 0 || _e(s.homeLoanInterest) !== void 0;
12832
12832
  }
12833
12833
  function Gl(s) {
12834
12834
  const e = Ee(s.typeOfHouseProperty)?.toUpperCase();
12835
12835
  return _e(s.rentalIncome) !== void 0 || Ee(s.nameOfTenant) !== void 0 || e === "LOP" || e === "DLOP";
12836
12836
  }
12837
- function uh(s, e) {
12838
- const t = an(s.hpDetails).filter(ch).map((r) => {
12837
+ function dh(s, e) {
12838
+ const t = an(s.hpDetails).filter(uh).map((r) => {
12839
12839
  const i = rt({
12840
12840
  loanType: "HOMELOAN",
12841
12841
  bankOrInstituteName: Ee(r.lenderName),
@@ -12865,7 +12865,7 @@ function uh(s, e) {
12865
12865
  hpDetails: t
12866
12866
  } : null;
12867
12867
  }
12868
- function dh(s, e) {
12868
+ function hh(s, e) {
12869
12869
  const t = an(s.hpDetails).filter(Gl).map(
12870
12870
  (r) => rt({
12871
12871
  typeOfHouseProperty: Ee(r.typeOfHouseProperty),
@@ -12885,7 +12885,7 @@ function dh(s, e) {
12885
12885
  hpDetails: t
12886
12886
  } : null;
12887
12887
  }
12888
- function hh(s, e) {
12888
+ function fh(s, e) {
12889
12889
  const t = s || {}, r = (g) => ({
12890
12890
  userId: nt(e.userId),
12891
12891
  assessmentYear: e.assessmentYear,
@@ -12973,7 +12973,7 @@ function hh(s, e) {
12973
12973
  })
12974
12974
  ), i;
12975
12975
  }
12976
- function fh(s, e) {
12976
+ function ph(s, e) {
12977
12977
  const t = s || {}, r = _e(t.us80gDonationInCash), i = _e(t.us80gDonationOnline), n = Ee(t.us80gNameOfCharity);
12978
12978
  if (r === void 0 && i === void 0 && n === void 0)
12979
12979
  return null;
@@ -13012,7 +13012,7 @@ function Yl(s) {
13012
13012
  agricultureLandDetails: n ? [i] : void 0
13013
13013
  });
13014
13014
  }
13015
- function ph(s, e) {
13015
+ function mh(s, e) {
13016
13016
  const t = Yl(s);
13017
13017
  return t ? {
13018
13018
  userId: nt(e.userId),
@@ -13038,7 +13038,7 @@ function Ee(s) {
13038
13038
  function mr(s) {
13039
13039
  return s === !0 || s === !1 ? s : void 0;
13040
13040
  }
13041
- function mh() {
13041
+ function gh() {
13042
13042
  const s = /* @__PURE__ */ new Date(), e = (t, r = 2) => String(t).padStart(r, "0");
13043
13043
  return `${s.getFullYear()}-${e(s.getMonth() + 1)}-${e(s.getDate())}T${e(s.getHours())}:${e(s.getMinutes())}:${e(s.getSeconds())}.${e(s.getMilliseconds(), 3)}`;
13044
13044
  }
@@ -13068,10 +13068,10 @@ function rt(s) {
13068
13068
  }
13069
13069
  return s;
13070
13070
  }
13071
- function gh(s) {
13071
+ function bh(s) {
13072
13072
  const e = s && typeof s == "object" ? s : {}, t = {}, r = De(e.employers), i = De(e.taxPaid?.onSalary);
13073
13073
  r.length && (t.salaryDetails = r.map((X) => {
13074
- const z = pn(X.salary), W = pn(X.perquisites), ne = pn(X.profitsInLieuOfSalaryType), D = z + W + ne, G = wh(X.allowance);
13074
+ const z = pn(X.salary), W = pn(X.perquisites), ne = pn(X.profitsInLieuOfSalaryType), D = z + W + ne, G = kh(X.allowance);
13075
13075
  return {
13076
13076
  employerName: Ce(X.employerName),
13077
13077
  employerTan: Ce(X.employerTAN),
@@ -13082,7 +13082,7 @@ function gh(s) {
13082
13082
  leaveTravelAllowance: G.lta,
13083
13083
  leaveEncashment: G.leaveEncashment,
13084
13084
  anyOtherAllowance: G.other,
13085
- totalTdsDeposited: vh(X, i, r) ?? Me(X.totalTdsDeposited)
13085
+ totalTdsDeposited: wh(X, i, r) ?? Me(X.totalTdsDeposited)
13086
13086
  };
13087
13087
  }));
13088
13088
  const n = De(e.houseProperties);
@@ -13139,7 +13139,7 @@ function gh(s) {
13139
13139
  g?.insurerName ?? b?.insurerName
13140
13140
  ), t.us80dForParentsPolicyNumber = Ce(
13141
13141
  g?.policyNo ?? b?.accountNo
13142
- ), t.hasParentOverSixty = kh(
13142
+ ), t.hasParentOverSixty = xh(
13143
13143
  e.systemFlags?.hasParentOverSixty
13144
13144
  ), t.us80ccd1bAmount = void 0, t.us80ccd1bPanNo = Ce(e.pranNumber), t.us80ccd2Amount = void 0;
13145
13145
  const w = De(e.donations)[0];
@@ -13205,17 +13205,17 @@ function gh(s) {
13205
13205
  const $ = De(
13206
13206
  j?.agricultureLandDetails ?? j?.agriculturalLandDetails ?? e.agriculturalLandDetails
13207
13207
  )[0];
13208
- $ && (t.agricultureLandInAcre = Me($.landInAcre), t.agricultureLandDistrict = Ce($.nameOfDistrict), t.agricultureLandPincode = Ce($.pinCode), t.agricultureLandOwner = bh($.owner), t.agricultureLandType = yh($.typeOfLand)), t.aadhaarNumber = Ce(e.aadharNumber);
13208
+ $ && (t.agricultureLandInAcre = Me($.landInAcre), t.agricultureLandDistrict = Ce($.nameOfDistrict), t.agricultureLandPincode = Ce($.pinCode), t.agricultureLandOwner = yh($.owner), t.agricultureLandType = vh($.typeOfLand)), t.aadhaarNumber = Ce(e.aadharNumber);
13209
13209
  const U = De(e.bankDetails)[0];
13210
13210
  return U && (t.bankAccountNumber = Ce(U.accountNumber), t.bankIfscCode = Ce(U.ifsCode)), Jl(t);
13211
13211
  }
13212
- function bh(s) {
13212
+ function yh(s) {
13213
13213
  const e = Ce(s)?.trim();
13214
13214
  if (!e) return;
13215
13215
  const t = e.toUpperCase();
13216
13216
  return t === "O" || t === "OWNED" ? "Owned" : t === "H" || t.startsWith("HELD") ? "Held on lease" : e;
13217
13217
  }
13218
- function yh(s) {
13218
+ function vh(s) {
13219
13219
  const e = Ce(s)?.trim();
13220
13220
  if (!e) return;
13221
13221
  const t = e.toUpperCase();
@@ -13233,7 +13233,7 @@ function pn(s) {
13233
13233
  0
13234
13234
  );
13235
13235
  }
13236
- function vh(s, e, t) {
13236
+ function wh(s, e, t) {
13237
13237
  if (!e.length) return;
13238
13238
  const r = Ce(s.employerTAN)?.trim().toUpperCase();
13239
13239
  if (r) {
@@ -13250,7 +13250,7 @@ function vh(s, e, t) {
13250
13250
  if (t.length === 1 && e.length === 1)
13251
13251
  return Me(e[0].totalTdsDeposited);
13252
13252
  }
13253
- function wh(s) {
13253
+ function kh(s) {
13254
13254
  const e = De(s);
13255
13255
  if (!e.length) return {};
13256
13256
  let t, r, i, n;
@@ -13293,7 +13293,7 @@ function Ce(s) {
13293
13293
  const e = String(s).trim();
13294
13294
  return e === "" ? void 0 : e;
13295
13295
  }
13296
- function kh(s) {
13296
+ function xh(s) {
13297
13297
  if (typeof s == "boolean") return s;
13298
13298
  if (typeof s == "string") {
13299
13299
  const e = s.trim().toLowerCase();
@@ -13316,23 +13316,23 @@ function mn() {
13316
13316
  return console.warn(
13317
13317
  "[smart-edit] API disabled: window.__aikaara_runtime__.getChatJwt is missing — the chat was not mounted via the SDK mountFromSlug path."
13318
13318
  ), null;
13319
- const t = s.__aikaara_descriptor__ ?? {}, r = Lh(t);
13319
+ const t = s.__aikaara_descriptor__ ?? {}, r = Mh(t);
13320
13320
  if (!r)
13321
13321
  return console.warn(
13322
13322
  "[smart-edit] API disabled: could not resolve a TaxBuddy API host from the descriptor (cloud / upload / pan / leader endpoints)."
13323
13323
  ), null;
13324
- const i = Mh(e.slug), n = typeof i?.tenantJwt == "string" ? i.tenantJwt : "", o = e.getChatJwt, a = async () => n || await o(), l = (i && i.userId != null && i.userId !== "" ? String(i.userId) : Rh(e.identity)) || void 0;
13324
+ const i = Nh(e.slug), n = typeof i?.tenantJwt == "string" ? i.tenantJwt : "", o = e.getChatJwt, a = async () => n || await o(), l = (i && i.userId != null && i.userId !== "" ? String(i.userId) : jh(e.identity)) || void 0;
13325
13325
  return console.info("[smart-edit] API config — base:", r, "· userId:", l ?? "(none)"), {
13326
13326
  baseUrl: r,
13327
13327
  getToken: a,
13328
- headers: Nh(t.auth?.headers),
13329
- assessmentYear: t.itr?.assessmentYear || jh(),
13328
+ headers: Rh(t.auth?.headers),
13329
+ assessmentYear: t.itr?.assessmentYear || Dh(),
13330
13330
  isRevised: "N",
13331
13331
  userId: l,
13332
13332
  submitUrl: t.itr?.automationSubmitUrl || void 0
13333
13333
  };
13334
13334
  }
13335
- async function xh(s) {
13335
+ async function _h(s) {
13336
13336
  const e = await s.getToken(), t = s.userId;
13337
13337
  if (!t)
13338
13338
  throw new Error(
@@ -13350,11 +13350,11 @@ async function xh(s) {
13350
13350
  const i = await r.text().catch(() => "");
13351
13351
  throw new Error(`[smart-edit] GET /itr/latest-itr → ${r.status} ${i.slice(0, 200)}`);
13352
13352
  }
13353
- return gh(Ns(await r.json().catch(() => ({}))));
13353
+ return bh(Ns(await r.json().catch(() => ({}))));
13354
13354
  }
13355
- async function _h(s, e) {
13355
+ async function Sh(s, e) {
13356
13356
  const t = await s.getToken(), r = s.userId, i = {
13357
- ...th(e, {
13357
+ ...rh(e, {
13358
13358
  userId: r,
13359
13359
  assessmentYear: s.assessmentYear,
13360
13360
  isRevised: s.isRevised
@@ -13378,31 +13378,31 @@ async function _h(s, e) {
13378
13378
  }
13379
13379
  return Ns(await a.json().catch(() => ({})));
13380
13380
  }
13381
- async function Sh(s, e) {
13381
+ async function Eh(s, e) {
13382
13382
  return _t(s, `${s.baseUrl}/itr/v1/automation/salary`, e);
13383
13383
  }
13384
- async function Eh(s, e) {
13384
+ async function Ah(s, e) {
13385
13385
  return _t(s, `${s.baseUrl}/itr/v1/automation/bank-aadhaar`, e);
13386
13386
  }
13387
13387
  async function ta(s, e) {
13388
13388
  return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13389
13389
  }
13390
- async function Ah(s, e) {
13391
- return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13392
- }
13393
13390
  async function Ih(s, e) {
13394
13391
  return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13395
13392
  }
13396
13393
  async function Th(s, e) {
13397
- return _t(s, `${s.baseUrl}/itr/v1/automation/deductions`, e);
13394
+ return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13398
13395
  }
13399
13396
  async function Ch(s, e) {
13400
- return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13397
+ return _t(s, `${s.baseUrl}/itr/v1/automation/deductions`, e);
13401
13398
  }
13402
13399
  async function Ph(s, e) {
13403
- return _t(s, `${s.baseUrl}/itr/v1/automation/hp-income`, e);
13400
+ return _t(s, s.submitUrl || `${s.baseUrl}/itr/v1/automation/data`, e);
13404
13401
  }
13405
13402
  async function Oh(s, e) {
13403
+ return _t(s, `${s.baseUrl}/itr/v1/automation/hp-income`, e);
13404
+ }
13405
+ async function Lh(s, e) {
13406
13406
  return _t(s, `${s.baseUrl}/itr/v1/automation/vda`, e);
13407
13407
  }
13408
13408
  async function _t(s, e, t) {
@@ -13420,7 +13420,7 @@ async function _t(s, e, t) {
13420
13420
  }
13421
13421
  return Ns(await n.json().catch(() => ({})));
13422
13422
  }
13423
- function Lh(s) {
13423
+ function Mh(s) {
13424
13424
  const e = [
13425
13425
  s.cloud?.listEndpoint,
13426
13426
  s.cloud?.downloadEndpoint,
@@ -13438,7 +13438,7 @@ function Lh(s) {
13438
13438
  }
13439
13439
  return null;
13440
13440
  }
13441
- function Mh(s) {
13441
+ function Nh(s) {
13442
13442
  if (!s || typeof localStorage > "u") return null;
13443
13443
  try {
13444
13444
  const e = localStorage.getItem(`aikaara_sso:${s}`);
@@ -13449,7 +13449,7 @@ function Mh(s) {
13449
13449
  return null;
13450
13450
  }
13451
13451
  }
13452
- function Nh(s) {
13452
+ function Rh(s) {
13453
13453
  const e = {};
13454
13454
  if (!s) return e;
13455
13455
  const t = /^(authorization|content-type|accept)$/i;
@@ -13457,7 +13457,7 @@ function Nh(s) {
13457
13457
  !t.test(r) && typeof i == "string" && (e[r] = i);
13458
13458
  return e;
13459
13459
  }
13460
- function Rh(s) {
13460
+ function jh(s) {
13461
13461
  if (!s) return;
13462
13462
  const e = s.userId ?? s.id ?? s.ext_uid ?? s.extUid;
13463
13463
  return e == null || e === "" ? void 0 : String(e);
@@ -13469,14 +13469,23 @@ function Ns(s) {
13469
13469
  }
13470
13470
  return {};
13471
13471
  }
13472
- function jh() {
13472
+ function Dh() {
13473
13473
  const s = /* @__PURE__ */ new Date(), e = s.getMonth() >= 3 ? s.getFullYear() : s.getFullYear() - 1;
13474
13474
  return `${e}-${e + 1}`;
13475
13475
  }
13476
- const Dh = [
13476
+ const $h = [
13477
+ "No, I have concerns",
13478
+ // Older Tiledesk copy shipped with an extra article; keep it so existing
13479
+ // flows still open the editor.
13477
13480
  "No, I have a concerns"
13478
13481
  ];
13479
- class $h {
13482
+ function Ql(s) {
13483
+ const e = window.__aikaara_descriptor__?.smartEdit?.openOnMessages, t = Array.isArray(e) ? e : $h;
13484
+ if (t.length === 0) return !1;
13485
+ const r = (n) => n.trim().toLowerCase(), i = r(s);
13486
+ return t.some((n) => typeof n == "string" && r(n) === i);
13487
+ }
13488
+ class Uh {
13480
13489
  client;
13481
13490
  panel;
13482
13491
  bubble;
@@ -13488,7 +13497,7 @@ class $h {
13488
13497
  isEmbed = !1;
13489
13498
  smartEditModal = null;
13490
13499
  constructor(e, t, r) {
13491
- this.client = new Dd(e, {
13500
+ this.client = new $d(e, {
13492
13501
  uploadAdapter: r?.uploadAdapter,
13493
13502
  historyAdapter: r?.historyAdapter
13494
13503
  }), 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();
@@ -13546,13 +13555,15 @@ class $h {
13546
13555
  }), this.messageList.addEventListener("message-action", (e) => {
13547
13556
  const t = e.detail;
13548
13557
  if (!t?.text) return;
13549
- const r = this.shouldOpenSmartEdit(t.text), i = this.client.config.templateActionAttributes ?? {}, n = t.attributes?.action ?? {}, o = {
13558
+ if (Ql(t.text)) {
13559
+ this.openSmartEdit();
13560
+ return;
13561
+ }
13562
+ const r = this.client.config.templateActionAttributes ?? {}, i = t.attributes?.action ?? {}, n = {
13550
13563
  ...t.attributes,
13551
- action: { ...i, ...n }
13564
+ action: { ...r, ...i }
13552
13565
  };
13553
- this.handleSend(t.text, o).then(() => {
13554
- r && this.openSmartEdit();
13555
- });
13566
+ this.handleSend(t.text, n);
13556
13567
  });
13557
13568
  }
13558
13569
  async handleSend(e, t) {
@@ -13593,17 +13604,6 @@ class $h {
13593
13604
  }
13594
13605
  console.info("[chat-action]", e.id, e.label);
13595
13606
  }
13596
- /**
13597
- * True when the given quick-reply button text is listed in
13598
- * `descriptor.smartEdit.openOnMessages` — i.e. clicking it should open the
13599
- * Smart Edit modal after posting the text. Trimmed + case-insensitive.
13600
- */
13601
- shouldOpenSmartEdit(e) {
13602
- const t = window.__aikaara_descriptor__?.smartEdit?.openOnMessages, r = Array.isArray(t) ? t : Dh;
13603
- if (!Array.isArray(r) || r.length === 0) return !1;
13604
- const i = (o) => o.trim().toLowerCase(), n = i(e);
13605
- return r.some((o) => typeof o == "string" && i(o) === n);
13606
- }
13607
13607
  /**
13608
13608
  * Open the Smart Edit modal. It opens with an EMPTY record — never the
13609
13609
  * demo data (that is for the standalone demo page only), so a save can
@@ -13613,11 +13613,11 @@ class $h {
13613
13613
  */
13614
13614
  async openSmartEdit() {
13615
13615
  const e = this.ensureSmartEditModal();
13616
- e.open({ schemas: eh, data: {} });
13616
+ e.open({ schemas: th, data: {} });
13617
13617
  const t = mn();
13618
13618
  if (!(!t || !t.baseUrl))
13619
13619
  try {
13620
- const r = await xh(t);
13620
+ const r = await _h(t);
13621
13621
  e.setData(r);
13622
13622
  } catch (r) {
13623
13623
  console.warn("[smart-edit] fetch failed", r), this.errorBanner.show(
@@ -13650,32 +13650,32 @@ class $h {
13650
13650
  const i = { userId: r.userId, assessmentYear: r.assessmentYear };
13651
13651
  try {
13652
13652
  if (e === "salary-hra") {
13653
- const n = Array.isArray(t.salaryDetails) ? t.salaryDetails : [], o = ih(n, i);
13654
- o && await Sh(r, o);
13653
+ const n = Array.isArray(t.salaryDetails) ? t.salaryDetails : [], o = sh(n, i);
13654
+ o && await Eh(r, o);
13655
13655
  } else if (e === "bank-details") {
13656
- const n = sh(t, i);
13657
- n && await Eh(r, n);
13656
+ const n = oh(t, i);
13657
+ n && await Ah(r, n);
13658
13658
  } else if (e === "other-sources")
13659
- await ta(r, oh(t, i));
13659
+ await ta(r, ah(t, i));
13660
13660
  else if (e === "business-profession") {
13661
- const n = lh(t, i);
13662
- n && await Ah(r, n);
13661
+ const n = ch(t, i);
13662
+ n && await Ih(r, n);
13663
13663
  } else if (e === "crypto-income") {
13664
- const n = ah(t, i);
13665
- n && await Oh(r, n);
13664
+ const n = lh(t, i);
13665
+ n && await Lh(r, n);
13666
13666
  } else if (e === "agricultural-income") {
13667
- const n = ph(t, i);
13668
- n && await Ih(r, n);
13667
+ const n = mh(t, i);
13668
+ n && await Th(r, n);
13669
13669
  } else if (e === "deductions") {
13670
- for (const o of hh(t, i))
13671
- await Th(r, o);
13672
- const n = fh(t, i);
13670
+ for (const o of fh(t, i))
13671
+ await Ch(r, o);
13672
+ const n = ph(t, i);
13673
13673
  n && await ta(r, n);
13674
13674
  } else if (e === "house-property") {
13675
- const n = uh(t, i);
13676
- n && await Ch(r, n);
13677
- const o = dh(t, i);
13678
- o && await Ph(r, o);
13675
+ const n = dh(t, i);
13676
+ n && await Ph(r, n);
13677
+ const o = hh(t, i);
13678
+ o && await Oh(r, o);
13679
13679
  }
13680
13680
  } catch (n) {
13681
13681
  console.warn("[smart-edit] section save failed", e, n), this.errorBanner.show("Failed to save. Please try again.", 4e3);
@@ -13695,7 +13695,7 @@ class $h {
13695
13695
  return;
13696
13696
  }
13697
13697
  try {
13698
- await _h(t, e);
13698
+ await Sh(t, e);
13699
13699
  } catch (r) {
13700
13700
  console.warn("[smart-edit] save failed", r), this.errorBanner.show(
13701
13701
  "Failed to save your ITR details. Please try again.",
@@ -13711,7 +13711,7 @@ class $h {
13711
13711
  }, 200)));
13712
13712
  }
13713
13713
  }
13714
- class Uh extends HTMLElement {
13714
+ class Bh extends HTMLElement {
13715
13715
  shadow;
13716
13716
  controller = null;
13717
13717
  _config = {};
@@ -13757,13 +13757,13 @@ class Uh extends HTMLElement {
13757
13757
  apiKey: this.getAttribute("api-key") || this._config.apiKey,
13758
13758
  title: this.getAttribute("title") || this._config.title || "Chat",
13759
13759
  subtitle: this.getAttribute("subtitle") || this._config.subtitle,
13760
- theme: this.getAttribute("theme") || this._config.theme || fc,
13760
+ theme: this.getAttribute("theme") || this._config.theme || pc,
13761
13761
  primaryColor: this.getAttribute("primary-color") || this._config.primaryColor || $s,
13762
- position: this.getAttribute("position") || this._config.position || hc,
13763
- width: Number(this.getAttribute("width")) || this._config.width || lc,
13764
- height: Number(this.getAttribute("height")) || this._config.height || cc,
13765
- fontFamily: this._config.fontFamily || dc,
13766
- borderRadius: this._config.borderRadius ?? uc,
13762
+ position: this.getAttribute("position") || this._config.position || fc,
13763
+ width: Number(this.getAttribute("width")) || this._config.width || cc,
13764
+ height: Number(this.getAttribute("height")) || this._config.height || uc,
13765
+ fontFamily: this._config.fontFamily || hc,
13766
+ borderRadius: this._config.borderRadius ?? dc,
13767
13767
  placeholder: this.getAttribute("placeholder") || this._config.placeholder || Us,
13768
13768
  welcomeMessage: this.getAttribute("welcome-message") || this._config.welcomeMessage,
13769
13769
  avatarUrl: this.getAttribute("avatar-url") || this._config.avatarUrl,
@@ -13777,7 +13777,7 @@ class Uh extends HTMLElement {
13777
13777
  chatActions: this._config.chatActions,
13778
13778
  showBubble: this._config.showBubble ?? !0,
13779
13779
  display: (this.getAttribute("display") || this._config.display) ?? "popup",
13780
- offset: this._config.offset || pc,
13780
+ offset: this._config.offset || mc,
13781
13781
  conversationId: this._config.conversationId,
13782
13782
  systemPromptId: this._config.systemPromptId,
13783
13783
  channel: this._config.channel,
@@ -13980,7 +13980,7 @@ class Uh extends HTMLElement {
13980
13980
  }
13981
13981
  async initController() {
13982
13982
  const e = this.getConfig(), t = e.transport ?? "aikaara";
13983
- (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new $h(e, this.shadow, {
13983
+ (t === "aikaara" || t === "dual") && (!e.baseUrl || !e.userToken) || (this.controller?.disconnect(), this.controller = new Uh(e, this.shadow, {
13984
13984
  uploadAdapter: this._config.uploadAdapter,
13985
13985
  historyAdapter: this._config.historyAdapter
13986
13986
  }), await this.controller.connect());
@@ -14000,7 +14000,7 @@ class Uh extends HTMLElement {
14000
14000
  }
14001
14001
  }
14002
14002
  }
14003
- class Bh extends HTMLElement {
14003
+ class Fh extends HTMLElement {
14004
14004
  shadow;
14005
14005
  constructor() {
14006
14006
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -14053,12 +14053,12 @@ class Bh extends HTMLElement {
14053
14053
  t && (t.innerHTML = e);
14054
14054
  }
14055
14055
  }
14056
- const Fh = [
14056
+ const qh = [
14057
14057
  { id: "edit-itr", label: "Edit ITR Details", icon: "edit" }
14058
14058
  ];
14059
- class qh extends HTMLElement {
14059
+ class Hh extends HTMLElement {
14060
14060
  shadow;
14061
- actions = Fh;
14061
+ actions = qh;
14062
14062
  menuOpen = !1;
14063
14063
  outsideClickHandler = null;
14064
14064
  static get observedAttributes() {
@@ -14284,7 +14284,7 @@ class qh extends HTMLElement {
14284
14284
  this.setAttribute("status", e);
14285
14285
  }
14286
14286
  }
14287
- const Hh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i, Wh = /&(quot|apos|amp|lt|gt|nbsp|#\d+|#x[0-9a-f]+);/i, zh = {
14287
+ const Wh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|pre)\b/i, zh = /&(quot|apos|amp|lt|gt|nbsp|#\d+|#x[0-9a-f]+);/i, Vh = {
14288
14288
  "&quot;": '"',
14289
14289
  "&apos;": "'",
14290
14290
  "&lt;": "<",
@@ -14292,14 +14292,14 @@ const Hh = /<\s*(br|i|b|em|strong|small|sub|sup|p|div|span|ul|ol|li|a|img|code|p
14292
14292
  "&amp;": "&",
14293
14293
  "&nbsp;": " "
14294
14294
  };
14295
- function Vh(s) {
14296
- return s.replace(/&(quot|apos|lt|gt|nbsp);/gi, (e) => zh[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, "&");
14295
+ function Kh(s) {
14296
+ return s.replace(/&(quot|apos|lt|gt|nbsp);/gi, (e) => Vh[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, "&");
14297
14297
  }
14298
14298
  function Kt(s) {
14299
- if (Hh.test(s))
14299
+ if (Wh.test(s))
14300
14300
  return s;
14301
- const e = Wh.test(s) ? Vh(s) : s;
14302
- let t = Kh(e);
14301
+ const e = zh.test(s) ? Kh(s) : s;
14302
+ let t = Gh(e);
14303
14303
  return t = t.replace(/```(\w*)\n([\s\S]*?)```/g, (r, i, 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(
14304
14304
  /\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,
14305
14305
  '<a href="$2" target="_self" rel="noopener noreferrer">$1</a>'
@@ -14311,7 +14311,7 @@ function Kt(s) {
14311
14311
  }
14312
14312
  ), t = t.replace(/\n/g, "<br>"), t;
14313
14313
  }
14314
- function Kh(s) {
14314
+ function Gh(s) {
14315
14315
  const e = {
14316
14316
  "&": "&amp;",
14317
14317
  "<": "&lt;",
@@ -14321,7 +14321,7 @@ function Kh(s) {
14321
14321
  };
14322
14322
  return s.replace(/[&<>"']/g, (t) => e[t]);
14323
14323
  }
14324
- const Gh = /* @__PURE__ */ new Set([
14324
+ const Yh = /* @__PURE__ */ new Set([
14325
14325
  "p",
14326
14326
  "br",
14327
14327
  "hr",
@@ -14356,7 +14356,7 @@ const Gh = /* @__PURE__ */ new Set([
14356
14356
  "tr",
14357
14357
  "th",
14358
14358
  "td"
14359
- ]), Yh = {
14359
+ ]), Jh = {
14360
14360
  a: /* @__PURE__ */ new Set(["href", "target", "rel"]),
14361
14361
  img: /* @__PURE__ */ new Set(["src", "alt", "width", "height"]),
14362
14362
  code: /* @__PURE__ */ new Set(["class"]),
@@ -14366,29 +14366,29 @@ const Gh = /* @__PURE__ */ new Set([
14366
14366
  };
14367
14367
  function Gt(s) {
14368
14368
  const e = document.createElement("template");
14369
- return e.innerHTML = s, Ql(e.content), e.innerHTML;
14369
+ return e.innerHTML = s, Xl(e.content), e.innerHTML;
14370
14370
  }
14371
- function Ql(s) {
14371
+ function Xl(s) {
14372
14372
  const e = Array.from(s.childNodes);
14373
14373
  for (const t of e)
14374
14374
  if (t.nodeType === Node.ELEMENT_NODE) {
14375
14375
  const r = t, i = r.tagName.toLowerCase();
14376
- if (!Gh.has(i)) {
14376
+ if (!Yh.has(i)) {
14377
14377
  const a = document.createTextNode(r.textContent || "");
14378
14378
  s.replaceChild(a, t);
14379
14379
  continue;
14380
14380
  }
14381
- const n = Yh[i] || /* @__PURE__ */ new Set(), o = Array.from(r.attributes);
14381
+ const n = Jh[i] || /* @__PURE__ */ new Set(), o = Array.from(r.attributes);
14382
14382
  for (const a of o)
14383
14383
  n.has(a.name) || r.removeAttribute(a.name);
14384
14384
  if (r.hasAttribute("href")) {
14385
14385
  const a = r.getAttribute("href") || "";
14386
14386
  !a.startsWith("http://") && !a.startsWith("https://") && !a.startsWith("/") && r.removeAttribute("href");
14387
14387
  }
14388
- Ql(t);
14388
+ Xl(t);
14389
14389
  }
14390
14390
  }
14391
- function Jh(s, e = {}) {
14391
+ function Qh(s, e = {}) {
14392
14392
  const { width: t = 600, height: r = 700, closeOnTypes: i } = e, n = Math.round(window.screenX + (window.outerWidth - t) / 2), o = Math.round(window.screenY + (window.outerHeight - r) / 2), a = window.open(
14393
14393
  s,
14394
14394
  "aikaara_popup",
@@ -14406,7 +14406,7 @@ function Jh(s, e = {}) {
14406
14406
  }, 500);
14407
14407
  return a;
14408
14408
  }
14409
- function Qh(s) {
14409
+ function Xh(s) {
14410
14410
  const e = Date.now() - s.getTime(), t = Math.round(e / 1e3);
14411
14411
  if (t < 5) return "just now";
14412
14412
  if (t < 60) return `${t}s ago`;
@@ -14417,7 +14417,7 @@ function Qh(s) {
14417
14417
  const n = Math.round(i / 24);
14418
14418
  return n === 1 ? "Yesterday" : n < 7 ? `${n} d ago` : s.toLocaleDateString(void 0, { month: "short", day: "2-digit" });
14419
14419
  }
14420
- class Xh extends HTMLElement {
14420
+ class Zh extends HTMLElement {
14421
14421
  shadow;
14422
14422
  container;
14423
14423
  welcomeMessage = "";
@@ -14670,7 +14670,7 @@ class Xh extends HTMLElement {
14670
14670
  if (n.role === "user") {
14671
14671
  const o = n.metadata?.attributes?.action;
14672
14672
  if (o) {
14673
- const a = Zh(o);
14673
+ const a = ef(o);
14674
14674
  if (o.message_id && t.set(o.message_id, a), Object.keys(a).length > 0)
14675
14675
  for (let l = i - 1; l >= 0; l--) {
14676
14676
  const c = e[l];
@@ -14808,7 +14808,7 @@ class Xh extends HTMLElement {
14808
14808
  case "date":
14809
14809
  return r;
14810
14810
  case "relative":
14811
- return Qh(t);
14811
+ return Xh(t);
14812
14812
  case "time-24":
14813
14813
  return t.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", hour12: !1 });
14814
14814
  case "time-seconds":
@@ -14834,7 +14834,7 @@ class Xh extends HTMLElement {
14834
14834
  return;
14835
14835
  }
14836
14836
  if (i === "popup") {
14837
- Jh(e);
14837
+ Qh(e);
14838
14838
  return;
14839
14839
  }
14840
14840
  const n = this.getOrCreateModal(), o = r?.title ?? t ?? "Link";
@@ -14842,7 +14842,7 @@ class Xh extends HTMLElement {
14842
14842
  requestAnimationFrame(() => n.show?.(e, o));
14843
14843
  return;
14844
14844
  }
14845
- const a = ef(e), l = Xl(r.fetch.url, a), c = {
14845
+ const a = tf(e), l = Zl(r.fetch.url, a), c = {
14846
14846
  accept: "application/json",
14847
14847
  ...r.fetch.headers ?? {}
14848
14848
  }, u = r.fetch.authHeader ?? "session";
@@ -14888,7 +14888,7 @@ class Xh extends HTMLElement {
14888
14888
  return e || (e = document.createElement("aikaara-link-modal"), document.body.appendChild(e)), e;
14889
14889
  }
14890
14890
  }
14891
- function Zh(s) {
14891
+ function ef(s) {
14892
14892
  const e = /* @__PURE__ */ new Set(["message_id", "formAction", "requestType"]), t = {};
14893
14893
  for (const [r, i] of Object.entries(s))
14894
14894
  e.has(r) || (Array.isArray(i) && i.every((n) => typeof n == "string") ? t[r] = i : typeof i == "string" && (t[r] = [i]));
@@ -14898,7 +14898,7 @@ function ra(s, e) {
14898
14898
  const t = e.replace(/[.+^${}()|[\]\\]/g, "\\$&");
14899
14899
  return new RegExp("^" + t.replace(/\*/g, ".*").replace(/\?/g, ".") + "$", "i").test(s);
14900
14900
  }
14901
- function ef(s) {
14901
+ function tf(s) {
14902
14902
  try {
14903
14903
  const e = new URL(s), t = {};
14904
14904
  return e.searchParams.forEach((r, i) => {
@@ -14908,11 +14908,11 @@ function ef(s) {
14908
14908
  return {};
14909
14909
  }
14910
14910
  }
14911
- function Xl(s, e) {
14911
+ function Zl(s, e) {
14912
14912
  return s.replace(/\{(\w+)\}/g, (t, r) => e[r] ?? "");
14913
14913
  }
14914
14914
  function bs(s, e) {
14915
- if (typeof s == "string") return Xl(s, e);
14915
+ if (typeof s == "string") return Zl(s, e);
14916
14916
  if (Array.isArray(s)) return s.map((t) => bs(t, e));
14917
14917
  if (s && typeof s == "object") {
14918
14918
  const t = {};
@@ -14921,7 +14921,7 @@ function bs(s, e) {
14921
14921
  }
14922
14922
  return s;
14923
14923
  }
14924
- class tf extends HTMLElement {
14924
+ class rf extends HTMLElement {
14925
14925
  shadow;
14926
14926
  templatePayload = null;
14927
14927
  attachments = [];
@@ -15037,7 +15037,7 @@ class tf extends HTMLElement {
15037
15037
  renderAttachments() {
15038
15038
  return this.attachments.length ? `<div class="attachments">${this.attachments.map(
15039
15039
  (t) => `<a class="attachment" href="${na(t.fileUrl)}" target="_blank" rel="noopener noreferrer">
15040
- 📎 ${rf(t.fileName)}
15040
+ 📎 ${nf(t.fileName)}
15041
15041
  </a>`
15042
15042
  ).join("")}</div>` : "";
15043
15043
  }
@@ -15045,10 +15045,10 @@ class tf extends HTMLElement {
15045
15045
  function na(s) {
15046
15046
  return String(s).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
15047
15047
  }
15048
- function rf(s) {
15048
+ function nf(s) {
15049
15049
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15050
15050
  }
15051
- class nf extends HTMLElement {
15051
+ class sf extends HTMLElement {
15052
15052
  shadow;
15053
15053
  textarea;
15054
15054
  sendBtn;
@@ -15199,7 +15199,7 @@ class nf extends HTMLElement {
15199
15199
  this.textarea.style.height = "auto", this.textarea.style.height = Math.min(this.textarea.scrollHeight, 120) + "px";
15200
15200
  }
15201
15201
  }
15202
- class sf extends HTMLElement {
15202
+ class of extends HTMLElement {
15203
15203
  shadow;
15204
15204
  constructor() {
15205
15205
  super(), this.shadow = this.attachShadow({ mode: "open" });
@@ -15248,7 +15248,7 @@ class sf extends HTMLElement {
15248
15248
  this.removeAttribute("visible");
15249
15249
  }
15250
15250
  }
15251
- class of extends HTMLElement {
15251
+ class af extends HTMLElement {
15252
15252
  shadow;
15253
15253
  bubble;
15254
15254
  constructor() {
@@ -15313,7 +15313,7 @@ class of extends HTMLElement {
15313
15313
  this.bubble?.classList.remove("cursor");
15314
15314
  }
15315
15315
  }
15316
- class af extends HTMLElement {
15316
+ class lf extends HTMLElement {
15317
15317
  shadow;
15318
15318
  container;
15319
15319
  dismissTimer = null;
@@ -15360,7 +15360,7 @@ class af extends HTMLElement {
15360
15360
  }
15361
15361
  }
15362
15362
  const gn = /* @__PURE__ */ new Map();
15363
- function Zl(s) {
15363
+ function ec(s) {
15364
15364
  const e = gn.get(s);
15365
15365
  if (e) return e;
15366
15366
  const t = new Promise((r, i) => {
@@ -15386,7 +15386,7 @@ function Zl(s) {
15386
15386
  });
15387
15387
  return gn.set(s, t), t;
15388
15388
  }
15389
- function lf(s, e = 5e3) {
15389
+ function cf(s, e = 5e3) {
15390
15390
  return new Promise((t, r) => {
15391
15391
  const i = setTimeout(() => r(new Error(`Custom element <${s}> not registered within ${e}ms`)), e);
15392
15392
  customElements.whenDefined(s).then(() => {
@@ -15394,9 +15394,9 @@ function lf(s, e = 5e3) {
15394
15394
  });
15395
15395
  });
15396
15396
  }
15397
- const cf = {
15397
+ const uf = {
15398
15398
  "aikaara-template-payment-link": () => import("./AikaaraPaymentLink-ZYn2r5t-.mjs").then(({ registerAikaaraPaymentLink: s }) => s())
15399
- }, uf = {
15399
+ }, df = {
15400
15400
  "service-picker": "aikaara-service-picker",
15401
15401
  "service-details": "aikaara-service-details",
15402
15402
  "price-breakdown": "aikaara-price-breakdown",
@@ -15404,11 +15404,11 @@ const cf = {
15404
15404
  "call-upload": "aikaara-call-upload",
15405
15405
  "call-confirmation": "aikaara-call-confirmation"
15406
15406
  };
15407
- function df(s) {
15407
+ function hf(s) {
15408
15408
  const e = `template:${s}`, t = window.__aikaara_descriptor__?.components?.[e];
15409
15409
  return t && t.kind === "iife-element" ? { render: t.tag, scriptUrl: t.scriptUrl, props: t.props } : window.__aikaara_descriptor__?.templates?.[s];
15410
15410
  }
15411
- class hf extends HTMLElement {
15411
+ class ff extends HTMLElement {
15412
15412
  shadow;
15413
15413
  payloadData = null;
15414
15414
  innerMessage = "";
@@ -15430,9 +15430,11 @@ class hf extends HTMLElement {
15430
15430
  }
15431
15431
  connectedCallback() {
15432
15432
  this.render(), this.addEventListener("template-action", (e) => {
15433
- const t = e.detail, r = this.getAttribute("message-id");
15433
+ const t = e.detail;
15434
+ if (t?.text && Ql(t.text)) return;
15435
+ const r = this.getAttribute("message-id");
15434
15436
  if (r && t?.attributes?.action) {
15435
- const i = mf(t.attributes.action);
15437
+ const i = gf(t.attributes.action);
15436
15438
  if (Object.keys(i).length > 0)
15437
15439
  try {
15438
15440
  localStorage.setItem(`aikaara_form:${r}`, JSON.stringify(i));
@@ -15508,8 +15510,8 @@ class hf extends HTMLElement {
15508
15510
  <slot></slot>
15509
15511
  `; this.firstChild; ) this.removeChild(this.firstChild);
15510
15512
  if (!e) return;
15511
- const r = t ? df(t) : void 0, i = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`), n = cf[i];
15512
- if (n && !customElements.get(i) ? n().then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] native template ${i} failed to load`, o)) : r?.scriptUrl && !customElements.get(i) && Zl(r.scriptUrl).then(() => lf(i)).then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, o)), customElements.get(i)) {
15513
+ const r = t ? hf(t) : void 0, i = r?.render ?? (t ? `aikaara-template-${t}` : `aikaara-template-${e}`), n = uf[i];
15514
+ if (n && !customElements.get(i) ? n().then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] native template ${i} failed to load`, o)) : r?.scriptUrl && !customElements.get(i) && ec(r.scriptUrl).then(() => cf(i)).then(() => this.render()).catch((o) => console.warn(`[aikaara-template-renderer] failed to lazy-load ${r.scriptUrl}`, o)), customElements.get(i)) {
15513
15515
  const o = document.createElement(i);
15514
15516
  if (r?.props) {
15515
15517
  for (const [a, l] of Object.entries(r.props))
@@ -15554,7 +15556,7 @@ class hf extends HTMLElement {
15554
15556
  this.mountLinkButton(e);
15555
15557
  return;
15556
15558
  }
15557
- const r = t ? uf[t.replace(/_/g, "-").toLowerCase()] : void 0;
15559
+ const r = t ? df[t.replace(/_/g, "-").toLowerCase()] : void 0;
15558
15560
  if (r) {
15559
15561
  this.mountScheduleWidget(r, e);
15560
15562
  return;
@@ -15601,7 +15603,7 @@ class hf extends HTMLElement {
15601
15603
  */
15602
15604
  mountLinkButton(e) {
15603
15605
  const t = this.renderGen;
15604
- import("./AikaaraLinkButton-bdbI-t5B.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: i }) => {
15606
+ import("./AikaaraLinkButton-v4bie0j6.mjs").then(({ registerAikaaraLinkButton: r, AikaaraLinkButton: i }) => {
15605
15607
  if (t !== this.renderGen) return;
15606
15608
  r();
15607
15609
  const n = document.createElement("aikaara-link-button");
@@ -15610,7 +15612,7 @@ class hf extends HTMLElement {
15610
15612
  url: e.url ?? "",
15611
15613
  openLinkInNewTab: e.openLinkInNewTab,
15612
15614
  orderId: e.orderId,
15613
- extra: pf(e),
15615
+ extra: mf(e),
15614
15616
  messageId: this.getAttribute("message-id") ?? void 0
15615
15617
  }), this.appendChild(n);
15616
15618
  });
@@ -15634,26 +15636,26 @@ class hf extends HTMLElement {
15634
15636
  t.setPayload(e), this.appendChild(t);
15635
15637
  }
15636
15638
  }
15637
- const ff = /* @__PURE__ */ new Set([
15639
+ const pf = /* @__PURE__ */ new Set([
15638
15640
  "type",
15639
15641
  "url",
15640
15642
  "name",
15641
15643
  "openLinkInNewTab",
15642
15644
  "orderId"
15643
15645
  ]);
15644
- function pf(s) {
15646
+ function mf(s) {
15645
15647
  const e = {};
15646
15648
  for (const [t, r] of Object.entries(s))
15647
- ff.has(t) || (e[t] = r);
15649
+ pf.has(t) || (e[t] = r);
15648
15650
  return e;
15649
15651
  }
15650
- function mf(s) {
15652
+ function gf(s) {
15651
15653
  const e = /* @__PURE__ */ new Set(["message_id", "formAction", "requestType", "serviceType"]), t = {};
15652
15654
  for (const [r, i] of Object.entries(s))
15653
15655
  e.has(r) || (Array.isArray(i) && i.every((n) => typeof n == "string") ? t[r] = i : typeof i == "string" && (t[r] = [i]));
15654
15656
  return t;
15655
15657
  }
15656
- class gf extends HTMLElement {
15658
+ class bf extends HTMLElement {
15657
15659
  shadow;
15658
15660
  static get observedAttributes() {
15659
15661
  return ["text", "subtext"];
@@ -15702,7 +15704,7 @@ class gf extends HTMLElement {
15702
15704
  function ia(s) {
15703
15705
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
15704
15706
  }
15705
- class bf extends HTMLElement {
15707
+ class yf extends HTMLElement {
15706
15708
  shadow;
15707
15709
  data = null;
15708
15710
  selected = /* @__PURE__ */ new Set();
@@ -15927,7 +15929,7 @@ function Nt(s) {
15927
15929
  function bn(s) {
15928
15930
  return String(s).replace(/[&<>"']/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]);
15929
15931
  }
15930
- class yf extends HTMLElement {
15932
+ class vf extends HTMLElement {
15931
15933
  shadow;
15932
15934
  data = null;
15933
15935
  constructor() {
@@ -15996,14 +15998,14 @@ class yf extends HTMLElement {
15996
15998
  button:hover { background: var(--aikaara-submit-hover-bg, var(--aikaara-primary-hover, #4f46e5)); }
15997
15999
  button:disabled { opacity: var(--aikaara-submit-disabled-opacity, 0.5); cursor: not-allowed; }
15998
16000
  </style>
15999
- <button type="button">${vf(e)}</button>
16001
+ <button type="button">${wf(e)}</button>
16000
16002
  `, this.shadow.querySelector("button").addEventListener("click", () => this.handleClick());
16001
16003
  }
16002
16004
  }
16003
- function vf(s) {
16005
+ function wf(s) {
16004
16006
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
16005
16007
  }
16006
- class wf extends HTMLElement {
16008
+ class kf extends HTMLElement {
16007
16009
  shadow;
16008
16010
  data = null;
16009
16011
  dismissed = !1;
@@ -16095,7 +16097,7 @@ class wf extends HTMLElement {
16095
16097
  function yn(s) {
16096
16098
  return String(s).replace(/[&<>]/g, (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;" })[e]);
16097
16099
  }
16098
- class kf extends HTMLElement {
16100
+ class xf extends HTMLElement {
16099
16101
  shadow;
16100
16102
  data = null;
16101
16103
  _value = "";
@@ -16202,7 +16204,7 @@ function or(s) {
16202
16204
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
16203
16205
  );
16204
16206
  }
16205
- class xf extends HTMLElement {
16207
+ class _f extends HTMLElement {
16206
16208
  static get observedAttributes() {
16207
16209
  return ["slug", "user-id", "user-name", "user-token", "department-id", "config-base", "api-key"];
16208
16210
  }
@@ -16256,7 +16258,7 @@ class xf extends HTMLElement {
16256
16258
  const l = Object.keys(n).length > 0 ? n : void 0;
16257
16259
  return this.mountInflight = (async () => {
16258
16260
  try {
16259
- this.mounted = await Sp({
16261
+ this.mounted = await Ep({
16260
16262
  container: this,
16261
16263
  slug: e,
16262
16264
  configBase: this.getAttribute("config-base") ?? void 0,
@@ -16285,7 +16287,7 @@ class xf extends HTMLElement {
16285
16287
  })(), this.mountInflight;
16286
16288
  }
16287
16289
  }
16288
- class _f extends HTMLElement {
16290
+ class Sf extends HTMLElement {
16289
16291
  shadow;
16290
16292
  root = null;
16291
16293
  iframe = null;
@@ -16402,7 +16404,7 @@ class _f extends HTMLElement {
16402
16404
  });
16403
16405
  }
16404
16406
  }
16405
- const Sf = [
16407
+ const Ef = [
16406
16408
  { label: "Self-filing guidance" },
16407
16409
  { label: "Smart tax suggestions" },
16408
16410
  { label: "Auto-fetch 26AS / AIS" },
@@ -16410,7 +16412,7 @@ const Sf = [
16410
16412
  { label: "Dedicated tax expert" },
16411
16413
  { label: "End-to-end filing" },
16412
16414
  { label: "Document handling" }
16413
- ], Ef = [
16415
+ ], Af = [
16414
16416
  {
16415
16417
  label: "DIY",
16416
16418
  match: ["DIY", "DIY_SALARY"],
@@ -16433,11 +16435,11 @@ const Sf = [
16433
16435
  features: [!0, !0, !0, !0, !0, !0, !0]
16434
16436
  }
16435
16437
  ];
16436
- class Af extends HTMLElement {
16438
+ class If extends HTMLElement {
16437
16439
  shadow;
16438
16440
  data = null;
16439
- columns = Ef;
16440
- features = Sf;
16441
+ columns = Af;
16442
+ features = Ef;
16441
16443
  constructor() {
16442
16444
  super(), this.shadow = this.attachShadow({ mode: "open" });
16443
16445
  }
@@ -16570,7 +16572,7 @@ function vn(s) {
16570
16572
  (e) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[e]
16571
16573
  );
16572
16574
  }
16573
- class If extends HTMLElement {
16575
+ class Tf extends HTMLElement {
16574
16576
  shadow;
16575
16577
  root = null;
16576
16578
  schemas = [];
@@ -16661,7 +16663,7 @@ class If extends HTMLElement {
16661
16663
  `;
16662
16664
  const r = this.shadow.querySelector(".modal-body"), i = this.schemas.map(
16663
16665
  (o) => `
16664
- <button class="chip" type="button" data-section-id="${Cf(o.id)}">
16666
+ <button class="chip" type="button" data-section-id="${Pf(o.id)}">
16665
16667
  <span class="chip-icon">${o.icon ?? "📄"}</span>
16666
16668
  <span class="chip-label">${oa(o.title)}</span>
16667
16669
  </button>`
@@ -16694,7 +16696,7 @@ class If extends HTMLElement {
16694
16696
  e.classList.remove("view-picker"), e.classList.add("view-form");
16695
16697
  const t = this.schemas.find((n) => n.id === this.activeSectionId), r = this.shadow.querySelector(".modal-header");
16696
16698
  r.innerHTML = `
16697
- <button class="icon-btn back-btn" type="button" aria-label="Back">${Tf}</button>
16699
+ <button class="icon-btn back-btn" type="button" aria-label="Back">${Cf}</button>
16698
16700
  <div class="modal-title">${oa(t?.title ?? "Edit")}</div>
16699
16701
  <button class="icon-btn close-btn" type="button" aria-label="Close">${sa}</button>
16700
16702
  `;
@@ -16870,14 +16872,14 @@ class If extends HTMLElement {
16870
16872
  `;
16871
16873
  }
16872
16874
  }
16873
- const sa = '<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>', Tf = '<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>';
16874
- function Cf(s) {
16875
+ const sa = '<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>', Cf = '<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>';
16876
+ function Pf(s) {
16875
16877
  return s.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
16876
16878
  }
16877
16879
  function oa(s) {
16878
16880
  return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
16879
16881
  }
16880
- class Pf extends HTMLElement {
16882
+ class Of extends HTMLElement {
16881
16883
  shadow;
16882
16884
  schema = null;
16883
16885
  value = {};
@@ -17448,7 +17450,7 @@ function aa(s) {
17448
17450
  const e = s.getFullYear(), t = String(s.getMonth() + 1).padStart(2, "0"), r = String(s.getDate()).padStart(2, "0");
17449
17451
  return `${e}-${t}-${r}`;
17450
17452
  }
17451
- function Of(s, e) {
17453
+ function Lf(s, e) {
17452
17454
  const t = new Date(s);
17453
17455
  return t.setDate(t.getDate() + e), t;
17454
17456
  }
@@ -17459,7 +17461,7 @@ function ys(s) {
17459
17461
  year: "numeric"
17460
17462
  });
17461
17463
  }
17462
- function Lf(s) {
17464
+ function Mf(s) {
17463
17465
  const e = Rs(s);
17464
17466
  return {
17465
17467
  weekday: e.toLocaleDateString("en-GB", { weekday: "short" }),
@@ -17475,8 +17477,8 @@ function la(s) {
17475
17477
  const e = (s % 1440 + 1440) % 1440, t = Math.floor(e / 60), r = e % 60, i = (t + 11) % 12 + 1, n = t < 12 ? "AM" : "PM";
17476
17478
  return `${i}:${String(r).padStart(2, "0")} ${n}`;
17477
17479
  }
17478
- const Mf = "serviceId";
17479
- class Nf extends HTMLElement {
17480
+ const Nf = "serviceId";
17481
+ class Rf extends HTMLElement {
17480
17482
  shadow;
17481
17483
  data = null;
17482
17484
  selectedId = null;
@@ -17490,7 +17492,7 @@ class Nf extends HTMLElement {
17490
17492
  this.data = e ?? { services: [] }, this.dataset.consumed !== "true" && (this.selectedId = null), this.render();
17491
17493
  }
17492
17494
  getName() {
17493
- return this.data?.postbackKey ?? Mf;
17495
+ return this.data?.postbackKey ?? Nf;
17494
17496
  }
17495
17497
  setConsumedValues(e) {
17496
17498
  const t = e?.[this.getName()], r = Array.isArray(t) ? t[0] : t;
@@ -17531,7 +17533,7 @@ class Nf extends HTMLElement {
17531
17533
  ${t ? `<span class="from">from ${Pe(tt(i.basePrice))}</span>` : ""}
17532
17534
  </button>`).join("");
17533
17535
  this.shadow.innerHTML = `
17534
- <style>${Rf}</style>
17536
+ <style>${jf}</style>
17535
17537
  <div class="card" part="card">
17536
17538
  ${this.data?.title ? `<div class="title">${Pe(this.data.title)}</div>` : ""}
17537
17539
  ${this.data?.subtitle ? `<div class="subtitle">${Pe(this.data.subtitle)}</div>` : ""}
@@ -17547,7 +17549,7 @@ class Nf extends HTMLElement {
17547
17549
  });
17548
17550
  }
17549
17551
  }
17550
- const Rf = `
17552
+ const jf = `
17551
17553
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
17552
17554
  .card {
17553
17555
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -17574,8 +17576,8 @@ const Rf = `
17574
17576
  .name { font-weight: 600; font-size: 14px; }
17575
17577
  .tagline { font-size: 13px; color: var(--aikaara-text-secondary, #6b7280); }
17576
17578
  .from { flex-shrink: 0; font-size: 13px; font-weight: 600; color: var(--aikaara-primary, #6366f1); white-space: nowrap; }
17577
- `, jf = "serviceDetails";
17578
- class Df extends HTMLElement {
17579
+ `, Df = "serviceDetails";
17580
+ class $f extends HTMLElement {
17579
17581
  shadow;
17580
17582
  data = null;
17581
17583
  constructor() {
@@ -17588,7 +17590,7 @@ class Df extends HTMLElement {
17588
17590
  this.data = e, this.render();
17589
17591
  }
17590
17592
  getName() {
17591
- return this.data?.postbackKey ?? jf;
17593
+ return this.data?.postbackKey ?? Df;
17592
17594
  }
17593
17595
  locked() {
17594
17596
  return this.dataset.consumed === "true";
@@ -17627,7 +17629,7 @@ class Df extends HTMLElement {
17627
17629
  </div>
17628
17630
  </div>` : "", b = this.locked() ? "" : `<button class="cta" type="button">${Pe(this.data.continueLabel ?? "Continue")}</button>`;
17629
17631
  this.shadow.innerHTML = `
17630
- <style>${$f}</style>
17632
+ <style>${Uf}</style>
17631
17633
  <div class="card" part="card">
17632
17634
  <div class="section">
17633
17635
  ${r ? `<span class="badge">${Pe(r)}</span>` : ""}
@@ -17642,7 +17644,7 @@ class Df extends HTMLElement {
17642
17644
  `, this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleContinue());
17643
17645
  }
17644
17646
  }
17645
- const $f = `
17647
+ const Uf = `
17646
17648
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
17647
17649
  .card {
17648
17650
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -17675,8 +17677,8 @@ const $f = `
17675
17677
  font-family: inherit; cursor: pointer;
17676
17678
  }
17677
17679
  .cta:hover { filter: brightness(0.96); }
17678
- `, Uf = "priceAccepted";
17679
- class Bf extends HTMLElement {
17680
+ `, Bf = "priceAccepted";
17681
+ class Ff extends HTMLElement {
17680
17682
  shadow;
17681
17683
  data = null;
17682
17684
  constructor() {
@@ -17689,7 +17691,7 @@ class Bf extends HTMLElement {
17689
17691
  this.data = e, this.render();
17690
17692
  }
17691
17693
  getName() {
17692
- return this.data?.postbackKey ?? Uf;
17694
+ return this.data?.postbackKey ?? Bf;
17693
17695
  }
17694
17696
  locked() {
17695
17697
  return this.dataset.consumed === "true";
@@ -17715,7 +17717,7 @@ class Bf extends HTMLElement {
17715
17717
  }
17716
17718
  const e = Zr(this.data), t = Math.round((this.data.gstRate ?? 0.18) * 100), r = this.data.feeLabel ?? "Service Fee", i = this.data.discountLabel ?? "Discount", n = this.data.totalLabel ?? "Total Payable", o = this.data.name ? `${Pe(this.data.name)} Consultation` : "Price Breakdown", a = this.locked() ? "" : `<button class="cta" type="button">${Pe(this.data.continueLabel ?? "Continue to Schedule")}</button>`;
17717
17719
  this.shadow.innerHTML = `
17718
- <style>${Ff}</style>
17720
+ <style>${qf}</style>
17719
17721
  <div class="card" part="card">
17720
17722
  <h2>${o}</h2>
17721
17723
  <p class="sub">30 minute call with a tax expert</p>
@@ -17734,7 +17736,7 @@ class Bf extends HTMLElement {
17734
17736
  `, this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleContinue());
17735
17737
  }
17736
17738
  }
17737
- const Ff = `
17739
+ const qf = `
17738
17740
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
17739
17741
  .card {
17740
17742
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -17758,8 +17760,8 @@ const Ff = `
17758
17760
  font-family: inherit; cursor: pointer;
17759
17761
  }
17760
17762
  .cta:hover { filter: brightness(0.96); }
17761
- `, qf = ["09:00", "10:00", "11:00", "12:00", "14:00", "15:00", "16:00", "17:00"], Hf = 7, Wf = "callSlot";
17762
- class zf extends HTMLElement {
17763
+ `, Hf = ["09:00", "10:00", "11:00", "12:00", "14:00", "15:00", "16:00", "17:00"], Wf = 7, zf = "callSlot";
17764
+ class Vf extends HTMLElement {
17763
17765
  shadow;
17764
17766
  data = null;
17765
17767
  selectedDate = null;
@@ -17792,7 +17794,7 @@ class zf extends HTMLElement {
17792
17794
  this.errorMessage = e ?? "", this.render();
17793
17795
  }
17794
17796
  getName() {
17795
- return this.data?.postbackKey ?? Wf;
17797
+ return this.data?.postbackKey ?? zf;
17796
17798
  }
17797
17799
  setConsumedValues(e) {
17798
17800
  const t = e?.[this.getName()], r = Array.isArray(t) ? t[0] : t;
@@ -17810,10 +17812,10 @@ class zf extends HTMLElement {
17810
17812
  if (!e) return [];
17811
17813
  const t = new Set(e.disabledDates ?? []), r = this.availabilityOverride ?? e.days ?? e.availability ?? e.slots;
17812
17814
  if (r && r.length)
17813
- return r.filter((l) => l && typeof l.date == "string").map((l) => ({ iso: l.date, slots: (l.slots ?? []).map(Vf) })).filter((l) => !t.has(l.iso));
17814
- const i = e.startDate ? Rs(e.startDate) : /* @__PURE__ */ new Date(), n = Math.max(1, e.daysAhead ?? Hf), o = e.times && e.times.length ? e.times : qf, a = [];
17815
+ return r.filter((l) => l && typeof l.date == "string").map((l) => ({ iso: l.date, slots: (l.slots ?? []).map(Kf) })).filter((l) => !t.has(l.iso));
17816
+ const i = e.startDate ? Rs(e.startDate) : /* @__PURE__ */ new Date(), n = Math.max(1, e.daysAhead ?? Wf), o = e.times && e.times.length ? e.times : Hf, a = [];
17815
17817
  for (let l = 0; l < n; l++) {
17816
- const c = aa(Of(i, l));
17818
+ const c = aa(Lf(i, l));
17817
17819
  t.has(c) || a.push({ iso: c, slots: o.map((u) => ({ start: u, available: !0 })) });
17818
17820
  }
17819
17821
  return a;
@@ -17874,7 +17876,7 @@ class zf extends HTMLElement {
17874
17876
  if (this.errorMessage) return `<div class="state error">${Pe(this.errorMessage)}</div>`;
17875
17877
  if (!e.length) return '<div class="state">No call slots are available right now.</div>';
17876
17878
  const r = e.map((a) => {
17877
- const { weekday: l, day: c, month: u } = Lf(a.iso);
17879
+ const { weekday: l, day: c, month: u } = Mf(a.iso);
17878
17880
  return `
17879
17881
  <button class="day" type="button" role="radio" aria-checked="${a.iso === this.selectedDate}" data-date="${Jt(a.iso)}">
17880
17882
  <span class="day-weekday">${Pe(l)}</span>
@@ -17919,7 +17921,7 @@ class zf extends HTMLElement {
17919
17921
  }), this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleContinue());
17920
17922
  }
17921
17923
  }
17922
- function Vf(s) {
17924
+ function Kf(s) {
17923
17925
  return typeof s == "string" ? { start: s, available: !0 } : { start: s.start, available: s.available };
17924
17926
  }
17925
17927
  const ca = `
@@ -17978,8 +17980,8 @@ const ca = `
17978
17980
  .tick { color: #16a34a; font-weight: 700; }
17979
17981
  .locked-when { margin-top: 6px; font-size: 14px; }
17980
17982
  .locked-tz { margin-top: 2px; font-size: 12px; color: var(--aikaara-text-secondary, #6b7280); }
17981
- `, Kf = "callDetails";
17982
- class Gf extends HTMLElement {
17983
+ `, Gf = "callDetails";
17984
+ class Yf extends HTMLElement {
17983
17985
  shadow;
17984
17986
  data = null;
17985
17987
  query = "";
@@ -17996,7 +17998,7 @@ class Gf extends HTMLElement {
17996
17998
  this.data = e ?? {}, this.query = "", this.fileNames = [], this.error = "", this.dataset.consumed !== "true" && (this.submitted = !1), this.render();
17997
17999
  }
17998
18000
  getName() {
17999
- return this.data?.postbackKey ?? Kf;
18001
+ return this.data?.postbackKey ?? Gf;
18000
18002
  }
18001
18003
  setConsumedValues(e) {
18002
18004
  const t = e?.query, r = Array.isArray(t) ? t[0] : t;
@@ -18065,7 +18067,7 @@ class Gf extends HTMLElement {
18065
18067
  <p class="counter">${this.query.length}/${t.maxLength ?? 1e3}</p>`}
18066
18068
  </div>`, a = r ? "" : `<button class="cta" type="button">${Pe(this.data.submitLabel ?? "Schedule Call")}</button>`;
18067
18069
  this.shadow.innerHTML = `
18068
- <style>${Yf}</style>
18070
+ <style>${Jf}</style>
18069
18071
  <div class="card" part="card">
18070
18072
  ${this.data.title ? `<div class="title">${Pe(this.data.title)}</div>` : ""}
18071
18073
  ${this.data.subtitle ? `<div class="subtitle">${Pe(this.data.subtitle)}</div>` : ""}
@@ -18090,7 +18092,7 @@ class Gf extends HTMLElement {
18090
18092
  })), this.shadow.querySelector("button.cta")?.addEventListener("click", () => this.handleSubmit());
18091
18093
  }
18092
18094
  }
18093
- const Yf = `
18095
+ const Jf = `
18094
18096
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
18095
18097
  .card {
18096
18098
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -18135,7 +18137,7 @@ const Yf = `
18135
18137
  }
18136
18138
  .cta:hover { filter: brightness(0.96); }
18137
18139
  `;
18138
- class Jf extends HTMLElement {
18140
+ class Qf extends HTMLElement {
18139
18141
  shadow;
18140
18142
  data = null;
18141
18143
  constructor() {
@@ -18164,7 +18166,7 @@ class Jf extends HTMLElement {
18164
18166
  ([u, d]) => `<div class="row"><span class="label">${Pe(u)}</span><span class="value">${Pe(d)}</span></div>`
18165
18167
  ).join("");
18166
18168
  this.shadow.innerHTML = `
18167
- <style>${Qf}</style>
18169
+ <style>${Xf}</style>
18168
18170
  <div class="card" part="card">
18169
18171
  <div class="head">
18170
18172
  <div class="icon" aria-hidden="true">✓</div>
@@ -18177,7 +18179,7 @@ class Jf extends HTMLElement {
18177
18179
  `;
18178
18180
  }
18179
18181
  }
18180
- const Qf = `
18182
+ const Xf = `
18181
18183
  :host { display: block; font-family: var(--aikaara-font, system-ui, sans-serif); color: var(--aikaara-text, #1f2937); }
18182
18184
  .card {
18183
18185
  background: var(--aikaara-service-bg, var(--aikaara-surface, #ffffff));
@@ -18201,40 +18203,40 @@ const Qf = `
18201
18203
  .value { font-weight: 600; text-align: right; }
18202
18204
  .note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--aikaara-text-secondary, #6b7280); }
18203
18205
  `;
18204
- function Xf() {
18206
+ function Zf() {
18205
18207
  const s = [
18206
- ["aikaara-chat-widget", Uh],
18207
- ["aikaara-chat-bubble", Bh],
18208
- ["aikaara-chat-header", qh],
18209
- ["aikaara-message-list", Xh],
18210
- ["aikaara-message-bubble", tf],
18211
- ["aikaara-chat-input", nf],
18212
- ["aikaara-typing-indicator", sf],
18213
- ["aikaara-streaming-message", of],
18214
- ["aikaara-error-banner", af],
18215
- ["aikaara-template-renderer", hf],
18216
- ["aikaara-system-pill", gf],
18217
- ["aikaara-option-list", bf],
18218
- ["aikaara-submit-action", yf],
18219
- ["aikaara-modal-action", wf],
18220
- ["aikaara-text-input", kf],
18221
- ["aikaara-chat", xf],
18222
- ["aikaara-link-modal", _f],
18223
- ["aikaara-compare-plans", Af],
18224
- ["aikaara-smart-edit-modal", If],
18225
- ["aikaara-schema-form", Pf],
18208
+ ["aikaara-chat-widget", Bh],
18209
+ ["aikaara-chat-bubble", Fh],
18210
+ ["aikaara-chat-header", Hh],
18211
+ ["aikaara-message-list", Zh],
18212
+ ["aikaara-message-bubble", rf],
18213
+ ["aikaara-chat-input", sf],
18214
+ ["aikaara-typing-indicator", of],
18215
+ ["aikaara-streaming-message", af],
18216
+ ["aikaara-error-banner", lf],
18217
+ ["aikaara-template-renderer", ff],
18218
+ ["aikaara-system-pill", bf],
18219
+ ["aikaara-option-list", yf],
18220
+ ["aikaara-submit-action", vf],
18221
+ ["aikaara-modal-action", kf],
18222
+ ["aikaara-text-input", xf],
18223
+ ["aikaara-chat", _f],
18224
+ ["aikaara-link-modal", Sf],
18225
+ ["aikaara-compare-plans", If],
18226
+ ["aikaara-smart-edit-modal", Tf],
18227
+ ["aikaara-schema-form", Of],
18226
18228
  // Schedule-call flow widgets (one per step; chained by the dashboard flow).
18227
- ["aikaara-service-picker", Nf],
18228
- ["aikaara-service-details", Df],
18229
- ["aikaara-price-breakdown", Bf],
18230
- ["aikaara-slot-picker", zf],
18231
- ["aikaara-call-upload", Gf],
18232
- ["aikaara-call-confirmation", Jf]
18229
+ ["aikaara-service-picker", Rf],
18230
+ ["aikaara-service-details", $f],
18231
+ ["aikaara-price-breakdown", Ff],
18232
+ ["aikaara-slot-picker", Vf],
18233
+ ["aikaara-call-upload", Yf],
18234
+ ["aikaara-call-confirmation", Qf]
18233
18235
  ];
18234
18236
  for (const [e, t] of s)
18235
18237
  customElements.get(e) || customElements.define(e, t);
18236
18238
  }
18237
- Xf();
18239
+ Zf();
18238
18240
  function xr(s, e, t = "") {
18239
18241
  if (!e) return t;
18240
18242
  const r = e.split(".");
@@ -18260,7 +18262,7 @@ function ua(s) {
18260
18262
  async function Yt(s) {
18261
18263
  return typeof s == "function" ? await s() : s;
18262
18264
  }
18263
- class Zf {
18265
+ class ep {
18264
18266
  constructor(e, t) {
18265
18267
  this.descriptor = e, this.sessionToken = t;
18266
18268
  }
@@ -18311,10 +18313,10 @@ class Zf {
18311
18313
  return this.cache = { token: d, requestId: g, fullName: h, userId: b, expiresAt: y }, this.cache;
18312
18314
  }
18313
18315
  }
18314
- async function ep(s) {
18316
+ async function tp(s) {
18315
18317
  const e = {};
18316
18318
  for (const t of s.spec) {
18317
- const r = await tp(t, s.providers);
18319
+ const r = await rp(t, s.providers);
18318
18320
  if (r !== void 0 && r !== "")
18319
18321
  e[t.name] = r;
18320
18322
  else {
@@ -18327,11 +18329,11 @@ async function ep(s) {
18327
18329
  }
18328
18330
  return e;
18329
18331
  }
18330
- async function tp(s, e) {
18332
+ async function rp(s, e) {
18331
18333
  const t = s.key ?? s.name;
18332
18334
  switch (s.source) {
18333
18335
  case "cookie":
18334
- return rp(t);
18336
+ return np(t);
18335
18337
  case "localStorage":
18336
18338
  return _r(() => window.localStorage.getItem(t) ?? void 0);
18337
18339
  case "sessionStorage":
@@ -18339,7 +18341,7 @@ async function tp(s, e) {
18339
18341
  case "url_param":
18340
18342
  return _r(() => new URL(window.location.href).searchParams.get(t) ?? void 0);
18341
18343
  case "header_meta":
18342
- return _r(() => document.querySelector(`meta[name="${np(t)}"]`)?.content ?? void 0);
18344
+ return _r(() => document.querySelector(`meta[name="${ip(t)}"]`)?.content ?? void 0);
18343
18345
  case "callback": {
18344
18346
  const r = e?.[s.name];
18345
18347
  if (!r) return;
@@ -18350,7 +18352,7 @@ async function tp(s, e) {
18350
18352
  return;
18351
18353
  }
18352
18354
  }
18353
- function rp(s) {
18355
+ function np(s) {
18354
18356
  if (typeof document > "u") return;
18355
18357
  const e = encodeURIComponent(s), t = document.cookie ? document.cookie.split("; ") : [];
18356
18358
  for (const r of t) {
@@ -18372,11 +18374,11 @@ function _r(s) {
18372
18374
  return;
18373
18375
  }
18374
18376
  }
18375
- function np(s) {
18377
+ function ip(s) {
18376
18378
  return s.replace(/["\\]/g, "\\$&");
18377
18379
  }
18378
- const ip = 1800;
18379
- class sp {
18380
+ const sp = 1800;
18381
+ class op {
18380
18382
  constructor(e) {
18381
18383
  this.opts = e, this.cache = this.loadCache();
18382
18384
  }
@@ -18405,7 +18407,7 @@ class sp {
18405
18407
  throw new Error(
18406
18408
  "[aikaara-chat-sdk] SsoExchangeAdapter.exchange() requires descriptor.sso.collect; v2 partner-token flow should be handled by TokenDiscoveryReader instead."
18407
18409
  );
18408
- const e = await ep({
18410
+ const e = await tp({
18409
18411
  spec: this.opts.descriptor.collect,
18410
18412
  providers: this.opts.providers
18411
18413
  }), t = JSON.stringify({ credentials: e }), r = {
@@ -18443,7 +18445,7 @@ class sp {
18443
18445
  return this.cache = u, this.persistCache(u), u;
18444
18446
  }
18445
18447
  computeExpiry() {
18446
- const e = this.opts.descriptor.cacheTtlSec ?? ip;
18448
+ const e = this.opts.descriptor.cacheTtlSec ?? sp;
18447
18449
  if (!(!this.opts.descriptor.cacheKey || e <= 0))
18448
18450
  return Date.now() + e * 1e3;
18449
18451
  }
@@ -18476,8 +18478,8 @@ class sp {
18476
18478
  }
18477
18479
  }
18478
18480
  }
18479
- const op = 3e4, ap = 2e3, lp = 100;
18480
- async function cp(s) {
18481
+ const ap = 3e4, lp = 2e3, cp = 100;
18482
+ async function up(s) {
18481
18483
  const { descriptor: e } = s, t = e.tokenSourceConfig ?? {};
18482
18484
  switch (e.tokenSource) {
18483
18485
  case "init": {
@@ -18486,37 +18488,37 @@ async function cp(s) {
18486
18488
  return { token: s.initToken, source: "init" };
18487
18489
  }
18488
18490
  case "query": {
18489
- const r = typeof t.key == "string" && t.key ? t.key : "token", i = dp(r);
18491
+ const r = typeof t.key == "string" && t.key ? t.key : "token", i = hp(r);
18490
18492
  if (!i) throw new Ze("query", `?${r}= not present`);
18491
18493
  return { token: i, source: "query" };
18492
18494
  }
18493
18495
  case "hash": {
18494
- const r = typeof t.key == "string" && t.key ? t.key : "token", i = hp(r);
18496
+ const r = typeof t.key == "string" && t.key ? t.key : "token", i = fp(r);
18495
18497
  if (!i) throw new Ze("hash", `#${r}= not present`);
18496
18498
  return { token: i, source: "hash" };
18497
18499
  }
18498
18500
  case "postmsg": {
18499
- const r = typeof t.type == "string" ? t.type : "", i = typeof t.key == "string" && t.key ? t.key : "token", n = bp(typeof t.origins == "string" ? t.origins : ""), o = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : op;
18500
- return { token: await gp({ type: r, key: i, origins: n, timeoutMs: o }), source: "postmsg" };
18501
+ const r = typeof t.type == "string" ? t.type : "", i = typeof t.key == "string" && t.key ? t.key : "token", n = yp(typeof t.origins == "string" ? t.origins : ""), o = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : ap;
18502
+ return { token: await bp({ type: r, key: i, origins: n, timeoutMs: o }), source: "postmsg" };
18501
18503
  }
18502
18504
  case "cookie": {
18503
18505
  const r = typeof t.name == "string" && t.name ? t.name : "";
18504
18506
  if (!r) throw new Ze("cookie", "cookie.name not configured");
18505
- const i = fp(r);
18507
+ const i = pp(r);
18506
18508
  if (!i) throw new Ze("cookie", `cookie "${r}" not set`);
18507
18509
  return { token: i, source: "cookie" };
18508
18510
  }
18509
18511
  case "storage": {
18510
18512
  const r = t.store === "session" ? "session" : "local", i = typeof t.key == "string" && t.key ? t.key : "", n = typeof t.path == "string" ? t.path : "";
18511
18513
  if (!i) throw new Ze("storage", "storage.key not configured");
18512
- const o = pp(r, i, n);
18514
+ const o = mp(r, i, n);
18513
18515
  if (!o) throw new Ze("storage", `${r}Storage["${i}"] not set`);
18514
18516
  return { token: o, source: "storage" };
18515
18517
  }
18516
18518
  case "global": {
18517
18519
  const r = typeof t.path == "string" ? t.path : "";
18518
18520
  if (!r) throw new Ze("global", "global.path not configured");
18519
- const i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : ap, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : lp, o = await mp(r, i, n);
18521
+ const i = typeof t.timeoutMs == "number" && t.timeoutMs > 0 ? t.timeoutMs : lp, n = typeof t.intervalMs == "number" && t.intervalMs > 0 ? t.intervalMs : cp, o = await gp(r, i, n);
18520
18522
  if (!o) throw new Ze("global", `window.${r} not present`);
18521
18523
  return { token: o, source: "global" };
18522
18524
  }
@@ -18529,7 +18531,7 @@ async function cp(s) {
18529
18531
  }
18530
18532
  }
18531
18533
  }
18532
- class up {
18534
+ class dp {
18533
18535
  constructor(e) {
18534
18536
  this.opts = e;
18535
18537
  }
@@ -18540,7 +18542,7 @@ class up {
18540
18542
  /** Resolve the token. Returns cache if present. */
18541
18543
  async get() {
18542
18544
  if (this.cached) return this.cached;
18543
- const e = await cp(this.opts);
18545
+ const e = await up(this.opts);
18544
18546
  return this.cached = e, e;
18545
18547
  }
18546
18548
  /**
@@ -18557,7 +18559,7 @@ class Ze extends Error {
18557
18559
  super(`[aikaara-chat-sdk] token-discovery (${e}): ${t}`), this.source = e, this.name = "TokenDiscoveryError";
18558
18560
  }
18559
18561
  }
18560
- function dp(s) {
18562
+ function hp(s) {
18561
18563
  if (!(typeof window > "u"))
18562
18564
  try {
18563
18565
  const e = window.location.search.slice(1);
@@ -18571,7 +18573,7 @@ function dp(s) {
18571
18573
  return;
18572
18574
  }
18573
18575
  }
18574
- function hp(s) {
18576
+ function fp(s) {
18575
18577
  if (!(typeof window > "u"))
18576
18578
  try {
18577
18579
  const e = window.location.hash.replace(/^#/, "");
@@ -18580,7 +18582,7 @@ function hp(s) {
18580
18582
  return;
18581
18583
  }
18582
18584
  }
18583
- function fp(s) {
18585
+ function pp(s) {
18584
18586
  if (typeof document > "u") return;
18585
18587
  const e = encodeURIComponent(s), t = document.cookie ? document.cookie.split("; ") : [];
18586
18588
  for (const r of t) {
@@ -18595,7 +18597,7 @@ function fp(s) {
18595
18597
  }
18596
18598
  }
18597
18599
  }
18598
- function pp(s, e, t) {
18600
+ function mp(s, e, t) {
18599
18601
  if (!(typeof window > "u"))
18600
18602
  try {
18601
18603
  const i = (s === "session" ? window.sessionStorage : window.localStorage).getItem(e);
@@ -18607,17 +18609,17 @@ function pp(s, e, t) {
18607
18609
  } catch {
18608
18610
  return i;
18609
18611
  }
18610
- const o = ec(n, t);
18612
+ const o = tc(n, t);
18611
18613
  return typeof o == "string" ? o : void 0;
18612
18614
  } catch {
18613
18615
  return;
18614
18616
  }
18615
18617
  }
18616
- async function mp(s, e, t) {
18618
+ async function gp(s, e, t) {
18617
18619
  if (typeof window > "u") return;
18618
18620
  const r = Date.now() + e;
18619
18621
  for (; Date.now() < r; ) {
18620
- const i = ec(window, s);
18622
+ const i = tc(window, s);
18621
18623
  if (typeof i == "string" && i.length > 0) return i;
18622
18624
  if (typeof i == "function")
18623
18625
  try {
@@ -18628,7 +18630,7 @@ async function mp(s, e, t) {
18628
18630
  await new Promise((n) => setTimeout(n, t));
18629
18631
  }
18630
18632
  }
18631
- function gp(s) {
18633
+ function bp(s) {
18632
18634
  return new Promise((e, t) => {
18633
18635
  if (typeof window > "u") {
18634
18636
  t(new Ze("postmsg", "no window"));
@@ -18650,10 +18652,10 @@ function gp(s) {
18650
18652
  window.addEventListener("message", n);
18651
18653
  });
18652
18654
  }
18653
- function bp(s) {
18655
+ function yp(s) {
18654
18656
  return s ? s.split(/[,\s]+/).map((e) => e.trim()).filter(Boolean) : [];
18655
18657
  }
18656
- function ec(s, e) {
18658
+ function tc(s, e) {
18657
18659
  if (!e) return s;
18658
18660
  const t = e.split(".").filter(Boolean);
18659
18661
  let r = s;
@@ -18664,7 +18666,7 @@ function ec(s, e) {
18664
18666
  return;
18665
18667
  return r;
18666
18668
  }
18667
- function yp() {
18669
+ function vp() {
18668
18670
  const s = typeof crypto < "u" ? crypto : null;
18669
18671
  if (s?.randomUUID) return s.randomUUID();
18670
18672
  if (s?.getRandomValues) {
@@ -18678,25 +18680,25 @@ function yp() {
18678
18680
  return (e === "x" ? t : t & 3 | 8).toString(16);
18679
18681
  });
18680
18682
  }
18681
- const vp = "aikaara_chat:requestId";
18683
+ const wp = "aikaara_chat:requestId";
18682
18684
  function js(s, e, t) {
18683
- const r = `${vp}:${s}:${e}`;
18685
+ const r = `${wp}:${s}:${e}`;
18684
18686
  return t ? `${r}:${t}` : r;
18685
18687
  }
18686
- function tc(s, e, t) {
18688
+ function rc(s, e, t) {
18687
18689
  try {
18688
18690
  return localStorage.getItem(js(s, e, t));
18689
18691
  } catch {
18690
18692
  return null;
18691
18693
  }
18692
18694
  }
18693
- function wp(s, e, t, r) {
18695
+ function kp(s, e, t, r) {
18694
18696
  try {
18695
18697
  localStorage.setItem(js(s, e, r), t);
18696
18698
  } catch {
18697
18699
  }
18698
18700
  }
18699
- function Ep(s, e, t) {
18701
+ function Ap(s, e, t) {
18700
18702
  try {
18701
18703
  localStorage.removeItem(js(s, e, t));
18702
18704
  } catch {
@@ -18745,7 +18747,7 @@ async function vs(s, e, t = "before-chat") {
18745
18747
  k = _;
18746
18748
  break;
18747
18749
  }
18748
- if (y = _.status, w = await _.text().catch(() => ""), m < c.length && kp(y, w)) {
18750
+ if (y = _.status, w = await _.text().catch(() => ""), m < c.length && xp(y, w)) {
18749
18751
  const E = c[m++];
18750
18752
  console.warn(
18751
18753
  `[aikaara-chat-sdk] preflight #${u} ${g} ${p} → ${y} (transient). Retry #${m} in ${E}ms.`
@@ -18799,7 +18801,7 @@ async function vs(s, e, t = "before-chat") {
18799
18801
  }
18800
18802
  return { captured: l };
18801
18803
  }
18802
- async function Ap(s) {
18804
+ async function Ip(s) {
18803
18805
  const e = s.steps ?? [];
18804
18806
  return e.some((r) => r.trigger === "on-method-select") ? (await vs(
18805
18807
  e,
@@ -18815,7 +18817,7 @@ async function Ap(s) {
18815
18817
  "on-method-select"
18816
18818
  )).captured : {};
18817
18819
  }
18818
- function kp(s, e) {
18820
+ function xp(s, e) {
18819
18821
  if (s === 503 || s === 504 || s === 502) return !0;
18820
18822
  if (s === 401 || s === 403) return e.trim().length === 0;
18821
18823
  if (s === 500) {
@@ -18824,7 +18826,7 @@ function kp(s, e) {
18824
18826
  }
18825
18827
  return !1;
18826
18828
  }
18827
- async function rc(s, e) {
18829
+ async function nc(s, e) {
18828
18830
  const t = await fetch(s, {
18829
18831
  method: "GET",
18830
18832
  headers: { accept: "application/json", ...e ?? {} }
@@ -18840,10 +18842,10 @@ async function rc(s, e) {
18840
18842
  }
18841
18843
  return r;
18842
18844
  }
18843
- function nc(s, e) {
18844
- return s.replace("{projectId}", e).replace("{uuid}", yp().replace(/-/g, ""));
18845
+ function ic(s, e) {
18846
+ return s.replace("{projectId}", e).replace("{uuid}", vp().replace(/-/g, ""));
18845
18847
  }
18846
- function ic(s) {
18848
+ function sc(s) {
18847
18849
  const e = s._preload;
18848
18850
  if (!Array.isArray(e) || e.length === 0) return;
18849
18851
  const t = Array.from(
@@ -18851,19 +18853,19 @@ function ic(s) {
18851
18853
  e.map((r) => r && typeof r == "object" ? r.scriptUrl : null).filter((r) => typeof r == "string" && r.length > 0)
18852
18854
  )
18853
18855
  );
18854
- t.length !== 0 && Promise.allSettled(t.map((r) => Zl(r)));
18856
+ t.length !== 0 && Promise.allSettled(t.map((r) => ec(r)));
18855
18857
  }
18856
- async function xp(s) {
18858
+ async function _p(s) {
18857
18859
  const e = {
18858
- ...s.config ?? (s.configUrl ? await rc(s.configUrl, s.configHeaders) : {}),
18860
+ ...s.config ?? (s.configUrl ? await nc(s.configUrl, s.configHeaders) : {}),
18859
18861
  ...s.overrides ?? {}
18860
18862
  };
18861
- ic(e);
18863
+ sc(e);
18862
18864
  const t = e.transport ?? "tiledesk", r = e.tiledesk;
18863
18865
  if ((t === "tiledesk" || t === "dual") && !r)
18864
18866
  throw new Error("mount: descriptor.tiledesk is required for tiledesk/dual transport");
18865
- const i = r?.projectId ?? "", n = s.identity.userId, o = s.conversationScope || void 0, a = s.forceNewConversation ? null : tc(n, i, o), l = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", c = s.conversationId ?? a ?? nc(l, i);
18866
- (s.conversationId || !a || s.forceNewConversation) && i && wp(n, i, c, o);
18867
+ const i = r?.projectId ?? "", n = s.identity.userId, o = s.conversationScope || void 0, a = s.forceNewConversation ? null : rc(n, i, o), l = r?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", c = s.conversationId ?? a ?? ic(l, i);
18868
+ (s.conversationId || !a || s.forceNewConversation) && i && kp(n, i, c, o);
18867
18869
  const u = await s.tokenProvider(), d = s.tokenProvider, p = s.historyTokenProvider ?? d, g = r ? {
18868
18870
  mqttEndpoint: r.mqttEndpoint,
18869
18871
  jwtToken: u,
@@ -18895,7 +18897,7 @@ async function xp(s) {
18895
18897
  endpoint: e.uploadEndpoint,
18896
18898
  fieldName: e.uploadFieldName,
18897
18899
  extraFields: e.uploadExtraFields
18898
- }) : void 0), b = s.historyAdapter ?? (e.historyApiBase ? Hd({
18900
+ }) : void 0), b = s.historyAdapter ?? (e.historyApiBase ? Wd({
18899
18901
  apiBase: e.historyApiBase,
18900
18902
  pageSize: e.historyPageSize ?? 200,
18901
18903
  pathTemplate: e.historyPathTemplate,
@@ -18951,17 +18953,17 @@ async function xp(s) {
18951
18953
  }
18952
18954
  };
18953
18955
  }
18954
- function _p(s) {
18956
+ function Sp(s) {
18955
18957
  if (typeof s != "string") return s;
18956
18958
  const e = document.querySelector(s);
18957
18959
  if (!e) throw new Error(`mountFromSlug: container "${s}" not found`);
18958
18960
  return e;
18959
18961
  }
18960
- async function Sp(s) {
18962
+ async function Ep(s) {
18961
18963
  const e = (s.configBase ?? "https://api.aikaara.com").replace(/\/$/, ""), t = `${e}/api/v1/widget_configs/${encodeURIComponent(s.slug)}`;
18962
18964
  let r = null;
18963
18965
  try {
18964
- r = await rc(t, s.configHeaders);
18966
+ r = await nc(t, s.configHeaders);
18965
18967
  } catch (I) {
18966
18968
  if (!s.fallbackConfig) throw I;
18967
18969
  console.warn(
@@ -18974,7 +18976,7 @@ async function Sp(s) {
18974
18976
  ...r ?? {},
18975
18977
  ...s.overrides ?? {}
18976
18978
  };
18977
- if (ic(i), i.templates && Object.keys(i.templates).length > 0) {
18979
+ if (sc(i), i.templates && Object.keys(i.templates).length > 0) {
18978
18980
  i.components = { ...i.components ?? {} };
18979
18981
  for (const [I, P] of Object.entries(i.templates)) {
18980
18982
  const O = `template:${I}`;
@@ -19008,7 +19010,7 @@ async function Sp(s) {
19008
19010
  let o = null, a = s.user.id, l = s.user.name, c = "", u = s.user.token, d = null;
19009
19011
  const p = await Yt(s.user.token).catch(() => ""), g = typeof p == "string" && p.length > 0;
19010
19012
  if (!g && i.sso?.tokenSource) {
19011
- d = new up({
19013
+ d = new dp({
19012
19014
  descriptor: {
19013
19015
  provider: i.sso.provider,
19014
19016
  flow: i.sso.flow,
@@ -19025,7 +19027,7 @@ async function Sp(s) {
19025
19027
  u = async () => (await d.get()).token, s.user.identity && !s.user.identity.partnerToken && (s.user.identity.partnerToken = I.token);
19026
19028
  } else if (!g && i.sso && i.sso.collect && i.sso.collect.length > 0) {
19027
19029
  const I = `${e}/api/v1/projects/by-slug/${encodeURIComponent(s.slug)}/sso_exchange`;
19028
- o = await new sp({
19030
+ o = await new op({
19029
19031
  descriptor: i.sso,
19030
19032
  providers: s.user.credentialProviders,
19031
19033
  exchangeUrl: I
@@ -19047,9 +19049,9 @@ async function Sp(s) {
19047
19049
  }
19048
19050
  I.captured.userId && (a = I.captured.userId), I.captured.requestId && (b = I.captured.requestId);
19049
19051
  }
19050
- const y = new Zf(i.auth, u);
19052
+ const y = new ep(i.auth, u);
19051
19053
  if (h) {
19052
- const I = i.tiledesk?.projectId ?? "", P = I ? tc(a, I) : null, O = i.tiledesk?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", j = P ?? (I ? nc(O, I) : "");
19054
+ const I = i.tiledesk?.projectId ?? "", P = I ? rc(a, I) : null, O = i.tiledesk?.requestIdTemplate ?? "support-group-{projectId}-{uuid}", j = P ?? (I ? ic(O, I) : "");
19053
19055
  y.prime(h, { requestId: j, fullName: l });
19054
19056
  }
19055
19057
  const w = await y.get();
@@ -19070,7 +19072,7 @@ async function Sp(s) {
19070
19072
  } catch (I) {
19071
19073
  return console.warn("[aikaara-chat-sdk] partner auto-refresh failed", I), null;
19072
19074
  }
19073
- } : null, _ = i.upload, v = async () => `Bearer ${_ && "tokenSource" in _ && _.tokenSource === "chat" ? (await y.get()).token : await Yt(s.user.token)}`, E = s.hooks?.upload ?? (_ && _.mode === "presigned-3step" ? Fd({
19075
+ } : null, _ = i.upload, v = async () => `Bearer ${_ && "tokenSource" in _ && _.tokenSource === "chat" ? (await y.get()).token : await Yt(s.user.token)}`, E = s.hooks?.upload ?? (_ && _.mode === "presigned-3step" ? qd({
19074
19076
  ..._,
19075
19077
  authHeader: v
19076
19078
  }) : _ && _.mode === "direct" ? zl({
@@ -19078,8 +19080,8 @@ async function Sp(s) {
19078
19080
  fieldName: _.fieldName,
19079
19081
  extraFields: _.extraFields,
19080
19082
  headers: async () => ({ authorization: await v() })
19081
- }) : void 0), S = await xp({
19082
- container: _p(s.container),
19083
+ }) : void 0), S = await _p({
19084
+ container: Sp(s.container),
19083
19085
  config: i,
19084
19086
  // SSO-issued Aikaara user token, used by the ActionCable transport.
19085
19087
  // Tiledesk-only widgets ignore this; falls back to `userId` inside `mount`.
@@ -19134,58 +19136,58 @@ async function Sp(s) {
19134
19136
  });
19135
19137
  }
19136
19138
  export {
19137
- kf as $,
19139
+ xf as $,
19138
19140
  Ds as A,
19139
- Sp as B,
19140
- sc as C,
19141
- xp as D,
19141
+ Ep as B,
19142
+ oc as C,
19143
+ _p as D,
19142
19144
  da as E,
19143
19145
  Wl as F,
19144
- Ap as G,
19145
- Jh as H,
19146
- Jf as I,
19147
- Gf as J,
19148
- xf as K,
19149
- Af as L,
19150
- bc as M,
19151
- _f as N,
19152
- wf as O,
19153
- bf as P,
19154
- Bf as Q,
19155
- Pf as R,
19156
- Zf as S,
19157
- Od as T,
19158
- Df as U,
19159
- Nf as V,
19160
- zf as W,
19161
- If as X,
19162
- yf as Y,
19163
- gf as Z,
19164
- hf as _,
19165
- Bh as a,
19166
- Dd as b,
19167
- qh as c,
19168
- nf as d,
19169
- Uh as e,
19170
- af as f,
19171
- tf as g,
19172
- Xh as h,
19173
- of as i,
19174
- sf as j,
19175
- gc as k,
19176
- mc as l,
19177
- yc as m,
19178
- sp as n,
19146
+ Ip as G,
19147
+ Qh as H,
19148
+ Qf as I,
19149
+ Yf as J,
19150
+ _f as K,
19151
+ If as L,
19152
+ yc as M,
19153
+ Sf as N,
19154
+ kf as O,
19155
+ yf as P,
19156
+ Ff as Q,
19157
+ Of as R,
19158
+ ep as S,
19159
+ Ld as T,
19160
+ $f as U,
19161
+ Rf as V,
19162
+ Vf as W,
19163
+ Tf as X,
19164
+ vf as Y,
19165
+ bf as Z,
19166
+ ff as _,
19167
+ Fh as a,
19168
+ $d as b,
19169
+ Hh as c,
19170
+ sf as d,
19171
+ Bh as e,
19172
+ lf as f,
19173
+ rf as g,
19174
+ Zh as h,
19175
+ af as i,
19176
+ of as j,
19177
+ bc as k,
19178
+ gc as l,
19179
+ vc as m,
19180
+ op as n,
19179
19181
  Ze as o,
19180
- up as p,
19181
- Ep as q,
19182
- Xf as r,
19183
- ep as s,
19182
+ dp as p,
19183
+ Ap as q,
19184
+ Zf as r,
19185
+ tp as s,
19184
19186
  zl as t,
19185
- Fd as u,
19186
- Hd as v,
19187
- cp as w,
19188
- Rd as x,
19189
- Nd as y,
19190
- Md as z
19187
+ qd as u,
19188
+ Wd as v,
19189
+ up as w,
19190
+ jd as x,
19191
+ Rd as y,
19192
+ Nd as z
19191
19193
  };