@n8n/chat 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/chat.bundle.es.js CHANGED
@@ -4,17 +4,17 @@ function ds(t, e) {
4
4
  n[r[s]] = !0;
5
5
  return e ? (s) => !!n[s.toLowerCase()] : (s) => !!n[s];
6
6
  }
7
- const ue = {}, Pt = [], Ue = () => {
7
+ const ue = {}, Bt = [], Ue = () => {
8
8
  }, vl = () => !1, xl = /^on[^a-z]/, or = (t) => xl.test(t), gs = (t) => t.startsWith("onUpdate:"), me = Object.assign, ms = (t, e) => {
9
9
  const n = t.indexOf(e);
10
10
  n > -1 && t.splice(n, 1);
11
- }, yl = Object.prototype.hasOwnProperty, se = (t, e) => yl.call(t, e), Z = Array.isArray, Bt = (t) => cr(t) === "[object Map]", qc = (t) => cr(t) === "[object Set]", ee = (t) => typeof t == "function", _e = (t) => typeof t == "string", _s = (t) => typeof t == "symbol", fe = (t) => t !== null && typeof t == "object", Mc = (t) => fe(t) && ee(t.then) && ee(t.catch), Nc = Object.prototype.toString, cr = (t) => Nc.call(t), kl = (t) => cr(t).slice(8, -1), Ic = (t) => cr(t) === "[object Object]", bs = (t) => _e(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, Hn = /* @__PURE__ */ ds(
11
+ }, yl = Object.prototype.hasOwnProperty, se = (t, e) => yl.call(t, e), Z = Array.isArray, $t = (t) => cr(t) === "[object Map]", qc = (t) => cr(t) === "[object Set]", ee = (t) => typeof t == "function", _e = (t) => typeof t == "string", _s = (t) => typeof t == "symbol", fe = (t) => t !== null && typeof t == "object", Mc = (t) => fe(t) && ee(t.then) && ee(t.catch), Nc = Object.prototype.toString, cr = (t) => Nc.call(t), kl = (t) => cr(t).slice(8, -1), Ic = (t) => cr(t) === "[object Object]", bs = (t) => _e(t) && t !== "NaN" && t[0] !== "-" && "" + parseInt(t, 10) === t, Hn = /* @__PURE__ */ ds(
12
12
  // the leading comma is intentional so empty string "" is also included
13
13
  ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
14
14
  ), ir = (t) => {
15
15
  const e = /* @__PURE__ */ Object.create(null);
16
16
  return (n) => e[n] || (e[n] = t(n));
17
- }, El = /-(\w)/g, Vt = ir((t) => t.replace(El, (e, n) => n ? n.toUpperCase() : "")), wl = /\B([A-Z])/g, qt = ir(
17
+ }, El = /-(\w)/g, Gt = ir((t) => t.replace(El, (e, n) => n ? n.toUpperCase() : "")), wl = /\B([A-Z])/g, Mt = ir(
18
18
  (t) => t.replace(wl, "-$1").toLowerCase()
19
19
  ), Fc = ir(
20
20
  (t) => t.charAt(0).toUpperCase() + t.slice(1)
@@ -83,7 +83,7 @@ const Rl = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,r
83
83
  function Lc(t) {
84
84
  return !!t || t === "";
85
85
  }
86
- const Zn = (t) => _e(t) ? t : t == null ? "" : Z(t) || fe(t) && (t.toString === Nc || !ee(t.toString)) ? JSON.stringify(t, Oc, 2) : String(t), Oc = (t, e) => e && e.__v_isRef ? Oc(t, e.value) : Bt(e) ? {
86
+ const Zn = (t) => _e(t) ? t : t == null ? "" : Z(t) || fe(t) && (t.toString === Nc || !ee(t.toString)) ? JSON.stringify(t, Oc, 2) : String(t), Oc = (t, e) => e && e.__v_isRef ? Oc(t, e.value) : $t(e) ? {
87
87
  [`Map(${e.size})`]: [...e.entries()].reduce((n, [r, s]) => (n[`${r} =>`] = s, n), {})
88
88
  } : qc(e) ? {
89
89
  [`Set(${e.size})`]: [...e.values()]
@@ -201,10 +201,10 @@ function eo(t) {
201
201
  }
202
202
  let lt = !0;
203
203
  const $c = [];
204
- function Jt() {
204
+ function Yt() {
205
205
  $c.push(lt), lt = !1;
206
206
  }
207
- function Yt() {
207
+ function Xt() {
208
208
  const t = $c.pop();
209
209
  lt = t === void 0 ? !0 : t;
210
210
  }
@@ -235,13 +235,13 @@ function tt(t, e, n, r, s, o) {
235
235
  } else
236
236
  switch (n !== void 0 && i.push(c.get(n)), e) {
237
237
  case "add":
238
- Z(t) ? bs(n) && i.push(c.get("length")) : (i.push(c.get(At)), Bt(t) && i.push(c.get(ts)));
238
+ Z(t) ? bs(n) && i.push(c.get("length")) : (i.push(c.get(At)), $t(t) && i.push(c.get(ts)));
239
239
  break;
240
240
  case "delete":
241
- Z(t) || (i.push(c.get(At)), Bt(t) && i.push(c.get(ts)));
241
+ Z(t) || (i.push(c.get(At)), $t(t) && i.push(c.get(ts)));
242
242
  break;
243
243
  case "set":
244
- Bt(t) && i.push(c.get(At));
244
+ $t(t) && i.push(c.get(At));
245
245
  break;
246
246
  }
247
247
  if (i.length === 1)
@@ -282,9 +282,9 @@ function Ul() {
282
282
  };
283
283
  }), ["push", "pop", "shift", "unshift", "splice"].forEach((e) => {
284
284
  t[e] = function(...n) {
285
- Jt();
285
+ Yt();
286
286
  const r = ce(this)[e].apply(this, n);
287
- return Yt(), r;
287
+ return Xt(), r;
288
288
  };
289
289
  }), t;
290
290
  }
@@ -317,9 +317,9 @@ const jl = /* @__PURE__ */ Hc(), Vl = /* @__PURE__ */ Hc(!0);
317
317
  function Hc(t = !1) {
318
318
  return function(n, r, s, o) {
319
319
  let c = n[r];
320
- if (Gt(c) && ye(c) && !ye(s))
320
+ if (Zt(c) && ye(c) && !ye(s))
321
321
  return !1;
322
- if (!t && (!Wn(s) && !Gt(s) && (c = ce(c), s = ce(s)), !Z(n) && ye(c) && !ye(s)))
322
+ if (!t && (!Wn(s) && !Zt(s) && (c = ce(c), s = ce(s)), !Z(n) && ye(c) && !ye(s)))
323
323
  return c.value = s, !0;
324
324
  const i = Z(n) && bs(r) ? Number(r) < n.length : se(n, r), l = Reflect.set(n, r, s, o);
325
325
  return n === ce(o) && (i ? bn(s, c) && tt(n, "set", r, s) : tt(n, "add", r, s)), l;
@@ -410,7 +410,7 @@ function Fn(t, e) {
410
410
  }
411
411
  function Ln(t, e, n) {
412
412
  return function(...r) {
413
- const s = this.__v_raw, o = ce(s), c = Bt(o), i = t === "entries" || t === Symbol.iterator && c, l = t === "keys" && c, a = s[t](...r), u = n ? Es : e ? Ss : vn;
413
+ const s = this.__v_raw, o = ce(s), c = $t(o), i = t === "entries" || t === Symbol.iterator && c, l = t === "keys" && c, a = s[t](...r), u = n ? Es : e ? Ss : vn;
414
414
  return !e && qe(
415
415
  o,
416
416
  "iterate",
@@ -558,7 +558,7 @@ function ia(t) {
558
558
  return t.__v_skip || !Object.isExtensible(t) ? 0 : ca(kl(t));
559
559
  }
560
560
  function Cs(t) {
561
- return Gt(t) ? t : As(
561
+ return Zt(t) ? t : As(
562
562
  t,
563
563
  !1,
564
564
  jc,
@@ -599,17 +599,17 @@ function As(t, e, n, r, s) {
599
599
  );
600
600
  return s.set(t, i), i;
601
601
  }
602
- function $t(t) {
603
- return Gt(t) ? $t(t.__v_raw) : !!(t && t.__v_isReactive);
602
+ function zt(t) {
603
+ return Zt(t) ? zt(t.__v_raw) : !!(t && t.__v_isReactive);
604
604
  }
605
- function Gt(t) {
605
+ function Zt(t) {
606
606
  return !!(t && t.__v_isReadonly);
607
607
  }
608
608
  function Wn(t) {
609
609
  return !!(t && t.__v_isShallow);
610
610
  }
611
611
  function Wc(t) {
612
- return $t(t) || Gt(t);
612
+ return zt(t) || Zt(t);
613
613
  }
614
614
  function ce(t) {
615
615
  const e = t && t.__v_raw;
@@ -630,7 +630,7 @@ function Xc(t, e) {
630
630
  function ye(t) {
631
631
  return !!(t && t.__v_isRef === !0);
632
632
  }
633
- function zt(t) {
633
+ function Ut(t) {
634
634
  return aa(t, !1);
635
635
  }
636
636
  function aa(t, e) {
@@ -644,22 +644,22 @@ class ua {
644
644
  return Yc(this), this._value;
645
645
  }
646
646
  set value(e) {
647
- const n = this.__v_isShallow || Wn(e) || Gt(e);
647
+ const n = this.__v_isShallow || Wn(e) || Zt(e);
648
648
  e = n ? e : ce(e), bn(e, this._rawValue) && (this._rawValue = e, this._value = n ? e : vn(e), Xc(this));
649
649
  }
650
650
  }
651
- function he(t) {
651
+ function ge(t) {
652
652
  return ye(t) ? t.value : t;
653
653
  }
654
654
  const fa = {
655
- get: (t, e, n) => he(Reflect.get(t, e, n)),
655
+ get: (t, e, n) => ge(Reflect.get(t, e, n)),
656
656
  set: (t, e, n, r) => {
657
657
  const s = t[e];
658
658
  return ye(s) && !ye(n) ? (s.value = n, !0) : Reflect.set(t, e, n, r);
659
659
  }
660
660
  };
661
661
  function Qc(t) {
662
- return $t(t) ? t : new Proxy(t, fa);
662
+ return zt(t) ? t : new Proxy(t, fa);
663
663
  }
664
664
  function pa(t) {
665
665
  const e = Z(t) ? new Array(t.length) : {};
@@ -763,11 +763,11 @@ function _a(t, e, n, r = !0) {
763
763
  let xn = !1, rs = !1;
764
764
  const ke = [];
765
765
  let Ke = 0;
766
- const Ut = [];
766
+ const Ht = [];
767
767
  let et = null, xt = 0;
768
768
  const ei = /* @__PURE__ */ Promise.resolve();
769
769
  let Ds = null;
770
- function Zt(t) {
770
+ function Kt(t) {
771
771
  const e = Ds || ei;
772
772
  return t ? e.then(this ? t.bind(this) : t) : e;
773
773
  }
@@ -793,10 +793,10 @@ function va(t) {
793
793
  e > Ke && ke.splice(e, 1);
794
794
  }
795
795
  function xa(t) {
796
- Z(t) ? Ut.push(...t) : (!et || !et.includes(
796
+ Z(t) ? Ht.push(...t) : (!et || !et.includes(
797
797
  t,
798
798
  t.allowRecurse ? xt + 1 : xt
799
- )) && Ut.push(t), ti();
799
+ )) && Ht.push(t), ti();
800
800
  }
801
801
  function io(t, e = xn ? Ke + 1 : 0) {
802
802
  for (; e < ke.length; e++) {
@@ -805,9 +805,9 @@ function io(t, e = xn ? Ke + 1 : 0) {
805
805
  }
806
806
  }
807
807
  function ni(t) {
808
- if (Ut.length) {
809
- const e = [...new Set(Ut)];
810
- if (Ut.length = 0, et) {
808
+ if (Ht.length) {
809
+ const e = [...new Set(Ht)];
810
+ if (Ht.length = 0, et) {
811
811
  et.push(...e);
812
812
  return;
813
813
  }
@@ -835,7 +835,7 @@ function ri(t) {
835
835
  n && n.active !== !1 && at(n, null, 14);
836
836
  }
837
837
  } finally {
838
- Ke = 0, ke.length = 0, ni(), xn = !1, Ds = null, (ke.length || Ut.length) && ri();
838
+ Ke = 0, ke.length = 0, ni(), xn = !1, Ds = null, (ke.length || Ht.length) && ri();
839
839
  }
840
840
  }
841
841
  function ka(t, e, ...n) {
@@ -849,8 +849,8 @@ function ka(t, e, ...n) {
849
849
  p && (s = n.map((d) => _e(d) ? d.trim() : d)), f && (s = n.map(Xr));
850
850
  }
851
851
  let i, l = r[i = Sr(e)] || // also try camelCase event handler (#2249)
852
- r[i = Sr(Vt(e))];
853
- !l && o && (l = r[i = Sr(qt(e))]), l && Fe(
852
+ r[i = Sr(Gt(e))];
853
+ !l && o && (l = r[i = Sr(Mt(e))]), l && Fe(
854
854
  l,
855
855
  t,
856
856
  6,
@@ -886,7 +886,7 @@ function si(t, e, n = !1) {
886
886
  return !o && !i ? (fe(t) && r.set(t, null), null) : (Z(o) ? o.forEach((l) => c[l] = null) : me(c, o), fe(t) && r.set(t, c), c);
887
887
  }
888
888
  function ur(t, e) {
889
- return !t || !or(e) ? !1 : (e = e.slice(2).replace(/Once$/, ""), se(t, e[0].toLowerCase() + e.slice(1)) || se(t, qt(e)) || se(t, e));
889
+ return !t || !or(e) ? !1 : (e = e.slice(2).replace(/Once$/, ""), se(t, e[0].toLowerCase() + e.slice(1)) || se(t, Mt(e)) || se(t, e));
890
890
  }
891
891
  let Ee = null, oi = null;
892
892
  function Jn(t) {
@@ -957,7 +957,7 @@ function Dr(t) {
957
957
  ), T = e.props ? l : Ea(l);
958
958
  }
959
959
  } catch (A) {
960
- gn.length = 0, ar(A, t, 1), I = de(Le);
960
+ gn.length = 0, ar(A, t, 1), I = he(Le);
961
961
  }
962
962
  let N = I;
963
963
  if (T && b !== !1) {
@@ -1028,10 +1028,10 @@ function ci(t, e, { immediate: n, deep: r, flush: s, onTrack: o, onTrigger: c }
1028
1028
  var i;
1029
1029
  const l = Il() === ((i = xe) == null ? void 0 : i.scope) ? xe : null;
1030
1030
  let a, u = !1, f = !1;
1031
- if (ye(t) ? (a = () => t.value, u = Wn(t)) : $t(t) ? (a = () => t, r = !0) : Z(t) ? (f = !0, u = t.some((A) => $t(A) || Wn(A)), a = () => t.map((A) => {
1031
+ if (ye(t) ? (a = () => t.value, u = Wn(t)) : zt(t) ? (a = () => t, r = !0) : Z(t) ? (f = !0, u = t.some((A) => zt(A) || Wn(A)), a = () => t.map((A) => {
1032
1032
  if (ye(A))
1033
1033
  return A.value;
1034
- if ($t(A))
1034
+ if (zt(A))
1035
1035
  return wt(A);
1036
1036
  if (ee(A))
1037
1037
  return at(A, l, 2);
@@ -1096,9 +1096,9 @@ function Ta(t, e, n) {
1096
1096
  let o;
1097
1097
  ee(e) ? o = e : (o = e.handler, n = e);
1098
1098
  const c = xe;
1099
- Kt(this);
1099
+ Wt(this);
1100
1100
  const i = ci(s, o.bind(r), n);
1101
- return c ? Kt(c) : St(), i;
1101
+ return c ? Wt(c) : St(), i;
1102
1102
  }
1103
1103
  function ii(t, e) {
1104
1104
  const n = e.split(".");
@@ -1117,7 +1117,7 @@ function wt(t, e) {
1117
1117
  else if (Z(t))
1118
1118
  for (let n = 0; n < t.length; n++)
1119
1119
  wt(t[n], e);
1120
- else if (qc(t) || Bt(t))
1120
+ else if (qc(t) || $t(t))
1121
1121
  t.forEach((n) => {
1122
1122
  wt(n, e);
1123
1123
  });
@@ -1153,12 +1153,12 @@ function gt(t, e, n, r) {
1153
1153
  const i = s[c];
1154
1154
  o && (i.oldValue = o[c].value);
1155
1155
  let l = i.dir[r];
1156
- l && (Jt(), Fe(l, n, 8, [
1156
+ l && (Yt(), Fe(l, n, 8, [
1157
1157
  t.el,
1158
1158
  i,
1159
1159
  t,
1160
1160
  e
1161
- ]), Yt());
1161
+ ]), Xt());
1162
1162
  }
1163
1163
  }
1164
1164
  function Ra() {
@@ -1409,9 +1409,9 @@ function pr(t, e, n = xe, r = !1) {
1409
1409
  const s = n[t] || (n[t] = []), o = e.__weh || (e.__weh = (...c) => {
1410
1410
  if (n.isUnmounted)
1411
1411
  return;
1412
- Jt(), Kt(n);
1412
+ Yt(), Wt(n);
1413
1413
  const i = Fe(e, n, t, c);
1414
- return St(), Yt(), i;
1414
+ return St(), Xt(), i;
1415
1415
  });
1416
1416
  return r ? s.unshift(o) : s.push(o), o;
1417
1417
  }
@@ -1459,7 +1459,7 @@ function uo(t, e, n, r) {
1459
1459
  }
1460
1460
  function hn(t, e, n = {}, r, s) {
1461
1461
  if (Ee.isCE || Ee.parent && pn(Ee.parent) && Ee.parent.isCE)
1462
- return e !== "default" && (n.name = e), de("slot", n, r && r());
1462
+ return e !== "default" && (n.name = e), he("slot", n, r && r());
1463
1463
  let o = t[e];
1464
1464
  o && o._c && (o._d = !1), oe();
1465
1465
  const c = o && di(o(n)), i = Se(
@@ -1493,7 +1493,7 @@ const cs = (t) => t ? Ci(t) ? gr(t) || t.proxy : cs(t.parent) : null, dn = (
1493
1493
  $emit: (t) => t.emit,
1494
1494
  $options: (t) => qs(t),
1495
1495
  $forceUpdate: (t) => t.f || (t.f = () => Ts(t.update)),
1496
- $nextTick: (t) => t.n || (t.n = Zt.bind(t.proxy)),
1496
+ $nextTick: (t) => t.n || (t.n = Kt.bind(t.proxy)),
1497
1497
  $watch: (t) => Ta.bind(t)
1498
1498
  })
1499
1499
  ), qr = (t, e) => t !== ue && !t.__isScriptSetup && se(t, e), ja = {
@@ -1614,7 +1614,7 @@ function Va(t) {
1614
1614
  }
1615
1615
  if (is = !0, o)
1616
1616
  for (const v in o) {
1617
- const S = o[v], G = ee(S) ? S.bind(n, n) : ee(S.get) ? S.get.bind(n, n) : Ue, te = !ee(S) && ee(S.set) ? S.set.bind(n) : Ue, ie = Xt({
1617
+ const S = o[v], G = ee(S) ? S.bind(n, n) : ee(S.get) ? S.get.bind(n, n) : Ue, te = !ee(S) && ee(S.set) ? S.set.bind(n) : Ue, ie = Tt({
1618
1618
  get: G,
1619
1619
  set: te
1620
1620
  });
@@ -1656,12 +1656,12 @@ function Ga(t, e, n = Ue) {
1656
1656
  for (const r in t) {
1657
1657
  const s = t[r];
1658
1658
  let o;
1659
- fe(s) ? "default" in s ? o = Ht(
1659
+ fe(s) ? "default" in s ? o = jt(
1660
1660
  s.from || r,
1661
1661
  s.default,
1662
1662
  !0
1663
1663
  /* treat default function as factory */
1664
- ) : o = Ht(s.from || r) : o = Ht(s), ye(o) ? Object.defineProperty(e, r, {
1664
+ ) : o = jt(s.from || r) : o = jt(s), ye(o) ? Object.defineProperty(e, r, {
1665
1665
  enumerable: !0,
1666
1666
  configurable: !0,
1667
1667
  get: () => o.value,
@@ -1842,7 +1842,7 @@ function Ya(t, e) {
1842
1842
  },
1843
1843
  mount(a, u, f) {
1844
1844
  if (!i) {
1845
- const p = de(
1845
+ const p = he(
1846
1846
  r,
1847
1847
  s
1848
1848
  );
@@ -1875,7 +1875,7 @@ function Xa(t, e) {
1875
1875
  r === n && (n = xe.provides = Object.create(r)), n[t] = e;
1876
1876
  }
1877
1877
  }
1878
- function Ht(t, e, n = !1) {
1878
+ function jt(t, e, n = !1) {
1879
1879
  const r = xe || Ee;
1880
1880
  if (r || Xn) {
1881
1881
  const s = r ? r.parent == null ? r.vnode.appContext && r.vnode.appContext.provides : r.parent.provides : Xn._context.provides;
@@ -1916,7 +1916,7 @@ function eu(t, e, n, r) {
1916
1916
  if (se(o, p))
1917
1917
  d !== o[p] && (o[p] = d, a = !0);
1918
1918
  else {
1919
- const k = Vt(p);
1919
+ const k = Gt(p);
1920
1920
  s[k] = as(
1921
1921
  l,
1922
1922
  i,
@@ -1938,7 +1938,7 @@ function eu(t, e, n, r) {
1938
1938
  (!e || // for camelCase
1939
1939
  !se(e, f) && // it's possible the original props was passed in as kebab-case
1940
1940
  // and converted to camelCase (#955)
1941
- ((u = qt(f)) === f || !se(e, u))) && (l ? n && // for camelCase
1941
+ ((u = Mt(f)) === f || !se(e, u))) && (l ? n && // for camelCase
1942
1942
  (n[f] !== void 0 || // for kebab-case
1943
1943
  n[u] !== void 0) && (s[f] = as(
1944
1944
  l,
@@ -1964,7 +1964,7 @@ function _i(t, e, n, r) {
1964
1964
  continue;
1965
1965
  const a = e[l];
1966
1966
  let u;
1967
- s && se(s, u = Vt(l)) ? !o || !o.includes(u) ? n[u] = a : (i || (i = {}))[u] = a : ur(t.emitsOptions, l) || (!(l in r) || a !== r[l]) && (r[l] = a, c = !0);
1967
+ s && se(s, u = Gt(l)) ? !o || !o.includes(u) ? n[u] = a : (i || (i = {}))[u] = a : ur(t.emitsOptions, l) || (!(l in r) || a !== r[l]) && (r[l] = a, c = !0);
1968
1968
  }
1969
1969
  if (o) {
1970
1970
  const l = ce(n), a = i || ue;
@@ -1990,7 +1990,7 @@ function as(t, e, n, r, s, o) {
1990
1990
  const l = c.default;
1991
1991
  if (c.type !== Function && !c.skipFactory && ee(l)) {
1992
1992
  const { propsDefaults: a } = s;
1993
- n in a ? r = a[n] : (Kt(s), r = a[n] = l.call(
1993
+ n in a ? r = a[n] : (Wt(s), r = a[n] = l.call(
1994
1994
  null,
1995
1995
  e
1996
1996
  ), St());
@@ -2003,7 +2003,7 @@ function as(t, e, n, r, s, o) {
2003
2003
  ] && (o && !i ? r = !1 : c[
2004
2004
  1
2005
2005
  /* shouldCastTrue */
2006
- ] && (r === "" || r === qt(n)) && (r = !0));
2006
+ ] && (r === "" || r === Mt(n)) && (r = !0));
2007
2007
  }
2008
2008
  return r;
2009
2009
  }
@@ -2022,15 +2022,15 @@ function bi(t, e, n = !1) {
2022
2022
  !n && e.mixins.length && e.mixins.forEach(u), t.extends && u(t.extends), t.mixins && t.mixins.forEach(u);
2023
2023
  }
2024
2024
  if (!o && !l)
2025
- return fe(t) && r.set(t, Pt), Pt;
2025
+ return fe(t) && r.set(t, Bt), Bt;
2026
2026
  if (Z(o))
2027
2027
  for (let u = 0; u < o.length; u++) {
2028
- const f = Vt(o[u]);
2028
+ const f = Gt(o[u]);
2029
2029
  mo(f) && (c[f] = ue);
2030
2030
  }
2031
2031
  else if (o)
2032
2032
  for (const u in o) {
2033
- const f = Vt(u);
2033
+ const f = Gt(u);
2034
2034
  if (mo(f)) {
2035
2035
  const p = o[u], d = c[f] = Z(p) || ee(p) ? { type: p } : me({}, p);
2036
2036
  if (d) {
@@ -2302,7 +2302,7 @@ function ou(t, e) {
2302
2302
  h.children,
2303
2303
  E,
2304
2304
  x,
2305
- ge
2305
+ de
2306
2306
  );
2307
2307
  "value" in P && o(F, "value", null, P.value), (y = P.onVnodeBeforeMount) && Ge(y, E, h);
2308
2308
  }
@@ -2393,7 +2393,7 @@ function ou(t, e) {
2393
2393
  h.children,
2394
2394
  _,
2395
2395
  E,
2396
- ge
2396
+ de
2397
2397
  );
2398
2398
  }
2399
2399
  }
@@ -2452,7 +2452,7 @@ function ou(t, e) {
2452
2452
  g.children,
2453
2453
  x,
2454
2454
  M,
2455
- ge
2455
+ de
2456
2456
  );
2457
2457
  for (const m in E) {
2458
2458
  if (Hn(m))
@@ -2467,7 +2467,7 @@ function ou(t, e) {
2467
2467
  g.children,
2468
2468
  x,
2469
2469
  M,
2470
- ge
2470
+ de
2471
2471
  );
2472
2472
  }
2473
2473
  "value" in E && o(h, "value", _.value, E.value);
@@ -2538,7 +2538,7 @@ function ou(t, e) {
2538
2538
  );
2539
2539
  if (fr(h) && (m.ctx.renderer = Qe), mu(m), m.asyncDep) {
2540
2540
  if (x && x.registerDep(m, V), !h.el) {
2541
- const F = m.subTree = de(Le);
2541
+ const F = m.subTree = he(Le);
2542
2542
  T(null, F, g, _);
2543
2543
  }
2544
2544
  return;
@@ -2633,7 +2633,7 @@ function ou(t, e) {
2633
2633
  }, v = (h, g, _) => {
2634
2634
  g.component = h;
2635
2635
  const E = h.vnode.props;
2636
- h.vnode = g, h.next = null, eu(h, g.props, E, _), ru(h, g.children, _), Jt(), io(), Yt();
2636
+ h.vnode = g, h.next = null, eu(h, g.props, E, _), ru(h, g.children, _), Yt(), io(), Xt();
2637
2637
  }, S = (h, g, _, E, x, M, O, m, F = !1) => {
2638
2638
  const y = h && h.children, L = h ? h.shapeFlag : 0, P = g.children, { patchFlag: U, shapeFlag: K } = g;
2639
2639
  if (U > 0) {
@@ -2665,7 +2665,7 @@ function ou(t, e) {
2665
2665
  return;
2666
2666
  }
2667
2667
  }
2668
- K & 8 ? (L & 16 && ge(y, x, M), P !== y && u(_, P)) : L & 16 ? K & 16 ? te(
2668
+ K & 8 ? (L & 16 && de(y, x, M), P !== y && u(_, P)) : L & 16 ? K & 16 ? te(
2669
2669
  y,
2670
2670
  P,
2671
2671
  _,
@@ -2675,7 +2675,7 @@ function ou(t, e) {
2675
2675
  O,
2676
2676
  m,
2677
2677
  F
2678
- ) : ge(y, x, M, !0) : (L & 8 && u(_, ""), K & 16 && $(
2678
+ ) : de(y, x, M, !0) : (L & 8 && u(_, ""), K & 16 && $(
2679
2679
  P,
2680
2680
  _,
2681
2681
  E,
@@ -2686,7 +2686,7 @@ function ou(t, e) {
2686
2686
  F
2687
2687
  ));
2688
2688
  }, G = (h, g, _, E, x, M, O, m, F) => {
2689
- h = h || Pt, g = g || Pt;
2689
+ h = h || Bt, g = g || Bt;
2690
2690
  const y = h.length, L = g.length, P = Math.min(y, L);
2691
2691
  let U;
2692
2692
  for (U = 0; U < P; U++) {
@@ -2703,7 +2703,7 @@ function ou(t, e) {
2703
2703
  F
2704
2704
  );
2705
2705
  }
2706
- y > L ? ge(
2706
+ y > L ? de(
2707
2707
  h,
2708
2708
  x,
2709
2709
  M,
@@ -2819,7 +2819,7 @@ function ou(t, e) {
2819
2819
  F
2820
2820
  ), H++);
2821
2821
  }
2822
- const qn = pe ? cu(dt) : Pt;
2822
+ const qn = pe ? cu(dt) : Bt;
2823
2823
  for (R = qn.length - 1, y = Y - 1; y >= 0; y--) {
2824
2824
  const Me = Q + y, Ve = g[Me], Xs = Me + 1 < L ? g[Me + 1].el : E;
2825
2825
  dt[y] === 0 ? b(
@@ -2905,13 +2905,13 @@ function ou(t, e) {
2905
2905
  Qe,
2906
2906
  E
2907
2907
  ) : y && // #1153: fast path should not be taken for non-stable (v-for) fragments
2908
- (M !== Re || P > 0 && P & 64) ? ge(
2908
+ (M !== Re || P > 0 && P & 64) ? de(
2909
2909
  y,
2910
2910
  g,
2911
2911
  _,
2912
2912
  !1,
2913
2913
  !0
2914
- ) : (M === Re && P & 384 || !x && L & 16) && ge(F, g, _), E && De(h);
2914
+ ) : (M === Re && P & 384 || !x && L & 16) && de(F, g, _), E && De(h);
2915
2915
  }
2916
2916
  (Q && (w = O && O.onVnodeUnmounted) || K) && Te(() => {
2917
2917
  w && Ge(w, g, h), K && gt(h, null, g, "unmounted");
@@ -2919,7 +2919,7 @@ function ou(t, e) {
2919
2919
  }, De = (h) => {
2920
2920
  const { type: g, el: _, anchor: E, transition: x } = h;
2921
2921
  if (g === Re) {
2922
- Nt(_, E);
2922
+ It(_, E);
2923
2923
  return;
2924
2924
  }
2925
2925
  if (g === Mr) {
@@ -2934,7 +2934,7 @@ function ou(t, e) {
2934
2934
  m ? m(h.el, M, F) : F();
2935
2935
  } else
2936
2936
  M();
2937
- }, Nt = (h, g) => {
2937
+ }, It = (h, g) => {
2938
2938
  let _;
2939
2939
  for (; h !== g; )
2940
2940
  _ = p(h), s(h), h = _;
@@ -2944,7 +2944,7 @@ function ou(t, e) {
2944
2944
  E && jn(E), x.stop(), M && (M.active = !1, ae(O, h, g, _)), m && Te(m, g), Te(() => {
2945
2945
  h.isUnmounted = !0;
2946
2946
  }, g), g && g.pendingBranch && !g.isUnmounted && h.asyncDep && !h.asyncResolved && h.suspenseId === g.pendingId && (g.deps--, g.deps === 0 && g.resolve());
2947
- }, ge = (h, g, _, E = !1, x = !1, M = 0) => {
2947
+ }, de = (h, g, _, E = !1, x = !1, M = 0) => {
2948
2948
  for (let O = M; O < h.length; O++)
2949
2949
  ae(h[O], g, _, E, x);
2950
2950
  }, ht = (h) => h.shapeFlag & 6 ? ht(h.component.subTree) : h.shapeFlag & 128 ? h.suspense.next() : p(h.anchor || h.el), nn = (h, g, _) => {
@@ -3015,7 +3015,7 @@ function xo(t) {
3015
3015
  kn += t;
3016
3016
  }
3017
3017
  function Ei(t) {
3018
- return t.dynamicChildren = kn > 0 ? ze || Pt : null, lu(), kn > 0 && ze && ze.push(t), t;
3018
+ return t.dynamicChildren = kn > 0 ? ze || Bt : null, lu(), kn > 0 && ze && ze.push(t), t;
3019
3019
  }
3020
3020
  function be(t, e, n, r, s, o) {
3021
3021
  return Ei(
@@ -3033,7 +3033,7 @@ function be(t, e, n, r, s, o) {
3033
3033
  }
3034
3034
  function Se(t, e, n, r, s) {
3035
3035
  return Ei(
3036
- de(
3036
+ he(
3037
3037
  t,
3038
3038
  e,
3039
3039
  n,
@@ -3094,7 +3094,7 @@ function we(t, e = null, n = null, r = 0, s = null, o = t === Re ? 0 : 1, c = !1
3094
3094
  // vnode should not be considered dynamic due to handler caching.
3095
3095
  l.patchFlag !== 32 && ze.push(l), l;
3096
3096
  }
3097
- const de = au;
3097
+ const he = au;
3098
3098
  function au(t, e = null, n = null, r = 0, s = null, o = !1) {
3099
3099
  if ((!t || t === Ha) && (t = Le), Qn(t)) {
3100
3100
  const i = pt(
@@ -3171,18 +3171,18 @@ function pt(t, e, n = !1) {
3171
3171
  };
3172
3172
  }
3173
3173
  function Ns(t = " ", e = 0) {
3174
- return de(hr, null, t, e);
3174
+ return he(hr, null, t, e);
3175
3175
  }
3176
3176
  function mn(t = "", e = !1) {
3177
- return e ? (oe(), Se(Le, null, t)) : de(Le, null, t);
3177
+ return e ? (oe(), Se(Le, null, t)) : he(Le, null, t);
3178
3178
  }
3179
3179
  function Ze(t) {
3180
- return t == null || typeof t == "boolean" ? de(Le) : Z(t) ? de(
3180
+ return t == null || typeof t == "boolean" ? he(Le) : Z(t) ? he(
3181
3181
  Re,
3182
3182
  null,
3183
3183
  // #3666, avoid reference pollution when reusing vnode
3184
3184
  t.slice()
3185
- ) : typeof t == "object" ? ct(t) : de(hr, null, String(t));
3185
+ ) : typeof t == "object" ? ct(t) : he(hr, null, String(t));
3186
3186
  }
3187
3187
  function ct(t) {
3188
3188
  return t.el === null && t.patchFlag !== -1 || t.memo ? t : pt(t);
@@ -3314,11 +3314,11 @@ function du(t, e, n) {
3314
3314
  }
3315
3315
  let xe = null;
3316
3316
  const gu = () => xe || Ee;
3317
- let Fs, It, yo = "__VUE_INSTANCE_SETTERS__";
3318
- (It = Qr()[yo]) || (It = Qr()[yo] = []), It.push((t) => xe = t), Fs = (t) => {
3319
- It.length > 1 ? It.forEach((e) => e(t)) : It[0](t);
3317
+ let Fs, Ft, yo = "__VUE_INSTANCE_SETTERS__";
3318
+ (Ft = Qr()[yo]) || (Ft = Qr()[yo] = []), Ft.push((t) => xe = t), Fs = (t) => {
3319
+ Ft.length > 1 ? Ft.forEach((e) => e(t)) : Ft[0](t);
3320
3320
  };
3321
- const Kt = (t) => {
3321
+ const Wt = (t) => {
3322
3322
  Fs(t), t.scope.on();
3323
3323
  }, St = () => {
3324
3324
  xe && xe.scope.off(), Fs(null);
@@ -3340,14 +3340,14 @@ function _u(t, e) {
3340
3340
  const { setup: r } = n;
3341
3341
  if (r) {
3342
3342
  const s = t.setupContext = r.length > 1 ? vu(t) : null;
3343
- Kt(t), Jt();
3343
+ Wt(t), Yt();
3344
3344
  const o = at(
3345
3345
  r,
3346
3346
  t,
3347
3347
  0,
3348
3348
  [t.props, s]
3349
3349
  );
3350
- if (Yt(), St(), Mc(o)) {
3350
+ if (Xt(), St(), Mc(o)) {
3351
3351
  if (o.then(St, St), e)
3352
3352
  return o.then((c) => {
3353
3353
  ko(t, c, e);
@@ -3385,7 +3385,7 @@ function Ai(t, e, n) {
3385
3385
  }
3386
3386
  t.render = r.render || Ue;
3387
3387
  }
3388
- Kt(t), Jt(), Va(t), Yt(), St();
3388
+ Wt(t), Yt(), Va(t), Xt(), St();
3389
3389
  }
3390
3390
  function bu(t) {
3391
3391
  return t.attrsProxy || (t.attrsProxy = new Proxy(
@@ -3427,12 +3427,12 @@ function gr(t) {
3427
3427
  function xu(t) {
3428
3428
  return ee(t) && "__vccOpts" in t;
3429
3429
  }
3430
- const Xt = (t, e) => ma(t, e, En);
3430
+ const Tt = (t, e) => ma(t, e, En);
3431
3431
  function Si(t, e, n) {
3432
3432
  const r = arguments.length;
3433
- return r === 2 ? fe(e) && !Z(e) ? Qn(e) ? de(t, null, [e]) : de(t, e) : de(t, null, e) : (r > 3 ? n = Array.prototype.slice.call(arguments, 2) : r === 3 && Qn(n) && (n = [n]), de(t, e, n));
3433
+ return r === 2 ? fe(e) && !Z(e) ? Qn(e) ? he(t, null, [e]) : he(t, e) : he(t, null, e) : (r > 3 ? n = Array.prototype.slice.call(arguments, 2) : r === 3 && Qn(n) && (n = [n]), he(t, e, n));
3434
3434
  }
3435
- const yu = Symbol.for("v-scx"), ku = () => Ht(yu), Eu = "3.3.4", wu = "http://www.w3.org/2000/svg", kt = typeof document < "u" ? document : null, wo = kt && /* @__PURE__ */ kt.createElement("template"), Cu = {
3435
+ const yu = Symbol.for("v-scx"), ku = () => jt(yu), Eu = "3.3.4", wu = "http://www.w3.org/2000/svg", kt = typeof document < "u" ? document : null, wo = kt && /* @__PURE__ */ kt.createElement("template"), Cu = {
3436
3436
  insert: (t, e, n) => {
3437
3437
  e.insertBefore(t, n || null);
3438
3438
  },
@@ -3512,7 +3512,7 @@ function fs(t, e, n) {
3512
3512
  else {
3513
3513
  const r = Du(t, e);
3514
3514
  Co.test(n) ? t.setProperty(
3515
- qt(r),
3515
+ Mt(r),
3516
3516
  n.replace(Co, ""),
3517
3517
  "important"
3518
3518
  ) : t[r] = n;
@@ -3523,7 +3523,7 @@ function Du(t, e) {
3523
3523
  const n = Nr[e];
3524
3524
  if (n)
3525
3525
  return n;
3526
- let r = Vt(e);
3526
+ let r = Gt(e);
3527
3527
  if (r !== "filter" && r in t)
3528
3528
  return Nr[e] = r;
3529
3529
  r = Fc(r);
@@ -3567,7 +3567,7 @@ function Ru(t, e, n, r, s, o, c) {
3567
3567
  }
3568
3568
  l && t.removeAttribute(e);
3569
3569
  }
3570
- function Ot(t, e, n, r) {
3570
+ function Pt(t, e, n, r) {
3571
3571
  t.addEventListener(e, n, r);
3572
3572
  }
3573
3573
  function qu(t, e, n, r) {
@@ -3581,7 +3581,7 @@ function Mu(t, e, n, r, s = null) {
3581
3581
  const [i, l] = Nu(e);
3582
3582
  if (r) {
3583
3583
  const a = o[e] = Lu(r, s);
3584
- Ot(t, i, a, l);
3584
+ Pt(t, i, a, l);
3585
3585
  } else
3586
3586
  c && (qu(t, i, c, l), o[e] = void 0);
3587
3587
  }
@@ -3595,7 +3595,7 @@ function Nu(t) {
3595
3595
  for (; r = t.match(Do); )
3596
3596
  t = t.slice(0, t.length - r[0].length), e[r[0].toLowerCase()] = !0;
3597
3597
  }
3598
- return [t[2] === ":" ? t.slice(3) : qt(t.slice(2)), e];
3598
+ return [t[2] === ":" ? t.slice(3) : Mt(t.slice(2)), e];
3599
3599
  }
3600
3600
  let Ir = 0;
3601
3601
  const Iu = /* @__PURE__ */ Promise.resolve(), Fu = () => Ir || (Iu.then(() => Ir = 0), Ir = Date.now());
@@ -3817,14 +3817,14 @@ const Gu = {
3817
3817
  created(t, { modifiers: { lazy: e, trim: n, number: r } }, s) {
3818
3818
  t._assign = Fo(s);
3819
3819
  const o = r || s.props && s.props.type === "number";
3820
- Ot(t, e ? "change" : "input", (c) => {
3820
+ Pt(t, e ? "change" : "input", (c) => {
3821
3821
  if (c.target.composing)
3822
3822
  return;
3823
3823
  let i = t.value;
3824
3824
  n && (i = i.trim()), o && (i = Xr(i)), t._assign(i);
3825
- }), n && Ot(t, "change", () => {
3825
+ }), n && Pt(t, "change", () => {
3826
3826
  t.value = t.value.trim();
3827
- }), e || (Ot(t, "compositionstart", Vu), Ot(t, "compositionend", Lo), Ot(t, "change", Lo));
3827
+ }), e || (Pt(t, "compositionstart", Vu), Pt(t, "compositionend", Lo), Pt(t, "change", Lo));
3828
3828
  },
3829
3829
  // set value on mounted so it's after min/max for type="range"
3830
3830
  mounted(t, { value: e }) {
@@ -3847,7 +3847,7 @@ const Gu = {
3847
3847
  }, Ku = (t, e) => (n) => {
3848
3848
  if (!("key" in n))
3849
3849
  return;
3850
- const r = qt(n.key);
3850
+ const r = Mt(n.key);
3851
3851
  if (e.some((s) => s === r || Zu[s] === r))
3852
3852
  return t(n);
3853
3853
  }, Wu = {
@@ -3929,7 +3929,7 @@ function of(t) {
3929
3929
  t.startsWith("#") && (n.id = t.replace("#", "")), t.startsWith(".") && n.classList.add(t.replace(".", "")), document.body.appendChild(n);
3930
3930
  }
3931
3931
  }
3932
- const Tt = sf(), cf = { class: "chat-layout" }, lf = {
3932
+ const Rt = sf(), cf = { class: "chat-layout" }, lf = {
3933
3933
  key: 0,
3934
3934
  class: "chat-header"
3935
3935
  }, af = {
@@ -3938,15 +3938,15 @@ const Tt = sf(), cf = { class: "chat-layout" }, lf = {
3938
3938
  }, uf = /* @__PURE__ */ He({
3939
3939
  __name: "Layout",
3940
3940
  setup(t) {
3941
- const e = zt(null);
3941
+ const e = Ut(null);
3942
3942
  function n() {
3943
3943
  const r = e.value;
3944
3944
  r && (r.scrollTop = r.scrollHeight);
3945
3945
  }
3946
3946
  return Dn(() => {
3947
- Tt.on("scrollToBottom", n), window.addEventListener("resize", n);
3947
+ Rt.on("scrollToBottom", n), window.addEventListener("resize", n);
3948
3948
  }), Rs(() => {
3949
- Tt.off("scrollToBottom", n), window.removeEventListener("resize", n);
3949
+ Rt.off("scrollToBottom", n), window.removeEventListener("resize", n);
3950
3950
  }), (r, s) => (oe(), be("main", cf, [
3951
3951
  r.$slots.header ? (oe(), be("div", lf, [
3952
3952
  hn(r.$slots, "header")
@@ -3973,8 +3973,9 @@ const ln = {
3973
3973
  },
3974
3974
  target: "#n8n-chat",
3975
3975
  mode: "window",
3976
- chatInputKey: "chat_input",
3977
- chatHistoryKey: "chat_history",
3976
+ loadPreviousSession: !0,
3977
+ chatInputKey: "chatInput",
3978
+ chatSessionKey: "sessionId",
3978
3979
  defaultLanguage: "en",
3979
3980
  showWelcomeScreen: !1,
3980
3981
  initialMessages: ["Hi there! 👋", "My name is Nathan. How can I assist you today?"],
@@ -3990,11 +3991,11 @@ const ln = {
3990
3991
  theme: {}
3991
3992
  }, ff = "#n8n-chat", pf = "n8n-chat", Po = `${pf}/sessionId`, Ri = "Chat", qi = "ChatOptions";
3992
3993
  function Ls() {
3993
- return Ht(Ri);
3994
+ return jt(Ri);
3994
3995
  }
3995
3996
  function Os() {
3996
3997
  return {
3997
- options: Ht(qi)
3998
+ options: jt(qi)
3998
3999
  };
3999
4000
  }
4000
4001
  function mr() {
@@ -4014,11 +4015,11 @@ const hf = { class: "chat-get-started" }, df = /* @__PURE__ */ He({
4014
4015
  setup(t) {
4015
4016
  const { t: e } = mr();
4016
4017
  return (n, r) => (oe(), be("div", hf, [
4017
- de(rf, {
4018
+ he(rf, {
4018
4019
  onClick: r[0] || (r[0] = (s) => n.$emit("click:button"))
4019
4020
  }, {
4020
4021
  default: ut(() => [
4021
- Ns(Zn(he(e)("getStarted")), 1)
4022
+ Ns(Zn(ge(e)("getStarted")), 1)
4022
4023
  ]),
4023
4024
  _: 1
4024
4025
  })
@@ -4037,8 +4038,8 @@ const vf = /* @__PURE__ */ Ti(gf, [["render", bf]]), xf = { class: "chat-get-sta
4037
4038
  setup(t) {
4038
4039
  const { t: e, te: n } = mr();
4039
4040
  return (r, s) => (oe(), be("div", xf, [
4040
- he(n)("footer") ? (oe(), be("div", yf, Zn(he(e)("footer")), 1)) : mn("", !0),
4041
- de(vf)
4041
+ ge(n)("footer") ? (oe(), be("div", yf, Zn(ge(e)("footer")), 1)) : mn("", !0),
4042
+ he(vf)
4042
4043
  ]));
4043
4044
  }
4044
4045
  });
@@ -6584,19 +6585,19 @@ var vr = {}, o4 = function(e, n, r) {
6584
6585
  vr.parseLinkLabel = o4;
6585
6586
  vr.parseLinkDestination = c4;
6586
6587
  vr.parseLinkTitle = l4;
6587
- var a4 = le.assign, u4 = le.unescapeAll, Rt = le.escapeHtml, Ye = {};
6588
+ var a4 = le.assign, u4 = le.unescapeAll, qt = le.escapeHtml, Ye = {};
6588
6589
  Ye.code_inline = function(t, e, n, r, s) {
6589
6590
  var o = t[e];
6590
- return "<code" + s.renderAttrs(o) + ">" + Rt(t[e].content) + "</code>";
6591
+ return "<code" + s.renderAttrs(o) + ">" + qt(t[e].content) + "</code>";
6591
6592
  };
6592
6593
  Ye.code_block = function(t, e, n, r, s) {
6593
6594
  var o = t[e];
6594
- return "<pre" + s.renderAttrs(o) + "><code>" + Rt(t[e].content) + `</code></pre>
6595
+ return "<pre" + s.renderAttrs(o) + "><code>" + qt(t[e].content) + `</code></pre>
6595
6596
  `;
6596
6597
  };
6597
6598
  Ye.fence = function(t, e, n, r, s) {
6598
6599
  var o = t[e], c = o.info ? u4(o.info).trim() : "", i = "", l = "", a, u, f, p, d;
6599
- return c && (f = c.split(/(\s+)/g), i = f[0], l = f.slice(2).join("")), n.highlight ? a = n.highlight(o.content, i, l) || Rt(o.content) : a = Rt(o.content), a.indexOf("<pre") === 0 ? a + `
6600
+ return c && (f = c.split(/(\s+)/g), i = f[0], l = f.slice(2).join("")), n.highlight ? a = n.highlight(o.content, i, l) || qt(o.content) : a = qt(o.content), a.indexOf("<pre") === 0 ? a + `
6600
6601
  ` : c ? (u = o.attrIndex("class"), p = o.attrs ? o.attrs.slice() : [], u < 0 ? p.push(["class", n.langPrefix + i]) : (p[u] = p[u].slice(), p[u][1] += " " + n.langPrefix + i), d = {
6601
6602
  attrs: p
6602
6603
  }, "<pre><code" + s.renderAttrs(d) + ">" + a + `</code></pre>
@@ -6619,7 +6620,7 @@ Ye.softbreak = function(t, e, n) {
6619
6620
  `;
6620
6621
  };
6621
6622
  Ye.text = function(t, e) {
6622
- return Rt(t[e].content);
6623
+ return qt(t[e].content);
6623
6624
  };
6624
6625
  Ye.html_block = function(t, e) {
6625
6626
  return t[e].content;
@@ -6635,7 +6636,7 @@ en.prototype.renderAttrs = function(e) {
6635
6636
  if (!e.attrs)
6636
6637
  return "";
6637
6638
  for (s = "", n = 0, r = e.attrs.length; n < r; n++)
6638
- s += " " + Rt(e.attrs[n][0]) + '="' + Rt(e.attrs[n][1]) + '"';
6639
+ s += " " + qt(e.attrs[n][0]) + '="' + qt(e.attrs[n][1]) + '"';
6639
6640
  return s;
6640
6641
  };
6641
6642
  en.prototype.renderToken = function(e, n, r) {
@@ -7235,7 +7236,7 @@ var U4 = function(e, n, r, s) {
7235
7236
  ], xr = {}, G4 = "[a-zA-Z_:][a-zA-Z0-9:._-]*", Z4 = "[^\"'=<>`\\x00-\\x20]+", K4 = "'[^']*'", W4 = '"[^"]*"', J4 = "(?:" + Z4 + "|" + K4 + "|" + W4 + ")", Y4 = "(?:\\s+" + G4 + "(?:\\s*=\\s*" + J4 + ")?)", $i = "<[A-Za-z][A-Za-z0-9\\-]*" + Y4 + "*\\s*\\/?>", zi = "<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>", X4 = "<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->", Q4 = "<[?][\\s\\S]*?[?]>", eV = "<![A-Z]+\\s+[^>]*>", tV = "<!\\[CDATA\\[[\\s\\S]*?\\]\\]>", nV = new RegExp("^(?:" + $i + "|" + zi + "|" + X4 + "|" + Q4 + "|" + eV + "|" + tV + ")"), rV = new RegExp("^(?:" + $i + "|" + zi + ")");
7236
7237
  xr.HTML_TAG_RE = nV;
7237
7238
  xr.HTML_OPEN_CLOSE_TAG_RE = rV;
7238
- var sV = V4, oV = xr.HTML_OPEN_CLOSE_TAG_RE, Ft = [
7239
+ var sV = V4, oV = xr.HTML_OPEN_CLOSE_TAG_RE, Lt = [
7239
7240
  [/^<(script|pre|style|textarea)(?=(\s|>|$))/i, /<\/(script|pre|style|textarea)>/i, !0],
7240
7241
  [/^<!--/, /-->/, !0],
7241
7242
  [/^<\?/, /\?>/, !0],
@@ -7247,15 +7248,15 @@ var sV = V4, oV = xr.HTML_OPEN_CLOSE_TAG_RE, Ft = [
7247
7248
  var o, c, i, l, a = e.bMarks[n] + e.tShift[n], u = e.eMarks[n];
7248
7249
  if (e.sCount[n] - e.blkIndent >= 4 || !e.md.options.html || e.src.charCodeAt(a) !== 60)
7249
7250
  return !1;
7250
- for (l = e.src.slice(a, u), o = 0; o < Ft.length && !Ft[o][0].test(l); o++)
7251
+ for (l = e.src.slice(a, u), o = 0; o < Lt.length && !Lt[o][0].test(l); o++)
7251
7252
  ;
7252
- if (o === Ft.length)
7253
+ if (o === Lt.length)
7253
7254
  return !1;
7254
7255
  if (s)
7255
- return Ft[o][2];
7256
- if (c = n + 1, !Ft[o][1].test(l)) {
7256
+ return Lt[o][2];
7257
+ if (c = n + 1, !Lt[o][1].test(l)) {
7257
7258
  for (; c < r && !(e.sCount[c] < e.blkIndent); c++)
7258
- if (a = e.bMarks[c] + e.tShift[c], u = e.eMarks[c], l = e.src.slice(a, u), Ft[o][1].test(l)) {
7259
+ if (a = e.bMarks[c] + e.tShift[c], u = e.eMarks[c], l = e.src.slice(a, u), Lt[o][1].test(l)) {
7259
7260
  l.length !== 0 && c++;
7260
7261
  break;
7261
7262
  }
@@ -7955,7 +7956,7 @@ Oe.prototype.normalize = function(e) {
7955
7956
  Oe.prototype.onCompile = function() {
7956
7957
  };
7957
7958
  var YV = Oe;
7958
- const jt = 2147483647, We = 36, js = 1, wn = 26, XV = 38, QV = 700, ji = 72, Vi = 128, Gi = "-", e5 = /^xn--/, t5 = /[^\0-\x7E]/, n5 = /[\x2E\u3002\uFF0E\uFF61]/g, r5 = {
7959
+ const Vt = 2147483647, We = 36, js = 1, wn = 26, XV = 38, QV = 700, ji = 72, Vi = 128, Gi = "-", e5 = /^xn--/, t5 = /[^\0-\x7E]/, n5 = /[\x2E\u3002\uFF0E\uFF61]/g, r5 = {
7959
7960
  overflow: "Overflow: input needs wider integers to process",
7960
7961
  "not-basic": "Illegal input >= 0x80 (not a basic code point)",
7961
7962
  "invalid-input": "Invalid input"
@@ -8011,15 +8012,15 @@ const Ki = (t) => String.fromCodePoint(...t), o5 = function(t) {
8011
8012
  for (let u = 1, f = We; ; f += We) {
8012
8013
  i >= n && Et("invalid-input");
8013
8014
  const p = o5(t.charCodeAt(i++));
8014
- (p >= We || p > Je((jt - r) / u)) && Et("overflow"), r += p * u;
8015
+ (p >= We || p > Je((Vt - r) / u)) && Et("overflow"), r += p * u;
8015
8016
  const d = f <= o ? js : f >= o + wn ? wn : f - o;
8016
8017
  if (p < d)
8017
8018
  break;
8018
8019
  const k = We - d;
8019
- u > Je(jt / k) && Et("overflow"), u *= k;
8020
+ u > Je(Vt / k) && Et("overflow"), u *= k;
8020
8021
  }
8021
8022
  const a = e.length + 1;
8022
- o = Wi(r - l, a, l == 0), Je(r / a) > jt - s && Et("overflow"), s += Je(r / a), r %= a, e.splice(r++, 0, s);
8023
+ o = Wi(r - l, a, l == 0), Je(r / a) > Vt - s && Et("overflow"), s += Je(r / a), r %= a, e.splice(r++, 0, s);
8023
8024
  }
8024
8025
  return String.fromCodePoint(...e);
8025
8026
  }, Zs = function(t) {
@@ -8030,13 +8031,13 @@ const Ki = (t) => String.fromCodePoint(...t), o5 = function(t) {
8030
8031
  l < 128 && e.push(Wr(l));
8031
8032
  let c = e.length, i = c;
8032
8033
  for (c && e.push(Gi); i < n; ) {
8033
- let l = jt;
8034
+ let l = Vt;
8034
8035
  for (const u of t)
8035
8036
  u >= r && u < l && (l = u);
8036
8037
  const a = i + 1;
8037
- l - r > Je((jt - s) / a) && Et("overflow"), s += (l - r) * a, r = l;
8038
+ l - r > Je((Vt - s) / a) && Et("overflow"), s += (l - r) * a, r = l;
8038
8039
  for (const u of t)
8039
- if (u < r && ++s > jt && Et("overflow"), u === r) {
8040
+ if (u < r && ++s > Vt && Et("overflow"), u === r) {
8040
8041
  let f = s;
8041
8042
  for (let p = We; ; p += We) {
8042
8043
  const d = p <= o ? js : p >= o + wn ? wn : p - o;
@@ -8573,15 +8574,15 @@ function Cn(t) {
8573
8574
  return t ? typeof t == "string" ? t : t.source : null;
8574
8575
  }
8575
8576
  function nl(t) {
8576
- return Mt("(?=", t, ")");
8577
+ return Nt("(?=", t, ")");
8577
8578
  }
8578
8579
  function N5(t) {
8579
- return Mt("(?:", t, ")*");
8580
+ return Nt("(?:", t, ")*");
8580
8581
  }
8581
8582
  function I5(t) {
8582
- return Mt("(?:", t, ")?");
8583
+ return Nt("(?:", t, ")?");
8583
8584
  }
8584
- function Mt(...t) {
8585
+ function Nt(...t) {
8585
8586
  return t.map((n) => Cn(n)).join("");
8586
8587
  }
8587
8588
  function F5(t) {
@@ -8618,7 +8619,7 @@ function Js(t, { joinWith: e }) {
8618
8619
  }
8619
8620
  const P5 = /\b\B/, sl = "[a-zA-Z]\\w*", Ys = "[a-zA-Z_]\\w*", ol = "\\b\\d+(\\.\\d+)?", cl = "(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)", il = "\\b(0b[01]+)", B5 = "!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", $5 = (t = {}) => {
8620
8621
  const e = /^#![ ]*\//;
8621
- return t.binary && (t.begin = Mt(
8622
+ return t.binary && (t.begin = Nt(
8622
8623
  e,
8623
8624
  /.*\b/,
8624
8625
  t.binary,
@@ -8705,7 +8706,7 @@ const P5 = /\b\B/, sl = "[a-zA-Z]\\w*", Ys = "[a-zA-Z_]\\w*", ol = "\\b\\d+(\\.\
8705
8706
  //
8706
8707
  // for a visual example please see:
8707
8708
  // https://github.com/highlightjs/highlight.js/issues/2827
8708
- begin: Mt(
8709
+ begin: Nt(
8709
8710
  /[ ]+/,
8710
8711
  // necessary to prevent us gobbling up doctags like /* @author Bob Mcgill */
8711
8712
  "(",
@@ -8825,7 +8826,7 @@ const i9 = (t, e) => {
8825
8826
  const n = Object.assign({}, t);
8826
8827
  Object.keys(t).forEach((r) => {
8827
8828
  delete t[r];
8828
- }), t.keywords = n.keywords, t.begin = Mt(n.beforeMatch, nl(n.begin)), t.starts = {
8829
+ }), t.keywords = n.keywords, t.begin = Nt(n.beforeMatch, nl(n.begin)), t.starts = {
8829
8830
  relevance: 0,
8830
8831
  contains: [
8831
8832
  Object.assign(n, { endsParent: !0 })
@@ -8872,7 +8873,7 @@ const Ac = {}, Dt = (t) => {
8872
8873
  console.error(t);
8873
8874
  }, Sc = (t, ...e) => {
8874
8875
  console.log(`WARN: ${t}`, ...e);
8875
- }, Lt = (t, e) => {
8876
+ }, Ot = (t, e) => {
8876
8877
  Ac[`${t}/${e}`] || (console.log(`Deprecated as of ${t}. ${e}`), Ac[`${t}/${e}`] = !0);
8877
8878
  }, rr = new Error();
8878
8879
  function al(t, e, { key: n }) {
@@ -9061,7 +9062,7 @@ const Jr = tl, Dc = it, Tc = Symbol("nomatch"), x9 = 7, fl = function(t) {
9061
9062
  }
9062
9063
  function u(v, S, G) {
9063
9064
  let te = "", ie = "";
9064
- typeof S == "object" ? (te = v, G = S.ignoreIllegals, ie = S.language) : (Lt("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Lt("10.7.0", `Please use highlight(code, options) instead.
9065
+ typeof S == "object" ? (te = v, G = S.ignoreIllegals, ie = S.language) : (Ot("10.7.0", "highlight(lang, code, ...args) has been deprecated."), Ot("10.7.0", `Please use highlight(code, options) instead.
9065
9066
  https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G === void 0 && (G = !0);
9066
9067
  const ae = {
9067
9068
  code: te,
@@ -9093,7 +9094,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9093
9094
  H += R[0];
9094
9095
  else {
9095
9096
  const qn = x.classNameAliases[Ne] || Ne;
9096
- ge(R[0], qn);
9097
+ de(R[0], qn);
9097
9098
  }
9098
9099
  } else
9099
9100
  H += R[0];
@@ -9101,7 +9102,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9101
9102
  }
9102
9103
  H += L.substring(w), y.addText(H);
9103
9104
  }
9104
- function Nt() {
9105
+ function It() {
9105
9106
  if (L === "")
9106
9107
  return;
9107
9108
  let w = null;
@@ -9117,9 +9118,9 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9117
9118
  m.relevance > 0 && (P += w.relevance), y.__addSublanguage(w._emitter, w.language);
9118
9119
  }
9119
9120
  function Ce() {
9120
- m.subLanguage != null ? Nt() : De(), L = "";
9121
+ m.subLanguage != null ? It() : De(), L = "";
9121
9122
  }
9122
- function ge(w, R) {
9123
+ function de(w, R) {
9123
9124
  w !== "" && (y.startScope(R), y.addText(w), y.endScope());
9124
9125
  }
9125
9126
  function ht(w, R) {
@@ -9131,11 +9132,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9131
9132
  continue;
9132
9133
  }
9133
9134
  const pe = x.classNameAliases[w[H]] || w[H], Ne = R[H];
9134
- pe ? ge(Ne, pe) : (L = Ne, De(), L = ""), H++;
9135
+ pe ? de(Ne, pe) : (L = Ne, De(), L = ""), H++;
9135
9136
  }
9136
9137
  }
9137
9138
  function nn(w, R) {
9138
- return w.scope && typeof w.scope == "string" && y.openNode(x.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (ge(L, x.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), L = "") : w.beginScope._multi && (ht(w.beginScope, R), L = "")), m = Object.create(w, { parent: { value: m } }), m;
9139
+ return w.scope && typeof w.scope == "string" && y.openNode(x.classNameAliases[w.scope] || w.scope), w.beginScope && (w.beginScope._wrap ? (de(L, x.classNameAliases[w.beginScope._wrap] || w.beginScope._wrap), L = "") : w.beginScope._multi && (ht(w.beginScope, R), L = "")), m = Object.create(w, { parent: { value: m } }), m;
9139
9140
  }
9140
9141
  function Qe(w, R, H) {
9141
9142
  let Y = L5(w.endRe, H);
@@ -9168,7 +9169,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9168
9169
  if (!Y)
9169
9170
  return Tc;
9170
9171
  const pe = m;
9171
- m.endScope && m.endScope._wrap ? (Ce(), ge(R, m.endScope._wrap)) : m.endScope && m.endScope._multi ? (Ce(), ht(m.endScope, w)) : pe.skip ? L += R : (pe.returnEnd || pe.excludeEnd || (L += R), Ce(), pe.excludeEnd && (L = R));
9172
+ m.endScope && m.endScope._wrap ? (Ce(), de(R, m.endScope._wrap)) : m.endScope && m.endScope._multi ? (Ce(), ht(m.endScope, w)) : pe.skip ? L += R : (pe.returnEnd || pe.excludeEnd || (L += R), Ce(), pe.excludeEnd && (L = R));
9172
9173
  do
9173
9174
  m.scope && y.closeNode(), !m.skip && !m.subLanguage && (P += m.relevance), m = m.parent;
9174
9175
  while (m !== Y.parent);
@@ -9283,18 +9284,18 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9283
9284
  (Ce) => f(Ce, v, !1)
9284
9285
  );
9285
9286
  te.unshift(G);
9286
- const ie = te.sort((Ce, ge) => {
9287
- if (Ce.relevance !== ge.relevance)
9288
- return ge.relevance - Ce.relevance;
9289
- if (Ce.language && ge.language) {
9290
- if (X(Ce.language).supersetOf === ge.language)
9287
+ const ie = te.sort((Ce, de) => {
9288
+ if (Ce.relevance !== de.relevance)
9289
+ return de.relevance - Ce.relevance;
9290
+ if (Ce.language && de.language) {
9291
+ if (X(Ce.language).supersetOf === de.language)
9291
9292
  return 1;
9292
- if (X(ge.language).supersetOf === Ce.language)
9293
+ if (X(de.language).supersetOf === Ce.language)
9293
9294
  return -1;
9294
9295
  }
9295
9296
  return 0;
9296
- }), [ae, De] = ie, Nt = ae;
9297
- return Nt.secondBest = De, Nt;
9297
+ }), [ae, De] = ie, It = ae;
9298
+ return It.secondBest = De, It;
9298
9299
  }
9299
9300
  function k(v, S, G) {
9300
9301
  const te = S && n[S] || G;
@@ -9333,10 +9334,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9333
9334
  i = Dc(i, v);
9334
9335
  }
9335
9336
  const T = () => {
9336
- A(), Lt("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
9337
+ A(), Ot("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
9337
9338
  };
9338
9339
  function C() {
9339
- A(), Lt("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
9340
+ A(), Ot("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
9340
9341
  }
9341
9342
  let N = !1;
9342
9343
  function A() {
@@ -9408,7 +9409,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9408
9409
  });
9409
9410
  }
9410
9411
  function V(v) {
9411
- return Lt("10.7.0", "highlightBlock will be removed entirely in v12.0"), Lt("10.7.0", "Please use highlightElement now."), b(v);
9412
+ return Ot("10.7.0", "highlightBlock will be removed entirely in v12.0"), Ot("10.7.0", "Please use highlightElement now."), b(v);
9412
9413
  }
9413
9414
  Object.assign(t, {
9414
9415
  highlight: u,
@@ -9434,7 +9435,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9434
9435
  }, t.safeMode = function() {
9435
9436
  s = !0;
9436
9437
  }, t.versionString = b9, t.regex = {
9437
- concat: Mt,
9438
+ concat: Nt,
9438
9439
  lookahead: nl,
9439
9440
  either: Ws,
9440
9441
  optional: I5,
@@ -9443,11 +9444,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`), ie = v, te = S), G ==
9443
9444
  for (const v in zn)
9444
9445
  typeof zn[v] == "object" && el(zn[v]);
9445
9446
  return Object.assign(t, zn), t;
9446
- }, Wt = fl({});
9447
- Wt.newInstance = () => fl({});
9448
- var y9 = Wt;
9449
- Wt.HighlightJS = Wt;
9450
- Wt.default = Wt;
9447
+ }, Jt = fl({});
9448
+ Jt.newInstance = () => fl({});
9449
+ var y9 = Jt;
9450
+ Jt.HighlightJS = Jt;
9451
+ Jt.default = Jt;
9451
9452
  const sr = /* @__PURE__ */ Mi(y9), hs = /* @__PURE__ */ He({
9452
9453
  __name: "Message",
9453
9454
  props: {
@@ -9457,27 +9458,27 @@ const sr = /* @__PURE__ */ Mi(y9), hs = /* @__PURE__ */ He({
9457
9458
  }
9458
9459
  },
9459
9460
  setup(t) {
9460
- const e = t, { message: n } = pa(e), r = Xt(() => ({
9461
+ const e = t, { message: n } = pa(e), r = Tt(() => n.value.text || "&lt;Empty response&gt;"), s = Tt(() => ({
9461
9462
  "chat-message-from-user": n.value.sender === "user",
9462
9463
  "chat-message-from-bot": n.value.sender === "bot"
9463
- })), s = {
9464
- highlight(o, c) {
9465
- if (c && sr.getLanguage(c))
9464
+ })), o = {
9465
+ highlight(c, i) {
9466
+ if (i && sr.getLanguage(i))
9466
9467
  try {
9467
- return sr.highlight(o, { language: c }).value;
9468
+ return sr.highlight(c, { language: i }).value;
9468
9469
  } catch {
9469
9470
  }
9470
9471
  return "";
9471
9472
  }
9472
9473
  };
9473
- return (o, c) => (oe(), be("div", {
9474
- class: Sn(["chat-message", r.value])
9474
+ return (c, i) => (oe(), be("div", {
9475
+ class: Sn(["chat-message", s.value])
9475
9476
  }, [
9476
- hn(o.$slots, "default", {}, () => [
9477
- de(he(D5), {
9477
+ hn(c.$slots, "default", {}, () => [
9478
+ he(ge(D5), {
9478
9479
  class: "chat-message-markdown",
9479
- source: he(n).text,
9480
- options: s
9480
+ source: r.value,
9481
+ options: o
9481
9482
  }, null, 8, ["source"])
9482
9483
  ])
9483
9484
  ], 2));
@@ -9501,12 +9502,12 @@ const k9 = /* @__PURE__ */ we("div", { class: "chat-message-typing-body" }, [
9501
9502
  text: "",
9502
9503
  sender: "bot",
9503
9504
  createdAt: ""
9504
- }, r = Xt(() => ({
9505
+ }, r = Tt(() => ({
9505
9506
  // eslint-disable-next-line @typescript-eslint/naming-convention
9506
9507
  "chat-message-typing": !0,
9507
9508
  [`chat-message-typing-animation-${e.animation}`]: !0
9508
9509
  }));
9509
- return (s, o) => (oe(), Se(he(hs), {
9510
+ return (s, o) => (oe(), Se(ge(hs), {
9510
9511
  class: Sn(r.value),
9511
9512
  message: n
9512
9513
  }, {
@@ -9528,7 +9529,7 @@ const w9 = { class: "chat-messages-list" }, C9 = /* @__PURE__ */ He({
9528
9529
  setup(t) {
9529
9530
  const e = Ls(), { initialMessages: n, waitingForResponse: r } = e;
9530
9531
  return (s, o) => (oe(), be("div", w9, [
9531
- (oe(!0), be(Re, null, uo(he(n), (c) => (oe(), Se(hs, {
9532
+ (oe(!0), be(Re, null, uo(ge(n), (c) => (oe(), Se(hs, {
9532
9533
  key: c.id,
9533
9534
  message: c
9534
9535
  }, null, 8, ["message"]))), 128)),
@@ -9536,7 +9537,7 @@ const w9 = { class: "chat-messages-list" }, C9 = /* @__PURE__ */ He({
9536
9537
  key: c.id,
9537
9538
  message: c
9538
9539
  }, null, 8, ["message"]))), 128)),
9539
- he(r) ? (oe(), Se(E9, { key: 0 })) : mn("", !0)
9540
+ ge(r) ? (oe(), Se(E9, { key: 0 })) : mn("", !0)
9540
9541
  ]));
9541
9542
  }
9542
9543
  });
@@ -9556,7 +9557,7 @@ function T9(t, e) {
9556
9557
  const R9 = { name: "mdi-send", render: T9 }, q9 = { class: "chat-input" }, M9 = ["placeholder", "onKeydown"], N9 = ["disabled"], I9 = /* @__PURE__ */ He({
9557
9558
  __name: "Input",
9558
9559
  setup(t) {
9559
- const e = Ls(), { waitingForResponse: n } = e, { t: r } = mr(), s = zt(""), o = Xt(() => s.value === "" || n.value);
9560
+ const e = Ls(), { waitingForResponse: n } = e, { t: r } = mr(), s = Ut(""), o = Tt(() => s.value === "" || n.value);
9560
9561
  async function c(l) {
9561
9562
  if (l.preventDefault(), o.value)
9562
9563
  return;
@@ -9570,7 +9571,7 @@ const R9 = { name: "mdi-send", render: T9 }, q9 = { class: "chat-input" }, M9 =
9570
9571
  li(we("textarea", {
9571
9572
  "onUpdate:modelValue": a[0] || (a[0] = (u) => s.value = u),
9572
9573
  rows: "1",
9573
- placeholder: he(r)("inputPlaceholder"),
9574
+ placeholder: ge(r)("inputPlaceholder"),
9574
9575
  onKeydown: Ku(i, ["enter"])
9575
9576
  }, null, 40, M9), [
9576
9577
  [Gu, s.value]
@@ -9580,7 +9581,7 @@ const R9 = { name: "mdi-send", render: T9 }, q9 = { class: "chat-input" }, M9 =
9580
9581
  class: "chat-input-send-button",
9581
9582
  onClick: c
9582
9583
  }, [
9583
- de(he(R9), {
9584
+ he(ge(R9), {
9584
9585
  height: "32",
9585
9586
  width: "32"
9586
9587
  })
@@ -9593,32 +9594,32 @@ const pl = /* @__PURE__ */ He({
9593
9594
  setup(t) {
9594
9595
  const { t: e } = mr(), n = Ls(), { messages: r, currentSessionId: s } = n, { options: o } = Os();
9595
9596
  async function c() {
9596
- n.startNewSession(), Zt(() => {
9597
- Tt.emit("scrollToBottom");
9597
+ n.startNewSession(), Kt(() => {
9598
+ Rt.emit("scrollToBottom");
9598
9599
  });
9599
9600
  }
9600
9601
  async function i() {
9601
- await n.loadPreviousSession(), Zt(() => {
9602
- Tt.emit("scrollToBottom");
9602
+ await n.loadPreviousSession(), Kt(() => {
9603
+ Rt.emit("scrollToBottom");
9603
9604
  });
9604
9605
  }
9605
9606
  return Dn(async () => {
9606
9607
  await i(), !o.showWelcomeScreen && !s.value && await c();
9607
9608
  }), (l, a) => (oe(), Se(uf, { class: "chat-wrapper" }, {
9608
9609
  header: ut(() => [
9609
- we("h1", null, Zn(he(e)("title")), 1),
9610
- we("p", null, Zn(he(e)("subtitle")), 1)
9610
+ we("h1", null, Zn(ge(e)("title")), 1),
9611
+ we("p", null, Zn(ge(e)("subtitle")), 1)
9611
9612
  ]),
9612
9613
  footer: ut(() => [
9613
- he(s) ? (oe(), Se(I9, { key: 0 })) : (oe(), Se(kf, { key: 1 }))
9614
+ ge(s) ? (oe(), Se(I9, { key: 0 })) : (oe(), Se(kf, { key: 1 }))
9614
9615
  ]),
9615
9616
  default: ut(() => [
9616
- !he(s) && he(o).showWelcomeScreen ? (oe(), Se(df, {
9617
+ !ge(s) && ge(o).showWelcomeScreen ? (oe(), Se(df, {
9617
9618
  key: 0,
9618
9619
  "onClick:button": c
9619
9620
  })) : (oe(), Se(C9, {
9620
9621
  key: 1,
9621
- messages: he(r)
9622
+ messages: ge(r)
9622
9623
  }, null, 8, ["messages"]))
9623
9624
  ]),
9624
9625
  _: 1
@@ -9653,17 +9654,17 @@ function H9(t, e) {
9653
9654
  const j9 = { name: "mdi-chevron-down", render: H9 }, V9 = { class: "chat-window-wrapper" }, G9 = { class: "chat-window" }, Z9 = /* @__PURE__ */ He({
9654
9655
  __name: "ChatWindow",
9655
9656
  setup(t) {
9656
- const e = zt(!1);
9657
+ const e = Ut(!1);
9657
9658
  function n() {
9658
- e.value = !e.value, e.value && Zt(() => {
9659
- Tt.emit("scrollToBottom");
9659
+ e.value = !e.value, e.value && Kt(() => {
9660
+ Rt.emit("scrollToBottom");
9660
9661
  });
9661
9662
  }
9662
9663
  return (r, s) => (oe(), be("div", V9, [
9663
- de(er, { name: "chat-window-transition" }, {
9664
+ he(er, { name: "chat-window-transition" }, {
9664
9665
  default: ut(() => [
9665
9666
  li(we("div", G9, [
9666
- de(pl)
9667
+ he(pl)
9667
9668
  ], 512), [
9668
9669
  [Wu, e.value]
9669
9670
  ])
@@ -9674,16 +9675,16 @@ const j9 = { name: "mdi-chevron-down", render: H9 }, V9 = { class: "chat-window-
9674
9675
  class: "chat-window-toggle",
9675
9676
  onClick: n
9676
9677
  }, [
9677
- de(er, {
9678
+ he(er, {
9678
9679
  name: "chat-window-toggle-transition",
9679
9680
  mode: "out-in"
9680
9681
  }, {
9681
9682
  default: ut(() => [
9682
- e.value ? (oe(), Se(he(j9), {
9683
+ e.value ? (oe(), Se(ge(j9), {
9683
9684
  key: 1,
9684
9685
  height: "32",
9685
9686
  width: "32"
9686
- })) : (oe(), Se(he(B9), {
9687
+ })) : (oe(), Se(ge(B9), {
9687
9688
  key: 0,
9688
9689
  height: "32",
9689
9690
  width: "32"
@@ -10566,13 +10567,13 @@ const eG = /* @__PURE__ */ He({
10566
10567
  __name: "App",
10567
10568
  props: {},
10568
10569
  setup(t) {
10569
- const { options: e } = Os(), n = Xt(() => e.mode === "fullscreen");
10570
+ const { options: e } = Os(), n = Tt(() => e.mode === "fullscreen");
10570
10571
  return Dn(() => {
10571
10572
  sr.registerLanguage("xml", K9), sr.registerLanguage("javascript", Q9);
10572
- }), (r, s) => n.value ? (oe(), Se(he(pl), {
10573
+ }), (r, s) => n.value ? (oe(), Se(ge(pl), {
10573
10574
  key: 0,
10574
10575
  class: "n8n-chat"
10575
- })) : (oe(), Se(he(Z9), {
10576
+ })) : (oe(), Se(ge(Z9), {
10576
10577
  key: 1,
10577
10578
  class: "n8n-chat"
10578
10579
  }));
@@ -10644,7 +10645,8 @@ async function iG(t, e) {
10644
10645
  `${e.webhookUrl}`,
10645
10646
  {
10646
10647
  action: "loadPreviousSession",
10647
- [e.chatHistoryKey]: t
10648
+ [e.chatSessionKey]: t,
10649
+ ...e.metadata ? { metadata: e.metadata } : {}
10648
10650
  },
10649
10651
  {
10650
10652
  headers: (s = e.webhookConfig) == null ? void 0 : s.headers
@@ -10657,7 +10659,7 @@ async function lG(t, e, n) {
10657
10659
  `${n.webhookUrl}`,
10658
10660
  {
10659
10661
  action: "sendMessage",
10660
- [n.chatHistoryKey]: e,
10662
+ [n.chatSessionKey]: e,
10661
10663
  [n.chatInputKey]: t,
10662
10664
  ...n.metadata ? { metadata: n.metadata } : {}
10663
10665
  },
@@ -10669,7 +10671,7 @@ async function lG(t, e, n) {
10669
10671
  const aG = {
10670
10672
  install(t, e) {
10671
10673
  t.provide(qi, e);
10672
- const n = zt([]), r = zt(null), s = zt(!1), o = Xt(
10674
+ const n = Ut([]), r = Ut(null), s = Ut(!1), o = Tt(
10673
10675
  () => (e.initialMessages ?? []).map((u) => ({
10674
10676
  id: an(),
10675
10677
  text: u,
@@ -10684,8 +10686,8 @@ const aG = {
10684
10686
  sender: "user",
10685
10687
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
10686
10688
  };
10687
- n.value.push(f), s.value = !0, Zt(() => {
10688
- Tt.emit("scrollToBottom");
10689
+ n.value.push(f), s.value = !0, Kt(() => {
10690
+ Rt.emit("scrollToBottom");
10689
10691
  });
10690
10692
  const p = await lG(
10691
10693
  u,
@@ -10697,11 +10699,13 @@ const aG = {
10697
10699
  sender: "bot",
10698
10700
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
10699
10701
  };
10700
- n.value.push(d), s.value = !1, Zt(() => {
10701
- Tt.emit("scrollToBottom");
10702
+ n.value.push(d), s.value = !1, Kt(() => {
10703
+ Rt.emit("scrollToBottom");
10702
10704
  });
10703
10705
  }
10704
10706
  async function i() {
10707
+ if (!e.loadPreviousSession)
10708
+ return;
10705
10709
  const u = localStorage.getItem(Po) ?? an(), f = await iG(u, e), p = (/* @__PURE__ */ new Date()).toISOString();
10706
10710
  return n.value = ((f == null ? void 0 : f.data) || []).map((d, k) => ({
10707
10711
  id: `${k}`,