@pagelines/sdk 1.0.676 → 1.0.678

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.
@@ -2,7 +2,7 @@ var hs = Object.defineProperty;
2
2
  var ga = (a, t, e) => t in a ? hs(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
3
  var d = (a, t) => hs(a, "name", { value: t, configurable: !0 });
4
4
  var P = (a, t, e) => ga(a, typeof t != "symbol" ? t + "" : t, e);
5
- import { defineComponent as Re, openBlock as h, createElementBlock as f, createElementVNode as w, normalizeClass as D, ref as ge, computed as S, shallowRef as ht, watch as Qt, createCommentVNode as H, renderSlot as vn, onMounted as tn, unref as en, Fragment as ee, toDisplayString as j, reactive as va, onUnmounted as Ps, createBlock as gt, Teleport as xa, createVNode as Ne, Transition as ba, withCtx as Bs, withDirectives as Fs, normalizeStyle as q, createTextVNode as st, vShow as ya, nextTick as Us, renderList as me, resolveDynamicComponent as ka, onBeforeUnmount as Hs, withModifiers as De, vModelText as wa, withKeys as jt } from "vue";
5
+ import { defineComponent as Re, openBlock as p, createElementBlock as f, createElementVNode as w, normalizeClass as L, ref as ge, computed as S, shallowRef as ht, watch as Qt, createCommentVNode as j, renderSlot as vn, onMounted as tn, unref as en, Fragment as ee, toDisplayString as H, reactive as va, onUnmounted as Ps, createBlock as gt, Teleport as xa, createVNode as Ne, Transition as ba, withCtx as Bs, withDirectives as Fs, normalizeStyle as q, createTextVNode as st, vShow as ya, nextTick as Us, renderList as me, resolveDynamicComponent as ka, onBeforeUnmount as Hs, withModifiers as De, vModelText as wa, withKeys as jt } from "vue";
6
6
  import { SettingsObject as js, Agent as hn, isAssistantSilenceControl as _n, CHAT_ISSUE_COPY as Ta, getDefaultAvatarUrl as Hn, parseChatVisualFencePayload as Sa, createLogger as Aa } from "@pagelines/core";
7
7
  import { P as _a } from "./sdkClient.js";
8
8
  const Ea = { class: "spinner max-w-sm" }, Ra = {
@@ -15,10 +15,10 @@ const Ea = { class: "spinner max-w-sm" }, Ra = {
15
15
  colorMode: { type: String, default: "primary" }
16
16
  },
17
17
  setup(a) {
18
- return (t, e) => (h(), f("div", Ea, [
19
- (h(), f("svg", Ra, [
18
+ return (t, e) => (p(), f("div", Ea, [
19
+ (p(), f("svg", Ra, [
20
20
  w("circle", {
21
- class: D([a.colorMode, "ring-path"]),
21
+ class: L([a.colorMode, "ring-path"]),
22
22
  cx: "50",
23
23
  cy: "50",
24
24
  r: "20",
@@ -135,8 +135,8 @@ const Jn = class Jn extends js {
135
135
  const o = await n(l);
136
136
  this.settings.onBeforeSend?.(), await i.sendChatMessage("", [o]);
137
137
  } catch (o) {
138
- const p = o instanceof Error ? o.message : "Couldn't send that recording.";
139
- i.notify(`Voice message failed — ${p}`);
138
+ const h = o instanceof Error ? o.message : "Couldn't send that recording.";
139
+ i.notify(`Voice message failed — ${h}`);
140
140
  }
141
141
  }
142
142
  stopCapture() {
@@ -220,8 +220,8 @@ function Pn(a) {
220
220
  terminal: { id: "work-complete", tone: "completed", label: yt.completed }
221
221
  };
222
222
  if (e === "failed") {
223
- const I = t.filter((V) => V.status === "failed").sort(Nn).pop(), N = /* @__PURE__ */ new Set();
224
- I && N.add(I.activityId);
223
+ const $ = t.filter((V) => V.status === "failed").sort(Nn).pop(), N = /* @__PURE__ */ new Set();
224
+ $ && N.add($.activityId);
225
225
  const { visibleRows: W, hiddenRows: B } = dn(Xt(t, N));
226
226
  return {
227
227
  outcome: e,
@@ -231,34 +231,34 @@ function Pn(a) {
231
231
  id: "work-failed",
232
232
  tone: "failed",
233
233
  label: yt.failed,
234
- ...l && I?.note ? { note: I.note } : {}
234
+ ...l && $?.note ? { note: $.note } : {}
235
235
  }
236
236
  };
237
237
  }
238
238
  if (e === "stopped") {
239
- const { visibleRows: I, hiddenRows: N } = dn(Xt(t, /* @__PURE__ */ new Set()));
239
+ const { visibleRows: $, hiddenRows: N } = dn(Xt(t, /* @__PURE__ */ new Set()));
240
240
  return {
241
241
  outcome: e,
242
- visibleRows: I,
242
+ visibleRows: $,
243
243
  hiddenRows: N,
244
244
  terminal: { id: "work-stopped", tone: "stopped", label: yt.stopped }
245
245
  };
246
246
  }
247
- const { visibleRows: o, hiddenRows: p } = dn(Xt(t, /* @__PURE__ */ new Set())), c = t.filter((I) => I.status === "started").sort(Nn).pop(), y = t.reduce(
248
- (I, N) => Math.max(I, Ot(N)),
247
+ const { visibleRows: o, hiddenRows: h } = dn(Xt(t, /* @__PURE__ */ new Set())), c = t.filter(($) => $.status === "started").sort(Nn).pop(), y = t.reduce(
248
+ ($, N) => Math.max($, Ot(N)),
249
249
  s ?? Number.NEGATIVE_INFINITY
250
- ), R = Number.isFinite(y) ? y : n, b = t.reduce((I, N) => {
250
+ ), R = Number.isFinite(y) ? y : n, b = t.reduce(($, N) => {
251
251
  const W = pn(N.startedAt) ?? pn(N.endedAt);
252
- return W === void 0 ? I : Math.min(I, W);
252
+ return W === void 0 ? $ : Math.min($, W);
253
253
  }, Number.POSITIVE_INFINITY), k = R + Ws, A = (Number.isFinite(b) ? b : R) + Da, E = n >= k, O = c || E ? {
254
254
  id: c?.activityId ?? "work-active",
255
255
  tone: "active",
256
256
  label: E ? c ? yt.waiting : yt.finishing : c.label
257
- } : void 0, Z = E && n >= A ? i ? yt.notifyHint : yt.leaveHint : void 0, C = [k, A].filter((I) => I > n).sort((I, N) => I - N)[0];
257
+ } : void 0, Z = E && n >= A ? i ? yt.notifyHint : yt.leaveHint : void 0, C = [k, A].filter(($) => $ > n).sort(($, N) => $ - N)[0];
258
258
  return {
259
259
  outcome: e,
260
260
  visibleRows: o,
261
- hiddenRows: p,
261
+ hiddenRows: h,
262
262
  ...O ? { terminal: O } : {},
263
263
  ...Z ? { hint: Z } : {},
264
264
  ...C !== void 0 ? { nextBoundaryAtMs: C } : {}
@@ -272,13 +272,13 @@ function La(a) {
272
272
  nowMs: n,
273
273
  canNotifyOnCompletion: i,
274
274
  ...s !== void 0 ? { lastVisibleProgressAtMs: s } : {}
275
- }), "liveModel"), p = /* @__PURE__ */ d((A) => {
275
+ }), "liveModel"), h = /* @__PURE__ */ d((A) => {
276
276
  const { visibleRows: E, hiddenRows: O } = dn(Xt(A, /* @__PURE__ */ new Set()));
277
277
  if (!(E.length === 0 && O.length === 0))
278
278
  return { outcome: "running", visibleRows: E, hiddenRows: O };
279
279
  }, "staticJournal"), c = [], y = new Set(
280
280
  t.flatMap((A) => A.kind === "work" ? A.activityIds : [])
281
- ), R = e.filter((A) => !y.has(A.activityId)), b = p(R);
281
+ ), R = e.filter((A) => !y.has(A.activityId)), b = h(R);
282
282
  b && c.push({ kind: "work", id: "work-unsegmented", journal: b }), t.forEach((A, E) => {
283
283
  if (A.kind === "text") {
284
284
  A.content && c.push({ kind: "text", id: `text-${E}`, content: A.content });
@@ -287,7 +287,7 @@ function La(a) {
287
287
  const O = A.activityIds.map((C) => l.get(C)).filter((C) => C !== void 0);
288
288
  if (O.length === 0)
289
289
  return;
290
- const Z = p(O);
290
+ const Z = h(O);
291
291
  Z && c.push({ kind: "work", id: `work-${A.activityIds[0] ?? E}`, journal: Z });
292
292
  });
293
293
  const k = o(e);
@@ -699,13 +699,13 @@ Current User:
699
699
  }
700
700
  this.addMessage(e, "user", n), this.resetWorkJournalTiming(), this.updateState(this.textState, { isThinking: !0, workingDescription: void 0, toolActivities: [], transientIssue: void 0, turnOutcome: void 0 });
701
701
  const l = ++this.activeTurnGeneration, o = `stream-${Date.now()}`;
702
- let p = !1, c = !1;
703
- const y = /* @__PURE__ */ d(() => l === this.activeTurnGeneration, "isCurrentTurn"), R = /* @__PURE__ */ d((C, I = "assistant") => {
702
+ let h = !1, c = !1;
703
+ const y = /* @__PURE__ */ d(() => l === this.activeTurnGeneration, "isCurrentTurn"), R = /* @__PURE__ */ d((C, $ = "assistant") => {
704
704
  if (!y())
705
705
  return;
706
- this.updateState(this.textState, { workingDescription: void 0 }), I === "assistant" && (this.lastVisibleProgressAtMs.value = Date.now()), p || (p = !0, this.liveStreamMessageId.value = o, this.sharedMessages.value = [
706
+ this.updateState(this.textState, { workingDescription: void 0 }), $ === "assistant" && (this.lastVisibleProgressAtMs.value = Date.now()), h || (h = !0, this.liveStreamMessageId.value = o, this.sharedMessages.value = [
707
707
  ...this.sharedMessages.value,
708
- { id: o, text: "", sender: I === "system" ? "system" : "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
708
+ { id: o, text: "", sender: $ === "system" ? "system" : "agent", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
709
709
  ]);
710
710
  const N = this.liveSegments.value, W = N[N.length - 1];
711
711
  this.liveSegments.value = W?.kind === "text" ? [...N.slice(0, -1), { kind: "text", content: W.content + C }] : [...N, { kind: "text", content: C }];
@@ -718,9 +718,9 @@ Current User:
718
718
  this.liveSegments.value = [], this.liveStreamMessageId.value = void 0, this.sharedMessages.value = this.sharedMessages.value.filter((J) => J.id !== o);
719
719
  return;
720
720
  }
721
- p = !0;
722
- const I = C.sender === "system" || C.turnOutcome === "failed" ? "failed" : "completed";
723
- this.finishToolActivities(I);
721
+ h = !0;
722
+ const $ = C.sender === "system" || C.turnOutcome === "failed" ? "failed" : "completed";
723
+ this.finishToolActivities($);
724
724
  const N = this.textState.value.toolActivities, W = C.toolActivities?.length || !N?.length ? C : { ...C, toolActivities: N };
725
725
  this.liveSegments.value = [], this.liveStreamMessageId.value = void 0, this.updateState(this.textState, {
726
726
  workingDescription: void 0,
@@ -742,13 +742,13 @@ Current User:
742
742
  }, "onMessage"), k = /* @__PURE__ */ d((C) => {
743
743
  if (!y())
744
744
  return;
745
- if (!p && !c) {
745
+ if (!h && !c) {
746
746
  A("empty_stream — assistant returned no content");
747
747
  return;
748
748
  }
749
749
  this.finishToolActivities("completed");
750
- const I = this.sharedMessages.value, N = I[I.length - 1];
751
- N?.id === o && N.sender === "agent" && _n(N.text) && (this.sharedMessages.value = I.slice(0, -1)), C && (this.conversationId = C), this.updateState(this.textState, { isThinking: !1, workingDescription: void 0, transientIssue: void 0 });
750
+ const $ = this.sharedMessages.value, N = $[$.length - 1];
751
+ N?.id === o && N.sender === "agent" && _n(N.text) && (this.sharedMessages.value = $.slice(0, -1)), C && (this.conversationId = C), this.updateState(this.textState, { isThinking: !1, workingDescription: void 0, transientIssue: void 0 });
752
752
  }, "onDone"), A = /* @__PURE__ */ d((C) => {
753
753
  if (!y())
754
754
  return;
@@ -770,8 +770,8 @@ Current User:
770
770
  return;
771
771
  }
772
772
  this.updateState(this.textState, { workingDescription: void 0, turnOutcome: "failed" }), this.finishToolActivities("failed");
773
- const I = this.sharedMessages.value, N = I[I.length - 1];
774
- if (N?.id === o && !N.text && (this.sharedMessages.value = I.slice(0, -1)), typeof C == "object" && C.code && C.error) {
773
+ const $ = this.sharedMessages.value, N = $[$.length - 1];
774
+ if (N?.id === o && !N.text && (this.sharedMessages.value = $.slice(0, -1)), typeof C == "object" && C.code && C.error) {
775
775
  const V = Na(C);
776
776
  V.surface === "transient" ? this.updateState(this.textState, { isThinking: !1, transientIssue: V.issue }) : V.surface === "transcript" ? (this.addMessage(Pa(C), "system", void 0, V.issue), this.updateState(this.textState, {
777
777
  isThinking: !1,
@@ -784,13 +784,13 @@ Current User:
784
784
  }, "onError"), E = /* @__PURE__ */ d((C) => {
785
785
  if (!y())
786
786
  return;
787
- const I = C.trim();
788
- this.updateState(this.textState, { workingDescription: I || void 0 });
787
+ const $ = C.trim();
788
+ this.updateState(this.textState, { workingDescription: $ || void 0 });
789
789
  }, "onStatus"), O = /* @__PURE__ */ d((C) => {
790
790
  if (y()) {
791
791
  if (this.lastVisibleProgressAtMs.value = Date.now(), C.status === "started") {
792
- const I = this.liveSegments.value, N = I[I.length - 1];
793
- N?.kind !== "work" ? this.liveSegments.value = [...I, { kind: "work", activityIds: [C.activityId] }] : N.activityIds.includes(C.activityId) || (this.liveSegments.value = [...I.slice(0, -1), { kind: "work", activityIds: [...N.activityIds, C.activityId] }]);
792
+ const $ = this.liveSegments.value, N = $[$.length - 1];
793
+ N?.kind !== "work" ? this.liveSegments.value = [...$, { kind: "work", activityIds: [C.activityId] }] : N.activityIds.includes(C.activityId) || (this.liveSegments.value = [...$.slice(0, -1), { kind: "work", activityIds: [...N.activityIds, C.activityId] }]);
794
794
  }
795
795
  this.updateToolActivity(C);
796
796
  }
@@ -881,24 +881,24 @@ function fs(a) {
881
881
  return a ? typeof a == "string" ? a : a.src || "" : "";
882
882
  }
883
883
  d(fs, "getImageSrc");
884
- function To(a) {
884
+ function yo(a) {
885
885
  return fs(a.cover) || fs(a.avatar) || Hn(a.name);
886
886
  }
887
- d(To, "getAgentAvatarUrl");
887
+ d(yo, "getAgentAvatarUrl");
888
888
  function ms(a) {
889
889
  const t = a.target;
890
890
  t.dataset.fallbackUsed || (t.dataset.fallbackUsed = "true", t.src = Hn());
891
891
  }
892
892
  d(ms, "handleImageError");
893
- function So(a) {
893
+ function ko(a) {
894
894
  const { template: t, agent: e } = a;
895
895
  return t.replace(/{name}/g, e.name || "Assistant").replace(/{title}/g, e.title || "").replace(/{handle}/g, e.handle || "").replace(/{orgName}/g, e.org?.name || "");
896
896
  }
897
- d(So, "parseButtonTemplate");
897
+ d(ko, "parseButtonTemplate");
898
898
  const Ba = {
899
899
  key: 0,
900
900
  class: "absolute inset-0 flex items-center justify-center"
901
- }, Ao = /* @__PURE__ */ Re({
901
+ }, wo = /* @__PURE__ */ Re({
902
902
  __name: "ElAgentButton",
903
903
  props: {
904
904
  theme: { default: "primary" },
@@ -922,28 +922,28 @@ const Ba = {
922
922
  md: "size-4",
923
923
  lg: "size-5"
924
924
  })[a.size]);
925
- return (i, s) => (h(), f("button", {
926
- class: D(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
925
+ return (i, s) => (p(), f("button", {
926
+ class: L(["relative inline-flex items-center justify-center gap-2 font-medium rounded-full backdrop-blur-sm border-2 text-white transition-all duration-200 focus:outline-none active:opacity-80 disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer", [t.value, e.value]])
927
927
  }, [
928
- a.loading ? (h(), f("div", Ba, [...s[0] || (s[0] = [
928
+ a.loading ? (p(), f("div", Ba, [...s[0] || (s[0] = [
929
929
  w("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)
930
- ])])) : H("", !0),
930
+ ])])) : j("", !0),
931
931
  w("span", {
932
- class: D(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
932
+ class: L(["flex items-center gap-2 transition-opacity duration-200", a.loading ? "opacity-0" : "opacity-100"])
933
933
  }, [
934
- a.icon ? (h(), f("i", {
934
+ a.icon ? (p(), f("i", {
935
935
  key: 0,
936
- class: D([a.icon, n.value])
937
- }, null, 2)) : H("", !0),
936
+ class: L([a.icon, n.value])
937
+ }, null, 2)) : j("", !0),
938
938
  vn(i.$slots, "default"),
939
- a.iconAfter ? (h(), f("i", {
939
+ a.iconAfter ? (p(), f("i", {
940
940
  key: 1,
941
- class: D([a.iconAfter, n.value])
942
- }, null, 2)) : H("", !0)
941
+ class: L([a.iconAfter, n.value])
942
+ }, null, 2)) : j("", !0)
943
943
  ], 2)
944
944
  ], 2));
945
945
  }
946
- }), Fa = ["value"], _o = /* @__PURE__ */ Re({
946
+ }), Fa = ["value"], To = /* @__PURE__ */ Re({
947
947
  __name: "AgentInputEmail",
948
948
  props: {
949
949
  modelValue: { default: "" }
@@ -951,7 +951,7 @@ const Ba = {
951
951
  emits: ["update:modelValue"],
952
952
  setup(a, { emit: t }) {
953
953
  const e = t;
954
- return (n, i) => (h(), f("input", {
954
+ return (n, i) => (p(), f("input", {
955
955
  name: "username",
956
956
  type: "email",
957
957
  inputmode: "email",
@@ -966,7 +966,7 @@ const Ba = {
966
966
  onInput: i[0] || (i[0] = (s) => e("update:modelValue", s.target.value))
967
967
  }, null, 40, Fa));
968
968
  }
969
- }), Ua = ["placeholder", "value"], Eo = /* @__PURE__ */ Re({
969
+ }), Ua = ["placeholder", "value"], So = /* @__PURE__ */ Re({
970
970
  __name: "AgentInputOneTimeCode",
971
971
  props: {
972
972
  modelValue: {},
@@ -980,10 +980,10 @@ const Ba = {
980
980
  e.focusFirst && !("ontouchstart" in window) && i.value?.focus();
981
981
  });
982
982
  function l(o) {
983
- const p = o.target.value.replace(/\D/g, "").slice(0, e.length);
984
- n("update:modelValue", p), p.length === e.length && n("autoSubmit", p);
983
+ const h = o.target.value.replace(/\D/g, "").slice(0, e.length);
984
+ n("update:modelValue", h), h.length === e.length && n("autoSubmit", h);
985
985
  }
986
- return d(l, "onInput"), (o, p) => (h(), f("input", {
986
+ return d(l, "onInput"), (o, h) => (p(), f("input", {
987
987
  ref_key: "input",
988
988
  ref: i,
989
989
  name: "one-time-code",
@@ -1013,14 +1013,14 @@ const Ba = {
1013
1013
  layout: { default: "centered" }
1014
1014
  },
1015
1015
  setup(a) {
1016
- return (t, e) => (h(), f("div", {
1017
- class: D(["flex gap-4", [
1016
+ return (t, e) => (p(), f("div", {
1017
+ class: L(["flex gap-4", [
1018
1018
  a.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"
1019
1019
  ]])
1020
1020
  }, [
1021
1021
  w("div", Ha, [
1022
1022
  w("div", {
1023
- class: D(["rounded-full overflow-hidden border-white", a.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
1023
+ class: L(["rounded-full overflow-hidden border-white", a.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"])
1024
1024
  }, [
1025
1025
  w("img", {
1026
1026
  src: a.agent.avatarUrl.value,
@@ -1031,28 +1031,28 @@ const Ba = {
1031
1031
  }, null, 40, ja)
1032
1032
  ], 2),
1033
1033
  w("div", Wa, [
1034
- a.isOnline ? (h(), f(ee, { key: 0 }, [
1034
+ a.isOnline ? (p(), f(ee, { key: 0 }, [
1035
1035
  e[1] || (e[1] = w("div", {
1036
1036
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1037
1037
  style: { "animation-duration": "3s" }
1038
1038
  }, null, -1)),
1039
1039
  e[2] || (e[2] = w("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))
1040
- ], 64)) : (h(), f("div", Ga))
1040
+ ], 64)) : (p(), f("div", Ga))
1041
1041
  ])
1042
1042
  ]),
1043
1043
  w("div", Va, [
1044
1044
  w("h1", {
1045
- class: D(["font-light text-white mb-1 truncate", [
1045
+ class: L(["font-light text-white mb-1 truncate", [
1046
1046
  a.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight",
1047
1047
  a.layout === "horizontal" ? "text-white/95" : ""
1048
1048
  ]])
1049
- }, j(a.agent.displayName.value), 3),
1049
+ }, H(a.agent.displayName.value), 3),
1050
1050
  w("p", {
1051
- class: D(["font-light line-clamp-1", [
1051
+ class: L(["font-light line-clamp-1", [
1052
1052
  a.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base",
1053
1053
  a.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"
1054
1054
  ]])
1055
- }, j(a.layout === "horizontal" ? a.agent.title.value || "Assistant" : a.agent.title.value), 3)
1055
+ }, H(a.layout === "horizontal" ? a.agent.title.value || "Assistant" : a.agent.title.value), 3)
1056
1056
  ])
1057
1057
  ], 2));
1058
1058
  }
@@ -1077,30 +1077,30 @@ const Ba = {
1077
1077
  top: "0px",
1078
1078
  maxWidth: `${a.maxWidth}px`
1079
1079
  }), o = ge("");
1080
- function p() {
1080
+ function h() {
1081
1081
  if (!t.value || !e.value)
1082
1082
  return;
1083
1083
  const E = t.value.getBoundingClientRect(), O = e.value.getBoundingClientRect(), Z = 8;
1084
- let C, I;
1084
+ let C, $;
1085
1085
  switch (a.direction) {
1086
1086
  case "bottom":
1087
- C = E.left + window.scrollX + E.width / 2 - O.width / 2, I = E.bottom + window.scrollY + Z;
1087
+ C = E.left + window.scrollX + E.width / 2 - O.width / 2, $ = E.bottom + window.scrollY + Z;
1088
1088
  break;
1089
1089
  case "top":
1090
- C = E.left + window.scrollX + E.width / 2 - O.width / 2, I = E.top + window.scrollY - O.height - Z;
1090
+ C = E.left + window.scrollX + E.width / 2 - O.width / 2, $ = E.top + window.scrollY - O.height - Z;
1091
1091
  break;
1092
1092
  case "left":
1093
- C = E.left + window.scrollX - O.width - Z, I = E.top + window.scrollY + E.height / 2 - O.height / 2;
1093
+ C = E.left + window.scrollX - O.width - Z, $ = E.top + window.scrollY + E.height / 2 - O.height / 2;
1094
1094
  break;
1095
1095
  default:
1096
- C = E.right + window.scrollX + Z, I = E.top + window.scrollY + E.height / 2 - O.height / 2;
1096
+ C = E.right + window.scrollX + Z, $ = E.top + window.scrollY + E.height / 2 - O.height / 2;
1097
1097
  }
1098
1098
  const N = 8;
1099
- C = Math.max(N, Math.min(C, window.innerWidth - O.width - N)), I = Math.max(N, Math.min(I, window.innerHeight - O.height - N)), l.left = `${C}px`, l.top = `${I}px`;
1099
+ C = Math.max(N, Math.min(C, window.innerWidth - O.width - N)), $ = Math.max(N, Math.min($, window.innerHeight - O.height - N)), l.left = `${C}px`, l.top = `${$}px`;
1100
1100
  }
1101
- d(p, "updatePosition");
1101
+ d(h, "updatePosition");
1102
1102
  function c() {
1103
- a.disabled || (o.value = a.content || t.value?.getAttribute("title") || "", t.value?.hasAttribute("title") && (t.value.dataset.originalTitle = t.value.getAttribute("title") || "", t.value.removeAttribute("title")), o.value && (n.value = !0, Us(p), a.timeout > 0 && (s.value = setTimeout(() => {
1103
+ a.disabled || (o.value = a.content || t.value?.getAttribute("title") || "", t.value?.hasAttribute("title") && (t.value.dataset.originalTitle = t.value.getAttribute("title") || "", t.value.removeAttribute("title")), o.value && (n.value = !0, Us(h), a.timeout > 0 && (s.value = setTimeout(() => {
1104
1104
  n.value = !1;
1105
1105
  }, a.timeout))));
1106
1106
  }
@@ -1121,9 +1121,9 @@ const Ba = {
1121
1121
  R();
1122
1122
  }
1123
1123
  d(k, "onFocusOut"), tn(() => {
1124
- window.addEventListener("resize", p), window.addEventListener("scroll", p, !0);
1124
+ window.addEventListener("resize", h), window.addEventListener("scroll", h, !0);
1125
1125
  }), Ps(() => {
1126
- window.removeEventListener("resize", p), window.removeEventListener("scroll", p, !0), i.value && clearTimeout(i.value), s.value && clearTimeout(s.value);
1126
+ window.removeEventListener("resize", h), window.removeEventListener("scroll", h, !0), i.value && clearTimeout(i.value), s.value && clearTimeout(s.value);
1127
1127
  });
1128
1128
  const A = S(() => `absolute size-2 rotate-45 bg-theme-900 dark:bg-theme-600 ${{
1129
1129
  bottom: "left-1/2 -translate-x-1/2 -top-1",
@@ -1131,7 +1131,7 @@ const Ba = {
1131
1131
  left: "right-[-4px] top-1/2 -translate-y-1/2",
1132
1132
  right: "left-[-4px] top-1/2 -translate-y-1/2"
1133
1133
  }[a.direction]}`);
1134
- return (E, O) => (h(), f("div", {
1134
+ return (E, O) => (p(), f("div", {
1135
1135
  ref_key: "triggerRef",
1136
1136
  ref: t,
1137
1137
  onMouseenter: y,
@@ -1140,7 +1140,7 @@ const Ba = {
1140
1140
  onFocusout: k
1141
1141
  }, [
1142
1142
  vn(E.$slots, "default"),
1143
- (h(), gt(xa, { to: "body" }, [
1143
+ (p(), gt(xa, { to: "body" }, [
1144
1144
  Ne(ba, {
1145
1145
  "enter-active-class": "transition ease-out duration-200",
1146
1146
  "enter-from-class": "opacity-0 scale-95",
@@ -1156,9 +1156,9 @@ const Ba = {
1156
1156
  class: "fixed z-50 px-2 py-1.5 text-xs font-mono text-white bg-theme-900 dark:bg-theme-600 rounded-md shadow-lg",
1157
1157
  style: q(l)
1158
1158
  }, [
1159
- st(j(o.value) + " ", 1),
1159
+ st(H(o.value) + " ", 1),
1160
1160
  w("div", {
1161
- class: D(A.value)
1161
+ class: L(A.value)
1162
1162
  }, null, 2)
1163
1163
  ], 4), [
1164
1164
  [ya, n.value && !a.disabled]
@@ -1185,26 +1185,26 @@ const Ba = {
1185
1185
  width: "clamp(7px, 14%, 14px)",
1186
1186
  height: "clamp(7px, 14%, 14px)"
1187
1187
  }, n = S(() => a.position.startsWith("top") ? "bottom" : "top");
1188
- return (i, s) => (h(), f(ee, null, [
1189
- a.tooltip ? (h(), gt(Ka, {
1188
+ return (i, s) => (p(), f(ee, null, [
1189
+ a.tooltip ? (p(), gt(Ka, {
1190
1190
  key: 0,
1191
1191
  content: a.tooltip,
1192
1192
  direction: n.value,
1193
1193
  "max-width": 240,
1194
- class: D(["absolute rounded-full ring-2 ring-white z-10", a.dotClass]),
1194
+ class: L(["absolute rounded-full ring-2 ring-white z-10", a.dotClass]),
1195
1195
  style: q({ ...e, ...t.value }),
1196
1196
  role: "status",
1197
1197
  "aria-label": a.tooltip
1198
- }, null, 8, ["content", "direction", "class", "style", "aria-label"])) : (h(), f("span", {
1198
+ }, null, 8, ["content", "direction", "class", "style", "aria-label"])) : (p(), f("span", {
1199
1199
  key: 1,
1200
- class: D(["absolute rounded-full ring-2 ring-white z-10", a.dotClass]),
1200
+ class: L(["absolute rounded-full ring-2 ring-white z-10", a.dotClass]),
1201
1201
  style: q({ ...e, ...t.value })
1202
1202
  }, null, 6)),
1203
- a.showPing ? (h(), f("span", {
1203
+ a.showPing ? (p(), f("span", {
1204
1204
  key: 2,
1205
- class: D(["absolute rounded-full animate-ping [animation-duration:3s] opacity-50 pointer-events-none", a.dotClass]),
1205
+ class: L(["absolute rounded-full animate-ping [animation-duration:3s] opacity-50 pointer-events-none", a.dotClass]),
1206
1206
  style: q({ ...e, ...t.value })
1207
- }, null, 6)) : H("", !0)
1207
+ }, null, 6)) : j("", !0)
1208
1208
  ], 64));
1209
1209
  }
1210
1210
  }), Za = ["src", "alt"], Ja = ["src"], Qa = /* @__PURE__ */ Re({
@@ -1223,37 +1223,37 @@ const Ba = {
1223
1223
  },
1224
1224
  setup(a) {
1225
1225
  const t = S(() => `rounded-${a.rounded}`);
1226
- return (e, n) => (h(), f("div", {
1227
- class: D(["shrink-0 relative", [t.value, a.editable ? "cursor-pointer group/avatar" : ""]])
1226
+ return (e, n) => (p(), f("div", {
1227
+ class: L(["shrink-0 relative", [t.value, a.editable ? "cursor-pointer group/avatar" : ""]])
1228
1228
  }, [
1229
1229
  w("div", {
1230
- class: D(["size-full overflow-hidden ring-1 ring-black/5", t.value])
1230
+ class: L(["size-full overflow-hidden ring-1 ring-black/5", t.value])
1231
1231
  }, [
1232
1232
  w("img", {
1233
1233
  src: a.src,
1234
1234
  alt: a.alt,
1235
1235
  class: "size-full object-cover"
1236
1236
  }, null, 8, Za),
1237
- a.editable ? (h(), f("div", {
1237
+ a.editable ? (p(), f("div", {
1238
1238
  key: 0,
1239
- class: D(["absolute inset-0 flex items-center justify-center opacity-0 group-hover/avatar:opacity-100 transition-opacity bg-black/40", t.value])
1239
+ class: L(["absolute inset-0 flex items-center justify-center opacity-0 group-hover/avatar:opacity-100 transition-opacity bg-black/40", t.value])
1240
1240
  }, [...n[0] || (n[0] = [
1241
1241
  w("i", { class: "i-tabler-camera text-xl text-white" }, null, -1)
1242
- ])], 2)) : H("", !0)
1242
+ ])], 2)) : j("", !0)
1243
1243
  ], 2),
1244
- a.subSrc ? (h(), f("img", {
1244
+ a.subSrc ? (p(), f("img", {
1245
1245
  key: 0,
1246
1246
  src: a.subSrc,
1247
1247
  alt: "",
1248
1248
  class: "absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2 ring-white"
1249
- }, null, 8, Ja)) : H("", !0),
1250
- a.dotClass ? (h(), gt(Xa, {
1249
+ }, null, 8, Ja)) : j("", !0),
1250
+ a.dotClass ? (p(), gt(Xa, {
1251
1251
  key: 1,
1252
1252
  "dot-class": a.dotClass,
1253
1253
  tooltip: a.dotTooltip,
1254
1254
  "show-ping": a.showPing,
1255
1255
  position: a.dotPosition
1256
- }, null, 8, ["dot-class", "tooltip", "show-ping", "position"])) : H("", !0)
1256
+ }, null, 8, ["dot-class", "tooltip", "show-ping", "position"])) : j("", !0)
1257
1257
  ], 2));
1258
1258
  }
1259
1259
  }), ei = /* @__PURE__ */ Re({
@@ -1271,7 +1271,7 @@ const Ba = {
1271
1271
  const t = S(() => a.agent.avatarUrl.value || Hn(a.agent.name.value)), e = S(() => a.agent.state.value), n = S(
1272
1272
  () => a.showStatus && e.value.lifecycle !== "unknown" ? Ya[e.value.color] : null
1273
1273
  );
1274
- return (i, s) => (h(), gt(Qa, {
1274
+ return (i, s) => (p(), gt(Qa, {
1275
1275
  src: t.value,
1276
1276
  alt: a.agent.name.value || "Agent",
1277
1277
  rounded: a.rounded,
@@ -1316,7 +1316,7 @@ const Ba = {
1316
1316
  ...y.visibleRows,
1317
1317
  ...y.terminal ? [y.terminal] : []
1318
1318
  ];
1319
- }), p = S(() => t.isLight ? {
1319
+ }), h = S(() => t.isLight ? {
1320
1320
  spine: "bg-theme-200",
1321
1321
  dashed: "border-theme-300",
1322
1322
  doneMark: "text-theme-400",
@@ -1338,12 +1338,12 @@ const Ba = {
1338
1338
  done: {
1339
1339
  statusWord: "completed",
1340
1340
  label: y ? "text-[12.5px] text-theme-500" : "text-[12.5px] text-white/55",
1341
- station: { tag: "i", class: `i-tabler-check size-3 ${p.value.doneMark}` }
1341
+ station: { tag: "i", class: `i-tabler-check size-3 ${h.value.doneMark}` }
1342
1342
  },
1343
1343
  active: {
1344
1344
  statusWord: "in progress",
1345
1345
  label: y ? "text-[13px] font-medium text-theme-900" : "text-[13px] font-medium text-white",
1346
- station: { tag: "span", class: `size-3.5 animate-spin rounded-full border-[1.5px] motion-reduce:animate-none ${p.value.activeSpinner}` }
1346
+ station: { tag: "span", class: `size-3.5 animate-spin rounded-full border-[1.5px] motion-reduce:animate-none ${h.value.activeSpinner}` }
1347
1347
  },
1348
1348
  failed: {
1349
1349
  statusWord: "failed",
@@ -1352,7 +1352,7 @@ const Ba = {
1352
1352
  },
1353
1353
  stopped: {
1354
1354
  label: y ? "text-[13px] font-medium text-theme-600" : "text-[13px] font-medium text-white/70",
1355
- station: { tag: "span", class: `size-[9px] rounded-[2px] ${p.value.stoppedSquare}` }
1355
+ station: { tag: "span", class: `size-[9px] rounded-[2px] ${h.value.stoppedSquare}` }
1356
1356
  },
1357
1357
  completed: {
1358
1358
  label: y ? "text-[12.5px] text-theme-500" : "text-[12.5px] text-white/55",
@@ -1360,18 +1360,18 @@ const Ba = {
1360
1360
  }
1361
1361
  };
1362
1362
  });
1363
- return (y, R) => (h(), f("div", {
1364
- class: D(["w-full py-0.5", p.value.muted])
1363
+ return (y, R) => (p(), f("div", {
1364
+ class: L(["w-full py-0.5", h.value.muted])
1365
1365
  }, [
1366
- l.value ? (h(), f("span", ti, j(l.value), 1)) : H("", !0),
1367
- i.value ? (h(), f("button", {
1366
+ l.value ? (p(), f("span", ti, H(l.value), 1)) : j("", !0),
1367
+ i.value ? (p(), f("button", {
1368
1368
  key: 1,
1369
1369
  type: "button",
1370
1370
  "data-test": "messaging-tool-activity-summary",
1371
1371
  "data-journal-disclosure": "",
1372
1372
  "aria-expanded": e.value,
1373
1373
  disabled: s.value === 0,
1374
- class: D(["grid min-h-11 w-full grid-cols-[1.25rem_minmax(0,1fr)_auto] items-center gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default", p.value.ring]),
1374
+ class: L(["grid min-h-11 w-full grid-cols-[1.25rem_minmax(0,1fr)_auto] items-center gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-default", h.value.ring]),
1375
1375
  onClick: n
1376
1376
  }, [
1377
1377
  R[0] || (R[0] = w("span", {
@@ -1382,81 +1382,81 @@ const Ba = {
1382
1382
  w("i", { class: "i-tabler-circle-check-filled size-3.5 text-green-600" })
1383
1383
  ], -1)),
1384
1384
  w("span", {
1385
- class: D(["min-w-0 truncate text-[12.5px] font-medium leading-none", p.value.muted])
1386
- }, j(a.model.terminal?.label), 3),
1387
- s.value ? (h(), f("span", {
1385
+ class: L(["min-w-0 truncate text-[12.5px] font-medium leading-none", h.value.muted])
1386
+ }, H(a.model.terminal?.label), 3),
1387
+ s.value ? (p(), f("span", {
1388
1388
  key: 0,
1389
- class: D(["flex shrink-0 items-center gap-0.5 whitespace-nowrap text-[12px] font-medium leading-none", p.value.muted])
1389
+ class: L(["flex shrink-0 items-center gap-0.5 whitespace-nowrap text-[12px] font-medium leading-none", h.value.muted])
1390
1390
  }, [
1391
- st(j(s.value) + " earlier updates ", 1),
1391
+ st(H(s.value) + " earlier updates ", 1),
1392
1392
  w("i", {
1393
- class: D(["size-3 shrink-0", e.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1393
+ class: L(["size-3 shrink-0", e.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1394
1394
  "aria-hidden": "true"
1395
1395
  }, null, 2)
1396
- ], 2)) : H("", !0)
1397
- ], 10, ni)) : s.value ? (h(), f("button", {
1396
+ ], 2)) : j("", !0)
1397
+ ], 10, ni)) : s.value ? (p(), f("button", {
1398
1398
  key: 2,
1399
1399
  type: "button",
1400
1400
  "data-test": "messaging-tool-activity-summary",
1401
1401
  "data-journal-disclosure": "",
1402
1402
  "aria-expanded": e.value,
1403
- class: D(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", p.value.ring]),
1403
+ class: L(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", h.value.ring]),
1404
1404
  onClick: n
1405
1405
  }, [
1406
1406
  w("span", ai, [
1407
1407
  w("span", {
1408
1408
  "data-journal-spine": "dashed",
1409
- class: D(["w-0 border-l border-dashed", p.value.dashed])
1409
+ class: L(["w-0 border-l border-dashed", h.value.dashed])
1410
1410
  }, null, 2)
1411
1411
  ]),
1412
1412
  w("span", {
1413
- class: D(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", p.value.muted])
1413
+ class: L(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", h.value.muted])
1414
1414
  }, [
1415
- st(j(s.value) + " earlier updates ", 1),
1415
+ st(H(s.value) + " earlier updates ", 1),
1416
1416
  w("i", {
1417
- class: D(["size-3 shrink-0", e.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1417
+ class: L(["size-3 shrink-0", e.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1418
1418
  "aria-hidden": "true"
1419
1419
  }, null, 2)
1420
1420
  ], 2)
1421
- ], 10, si)) : H("", !0),
1422
- (h(!0), f(ee, null, me(o.value, (b, k) => (h(), f("div", {
1421
+ ], 10, si)) : j("", !0),
1422
+ (p(!0), f(ee, null, me(o.value, (b, k) => (p(), f("div", {
1423
1423
  key: b.id,
1424
1424
  "data-test": "messaging-tool-activity-row",
1425
1425
  "data-journal-row": b.tone,
1426
- class: D([i.value ? "pl-[30px]" : "", "flex gap-x-2.5"])
1426
+ class: L([i.value ? "pl-[30px]" : "", "flex gap-x-2.5"])
1427
1427
  }, [
1428
1428
  w("div", ri, [
1429
1429
  w("span", li, [
1430
- (h(), gt(ka(c.value[b.tone].station.tag), {
1430
+ (p(), gt(ka(c.value[b.tone].station.tag), {
1431
1431
  "data-journal-station": b.tone,
1432
- class: D(c.value[b.tone].station.class)
1432
+ class: L(c.value[b.tone].station.class)
1433
1433
  }, null, 8, ["data-journal-station", "class"]))
1434
1434
  ]),
1435
- k !== o.value.length - 1 ? (h(), f("span", {
1435
+ k !== o.value.length - 1 ? (p(), f("span", {
1436
1436
  key: 0,
1437
- class: D(["w-px flex-1", p.value.spine])
1438
- }, null, 2)) : H("", !0)
1437
+ class: L(["w-px flex-1", h.value.spine])
1438
+ }, null, 2)) : j("", !0)
1439
1439
  ]),
1440
1440
  w("div", {
1441
- class: D(["min-w-0 flex-1", k === o.value.length - 1 ? "" : "pb-2"])
1441
+ class: L(["min-w-0 flex-1", k === o.value.length - 1 ? "" : "pb-2"])
1442
1442
  }, [
1443
1443
  w("span", {
1444
- class: D(["relative block leading-snug", c.value[b.tone].label])
1444
+ class: L(["relative block leading-snug", c.value[b.tone].label])
1445
1445
  }, [
1446
- st(j(b.label), 1),
1447
- c.value[b.tone].statusWord ? (h(), f("span", oi, ", " + j(c.value[b.tone].statusWord), 1)) : H("", !0)
1446
+ st(H(b.label), 1),
1447
+ c.value[b.tone].statusWord ? (p(), f("span", oi, ", " + H(c.value[b.tone].statusWord), 1)) : j("", !0)
1448
1448
  ], 2),
1449
- b.note ? (h(), f("p", {
1449
+ b.note ? (p(), f("p", {
1450
1450
  key: 0,
1451
- class: D(["pt-0.5 text-[11.5px] leading-snug", p.value.muted])
1452
- }, j(b.note), 3)) : H("", !0)
1451
+ class: L(["pt-0.5 text-[11.5px] leading-snug", h.value.muted])
1452
+ }, H(b.note), 3)) : j("", !0)
1453
1453
  ], 2)
1454
1454
  ], 10, ii))), 128)),
1455
- !i.value && a.model.hint ? (h(), f("p", {
1455
+ !i.value && a.model.hint ? (p(), f("p", {
1456
1456
  key: 3,
1457
1457
  "data-test": "messaging-tool-activity-hint",
1458
- class: D(["pl-[30px] pt-2.5 text-[12px] leading-snug", p.value.muted])
1459
- }, j(a.model.hint), 3)) : H("", !0)
1458
+ class: L(["pl-[30px] pt-2.5 text-[12px] leading-snug", h.value.muted])
1459
+ }, H(a.model.hint), 3)) : j("", !0)
1460
1460
  ], 2));
1461
1461
  }
1462
1462
  });
@@ -1473,14 +1473,14 @@ d(ci, "_arrayWithHoles");
1473
1473
  function ui(a, t) {
1474
1474
  var e = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1475
1475
  if (e != null) {
1476
- var n, i, s, l, o = [], p = !0, c = !1;
1476
+ var n, i, s, l, o = [], h = !0, c = !1;
1477
1477
  try {
1478
- if (s = (e = e.call(a)).next, t !== 0) for (; !(p = (n = s.call(e)).done) && (o.push(n.value), o.length !== t); p = !0) ;
1478
+ if (s = (e = e.call(a)).next, t !== 0) for (; !(h = (n = s.call(e)).done) && (o.push(n.value), o.length !== t); h = !0) ;
1479
1479
  } catch (y) {
1480
1480
  c = !0, i = y;
1481
1481
  } finally {
1482
1482
  try {
1483
- if (!p && e.return != null && (l = e.return(), Object(l) !== l)) return;
1483
+ if (!h && e.return != null && (l = e.return(), Object(l) !== l)) return;
1484
1484
  } finally {
1485
1485
  if (c) throw i;
1486
1486
  }
@@ -1693,9 +1693,9 @@ function Ks() {
1693
1693
  let e = a.document;
1694
1694
  const n = e, i = n.currentScript;
1695
1695
  a.DocumentFragment;
1696
- const s = a.HTMLTemplateElement, l = a.Node, o = a.Element, p = a.NodeFilter, c = a.NamedNodeMap;
1696
+ const s = a.HTMLTemplateElement, l = a.Node, o = a.Element, h = a.NodeFilter, c = a.NamedNodeMap;
1697
1697
  c === void 0 && (a.NamedNodeMap || a.MozNamedAttrMap), a.HTMLFormElement;
1698
- const y = a.DOMParser, R = a.trustedTypes, b = o.prototype, k = tt(b, "cloneNode"), A = tt(b, "remove"), E = tt(b, "nextSibling"), O = tt(b, "childNodes"), Z = tt(b, "parentNode"), C = tt(b, "shadowRoot"), I = tt(b, "attributes"), N = l && l.prototype ? tt(l.prototype, "nodeType") : null, W = l && l.prototype ? tt(l.prototype, "nodeName") : null;
1698
+ const y = a.DOMParser, R = a.trustedTypes, b = o.prototype, k = tt(b, "cloneNode"), A = tt(b, "remove"), E = tt(b, "nextSibling"), O = tt(b, "childNodes"), Z = tt(b, "parentNode"), C = tt(b, "shadowRoot"), $ = tt(b, "attributes"), N = l && l.prototype ? tt(l.prototype, "nodeType") : null, W = l && l.prototype ? tt(l.prototype, "nodeName") : null;
1699
1699
  if (typeof s == "function") {
1700
1700
  const F = e.createElement("template");
1701
1701
  F.content && F.content.ownerDocument && (e = F.content.ownerDocument);
@@ -1743,7 +1743,7 @@ function Ks() {
1743
1743
  value: null
1744
1744
  }
1745
1745
  }));
1746
- let g = !0, M = !0, u = !1, v = !0, $ = !1, L = !0, Q = !1, pe = !1, ke = !1, le = !1, de = !1, $e = !1, Ke = !0, je = !1;
1746
+ let g = !0, M = !0, u = !1, x = !0, I = !1, D = !0, Q = !1, pe = !1, ke = !1, le = !1, de = !1, $e = !1, Ke = !0, je = !1;
1747
1747
  const ze = "user-content-";
1748
1748
  let Fe = !0, Xe = !1, _ = {}, m = null;
1749
1749
  const T = G({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
@@ -1765,9 +1765,9 @@ function Ks() {
1765
1765
  if (_t && _t === r)
1766
1766
  return;
1767
1767
  (!r || typeof r != "object") && (r = {}), r = Te(r), Ut = // eslint-disable-next-line unicorn/prefer-includes
1768
- da.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? ha : r.PARSER_MEDIA_TYPE, fe = Ut === "application/xhtml+xml" ? Cn : Zt, K = he(r, "ALLOWED_TAGS") && _e(r.ALLOWED_TAGS) ? G({}, r.ALLOWED_TAGS, fe) : be, ie = he(r, "ALLOWED_ATTR") && _e(r.ALLOWED_ATTR) ? G({}, r.ALLOWED_ATTR, fe) : Ie, kn = he(r, "ALLOWED_NAMESPACES") && _e(r.ALLOWED_NAMESPACES) ? G({}, r.ALLOWED_NAMESPACES, Cn) : ca, oe = he(r, "ADD_URI_SAFE_ATTR") && _e(r.ADD_URI_SAFE_ATTR) ? G(Te(Ze), r.ADD_URI_SAFE_ATTR, fe) : Ze, ae = he(r, "ADD_DATA_URI_TAGS") && _e(r.ADD_DATA_URI_TAGS) ? G(Te(U), r.ADD_DATA_URI_TAGS, fe) : U, m = he(r, "FORBID_CONTENTS") && _e(r.FORBID_CONTENTS) ? G({}, r.FORBID_CONTENTS, fe) : T, Be = he(r, "FORBID_TAGS") && _e(r.FORBID_TAGS) ? G({}, r.FORBID_TAGS, fe) : Te({}), lt = he(r, "FORBID_ATTR") && _e(r.FORBID_ATTR) ? G({}, r.FORBID_ATTR, fe) : Te({}), _ = he(r, "USE_PROFILES") ? r.USE_PROFILES && typeof r.USE_PROFILES == "object" ? Te(r.USE_PROFILES) : r.USE_PROFILES : !1, g = r.ALLOW_ARIA_ATTR !== !1, M = r.ALLOW_DATA_ATTR !== !1, u = r.ALLOW_UNKNOWN_PROTOCOLS || !1, v = r.ALLOW_SELF_CLOSE_IN_ATTR !== !1, $ = r.SAFE_FOR_TEMPLATES || !1, L = r.SAFE_FOR_XML !== !1, Q = r.WHOLE_DOCUMENT || !1, le = r.RETURN_DOM || !1, de = r.RETURN_DOM_FRAGMENT || !1, $e = r.RETURN_TRUSTED_TYPE || !1, ke = r.FORCE_BODY || !1, Ke = r.SANITIZE_DOM !== !1, je = r.SANITIZE_NAMED_PROPS || !1, Fe = r.KEEP_CONTENT !== !1, Xe = r.IN_PLACE || !1, Ce = Ai(r.ALLOWED_URI_REGEXP) ? r.ALLOWED_URI_REGEXP : Es, At = typeof r.NAMESPACE == "string" ? r.NAMESPACE : Je, wn = he(r, "MATHML_TEXT_INTEGRATION_POINTS") && r.MATHML_TEXT_INTEGRATION_POINTS && typeof r.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Te(r.MATHML_TEXT_INTEGRATION_POINTS) : G({}, ["mi", "mo", "mn", "ms", "mtext"]), Tn = he(r, "HTML_INTEGRATION_POINTS") && r.HTML_INTEGRATION_POINTS && typeof r.HTML_INTEGRATION_POINTS == "object" ? Te(r.HTML_INTEGRATION_POINTS) : G({}, ["annotation-xml"]);
1769
- const x = he(r, "CUSTOM_ELEMENT_HANDLING") && r.CUSTOM_ELEMENT_HANDLING && typeof r.CUSTOM_ELEMENT_HANDLING == "object" ? Te(r.CUSTOM_ELEMENT_HANDLING) : Lt(null);
1770
- if (re = Lt(null), he(x, "tagNameCheck") && es(x.tagNameCheck) && (re.tagNameCheck = x.tagNameCheck), he(x, "attributeNameCheck") && es(x.attributeNameCheck) && (re.attributeNameCheck = x.attributeNameCheck), he(x, "allowCustomizedBuiltInElements") && typeof x.allowCustomizedBuiltInElements == "boolean" && (re.allowCustomizedBuiltInElements = x.allowCustomizedBuiltInElements), $ && (M = !1), de && (le = !0), _ && (K = G({}, Ss), ie = Lt(null), _.html === !0 && (G(K, Ts), G(ie, As)), _.svg === !0 && (G(K, In), G(ie, Ln), G(ie, cn)), _.svgFilters === !0 && (G(K, $n), G(ie, Ln), G(ie, cn)), _.mathMl === !0 && (G(K, Dn), G(ie, _s), G(ie, cn))), ye.tagCheck = null, ye.attributeCheck = null, he(r, "ADD_TAGS") && (typeof r.ADD_TAGS == "function" ? ye.tagCheck = r.ADD_TAGS : _e(r.ADD_TAGS) && (K === be && (K = Te(K)), G(K, r.ADD_TAGS, fe))), he(r, "ADD_ATTR") && (typeof r.ADD_ATTR == "function" ? ye.attributeCheck = r.ADD_ATTR : _e(r.ADD_ATTR) && (ie === Ie && (ie = Te(ie)), G(ie, r.ADD_ATTR, fe))), he(r, "ADD_URI_SAFE_ATTR") && _e(r.ADD_URI_SAFE_ATTR) && G(oe, r.ADD_URI_SAFE_ATTR, fe), he(r, "FORBID_CONTENTS") && _e(r.FORBID_CONTENTS) && (m === T && (m = Te(m)), G(m, r.FORBID_CONTENTS, fe)), he(r, "ADD_FORBID_CONTENTS") && _e(r.ADD_FORBID_CONTENTS) && (m === T && (m = Te(m)), G(m, r.ADD_FORBID_CONTENTS, fe)), Fe && (K["#text"] = !0), Q && G(K, ["html", "head", "body"]), K.table && (G(K, ["tbody"]), delete Be.tbody), r.TRUSTED_TYPES_POLICY) {
1768
+ da.indexOf(r.PARSER_MEDIA_TYPE) === -1 ? ha : r.PARSER_MEDIA_TYPE, fe = Ut === "application/xhtml+xml" ? Cn : Zt, K = he(r, "ALLOWED_TAGS") && _e(r.ALLOWED_TAGS) ? G({}, r.ALLOWED_TAGS, fe) : be, ie = he(r, "ALLOWED_ATTR") && _e(r.ALLOWED_ATTR) ? G({}, r.ALLOWED_ATTR, fe) : Ie, kn = he(r, "ALLOWED_NAMESPACES") && _e(r.ALLOWED_NAMESPACES) ? G({}, r.ALLOWED_NAMESPACES, Cn) : ca, oe = he(r, "ADD_URI_SAFE_ATTR") && _e(r.ADD_URI_SAFE_ATTR) ? G(Te(Ze), r.ADD_URI_SAFE_ATTR, fe) : Ze, ae = he(r, "ADD_DATA_URI_TAGS") && _e(r.ADD_DATA_URI_TAGS) ? G(Te(U), r.ADD_DATA_URI_TAGS, fe) : U, m = he(r, "FORBID_CONTENTS") && _e(r.FORBID_CONTENTS) ? G({}, r.FORBID_CONTENTS, fe) : T, Be = he(r, "FORBID_TAGS") && _e(r.FORBID_TAGS) ? G({}, r.FORBID_TAGS, fe) : Te({}), lt = he(r, "FORBID_ATTR") && _e(r.FORBID_ATTR) ? G({}, r.FORBID_ATTR, fe) : Te({}), _ = he(r, "USE_PROFILES") ? r.USE_PROFILES && typeof r.USE_PROFILES == "object" ? Te(r.USE_PROFILES) : r.USE_PROFILES : !1, g = r.ALLOW_ARIA_ATTR !== !1, M = r.ALLOW_DATA_ATTR !== !1, u = r.ALLOW_UNKNOWN_PROTOCOLS || !1, x = r.ALLOW_SELF_CLOSE_IN_ATTR !== !1, I = r.SAFE_FOR_TEMPLATES || !1, D = r.SAFE_FOR_XML !== !1, Q = r.WHOLE_DOCUMENT || !1, le = r.RETURN_DOM || !1, de = r.RETURN_DOM_FRAGMENT || !1, $e = r.RETURN_TRUSTED_TYPE || !1, ke = r.FORCE_BODY || !1, Ke = r.SANITIZE_DOM !== !1, je = r.SANITIZE_NAMED_PROPS || !1, Fe = r.KEEP_CONTENT !== !1, Xe = r.IN_PLACE || !1, Ce = Ai(r.ALLOWED_URI_REGEXP) ? r.ALLOWED_URI_REGEXP : Es, At = typeof r.NAMESPACE == "string" ? r.NAMESPACE : Je, wn = he(r, "MATHML_TEXT_INTEGRATION_POINTS") && r.MATHML_TEXT_INTEGRATION_POINTS && typeof r.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Te(r.MATHML_TEXT_INTEGRATION_POINTS) : G({}, ["mi", "mo", "mn", "ms", "mtext"]), Tn = he(r, "HTML_INTEGRATION_POINTS") && r.HTML_INTEGRATION_POINTS && typeof r.HTML_INTEGRATION_POINTS == "object" ? Te(r.HTML_INTEGRATION_POINTS) : G({}, ["annotation-xml"]);
1769
+ const v = he(r, "CUSTOM_ELEMENT_HANDLING") && r.CUSTOM_ELEMENT_HANDLING && typeof r.CUSTOM_ELEMENT_HANDLING == "object" ? Te(r.CUSTOM_ELEMENT_HANDLING) : Lt(null);
1770
+ if (re = Lt(null), he(v, "tagNameCheck") && es(v.tagNameCheck) && (re.tagNameCheck = v.tagNameCheck), he(v, "attributeNameCheck") && es(v.attributeNameCheck) && (re.attributeNameCheck = v.attributeNameCheck), he(v, "allowCustomizedBuiltInElements") && typeof v.allowCustomizedBuiltInElements == "boolean" && (re.allowCustomizedBuiltInElements = v.allowCustomizedBuiltInElements), I && (M = !1), de && (le = !0), _ && (K = G({}, Ss), ie = Lt(null), _.html === !0 && (G(K, Ts), G(ie, As)), _.svg === !0 && (G(K, In), G(ie, Ln), G(ie, cn)), _.svgFilters === !0 && (G(K, $n), G(ie, Ln), G(ie, cn)), _.mathMl === !0 && (G(K, Dn), G(ie, _s), G(ie, cn))), ye.tagCheck = null, ye.attributeCheck = null, he(r, "ADD_TAGS") && (typeof r.ADD_TAGS == "function" ? ye.tagCheck = r.ADD_TAGS : _e(r.ADD_TAGS) && (K === be && (K = Te(K)), G(K, r.ADD_TAGS, fe))), he(r, "ADD_ATTR") && (typeof r.ADD_ATTR == "function" ? ye.attributeCheck = r.ADD_ATTR : _e(r.ADD_ATTR) && (ie === Ie && (ie = Te(ie)), G(ie, r.ADD_ATTR, fe))), he(r, "ADD_URI_SAFE_ATTR") && _e(r.ADD_URI_SAFE_ATTR) && G(oe, r.ADD_URI_SAFE_ATTR, fe), he(r, "FORBID_CONTENTS") && _e(r.FORBID_CONTENTS) && (m === T && (m = Te(m)), G(m, r.FORBID_CONTENTS, fe)), he(r, "ADD_FORBID_CONTENTS") && _e(r.ADD_FORBID_CONTENTS) && (m === T && (m = Te(m)), G(m, r.ADD_FORBID_CONTENTS, fe)), Fe && (K["#text"] = !0), Q && G(K, ["html", "head", "body"]), K.table && (G(K, ["tbody"]), delete Be.tbody), r.TRUSTED_TYPES_POLICY) {
1771
1771
  if (typeof r.TRUSTED_TYPES_POLICY.createHTML != "function")
1772
1772
  throw Gt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
1773
1773
  if (typeof r.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -1777,13 +1777,13 @@ function Ks() {
1777
1777
  B === void 0 && (B = Pi(R, i)), B !== null && typeof V == "string" && (V = B.createHTML(""));
1778
1778
  (se.uponSanitizeElement.length > 0 || se.uponSanitizeAttribute.length > 0) && K === be && (K = Te(K)), se.uponSanitizeAttribute.length > 0 && ie === Ie && (ie = Te(ie)), Ee && Ee(r), _t = r;
1779
1779
  }, "_parseConfig"), ts = G({}, [...In, ...$n, ..._i]), ns = G({}, [...Dn, ...Ei]), fa = /* @__PURE__ */ d(function(r) {
1780
- let x = Z(r);
1781
- (!x || !x.tagName) && (x = {
1780
+ let v = Z(r);
1781
+ (!v || !v.tagName) && (v = {
1782
1782
  namespaceURI: At,
1783
1783
  tagName: "template"
1784
1784
  });
1785
- const z = Zt(r.tagName), ne = Zt(x.tagName);
1786
- return kn[r.namespaceURI] ? r.namespaceURI === sn ? x.namespaceURI === Je ? z === "svg" : x.namespaceURI === ct ? z === "svg" && (ne === "annotation-xml" || wn[ne]) : !!ts[z] : r.namespaceURI === ct ? x.namespaceURI === Je ? z === "math" : x.namespaceURI === sn ? z === "math" && Tn[ne] : !!ns[z] : r.namespaceURI === Je ? x.namespaceURI === sn && !Tn[ne] || x.namespaceURI === ct && !wn[ne] ? !1 : !ns[z] && (ua[z] || !ts[z]) : !!(Ut === "application/xhtml+xml" && kn[r.namespaceURI]) : !1;
1785
+ const z = Zt(r.tagName), ne = Zt(v.tagName);
1786
+ return kn[r.namespaceURI] ? r.namespaceURI === sn ? v.namespaceURI === Je ? z === "svg" : v.namespaceURI === ct ? z === "svg" && (ne === "annotation-xml" || wn[ne]) : !!ts[z] : r.namespaceURI === ct ? v.namespaceURI === Je ? z === "math" : v.namespaceURI === sn ? z === "math" && Tn[ne] : !!ns[z] : r.namespaceURI === Je ? v.namespaceURI === sn && !Tn[ne] || v.namespaceURI === ct && !wn[ne] ? !1 : !ns[z] && (ua[z] || !ts[z]) : !!(Ut === "application/xhtml+xml" && kn[r.namespaceURI]) : !1;
1787
1787
  }, "_checkValidNamespace"), We = /* @__PURE__ */ d(function(r) {
1788
1788
  Mt(t.removed, {
1789
1789
  element: r
@@ -1793,31 +1793,31 @@ function Ks() {
1793
1793
  } catch {
1794
1794
  A(r);
1795
1795
  }
1796
- }, "_forceRemove"), bt = /* @__PURE__ */ d(function(r, x) {
1796
+ }, "_forceRemove"), bt = /* @__PURE__ */ d(function(r, v) {
1797
1797
  try {
1798
1798
  Mt(t.removed, {
1799
- attribute: x.getAttributeNode(r),
1800
- from: x
1799
+ attribute: v.getAttributeNode(r),
1800
+ from: v
1801
1801
  });
1802
1802
  } catch {
1803
1803
  Mt(t.removed, {
1804
1804
  attribute: null,
1805
- from: x
1805
+ from: v
1806
1806
  });
1807
1807
  }
1808
- if (x.removeAttribute(r), r === "is")
1808
+ if (v.removeAttribute(r), r === "is")
1809
1809
  if (le || de)
1810
1810
  try {
1811
- We(x);
1811
+ We(v);
1812
1812
  } catch {
1813
1813
  }
1814
1814
  else
1815
1815
  try {
1816
- x.setAttribute(r, "");
1816
+ v.setAttribute(r, "");
1817
1817
  } catch {
1818
1818
  }
1819
1819
  }, "_removeAttribute"), ss = /* @__PURE__ */ d(function(r) {
1820
- let x = null, z = null;
1820
+ let v = null, z = null;
1821
1821
  if (ke)
1822
1822
  r = "<remove></remove>" + r;
1823
1823
  else {
@@ -1828,50 +1828,50 @@ function Ks() {
1828
1828
  const ne = B ? B.createHTML(r) : r;
1829
1829
  if (At === Je)
1830
1830
  try {
1831
- x = new y().parseFromString(ne, Ut);
1831
+ v = new y().parseFromString(ne, Ut);
1832
1832
  } catch {
1833
1833
  }
1834
- if (!x || !x.documentElement) {
1835
- x = ue.createDocument(At, "template", null);
1834
+ if (!v || !v.documentElement) {
1835
+ v = ue.createDocument(At, "template", null);
1836
1836
  try {
1837
- x.documentElement.innerHTML = yn ? V : ne;
1837
+ v.documentElement.innerHTML = yn ? V : ne;
1838
1838
  } catch {
1839
1839
  }
1840
1840
  }
1841
- const Y = x.body || x.documentElement;
1842
- return r && z && Y.insertBefore(e.createTextNode(z), Y.childNodes[0] || null), At === Je ? St.call(x, Q ? "html" : "body")[0] : Q ? x.documentElement : Y;
1841
+ const Y = v.body || v.documentElement;
1842
+ return r && z && Y.insertBefore(e.createTextNode(z), Y.childNodes[0] || null), At === Je ? St.call(v, Q ? "html" : "body")[0] : Q ? v.documentElement : Y;
1843
1843
  }, "_initDocument"), as = /* @__PURE__ */ d(function(r) {
1844
1844
  return Ae.call(
1845
1845
  r.ownerDocument || r,
1846
1846
  r,
1847
1847
  // eslint-disable-next-line no-bitwise
1848
- p.SHOW_ELEMENT | p.SHOW_COMMENT | p.SHOW_TEXT | p.SHOW_PROCESSING_INSTRUCTION | p.SHOW_CDATA_SECTION,
1848
+ h.SHOW_ELEMENT | h.SHOW_COMMENT | h.SHOW_TEXT | h.SHOW_PROCESSING_INSTRUCTION | h.SHOW_CDATA_SECTION,
1849
1849
  null
1850
1850
  );
1851
1851
  }, "_createNodeIterator"), is = /* @__PURE__ */ d(function(r) {
1852
1852
  r.normalize();
1853
- const x = Ae.call(
1853
+ const v = Ae.call(
1854
1854
  r.ownerDocument || r,
1855
1855
  r,
1856
1856
  // eslint-disable-next-line no-bitwise
1857
- p.SHOW_TEXT | p.SHOW_COMMENT | p.SHOW_CDATA_SECTION | p.SHOW_PROCESSING_INSTRUCTION,
1857
+ h.SHOW_TEXT | h.SHOW_COMMENT | h.SHOW_CDATA_SECTION | h.SHOW_PROCESSING_INSTRUCTION,
1858
1858
  null
1859
1859
  );
1860
- let z = x.nextNode();
1860
+ let z = v.nextNode();
1861
1861
  for (; z; ) {
1862
1862
  let ne = z.data;
1863
1863
  Rt([at, Ye, it], (Y) => {
1864
1864
  ne = Ct(ne, Y, " ");
1865
- }), z.data = ne, z = x.nextNode();
1865
+ }), z.data = ne, z = v.nextNode();
1866
1866
  }
1867
1867
  }, "_scrubTemplateExpressions"), an = /* @__PURE__ */ d(function(r) {
1868
- const x = W ? W(r) : null;
1869
- return typeof x != "string" || fe(x) !== "form" ? !1 : typeof r.nodeName != "string" || typeof r.textContent != "string" || typeof r.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
1868
+ const v = W ? W(r) : null;
1869
+ return typeof v != "string" || fe(v) !== "form" ? !1 : typeof r.nodeName != "string" || typeof r.textContent != "string" || typeof r.removeChild != "function" || // Realm-safe NamedNodeMap detection: equality against the cached
1870
1870
  // prototype getter. Clobbered .attributes (e.g. <input name="attributes">)
1871
1871
  // makes the direct read diverge from the cached read; a clean form
1872
1872
  // (same-realm OR foreign-realm) has both reads pointing at the same
1873
1873
  // canonical NamedNodeMap.
1874
- r.attributes !== I(r) || typeof r.removeAttribute != "function" || typeof r.setAttribute != "function" || typeof r.namespaceURI != "string" || typeof r.insertBefore != "function" || typeof r.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
1874
+ r.attributes !== $(r) || typeof r.removeAttribute != "function" || typeof r.setAttribute != "function" || typeof r.namespaceURI != "string" || typeof r.insertBefore != "function" || typeof r.hasChildNodes != "function" || // NodeType clobbering probe. Cached Node.prototype.nodeType getter
1875
1875
  // returns the integer 1 for any Element regardless of realm; direct
1876
1876
  // read on a clobbered form (e.g. <input name="nodeType">) returns
1877
1877
  // the named child element. Cheap addition — nodeType is read from
@@ -1907,21 +1907,21 @@ function Ks() {
1907
1907
  return !1;
1908
1908
  }
1909
1909
  }, "_isNode");
1910
- function ot(F, r, x) {
1910
+ function ot(F, r, v) {
1911
1911
  Rt(F, (z) => {
1912
- z.call(t, r, x, _t);
1912
+ z.call(t, r, v, _t);
1913
1913
  });
1914
1914
  }
1915
1915
  d(ot, "_executeHooks");
1916
1916
  const rs = /* @__PURE__ */ d(function(r) {
1917
- let x = null;
1917
+ let v = null;
1918
1918
  if (ot(se.beforeSanitizeElements, r, null), an(r))
1919
1919
  return We(r), !0;
1920
1920
  const z = fe(r.nodeName);
1921
1921
  if (ot(se.uponSanitizeElement, r, {
1922
1922
  tagName: z,
1923
1923
  allowedTags: K
1924
- }), L && r.hasChildNodes() && !rn(r.firstElementChild) && we(/<[/\w!]/g, r.innerHTML) && we(/<[/\w!]/g, r.textContent) || L && r.namespaceURI === Je && z === "style" && rn(r.firstElementChild) || r.nodeType === et.progressingInstruction || L && r.nodeType === et.comment && we(/<[/\w]/g, r.data))
1924
+ }), D && r.hasChildNodes() && !rn(r.firstElementChild) && we(/<[/\w!]/g, r.innerHTML) && we(/<[/\w!]/g, r.textContent) || D && r.namespaceURI === Je && z === "style" && rn(r.firstElementChild) || r.nodeType === et.progressingInstruction || D && r.nodeType === et.comment && we(/<[/\w]/g, r.data))
1925
1925
  return We(r), !0;
1926
1926
  if (Be[z] || !(ye.tagCheck instanceof Function && ye.tagCheck(z)) && !K[z]) {
1927
1927
  if (!Be[z] && os(z) && (re.tagNameCheck instanceof RegExp && we(re.tagNameCheck, z) || re.tagNameCheck instanceof Function && re.tagNameCheck(z)))
@@ -1938,29 +1938,29 @@ function Ks() {
1938
1938
  }
1939
1939
  return We(r), !0;
1940
1940
  }
1941
- return (N ? N(r) : r.nodeType) === et.element && !fa(r) || (z === "noscript" || z === "noembed" || z === "noframes") && we(/<\/no(script|embed|frames)/i, r.innerHTML) ? (We(r), !0) : ($ && r.nodeType === et.text && (x = r.textContent, Rt([at, Ye, it], (Y) => {
1942
- x = Ct(x, Y, " ");
1943
- }), r.textContent !== x && (Mt(t.removed, {
1941
+ return (N ? N(r) : r.nodeType) === et.element && !fa(r) || (z === "noscript" || z === "noembed" || z === "noframes") && we(/<\/no(script|embed|frames)/i, r.innerHTML) ? (We(r), !0) : (I && r.nodeType === et.text && (v = r.textContent, Rt([at, Ye, it], (Y) => {
1942
+ v = Ct(v, Y, " ");
1943
+ }), r.textContent !== v && (Mt(t.removed, {
1944
1944
  element: r.cloneNode()
1945
- }), r.textContent = x)), ot(se.afterSanitizeElements, r, null), !1);
1946
- }, "_sanitizeElements"), ls = /* @__PURE__ */ d(function(r, x, z) {
1947
- if (lt[x] || Ke && (x === "id" || x === "name") && (z in e || z in pa))
1945
+ }), r.textContent = v)), ot(se.afterSanitizeElements, r, null), !1);
1946
+ }, "_sanitizeElements"), ls = /* @__PURE__ */ d(function(r, v, z) {
1947
+ if (lt[v] || Ke && (v === "id" || v === "name") && (z in e || z in pa))
1948
1948
  return !1;
1949
- const ne = ie[x] || ye.attributeCheck instanceof Function && ye.attributeCheck(x, r);
1950
- if (!(M && !lt[x] && we(Oe, x))) {
1951
- if (!(g && we(vt, x))) {
1952
- if (!ne || lt[x]) {
1949
+ const ne = ie[v] || ye.attributeCheck instanceof Function && ye.attributeCheck(v, r);
1950
+ if (!(M && !lt[v] && we(Oe, v))) {
1951
+ if (!(g && we(vt, v))) {
1952
+ if (!ne || lt[v]) {
1953
1953
  if (
1954
1954
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
1955
1955
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1956
1956
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
1957
- !(os(r) && (re.tagNameCheck instanceof RegExp && we(re.tagNameCheck, r) || re.tagNameCheck instanceof Function && re.tagNameCheck(r)) && (re.attributeNameCheck instanceof RegExp && we(re.attributeNameCheck, x) || re.attributeNameCheck instanceof Function && re.attributeNameCheck(x, r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1957
+ !(os(r) && (re.tagNameCheck instanceof RegExp && we(re.tagNameCheck, r) || re.tagNameCheck instanceof Function && re.tagNameCheck(r)) && (re.attributeNameCheck instanceof RegExp && we(re.attributeNameCheck, v) || re.attributeNameCheck instanceof Function && re.attributeNameCheck(v, r)) || // Alternative, second condition checks if it's an `is`-attribute, AND
1958
1958
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
1959
- x === "is" && re.allowCustomizedBuiltInElements && (re.tagNameCheck instanceof RegExp && we(re.tagNameCheck, z) || re.tagNameCheck instanceof Function && re.tagNameCheck(z)))
1959
+ v === "is" && re.allowCustomizedBuiltInElements && (re.tagNameCheck instanceof RegExp && we(re.tagNameCheck, z) || re.tagNameCheck instanceof Function && re.tagNameCheck(z)))
1960
1960
  ) return !1;
1961
- } else if (!oe[x]) {
1961
+ } else if (!oe[v]) {
1962
1962
  if (!we(Ce, Ct(z, Me, ""))) {
1963
- if (!((x === "src" || x === "xlink:href" || x === "href") && r !== "script" && ys(z, "data:") === 0 && ae[r])) {
1963
+ if (!((v === "src" || v === "xlink:href" || v === "href") && r !== "script" && ys(z, "data:") === 0 && ae[r])) {
1964
1964
  if (!(u && !we(xt, Ct(z, Me, "")))) {
1965
1965
  if (z)
1966
1966
  return !1;
@@ -1975,8 +1975,8 @@ function Ks() {
1975
1975
  return !ma[Zt(r)] && we(rt, r);
1976
1976
  }, "_isBasicCustomElement"), cs = /* @__PURE__ */ d(function(r) {
1977
1977
  ot(se.beforeSanitizeAttributes, r, null);
1978
- const x = r.attributes;
1979
- if (!x || an(r))
1978
+ const v = r.attributes;
1979
+ if (!v || an(r))
1980
1980
  return;
1981
1981
  const z = {
1982
1982
  attrName: "",
@@ -1985,11 +1985,11 @@ function Ks() {
1985
1985
  allowedAttributes: ie,
1986
1986
  forceKeepAttr: void 0
1987
1987
  };
1988
- let ne = x.length;
1988
+ let ne = v.length;
1989
1989
  for (; ne--; ) {
1990
- const Y = x[ne], ce = Y.name, Ue = Y.namespaceURI, Qe = Y.value, Ge = fe(ce), An = Qe;
1990
+ const Y = v[ne], ce = Y.name, Ue = Y.namespaceURI, Qe = Y.value, Ge = fe(ce), An = Qe;
1991
1991
  let xe = ce === "value" ? An : bi(An);
1992
- if (z.attrName = Ge, z.attrValue = xe, z.keepAttr = !0, z.forceKeepAttr = void 0, ot(se.uponSanitizeAttribute, r, z), xe = z.attrValue, je && (Ge === "id" || Ge === "name") && ys(xe, ze) !== 0 && (bt(ce, r), xe = ze + xe), L && we(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, xe)) {
1992
+ if (z.attrName = Ge, z.attrValue = xe, z.keepAttr = !0, z.forceKeepAttr = void 0, ot(se.uponSanitizeAttribute, r, z), xe = z.attrValue, je && (Ge === "id" || Ge === "name") && ys(xe, ze) !== 0 && (bt(ce, r), xe = ze + xe), D && we(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, xe)) {
1993
1993
  bt(ce, r);
1994
1994
  continue;
1995
1995
  }
@@ -2003,11 +2003,11 @@ function Ks() {
2003
2003
  bt(ce, r);
2004
2004
  continue;
2005
2005
  }
2006
- if (!v && we(/\/>/i, xe)) {
2006
+ if (!x && we(/\/>/i, xe)) {
2007
2007
  bt(ce, r);
2008
2008
  continue;
2009
2009
  }
2010
- $ && Rt([at, Ye, it], (ds) => {
2010
+ I && Rt([at, Ye, it], (ds) => {
2011
2011
  xe = Ct(xe, ds, " ");
2012
2012
  });
2013
2013
  const us = fe(r.nodeName);
@@ -2035,17 +2035,17 @@ function Ks() {
2035
2035
  }
2036
2036
  ot(se.afterSanitizeAttributes, r, null);
2037
2037
  }, "_sanitizeAttributes"), ln = /* @__PURE__ */ d(function(r) {
2038
- let x = null;
2038
+ let v = null;
2039
2039
  const z = as(r);
2040
- for (ot(se.beforeSanitizeShadowDOM, r, null); x = z.nextNode(); )
2041
- if (ot(se.uponSanitizeShadowNode, x, null), rs(x), cs(x), Ht(x.content) && ln(x.content), (N ? N(x) : x.nodeType) === et.element) {
2042
- const Y = C ? C(x) : x.shadowRoot;
2040
+ for (ot(se.beforeSanitizeShadowDOM, r, null); v = z.nextNode(); )
2041
+ if (ot(se.uponSanitizeShadowNode, v, null), rs(v), cs(v), Ht(v.content) && ln(v.content), (N ? N(v) : v.nodeType) === et.element) {
2042
+ const Y = C ? C(v) : v.shadowRoot;
2043
2043
  Ht(Y) && (Et(Y), ln(Y));
2044
2044
  }
2045
2045
  ot(se.afterSanitizeShadowDOM, r, null);
2046
2046
  }, "_sanitizeShadowDOM"), Et = /* @__PURE__ */ d(function(r) {
2047
- const x = N ? N(r) : r.nodeType;
2048
- if (x === et.element) {
2047
+ const v = N ? N(r) : r.nodeType;
2048
+ if (v === et.element) {
2049
2049
  const Y = C ? C(r) : r.shadowRoot;
2050
2050
  Ht(Y) && (Et(Y), ln(Y));
2051
2051
  }
@@ -2058,7 +2058,7 @@ function Ks() {
2058
2058
  });
2059
2059
  for (const Y of ne)
2060
2060
  Et(Y);
2061
- if (x === et.element) {
2061
+ if (v === et.element) {
2062
2062
  const Y = W ? W(r) : null;
2063
2063
  if (typeof Y == "string" && fe(Y) === "template") {
2064
2064
  const ce = r.content;
@@ -2067,7 +2067,7 @@ function Ks() {
2067
2067
  }
2068
2068
  }, "_sanitizeAttachedShadowRoots");
2069
2069
  return t.sanitize = function(F) {
2070
- let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, x = null, z = null, ne = null, Y = null;
2070
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, v = null, z = null, ne = null, Y = null;
2071
2071
  if (yn = !F, yn && (F = "<!-->"), typeof F != "string" && !rn(F) && (F = Si(F), typeof F != "string"))
2072
2072
  throw Gt("dirty is not a string, aborting");
2073
2073
  if (!t.isSupported)
@@ -2083,31 +2083,31 @@ function Ks() {
2083
2083
  throw Gt("root node is clobbered and cannot be sanitized in-place");
2084
2084
  Et(F);
2085
2085
  } else if (rn(F))
2086
- x = ss("<!---->"), z = x.ownerDocument.importNode(F, !0), z.nodeType === et.element && z.nodeName === "BODY" || z.nodeName === "HTML" ? x = z : x.appendChild(z), Et(z);
2086
+ v = ss("<!---->"), z = v.ownerDocument.importNode(F, !0), z.nodeType === et.element && z.nodeName === "BODY" || z.nodeName === "HTML" ? v = z : v.appendChild(z), Et(z);
2087
2087
  else {
2088
- if (!le && !$ && !Q && // eslint-disable-next-line unicorn/prefer-includes
2088
+ if (!le && !I && !Q && // eslint-disable-next-line unicorn/prefer-includes
2089
2089
  F.indexOf("<") === -1)
2090
2090
  return B && $e ? B.createHTML(F) : F;
2091
- if (x = ss(F), !x)
2091
+ if (v = ss(F), !v)
2092
2092
  return le ? null : $e ? V : "";
2093
2093
  }
2094
- x && ke && We(x.firstChild);
2095
- const ce = as(Xe ? F : x);
2094
+ v && ke && We(v.firstChild);
2095
+ const ce = as(Xe ? F : v);
2096
2096
  for (; ne = ce.nextNode(); )
2097
2097
  rs(ne), cs(ne), Ht(ne.content) && ln(ne.content);
2098
2098
  if (Xe)
2099
- return $ && is(F), F;
2099
+ return I && is(F), F;
2100
2100
  if (le) {
2101
- if ($ && is(x), de)
2102
- for (Y = Pe.call(x.ownerDocument); x.firstChild; )
2103
- Y.appendChild(x.firstChild);
2101
+ if (I && is(v), de)
2102
+ for (Y = Pe.call(v.ownerDocument); v.firstChild; )
2103
+ Y.appendChild(v.firstChild);
2104
2104
  else
2105
- Y = x;
2105
+ Y = v;
2106
2106
  return (ie.shadowroot || ie.shadowrootmode) && (Y = Le.call(n, Y, !0)), Y;
2107
2107
  }
2108
- let Ue = Q ? x.outerHTML : x.innerHTML;
2109
- return Q && K["!doctype"] && x.ownerDocument && x.ownerDocument.doctype && x.ownerDocument.doctype.name && we(Oi, x.ownerDocument.doctype.name) && (Ue = "<!DOCTYPE " + x.ownerDocument.doctype.name + `>
2110
- ` + Ue), $ && Rt([at, Ye, it], (Qe) => {
2108
+ let Ue = Q ? v.outerHTML : v.innerHTML;
2109
+ return Q && K["!doctype"] && v.ownerDocument && v.ownerDocument.doctype && v.ownerDocument.doctype.name && we(Oi, v.ownerDocument.doctype.name) && (Ue = "<!DOCTYPE " + v.ownerDocument.doctype.name + `>
2110
+ ` + Ue), I && Rt([at, Ye, it], (Qe) => {
2111
2111
  Ue = Ct(Ue, Qe, " ");
2112
2112
  }), B && $e ? B.createHTML(Ue) : Ue;
2113
2113
  }, t.setConfig = function() {
@@ -2115,16 +2115,16 @@ function Ks() {
2115
2115
  Sn(F), pe = !0;
2116
2116
  }, t.clearConfig = function() {
2117
2117
  _t = null, pe = !1;
2118
- }, t.isValidAttribute = function(F, r, x) {
2118
+ }, t.isValidAttribute = function(F, r, v) {
2119
2119
  _t || Sn({});
2120
2120
  const z = fe(F), ne = fe(r);
2121
- return ls(z, ne, x);
2121
+ return ls(z, ne, v);
2122
2122
  }, t.addHook = function(F, r) {
2123
2123
  typeof r == "function" && Mt(se[F], r);
2124
2124
  }, t.removeHook = function(F, r) {
2125
2125
  if (r !== void 0) {
2126
- const x = vi(se[F], r);
2127
- return x === -1 ? void 0 : xi(se[F], x, 1)[0];
2126
+ const v = vi(se[F], r);
2127
+ return v === -1 ? void 0 : xi(se[F], v, 1)[0];
2128
2128
  }
2129
2129
  return xs(se[F]);
2130
2130
  }, t.removeHooks = function(F) {
@@ -2187,9 +2187,9 @@ function $s(a) {
2187
2187
  d($s, "V");
2188
2188
  function Ds(a, t) {
2189
2189
  let e = a.replace(Se.findPipe, (s, l, o) => {
2190
- let p = !1, c = l;
2191
- for (; --c >= 0 && o[c] === "\\"; ) p = !p;
2192
- return p ? "|" : " |";
2190
+ let h = !1, c = l;
2191
+ for (; --c >= 0 && o[c] === "\\"; ) h = !h;
2192
+ return h ? "|" : " |";
2193
2193
  }), n = e.split(Se.splitPipe), i = 0;
2194
2194
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
2195
2195
  else for (; n.length < t; ) n.push("");
@@ -2235,8 +2235,8 @@ d(Sr, "me");
2235
2235
  function Os(a, t, e, n, i) {
2236
2236
  let s = t.href, l = t.title || null, o = a[1].replace(i.other.outputLinkReplace, "$1");
2237
2237
  n.state.inLink = !0;
2238
- let p = { type: a[0].charAt(0) === "!" ? "image" : "link", raw: e, href: s, title: l, text: o, tokens: n.inlineTokens(o) };
2239
- return n.state.inLink = !1, p;
2238
+ let h = { type: a[0].charAt(0) === "!" ? "image" : "link", raw: e, href: s, title: l, text: o, tokens: n.inlineTokens(o) };
2239
+ return n.state.inLink = !1, h;
2240
2240
  }
2241
2241
  d(Os, "xe");
2242
2242
  function Ar(a, t, e) {
@@ -2302,12 +2302,12 @@ var zt, mn = (zt = class {
2302
2302
  `).split(`
2303
2303
  `), i = "", s = "", l = [];
2304
2304
  for (; n.length > 0; ) {
2305
- let o = !1, p = [], c;
2306
- for (c = 0; c < n.length; c++) if (this.rules.other.blockquoteStart.test(n[c])) p.push(n[c]), o = !0;
2307
- else if (!o) p.push(n[c]);
2305
+ let o = !1, h = [], c;
2306
+ for (c = 0; c < n.length; c++) if (this.rules.other.blockquoteStart.test(n[c])) h.push(n[c]), o = !0;
2307
+ else if (!o) h.push(n[c]);
2308
2308
  else break;
2309
2309
  n = n.slice(c);
2310
- let y = p.join(`
2310
+ let y = h.join(`
2311
2311
  `), R = y.replace(this.rules.other.blockquoteSetextReplace, `
2312
2312
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
2313
2313
  i = i ? `${i}
@@ -2350,15 +2350,15 @@ ${R}` : R;
2350
2350
  `, 1)[0], A = !b.trim(), E = 0;
2351
2351
  if (this.options.pedantic ? (E = 2, R = b.trimStart()) : A ? E = e[1].length + 1 : (E = b.search(this.rules.other.nonSpaceChar), E = E > 4 ? 1 : E, R = b.slice(E), E += e[1].length), A && this.rules.other.blankLine.test(k) && (y += k + `
2352
2352
  `, t = t.substring(k.length + 1), c = !0), !c) {
2353
- let O = this.rules.other.nextBulletRegex(E), Z = this.rules.other.hrRegex(E), C = this.rules.other.fencesBeginRegex(E), I = this.rules.other.headingBeginRegex(E), N = this.rules.other.htmlBeginRegex(E), W = this.rules.other.blockquoteBeginRegex(E);
2353
+ let O = this.rules.other.nextBulletRegex(E), Z = this.rules.other.hrRegex(E), C = this.rules.other.fencesBeginRegex(E), $ = this.rules.other.headingBeginRegex(E), N = this.rules.other.htmlBeginRegex(E), W = this.rules.other.blockquoteBeginRegex(E);
2354
2354
  for (; t; ) {
2355
2355
  let B = t.split(`
2356
2356
  `, 1)[0], V;
2357
- if (k = B, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), V = k) : V = k.replace(this.rules.other.tabCharGlobal, " "), C.test(k) || I.test(k) || N.test(k) || W.test(k) || O.test(k) || Z.test(k)) break;
2357
+ if (k = B, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), V = k) : V = k.replace(this.rules.other.tabCharGlobal, " "), C.test(k) || $.test(k) || N.test(k) || W.test(k) || O.test(k) || Z.test(k)) break;
2358
2358
  if (V.search(this.rules.other.nonSpaceChar) >= E || !k.trim()) R += `
2359
2359
  ` + V.slice(E);
2360
2360
  else {
2361
- if (A || b.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || C.test(b) || I.test(b) || Z.test(b)) break;
2361
+ if (A || b.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || C.test(b) || $.test(b) || Z.test(b)) break;
2362
2362
  R += `
2363
2363
  ` + k;
2364
2364
  }
@@ -2368,8 +2368,8 @@ ${R}` : R;
2368
2368
  }
2369
2369
  s.loose || (o ? s.loose = !0 : this.rules.other.doubleBlankLine.test(y) && (o = !0)), s.items.push({ type: "list_item", raw: y, task: !!this.options.gfm && this.rules.other.listIsTask.test(R), loose: !1, text: R, tokens: [] }), s.raw += y;
2370
2370
  }
2371
- let p = s.items.at(-1);
2372
- if (p) p.raw = p.raw.trimEnd(), p.text = p.text.trimEnd();
2371
+ let h = s.items.at(-1);
2372
+ if (h) h.raw = h.raw.trimEnd(), h.text = h.text.trimEnd();
2373
2373
  else return;
2374
2374
  s.raw = s.raw.trimEnd();
2375
2375
  for (let c of s.items) {
@@ -2423,7 +2423,7 @@ ${R}` : R;
2423
2423
  if (n.length === i.length) {
2424
2424
  for (let o of i) this.rules.other.tableAlignRight.test(o) ? l.align.push("right") : this.rules.other.tableAlignCenter.test(o) ? l.align.push("center") : this.rules.other.tableAlignLeft.test(o) ? l.align.push("left") : l.align.push(null);
2425
2425
  for (let o = 0; o < n.length; o++) l.header.push({ text: n[o], tokens: this.lexer.inline(n[o]), header: !0, align: l.align[o] });
2426
- for (let o of s) l.rows.push(Ds(o, l.header.length).map((p, c) => ({ text: p, tokens: this.lexer.inline(p), header: !1, align: l.align[c] })));
2426
+ for (let o of s) l.rows.push(Ds(o, l.header.length).map((h, c) => ({ text: h, tokens: this.lexer.inline(h), header: !1, align: l.align[c] })));
2427
2427
  return l;
2428
2428
  }
2429
2429
  }
@@ -2493,18 +2493,18 @@ ${R}` : R;
2493
2493
  emStrong(t, e, n = "") {
2494
2494
  let i = this.rules.inline.emStrongLDelim.exec(t);
2495
2495
  if (!(!i || !i[1] && !i[2] && !i[3] && !i[4] || i[4] && n.match(this.rules.other.unicodeAlphaNumeric)) && (!(i[1] || i[3]) || !n || this.rules.inline.punctuation.exec(n))) {
2496
- let s = [...i[0]].length - 1, l, o, p = s, c = 0, y = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
2496
+ let s = [...i[0]].length - 1, l, o, h = s, c = 0, y = i[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
2497
2497
  for (y.lastIndex = 0, e = e.slice(-1 * t.length + s); (i = y.exec(e)) !== null; ) {
2498
2498
  if (l = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !l) continue;
2499
2499
  if (o = [...l].length, i[3] || i[4]) {
2500
- p += o;
2500
+ h += o;
2501
2501
  continue;
2502
2502
  } else if ((i[5] || i[6]) && s % 3 && !((s + o) % 3)) {
2503
2503
  c += o;
2504
2504
  continue;
2505
2505
  }
2506
- if (p -= o, p > 0) continue;
2507
- o = Math.min(o, o + p + c);
2506
+ if (h -= o, h > 0) continue;
2507
+ o = Math.min(o, o + h + c);
2508
2508
  let R = [...i[0]][0].length, b = t.slice(0, s + i.index + R + o);
2509
2509
  if (Math.min(s, o) % 2) {
2510
2510
  let A = b.slice(1, -1);
@@ -2529,15 +2529,15 @@ ${R}` : R;
2529
2529
  del(t, e, n = "") {
2530
2530
  let i = this.rules.inline.delLDelim.exec(t);
2531
2531
  if (i && (!i[1] || !n || this.rules.inline.punctuation.exec(n))) {
2532
- let s = [...i[0]].length - 1, l, o, p = s, c = this.rules.inline.delRDelim;
2532
+ let s = [...i[0]].length - 1, l, o, h = s, c = this.rules.inline.delRDelim;
2533
2533
  for (c.lastIndex = 0, e = e.slice(-1 * t.length + s); (i = c.exec(e)) !== null; ) {
2534
2534
  if (l = i[1] || i[2] || i[3] || i[4] || i[5] || i[6], !l || (o = [...l].length, o !== s)) continue;
2535
2535
  if (i[3] || i[4]) {
2536
- p += o;
2536
+ h += o;
2537
2537
  continue;
2538
2538
  }
2539
- if (p -= o, p > 0) continue;
2540
- o = Math.min(o, o + p);
2539
+ if (h -= o, h > 0) continue;
2540
+ o = Math.min(o, o + h);
2541
2541
  let y = [...i[0]][0].length, R = t.slice(0, s + i.index + y + o), b = R.slice(s, -s);
2542
2542
  return { type: "del", raw: R, text: b, tokens: this.lexer.inlineTokens(b) };
2543
2543
  }
@@ -2671,9 +2671,9 @@ ${R}` : R;
2671
2671
  }
2672
2672
  let l = t;
2673
2673
  if (this.options.extensions?.startBlock) {
2674
- let o = 1 / 0, p = t.slice(1), c;
2674
+ let o = 1 / 0, h = t.slice(1), c;
2675
2675
  this.options.extensions.startBlock.forEach((y) => {
2676
- c = y.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (o = Math.min(o, c));
2676
+ c = y.call({ lexer: this }, h), typeof c == "number" && c >= 0 && (o = Math.min(o, c));
2677
2677
  }), o < 1 / 0 && o >= 0 && (l = t.substring(0, o + 1));
2678
2678
  }
2679
2679
  if (this.state.top && (s = this.tokenizer.paragraph(l))) {
@@ -2714,9 +2714,9 @@ ${R}` : R;
2714
2714
  let s;
2715
2715
  for (; (i = this.tokenizer.rules.inline.blockSkip.exec(n)) !== null; ) s = i[2] ? i[2].length : 0, n = n.slice(0, i.index + s) + "[" + "a".repeat(i[0].length - s - 2) + "]" + n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
2716
2716
  n = this.options.hooks?.emStrongMask?.call({ lexer: this }, n) ?? n;
2717
- let l = !1, o = "", p = 1 / 0;
2717
+ let l = !1, o = "", h = 1 / 0;
2718
2718
  for (; t; ) {
2719
- if (t.length < p) p = t.length;
2719
+ if (t.length < h) h = t.length;
2720
2720
  else {
2721
2721
  this.infiniteLoopError(t.charCodeAt(0));
2722
2722
  break;
@@ -2829,8 +2829,8 @@ ${this.parser.parse(t)}</blockquote>
2829
2829
  list(t) {
2830
2830
  let e = t.ordered, n = t.start, i = "";
2831
2831
  for (let o = 0; o < t.items.length; o++) {
2832
- let p = t.items[o];
2833
- i += this.listitem(p);
2832
+ let h = t.items[o];
2833
+ i += this.listitem(h);
2834
2834
  }
2835
2835
  let s = e ? "ol" : "ul", l = e && n !== 1 ? ' start="' + n + '"' : "";
2836
2836
  return "<" + s + l + `>
@@ -3161,8 +3161,8 @@ ${t}</tr>
3161
3161
  if ("renderer" in s) {
3162
3162
  let l = e.renderers[s.name];
3163
3163
  l ? e.renderers[s.name] = function(...o) {
3164
- let p = s.renderer.apply(this, o);
3165
- return p === !1 && (p = l.apply(this, o)), p;
3164
+ let h = s.renderer.apply(this, o);
3165
+ return h === !1 && (h = l.apply(this, o)), h;
3166
3166
  } : e.renderers[s.name] = s.renderer;
3167
3167
  }
3168
3168
  if ("tokenizer" in s) {
@@ -3176,9 +3176,9 @@ ${t}</tr>
3176
3176
  for (let l in n.renderer) {
3177
3177
  if (!(l in s)) throw new Error(`renderer '${l}' does not exist`);
3178
3178
  if (["options", "parser"].includes(l)) continue;
3179
- let o = l, p = n.renderer[o], c = s[o];
3179
+ let o = l, h = n.renderer[o], c = s[o];
3180
3180
  s[o] = (...y) => {
3181
- let R = p.apply(s, y);
3181
+ let R = h.apply(s, y);
3182
3182
  return R === !1 && (R = c.apply(s, y)), R || "";
3183
3183
  };
3184
3184
  }
@@ -3189,9 +3189,9 @@ ${t}</tr>
3189
3189
  for (let l in n.tokenizer) {
3190
3190
  if (!(l in s)) throw new Error(`tokenizer '${l}' does not exist`);
3191
3191
  if (["options", "rules", "lexer"].includes(l)) continue;
3192
- let o = l, p = n.tokenizer[o], c = s[o];
3192
+ let o = l, h = n.tokenizer[o], c = s[o];
3193
3193
  s[o] = (...y) => {
3194
- let R = p.apply(s, y);
3194
+ let R = h.apply(s, y);
3195
3195
  return R === !1 && (R = c.apply(s, y)), R;
3196
3196
  };
3197
3197
  }
@@ -3202,20 +3202,20 @@ ${t}</tr>
3202
3202
  for (let l in n.hooks) {
3203
3203
  if (!(l in s)) throw new Error(`hook '${l}' does not exist`);
3204
3204
  if (["options", "block"].includes(l)) continue;
3205
- let o = l, p = n.hooks[o], c = s[o];
3205
+ let o = l, h = n.hooks[o], c = s[o];
3206
3206
  Jt.passThroughHooks.has(l) ? s[o] = (y) => {
3207
3207
  if (this.defaults.async && Jt.passThroughHooksRespectAsync.has(l)) return (async () => {
3208
- let b = await p.call(s, y);
3208
+ let b = await h.call(s, y);
3209
3209
  return c.call(s, b);
3210
3210
  })();
3211
- let R = p.call(s, y);
3211
+ let R = h.call(s, y);
3212
3212
  return c.call(s, R);
3213
3213
  } : s[o] = (...y) => {
3214
3214
  if (this.defaults.async) return (async () => {
3215
- let b = await p.apply(s, y);
3215
+ let b = await h.apply(s, y);
3216
3216
  return b === !1 && (b = await c.apply(s, y)), b;
3217
3217
  })();
3218
- let R = p.apply(s, y);
3218
+ let R = h.apply(s, y);
3219
3219
  return R === !1 && (R = c.apply(s, y)), R;
3220
3220
  };
3221
3221
  }
@@ -3224,8 +3224,8 @@ ${t}</tr>
3224
3224
  if (n.walkTokens) {
3225
3225
  let s = this.defaults.walkTokens, l = n.walkTokens;
3226
3226
  i.walkTokens = function(o) {
3227
- let p = [];
3228
- return p.push(l.call(this, o)), s && (p = p.concat(s.call(this, o))), p;
3227
+ let h = [];
3228
+ return h.push(l.call(this, o)), s && (h = h.concat(s.call(this, o))), h;
3229
3229
  };
3230
3230
  }
3231
3231
  this.defaults = { ...this.defaults, ...i };
@@ -3247,7 +3247,7 @@ ${t}</tr>
3247
3247
  if (typeof e > "u" || e === null) return l(new Error("marked(): input parameter is undefined or null"));
3248
3248
  if (typeof e != "string") return l(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(e) + ", string expected"));
3249
3249
  if (s.hooks && (s.hooks.options = s, s.hooks.block = t), s.async) return (async () => {
3250
- let o = s.hooks ? await s.hooks.preprocess(e) : e, p = await (s.hooks ? await s.hooks.provideLexer(t) : t ? Ve.lex : Ve.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(p) : p;
3250
+ let o = s.hooks ? await s.hooks.preprocess(e) : e, h = await (s.hooks ? await s.hooks.provideLexer(t) : t ? Ve.lex : Ve.lexInline)(o, s), c = s.hooks ? await s.hooks.processAllTokens(h) : h;
3251
3251
  s.walkTokens && await Promise.all(this.walkTokens(c, s.walkTokens));
3252
3252
  let y = await (s.hooks ? await s.hooks.provideParser(t) : t ? qe.parse : qe.parseInline)(c, s);
3253
3253
  return s.hooks ? await s.hooks.postprocess(y) : y;
@@ -3256,8 +3256,8 @@ ${t}</tr>
3256
3256
  s.hooks && (e = s.hooks.preprocess(e));
3257
3257
  let o = (s.hooks ? s.hooks.provideLexer(t) : t ? Ve.lex : Ve.lexInline)(e, s);
3258
3258
  s.hooks && (o = s.hooks.processAllTokens(o)), s.walkTokens && this.walkTokens(o, s.walkTokens);
3259
- let p = (s.hooks ? s.hooks.provideParser(t) : t ? qe.parse : qe.parseInline)(o, s);
3260
- return s.hooks && (p = s.hooks.postprocess(p)), p;
3259
+ let h = (s.hooks ? s.hooks.provideParser(t) : t ? qe.parse : qe.parseInline)(o, s);
3260
+ return s.hooks && (h = s.hooks.postprocess(h)), h;
3261
3261
  } catch (o) {
3262
3262
  return l(o);
3263
3263
  }
@@ -3318,14 +3318,14 @@ function Rr(a) {
3318
3318
  i.set(l, 0);
3319
3319
  for (let l = 0; l < a.nodes.length; l++) {
3320
3320
  let o = !1;
3321
- for (const p of a.edges) {
3322
- if (!t.has(p.from) || !t.has(p.to))
3321
+ for (const h of a.edges) {
3322
+ if (!t.has(h.from) || !t.has(h.to))
3323
3323
  continue;
3324
- const c = i.get(p.from);
3324
+ const c = i.get(h.from);
3325
3325
  if (c === void 0)
3326
3326
  continue;
3327
3327
  const y = c + 1;
3328
- (i.get(p.to) ?? -1) < y && (i.set(p.to, y), o = !0);
3328
+ (i.get(h.to) ?? -1) < y && (i.set(h.to, y), o = !0);
3329
3329
  }
3330
3330
  if (!o)
3331
3331
  break;
@@ -3342,7 +3342,7 @@ function Mr(a) {
3342
3342
  const k = e.get(b.id) ?? 0;
3343
3343
  n.set(k, [...n.get(k) ?? [], b]);
3344
3344
  }
3345
- const i = [...n.entries()].sort(([b], [k]) => b - k), s = Math.max(1, ...i.map(([, b]) => b.length)), l = Math.max(1, i.length), o = t === "horizontal" ? dt * 2 + l * $t + (l - 1) * qt : dt * 2 + s * $t + (s - 1) * qt, p = t === "horizontal" ? dt * 2 + s * Dt + (s - 1) * Yt : dt * 2 + l * Dt + (l - 1) * Yt, c = [];
3345
+ const i = [...n.entries()].sort(([b], [k]) => b - k), s = Math.max(1, ...i.map(([, b]) => b.length)), l = Math.max(1, i.length), o = t === "horizontal" ? dt * 2 + l * $t + (l - 1) * qt : dt * 2 + s * $t + (s - 1) * qt, h = t === "horizontal" ? dt * 2 + s * Dt + (s - 1) * Yt : dt * 2 + l * Dt + (l - 1) * Yt, c = [];
3346
3346
  for (const [b, [, k]] of i.entries()) {
3347
3347
  const A = (s - k.length) * (t === "horizontal" ? Dt + Yt : $t + qt) / 2;
3348
3348
  for (const [E, O] of k.entries()) {
@@ -3363,7 +3363,7 @@ function Mr(a) {
3363
3363
  const A = y.get(b.from), E = y.get(b.to);
3364
3364
  if (!A || !E)
3365
3365
  return [];
3366
- const O = t === "horizontal" ? A.x + A.width : A.x + A.width / 2, Z = t === "horizontal" ? A.y + A.height / 2 : A.y + A.height, C = t === "horizontal" ? E.x : E.x + E.width / 2, I = t === "horizontal" ? E.y + E.height / 2 : E.y;
3366
+ const O = t === "horizontal" ? A.x + A.width : A.x + A.width / 2, Z = t === "horizontal" ? A.y + A.height / 2 : A.y + A.height, C = t === "horizontal" ? E.x : E.x + E.width / 2, $ = t === "horizontal" ? E.y + E.height / 2 : E.y;
3367
3367
  return [{
3368
3368
  key: `${b.from}-${b.to}-${k}`,
3369
3369
  from: b.from,
@@ -3372,12 +3372,12 @@ function Mr(a) {
3372
3372
  x1: O,
3373
3373
  y1: Z,
3374
3374
  x2: C,
3375
- y2: I,
3375
+ y2: $,
3376
3376
  labelX: (O + C) / 2,
3377
- labelY: (Z + I) / 2
3377
+ labelY: (Z + $) / 2
3378
3378
  }];
3379
3379
  });
3380
- return { width: o, height: p, orientation: t, nodes: c, edges: R };
3380
+ return { width: o, height: h, orientation: t, nodes: c, edges: R };
3381
3381
  }
3382
3382
  d(Mr, "layoutChatDiagram");
3383
3383
  function ra(a) {
@@ -3451,9 +3451,9 @@ function zr(a) {
3451
3451
  const l = Math.max(2, Math.floor(e / Lr));
3452
3452
  if (t.length <= l)
3453
3453
  return { mode: "angled", entries: n.map((c, y) => ({ index: y, text: c })) };
3454
- const o = /* @__PURE__ */ new Set([0, i]), p = i / (l - 1);
3454
+ const o = /* @__PURE__ */ new Set([0, i]), h = i / (l - 1);
3455
3455
  for (let c = 1; c < l - 1; c++)
3456
- o.add(Math.round(c * p));
3456
+ o.add(Math.round(c * h));
3457
3457
  return {
3458
3458
  mode: "angled",
3459
3459
  entries: [...o].sort((c, y) => c - y).map((c) => ({ index: c, text: n[c] }))
@@ -3489,7 +3489,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3489
3489
  return g?.chartType === "pie";
3490
3490
  }
3491
3491
  d(l, "isPieChart");
3492
- const o = S(() => n.value?.data ?? []), p = S(() => s(n.value) ? n.value : null), c = S(() => p.value?.series ?? []), y = S(() => l(n.value) ? n.value : null), R = S(() => p.value?.chartType === "bar" && p.value.stacking === "stacked");
3492
+ const o = S(() => n.value?.data ?? []), h = S(() => s(n.value) ? n.value : null), c = S(() => h.value?.series ?? []), y = S(() => l(n.value) ? n.value : null), R = S(() => h.value?.chartType === "bar" && h.value.stacking === "stacked");
3493
3493
  function b(g) {
3494
3494
  return typeof g == "number" && Number.isFinite(g) ? g : null;
3495
3495
  }
@@ -3499,73 +3499,73 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3499
3499
  }
3500
3500
  d(k, "categoryLabel");
3501
3501
  function A(g, M) {
3502
- const u = g.map((L) => k(L, M)).filter(Boolean);
3502
+ const u = g.map((D) => k(D, M)).filter(Boolean);
3503
3503
  if (!u.length)
3504
3504
  return !1;
3505
- const v = Math.max(...u.map((L) => L.length)), $ = u.reduce((L, Q) => L + Q.length, 0) / u.length;
3506
- return v >= 16 || u.length > 5 && $ >= 10;
3505
+ const x = Math.max(...u.map((D) => D.length)), I = u.reduce((D, Q) => D + Q.length, 0) / u.length;
3506
+ return x >= 16 || u.length > 5 && I >= 10;
3507
3507
  }
3508
3508
  d(A, "hasLongCategoryLabels");
3509
3509
  function E(g, M) {
3510
- return g.data.map((u, v) => {
3511
- const $ = b(u[M]);
3512
- return $ === null ? null : { index: v, value: $ };
3510
+ return g.data.map((u, x) => {
3511
+ const I = b(u[M]);
3512
+ return I === null ? null : { index: x, value: I };
3513
3513
  }).filter((u) => u !== null);
3514
3514
  }
3515
3515
  d(E, "trendLinePoints");
3516
3516
  function O(g) {
3517
3517
  if (g.length < 2) return null;
3518
- const M = g.length, u = g.reduce((le, de) => le + de.index, 0), v = g.reduce((le, de) => le + de.value, 0), $ = g.reduce((le, de) => le + de.index * de.index, 0), L = g.reduce((le, de) => le + de.index * de.value, 0), Q = M * $ - u * u;
3518
+ const M = g.length, u = g.reduce((le, de) => le + de.index, 0), x = g.reduce((le, de) => le + de.value, 0), I = g.reduce((le, de) => le + de.index * de.index, 0), D = g.reduce((le, de) => le + de.index * de.value, 0), Q = M * I - u * u;
3519
3519
  if (Q === 0) return null;
3520
- const pe = (M * L - u * v) / Q, ke = (v - pe * u) / M;
3520
+ const pe = (M * D - u * x) / Q, ke = (x - pe * u) / M;
3521
3521
  return { slope: pe, intercept: ke };
3522
3522
  }
3523
3523
  d(O, "linearTrend");
3524
3524
  const Z = S(() => {
3525
- const g = [], M = p.value;
3525
+ const g = [], M = h.value;
3526
3526
  if (!M) return g;
3527
3527
  if (M.chartType === "bar" && M.stacking === "stacked")
3528
3528
  for (const u of M.data) {
3529
- let v = 0, $ = 0;
3530
- for (const L of M.series) {
3531
- const Q = b(u[L.dataKey]);
3532
- Q !== null && (Q >= 0 ? v += Q : $ += Q);
3529
+ let x = 0, I = 0;
3530
+ for (const D of M.series) {
3531
+ const Q = b(u[D.dataKey]);
3532
+ Q !== null && (Q >= 0 ? x += Q : I += Q);
3533
3533
  }
3534
- g.push(v, $);
3534
+ g.push(x, I);
3535
3535
  }
3536
3536
  else
3537
3537
  for (const u of M.data)
3538
- for (const v of M.series) {
3539
- const $ = b(u[v.dataKey]);
3540
- $ !== null && g.push($);
3538
+ for (const x of M.series) {
3539
+ const I = b(u[x.dataKey]);
3540
+ I !== null && g.push(I);
3541
3541
  }
3542
3542
  if (M.trendLine && (M.chartType === "line" || M.chartType === "scatter")) {
3543
3543
  const u = E(M, M.trendLine.dataKey);
3544
- g.push(...u.map(($) => $.value));
3545
- const v = O(u);
3546
- if (v && u.length) {
3547
- const $ = u[0].index, L = u[u.length - 1].index;
3548
- g.push(v.intercept + v.slope * $, v.intercept + v.slope * L);
3544
+ g.push(...u.map((I) => I.value));
3545
+ const x = O(u);
3546
+ if (x && u.length) {
3547
+ const I = u[0].index, D = u[u.length - 1].index;
3548
+ g.push(x.intercept + x.slope * I, x.intercept + x.slope * D);
3549
3549
  }
3550
3550
  }
3551
3551
  return g;
3552
3552
  });
3553
3553
  function C(g, M) {
3554
- const u = g > 0 ? g : 1, v = Math.floor(Math.log10(u)), $ = u / 10 ** v;
3555
- let L;
3556
- return M ? L = $ < 1.5 ? 1 : $ < 3 ? 2 : $ < 7 ? 5 : 10 : L = $ <= 1 ? 1 : $ <= 2 ? 2 : $ <= 5 ? 5 : 10, L * 10 ** v;
3554
+ const u = g > 0 ? g : 1, x = Math.floor(Math.log10(u)), I = u / 10 ** x;
3555
+ let D;
3556
+ return M ? D = I < 1.5 ? 1 : I < 3 ? 2 : I < 7 ? 5 : 10 : D = I <= 1 ? 1 : I <= 2 ? 2 : I <= 5 ? 5 : 10, D * 10 ** x;
3557
3557
  }
3558
3558
  d(C, "niceNum");
3559
- const I = S(() => {
3559
+ const $ = S(() => {
3560
3560
  const g = Z.value, M = g.length ? Math.max(0, ...g) : 1, u = g.length ? Math.min(0, ...g) : 0;
3561
3561
  if (u === M)
3562
3562
  return { min: 0, max: M || 1, ticks: [0, M || 1] };
3563
- const v = 4, $ = C(M - u, !1), L = C($ / (v - 1), !0), Q = Math.floor(u / L) * L, pe = Math.ceil(M / L) * L, ke = [];
3564
- for (let le = Q; le <= pe + L * 0.5; le += L)
3563
+ const x = 4, I = C(M - u, !1), D = C(I / (x - 1), !0), Q = Math.floor(u / D) * D, pe = Math.ceil(M / D) * D, ke = [];
3564
+ for (let le = Q; le <= pe + D * 0.5; le += D)
3565
3565
  ke.push(Number(le.toFixed(6)));
3566
3566
  return { min: Q, max: pe, ticks: ke };
3567
3567
  }), N = S(() => Cr({ series: c.value })), W = S(() => {
3568
- const g = p.value;
3568
+ const g = h.value;
3569
3569
  if (!g)
3570
3570
  return { mode: "horizontal", entries: [] };
3571
3571
  const M = g.xKey;
@@ -3577,63 +3577,63 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3577
3577
  plotWidth: 318
3578
3578
  });
3579
3579
  }), B = S(() => {
3580
- const g = N.value?.valueFormat, M = !!(N.value && (g === "currency" || g === "percent" || N.value.valuePrefix || N.value.valueSuffix)), u = g === "duration" ? 46 : M ? 38 : 30, v = W.value.mode === "angled";
3580
+ const g = N.value?.valueFormat, M = !!(N.value && (g === "currency" || g === "percent" || N.value.valuePrefix || N.value.valueSuffix)), u = g === "duration" ? 46 : M ? 38 : 30, x = W.value.mode === "angled";
3581
3581
  return {
3582
3582
  width: 360,
3583
- height: 168 + (v ? Ns : 0),
3583
+ height: 168 + (x ? Ns : 0),
3584
3584
  left: u,
3585
3585
  right: 12,
3586
3586
  top: 10,
3587
- bottom: 24 + (v ? Ns : 0)
3587
+ bottom: 24 + (x ? Ns : 0)
3588
3588
  };
3589
3589
  });
3590
3590
  function V(g, M) {
3591
- const u = p.value, v = B.value;
3591
+ const u = h.value, x = B.value;
3592
3592
  if (u?.chartType === "bar") {
3593
- const $ = v.width - v.left - v.right;
3594
- return v.left + (g + 0.5) * ($ / Math.max(M, 1));
3593
+ const I = x.width - x.left - x.right;
3594
+ return x.left + (g + 0.5) * (I / Math.max(M, 1));
3595
3595
  }
3596
3596
  return J(g, M);
3597
3597
  }
3598
3598
  d(V, "labelCenterX");
3599
3599
  function J(g, M) {
3600
- const u = B.value, v = u.width - u.left - u.right;
3601
- return M <= 1 ? u.left + v / 2 : u.left + v * g / (M - 1);
3600
+ const u = B.value, x = u.width - u.left - u.right;
3601
+ return M <= 1 ? u.left + x / 2 : u.left + x * g / (M - 1);
3602
3602
  }
3603
3603
  d(J, "xForIndex");
3604
3604
  function ue(g) {
3605
- const { min: M, max: u } = I.value, v = B.value, $ = v.height - v.top - v.bottom;
3606
- return v.top + (u - g) / (u - M || 1) * $;
3605
+ const { min: M, max: u } = $.value, x = B.value, I = x.height - x.top - x.bottom;
3606
+ return x.top + (u - g) / (u - M || 1) * I;
3607
3607
  }
3608
3608
  d(ue, "yForValue");
3609
3609
  function Ae(g) {
3610
- const M = p.value;
3611
- return M ? M.data.map((u, v) => {
3612
- const $ = b(u[g]) ?? 0;
3613
- return `${v === 0 ? "M" : "L"} ${J(v, M.data.length).toFixed(1)} ${ue($).toFixed(1)}`;
3610
+ const M = h.value;
3611
+ return M ? M.data.map((u, x) => {
3612
+ const I = b(u[g]) ?? 0;
3613
+ return `${x === 0 ? "M" : "L"} ${J(x, M.data.length).toFixed(1)} ${ue(I).toFixed(1)}`;
3614
3614
  }).join(" ") : "";
3615
3615
  }
3616
3616
  d(Ae, "pathForSeries");
3617
3617
  const Pe = S(() => {
3618
- const g = p.value;
3618
+ const g = h.value;
3619
3619
  if (!g?.trendLine || g.chartType !== "line" && g.chartType !== "scatter") return null;
3620
3620
  const M = E(g, g.trendLine.dataKey), u = O(M);
3621
3621
  if (!u || !M.length) return null;
3622
- const v = M[0].index, $ = M[M.length - 1].index, L = u.intercept + u.slope * v, Q = u.intercept + u.slope * $, pe = Math.max(0, g.series.findIndex((ke) => ke.dataKey === g.trendLine?.dataKey));
3622
+ const x = M[0].index, I = M[M.length - 1].index, D = u.intercept + u.slope * x, Q = u.intercept + u.slope * I, pe = Math.max(0, g.series.findIndex((ke) => ke.dataKey === g.trendLine?.dataKey));
3623
3623
  return {
3624
- path: `M ${J(v, g.data.length).toFixed(1)} ${ue(L).toFixed(1)} L ${J($, g.data.length).toFixed(1)} ${ue(Q).toFixed(1)}`,
3624
+ path: `M ${J(x, g.data.length).toFixed(1)} ${ue(D).toFixed(1)} L ${J(I, g.data.length).toFixed(1)} ${ue(Q).toFixed(1)}`,
3625
3625
  dataKey: g.trendLine.dataKey,
3626
3626
  seriesIndex: pe
3627
3627
  };
3628
3628
  }), St = S(() => {
3629
- const g = p.value;
3629
+ const g = h.value;
3630
3630
  if (!g || g.chartType !== "bar") return [];
3631
- const M = B.value, v = (M.width - M.left - M.right) / Math.max(g.data.length, 1), $ = ue(0);
3631
+ const M = B.value, x = (M.width - M.left - M.right) / Math.max(g.data.length, 1), I = ue(0);
3632
3632
  if (R.value) {
3633
- const le = Math.max(4, Math.min(24, v * 0.42));
3633
+ const le = Math.max(4, Math.min(24, x * 0.42));
3634
3634
  return g.data.flatMap((de, $e) => {
3635
3635
  let Ke = 0, je = 0;
3636
- const ze = M.left + $e * v + (v - le) / 2;
3636
+ const ze = M.left + $e * x + (x - le) / 2;
3637
3637
  return g.series.map((Fe, Xe) => {
3638
3638
  const _ = b(de[Fe.dataKey]) ?? 0, m = _ >= 0 ? Ke : je, T = m + _, ae = ue(m), U = ue(T);
3639
3639
  return _ >= 0 ? Ke = T : je = T, {
@@ -3649,86 +3649,86 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3649
3649
  });
3650
3650
  });
3651
3651
  }
3652
- const L = Math.max(g.series.length, 1), Q = L > 1 ? 2 : 0, pe = Math.max(3, Math.min(20, (v * 0.62 - Q * (L - 1)) / L)), ke = pe * L + Q * (L - 1);
3652
+ const D = Math.max(g.series.length, 1), Q = D > 1 ? 2 : 0, pe = Math.max(3, Math.min(20, (x * 0.62 - Q * (D - 1)) / D)), ke = pe * D + Q * (D - 1);
3653
3653
  return g.data.flatMap((le, de) => g.series.map(($e, Ke) => {
3654
- const je = b(le[$e.dataKey]) ?? 0, ze = ue(je), Fe = M.left + de * v + (v - ke) / 2 + Ke * (pe + Q);
3654
+ const je = b(le[$e.dataKey]) ?? 0, ze = ue(je), Fe = M.left + de * x + (x - ke) / 2 + Ke * (pe + Q);
3655
3655
  return {
3656
3656
  key: `${de}-${$e.dataKey}`,
3657
3657
  x: Fe,
3658
- y: Math.min(ze, $),
3658
+ y: Math.min(ze, I),
3659
3659
  width: pe,
3660
- height: Math.max(1.5, Math.abs($ - ze)),
3660
+ height: Math.max(1.5, Math.abs(I - ze)),
3661
3661
  seriesIndex: Ke,
3662
3662
  rowIndex: de,
3663
3663
  dataKey: $e.dataKey
3664
3664
  };
3665
3665
  }));
3666
3666
  }), Le = S(() => {
3667
- const g = p.value;
3667
+ const g = h.value;
3668
3668
  if (!g) return [];
3669
3669
  const M = g.data;
3670
3670
  if (!M.length) return [];
3671
- const u = M.length - 1, v = W.value, $ = v.mode === "angled";
3672
- return v.entries.map(({ index: L, text: Q }) => ({
3673
- key: `${L}`,
3671
+ const u = M.length - 1, x = W.value, I = x.mode === "angled";
3672
+ return x.entries.map(({ index: D, text: Q }) => ({
3673
+ key: `${D}`,
3674
3674
  label: Q,
3675
- x: V(L, M.length),
3676
- anchor: $ ? "end" : L === 0 ? "start" : L === u ? "end" : "middle",
3677
- angled: $
3678
- })).filter((L) => L.label);
3675
+ x: V(D, M.length),
3676
+ anchor: I ? "end" : D === 0 ? "start" : D === u ? "end" : "middle",
3677
+ angled: I
3678
+ })).filter((D) => D.label);
3679
3679
  }), se = S(() => {
3680
- const g = p.value;
3680
+ const g = h.value;
3681
3681
  if (!g || g.chartType !== "bar" || g.series.length !== 1 || R.value)
3682
3682
  return [];
3683
- const M = g.series[0], u = g.data.map((L, Q) => {
3684
- const pe = k(L, g.xKey), ke = b(L[M.dataKey]);
3683
+ const M = g.series[0], u = g.data.map((D, Q) => {
3684
+ const pe = k(D, g.xKey), ke = b(D[M.dataKey]);
3685
3685
  return !pe || ke === null ? null : { key: `${Q}-${pe}`, label: pe, rawValue: ke };
3686
- }).filter((L) => L !== null);
3687
- if (!u.length || u.some((L) => L.rawValue < 0))
3686
+ }).filter((D) => D !== null);
3687
+ if (!u.length || u.some((D) => D.rawValue < 0))
3688
3688
  return [];
3689
3689
  if (!(g.layout === "horizontal" || A(g.data, g.xKey)))
3690
3690
  return [];
3691
- const $ = Math.max(...u.map((L) => L.rawValue), 1);
3692
- return u.map((L) => ({
3693
- key: L.key,
3694
- label: L.label,
3695
- value: On({ value: L.rawValue, series: M }),
3696
- width: L.rawValue <= 0 ? 0 : Math.max(2, L.rawValue / $ * 100),
3691
+ const I = Math.max(...u.map((D) => D.rawValue), 1);
3692
+ return u.map((D) => ({
3693
+ key: D.key,
3694
+ label: D.label,
3695
+ value: On({ value: D.rawValue, series: M }),
3696
+ width: D.rawValue <= 0 ? 0 : Math.max(2, D.rawValue / I * 100),
3697
3697
  seriesIndex: 0
3698
3698
  }));
3699
3699
  }), at = S(() => {
3700
- const g = p.value;
3700
+ const g = h.value;
3701
3701
  if (!g?.data.length) return [];
3702
3702
  const M = g.data[g.data.length - 1];
3703
- return g.series.map((u, v) => {
3704
- const $ = b(M?.[u.dataKey]);
3703
+ return g.series.map((u, x) => {
3704
+ const I = b(M?.[u.dataKey]);
3705
3705
  return {
3706
3706
  key: u.dataKey,
3707
3707
  label: u.label || u.dataKey,
3708
- value: $ === null ? "—" : On({ value: $, series: u }),
3709
- seriesIndex: v
3708
+ value: I === null ? "—" : On({ value: I, series: u }),
3709
+ seriesIndex: x
3710
3710
  };
3711
3711
  });
3712
3712
  }), Ye = S(() => {
3713
- const g = p.value;
3713
+ const g = h.value;
3714
3714
  if (!g?.data.length || g.chartType !== "line") return [];
3715
3715
  const M = g.data.length - 1, u = g.data[M];
3716
- return g.series.map((v, $) => {
3717
- const L = b(u?.[v.dataKey]);
3718
- return L === null ? null : { key: v.dataKey, cx: J(M, g.data.length), cy: ue(L), seriesIndex: $ };
3719
- }).filter((v) => v !== null);
3716
+ return g.series.map((x, I) => {
3717
+ const D = b(u?.[x.dataKey]);
3718
+ return D === null ? null : { key: x.dataKey, cx: J(M, g.data.length), cy: ue(D), seriesIndex: I };
3719
+ }).filter((x) => x !== null);
3720
3720
  }), it = S(() => {
3721
3721
  const g = y.value;
3722
3722
  if (!g) return [];
3723
- const M = g.data.map(($) => ({
3724
- name: String($[g.nameKey] ?? ""),
3725
- value: b($[g.valueKey]) ?? 0
3726
- })).filter(($) => $.name && $.value >= 0).sort(($, L) => L.value - $.value), u = M.reduce(($, L) => $ + L.value, 0) || 1, v = g.series?.[0];
3727
- return M.map(($, L) => ({
3728
- ...$,
3729
- key: `${L}-${$.name}`,
3730
- percent: $.value / u,
3731
- display: On({ value: $.value, series: v })
3723
+ const M = g.data.map((I) => ({
3724
+ name: String(I[g.nameKey] ?? ""),
3725
+ value: b(I[g.valueKey]) ?? 0
3726
+ })).filter((I) => I.name && I.value >= 0).sort((I, D) => D.value - I.value), u = M.reduce((I, D) => I + D.value, 0) || 1, x = g.series?.[0];
3727
+ return M.map((I, D) => ({
3728
+ ...I,
3729
+ key: `${D}-${I.name}`,
3730
+ percent: I.value / u,
3731
+ display: On({ value: I.value, series: x })
3732
3732
  }));
3733
3733
  }), Oe = S(() => i.value ? Mr(i.value) : null), vt = [
3734
3734
  "var(--color-theme-900)",
@@ -3753,7 +3753,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3753
3753
  }
3754
3754
  d(Ce, "diagramNodeStroke");
3755
3755
  const K = S(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), be = S(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), ie = S(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), Ie = S(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), re = S(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Be = S(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), lt = S(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), ye = S(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
3756
- return (g, M) => e.value ? (h(), f("section", {
3756
+ return (g, M) => e.value ? (p(), f("section", {
3757
3757
  key: 0,
3758
3758
  "data-test": "chat-visual",
3759
3759
  "data-visual-type": e.value.visualType,
@@ -3768,20 +3768,20 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3768
3768
  w("h4", {
3769
3769
  class: "text-[13px] font-semibold leading-tight",
3770
3770
  style: q({ color: K.value })
3771
- }, j(e.value.meta.title), 5),
3772
- e.value.meta.description ? (h(), f("p", {
3771
+ }, H(e.value.meta.title), 5),
3772
+ e.value.meta.description ? (p(), f("p", {
3773
3773
  key: 0,
3774
3774
  class: "mt-0.5 text-[12px] leading-snug",
3775
3775
  style: q({ color: be.value })
3776
- }, j(e.value.meta.description), 5)) : H("", !0)
3776
+ }, H(e.value.meta.description), 5)) : j("", !0)
3777
3777
  ]),
3778
- p.value ? (h(), f("div", {
3778
+ h.value ? (p(), f("div", {
3779
3779
  key: 0,
3780
3780
  role: "img",
3781
3781
  "aria-label": e.value.meta.title
3782
3782
  }, [
3783
- se.value.length ? (h(), f("div", Fr, [
3784
- (h(!0), f(ee, null, me(se.value, (u) => (h(), f("div", {
3783
+ se.value.length ? (p(), f("div", Fr, [
3784
+ (p(!0), f(ee, null, me(se.value, (u) => (p(), f("div", {
3785
3785
  key: u.key,
3786
3786
  "data-test": "chat-visual-horizontal-bar",
3787
3787
  class: "min-w-0"
@@ -3790,11 +3790,11 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3790
3790
  w("span", {
3791
3791
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
3792
3792
  style: q({ color: K.value })
3793
- }, j(u.label), 5),
3793
+ }, H(u.label), 5),
3794
3794
  w("span", {
3795
3795
  class: "shrink-0 font-semibold tabular-nums",
3796
3796
  style: q({ color: K.value })
3797
- }, j(u.value), 5)
3797
+ }, H(u.value), 5)
3798
3798
  ]),
3799
3799
  w("div", {
3800
3800
  class: "h-2 w-full overflow-hidden rounded-full",
@@ -3806,7 +3806,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3806
3806
  }, null, 4)
3807
3807
  ], 4)
3808
3808
  ]))), 128))
3809
- ])) : (h(), f("svg", {
3809
+ ])) : (p(), f("svg", {
3810
3810
  key: 1,
3811
3811
  class: "block h-auto w-full overflow-visible",
3812
3812
  viewBox: `0 0 ${B.value.width} ${B.value.height}`,
@@ -3814,7 +3814,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3814
3814
  preserveAspectRatio: "xMidYMid meet",
3815
3815
  "aria-hidden": "true"
3816
3816
  }, [
3817
- (h(!0), f(ee, null, me(I.value.ticks, (u) => (h(), f("line", {
3817
+ (p(!0), f(ee, null, me($.value.ticks, (u) => (p(), f("line", {
3818
3818
  key: `grid-${u}`,
3819
3819
  x1: B.value.left,
3820
3820
  x2: B.value.width - B.value.right,
@@ -3825,16 +3825,16 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3825
3825
  style: q({ stroke: u === 0 ? re.value : Ie.value })
3826
3826
  }, null, 12, jr))), 128)),
3827
3827
  w("g", null, [
3828
- (h(!0), f(ee, null, me(I.value.ticks, (u) => (h(), f("text", {
3828
+ (p(!0), f(ee, null, me($.value.ticks, (u) => (p(), f("text", {
3829
3829
  key: `y-${u}`,
3830
3830
  x: B.value.left - 7,
3831
3831
  y: ue(u) + 3,
3832
3832
  "text-anchor": "end",
3833
3833
  "font-size": "9.5",
3834
3834
  style: q({ fill: ie.value })
3835
- }, j(en(Ir)({ value: u, shared: N.value })), 13, Wr))), 128))
3835
+ }, H(en(Ir)({ value: u, shared: N.value })), 13, Wr))), 128))
3836
3836
  ]),
3837
- p.value.chartType === "bar" ? (h(!0), f(ee, { key: 0 }, me(St.value, (u) => (h(), f("rect", {
3837
+ h.value.chartType === "bar" ? (p(!0), f(ee, { key: 0 }, me(St.value, (u) => (p(), f("rect", {
3838
3838
  key: u.key,
3839
3839
  "data-test": "chat-visual-bar",
3840
3840
  "data-row-index": u.rowIndex,
@@ -3846,8 +3846,8 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3846
3846
  height: u.height,
3847
3847
  rx: "2.5",
3848
3848
  style: q({ fill: Me(u.seriesIndex) })
3849
- }, null, 12, Gr))), 128)) : (h(), f(ee, { key: 1 }, [
3850
- Pe.value ? (h(), f("path", {
3849
+ }, null, 12, Gr))), 128)) : (p(), f(ee, { key: 1 }, [
3850
+ Pe.value ? (p(), f("path", {
3851
3851
  key: 0,
3852
3852
  "data-test": "chat-visual-trend-line",
3853
3853
  "data-trend-key": Pe.value.dataKey,
@@ -3859,11 +3859,11 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3859
3859
  "stroke-dasharray": "4 3",
3860
3860
  "vector-effect": "non-scaling-stroke",
3861
3861
  style: q({ stroke: Me(Pe.value.seriesIndex) })
3862
- }, null, 12, Vr)) : H("", !0),
3863
- (h(!0), f(ee, null, me(c.value, (u, v) => (h(), f("g", {
3862
+ }, null, 12, Vr)) : j("", !0),
3863
+ (p(!0), f(ee, null, me(c.value, (u, x) => (p(), f("g", {
3864
3864
  key: u.dataKey
3865
3865
  }, [
3866
- p.value.chartType === "line" ? (h(), f("path", {
3866
+ h.value.chartType === "line" ? (p(), f("path", {
3867
3867
  key: 0,
3868
3868
  d: Ae(u.dataKey),
3869
3869
  fill: "none",
@@ -3871,21 +3871,21 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3871
3871
  "stroke-linecap": "round",
3872
3872
  "stroke-linejoin": "round",
3873
3873
  "vector-effect": "non-scaling-stroke",
3874
- style: q({ stroke: Me(v) })
3875
- }, null, 12, qr)) : H("", !0),
3876
- (h(!0), f(ee, null, me(o.value, ($, L) => (h(), f(ee, {
3877
- key: `${u.dataKey}-${L}`
3874
+ style: q({ stroke: Me(x) })
3875
+ }, null, 12, qr)) : j("", !0),
3876
+ (p(!0), f(ee, null, me(o.value, (I, D) => (p(), f(ee, {
3877
+ key: `${u.dataKey}-${D}`
3878
3878
  }, [
3879
- p.value.chartType === "scatter" ? (h(), f("circle", {
3879
+ h.value.chartType === "scatter" ? (p(), f("circle", {
3880
3880
  key: 0,
3881
- cx: J(L, o.value.length),
3882
- cy: ue(b($[u.dataKey]) ?? 0),
3881
+ cx: J(D, o.value.length),
3882
+ cy: ue(b(I[u.dataKey]) ?? 0),
3883
3883
  r: "2.6",
3884
- style: q({ fill: Me(v) })
3885
- }, null, 12, Yr)) : H("", !0)
3884
+ style: q({ fill: Me(x) })
3885
+ }, null, 12, Yr)) : j("", !0)
3886
3886
  ], 64))), 128))
3887
3887
  ]))), 128)),
3888
- (h(!0), f(ee, null, me(Ye.value, (u) => (h(), f("circle", {
3888
+ (p(!0), f(ee, null, me(Ye.value, (u) => (p(), f("circle", {
3889
3889
  key: `marker-${u.key}`,
3890
3890
  cx: u.cx,
3891
3891
  cy: u.cy,
@@ -3893,7 +3893,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3893
3893
  style: q({ fill: Me(u.seriesIndex) })
3894
3894
  }, null, 12, Kr))), 128))
3895
3895
  ], 64)),
3896
- (h(!0), f(ee, null, me(Le.value, (u) => (h(), f("text", {
3896
+ (p(!0), f(ee, null, me(Le.value, (u) => (p(), f("text", {
3897
3897
  key: u.key,
3898
3898
  x: u.x,
3899
3899
  y: u.angled ? B.value.height - B.value.bottom + 12 : B.value.height - 6,
@@ -3901,10 +3901,10 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3901
3901
  "font-size": "9.5",
3902
3902
  transform: u.angled ? `rotate(${en(Or)} ${u.x} ${B.value.height - B.value.bottom + 12})` : void 0,
3903
3903
  style: q({ fill: ie.value })
3904
- }, j(u.label), 13, Xr))), 128))
3904
+ }, H(u.label), 13, Xr))), 128))
3905
3905
  ], 12, Hr)),
3906
- at.value.length > 1 || p.value.chartType !== "bar" ? (h(), f("div", Zr, [
3907
- (h(!0), f(ee, null, me(at.value, (u) => (h(), f("div", {
3906
+ at.value.length > 1 || h.value.chartType !== "bar" ? (p(), f("div", Zr, [
3907
+ (p(!0), f(ee, null, me(at.value, (u) => (p(), f("div", {
3908
3908
  key: u.key,
3909
3909
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
3910
3910
  }, [
@@ -3914,31 +3914,31 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3914
3914
  }, null, 4),
3915
3915
  w("span", {
3916
3916
  style: q({ color: be.value })
3917
- }, j(u.label), 5),
3917
+ }, H(u.label), 5),
3918
3918
  w("span", {
3919
3919
  class: "font-semibold tabular-nums",
3920
3920
  style: q({ color: K.value })
3921
- }, j(u.value), 5)
3921
+ }, H(u.value), 5)
3922
3922
  ]))), 128))
3923
- ])) : H("", !0)
3924
- ], 8, Br)) : y.value ? (h(), f("div", Jr, [
3925
- (h(!0), f(ee, null, me(it.value, (u, v) => (h(), f("div", {
3923
+ ])) : j("", !0)
3924
+ ], 8, Br)) : y.value ? (p(), f("div", Jr, [
3925
+ (p(!0), f(ee, null, me(it.value, (u, x) => (p(), f("div", {
3926
3926
  key: u.key
3927
3927
  }, [
3928
3928
  w("div", Qr, [
3929
3929
  w("span", {
3930
3930
  class: "truncate font-medium",
3931
3931
  style: q({ color: K.value })
3932
- }, j(u.name), 5),
3932
+ }, H(u.name), 5),
3933
3933
  w("span", el, [
3934
3934
  w("span", {
3935
3935
  class: "font-semibold",
3936
3936
  style: q({ color: K.value })
3937
- }, j(u.display), 5),
3937
+ }, H(u.display), 5),
3938
3938
  w("span", {
3939
3939
  class: "ml-1.5",
3940
3940
  style: q({ color: be.value })
3941
- }, j(Math.round(u.percent * 100)) + "%", 5)
3941
+ }, H(Math.round(u.percent * 100)) + "%", 5)
3942
3942
  ])
3943
3943
  ]),
3944
3944
  w("div", {
@@ -3947,12 +3947,12 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3947
3947
  }, [
3948
3948
  w("div", {
3949
3949
  class: "h-full rounded-full",
3950
- style: q({ width: `${Math.max(2, u.percent * 100)}%`, background: Me(v) })
3950
+ style: q({ width: `${Math.max(2, u.percent * 100)}%`, background: Me(x) })
3951
3951
  }, null, 4)
3952
3952
  ], 4)
3953
3953
  ]))), 128))
3954
- ])) : i.value && Oe.value ? (h(), f("div", tl, [
3955
- (h(), f("svg", {
3954
+ ])) : i.value && Oe.value ? (p(), f("div", tl, [
3955
+ (p(), f("svg", {
3956
3956
  "data-test": "chat-visual-diagram-svg",
3957
3957
  class: "block h-auto w-full overflow-visible",
3958
3958
  viewBox: `0 0 ${Oe.value.width} ${Oe.value.height}`,
@@ -3960,7 +3960,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3960
3960
  role: "img",
3961
3961
  "aria-label": e.value.meta.title
3962
3962
  }, [
3963
- (h(!0), f(ee, null, me(Oe.value.edges, (u) => (h(), f("line", {
3963
+ (p(!0), f(ee, null, me(Oe.value.edges, (u) => (p(), f("line", {
3964
3964
  key: u.key,
3965
3965
  "data-test": "chat-visual-diagram-edge",
3966
3966
  "data-from": u.from,
@@ -3974,14 +3974,14 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3974
3974
  "vector-effect": "non-scaling-stroke",
3975
3975
  style: q({ stroke: lt.value })
3976
3976
  }, null, 12, sl))), 128)),
3977
- (h(!0), f(ee, null, me(Oe.value.edges, (u) => (h(), f("circle", {
3977
+ (p(!0), f(ee, null, me(Oe.value.edges, (u) => (p(), f("circle", {
3978
3978
  key: `${u.key}-dot`,
3979
3979
  cx: u.x2,
3980
3980
  cy: u.y2,
3981
3981
  r: "2.4",
3982
3982
  style: q({ fill: lt.value })
3983
3983
  }, null, 12, al))), 128)),
3984
- (h(!0), f(ee, null, me(Oe.value.edges.filter((u) => u.label), (u) => (h(), f("foreignObject", {
3984
+ (p(!0), f(ee, null, me(Oe.value.edges.filter((u) => u.label), (u) => (p(), f("foreignObject", {
3985
3985
  key: `${u.key}-label`,
3986
3986
  x: u.labelX - 43,
3987
3987
  y: u.labelY - 11,
@@ -3992,22 +3992,22 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
3992
3992
  xmlns: "http://www.w3.org/1999/xhtml",
3993
3993
  class: "flex h-full items-center justify-center px-1 text-center text-[8.5px] font-medium leading-none",
3994
3994
  style: q({ color: be.value, background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)" })
3995
- }, j(u.label), 5)
3995
+ }, H(u.label), 5)
3996
3996
  ], 8, il))), 128)),
3997
- (h(!0), f(ee, null, me(Oe.value.nodes, (u) => (h(), f("g", {
3997
+ (p(!0), f(ee, null, me(Oe.value.nodes, (u) => (p(), f("g", {
3998
3998
  key: u.id,
3999
3999
  "data-test": "chat-visual-diagram-node",
4000
4000
  "data-node-id": u.id,
4001
4001
  "data-node-kind": u.kind,
4002
4002
  transform: `translate(${u.x} ${u.y})`
4003
4003
  }, [
4004
- u.kind === "decision" ? (h(), f("polygon", {
4004
+ u.kind === "decision" ? (p(), f("polygon", {
4005
4005
  key: 0,
4006
4006
  points: `${u.width / 2},0 ${u.width},${u.height / 2} ${u.width / 2},${u.height} 0,${u.height / 2}`,
4007
4007
  "stroke-width": "1",
4008
4008
  "vector-effect": "non-scaling-stroke",
4009
4009
  style: q({ fill: rt(u.kind), stroke: Ce(u.kind) })
4010
- }, null, 12, ll)) : (h(), f("rect", {
4010
+ }, null, 12, ll)) : (p(), f("rect", {
4011
4011
  key: 1,
4012
4012
  width: u.width,
4013
4013
  height: u.height,
@@ -4016,7 +4016,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4016
4016
  "vector-effect": "non-scaling-stroke",
4017
4017
  style: q({ fill: rt(u.kind), stroke: Ce(u.kind) })
4018
4018
  }, null, 12, ol)),
4019
- (h(), f("foreignObject", {
4019
+ (p(), f("foreignObject", {
4020
4020
  x: "8",
4021
4021
  y: "5",
4022
4022
  width: u.width - 16,
@@ -4026,23 +4026,23 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4026
4026
  w("div", {
4027
4027
  class: "line-clamp-2 text-[10.5px] font-semibold leading-tight",
4028
4028
  style: q({ color: K.value })
4029
- }, j(u.label), 5),
4030
- u.detail ? (h(), f("div", {
4029
+ }, H(u.label), 5),
4030
+ u.detail ? (p(), f("div", {
4031
4031
  key: 0,
4032
4032
  class: "mt-0.5 line-clamp-1 text-[8.5px] leading-none",
4033
4033
  style: q({ color: be.value })
4034
- }, j(u.detail), 5)) : H("", !0)
4034
+ }, H(u.detail), 5)) : j("", !0)
4035
4035
  ])
4036
4036
  ], 8, cl))
4037
4037
  ], 8, rl))), 128))
4038
4038
  ], 12, nl))
4039
- ])) : H("", !0),
4040
- e.value.meta.footer ? (h(), f("footer", {
4039
+ ])) : j("", !0),
4040
+ e.value.meta.footer ? (p(), f("footer", {
4041
4041
  key: 3,
4042
4042
  class: "mt-3 text-[11px] leading-snug",
4043
4043
  style: q({ color: ie.value })
4044
- }, j(e.value.meta.footer), 5)) : H("", !0)
4045
- ], 12, Nr)) : H("", !0);
4044
+ }, H(e.value.meta.footer), 5)) : j("", !0)
4045
+ ], 12, Nr)) : j("", !0);
4046
4046
  }
4047
4047
  }), hl = ["innerHTML"], Kt = /* @__PURE__ */ Re({
4048
4048
  __name: "ChatRichText",
@@ -4112,7 +4112,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4112
4112
  }
4113
4113
  }
4114
4114
  d(o, "visualPayloadShape");
4115
- function p(k) {
4115
+ function h(k) {
4116
4116
  if (typeof window > "u") return null;
4117
4117
  try {
4118
4118
  return new URL(k.currentSrc || k.src, window.location.href).host || null;
@@ -4120,10 +4120,10 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4120
4120
  return null;
4121
4121
  }
4122
4122
  }
4123
- d(p, "imageHostFromElement");
4123
+ d(h, "imageHostFromElement");
4124
4124
  function c(k) {
4125
4125
  typeof HTMLImageElement > "u" || !(k.target instanceof HTMLImageElement) || typeof console < "u" && console.warn("[chat-image] load_failed", {
4126
- host: p(k.target),
4126
+ host: h(k.target),
4127
4127
  altPresent: !!k.target.alt?.trim(),
4128
4128
  width: k.target.naturalWidth || null,
4129
4129
  height: k.target.naturalHeight || null
@@ -4133,13 +4133,13 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4133
4133
  const y = /```(?:pl-visual|pl-platform-visual)[ \t]*(?:\r?\n|$)/;
4134
4134
  function R(k) {
4135
4135
  const { text: A, streaming: E } = k, O = [], Z = /```(?:pl-visual|pl-platform-visual)[ \t]*\r?\n([\s\S]*?)```/g;
4136
- let C = 0, I = 0, N = Z.exec(A);
4136
+ let C = 0, $ = 0, N = Z.exec(A);
4137
4137
  for (; N !== null; ) {
4138
4138
  const J = A.slice(C, N.index), ue = s(J);
4139
- ue && O.push({ kind: "markdown", key: `md-${I}`, html: ue });
4139
+ ue && O.push({ kind: "markdown", key: `md-${$}`, html: ue });
4140
4140
  const Ae = Sa(N[1].trim());
4141
4141
  if (Ae.ok)
4142
- O.push({ kind: "visual", key: `visual-${I}`, result: Ae });
4142
+ O.push({ kind: "visual", key: `visual-${$}`, result: Ae });
4143
4143
  else {
4144
4144
  typeof console < "u" && console.warn("[pl-visual] parse_failed", {
4145
4145
  reason: Ae.reason,
@@ -4149,39 +4149,39 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4149
4149
  ...o(N[1].trim())
4150
4150
  });
4151
4151
  const Pe = Ae.fallbackMarkdown ? s(Ae.fallbackMarkdown) : "";
4152
- Pe && O.push({ kind: "markdown", key: `visual-${I}`, html: Pe });
4152
+ Pe && O.push({ kind: "markdown", key: `visual-${$}`, html: Pe });
4153
4153
  }
4154
- C = N.index + N[0].length, I += 1, N = Z.exec(A);
4154
+ C = N.index + N[0].length, $ += 1, N = Z.exec(A);
4155
4155
  }
4156
4156
  const W = A.slice(C), B = E ? y.exec(W) : null;
4157
4157
  if (B) {
4158
4158
  const J = s(W.slice(0, B.index));
4159
- return J && O.push({ kind: "markdown", key: `md-${I}`, html: J }), O.push({ kind: "pending-visual", key: `pending-${I}` }), O;
4159
+ return J && O.push({ kind: "markdown", key: `md-${$}`, html: J }), O.push({ kind: "pending-visual", key: `pending-${$}` }), O;
4160
4160
  }
4161
4161
  const V = s(W);
4162
- return V && O.push({ kind: "markdown", key: `md-${I}`, html: V }), O;
4162
+ return V && O.push({ kind: "markdown", key: `md-${$}`, html: V }), O;
4163
4163
  }
4164
4164
  d(R, "richTextSegments");
4165
4165
  const b = S(() => {
4166
4166
  const k = e.value;
4167
4167
  return k ? R({ text: k, streaming: !!t.streaming }) : [];
4168
4168
  });
4169
- return (k, A) => (h(), f("div", {
4169
+ return (k, A) => (p(), f("div", {
4170
4170
  class: "chat-msg-rich break-words text-[14px] leading-relaxed @sm/chat:text-[15px] @sm/chat:leading-relaxed",
4171
4171
  onErrorCapture: c
4172
4172
  }, [
4173
- (h(!0), f(ee, null, me(b.value, (E) => (h(), f(ee, {
4173
+ (p(!0), f(ee, null, me(b.value, (E) => (p(), f(ee, {
4174
4174
  key: E.key
4175
4175
  }, [
4176
- E.kind === "markdown" ? (h(), f("div", {
4176
+ E.kind === "markdown" ? (p(), f("div", {
4177
4177
  key: 0,
4178
- class: D(["chat-msg-prose", a.inverted ? "chat-msg-prose-invert" : ""]),
4178
+ class: L(["chat-msg-prose", a.inverted ? "chat-msg-prose-invert" : ""]),
4179
4179
  innerHTML: E.html
4180
- }, null, 10, hl)) : E.kind === "visual" ? (h(), gt(dl, {
4180
+ }, null, 10, hl)) : E.kind === "visual" ? (p(), gt(dl, {
4181
4181
  key: 1,
4182
4182
  result: E.result,
4183
4183
  inverted: a.inverted
4184
- }, null, 8, ["result", "inverted"])) : (h(), f("div", {
4184
+ }, null, 8, ["result", "inverted"])) : (p(), f("div", {
4185
4185
  key: 2,
4186
4186
  "data-test": "chat-visual-pending",
4187
4187
  role: "status",
@@ -4215,10 +4215,10 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4215
4215
  c && (i.value = c.scrollHeight - c.scrollTop - c.clientHeight <= pl);
4216
4216
  }
4217
4217
  d(o, "onScroll");
4218
- function p() {
4218
+ function h() {
4219
4219
  i.value = !0, l();
4220
4220
  }
4221
- return d(p, "pin"), t({ pin: p }), tn(() => {
4221
+ return d(h, "pin"), t({ pin: h }), tn(() => {
4222
4222
  requestAnimationFrame(() => {
4223
4223
  l(), requestAnimationFrame(l);
4224
4224
  }), n.value && (s = new ResizeObserver(() => {
@@ -4226,10 +4226,10 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4226
4226
  }), s.observe(n.value));
4227
4227
  }), Hs(() => {
4228
4228
  s?.disconnect();
4229
- }), (c, y) => (h(), f("div", {
4229
+ }), (c, y) => (p(), f("div", {
4230
4230
  ref_key: "viewport",
4231
4231
  ref: e,
4232
- class: D(["overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
4232
+ class: L(["overflow-y-auto overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
4233
4233
  onScrollPassive: o
4234
4234
  }, [
4235
4235
  w("div", {
@@ -4258,40 +4258,37 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4258
4258
  }, Sl = { class: "relative mb-4 size-20 @sm/chat:size-24" }, Al = ["src", "alt"], _l = ["title"], El = {
4259
4259
  key: 0,
4260
4260
  class: "flex items-center gap-3 py-3 px-2"
4261
- }, Rl = ["data-journal-outcome"], Ml = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-issue-action-label", "data-issue-action-url", "data-streaming"], Cl = { class: "max-w-[85%] min-w-0" }, Il = ["href"], $l = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-streaming"], Dl = ["data-test", "data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-streaming"], Ll = {
4262
- key: 0,
4263
- class: "flex-shrink-0 size-7 @sm/chat:size-8"
4264
- }, Ol = ["src", "alt"], zl = ["src", "alt"], Nl = ["src"], Pl = ["href"], Bl = {
4261
+ }, Rl = ["data-journal-outcome"], Ml = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-issue-action-label", "data-issue-action-url", "data-streaming"], Cl = { class: "max-w-[85%] min-w-0" }, Il = ["href"], $l = ["data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-issue-code", "data-issue-bucket", "data-streaming"], Dl = ["data-test", "data-message-id", "data-message-sender", "data-conversation-id", "data-message-sequence", "data-system-kind", "data-streaming"], Ll = ["src", "alt"], Ol = ["src"], zl = ["href"], Nl = {
4265
4262
  key: 0,
4266
4263
  "data-test": "messaging-message-text-part"
4267
- }, Fl = ["src", "alt", "data-attachment-placement"], Ul = ["src", "data-attachment-placement"], Hl = ["href", "data-attachment-placement"], jl = ["data-journal-outcome"], Wl = {
4264
+ }, Pl = ["src", "alt", "data-attachment-placement"], Bl = ["src", "data-attachment-placement"], Fl = ["href", "data-attachment-placement"], Ul = ["data-journal-outcome"], Hl = {
4268
4265
  key: 2,
4269
4266
  "data-test": "messaging-tool-activity-tail",
4270
4267
  "aria-label": "Assistant is still working",
4271
4268
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4272
- }, Gl = ["data-journal-outcome"], Vl = ["data-working-description"], ql = { class: "truncate" }, Yl = ["data-issue-code"], Kl = ["href"], Xl = {
4269
+ }, jl = ["data-journal-outcome"], Wl = ["data-working-description"], Gl = { class: "truncate" }, Vl = ["data-issue-code"], ql = ["href"], Yl = {
4273
4270
  key: 3,
4274
4271
  "data-test": "messaging-thinking-indicator",
4275
4272
  class: "flex gap-2 justify-start items-center mb-4"
4276
- }, Zl = ["src", "alt"], Jl = {
4273
+ }, Kl = {
4277
4274
  key: 0,
4278
4275
  class: "flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
4279
- }, Ql = ["src", "alt"], eo = { class: "max-w-20 truncate" }, to = ["onClick"], no = {
4276
+ }, Xl = ["src", "alt"], Zl = { class: "max-w-20 truncate" }, Jl = ["onClick"], Ql = {
4280
4277
  key: 0,
4281
4278
  class: "shrink-0 flex items-center justify-center size-14"
4282
- }, so = ["data-composer-action"], ao = ["disabled", "aria-label", "title"], io = {
4279
+ }, eo = ["data-composer-action"], to = ["disabled", "aria-label", "title"], no = {
4283
4280
  key: 0,
4284
4281
  class: "i-svg-spinners-ring-resize size-4"
4285
- }, ro = {
4282
+ }, so = {
4286
4283
  key: 1,
4287
4284
  class: "i-tabler-paperclip size-5"
4288
- }, lo = { class: "sr-only" }, oo = ["placeholder", "disabled"], co = { class: "font-mono text-sm tabular-nums" }, uo = ["aria-label", "title"], ho = { class: "sr-only" }, po = ["data-composer-action", "disabled", "aria-label", "title"], fo = {
4285
+ }, ao = { class: "sr-only" }, io = ["placeholder", "disabled"], ro = { class: "font-mono text-sm tabular-nums" }, lo = ["aria-label", "title"], oo = { class: "sr-only" }, co = ["data-composer-action", "disabled", "aria-label", "title"], uo = {
4289
4286
  key: 0,
4290
4287
  class: "i-tabler-player-stop-filled size-4"
4291
- }, mo = {
4288
+ }, ho = {
4292
4289
  key: 1,
4293
4290
  class: "i-tabler-arrow-up size-5"
4294
- }, go = { class: "sr-only" }, Ro = /* @__PURE__ */ Re({
4291
+ }, po = { class: "sr-only" }, Ao = /* @__PURE__ */ Re({
4295
4292
  __name: "ElAgentChat",
4296
4293
  props: {
4297
4294
  chatController: {},
@@ -4317,33 +4314,33 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4317
4314
  return _ ? /\[[^\]]+\]\([^)]+\)/.test(_) : !1;
4318
4315
  }
4319
4316
  d(o, "containsMarkdownLink");
4320
- function p(_) {
4317
+ function h(_) {
4321
4318
  return _.sender === "system" && (!!_.issue || _.id === se.value);
4322
4319
  }
4323
- d(p, "isSystemExplainerMessage");
4320
+ d(h, "isSystemExplainerMessage");
4324
4321
  function c(_, m) {
4325
4322
  const T = _[m], ae = _[m + 1];
4326
4323
  return !ae || ae.sender !== T.sender;
4327
4324
  }
4328
- d(c, "shouldShowAvatar");
4325
+ d(c, "isGroupEnd");
4329
4326
  const y = S(() => a.chatController?.textState.value), R = S(() => y.value?.isConnected ?? !1), b = S(() => y.value?.isThinking ?? !1), k = S(() => y.value?.connectionStatus === "disconnected" && !!y.value?.error), A = S(() => y.value?.connectionStatus !== "connected" && !y.value?.error), E = S(() => y.value?.error), O = S(() => a.chatController?.liveTurnBlocks?.value ?? []), Z = S(() => {
4330
4327
  for (let _ = O.value.length - 1; _ >= 0; _--) {
4331
4328
  const m = O.value[_];
4332
4329
  if (m?.kind === "text")
4333
4330
  return m.id;
4334
4331
  }
4335
- }), C = S(() => a.chatController?.liveStreamMessageId?.value), I = S(() => {
4332
+ }), C = S(() => a.chatController?.liveStreamMessageId?.value), $ = S(() => {
4336
4333
  const _ = a.chatController?.sharedMessages.value ?? [];
4337
4334
  return O.value.length && C.value ? _.filter((m) => m.id !== C.value) : _;
4338
4335
  }), N = S(() => a.chatController?.workJournal?.value ? void 0 : y.value?.workingDescription?.trim() || void 0), W = S(() => a.chatController?.workJournal?.value), B = S(() => {
4339
4336
  if (!W.value && !O.value.length)
4340
4337
  return;
4341
- const _ = I.value, m = _[_.length - 1];
4338
+ const _ = $.value, m = _[_.length - 1];
4342
4339
  if (m)
4343
4340
  return m.sender === "agent" || m.sender === "system" ? _.length >= 2 ? _[_.length - 2].id : void 0 : m.id;
4344
4341
  }), V = S(() => {
4345
4342
  const _ = {};
4346
- for (const m of I.value) {
4343
+ for (const m of $.value) {
4347
4344
  if (m.sender === "user" || !m.toolActivities?.length)
4348
4345
  continue;
4349
4346
  const T = a.chatController?.workJournalFor?.({
@@ -4400,7 +4397,7 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4400
4397
  d(St, "messageRenderParts");
4401
4398
  const Le = S(() => y.value?.transientIssue), se = S(() => {
4402
4399
  if (!b.value) return;
4403
- const _ = I.value, m = _[_.length - 1];
4400
+ const _ = $.value, m = _[_.length - 1];
4404
4401
  return m?.sender === "agent" || m?.sender === "system" ? m.id : void 0;
4405
4402
  }), at = S(() => !b.value || N.value || W.value || O.value.length ? !1 : se.value === void 0), Ye = S(() => y.value?.sendBlockedReason), it = S(() => !R.value || Ye.value !== void 0), Oe = S(() => k.value ? "Agent is offline" : A.value ? "Connecting..." : Ye.value === "agent_deleted" ? "This assistant was deleted" : Ye.value === "account" ? "Open billing to keep chatting" : "Message"), vt = S(() => a.chatController?.composerState?.value ?? {
4406
4403
  text: "",
@@ -4409,9 +4406,9 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4409
4406
  }), xt = S({
4410
4407
  get: /* @__PURE__ */ d(() => vt.value.text, "get"),
4411
4408
  set: /* @__PURE__ */ d((_) => a.chatController?.setComposerText?.({ text: _ }), "set")
4412
- }), Me = S(() => vt.value.pendingAttachments), rt = S(() => vt.value.isUploading), Ce = S(() => a.chatController?.voiceRecorder), K = S(() => Ce.value?.isBusy.value ?? !1), be = S(() => a.chatController?.canAttachFile?.value ?? !1), ie = S(() => a.chatController?.canRecordAudio?.value ?? !1), Ie = S(() => a.chatController?.composerAction?.value ?? "idle"), re = S(() => Ie.value !== "idle"), Be = S(() => Ie.value === "stop" ? "Stop reply" : "Send message"), lt = S(() => Ie.value === "idle" && ie.value && !K.value && !!Ce.value?.canUseBrowserRecording), ye = S(() => Ce.value?.isActive.value ?? !1), g = S(() => Ce.value?.elapsedLabel.value ?? "0:00"), M = S(() => Ce.value?.statusText.value ?? "Release to send"), u = S(() => Ce.value?.state.value.phase === "sending" ? "Sending voice message" : ye.value ? "Release to send voice message" : "Hold to record voice message"), v = S(() => a.variant === "light"), $ = S(
4413
- () => v.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
4414
- ), L = S(() => v.value ? "text-theme-300" : "text-white/30");
4409
+ }), Me = S(() => vt.value.pendingAttachments), rt = S(() => vt.value.isUploading), Ce = S(() => a.chatController?.voiceRecorder), K = S(() => Ce.value?.isBusy.value ?? !1), be = S(() => a.chatController?.canAttachFile?.value ?? !1), ie = S(() => a.chatController?.canRecordAudio?.value ?? !1), Ie = S(() => a.chatController?.composerAction?.value ?? "idle"), re = S(() => Ie.value !== "idle"), Be = S(() => Ie.value === "stop" ? "Stop reply" : "Send message"), lt = S(() => Ie.value === "idle" && ie.value && !K.value && !!Ce.value?.canUseBrowserRecording), ye = S(() => Ce.value?.isActive.value ?? !1), g = S(() => Ce.value?.elapsedLabel.value ?? "0:00"), M = S(() => Ce.value?.statusText.value ?? "Release to send"), u = S(() => Ce.value?.state.value.phase === "sending" ? "Sending voice message" : ye.value ? "Release to send voice message" : "Hold to record voice message"), x = S(() => a.variant === "light"), I = S(
4410
+ () => x.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"
4411
+ ), D = S(() => x.value ? "text-theme-300" : "text-white/30");
4415
4412
  tn(async () => {
4416
4413
  a.chatController && !R.value && await a.chatController.startTextConversation();
4417
4414
  }), Ps(() => {
@@ -4479,8 +4476,8 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4479
4476
  ...Ze ? {} : { year: "numeric" }
4480
4477
  })}, ${oe}`;
4481
4478
  }
4482
- return d(Xe, "formatTimeDivider"), (_, m) => (h(), f("div", ml, [
4483
- v.value ? a.showHeader ? (h(), f("div", vl, [
4479
+ return d(Xe, "formatTimeDivider"), (_, m) => (p(), f("div", ml, [
4480
+ x.value ? a.showHeader ? (p(), f("div", vl, [
4484
4481
  w("div", xl, [
4485
4482
  Ne(ei, {
4486
4483
  agent: a.agent,
@@ -4489,37 +4486,37 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4489
4486
  class: "size-10"
4490
4487
  }, null, 8, ["agent"]),
4491
4488
  w("div", bl, [
4492
- w("div", yl, j(a.agent.displayName.value), 1),
4493
- w("div", kl, j(a.agent.title.value || "Assistant"), 1)
4489
+ w("div", yl, H(a.agent.displayName.value), 1),
4490
+ w("div", kl, H(a.agent.title.value || "Assistant"), 1)
4494
4491
  ]),
4495
- a.headerMeta ? (h(), f("span", wl, j(a.headerMeta), 1)) : H("", !0)
4492
+ a.headerMeta ? (p(), f("span", wl, H(a.headerMeta), 1)) : j("", !0)
4496
4493
  ])
4497
- ])) : H("", !0) : (h(), f("div", gl, [
4494
+ ])) : j("", !0) : (p(), f("div", gl, [
4498
4495
  Ne(qa, {
4499
4496
  agent: a.agent,
4500
4497
  "is-online": R.value
4501
4498
  }, null, 8, ["agent", "is-online"])
4502
4499
  ])),
4503
- k.value ? (h(), f("div", {
4500
+ k.value ? (p(), f("div", {
4504
4501
  key: 2,
4505
- class: D(["py-16 flex flex-col items-center justify-center gap-3 text-sm", v.value ? "text-theme-400" : "text-white/60"])
4502
+ class: L(["py-16 flex flex-col items-center justify-center gap-3 text-sm", x.value ? "text-theme-400" : "text-white/60"])
4506
4503
  }, [
4507
4504
  w("i", {
4508
- class: D(["i-heroicons-cloud-arrow-down size-8", v.value ? "text-theme-300" : "text-white/40"])
4505
+ class: L(["i-heroicons-cloud-arrow-down size-8", x.value ? "text-theme-300" : "text-white/40"])
4509
4506
  }, null, 2),
4510
- w("span", null, j(E.value), 1)
4511
- ], 2)) : A.value ? (h(), f("div", {
4507
+ w("span", null, H(E.value), 1)
4508
+ ], 2)) : A.value ? (p(), f("div", {
4512
4509
  key: 3,
4513
- class: D(["py-16 flex flex-col items-center justify-center gap-2 text-sm", v.value ? "text-theme-400" : "text-theme-600"])
4510
+ class: L(["py-16 flex flex-col items-center justify-center gap-2 text-sm", x.value ? "text-theme-400" : "text-theme-600"])
4514
4511
  }, [
4515
4512
  Ne(En, { class: "size-4" })
4516
- ], 2)) : a.setupHint ? (h(), f("div", {
4513
+ ], 2)) : a.setupHint ? (p(), f("div", {
4517
4514
  key: 4,
4518
- class: D(["flex items-center justify-center gap-1.5 py-2 text-[11px]", L.value])
4515
+ class: L(["flex items-center justify-center gap-1.5 py-2 text-[11px]", D.value])
4519
4516
  }, [
4520
4517
  m[19] || (m[19] = w("i", { class: "i-tabler-tool size-3" }, null, -1)),
4521
- w("span", null, j(a.setupHint), 1)
4522
- ], 2)) : H("", !0),
4518
+ w("span", null, H(a.setupHint), 1)
4519
+ ], 2)) : j("", !0),
4523
4520
  Ne(fl, {
4524
4521
  ref_key: "chatScroller",
4525
4522
  ref: i,
@@ -4527,64 +4524,64 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4527
4524
  }, {
4528
4525
  default: Bs(() => [
4529
4526
  w("div", {
4530
- class: D(I.value.length === 0 ? "flex-1 flex flex-col items-center justify-center px-3 pb-[112px]" : "pt-4 pb-[120px] px-3 space-y-2")
4527
+ class: L($.value.length === 0 ? "flex-1 flex flex-col items-center justify-center px-3 pb-[112px]" : "pt-4 pb-[120px] px-3 space-y-2")
4531
4528
  }, [
4532
- I.value.length === 0 && !A.value && !k.value ? (h(), f("div", Tl, [
4529
+ $.value.length === 0 && !A.value && !k.value ? (p(), f("div", Tl, [
4533
4530
  w("div", Sl, [
4534
4531
  w("img", {
4535
4532
  src: a.agent.avatarUrl.value,
4536
4533
  alt: a.agent.displayName.value,
4537
- class: D(["size-full rounded-full object-cover ring-1", v.value ? "ring-black/5" : "ring-white/10"])
4534
+ class: L(["size-full rounded-full object-cover ring-1", x.value ? "ring-black/5" : "ring-white/10"])
4538
4535
  }, null, 10, Al),
4539
- R.value ? (h(), f("span", {
4536
+ R.value ? (p(), f("span", {
4540
4537
  key: 0,
4541
- class: D(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", v.value ? "bg-white" : "bg-theme-900"])
4538
+ class: L(["absolute top-[85%] left-[85%] -translate-x-1/2 -translate-y-1/2 size-[18%] min-w-2.5 min-h-2.5 flex items-center justify-center rounded-full", x.value ? "bg-white" : "bg-theme-900"])
4542
4539
  }, [...m[20] || (m[20] = [
4543
4540
  w("span", { class: "size-[70%] inline-flex rounded-full bg-emerald-500" }, null, -1)
4544
- ])], 2)) : H("", !0)
4541
+ ])], 2)) : j("", !0)
4545
4542
  ]),
4546
4543
  w("div", {
4547
- class: D(["text-base @sm/chat:text-lg font-semibold", v.value ? "text-theme-900" : "text-white"])
4548
- }, j(a.agent.displayName.value), 3),
4544
+ class: L(["text-base @sm/chat:text-lg font-semibold", x.value ? "text-theme-900" : "text-white"])
4545
+ }, H(a.agent.displayName.value), 3),
4549
4546
  w("p", {
4550
- class: D(["mt-1 text-center text-xs @sm/chat:text-sm", L.value])
4551
- }, j(a.emptyStateMessage || "Type your message to get started."), 3),
4547
+ class: L(["mt-1 text-center text-xs @sm/chat:text-sm", D.value])
4548
+ }, H(a.emptyStateMessage || "Type your message to get started."), 3),
4552
4549
  w("div", {
4553
- class: D(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", v.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4550
+ class: L(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", x.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4554
4551
  title: e.value.tooltip
4555
4552
  }, [
4556
4553
  w("i", {
4557
- class: D([e.value.icon, "size-3"])
4554
+ class: L([e.value.icon, "size-3"])
4558
4555
  }, null, 2),
4559
- w("span", null, j(e.value.label), 1)
4556
+ w("span", null, H(e.value.label), 1)
4560
4557
  ], 10, _l)
4561
- ])) : H("", !0),
4562
- (h(!0), f(ee, null, me(I.value, (T, ae) => (h(), f(ee, {
4558
+ ])) : j("", !0),
4559
+ (p(!0), f(ee, null, me($.value, (T, ae) => (p(), f(ee, {
4563
4560
  key: T.id
4564
4561
  }, [
4565
- Fe(I.value, ae) ? (h(), f("div", El, [
4562
+ Fe($.value, ae) ? (p(), f("div", El, [
4566
4563
  w("div", {
4567
- class: D(["flex-1 h-px", $.value])
4564
+ class: L(["flex-1 h-px", I.value])
4568
4565
  }, null, 2),
4569
4566
  w("span", {
4570
- class: D(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", L.value])
4571
- }, j(Fe(I.value, ae)), 3),
4567
+ class: L(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", D.value])
4568
+ }, H(Fe($.value, ae)), 3),
4572
4569
  w("div", {
4573
- class: D(["flex-1 h-px", $.value])
4570
+ class: L(["flex-1 h-px", I.value])
4574
4571
  }, null, 2)
4575
- ])) : H("", !0),
4576
- J(T) ? (h(), f("div", {
4572
+ ])) : j("", !0),
4573
+ J(T) ? (p(), f("div", {
4577
4574
  key: 1,
4578
4575
  "data-test": "messaging-message-tool-activity",
4579
4576
  "data-journal-outcome": J(T)?.outcome,
4580
- class: "mb-4 mr-4 w-[calc(100%-1rem)] max-w-[306px]"
4577
+ class: "mb-4 w-full"
4581
4578
  }, [
4582
4579
  Ne(Mn, {
4583
4580
  model: J(T),
4584
- "is-light": v.value
4581
+ "is-light": x.value
4585
4582
  }, null, 8, ["model", "is-light"])
4586
- ], 8, Rl)) : H("", !0),
4587
- p(T) ? (h(), f("div", {
4583
+ ], 8, Rl)) : j("", !0),
4584
+ h(T) ? (p(), f("div", {
4588
4585
  key: 2,
4589
4586
  "data-test": "messaging-system-msg",
4590
4587
  "data-message-id": T.id,
@@ -4601,37 +4598,37 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4601
4598
  }, [
4602
4599
  w("div", Cl, [
4603
4600
  w("div", {
4604
- class: D(["mb-1 pl-1 text-[11px] font-medium", v.value ? "text-theme-500" : "text-white/45"])
4601
+ class: L(["mb-1 pl-1 text-[11px] font-medium", x.value ? "text-theme-500" : "text-white/45"])
4605
4602
  }, " System Message ", 2),
4606
4603
  w("div", {
4607
- class: D(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", v.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
4604
+ class: L(["rounded-2xl rounded-bl-[4px] px-3.5 py-2 border system-msg-content", x.value ? "bg-theme-100 border-theme-200 text-theme-800" : "bg-white/[0.18] border-white/15 text-white/90"])
4608
4605
  }, [
4609
- T.text ? (h(), gt(Kt, {
4606
+ T.text ? (p(), gt(Kt, {
4610
4607
  key: 0,
4611
4608
  text: T.text,
4612
- inverted: !v.value,
4609
+ inverted: !x.value,
4613
4610
  streaming: T.id === se.value,
4614
4611
  onClick: m[0] || (m[0] = De(() => {
4615
4612
  }, ["stop"]))
4616
- }, null, 8, ["text", "inverted", "streaming"])) : T.issue?.help ? (h(), gt(Kt, {
4613
+ }, null, 8, ["text", "inverted", "streaming"])) : T.issue?.help ? (p(), gt(Kt, {
4617
4614
  key: 1,
4618
4615
  text: T.issue.help,
4619
- inverted: !v.value
4620
- }, null, 8, ["text", "inverted"])) : H("", !0),
4621
- T.issue?.actionUrl && !o(T.text) ? (h(), f("a", {
4616
+ inverted: !x.value
4617
+ }, null, 8, ["text", "inverted"])) : j("", !0),
4618
+ T.issue?.actionUrl && !o(T.text) ? (p(), f("a", {
4622
4619
  key: 2,
4623
4620
  href: T.issue.actionUrl,
4624
4621
  "data-test": "messaging-system-msg-action",
4625
- class: D(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", v.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4622
+ class: L(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", x.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4626
4623
  onClick: m[1] || (m[1] = De(() => {
4627
4624
  }, ["stop"]))
4628
4625
  }, [
4629
- st(j(T.issue.actionLabel) + " ", 1),
4626
+ st(H(T.issue.actionLabel) + " ", 1),
4630
4627
  m[21] || (m[21] = w("i", { class: "i-tabler-arrow-right size-3" }, null, -1))
4631
- ], 10, Il)) : H("", !0)
4628
+ ], 10, Il)) : j("", !0)
4632
4629
  ], 2)
4633
4630
  ])
4634
- ], 8, Ml)) : T.sender === "system" ? (h(), f("div", {
4631
+ ], 8, Ml)) : T.sender === "system" ? (p(), f("div", {
4635
4632
  key: 3,
4636
4633
  "data-test": "messaging-system-status-msg",
4637
4634
  "data-message-id": T.id,
@@ -4642,16 +4639,16 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4642
4639
  "data-issue-code": T.issue?.code,
4643
4640
  "data-issue-bucket": T.issue?.bucket,
4644
4641
  "data-streaming": T.id === se.value ? "true" : void 0,
4645
- class: D(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", v.value ? "text-theme-500" : "text-white/60"])
4642
+ class: L(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", x.value ? "text-theme-500" : "text-white/60"])
4646
4643
  }, [
4647
4644
  m[22] || (m[22] = w("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)),
4648
4645
  Ne(Kt, {
4649
4646
  text: T.text,
4650
- inverted: !v.value,
4647
+ inverted: !x.value,
4651
4648
  onClick: m[2] || (m[2] = De(() => {
4652
4649
  }, ["stop"]))
4653
4650
  }, null, 8, ["text", "inverted"])
4654
- ], 10, $l)) : (h(), f("div", {
4651
+ ], 10, $l)) : (p(), f("div", {
4655
4652
  key: 4,
4656
4653
  "data-test": T.sender === "agent" ? "messaging-assistant-msg" : T.sender === "user" ? "messaging-user-msg" : void 0,
4657
4654
  "data-message-id": T.id,
@@ -4660,236 +4657,223 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4660
4657
  "data-message-sequence": T.sequence,
4661
4658
  "data-system-kind": T.systemKind,
4662
4659
  "data-streaming": T.id === se.value ? "true" : void 0,
4663
- class: D(["flex gap-2 items-end", {
4660
+ class: L(["flex gap-2 items-end", {
4664
4661
  "justify-end": T.sender === "user",
4665
4662
  "justify-start": T.sender === "agent",
4666
4663
  // Group-aware rhythm: tight (space-y) within a speaker's turn,
4667
4664
  // generous at the boundary between speakers (end of a group).
4668
- "mb-6": c(I.value, ae)
4665
+ "mb-6": c($.value, ae)
4669
4666
  }])
4670
4667
  }, [
4671
- T.sender === "agent" ? (h(), f("div", Ll, [
4672
- c(I.value, ae) ? (h(), f("img", {
4673
- key: 0,
4674
- src: a.agent.avatarUrl.value,
4675
- alt: a.agent.displayName.value,
4676
- class: D(["size-6 @sm/chat:size-7 rounded-full object-cover shadow-sm", v.value ? "ring-1 ring-black/5" : ""])
4677
- }, null, 10, Ol)) : H("", !0)
4678
- ])) : H("", !0),
4679
4668
  w("div", {
4680
4669
  "data-test": "messaging-message-body",
4681
- class: D(T.sender === "user" ? "max-w-[min(75%,22rem)]" : "max-w-[min(82%,68ch)]")
4670
+ class: L(T.sender === "user" ? "max-w-[min(75%,22rem)]" : "max-w-[min(82%,68ch)]")
4682
4671
  }, [
4683
- Pe(T).length ? (h(), f("div", {
4672
+ Pe(T).length ? (p(), f("div", {
4684
4673
  key: 0,
4685
- class: D(["mb-1 space-y-1", T.sender === "user" ? "flex flex-col items-end" : ""])
4674
+ class: L(["mb-1 space-y-1", T.sender === "user" ? "flex flex-col items-end" : ""])
4686
4675
  }, [
4687
- (h(!0), f(ee, null, me(Pe(T), ({ attachment: U, index: oe }) => (h(), f(ee, {
4676
+ (p(!0), f(ee, null, me(Pe(T), ({ attachment: U, index: oe }) => (p(), f(ee, {
4688
4677
  key: Ae(U, oe)
4689
4678
  }, [
4690
- U.type === "image" ? (h(), f("img", {
4679
+ U.type === "image" ? (p(), f("img", {
4691
4680
  key: 0,
4692
4681
  src: U.src,
4693
4682
  alt: U.filename,
4694
4683
  "data-test": "messaging-attachment",
4695
4684
  "data-attachment-placement": "block",
4696
4685
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4697
- }, null, 8, zl)) : U.type === "audio" ? (h(), f("audio", {
4686
+ }, null, 8, Ll)) : U.type === "audio" ? (p(), f("audio", {
4698
4687
  key: 1,
4699
4688
  src: U.src,
4700
4689
  controls: "",
4701
4690
  "data-test": "messaging-attachment",
4702
4691
  "data-attachment-placement": "block",
4703
4692
  class: "max-w-full"
4704
- }, null, 8, Nl)) : (h(), f("a", {
4693
+ }, null, 8, Ol)) : (p(), f("a", {
4705
4694
  key: 2,
4706
4695
  href: U.src,
4707
4696
  target: "_blank",
4708
4697
  rel: "noopener",
4709
4698
  "data-test": "messaging-attachment",
4710
4699
  "data-attachment-placement": "block",
4711
- class: D(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", v.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4700
+ class: L(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", x.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4712
4701
  }, [
4713
4702
  m[23] || (m[23] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
4714
- st(" " + j(U.filename), 1)
4715
- ], 10, Pl))
4703
+ st(" " + H(U.filename), 1)
4704
+ ], 10, zl))
4716
4705
  ], 64))), 128))
4717
- ], 2)) : H("", !0),
4718
- St(T).length ? (h(), f("div", {
4706
+ ], 2)) : j("", !0),
4707
+ St(T).length ? (p(), f("div", {
4719
4708
  key: 1,
4720
4709
  "data-test": "messaging-message-content",
4721
- class: D(
4722
- T.sender === "user" ? v.value ? "rounded-2xl px-3.5 py-2 bg-theme-900 text-theme-0" : "rounded-2xl px-3.5 py-2 bg-theme-0 text-theme-950" : v.value ? "text-theme-800" : "text-white/95"
4710
+ class: L(
4711
+ T.sender === "user" ? x.value ? "rounded-2xl px-3.5 py-2 bg-theme-900 text-theme-0" : "rounded-2xl px-3.5 py-2 bg-theme-0 text-theme-950" : x.value ? "text-theme-800" : "text-white/95"
4723
4712
  )
4724
4713
  }, [
4725
- (h(!0), f(ee, null, me(St(T), (U) => (h(), f(ee, {
4714
+ (p(!0), f(ee, null, me(St(T), (U) => (p(), f(ee, {
4726
4715
  key: U.key
4727
4716
  }, [
4728
- U.kind === "text" && U.text ? (h(), f("div", Bl, [
4717
+ U.kind === "text" && U.text ? (p(), f("div", Nl, [
4729
4718
  Ne(Kt, {
4730
4719
  text: U.text,
4731
- inverted: T.sender === "user" || !v.value,
4720
+ inverted: T.sender === "user" || !x.value,
4732
4721
  streaming: T.id === se.value,
4733
4722
  onClick: m[3] || (m[3] = De(() => {
4734
4723
  }, ["stop"]))
4735
4724
  }, null, 8, ["text", "inverted", "streaming"])
4736
- ])) : U.kind === "attachment" && U.attachment.type === "image" ? (h(), f("img", {
4725
+ ])) : U.kind === "attachment" && U.attachment.type === "image" ? (p(), f("img", {
4737
4726
  key: 1,
4738
4727
  src: U.attachment.src,
4739
4728
  alt: U.attachment.filename,
4740
4729
  "data-test": "messaging-attachment",
4741
4730
  "data-attachment-placement": U.placement,
4742
4731
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4743
- }, null, 8, Fl)) : U.kind === "attachment" && U.attachment.type === "audio" ? (h(), f("audio", {
4732
+ }, null, 8, Pl)) : U.kind === "attachment" && U.attachment.type === "audio" ? (p(), f("audio", {
4744
4733
  key: 2,
4745
4734
  src: U.attachment.src,
4746
4735
  controls: "",
4747
4736
  "data-test": "messaging-attachment",
4748
4737
  "data-attachment-placement": U.placement,
4749
4738
  class: "my-2 max-w-full"
4750
- }, null, 8, Ul)) : U.kind === "attachment" ? (h(), f("a", {
4739
+ }, null, 8, Bl)) : U.kind === "attachment" ? (p(), f("a", {
4751
4740
  key: 3,
4752
4741
  href: U.attachment.src,
4753
4742
  target: "_blank",
4754
4743
  rel: "noopener",
4755
4744
  "data-test": "messaging-attachment",
4756
4745
  "data-attachment-placement": U.placement,
4757
- class: D(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", v.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4746
+ class: L(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", x.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4758
4747
  }, [
4759
4748
  m[24] || (m[24] = w("i", { class: "i-tabler-file size-3.5" }, null, -1)),
4760
- st(" " + j(U.attachment.filename), 1)
4761
- ], 10, Hl)) : H("", !0)
4749
+ st(" " + H(U.attachment.filename), 1)
4750
+ ], 10, Fl)) : j("", !0)
4762
4751
  ], 64))), 128))
4763
- ], 2)) : H("", !0)
4752
+ ], 2)) : j("", !0)
4764
4753
  ], 2)
4765
4754
  ], 10, Dl)),
4766
- T.id === B.value ? (h(), f(ee, { key: 5 }, [
4767
- O.value.length ? (h(!0), f(ee, { key: 0 }, me(O.value, (U) => (h(), f(ee, {
4755
+ T.id === B.value ? (p(), f(ee, { key: 5 }, [
4756
+ O.value.length ? (p(!0), f(ee, { key: 0 }, me(O.value, (U) => (p(), f(ee, {
4768
4757
  key: U.id
4769
4758
  }, [
4770
- U.kind === "work" ? (h(), f("div", {
4759
+ U.kind === "work" ? (p(), f("div", {
4771
4760
  key: 0,
4772
4761
  "data-test": "messaging-tool-activity",
4773
4762
  "data-journal-outcome": U.journal.outcome,
4774
- class: "mb-4 mr-4 w-[calc(100%-1rem)] max-w-[306px]"
4763
+ class: "mb-4 w-full"
4775
4764
  }, [
4776
4765
  Ne(Mn, {
4777
4766
  model: U.journal,
4778
- "is-light": v.value
4767
+ "is-light": x.value
4779
4768
  }, null, 8, ["model", "is-light"])
4780
- ], 8, jl)) : U.kind === "text" && U.content ? (h(), f("div", {
4769
+ ], 8, Ul)) : U.kind === "text" && U.content ? (p(), f("div", {
4781
4770
  key: 1,
4782
4771
  "data-test": "messaging-live-text-block",
4783
- class: D(["mb-4", v.value ? "text-theme-800" : "text-white/95"])
4772
+ class: L(["mb-4", x.value ? "text-theme-800" : "text-white/95"])
4784
4773
  }, [
4785
4774
  Ne(Kt, {
4786
4775
  text: U.content,
4787
- inverted: !v.value,
4776
+ inverted: !x.value,
4788
4777
  streaming: U.id === Z.value,
4789
4778
  onClick: m[4] || (m[4] = De(() => {
4790
4779
  }, ["stop"]))
4791
4780
  }, null, 8, ["text", "inverted", "streaming"])
4792
- ], 2)) : (h(), f("div", Wl, [
4781
+ ], 2)) : (p(), f("div", Hl, [
4793
4782
  Ne(En, {
4794
- class: D(["size-3.5", v.value ? "text-theme-500" : "text-white/70"])
4783
+ class: L(["size-3.5", x.value ? "text-theme-500" : "text-white/70"])
4795
4784
  }, null, 8, ["class"])
4796
4785
  ]))
4797
- ], 64))), 128)) : W.value ? (h(), f("div", {
4786
+ ], 64))), 128)) : W.value ? (p(), f("div", {
4798
4787
  key: 1,
4799
4788
  "data-test": "messaging-tool-activity",
4800
4789
  "data-journal-outcome": W.value.outcome,
4801
- class: "mb-4 mr-4 w-[calc(100%-1rem)] max-w-[306px]"
4790
+ class: "mb-4 w-full"
4802
4791
  }, [
4803
4792
  Ne(Mn, {
4804
4793
  model: W.value,
4805
- "is-light": v.value
4794
+ "is-light": x.value
4806
4795
  }, null, 8, ["model", "is-light"])
4807
- ], 8, Gl)) : H("", !0)
4808
- ], 64)) : H("", !0)
4796
+ ], 8, jl)) : j("", !0)
4797
+ ], 64)) : j("", !0)
4809
4798
  ], 64))), 128)),
4810
- N.value ? (h(), f("div", {
4799
+ N.value ? (p(), f("div", {
4811
4800
  key: 1,
4812
4801
  "data-test": "messaging-working-state",
4813
4802
  "data-working-description": N.value,
4814
- class: D(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", v.value ? "text-theme-500" : "text-white/45"])
4803
+ class: L(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", x.value ? "text-theme-500" : "text-white/45"])
4815
4804
  }, [
4816
4805
  m[25] || (m[25] = w("i", {
4817
4806
  class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
4818
4807
  "aria-hidden": "true"
4819
4808
  }, null, -1)),
4820
- w("span", ql, j(N.value), 1)
4821
- ], 10, Vl)) : H("", !0),
4822
- Le.value ? (h(), f("div", {
4809
+ w("span", Gl, H(N.value), 1)
4810
+ ], 10, Wl)) : j("", !0),
4811
+ Le.value ? (p(), f("div", {
4823
4812
  key: 2,
4824
4813
  "data-test": "messaging-transient-issue",
4825
4814
  "data-issue-code": Le.value.code,
4826
- class: D(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", v.value ? "text-theme-600" : "text-white/60"])
4815
+ class: L(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", x.value ? "text-theme-600" : "text-white/60"])
4827
4816
  }, [
4828
4817
  m[26] || (m[26] = w("i", {
4829
4818
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
4830
4819
  "aria-hidden": "true"
4831
4820
  }, null, -1)),
4832
4821
  w("span", null, [
4833
- st(j(Le.value.message), 1),
4834
- Le.value.help ? (h(), f(ee, { key: 0 }, [
4835
- st(j(Le.value.help), 1)
4836
- ], 64)) : H("", !0)
4822
+ st(H(Le.value.message), 1),
4823
+ Le.value.help ? (p(), f(ee, { key: 0 }, [
4824
+ st(H(Le.value.help), 1)
4825
+ ], 64)) : j("", !0)
4837
4826
  ]),
4838
- Le.value.actionUrl && Le.value.actionLabel ? (h(), f("a", {
4827
+ Le.value.actionUrl && Le.value.actionLabel ? (p(), f("a", {
4839
4828
  key: 0,
4840
4829
  href: Le.value.actionUrl,
4841
4830
  class: "shrink-0 underline underline-offset-2",
4842
4831
  onClick: m[5] || (m[5] = De(() => {
4843
4832
  }, ["stop"]))
4844
- }, j(Le.value.actionLabel), 9, Kl)) : H("", !0)
4845
- ], 10, Yl)) : H("", !0),
4846
- at.value ? (h(), f("div", Xl, [
4847
- w("img", {
4848
- src: a.agent.avatarUrl.value,
4849
- alt: a.agent.displayName.value,
4850
- class: D(["size-7 @sm/chat:size-8 flex-shrink-0 rounded-full object-cover shadow-sm", v.value ? "ring-1 ring-black/5" : ""])
4851
- }, null, 10, Zl),
4833
+ }, H(Le.value.actionLabel), 9, ql)) : j("", !0)
4834
+ ], 10, Vl)) : j("", !0),
4835
+ at.value ? (p(), f("div", Yl, [
4852
4836
  w("i", {
4853
- class: D(["i-svg-spinners-3-dots-bounce size-7", v.value ? "text-theme-400" : "text-white/50"]),
4837
+ class: L(["i-svg-spinners-3-dots-bounce size-7", x.value ? "text-theme-400" : "text-white/50"]),
4854
4838
  "aria-hidden": "true"
4855
4839
  }, null, 2)
4856
- ])) : H("", !0)
4840
+ ])) : j("", !0)
4857
4841
  ], 2)
4858
4842
  ]),
4859
4843
  _: 1
4860
4844
  }, 512),
4861
4845
  w("div", {
4862
- class: D(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", v.value ? "bg-gradient-to-t from-theme-50/90 via-theme-50/55 to-transparent" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
4846
+ class: L(["absolute bottom-0 left-0 right-0 z-30 px-5 pb-4 pt-3", x.value ? "bg-gradient-to-t from-theme-50/90 via-theme-50/55 to-transparent" : "bg-gradient-to-t from-black/80 via-black/70 to-black/40"])
4863
4847
  }, [
4864
- Me.value.length > 0 ? (h(), f("div", Jl, [
4865
- (h(!0), f(ee, null, me(Me.value, (T, ae) => (h(), f("div", {
4848
+ Me.value.length > 0 ? (p(), f("div", Kl, [
4849
+ (p(!0), f(ee, null, me(Me.value, (T, ae) => (p(), f("div", {
4866
4850
  key: ae,
4867
4851
  class: "relative shrink-0 group"
4868
4852
  }, [
4869
- T.type === "image" ? (h(), f("img", {
4853
+ T.type === "image" ? (p(), f("img", {
4870
4854
  key: 0,
4871
4855
  src: T.src,
4872
4856
  alt: T.filename,
4873
- class: D(["size-14 rounded-xl object-cover border", v.value ? "border-black/10" : "border-white/20"])
4874
- }, null, 10, Ql)) : (h(), f("div", {
4857
+ class: L(["size-14 rounded-xl object-cover border", x.value ? "border-black/10" : "border-white/20"])
4858
+ }, null, 10, Xl)) : (p(), f("div", {
4875
4859
  key: 1,
4876
- class: D(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", v.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
4860
+ class: L(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", x.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
4877
4861
  }, [
4878
4862
  m[27] || (m[27] = w("i", { class: "i-tabler-file size-4" }, null, -1)),
4879
- w("span", eo, j(T.filename), 1)
4863
+ w("span", Zl, H(T.filename), 1)
4880
4864
  ], 2)),
4881
4865
  w("button", {
4882
4866
  class: "absolute -top-1.5 -right-1.5 size-5 flex items-center justify-center rounded-full bg-theme-800 text-white text-xs scale-0 group-hover:scale-100 transition-transform cursor-pointer",
4883
4867
  onClick: /* @__PURE__ */ d((U) => Ke(ae), "onClick")
4884
4868
  }, [...m[28] || (m[28] = [
4885
4869
  w("i", { class: "i-tabler-x size-3" }, null, -1)
4886
- ])], 8, to)
4870
+ ])], 8, Jl)
4887
4871
  ]))), 128)),
4888
- rt.value ? (h(), f("div", no, [
4872
+ rt.value ? (p(), f("div", Ql, [
4889
4873
  Ne(En, { class: "size-5" })
4890
- ])) : H("", !0)
4891
- ])) : H("", !0),
4892
- be.value ? (h(), f("input", {
4874
+ ])) : j("", !0)
4875
+ ])) : j("", !0),
4876
+ be.value ? (p(), f("input", {
4893
4877
  key: 1,
4894
4878
  ref_key: "fileInput",
4895
4879
  ref: l,
@@ -4897,16 +4881,16 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4897
4881
  accept: "image/*,audio/*,video/*",
4898
4882
  class: "hidden",
4899
4883
  onChange: $e
4900
- }, null, 544)) : H("", !0),
4884
+ }, null, 544)) : j("", !0),
4901
4885
  w("div", {
4902
4886
  "data-test": "messaging-composer",
4903
4887
  "data-composer-action": Ie.value,
4904
- class: D(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", v.value ? n.value ? "bg-theme-50 ring-1 ring-theme-300" : "bg-theme-25 ring-1 ring-theme-200 hover:ring-theme-300" : n.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
4888
+ class: L(["flex items-end gap-1 w-full rounded-[24px] p-1.5 transition-colors duration-200", x.value ? n.value ? "bg-theme-50 ring-1 ring-theme-300" : "bg-theme-25 ring-1 ring-theme-200 hover:ring-theme-300" : n.value ? "bg-white/15 ring-1 ring-white/25" : "bg-white/10 ring-1 ring-transparent hover:ring-white/15"])
4905
4889
  }, [
4906
4890
  w("button", {
4907
- class: D(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
4891
+ class: L(["shrink-0 flex items-center justify-center rounded-full transition-colors mb-0.5 ml-0.5 size-9 @sm/chat:size-10", [
4908
4892
  be.value ? "cursor-pointer" : "cursor-default",
4909
- v.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
4893
+ x.value ? "text-theme-400 hover:text-theme-600 hover:bg-black/5" : "text-white/50 hover:text-white/80 hover:bg-white/10",
4910
4894
  rt.value || K.value ? "opacity-50 pointer-events-none" : ""
4911
4895
  ]]),
4912
4896
  disabled: it.value || rt.value || K.value || !be.value,
@@ -4914,20 +4898,20 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4914
4898
  title: be.value ? "Attach file" : "File attachments unavailable",
4915
4899
  onClick: m[6] || (m[6] = (T) => be.value && de())
4916
4900
  }, [
4917
- rt.value ? (h(), f("i", io)) : (h(), f("i", ro)),
4918
- w("span", lo, j(be.value ? "Attach file" : "File attachments unavailable"), 1)
4919
- ], 10, ao),
4920
- ye.value ? (h(), f("div", {
4901
+ rt.value ? (p(), f("i", no)) : (p(), f("i", so)),
4902
+ w("span", ao, H(be.value ? "Attach file" : "File attachments unavailable"), 1)
4903
+ ], 10, to),
4904
+ ye.value ? (p(), f("div", {
4921
4905
  key: 1,
4922
4906
  "data-test": "messaging-recording-state",
4923
- class: D(["flex min-w-0 flex-1 items-center gap-2 px-1 py-2", v.value ? "text-theme-700" : "text-white/80"])
4907
+ class: L(["flex min-w-0 flex-1 items-center gap-2 px-1 py-2", x.value ? "text-theme-700" : "text-white/80"])
4924
4908
  }, [
4925
4909
  m[29] || (m[29] = w("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
4926
- w("span", co, j(g.value), 1),
4910
+ w("span", ro, H(g.value), 1),
4927
4911
  w("span", {
4928
- class: D(["min-w-0 truncate text-sm", v.value ? "text-theme-400" : "text-white/45"])
4929
- }, j(M.value), 3)
4930
- ], 2)) : Fs((h(), f("textarea", {
4912
+ class: L(["min-w-0 truncate text-sm", x.value ? "text-theme-400" : "text-white/45"])
4913
+ }, H(M.value), 3)
4914
+ ], 2)) : Fs((p(), f("textarea", {
4931
4915
  key: 0,
4932
4916
  ref_key: "textarea",
4933
4917
  ref: s,
@@ -4938,17 +4922,17 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4938
4922
  placeholder: Oe.value,
4939
4923
  disabled: it.value,
4940
4924
  style: { fontSize: "16px", resize: "none" },
4941
- class: D(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", v.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
4925
+ class: L(["flex-1 min-w-0 bg-transparent px-1 py-2 focus:outline-none disabled:opacity-50 overflow-y-auto leading-relaxed [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", x.value ? "text-theme-800 placeholder-theme-400" : "text-white placeholder-white/50"]),
4942
4926
  onKeydown: ke,
4943
4927
  onFocus: m[8] || (m[8] = (T) => n.value = !0),
4944
4928
  onBlur: m[9] || (m[9] = (T) => n.value = !1)
4945
- }, null, 42, oo)), [
4929
+ }, null, 42, io)), [
4946
4930
  [wa, xt.value]
4947
4931
  ]),
4948
- lt.value || ye.value ? (h(), f("button", {
4932
+ lt.value || ye.value ? (p(), f("button", {
4949
4933
  key: 2,
4950
4934
  "data-test": "messaging-record-audio-btn",
4951
- class: D(["mb-0.5 mr-0.5 flex size-9 shrink-0 items-center justify-center rounded-full transition-transform duration-200 @sm/chat:size-10", ye.value ? "bg-theme-900 text-theme-0 scale-105 cursor-pointer" : v.value ? "text-theme-500 hover:bg-black/5 hover:text-theme-700 cursor-pointer" : "text-white/60 hover:bg-white/10 hover:text-white cursor-pointer"]),
4935
+ class: L(["mb-0.5 mr-0.5 flex size-9 shrink-0 items-center justify-center rounded-full transition-transform duration-200 @sm/chat:size-10", ye.value ? "bg-theme-900 text-theme-0 scale-105 cursor-pointer" : x.value ? "text-theme-500 hover:bg-black/5 hover:text-theme-700 cursor-pointer" : "text-white/60 hover:bg-white/10 hover:text-white cursor-pointer"]),
4952
4936
  "aria-label": u.value,
4953
4937
  title: u.value,
4954
4938
  onPointerdown: m[10] || (m[10] = De((T) => je(), ["prevent"])),
@@ -4965,30 +4949,30 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
4965
4949
  ]
4966
4950
  }, [
4967
4951
  w("i", {
4968
- class: D([ye.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-5"])
4952
+ class: L([ye.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-5"])
4969
4953
  }, null, 2),
4970
- w("span", ho, j(u.value), 1)
4971
- ], 42, uo)) : (h(), f("button", {
4954
+ w("span", oo, H(u.value), 1)
4955
+ ], 42, lo)) : (p(), f("button", {
4972
4956
  key: 3,
4973
4957
  "data-test": "messaging-send-btn",
4974
4958
  "data-composer-action": Ie.value,
4975
- class: D(["shrink-0 flex items-center justify-center rounded-full transition-transform duration-200 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", re.value ? v.value ? "bg-theme-900 text-theme-0 hover:scale-105 active:scale-95 cursor-pointer" : "bg-theme-0 text-theme-950 hover:scale-105 active:scale-95 cursor-pointer" : v.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
4959
+ class: L(["shrink-0 flex items-center justify-center rounded-full transition-transform duration-200 mb-0.5 mr-0.5 size-9 @sm/chat:size-10", re.value ? x.value ? "bg-theme-900 text-theme-0 hover:scale-105 active:scale-95 cursor-pointer" : "bg-theme-0 text-theme-950 hover:scale-105 active:scale-95 cursor-pointer" : x.value ? "bg-black/5 text-black/20" : "bg-white/10 text-white/30"]),
4976
4960
  disabled: !re.value,
4977
4961
  "aria-label": Be.value,
4978
4962
  title: Be.value,
4979
4963
  onClick: m[18] || (m[18] = (T) => pe())
4980
4964
  }, [
4981
- Ie.value === "stop" ? (h(), f("i", fo)) : (h(), f("i", mo)),
4982
- w("span", go, j(Be.value), 1)
4983
- ], 10, po))
4984
- ], 10, so)
4965
+ Ie.value === "stop" ? (p(), f("i", uo)) : (p(), f("i", ho)),
4966
+ w("span", po, H(Be.value), 1)
4967
+ ], 10, co))
4968
+ ], 10, eo)
4985
4969
  ], 2)
4986
4970
  ]));
4987
4971
  }
4988
- }), vo = { class: "agent-wrap" }, xo = {
4972
+ }), fo = { class: "agent-wrap" }, mo = {
4989
4973
  key: 0,
4990
4974
  class: "flex items-center justify-center h-full"
4991
- }, Mo = /* @__PURE__ */ Re({
4975
+ }, _o = /* @__PURE__ */ Re({
4992
4976
  __name: "AgentWrap",
4993
4977
  props: {
4994
4978
  sdk: {},
@@ -5082,8 +5066,8 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
5082
5066
  }
5083
5067
  });
5084
5068
  }
5085
- }), (o, p) => (h(), f("div", vo, [
5086
- i.value ? (h(), f("div", xo, [...p[0] || (p[0] = [
5069
+ }), (o, h) => (p(), f("div", fo, [
5070
+ i.value ? (p(), f("div", mo, [...h[0] || (h[0] = [
5087
5071
  w("div", { class: "animate-spin rounded-full size-6 border-b-2 border-white" }, null, -1)
5088
5072
  ])])) : s.value ? vn(o.$slots, "default", {
5089
5073
  key: 1,
@@ -5094,22 +5078,22 @@ const Nr = ["data-visual-type", "data-chart-type", "data-stacking", "data-diagra
5094
5078
  buttonText: a.buttonText,
5095
5079
  buttonIcon: a.buttonIcon,
5096
5080
  loading: i.value
5097
- }) : H("", !0)
5081
+ }) : j("", !0)
5098
5082
  ]));
5099
5083
  }
5100
5084
  });
5101
5085
  export {
5102
5086
  ps as A,
5103
- Mo as _,
5087
+ _o as _,
5104
5088
  Kt as a,
5105
- Ro as b,
5106
- _o as c,
5107
- Ao as d,
5108
- Eo as e,
5089
+ Ao as b,
5090
+ To as c,
5091
+ wo as d,
5092
+ So as e,
5109
5093
  En as f,
5110
- To as g,
5094
+ yo as g,
5111
5095
  qa as h,
5112
5096
  ms as i,
5113
- So as p
5097
+ ko as p
5114
5098
  };
5115
5099
  //# sourceMappingURL=AgentWrap.vue_vue_type_script_setup_true_lang.js.map