@quidgest/chatbot 0.6.2 → 0.6.3

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/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { getCurrentInstance as ut, computed as w, inject as dt, ref as q, provide as an, defineComponent as V, openBlock as y, createElementBlock as x, normalizeClass as X, normalizeStyle as Ee, unref as f, toRef as Le, withModifiers as Ue, createVNode as D, createCommentVNode as U, createElementVNode as M, renderSlot as F, createTextVNode as Qe, toDisplayString as re, createBlock as Z, resolveDynamicComponent as Bt, h as at, mergeProps as de, useTemplateRef as Lt, withCtx as R, normalizeProps as Re, guardReactiveProps as je, mergeModels as be, useModel as Te, watch as se, createSlots as Rt, withDirectives as Tt, vModelDynamic as ln, useId as rn, onMounted as Me, onUnmounted as Mt, readonly as sn, customRef as cn, getCurrentScope as un, onScopeDispose as qt, shallowRef as lt, nextTick as De, toValue as pt, reactive as ze, onBeforeUnmount as dn, Fragment as ve, Teleport as pn, Transition as bt, renderList as qe, toHandlers as fn, vModelText as vn, resolveComponent as gn, withKeys as mn, onBeforeMount as bn } from "vue";
1
+ import { getCurrentInstance as ut, computed as w, inject as dt, ref as q, provide as an, defineComponent as V, openBlock as y, createElementBlock as x, normalizeClass as X, normalizeStyle as Ee, unref as f, toRef as Le, withModifiers as Ue, createVNode as D, createCommentVNode as U, createElementVNode as M, renderSlot as F, createTextVNode as Qe, toDisplayString as re, createBlock as Z, resolveDynamicComponent as Bt, h as at, mergeProps as pe, useTemplateRef as Lt, withCtx as R, normalizeProps as Re, guardReactiveProps as je, mergeModels as be, useModel as Te, watch as se, createSlots as Rt, withDirectives as Tt, vModelDynamic as ln, useId as rn, onMounted as Me, onUnmounted as Mt, readonly as sn, customRef as cn, getCurrentScope as un, onScopeDispose as qt, shallowRef as lt, nextTick as De, toValue as pt, reactive as ze, onBeforeUnmount as dn, Fragment as ve, Teleport as pn, Transition as bt, renderList as qe, toHandlers as fn, vModelText as vn, resolveComponent as gn, withKeys as mn, onBeforeMount as bn } from "vue";
2
2
  import Nt from "axios";
3
3
  import hn from "markdown-it";
