akpm-knowledge-base-chat 2.0.57 → 2.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CDN/akb-chat.js +84 -84
  2. package/package.json +1 -1
package/CDN/akb-chat.js CHANGED
@@ -1,4 +1,4 @@
1
- /* Version: 2.0.57 */
1
+ /* Version: 2.0.59 */
2
2
  var Mo = Object.defineProperty;
3
3
  var us = (t) => {
4
4
  throw TypeError(t);
@@ -59,7 +59,7 @@ function il(t) {
59
59
  return rl.includes(t);
60
60
  }
61
61
  const di = !1;
62
- var Nr = Array.isArray, sl = Array.prototype.indexOf, ji = Array.from, kr = Object.keys, yr = Object.defineProperty, xn = Object.getOwnPropertyDescriptor, ia = Object.getOwnPropertyDescriptors, al = Object.prototype, ol = Array.prototype, Fi = Object.getPrototypeOf;
62
+ var Nr = Array.isArray, sl = Array.prototype.indexOf, ji = Array.from, kr = Object.keys, yr = Object.defineProperty, _n = Object.getOwnPropertyDescriptor, ia = Object.getOwnPropertyDescriptors, al = Object.prototype, ol = Array.prototype, Fi = Object.getPrototypeOf;
63
63
  function ll(t) {
64
64
  return typeof t == "function";
65
65
  }
@@ -72,7 +72,7 @@ function zr(t) {
72
72
  for (var e = 0; e < t.length; e++)
73
73
  t[e]();
74
74
  }
75
- const $t = 2, sa = 4, ir = 8, Br = 16, Xt = 32, zn = 64, Sr = 128, Sn = 256, Cr = 512, pt = 1024, sn = 2048, Cn = 4096, Yt = 8192, Mn = 16384, aa = 32768, qr = 65536, ul = 1 << 17, dl = 1 << 19, oa = 1 << 20, rn = Symbol("$state"), la = Symbol("legacy props"), fl = Symbol("");
75
+ const $t = 2, sa = 4, ir = 8, Br = 16, Xt = 32, Sn = 64, Sr = 128, Cn = 256, Cr = 512, pt = 1024, sn = 2048, Tn = 4096, Yt = 8192, Mn = 16384, aa = 32768, qr = 65536, ul = 1 << 17, dl = 1 << 19, oa = 1 << 20, rn = Symbol("$state"), la = Symbol("legacy props"), fl = Symbol("");
76
76
  function ca(t) {
77
77
  return t === this.v;
78
78
  }
@@ -156,17 +156,17 @@ function v(t, e) {
156
156
  (Gt === null || !Gt.includes(t)) && kl(), fi(t, e);
157
157
  }
158
158
  function fi(t, e) {
159
- return t.equals(e) || (t.v, t.v = e, t.wv = $a(), fa(t, sn), Jr() && Ce !== null && Ce.f & pt && !(Ce.f & (Xt | zn)) && (Vt === null ? Ml([t]) : Vt.push(t))), e;
159
+ return t.equals(e) || (t.v, t.v = e, t.wv = $a(), fa(t, sn), Jr() && Ce !== null && Ce.f & pt && !(Ce.f & (Xt | Sn)) && (Vt === null ? Ml([t]) : Vt.push(t))), e;
160
160
  }
161
161
  function fa(t, e) {
162
162
  var n = t.reactions;
163
163
  if (n !== null)
164
164
  for (var r = Jr(), i = n.length, s = 0; s < i; s++) {
165
165
  var a = n[s], o = a.f;
166
- o & sn || !r && a === Ce || (Pt(a, e), o & (pt | Sn) && (o & $t ? fa(
166
+ o & sn || !r && a === Ce || (Pt(a, e), o & (pt | Cn) && (o & $t ? fa(
167
167
  /** @type {Derived} */
168
168
  a,
169
- Cn
169
+ Tn
170
170
  ) : Xr(
171
171
  /** @type {Effect} */
172
172
  a
@@ -260,7 +260,7 @@ function C(t, e = null, n) {
260
260
  if (c === rn)
261
261
  return t;
262
262
  var f = i.get(c), h = c in l;
263
- if (f === void 0 && (!h || (b = xn(l, c)) != null && b.writable) && (f = bt(C(h ? l[c] : mt, o)), i.set(c, f)), f !== void 0) {
263
+ if (f === void 0 && (!h || (b = _n(l, c)) != null && b.writable) && (f = bt(C(h ? l[c] : mt, o)), i.set(c, f)), f !== void 0) {
264
264
  var p = d(f);
265
265
  return p === mt ? void 0 : p;
266
266
  }
@@ -288,7 +288,7 @@ function C(t, e = null, n) {
288
288
  if (c === rn)
289
289
  return !0;
290
290
  var u = i.get(c), f = u !== void 0 && u.v !== mt || Reflect.has(l, c);
291
- if (u !== void 0 || Ce !== null && (!f || (p = xn(l, c)) != null && p.writable)) {
291
+ if (u !== void 0 || Ce !== null && (!f || (p = _n(l, c)) != null && p.writable)) {
292
292
  u === void 0 && (u = bt(f ? C(l[c], o) : mt), i.set(c, u));
293
293
  var h = d(u);
294
294
  if (h === mt)
@@ -305,7 +305,7 @@ function C(t, e = null, n) {
305
305
  var w = i.get(b + "");
306
306
  w !== void 0 ? v(w, mt) : b in l && (w = bt(mt), i.set(b + "", w));
307
307
  }
308
- h === void 0 ? (!p || (T = xn(l, c)) != null && T.writable) && (h = bt(void 0), v(h, C(u, o)), i.set(c, h)) : (p = h.v !== mt, v(h, C(u, o)));
308
+ h === void 0 ? (!p || (T = _n(l, c)) != null && T.writable) && (h = bt(void 0), v(h, C(u, o)), i.set(c, h)) : (p = h.v !== mt, v(h, C(u, o)));
309
309
  var R = Reflect.getOwnPropertyDescriptor(l, c);
310
310
  if (R != null && R.set && R.set.call(f, u), !p) {
311
311
  if (s && typeof c == "string") {
@@ -349,7 +349,7 @@ function pi() {
349
349
  if (ps === void 0) {
350
350
  ps = window;
351
351
  var t = Element.prototype, e = Node.prototype;
352
- ha = xn(e, "firstChild").get, pa = xn(e, "nextSibling").get, t.__click = void 0, t.__className = "", t.__attributes = null, t.__styles = null, t.__e = void 0, Text.prototype.__t = void 0;
352
+ ha = _n(e, "firstChild").get, pa = _n(e, "nextSibling").get, t.__click = void 0, t.__className = "", t.__attributes = null, t.__styles = null, t.__e = void 0, Text.prototype.__t = void 0;
353
353
  }
354
354
  }
355
355
  function hn(t = "") {
@@ -412,7 +412,7 @@ function Pi(t) {
412
412
  // @__NO_SIDE_EFFECTS__
413
413
  function Ke(t) {
414
414
  var e = $t | sn;
415
- Ce === null ? e |= Sn : Ce.f |= oa;
415
+ Ce === null ? e |= Cn : Ce.f |= oa;
416
416
  var n = Be !== null && Be.f & $t ? (
417
417
  /** @type {Derived} */
418
418
  Be
@@ -478,21 +478,21 @@ function ma(t) {
478
478
  return e;
479
479
  }
480
480
  function ba(t) {
481
- var e = ma(t), n = (wn || t.f & Sn) && t.deps !== null ? Cn : pt;
481
+ var e = ma(t), n = (xn || t.f & Cn) && t.deps !== null ? Tn : pt;
482
482
  Pt(t, n), t.equals(e) || (t.v = e, t.wv = $a());
483
483
  }
484
484
  function Mi(t) {
485
485
  ga(t), tr(t, 0), Pt(t, Mn), t.v = t.children = t.deps = t.ctx = t.reactions = null;
486
486
  }
487
487
  function wa(t) {
488
- Ce === null && Be === null && vl(), Be !== null && Be.f & Sn && pl(), Ni && hl();
488
+ Ce === null && Be === null && vl(), Be !== null && Be.f & Cn && pl(), Ni && hl();
489
489
  }
490
490
  function Tl(t, e) {
491
491
  var n = e.last;
492
492
  n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
493
493
  }
494
- function Tn(t, e, n, r = !0) {
495
- var i = (t & zn) !== 0, s = Ce, a = {
494
+ function En(t, e, n, r = !0) {
495
+ var i = (t & Sn) !== 0, s = Ce, a = {
496
496
  ctx: De,
497
497
  deps: null,
498
498
  deriveds: null,
@@ -530,7 +530,7 @@ function Tn(t, e, n, r = !0) {
530
530
  return a;
531
531
  }
532
532
  function El(t) {
533
- const e = Tn(ir, null, !1);
533
+ const e = En(ir, null, !1);
534
534
  return Pt(e, pt), e.teardown = t, e;
535
535
  }
536
536
  function st(t) {
@@ -555,13 +555,13 @@ function Il(t) {
555
555
  return wa(), or(t);
556
556
  }
557
557
  function $l(t) {
558
- const e = Tn(zn, t, !0);
558
+ const e = En(Sn, t, !0);
559
559
  return () => {
560
560
  Jt(e);
561
561
  };
562
562
  }
563
563
  function Al(t) {
564
- const e = Tn(zn, t, !0);
564
+ const e = En(Sn, t, !0);
565
565
  return (n = {}) => new Promise((r) => {
566
566
  n.outro ? Tr(e, () => {
567
567
  Jt(e), r(void 0);
@@ -569,7 +569,7 @@ function Al(t) {
569
569
  });
570
570
  }
571
571
  function Un(t) {
572
- return Tn(sa, t, !1);
572
+ return En(sa, t, !1);
573
573
  }
574
574
  function sr(t, e) {
575
575
  var n = (
@@ -589,24 +589,24 @@ function ar() {
589
589
  if (d(t.l.r2)) {
590
590
  for (var e of t.l.r1) {
591
591
  var n = e.effect;
592
- n.f & pt && Pt(n, Cn), Bn(n) && Zr(n), e.ran = !1;
592
+ n.f & pt && Pt(n, Tn), Bn(n) && Zr(n), e.ran = !1;
593
593
  }
594
594
  t.l.r2.v = !1;
595
595
  }
596
596
  });
597
597
  }
598
598
  function or(t) {
599
- return Tn(ir, t, !0);
599
+ return En(ir, t, !0);
600
600
  }
601
601
  function P(t, e = [], n = Ke) {
602
602
  const r = e.map(n);
603
603
  return Gr(() => t(...r.map(d)));
604
604
  }
605
605
  function Gr(t, e = 0) {
606
- return Tn(ir | Br | e, t, !0);
606
+ return En(ir | Br | e, t, !0);
607
607
  }
608
608
  function Dn(t, e = !0) {
609
- return Tn(ir | Xt, t, !0, e);
609
+ return En(ir | Xt, t, !0, e);
610
610
  }
611
611
  function xa(t) {
612
612
  var e = t.teardown;
@@ -739,7 +739,7 @@ function vs(t) {
739
739
  function gs(t) {
740
740
  Ni = t;
741
741
  }
742
- let bn = [], jn = 0;
742
+ let wn = [], jn = 0;
743
743
  let Be = null, fn = !1;
744
744
  function Wt(t) {
745
745
  Be = t;
@@ -756,7 +756,7 @@ let wt = null, Tt = 0, Vt = null;
756
756
  function Ml(t) {
757
757
  Vt = t;
758
758
  }
759
- let Ia = 1, Ar = 0, wn = !1, De = null;
759
+ let Ia = 1, Ar = 0, xn = !1, De = null;
760
760
  function $a() {
761
761
  return ++Ia;
762
762
  }
@@ -768,10 +768,10 @@ function Bn(t) {
768
768
  var e = t.f;
769
769
  if (e & sn)
770
770
  return !0;
771
- if (e & Cn) {
772
- var n = t.deps, r = (e & Sn) !== 0;
771
+ if (e & Tn) {
772
+ var n = t.deps, r = (e & Cn) !== 0;
773
773
  if (n !== null) {
774
- var i, s, a = (e & Cr) !== 0, o = r && Ce !== null && !wn, l = n.length;
774
+ var i, s, a = (e & Cr) !== 0, o = r && Ce !== null && !xn, l = n.length;
775
775
  if (a || o) {
776
776
  for (i = 0; i < l; i++)
777
777
  s = n[i], (a || !((c = s == null ? void 0 : s.reactions) != null && c.includes(t))) && (s.reactions ?? (s.reactions = [])).push(t);
@@ -787,7 +787,7 @@ function Bn(t) {
787
787
  ), s.wv > t.wv)
788
788
  return !0;
789
789
  }
790
- (!r || Ce !== null && !wn) && Pt(t, pt);
790
+ (!r || Ce !== null && !xn) && Pt(t, pt);
791
791
  }
792
792
  return !1;
793
793
  }
@@ -829,7 +829,7 @@ function Aa(t, e, n = 0) {
829
829
  s,
830
830
  e,
831
831
  n + 1
832
- ) : e === s && (n === 0 ? Pt(s, sn) : s.f & pt && Pt(s, Cn), Xr(
832
+ ) : e === s && (n === 0 ? Pt(s, sn) : s.f & pt && Pt(s, Tn), Xr(
833
833
  /** @type {Effect} */
834
834
  s
835
835
  ));
@@ -837,9 +837,9 @@ function Aa(t, e, n = 0) {
837
837
  }
838
838
  function La(t) {
839
839
  var p;
840
- var e = wt, n = Tt, r = Vt, i = Be, s = wn, a = Gt, o = De, l = fn, c = t.f;
840
+ var e = wt, n = Tt, r = Vt, i = Be, s = xn, a = Gt, o = De, l = fn, c = t.f;
841
841
  wt = /** @type {null | Value[]} */
842
- null, Tt = 0, Vt = null, Be = c & (Xt | zn) ? null : t, wn = !Rn && (c & Sn) !== 0, Gt = null, De = t.ctx, fn = !1, Ar++;
842
+ null, Tt = 0, Vt = null, Be = c & (Xt | Sn) ? null : t, xn = !Rn && (c & Cn) !== 0, Gt = null, De = t.ctx, fn = !1, Ar++;
843
843
  try {
844
844
  var u = (
845
845
  /** @type {Function} */
@@ -852,11 +852,11 @@ function La(t) {
852
852
  f[Tt + h] = wt[h];
853
853
  else
854
854
  t.deps = f = wt;
855
- if (!wn)
855
+ if (!xn)
856
856
  for (h = Tt; h < f.length; h++)
857
857
  ((p = f[h]).reactions ?? (p.reactions = [])).push(t);
858
858
  } else f !== null && Tt < f.length && (tr(t, Tt), f.length = Tt);
859
- if (Jr() && Vt !== null && !(t.f & ($t | Cn | sn)))
859
+ if (Jr() && Vt !== null && !(t.f & ($t | Tn | sn)))
860
860
  for (h = 0; h < /** @type {Source[]} */
861
861
  Vt.length; h++)
862
862
  Aa(
@@ -866,7 +866,7 @@ function La(t) {
866
866
  );
867
867
  return i !== null && Ar++, u;
868
868
  } finally {
869
- wt = e, Tt = n, Vt = r, Be = i, wn = s, Gt = a, De = o, fn = l;
869
+ wt = e, Tt = n, Vt = r, Be = i, xn = s, Gt = a, De = o, fn = l;
870
870
  }
871
871
  }
872
872
  function Nl(t, e) {
@@ -881,7 +881,7 @@ function Nl(t, e) {
881
881
  n === null && e.f & $t && // Destroying a child effect while updating a parent effect can cause a dependency to appear
882
882
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
883
883
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
884
- (wt === null || !wt.includes(e)) && (Pt(e, Cn), e.f & (Sn | Cr) || (e.f ^= Cr), tr(
884
+ (wt === null || !wt.includes(e)) && (Pt(e, Tn), e.f & (Cn | Cr) || (e.f ^= Cr), tr(
885
885
  /** @type {Derived} **/
886
886
  e,
887
887
  0
@@ -960,20 +960,20 @@ function Bl(t) {
960
960
  function ql() {
961
961
  if (Kn = !1, jn > 1001)
962
962
  return;
963
- const t = bn;
964
- bn = [], ja(t), Kn || (jn = 0, er = null);
963
+ const t = wn;
964
+ wn = [], ja(t), Kn || (jn = 0, er = null);
965
965
  }
966
966
  function Xr(t) {
967
967
  mr === Ea && (Kn || (Kn = !0, queueMicrotask(ql))), er = t;
968
968
  for (var e = t; e.parent !== null; ) {
969
969
  e = e.parent;
970
970
  var n = e.f;
971
- if (n & (zn | Xt)) {
971
+ if (n & (Sn | Xt)) {
972
972
  if (!(n & pt)) return;
973
973
  e.f ^= pt;
974
974
  }
975
975
  }
976
- bn.push(e);
976
+ wn.push(e);
977
977
  }
978
978
  function Fa(t, e) {
979
979
  var n = t.first, r = [];
@@ -1014,18 +1014,18 @@ function Fa(t, e) {
1014
1014
  l = r[u], e.push(l), Fa(l, e);
1015
1015
  }
1016
1016
  function g(t) {
1017
- var e = mr, n = bn;
1017
+ var e = mr, n = wn;
1018
1018
  try {
1019
1019
  Ra();
1020
1020
  const i = [];
1021
- mr = Dl, bn = i, Kn = !1, ja(n);
1021
+ mr = Dl, wn = i, Kn = !1, ja(n);
1022
1022
  var r = t == null ? void 0 : t();
1023
- return Fl(), (bn.length > 0 || i.length > 0) && g(), jn = 0, er = null, r;
1023
+ return Fl(), (wn.length > 0 || i.length > 0) && g(), jn = 0, er = null, r;
1024
1024
  } finally {
1025
- mr = e, bn = n;
1025
+ mr = e, wn = n;
1026
1026
  }
1027
1027
  }
1028
- async function In() {
1028
+ async function bn() {
1029
1029
  await Promise.resolve(), g();
1030
1030
  }
1031
1031
  function d(t) {
@@ -2361,7 +2361,7 @@ function bc(t, e) {
2361
2361
  return new Proxy({ props: t, exclude: e, special: {}, version: bt(0) }, mc);
2362
2362
  }
2363
2363
  function zs(t) {
2364
- for (var e = Ce, n = Ce; e !== null && !(e.f & (Xt | zn)); )
2364
+ for (var e = Ce, n = Ce; e !== null && !(e.f & (Xt | Sn)); )
2365
2365
  e = e.parent;
2366
2366
  try {
2367
2367
  return Dt(e), t();
@@ -2377,7 +2377,7 @@ function m(t, e, n, r) {
2377
2377
  t[e]
2378
2378
  )) : c = /** @type {V} */
2379
2379
  t[e];
2380
- var u = rn in t || la in t, f = a && (((E = xn(t, e)) == null ? void 0 : E.set) ?? (u && e in t && ((M) => t[e] = M))) || void 0, h = (
2380
+ var u = rn in t || la in t, f = a && (((E = _n(t, e)) == null ? void 0 : E.set) ?? (u && e in t && ((M) => t[e] = M))) || void 0, h = (
2381
2381
  /** @type {V} */
2382
2382
  r
2383
2383
  ), p = !0, b = !1, w = () => (b = !0, p && (p = !1, o ? h = Zt(
@@ -2706,7 +2706,7 @@ function we(t, e, n, r, i, s) {
2706
2706
  l = wr(o, l, e), this.$$d[o] = l;
2707
2707
  var c = this.$$c;
2708
2708
  if (c) {
2709
- var u = (f = xn(c, o)) == null ? void 0 : f.get;
2709
+ var u = (f = _n(c, o)) == null ? void 0 : f.get;
2710
2710
  u ? c[o] = l : c.$set({ [o]: l });
2711
2711
  }
2712
2712
  }
@@ -2876,7 +2876,7 @@ class Qr {
2876
2876
  return new Qr(e.filename, e.external_id, e.path || "", e.gendoc_id, e.isCommon, e.commonType);
2877
2877
  }
2878
2878
  }
2879
- class _n {
2879
+ class kn {
2880
2880
  constructor(e, n, r, i = "New chat", s = { blockChat: !1, unread: !1, lockedAgentId: null, pendingAction: null, info: [] }, a = [], o = 0) {
2881
2881
  $(this, "_id");
2882
2882
  $(this, "companyId");
@@ -2900,7 +2900,7 @@ class _n {
2900
2900
  }
2901
2901
  static fromJson(e) {
2902
2902
  var n;
2903
- return new _n(e._id, e.companyId, e.userId, e.title, e.state ?? { blockChat: !1, unread: !1, lockedAgentId: null, pendingAction: null, info: [] }, ((n = e.messages) == null ? void 0 : n.map((r) => un.fromJson(r))) ?? [], e.lastUpdate ?? 0);
2903
+ return new kn(e._id, e.companyId, e.userId, e.title, e.state ?? { blockChat: !1, unread: !1, lockedAgentId: null, pendingAction: null, info: [] }, ((n = e.messages) == null ? void 0 : n.map((r) => un.fromJson(r))) ?? [], e.lastUpdate ?? 0);
2904
2904
  }
2905
2905
  }
2906
2906
  const Cc = {}, Tc = "it", ki = (
@@ -4114,7 +4114,7 @@ class vn {
4114
4114
  return e.map((n) => vn.fromJson(n));
4115
4115
  }
4116
4116
  }
4117
- class kn {
4117
+ class yn {
4118
4118
  constructor(e, n, r, i, s, a, o, l = 0, c = !1, u = 40, f = !1, h = "") {
4119
4119
  $(this, "_id", "");
4120
4120
  $(this, "path", "");
@@ -4135,7 +4135,7 @@ class kn {
4135
4135
  this._id = e, this.path = n, this.name = r, this.userId = i, this.companyId = s, this.isPrivate = a, this.isTemplate = o, this.suiteId = l, this.createdAt = Date.now(), this.updatedAt = Date.now(), this.excludeFromDocumentale = c, this.minLevel = u, this.cancellato = f, this.altTitle = h;
4136
4136
  }
4137
4137
  static fromJSON(e) {
4138
- return new kn(
4138
+ return new yn(
4139
4139
  e._id,
4140
4140
  e.path,
4141
4141
  e.name,
@@ -4441,7 +4441,7 @@ const qf = async (t) => {
4441
4441
  });
4442
4442
  if (!e.ok)
4443
4443
  throw new Error("Failed to fetch gendoc");
4444
- return (await e.json()).map((r) => kn.fromJSON(r));
4444
+ return (await e.json()).map((r) => yn.fromJSON(r));
4445
4445
  }, Qf = async (t) => {
4446
4446
  const e = await fetch(`${N.getTranscriptionUrl()}/v1/generals/meetings`, {
4447
4447
  method: "POST",
@@ -6883,7 +6883,7 @@ const pr = (t, e) => `${t}-${e}`, ao = (t) => t.isCommon ? t.filename.split(".")
6883
6883
  class: e.icon,
6884
6884
  color: e.color
6885
6885
  };
6886
- if (t instanceof kn)
6886
+ if (t instanceof yn)
6887
6887
  return { class: "fa-solid fa-passport", color: "#0DCAF0" };
6888
6888
  if (t instanceof gn)
6889
6889
  return { class: "fa-solid fa-video", color: "#1d1dff" };
@@ -6901,7 +6901,7 @@ const pr = (t, e) => `${t}-${e}`, ao = (t) => t.isCommon ? t.filename.split(".")
6901
6901
  }, Wp = (t) => {
6902
6902
  if (t instanceof vn)
6903
6903
  return t.title.split(".")[0];
6904
- if (t instanceof kn || t instanceof gn)
6904
+ if (t instanceof yn || t instanceof gn)
6905
6905
  return t.name;
6906
6906
  if (t instanceof pn) {
6907
6907
  const e = t;
@@ -6955,7 +6955,7 @@ function co(t, e) {
6955
6955
  gendoc_id: "",
6956
6956
  isCommon: !0
6957
6957
  };
6958
- if (Z instanceof kn)
6958
+ if (Z instanceof yn)
6959
6959
  return {
6960
6960
  title: Z.name + ".akd",
6961
6961
  ext_id: Z._id,
@@ -6973,7 +6973,7 @@ function co(t, e) {
6973
6973
  }, T = (Z) => {
6974
6974
  if (R(Z))
6975
6975
  return;
6976
- const Ge = Z instanceof kn || Z instanceof gn ? s.gendoc : s.default;
6976
+ const Ge = Z instanceof yn || Z instanceof gn ? s.gendoc : s.default;
6977
6977
  x(Ge) && n(n()[Z._id] = k(Z), !0);
6978
6978
  }, F = async (Z, Ge, tt, Je) => {
6979
6979
  if (Z.length < a) {
@@ -7291,7 +7291,7 @@ const Dr = (t) => {
7291
7291
  if (!e.ok)
7292
7292
  throw new Error("Failed to fetch chat");
7293
7293
  const n = await e.json();
7294
- return _n.fromJson(n);
7294
+ return kn.fromJson(n);
7295
7295
  }, vv = async (t = 0, e = 10) => {
7296
7296
  const n = await fetch(`${N.getUrl()}/chat?skip=${t}&limit=${e}`, {
7297
7297
  headers: {
@@ -7302,7 +7302,7 @@ const Dr = (t) => {
7302
7302
  });
7303
7303
  if (!n.ok)
7304
7304
  throw new Error("Failed to fetch chats");
7305
- return (await n.json()).map((i) => _n.fromJson(i));
7305
+ return (await n.json()).map((i) => kn.fromJson(i));
7306
7306
  }, gv = async (t) => {
7307
7307
  const e = await fetch(`${N.getUrl()}/chat`, {
7308
7308
  method: "POST",
@@ -7317,7 +7317,7 @@ const Dr = (t) => {
7317
7317
  if (!e.ok)
7318
7318
  throw new Error("Failed to create chat");
7319
7319
  const n = await e.json();
7320
- return _n.fromJson(n);
7320
+ return kn.fromJson(n);
7321
7321
  }, mv = async (t, e, n, r, i, s, a, o) => {
7322
7322
  let l, c = !1;
7323
7323
  try {
@@ -9335,9 +9335,9 @@ function es() {
9335
9335
  walkTokens: null
9336
9336
  };
9337
9337
  }
9338
- let En = es();
9338
+ let In = es();
9339
9339
  function zo(t) {
9340
- En = t;
9340
+ In = t;
9341
9341
  }
9342
9342
  const Vn = { exec: () => null };
9343
9343
  function je(t, e = "") {
@@ -9591,7 +9591,7 @@ class Or {
9591
9591
  $(this, "rules");
9592
9592
  // set by the lexer
9593
9593
  $(this, "lexer");
9594
- this.options = e || En;
9594
+ this.options = e || In;
9595
9595
  }
9596
9596
  space(e) {
9597
9597
  const n = this.rules.block.newline.exec(e);
@@ -10075,7 +10075,7 @@ class Rt {
10075
10075
  $(this, "state");
10076
10076
  $(this, "tokenizer");
10077
10077
  $(this, "inlineQueue");
10078
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || En, this.options.tokenizer = this.options.tokenizer || new Or(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
10078
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || In, this.options.tokenizer = this.options.tokenizer || new Or(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
10079
10079
  inLink: !1,
10080
10080
  inRawBlock: !1,
10081
10081
  top: !0
@@ -10318,7 +10318,7 @@ class Ur {
10318
10318
  constructor(e) {
10319
10319
  $(this, "options");
10320
10320
  $(this, "parser");
10321
- this.options = e || En;
10321
+ this.options = e || In;
10322
10322
  }
10323
10323
  space(e) {
10324
10324
  return "";
@@ -10483,7 +10483,7 @@ class jt {
10483
10483
  $(this, "options");
10484
10484
  $(this, "renderer");
10485
10485
  $(this, "textRenderer");
10486
- this.options = e || En, this.options.renderer = this.options.renderer || new Ur(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ls();
10486
+ this.options = e || In, this.options.renderer = this.options.renderer || new Ur(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ls();
10487
10487
  }
10488
10488
  /**
10489
10489
  * Static Parse Method
@@ -10645,7 +10645,7 @@ class Qn {
10645
10645
  constructor(e) {
10646
10646
  $(this, "options");
10647
10647
  $(this, "block");
10648
- this.options = e || En;
10648
+ this.options = e || In;
10649
10649
  }
10650
10650
  /**
10651
10651
  * Process markdown before marked
@@ -10856,22 +10856,22 @@ Please report this to https://github.com/markedjs/marked.`, e) {
10856
10856
  };
10857
10857
  }
10858
10858
  }
10859
- const yn = new Am();
10859
+ const zn = new Am();
10860
10860
  function $e(t, e) {
10861
- return yn.parse(t, e);
10861
+ return zn.parse(t, e);
10862
10862
  }
10863
10863
  $e.options = $e.setOptions = function(t) {
10864
- return yn.setOptions(t), $e.defaults = yn.defaults, zo($e.defaults), $e;
10864
+ return zn.setOptions(t), $e.defaults = zn.defaults, zo($e.defaults), $e;
10865
10865
  };
10866
10866
  $e.getDefaults = es;
10867
- $e.defaults = En;
10867
+ $e.defaults = In;
10868
10868
  $e.use = function(...t) {
10869
- return yn.use(...t), $e.defaults = yn.defaults, zo($e.defaults), $e;
10869
+ return zn.use(...t), $e.defaults = zn.defaults, zo($e.defaults), $e;
10870
10870
  };
10871
10871
  $e.walkTokens = function(t, e) {
10872
- return yn.walkTokens(t, e);
10872
+ return zn.walkTokens(t, e);
10873
10873
  };
10874
- $e.parseInline = yn.parseInline;
10874
+ $e.parseInline = zn.parseInline;
10875
10875
  $e.Parser = jt;
10876
10876
  $e.parser = jt.parse;
10877
10877
  $e.Renderer = Ur;
@@ -11101,11 +11101,11 @@ function Fo(t, e) {
11101
11101
  ve(e, !0), _e(t, u0);
11102
11102
  let n = m(e, "messages", 15), r = m(e, "loading", 15), i = m(e, "error", 15), s = m(e, "streamMessage", 15), a = m(e, "streamAttachments", 15), o = m(e, "streamedAgent", 15), l = m(e, "languageSelected", 15), c = m(e, "userLevel", 15), u = m(e, "loadingChat", 15), f = m(e, "onQuickReply", 7), h = X(void 0), p = X(C(new Audio())), b = X(!1), w = X(C({})), R = X(C({})), x = X(C({})), k = X(null), T = X(C(n())), F = X(null), I = X(!0), j = X(!1), E = X(!1), M = X(C(u())), W = X(!1);
11103
11103
  const ke = async () => {
11104
- await In(), d(h) && (d(h).scrollTop = d(h).scrollHeight);
11104
+ await bn(), d(h) && (d(h).scrollTop = d(h).scrollHeight);
11105
11105
  }, Pe = async () => {
11106
- await In(), v(I, !1);
11106
+ await bn(), v(I, !1);
11107
11107
  }, V = async () => {
11108
- d(W) || (v(W, !0), await In(), v(j, !1));
11108
+ d(W) || (v(W, !0), await bn(), v(j, !1));
11109
11109
  }, K = () => {
11110
11110
  d(E) && v(j, !0);
11111
11111
  }, Te = () => {
@@ -11203,14 +11203,14 @@ function Fo(t, e) {
11203
11203
  const G = () => {
11204
11204
  Fe();
11205
11205
  };
11206
- return d(h).addEventListener("scroll", G), In().then(() => Fe()), () => {
11206
+ return d(h).addEventListener("scroll", G), bn().then(() => Fe()), () => {
11207
11207
  var ne;
11208
11208
  (ne = d(h)) == null || ne.removeEventListener("scroll", G);
11209
11209
  };
11210
11210
  }), st(() => {
11211
- d(T), In().then(() => Fe());
11211
+ d(T), bn().then(() => Fe());
11212
11212
  }), st(() => {
11213
- r(), s(), In().then(() => Fe());
11213
+ r(), s(), bn().then(() => Fe());
11214
11214
  });
11215
11215
  var et = c0(), Z = y(et);
11216
11216
  {
@@ -11874,7 +11874,7 @@ we(
11874
11874
  const C0 = (t, e, n, r, i) => {
11875
11875
  v(e, "auto"), n(), r(), v(i, C({}));
11876
11876
  };
11877
- var T0 = /* @__PURE__ */ A('<div class="drag-overlay svelte-1il33p9"><div class="drag-content svelte-1il33p9"><!> <p class="svelte-1il33p9"> </p></div></div>'), E0 = /* @__PURE__ */ A('<div class="upload-progress-overlay svelte-1il33p9"><div class="upload-progress-content svelte-1il33p9"><!> <p class="upload-filename svelte-1il33p9"> </p> <div class="progress-bar-container svelte-1il33p9"><div class="progress-bar svelte-1il33p9"></div></div> <p class="upload-percentage svelte-1il33p9"> </p></div></div>'), I0 = /* @__PURE__ */ A('<div class="loading-placeholder svelte-1il33p9"><!></div>'), $0 = /* @__PURE__ */ A('<!> <div class="resize-border-left svelte-1il33p9"></div> <div class="resize-border-top svelte-1il33p9"></div> <div class="resize-handle svelte-1il33p9"><!></div> <!> <!> <!>', 1), A0 = /* @__PURE__ */ A('<div class="chat svelte-1il33p9"><!> <!> <!></div>'), L0 = /* @__PURE__ */ A('<div class="external-div"><!> <button><i class="fa-solid fa-comment-nodes"></i><span class="d-none d-md-inline ps-2"> </span></button></div>');
11877
+ var T0 = /* @__PURE__ */ A('<div class="drag-overlay svelte-1il33p9"><div class="drag-content svelte-1il33p9"><!> <p class="svelte-1il33p9"> </p></div></div>'), E0 = /* @__PURE__ */ A('<div class="upload-progress-overlay svelte-1il33p9"><div class="upload-progress-content svelte-1il33p9"><!> <p class="upload-filename svelte-1il33p9"> </p> <div class="progress-bar-container svelte-1il33p9"><div class="progress-bar svelte-1il33p9"></div></div> <p class="upload-percentage svelte-1il33p9"> </p></div></div>'), I0 = /* @__PURE__ */ A('<div class="loading-placeholder svelte-1il33p9"><!></div>'), $0 = /* @__PURE__ */ A('<!> <div class="resize-border-left svelte-1il33p9"></div> <div class="resize-border-top svelte-1il33p9"></div> <div class="resize-handle svelte-1il33p9"><!></div> <!> <!> <!>', 1), A0 = /* @__PURE__ */ A('<div class="chat svelte-1il33p9"><!> <!> <!></div>'), L0 = /* @__PURE__ */ A('<div class="external-div"><!> <button id="open-chat-btn"><i class="fa-solid fa-comment-nodes"></i><span class="d-none d-md-inline ps-2"> </span></button></div>');
11878
11878
  const R0 = {
11879
11879
  hash: "svelte-1il33p9",
11880
11880
  code: `\r
@@ -12102,7 +12102,7 @@ function Po(t, e) {
12102
12102
  450
12103
12103
  )) : v(n, !1) : (v(n, !0), v(he, !0), await ze(!0), v(he, !1));
12104
12104
  }, ce = () => {
12105
- v(o, C(new _n(
12105
+ v(o, C(new kn(
12106
12106
  "",
12107
12107
  "",
12108
12108
  "",
@@ -12153,10 +12153,10 @@ function Po(t, e) {
12153
12153
  let B = new URLSearchParams(window.location.search);
12154
12154
  if (B.has("chatId")) {
12155
12155
  let q = B.get("chatId");
12156
- v(o, C(await dt.getChat(q))), v(c, C(d(o).messages)), v(n, !0);
12156
+ v(o, C(await dt.getChat(q))), v(c, C(d(o).messages)), v(n, !0), await bn(), v(r, !0);
12157
12157
  } else {
12158
12158
  const q = un.firstMessage(d(i), d(s), d(E));
12159
- v(c, C([q])), v(o, C(new _n(
12159
+ v(c, C([q])), v(o, C(new kn(
12160
12160
  "",
12161
12161
  "",
12162
12162
  "",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "akpm-knowledge-base-chat",
3
3
  "private": false,
4
- "version": "2.0.57",
4
+ "version": "2.0.59",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "CDN"