@pagelines/sdk 1.0.689 → 1.0.691

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/AgentWrap.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import "./rolldown-runtime.js";
2
2
  import { s as e, t } from "./sdkClient.js";
3
3
  import { Agent as n, CHAT_ISSUE_COPY as r, SettingsObject as i, createLogger as a, getDefaultAvatarUrl as o, isAssistantSilenceControl as s, parseChatVisualFencePayload as c } from "@pagelines/core";
4
- import { Fragment as u, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as _, createTextVNode as v, createVNode as b, defineComponent as x, nextTick as S, normalizeClass as C, normalizeStyle as T, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as k, ref as ie, renderList as A, renderSlot as ae, resolveDynamicComponent as oe, shallowRef as j, toDisplayString as P, unref as se, vModelText as F, watch as ce, withCtx as ue, withDirectives as I, withKeys as de, withModifiers as R } from "vue";
4
+ import { Fragment as u, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as _, createTextVNode as v, createVNode as b, defineComponent as x, nextTick as S, normalizeClass as C, normalizeStyle as T, onBeforeUnmount as te, onMounted as ne, onUnmounted as re, openBlock as k, ref as A, renderList as j, renderSlot as ie, resolveDynamicComponent as ae, shallowRef as P, toDisplayString as F, unref as oe, vModelText as I, vShow as se, watch as ce, withCtx as R, withDirectives as ue, withKeys as de, withModifiers as pe } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
- var pe = { class: "spinner max-w-sm" }, he = {
6
+ var he = { class: "spinner max-w-sm" }, z = {
7
7
  class: "ring-circular h-full w-full origin-center",
8
8
  viewBox: "25 25 50 50"
9
9
  }, _e = /* @__PURE__ */ x({
@@ -19,7 +19,7 @@ var pe = { class: "spinner max-w-sm" }, he = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (k(), h("div", pe, [(k(), h("svg", he, [_("circle", {
22
+ return (t, n) => (k(), h("div", he, [(k(), h("svg", z, [_("circle", {
23
23
  class: C([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
@@ -70,7 +70,7 @@ function recorderMimeType() {
70
70
  }
71
71
  var VoiceRecorderController = class extends i {
72
72
  constructor(t) {
73
- super("VoiceRecorderController", t), e(this, "state", ie({
73
+ super("VoiceRecorderController", t), e(this, "state", A({
74
74
  phase: "idle",
75
75
  elapsedMs: 0
76
76
  })), e(this, "isActive", f(() => this.state.value.phase !== "idle")), e(this, "isBusy", f(() => this.state.value.phase !== "idle")), e(this, "elapsedLabel", f(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), e(this, "statusText", f(() => this.state.value.phase === "preparing" ? "Starting microphone" : this.state.value.phase === "sending" ? "Sending voice message" : "Release to send")), e(this, "recorder", void 0), e(this, "stream", void 0), e(this, "chunks", []), e(this, "timer", void 0), e(this, "startedAt", 0), e(this, "cancelOnStop", !1), e(this, "stopAfterStart", !1), e(this, "startToken", 0);
@@ -185,7 +185,7 @@ var VoiceRecorderController = class extends i {
185
185
  function durableJournalOutcome(e) {
186
186
  return e.turnOutcome === "failed" ? "failed" : e.turnOutcome === "stopped" ? "stopped" : e.sender === "system" ? "failed" : "completed";
187
187
  }
188
- var ye = {
188
+ var B = {
189
189
  waiting: "Waiting for results",
190
190
  finishing: "Finishing up",
191
191
  completed: "Work complete",
@@ -193,7 +193,7 @@ var ye = {
193
193
  stopped: "Stopped",
194
194
  notifyHint: "Taking longer than usual. You can leave and I’ll notify you when it’s ready.",
195
195
  leaveHint: "Taking longer than usual. You can leave this chat while I work."
196
- }, z = 15e3, be = 6e4, B = 3;
196
+ }, ye = 15e3, H = 6e4, be = 3;
197
197
  function toMs(e) {
198
198
  if (!e) return;
199
199
  let t = Date.parse(e);
@@ -209,7 +209,7 @@ function milestoneRows(e, t) {
209
209
  let n = e.filter((e) => e.status === "completed" || e.status === "failed" && !!e.note).filter((e) => !t.has(e.activityId)).slice().sort(byEvent), r = [];
210
210
  for (let e of n) {
211
211
  let t = e.status === "completed" ? "done" : "failed", n = r[r.length - 1];
212
- if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= z) {
212
+ if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= ye) {
213
213
  n.count += 1, n.lastMs = eventMs(e);
214
214
  continue;
215
215
  }
@@ -230,12 +230,12 @@ function milestoneRows(e, t) {
230
230
  }));
231
231
  }
232
232
  function splitRows(e) {
233
- return e.length <= B ? {
233
+ return e.length <= be ? {
234
234
  visibleRows: e,
235
235
  hiddenRows: []
236
236
  } : {
237
- visibleRows: e.slice(e.length - B),
238
- hiddenRows: e.slice(0, e.length - B)
237
+ visibleRows: e.slice(e.length - be),
238
+ hiddenRows: e.slice(0, e.length - be)
239
239
  };
240
240
  }
241
241
  function buildWorkJournalModel(e) {
@@ -247,7 +247,7 @@ function buildWorkJournalModel(e) {
247
247
  terminal: {
248
248
  id: "work-complete",
249
249
  tone: "completed",
250
- label: ye.completed
250
+ label: B.completed
251
251
  }
252
252
  };
253
253
  if (n === "failed") {
@@ -261,7 +261,7 @@ function buildWorkJournalModel(e) {
261
261
  terminal: {
262
262
  id: "work-failed",
263
263
  tone: "failed",
264
- label: ye.failed,
264
+ label: B.failed,
265
265
  ...o && e?.note ? { note: e.note } : {}
266
266
  }
267
267
  };
@@ -275,18 +275,18 @@ function buildWorkJournalModel(e) {
275
275
  terminal: {
276
276
  id: "work-stopped",
277
277
  tone: "stopped",
278
- label: ye.stopped
278
+ label: B.stopped
279
279
  }
280
280
  };
281
281
  }
282
282
  let { visibleRows: s, hiddenRows: c } = splitRows(milestoneRows(t, /* @__PURE__ */ new Set())), u = t.filter((e) => e.status === "started").sort(byEvent).pop(), f = t.reduce((e, t) => Math.max(e, eventMs(t)), a ?? -Infinity), p = Number.isFinite(f) ? f : r, m = t.reduce((e, t) => {
283
283
  let n = toMs(t.startedAt) ?? toMs(t.endedAt);
284
284
  return n === void 0 ? e : Math.min(e, n);
285
- }, Infinity), h = p + z, _ = (Number.isFinite(m) ? m : p) + be, v = r >= h, b = u || v ? {
285
+ }, Infinity), h = p + ye, _ = (Number.isFinite(m) ? m : p) + H, v = r >= h, b = u || v ? {
286
286
  id: u?.activityId ?? "work-active",
287
287
  tone: "active",
288
- label: v ? u ? ye.waiting : ye.finishing : u.label
289
- } : void 0, x = v && r >= _ ? i ? ye.notifyHint : ye.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
288
+ label: v ? u ? B.waiting : B.finishing : u.label
289
+ } : void 0, x = v && r >= _ ? i ? B.notifyHint : B.leaveHint : void 0, S = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
290
290
  return {
291
291
  outcome: n,
292
292
  visibleRows: s,
@@ -352,17 +352,17 @@ function buildLiveTurnBlocks(e) {
352
352
  }
353
353
  //#endregion
354
354
  //#region agent/AgentController.ts
355
- var Se = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), H = /* @__PURE__ */ new Set([
356
- ...Se,
355
+ var U = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Se = /* @__PURE__ */ new Set([
356
+ ...U,
357
357
  "EMPTY_STREAM",
358
358
  "RATE_LIMIT"
359
- ]), Ce = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), U = {
359
+ ]), W = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), G = {
360
360
  CREDIT_LIMIT: "billing_budget_reached",
361
361
  OVERAGE_CAP: "billing_runaway_cap"
362
362
  };
363
363
  function presentChatStreamError(e) {
364
- if (!(e.bucket !== void 0 || H.has(e.code))) return { surface: "hard" };
365
- let t = e.bucket ?? (Se.has(e.code) ? "account" : "error"), n = {
364
+ if (!(e.bucket !== void 0 || Se.has(e.code))) return { surface: "hard" };
365
+ let t = e.bucket ?? (U.has(e.code) ? "account" : "error"), n = {
366
366
  ...e.actionLabel ? { actionLabel: e.actionLabel } : {},
367
367
  ...e.actionUrl ? { actionUrl: e.actionUrl } : {},
368
368
  ...e.help ? { help: e.help } : {}
@@ -375,7 +375,7 @@ function presentChatStreamError(e) {
375
375
  ...n
376
376
  },
377
377
  sendBlockedReason: "account"
378
- } : Ce.has(e.code) ? {
378
+ } : W.has(e.code) ? {
379
379
  surface: "transcript",
380
380
  issue: {
381
381
  code: e.code,
@@ -393,7 +393,7 @@ function presentChatStreamError(e) {
393
393
  };
394
394
  }
395
395
  function transcriptMessageForChatStreamError(e) {
396
- let t = U[e.code];
396
+ let t = G[e.code];
397
397
  return t ? r[t].oneLine : e.error;
398
398
  }
399
399
  var AgentChatController = class extends i {
@@ -401,12 +401,12 @@ var AgentChatController = class extends i {
401
401
  super("AgentChatController", t), e(this, "isTextMode", !1), e(this, "lastMessage", {
402
402
  hash: "",
403
403
  time: 0
404
- }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", j(Date.now())), e(this, "toolActivityTiming", j({})), e(this, "lastVisibleProgressAtMs", j()), e(this, "liveSegments", j([])), e(this, "liveStreamMessageId", j(void 0)), e(this, "conversationId", void 0), e(this, "textState", ie({
404
+ }), e(this, "isConnecting", !1), e(this, "activeTurnGeneration", 0), e(this, "boundaryTimer", void 0), e(this, "nowMs", P(Date.now())), e(this, "toolActivityTiming", P({})), e(this, "lastVisibleProgressAtMs", P()), e(this, "liveSegments", P([])), e(this, "liveStreamMessageId", P(void 0)), e(this, "conversationId", void 0), e(this, "textState", A({
405
405
  isActive: !1,
406
406
  isConnected: !1,
407
407
  isThinking: !1,
408
408
  connectionStatus: "disconnected"
409
- })), e(this, "agentMode", ie("self")), e(this, "sharedMessages", ie([])), e(this, "composerState", ie({
409
+ })), e(this, "agentMode", A("self")), e(this, "sharedMessages", A([])), e(this, "composerState", A({
410
410
  text: "",
411
411
  pendingAttachments: [],
412
412
  isUploading: !1
@@ -771,7 +771,7 @@ Current User:
771
771
  let e = i[i.length - 1];
772
772
  this.sharedMessages.value = e?.id === a ? [...i.slice(0, -1), r] : [...i, r];
773
773
  }
774
- r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && Ce.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
774
+ r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && W.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
775
775
  }, onDone = (e) => {
776
776
  if (!isCurrentTurn()) return;
777
777
  if (!o && !c) {
@@ -941,10 +941,10 @@ function parseButtonTemplate(e) {
941
941
  }
942
942
  //#endregion
943
943
  //#region agent/ui/ElAgentButton.vue?vue&type=script&setup=true&lang.ts
944
- var we = {
944
+ var Ce = {
945
945
  key: 0,
946
946
  class: "absolute inset-0 flex items-center justify-center"
947
- }, Te = /* @__PURE__ */ x({
947
+ }, we = /* @__PURE__ */ x({
948
948
  __name: "ElAgentButton",
949
949
  props: {
950
950
  theme: { default: "primary" },
@@ -972,19 +972,19 @@ var we = {
972
972
  md: "size-4",
973
973
  lg: "size-5"
974
974
  })[e.size]);
975
- return (i, a) => (k(), h("button", { class: C(["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, n.value]]) }, [e.loading ? (k(), h("div", we, [...a[0] || (a[0] = [_("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : m("", !0), _("span", { class: C(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
975
+ return (i, a) => (k(), h("button", { class: C(["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, n.value]]) }, [e.loading ? (k(), h("div", Ce, [...a[0] || (a[0] = [_("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : m("", !0), _("span", { class: C(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
976
976
  e.icon ? (k(), h("i", {
977
977
  key: 0,
978
978
  class: C([e.icon, r.value])
979
979
  }, null, 2)) : m("", !0),
980
- ae(i.$slots, "default"),
980
+ ie(i.$slots, "default"),
981
981
  e.iconAfter ? (k(), h("i", {
982
982
  key: 1,
983
983
  class: C([e.iconAfter, r.value])
984
984
  }, null, 2)) : m("", !0)
985
985
  ], 2)], 2));
986
986
  }
987
- }), Ee = ["value"], De = /* @__PURE__ */ x({
987
+ }), Te = ["value"], Ee = /* @__PURE__ */ x({
988
988
  __name: "AgentInputEmail",
989
989
  props: { modelValue: { default: "" } },
990
990
  emits: ["update:modelValue"],
@@ -1003,9 +1003,9 @@ var we = {
1003
1003
  class: "w-full px-6 py-3 text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
1004
1004
  style: { "font-size": "16px" },
1005
1005
  onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
1006
- }, null, 40, Ee));
1006
+ }, null, 40, Te));
1007
1007
  }
1008
- }), Oe = ["placeholder", "value"], ke = /* @__PURE__ */ x({
1008
+ }), De = ["placeholder", "value"], Oe = /* @__PURE__ */ x({
1009
1009
  __name: "AgentInputOneTimeCode",
1010
1010
  props: {
1011
1011
  modelValue: {},
@@ -1014,7 +1014,7 @@ var we = {
1014
1014
  },
1015
1015
  emits: ["update:modelValue", "autoSubmit"],
1016
1016
  setup(e, { emit: t }) {
1017
- let n = e, r = t, i = ie(null), a = f(() => "0".repeat(n.length));
1017
+ let n = e, r = t, i = A(null), a = f(() => "0".repeat(n.length));
1018
1018
  ne(() => {
1019
1019
  n.focusFirst && !("ontouchstart" in window) && i.value?.focus();
1020
1020
  });
@@ -1038,9 +1038,9 @@ var we = {
1038
1038
  class: "w-full px-6 py-3 text-center font-mono tracking-[0.35em] text-theme-900 placeholder-theme-500 bg-white border border-white rounded-full focus:outline-none transition-colors",
1039
1039
  style: { "font-size": "16px" },
1040
1040
  onInput
1041
- }, null, 40, Oe));
1041
+ }, null, 40, De));
1042
1042
  }
1043
- }), Ae = { class: "relative flex-shrink-0" }, je = ["src", "alt"], W = { class: "absolute top-1 right-1" }, Me = {
1043
+ }), ke = { class: "relative flex-shrink-0" }, Ae = ["src", "alt"], je = { class: "absolute top-1 right-1" }, Me = {
1044
1044
  key: 1,
1045
1045
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1046
1046
  }, Ne = { class: "min-w-0" }, Pe = /* @__PURE__ */ x({
@@ -1055,15 +1055,15 @@ var we = {
1055
1055
  layout: { default: "centered" }
1056
1056
  },
1057
1057
  setup(e) {
1058
- return (t, n) => (k(), h("div", { class: C(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [_("div", Ae, [_("div", { class: C(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [_("img", {
1058
+ return (t, n) => (k(), h("div", { class: C(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [_("div", ke, [_("div", { class: C(["rounded-full overflow-hidden border-white", e.size === "lg" ? "w-20 h-20 sm:w-24 sm:h-24 border-4" : "w-16 sm:size-16 border-2"]) }, [_("img", {
1059
1059
  src: e.agent.avatarUrl.value,
1060
1060
  alt: e.agent.displayName.value,
1061
1061
  class: "w-full h-full object-cover",
1062
- onError: n[0] || (n[0] = (...e) => se(handleImageError) && se(handleImageError)(...e))
1063
- }, null, 40, je)], 2), _("div", W, [e.isOnline ? (k(), h(u, { key: 0 }, [n[1] || (n[1] = _("div", {
1062
+ onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1063
+ }, null, 40, Ae)], 2), _("div", je, [e.isOnline ? (k(), h(u, { key: 0 }, [n[1] || (n[1] = _("div", {
1064
1064
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1065
1065
  style: { "animation-duration": "3s" }
1066
- }, null, -1)), n[2] || (n[2] = _("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (k(), h("div", Me))])]), _("div", Ne, [_("h1", { class: C(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, P(e.agent.displayName.value), 3), _("p", { class: C(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, P(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1066
+ }, null, -1)), n[2] || (n[2] = _("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (k(), h("div", Me))])]), _("div", Ne, [_("h1", { class: C(["font-light text-white mb-1 truncate", [e.size === "lg" ? "text-3xl mb-2" : "text-xl sm:text-2xl tracking-wide leading-tight", e.layout === "horizontal" ? "text-white/95" : ""]]) }, F(e.agent.displayName.value), 3), _("p", { class: C(["font-light line-clamp-1", [e.size === "lg" ? "text-base text-white/60" : "text-sm sm:text-base", e.layout === "horizontal" ? "text-white/70 truncate" : "text-white/60"]]) }, F(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1067
1067
  }
1068
1068
  }), Fe = { class: "relative shrink-0 rounded-full" }, Ie = ["src", "alt"], Le = ["src", "alt"], Re = ["aria-label"], ze = /* @__PURE__ */ x({
1069
1069
  __name: "AgentAvatar",
@@ -1128,10 +1128,10 @@ var we = {
1128
1128
  }, Ve = ["aria-expanded", "disabled"], He = ["aria-expanded"], Ue = {
1129
1129
  class: "flex w-5 shrink-0 justify-center self-stretch",
1130
1130
  "aria-hidden": "true"
1131
- }, We = ["data-journal-row"], G = {
1131
+ }, We = ["data-journal-row"], Ge = {
1132
1132
  class: "flex w-5 shrink-0 flex-col items-center self-stretch",
1133
1133
  "aria-hidden": "true"
1134
- }, Ge = { class: "flex h-[17px] shrink-0 items-center" }, Ke = {
1134
+ }, K = { class: "flex h-[17px] shrink-0 items-center" }, Ke = {
1135
1135
  key: 0,
1136
1136
  class: "sr-only"
1137
1137
  }, qe = /* @__PURE__ */ x({
@@ -1141,7 +1141,7 @@ var we = {
1141
1141
  isLight: { type: Boolean }
1142
1142
  },
1143
1143
  setup(e) {
1144
- let t = e, n = j(!1);
1144
+ let t = e, n = P(!1);
1145
1145
  function toggle() {
1146
1146
  n.value = !n.value;
1147
1147
  }
@@ -1212,7 +1212,7 @@ var we = {
1212
1212
  };
1213
1213
  });
1214
1214
  return (t, f) => (k(), h("div", { class: C(["w-full py-0.5", s.value.muted]) }, [
1215
- a.value ? (k(), h("span", Be, P(a.value), 1)) : m("", !0),
1215
+ a.value ? (k(), h("span", Be, F(a.value), 1)) : m("", !0),
1216
1216
  r.value ? (k(), h("button", {
1217
1217
  key: 1,
1218
1218
  type: "button",
@@ -1228,7 +1228,7 @@ var we = {
1228
1228
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1229
1229
  "aria-hidden": "true"
1230
1230
  }, null, -1)),
1231
- _("span", { class: C(["text-[12.5px] font-medium leading-none", s.value.muted]) }, P(e.model.terminal?.label), 3),
1231
+ _("span", { class: C(["text-[12.5px] font-medium leading-none", s.value.muted]) }, F(e.model.terminal?.label), 3),
1232
1232
  i.value ? (k(), h("i", {
1233
1233
  key: 0,
1234
1234
  class: C(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
@@ -1245,30 +1245,30 @@ var we = {
1245
1245
  }, [_("span", Ue, [_("span", {
1246
1246
  "data-journal-spine": "dashed",
1247
1247
  class: C(["w-0 border-l border-dashed", s.value.dashed])
1248
- }, null, 2)]), _("span", { class: C(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [v(P(i.value) + " earlier updates ", 1), _("i", {
1248
+ }, null, 2)]), _("span", { class: C(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [v(F(i.value) + " earlier updates ", 1), _("i", {
1249
1249
  class: C(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1250
1250
  "aria-hidden": "true"
1251
1251
  }, null, 2)], 2)], 10, He)) : m("", !0),
1252
- (k(!0), h(u, null, A(o.value, (e, t) => (k(), h("div", {
1252
+ (k(!0), h(u, null, j(o.value, (e, t) => (k(), h("div", {
1253
1253
  key: e.id,
1254
1254
  "data-test": "messaging-tool-activity-row",
1255
1255
  "data-journal-row": e.tone,
1256
1256
  class: C([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1257
- }, [_("div", G, [_("span", Ge, [(k(), p(oe(c.value[e.tone].station.tag), {
1257
+ }, [_("div", Ge, [_("span", K, [(k(), p(ae(c.value[e.tone].station.tag), {
1258
1258
  "data-journal-station": e.tone,
1259
1259
  class: C(c.value[e.tone].station.class)
1260
1260
  }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? m("", !0) : (k(), h("span", {
1261
1261
  key: 0,
1262
1262
  class: C(["w-px flex-1", s.value.spine])
1263
- }, null, 2))]), _("div", { class: C(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [_("span", { class: C(["relative block leading-snug", c.value[e.tone].label]) }, [v(P(e.label), 1), c.value[e.tone].statusWord ? (k(), h("span", Ke, ", " + P(c.value[e.tone].statusWord), 1)) : m("", !0)], 2), e.note ? (k(), h("p", {
1263
+ }, null, 2))]), _("div", { class: C(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [_("span", { class: C(["relative block leading-snug", c.value[e.tone].label]) }, [v(F(e.label), 1), c.value[e.tone].statusWord ? (k(), h("span", Ke, ", " + F(c.value[e.tone].statusWord), 1)) : m("", !0)], 2), e.note ? (k(), h("p", {
1264
1264
  key: 0,
1265
1265
  class: C(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1266
- }, P(e.note), 3)) : m("", !0)], 2)], 10, We))), 128)),
1266
+ }, F(e.note), 3)) : m("", !0)], 2)], 10, We))), 128)),
1267
1267
  !r.value && e.model.hint ? (k(), h("p", {
1268
1268
  key: 3,
1269
1269
  "data-test": "messaging-tool-activity-hint",
1270
1270
  class: C(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1271
- }, P(e.model.hint), 3)) : m("", !0)
1271
+ }, F(e.model.hint), 3)) : m("", !0)
1272
1272
  ], 2));
1273
1273
  }
1274
1274
  });
@@ -1313,10 +1313,10 @@ function _unsupportedIterableToArray(e, t) {
1313
1313
  return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? _arrayLikeToArray(e, t) : void 0;
1314
1314
  }
1315
1315
  }
1316
- var Je = Object.entries, Ye = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, K = Object.freeze, q = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
1317
- K || (K = function freeze(e) {
1316
+ var Je = Object.entries, Ye = Object.setPrototypeOf, Xe = Object.isFrozen, Ze = Object.getPrototypeOf, Qe = Object.getOwnPropertyDescriptor, q = Object.freeze, J = Object.seal, $e = Object.create, et = typeof Reflect < "u" && Reflect, tt = et.apply, nt = et.construct;
1317
+ q || (q = function freeze(e) {
1318
1318
  return e;
1319
- }), q || (q = function seal(e) {
1319
+ }), J || (J = function seal(e) {
1320
1320
  return e;
1321
1321
  }), tt || (tt = function apply(e, t) {
1322
1322
  var n = [...arguments].slice(2);
@@ -1324,7 +1324,7 @@ K || (K = function freeze(e) {
1324
1324
  }), nt || (nt = function construct(e) {
1325
1325
  return new e(...[...arguments].slice(1));
1326
1326
  });
1327
- var rt = unapply(Array.prototype.forEach), it = unapply(Array.prototype.lastIndexOf), at = unapply(Array.prototype.pop), st = unapply(Array.prototype.push), ct = unapply(Array.prototype.splice), lt = Array.isArray, ut = unapply(String.prototype.toLowerCase), dt = unapply(String.prototype.toString), ft = unapply(String.prototype.match), pt = unapply(String.prototype.replace), mt = unapply(String.prototype.indexOf), ht = unapply(String.prototype.trim), gt = unapply(Number.prototype.toString), _t = unapply(Boolean.prototype.toString), vt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), yt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), J = unapply(Object.prototype.hasOwnProperty), bt = unapply(Object.prototype.toString), X = unapply(RegExp.prototype.test), xt = unconstruct(TypeError);
1327
+ var rt = unapply(Array.prototype.forEach), it = unapply(Array.prototype.lastIndexOf), at = unapply(Array.prototype.pop), st = unapply(Array.prototype.push), ct = unapply(Array.prototype.splice), lt = Array.isArray, ut = unapply(String.prototype.toLowerCase), dt = unapply(String.prototype.toString), ft = unapply(String.prototype.match), pt = unapply(String.prototype.replace), mt = unapply(String.prototype.indexOf), ht = unapply(String.prototype.trim), gt = unapply(Number.prototype.toString), _t = unapply(Boolean.prototype.toString), vt = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), yt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), X = unapply(Object.prototype.hasOwnProperty), bt = unapply(Object.prototype.toString), Z = unapply(RegExp.prototype.test), xt = unconstruct(TypeError);
1328
1328
  function unapply(e) {
1329
1329
  return function(t) {
1330
1330
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1352,7 +1352,7 @@ function addToSet(e, t) {
1352
1352
  return e;
1353
1353
  }
1354
1354
  function cleanArray(e) {
1355
- for (let t = 0; t < e.length; t++) J(e, t) || (e[t] = null);
1355
+ for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
1356
1356
  return e;
1357
1357
  }
1358
1358
  function clone(e) {
@@ -1360,7 +1360,7 @@ function clone(e) {
1360
1360
  for (let r of Je(e)) {
1361
1361
  var n = _slicedToArray(r, 2);
1362
1362
  let i = n[0], a = n[1];
1363
- J(e, i) && (lt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1363
+ X(e, i) && (lt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1364
1364
  }
1365
1365
  return t;
1366
1366
  }
@@ -1401,12 +1401,12 @@ function lookupGetter(e, t) {
1401
1401
  }
1402
1402
  function isRegex(e) {
1403
1403
  try {
1404
- return X(e, ""), !0;
1404
+ return Z(e, ""), !0;
1405
1405
  } catch {
1406
1406
  return !1;
1407
1407
  }
1408
1408
  }
1409
- var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ct = K(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), wt = K([
1409
+ var St = q(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr".split(".")), Ct = q(/* @__PURE__ */ "svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern".split(".")), wt = q([
1410
1410
  "feBlend",
1411
1411
  "feColorMatrix",
1412
1412
  "feComponentTransfer",
@@ -1432,7 +1432,7 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1432
1432
  "feSpotLight",
1433
1433
  "feTile",
1434
1434
  "feTurbulence"
1435
- ]), Tt = K([
1435
+ ]), Tt = q([
1436
1436
  "animate",
1437
1437
  "color-profile",
1438
1438
  "cursor",
@@ -1455,7 +1455,7 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1455
1455
  "solidcolor",
1456
1456
  "unknown",
1457
1457
  "use"
1458
- ]), Et = K(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Dt = K([
1458
+ ]), Et = q(/* @__PURE__ */ "math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts".split(".")), Dt = q([
1459
1459
  "maction",
1460
1460
  "maligngroup",
1461
1461
  "malignmark",
@@ -1471,13 +1471,13 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1471
1471
  "annotation-xml",
1472
1472
  "mprescripts",
1473
1473
  "none"
1474
- ]), Ot = K(["#text"]), kt = K(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), At = K(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), jt = K(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Mt = K([
1474
+ ]), Ot = q(["#text"]), kt = q(/* @__PURE__ */ "accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns".split(".")), At = q(/* @__PURE__ */ "accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan".split(".")), jt = q(/* @__PURE__ */ "accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns".split(".")), Mt = q([
1475
1475
  "xlink:href",
1476
1476
  "xml:id",
1477
1477
  "xlink:title",
1478
1478
  "xml:space",
1479
1479
  "xmlns:xlink"
1480
- ]), Nt = q(/{{[\w\W]*|^[\w\W]*}}/g), Pt = q(/<%[\w\W]*|^[\w\W]*%>/g), Ft = q(/\${[\w\W]*/g), It = q(/^data-[\-\w.\u00B7-\uFFFF]+$/), Lt = q(/^aria-[\-\w]+$/), Rt = q(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), zt = q(/^(?:\w+script|data):/i), Bt = q(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Vt = q(/^html$/i), Ht = q(/^[a-z][.\w]*(-[.\w]+)+$/i), Ut = q(/<[/\w!]/g), Wt = q(/<[/\w]/g), Gt = q(/<\/no(script|embed|frames)/i), Kt = q(/\/>/i), qt = {
1480
+ ]), Nt = J(/{{[\w\W]*|^[\w\W]*}}/g), Pt = J(/<%[\w\W]*|^[\w\W]*%>/g), Ft = J(/\${[\w\W]*/g), It = J(/^data-[\-\w.\u00B7-\uFFFF]+$/), Lt = J(/^aria-[\-\w]+$/), Rt = J(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), zt = J(/^(?:\w+script|data):/i), Bt = J(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Vt = J(/^html$/i), Ht = J(/^[a-z][.\w]*(-[.\w]+)+$/i), Ut = J(/<[/\w!]/g), Wt = J(/<[/\w]/g), Gt = J(/<\/no(script|embed|frames)/i), Kt = J(/\/>/i), qt = {
1481
1481
  element: 1,
1482
1482
  attribute: 2,
1483
1483
  text: 3,
@@ -1522,7 +1522,7 @@ var St = K(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1522
1522
  uponSanitizeShadowNode: []
1523
1523
  };
1524
1524
  }, Zt = function _resolveSetOption(e, t, n, r) {
1525
- return J(e, t) && lt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1525
+ return X(e, t) && lt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1526
1526
  };
1527
1527
  function createDOMPurify() {
1528
1528
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Jt(), DOMPurify = (e) => createDOMPurify(e);
@@ -1536,38 +1536,38 @@ function createDOMPurify() {
1536
1536
  let e = t.createElement("template");
1537
1537
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1538
1538
  }
1539
- let T, te = "", ne, re = !1, k = 0, ie = function _assertNotInTrustedTypesPolicy() {
1539
+ let T, te = "", ne, re = !1, k = 0, A = function _assertNotInTrustedTypesPolicy() {
1540
1540
  if (k > 0) throw xt("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1541
- }, A = function _createTrustedHTML(e) {
1542
- ie(), k++;
1541
+ }, j = function _createTrustedHTML(e) {
1542
+ A(), k++;
1543
1543
  try {
1544
1544
  return T.createHTML(e);
1545
1545
  } finally {
1546
1546
  k--;
1547
1547
  }
1548
- }, ae = function _createTrustedScriptURL(e) {
1549
- ie(), k++;
1548
+ }, ie = function _createTrustedScriptURL(e) {
1549
+ A(), k++;
1550
1550
  try {
1551
1551
  return T.createScriptURL(e);
1552
1552
  } finally {
1553
1553
  k--;
1554
1554
  }
1555
- }, oe = function _getDefaultTrustedTypesPolicy() {
1555
+ }, ae = function _getDefaultTrustedTypesPolicy() {
1556
1556
  return re || (ne = Yt(u, r), re = !0), ne;
1557
- }, j = t, P = j.implementation, se = j.createNodeIterator, F = j.createDocumentFragment, ce = j.getElementsByTagName, ue = n.importNode, I = Xt();
1558
- DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && P && P.createHTMLDocument !== void 0;
1559
- let de = Nt, R = Pt, pe = Ft, he = It, _e = Lt, ve = zt, ye = Bt, z = Ht, be = Rt, B = null, Se = addToSet({}, [
1557
+ }, P = t, F = P.implementation, oe = P.createNodeIterator, I = P.createDocumentFragment, se = P.getElementsByTagName, ce = n.importNode, R = Xt();
1558
+ DOMPurify.isSupported = typeof Je == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1559
+ let ue = Nt, de = Pt, pe = Ft, he = It, z = Lt, _e = zt, ve = Bt, B = Ht, ye = Rt, H = null, be = addToSet({}, [
1560
1560
  ...St,
1561
1561
  ...Ct,
1562
1562
  ...wt,
1563
1563
  ...Et,
1564
1564
  ...Ot
1565
- ]), H = null, Ce = addToSet({}, [
1565
+ ]), U = null, Se = addToSet({}, [
1566
1566
  ...kt,
1567
1567
  ...At,
1568
1568
  ...jt,
1569
1569
  ...Mt
1570
- ]), U = Object.seal($e(null, {
1570
+ ]), W = Object.seal($e(null, {
1571
1571
  tagNameCheck: {
1572
1572
  writable: !0,
1573
1573
  configurable: !1,
@@ -1586,7 +1586,7 @@ function createDOMPurify() {
1586
1586
  enumerable: !0,
1587
1587
  value: !1
1588
1588
  }
1589
- })), we = null, Te = null, Ee = Object.seal($e(null, {
1589
+ })), G = null, Ce = null, we = Object.seal($e(null, {
1590
1590
  tagCheck: {
1591
1591
  writable: !0,
1592
1592
  configurable: !1,
@@ -1599,14 +1599,14 @@ function createDOMPurify() {
1599
1599
  enumerable: !0,
1600
1600
  value: null
1601
1601
  }
1602
- })), De = !0, Oe = !0, ke = !1, Ae = !0, je = !1, W = !0, Me = !1, Ne = !1, Pe = null, Fe = null, Ie = !1, Le = !1, Re = !1, ze = !1, Be = !0, Ve = !1, He = "user-content-", Ue = !0, We = !1, G = {}, Ge = null, Ke = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), qe = null, Ye = addToSet({}, [
1602
+ })), Te = !0, Ee = !0, De = !1, Oe = !0, ke = !1, Ae = !0, je = !1, Me = !1, Ne = null, Pe = null, Fe = !1, Ie = !1, Le = !1, Re = !1, ze = !0, Be = !1, Ve = "user-content-", He = !0, Ue = !1, We = {}, Ge = null, K = addToSet({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ke = null, qe = addToSet({}, [
1603
1603
  "audio",
1604
1604
  "video",
1605
1605
  "img",
1606
1606
  "source",
1607
1607
  "image",
1608
1608
  "track"
1609
- ]), Xe = null, Ze = addToSet({}, [
1609
+ ]), Ye = null, Xe = addToSet({}, [
1610
1610
  "alt",
1611
1611
  "class",
1612
1612
  "for",
@@ -1621,69 +1621,69 @@ function createDOMPurify() {
1621
1621
  "value",
1622
1622
  "style",
1623
1623
  "xmlns"
1624
- ]), Qe = "http://www.w3.org/1998/Math/MathML", et = "http://www.w3.org/2000/svg", tt = "http://www.w3.org/1999/xhtml", nt = tt, gt = !1, _t = null, vt = addToSet({}, [
1624
+ ]), Ze = "http://www.w3.org/1998/Math/MathML", Qe = "http://www.w3.org/2000/svg", et = "http://www.w3.org/1999/xhtml", tt = et, nt = !1, gt = null, _t = addToSet({}, [
1625
+ Ze,
1625
1626
  Qe,
1626
- et,
1627
- tt
1628
- ], dt), yt = K([
1627
+ et
1628
+ ], dt), vt = q([
1629
1629
  "mi",
1630
1630
  "mo",
1631
1631
  "mn",
1632
1632
  "ms",
1633
1633
  "mtext"
1634
- ]), bt = addToSet({}, yt), Qt = K(["annotation-xml"]), $t = addToSet({}, Qt), en = addToSet({}, [
1634
+ ]), yt = addToSet({}, vt), bt = q(["annotation-xml"]), Qt = addToSet({}, bt), $t = addToSet({}, [
1635
1635
  "title",
1636
1636
  "style",
1637
1637
  "font",
1638
1638
  "a",
1639
1639
  "script"
1640
- ]), tn = null, Z = ["application/xhtml+xml", "text/html"], Q = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1640
+ ]), en = null, tn = ["application/xhtml+xml", "text/html"], Q = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1641
1641
  return e instanceof RegExp || e instanceof Function;
1642
1642
  }, on = function _parseConfig() {
1643
1643
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1644
1644
  if (nn && nn === e) return;
1645
- (!e || typeof e != "object") && (e = {}), e = clone(e), tn = Z.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = tn === "application/xhtml+xml" ? dt : ut, B = Zt(e, "ALLOWED_TAGS", Se, { transform: Q }), H = Zt(e, "ALLOWED_ATTR", Ce, { transform: Q }), _t = Zt(e, "ALLOWED_NAMESPACES", vt, { transform: dt }), Xe = Zt(e, "ADD_URI_SAFE_ATTR", Ze, {
1645
+ (!e || typeof e != "object") && (e = {}), e = clone(e), en = tn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = en === "application/xhtml+xml" ? dt : ut, H = Zt(e, "ALLOWED_TAGS", be, { transform: Q }), U = Zt(e, "ALLOWED_ATTR", Se, { transform: Q }), gt = Zt(e, "ALLOWED_NAMESPACES", _t, { transform: dt }), Ye = Zt(e, "ADD_URI_SAFE_ATTR", Xe, {
1646
1646
  transform: Q,
1647
- base: Ze
1648
- }), qe = Zt(e, "ADD_DATA_URI_TAGS", Ye, {
1647
+ base: Xe
1648
+ }), Ke = Zt(e, "ADD_DATA_URI_TAGS", qe, {
1649
1649
  transform: Q,
1650
- base: Ye
1651
- }), Ge = Zt(e, "FORBID_CONTENTS", Ke, { transform: Q }), we = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), Te = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), G = J(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, De = e.ALLOW_ARIA_ATTR !== !1, Oe = e.ALLOW_DATA_ATTR !== !1, ke = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ae = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, je = e.SAFE_FOR_TEMPLATES || !1, W = e.SAFE_FOR_XML !== !1, Me = e.WHOLE_DOCUMENT || !1, Le = e.RETURN_DOM || !1, Re = e.RETURN_DOM_FRAGMENT || !1, ze = e.RETURN_TRUSTED_TYPE || !1, Ie = e.FORCE_BODY || !1, Be = e.SANITIZE_DOM !== !1, Ve = e.SANITIZE_NAMED_PROPS || !1, Ue = e.KEEP_CONTENT !== !1, We = e.IN_PLACE || !1, be = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, nt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : tt, bt = J(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, yt), $t = J(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Qt);
1652
- let t = J(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1653
- if (U = $e(null), J(t, "tagNameCheck") && an(t.tagNameCheck) && (U.tagNameCheck = t.tagNameCheck), J(t, "attributeNameCheck") && an(t.attributeNameCheck) && (U.attributeNameCheck = t.attributeNameCheck), J(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (U.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), q(U), je && (Oe = !1), Re && (Le = !0), G && (B = addToSet({}, Ot), H = $e(null), G.html === !0 && (addToSet(B, St), addToSet(H, kt)), G.svg === !0 && (addToSet(B, Ct), addToSet(H, At), addToSet(H, Mt)), G.svgFilters === !0 && (addToSet(B, wt), addToSet(H, At), addToSet(H, Mt)), G.mathMl === !0 && (addToSet(B, Et), addToSet(H, jt), addToSet(H, Mt))), Ee.tagCheck = null, Ee.attributeCheck = null, J(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ee.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (B === Se && (B = clone(B)), addToSet(B, e.ADD_TAGS, Q))), J(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ee.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (H === Ce && (H = clone(H)), addToSet(H, e.ADD_ATTR, Q))), J(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Xe, e.ADD_URI_SAFE_ATTR, Q), J(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.FORBID_CONTENTS, Q)), J(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ge === Ke && (Ge = clone(Ge)), addToSet(Ge, e.ADD_FORBID_CONTENTS, Q)), Ue && (B["#text"] = !0), Me && addToSet(B, [
1650
+ base: qe
1651
+ }), Ge = Zt(e, "FORBID_CONTENTS", K, { transform: Q }), G = Zt(e, "FORBID_TAGS", clone({}), { transform: Q }), Ce = Zt(e, "FORBID_ATTR", clone({}), { transform: Q }), We = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, Te = e.ALLOW_ARIA_ATTR !== !1, Ee = e.ALLOW_DATA_ATTR !== !1, De = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Oe = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ke = e.SAFE_FOR_TEMPLATES || !1, Ae = e.SAFE_FOR_XML !== !1, je = e.WHOLE_DOCUMENT || !1, Ie = e.RETURN_DOM || !1, Le = e.RETURN_DOM_FRAGMENT || !1, Re = e.RETURN_TRUSTED_TYPE || !1, Fe = e.FORCE_BODY || !1, ze = e.SANITIZE_DOM !== !1, Be = e.SANITIZE_NAMED_PROPS || !1, He = e.KEEP_CONTENT !== !1, Ue = e.IN_PLACE || !1, ye = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Rt, tt = typeof e.NAMESPACE == "string" ? e.NAMESPACE : et, yt = X(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, vt), Qt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, bt);
1652
+ let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : $e(null);
1653
+ if (W = $e(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (W.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (W.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (W.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), J(W), ke && (Ee = !1), Le && (Ie = !0), We && (H = addToSet({}, Ot), U = $e(null), We.html === !0 && (addToSet(H, St), addToSet(U, kt)), We.svg === !0 && (addToSet(H, Ct), addToSet(U, At), addToSet(U, Mt)), We.svgFilters === !0 && (addToSet(H, wt), addToSet(U, At), addToSet(U, Mt)), We.mathMl === !0 && (addToSet(H, Et), addToSet(U, jt), addToSet(U, Mt))), we.tagCheck = null, we.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? we.tagCheck = e.ADD_TAGS : lt(e.ADD_TAGS) && (H === be && (H = clone(H)), addToSet(H, e.ADD_TAGS, Q))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? we.attributeCheck = e.ADD_ATTR : lt(e.ADD_ATTR) && (U === Se && (U = clone(U)), addToSet(U, e.ADD_ATTR, Q))), X(e, "ADD_URI_SAFE_ATTR") && lt(e.ADD_URI_SAFE_ATTR) && addToSet(Ye, e.ADD_URI_SAFE_ATTR, Q), X(e, "FORBID_CONTENTS") && lt(e.FORBID_CONTENTS) && (Ge === K && (Ge = clone(Ge)), addToSet(Ge, e.FORBID_CONTENTS, Q)), X(e, "ADD_FORBID_CONTENTS") && lt(e.ADD_FORBID_CONTENTS) && (Ge === K && (Ge = clone(Ge)), addToSet(Ge, e.ADD_FORBID_CONTENTS, Q)), He && (H["#text"] = !0), je && addToSet(H, [
1654
1654
  "html",
1655
1655
  "head",
1656
1656
  "body"
1657
- ]), B.table && (addToSet(B, ["tbody"]), delete we.tbody), e.TRUSTED_TYPES_POLICY) {
1657
+ ]), H.table && (addToSet(H, ["tbody"]), delete G.tbody), e.TRUSTED_TYPES_POLICY) {
1658
1658
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1659
1659
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw xt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1660
1660
  let t = T;
1661
1661
  T = e.TRUSTED_TYPES_POLICY;
1662
1662
  try {
1663
- te = A("");
1663
+ te = j("");
1664
1664
  } catch (e) {
1665
1665
  throw T = t, e;
1666
1666
  }
1667
- } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, te = "") : (T === void 0 && (T = oe()), T && typeof te == "string" && (te = A("")));
1668
- K && K(e), nn = e;
1667
+ } else e.TRUSTED_TYPES_POLICY === null ? (T = void 0, te = "") : (T === void 0 && (T = ae()), T && typeof te == "string" && (te = j("")));
1668
+ q && q(e), nn = e;
1669
1669
  }, sn = addToSet({}, [
1670
1670
  ...Ct,
1671
1671
  ...wt,
1672
1672
  ...Tt
1673
1673
  ]), cn = addToSet({}, [...Et, ...Dt]), ln = function _checkSvgNamespace(e, t, n) {
1674
- return t.namespaceURI === tt ? e === "svg" : t.namespaceURI === Qe ? e === "svg" && (n === "annotation-xml" || bt[n]) : !!sn[e];
1674
+ return t.namespaceURI === et ? e === "svg" : t.namespaceURI === Ze ? e === "svg" && (n === "annotation-xml" || yt[n]) : !!sn[e];
1675
1675
  }, un = function _checkMathMlNamespace(e, t, n) {
1676
- return t.namespaceURI === tt ? e === "math" : t.namespaceURI === et ? e === "math" && $t[n] : !!cn[e];
1676
+ return t.namespaceURI === et ? e === "math" : t.namespaceURI === Qe ? e === "math" && Qt[n] : !!cn[e];
1677
1677
  }, dn = function _checkHtmlNamespace(e, t, n) {
1678
- return t.namespaceURI === et && !$t[n] || t.namespaceURI === Qe && !bt[n] ? !1 : !cn[e] && (en[e] || !sn[e]);
1678
+ return t.namespaceURI === Qe && !Qt[n] || t.namespaceURI === Ze && !yt[n] ? !1 : !cn[e] && ($t[e] || !sn[e]);
1679
1679
  }, fn = function _checkValidNamespace(e) {
1680
1680
  let t = v(e);
1681
1681
  (!t || !t.tagName) && (t = {
1682
- namespaceURI: nt,
1682
+ namespaceURI: tt,
1683
1683
  tagName: "template"
1684
1684
  });
1685
1685
  let n = ut(e.tagName), r = ut(t.tagName);
1686
- return _t[e.namespaceURI] ? e.namespaceURI === et ? ln(n, t, r) : e.namespaceURI === Qe ? un(n, t, r) : e.namespaceURI === tt ? dn(n, t, r) : !!(tn === "application/xhtml+xml" && _t[e.namespaceURI]) : !1;
1686
+ return gt[e.namespaceURI] ? e.namespaceURI === Qe ? ln(n, t, r) : e.namespaceURI === Ze ? un(n, t, r) : e.namespaceURI === et ? dn(n, t, r) : !!(en === "application/xhtml+xml" && gt[e.namespaceURI]) : !1;
1687
1687
  }, pn = function _forceRemove(e) {
1688
1688
  st(DOMPurify.removed, { element: e });
1689
1689
  try {
@@ -1723,7 +1723,7 @@ function createDOMPurify() {
1723
1723
  from: t
1724
1724
  });
1725
1725
  }
1726
- if (t.removeAttribute(e), e === "is") if (Le || Re) try {
1726
+ if (t.removeAttribute(e), e === "is") if (Ie || Le) try {
1727
1727
  pn(t);
1728
1728
  } catch {}
1729
1729
  else try {
@@ -1733,7 +1733,7 @@ function createDOMPurify() {
1733
1733
  let t = x(e);
1734
1734
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1735
1735
  let r = t[n], i = r && r.name;
1736
- if (!(typeof i != "string" || H[Q(i)])) try {
1736
+ if (!(typeof i != "string" || U[Q(i)])) try {
1737
1737
  e.removeAttribute(i);
1738
1738
  } catch {}
1739
1739
  }
@@ -1746,11 +1746,11 @@ function createDOMPurify() {
1746
1746
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1747
1747
  }
1748
1748
  }, vn = function _neutralizePatchLinkage(e) {
1749
- if (!W) return;
1749
+ if (!Ae) return;
1750
1750
  let t = [e];
1751
1751
  for (; t.length > 0;) {
1752
1752
  let e = t.pop(), n = S ? S(e) : e.nodeType;
1753
- if (n === qt.processingInstruction || n === qt.comment && X(Wt, e.data)) {
1753
+ if (n === qt.processingInstruction || n === qt.comment && Z(Wt, e.data)) {
1754
1754
  try {
1755
1755
  m(e);
1756
1756
  } catch {}
@@ -1767,31 +1767,31 @@ function createDOMPurify() {
1767
1767
  }
1768
1768
  }, yn = function _initDocument(e) {
1769
1769
  let n = null, r = null;
1770
- if (Ie) e = "<remove></remove>" + e;
1770
+ if (Fe) e = "<remove></remove>" + e;
1771
1771
  else {
1772
1772
  let t = ft(e, /^[\r\n\t ]+/);
1773
1773
  r = t && t[0];
1774
1774
  }
1775
- tn === "application/xhtml+xml" && nt === tt && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1776
- let i = T ? A(e) : e;
1777
- if (nt === tt) try {
1778
- n = new c().parseFromString(i, tn);
1775
+ en === "application/xhtml+xml" && tt === et && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1776
+ let i = T ? j(e) : e;
1777
+ if (tt === et) try {
1778
+ n = new c().parseFromString(i, en);
1779
1779
  } catch {}
1780
1780
  if (!n || !n.documentElement) {
1781
- n = P.createDocument(nt, "template", null);
1781
+ n = F.createDocument(tt, "template", null);
1782
1782
  try {
1783
- n.documentElement.innerHTML = gt ? te : i;
1783
+ n.documentElement.innerHTML = nt ? te : i;
1784
1784
  } catch {}
1785
1785
  }
1786
1786
  let a = n.body || n.documentElement;
1787
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), nt === tt ? ce.call(n, Me ? "html" : "body")[0] : Me ? n.documentElement : a;
1787
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), tt === et ? se.call(n, je ? "html" : "body")[0] : je ? n.documentElement : a;
1788
1788
  }, bn = function _createNodeIterator(e) {
1789
- return se.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1789
+ return oe.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1790
1790
  }, xn = function _stripTemplateExpressions(e) {
1791
- return e = pt(e, de, " "), e = pt(e, R, " "), e = pt(e, pe, " "), e;
1791
+ return e = pt(e, ue, " "), e = pt(e, de, " "), e = pt(e, pe, " "), e;
1792
1792
  }, Sn = function _scrubTemplateExpressions(e) {
1793
1793
  e.normalize();
1794
- let t = se.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1794
+ let t = oe.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1795
1795
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1796
1796
  let r = e.querySelectorAll?.call(e, "template");
1797
1797
  r && rt(r, (e) => {
@@ -1821,46 +1821,46 @@ function createDOMPurify() {
1821
1821
  });
1822
1822
  }
1823
1823
  let En = function _isUnsafeNode(e, t) {
1824
- return !!(W && e.hasChildNodes() && !Tn(e.firstElementChild) && X(Ut, e.textContent) && X(Ut, e.innerHTML) || W && e.namespaceURI === tt && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || W && e.nodeType === qt.comment && X(Wt, e.data));
1824
+ return !!(Ae && e.hasChildNodes() && !Tn(e.firstElementChild) && Z(Ut, e.textContent) && Z(Ut, e.innerHTML) || Ae && e.namespaceURI === et && t === "style" && Tn(e.firstElementChild) || e.nodeType === qt.processingInstruction || Ae && e.nodeType === qt.comment && Z(Wt, e.data));
1825
1825
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1826
- if (!we[t] && jn(t) && (U.tagNameCheck instanceof RegExp && X(U.tagNameCheck, t) || U.tagNameCheck instanceof Function && U.tagNameCheck(t))) return !1;
1827
- if (Ue && !Ge[t]) {
1826
+ if (!G[t] && jn(t) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, t) || W.tagNameCheck instanceof Function && W.tagNameCheck(t))) return !1;
1827
+ if (He && !Ge[t]) {
1828
1828
  let t = v(e), n = _(e);
1829
1829
  if (n && t) {
1830
1830
  let r = n.length;
1831
1831
  for (let i = r - 1; i >= 0; --i) {
1832
- let r = We ? n[i] : p(n[i], !0);
1832
+ let r = Ue ? n[i] : p(n[i], !0);
1833
1833
  t.insertBefore(r, h(e));
1834
1834
  }
1835
1835
  }
1836
1836
  }
1837
1837
  return pn(e), !0;
1838
1838
  }, On = function _sanitizeElements(e, t) {
1839
- if (_executeHooks(I.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1839
+ if (_executeHooks(R.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1840
1840
  if (Cn(e)) return pn(e), !0;
1841
1841
  let n = Q(C ? C(e) : e.nodeName);
1842
- if (_executeHooks(I.uponSanitizeElement, e, {
1842
+ if (_executeHooks(R.uponSanitizeElement, e, {
1843
1843
  tagName: n,
1844
- allowedTags: B
1844
+ allowedTags: H
1845
1845
  }), e !== t && v(e) === null) return !0;
1846
1846
  if (En(e, n)) return pn(e), !0;
1847
- if (we[n] || !(Ee.tagCheck instanceof Function && Ee.tagCheck(n)) && !B[n]) {
1847
+ if (G[n] || !(we.tagCheck instanceof Function && we.tagCheck(n)) && !H[n]) {
1848
1848
  let t = Dn(e, n);
1849
- return t === !1 && _executeHooks(I.afterSanitizeElements, e, null), t;
1849
+ return t === !1 && _executeHooks(R.afterSanitizeElements, e, null), t;
1850
1850
  }
1851
- if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && X(Gt, e.innerHTML)) return pn(e), !0;
1852
- if (je && e.nodeType === qt.text) {
1851
+ if ((S ? S(e) : e.nodeType) === qt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Z(Gt, e.innerHTML)) return pn(e), !0;
1852
+ if (ke && e.nodeType === qt.text) {
1853
1853
  let t = xn(e.textContent);
1854
1854
  e.textContent !== t && (st(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1855
1855
  }
1856
- return _executeHooks(I.afterSanitizeElements, e, null), !1;
1856
+ return _executeHooks(R.afterSanitizeElements, e, null), !1;
1857
1857
  }, kn = function _isValidAttribute(e, n, r) {
1858
- if (Te[n] || W && n === "patchsrc" || W && n === "for" && e !== "label" && e !== "output" || Be && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1859
- let i = H[n] || Ee.attributeCheck instanceof Function && Ee.attributeCheck(n, e);
1860
- if (!(Oe && X(he, n)) && !(De && X(_e, n))) {
1858
+ if (Ce[n] || Ae && n === "patchsrc" || Ae && n === "for" && e !== "label" && e !== "output" || ze && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1859
+ let i = U[n] || we.attributeCheck instanceof Function && we.attributeCheck(n, e);
1860
+ if (!(Ee && Z(he, n)) && !(Te && Z(z, n))) {
1861
1861
  if (!i) {
1862
- if (!(jn(e) && (U.tagNameCheck instanceof RegExp && X(U.tagNameCheck, e) || U.tagNameCheck instanceof Function && U.tagNameCheck(e)) && (U.attributeNameCheck instanceof RegExp && X(U.attributeNameCheck, n) || U.attributeNameCheck instanceof Function && U.attributeNameCheck(n, e)) || n === "is" && U.allowCustomizedBuiltInElements && (U.tagNameCheck instanceof RegExp && X(U.tagNameCheck, r) || U.tagNameCheck instanceof Function && U.tagNameCheck(r)))) return !1;
1863
- } else if (!Xe[n] && !X(be, pt(r, ye, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && qe[e]) && !(ke && !X(ve, pt(r, ye, ""))) && r) return !1;
1862
+ if (!(jn(e) && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, e) || W.tagNameCheck instanceof Function && W.tagNameCheck(e)) && (W.attributeNameCheck instanceof RegExp && Z(W.attributeNameCheck, n) || W.attributeNameCheck instanceof Function && W.attributeNameCheck(n, e)) || n === "is" && W.allowCustomizedBuiltInElements && (W.tagNameCheck instanceof RegExp && Z(W.tagNameCheck, r) || W.tagNameCheck instanceof Function && W.tagNameCheck(r)))) return !1;
1863
+ } else if (!Ye[n] && !Z(ye, pt(r, ve, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && mt(r, "data:") === 0 && Ke[e]) && !(De && !Z(_e, pt(r, ve, ""))) && r) return !1;
1864
1864
  }
1865
1865
  return !0;
1866
1866
  }, An = addToSet({}, [
@@ -1873,11 +1873,11 @@ function createDOMPurify() {
1873
1873
  "font-face-uri",
1874
1874
  "missing-glyph"
1875
1875
  ]), jn = function _isBasicCustomElement(e) {
1876
- return !An[ut(e)] && X(z, e);
1876
+ return !An[ut(e)] && Z(B, e);
1877
1877
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1878
1878
  if (T && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1879
- case "TrustedHTML": return A(r);
1880
- case "TrustedScriptURL": return ae(r);
1879
+ case "TrustedHTML": return j(r);
1880
+ case "TrustedScriptURL": return ie(r);
1881
1881
  }
1882
1882
  return r;
1883
1883
  }, Nn = function _setAttributeValue(e, t, n, r) {
@@ -1887,19 +1887,19 @@ function createDOMPurify() {
1887
1887
  hn(t, e);
1888
1888
  }
1889
1889
  }, Pn = function _sanitizeAttributes(e) {
1890
- _executeHooks(I.beforeSanitizeAttributes, e, null);
1890
+ _executeHooks(R.beforeSanitizeAttributes, e, null);
1891
1891
  let t = e.attributes;
1892
1892
  if (!t || Cn(e)) return;
1893
1893
  let n = {
1894
1894
  attrName: "",
1895
1895
  attrValue: "",
1896
1896
  keepAttr: !0,
1897
- allowedAttributes: H,
1897
+ allowedAttributes: U,
1898
1898
  forceKeepAttr: void 0
1899
1899
  }, r = t.length, i = Q(e.nodeName);
1900
1900
  for (; r--;) {
1901
1901
  let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : ht(f);
1902
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(I.uponSanitizeAttribute, e, n), p = n.attrValue, Ve && (u === "id" || u === "name") && mt(p, He) !== 0 && (hn(o, e), p = He + p), W && X(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1902
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(R.uponSanitizeAttribute, e, n), p = n.attrValue, Be && (u === "id" || u === "name") && mt(p, Ve) !== 0 && (hn(o, e), p = Ve + p), Ae && Z(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1903
1903
  hn(o, e);
1904
1904
  continue;
1905
1905
  }
@@ -1912,25 +1912,25 @@ function createDOMPurify() {
1912
1912
  hn(o, e);
1913
1913
  continue;
1914
1914
  }
1915
- if (!Ae && X(Kt, p)) {
1915
+ if (!Oe && Z(Kt, p)) {
1916
1916
  hn(o, e);
1917
1917
  continue;
1918
1918
  }
1919
- if (je && (p = xn(p)), !kn(i, u, p)) {
1919
+ if (ke && (p = xn(p)), !kn(i, u, p)) {
1920
1920
  hn(o, e);
1921
1921
  continue;
1922
1922
  }
1923
1923
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
1924
1924
  }
1925
1925
  }
1926
- _executeHooks(I.afterSanitizeAttributes, e, null);
1926
+ _executeHooks(R.afterSanitizeAttributes, e, null);
1927
1927
  }, Fn = function _sanitizeShadowDOM(e) {
1928
1928
  let t = null, n = bn(e);
1929
- for (_executeHooks(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(I.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === qt.element) {
1929
+ for (_executeHooks(R.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(R.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (S ? S(t) : t.nodeType) === qt.element) {
1930
1930
  let e = b(t);
1931
1931
  wn(e) && (In(e), Fn(e));
1932
1932
  }
1933
- _executeHooks(I.afterSanitizeShadowDOM, e, null);
1933
+ _executeHooks(R.afterSanitizeShadowDOM, e, null);
1934
1934
  }, In = function _sanitizeAttachedShadowRoots(e) {
1935
1935
  let t = [{
1936
1936
  node: e,
@@ -1971,16 +1971,16 @@ function createDOMPurify() {
1971
1971
  };
1972
1972
  return DOMPurify.sanitize = function(e) {
1973
1973
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
1974
- if (gt = !e, gt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
1974
+ if (nt = !e, nt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw xt("dirty is not a string, aborting");
1975
1975
  if (!DOMPurify.isSupported) return e;
1976
- Ne ? (B = Pe, H = Fe) : on(t), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (B = clone(B)), I.uponSanitizeAttribute.length > 0 && (H = clone(H)), DOMPurify.removed = [];
1977
- let s = We && typeof e != "string" && Tn(e);
1976
+ Me ? (H = Ne, U = Pe) : on(t), (R.uponSanitizeElement.length > 0 || R.uponSanitizeAttribute.length > 0) && (H = clone(H)), R.uponSanitizeAttribute.length > 0 && (U = clone(U)), DOMPurify.removed = [];
1977
+ let s = Ue && typeof e != "string" && Tn(e);
1978
1978
  if (s) {
1979
1979
  vn(e);
1980
1980
  let t = C ? C(e) : e.nodeName;
1981
1981
  if (typeof t == "string") {
1982
1982
  let n = Q(t);
1983
- if (!B[n] || we[n]) throw mn(e), xt("root node is forbidden and cannot be sanitized in-place");
1983
+ if (!H[n] || G[n]) throw mn(e), xt("root node is forbidden and cannot be sanitized in-place");
1984
1984
  }
1985
1985
  if (Cn(e)) throw mn(e), xt("root node is clobbered and cannot be sanitized in-place");
1986
1986
  try {
@@ -1990,10 +1990,10 @@ function createDOMPurify() {
1990
1990
  }
1991
1991
  } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === qt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
1992
1992
  else {
1993
- if (!Le && !je && !Me && e.indexOf("<") === -1) return T && ze ? A(e) : e;
1994
- if (r = yn(e), !r) return Le ? null : ze ? te : "";
1993
+ if (!Ie && !ke && !je && e.indexOf("<") === -1) return T && Re ? j(e) : e;
1994
+ if (r = yn(e), !r) return Ie ? null : Re ? te : "";
1995
1995
  }
1996
- r && Ie && pn(r.firstChild);
1996
+ r && Fe && pn(r.firstChild);
1997
1997
  let c = s ? e : r, u = bn(c);
1998
1998
  try {
1999
1999
  for (; a = u.nextNode();) On(a, c), Pn(a), wn(a.content) && Fn(a.content);
@@ -2004,37 +2004,37 @@ function createDOMPurify() {
2004
2004
  }
2005
2005
  if (s) return rt(DOMPurify.removed, (e) => {
2006
2006
  e.element && _n(e.element);
2007
- }), je && Sn(e), e;
2008
- if (Le) {
2009
- if (je && Sn(r), Re) for (o = F.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2007
+ }), ke && Sn(e), e;
2008
+ if (Ie) {
2009
+ if (ke && Sn(r), Le) for (o = I.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2010
2010
  else o = r;
2011
- return (H.shadowroot || H.shadowrootmode) && (o = ue.call(n, o, !0)), o;
2011
+ return (U.shadowroot || U.shadowrootmode) && (o = ce.call(n, o, !0)), o;
2012
2012
  }
2013
- let f = Me ? r.outerHTML : r.innerHTML;
2014
- return Me && B["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && X(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), je && (f = xn(f)), T && ze ? A(f) : f;
2013
+ let f = je ? r.outerHTML : r.innerHTML;
2014
+ return je && H["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Z(Vt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), ke && (f = xn(f)), T && Re ? j(f) : f;
2015
2015
  }, DOMPurify.setConfig = function() {
2016
2016
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2017
- on(e), Ne = !0, Pe = B, Fe = H;
2017
+ on(e), Me = !0, Ne = H, Pe = U;
2018
2018
  }, DOMPurify.clearConfig = function() {
2019
- nn = null, Ne = !1, Pe = null, Fe = null, T = ne, te = "";
2019
+ nn = null, Me = !1, Ne = null, Pe = null, T = ne, te = "";
2020
2020
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2021
2021
  nn || on({});
2022
2022
  let r = Q(e), i = Q(t);
2023
2023
  return kn(r, i, n);
2024
2024
  }, DOMPurify.addHook = function(e, t) {
2025
- typeof t == "function" && J(I, e) && st(I[e], t);
2025
+ typeof t == "function" && X(R, e) && st(R[e], t);
2026
2026
  }, DOMPurify.removeHook = function(e, t) {
2027
- if (J(I, e)) {
2027
+ if (X(R, e)) {
2028
2028
  if (t !== void 0) {
2029
- let n = it(I[e], t);
2030
- return n === -1 ? void 0 : ct(I[e], n, 1)[0];
2029
+ let n = it(R[e], t);
2030
+ return n === -1 ? void 0 : ct(R[e], n, 1)[0];
2031
2031
  }
2032
- return at(I[e]);
2032
+ return at(R[e]);
2033
2033
  }
2034
2034
  }, DOMPurify.removeHooks = function(e) {
2035
- J(I, e) && (I[e] = []);
2035
+ X(R, e) && (R[e] = []);
2036
2036
  }, DOMPurify.removeAllHooks = function() {
2037
- I = Xt();
2037
+ R = Xt();
2038
2038
  }, DOMPurify;
2039
2039
  }
2040
2040
  var Qt = createDOMPurify(), _Class;
@@ -2068,7 +2068,7 @@ function d(e, t = "") {
2068
2068
  let n = typeof e == "string" ? e : e.source, r = {
2069
2069
  replace: (e, t) => {
2070
2070
  let i = typeof t == "string" ? t : t.source;
2071
- return i = i.replace(Z.caret, "$1"), n = n.replace(e, i), r;
2071
+ return i = i.replace(Q.caret, "$1"), n = n.replace(e, i), r;
2072
2072
  },
2073
2073
  getRegex: () => new RegExp(n, t)
2074
2074
  };
@@ -2080,7 +2080,7 @@ var tn = ((e = "") => {
2080
2080
  } catch {
2081
2081
  return !1;
2082
2082
  }
2083
- })(), Z = {
2083
+ })(), Q = {
2084
2084
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
2085
2085
  outputLinkReplace: /\\([\[\]])/g,
2086
2086
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -2137,112 +2137,112 @@ var tn = ((e = "") => {
2137
2137
  headingBeginRegex: E((e) => RegExp(`^ {0,${e}}#`)),
2138
2138
  htmlBeginRegex: E((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
2139
2139
  blockquoteBeginRegex: E((e) => RegExp(`^ {0,${e}}>`))
2140
- }, Q = /^(?:[ \t]*(?:\n|$))+/, nn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, rn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, an = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, on = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, sn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, cn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ln = d(cn).replace(/bull/g, sn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), un = d(cn).replace(/bull/g, sn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), dn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, fn = /^[^\n]+/, pn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, mn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", pn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), hn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, sn).getRegex(), gn = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", _n = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, vn = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", _n).replace("tag", gn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(dn).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex(), yn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), bn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), xn = {
2141
- blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", bn).getRegex(),
2142
- code: nn,
2143
- def: mn,
2144
- fences: rn,
2145
- heading: on,
2146
- hr: an,
2147
- html: vn,
2148
- lheading: ln,
2149
- list: hn,
2150
- newline: Q,
2151
- paragraph: yn,
2152
- table: en,
2153
- text: fn
2154
- }, Sn = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex(), Cn = {
2155
- ...xn,
2140
+ }, nn = /^(?:[ \t]*(?:\n|$))+/, rn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, an = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, on = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, sn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, cn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, ln = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, un = d(ln).replace(/bull/g, cn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), dn = d(ln).replace(/bull/g, cn).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), fn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, pn = /^[^\n]+/, mn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, hn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", mn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), gn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, cn).getRegex(), _n = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", vn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, yn = d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", vn).replace("tag", _n).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(fn).replace("hr", on).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), bn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), xn = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), Sn = {
2141
+ blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", xn).getRegex(),
2142
+ code: rn,
2143
+ def: hn,
2144
+ fences: an,
2145
+ heading: sn,
2146
+ hr: on,
2147
+ html: yn,
2156
2148
  lheading: un,
2157
- table: Sn,
2158
- paragraph: d(dn).replace("hr", an).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Sn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", gn).getRegex()
2159
- }, wn = {
2160
- ...xn,
2161
- html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", _n).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
2149
+ list: gn,
2150
+ newline: nn,
2151
+ paragraph: bn,
2152
+ table: en,
2153
+ text: pn
2154
+ }, Cn = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", on).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex(), wn = {
2155
+ ...Sn,
2156
+ lheading: dn,
2157
+ table: Cn,
2158
+ paragraph: d(fn).replace("hr", on).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Cn).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _n).getRegex()
2159
+ }, Tn = {
2160
+ ...Sn,
2161
+ html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", vn).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
2162
2162
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2163
2163
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2164
2164
  fences: en,
2165
2165
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2166
- paragraph: d(dn).replace("hr", an).replace("heading", " *#{1,6} *[^\n]").replace("lheading", ln).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2167
- }, Tn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, En = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Dn = /^( {2,}|\\)\n(?!\s*$)/, On = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, kn = /[\p{P}\p{S}]/u, An = /[\s\p{P}\p{S}]/u, jn = /[^\s\p{P}\p{S}]/u, Mn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, An).getRegex(), Nn = /(?!~)[\p{P}\p{S}]/u, Pn = /(?!~)[\s\p{P}\p{S}]/u, Fn = /(?:[^\s\p{P}\p{S}]|~)/u, In = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", tn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ln = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Rn = d(Ln, "u").replace(/punct/g, kn).getRegex(), zn = d(Ln, "u").replace(/punct/g, Nn).getRegex(), Bn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Vn = d(Bn, "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Hn = d(Bn, "gu").replace(/notPunctSpace/g, Fn).replace(/punctSpace/g, Pn).replace(/punct/g, Nn).getRegex(), Un = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Wn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, kn).getRegex(), Gn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, jn).replace(/punctSpace/g, An).replace(/punct/g, kn).getRegex(), Kn = d(/\\(punct)/, "gu").replace(/punct/g, kn).getRegex(), qn = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Jn = d(_n).replace("(?:-->|$)", "-->").getRegex(), Yn = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Jn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Xn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Zn = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Xn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Qn = d(/^!?\[(label)\]\[(ref)\]/).replace("label", Xn).replace("ref", pn).getRegex(), $n = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", pn).getRegex(), er = d("reflink|nolink(?!\\()", "g").replace("reflink", Qn).replace("nolink", $n).getRegex(), tr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, nr = {
2166
+ paragraph: d(fn).replace("hr", on).replace("heading", " *#{1,6} *[^\n]").replace("lheading", un).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2167
+ }, En = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Dn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, On = /^( {2,}|\\)\n(?!\s*$)/, kn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, An = /[\p{P}\p{S}]/u, jn = /[\s\p{P}\p{S}]/u, Mn = /[^\s\p{P}\p{S}]/u, Nn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, jn).getRegex(), Pn = /(?!~)[\p{P}\p{S}]/u, Fn = /(?!~)[\s\p{P}\p{S}]/u, In = /(?:[^\s\p{P}\p{S}]|~)/u, Ln = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", tn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Rn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, zn = d(Rn, "u").replace(/punct/g, An).getRegex(), Bn = d(Rn, "u").replace(/punct/g, Pn).getRegex(), Vn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Hn = d(Vn, "gu").replace(/notPunctSpace/g, Mn).replace(/punctSpace/g, jn).replace(/punct/g, An).getRegex(), Un = d(Vn, "gu").replace(/notPunctSpace/g, In).replace(/punctSpace/g, Fn).replace(/punct/g, Pn).getRegex(), Wn = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Mn).replace(/punctSpace/g, jn).replace(/punct/g, An).getRegex(), Gn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, An).getRegex(), Kn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Mn).replace(/punctSpace/g, jn).replace(/punct/g, An).getRegex(), qn = d(/\\(punct)/, "gu").replace(/punct/g, An).getRegex(), Jn = d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Yn = d(vn).replace("(?:-->|$)", "-->").getRegex(), Xn = d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Yn).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Zn = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Qn = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Zn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), $n = d(/^!?\[(label)\]\[(ref)\]/).replace("label", Zn).replace("ref", mn).getRegex(), er = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", mn).getRegex(), tr = d("reflink|nolink(?!\\()", "g").replace("reflink", $n).replace("nolink", er).getRegex(), nr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, rr = {
2168
2168
  _backpedal: en,
2169
- anyPunctuation: Kn,
2170
- autolink: qn,
2171
- blockSkip: In,
2172
- br: Dn,
2173
- code: En,
2169
+ anyPunctuation: qn,
2170
+ autolink: Jn,
2171
+ blockSkip: Ln,
2172
+ br: On,
2173
+ code: Dn,
2174
2174
  del: en,
2175
2175
  delLDelim: en,
2176
2176
  delRDelim: en,
2177
- emStrongLDelim: Rn,
2178
- emStrongRDelimAst: Vn,
2179
- emStrongRDelimUnd: Un,
2180
- escape: Tn,
2181
- link: Zn,
2182
- nolink: $n,
2183
- punctuation: Mn,
2184
- reflink: Qn,
2185
- reflinkSearch: er,
2186
- tag: Yn,
2187
- text: On,
2177
+ emStrongLDelim: zn,
2178
+ emStrongRDelimAst: Hn,
2179
+ emStrongRDelimUnd: Wn,
2180
+ escape: En,
2181
+ link: Qn,
2182
+ nolink: er,
2183
+ punctuation: Nn,
2184
+ reflink: $n,
2185
+ reflinkSearch: tr,
2186
+ tag: Xn,
2187
+ text: kn,
2188
2188
  url: en
2189
- }, rr = {
2190
- ...nr,
2191
- link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", Xn).getRegex(),
2192
- reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Xn).getRegex()
2193
2189
  }, ir = {
2194
- ...nr,
2195
- emStrongRDelimAst: Hn,
2196
- emStrongLDelim: zn,
2197
- delLDelim: Wn,
2198
- delRDelim: Gn,
2199
- url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", tr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2190
+ ...rr,
2191
+ link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", Zn).getRegex(),
2192
+ reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Zn).getRegex()
2193
+ }, ar = {
2194
+ ...rr,
2195
+ emStrongRDelimAst: Un,
2196
+ emStrongLDelim: Bn,
2197
+ delLDelim: Gn,
2198
+ delRDelim: Kn,
2199
+ url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", nr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2200
2200
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2201
2201
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2202
- text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", tr).getRegex()
2203
- }, ar = {
2204
- ...ir,
2205
- br: d(Dn).replace("{2,}", "*").getRegex(),
2206
- text: d(ir.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2202
+ text: d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", nr).getRegex()
2207
2203
  }, or = {
2208
- normal: xn,
2209
- gfm: Cn,
2210
- pedantic: wn
2204
+ ...ar,
2205
+ br: d(On).replace("{2,}", "*").getRegex(),
2206
+ text: d(ar.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2211
2207
  }, sr = {
2212
- normal: nr,
2213
- gfm: ir,
2214
- breaks: ar,
2215
- pedantic: rr
2208
+ normal: Sn,
2209
+ gfm: wn,
2210
+ pedantic: Tn
2216
2211
  }, cr = {
2212
+ normal: rr,
2213
+ gfm: ar,
2214
+ breaks: or,
2215
+ pedantic: ir
2216
+ }, lr = {
2217
2217
  "&": "&amp;",
2218
2218
  "<": "&lt;",
2219
2219
  ">": "&gt;",
2220
2220
  "\"": "&quot;",
2221
2221
  "'": "&#39;"
2222
- }, ge = (e) => cr[e];
2222
+ }, ge = (e) => lr[e];
2223
2223
  function O(e, t) {
2224
2224
  if (t) {
2225
- if (Z.escapeTest.test(e)) return e.replace(Z.escapeReplace, ge);
2226
- } else if (Z.escapeTestNoEncode.test(e)) return e.replace(Z.escapeReplaceNoEncode, ge);
2225
+ if (Q.escapeTest.test(e)) return e.replace(Q.escapeReplace, ge);
2226
+ } else if (Q.escapeTestNoEncode.test(e)) return e.replace(Q.escapeReplaceNoEncode, ge);
2227
2227
  return e;
2228
2228
  }
2229
2229
  function V(e) {
2230
2230
  try {
2231
- e = encodeURI(e).replace(Z.percentDecode, "%");
2231
+ e = encodeURI(e).replace(Q.percentDecode, "%");
2232
2232
  } catch {
2233
2233
  return null;
2234
2234
  }
2235
2235
  return e;
2236
2236
  }
2237
2237
  function Y(e, t) {
2238
- let n = e.replace(Z.findPipe, (e, t, n) => {
2238
+ let n = e.replace(Q.findPipe, (e, t, n) => {
2239
2239
  let r = !1, i = t;
2240
2240
  for (; --i >= 0 && n[i] === "\\";) r = !r;
2241
2241
  return r ? "|" : " |";
2242
- }).split(Z.splitPipe), r = 0;
2242
+ }).split(Q.splitPipe), r = 0;
2243
2243
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
2244
2244
  else for (; n.length < t;) n.push("");
2245
- for (; r < n.length; r++) n[r] = n[r].trim().replace(Z.slashPipe, "|");
2245
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(Q.slashPipe, "|");
2246
2246
  return n;
2247
2247
  }
2248
2248
  function $(e, t, n) {
@@ -2259,7 +2259,7 @@ function $(e, t, n) {
2259
2259
  }
2260
2260
  function ee(e) {
2261
2261
  let t = e.split("\n"), n = t.length - 1;
2262
- for (; n >= 0 && Z.blankLine.test(t[n]);) n--;
2262
+ for (; n >= 0 && Q.blankLine.test(t[n]);) n--;
2263
2263
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
2264
2264
  }
2265
2265
  function fe(e, t) {
@@ -2754,7 +2754,7 @@ ${c}` : c;
2754
2754
  };
2755
2755
  }
2756
2756
  }
2757
- }, lr = class l {
2757
+ }, ur = class l {
2758
2758
  constructor(t) {
2759
2759
  e(this, "tokens", void 0), e(this, "options", void 0), e(this, "state", void 0), e(this, "inlineQueue", void 0), e(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = t || $t, this.options.tokenizer = this.options.tokenizer || new w(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
2760
2760
  inLink: !1,
@@ -2762,16 +2762,16 @@ ${c}` : c;
2762
2762
  top: !0
2763
2763
  };
2764
2764
  let n = {
2765
- other: Z,
2766
- block: or.normal,
2767
- inline: sr.normal
2765
+ other: Q,
2766
+ block: sr.normal,
2767
+ inline: cr.normal
2768
2768
  };
2769
- this.options.pedantic ? (n.block = or.pedantic, n.inline = sr.pedantic) : this.options.gfm && (n.block = or.gfm, this.options.breaks ? n.inline = sr.breaks : n.inline = sr.gfm), this.tokenizer.rules = n;
2769
+ this.options.pedantic ? (n.block = sr.pedantic, n.inline = cr.pedantic) : this.options.gfm && (n.block = sr.gfm, this.options.breaks ? n.inline = cr.breaks : n.inline = cr.gfm), this.tokenizer.rules = n;
2770
2770
  }
2771
2771
  static get rules() {
2772
2772
  return {
2773
- block: or,
2774
- inline: sr
2773
+ block: sr,
2774
+ inline: cr
2775
2775
  };
2776
2776
  }
2777
2777
  static lex(e, t) {
@@ -2781,7 +2781,7 @@ ${c}` : c;
2781
2781
  return new l(t).inlineTokens(e);
2782
2782
  }
2783
2783
  lex(e) {
2784
- e = e.replace(Z.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2784
+ e = e.replace(Q.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2785
2785
  for (let e = 0; e < this.inlineQueue.length; e++) {
2786
2786
  let t = this.inlineQueue[e];
2787
2787
  this.inlineTokens(t.src, t.tokens);
@@ -2789,7 +2789,7 @@ ${c}` : c;
2789
2789
  return this.inlineQueue = [], this.tokens;
2790
2790
  }
2791
2791
  blockTokens(e, t = [], n = !1) {
2792
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Z.tabCharGlobal, " ").replace(Z.spaceLine, ""));
2792
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Q.tabCharGlobal, " ").replace(Q.spaceLine, ""));
2793
2793
  let r = Infinity;
2794
2794
  for (; e;) {
2795
2795
  if (e.length < r) r = e.length;
@@ -2979,7 +2979,7 @@ ${c}` : c;
2979
2979
  return "";
2980
2980
  }
2981
2981
  code({ text: e, lang: t, escaped: n }) {
2982
- let r = (t || "").match(Z.notSpaceStart)?.[0], i = e.replace(Z.endingNewline, "") + "\n";
2982
+ let r = (t || "").match(Q.notSpaceStart)?.[0], i = e.replace(Q.endingNewline, "") + "\n";
2983
2983
  return r ? "<pre><code class=\"language-" + O(r) + "\">" + (n ? i : O(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : O(i, !0)) + "</code></pre>\n";
2984
2984
  }
2985
2985
  blockquote({ tokens: e }) {
@@ -3107,7 +3107,7 @@ ${e}</tr>
3107
3107
  checkbox({ raw: e }) {
3108
3108
  return e;
3109
3109
  }
3110
- }, ur = class l {
3110
+ }, dr = class l {
3111
3111
  constructor(t) {
3112
3112
  e(this, "options", void 0), e(this, "renderer", void 0), e(this, "textRenderer", void 0), this.options = t || $t, this.options.renderer = this.options.renderer || new y(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
3113
3113
  }
@@ -3255,7 +3255,7 @@ ${e}</tr>
3255
3255
  }
3256
3256
  return n;
3257
3257
  }
3258
- }, dr = (_Class = class {
3258
+ }, fr = (_Class = class {
3259
3259
  constructor(t) {
3260
3260
  e(this, "options", void 0), e(this, "block", void 0), this.options = t || $t;
3261
3261
  }
@@ -3272,10 +3272,10 @@ ${e}</tr>
3272
3272
  return e;
3273
3273
  }
3274
3274
  provideLexer(e = this.block) {
3275
- return e ? lr.lex : lr.lexInline;
3275
+ return e ? ur.lex : ur.lexInline;
3276
3276
  }
3277
3277
  provideParser(e = this.block) {
3278
- return e ? ur.parse : ur.parseInline;
3278
+ return e ? dr.parse : dr.parseInline;
3279
3279
  }
3280
3280
  }, e(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
3281
3281
  "preprocess",
@@ -3288,7 +3288,7 @@ ${e}</tr>
3288
3288
  "processAllTokens"
3289
3289
  ])), _Class), D = class {
3290
3290
  constructor(...t) {
3291
- e(this, "defaults", M()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser", ur), e(this, "Renderer", y), e(this, "TextRenderer", L), e(this, "Lexer", lr), e(this, "Tokenizer", w), e(this, "Hooks", dr), this.use(...t);
3291
+ e(this, "defaults", M()), e(this, "options", this.setOptions), e(this, "parse", this.parseMarkdown(!0)), e(this, "parseInline", this.parseMarkdown(!1)), e(this, "Parser", dr), e(this, "Renderer", y), e(this, "TextRenderer", L), e(this, "Lexer", ur), e(this, "Tokenizer", w), e(this, "Hooks", fr), this.use(...t);
3292
3292
  }
3293
3293
  walkTokens(e, t) {
3294
3294
  let n = [];
@@ -3367,13 +3367,13 @@ ${e}</tr>
3367
3367
  n.tokenizer = t;
3368
3368
  }
3369
3369
  if (e.hooks) {
3370
- let t = this.defaults.hooks || new dr();
3370
+ let t = this.defaults.hooks || new fr();
3371
3371
  for (let n in e.hooks) {
3372
3372
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
3373
3373
  if (["options", "block"].includes(n)) continue;
3374
3374
  let r = n, i = e.hooks[r], a = t[r];
3375
- dr.passThroughHooks.has(n) ? t[r] = (e) => {
3376
- if (this.defaults.async && dr.passThroughHooksRespectAsync.has(n)) return (async () => {
3375
+ fr.passThroughHooks.has(n) ? t[r] = (e) => {
3376
+ if (this.defaults.async && fr.passThroughHooksRespectAsync.has(n)) return (async () => {
3377
3377
  let n = await i.call(t, e);
3378
3378
  return a.call(t, n);
3379
3379
  })();
@@ -3410,10 +3410,10 @@ ${e}</tr>
3410
3410
  }, this;
3411
3411
  }
3412
3412
  lexer(e, t) {
3413
- return lr.lex(e, t ?? this.defaults);
3413
+ return ur.lex(e, t ?? this.defaults);
3414
3414
  }
3415
3415
  parser(e, t) {
3416
- return ur.parse(e, t ?? this.defaults);
3416
+ return dr.parse(e, t ?? this.defaults);
3417
3417
  }
3418
3418
  parseMarkdown(e) {
3419
3419
  return (t, n) => {
@@ -3425,16 +3425,16 @@ ${e}</tr>
3425
3425
  if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
3426
3426
  if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
3427
3427
  if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
3428
- let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? lr.lex : lr.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3428
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? ur.lex : ur.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3429
3429
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
3430
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? ur.parse : ur.parseInline)(a, i);
3430
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? dr.parse : dr.parseInline)(a, i);
3431
3431
  return i.hooks ? await i.hooks.postprocess(o) : o;
3432
3432
  })().catch(a);
3433
3433
  try {
3434
3434
  i.hooks && (t = i.hooks.preprocess(t));
3435
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? lr.lex : lr.lexInline)(t, i);
3435
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? ur.lex : ur.lexInline)(t, i);
3436
3436
  i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
3437
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? ur.parse : ur.parseInline)(n, i);
3437
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? dr.parse : dr.parseInline)(n, i);
3438
3438
  return i.hooks && (r = i.hooks.postprocess(r)), r;
3439
3439
  } catch (e) {
3440
3440
  return a(e);
@@ -3451,25 +3451,25 @@ ${e}</tr>
3451
3451
  throw n;
3452
3452
  };
3453
3453
  }
3454
- }, fr = new D();
3454
+ }, pr = new D();
3455
3455
  function g(e, t) {
3456
- return fr.parse(e, t);
3456
+ return pr.parse(e, t);
3457
3457
  }
3458
3458
  g.options = g.setOptions = function(e) {
3459
- return fr.setOptions(e), g.defaults = fr.defaults, N(g.defaults), g;
3459
+ return pr.setOptions(e), g.defaults = pr.defaults, N(g.defaults), g;
3460
3460
  }, g.getDefaults = M, g.defaults = $t, g.use = function(...e) {
3461
- return fr.use(...e), g.defaults = fr.defaults, N(g.defaults), g;
3461
+ return pr.use(...e), g.defaults = pr.defaults, N(g.defaults), g;
3462
3462
  }, g.walkTokens = function(e, t) {
3463
- return fr.walkTokens(e, t);
3464
- }, g.parseInline = fr.parseInline, g.Parser = ur, g.parser = ur.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = lr, g.lexer = lr.lex, g.Tokenizer = w, g.Hooks = dr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, ur.parse, lr.lex;
3463
+ return pr.walkTokens(e, t);
3464
+ }, g.parseInline = pr.parseInline, g.Parser = dr, g.parser = dr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = ur, g.lexer = ur.lex, g.Tokenizer = w, g.Hooks = fr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, dr.parse, ur.lex;
3465
3465
  //#endregion
3466
3466
  //#region agent/ui/chat-diagram-layout.ts
3467
- var pr = 112, mr = 52, hr = 14, gr = 54, _r = 34, vr = 260;
3467
+ var mr = 112, hr = 52, gr = 14, _r = 54, vr = 34, yr = 260;
3468
3468
  function nodeWidthFor(e) {
3469
3469
  let { orientation: t, maxRows: n, maxWidth: r } = e;
3470
- if (t === "horizontal" || !r) return pr;
3471
- let i = r - hr * 2 - (n - 1) * gr;
3472
- return Math.min(vr, Math.max(pr, Math.floor(i / n)));
3470
+ if (t === "horizontal" || !r) return mr;
3471
+ let i = r - gr * 2 - (n - 1) * _r;
3472
+ return Math.min(yr, Math.max(mr, Math.floor(i / n)));
3473
3473
  }
3474
3474
  function orientationFor(e) {
3475
3475
  return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
@@ -3506,11 +3506,11 @@ function buildLayout(e, t, n) {
3506
3506
  orientation: t,
3507
3507
  maxRows: o,
3508
3508
  ...n === void 0 ? {} : { maxWidth: n }
3509
- }), u = t === "horizontal" ? hr * 2 + s * c + (s - 1) * gr : hr * 2 + o * c + (o - 1) * gr, f = t === "horizontal" ? hr * 2 + o * mr + (o - 1) * _r : hr * 2 + s * mr + (s - 1) * _r, p = [];
3509
+ }), u = t === "horizontal" ? gr * 2 + s * c + (s - 1) * _r : gr * 2 + o * c + (o - 1) * _r, f = t === "horizontal" ? gr * 2 + o * hr + (o - 1) * vr : gr * 2 + s * hr + (s - 1) * vr, p = [];
3510
3510
  for (let [e, [, n]] of a.entries()) {
3511
- let r = (o - n.length) * (t === "horizontal" ? 86 : c + gr) / 2;
3511
+ let r = (o - n.length) * (t === "horizontal" ? 86 : c + _r) / 2;
3512
3512
  for (let [i, a] of n.entries()) {
3513
- let n = t === "horizontal" ? hr + e * (c + gr) : hr + r + i * (c + gr), o = t === "horizontal" ? hr + r + i * 86 : hr + e * 86;
3513
+ let n = t === "horizontal" ? gr + e * (c + _r) : gr + r + i * (c + _r), o = t === "horizontal" ? gr + r + i * 86 : gr + e * 86;
3514
3514
  p.push({
3515
3515
  id: a.id,
3516
3516
  label: a.label,
@@ -3519,7 +3519,7 @@ function buildLayout(e, t, n) {
3519
3519
  x: n,
3520
3520
  y: o,
3521
3521
  width: c,
3522
- height: mr
3522
+ height: hr
3523
3523
  });
3524
3524
  }
3525
3525
  }
@@ -3596,14 +3596,14 @@ function formatChatVisualTick(e) {
3596
3596
  let { prefix: r, suffix: i } = affixes(n);
3597
3597
  return `${r}${formatChatVisualValue({ value: t })}${i}`;
3598
3598
  }
3599
- var yr = 5.4, br = 10, xr = 15, Sr = 16;
3599
+ var br = 5.4, xr = 10, Sr = 15, Cr = 16;
3600
3600
  function planChatVisualXLabels(e) {
3601
3601
  let { labels: t, plotWidth: n } = e;
3602
3602
  if (!t.length || n <= 0) return {
3603
3603
  mode: "horizontal",
3604
3604
  entries: []
3605
3605
  };
3606
- let r = t.map((e) => e.length > Sr ? `${e.slice(0, Sr - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3606
+ let r = t.map((e) => e.length > Cr ? `${e.slice(0, Cr - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3607
3607
  if (i === 0) return {
3608
3608
  mode: "horizontal",
3609
3609
  entries: [{
@@ -3611,14 +3611,14 @@ function planChatVisualXLabels(e) {
3611
3611
  text: r[0]
3612
3612
  }]
3613
3613
  };
3614
- if ((Math.max(...r.map((e) => e.length * yr)) + br) * t.length <= n) return {
3614
+ if ((Math.max(...r.map((e) => e.length * br)) + xr) * t.length <= n) return {
3615
3615
  mode: "horizontal",
3616
3616
  entries: r.map((e, t) => ({
3617
3617
  index: t,
3618
3618
  text: e
3619
3619
  }))
3620
3620
  };
3621
- let a = Math.max(2, Math.floor(n / xr));
3621
+ let a = Math.max(2, Math.floor(n / Sr));
3622
3622
  if (t.length <= a) return {
3623
3623
  mode: "angled",
3624
3624
  entries: r.map((e, t) => ({
@@ -3638,22 +3638,22 @@ function planChatVisualXLabels(e) {
3638
3638
  }
3639
3639
  //#endregion
3640
3640
  //#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
3641
- var Cr = [
3641
+ var wr = [
3642
3642
  "data-visual-type",
3643
3643
  "data-chart-type",
3644
3644
  "data-stacking",
3645
3645
  "data-diagram-type",
3646
3646
  "aria-label"
3647
- ], wr = { class: "mb-2.5" }, Tr = ["aria-label"], Er = {
3647
+ ], Tr = { class: "mb-2.5" }, Er = ["aria-label"], Dr = {
3648
3648
  key: 0,
3649
3649
  "data-test": "chat-visual-horizontal-bars",
3650
3650
  class: "grid gap-3"
3651
- }, Dr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Or = ["viewBox"], kr = [
3651
+ }, Or = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, kr = ["viewBox"], Ar = [
3652
3652
  "x1",
3653
3653
  "x2",
3654
3654
  "y1",
3655
3655
  "y2"
3656
- ], Ar = ["x", "y"], jr = [
3656
+ ], jr = ["x", "y"], Mr = [
3657
3657
  "data-row-index",
3658
3658
  "data-series-index",
3659
3659
  "data-data-key",
@@ -3661,42 +3661,42 @@ var Cr = [
3661
3661
  "y",
3662
3662
  "width",
3663
3663
  "height"
3664
- ], Mr = ["data-trend-key", "d"], Nr = ["d"], Pr = ["cx", "cy"], Fr = ["cx", "cy"], Ir = [
3664
+ ], Nr = ["data-trend-key", "d"], Pr = ["d"], Fr = ["cx", "cy"], Ir = ["cx", "cy"], Lr = [
3665
3665
  "x",
3666
3666
  "y",
3667
3667
  "text-anchor",
3668
3668
  "transform"
3669
- ], Lr = {
3669
+ ], Rr = {
3670
3670
  key: 2,
3671
3671
  class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
3672
- }, Rr = {
3672
+ }, zr = {
3673
3673
  key: 1,
3674
3674
  class: "grid gap-3"
3675
- }, zr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Br = { class: "shrink-0 tabular-nums" }, Vr = {
3675
+ }, Br = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Vr = { class: "shrink-0 tabular-nums" }, Hr = {
3676
3676
  key: 2,
3677
3677
  class: "overflow-x-auto"
3678
- }, Hr = ["viewBox", "aria-label"], Ur = [
3678
+ }, Ur = ["viewBox", "aria-label"], Wr = [
3679
3679
  "data-from",
3680
3680
  "data-to",
3681
3681
  "x1",
3682
3682
  "y1",
3683
3683
  "x2",
3684
3684
  "y2"
3685
- ], Wr = ["cx", "cy"], Gr = ["x", "y"], Kr = [
3685
+ ], Gr = ["cx", "cy"], Kr = ["x", "y"], qr = [
3686
3686
  "data-node-id",
3687
3687
  "data-node-kind",
3688
3688
  "transform"
3689
- ], qr = ["points"], Jr = ["width", "height"], Yr = ["width", "height"], Xr = {
3689
+ ], Jr = ["points"], Yr = ["width", "height"], Xr = ["width", "height"], Zr = {
3690
3690
  xmlns: "http://www.w3.org/1999/xhtml",
3691
3691
  class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
3692
- }, Zr = /* @__PURE__ */ x({
3692
+ }, Qr = /* @__PURE__ */ x({
3693
3693
  __name: "ChatVisualBlock",
3694
3694
  props: {
3695
3695
  result: {},
3696
3696
  inverted: { type: Boolean }
3697
3697
  },
3698
3698
  setup(e) {
3699
- let t = e, n = ie(), r = j(360), i;
3699
+ let t = e, n = A(), r = P(360), i;
3700
3700
  ne(() => {
3701
3701
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3702
3702
  let t = e[0]?.contentRect.width;
@@ -3786,7 +3786,7 @@ var Cr = [
3786
3786
  max: a,
3787
3787
  ticks: o
3788
3788
  };
3789
- }), ae = f(() => resolveSharedSeriesFormat({ series: b.value })), oe = f(() => {
3789
+ }), ie = f(() => resolveSharedSeriesFormat({ series: b.value })), ae = f(() => {
3790
3790
  let e = v.value;
3791
3791
  if (!e) return {
3792
3792
  mode: "horizontal",
@@ -3797,8 +3797,8 @@ var Cr = [
3797
3797
  labels: e.data.map((e) => String(e?.[t] ?? "")),
3798
3798
  plotWidth: Math.max(200, a.value - 42)
3799
3799
  });
3800
- }), F = f(() => {
3801
- let e = ae.value?.valueFormat, t = !!(ae.value && (e === "currency" || e === "percent" || ae.value.valuePrefix || ae.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = oe.value.mode === "angled";
3800
+ }), I = f(() => {
3801
+ let e = ie.value?.valueFormat, t = !!(ie.value && (e === "currency" || e === "percent" || ie.value.valuePrefix || ie.value.valueSuffix)), n = e === "duration" ? 46 : t ? 38 : 30, r = ae.value.mode === "angled";
3802
3802
  return {
3803
3803
  width: a.value,
3804
3804
  height: 168 + (r ? 36 : 0),
@@ -3809,7 +3809,7 @@ var Cr = [
3809
3809
  };
3810
3810
  });
3811
3811
  function labelCenterX(e, t) {
3812
- let n = v.value, r = F.value;
3812
+ let n = v.value, r = I.value;
3813
3813
  if (n?.chartType === "bar") {
3814
3814
  let n = r.width - r.left - r.right;
3815
3815
  return r.left + (e + .5) * (n / Math.max(t, 1));
@@ -3817,11 +3817,11 @@ var Cr = [
3817
3817
  return xForIndex(e, t);
3818
3818
  }
3819
3819
  function xForIndex(e, t) {
3820
- let n = F.value, r = n.width - n.left - n.right;
3820
+ let n = I.value, r = n.width - n.left - n.right;
3821
3821
  return t <= 1 ? n.left + r / 2 : n.left + r * e / (t - 1);
3822
3822
  }
3823
3823
  function yForValue(e) {
3824
- let { min: t, max: n } = re.value, r = F.value, i = r.height - r.top - r.bottom;
3824
+ let { min: t, max: n } = re.value, r = I.value, i = r.height - r.top - r.bottom;
3825
3825
  return r.top + (n - e) / (n - t || 1) * i;
3826
3826
  }
3827
3827
  function pathForSeries(e) {
@@ -3831,7 +3831,7 @@ var Cr = [
3831
3831
  return `${r === 0 ? "M" : "L"} ${xForIndex(r, t.data.length).toFixed(1)} ${yForValue(i).toFixed(1)}`;
3832
3832
  }).join(" ") : "";
3833
3833
  }
3834
- let ce = f(() => {
3834
+ let se = f(() => {
3835
3835
  let e = v.value;
3836
3836
  if (!e?.trendLine || e.chartType !== "line" && e.chartType !== "scatter") return null;
3837
3837
  let t = trendLinePoints(e, e.trendLine.dataKey), n = linearTrend(t);
@@ -3842,10 +3842,10 @@ var Cr = [
3842
3842
  dataKey: e.trendLine.dataKey,
3843
3843
  seriesIndex: s
3844
3844
  };
3845
- }), ue = f(() => {
3845
+ }), ce = f(() => {
3846
3846
  let e = v.value;
3847
3847
  if (!e || e.chartType !== "bar") return [];
3848
- let t = F.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3848
+ let t = I.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
3849
3849
  if (S.value) {
3850
3850
  let r = Math.max(4, Math.min(24, n * .42));
3851
3851
  return e.data.flatMap((i, a) => {
@@ -3879,12 +3879,12 @@ var Cr = [
3879
3879
  dataKey: e.dataKey
3880
3880
  };
3881
3881
  }));
3882
- }), I = f(() => {
3882
+ }), R = f(() => {
3883
3883
  let e = v.value;
3884
3884
  if (!e) return [];
3885
3885
  let t = e.data;
3886
3886
  if (!t.length) return [];
3887
- let n = t.length - 1, r = oe.value, i = r.mode === "angled";
3887
+ let n = t.length - 1, r = ae.value, i = r.mode === "angled";
3888
3888
  return r.entries.map(({ index: e, text: r }) => ({
3889
3889
  key: `${e}`,
3890
3890
  label: r,
@@ -3892,7 +3892,7 @@ var Cr = [
3892
3892
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
3893
3893
  angled: i
3894
3894
  })).filter((e) => e.label);
3895
- }), de = f(() => {
3895
+ }), ue = f(() => {
3896
3896
  let e = v.value;
3897
3897
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || S.value) return [];
3898
3898
  let t = e.series[0], n = e.data.map((n, r) => {
@@ -3915,7 +3915,7 @@ var Cr = [
3915
3915
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
3916
3916
  seriesIndex: 0
3917
3917
  }));
3918
- }), R = f(() => {
3918
+ }), de = f(() => {
3919
3919
  let e = v.value;
3920
3920
  if (!e?.data.length) return [];
3921
3921
  let t = e.data[e.data.length - 1];
@@ -3960,26 +3960,26 @@ var Cr = [
3960
3960
  series: r
3961
3961
  })
3962
3962
  }));
3963
- }), _e = f(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), ve = [
3963
+ }), z = f(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), _e = [
3964
3964
  "var(--color-theme-900)",
3965
3965
  "var(--color-primary-500)",
3966
3966
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
3967
- ], ye = [
3967
+ ], ve = [
3968
3968
  "rgba(255, 255, 255, 0.92)",
3969
3969
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
3970
3970
  "rgba(255, 255, 255, 0.55)"
3971
3971
  ];
3972
3972
  function seriesColor(e) {
3973
- let n = t.inverted ? ye : ve;
3973
+ let n = t.inverted ? ve : _e;
3974
3974
  return n[e % n.length];
3975
3975
  }
3976
3976
  function diagramNodeFill(e) {
3977
3977
  return t.inverted ? e === "decision" ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.06)" : e === "decision" ? "color-mix(in oklch, var(--color-primary-500) 9%, var(--color-theme-0))" : e === "output" ? "color-mix(in oklch, var(--color-theme-900) 5%, var(--color-theme-0))" : "var(--color-theme-0)";
3978
3978
  }
3979
3979
  function diagramNodeStroke(e) {
3980
- return e === "decision" ? t.inverted ? "rgba(255, 255, 255, 0.26)" : "color-mix(in oklch, var(--color-primary-500) 32%, var(--color-theme-300))" : Ce.value;
3980
+ return e === "decision" ? t.inverted ? "rgba(255, 255, 255, 0.26)" : "color-mix(in oklch, var(--color-primary-500) 32%, var(--color-theme-300))" : Se.value;
3981
3981
  }
3982
- let z = f(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), be = f(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), B = f(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), Se = f(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), H = f(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Ce = f(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), U = f(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), we = f(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Te = f(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
3982
+ let B = f(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), ye = f(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), H = f(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), be = f(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), U = f(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), Se = f(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), W = f(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = f(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Ce = f(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
3983
3983
  return (e, r) => o.value ? (k(), h("section", {
3984
3984
  key: 0,
3985
3985
  "data-test": "chat-visual",
@@ -3988,17 +3988,17 @@ var Cr = [
3988
3988
  "data-stacking": S.value ? "stacked" : void 0,
3989
3989
  "data-diagram-type": c.value?.diagramType,
3990
3990
  class: "my-6 w-full rounded-[20px] px-4 pb-3.5 pt-4",
3991
- style: T({ boxShadow: `inset 0 0 0 1px ${U.value}` }),
3991
+ style: T({ boxShadow: `inset 0 0 0 1px ${W.value}` }),
3992
3992
  "aria-label": o.value.meta.title
3993
3993
  }, [
3994
- _("header", wr, [_("h4", {
3994
+ _("header", Tr, [_("h4", {
3995
3995
  class: "text-[13px] font-semibold leading-tight",
3996
- style: T({ color: z.value })
3997
- }, P(o.value.meta.title), 5), o.value.meta.description ? (k(), h("p", {
3996
+ style: T({ color: B.value })
3997
+ }, F(o.value.meta.title), 5), o.value.meta.description ? (k(), h("p", {
3998
3998
  key: 0,
3999
3999
  class: "mt-0.5 text-[12px] leading-snug",
4000
- style: T({ color: be.value })
4001
- }, P(o.value.meta.description), 5)) : m("", !0)]),
4000
+ style: T({ color: ye.value })
4001
+ }, F(o.value.meta.description), 5)) : m("", !0)]),
4002
4002
  _("div", {
4003
4003
  ref_key: "bodyEl",
4004
4004
  ref: n
@@ -4006,19 +4006,19 @@ var Cr = [
4006
4006
  key: 0,
4007
4007
  role: "img",
4008
4008
  "aria-label": o.value.meta.title
4009
- }, [de.value.length ? (k(), h("div", Er, [(k(!0), h(u, null, A(de.value, (e) => (k(), h("div", {
4009
+ }, [ue.value.length ? (k(), h("div", Dr, [(k(!0), h(u, null, j(ue.value, (e) => (k(), h("div", {
4010
4010
  key: e.key,
4011
4011
  "data-test": "chat-visual-horizontal-bar",
4012
4012
  class: "min-w-0"
4013
- }, [_("div", Dr, [_("span", {
4013
+ }, [_("div", Or, [_("span", {
4014
4014
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4015
- style: T({ color: z.value })
4016
- }, P(e.label), 5), _("span", {
4015
+ style: T({ color: B.value })
4016
+ }, F(e.label), 5), _("span", {
4017
4017
  class: "shrink-0 font-semibold tabular-nums",
4018
- style: T({ color: z.value })
4019
- }, P(e.value), 5)]), _("div", {
4018
+ style: T({ color: B.value })
4019
+ }, F(e.value), 5)]), _("div", {
4020
4020
  class: "h-2 w-full overflow-hidden rounded-full",
4021
- style: T({ background: Te.value })
4021
+ style: T({ background: Ce.value })
4022
4022
  }, [_("div", {
4023
4023
  class: "h-full rounded-full",
4024
4024
  style: T({
@@ -4028,33 +4028,33 @@ var Cr = [
4028
4028
  }, null, 4)], 4)]))), 128))])) : (k(), h("svg", {
4029
4029
  key: 1,
4030
4030
  class: "block h-auto w-full overflow-visible",
4031
- viewBox: `0 0 ${F.value.width} ${F.value.height}`,
4032
- style: T({ aspectRatio: `${F.value.width} / ${F.value.height}` }),
4031
+ viewBox: `0 0 ${I.value.width} ${I.value.height}`,
4032
+ style: T({ aspectRatio: `${I.value.width} / ${I.value.height}` }),
4033
4033
  preserveAspectRatio: "xMidYMid meet",
4034
4034
  "aria-hidden": "true"
4035
4035
  }, [
4036
- (k(!0), h(u, null, A(re.value.ticks, (e) => (k(), h("line", {
4036
+ (k(!0), h(u, null, j(re.value.ticks, (e) => (k(), h("line", {
4037
4037
  key: `grid-${e}`,
4038
- x1: F.value.left,
4039
- x2: F.value.width - F.value.right,
4038
+ x1: I.value.left,
4039
+ x2: I.value.width - I.value.right,
4040
4040
  y1: yForValue(e),
4041
4041
  y2: yForValue(e),
4042
4042
  "stroke-width": "1",
4043
4043
  "vector-effect": "non-scaling-stroke",
4044
- style: T({ stroke: e === 0 ? H.value : Se.value })
4045
- }, null, 12, kr))), 128)),
4046
- _("g", null, [(k(!0), h(u, null, A(re.value.ticks, (e) => (k(), h("text", {
4044
+ style: T({ stroke: e === 0 ? U.value : be.value })
4045
+ }, null, 12, Ar))), 128)),
4046
+ _("g", null, [(k(!0), h(u, null, j(re.value.ticks, (e) => (k(), h("text", {
4047
4047
  key: `y-${e}`,
4048
- x: F.value.left - 7,
4048
+ x: I.value.left - 7,
4049
4049
  y: yForValue(e) + 3,
4050
4050
  "text-anchor": "end",
4051
4051
  "font-size": "9.5",
4052
- style: T({ fill: B.value })
4053
- }, P(se(formatChatVisualTick)({
4052
+ style: T({ fill: H.value })
4053
+ }, F(oe(formatChatVisualTick)({
4054
4054
  value: e,
4055
- shared: ae.value
4056
- })), 13, Ar))), 128))]),
4057
- v.value.chartType === "bar" ? (k(!0), h(u, { key: 0 }, A(ue.value, (e) => (k(), h("rect", {
4055
+ shared: ie.value
4056
+ })), 13, jr))), 128))]),
4057
+ v.value.chartType === "bar" ? (k(!0), h(u, { key: 0 }, j(ce.value, (e) => (k(), h("rect", {
4058
4058
  key: e.key,
4059
4059
  "data-test": "chat-visual-bar",
4060
4060
  "data-row-index": e.rowIndex,
@@ -4066,21 +4066,21 @@ var Cr = [
4066
4066
  height: e.height,
4067
4067
  rx: "2.5",
4068
4068
  style: T({ fill: seriesColor(e.seriesIndex) })
4069
- }, null, 12, jr))), 128)) : (k(), h(u, { key: 1 }, [
4070
- ce.value ? (k(), h("path", {
4069
+ }, null, 12, Mr))), 128)) : (k(), h(u, { key: 1 }, [
4070
+ se.value ? (k(), h("path", {
4071
4071
  key: 0,
4072
4072
  "data-test": "chat-visual-trend-line",
4073
- "data-trend-key": ce.value.dataKey,
4074
- d: ce.value.path,
4073
+ "data-trend-key": se.value.dataKey,
4074
+ d: se.value.path,
4075
4075
  fill: "none",
4076
4076
  "stroke-width": "1.4",
4077
4077
  "stroke-linecap": "round",
4078
4078
  "stroke-linejoin": "round",
4079
4079
  "stroke-dasharray": "4 3",
4080
4080
  "vector-effect": "non-scaling-stroke",
4081
- style: T({ stroke: seriesColor(ce.value.seriesIndex) })
4082
- }, null, 12, Mr)) : m("", !0),
4083
- (k(!0), h(u, null, A(b.value, (e, t) => (k(), h("g", { key: e.dataKey }, [v.value.chartType === "line" ? (k(), h("path", {
4081
+ style: T({ stroke: seriesColor(se.value.seriesIndex) })
4082
+ }, null, 12, Nr)) : m("", !0),
4083
+ (k(!0), h(u, null, j(b.value, (e, t) => (k(), h("g", { key: e.dataKey }, [v.value.chartType === "line" ? (k(), h("path", {
4084
4084
  key: 0,
4085
4085
  d: pathForSeries(e.dataKey),
4086
4086
  fill: "none",
@@ -4089,31 +4089,31 @@ var Cr = [
4089
4089
  "stroke-linejoin": "round",
4090
4090
  "vector-effect": "non-scaling-stroke",
4091
4091
  style: T({ stroke: seriesColor(t) })
4092
- }, null, 12, Nr)) : m("", !0), (k(!0), h(u, null, A(p.value, (n, r) => (k(), h(u, { key: `${e.dataKey}-${r}` }, [v.value.chartType === "scatter" ? (k(), h("circle", {
4092
+ }, null, 12, Pr)) : m("", !0), (k(!0), h(u, null, j(p.value, (n, r) => (k(), h(u, { key: `${e.dataKey}-${r}` }, [v.value.chartType === "scatter" ? (k(), h("circle", {
4093
4093
  key: 0,
4094
4094
  cx: xForIndex(r, p.value.length),
4095
4095
  cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
4096
4096
  r: "2.6",
4097
4097
  style: T({ fill: seriesColor(t) })
4098
- }, null, 12, Pr)) : m("", !0)], 64))), 128))]))), 128)),
4099
- (k(!0), h(u, null, A(pe.value, (e) => (k(), h("circle", {
4098
+ }, null, 12, Fr)) : m("", !0)], 64))), 128))]))), 128)),
4099
+ (k(!0), h(u, null, j(pe.value, (e) => (k(), h("circle", {
4100
4100
  key: `marker-${e.key}`,
4101
4101
  cx: e.cx,
4102
4102
  cy: e.cy,
4103
4103
  r: "3",
4104
4104
  style: T({ fill: seriesColor(e.seriesIndex) })
4105
- }, null, 12, Fr))), 128))
4105
+ }, null, 12, Ir))), 128))
4106
4106
  ], 64)),
4107
- (k(!0), h(u, null, A(I.value, (e) => (k(), h("text", {
4107
+ (k(!0), h(u, null, j(R.value, (e) => (k(), h("text", {
4108
4108
  key: e.key,
4109
4109
  x: e.x,
4110
- y: e.angled ? F.value.height - F.value.bottom + 12 : F.value.height - 6,
4110
+ y: e.angled ? I.value.height - I.value.bottom + 12 : I.value.height - 6,
4111
4111
  "text-anchor": e.anchor,
4112
4112
  "font-size": "9.5",
4113
- transform: e.angled ? `rotate(${se(-40)} ${e.x} ${F.value.height - F.value.bottom + 12})` : void 0,
4114
- style: T({ fill: B.value })
4115
- }, P(e.label), 13, Ir))), 128))
4116
- ], 12, Or)), R.value.length > 1 || v.value.chartType !== "bar" ? (k(), h("div", Lr, [(k(!0), h(u, null, A(R.value, (e) => (k(), h("div", {
4113
+ transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${I.value.height - I.value.bottom + 12})` : void 0,
4114
+ style: T({ fill: H.value })
4115
+ }, F(e.label), 13, Lr))), 128))
4116
+ ], 12, kr)), de.value.length > 1 || v.value.chartType !== "bar" ? (k(), h("div", Rr, [(k(!0), h(u, null, j(de.value, (e) => (k(), h("div", {
4117
4117
  key: e.key,
4118
4118
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4119
4119
  }, [
@@ -4121,41 +4121,41 @@ var Cr = [
4121
4121
  class: "size-2.5 shrink-0 rounded-full",
4122
4122
  style: T({ background: seriesColor(e.seriesIndex) })
4123
4123
  }, null, 4),
4124
- _("span", { style: T({ color: be.value }) }, P(e.label), 5),
4124
+ _("span", { style: T({ color: ye.value }) }, F(e.label), 5),
4125
4125
  _("span", {
4126
4126
  class: "font-semibold tabular-nums",
4127
- style: T({ color: z.value })
4128
- }, P(e.value), 5)
4129
- ]))), 128))])) : m("", !0)], 8, Tr)) : x.value ? (k(), h("div", Rr, [(k(!0), h(u, null, A(he.value, (e, t) => (k(), h("div", { key: e.key }, [_("div", zr, [_("span", {
4127
+ style: T({ color: B.value })
4128
+ }, F(e.value), 5)
4129
+ ]))), 128))])) : m("", !0)], 8, Er)) : x.value ? (k(), h("div", zr, [(k(!0), h(u, null, j(he.value, (e, t) => (k(), h("div", { key: e.key }, [_("div", Br, [_("span", {
4130
4130
  class: "truncate font-medium",
4131
- style: T({ color: z.value })
4132
- }, P(e.name), 5), _("span", Br, [_("span", {
4131
+ style: T({ color: B.value })
4132
+ }, F(e.name), 5), _("span", Vr, [_("span", {
4133
4133
  class: "font-semibold",
4134
- style: T({ color: z.value })
4135
- }, P(e.display), 5), _("span", {
4134
+ style: T({ color: B.value })
4135
+ }, F(e.display), 5), _("span", {
4136
4136
  class: "ml-1.5",
4137
- style: T({ color: be.value })
4138
- }, P(Math.round(e.percent * 100)) + "%", 5)])]), _("div", {
4137
+ style: T({ color: ye.value })
4138
+ }, F(Math.round(e.percent * 100)) + "%", 5)])]), _("div", {
4139
4139
  class: "h-1.5 w-full overflow-hidden rounded-full",
4140
- style: T({ background: Te.value })
4140
+ style: T({ background: Ce.value })
4141
4141
  }, [_("div", {
4142
4142
  class: "h-full rounded-full",
4143
4143
  style: T({
4144
4144
  width: `${Math.max(2, e.percent * 100)}%`,
4145
4145
  background: seriesColor(t)
4146
4146
  })
4147
- }, null, 4)], 4)]))), 128))])) : c.value && _e.value ? (k(), h("div", Vr, [(k(), h("svg", {
4147
+ }, null, 4)], 4)]))), 128))])) : c.value && z.value ? (k(), h("div", Hr, [(k(), h("svg", {
4148
4148
  "data-test": "chat-visual-diagram-svg",
4149
4149
  class: "block h-auto overflow-visible",
4150
- viewBox: `0 0 ${_e.value.width} ${_e.value.height}`,
4150
+ viewBox: `0 0 ${z.value.width} ${z.value.height}`,
4151
4151
  style: T({
4152
- width: `${_e.value.width}px`,
4153
- aspectRatio: `${_e.value.width} / ${_e.value.height}`
4152
+ width: `${z.value.width}px`,
4153
+ aspectRatio: `${z.value.width} / ${z.value.height}`
4154
4154
  }),
4155
4155
  role: "img",
4156
4156
  "aria-label": o.value.meta.title
4157
4157
  }, [
4158
- (k(!0), h(u, null, A(_e.value.edges, (e) => (k(), h("line", {
4158
+ (k(!0), h(u, null, j(z.value.edges, (e) => (k(), h("line", {
4159
4159
  key: e.key,
4160
4160
  "data-test": "chat-visual-diagram-edge",
4161
4161
  "data-from": e.from,
@@ -4167,16 +4167,16 @@ var Cr = [
4167
4167
  "stroke-width": "1.4",
4168
4168
  "stroke-linecap": "round",
4169
4169
  "vector-effect": "non-scaling-stroke",
4170
- style: T({ stroke: we.value })
4171
- }, null, 12, Ur))), 128)),
4172
- (k(!0), h(u, null, A(_e.value.edges, (e) => (k(), h("circle", {
4170
+ style: T({ stroke: G.value })
4171
+ }, null, 12, Wr))), 128)),
4172
+ (k(!0), h(u, null, j(z.value.edges, (e) => (k(), h("circle", {
4173
4173
  key: `${e.key}-dot`,
4174
4174
  cx: e.x2,
4175
4175
  cy: e.y2,
4176
4176
  r: "2.4",
4177
- style: T({ fill: we.value })
4178
- }, null, 12, Wr))), 128)),
4179
- (k(!0), h(u, null, A(_e.value.edges.filter((e) => e.label), (e) => (k(), h("foreignObject", {
4177
+ style: T({ fill: G.value })
4178
+ }, null, 12, Gr))), 128)),
4179
+ (k(!0), h(u, null, j(z.value.edges.filter((e) => e.label), (e) => (k(), h("foreignObject", {
4180
4180
  key: `${e.key}-label`,
4181
4181
  x: e.labelX - 55,
4182
4182
  y: e.labelY - 12,
@@ -4186,11 +4186,11 @@ var Cr = [
4186
4186
  xmlns: "http://www.w3.org/1999/xhtml",
4187
4187
  class: "flex h-full items-center justify-center px-1 text-center text-[10.5px] font-medium leading-none",
4188
4188
  style: T({
4189
- color: be.value,
4189
+ color: ye.value,
4190
4190
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4191
4191
  })
4192
- }, P(e.label), 5)], 8, Gr))), 128)),
4193
- (k(!0), h(u, null, A(_e.value.nodes, (e) => (k(), h("g", {
4192
+ }, F(e.label), 5)], 8, Kr))), 128)),
4193
+ (k(!0), h(u, null, j(z.value.nodes, (e) => (k(), h("g", {
4194
4194
  key: e.id,
4195
4195
  "data-test": "chat-visual-diagram-node",
4196
4196
  "data-node-id": e.id,
@@ -4205,7 +4205,7 @@ var Cr = [
4205
4205
  fill: diagramNodeFill(e.kind),
4206
4206
  stroke: diagramNodeStroke(e.kind)
4207
4207
  })
4208
- }, null, 12, qr)) : (k(), h("rect", {
4208
+ }, null, 12, Jr)) : (k(), h("rect", {
4209
4209
  key: 1,
4210
4210
  width: e.width,
4211
4211
  height: e.height,
@@ -4216,28 +4216,28 @@ var Cr = [
4216
4216
  fill: diagramNodeFill(e.kind),
4217
4217
  stroke: diagramNodeStroke(e.kind)
4218
4218
  })
4219
- }, null, 12, Jr)), (k(), h("foreignObject", {
4219
+ }, null, 12, Yr)), (k(), h("foreignObject", {
4220
4220
  x: "8",
4221
4221
  y: "5",
4222
4222
  width: e.width - 16,
4223
4223
  height: e.height - 10
4224
- }, [_("div", Xr, [_("div", {
4224
+ }, [_("div", Zr, [_("div", {
4225
4225
  class: "line-clamp-2 text-[13px] font-semibold leading-tight",
4226
- style: T({ color: z.value })
4227
- }, P(e.label), 5), e.detail ? (k(), h("div", {
4226
+ style: T({ color: B.value })
4227
+ }, F(e.label), 5), e.detail ? (k(), h("div", {
4228
4228
  key: 0,
4229
4229
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4230
- style: T({ color: be.value })
4231
- }, P(e.detail), 5)) : m("", !0)])], 8, Yr))], 8, Kr))), 128))
4232
- ], 12, Hr))])) : m("", !0)], 512),
4230
+ style: T({ color: ye.value })
4231
+ }, F(e.detail), 5)) : m("", !0)])], 8, Xr))], 8, qr))), 128))
4232
+ ], 12, Ur))])) : m("", !0)], 512),
4233
4233
  o.value.meta.footer ? (k(), h("footer", {
4234
4234
  key: 0,
4235
4235
  class: "mt-3 text-[11px] leading-snug",
4236
- style: T({ color: B.value })
4237
- }, P(o.value.meta.footer), 5)) : m("", !0)
4238
- ], 12, Cr)) : m("", !0);
4236
+ style: T({ color: H.value })
4237
+ }, F(o.value.meta.footer), 5)) : m("", !0)
4238
+ ], 12, wr)) : m("", !0);
4239
4239
  }
4240
- }), Qr = ["innerHTML"], $r = /* @__PURE__ */ x({
4240
+ }), $r = ["innerHTML"], ei = /* @__PURE__ */ x({
4241
4241
  __name: "ChatRichText",
4242
4242
  props: {
4243
4243
  text: {},
@@ -4245,7 +4245,7 @@ var Cr = [
4245
4245
  streaming: { type: Boolean }
4246
4246
  },
4247
4247
  setup(e) {
4248
- let t = e, n = j(t.text), r;
4248
+ let t = e, n = P(t.text), r;
4249
4249
  ce([() => t.text, () => t.streaming], ([e, i]) => {
4250
4250
  if (!i) {
4251
4251
  r !== void 0 && (cancelAnimationFrame(r), r = void 0), n.value = e;
@@ -4392,11 +4392,11 @@ var Cr = [
4392
4392
  return (t, n) => (k(), h("div", {
4393
4393
  class: "chat-msg-rich break-words text-[14px] leading-relaxed @sm/chat:text-[16px] @sm/chat:leading-relaxed",
4394
4394
  onErrorCapture: onRichTextAssetError
4395
- }, [(k(!0), h(u, null, A(o.value, (t) => (k(), h(u, { key: t.key }, [t.kind === "markdown" ? (k(), h("div", {
4395
+ }, [(k(!0), h(u, null, j(o.value, (t) => (k(), h(u, { key: t.key }, [t.kind === "markdown" ? (k(), h("div", {
4396
4396
  key: 0,
4397
4397
  class: C(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4398
4398
  innerHTML: t.html
4399
- }, null, 10, Qr)) : t.kind === "visual" ? (k(), p(Zr, {
4399
+ }, null, 10, $r)) : t.kind === "visual" ? (k(), p(Qr, {
4400
4400
  key: 1,
4401
4401
  result: t.result,
4402
4402
  inverted: e.inverted
@@ -4414,17 +4414,17 @@ var Cr = [
4414
4414
  style: { background: "currentcolor" }
4415
4415
  }, null, -1), v(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4416
4416
  }
4417
- }), ei = 80, ti = /* @__PURE__ */ x({
4417
+ }), ti = 80, ni = /* @__PURE__ */ x({
4418
4418
  __name: "ChatScroller",
4419
4419
  setup(e, { expose: t }) {
4420
- let n = ie(), r = ie(), i = ie(!0), a;
4420
+ let n = A(), r = A(), i = A(!0), a;
4421
4421
  function scrollToBottom() {
4422
4422
  let e = n.value;
4423
4423
  e && (e.scrollTop = e.scrollHeight);
4424
4424
  }
4425
4425
  function onScroll() {
4426
4426
  let e = n.value;
4427
- e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= ei);
4427
+ e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= ti);
4428
4428
  }
4429
4429
  function pin() {
4430
4430
  i.value = !0, scrollToBottom();
@@ -4446,30 +4446,30 @@ var Cr = [
4446
4446
  ref_key: "content",
4447
4447
  ref: r,
4448
4448
  class: "flex-1 flex flex-col"
4449
- }, [ae(e.$slots, "default")], 512)], 34));
4449
+ }, [ie(e.$slots, "default")], 512)], 34));
4450
4450
  }
4451
- }), ni = {
4451
+ }), ri = {
4452
4452
  key: 0,
4453
4453
  class: "pb-4"
4454
- }, ri = {
4454
+ }, ii = {
4455
4455
  key: 1,
4456
4456
  "data-test": "messaging-sdk-header",
4457
4457
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4458
- }, ii = { class: "min-w-0 flex-1" }, ai = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, oi = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, si = {
4458
+ }, ai = { class: "min-w-0 flex-1" }, oi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, si = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, ci = {
4459
4459
  key: 0,
4460
4460
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4461
- }, ci = {
4461
+ }, li = {
4462
4462
  key: 2,
4463
4463
  class: "flex flex-col items-center justify-center px-6 py-16 text-center",
4464
4464
  "data-test": "chat-offline"
4465
- }, li = {
4465
+ }, ui = {
4466
4466
  key: 0,
4467
4467
  "data-test": "messaging-empty-state",
4468
4468
  class: "flex flex-col items-center justify-center px-4"
4469
- }, ui = ["title"], di = {
4469
+ }, di = ["title"], fi = {
4470
4470
  key: 0,
4471
4471
  class: "flex items-center gap-3 py-3 px-2"
4472
- }, fi = ["data-journal-outcome"], pi = [
4472
+ }, pi = ["data-journal-outcome"], mi = [
4473
4473
  "data-message-id",
4474
4474
  "data-message-sender",
4475
4475
  "data-conversation-id",
@@ -4480,7 +4480,7 @@ var Cr = [
4480
4480
  "data-issue-action-label",
4481
4481
  "data-issue-action-url",
4482
4482
  "data-streaming"
4483
- ], mi = { class: "max-w-[85%] min-w-0" }, hi = ["href"], gi = [
4483
+ ], hi = { class: "max-w-[85%] min-w-0" }, gi = ["href"], _i = [
4484
4484
  "data-message-id",
4485
4485
  "data-message-sender",
4486
4486
  "data-conversation-id",
@@ -4489,7 +4489,7 @@ var Cr = [
4489
4489
  "data-issue-code",
4490
4490
  "data-issue-bucket",
4491
4491
  "data-streaming"
4492
- ], _i = [
4492
+ ], vi = [
4493
4493
  "data-test",
4494
4494
  "data-message-id",
4495
4495
  "data-message-sender",
@@ -4497,51 +4497,55 @@ var Cr = [
4497
4497
  "data-message-sequence",
4498
4498
  "data-system-kind",
4499
4499
  "data-streaming"
4500
- ], vi = ["src", "alt"], yi = ["src"], bi = ["href"], xi = {
4500
+ ], yi = ["src", "alt"], bi = ["src"], xi = ["href"], Si = {
4501
4501
  key: 0,
4502
4502
  "data-test": "messaging-message-text-part"
4503
- }, Si = [
4503
+ }, Ci = [
4504
4504
  "src",
4505
4505
  "alt",
4506
4506
  "data-attachment-placement"
4507
- ], Ci = ["src", "data-attachment-placement"], wi = ["href", "data-attachment-placement"], Ti = ["data-journal-outcome"], Ei = {
4507
+ ], wi = ["src", "data-attachment-placement"], Ti = ["href", "data-attachment-placement"], Ei = ["data-journal-outcome"], Di = {
4508
4508
  key: 2,
4509
4509
  "data-test": "messaging-tool-activity-tail",
4510
4510
  "aria-label": "Assistant is still working",
4511
4511
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4512
- }, Di = ["data-journal-outcome"], Oi = ["data-working-description"], ki = { class: "truncate" }, Ai = ["data-issue-code"], ji = ["href"], Mi = {
4512
+ }, Oi = ["data-journal-outcome"], ki = ["data-working-description"], Ai = { class: "truncate" }, ji = ["data-issue-code"], Mi = ["href"], Ni = {
4513
4513
  key: 3,
4514
4514
  "data-test": "messaging-thinking-indicator",
4515
4515
  class: "flex gap-2 justify-start items-center mb-4"
4516
- }, Ni = ["src", "alt"], Pi = { class: "max-w-20 truncate" }, Fi = ["onClick"], Ii = {
4516
+ }, Pi = ["src", "alt"], Fi = { class: "max-w-20 truncate" }, Ii = ["onClick"], Li = {
4517
4517
  key: 0,
4518
4518
  class: "shrink-0 flex items-center justify-center size-14"
4519
- }, Li = ["data-composer-action"], Ri = ["placeholder", "disabled"], zi = { class: "font-mono text-sm tabular-nums" }, Bi = { class: "mt-2.5 flex items-center" }, Vi = [
4519
+ }, Ri = ["data-composer-action"], zi = ["placeholder", "disabled"], Bi = { class: "font-mono text-sm tabular-nums" }, Vi = { class: "mt-2.5 flex items-center" }, Hi = [
4520
4520
  "disabled",
4521
4521
  "aria-label",
4522
4522
  "title"
4523
- ], Hi = {
4523
+ ], Ui = {
4524
4524
  key: 0,
4525
4525
  class: "i-svg-spinners-ring-resize size-5"
4526
- }, Ui = {
4526
+ }, Wi = {
4527
4527
  key: 1,
4528
4528
  class: "i-tabler-plus size-5"
4529
- }, Wi = { class: "sr-only" }, Gi = { class: "flex items-center gap-2" }, Ki = ["aria-label", "title"], qi = { class: "sr-only" }, Ji = [
4529
+ }, Gi = { class: "sr-only" }, Ki = { class: "flex items-center gap-2" }, qi = ["aria-label", "title"], Ji = { class: "sr-only" }, Yi = [
4530
4530
  "data-composer-action",
4531
4531
  "disabled",
4532
4532
  "aria-label",
4533
4533
  "title"
4534
- ], Yi = {
4534
+ ], Xi = {
4535
4535
  key: 0,
4536
4536
  class: "i-tabler-player-stop-filled size-3.5"
4537
- }, Xi = {
4537
+ }, Zi = {
4538
4538
  key: 1,
4539
4539
  class: "i-tabler-arrow-up size-[17px]"
4540
- }, Zi = { class: "sr-only" }, Qi = {
4540
+ }, Qi = { class: "sr-only" }, $i = {
4541
4541
  key: 2,
4542
4542
  "data-test": "messaging-suggested-prompts",
4543
4543
  class: "mt-5 w-full sm:mx-auto sm:max-w-[720px]"
4544
- }, $i = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ea = ["disabled", "onClick"], ta = 2500, na = /* @__PURE__ */ x({
4544
+ }, ea = { class: "flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center sm:justify-center" }, ta = [
4545
+ "disabled",
4546
+ "tabindex",
4547
+ "onClick"
4548
+ ], na = ["aria-expanded"], ra = 2500, ia = /* @__PURE__ */ x({
4545
4549
  __name: "ElAgentChat",
4546
4550
  props: {
4547
4551
  chatController: {},
@@ -4582,48 +4586,48 @@ var Cr = [
4582
4586
  }, n = f(() => {
4583
4587
  let n = { ...t[e.scope] };
4584
4588
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
4585
- }), r = ie(!1), i = ie(), a = ie(), o = ie();
4589
+ }), r = A(!1), i = A(), a = A(), o = A();
4586
4590
  function containsMarkdownLink(e) {
4587
4591
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
4588
4592
  }
4589
4593
  function isSystemExplainerMessage(e) {
4590
- return e.sender === "system" && (!!e.issue || e.id === U.value);
4594
+ return e.sender === "system" && (!!e.issue || e.id === Ce.value);
4591
4595
  }
4592
4596
  function isGroupEnd(e, t) {
4593
4597
  let n = e[t], r = e[t + 1];
4594
4598
  return !r || r.sender !== n.sender;
4595
4599
  }
4596
- let s = f(() => e.chatController?.textState.value), c = f(() => s.value?.isConnected ?? !1), x = f(() => s.value?.isThinking ?? !1), T = f(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), te = f(() => s.value?.connectionStatus !== "connected" && !s.value?.error), oe = ie(!1), j;
4600
+ let s = f(() => e.chatController?.textState.value), c = f(() => s.value?.isConnected ?? !1), x = f(() => s.value?.isThinking ?? !1), T = f(() => s.value?.connectionStatus === "disconnected" && !!s.value?.error), te = f(() => s.value?.connectionStatus !== "connected" && !s.value?.error), ae = A(!1), P;
4597
4601
  ce(T, (e) => {
4598
- if (clearTimeout(j), !e) {
4599
- oe.value = !1;
4602
+ if (clearTimeout(P), !e) {
4603
+ ae.value = !1;
4600
4604
  return;
4601
4605
  }
4602
- j = setTimeout(() => {
4603
- oe.value = !0;
4604
- }, ta);
4605
- }, { immediate: !0 }), re(() => clearTimeout(j));
4606
- let se = f(() => T.value && oe.value), pe = f(() => te.value || T.value && !oe.value);
4606
+ P = setTimeout(() => {
4607
+ ae.value = !0;
4608
+ }, ra);
4609
+ }, { immediate: !0 }), re(() => clearTimeout(P));
4610
+ let oe = f(() => T.value && ae.value), he = f(() => te.value || T.value && !ae.value), z = A(!1);
4607
4611
  async function retryConnection() {
4608
4612
  await e.chatController?.startTextConversation();
4609
4613
  }
4610
- let he = f(() => e.chatController?.liveTurnBlocks?.value ?? []), ve = f(() => {
4611
- for (let e = he.value.length - 1; e >= 0; e--) {
4612
- let t = he.value[e];
4614
+ let ve = f(() => e.chatController?.liveTurnBlocks?.value ?? []), B = f(() => {
4615
+ for (let e = ve.value.length - 1; e >= 0; e--) {
4616
+ let t = ve.value[e];
4613
4617
  if (t?.kind === "text") return t.id;
4614
4618
  }
4615
- }), ye = f(() => e.chatController?.liveStreamMessageId?.value), z = f(() => {
4619
+ }), ye = f(() => e.chatController?.liveStreamMessageId?.value), H = f(() => {
4616
4620
  let t = e.chatController?.sharedMessages.value ?? [];
4617
- return he.value.length && ye.value ? t.filter((e) => e.id !== ye.value) : t;
4621
+ return ve.value.length && ye.value ? t.filter((e) => e.id !== ye.value) : t;
4618
4622
  }), be = f(() => {
4619
4623
  if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
4620
- }), B = f(() => e.chatController?.workJournal?.value), Se = f(() => {
4621
- if (!B.value && !he.value.length) return;
4622
- let e = z.value, t = e[e.length - 1];
4624
+ }), U = f(() => e.chatController?.workJournal?.value), Se = f(() => {
4625
+ if (!U.value && !ve.value.length) return;
4626
+ let e = H.value, t = e[e.length - 1];
4623
4627
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
4624
- }), H = f(() => {
4628
+ }), W = f(() => {
4625
4629
  let t = {};
4626
- for (let n of z.value) {
4630
+ for (let n of H.value) {
4627
4631
  if (n.sender === "user" || !n.toolActivities?.length) continue;
4628
4632
  let r = e.chatController?.workJournalFor?.({
4629
4633
  activities: n.toolActivities,
@@ -4635,7 +4639,7 @@ var Cr = [
4635
4639
  return t;
4636
4640
  });
4637
4641
  function messageWorkJournal(e) {
4638
- return H.value[e.id];
4642
+ return W.value[e.id];
4639
4643
  }
4640
4644
  function inlineOffset(e, t) {
4641
4645
  return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
@@ -4683,37 +4687,37 @@ var Cr = [
4683
4687
  text: t.slice(i)
4684
4688
  }), r;
4685
4689
  }
4686
- let Ce = f(() => s.value?.transientIssue), U = f(() => {
4690
+ let G = f(() => s.value?.transientIssue), Ce = f(() => {
4687
4691
  if (!x.value) return;
4688
- let e = z.value, t = e[e.length - 1];
4692
+ let e = H.value, t = e[e.length - 1];
4689
4693
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
4690
- }), we = f(() => !x.value || be.value || B.value || he.value.length ? !1 : U.value === void 0), Te = f(() => s.value?.sendBlockedReason), Ee = f(() => !c.value || Te.value !== void 0), De = f(() => T.value ? "Agent is offline" : te.value ? "Connecting..." : Te.value === "agent_deleted" ? "This assistant was deleted" : Te.value === "account" ? "Open billing to keep chatting" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), Oe = f(() => e.chatController?.composerState?.value ?? {
4694
+ }), we = f(() => !x.value || be.value || U.value || ve.value.length ? !1 : Ce.value === void 0), Te = f(() => s.value?.sendBlockedReason), Ee = f(() => !c.value || Te.value !== void 0), De = f(() => T.value ? "Agent is offline" : te.value ? "Connecting..." : Te.value === "agent_deleted" ? "This assistant was deleted" : Te.value === "account" ? "Open billing to keep chatting" : `Message ${e.agent.displayName.value || e.agent.name.value || "assistant"}`), Oe = f(() => e.chatController?.composerState?.value ?? {
4691
4695
  text: "",
4692
4696
  pendingAttachments: [],
4693
4697
  isUploading: !1
4694
4698
  }), ke = f({
4695
4699
  get: () => Oe.value.text,
4696
4700
  set: (t) => e.chatController?.setComposerText?.({ text: t })
4697
- }), Ae = f(() => Oe.value.pendingAttachments), je = f(() => Oe.value.isUploading), W = f(() => e.chatController?.voiceRecorder), Me = f(() => W.value?.isBusy.value ?? !1), Ne = f(() => e.chatController?.canAttachFile?.value ?? !1), Fe = f(() => e.chatController?.canRecordAudio?.value ?? !1), Ie = f(() => e.chatController?.composerAction?.value ?? "idle"), Le = f(() => Ie.value !== "idle"), Re = f(() => Ie.value === "stop" ? "Stop reply" : "Send message"), Be = f(() => Fe.value && !Me.value && !!W.value?.canUseBrowserRecording), Ve = f(() => W.value?.isActive.value ?? !1), He = f(() => W.value?.elapsedLabel.value ?? "0:00"), Ue = f(() => W.value?.statusText.value ?? "Release to send"), We = f(() => W.value?.state.value.phase === "sending" ? "Sending voice message" : Ve.value ? "Release to send voice message" : "Hold to record voice message"), G = f(() => e.variant === "light"), Ge = f(() => G.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Ke = f(() => G.value ? "text-theme-300" : "text-white/30");
4701
+ }), Ae = f(() => Oe.value.pendingAttachments), je = f(() => Oe.value.isUploading), Me = f(() => e.chatController?.voiceRecorder), Ne = f(() => Me.value?.isBusy.value ?? !1), Fe = f(() => e.chatController?.canAttachFile?.value ?? !1), Ie = f(() => e.chatController?.canRecordAudio?.value ?? !1), Le = f(() => e.chatController?.composerAction?.value ?? "idle"), Re = f(() => Le.value !== "idle"), Be = f(() => Le.value === "stop" ? "Stop reply" : "Send message"), Ve = f(() => Ie.value && !Ne.value && !!Me.value?.canUseBrowserRecording), He = f(() => Me.value?.isActive.value ?? !1), Ue = f(() => Me.value?.elapsedLabel.value ?? "0:00"), We = f(() => Me.value?.statusText.value ?? "Release to send"), Ge = f(() => Me.value?.state.value.phase === "sending" ? "Sending voice message" : He.value ? "Release to send voice message" : "Hold to record voice message"), K = f(() => e.variant === "light"), Ke = f(() => K.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), Je = f(() => K.value ? "text-theme-300" : "text-white/30");
4698
4702
  ne(async () => {
4699
4703
  e.chatController && !c.value && await e.chatController.startTextConversation();
4700
4704
  }), re(() => {
4701
4705
  e.chatController?.voiceRecorder?.teardown();
4702
4706
  });
4703
4707
  async function sendMessage() {
4704
- !e.chatController || Ie.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4708
+ !e.chatController || Le.value !== "send" || (a.value && (a.value.style.height = "auto", a.value.focus()), i.value?.pin(), await e.chatController.sendComposerMessage());
4705
4709
  }
4706
4710
  async function sendSuggestedPrompt(t) {
4707
4711
  !e.chatController || Ee.value || (i.value?.pin(), await e.chatController.sendChatMessage(t.prompt));
4708
4712
  }
4709
4713
  async function handleComposerAction() {
4710
- e.chatController && (Ie.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4714
+ e.chatController && (Le.value === "send" && i.value?.pin(), await e.chatController.handleComposerAction());
4711
4715
  }
4712
4716
  async function handleKeydown(e) {
4713
4717
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
4714
4718
  }
4715
4719
  function focusComposer(e) {
4716
- Ve.value || Ee.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4720
+ He.value || Ee.value || e.target instanceof Element && e.target.closest("button, a, textarea") || a.value?.focus();
4717
4721
  }
4718
4722
  function adjustTextareaHeight() {
4719
4723
  a.value && (a.value.style.height = "auto", a.value.style.height = `${Math.min(a.value.scrollHeight, 150)}px`);
@@ -4724,16 +4728,16 @@ var Cr = [
4724
4728
  }
4725
4729
  async function handleFileSelect(t) {
4726
4730
  let n = t.target, r = n.files?.[0];
4727
- !r || !e.chatController || Me.value || (await e.chatController.attachFile({ file: r }), n.value = "");
4731
+ !r || !e.chatController || Ne.value || (await e.chatController.attachFile({ file: r }), n.value = "");
4728
4732
  }
4729
4733
  function removeAttachment(t) {
4730
4734
  e.chatController?.removeAttachment({ index: t });
4731
4735
  }
4732
4736
  function startRecording() {
4733
- W.value?.start();
4737
+ Me.value?.start();
4734
4738
  }
4735
4739
  function finishRecording(e) {
4736
- W.value?.finish(e);
4740
+ Me.value?.finish(e);
4737
4741
  }
4738
4742
  function shouldShowTimeDivider(e, t) {
4739
4743
  if (t === 0) {
@@ -4762,57 +4766,57 @@ var Cr = [
4762
4766
  ...o ? {} : { year: "numeric" }
4763
4767
  })}, ${a}`;
4764
4768
  }
4765
- return (t, s) => (k(), h("div", { class: C(["@container/chat relative flex h-full flex-col", z.value.length === 0 ? "justify-center" : ""]) }, [
4766
- e.showHeader && !G.value ? (k(), h("div", ni, [b(Pe, {
4769
+ return (t, s) => (k(), h("div", { class: C(["@container/chat relative flex h-full flex-col", H.value.length === 0 ? "justify-center" : ""]) }, [
4770
+ e.showHeader && !K.value ? (k(), h("div", ri, [b(Pe, {
4767
4771
  agent: e.agent,
4768
4772
  "is-online": c.value
4769
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (k(), h("div", ri, [_("div", { class: C(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
4773
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (k(), h("div", ii, [_("div", { class: C(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
4770
4774
  b(ze, {
4771
4775
  agent: e.agent,
4772
- "is-light": G.value,
4776
+ "is-light": K.value,
4773
4777
  class: "size-10"
4774
4778
  }, null, 8, ["agent", "is-light"]),
4775
- _("div", ii, [_("div", ai, P(e.agent.displayName.value), 1), _("div", oi, P(e.agent.title.value || "Assistant"), 1)]),
4776
- e.headerMeta ? (k(), h("span", si, P(e.headerMeta), 1)) : m("", !0)
4779
+ _("div", ai, [_("div", oi, F(e.agent.displayName.value), 1), _("div", si, F(e.agent.title.value || "Assistant"), 1)]),
4780
+ e.headerMeta ? (k(), h("span", ci, F(e.headerMeta), 1)) : m("", !0)
4777
4781
  ], 2)])) : m("", !0),
4778
- se.value ? (k(), h("div", ci, [
4779
- _("p", { class: C(["text-[15px] font-semibold", G.value ? "text-theme-900" : "text-white"]) }, " Can't reach " + P(e.agent?.displayName.value || "your assistant") + " right now ", 3),
4780
- _("p", { class: C(["mt-1.5 max-w-[340px] text-pretty text-[13.5px] leading-relaxed", G.value ? "text-theme-500" : "text-white/60"]) }, " Your messages are safe. This usually clears on its own. ", 2),
4782
+ oe.value ? (k(), h("div", li, [
4783
+ _("p", { class: C(["text-[15px] font-semibold", K.value ? "text-theme-900" : "text-white"]) }, " Can't reach " + F(e.agent?.displayName.value || "your assistant") + " right now ", 3),
4784
+ _("p", { class: C(["mt-1.5 max-w-[340px] text-pretty text-[13.5px] leading-relaxed", K.value ? "text-theme-500" : "text-white/60"]) }, " Your messages are safe. This usually clears on its own. ", 2),
4781
4785
  _("button", {
4782
4786
  type: "button",
4783
4787
  "data-test": "chat-offline-retry",
4784
- class: C(["mt-5 cursor-pointer rounded-full px-4 py-2 text-[13.5px] font-semibold transition-colors", G.value ? "text-theme-900 ring-1 ring-theme-200 hover:bg-theme-50" : "text-white ring-1 ring-white/20 hover:bg-white/10"]),
4788
+ class: C(["mt-5 cursor-pointer rounded-full px-4 py-2 text-[13.5px] font-semibold transition-colors", K.value ? "text-theme-900 ring-1 ring-theme-200 hover:bg-theme-50" : "text-white ring-1 ring-white/20 hover:bg-white/10"]),
4785
4789
  onClick: s[0] || (s[0] = (e) => retryConnection())
4786
4790
  }, " Try again ", 2)
4787
- ])) : pe.value ? (k(), h("div", {
4791
+ ])) : he.value ? (k(), h("div", {
4788
4792
  key: 3,
4789
- class: C(["py-16 flex flex-col items-center justify-center gap-2 text-sm", G.value ? "text-theme-400" : "text-theme-600"])
4793
+ class: C(["py-16 flex flex-col items-center justify-center gap-2 text-sm", K.value ? "text-theme-400" : "text-theme-600"])
4790
4794
  }, [b(_e, { class: "size-4" })], 2)) : e.setupHint ? (k(), h("div", {
4791
4795
  key: 4,
4792
- class: C(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Ke.value])
4793
- }, [s[20] || (s[20] = _("i", { class: "i-tabler-tool size-3" }, null, -1)), _("span", null, P(e.setupHint), 1)], 2)) : m("", !0),
4794
- b(ti, {
4796
+ class: C(["flex items-center justify-center gap-1.5 py-2 text-[11px]", Je.value])
4797
+ }, [s[21] || (s[21] = _("i", { class: "i-tabler-tool size-3" }, null, -1)), _("span", null, F(e.setupHint), 1)], 2)) : m("", !0),
4798
+ b(ni, {
4795
4799
  ref_key: "chatScroller",
4796
4800
  ref: i,
4797
- class: C(z.value.length === 0 ? "flex-none" : "flex-1")
4801
+ class: C(H.value.length === 0 ? "flex-none" : "flex-1")
4798
4802
  }, {
4799
- default: ue(() => [_("div", { class: C([z.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? "max-w-[720px] mx-auto w-full" : ""]) }, [
4800
- z.value.length === 0 && !pe.value && !se.value ? (k(), h("div", li, [ae(t.$slots, "empty-heading", {
4803
+ default: R(() => [_("div", { class: C([H.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : "pt-4 pb-[120px] px-3 space-y-2", e.centered ? "max-w-[720px] mx-auto w-full" : ""]) }, [
4804
+ H.value.length === 0 && !he.value && !oe.value ? (k(), h("div", ui, [ie(t.$slots, "empty-heading", {
4801
4805
  agent: e.agent,
4802
- isLight: G.value
4806
+ isLight: K.value
4803
4807
  }, () => [b(ze, {
4804
4808
  agent: e.agent,
4805
- "is-light": G.value,
4809
+ "is-light": K.value,
4806
4810
  class: "mb-4 size-20 @sm/chat:size-24"
4807
- }, null, 8, ["agent", "is-light"]), _("div", { class: C(["text-base @sm/chat:text-lg font-semibold", G.value ? "text-theme-900" : "text-white"]) }, P(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? m("", !0) : (k(), h(u, { key: 0 }, [_("p", { class: C(["mt-1 text-center text-xs @sm/chat:text-sm", Ke.value]) }, P(e.emptyStateMessage || "Type your message to get started."), 3), _("div", {
4808
- class: C(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", G.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4811
+ }, null, 8, ["agent", "is-light"]), _("div", { class: C(["text-base @sm/chat:text-lg font-semibold", K.value ? "text-theme-900" : "text-white"]) }, F(e.agent.displayName.value), 3)]), e.emptyStateMessage === "" ? m("", !0) : (k(), h(u, { key: 0 }, [_("p", { class: C(["mt-1 text-center text-xs @sm/chat:text-sm", Je.value]) }, F(e.emptyStateMessage || "Type your message to get started."), 3), _("div", {
4812
+ class: C(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", K.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
4809
4813
  title: n.value.tooltip
4810
- }, [_("i", { class: C([n.value.icon, "size-3"]) }, null, 2), _("span", null, P(n.value.label), 1)], 10, ui)], 64))])) : m("", !0),
4811
- (k(!0), h(u, null, A(z.value, (e, t) => (k(), h(u, { key: e.id }, [
4812
- shouldShowTimeDivider(z.value, t) ? (k(), h("div", di, [
4813
- _("div", { class: C(["flex-1 h-px", Ge.value]) }, null, 2),
4814
- _("span", { class: C(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Ke.value]) }, P(shouldShowTimeDivider(z.value, t)), 3),
4815
- _("div", { class: C(["flex-1 h-px", Ge.value]) }, null, 2)
4814
+ }, [_("i", { class: C([n.value.icon, "size-3"]) }, null, 2), _("span", null, F(n.value.label), 1)], 10, di)], 64))])) : m("", !0),
4815
+ (k(!0), h(u, null, j(H.value, (e, t) => (k(), h(u, { key: e.id }, [
4816
+ shouldShowTimeDivider(H.value, t) ? (k(), h("div", fi, [
4817
+ _("div", { class: C(["flex-1 h-px", Ke.value]) }, null, 2),
4818
+ _("span", { class: C(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", Je.value]) }, F(shouldShowTimeDivider(H.value, t)), 3),
4819
+ _("div", { class: C(["flex-1 h-px", Ke.value]) }, null, 2)
4816
4820
  ])) : m("", !0),
4817
4821
  messageWorkJournal(e) ? (k(), h("div", {
4818
4822
  key: 1,
@@ -4821,8 +4825,8 @@ var Cr = [
4821
4825
  class: "mb-4 w-full"
4822
4826
  }, [b(qe, {
4823
4827
  model: messageWorkJournal(e),
4824
- "is-light": G.value
4825
- }, null, 8, ["model", "is-light"])], 8, fi)) : m("", !0),
4828
+ "is-light": K.value
4829
+ }, null, 8, ["model", "is-light"])], 8, pi)) : m("", !0),
4826
4830
  isSystemExplainerMessage(e) ? (k(), h("div", {
4827
4831
  key: 2,
4828
4832
  "data-test": "messaging-system-msg",
@@ -4835,29 +4839,29 @@ var Cr = [
4835
4839
  "data-issue-bucket": e.issue?.bucket,
4836
4840
  "data-issue-action-label": e.issue?.actionLabel,
4837
4841
  "data-issue-action-url": e.issue?.actionUrl,
4838
- "data-streaming": e.id === U.value ? "true" : void 0,
4842
+ "data-streaming": e.id === Ce.value ? "true" : void 0,
4839
4843
  class: "flex gap-2 items-end justify-start mb-4"
4840
- }, [_("div", mi, [_("div", { class: C(["mb-1 pl-1 text-[11px] font-medium", G.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), _("div", { class: C(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", G.value ? "bg-theme-25 border-theme-100 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (k(), p($r, {
4844
+ }, [_("div", hi, [_("div", { class: C(["mb-1 pl-1 text-[11px] font-medium", K.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), _("div", { class: C(["rounded-[20px] rounded-bl-[4px] px-4 py-2.5 border system-msg-content", K.value ? "bg-theme-25 border-theme-100 text-theme-700" : "bg-white/[0.08] border-white/10 text-white/85"]) }, [e.text ? (k(), p(ei, {
4841
4845
  key: 0,
4842
4846
  text: e.text,
4843
- inverted: !G.value,
4844
- streaming: e.id === U.value,
4845
- onClick: s[1] || (s[1] = R(() => {}, ["stop"]))
4847
+ inverted: !K.value,
4848
+ streaming: e.id === Ce.value,
4849
+ onClick: s[1] || (s[1] = pe(() => {}, ["stop"]))
4846
4850
  }, null, 8, [
4847
4851
  "text",
4848
4852
  "inverted",
4849
4853
  "streaming"
4850
- ])) : e.issue?.help ? (k(), p($r, {
4854
+ ])) : e.issue?.help ? (k(), p(ei, {
4851
4855
  key: 1,
4852
4856
  text: e.issue.help,
4853
- inverted: !G.value
4857
+ inverted: !K.value
4854
4858
  }, null, 8, ["text", "inverted"])) : m("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (k(), h("a", {
4855
4859
  key: 2,
4856
4860
  href: e.issue.actionUrl,
4857
4861
  "data-test": "messaging-system-msg-action",
4858
- class: C(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", G.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4859
- onClick: s[2] || (s[2] = R(() => {}, ["stop"]))
4860
- }, [v(P(e.issue.actionLabel) + " ", 1), s[21] || (s[21] = _("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, hi)) : m("", !0)], 2)])], 8, pi)) : e.sender === "system" ? (k(), h("div", {
4862
+ class: C(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", K.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
4863
+ onClick: s[2] || (s[2] = pe(() => {}, ["stop"]))
4864
+ }, [v(F(e.issue.actionLabel) + " ", 1), s[22] || (s[22] = _("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, gi)) : m("", !0)], 2)])], 8, mi)) : e.sender === "system" ? (k(), h("div", {
4861
4865
  key: 3,
4862
4866
  "data-test": "messaging-system-status-msg",
4863
4867
  "data-message-id": e.id,
@@ -4867,13 +4871,13 @@ var Cr = [
4867
4871
  "data-system-kind": e.systemKind,
4868
4872
  "data-issue-code": e.issue?.code,
4869
4873
  "data-issue-bucket": e.issue?.bucket,
4870
- "data-streaming": e.id === U.value ? "true" : void 0,
4871
- class: C(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", G.value ? "text-theme-500" : "text-white/60"])
4872
- }, [s[22] || (s[22] = _("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b($r, {
4874
+ "data-streaming": e.id === Ce.value ? "true" : void 0,
4875
+ class: C(["flex items-start gap-2 px-3 py-2 text-[13px] leading-relaxed", K.value ? "text-theme-500" : "text-white/60"])
4876
+ }, [s[23] || (s[23] = _("i", { class: "i-tabler-info-circle size-4 mt-0.5 shrink-0" }, null, -1)), b(ei, {
4873
4877
  text: e.text,
4874
- inverted: !G.value,
4875
- onClick: s[3] || (s[3] = R(() => {}, ["stop"]))
4876
- }, null, 8, ["text", "inverted"])], 10, gi)) : (k(), h("div", {
4878
+ inverted: !K.value,
4879
+ onClick: s[3] || (s[3] = pe(() => {}, ["stop"]))
4880
+ }, null, 8, ["text", "inverted"])], 10, _i)) : (k(), h("div", {
4877
4881
  key: 4,
4878
4882
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
4879
4883
  "data-message-id": e.id,
@@ -4881,11 +4885,11 @@ var Cr = [
4881
4885
  "data-conversation-id": e.conversationId,
4882
4886
  "data-message-sequence": e.sequence,
4883
4887
  "data-system-kind": e.systemKind,
4884
- "data-streaming": e.id === U.value ? "true" : void 0,
4888
+ "data-streaming": e.id === Ce.value ? "true" : void 0,
4885
4889
  class: C(["flex gap-2 items-end", {
4886
4890
  "justify-end": e.sender === "user",
4887
4891
  "justify-start": e.sender === "agent",
4888
- "mb-6": isGroupEnd(z.value, t)
4892
+ "mb-6": isGroupEnd(H.value, t)
4889
4893
  }])
4890
4894
  }, [_("div", {
4891
4895
  "data-test": "messaging-message-body",
@@ -4893,37 +4897,37 @@ var Cr = [
4893
4897
  }, [blockAttachmentsForMessage(e).length ? (k(), h("div", {
4894
4898
  key: 0,
4895
4899
  class: C(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
4896
- }, [(k(!0), h(u, null, A(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (k(), h(u, { key: attachmentKey(e, t) }, [e.type === "image" ? (k(), h("img", {
4900
+ }, [(k(!0), h(u, null, j(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (k(), h(u, { key: attachmentKey(e, t) }, [e.type === "image" ? (k(), h("img", {
4897
4901
  key: 0,
4898
4902
  src: e.src,
4899
4903
  alt: e.filename,
4900
4904
  "data-test": "messaging-attachment",
4901
4905
  "data-attachment-placement": "block",
4902
4906
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4903
- }, null, 8, vi)) : e.type === "audio" ? (k(), h("audio", {
4907
+ }, null, 8, yi)) : e.type === "audio" ? (k(), h("audio", {
4904
4908
  key: 1,
4905
4909
  src: e.src,
4906
4910
  controls: "",
4907
4911
  "data-test": "messaging-attachment",
4908
4912
  "data-attachment-placement": "block",
4909
4913
  class: "max-w-full"
4910
- }, null, 8, yi)) : (k(), h("a", {
4914
+ }, null, 8, bi)) : (k(), h("a", {
4911
4915
  key: 2,
4912
4916
  href: e.src,
4913
4917
  target: "_blank",
4914
4918
  rel: "noopener",
4915
4919
  "data-test": "messaging-attachment",
4916
4920
  "data-attachment-placement": "block",
4917
- class: C(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", G.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4918
- }, [s[23] || (s[23] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + P(e.filename), 1)], 10, bi))], 64))), 128))], 2)) : m("", !0), messageRenderParts(e).length ? (k(), h("div", {
4921
+ class: C(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4922
+ }, [s[24] || (s[24] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(e.filename), 1)], 10, xi))], 64))), 128))], 2)) : m("", !0), messageRenderParts(e).length ? (k(), h("div", {
4919
4923
  key: 1,
4920
4924
  "data-test": "messaging-message-content",
4921
- class: C(e.sender === "user" ? G.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : G.value ? "text-theme-800" : "text-white/95")
4922
- }, [(k(!0), h(u, null, A(messageRenderParts(e), (t) => (k(), h(u, { key: t.key }, [t.kind === "text" && t.text ? (k(), h("div", xi, [b($r, {
4925
+ class: C(e.sender === "user" ? K.value ? "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-900 text-theme-0 shadow-[0_1px_2px_rgba(5,15,25,0.14)]" : "rounded-[20px] rounded-br-[4px] px-4 py-2.5 bg-theme-0 text-theme-950" : K.value ? "text-theme-800" : "text-white/95")
4926
+ }, [(k(!0), h(u, null, j(messageRenderParts(e), (t) => (k(), h(u, { key: t.key }, [t.kind === "text" && t.text ? (k(), h("div", Si, [b(ei, {
4923
4927
  text: t.text,
4924
- inverted: e.sender === "user" || !G.value,
4925
- streaming: e.id === U.value,
4926
- onClick: s[4] || (s[4] = R(() => {}, ["stop"]))
4928
+ inverted: e.sender === "user" || !K.value,
4929
+ streaming: e.id === Ce.value,
4930
+ onClick: s[4] || (s[4] = pe(() => {}, ["stop"]))
4927
4931
  }, null, 8, [
4928
4932
  "text",
4929
4933
  "inverted",
@@ -4935,107 +4939,107 @@ var Cr = [
4935
4939
  "data-test": "messaging-attachment",
4936
4940
  "data-attachment-placement": t.placement,
4937
4941
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
4938
- }, null, 8, Si)) : t.kind === "attachment" && t.attachment.type === "audio" ? (k(), h("audio", {
4942
+ }, null, 8, Ci)) : t.kind === "attachment" && t.attachment.type === "audio" ? (k(), h("audio", {
4939
4943
  key: 2,
4940
4944
  src: t.attachment.src,
4941
4945
  controls: "",
4942
4946
  "data-test": "messaging-attachment",
4943
4947
  "data-attachment-placement": t.placement,
4944
4948
  class: "my-2 max-w-full"
4945
- }, null, 8, Ci)) : t.kind === "attachment" ? (k(), h("a", {
4949
+ }, null, 8, wi)) : t.kind === "attachment" ? (k(), h("a", {
4946
4950
  key: 3,
4947
4951
  href: t.attachment.src,
4948
4952
  target: "_blank",
4949
4953
  rel: "noopener",
4950
4954
  "data-test": "messaging-attachment",
4951
4955
  "data-attachment-placement": t.placement,
4952
- class: C(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", G.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4953
- }, [s[24] || (s[24] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + P(t.attachment.filename), 1)], 10, wi)) : m("", !0)], 64))), 128))], 2)) : m("", !0)], 2)], 10, _i)),
4954
- e.id === Se.value ? (k(), h(u, { key: 5 }, [he.value.length ? (k(!0), h(u, { key: 0 }, A(he.value, (e) => (k(), h(u, { key: e.id }, [e.kind === "work" ? (k(), h("div", {
4956
+ class: C(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", K.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
4957
+ }, [s[25] || (s[25] = _("i", { class: "i-tabler-file size-3.5" }, null, -1)), v(" " + F(t.attachment.filename), 1)], 10, Ti)) : m("", !0)], 64))), 128))], 2)) : m("", !0)], 2)], 10, vi)),
4958
+ e.id === Se.value ? (k(), h(u, { key: 5 }, [ve.value.length ? (k(!0), h(u, { key: 0 }, j(ve.value, (e) => (k(), h(u, { key: e.id }, [e.kind === "work" ? (k(), h("div", {
4955
4959
  key: 0,
4956
4960
  "data-test": "messaging-tool-activity",
4957
4961
  "data-journal-outcome": e.journal.outcome,
4958
4962
  class: "mb-4 w-full"
4959
4963
  }, [b(qe, {
4960
4964
  model: e.journal,
4961
- "is-light": G.value
4962
- }, null, 8, ["model", "is-light"])], 8, Ti)) : e.kind === "text" && e.content ? (k(), h("div", {
4965
+ "is-light": K.value
4966
+ }, null, 8, ["model", "is-light"])], 8, Ei)) : e.kind === "text" && e.content ? (k(), h("div", {
4963
4967
  key: 1,
4964
4968
  "data-test": "messaging-live-text-block",
4965
- class: C(["mb-4 @sm/chat:pr-[1em]", G.value ? "text-theme-800" : "text-white/95"])
4966
- }, [b($r, {
4969
+ class: C(["mb-4 @sm/chat:pr-[1em]", K.value ? "text-theme-800" : "text-white/95"])
4970
+ }, [b(ei, {
4967
4971
  text: e.content,
4968
- inverted: !G.value,
4969
- streaming: e.id === ve.value,
4970
- onClick: s[5] || (s[5] = R(() => {}, ["stop"]))
4972
+ inverted: !K.value,
4973
+ streaming: e.id === B.value,
4974
+ onClick: s[5] || (s[5] = pe(() => {}, ["stop"]))
4971
4975
  }, null, 8, [
4972
4976
  "text",
4973
4977
  "inverted",
4974
4978
  "streaming"
4975
- ])], 2)) : (k(), h("div", Ei, [b(_e, { class: C(["size-3.5", G.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : B.value ? (k(), h("div", {
4979
+ ])], 2)) : (k(), h("div", Di, [b(_e, { class: C(["size-3.5", K.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : U.value ? (k(), h("div", {
4976
4980
  key: 1,
4977
4981
  "data-test": "messaging-tool-activity",
4978
- "data-journal-outcome": B.value.outcome,
4982
+ "data-journal-outcome": U.value.outcome,
4979
4983
  class: "mb-4 w-full"
4980
4984
  }, [b(qe, {
4981
- model: B.value,
4982
- "is-light": G.value
4983
- }, null, 8, ["model", "is-light"])], 8, Di)) : m("", !0)], 64)) : m("", !0)
4985
+ model: U.value,
4986
+ "is-light": K.value
4987
+ }, null, 8, ["model", "is-light"])], 8, Oi)) : m("", !0)], 64)) : m("", !0)
4984
4988
  ], 64))), 128)),
4985
4989
  be.value ? (k(), h("div", {
4986
4990
  key: 1,
4987
4991
  "data-test": "messaging-working-state",
4988
4992
  "data-working-description": be.value,
4989
- class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", G.value ? "text-theme-500" : "text-white/45"])
4990
- }, [s[25] || (s[25] = _("i", {
4993
+ class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-none", K.value ? "text-theme-500" : "text-white/45"])
4994
+ }, [s[26] || (s[26] = _("i", {
4991
4995
  class: "i-tabler-loader-2 size-3.5 shrink-0 animate-spin opacity-70",
4992
4996
  "aria-hidden": "true"
4993
- }, null, -1)), _("span", ki, P(be.value), 1)], 10, Oi)) : m("", !0),
4994
- Ce.value ? (k(), h("div", {
4997
+ }, null, -1)), _("span", Ai, F(be.value), 1)], 10, ki)) : m("", !0),
4998
+ G.value ? (k(), h("div", {
4995
4999
  key: 2,
4996
5000
  "data-test": "messaging-transient-issue",
4997
- "data-issue-code": Ce.value.code,
4998
- class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", G.value ? "text-theme-600" : "text-white/60"])
5001
+ "data-issue-code": G.value.code,
5002
+ class: C(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", K.value ? "text-theme-600" : "text-white/60"])
4999
5003
  }, [
5000
- s[26] || (s[26] = _("i", {
5004
+ s[27] || (s[27] = _("i", {
5001
5005
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5002
5006
  "aria-hidden": "true"
5003
5007
  }, null, -1)),
5004
- _("span", null, [v(P(Ce.value.message), 1), Ce.value.help ? (k(), h(u, { key: 0 }, [v(P(Ce.value.help), 1)], 64)) : m("", !0)]),
5005
- Ce.value.actionUrl && Ce.value.actionLabel ? (k(), h("a", {
5008
+ _("span", null, [v(F(G.value.message), 1), G.value.help ? (k(), h(u, { key: 0 }, [v(F(G.value.help), 1)], 64)) : m("", !0)]),
5009
+ G.value.actionUrl && G.value.actionLabel ? (k(), h("a", {
5006
5010
  key: 0,
5007
- href: Ce.value.actionUrl,
5011
+ href: G.value.actionUrl,
5008
5012
  class: "shrink-0 underline underline-offset-2",
5009
- onClick: s[6] || (s[6] = R(() => {}, ["stop"]))
5010
- }, P(Ce.value.actionLabel), 9, ji)) : m("", !0)
5011
- ], 10, Ai)) : m("", !0),
5012
- we.value ? (k(), h("div", Mi, [_("i", {
5013
- class: C(["i-svg-spinners-3-dots-bounce size-7", G.value ? "text-theme-400" : "text-white/50"]),
5013
+ onClick: s[6] || (s[6] = pe(() => {}, ["stop"]))
5014
+ }, F(G.value.actionLabel), 9, Mi)) : m("", !0)
5015
+ ], 10, ji)) : m("", !0),
5016
+ we.value ? (k(), h("div", Ni, [_("i", {
5017
+ class: C(["i-svg-spinners-3-dots-bounce size-7", K.value ? "text-theme-400" : "text-white/50"]),
5014
5018
  "aria-hidden": "true"
5015
5019
  }, null, 2)])) : m("", !0)
5016
5020
  ], 2)]),
5017
5021
  _: 3
5018
5022
  }, 8, ["class"]),
5019
- _("div", { class: C(["left-0 right-0 z-30 px-5 pb-4 pt-3", [z.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", G.value ? "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"]]) }, [
5023
+ _("div", { class: C(["left-0 right-0 z-30 px-5 pb-4 pt-3", [H.value.length === 0 ? "relative shrink-0" : "absolute bottom-0", K.value ? "bg-gradient-to-t from-theme-0/90 via-theme-0/55 to-transparent" : "bg-gradient-to-t from-black/90 via-black/60 to-transparent"]]) }, [
5020
5024
  Ae.value.length > 0 ? (k(), h("div", {
5021
5025
  key: 0,
5022
5026
  class: C(["flex items-center gap-2 px-2 pb-2 overflow-x-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e.centered ? "max-w-[720px] mx-auto" : ""])
5023
- }, [(k(!0), h(u, null, A(Ae.value, (e, t) => (k(), h("div", {
5027
+ }, [(k(!0), h(u, null, j(Ae.value, (e, t) => (k(), h("div", {
5024
5028
  key: t,
5025
5029
  class: "relative shrink-0 group"
5026
5030
  }, [e.type === "image" ? (k(), h("img", {
5027
5031
  key: 0,
5028
5032
  src: e.src,
5029
5033
  alt: e.filename,
5030
- class: C(["size-14 rounded-xl object-cover border", G.value ? "border-black/10" : "border-white/20"])
5031
- }, null, 10, Ni)) : (k(), h("div", {
5034
+ class: C(["size-14 rounded-xl object-cover border", K.value ? "border-black/10" : "border-white/20"])
5035
+ }, null, 10, Pi)) : (k(), h("div", {
5032
5036
  key: 1,
5033
- class: C(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", G.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5034
- }, [s[27] || (s[27] = _("i", { class: "i-tabler-file size-4" }, null, -1)), _("span", Pi, P(e.filename), 1)], 2)), _("button", {
5037
+ class: C(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", K.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5038
+ }, [s[28] || (s[28] = _("i", { class: "i-tabler-file size-4" }, null, -1)), _("span", Fi, F(e.filename), 1)], 2)), _("button", {
5035
5039
  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",
5036
5040
  onClick: (e) => removeAttachment(t)
5037
- }, [...s[28] || (s[28] = [_("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Fi)]))), 128)), je.value ? (k(), h("div", Ii, [b(_e, { class: "size-5" })])) : m("", !0)], 2)) : m("", !0),
5038
- Ne.value ? (k(), h("input", {
5041
+ }, [...s[29] || (s[29] = [_("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Ii)]))), 128)), je.value ? (k(), h("div", Li, [b(_e, { class: "size-5" })])) : m("", !0)], 2)) : m("", !0),
5042
+ Fe.value ? (k(), h("input", {
5039
5043
  key: 1,
5040
5044
  ref_key: "fileInput",
5041
5045
  ref: o,
@@ -5046,18 +5050,18 @@ var Cr = [
5046
5050
  }, null, 544)) : m("", !0),
5047
5051
  _("div", {
5048
5052
  "data-test": "messaging-composer",
5049
- "data-composer-action": Ie.value,
5050
- class: C(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", G.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
5053
+ "data-composer-action": Le.value,
5054
+ class: C(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? "max-w-[720px] mx-auto" : "", K.value ? r.value ? "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-300" : "bg-white shadow-[0_1px_2px_rgba(15,23,42,0.05),0_8px_24px_rgba(15,23,42,0.05)] ring-1 ring-theme-200 hover:ring-theme-300" : r.value ? "bg-white/15 backdrop-blur-xl ring-1 ring-white/25" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25"]]),
5051
5055
  onClick: focusComposer
5052
- }, [Ve.value ? (k(), h("div", {
5056
+ }, [He.value ? (k(), h("div", {
5053
5057
  key: 1,
5054
5058
  "data-test": "messaging-recording-state",
5055
- class: C(["flex min-w-0 items-center gap-2 py-1", G.value ? "text-theme-700" : "text-white/80"])
5059
+ class: C(["flex min-w-0 items-center gap-2 py-1", K.value ? "text-theme-700" : "text-white/80"])
5056
5060
  }, [
5057
- s[29] || (s[29] = _("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5058
- _("span", zi, P(He.value), 1),
5059
- _("span", { class: C(["min-w-0 truncate text-sm", G.value ? "text-theme-400" : "text-white/45"]) }, P(Ue.value), 3)
5060
- ], 2)) : I((k(), h("textarea", {
5061
+ s[30] || (s[30] = _("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5062
+ _("span", Bi, F(Ue.value), 1),
5063
+ _("span", { class: C(["min-w-0 truncate text-sm", K.value ? "text-theme-400" : "text-white/45"]) }, F(We.value), 3)
5064
+ ], 2)) : ue((k(), h("textarea", {
5061
5065
  key: 0,
5062
5066
  ref_key: "textarea",
5063
5067
  ref: a,
@@ -5071,70 +5075,78 @@ var Cr = [
5071
5075
  fontSize: "16px",
5072
5076
  resize: "none"
5073
5077
  },
5074
- class: C(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", G.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5078
+ class: C(["block w-full bg-transparent leading-snug focus:outline-none disabled:opacity-50 overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", K.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5075
5079
  onKeydown: handleKeydown,
5076
5080
  onFocus: s[8] || (s[8] = (e) => r.value = !0),
5077
5081
  onBlur: s[9] || (s[9] = (e) => r.value = !1)
5078
- }, null, 42, Ri)), [[F, ke.value]]), _("div", Bi, [
5082
+ }, null, 42, zi)), [[I, ke.value]]), _("div", Vi, [
5079
5083
  _("button", {
5080
5084
  class: C(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70", [
5081
- Ne.value ? "cursor-pointer" : "cursor-default",
5082
- G.value ? "text-theme-500" : "text-white/50",
5083
- je.value || Me.value ? "opacity-50 pointer-events-none" : ""
5085
+ Fe.value ? "cursor-pointer" : "cursor-default",
5086
+ K.value ? "text-theme-500" : "text-white/50",
5087
+ je.value || Ne.value ? "opacity-50 pointer-events-none" : ""
5084
5088
  ]]),
5085
- disabled: Ee.value || je.value || Me.value || !Ne.value,
5086
- "aria-label": Ne.value ? "Attach file" : "File attachments unavailable",
5087
- title: Ne.value ? "Attach file" : "File attachments unavailable",
5088
- onClick: s[10] || (s[10] = (e) => Ne.value && triggerFileInput())
5089
- }, [je.value ? (k(), h("i", Hi)) : (k(), h("i", Ui)), _("span", Wi, P(Ne.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Vi),
5090
- s[30] || (s[30] = _("div", { class: "flex-1" }, null, -1)),
5091
- _("div", Gi, [Be.value || Ve.value ? (k(), h("button", {
5089
+ disabled: Ee.value || je.value || Ne.value || !Fe.value,
5090
+ "aria-label": Fe.value ? "Attach file" : "File attachments unavailable",
5091
+ title: Fe.value ? "Attach file" : "File attachments unavailable",
5092
+ onClick: s[10] || (s[10] = (e) => Fe.value && triggerFileInput())
5093
+ }, [je.value ? (k(), h("i", Ui)) : (k(), h("i", Wi)), _("span", Gi, F(Fe.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Hi),
5094
+ s[31] || (s[31] = _("div", { class: "flex-1" }, null, -1)),
5095
+ _("div", Ki, [Ve.value || He.value ? (k(), h("button", {
5092
5096
  key: 0,
5093
5097
  "data-test": "messaging-record-audio-btn",
5094
- class: C(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", Ve.value ? G.value ? "text-theme-900 scale-110" : "text-white scale-110" : G.value ? "text-theme-500" : "text-white/60"]),
5095
- "aria-label": We.value,
5096
- title: We.value,
5097
- onPointerdown: s[11] || (s[11] = R((e) => startRecording(), ["prevent"])),
5098
- onPointerup: s[12] || (s[12] = R((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5099
- onPointercancel: s[13] || (s[13] = R((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5098
+ class: C(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70", He.value ? K.value ? "text-theme-900 scale-110" : "text-white scale-110" : K.value ? "text-theme-500" : "text-white/60"]),
5099
+ "aria-label": Ge.value,
5100
+ title: Ge.value,
5101
+ onPointerdown: s[11] || (s[11] = pe((e) => startRecording(), ["prevent"])),
5102
+ onPointerup: s[12] || (s[12] = pe((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5103
+ onPointercancel: s[13] || (s[13] = pe((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5100
5104
  onKeydown: [
5101
- s[14] || (s[14] = de(R((e) => startRecording(), ["prevent"]), ["enter"])),
5102
- s[16] || (s[16] = de(R((e) => startRecording(), ["prevent"]), ["space"])),
5103
- s[18] || (s[18] = de(R((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5105
+ s[14] || (s[14] = de(pe((e) => startRecording(), ["prevent"]), ["enter"])),
5106
+ s[16] || (s[16] = de(pe((e) => startRecording(), ["prevent"]), ["space"])),
5107
+ s[18] || (s[18] = de(pe((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5104
5108
  ],
5105
- onKeyup: [s[15] || (s[15] = de(R((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[17] || (s[17] = de(R((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5106
- }, [_("i", { class: C([Ve.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), _("span", qi, P(We.value), 1)], 42, Ki)) : m("", !0), Ve.value ? m("", !0) : (k(), h("button", {
5109
+ onKeyup: [s[15] || (s[15] = de(pe((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), s[17] || (s[17] = de(pe((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5110
+ }, [_("i", { class: C([He.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), _("span", Ji, F(Ge.value), 1)], 42, qi)) : m("", !0), He.value ? m("", !0) : (k(), h("button", {
5107
5111
  key: 1,
5108
5112
  "data-test": "messaging-send-btn",
5109
- "data-composer-action": Ie.value,
5110
- class: C(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Le.value ? G.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : G.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5111
- disabled: !Le.value,
5112
- "aria-label": Re.value,
5113
- title: Re.value,
5113
+ "data-composer-action": Le.value,
5114
+ class: C(["flex size-8 items-center justify-center rounded-full transition-colors duration-150", Re.value ? K.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800 cursor-pointer" : "bg-theme-0 text-theme-950 hover:bg-theme-100 cursor-pointer" : K.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5115
+ disabled: !Re.value,
5116
+ "aria-label": Be.value,
5117
+ title: Be.value,
5114
5118
  onClick: s[19] || (s[19] = (e) => handleComposerAction())
5115
- }, [Ie.value === "stop" ? (k(), h("i", Yi)) : (k(), h("i", Xi)), _("span", Zi, P(Re.value), 1)], 10, Ji))])
5116
- ])], 10, Li),
5117
- z.value.length === 0 && e.suggestedPrompts.length > 0 ? (k(), h("div", Qi, [_("div", $i, [(k(!0), h(u, null, A(e.suggestedPrompts, (e) => (k(), h("button", {
5119
+ }, [Le.value === "stop" ? (k(), h("i", Xi)) : (k(), h("i", Zi)), _("span", Qi, F(Be.value), 1)], 10, Yi))])
5120
+ ])], 10, Ri),
5121
+ H.value.length === 0 && e.suggestedPrompts.length > 0 ? (k(), h("div", $i, [_("div", ea, [(k(!0), h(u, null, j(e.suggestedPrompts, (e, t) => ue((k(), h("button", {
5118
5122
  key: e.id,
5119
5123
  type: "button",
5120
5124
  disabled: Ee.value,
5125
+ tabindex: z.value || t < 3 ? void 0 : -1,
5121
5126
  "data-test": "messaging-suggested-prompt",
5122
5127
  class: C(["w-full rounded-2xl bg-theme-50 px-4 py-3 text-left text-[14.5px] font-medium transition-colors sm:w-auto sm:rounded-full sm:py-2 sm:text-center sm:text-[14px]", Ee.value ? "cursor-not-allowed text-theme-300" : "cursor-pointer text-theme-600 hover:bg-theme-100 hover:text-theme-900"]),
5123
5128
  onClick: (t) => sendSuggestedPrompt(e)
5124
- }, P(e.label), 11, ea))), 128))])])) : m("", !0)
5129
+ }, F(e.label), 11, ta)), [[se, z.value || t < 3]])), 128)), e.suggestedPrompts.length > 3 ? (k(), h("button", {
5130
+ key: 0,
5131
+ type: "button",
5132
+ "data-test": "messaging-suggested-prompts-more",
5133
+ "aria-expanded": z.value,
5134
+ class: C(["flex w-full cursor-pointer items-center gap-2 px-4 py-2.5 text-[13.5px] font-medium transition-colors sm:w-auto", z.value ? "text-theme-300 hover:text-theme-600" : "text-theme-400 hover:text-theme-900"]),
5135
+ onClick: s[20] || (s[20] = (e) => z.value = !z.value)
5136
+ }, [s[32] || (s[32] = _("i", { class: "i-tabler-dots size-4 shrink-0" }, null, -1)), v(" " + F(z.value ? "See less" : "See more"), 1)], 10, na)) : m("", !0)])])) : m("", !0)
5125
5137
  ], 2)
5126
5138
  ], 2));
5127
5139
  }
5128
- }), ra = { class: "agent-wrap" }, ia = {
5140
+ }), aa = { class: "agent-wrap" }, oa = {
5129
5141
  key: 0,
5130
5142
  class: "flex items-center justify-center h-full"
5131
- }, aa = {
5143
+ }, sa = {
5132
5144
  key: 2,
5133
5145
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5134
5146
  role: "status",
5135
5147
  "aria-live": "polite",
5136
5148
  "data-test": "agent-unavailable"
5137
- }, oa = /* @__PURE__ */ x({
5149
+ }, ca = /* @__PURE__ */ x({
5138
5150
  __name: "AgentWrap",
5139
5151
  props: {
5140
5152
  sdk: {},
@@ -5154,7 +5166,7 @@ var Cr = [
5154
5166
  let r = a("AgentWrap"), i = e, o = i.sdk || t.getInstance({
5155
5167
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5156
5168
  ...i.apiBase && { apiBase: i.apiBase }
5157
- }), s = j(!i.agent), c = j(i.agent ? new n({ config: i.agent }) : void 0), u = j();
5169
+ }), s = P(!i.agent), c = P(i.agent ? new n({ config: i.agent }) : void 0), u = P();
5158
5170
  async function loadAgent() {
5159
5171
  if (i.agent) {
5160
5172
  r.debug("Agent provided via props, skipping fetch", {
@@ -5230,15 +5242,15 @@ var Cr = [
5230
5242
  });
5231
5243
  }
5232
5244
  }
5233
- return ne(loadAgent), (t, n) => (k(), h("div", ra, [s.value ? (k(), h("div", ia, [_("div", { class: C(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ae(t.$slots, "default", {
5234
- sdk: se(o),
5245
+ return ne(loadAgent), (t, n) => (k(), h("div", aa, [s.value ? (k(), h("div", oa, [_("div", { class: C(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ie(t.$slots, "default", {
5246
+ sdk: oe(o),
5235
5247
  agent: c.value,
5236
5248
  context: e.clientContext ?? e.context,
5237
5249
  firstMessage: e.firstMessage,
5238
5250
  buttonText: e.buttonText,
5239
5251
  buttonIcon: e.buttonIcon,
5240
5252
  loading: s.value
5241
- }, void 0, void 0, 1) : u.value ? (k(), h("div", aa, [n[0] || (n[0] = _("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), _("button", {
5253
+ }, void 0, void 0, 1) : u.value ? (k(), h("div", sa, [n[0] || (n[0] = _("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), _("button", {
5242
5254
  type: "button",
5243
5255
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5244
5256
  "data-test": "agent-unavailable-retry",
@@ -5247,6 +5259,6 @@ var Cr = [
5247
5259
  }
5248
5260
  });
5249
5261
  //#endregion
5250
- export { ke as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, na as n, De as o, n as p, $r as r, Te as s, oa as t, parseButtonTemplate as u };
5262
+ export { Oe as a, getAgentAvatarUrl as c, AgentChatController as d, ve as f, Pe as i, handleImageError as l, _e as m, ia as n, Ee as o, n as p, ei as r, we as s, ca as t, parseButtonTemplate as u };
5251
5263
 
5252
5264
  //# sourceMappingURL=AgentWrap.js.map