4
4
  function it(e) {
@@ -78,10 +78,10 @@ function K(e) {
78
78
  const i = ut();
79
79
  if (i === null) return t(o, l);
80
80
  const r = new Proxy(o, {
81
- get(c, d) {
82
- var u;
83
- const s = Reflect.get(c, d), v = (u = a.value) == null ? void 0 : u[d];
84
- return typeof d == "string" && !An(i.vnode, d) ? v ?? s : s;
81
+ get(c, u) {
82
+ var d;
83
+ const s = Reflect.get(c, u), v = (d = a.value) == null ? void 0 : d[u];
84
+ return typeof u == "string" && !An(i.vnode, u) ? v ?? s : s;
85
85
  }
86
86
  });
87
87
  return t(r, l);
@@ -127,16 +127,16 @@ function Ot(e) {
127
127
  if (l === a)
128
128
  i = r = 0;
129
129
  else {
130
- const d = l - a;
131
- switch (r = c > 0.5 ? d / (2 - l - a) : d / (l + a), l) {
130
+ const u = l - a;
131
+ switch (r = c > 0.5 ? u / (2 - l - a) : u / (l + a), l) {
132
132
  case n:
133
- i = (t - o) / d + (t < o ? 6 : 0);
133
+ i = (t - o) / u + (t < o ? 6 : 0);
134
134
  break;
135
135
  case t:
136
- i = (o - n) / d + 2;
136
+ i = (o - n) / u + 2;
137
137
  break;
138
138
  case o:
139
- i = (n - t) / d + 4;
139
+ i = (n - t) / u + 4;
140
140
  break;
141
141
  }
142
142
  i /= 6;
@@ -194,14 +194,14 @@ function Gt(e) {
194
194
  console.error("Failed to parse color:", v);
195
195
  return;
196
196
  }
197
- const c = Ot(r), d = Rn(c.l), u = Dn(r, 25), s = Bn(u);
197
+ const c = Ot(r), u = Rn(c.l), d = Dn(r, 25), s = Bn(d);
198
198
  return {
199
199
  mainColor: a,
200
200
  mainColorRgb: yt(r),
201
- onMainColor: d,
201
+ onMainColor: u,
202
202
  hoverColor: s,
203
- hoverColorRgb: yt(u),
204
- onHoverColor: d
203
+ hoverColorRgb: yt(d),
204
+ onHoverColor: u
205
205
  };
206
206
  });
207
207
  return { isUtilityColor: t, style: o };
@@ -232,15 +232,15 @@ const qn = ["id", "disabled"], Nn = {
232
232
  emits: ["click"],
233
233
  setup(e, { emit: n }) {
234
234
  const t = e, o = n, l = w(() => t.disabled || t.loading);
235
- function a(u) {
236
- l.value || o("click", u);
235
+ function a(d) {
236
+ l.value || o("click", d);
237
237
  }
238
238
  const { isUtilityColor: i, style: r } = Gt(Le(t, "color")), c = w(() => {
239
- const u = i.value ? `q-button--${t.color}` : void 0, s = t.size !== "regular" ? `q-button--${t.size}` : void 0, v = t.iconPos !== "start" ? `q-button--icon-${t.iconPos}` : void 0;
239
+ const d = i.value ? `q-button--${t.color}` : void 0, s = t.size !== "regular" ? `q-button--${t.size}` : void 0, v = t.iconPos !== "start" ? `q-button--icon-${t.iconPos}` : void 0;
240
240
  return [
241
241
  "q-button",
242
242
  `q-button--${t.variant}`,
243
- u,
243
+ d,
244
244
  s,
245
245
  v,
246
246
  {
@@ -252,11 +252,11 @@ const qn = ["id", "disabled"], Nn = {
252
252
  },
253
253
  t.class
254
254
  ];
255
- }), d = w(() => {
256
- var u, s, v, b, h, _;
255
+ }), u = w(() => {
256
+ var d, s, v, b, h, _;
257
257
  if (!i.value)
258
258
  return {
259
- "--q-button-main-color": (u = r.value) == null ? void 0 : u.mainColor,
259
+ "--q-button-main-color": (d = r.value) == null ? void 0 : d.mainColor,
260
260
  "--q-button-main-color-rgb": (s = r.value) == null ? void 0 : s.mainColorRgb,
261
261
  "--q-button-on-main-color": (v = r.value) == null ? void 0 : v.onMainColor,
262
262
  "--q-button-hover-color": (b = r.value) == null ? void 0 : b.hoverColor,
@@ -264,19 +264,19 @@ const qn = ["id", "disabled"], Nn = {
264
264
  "--q-button-on-hover-color": (_ = r.value) == null ? void 0 : _.onHoverColor
265
265
  };
266
266
  });
267
- return (u, s) => (y(), x("button", {
267
+ return (d, s) => (y(), x("button", {
268
268
  id: t.id,
269
269
  type: "button",
270
270
  class: X(c.value),
271
271
  disabled: l.value,
272
- style: Ee(d.value),
272
+ style: Ee(u.value),
273
273
  onClick: Ue(a, ["stop", "prevent"])
274
274
  }, [
275
275
  t.loading ? (y(), x("div", Nn, [
276
276
  D(f(En))
277
277
  ])) : U("v-if", !0),
278
278
  M("span", Fn, [
279
- F(u.$slots, "default"),
279
+ F(d.$slots, "default"),
280
280
  Qe(
281
281
  " " + re(t.label),
282
282
  1
@@ -564,7 +564,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
564
564
  class: X(t.value)
565
565
  }, [
566
566
  F(o.$slots, "prepend"),
567
- M("label", de({
567
+ M("label", pe({
568
568
  for: n.for
569
569
  }, o.$attrs), [
570
570
  F(o.$slots, "default", {}, () => [
@@ -638,7 +638,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
638
638
  F(i.$slots, "control", {}, () => [
639
639
  M(
640
640
  "div",
641
- de({
641
+ pe({
642
642
  ref: "field",
643
643
  class: "q-field__control"
644
644
  }, i.$attrs),
@@ -735,7 +735,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
735
735
  }
736
736
  });
737
737
  se(a, (h) => i.value = h, { immediate: !0 });
738
- const r = vt(o.id), c = q(null), d = q(null), u = w(
738
+ const r = vt(o.id), c = q(null), u = q(null), d = w(
739
739
  () => o.readonly || o.disabled ? void 0 : o.placeholder
740
740
  ), s = w(() => o.clearable && !o.readonly && !o.disabled), v = w(() => s.value && a.value);
741
741
  function b(h) {
@@ -746,7 +746,7 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
746
746
  var h;
747
747
  return (h = c.value) == null ? void 0 : h.fieldRef;
748
748
  }),
749
- inputRef: d
749
+ inputRef: u
750
750
  }), (h, _) => (y(), Z(f(Vt), {
751
751
  ref_key: "fieldRef",
752
752
  ref: c,
@@ -766,16 +766,16 @@ const Kn = ["id"], eo = /* @__PURE__ */ V({
766
766
  F(h.$slots, "label.append")
767
767
  ]),
768
768
  default: R(() => [
769
- Tt(M("input", de({
769
+ Tt(M("input", pe({
770
770
  id: f(r),
771
771
  ref_key: "inputRef",
772
- ref: d,
772
+ ref: u,
773
773
  "onUpdate:modelValue": _[0] || (_[0] = (j) => i.value = j),
774
774
  class: "q-text-field__input",
775
775
  type: o.type,
776
776
  maxlength: o.maxLength,
777
777
  required: o.required,
778
- placeholder: u.value,
778
+ placeholder: d.value,
779
779
  readonly: o.readonly,
780
780
  disabled: o.disabled
781
781
  }, h.$attrs), null, 16, vo), [
@@ -848,7 +848,7 @@ const ho = { ref: "layer" }, yo = /* @__PURE__ */ V({
848
848
  t("focus-outside", b), t("interact-outside", b), b.defaultPrevented || t("dismiss", b);
849
849
  }
850
850
  }
851
- function d(s) {
851
+ function u(s) {
852
852
  if (!o.value || !(a != null && a.isTop())) return;
853
853
  const v = s.target;
854
854
  if (!o.value.contains(v)) {
@@ -860,14 +860,14 @@ const ho = { ref: "layer" }, yo = /* @__PURE__ */ V({
860
860
  t("pointer-down-outside", b), t("interact-outside", b), b.defaultPrevented || t("dismiss", b);
861
861
  }
862
862
  }
863
- function u() {
863
+ function d() {
864
864
  ["mousedown", "touchstart"].forEach((s) => {
865
- document.addEventListener(s, d, {
865
+ document.addEventListener(s, u, {
866
866
  passive: !0,
867
867
  capture: !0
868
868
  // Use capture phase to ensure we catch the event
869
869
  }), i.push(() => {
870
- document.removeEventListener(s, d, {
870
+ document.removeEventListener(s, u, {
871
871
  capture: !0
872
872
  });
873
873
  });
@@ -878,7 +878,7 @@ const ho = { ref: "layer" }, yo = /* @__PURE__ */ V({
878
878
  document.removeEventListener("keydown", r);
879
879
  }), document.addEventListener("focusin", c), i.push(() => {
880
880
  document.removeEventListener("focusin", c);
881
- }), u();
881
+ }), d();
882
882
  }), Mt(() => {
883
883
  a == null || a.unregister(), i.forEach((s) => s()), i = [];
884
884
  }), (s, v) => (y(), x(
@@ -929,7 +929,7 @@ function Eo(e, n, t = {}) {
929
929
  }, c = w(() => {
930
930
  const s = pt(e);
931
931
  return Array.isArray(s) ? s.map((v) => rt(v)) : [rt(s)];
932
- }), d = se(
932
+ }), u = se(
933
933
  c,
934
934
  (s) => {
935
935
  if (r(), i.value && o) {
@@ -939,12 +939,12 @@ function Eo(e, n, t = {}) {
939
939
  }
940
940
  },
941
941
  { immediate: !0, flush: "post" }
942
- ), u = () => {
943
- r(), d();
942
+ ), d = () => {
943
+ r(), u();
944
944
  };
945
- return _o(u), {
945
+ return _o(d), {
946
946
  isSupported: i,
947
- stop: u
947
+ stop: d
948
948
  };
949
949
  }
950
950
  function Io(e = gt, n) {
@@ -953,26 +953,26 @@ function Io(e = gt, n) {
953
953
  function Co(e = {}) {
954
954
  var n, t;
955
955
  const { window: o = gt } = e, l = wt(e == null ? void 0 : e.element), a = wt((n = e == null ? void 0 : e.input) != null ? n : ""), i = (t = e == null ? void 0 : e.styleProp) != null ? t : "height", r = lt(1), c = lt(0);
956
- function d() {
957
- var u;
956
+ function u() {
957
+ var d;
958
958
  if (!l.value)
959
959
  return;
960
960
  let s = "";
961
- l.value.style[i] = "1px", r.value = (u = l.value) == null ? void 0 : u.scrollHeight;
961
+ l.value.style[i] = "1px", r.value = (d = l.value) == null ? void 0 : d.scrollHeight;
962
962
  const v = pt(e == null ? void 0 : e.styleTarget);
963
963
  v ? v.style[i] = `${r.value}px` : s = `${r.value}px`, l.value.style[i] = s;
964
964
  }
965
- return se([a, l], () => De(d), { immediate: !0 }), se(r, () => {
966
- var u;
967
- return (u = e == null ? void 0 : e.onResize) == null ? void 0 : u.call(e);
968
- }), Eo(l, ([{ contentRect: u }]) => {
969
- c.value !== u.width && Io(o, () => {
970
- c.value = u.width, d();
965
+ return se([a, l], () => De(u), { immediate: !0 }), se(r, () => {
966
+ var d;
967
+ return (d = e == null ? void 0 : e.onResize) == null ? void 0 : d.call(e);
968
+ }), Eo(l, ([{ contentRect: d }]) => {
969
+ c.value !== d.width && Io(o, () => {
970
+ c.value = d.width, u();
971
971
  });
972
- }), e != null && e.watch && se(e.watch, d, { immediate: !0, deep: !0 }), {
972
+ }), e != null && e.watch && se(e.watch, u, { immediate: !0, deep: !0 }), {
973
973
  textarea: l,
974
974
  input: a,
975
- triggerResize: d
975
+ triggerResize: u
976
976
  };
977
977
  }
978
978
  /*!
@@ -1003,14 +1003,14 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1003
1003
  var i = a.shift();
1004
1004
  if (!Ze(i, !1))
1005
1005
  if (i.tagName === "SLOT") {
1006
- var r = i.assignedElements(), c = r.length ? r : i.children, d = e(c, !0, o);
1007
- o.flatten ? l.push.apply(l, d) : l.push({
1006
+ var r = i.assignedElements(), c = r.length ? r : i.children, u = e(c, !0, o);
1007
+ o.flatten ? l.push.apply(l, u) : l.push({
1008
1008
  scopeParent: i,
1009
- candidates: d
1009
+ candidates: u
1010
1010
  });
1011
1011
  } else {
1012
- var u = xe.call(i, Ve);
1013
- u && o.filter(i) && (t || !n.includes(i)) && l.push(i);
1012
+ var d = xe.call(i, Ve);
1013
+ d && o.filter(i) && (t || !n.includes(i)) && l.push(i);
1014
1014
  var s = i.shadowRoot || // check for an undisclosed shadow
1015
1015
  typeof o.getShadowRoot == "function" && o.getShadowRoot(i), v = !Ze(s, !1) && (!o.shadowRootFilter || o.shadowRootFilter(i));
1016
1016
  if (s && v) {
@@ -1073,8 +1073,8 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1073
1073
  if (t && t !== e) {
1074
1074
  var a, i, r;
1075
1075
  for (l = !!((a = o) !== null && a !== void 0 && (i = a.ownerDocument) !== null && i !== void 0 && i.contains(o) || e != null && (r = e.ownerDocument) !== null && r !== void 0 && r.contains(e)); !l && o; ) {
1076
- var c, d, u;
1077
- t = He(o), o = (c = t) === null || c === void 0 ? void 0 : c.host, l = !!((d = o) !== null && d !== void 0 && (u = d.ownerDocument) !== null && u !== void 0 && u.contains(o));
1076
+ var c, u, d;
1077
+ t = He(o), o = (c = t) === null || c === void 0 ? void 0 : c.host, l = !!((u = o) !== null && u !== void 0 && (d = u.ownerDocument) !== null && d !== void 0 && d.contains(o));
1078
1078
  }
1079
1079
  }
1080
1080
  return l;
@@ -1133,13 +1133,13 @@ var Zt = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
1133
1133
  }, Go = function e(n) {
1134
1134
  var t = [], o = [];
1135
1135
  return n.forEach(function(l, a) {
1136
- var i = !!l.scopeParent, r = i ? l.scopeParent : l, c = Do(r, i), d = i ? e(l.candidates) : r;
1137
- c === 0 ? i ? t.push.apply(t, d) : t.push(r) : o.push({
1136
+ var i = !!l.scopeParent, r = i ? l.scopeParent : l, c = Do(r, i), u = i ? e(l.candidates) : r;
1137
+ c === 0 ? i ? t.push.apply(t, u) : t.push(r) : o.push({
1138
1138
  documentOrder: a,
1139
1139
  tabIndex: c,
1140
1140
  item: l,
1141
1141
  isScope: i,
1142
- content: d
1142
+ content: u
1143
1143
  });
1144
1144
  }), o.sort(Bo).reduce(function(l, a) {
1145
1145
  return a.isScope ? l.push.apply(l, a.content) : l.push(a.content), l;
@@ -1331,7 +1331,7 @@ var $t = {
1331
1331
  return I === p;
1332
1332
  });
1333
1333
  });
1334
- }, d = function(p) {
1334
+ }, u = function(p) {
1335
1335
  var m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, k = m.hasFallback, N = k === void 0 ? !1 : k, L = m.params, C = L === void 0 ? [] : L, I = l[p];
1336
1336
  if (typeof I == "function" && (I = I.apply(void 0, Qo(C))), I === !0 && (I = void 0), !I) {
1337
1337
  if (I === void 0 || I === !1)
@@ -1349,8 +1349,8 @@ var $t = {
1349
1349
  throw new Error("`".concat(p, "` as selector refers to no known node"));
1350
1350
  }
1351
1351
  return z;
1352
- }, u = function() {
1353
- var p = d("initialFocus", {
1352
+ }, d = function() {
1353
+ var p = u("initialFocus", {
1354
1354
  hasFallback: !0
1355
1355
  });
1356
1356
  if (p === !1)
@@ -1360,9 +1360,9 @@ var $t = {
1360
1360
  p = t.activeElement;
1361
1361
  else {
1362
1362
  var m = a.tabbableGroups[0], k = m && m.firstTabbableNode;
1363
- p = k || d("fallbackFocus");
1363
+ p = k || u("fallbackFocus");
1364
1364
  }
1365
- else p === null && (p = d("fallbackFocus"));
1365
+ else p === null && (p = u("fallbackFocus"));
1366
1366
  if (!p)
1367
1367
  throw new Error("Your focus-trap needs to have at least one focusable element");
1368
1368
  return p;
@@ -1415,7 +1415,7 @@ var $t = {
1415
1415
  };
1416
1416
  }), a.tabbableGroups = a.containerGroups.filter(function(p) {
1417
1417
  return p.tabbableNodes.length > 0;
1418
- }), a.tabbableGroups.length <= 0 && !d("fallbackFocus"))
1418
+ }), a.tabbableGroups.length <= 0 && !u("fallbackFocus"))
1419
1419
  throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
1420
1420
  if (a.containerGroups.find(function(p) {
1421
1421
  return p.posTabIndexesFound;
@@ -1428,7 +1428,7 @@ var $t = {
1428
1428
  }, b = function(p) {
1429
1429
  if (p !== !1 && p !== v(document)) {
1430
1430
  if (!p || !p.focus) {
1431
- b(u());
1431
+ b(d());
1432
1432
  return;
1433
1433
  }
1434
1434
  p.focus({
@@ -1436,7 +1436,7 @@ var $t = {
1436
1436
  }), a.mostRecentlyFocusedNode = p, ea(p) && p.select();
1437
1437
  }
1438
1438
  }, h = function(p) {
1439
- var m = d("setReturnFocus", {
1439
+ var m = u("setReturnFocus", {
1440
1440
  params: [p]
1441
1441
  });
1442
1442
  return m || (m === !1 ? !1 : p);
@@ -1468,7 +1468,7 @@ var $t = {
1468
1468
  } else Be(k) || (C = z.nextTabbableNode(m));
1469
1469
  }
1470
1470
  } else
1471
- C = d("fallbackFocus");
1471
+ C = u("fallbackFocus");
1472
1472
  return C;
1473
1473
  }, j = function(p) {
1474
1474
  var m = Fe(p);
@@ -1516,7 +1516,7 @@ var $t = {
1516
1516
  // outside the trap causing the focus escape we're trying to fix)
1517
1517
  target: a.mostRecentlyFocusedNode,
1518
1518
  isBackward: l.isKeyBackward(a.recentNavEvent)
1519
- })), b(N || a.mostRecentlyFocusedNode || u());
1519
+ })), b(N || a.mostRecentlyFocusedNode || d());
1520
1520
  }
1521
1521
  a.recentNavEvent = void 0;
1522
1522
  }, J = function(p) {
@@ -1537,8 +1537,8 @@ var $t = {
1537
1537
  }, B = function() {
1538
1538
  if (a.active)
1539
1539
  return $t.activateTrap(o, i), a.delayInitialFocusTimer = l.delayInitialFocus ? At(function() {
1540
- b(u());
1541
- }) : b(u()), t.addEventListener("focusin", H, !0), t.addEventListener("mousedown", j, {
1540
+ b(d());
1541
+ }) : b(d()), t.addEventListener("focusin", H, !0), t.addEventListener("mousedown", j, {
1542
1542
  capture: !0,
1543
1543
  passive: !1
1544
1544
  }), t.addEventListener("touchstart", j, {
@@ -1561,7 +1561,7 @@ var $t = {
1561
1561
  return L === a.mostRecentlyFocusedNode;
1562
1562
  });
1563
1563
  });
1564
- m && b(u());
1564
+ m && b(d());
1565
1565
  }, ue = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(T) : void 0, ie = function() {
1566
1566
  ue && (ue.disconnect(), a.active && !a.paused && a.containers.map(function(p) {
1567
1567
  ue.observe(p, {
@@ -1670,7 +1670,7 @@ const ia = /* @__PURE__ */ V({
1670
1670
  const n = e, t = Te(e, "disabled");
1671
1671
  return (o, l) => t.value ? F(o.$slots, "default", { key: 0 }) : (y(), Z(
1672
1672
  f(ia),
1673
- Re(de({ key: 1 }, n)),
1673
+ Re(pe({ key: 1 }, n)),
1674
1674
  {
1675
1675
  default: R(() => [
1676
1676
  F(o.$slots, "default")
@@ -1732,7 +1732,7 @@ const ba = () => {
1732
1732
  const n = e, t = ba(), o = () => {
1733
1733
  const a = parseInt(document.body.getAttribute(Ae) || "0", 10);
1734
1734
  return isFinite(a) ? a : 0;
1735
- }, l = ({ left: a, top: i, right: r, gap: c }, d, u = "margin", s) => `
1735
+ }, l = ({ left: a, top: i, right: r, gap: c }, u, d = "margin", s) => `
1736
1736
  .${ca} {
1737
1737
  overflow: hidden ${s};
1738
1738
  padding-right: ${c}px ${s};
@@ -1741,8 +1741,8 @@ const ba = () => {
1741
1741
  overflow: hidden ${s};
1742
1742
  overscroll-behavior: contain;
1743
1743
  ${[
1744
- d && `position: relative ${s};`,
1745
- u === "margin" && `
1744
+ u && `position: relative ${s};`,
1745
+ d === "margin" && `
1746
1746
  padding-left: ${a}px;
1747
1747
  padding-top: ${i}px;
1748
1748
  padding-right: ${r}px;
@@ -1750,7 +1750,7 @@ const ba = () => {
1750
1750
  margin-top:0;
1751
1751
  margin-right: ${c}px ${s};
1752
1752
  `,
1753
- u === "padding" && `padding-right: ${c}px ${s};`
1753
+ d === "padding" && `padding-right: ${c}px ${s};`
1754
1754
  ].filter(Boolean).join("")}
1755
1755
  }
1756
1756
 
@@ -1787,14 +1787,14 @@ const ba = () => {
1787
1787
  }
1788
1788
  }), ya = K(ha);
1789
1789
  function wa(e, n, t, o) {
1790
- const l = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", r = e.getBoundingClientRect(), c = n.getBoundingClientRect(), d = t == null ? void 0 : t.getBoundingClientRect(), u = _a(r, c, i, l), s = Ea(r, c, u), v = ka(s, u, l), b = $a(v, u, a), h = xa(b, c, u);
1790
+ const l = (o == null ? void 0 : o.offset) ?? 0, a = (o == null ? void 0 : o.crossOffset) ?? 0, i = (o == null ? void 0 : o.placement) ?? "bottom", r = e.getBoundingClientRect(), c = n.getBoundingClientRect(), u = t == null ? void 0 : t.getBoundingClientRect(), d = _a(r, c, i, l), s = Ea(r, c, d), v = ka(s, d, l), b = $a(v, d, a), h = xa(b, c, d);
1791
1791
  let _;
1792
1792
  if (o != null && o.arrow) {
1793
- if (!d)
1793
+ if (!u)
1794
1794
  throw new Error("[Quidgest UI] The arrow element must exist to compute its position");
1795
- _ = Aa(h, r, c, d, u);
1795
+ _ = Aa(h, r, c, u, d);
1796
1796
  }
1797
- return { overlayCoords: h, arrowCoords: _, placement: u };
1797
+ return { overlayCoords: h, arrowCoords: _, placement: d };
1798
1798
  }
1799
1799
  function _a(e, n, t, o) {
1800
1800
  const l = Et(e, n, t, o);
@@ -1871,13 +1871,13 @@ function Ea(e, n, t) {
1871
1871
  }
1872
1872
  if (!l)
1873
1873
  return r;
1874
- const c = Je(t) === "y" ? "height" : "width", d = Je(t), u = e[c] / 2 - n[c] / 2;
1874
+ const c = Je(t) === "y" ? "height" : "width", u = Je(t), d = e[c] / 2 - n[c] / 2;
1875
1875
  switch (l) {
1876
1876
  case "start":
1877
- r[d] -= u;
1877
+ r[u] -= d;
1878
1878
  break;
1879
1879
  case "end":
1880
- r[d] += u;
1880
+ r[u] += d;
1881
1881
  break;
1882
1882
  default:
1883
1883
  throw new Error(`[Quidgest UI] Invalid alignment value: ${l}`);
@@ -1971,7 +1971,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
1971
1971
  "q-overlay--center": t.centerVertically
1972
1972
  },
1973
1973
  t.class
1974
- ]), r = w(() => t.anchor === void 0), c = w(() => l.value && !t.nonModal), d = w(() => (l.value || s.animating) && t.scrollLock), u = w(() => !t.inline && (l.value || s.animating)), s = ze({
1974
+ ]), r = w(() => t.anchor === void 0), c = w(() => l.value && !t.nonModal), u = w(() => (l.value || s.animating) && t.scrollLock), d = w(() => !t.inline && (l.value || s.animating)), s = ze({
1975
1975
  animating: !1,
1976
1976
  top: 0,
1977
1977
  left: 0,
@@ -1985,7 +1985,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
1985
1985
  se(l, k);
1986
1986
  const b = w(() => {
1987
1987
  if (r.value) return;
1988
- const S = L(), pe = t.width === "anchor", g = pe ? S == null ? void 0 : S.getBoundingClientRect().width : void 0;
1988
+ const S = L(), fe = t.width === "anchor", g = fe ? S == null ? void 0 : S.getBoundingClientRect().width : void 0;
1989
1989
  return {
1990
1990
  top: `${s.top}px`,
1991
1991
  left: `${s.left}px`,
@@ -2003,7 +2003,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2003
2003
  const S = L();
2004
2004
  if (!S || !j.value)
2005
2005
  return;
2006
- const pe = {
2006
+ const fe = {
2007
2007
  placement: t.placement,
2008
2008
  width: t.width,
2009
2009
  offset: t.offset,
@@ -2013,7 +2013,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2013
2013
  S,
2014
2014
  j.value,
2015
2015
  (_ == null ? void 0 : _.value) ?? void 0,
2016
- pe
2016
+ fe
2017
2017
  );
2018
2018
  s.left = g.overlayCoords.x, s.top = g.overlayCoords.y, s.placement = g.placement, v.hidden = g.arrowCoords === void 0, g.arrowCoords && (v.top = g.arrowCoords.y, v.left = g.arrowCoords.x);
2019
2019
  }
@@ -2067,7 +2067,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2067
2067
  t.persistent && S.preventDefault();
2068
2068
  }
2069
2069
  function I(S) {
2070
- var pe;
2070
+ var fe;
2071
2071
  if (t.persistent) {
2072
2072
  S.preventDefault();
2073
2073
  return;
@@ -2075,7 +2075,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2075
2075
  let g = !1;
2076
2076
  S.defaultPrevented || S.detail.originalEvent.type === "pointerdown" && (g = !0);
2077
2077
  const E = S.detail.originalEvent.target;
2078
- if ((pe = L()) != null && pe.contains(E)) {
2078
+ if ((fe = L()) != null && fe.contains(E)) {
2079
2079
  S.preventDefault();
2080
2080
  return;
2081
2081
  }
@@ -2133,12 +2133,12 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2133
2133
  }
2134
2134
  return Me(() => {
2135
2135
  De(ae);
2136
- }), dn(ce), (S, pe) => (y(), x(
2136
+ }), dn(ce), (S, fe) => (y(), x(
2137
2137
  ve,
2138
2138
  null,
2139
2139
  [
2140
2140
  (y(), Z(pn, {
2141
- disabled: !u.value,
2141
+ disabled: !d.value,
2142
2142
  to: t.attach
2143
2143
  }, [
2144
2144
  D(bt, {
@@ -2194,7 +2194,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2194
2194
  options: { fallbackFocus: H.value }
2195
2195
  }, {
2196
2196
  default: R(() => [
2197
- M("div", de({
2197
+ M("div", pe({
2198
2198
  ref_key: "overlayRef",
2199
2199
  ref: j,
2200
2200
  class: "q-overlay__content",
@@ -2231,7 +2231,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2231
2231
  /* FORWARDED */
2232
2232
  }, 8, ["name"])
2233
2233
  ], 8, ["disabled", "to"])),
2234
- d.value ? (y(), Z(f(ya), { key: 0 })) : U("v-if", !0)
2234
+ u.value ? (y(), Z(f(ya), { key: 0 })) : U("v-if", !0)
2235
2235
  ],
2236
2236
  64
2237
2237
  /* STABLE_FRAGMENT */
@@ -2300,17 +2300,17 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2300
2300
  emits: /* @__PURE__ */ be(["enter", "leave"], ["update:modelValue"]),
2301
2301
  setup(e, { emit: n }) {
2302
2302
  const t = e, o = n, l = Te(e, "modelValue"), a = q(""), i = q(""), r = w(() => ["q-dialog", t.class]), c = w(() => `q-overlay--${t.size}`);
2303
- function d() {
2303
+ function u() {
2304
2304
  l.value = !1;
2305
2305
  }
2306
- function u(b) {
2306
+ function d(b) {
2307
2307
  var h, _;
2308
2308
  if (b.action) {
2309
2309
  if ((h = t.input) != null && h.validator && (i.value = t.input.validator(f(a)), f(i)))
2310
2310
  return;
2311
2311
  (_ = b.action) == null || _.call(b, f(a));
2312
2312
  }
2313
- d();
2313
+ u();
2314
2314
  }
2315
2315
  function s() {
2316
2316
  o("enter");
@@ -2412,14 +2412,14 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2412
2412
  (y(!0), x(
2413
2413
  ve,
2414
2414
  null,
2415
- qe(t.buttons, (_) => (y(), Z(f(oe), de({ ref_for: !0 }, _.props, {
2415
+ qe(t.buttons, (_) => (y(), Z(f(oe), pe({ ref_for: !0 }, _.props, {
2416
2416
  key: _.id,
2417
- onClick: () => u(_)
2417
+ onClick: () => d(_)
2418
2418
  }), {
2419
2419
  default: R(() => [
2420
2420
  _.icon ? (y(), Z(
2421
2421
  f(Y),
2422
- de({
2422
+ pe({
2423
2423
  key: 0,
2424
2424
  ref_for: !0
2425
2425
  }, _.icon),
@@ -2441,7 +2441,7 @@ const Ba = ["id"], La = ["role"], Ra = /* @__PURE__ */ V({
2441
2441
  key: 3,
2442
2442
  class: "q-dialog__close",
2443
2443
  variant: "text",
2444
- onClick: d
2444
+ onClick: u
2445
2445
  }, {
2446
2446
  default: R(() => [
2447
2447
  D(
@@ -2495,13 +2495,13 @@ const Qa = /* @__PURE__ */ V({
2495
2495
  return (r, c) => (y(!0), x(
2496
2496
  ve,
2497
2497
  null,
2498
- qe(f(l), (d) => (y(), Z(f(Kt), de({
2499
- key: d.id,
2498
+ qe(f(l), (u) => (y(), Z(f(Kt), pe({
2499
+ key: u.id,
2500
2500
  ref_for: !0
2501
- }, d.props, {
2501
+ }, u.props, {
2502
2502
  "model-value": "",
2503
2503
  inline: t.inline,
2504
- onLeave: () => i(d.id)
2504
+ onLeave: () => i(u.id)
2505
2505
  }), null, 16, ["inline", "onLeave"]))),
2506
2506
  128
2507
2507
  /* KEYED_FRAGMENT */
@@ -2537,19 +2537,19 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
2537
2537
  setup(e) {
2538
2538
  const n = e, t = Te(e, "modelValue"), o = w({
2539
2539
  get: () => t.value,
2540
- set: (d) => {
2541
- const u = n.maxLength;
2542
- t.value = u ? d == null ? void 0 : d.slice(0, u) : d;
2540
+ set: (u) => {
2541
+ const d = n.maxLength;
2542
+ t.value = d ? u == null ? void 0 : u.slice(0, d) : u;
2543
2543
  }
2544
2544
  });
2545
- se(t, (d) => o.value = d, { immediate: !0 });
2545
+ se(t, (u) => o.value = u, { immediate: !0 });
2546
2546
  const l = vt(n.id), a = w(
2547
2547
  () => n.readonly || n.disabled ? void 0 : n.placeholder
2548
2548
  ), i = w(() => ({ input: n.autosize ? c : null })), r = q(), { triggerResize: c } = Co({
2549
2549
  element: w(() => n.autosize ? r.value : void 0),
2550
2550
  styleProp: "minHeight"
2551
2551
  });
2552
- return (d, u) => (y(), Z(f(Vt), {
2552
+ return (u, d) => (y(), Z(f(Vt), {
2553
2553
  class: X(["q-text-area", n.class]),
2554
2554
  for: f(l),
2555
2555
  label: n.label,
@@ -2559,17 +2559,17 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
2559
2559
  required: n.required
2560
2560
  }, Rt({
2561
2561
  "label.prepend": R(() => [
2562
- F(d.$slots, "label.prepend")
2562
+ F(u.$slots, "label.prepend")
2563
2563
  ]),
2564
2564
  "label.append": R(() => [
2565
- F(d.$slots, "label.append")
2565
+ F(u.$slots, "label.append")
2566
2566
  ]),
2567
2567
  default: R(() => [
2568
- Tt(M("textarea", de({
2568
+ Tt(M("textarea", pe({
2569
2569
  id: f(l),
2570
2570
  ref_key: "textareaRef",
2571
2571
  ref: r,
2572
- "onUpdate:modelValue": u[0] || (u[0] = (s) => o.value = s),
2572
+ "onUpdate:modelValue": d[0] || (d[0] = (s) => o.value = s),
2573
2573
  class: "q-text-area__input",
2574
2574
  required: n.required,
2575
2575
  placeholder: a.value,
@@ -2580,31 +2580,31 @@ const Ya = ["id", "required", "placeholder", "readonly", "disabled", "maxlength"
2580
2580
  cols: n.cols,
2581
2581
  resize: n.resize,
2582
2582
  wrap: n.wrap
2583
- }, d.$attrs, fn(i.value, !0)), null, 16, Ya), [
2583
+ }, u.$attrs, fn(i.value, !0)), null, 16, Ya), [
2584
2584
  [vn, o.value]
2585
2585
  ])
2586
2586
  ]),
2587
2587
  _: 2
2588
2588
  /* DYNAMIC */
2589
2589
  }, [
2590
- d.$slots.prepend ? {
2590
+ u.$slots.prepend ? {
2591
2591
  name: "prepend",
2592
2592
  fn: R(() => [
2593
- F(d.$slots, "prepend")
2593
+ F(u.$slots, "prepend")
2594
2594
  ]),
2595
2595
  key: "0"
2596
2596
  } : void 0,
2597
- d.$slots.append ? {
2597
+ u.$slots.append ? {
2598
2598
  name: "append",
2599
2599
  fn: R(() => [
2600
- F(d.$slots, "append")
2600
+ F(u.$slots, "append")
2601
2601
  ]),
2602
2602
  key: "1"
2603
2603
  } : void 0,
2604
- d.$slots.extras ? {
2604
+ u.$slots.extras ? {
2605
2605
  name: "extras",
2606
2606
  fn: R(() => [
2607
- F(d.$slots, "extras")
2607
+ F(u.$slots, "extras")
2608
2608
  ]),
2609
2609
  key: "2"
2610
2610
  } : void 0
@@ -2645,7 +2645,7 @@ function ke() {
2645
2645
  };
2646
2646
  }
2647
2647
  async function Ct(e, n) {
2648
- var d, u, s, v, b, h, _;
2648
+ var u, d, s, v, b, h, _;
2649
2649
  const t = new AbortController(), o = t.signal, a = (await Nt({
2650
2650
  ...e,
2651
2651
  headers: {
@@ -2662,7 +2662,7 @@ async function Ct(e, n) {
2662
2662
  for (; ; ) {
2663
2663
  const { done: j, value: H } = await i.read();
2664
2664
  if (j) {
2665
- (d = n.onDone) == null || d.call(n);
2665
+ (u = n.onDone) == null || u.call(n);
2666
2666
  break;
2667
2667
  }
2668
2668
  const J = r.decode(H, { stream: !0 });
@@ -2680,7 +2680,7 @@ async function Ct(e, n) {
2680
2680
  const T = JSON.parse($);
2681
2681
  switch (B) {
2682
2682
  case "message":
2683
- (u = n.onMessage) == null || u.call(n, T.value);
2683
+ (d = n.onMessage) == null || d.call(n, T.value);
2684
2684
  break;
2685
2685
  case "tool-status":
2686
2686
  (s = n.onToolStatus) == null || s.call(
@@ -2711,11 +2711,11 @@ async function Ct(e, n) {
2711
2711
  }
2712
2712
  function en(e) {
2713
2713
  const n = q(!1), t = q(null);
2714
- async function o(u) {
2714
+ async function o(d) {
2715
2715
  n.value = !0, t.value = null;
2716
2716
  try {
2717
2717
  return { data: (await Nt({
2718
- ...u,
2718
+ ...d,
2719
2719
  baseURL: e
2720
2720
  })).data, error: null };
2721
2721
  } catch (s) {
@@ -2726,26 +2726,26 @@ function en(e) {
2726
2726
  }
2727
2727
  return { data: null, error: new Error("Unknown error occurred in baseRequest") };
2728
2728
  }
2729
- async function l(u, s, v, b) {
2729
+ async function l(d, s, v, b) {
2730
2730
  return await o({
2731
2731
  method: "POST",
2732
2732
  url: "/prompt/load",
2733
2733
  data: {
2734
- username: u,
2734
+ username: d,
2735
2735
  project: s,
2736
2736
  agentID: v,
2737
2737
  formId: b
2738
2738
  }
2739
2739
  });
2740
2740
  }
2741
- async function a(u, s, v, b, h) {
2741
+ async function a(d, s, v, b, h) {
2742
2742
  n.value = !0;
2743
2743
  try {
2744
2744
  return await Ct(
2745
2745
  {
2746
2746
  method: "POST",
2747
2747
  url: `${e}/prompt/submit`,
2748
- data: u
2748
+ data: d
2749
2749
  },
2750
2750
  {
2751
2751
  onMessage: (_) => {
@@ -2763,16 +2763,16 @@ function en(e) {
2763
2763
  throw n.value = !1, b == null || b(_), console.error("Error in sendPrompt:", _), _;
2764
2764
  }
2765
2765
  }
2766
- async function i(u) {
2766
+ async function i(d) {
2767
2767
  return await o({
2768
2768
  method: "POST",
2769
2769
  url: "/prompt/cancel-execution",
2770
2770
  data: {
2771
- sessionId: u
2771
+ sessionId: d
2772
2772
  }
2773
2773
  });
2774
2774
  }
2775
- async function r(u, s, v, b) {
2775
+ async function r(d, s, v, b) {
2776
2776
  n.value = !0;
2777
2777
  try {
2778
2778
  return await Ct(
@@ -2780,7 +2780,7 @@ function en(e) {
2780
2780
  method: "POST",
2781
2781
  url: `${e}/get-job-result`,
2782
2782
  data: {
2783
- jobId: u
2783
+ jobId: d
2784
2784
  }
2785
2785
  },
2786
2786
  {
@@ -2793,12 +2793,12 @@ function en(e) {
2793
2793
  t.value = h, b == null || b(h), n.value = !1;
2794
2794
  }
2795
2795
  }
2796
- async function c(u, s, v, b, h) {
2796
+ async function c(d, s, v, b, h) {
2797
2797
  return await o({
2798
2798
  method: "POST",
2799
2799
  url: "/prompt/clear",
2800
2800
  data: {
2801
- username: u,
2801
+ username: d,
2802
2802
  project: s,
2803
2803
  agentId: v,
2804
2804
  formId: b,
@@ -2806,13 +2806,13 @@ function en(e) {
2806
2806
  }
2807
2807
  });
2808
2808
  }
2809
- async function d(u, s, v) {
2809
+ async function u(d, s, v) {
2810
2810
  return await o({
2811
2811
  method: "POST",
2812
2812
  url: "/prompt/feedback",
2813
2813
  data: {
2814
2814
  messageSessionID: v,
2815
- feedbackValue: u,
2815
+ feedbackValue: d,
2816
2816
  feedbackComment: s
2817
2817
  }
2818
2818
  });
@@ -2825,7 +2825,7 @@ function en(e) {
2825
2825
  getJobResultData: r,
2826
2826
  sendPrompt: a,
2827
2827
  cancelExecution: i,
2828
- handleFeedback: d
2828
+ handleFeedback: u
2829
2829
  };
2830
2830
  }
2831
2831
  const el = ["innerHTML"], tl = {
@@ -2849,33 +2849,33 @@ const el = ["innerHTML"], tl = {
2849
2849
  ...n.options ?? {}
2850
2850
  })
2851
2851
  );
2852
- n.plugins && n.plugins.forEach((u) => t.value.use(u));
2852
+ n.plugins && n.plugins.forEach((d) => t.value.use(d));
2853
2853
  const o = w(() => t.value.render(n.source)), l = w(() => n.source.includes('data-type="execution-plan"')), a = w(() => {
2854
2854
  if (!l.value) return "";
2855
2855
  const s = n.source.split(/\n|<br>/).find((v) => v.includes('data-type="execution-plan"'));
2856
2856
  return s ? t.value.render(s) : "";
2857
2857
  }), i = w(() => {
2858
2858
  if (!l.value) return "";
2859
- const u = n.source.split(/\n|<br>/), s = u.findIndex((b) => b.includes('data-type="execution-plan"'));
2859
+ const d = n.source.split(/\n|<br>/), s = d.findIndex((b) => b.includes('data-type="execution-plan"'));
2860
2860
  if (s === -1) return "";
2861
- const v = u.slice(s + 1).join(`
2861
+ const v = d.slice(s + 1).join(`
2862
2862
  `);
2863
2863
  return t.value.render(v);
2864
2864
  }), r = w(() => n.source.includes('data-type="execution-progress"')), c = w(() => {
2865
2865
  if (!r.value) return "";
2866
2866
  const s = n.source.split(/\n|<br>/).find((v) => v.includes('data-type="execution-progress"'));
2867
2867
  return s ? t.value.render(s) : "";
2868
- }), d = w(() => {
2868
+ }), u = w(() => {
2869
2869
  if (!r.value) return "";
2870
- const u = n.source.split(/\n|<br>/), s = u.findIndex(
2870
+ const d = n.source.split(/\n|<br>/), s = d.findIndex(
2871
2871
  (b) => b.includes('data-type="execution-progress"')
2872
2872
  );
2873
2873
  if (s === -1) return "";
2874
- const v = u.slice(s + 1).join(`
2874
+ const v = d.slice(s + 1).join(`
2875
2875
  `);
2876
2876
  return t.value.render(v);
2877
2877
  });
2878
- return (u, s) => !l.value && !r.value ? (y(), x("div", {
2878
+ return (d, s) => !l.value && !r.value ? (y(), x("div", {
2879
2879
  key: 0,
2880
2880
  class: "markdown-renderer",
2881
2881
  innerHTML: o.value
@@ -2888,10 +2888,10 @@ const el = ["innerHTML"], tl = {
2888
2888
  }, null, 8, ol)) : U("", !0)
2889
2889
  ])) : r.value ? (y(), x("div", al, [
2890
2890
  M("div", { innerHTML: c.value }, null, 8, ll),
2891
- d.value ? (y(), x("div", {
2891
+ u.value ? (y(), x("div", {
2892
2892
  key: 0,
2893
2893
  class: "markdown-renderer__execution-progress-content",
2894
- innerHTML: d.value
2894
+ innerHTML: u.value
2895
2895
  }, null, 8, il)) : U("", !0)
2896
2896
  ])) : U("", !0);
2897
2897
  }
@@ -2922,12 +2922,12 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
2922
2922
  },
2923
2923
  emits: ["apply", "regenerate"],
2924
2924
  setup(e, { emit: n }) {
2925
- const t = e, o = n, l = ke(), a = q(t.applied), i = q(!1), r = w(() => t.disabled || a.value), c = w(() => t.disabled || i.value), d = w(() => t.type === "text" || t.type === "multiline_text" ? Ge : "div"), u = w(() => {
2925
+ const t = e, o = n, l = ke(), a = q(t.applied), i = q(!1), r = w(() => t.disabled || a.value), c = w(() => t.disabled || i.value), u = w(() => t.type === "text" || t.type === "multiline_text" ? Ge : "div"), d = w(() => {
2926
2926
  const h = {};
2927
- return d.value === Ge ? h.source = t.text : h.innerHTML = t.text, h;
2927
+ return u.value === Ge ? h.source = t.text : h.innerHTML = t.text, h;
2928
2928
  }), s = w(() => {
2929
2929
  const h = ["q-field-preview__content"];
2930
- return d.value !== Ge && h.push("preserve-whitespace"), h;
2930
+ return u.value !== Ge && h.push("preserve-whitespace"), h;
2931
2931
  });
2932
2932
  function v() {
2933
2933
  if (a.value) return;
@@ -2951,7 +2951,7 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
2951
2951
  M("div", {
2952
2952
  class: X(s.value)
2953
2953
  }, [
2954
- (y(), Z(Bt(d.value), Re(je(u.value)), null, 16))
2954
+ (y(), Z(Bt(u.value), Re(je(d.value)), null, 16))
2955
2955
  ], 2),
2956
2956
  M("div", ul, [
2957
2957
  D(f(jt), { borderless: "" }, {
@@ -3046,11 +3046,11 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
3046
3046
  return ((A = t.file) == null ? void 0 : A.fileData.type.startsWith("image/")) ?? !1;
3047
3047
  }), c = w(
3048
3048
  () => t.sender === "bot" ? t.chatbotImage : t.userImage
3049
- ), d = w(() => {
3049
+ ), u = w(() => {
3050
3050
  var P;
3051
3051
  const A = (P = t.message) == null ? void 0 : P.match(/<span data-type="tool-calling">(.*?)<\/span>/);
3052
3052
  return A ? A[1] : "";
3053
- }), u = w(
3053
+ }), d = w(
3054
3054
  () => {
3055
3055
  var A;
3056
3056
  return ((A = t.message) == null ? void 0 : A.replace(/<span data-type="tool-calling">.*?<\/span>/, "")) ?? "";
@@ -3130,14 +3130,14 @@ const sl = ["data-testid"], cl = { class: "q-field-preview__toolbar" }, ul = { c
3130
3130
  t.sender === "bot" ? (y(), Z(f(Ge), {
3131
3131
  key: 0,
3132
3132
  class: "q-chatbot__text",
3133
- source: u.value || ""
3133
+ source: d.value || ""
3134
3134
  }, null, 8, ["source"])) : (y(), x("div", Al, re(t.message), 1))
3135
3135
  ], 64))
3136
3136
  ]),
3137
- d.value ? (y(), x("div", El, [
3137
+ u.value ? (y(), x("div", El, [
3138
3138
  D(St, {
3139
3139
  class: "q-chatbot__text",
3140
- text: d.value
3140
+ text: u.value
3141
3141
  }, null, 8, ["text"])
3142
3142
  ])) : U("", !0)
3143
3143
  ]),
@@ -3188,18 +3188,18 @@ function nn(e, n, t) {
3188
3188
  }
3189
3189
  const we = q([]), Oe = q(1);
3190
3190
  function on() {
3191
- function e(a, i, r, c, d) {
3192
- const u = {
3191
+ function e(a, i, r, c, u) {
3192
+ const d = {
3193
3193
  id: Oe.value++,
3194
3194
  message: a,
3195
3195
  date: /* @__PURE__ */ new Date(),
3196
3196
  sender: i || "bot",
3197
3197
  sessionID: c || nn(),
3198
3198
  file: r,
3199
- isWelcomeMessage: d,
3199
+ isWelcomeMessage: u,
3200
3200
  fields: []
3201
3201
  };
3202
- return we.value.push(u), u;
3202
+ return we.value.push(d), d;
3203
3203
  }
3204
3204
  function n() {
3205
3205
  return we.value.find((a) => a.id === Oe.value - 1);
@@ -3241,7 +3241,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3241
3241
  },
3242
3242
  emits: ["submit-feedback", "copy-response", "apply-all", "approve-proceed-plan", "cancel-execution"],
3243
3243
  setup(e, { emit: n }) {
3244
- const t = e, o = n, l = ke(), { getLastMessage: a } = on(), i = q(!1), r = q(""), c = q(null), d = q(!1), u = q(!1), s = q(!1), v = w(() => t.loading || d.value), b = w(() => u.value || !t.isLastMessage || t.loading || t.isStreaming), h = w(() => s.value || t.cancelExecutionDisabled || !t.isLastMessage || t.loading), _ = t.date || /* @__PURE__ */ new Date(), j = a(), H = w(() => j ? j.fields && j.fields.length > 1 : !1), J = w(() => t.isExecutionPlan), A = w(() => t.showCancelExecution), P = [
3244
+ const t = e, o = n, l = ke(), { getLastMessage: a } = on(), i = q(!1), r = q(""), c = q(null), u = q(!1), d = q(!1), s = q(!1), v = w(() => t.loading || u.value), b = w(() => d.value || !t.isLastMessage || t.loading || t.isStreaming), h = w(() => s.value || t.cancelExecutionDisabled || !t.isLastMessage || t.loading), _ = t.date || /* @__PURE__ */ new Date(), j = a(), H = w(() => j ? j.fields && j.fields.length > 1 : !1), J = w(() => t.isExecutionPlan), A = w(() => t.showCancelExecution), P = [
3245
3245
  {
3246
3246
  id: "confirm-btn",
3247
3247
  action: N,
@@ -3278,10 +3278,10 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3278
3278
  T(1);
3279
3279
  }
3280
3280
  function p() {
3281
- d.value || (d.value = !0, o("apply-all"));
3281
+ u.value || (u.value = !0, o("apply-all"));
3282
3282
  }
3283
3283
  function m() {
3284
- u.value || (u.value = !0, o("approve-proceed-plan"));
3284
+ d.value || (d.value = !0, o("approve-proceed-plan"));
3285
3285
  }
3286
3286
  function k() {
3287
3287
  s.value || (s.value = !0, o("cancel-execution"));
@@ -3434,10 +3434,10 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3434
3434
  }));
3435
3435
  return s == null || s.push(a), s || [a];
3436
3436
  });
3437
- function d() {
3437
+ function u() {
3438
3438
  o("clear");
3439
3439
  }
3440
- function u(s) {
3440
+ function d(s) {
3441
3441
  const v = c.value.find((b) => b.key === s);
3442
3442
  if (v) {
3443
3443
  if (v.key === a.key) {
@@ -3456,7 +3456,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3456
3456
  modelValue: r.value,
3457
3457
  "onUpdate:modelValue": [
3458
3458
  v[0] || (v[0] = (h) => r.value = h),
3459
- u
3459
+ d
3460
3460
  ],
3461
3461
  inline: "",
3462
3462
  required: "",
@@ -3470,7 +3470,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3470
3470
  disabled: t.disabled,
3471
3471
  class: "q-chatbot__tools-clear",
3472
3472
  borderless: "",
3473
- onClick: d
3473
+ onClick: u
3474
3474
  }, {
3475
3475
  default: R(() => [
3476
3476
  D(f(Y), { icon: "bin" })
@@ -3497,7 +3497,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3497
3497
  },
3498
3498
  emits: ["send-message"],
3499
3499
  setup(e, { emit: n }) {
3500
- const t = e, o = n, l = ke(), a = q(null), i = q(null), r = q(""), c = q(!1), d = w(() => ".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"), u = w(() => i.value ? i.value.type.startsWith("image/") ?? !1 : !1), s = q(t.userPrompt ?? ""), v = w(() => t.disabled || t.loading || s.value.trim().length === 0);
3500
+ const t = e, o = n, l = ke(), a = q(null), i = q(null), r = q(""), c = q(!1), u = w(() => ".png,.jpeg,.jpg,.svg,.webp,.pdf,.doc,.docx"), d = w(() => i.value ? i.value.type.startsWith("image/") ?? !1 : !1), s = q(t.userPrompt ?? ""), v = w(() => t.disabled || t.loading || s.value.trim().length === 0);
3501
3501
  function b(B) {
3502
3502
  B.preventDefault(), t.disabled || (c.value = !0);
3503
3503
  }
@@ -3553,7 +3553,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3553
3553
  }, [
3554
3554
  M("div", Pl, [
3555
3555
  i.value ? (y(), x("div", Ol, [
3556
- u.value ? (y(), x("img", {
3556
+ d.value ? (y(), x("img", {
3557
3557
  key: 0,
3558
3558
  class: "q-chatbot__image-preview",
3559
3559
  src: r.value,
@@ -3609,7 +3609,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3609
3609
  ref_key: "fileInput",
3610
3610
  ref: a,
3611
3611
  type: "file",
3612
- accept: d.value,
3612
+ accept: u.value,
3613
3613
  class: "hidden-input",
3614
3614
  onChange: Q
3615
3615
  }, null, 40, Hl),
@@ -3651,7 +3651,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3651
3651
  },
3652
3652
  emits: ["apply-fields", "direct-agent-chat"],
3653
3653
  setup(e, { emit: n }) {
3654
- const t = e, o = n, l = q(!0), a = q(null), i = q(!0), r = q(t.agentData.id), c = q(t.agentData.formId), d = ke(), { isLoading: u, clearChatData: s, getChatData: v, getJobResultData: b, sendPrompt: h, cancelExecution: _ } = en(t.apiEndpoint), { messages: j, addChatMessage: H, clearMessages: J, getLastMessage: A, deleteMessageById: P } = on(), Q = w(() => l.value || u.value), B = /<span data-type="tool-calling">.*?<\/span>/, $ = ze({
3654
+ const t = e, o = n, l = q(!0), a = q(null), i = q(!0), r = q(t.agentData.id), c = q(t.agentData.formId), u = ke(), { isLoading: d, clearChatData: s, getChatData: v, getJobResultData: b, sendPrompt: h, cancelExecution: _ } = en(t.apiEndpoint), { messages: j, addChatMessage: H, clearMessages: J, getLastMessage: A, deleteMessageById: P } = on(), Q = w(() => l.value || d.value), B = /<span data-type="tool-calling">.*?<\/span>/, $ = ze({
3655
3655
  active: !1,
3656
3656
  sessionId: "",
3657
3657
  cancelling: !1,
@@ -3714,7 +3714,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3714
3714
  try {
3715
3715
  await z();
3716
3716
  } catch (g) {
3717
- H(d.loginError), console.error("Error logging in: " + g);
3717
+ H(u.loginError), console.error("Error logging in: " + g);
3718
3718
  }
3719
3719
  }
3720
3720
  async function z() {
@@ -3726,7 +3726,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3726
3726
  c.value
3727
3727
  );
3728
3728
  if (E || !g || !g.success) {
3729
- C(!0), H(d.botIsSick), console.log("Error loading chat data: " + E);
3729
+ C(!0), H(u.botIsSick), console.log("Error loading chat data: " + E);
3730
3730
  return;
3731
3731
  }
3732
3732
  C(!1), G(), g.history.forEach(async (O) => {
@@ -3740,7 +3740,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3740
3740
  });
3741
3741
  }
3742
3742
  function G() {
3743
- const g = d.initialMessage;
3743
+ const g = u.initialMessage;
3744
3744
  H(g, "bot", void 0, void 0, !0);
3745
3745
  }
3746
3746
  function ae() {
@@ -3784,35 +3784,35 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3784
3784
  });
3785
3785
  },
3786
3786
  (O) => {
3787
- C(!0), H(d.botIsSick), console.error("Error getting job result: " + O), P(E.id);
3787
+ C(!0), H(u.botIsSick), console.error("Error getting job result: " + O), P(E.id);
3788
3788
  }
3789
3789
  );
3790
3790
  }
3791
3791
  async function ge(g, E) {
3792
- const O = nn(), W = g.trim().toLowerCase() === d.approveProceedPlan.toLowerCase(), ne = new FormData();
3792
+ const O = nn(), W = g.trim().toLowerCase() === u.approveProceedPlan.toLowerCase(), ne = new FormData();
3793
3793
  if (E && ne.append("file", E), ne.append("message", g), ne.append("project", t.projectPath), ne.append("user", t.username), ne.append("sessionID", O), r.value !== "")
3794
3794
  o("direct-agent-chat", r.value, g);
3795
3795
  else {
3796
3796
  H("", "bot");
3797
- const fe = A();
3798
- if (!fe) return;
3797
+ const de = A();
3798
+ if (!de) return;
3799
3799
  W && p(O);
3800
3800
  let Ye = null;
3801
3801
  try {
3802
3802
  await h(
3803
3803
  ne,
3804
3804
  (le) => {
3805
- fe && (Ye === "tools" && le.trim() && (L(fe), Ye = "text", $.callingTools = !1), fe.message += le);
3805
+ de && (Ye === "tools" && le.trim() && (L(de), Ye = "text", $.callingTools = !1), de.message += le);
3806
3806
  },
3807
3807
  (le) => {
3808
3808
  var mt;
3809
- (mt = le == null ? void 0 : le.data) != null && mt.html && (le.event === "tool_start" ? (k(fe, le.data.html), Ye = "tools", $.callingTools = !0) : le.event === "tool_end" && N(fe, le.data.html));
3809
+ (mt = le == null ? void 0 : le.data) != null && mt.html && (le.event === "tool_start" ? (k(de, le.data.html), Ye = "tools", $.callingTools = !0) : le.event === "tool_end" && (N(de, le.data.html), k(de, u.generatingResponse), $.callingTools = !0));
3810
3810
  },
3811
3811
  (le) => {
3812
- C(!0), H(d.botIsSick), console.error("Error sending message: " + le), P(fe.id), W && m();
3812
+ C(!0), H(u.botIsSick), console.error("Error sending message: " + le), P(de.id), W && m();
3813
3813
  },
3814
3814
  () => {
3815
- L(fe), W && m();
3815
+ L(de), W && m();
3816
3816
  }
3817
3817
  );
3818
3818
  } catch (le) {
@@ -3829,7 +3829,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3829
3829
  E
3830
3830
  );
3831
3831
  if (W || !O || !O.success) {
3832
- C(!0), H(d.loginError), console.log("Error clearing chat: " + W);
3832
+ C(!0), H(u.loginError), console.log("Error clearing chat: " + W);
3833
3833
  return;
3834
3834
  }
3835
3835
  ae(), G();
@@ -3844,8 +3844,8 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3844
3844
  function S(g) {
3845
3845
  !g || g.length === 0 || o("apply-fields", g);
3846
3846
  }
3847
- function pe(g) {
3848
- const E = d.regenerateResponsePrompt.replace("{0}", g);
3847
+ function fe(g) {
3848
+ const E = u.regenerateResponsePrompt.replace("{0}", g);
3849
3849
  o("direct-agent-chat", r.value, E);
3850
3850
  }
3851
3851
  return se(
@@ -3886,20 +3886,20 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3886
3886
  key: O.id,
3887
3887
  class: X(ye(O.sender))
3888
3888
  }, [
3889
- D(f(Il), de({ ref_for: !0 }, O, {
3889
+ D(f(Il), pe({ ref_for: !0 }, O, {
3890
3890
  "date-format": t.dateFormat,
3891
3891
  "user-image": t.userImage,
3892
3892
  "chatbot-image": t.chatbotImage,
3893
- loading: f(u) && !O.message,
3893
+ loading: f(d) && !O.message,
3894
3894
  file: O.file,
3895
3895
  "api-endpoint": t.apiEndpoint,
3896
3896
  "session-i-d": O.sessionID,
3897
3897
  fields: O.fields,
3898
3898
  "is-last-message": W === f(j).length - 1,
3899
- "is-streaming": f(u),
3899
+ "is-streaming": f(d),
3900
3900
  "show-cancel-execution": T(O.message),
3901
3901
  "cancel-execution-disabled": ue(O.message),
3902
- onRegenerate: pe,
3902
+ onRegenerate: fe,
3903
3903
  onApplyFields: S,
3904
3904
  onSendMessage: te,
3905
3905
  onCancelExecution: ie
@@ -3910,7 +3910,7 @@ const Ll = { class: "q-chatbot__dialog-title" }, Rl = {
3910
3910
  M("div", Xl, [
3911
3911
  D(f(Zl), {
3912
3912
  disabled: Q.value,
3913
- loading: f(u),
3913
+ loading: f(d),
3914
3914
  onSendMessage: te
3915
3915
  }, null, 8, ["disabled", "loading"])
3916
3916
  ])