@pagelines/sdk 1.0.837 → 1.0.838

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,7 +1,7 @@
1
- import { n as e } from "./rolldown-runtime.js";
1
+ import { t as e } from "./rolldown-runtime.js";
2
2
  import { s as t, t as n } from "./sdkClient.js";
3
3
  import { Agent as r, CHAT_ISSUE_COPY as i, CUSTOMER_AGENT_STATE_LABEL as a, SettingsObject as o, createLogger as s, customerAgentState as c, getDefaultAvatarUrl as u, isAssistantSilenceControl as f, parseChatCardFencePayload as p, parseChatVisualFencePayload as m } from "@pagelines/core";
4
- import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as ne, onMounted as re, onUnmounted as ie, openBlock as P, ref as F, renderList as I, renderSlot as ae, resolveDynamicComponent as R, shallowRef as B, toDisplayString as H, unref as oe, useTemplateRef as se, vModelText as ce, watch as ue, withCtx as de, withDirectives as pe, withKeys as he, withModifiers as U } from "vue";
4
+ import { Fragment as h, Transition as _, computed as v, createBlock as te, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createTextVNode as C, createVNode as T, defineComponent as k, nextTick as A, normalizeClass as j, normalizeStyle as M, onBeforeUnmount as P, onMounted as ne, onUnmounted as re, openBlock as F, ref as I, renderList as R, renderSlot as ie, resolveDynamicComponent as B, shallowRef as H, toDisplayString as U, unref as ae, useTemplateRef as oe, vModelText as se, watch as ce, withCtx as ue, withDirectives as de, withKeys as pe, withModifiers as he } from "vue";
5
5
  //#region ui/FSpinner.vue?vue&type=script&setup=true&lang.ts
6
6
  var _e = { class: "spinner max-w-sm" }, W = {
7
7
  class: "ring-circular h-full w-full origin-center",
@@ -19,7 +19,7 @@ var _e = { class: "spinner max-w-sm" }, W = {
19
19
  }
20
20
  },
21
21
  setup(e) {
22
- return (t, n) => (P(), x("div", _e, [(P(), x("svg", W, [S("circle", {
22
+ return (t, n) => (F(), x("div", _e, [(F(), x("svg", W, [S("circle", {
23
23
  class: j([e.colorMode, "ring-path"]),
24
24
  cx: "50",
25
25
  cy: "50",
@@ -68,9 +68,9 @@ function recorderMimeType() {
68
68
  "audio/webm"
69
69
  ].find((e) => MediaRecorder.isTypeSupported?.(e)) || "";
70
70
  }
71
- var VoiceRecorderController = class extends o {
71
+ var ye = 400, VoiceRecorderController = class extends o {
72
72
  constructor(e) {
73
- super("VoiceRecorderController", e), t(this, "state", F({
73
+ super("VoiceRecorderController", e), t(this, "state", I({
74
74
  phase: "idle",
75
75
  elapsedMs: 0
76
76
  })), t(this, "isActive", v(() => this.state.value.phase !== "idle")), t(this, "isBusy", v(() => this.state.value.phase !== "idle")), t(this, "elapsedLabel", v(() => formatVoiceRecordingDuration({ ms: this.state.value.elapsedMs }))), t(this, "statusText", v(() => this.state.value.phase === "preparing" ? "Starting microphone" : this.state.value.phase === "sending" ? "Sending voice message" : "Release to send")), t(this, "recorder", void 0), t(this, "stream", void 0), t(this, "chunks", []), t(this, "timer", void 0), t(this, "startedAt", 0), t(this, "cancelOnStop", !1), t(this, "stopAfterStart", !1), t(this, "startToken", 0);
@@ -102,8 +102,8 @@ var VoiceRecorderController = class extends o {
102
102
  this.stream = t, this.recorder = r, this.chunks = [], r.addEventListener("dataavailable", (e) => {
103
103
  e.data.size > 0 && this.chunks.push(e.data);
104
104
  }), r.addEventListener("stop", async () => {
105
- let e = new Blob(this.chunks, { type: r.mimeType || n || "audio/webm" }), t = !this.cancelOnStop && e.size > 0;
106
- if (this.stopCapture(), !t) {
105
+ let e = new Blob(this.chunks, { type: r.mimeType || n || "audio/webm" }), t = this.now() - this.startedAt, i = !this.cancelOnStop && e.size > 0 && t >= ye;
106
+ if (this.stopCapture(), !i) {
107
107
  this.reset();
108
108
  return;
109
109
  }
@@ -185,15 +185,15 @@ var VoiceRecorderController = class extends o {
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 = {
189
- waiting: "Waiting for results",
188
+ var K = {
190
189
  finishing: "Finishing up",
190
+ slowHint: "Taking longer than usual.",
191
191
  completed: "Work complete",
192
192
  failed: "Couldn’t finish",
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
- }, K = 15e3, be = 6e4, Se = 3;
196
+ }, be = 1e4, Se = 15e3, Ce = 6e4, we = 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 <= K) {
212
+ if (t === "done" && n?.tone === "done" && n.label === e.label && eventMs(e) - n.lastMs <= Se) {
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 <= Se ? {
233
+ return e.length <= we ? {
234
234
  visibleRows: e,
235
235
  hiddenRows: []
236
236
  } : {
237
- visibleRows: e.slice(e.length - Se),
238
- hiddenRows: e.slice(0, e.length - Se)
237
+ visibleRows: e.slice(e.length - we),
238
+ hiddenRows: e.slice(0, e.length - we)
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: K.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: K.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: K.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 + K, _ = (Number.isFinite(m) ? m : p) + be, v = r >= h, te = u || v ? {
285
+ }, Infinity), h = p + be, _ = (Number.isFinite(m) ? m : p) + Ce, v = r >= h, te = 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, b = v && r >= _ ? i ? ye.notifyHint : ye.leaveHint : void 0, x = [h, _].filter((e) => e > r).sort((e, t) => e - t)[0];
288
+ label: u?.label ?? K.finishing
289
+ } : void 0, b = v ? r >= _ ? i ? K.notifyHint : K.leaveHint : K.slowHint : void 0, x = [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 Ce = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), we = /* @__PURE__ */ new Set([
356
- ...Ce,
355
+ var Te = /* @__PURE__ */ new Set(["CREDIT_LIMIT", "OVERAGE_CAP"]), Ee = /* @__PURE__ */ new Set([
356
+ ...Te,
357
357
  "EMPTY_STREAM",
358
358
  "RATE_LIMIT"
359
- ]), Te = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Ee = {
359
+ ]), De = /* @__PURE__ */ new Set(["agent_deleted", "AGENT_DELETED"]), Oe = {
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 || we.has(e.code))) return { surface: "hard" };
365
- let t = e.bucket ?? (Ce.has(e.code) ? "account" : "error"), n = {
364
+ if (!(e.bucket !== void 0 || Ee.has(e.code))) return { surface: "hard" };
365
+ let t = e.bucket ?? (Te.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
- } : Te.has(e.code) ? {
378
+ } : De.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 = Ee[e.code];
396
+ let t = Oe[e.code];
397
397
  return t ? i[t].oneLine : e.error;
398
398
  }
399
399
  var AgentChatController = class extends o {
@@ -424,12 +424,12 @@ var AgentChatController = class extends o {
424
424
  super("AgentChatController", e), t(this, "isTextMode", !1), t(this, "lastMessage", {
425
425
  hash: "",
426
426
  time: 0
427
- }), t(this, "isConnecting", !1), t(this, "turnEpoch", 0), t(this, "nextStreamToken", 0), t(this, "runningStreamToken", void 0), t(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), t(this, "queuedMessageIdSet", F(/* @__PURE__ */ new Set())), t(this, "queuedMessageIds", v(() => this.queuedMessageIdSet.value)), t(this, "boundaryTimer", void 0), t(this, "nowMs", B(Date.now())), t(this, "toolActivityTiming", B({})), t(this, "lastVisibleProgressAtMs", B()), t(this, "liveSegments", B([])), t(this, "liveStreamMessageId", B(void 0)), t(this, "conversationId", void 0), t(this, "textState", F({
427
+ }), t(this, "isConnecting", !1), t(this, "turnEpoch", 0), t(this, "nextStreamToken", 0), t(this, "runningStreamToken", void 0), t(this, "suppressedStreamTokens", /* @__PURE__ */ new Set()), t(this, "queuedMessageIdSet", I(/* @__PURE__ */ new Set())), t(this, "queuedMessageIds", v(() => this.queuedMessageIdSet.value)), t(this, "boundaryTimer", void 0), t(this, "nowMs", H(Date.now())), t(this, "toolActivityTiming", H({})), t(this, "lastVisibleProgressAtMs", H()), t(this, "liveSegments", H([])), t(this, "liveStreamMessageId", H(void 0)), t(this, "conversationId", void 0), t(this, "textState", I({
428
428
  isActive: !1,
429
429
  isConnected: !1,
430
430
  isThinking: !1,
431
431
  connectionStatus: "disconnected"
432
- })), t(this, "agentMode", F("self")), t(this, "sharedMessages", F([])), t(this, "composerState", F({
432
+ })), t(this, "agentMode", I("self")), t(this, "sharedMessages", I([])), t(this, "composerState", I({
433
433
  text: "",
434
434
  pendingAttachments: [],
435
435
  isUploading: !1
@@ -613,7 +613,7 @@ Current User:
613
613
  });
614
614
  }
615
615
  setupBoundaryWatcher() {
616
- ue(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
616
+ ce(() => this.workJournal.value?.nextBoundaryAtMs, (e) => {
617
617
  this.scheduleBoundary(e);
618
618
  });
619
619
  }
@@ -675,12 +675,12 @@ Current User:
675
675
  });
676
676
  }
677
677
  setupModeWatcher() {
678
- ue(this.agentMode, async (e, t) => {
678
+ ce(this.agentMode, async (e, t) => {
679
679
  this.logger.info(`Mode changed from ${t} to ${e}`), this.isTextMode && (t === "talk" || t === "chat") && await this.endConversation();
680
680
  });
681
681
  }
682
682
  setupAvailabilityWatcher() {
683
- ue(() => [this.chatEnabled, this._agent.state.value.lifecycle], ([e]) => {
683
+ ce(() => [this.chatEnabled, this._agent.state.value.lifecycle], ([e]) => {
684
684
  if (!(!this.isTextMode || this.isConnecting)) {
685
685
  if (e) {
686
686
  this.textState.value.isConnected || this.updateState(this.textState, {
@@ -826,7 +826,7 @@ Current User:
826
826
  let e = i[i.length - 1];
827
827
  this.sharedMessages.value = e?.id === u ? [...i.slice(0, -1), r] : [...i, r];
828
828
  }
829
- r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && Te.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
829
+ r.sender === "system" && r.issue?.bucket === "account" ? this.updateState(this.textState, { sendBlockedReason: "account" }) : r.sender === "system" && r.issue?.code && De.has(r.issue.code) && this.updateState(this.textState, { sendBlockedReason: "agent_deleted" });
830
830
  }, onDone = (e) => {
831
831
  if (!isCurrentTurn()) return;
832
832
  if (!p && !m) {
@@ -989,10 +989,10 @@ function parseButtonTemplate(e) {
989
989
  }
990
990
  //#endregion
991
991
  //#region agent/ui/ElAgentButton.vue?vue&type=script&setup=true&lang.ts
992
- var De = {
992
+ var ke = {
993
993
  key: 0,
994
994
  class: "absolute inset-0 flex items-center justify-center"
995
- }, Oe = /* @__PURE__ */ k({
995
+ }, Ae = /* @__PURE__ */ k({
996
996
  __name: "ElAgentButton",
997
997
  props: {
998
998
  theme: { default: "primary" },
@@ -1020,25 +1020,25 @@ var De = {
1020
1020
  md: "size-4",
1021
1021
  lg: "size-5"
1022
1022
  })[e.size]);
1023
- return (i, a) => (P(), x("button", { class: j(["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 ? (P(), x("div", De, [...a[0] || (a[0] = [S("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : b("", !0), S("span", { class: j(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1024
- e.icon ? (P(), x("i", {
1023
+ return (i, a) => (F(), x("button", { class: j(["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 ? (F(), x("div", ke, [...a[0] || (a[0] = [S("i", { class: "i-svg-spinners-90-ring-with-bg size-5" }, null, -1)])])) : b("", !0), S("span", { class: j(["flex items-center gap-2 transition-opacity duration-200", e.loading ? "opacity-0" : "opacity-100"]) }, [
1024
+ e.icon ? (F(), x("i", {
1025
1025
  key: 0,
1026
1026
  class: j([e.icon, r.value])
1027
1027
  }, null, 2)) : b("", !0),
1028
- ae(i.$slots, "default"),
1029
- e.iconAfter ? (P(), x("i", {
1028
+ ie(i.$slots, "default"),
1029
+ e.iconAfter ? (F(), x("i", {
1030
1030
  key: 1,
1031
1031
  class: j([e.iconAfter, r.value])
1032
1032
  }, null, 2)) : b("", !0)
1033
1033
  ], 2)], 2));
1034
1034
  }
1035
- }), ke = ["value"], Ae = /* @__PURE__ */ k({
1035
+ }), je = ["value"], Me = /* @__PURE__ */ k({
1036
1036
  __name: "AgentInputEmail",
1037
1037
  props: { modelValue: { default: "" } },
1038
1038
  emits: ["update:modelValue"],
1039
1039
  setup(e, { emit: t }) {
1040
1040
  let n = t;
1041
- return (t, r) => (P(), x("input", {
1041
+ return (t, r) => (F(), x("input", {
1042
1042
  name: "username",
1043
1043
  type: "email",
1044
1044
  inputmode: "email",
@@ -1051,9 +1051,9 @@ var De = {
1051
1051
  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",
1052
1052
  style: { "font-size": "16px" },
1053
1053
  onInput: r[0] || (r[0] = (e) => n("update:modelValue", e.target.value))
1054
- }, null, 40, ke));
1054
+ }, null, 40, je));
1055
1055
  }
1056
- }), je = ["placeholder", "value"], Me = /* @__PURE__ */ k({
1056
+ }), Ne = ["placeholder", "value"], Pe = /* @__PURE__ */ k({
1057
1057
  __name: "AgentInputOneTimeCode",
1058
1058
  props: {
1059
1059
  modelValue: {},
@@ -1062,15 +1062,15 @@ var De = {
1062
1062
  },
1063
1063
  emits: ["update:modelValue", "autoSubmit"],
1064
1064
  setup(e, { emit: t }) {
1065
- let n = e, r = t, i = F(null), a = v(() => "0".repeat(n.length));
1066
- re(() => {
1065
+ let n = e, r = t, i = I(null), a = v(() => "0".repeat(n.length));
1066
+ ne(() => {
1067
1067
  n.focusFirst && !("ontouchstart" in window) && i.value?.focus();
1068
1068
  });
1069
1069
  function onInput(e) {
1070
1070
  let t = e.target.value.replace(/\D/g, "").slice(0, n.length);
1071
1071
  r("update:modelValue", t), t.length === n.length && r("autoSubmit", t);
1072
1072
  }
1073
- return (t, n) => (P(), x("input", {
1073
+ return (t, n) => (F(), x("input", {
1074
1074
  ref_key: "input",
1075
1075
  ref: i,
1076
1076
  name: "one-time-code",
@@ -1086,12 +1086,12 @@ var De = {
1086
1086
  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",
1087
1087
  style: { "font-size": "16px" },
1088
1088
  onInput
1089
- }, null, 40, je));
1089
+ }, null, 40, Ne));
1090
1090
  }
1091
- }), Ne = { class: "relative flex-shrink-0" }, Pe = ["src", "alt"], Fe = { class: "absolute top-1 right-1" }, Ie = {
1091
+ }), Fe = { class: "relative flex-shrink-0" }, Ie = ["src", "alt"], Le = { class: "absolute top-1 right-1" }, Re = {
1092
1092
  key: 1,
1093
1093
  class: "size-3 bg-theme-400 rounded-full ring-2 ring-white"
1094
- }, Le = { class: "min-w-0" }, Re = /* @__PURE__ */ k({
1094
+ }, ze = { class: "min-w-0" }, Be = /* @__PURE__ */ k({
1095
1095
  __name: "ElModeHeader",
1096
1096
  props: {
1097
1097
  agent: {},
@@ -1103,17 +1103,17 @@ var De = {
1103
1103
  layout: { default: "centered" }
1104
1104
  },
1105
1105
  setup(e) {
1106
- return (t, n) => (P(), x("div", { class: j(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [S("div", Ne, [S("div", { class: j(["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"]) }, [S("img", {
1106
+ return (t, n) => (F(), x("div", { class: j(["flex gap-4", [e.layout === "centered" ? "flex-col items-center text-center" : "flex-row items-center justify-center"]]) }, [S("div", Fe, [S("div", { class: j(["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"]) }, [S("img", {
1107
1107
  src: e.agent.avatarUrl.value,
1108
1108
  alt: e.agent.displayName.value,
1109
1109
  class: "w-full h-full object-cover",
1110
- onError: n[0] || (n[0] = (...e) => oe(handleImageError) && oe(handleImageError)(...e))
1111
- }, null, 40, Pe)], 2), S("div", Fe, [e.isOnline ? (P(), x(h, { key: 0 }, [n[1] || (n[1] = S("div", {
1110
+ onError: n[0] || (n[0] = (...e) => ae(handleImageError) && ae(handleImageError)(...e))
1111
+ }, null, 40, Ie)], 2), S("div", Le, [e.isOnline ? (F(), x(h, { key: 0 }, [n[1] || (n[1] = S("div", {
1112
1112
  class: "size-3 bg-green-500 rounded-full ring-2 ring-white absolute animate-ping",
1113
1113
  style: { "animation-duration": "3s" }
1114
- }, null, -1)), n[2] || (n[2] = S("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (P(), x("div", Ie))])]), S("div", Le, [S("h1", { class: j(["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" : ""]]) }, H(e.agent.displayName.value), 3), S("p", { class: j(["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"]]) }, H(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1114
+ }, null, -1)), n[2] || (n[2] = S("div", { class: "size-3 bg-green-500 rounded-full ring-2 ring-white" }, null, -1))], 64)) : (F(), x("div", Re))])]), S("div", ze, [S("h1", { class: j(["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" : ""]]) }, U(e.agent.displayName.value), 3), S("p", { class: j(["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"]]) }, U(e.layout === "horizontal" ? e.agent.title.value || "Assistant" : e.agent.title.value), 3)])], 2));
1115
1115
  }
1116
- }), ze = { class: "relative shrink-0 rounded-full" }, Be = ["src", "alt"], Ve = ["src", "alt"], He = ["aria-label"], Ue = /* @__PURE__ */ k({
1116
+ }), Ve = { class: "relative shrink-0 rounded-full" }, He = ["src", "alt"], Ue = ["src", "alt"], We = ["aria-label"], Ge = /* @__PURE__ */ k({
1117
1117
  __name: "AgentAvatar",
1118
1118
  props: {
1119
1119
  agent: {},
@@ -1145,26 +1145,26 @@ var De = {
1145
1145
  top: "calc(14.6% - clamp(3.5px, 7%, 7px))",
1146
1146
  right: "calc(14.6% - clamp(3.5px, 7%, 7px))"
1147
1147
  }, i = v(() => e.isLight ? "ring-white" : "ring-theme-900");
1148
- return (t, a) => (P(), x("div", ze, [
1148
+ return (t, a) => (F(), x("div", Ve, [
1149
1149
  S("img", {
1150
1150
  src: e.agent.avatarUrl.value,
1151
1151
  alt: e.agent.displayName.value,
1152
1152
  class: j(["size-full rounded-full object-cover ring-1", e.isLight ? "ring-black/5" : "ring-white/10"])
1153
- }, null, 10, Be),
1154
- e.showOwnerMark && e.agent.ownerMarkUrl.value ? (P(), x("img", {
1153
+ }, null, 10, He),
1154
+ e.showOwnerMark && e.agent.ownerMarkUrl.value ? (F(), x("img", {
1155
1155
  key: 0,
1156
1156
  src: e.agent.ownerMarkUrl.value,
1157
1157
  alt: e.agent.owner.value?.fullName ? `Owned by ${e.agent.owner.value.fullName}` : "Owner",
1158
1158
  class: j(["absolute z-10 size-[36%] -bottom-[3%] -left-[3%] rounded-full object-cover ring-2", i.value])
1159
- }, null, 10, Ve)) : b("", !0),
1160
- n.value ? (P(), x("span", {
1159
+ }, null, 10, Ue)) : b("", !0),
1160
+ n.value ? (F(), x("span", {
1161
1161
  key: 1,
1162
1162
  role: "status",
1163
1163
  "aria-label": e.agent.state.value.tooltip,
1164
1164
  class: j(["absolute z-10 rounded-full ring-2", [n.value, i.value]]),
1165
1165
  style: r
1166
- }, null, 10, He)) : b("", !0),
1167
- n.value && e.agent.state.value.lifecycle === "running" ? (P(), x("span", {
1166
+ }, null, 10, We)) : b("", !0),
1167
+ n.value && e.agent.state.value.lifecycle === "running" ? (F(), x("span", {
1168
1168
  key: 2,
1169
1169
  "aria-hidden": "true",
1170
1170
  class: j(["pointer-events-none absolute rounded-full animate-ping opacity-50 [animation-duration:3s]", n.value]),
@@ -1172,28 +1172,28 @@ var De = {
1172
1172
  }, null, 2)) : b("", !0)
1173
1173
  ]));
1174
1174
  }
1175
- }), We = {
1175
+ }), Ke = {
1176
1176
  key: 0,
1177
1177
  class: "sr-only",
1178
1178
  role: "status",
1179
1179
  "aria-live": "polite"
1180
- }, Ge = ["aria-expanded", "disabled"], Ke = ["aria-expanded"], qe = {
1180
+ }, qe = ["aria-expanded", "disabled"], Je = ["aria-expanded"], Ye = {
1181
1181
  class: "flex w-5 shrink-0 justify-center self-stretch",
1182
1182
  "aria-hidden": "true"
1183
- }, Je = ["data-journal-row"], Ye = {
1183
+ }, Xe = ["data-journal-row"], Ze = {
1184
1184
  class: "flex w-5 shrink-0 flex-col items-center self-stretch",
1185
1185
  "aria-hidden": "true"
1186
- }, Xe = { class: "flex h-[17px] shrink-0 items-center" }, Ze = {
1186
+ }, Qe = { class: "flex h-[17px] shrink-0 items-center" }, q = {
1187
1187
  key: 0,
1188
1188
  class: "sr-only"
1189
- }, Qe = /* @__PURE__ */ k({
1189
+ }, $e = /* @__PURE__ */ k({
1190
1190
  __name: "AgentToolActivityGroup",
1191
1191
  props: {
1192
1192
  model: {},
1193
1193
  isLight: { type: Boolean }
1194
1194
  },
1195
1195
  setup(e) {
1196
- let t = e, n = B(!1);
1196
+ let t = e, n = H(!1);
1197
1197
  function toggle() {
1198
1198
  n.value = !n.value;
1199
1199
  }
@@ -1208,7 +1208,7 @@ var De = {
1208
1208
  spine: "bg-theme-200",
1209
1209
  dashed: "border-theme-300",
1210
1210
  doneMark: "text-theme-400",
1211
- activeSpinner: "border-theme-300 border-t-theme-900",
1211
+ activeLine: "text-theme-900",
1212
1212
  stoppedSquare: "bg-theme-500",
1213
1213
  muted: "text-theme-500",
1214
1214
  ring: "focus-visible:ring-theme-900"
@@ -1216,7 +1216,7 @@ var De = {
1216
1216
  spine: "bg-white/15",
1217
1217
  dashed: "border-white/25",
1218
1218
  doneMark: "text-white/45",
1219
- activeSpinner: "border-white/25 border-t-white",
1219
+ activeLine: "text-white",
1220
1220
  stoppedSquare: "bg-white/55",
1221
1221
  muted: "text-white/55",
1222
1222
  ring: "focus-visible:ring-white"
@@ -1236,7 +1236,7 @@ var De = {
1236
1236
  label: e ? "text-[13px] font-medium text-theme-900" : "text-[13px] font-medium text-white",
1237
1237
  station: {
1238
1238
  tag: "span",
1239
- class: `size-3.5 animate-spin rounded-full border-[1.5px] motion-reduce:animate-none ${s.value.activeSpinner}`
1239
+ class: `pageline-stroke pageline-stroke--mini h-[1.5px] w-3 rounded-full ${s.value.activeLine}`
1240
1240
  }
1241
1241
  },
1242
1242
  failed: {
@@ -1263,9 +1263,9 @@ var De = {
1263
1263
  }
1264
1264
  };
1265
1265
  });
1266
- return (t, u) => (P(), x("div", { class: j(["w-full py-0.5", s.value.muted]) }, [
1267
- a.value ? (P(), x("span", We, H(a.value), 1)) : b("", !0),
1268
- r.value ? (P(), x("button", {
1266
+ return (t, u) => (F(), x("div", { class: j(["w-full py-0.5", s.value.muted]) }, [
1267
+ a.value ? (F(), x("span", Ke, U(a.value), 1)) : b("", !0),
1268
+ r.value ? (F(), x("button", {
1269
1269
  key: 1,
1270
1270
  type: "button",
1271
1271
  "data-test": "messaging-tool-activity-summary",
@@ -1280,13 +1280,13 @@ var De = {
1280
1280
  class: "i-tabler-circle-check size-3.5 shrink-0 text-green-600",
1281
1281
  "aria-hidden": "true"
1282
1282
  }, null, -1)),
1283
- S("span", { class: j(["text-[12.5px] font-medium leading-none", s.value.muted]) }, H(e.model.terminal?.label), 3),
1284
- i.value ? (P(), x("i", {
1283
+ S("span", { class: j(["text-[12.5px] font-medium leading-none", s.value.muted]) }, U(e.model.terminal?.label), 3),
1284
+ i.value ? (F(), x("i", {
1285
1285
  key: 0,
1286
1286
  class: j(["size-[13px] shrink-0", [n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right", s.value.muted]]),
1287
1287
  "aria-hidden": "true"
1288
1288
  }, null, 2)) : b("", !0)
1289
- ], 10, Ge)) : i.value ? (P(), x("button", {
1289
+ ], 10, qe)) : i.value ? (F(), x("button", {
1290
1290
  key: 2,
1291
1291
  type: "button",
1292
1292
  "data-test": "messaging-tool-activity-summary",
@@ -1294,33 +1294,33 @@ var De = {
1294
1294
  "aria-expanded": n.value,
1295
1295
  class: j(["flex min-h-11 w-full gap-x-2.5 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", s.value.ring]),
1296
1296
  onClick: toggle
1297
- }, [S("span", qe, [S("span", {
1297
+ }, [S("span", Ye, [S("span", {
1298
1298
  "data-journal-spine": "dashed",
1299
1299
  class: j(["w-0 border-l border-dashed", s.value.dashed])
1300
- }, null, 2)]), S("span", { class: j(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [C(H(i.value) + " earlier updates ", 1), S("i", {
1300
+ }, null, 2)]), S("span", { class: j(["flex min-h-[20px] items-center gap-0.5 pb-2 text-[12px] leading-none", s.value.muted]) }, [C(U(i.value) + " earlier updates ", 1), S("i", {
1301
1301
  class: j(["size-3 shrink-0", n.value ? "i-tabler-chevron-down" : "i-tabler-chevron-right"]),
1302
1302
  "aria-hidden": "true"
1303
- }, null, 2)], 2)], 10, Ke)) : b("", !0),
1304
- (P(!0), x(h, null, I(o.value, (e, t) => (P(), x("div", {
1303
+ }, null, 2)], 2)], 10, Je)) : b("", !0),
1304
+ (F(!0), x(h, null, R(o.value, (e, t) => (F(), x("div", {
1305
1305
  key: e.id,
1306
1306
  "data-test": "messaging-tool-activity-row",
1307
1307
  "data-journal-row": e.tone,
1308
1308
  class: j([r.value ? "pl-[22px]" : "", "flex gap-x-2.5"])
1309
- }, [S("div", Ye, [S("span", Xe, [(P(), te(R(c.value[e.tone].station.tag), {
1309
+ }, [S("div", Ze, [S("span", Qe, [(F(), te(B(c.value[e.tone].station.tag), {
1310
1310
  "data-journal-station": e.tone,
1311
1311
  class: j(c.value[e.tone].station.class)
1312
- }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? b("", !0) : (P(), x("span", {
1312
+ }, null, 8, ["data-journal-station", "class"]))]), t === o.value.length - 1 ? b("", !0) : (F(), x("span", {
1313
1313
  key: 0,
1314
1314
  class: j(["w-px flex-1", s.value.spine])
1315
- }, null, 2))]), S("div", { class: j(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [S("span", { class: j(["relative block leading-snug", c.value[e.tone].label]) }, [C(H(e.label), 1), c.value[e.tone].statusWord ? (P(), x("span", Ze, ", " + H(c.value[e.tone].statusWord), 1)) : b("", !0)], 2), e.note ? (P(), x("p", {
1315
+ }, null, 2))]), S("div", { class: j(["min-w-0 flex-1", t === o.value.length - 1 ? "" : "pb-2"]) }, [S("span", { class: j(["relative block leading-snug", c.value[e.tone].label]) }, [C(U(e.label), 1), c.value[e.tone].statusWord ? (F(), x("span", q, ", " + U(c.value[e.tone].statusWord), 1)) : b("", !0)], 2), e.note ? (F(), x("p", {
1316
1316
  key: 0,
1317
1317
  class: j(["pt-0.5 text-[11.5px] leading-snug", s.value.muted])
1318
- }, H(e.note), 3)) : b("", !0)], 2)], 10, Je))), 128)),
1319
- !r.value && e.model.hint ? (P(), x("p", {
1318
+ }, U(e.note), 3)) : b("", !0)], 2)], 10, Xe))), 128)),
1319
+ !r.value && e.model.hint ? (F(), x("p", {
1320
1320
  key: 3,
1321
1321
  "data-test": "messaging-tool-activity-hint",
1322
1322
  class: j(["pl-[30px] pt-2.5 text-[12px] leading-snug", s.value.muted])
1323
- }, H(e.model.hint), 3)) : b("", !0)
1323
+ }, U(e.model.hint), 3)) : b("", !0)
1324
1324
  ], 2));
1325
1325
  }
1326
1326
  });
@@ -1365,10 +1365,10 @@ function _unsupportedIterableToArray(e, t) {
1365
1365
  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;
1366
1366
  }
1367
1367
  }
1368
- var $e = Object.entries, et = Object.setPrototypeOf, tt = Object.isFrozen, q = Object.getPrototypeOf, nt = Object.getOwnPropertyDescriptor, J = Object.freeze, rt = Object.seal, it = Object.create, at = typeof Reflect < "u" && Reflect, st = at.apply, ct = at.construct;
1368
+ var et = Object.entries, tt = Object.setPrototypeOf, nt = Object.isFrozen, rt = Object.getPrototypeOf, it = Object.getOwnPropertyDescriptor, J = Object.freeze, X = Object.seal, at = Object.create, Z = typeof Reflect < "u" && Reflect, st = Z.apply, ct = Z.construct;
1369
1369
  J || (J = function freeze(e) {
1370
1370
  return e;
1371
- }), rt || (rt = function seal(e) {
1371
+ }), X || (X = function seal(e) {
1372
1372
  return e;
1373
1373
  }), st || (st = function apply(e, t) {
1374
1374
  var n = [...arguments].slice(2);
@@ -1376,7 +1376,7 @@ J || (J = function freeze(e) {
1376
1376
  }), ct || (ct = function construct(e) {
1377
1377
  return new e(...[...arguments].slice(1));
1378
1378
  });
1379
- var lt = unapply(Array.prototype.forEach), ut = unapply(Array.prototype.lastIndexOf), dt = unapply(Array.prototype.pop), ft = unapply(Array.prototype.push), pt = unapply(Array.prototype.splice), mt = Array.isArray, ht = unapply(String.prototype.toLowerCase), gt = unapply(String.prototype.toString), _t = unapply(String.prototype.match), vt = unapply(String.prototype.replace), yt = unapply(String.prototype.indexOf), bt = unapply(String.prototype.trim), xt = unapply(Number.prototype.toString), St = unapply(Boolean.prototype.toString), Ct = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), wt = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), X = unapply(Object.prototype.hasOwnProperty), Z = unapply(Object.prototype.toString), Q = unapply(RegExp.prototype.test), Tt = unconstruct(TypeError);
1379
+ var lt = unapply(Array.prototype.forEach), ut = unapply(Array.prototype.lastIndexOf), dt = unapply(Array.prototype.pop), ft = unapply(Array.prototype.push), pt = unapply(Array.prototype.splice), mt = Array.isArray, ht = unapply(String.prototype.toLowerCase), gt = unapply(String.prototype.toString), _t = unapply(String.prototype.match), vt = unapply(String.prototype.replace), yt = unapply(String.prototype.indexOf), bt = unapply(String.prototype.trim), xt = unapply(Number.prototype.toString), St = unapply(Boolean.prototype.toString), Q = typeof BigInt > "u" ? null : unapply(BigInt.prototype.toString), Ct = typeof Symbol > "u" ? null : unapply(Symbol.prototype.toString), wt = unapply(Object.prototype.hasOwnProperty), Tt = unapply(Object.prototype.toString), Et = unapply(RegExp.prototype.test), Dt = unconstruct(TypeError);
1380
1380
  function unapply(e) {
1381
1381
  return function(t) {
1382
1382
  t instanceof RegExp && (t.lastIndex = 0);
@@ -1391,28 +1391,28 @@ function unconstruct(e) {
1391
1391
  }
1392
1392
  function addToSet(e, t) {
1393
1393
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ht;
1394
- if (et && et(e, null), !mt(t)) return e;
1394
+ if (tt && tt(e, null), !mt(t)) return e;
1395
1395
  let r = t.length;
1396
1396
  for (; r--;) {
1397
1397
  let i = t[r];
1398
1398
  if (typeof i == "string") {
1399
1399
  let e = n(i);
1400
- e !== i && (tt(t) || (t[r] = e), i = e);
1400
+ e !== i && (nt(t) || (t[r] = e), i = e);
1401
1401
  }
1402
1402
  e[i] = !0;
1403
1403
  }
1404
1404
  return e;
1405
1405
  }
1406
1406
  function cleanArray(e) {
1407
- for (let t = 0; t < e.length; t++) X(e, t) || (e[t] = null);
1407
+ for (let t = 0; t < e.length; t++) wt(e, t) || (e[t] = null);
1408
1408
  return e;
1409
1409
  }
1410
1410
  function clone(e) {
1411
- let t = it(null);
1412
- for (let r of $e(e)) {
1411
+ let t = at(null);
1412
+ for (let r of et(e)) {
1413
1413
  var n = _slicedToArray(r, 2);
1414
1414
  let i = n[0], a = n[1];
1415
- X(e, i) && (mt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1415
+ wt(e, i) && (mt(a) ? t[i] = cleanArray(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = clone(a) : t[i] = a);
1416
1416
  }
1417
1417
  return t;
1418
1418
  }
@@ -1421,30 +1421,30 @@ function stringifyValue(e) {
1421
1421
  case "string": return e;
1422
1422
  case "number": return xt(e);
1423
1423
  case "boolean": return St(e);
1424
- case "bigint": return Ct ? Ct(e) : "0";
1425
- case "symbol": return wt ? wt(e) : "Symbol()";
1426
- case "undefined": return Z(e);
1424
+ case "bigint": return Q ? Q(e) : "0";
1425
+ case "symbol": return Ct ? Ct(e) : "Symbol()";
1426
+ case "undefined": return Tt(e);
1427
1427
  case "function":
1428
1428
  case "object": {
1429
- if (e === null) return Z(e);
1429
+ if (e === null) return Tt(e);
1430
1430
  let t = e, n = lookupGetter(t, "toString");
1431
1431
  if (typeof n == "function") {
1432
1432
  let e = n(t);
1433
- return typeof e == "string" ? e : Z(e);
1433
+ return typeof e == "string" ? e : Tt(e);
1434
1434
  }
1435
- return Z(e);
1435
+ return Tt(e);
1436
1436
  }
1437
- default: return Z(e);
1437
+ default: return Tt(e);
1438
1438
  }
1439
1439
  }
1440
1440
  function lookupGetter(e, t) {
1441
1441
  for (; e !== null;) {
1442
- let n = nt(e, t);
1442
+ let n = it(e, t);
1443
1443
  if (n) {
1444
1444
  if (n.get) return unapply(n.get);
1445
1445
  if (typeof n.value == "function") return unapply(n.value);
1446
1446
  }
1447
- e = q(e);
1447
+ e = rt(e);
1448
1448
  }
1449
1449
  function fallbackValue() {
1450
1450
  return null;
@@ -1453,12 +1453,12 @@ function lookupGetter(e, t) {
1453
1453
  }
1454
1454
  function isRegex(e) {
1455
1455
  try {
1456
- return Q(e, ""), !0;
1456
+ return Et(e, ""), !0;
1457
1457
  } catch {
1458
1458
  return !1;
1459
1459
  }
1460
1460
  }
1461
- var Et = J(/* @__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(".")), Dt = J(/* @__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(".")), Ot = J([
1461
+ var Ot = J(/* @__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(".")), kt = J(/* @__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(".")), At = J([
1462
1462
  "feBlend",
1463
1463
  "feColorMatrix",
1464
1464
  "feComponentTransfer",
@@ -1484,7 +1484,7 @@ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1484
1484
  "feSpotLight",
1485
1485
  "feTile",
1486
1486
  "feTurbulence"
1487
- ]), kt = J([
1487
+ ]), jt = J([
1488
1488
  "animate",
1489
1489
  "color-profile",
1490
1490
  "cursor",
@@ -1507,7 +1507,7 @@ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1507
1507
  "solidcolor",
1508
1508
  "unknown",
1509
1509
  "use"
1510
- ]), At = J(/* @__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(".")), jt = J([
1510
+ ]), Mt = J(/* @__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(".")), Nt = J([
1511
1511
  "maction",
1512
1512
  "maligngroup",
1513
1513
  "malignmark",
@@ -1523,13 +1523,13 @@ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1523
1523
  "annotation-xml",
1524
1524
  "mprescripts",
1525
1525
  "none"
1526
- ]), Mt = J(["#text"]), Nt = J(/* @__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(".")), Pt = J(/* @__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(".")), Ft = J(/* @__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(".")), It = J([
1526
+ ]), Pt = J(["#text"]), Ft = J(/* @__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(".")), It = J(/* @__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(".")), Lt = J(/* @__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(".")), Rt = J([
1527
1527
  "xlink:href",
1528
1528
  "xml:id",
1529
1529
  "xlink:title",
1530
1530
  "xml:space",
1531
1531
  "xmlns:xlink"
1532
- ]), Lt = rt(/{{[\w\W]*|^[\w\W]*}}/g), Rt = rt(/<%[\w\W]*|^[\w\W]*%>/g), zt = rt(/\${[\w\W]*/g), Bt = rt(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vt = rt(/^aria-[\-\w]+$/), Ht = rt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Ut = rt(/^(?:\w+script|data):/i), Wt = rt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Gt = rt(/^html$/i), Kt = rt(/^[a-z][.\w]*(-[.\w]+)+$/i), qt = rt(/<[/\w!]/g), Jt = rt(/<[/\w]/g), Yt = rt(/<\/no(script|embed|frames)/i), Xt = rt(/\/>/i), Zt = {
1532
+ ]), zt = X(/{{[\w\W]*|^[\w\W]*}}/g), Bt = X(/<%[\w\W]*|^[\w\W]*%>/g), Vt = X(/\${[\w\W]*/g), Ht = X(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ut = X(/^aria-[\-\w]+$/), Wt = X(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Gt = X(/^(?:\w+script|data):/i), Kt = X(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), qt = X(/^html$/i), Jt = X(/^[a-z][.\w]*(-[.\w]+)+$/i), Yt = X(/<[/\w!]/g), Xt = X(/<[/\w]/g), Zt = X(/<\/no(script|embed|frames)/i), Qt = X(/\/>/i), $t = {
1533
1533
  element: 1,
1534
1534
  attribute: 2,
1535
1535
  text: 3,
@@ -1542,9 +1542,9 @@ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1542
1542
  documentType: 10,
1543
1543
  documentFragment: 11,
1544
1544
  notation: 12
1545
- }, Qt = function getGlobal() {
1545
+ }, en = function getGlobal() {
1546
1546
  return typeof window > "u" ? null : window;
1547
- }, $t = function _createTrustedTypesPolicy(e, t) {
1547
+ }, tn = function _createTrustedTypesPolicy(e, t) {
1548
1548
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
1549
1549
  let n = null, r = "data-tt-policy-suffix";
1550
1550
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -1561,7 +1561,7 @@ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1561
1561
  } catch {
1562
1562
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
1563
1563
  }
1564
- }, en = function _createHooksMap() {
1564
+ }, nn = function _createHooksMap() {
1565
1565
  return {
1566
1566
  afterSanitizeAttributes: [],
1567
1567
  afterSanitizeElements: [],
@@ -1573,12 +1573,12 @@ var Et = J(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.bd
1573
1573
  uponSanitizeElement: [],
1574
1574
  uponSanitizeShadowNode: []
1575
1575
  };
1576
- }, tn = function _resolveSetOption(e, t, n, r) {
1577
- return X(e, t) && mt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1576
+ }, rn = function _resolveSetOption(e, t, n, r) {
1577
+ return wt(e, t) && mt(e[t]) ? addToSet(r.base ? clone(r.base) : {}, e[t], r.transform) : n;
1578
1578
  };
1579
1579
  function createDOMPurify() {
1580
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Qt(), DOMPurify = (e) => createDOMPurify(e);
1581
- if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== Zt.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1580
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : en(), DOMPurify = (e) => createDOMPurify(e);
1581
+ if (DOMPurify.version = "3.4.12", DOMPurify.removed = [], !e || !e.document || e.document.nodeType !== $t.document || !e.Element) return DOMPurify.isSupported = !1, DOMPurify;
1582
1582
  let t = e.document, n = t, r = n.currentScript;
1583
1583
  e.DocumentFragment;
1584
1584
  let i = e.HTMLTemplateElement, a = e.Node, o = e.Element, s = e.NodeFilter;
@@ -1589,37 +1589,37 @@ function createDOMPurify() {
1589
1589
  e.content && e.content.ownerDocument && (t = e.content.ownerDocument);
1590
1590
  }
1591
1591
  let C, T = "", k, A = !1, j = 0, M = function _assertNotInTrustedTypesPolicy() {
1592
- if (j > 0) throw Tt("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.");
1593
- }, ne = function _createTrustedHTML(e) {
1592
+ if (j > 0) throw Dt("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.");
1593
+ }, P = function _createTrustedHTML(e) {
1594
1594
  M(), j++;
1595
1595
  try {
1596
1596
  return C.createHTML(e);
1597
1597
  } finally {
1598
1598
  j--;
1599
1599
  }
1600
- }, re = function _createTrustedScriptURL(e) {
1600
+ }, ne = function _createTrustedScriptURL(e) {
1601
1601
  M(), j++;
1602
1602
  try {
1603
1603
  return C.createScriptURL(e);
1604
1604
  } finally {
1605
1605
  j--;
1606
1606
  }
1607
- }, ie = function _getDefaultTrustedTypesPolicy() {
1608
- return A || (k = $t(u, r), A = !0), k;
1609
- }, P = t, F = P.implementation, I = P.createNodeIterator, ae = P.createDocumentFragment, R = P.getElementsByTagName, B = n.importNode, H = en();
1610
- DOMPurify.isSupported = typeof $e == "function" && typeof v == "function" && F && F.createHTMLDocument !== void 0;
1611
- let oe = Lt, se = Rt, ce = zt, ue = Bt, de = Vt, pe = Ut, he = Wt, U = Kt, _e = Ht, W = null, ve = addToSet({}, [
1612
- ...Et,
1613
- ...Dt,
1607
+ }, re = function _getDefaultTrustedTypesPolicy() {
1608
+ return A || (k = tn(u, r), A = !0), k;
1609
+ }, F = t, I = F.implementation, R = F.createNodeIterator, ie = F.createDocumentFragment, B = F.getElementsByTagName, H = n.importNode, U = nn();
1610
+ DOMPurify.isSupported = typeof et == "function" && typeof v == "function" && I && I.createHTMLDocument !== void 0;
1611
+ let ae = zt, oe = Bt, se = Vt, ce = Ht, ue = Ut, de = Gt, pe = Kt, he = Jt, _e = Wt, W = null, ve = addToSet({}, [
1614
1612
  ...Ot,
1613
+ ...kt,
1615
1614
  ...At,
1616
- ...Mt
1615
+ ...Mt,
1616
+ ...Pt
1617
1617
  ]), G = null, ye = addToSet({}, [
1618
- ...Nt,
1619
- ...Pt,
1620
1618
  ...Ft,
1621
- ...It
1622
- ]), K = Object.seal(it(null, {
1619
+ ...It,
1620
+ ...Lt,
1621
+ ...Rt
1622
+ ]), K = Object.seal(at(null, {
1623
1623
  tagNameCheck: {
1624
1624
  writable: !0,
1625
1625
  configurable: !1,
@@ -1638,7 +1638,7 @@ function createDOMPurify() {
1638
1638
  enumerable: !0,
1639
1639
  value: !1
1640
1640
  }
1641
- })), be = null, Se = null, Ce = Object.seal(it(null, {
1641
+ })), be = null, Se = null, Ce = Object.seal(at(null, {
1642
1642
  tagCheck: {
1643
1643
  writable: !0,
1644
1644
  configurable: !1,
@@ -1673,75 +1673,75 @@ function createDOMPurify() {
1673
1673
  "value",
1674
1674
  "style",
1675
1675
  "xmlns"
1676
- ]), Xe = "http://www.w3.org/1998/Math/MathML", Ze = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml", et = Qe, tt = !1, q = null, nt = addToSet({}, [
1676
+ ]), Xe = "http://www.w3.org/1998/Math/MathML", Ze = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml", q = Qe, $e = !1, tt = null, nt = addToSet({}, [
1677
1677
  Xe,
1678
1678
  Ze,
1679
1679
  Qe
1680
- ], gt), at = J([
1680
+ ], gt), rt = J([
1681
1681
  "mi",
1682
1682
  "mo",
1683
1683
  "mn",
1684
1684
  "ms",
1685
1685
  "mtext"
1686
- ]), st = addToSet({}, at), ct = J(["annotation-xml"]), xt = addToSet({}, ct), St = addToSet({}, [
1686
+ ]), it = addToSet({}, rt), Z = J(["annotation-xml"]), st = addToSet({}, Z), ct = addToSet({}, [
1687
1687
  "title",
1688
1688
  "style",
1689
1689
  "font",
1690
1690
  "a",
1691
1691
  "script"
1692
- ]), Ct = null, wt = ["application/xhtml+xml", "text/html"], Z = null, nn = null, rn = t.createElement("form"), an = function isRegexOrFunction(e) {
1692
+ ]), xt = null, St = ["application/xhtml+xml", "text/html"], Q = null, Ct = null, Tt = t.createElement("form"), an = function isRegexOrFunction(e) {
1693
1693
  return e instanceof RegExp || e instanceof Function;
1694
1694
  }, on = function _parseConfig() {
1695
1695
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1696
- if (nn && nn === e) return;
1697
- (!e || typeof e != "object") && (e = {}), e = clone(e), Ct = wt.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Z = Ct === "application/xhtml+xml" ? gt : ht, W = tn(e, "ALLOWED_TAGS", ve, { transform: Z }), G = tn(e, "ALLOWED_ATTR", ye, { transform: Z }), q = tn(e, "ALLOWED_NAMESPACES", nt, { transform: gt }), Je = tn(e, "ADD_URI_SAFE_ATTR", Ye, {
1698
- transform: Z,
1696
+ if (Ct && Ct === e) return;
1697
+ (!e || typeof e != "object") && (e = {}), e = clone(e), xt = St.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Q = xt === "application/xhtml+xml" ? gt : ht, W = rn(e, "ALLOWED_TAGS", ve, { transform: Q }), G = rn(e, "ALLOWED_ATTR", ye, { transform: Q }), tt = rn(e, "ALLOWED_NAMESPACES", nt, { transform: gt }), Je = rn(e, "ADD_URI_SAFE_ATTR", Ye, {
1698
+ transform: Q,
1699
1699
  base: Ye
1700
- }), Ke = tn(e, "ADD_DATA_URI_TAGS", qe, {
1701
- transform: Z,
1700
+ }), Ke = rn(e, "ADD_DATA_URI_TAGS", qe, {
1701
+ transform: Q,
1702
1702
  base: qe
1703
- }), We = tn(e, "FORBID_CONTENTS", Ge, { transform: Z }), be = tn(e, "FORBID_TAGS", clone({}), { transform: Z }), Se = tn(e, "FORBID_ATTR", clone({}), { transform: Z }), Ue = X(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, we = e.ALLOW_ARIA_ATTR !== !1, Te = e.ALLOW_DATA_ATTR !== !1, Ee = e.ALLOW_UNKNOWN_PROTOCOLS || !1, De = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Oe = e.SAFE_FOR_TEMPLATES || !1, ke = e.SAFE_FOR_XML !== !1, Ae = e.WHOLE_DOCUMENT || !1, Fe = e.RETURN_DOM || !1, Ie = e.RETURN_DOM_FRAGMENT || !1, Le = e.RETURN_TRUSTED_TYPE || !1, Pe = e.FORCE_BODY || !1, Re = e.SANITIZE_DOM !== !1, ze = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, _e = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ht, et = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Qe, st = 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({}, at), xt = X(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, ct);
1704
- let t = X(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : it(null);
1705
- if (K = it(null), X(t, "tagNameCheck") && an(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), X(t, "attributeNameCheck") && an(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), X(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), rt(K), Oe && (Te = !1), Ie && (Fe = !0), Ue && (W = addToSet({}, Mt), G = it(null), Ue.html === !0 && (addToSet(W, Et), addToSet(G, Nt)), Ue.svg === !0 && (addToSet(W, Dt), addToSet(G, Pt), addToSet(G, It)), Ue.svgFilters === !0 && (addToSet(W, Ot), addToSet(G, Pt), addToSet(G, It)), Ue.mathMl === !0 && (addToSet(W, At), addToSet(G, Ft), addToSet(G, It))), Ce.tagCheck = null, Ce.attributeCheck = null, X(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ce.tagCheck = e.ADD_TAGS : mt(e.ADD_TAGS) && (W === ve && (W = clone(W)), addToSet(W, e.ADD_TAGS, Z))), X(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ce.attributeCheck = e.ADD_ATTR : mt(e.ADD_ATTR) && (G === ye && (G = clone(G)), addToSet(G, e.ADD_ATTR, Z))), X(e, "ADD_URI_SAFE_ATTR") && mt(e.ADD_URI_SAFE_ATTR) && addToSet(Je, e.ADD_URI_SAFE_ATTR, Z), X(e, "FORBID_CONTENTS") && mt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Z)), X(e, "ADD_FORBID_CONTENTS") && mt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Z)), Ve && (W["#text"] = !0), Ae && addToSet(W, [
1703
+ }), We = rn(e, "FORBID_CONTENTS", Ge, { transform: Q }), be = rn(e, "FORBID_TAGS", clone({}), { transform: Q }), Se = rn(e, "FORBID_ATTR", clone({}), { transform: Q }), Ue = wt(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? clone(e.USE_PROFILES) : e.USE_PROFILES : !1, we = e.ALLOW_ARIA_ATTR !== !1, Te = e.ALLOW_DATA_ATTR !== !1, Ee = e.ALLOW_UNKNOWN_PROTOCOLS || !1, De = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Oe = e.SAFE_FOR_TEMPLATES || !1, ke = e.SAFE_FOR_XML !== !1, Ae = e.WHOLE_DOCUMENT || !1, Fe = e.RETURN_DOM || !1, Ie = e.RETURN_DOM_FRAGMENT || !1, Le = e.RETURN_TRUSTED_TYPE || !1, Pe = e.FORCE_BODY || !1, Re = e.SANITIZE_DOM !== !1, ze = e.SANITIZE_NAMED_PROPS || !1, Ve = e.KEEP_CONTENT !== !1, He = e.IN_PLACE || !1, _e = isRegex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Wt, q = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Qe, it = wt(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? clone(e.MATHML_TEXT_INTEGRATION_POINTS) : addToSet({}, rt), st = wt(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? clone(e.HTML_INTEGRATION_POINTS) : addToSet({}, Z);
1704
+ let t = wt(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? clone(e.CUSTOM_ELEMENT_HANDLING) : at(null);
1705
+ if (K = at(null), wt(t, "tagNameCheck") && an(t.tagNameCheck) && (K.tagNameCheck = t.tagNameCheck), wt(t, "attributeNameCheck") && an(t.attributeNameCheck) && (K.attributeNameCheck = t.attributeNameCheck), wt(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (K.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), X(K), Oe && (Te = !1), Ie && (Fe = !0), Ue && (W = addToSet({}, Pt), G = at(null), Ue.html === !0 && (addToSet(W, Ot), addToSet(G, Ft)), Ue.svg === !0 && (addToSet(W, kt), addToSet(G, It), addToSet(G, Rt)), Ue.svgFilters === !0 && (addToSet(W, At), addToSet(G, It), addToSet(G, Rt)), Ue.mathMl === !0 && (addToSet(W, Mt), addToSet(G, Lt), addToSet(G, Rt))), Ce.tagCheck = null, Ce.attributeCheck = null, wt(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? Ce.tagCheck = e.ADD_TAGS : mt(e.ADD_TAGS) && (W === ve && (W = clone(W)), addToSet(W, e.ADD_TAGS, Q))), wt(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? Ce.attributeCheck = e.ADD_ATTR : mt(e.ADD_ATTR) && (G === ye && (G = clone(G)), addToSet(G, e.ADD_ATTR, Q))), wt(e, "ADD_URI_SAFE_ATTR") && mt(e.ADD_URI_SAFE_ATTR) && addToSet(Je, e.ADD_URI_SAFE_ATTR, Q), wt(e, "FORBID_CONTENTS") && mt(e.FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.FORBID_CONTENTS, Q)), wt(e, "ADD_FORBID_CONTENTS") && mt(e.ADD_FORBID_CONTENTS) && (We === Ge && (We = clone(We)), addToSet(We, e.ADD_FORBID_CONTENTS, Q)), Ve && (W["#text"] = !0), Ae && addToSet(W, [
1706
1706
  "html",
1707
1707
  "head",
1708
1708
  "body"
1709
1709
  ]), W.table && (addToSet(W, ["tbody"]), delete be.tbody), e.TRUSTED_TYPES_POLICY) {
1710
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Tt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1711
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Tt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1710
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw Dt("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1711
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Dt("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1712
1712
  let t = C;
1713
1713
  C = e.TRUSTED_TYPES_POLICY;
1714
1714
  try {
1715
- T = ne("");
1715
+ T = P("");
1716
1716
  } catch (e) {
1717
1717
  throw C = t, e;
1718
1718
  }
1719
- } else e.TRUSTED_TYPES_POLICY === null ? (C = void 0, T = "") : (C === void 0 && (C = ie()), C && typeof T == "string" && (T = ne("")));
1720
- J && J(e), nn = e;
1719
+ } else e.TRUSTED_TYPES_POLICY === null ? (C = void 0, T = "") : (C === void 0 && (C = re()), C && typeof T == "string" && (T = P("")));
1720
+ J && J(e), Ct = e;
1721
1721
  }, sn = addToSet({}, [
1722
- ...Dt,
1723
- ...Ot,
1724
- ...kt
1725
- ]), cn = addToSet({}, [...At, ...jt]), ln = function _checkSvgNamespace(e, t, n) {
1726
- return t.namespaceURI === Qe ? e === "svg" : t.namespaceURI === Xe ? e === "svg" && (n === "annotation-xml" || st[n]) : !!sn[e];
1722
+ ...kt,
1723
+ ...At,
1724
+ ...jt
1725
+ ]), cn = addToSet({}, [...Mt, ...Nt]), ln = function _checkSvgNamespace(e, t, n) {
1726
+ return t.namespaceURI === Qe ? e === "svg" : t.namespaceURI === Xe ? e === "svg" && (n === "annotation-xml" || it[n]) : !!sn[e];
1727
1727
  }, un = function _checkMathMlNamespace(e, t, n) {
1728
- return t.namespaceURI === Qe ? e === "math" : t.namespaceURI === Ze ? e === "math" && xt[n] : !!cn[e];
1728
+ return t.namespaceURI === Qe ? e === "math" : t.namespaceURI === Ze ? e === "math" && st[n] : !!cn[e];
1729
1729
  }, dn = function _checkHtmlNamespace(e, t, n) {
1730
- return t.namespaceURI === Ze && !xt[n] || t.namespaceURI === Xe && !st[n] ? !1 : !cn[e] && (St[e] || !sn[e]);
1730
+ return t.namespaceURI === Ze && !st[n] || t.namespaceURI === Xe && !it[n] ? !1 : !cn[e] && (ct[e] || !sn[e]);
1731
1731
  }, fn = function _checkValidNamespace(e) {
1732
1732
  let t = v(e);
1733
1733
  (!t || !t.tagName) && (t = {
1734
- namespaceURI: et,
1734
+ namespaceURI: q,
1735
1735
  tagName: "template"
1736
1736
  });
1737
1737
  let n = ht(e.tagName), r = ht(t.tagName);
1738
- return q[e.namespaceURI] ? e.namespaceURI === Ze ? ln(n, t, r) : e.namespaceURI === Xe ? un(n, t, r) : e.namespaceURI === Qe ? dn(n, t, r) : !!(Ct === "application/xhtml+xml" && q[e.namespaceURI]) : !1;
1738
+ return tt[e.namespaceURI] ? e.namespaceURI === Ze ? ln(n, t, r) : e.namespaceURI === Xe ? un(n, t, r) : e.namespaceURI === Qe ? dn(n, t, r) : !!(xt === "application/xhtml+xml" && tt[e.namespaceURI]) : !1;
1739
1739
  }, pn = function _forceRemove(e) {
1740
1740
  ft(DOMPurify.removed, { element: e });
1741
1741
  try {
1742
1742
  v(e).removeChild(e);
1743
1743
  } catch {
1744
- if (m(e), !v(e)) throw Tt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1744
+ if (m(e), !v(e)) throw Dt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1745
1745
  }
1746
1746
  }, mn = function _neutralizeRoot(e) {
1747
1747
  _n(e);
@@ -1785,7 +1785,7 @@ function createDOMPurify() {
1785
1785
  let t = b(e);
1786
1786
  if (t) for (let n = t.length - 1; n >= 0; --n) {
1787
1787
  let r = t[n], i = r && r.name;
1788
- if (!(typeof i != "string" || G[Z(i)])) try {
1788
+ if (!(typeof i != "string" || G[Q(i)])) try {
1789
1789
  e.removeAttribute(i);
1790
1790
  } catch {}
1791
1791
  }
@@ -1793,7 +1793,7 @@ function createDOMPurify() {
1793
1793
  let t = [e];
1794
1794
  for (; t.length > 0;) {
1795
1795
  let e = t.pop();
1796
- (x ? x(e) : e.nodeType) === Zt.element && gn(e);
1796
+ (x ? x(e) : e.nodeType) === $t.element && gn(e);
1797
1797
  let n = _(e);
1798
1798
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
1799
1799
  }
@@ -1802,14 +1802,14 @@ function createDOMPurify() {
1802
1802
  let t = [e];
1803
1803
  for (; t.length > 0;) {
1804
1804
  let e = t.pop(), n = x ? x(e) : e.nodeType;
1805
- if (n === Zt.processingInstruction || n === Zt.comment && Q(Jt, e.data)) {
1805
+ if (n === $t.processingInstruction || n === $t.comment && Et(Xt, e.data)) {
1806
1806
  try {
1807
1807
  m(e);
1808
1808
  } catch {}
1809
1809
  continue;
1810
1810
  }
1811
- if (n === Zt.element) {
1812
- let t = e, n = Z(S ? S(e) : e.nodeName);
1811
+ if (n === $t.element) {
1812
+ let t = e, n = Q(S ? S(e) : e.nodeName);
1813
1813
  try {
1814
1814
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
1815
1815
  } catch {}
@@ -1824,26 +1824,26 @@ function createDOMPurify() {
1824
1824
  let t = _t(e, /^[\r\n\t ]+/);
1825
1825
  r = t && t[0];
1826
1826
  }
1827
- Ct === "application/xhtml+xml" && et === Qe && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1828
- let i = C ? ne(e) : e;
1829
- if (et === Qe) try {
1830
- n = new c().parseFromString(i, Ct);
1827
+ xt === "application/xhtml+xml" && q === Qe && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
1828
+ let i = C ? P(e) : e;
1829
+ if (q === Qe) try {
1830
+ n = new c().parseFromString(i, xt);
1831
1831
  } catch {}
1832
1832
  if (!n || !n.documentElement) {
1833
- n = F.createDocument(et, "template", null);
1833
+ n = I.createDocument(q, "template", null);
1834
1834
  try {
1835
- n.documentElement.innerHTML = tt ? T : i;
1835
+ n.documentElement.innerHTML = $e ? T : i;
1836
1836
  } catch {}
1837
1837
  }
1838
1838
  let a = n.body || n.documentElement;
1839
- return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), et === Qe ? R.call(n, Ae ? "html" : "body")[0] : Ae ? n.documentElement : a;
1839
+ return e && r && a.insertBefore(t.createTextNode(r), a.childNodes[0] || null), q === Qe ? B.call(n, Ae ? "html" : "body")[0] : Ae ? n.documentElement : a;
1840
1840
  }, bn = function _createNodeIterator(e) {
1841
- return I.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1841
+ return R.call(e.ownerDocument || e, e, s.SHOW_ELEMENT | s.SHOW_COMMENT | s.SHOW_TEXT | s.SHOW_PROCESSING_INSTRUCTION | s.SHOW_CDATA_SECTION, null);
1842
1842
  }, xn = function _stripTemplateExpressions(e) {
1843
- return e = vt(e, oe, " "), e = vt(e, se, " "), e = vt(e, ce, " "), e;
1843
+ return e = vt(e, ae, " "), e = vt(e, oe, " "), e = vt(e, se, " "), e;
1844
1844
  }, Sn = function _scrubTemplateExpressions(e) {
1845
1845
  e.normalize();
1846
- let t = I.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1846
+ let t = R.call(e.ownerDocument || e, e, s.SHOW_TEXT | s.SHOW_COMMENT | s.SHOW_CDATA_SECTION | s.SHOW_PROCESSING_INSTRUCTION, null), n = t.nextNode();
1847
1847
  for (; n;) n.data = xn(n.data), n = t.nextNode();
1848
1848
  let r = e.querySelectorAll?.call(e, "template");
1849
1849
  r && lt(r, (e) => {
@@ -1851,11 +1851,11 @@ function createDOMPurify() {
1851
1851
  });
1852
1852
  }, Cn = function _isClobbered(e) {
1853
1853
  let t = S ? S(e) : null;
1854
- return typeof t != "string" || Z(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1854
+ return typeof t != "string" || Q(t) !== "form" ? !1 : typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || e.attributes !== b(e) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function" || e.nodeType !== x(e) || e.childNodes !== _(e);
1855
1855
  }, wn = function _isDocumentFragment(e) {
1856
1856
  if (!x || typeof e != "object" || !e) return !1;
1857
1857
  try {
1858
- return x(e) === Zt.documentFragment;
1858
+ return x(e) === $t.documentFragment;
1859
1859
  } catch {
1860
1860
  return !1;
1861
1861
  }
@@ -1869,13 +1869,13 @@ function createDOMPurify() {
1869
1869
  };
1870
1870
  function _executeHooks(e, t, n) {
1871
1871
  e.length !== 0 && lt(e, (e) => {
1872
- e.call(DOMPurify, t, n, nn);
1872
+ e.call(DOMPurify, t, n, Ct);
1873
1873
  });
1874
1874
  }
1875
1875
  let En = function _isUnsafeNode(e, t) {
1876
- return !!(ke && e.hasChildNodes() && !Tn(e.firstElementChild) && Q(qt, e.textContent) && Q(qt, e.innerHTML) || ke && e.namespaceURI === Qe && t === "style" && Tn(e.firstElementChild) || e.nodeType === Zt.processingInstruction || ke && e.nodeType === Zt.comment && Q(Jt, e.data));
1876
+ return !!(ke && e.hasChildNodes() && !Tn(e.firstElementChild) && Et(Yt, e.textContent) && Et(Yt, e.innerHTML) || ke && e.namespaceURI === Qe && t === "style" && Tn(e.firstElementChild) || e.nodeType === $t.processingInstruction || ke && e.nodeType === $t.comment && Et(Xt, e.data));
1877
1877
  }, Dn = function _sanitizeDisallowedNode(e, t) {
1878
- if (!be[t] && jn(t) && (K.tagNameCheck instanceof RegExp && Q(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
1878
+ if (!be[t] && jn(t) && (K.tagNameCheck instanceof RegExp && Et(K.tagNameCheck, t) || K.tagNameCheck instanceof Function && K.tagNameCheck(t))) return !1;
1879
1879
  if (Ve && !We[t]) {
1880
1880
  let t = v(e), n = _(e);
1881
1881
  if (n && t) {
@@ -1888,31 +1888,31 @@ function createDOMPurify() {
1888
1888
  }
1889
1889
  return pn(e), !0;
1890
1890
  }, On = function _sanitizeElements(e, t) {
1891
- if (_executeHooks(H.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1891
+ if (_executeHooks(U.beforeSanitizeElements, e, null), e !== t && v(e) === null) return !0;
1892
1892
  if (Cn(e)) return pn(e), !0;
1893
- let n = Z(S ? S(e) : e.nodeName);
1894
- if (_executeHooks(H.uponSanitizeElement, e, {
1893
+ let n = Q(S ? S(e) : e.nodeName);
1894
+ if (_executeHooks(U.uponSanitizeElement, e, {
1895
1895
  tagName: n,
1896
1896
  allowedTags: W
1897
1897
  }), e !== t && v(e) === null) return !0;
1898
1898
  if (En(e, n)) return pn(e), !0;
1899
1899
  if (be[n] || !(Ce.tagCheck instanceof Function && Ce.tagCheck(n)) && !W[n]) {
1900
1900
  let t = Dn(e, n);
1901
- return t === !1 && _executeHooks(H.afterSanitizeElements, e, null), t;
1901
+ return t === !1 && _executeHooks(U.afterSanitizeElements, e, null), t;
1902
1902
  }
1903
- if ((x ? x(e) : e.nodeType) === Zt.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Q(Yt, e.innerHTML)) return pn(e), !0;
1904
- if (Oe && e.nodeType === Zt.text) {
1903
+ if ((x ? x(e) : e.nodeType) === $t.element && !fn(e) || (n === "noscript" || n === "noembed" || n === "noframes") && Et(Zt, e.innerHTML)) return pn(e), !0;
1904
+ if (Oe && e.nodeType === $t.text) {
1905
1905
  let t = xn(e.textContent);
1906
1906
  e.textContent !== t && (ft(DOMPurify.removed, { element: e.cloneNode() }), e.textContent = t);
1907
1907
  }
1908
- return _executeHooks(H.afterSanitizeElements, e, null), !1;
1908
+ return _executeHooks(U.afterSanitizeElements, e, null), !1;
1909
1909
  }, kn = function _isValidAttribute(e, n, r) {
1910
- if (Se[n] || ke && n === "patchsrc" || ke && n === "for" && e !== "label" && e !== "output" || Re && (n === "id" || n === "name") && (r in t || r in rn)) return !1;
1910
+ if (Se[n] || ke && n === "patchsrc" || ke && n === "for" && e !== "label" && e !== "output" || Re && (n === "id" || n === "name") && (r in t || r in Tt)) return !1;
1911
1911
  let i = G[n] || Ce.attributeCheck instanceof Function && Ce.attributeCheck(n, e);
1912
- if (!(Te && Q(ue, n)) && !(we && Q(de, n))) {
1912
+ if (!(Te && Et(ce, n)) && !(we && Et(ue, n))) {
1913
1913
  if (!i) {
1914
- if (!(jn(e) && (K.tagNameCheck instanceof RegExp && Q(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && Q(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Q(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
1915
- } else if (!Je[n] && !Q(_e, vt(r, he, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && yt(r, "data:") === 0 && Ke[e]) && !(Ee && !Q(pe, vt(r, he, ""))) && r) return !1;
1914
+ if (!(jn(e) && (K.tagNameCheck instanceof RegExp && Et(K.tagNameCheck, e) || K.tagNameCheck instanceof Function && K.tagNameCheck(e)) && (K.attributeNameCheck instanceof RegExp && Et(K.attributeNameCheck, n) || K.attributeNameCheck instanceof Function && K.attributeNameCheck(n, e)) || n === "is" && K.allowCustomizedBuiltInElements && (K.tagNameCheck instanceof RegExp && Et(K.tagNameCheck, r) || K.tagNameCheck instanceof Function && K.tagNameCheck(r)))) return !1;
1915
+ } else if (!Je[n] && !Et(_e, vt(r, pe, "")) && !((n === "src" || n === "xlink:href" || n === "href") && e !== "script" && yt(r, "data:") === 0 && Ke[e]) && !(Ee && !Et(de, vt(r, pe, ""))) && r) return !1;
1916
1916
  }
1917
1917
  return !0;
1918
1918
  }, An = addToSet({}, [
@@ -1925,11 +1925,11 @@ function createDOMPurify() {
1925
1925
  "font-face-uri",
1926
1926
  "missing-glyph"
1927
1927
  ]), jn = function _isBasicCustomElement(e) {
1928
- return !An[ht(e)] && Q(U, e);
1928
+ return !An[ht(e)] && Et(he, e);
1929
1929
  }, Mn = function _applyTrustedTypesToAttribute(e, t, n, r) {
1930
1930
  if (C && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
1931
- case "TrustedHTML": return ne(r);
1932
- case "TrustedScriptURL": return re(r);
1931
+ case "TrustedHTML": return P(r);
1932
+ case "TrustedScriptURL": return ne(r);
1933
1933
  }
1934
1934
  return r;
1935
1935
  }, Nn = function _setAttributeValue(e, t, n, r) {
@@ -1939,7 +1939,7 @@ function createDOMPurify() {
1939
1939
  hn(t, e);
1940
1940
  }
1941
1941
  }, Pn = function _sanitizeAttributes(e) {
1942
- _executeHooks(H.beforeSanitizeAttributes, e, null);
1942
+ _executeHooks(U.beforeSanitizeAttributes, e, null);
1943
1943
  let t = e.attributes;
1944
1944
  if (!t || Cn(e)) return;
1945
1945
  let n = {
@@ -1948,10 +1948,10 @@ function createDOMPurify() {
1948
1948
  keepAttr: !0,
1949
1949
  allowedAttributes: G,
1950
1950
  forceKeepAttr: void 0
1951
- }, r = t.length, i = Z(e.nodeName);
1951
+ }, r = t.length, i = Q(e.nodeName);
1952
1952
  for (; r--;) {
1953
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Z(o), f = c, p = o === "value" ? f : bt(f);
1954
- if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(H.uponSanitizeAttribute, e, n), p = n.attrValue, ze && (u === "id" || u === "name") && yt(p, Be) !== 0 && (hn(o, e), p = Be + p), ke && Q(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1953
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, u = Q(o), f = c, p = o === "value" ? f : bt(f);
1954
+ if (n.attrName = u, n.attrValue = p, n.keepAttr = !0, n.forceKeepAttr = void 0, _executeHooks(U.uponSanitizeAttribute, e, n), p = n.attrValue, ze && (u === "id" || u === "name") && yt(p, Be) !== 0 && (hn(o, e), p = Be + p), ke && Et(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, p)) {
1955
1955
  hn(o, e);
1956
1956
  continue;
1957
1957
  }
@@ -1964,7 +1964,7 @@ function createDOMPurify() {
1964
1964
  hn(o, e);
1965
1965
  continue;
1966
1966
  }
1967
- if (!De && Q(Xt, p)) {
1967
+ if (!De && Et(Qt, p)) {
1968
1968
  hn(o, e);
1969
1969
  continue;
1970
1970
  }
@@ -1975,14 +1975,14 @@ function createDOMPurify() {
1975
1975
  p = Mn(i, u, s, p), p !== f && Nn(e, o, s, p);
1976
1976
  }
1977
1977
  }
1978
- _executeHooks(H.afterSanitizeAttributes, e, null);
1978
+ _executeHooks(U.afterSanitizeAttributes, e, null);
1979
1979
  }, Fn = function _sanitizeShadowDOM(e) {
1980
1980
  let t = null, n = bn(e);
1981
- for (_executeHooks(H.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(H.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === Zt.element) {
1981
+ for (_executeHooks(U.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (_executeHooks(U.uponSanitizeShadowNode, t, null), On(t, e), Pn(t), wn(t.content) && Fn(t.content), (x ? x(t) : t.nodeType) === $t.element) {
1982
1982
  let e = te(t);
1983
1983
  wn(e) && (In(e), Fn(e));
1984
1984
  }
1985
- _executeHooks(H.afterSanitizeShadowDOM, e, null);
1985
+ _executeHooks(U.afterSanitizeShadowDOM, e, null);
1986
1986
  }, In = function _sanitizeAttachedShadowRoots(e) {
1987
1987
  let t = [{
1988
1988
  node: e,
@@ -1994,14 +1994,14 @@ function createDOMPurify() {
1994
1994
  Fn(e.shadow);
1995
1995
  continue;
1996
1996
  }
1997
- let n = e.node, r = (x ? x(n) : n.nodeType) === Zt.element, i = _(n);
1997
+ let n = e.node, r = (x ? x(n) : n.nodeType) === $t.element, i = _(n);
1998
1998
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
1999
1999
  node: i[e],
2000
2000
  shadow: null
2001
2001
  });
2002
2002
  if (r) {
2003
2003
  let e = S ? S(n) : null;
2004
- if (typeof e == "string" && Z(e) === "template") {
2004
+ if (typeof e == "string" && Q(e) === "template") {
2005
2005
  let e = n.content;
2006
2006
  wn(e) && t.push({
2007
2007
  node: e,
@@ -2023,26 +2023,26 @@ function createDOMPurify() {
2023
2023
  };
2024
2024
  return DOMPurify.sanitize = function(e) {
2025
2025
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = null, i = null, a = null, o = null;
2026
- if (tt = !e, tt && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Tt("dirty is not a string, aborting");
2026
+ if ($e = !e, $e && (e = "<!-->"), typeof e != "string" && !Tn(e) && (e = stringifyValue(e), typeof e != "string")) throw Dt("dirty is not a string, aborting");
2027
2027
  if (!DOMPurify.isSupported) return e;
2028
- je ? (W = Me, G = Ne) : on(t), (H.uponSanitizeElement.length > 0 || H.uponSanitizeAttribute.length > 0) && (W = clone(W)), H.uponSanitizeAttribute.length > 0 && (G = clone(G)), DOMPurify.removed = [];
2028
+ je ? (W = Me, G = Ne) : on(t), (U.uponSanitizeElement.length > 0 || U.uponSanitizeAttribute.length > 0) && (W = clone(W)), U.uponSanitizeAttribute.length > 0 && (G = clone(G)), DOMPurify.removed = [];
2029
2029
  let s = He && typeof e != "string" && Tn(e);
2030
2030
  if (s) {
2031
2031
  vn(e);
2032
2032
  let t = S ? S(e) : e.nodeName;
2033
2033
  if (typeof t == "string") {
2034
- let n = Z(t);
2035
- if (!W[n] || be[n]) throw mn(e), Tt("root node is forbidden and cannot be sanitized in-place");
2034
+ let n = Q(t);
2035
+ if (!W[n] || be[n]) throw mn(e), Dt("root node is forbidden and cannot be sanitized in-place");
2036
2036
  }
2037
- if (Cn(e)) throw mn(e), Tt("root node is clobbered and cannot be sanitized in-place");
2037
+ if (Cn(e)) throw mn(e), Dt("root node is clobbered and cannot be sanitized in-place");
2038
2038
  try {
2039
2039
  In(e);
2040
2040
  } catch (t) {
2041
2041
  throw mn(e), t;
2042
2042
  }
2043
- } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === Zt.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2043
+ } else if (Tn(e)) r = yn("<!---->"), i = r.ownerDocument.importNode(e, !0), i.nodeType === $t.element && i.nodeName === "BODY" || i.nodeName === "HTML" ? r = i : r.appendChild(i), In(i);
2044
2044
  else {
2045
- if (!Fe && !Oe && !Ae && e.indexOf("<") === -1) return C && Le ? ne(e) : e;
2045
+ if (!Fe && !Oe && !Ae && e.indexOf("<") === -1) return C && Le ? P(e) : e;
2046
2046
  if (r = yn(e), !r) return Fe ? null : Le ? T : "";
2047
2047
  }
2048
2048
  r && Pe && pn(r.firstChild);
@@ -2058,38 +2058,38 @@ function createDOMPurify() {
2058
2058
  e.element && _n(e.element);
2059
2059
  }), Oe && Sn(e), e;
2060
2060
  if (Fe) {
2061
- if (Oe && Sn(r), Ie) for (o = ae.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2061
+ if (Oe && Sn(r), Ie) for (o = ie.call(r.ownerDocument); r.firstChild;) o.appendChild(r.firstChild);
2062
2062
  else o = r;
2063
- return (G.shadowroot || G.shadowrootmode) && (o = B.call(n, o, !0)), o;
2063
+ return (G.shadowroot || G.shadowrootmode) && (o = H.call(n, o, !0)), o;
2064
2064
  }
2065
2065
  let f = Ae ? r.outerHTML : r.innerHTML;
2066
- return Ae && W["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Q(Gt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Oe && (f = xn(f)), C && Le ? ne(f) : f;
2066
+ return Ae && W["!doctype"] && r.ownerDocument && r.ownerDocument.doctype && r.ownerDocument.doctype.name && Et(qt, r.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + r.ownerDocument.doctype.name + ">\n" + f), Oe && (f = xn(f)), C && Le ? P(f) : f;
2067
2067
  }, DOMPurify.setConfig = function() {
2068
2068
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2069
2069
  on(e), je = !0, Me = W, Ne = G;
2070
2070
  }, DOMPurify.clearConfig = function() {
2071
- nn = null, je = !1, Me = null, Ne = null, C = k, T = "";
2071
+ Ct = null, je = !1, Me = null, Ne = null, C = k, T = "";
2072
2072
  }, DOMPurify.isValidAttribute = function(e, t, n) {
2073
- nn || on({});
2074
- let r = Z(e), i = Z(t);
2073
+ Ct || on({});
2074
+ let r = Q(e), i = Q(t);
2075
2075
  return kn(r, i, n);
2076
2076
  }, DOMPurify.addHook = function(e, t) {
2077
- typeof t == "function" && X(H, e) && ft(H[e], t);
2077
+ typeof t == "function" && wt(U, e) && ft(U[e], t);
2078
2078
  }, DOMPurify.removeHook = function(e, t) {
2079
- if (X(H, e)) {
2079
+ if (wt(U, e)) {
2080
2080
  if (t !== void 0) {
2081
- let n = ut(H[e], t);
2082
- return n === -1 ? void 0 : pt(H[e], n, 1)[0];
2081
+ let n = ut(U[e], t);
2082
+ return n === -1 ? void 0 : pt(U[e], n, 1)[0];
2083
2083
  }
2084
- return dt(H[e]);
2084
+ return dt(U[e]);
2085
2085
  }
2086
2086
  }, DOMPurify.removeHooks = function(e) {
2087
- X(H, e) && (H[e] = []);
2087
+ wt(U, e) && (U[e] = []);
2088
2088
  }, DOMPurify.removeAllHooks = function() {
2089
- H = en();
2089
+ U = nn();
2090
2090
  }, DOMPurify;
2091
2091
  }
2092
- var nn = createDOMPurify(), _Class;
2092
+ var an = createDOMPurify(), _Class;
2093
2093
  function z() {
2094
2094
  return {
2095
2095
  async: !1,
@@ -2104,11 +2104,11 @@ function z() {
2104
2104
  walkTokens: null
2105
2105
  };
2106
2106
  }
2107
- var rn = z();
2107
+ var on = z();
2108
2108
  function N(e) {
2109
- rn = e;
2109
+ on = e;
2110
2110
  }
2111
- var an = { exec: () => null };
2111
+ var sn = { exec: () => null };
2112
2112
  function E(e) {
2113
2113
  let t = [];
2114
2114
  return (n) => {
@@ -2120,19 +2120,19 @@ function d(e, t = "") {
2120
2120
  let n = typeof e == "string" ? e : e.source, r = {
2121
2121
  replace: (e, t) => {
2122
2122
  let i = typeof t == "string" ? t : t.source;
2123
- return i = i.replace(sn.caret, "$1"), n = n.replace(e, i), r;
2123
+ return i = i.replace(ln.caret, "$1"), n = n.replace(e, i), r;
2124
2124
  },
2125
2125
  getRegex: () => new RegExp(n, t)
2126
2126
  };
2127
2127
  return r;
2128
2128
  }
2129
- var on = ((e = "") => {
2129
+ var cn = ((e = "") => {
2130
2130
  try {
2131
2131
  return !!RegExp("(?<=1)(?<!1)" + e);
2132
2132
  } catch {
2133
2133
  return !1;
2134
2134
  }
2135
- })(), sn = {
2135
+ })(), ln = {
2136
2136
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
2137
2137
  outputLinkReplace: /\\([\[\]])/g,
2138
2138
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -2189,112 +2189,112 @@ var on = ((e = "") => {
2189
2189
  headingBeginRegex: E((e) => RegExp(`^ {0,${e}}#`)),
2190
2190
  htmlBeginRegex: E((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
2191
2191
  blockquoteBeginRegex: E((e) => RegExp(`^ {0,${e}}>`))
2192
- }, cn = /^(?:[ \t]*(?:\n|$))+/, ln = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, un = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, dn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, fn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, pn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, mn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, hn = d(mn).replace(/bull/g, pn).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}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), gn = d(mn).replace(/bull/g, pn).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}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), _n = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, vn = /^[^\n]+/, yn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, bn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", yn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, pn).getRegex(), Sn = "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", Cn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, wn = 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", Cn).replace("tag", Sn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(_n).replace("hr", dn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Sn).getRegex(), Tn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), En = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Dn = {
2193
- blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", En).getRegex(),
2194
- code: ln,
2195
- def: bn,
2196
- fences: un,
2197
- heading: fn,
2198
- hr: dn,
2199
- html: wn,
2200
- lheading: hn,
2201
- list: xn,
2202
- newline: cn,
2203
- paragraph: Tn,
2204
- table: an,
2205
- text: vn
2206
- }, On = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", dn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Sn).getRegex(), kn = {
2207
- ...Dn,
2208
- lheading: gn,
2209
- table: On,
2210
- paragraph: d(_n).replace("hr", dn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", On).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Sn).getRegex()
2211
- }, An = {
2212
- ...Dn,
2213
- html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Cn).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(),
2192
+ }, un = /^(?:[ \t]*(?:\n|$))+/, dn = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, fn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, pn = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, mn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, hn = / {0,3}(?:[*+-]|\d{1,9}[.)])/, gn = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, _n = d(gn).replace(/bull/g, hn).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}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), vn = d(gn).replace(/bull/g, hn).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}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), yn = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, bn = /^[^\n]+/, xn = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Sn = d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", xn).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Cn = d(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, hn).getRegex(), wn = "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", Tn = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, En = 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", Tn).replace("tag", wn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (e) => d(yn).replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex(), Dn = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), On = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), kn = {
2193
+ blockquote: d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", On).getRegex(),
2194
+ code: dn,
2195
+ def: Sn,
2196
+ fences: fn,
2197
+ heading: mn,
2198
+ hr: pn,
2199
+ html: En,
2200
+ lheading: _n,
2201
+ list: Cn,
2202
+ newline: un,
2203
+ paragraph: Dn,
2204
+ table: sn,
2205
+ text: bn
2206
+ }, An = d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex(), jn = {
2207
+ ...kn,
2208
+ lheading: vn,
2209
+ table: An,
2210
+ paragraph: d(yn).replace("hr", pn).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", An).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", wn).getRegex()
2211
+ }, Mn = {
2212
+ ...kn,
2213
+ html: d("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Tn).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(),
2214
2214
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
2215
2215
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
2216
- fences: an,
2216
+ fences: sn,
2217
2217
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
2218
- paragraph: d(_n).replace("hr", dn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", hn).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2219
- }, jn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Mn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Nn = /^( {2,}|\\)\n(?!\s*$)/, Pn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Fn = /[\p{P}\p{S}]/u, In = /[\s\p{P}\p{S}]/u, Ln = /[^\s\p{P}\p{S}]/u, Rn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, In).getRegex(), zn = /(?!~)[\p{P}\p{S}]/u, Bn = /(?!~)[\s\p{P}\p{S}]/u, Vn = /(?:[^\s\p{P}\p{S}]|~)/u, Hn = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", on ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Un = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Wn = d(Un, "u").replace(/punct/g, Fn).getRegex(), Gn = d(Un, "u").replace(/punct/g, zn).getRegex(), Kn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", qn = d(Kn, "gu").replace(/notPunctSpace/g, Ln).replace(/punctSpace/g, In).replace(/punct/g, Fn).getRegex(), Jn = d(Kn, "gu").replace(/notPunctSpace/g, Vn).replace(/punctSpace/g, Bn).replace(/punct/g, zn).getRegex(), Yn = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ln).replace(/punctSpace/g, In).replace(/punct/g, Fn).getRegex(), Xn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Fn).getRegex(), Zn = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, Ln).replace(/punctSpace/g, In).replace(/punct/g, Fn).getRegex(), Qn = d(/\\(punct)/, "gu").replace(/punct/g, Fn).getRegex(), $n = 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(), er = d(Cn).replace("(?:-->|$)", "-->").getRegex(), tr = 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", er).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), nr = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, rr = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", nr).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ir = d(/^!?\[(label)\]\[(ref)\]/).replace("label", nr).replace("ref", yn).getRegex(), ar = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", yn).getRegex(), or = d("reflink|nolink(?!\\()", "g").replace("reflink", ir).replace("nolink", ar).getRegex(), sr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, cr = {
2220
- _backpedal: an,
2221
- anyPunctuation: Qn,
2222
- autolink: $n,
2223
- blockSkip: Hn,
2224
- br: Nn,
2225
- code: Mn,
2226
- del: an,
2227
- delLDelim: an,
2228
- delRDelim: an,
2229
- emStrongLDelim: Wn,
2230
- emStrongRDelimAst: qn,
2231
- emStrongRDelimUnd: Yn,
2232
- escape: jn,
2233
- link: rr,
2234
- nolink: ar,
2235
- punctuation: Rn,
2236
- reflink: ir,
2237
- reflinkSearch: or,
2238
- tag: tr,
2239
- text: Pn,
2240
- url: an
2241
- }, lr = {
2242
- ...cr,
2243
- link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", nr).getRegex(),
2244
- reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", nr).getRegex()
2245
- }, ur = {
2246
- ...cr,
2247
- emStrongRDelimAst: Jn,
2248
- emStrongLDelim: Gn,
2249
- delLDelim: Xn,
2250
- delRDelim: Zn,
2251
- url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", sr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2252
- _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2253
- del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2254
- 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", sr).getRegex()
2218
+ paragraph: d(yn).replace("hr", pn).replace("heading", " *#{1,6} *[^\n]").replace("lheading", _n).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
2219
+ }, Nn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Pn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Fn = /^( {2,}|\\)\n(?!\s*$)/, In = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ln = /[\p{P}\p{S}]/u, Rn = /[\s\p{P}\p{S}]/u, zn = /[^\s\p{P}\p{S}]/u, Bn = d(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, Rn).getRegex(), Vn = /(?!~)[\p{P}\p{S}]/u, Hn = /(?!~)[\s\p{P}\p{S}]/u, Un = /(?:[^\s\p{P}\p{S}]|~)/u, Wn = d(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", cn ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Gn = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Kn = d(Gn, "u").replace(/punct/g, Ln).getRegex(), qn = d(Gn, "u").replace(/punct/g, Vn).getRegex(), Jn = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Yn = d(Jn, "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), Xn = d(Jn, "gu").replace(/notPunctSpace/g, Un).replace(/punctSpace/g, Hn).replace(/punct/g, Vn).getRegex(), Zn = d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), Qn = d(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ln).getRegex(), $n = d("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, zn).replace(/punctSpace/g, Rn).replace(/punct/g, Ln).getRegex(), er = d(/\\(punct)/, "gu").replace(/punct/g, Ln).getRegex(), tr = 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(), nr = d(Tn).replace("(?:-->|$)", "-->").getRegex(), rr = 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", nr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ir = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, ar = d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", ir).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), or = d(/^!?\[(label)\]\[(ref)\]/).replace("label", ir).replace("ref", xn).getRegex(), sr = d(/^!?\[(ref)\](?:\[\])?/).replace("ref", xn).getRegex(), cr = d("reflink|nolink(?!\\()", "g").replace("reflink", or).replace("nolink", sr).getRegex(), lr = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ur = {
2220
+ _backpedal: sn,
2221
+ anyPunctuation: er,
2222
+ autolink: tr,
2223
+ blockSkip: Wn,
2224
+ br: Fn,
2225
+ code: Pn,
2226
+ del: sn,
2227
+ delLDelim: sn,
2228
+ delRDelim: sn,
2229
+ emStrongLDelim: Kn,
2230
+ emStrongRDelimAst: Yn,
2231
+ emStrongRDelimUnd: Zn,
2232
+ escape: Nn,
2233
+ link: ar,
2234
+ nolink: sr,
2235
+ punctuation: Bn,
2236
+ reflink: or,
2237
+ reflinkSearch: cr,
2238
+ tag: rr,
2239
+ text: In,
2240
+ url: sn
2255
2241
  }, dr = {
2256
2242
  ...ur,
2257
- br: d(Nn).replace("{2,}", "*").getRegex(),
2258
- text: d(ur.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2243
+ link: d(/^!?\[(label)\]\((.*?)\)/).replace("label", ir).getRegex(),
2244
+ reflink: d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ir).getRegex()
2259
2245
  }, fr = {
2260
- normal: Dn,
2261
- gfm: kn,
2262
- pedantic: An
2246
+ ...ur,
2247
+ emStrongRDelimAst: Xn,
2248
+ emStrongLDelim: qn,
2249
+ delLDelim: Qn,
2250
+ delRDelim: $n,
2251
+ url: d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", lr).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
2252
+ _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
2253
+ del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
2254
+ 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", lr).getRegex()
2263
2255
  }, pr = {
2264
- normal: cr,
2265
- gfm: ur,
2266
- breaks: dr,
2267
- pedantic: lr
2256
+ ...fr,
2257
+ br: d(Fn).replace("{2,}", "*").getRegex(),
2258
+ text: d(fr.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
2268
2259
  }, mr = {
2260
+ normal: kn,
2261
+ gfm: jn,
2262
+ pedantic: Mn
2263
+ }, hr = {
2264
+ normal: ur,
2265
+ gfm: fr,
2266
+ breaks: pr,
2267
+ pedantic: dr
2268
+ }, gr = {
2269
2269
  "&": "&amp;",
2270
2270
  "<": "&lt;",
2271
2271
  ">": "&gt;",
2272
2272
  "\"": "&quot;",
2273
2273
  "'": "&#39;"
2274
- }, ge = (e) => mr[e];
2274
+ }, ge = (e) => gr[e];
2275
2275
  function O(e, t) {
2276
2276
  if (t) {
2277
- if (sn.escapeTest.test(e)) return e.replace(sn.escapeReplace, ge);
2278
- } else if (sn.escapeTestNoEncode.test(e)) return e.replace(sn.escapeReplaceNoEncode, ge);
2277
+ if (ln.escapeTest.test(e)) return e.replace(ln.escapeReplace, ge);
2278
+ } else if (ln.escapeTestNoEncode.test(e)) return e.replace(ln.escapeReplaceNoEncode, ge);
2279
2279
  return e;
2280
2280
  }
2281
2281
  function V(e) {
2282
2282
  try {
2283
- e = encodeURI(e).replace(sn.percentDecode, "%");
2283
+ e = encodeURI(e).replace(ln.percentDecode, "%");
2284
2284
  } catch {
2285
2285
  return null;
2286
2286
  }
2287
2287
  return e;
2288
2288
  }
2289
2289
  function Y(e, t) {
2290
- let n = e.replace(sn.findPipe, (e, t, n) => {
2290
+ let n = e.replace(ln.findPipe, (e, t, n) => {
2291
2291
  let r = !1, i = t;
2292
2292
  for (; --i >= 0 && n[i] === "\\";) r = !r;
2293
2293
  return r ? "|" : " |";
2294
- }).split(sn.splitPipe), r = 0;
2294
+ }).split(ln.splitPipe), r = 0;
2295
2295
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
2296
2296
  else for (; n.length < t;) n.push("");
2297
- for (; r < n.length; r++) n[r] = n[r].trim().replace(sn.slashPipe, "|");
2297
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(ln.slashPipe, "|");
2298
2298
  return n;
2299
2299
  }
2300
2300
  function $(e, t, n) {
@@ -2311,7 +2311,7 @@ function $(e, t, n) {
2311
2311
  }
2312
2312
  function ee(e) {
2313
2313
  let t = e.split("\n"), n = t.length - 1;
2314
- for (; n >= 0 && sn.blankLine.test(t[n]);) n--;
2314
+ for (; n >= 0 && ln.blankLine.test(t[n]);) n--;
2315
2315
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
2316
2316
  }
2317
2317
  function fe(e, t) {
@@ -2356,7 +2356,7 @@ function ot(e, t, n) {
2356
2356
  }
2357
2357
  var w = class {
2358
2358
  constructor(e) {
2359
- t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || rn;
2359
+ t(this, "options", void 0), t(this, "rules", void 0), t(this, "lexer", void 0), this.options = e || on;
2360
2360
  }
2361
2361
  space(e) {
2362
2362
  let t = this.rules.block.newline.exec(e);
@@ -2806,24 +2806,24 @@ ${c}` : c;
2806
2806
  };
2807
2807
  }
2808
2808
  }
2809
- }, hr = class l {
2809
+ }, _r = class l {
2810
2810
  constructor(e) {
2811
- t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || rn, 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 = {
2811
+ t(this, "tokens", void 0), t(this, "options", void 0), t(this, "state", void 0), t(this, "inlineQueue", void 0), t(this, "tokenizer", void 0), this.tokens = [], this.tokens.links = Object.create(null), this.options = e || on, 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 = {
2812
2812
  inLink: !1,
2813
2813
  inRawBlock: !1,
2814
2814
  top: !0
2815
2815
  };
2816
2816
  let n = {
2817
- other: sn,
2818
- block: fr.normal,
2819
- inline: pr.normal
2817
+ other: ln,
2818
+ block: mr.normal,
2819
+ inline: hr.normal
2820
2820
  };
2821
- this.options.pedantic ? (n.block = fr.pedantic, n.inline = pr.pedantic) : this.options.gfm && (n.block = fr.gfm, this.options.breaks ? n.inline = pr.breaks : n.inline = pr.gfm), this.tokenizer.rules = n;
2821
+ this.options.pedantic ? (n.block = mr.pedantic, n.inline = hr.pedantic) : this.options.gfm && (n.block = mr.gfm, this.options.breaks ? n.inline = hr.breaks : n.inline = hr.gfm), this.tokenizer.rules = n;
2822
2822
  }
2823
2823
  static get rules() {
2824
2824
  return {
2825
- block: fr,
2826
- inline: pr
2825
+ block: mr,
2826
+ inline: hr
2827
2827
  };
2828
2828
  }
2829
2829
  static lex(e, t) {
@@ -2833,7 +2833,7 @@ ${c}` : c;
2833
2833
  return new l(t).inlineTokens(e);
2834
2834
  }
2835
2835
  lex(e) {
2836
- e = e.replace(sn.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2836
+ e = e.replace(ln.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
2837
2837
  for (let e = 0; e < this.inlineQueue.length; e++) {
2838
2838
  let t = this.inlineQueue[e];
2839
2839
  this.inlineTokens(t.src, t.tokens);
@@ -2841,7 +2841,7 @@ ${c}` : c;
2841
2841
  return this.inlineQueue = [], this.tokens;
2842
2842
  }
2843
2843
  blockTokens(e, t = [], n = !1) {
2844
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(sn.tabCharGlobal, " ").replace(sn.spaceLine, ""));
2844
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(ln.tabCharGlobal, " ").replace(ln.spaceLine, ""));
2845
2845
  let r = Infinity;
2846
2846
  for (; e;) {
2847
2847
  if (e.length < r) r = e.length;
@@ -3025,13 +3025,13 @@ ${c}` : c;
3025
3025
  }
3026
3026
  }, y = class {
3027
3027
  constructor(e) {
3028
- t(this, "options", void 0), t(this, "parser", void 0), this.options = e || rn;
3028
+ t(this, "options", void 0), t(this, "parser", void 0), this.options = e || on;
3029
3029
  }
3030
3030
  space(e) {
3031
3031
  return "";
3032
3032
  }
3033
3033
  code({ text: e, lang: t, escaped: n }) {
3034
- let r = (t || "").match(sn.notSpaceStart)?.[0], i = e.replace(sn.endingNewline, "") + "\n";
3034
+ let r = (t || "").match(ln.notSpaceStart)?.[0], i = e.replace(ln.endingNewline, "") + "\n";
3035
3035
  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";
3036
3036
  }
3037
3037
  blockquote({ tokens: e }) {
@@ -3159,9 +3159,9 @@ ${e}</tr>
3159
3159
  checkbox({ raw: e }) {
3160
3160
  return e;
3161
3161
  }
3162
- }, gr = class l {
3162
+ }, vr = class l {
3163
3163
  constructor(e) {
3164
- t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || rn, 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();
3164
+ t(this, "options", void 0), t(this, "renderer", void 0), t(this, "textRenderer", void 0), this.options = e || on, 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();
3165
3165
  }
3166
3166
  static parse(e, t) {
3167
3167
  return new l(t).parse(e);
@@ -3307,9 +3307,9 @@ ${e}</tr>
3307
3307
  }
3308
3308
  return n;
3309
3309
  }
3310
- }, _r = (_Class = class {
3310
+ }, yr = (_Class = class {
3311
3311
  constructor(e) {
3312
- t(this, "options", void 0), t(this, "block", void 0), this.options = e || rn;
3312
+ t(this, "options", void 0), t(this, "block", void 0), this.options = e || on;
3313
3313
  }
3314
3314
  preprocess(e) {
3315
3315
  return e;
@@ -3324,10 +3324,10 @@ ${e}</tr>
3324
3324
  return e;
3325
3325
  }
3326
3326
  provideLexer(e = this.block) {
3327
- return e ? hr.lex : hr.lexInline;
3327
+ return e ? _r.lex : _r.lexInline;
3328
3328
  }
3329
3329
  provideParser(e = this.block) {
3330
- return e ? gr.parse : gr.parseInline;
3330
+ return e ? vr.parse : vr.parseInline;
3331
3331
  }
3332
3332
  }, t(_Class, "passThroughHooks", /* @__PURE__ */ new Set([
3333
3333
  "preprocess",
@@ -3340,7 +3340,7 @@ ${e}</tr>
3340
3340
  "processAllTokens"
3341
3341
  ])), _Class), D = class {
3342
3342
  constructor(...e) {
3343
- t(this, "defaults", z()), t(this, "options", this.setOptions), t(this, "parse", this.parseMarkdown(!0)), t(this, "parseInline", this.parseMarkdown(!1)), t(this, "Parser", gr), t(this, "Renderer", y), t(this, "TextRenderer", L), t(this, "Lexer", hr), t(this, "Tokenizer", w), t(this, "Hooks", _r), this.use(...e);
3343
+ t(this, "defaults", z()), t(this, "options", this.setOptions), t(this, "parse", this.parseMarkdown(!0)), t(this, "parseInline", this.parseMarkdown(!1)), t(this, "Parser", vr), t(this, "Renderer", y), t(this, "TextRenderer", L), t(this, "Lexer", _r), t(this, "Tokenizer", w), t(this, "Hooks", yr), this.use(...e);
3344
3344
  }
3345
3345
  walkTokens(e, t) {
3346
3346
  let n = [];
@@ -3419,13 +3419,13 @@ ${e}</tr>
3419
3419
  n.tokenizer = t;
3420
3420
  }
3421
3421
  if (e.hooks) {
3422
- let t = this.defaults.hooks || new _r();
3422
+ let t = this.defaults.hooks || new yr();
3423
3423
  for (let n in e.hooks) {
3424
3424
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
3425
3425
  if (["options", "block"].includes(n)) continue;
3426
3426
  let r = n, i = e.hooks[r], a = t[r];
3427
- _r.passThroughHooks.has(n) ? t[r] = (e) => {
3428
- if (this.defaults.async && _r.passThroughHooksRespectAsync.has(n)) return (async () => {
3427
+ yr.passThroughHooks.has(n) ? t[r] = (e) => {
3428
+ if (this.defaults.async && yr.passThroughHooksRespectAsync.has(n)) return (async () => {
3429
3429
  let n = await i.call(t, e);
3430
3430
  return a.call(t, n);
3431
3431
  })();
@@ -3462,10 +3462,10 @@ ${e}</tr>
3462
3462
  }, this;
3463
3463
  }
3464
3464
  lexer(e, t) {
3465
- return hr.lex(e, t ?? this.defaults);
3465
+ return _r.lex(e, t ?? this.defaults);
3466
3466
  }
3467
3467
  parser(e, t) {
3468
- return gr.parse(e, t ?? this.defaults);
3468
+ return vr.parse(e, t ?? this.defaults);
3469
3469
  }
3470
3470
  parseMarkdown(e) {
3471
3471
  return (t, n) => {
@@ -3477,16 +3477,16 @@ ${e}</tr>
3477
3477
  if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
3478
3478
  if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
3479
3479
  if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
3480
- let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? hr.lex : hr.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3480
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? _r.lex : _r.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
3481
3481
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
3482
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? gr.parse : gr.parseInline)(a, i);
3482
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? vr.parse : vr.parseInline)(a, i);
3483
3483
  return i.hooks ? await i.hooks.postprocess(o) : o;
3484
3484
  })().catch(a);
3485
3485
  try {
3486
3486
  i.hooks && (t = i.hooks.preprocess(t));
3487
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? hr.lex : hr.lexInline)(t, i);
3487
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? _r.lex : _r.lexInline)(t, i);
3488
3488
  i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
3489
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? gr.parse : gr.parseInline)(n, i);
3489
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? vr.parse : vr.parseInline)(n, i);
3490
3490
  return i.hooks && (r = i.hooks.postprocess(r)), r;
3491
3491
  } catch (e) {
3492
3492
  return a(e);
@@ -3503,20 +3503,20 @@ ${e}</tr>
3503
3503
  throw n;
3504
3504
  };
3505
3505
  }
3506
- }, vr = new D();
3506
+ }, br = new D();
3507
3507
  function g(e, t) {
3508
- return vr.parse(e, t);
3508
+ return br.parse(e, t);
3509
3509
  }
3510
3510
  g.options = g.setOptions = function(e) {
3511
- return vr.setOptions(e), g.defaults = vr.defaults, N(g.defaults), g;
3512
- }, g.getDefaults = z, g.defaults = rn, g.use = function(...e) {
3513
- return vr.use(...e), g.defaults = vr.defaults, N(g.defaults), g;
3511
+ return br.setOptions(e), g.defaults = br.defaults, N(g.defaults), g;
3512
+ }, g.getDefaults = z, g.defaults = on, g.use = function(...e) {
3513
+ return br.use(...e), g.defaults = br.defaults, N(g.defaults), g;
3514
3514
  }, g.walkTokens = function(e, t) {
3515
- return vr.walkTokens(e, t);
3516
- }, g.parseInline = vr.parseInline, g.Parser = gr, g.parser = gr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = hr, g.lexer = hr.lex, g.Tokenizer = w, g.Hooks = _r, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, gr.parse, hr.lex;
3515
+ return br.walkTokens(e, t);
3516
+ }, g.parseInline = br.parseInline, g.Parser = vr, g.parser = vr.parse, g.Renderer = y, g.TextRenderer = L, g.Lexer = _r, g.lexer = _r.lex, g.Tokenizer = w, g.Hooks = yr, g.parse = g, g.options, g.setOptions, g.use, g.walkTokens, g.parseInline, vr.parse, _r.lex;
3517
3517
  //#endregion
3518
3518
  //#region agent/ui/ChatCardBlock.vue?vue&type=script&setup=true&lang.ts
3519
- var yr = ["aria-label"], br = { class: "px-4 pb-2 pt-4" }, xr = ["innerHTML"], Sr = ["onClick"], Cr = /* @__PURE__ */ k({
3519
+ var xr = ["aria-label"], Sr = { class: "px-4 pb-2 pt-4" }, Cr = ["innerHTML"], wr = ["onClick"], Tr = /* @__PURE__ */ k({
3520
3520
  __name: "ChatCardBlock",
3521
3521
  props: {
3522
3522
  spec: {},
@@ -3527,7 +3527,7 @@ var yr = ["aria-label"], br = { class: "px-4 pb-2 pt-4" }, xr = ["innerHTML"], S
3527
3527
  let n = e, r = t, i = v(() => {
3528
3528
  if (!n.spec.body) return "";
3529
3529
  let e = g.parse(n.spec.body, { async: !1 });
3530
- return nn.sanitize(e, { ADD_ATTR: ["target"] });
3530
+ return an.sanitize(e, { ADD_ATTR: ["target"] });
3531
3531
  }), a = v(() => n.inverted ? "rgba(255, 255, 255, 0.22)" : "rgba(0, 0, 0, 0.16)"), o = v(() => n.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-200) 80%, transparent)"), s = v(() => n.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), c = v(() => n.inverted ? "rgba(255, 255, 255, 0.8)" : "var(--color-theme-800)"), u = v(() => n.inverted ? `inset 0 0 0 1px ${a.value}` : `inset 0 0 0 1px ${a.value}, 0 4px 16px rgba(15, 23, 42, 0.05)`), f = v(() => n.inverted ? "transparent" : "var(--color-theme-0)");
3532
3532
  function actionStyle(e) {
3533
3533
  return e === "primary" || e === "destructive" ? {
@@ -3538,7 +3538,7 @@ var yr = ["aria-label"], br = { class: "px-4 pb-2 pt-4" }, xr = ["innerHTML"], S
3538
3538
  color: s.value
3539
3539
  };
3540
3540
  }
3541
- return (t, n) => (P(), x("div", {
3541
+ return (t, n) => (F(), x("div", {
3542
3542
  "data-test": "chat-card",
3543
3543
  class: "my-6 w-full max-w-[55ch] self-start overflow-hidden rounded-2xl",
3544
3544
  style: M({
@@ -3547,36 +3547,36 @@ var yr = ["aria-label"], br = { class: "px-4 pb-2 pt-4" }, xr = ["innerHTML"], S
3547
3547
  }),
3548
3548
  "aria-label": e.spec.title
3549
3549
  }, [
3550
- S("div", br, [S("div", {
3550
+ S("div", Sr, [S("div", {
3551
3551
  class: "text-[14px] font-semibold leading-tight",
3552
3552
  style: M({ color: s.value })
3553
- }, H(e.spec.title), 5)]),
3554
- i.value ? (P(), x("div", {
3553
+ }, U(e.spec.title), 5)]),
3554
+ i.value ? (F(), x("div", {
3555
3555
  key: 0,
3556
3556
  class: "chat-msg-prose px-4 pb-4 pt-2 text-[14px] leading-relaxed",
3557
3557
  style: M({ color: c.value }),
3558
3558
  innerHTML: i.value
3559
- }, null, 12, xr)) : b("", !0),
3560
- e.spec.actions?.length ? (P(), x("div", {
3559
+ }, null, 12, Cr)) : b("", !0),
3560
+ e.spec.actions?.length ? (F(), x("div", {
3561
3561
  key: 1,
3562
3562
  class: "flex flex-wrap items-center gap-2 px-3 py-2.5",
3563
3563
  style: M({ borderTop: `1px solid ${o.value}` })
3564
- }, [(P(!0), x(h, null, I(e.spec.actions, (e) => (P(), x("button", {
3564
+ }, [(F(!0), x(h, null, R(e.spec.actions, (e) => (F(), x("button", {
3565
3565
  key: e.label,
3566
3566
  type: "button",
3567
3567
  "data-test": "chat-card-action",
3568
3568
  class: "inline-flex h-10 items-center justify-center rounded-full px-5 text-[14px] font-semibold transition-colors duration-150 active:opacity-80",
3569
3569
  style: M(actionStyle(e.style)),
3570
3570
  onClick: (t) => r("action", e.reply)
3571
- }, H(e.label), 13, Sr))), 128))], 4)) : b("", !0)
3572
- ], 12, yr));
3571
+ }, U(e.label), 13, wr))), 128))], 4)) : b("", !0)
3572
+ ], 12, xr));
3573
3573
  }
3574
- }), wr = 112, Tr = 52, Er = 14, Dr = 54, Or = 34, kr = 260;
3574
+ }), Er = 112, Dr = 52, Or = 14, kr = 54, Ar = 34, jr = 260;
3575
3575
  function nodeWidthFor(e) {
3576
3576
  let { orientation: t, maxRows: n, maxWidth: r } = e;
3577
- if (t === "horizontal" || !r) return wr;
3578
- let i = r - Er * 2 - (n - 1) * Dr;
3579
- return Math.min(kr, Math.max(wr, Math.floor(i / n)));
3577
+ if (t === "horizontal" || !r) return Er;
3578
+ let i = r - Or * 2 - (n - 1) * kr;
3579
+ return Math.min(jr, Math.max(Er, Math.floor(i / n)));
3580
3580
  }
3581
3581
  function orientationFor(e) {
3582
3582
  return e.layout === "left-to-right" || e.layout === "radial" ? "horizontal" : e.layout === "top-to-bottom" ? "vertical" : e.diagramType === "sequence" ? "horizontal" : "vertical";
@@ -3613,11 +3613,11 @@ function buildLayout(e, t, n) {
3613
3613
  orientation: t,
3614
3614
  maxRows: o,
3615
3615
  ...n === void 0 ? {} : { maxWidth: n }
3616
- }), u = t === "horizontal" ? Er * 2 + s * c + (s - 1) * Dr : Er * 2 + o * c + (o - 1) * Dr, f = t === "horizontal" ? Er * 2 + o * Tr + (o - 1) * Or : Er * 2 + s * Tr + (s - 1) * Or, p = [];
3616
+ }), u = t === "horizontal" ? Or * 2 + s * c + (s - 1) * kr : Or * 2 + o * c + (o - 1) * kr, f = t === "horizontal" ? Or * 2 + o * Dr + (o - 1) * Ar : Or * 2 + s * Dr + (s - 1) * Ar, p = [];
3617
3617
  for (let [e, [, n]] of a.entries()) {
3618
- let r = (o - n.length) * (t === "horizontal" ? 86 : c + Dr) / 2;
3618
+ let r = (o - n.length) * (t === "horizontal" ? 86 : c + kr) / 2;
3619
3619
  for (let [i, a] of n.entries()) {
3620
- let n = t === "horizontal" ? Er + e * (c + Dr) : Er + r + i * (c + Dr), o = t === "horizontal" ? Er + r + i * 86 : Er + e * 86;
3620
+ let n = t === "horizontal" ? Or + e * (c + kr) : Or + r + i * (c + kr), o = t === "horizontal" ? Or + r + i * 86 : Or + e * 86;
3621
3621
  p.push({
3622
3622
  id: a.id,
3623
3623
  label: a.label,
@@ -3626,7 +3626,7 @@ function buildLayout(e, t, n) {
3626
3626
  x: n,
3627
3627
  y: o,
3628
3628
  width: c,
3629
- height: Tr
3629
+ height: Dr
3630
3630
  });
3631
3631
  }
3632
3632
  }
@@ -3703,14 +3703,14 @@ function formatChatVisualTick(e) {
3703
3703
  let { prefix: r, suffix: i } = affixes(n);
3704
3704
  return `${r}${formatChatVisualValue({ value: t })}${i}`;
3705
3705
  }
3706
- var Ar = 5.4, jr = 10, Mr = 15, Nr = 16;
3706
+ var Mr = 5.4, Nr = 10, Pr = 15, Fr = 16;
3707
3707
  function planChatVisualXLabels(e) {
3708
3708
  let { labels: t, plotWidth: n } = e;
3709
3709
  if (!t.length || n <= 0) return {
3710
3710
  mode: "horizontal",
3711
3711
  entries: []
3712
3712
  };
3713
- let r = t.map((e) => e.length > Nr ? `${e.slice(0, Nr - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3713
+ let r = t.map((e) => e.length > Fr ? `${e.slice(0, Fr - 1).trimEnd()}\u2026` : e), i = t.length - 1;
3714
3714
  if (i === 0) return {
3715
3715
  mode: "horizontal",
3716
3716
  entries: [{
@@ -3718,14 +3718,14 @@ function planChatVisualXLabels(e) {
3718
3718
  text: r[0]
3719
3719
  }]
3720
3720
  };
3721
- if ((Math.max(...r.map((e) => e.length * Ar)) + jr) * t.length <= n) return {
3721
+ if ((Math.max(...r.map((e) => e.length * Mr)) + Nr) * t.length <= n) return {
3722
3722
  mode: "horizontal",
3723
3723
  entries: r.map((e, t) => ({
3724
3724
  index: t,
3725
3725
  text: e
3726
3726
  }))
3727
3727
  };
3728
- let a = Math.max(2, Math.floor(n / Mr));
3728
+ let a = Math.max(2, Math.floor(n / Pr));
3729
3729
  if (t.length <= a) return {
3730
3730
  mode: "angled",
3731
3731
  entries: r.map((e, t) => ({
@@ -3745,22 +3745,22 @@ function planChatVisualXLabels(e) {
3745
3745
  }
3746
3746
  //#endregion
3747
3747
  //#region agent/ui/ChatVisualBlock.vue?vue&type=script&setup=true&lang.ts
3748
- var Pr = [
3748
+ var Ir = [
3749
3749
  "data-visual-type",
3750
3750
  "data-chart-type",
3751
3751
  "data-stacking",
3752
3752
  "data-diagram-type",
3753
3753
  "aria-label"
3754
- ], Fr = { class: "mb-2.5" }, Ir = ["aria-label"], Lr = {
3754
+ ], Lr = { class: "mb-2.5" }, Rr = ["aria-label"], zr = {
3755
3755
  key: 0,
3756
3756
  "data-test": "chat-visual-horizontal-bars",
3757
3757
  class: "grid gap-3"
3758
- }, Rr = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, zr = ["viewBox"], Br = [
3758
+ }, Br = { class: "mb-1 flex items-start justify-between gap-3 text-[12px]" }, Vr = ["viewBox"], Hr = [
3759
3759
  "x1",
3760
3760
  "x2",
3761
3761
  "y1",
3762
3762
  "y2"
3763
- ], Vr = ["x", "y"], Hr = [
3763
+ ], Ur = ["x", "y"], Wr = [
3764
3764
  "data-row-index",
3765
3765
  "data-series-index",
3766
3766
  "data-data-key",
@@ -3768,48 +3768,48 @@ var Pr = [
3768
3768
  "y",
3769
3769
  "width",
3770
3770
  "height"
3771
- ], Ur = ["data-trend-key", "d"], Wr = ["d"], Gr = ["cx", "cy"], Kr = ["cx", "cy"], qr = [
3771
+ ], Gr = ["data-trend-key", "d"], Kr = ["d"], qr = ["cx", "cy"], Jr = ["cx", "cy"], Yr = [
3772
3772
  "x",
3773
3773
  "y",
3774
3774
  "text-anchor",
3775
3775
  "transform"
3776
- ], Jr = {
3776
+ ], Xr = {
3777
3777
  key: 2,
3778
3778
  class: "mt-2.5 flex flex-wrap items-center gap-x-4 gap-y-1.5"
3779
- }, Yr = {
3779
+ }, Zr = {
3780
3780
  key: 1,
3781
3781
  class: "grid gap-3"
3782
- }, Xr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, Zr = { class: "shrink-0 tabular-nums" }, Qr = {
3782
+ }, Qr = { class: "mb-1 flex items-baseline justify-between gap-3 text-[12px]" }, $r = { class: "shrink-0 tabular-nums" }, ei = {
3783
3783
  key: 2,
3784
3784
  class: "overflow-x-auto"
3785
- }, $r = ["viewBox", "aria-label"], ei = [
3785
+ }, ti = ["viewBox", "aria-label"], ni = [
3786
3786
  "data-from",
3787
3787
  "data-to",
3788
3788
  "x1",
3789
3789
  "y1",
3790
3790
  "x2",
3791
3791
  "y2"
3792
- ], ti = ["cx", "cy"], ni = ["x", "y"], ri = [
3792
+ ], ri = ["cx", "cy"], ii = ["x", "y"], ai = [
3793
3793
  "data-node-id",
3794
3794
  "data-node-kind",
3795
3795
  "transform"
3796
- ], ii = ["points"], ai = ["width", "height"], oi = ["width", "height"], si = {
3796
+ ], oi = ["points"], si = ["width", "height"], ci = ["width", "height"], li = {
3797
3797
  xmlns: "http://www.w3.org/1999/xhtml",
3798
3798
  class: "flex h-full min-w-0 flex-col items-center justify-center text-center"
3799
- }, ci = /* @__PURE__ */ k({
3799
+ }, ui = /* @__PURE__ */ k({
3800
3800
  __name: "ChatVisualBlock",
3801
3801
  props: {
3802
3802
  result: {},
3803
3803
  inverted: { type: Boolean }
3804
3804
  },
3805
3805
  setup(e) {
3806
- let t = e, n = F(), r = B(360), i;
3807
- re(() => {
3806
+ let t = e, n = I(), r = H(360), i;
3807
+ ne(() => {
3808
3808
  typeof ResizeObserver > "u" || !n.value || (i = new ResizeObserver((e) => {
3809
3809
  let t = e[0]?.contentRect.width;
3810
3810
  t && (r.value = Math.round(t));
3811
3811
  }), i.observe(n.value));
3812
- }), ne(() => i?.disconnect());
3812
+ }), P(() => i?.disconnect());
3813
3813
  let a = v(() => Math.min(720, Math.max(280, r.value))), o = v(() => t.result.ok ? t.result.spec : null), s = v(() => o.value?.visualType === "chart" ? o.value : null), c = v(() => o.value?.visualType === "diagram" ? o.value : null);
3814
3814
  function isCartesianChart(e) {
3815
3815
  return e?.chartType === "bar" || e?.chartType === "line" || e?.chartType === "scatter";
@@ -3949,7 +3949,7 @@ var Pr = [
3949
3949
  dataKey: e.trendLine.dataKey,
3950
3950
  seriesIndex: s
3951
3951
  };
3952
- }), ie = v(() => {
3952
+ }), re = v(() => {
3953
3953
  let e = f.value;
3954
3954
  if (!e || e.chartType !== "bar") return [];
3955
3955
  let t = A.value, n = (t.width - t.left - t.right) / Math.max(e.data.length, 1), r = yForValue(0);
@@ -3986,7 +3986,7 @@ var Pr = [
3986
3986
  dataKey: e.dataKey
3987
3987
  };
3988
3988
  }));
3989
- }), ae = v(() => {
3989
+ }), ie = v(() => {
3990
3990
  let e = f.value;
3991
3991
  if (!e) return [];
3992
3992
  let t = e.data;
@@ -3999,7 +3999,7 @@ var Pr = [
3999
3999
  anchor: i ? "end" : e === 0 ? "start" : e === n ? "end" : "middle",
4000
4000
  angled: i
4001
4001
  })).filter((e) => e.label);
4002
- }), R = v(() => {
4002
+ }), B = v(() => {
4003
4003
  let e = f.value;
4004
4004
  if (!e || e.chartType !== "bar" || e.series.length !== 1 || _.value) return [];
4005
4005
  let t = e.series[0], n = e.data.map((n, r) => {
@@ -4022,7 +4022,7 @@ var Pr = [
4022
4022
  width: e.rawValue <= 0 ? 0 : Math.max(2, e.rawValue / r * 100),
4023
4023
  seriesIndex: 0
4024
4024
  }));
4025
- }), se = v(() => {
4025
+ }), oe = v(() => {
4026
4026
  let e = f.value;
4027
4027
  if (!e?.data.length) return [];
4028
4028
  let t = e.data[e.data.length - 1];
@@ -4038,7 +4038,7 @@ var Pr = [
4038
4038
  seriesIndex: n
4039
4039
  };
4040
4040
  });
4041
- }), ce = v(() => {
4041
+ }), se = v(() => {
4042
4042
  let e = f.value;
4043
4043
  if (!e?.data.length || e.chartType !== "line") return [];
4044
4044
  let t = e.data.length - 1, n = e.data[t];
@@ -4051,7 +4051,7 @@ var Pr = [
4051
4051
  seriesIndex: i
4052
4052
  };
4053
4053
  }).filter((e) => e !== null);
4054
- }), ue = v(() => {
4054
+ }), ce = v(() => {
4055
4055
  let e = m.value;
4056
4056
  if (!e) return [];
4057
4057
  let t = e.data.map((t) => ({
@@ -4067,17 +4067,17 @@ var Pr = [
4067
4067
  series: r
4068
4068
  })
4069
4069
  }));
4070
- }), de = v(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), pe = [
4070
+ }), ue = v(() => c.value ? layoutChatDiagram(c.value, { maxWidth: r.value }) : null), de = [
4071
4071
  "var(--color-theme-900)",
4072
4072
  "var(--color-primary-500)",
4073
4073
  "color-mix(in oklch, var(--color-primary-500) 55%, var(--color-theme-500))"
4074
- ], he = [
4074
+ ], pe = [
4075
4075
  "rgba(255, 255, 255, 0.92)",
4076
4076
  "color-mix(in oklch, white 30%, var(--color-primary-500))",
4077
4077
  "rgba(255, 255, 255, 0.55)"
4078
4078
  ];
4079
4079
  function seriesColor(e) {
4080
- let n = t.inverted ? he : pe;
4080
+ let n = t.inverted ? pe : de;
4081
4081
  return n[e % n.length];
4082
4082
  }
4083
4083
  function diagramNodeFill(e) {
@@ -4086,8 +4086,8 @@ var Pr = [
4086
4086
  function diagramNodeStroke(e) {
4087
4087
  return t.inverted ? "rgba(255, 255, 255, 0.22)" : ye.value;
4088
4088
  }
4089
- let U = v(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), _e = v(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), W = v(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = v(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = v(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ye = v(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), K = v(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), be = v(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Se = v(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Ce = v(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4090
- return (e, r) => o.value ? (P(), x("section", {
4089
+ let he = v(() => t.inverted ? "rgba(255, 255, 255, 0.95)" : "var(--color-theme-900)"), _e = v(() => t.inverted ? "rgba(255, 255, 255, 0.6)" : "var(--color-theme-500)"), W = v(() => t.inverted ? "rgba(255, 255, 255, 0.45)" : "color-mix(in oklch, var(--color-theme-900) 42%, transparent)"), ve = v(() => t.inverted ? "rgba(255, 255, 255, 0.1)" : "color-mix(in oklch, var(--color-theme-900) 8%, transparent)"), G = v(() => t.inverted ? "rgba(255, 255, 255, 0.24)" : "color-mix(in oklch, var(--color-theme-900) 18%, transparent)"), ye = v(() => t.inverted ? "rgba(255, 255, 255, 0.16)" : "color-mix(in oklch, var(--color-theme-300) 55%, transparent)"), K = v(() => t.inverted ? "rgba(255, 255, 255, 0.14)" : "color-mix(in oklch, var(--color-theme-900) 10%, transparent)"), be = v(() => t.inverted ? "transparent" : "var(--color-theme-0)"), Se = v(() => t.inverted ? "rgba(255, 255, 255, 0.18)" : "color-mix(in oklch, var(--color-theme-900) 16%, transparent)"), Ce = v(() => t.inverted ? "rgba(255, 255, 255, 0.12)" : "color-mix(in oklch, var(--color-theme-900) 9%, transparent)");
4090
+ return (e, r) => o.value ? (F(), x("section", {
4091
4091
  key: 0,
4092
4092
  "data-test": "chat-visual",
4093
4093
  "data-visual-type": o.value.visualType,
@@ -4101,32 +4101,32 @@ var Pr = [
4101
4101
  }),
4102
4102
  "aria-label": o.value.meta.title
4103
4103
  }, [
4104
- S("header", Fr, [S("h4", {
4104
+ S("header", Lr, [S("h4", {
4105
4105
  class: "text-[13px] font-semibold leading-tight",
4106
- style: M({ color: U.value })
4107
- }, H(o.value.meta.title), 5), o.value.meta.description ? (P(), x("p", {
4106
+ style: M({ color: he.value })
4107
+ }, U(o.value.meta.title), 5), o.value.meta.description ? (F(), x("p", {
4108
4108
  key: 0,
4109
4109
  class: "mt-0.5 text-[12px] leading-snug",
4110
4110
  style: M({ color: _e.value })
4111
- }, H(o.value.meta.description), 5)) : b("", !0)]),
4111
+ }, U(o.value.meta.description), 5)) : b("", !0)]),
4112
4112
  S("div", {
4113
4113
  ref_key: "bodyEl",
4114
4114
  ref: n
4115
- }, [f.value ? (P(), x("div", {
4115
+ }, [f.value ? (F(), x("div", {
4116
4116
  key: 0,
4117
4117
  role: "img",
4118
4118
  "aria-label": o.value.meta.title
4119
- }, [R.value.length ? (P(), x("div", Lr, [(P(!0), x(h, null, I(R.value, (e) => (P(), x("div", {
4119
+ }, [B.value.length ? (F(), x("div", zr, [(F(!0), x(h, null, R(B.value, (e) => (F(), x("div", {
4120
4120
  key: e.key,
4121
4121
  "data-test": "chat-visual-horizontal-bar",
4122
4122
  class: "min-w-0"
4123
- }, [S("div", Rr, [S("span", {
4123
+ }, [S("div", Br, [S("span", {
4124
4124
  class: "line-clamp-2 min-w-0 font-medium leading-snug",
4125
- style: M({ color: U.value })
4126
- }, H(e.label), 5), S("span", {
4125
+ style: M({ color: he.value })
4126
+ }, U(e.label), 5), S("span", {
4127
4127
  class: "shrink-0 font-semibold tabular-nums",
4128
- style: M({ color: U.value })
4129
- }, H(e.value), 5)]), S("div", {
4128
+ style: M({ color: he.value })
4129
+ }, U(e.value), 5)]), S("div", {
4130
4130
  class: "h-2 w-full overflow-hidden rounded-full",
4131
4131
  style: M({ background: Ce.value })
4132
4132
  }, [S("div", {
@@ -4135,7 +4135,7 @@ var Pr = [
4135
4135
  width: `${e.width}%`,
4136
4136
  background: seriesColor(e.seriesIndex)
4137
4137
  })
4138
- }, null, 4)], 4)]))), 128))])) : (P(), x("svg", {
4138
+ }, null, 4)], 4)]))), 128))])) : (F(), x("svg", {
4139
4139
  key: 1,
4140
4140
  class: "block h-auto w-full overflow-visible",
4141
4141
  viewBox: `0 0 ${A.value.width} ${A.value.height}`,
@@ -4143,7 +4143,7 @@ var Pr = [
4143
4143
  preserveAspectRatio: "xMidYMid meet",
4144
4144
  "aria-hidden": "true"
4145
4145
  }, [
4146
- (P(!0), x(h, null, I(C.value.ticks, (e) => (P(), x("line", {
4146
+ (F(!0), x(h, null, R(C.value.ticks, (e) => (F(), x("line", {
4147
4147
  key: `grid-${e}`,
4148
4148
  x1: A.value.left,
4149
4149
  x2: A.value.width - A.value.right,
@@ -4152,19 +4152,19 @@ var Pr = [
4152
4152
  "stroke-width": "1",
4153
4153
  "vector-effect": "non-scaling-stroke",
4154
4154
  style: M({ stroke: e === 0 ? G.value : ve.value })
4155
- }, null, 12, Br))), 128)),
4156
- S("g", null, [(P(!0), x(h, null, I(C.value.ticks, (e) => (P(), x("text", {
4155
+ }, null, 12, Hr))), 128)),
4156
+ S("g", null, [(F(!0), x(h, null, R(C.value.ticks, (e) => (F(), x("text", {
4157
4157
  key: `y-${e}`,
4158
4158
  x: A.value.left - 7,
4159
4159
  y: yForValue(e) + 3,
4160
4160
  "text-anchor": "end",
4161
4161
  "font-size": "9.5",
4162
4162
  style: M({ fill: W.value })
4163
- }, H(oe(formatChatVisualTick)({
4163
+ }, U(ae(formatChatVisualTick)({
4164
4164
  value: e,
4165
4165
  shared: T.value
4166
- })), 13, Vr))), 128))]),
4167
- f.value.chartType === "bar" ? (P(!0), x(h, { key: 0 }, I(ie.value, (e) => (P(), x("rect", {
4166
+ })), 13, Ur))), 128))]),
4167
+ f.value.chartType === "bar" ? (F(!0), x(h, { key: 0 }, R(re.value, (e) => (F(), x("rect", {
4168
4168
  key: e.key,
4169
4169
  "data-test": "chat-visual-bar",
4170
4170
  "data-row-index": e.rowIndex,
@@ -4176,8 +4176,8 @@ var Pr = [
4176
4176
  height: e.height,
4177
4177
  rx: "2.5",
4178
4178
  style: M({ fill: seriesColor(e.seriesIndex) })
4179
- }, null, 12, Hr))), 128)) : (P(), x(h, { key: 1 }, [
4180
- j.value ? (P(), x("path", {
4179
+ }, null, 12, Wr))), 128)) : (F(), x(h, { key: 1 }, [
4180
+ j.value ? (F(), x("path", {
4181
4181
  key: 0,
4182
4182
  "data-test": "chat-visual-trend-line",
4183
4183
  "data-trend-key": j.value.dataKey,
@@ -4189,8 +4189,8 @@ var Pr = [
4189
4189
  "stroke-dasharray": "4 3",
4190
4190
  "vector-effect": "non-scaling-stroke",
4191
4191
  style: M({ stroke: seriesColor(j.value.seriesIndex) })
4192
- }, null, 12, Ur)) : b("", !0),
4193
- (P(!0), x(h, null, I(p.value, (e, t) => (P(), x("g", { key: e.dataKey }, [f.value.chartType === "line" ? (P(), x("path", {
4192
+ }, null, 12, Gr)) : b("", !0),
4193
+ (F(!0), x(h, null, R(p.value, (e, t) => (F(), x("g", { key: e.dataKey }, [f.value.chartType === "line" ? (F(), x("path", {
4194
4194
  key: 0,
4195
4195
  d: pathForSeries(e.dataKey),
4196
4196
  fill: "none",
@@ -4199,31 +4199,31 @@ var Pr = [
4199
4199
  "stroke-linejoin": "round",
4200
4200
  "vector-effect": "non-scaling-stroke",
4201
4201
  style: M({ stroke: seriesColor(t) })
4202
- }, null, 12, Wr)) : b("", !0), (P(!0), x(h, null, I(u.value, (n, r) => (P(), x(h, { key: `${e.dataKey}-${r}` }, [f.value.chartType === "scatter" ? (P(), x("circle", {
4202
+ }, null, 12, Kr)) : b("", !0), (F(!0), x(h, null, R(u.value, (n, r) => (F(), x(h, { key: `${e.dataKey}-${r}` }, [f.value.chartType === "scatter" ? (F(), x("circle", {
4203
4203
  key: 0,
4204
4204
  cx: xForIndex(r, u.value.length),
4205
4205
  cy: yForValue(numericValue(n[e.dataKey]) ?? 0),
4206
4206
  r: "2.6",
4207
4207
  style: M({ fill: seriesColor(t) })
4208
- }, null, 12, Gr)) : b("", !0)], 64))), 128))]))), 128)),
4209
- (P(!0), x(h, null, I(ce.value, (e) => (P(), x("circle", {
4208
+ }, null, 12, qr)) : b("", !0)], 64))), 128))]))), 128)),
4209
+ (F(!0), x(h, null, R(se.value, (e) => (F(), x("circle", {
4210
4210
  key: `marker-${e.key}`,
4211
4211
  cx: e.cx,
4212
4212
  cy: e.cy,
4213
4213
  r: "3",
4214
4214
  style: M({ fill: seriesColor(e.seriesIndex) })
4215
- }, null, 12, Kr))), 128))
4215
+ }, null, 12, Jr))), 128))
4216
4216
  ], 64)),
4217
- (P(!0), x(h, null, I(ae.value, (e) => (P(), x("text", {
4217
+ (F(!0), x(h, null, R(ie.value, (e) => (F(), x("text", {
4218
4218
  key: e.key,
4219
4219
  x: e.x,
4220
4220
  y: e.angled ? A.value.height - A.value.bottom + 12 : A.value.height - 6,
4221
4221
  "text-anchor": e.anchor,
4222
4222
  "font-size": "9.5",
4223
- transform: e.angled ? `rotate(${oe(-40)} ${e.x} ${A.value.height - A.value.bottom + 12})` : void 0,
4223
+ transform: e.angled ? `rotate(${ae(-40)} ${e.x} ${A.value.height - A.value.bottom + 12})` : void 0,
4224
4224
  style: M({ fill: W.value })
4225
- }, H(e.label), 13, qr))), 128))
4226
- ], 12, zr)), se.value.length > 1 || f.value.chartType !== "bar" ? (P(), x("div", Jr, [(P(!0), x(h, null, I(se.value, (e) => (P(), x("div", {
4225
+ }, U(e.label), 13, Yr))), 128))
4226
+ ], 12, Vr)), oe.value.length > 1 || f.value.chartType !== "bar" ? (F(), x("div", Xr, [(F(!0), x(h, null, R(oe.value, (e) => (F(), x("div", {
4227
4227
  key: e.key,
4228
4228
  class: "inline-flex items-center gap-1.5 text-[11.5px] leading-none"
4229
4229
  }, [
@@ -4231,21 +4231,21 @@ var Pr = [
4231
4231
  class: "size-2.5 shrink-0 rounded-full",
4232
4232
  style: M({ background: seriesColor(e.seriesIndex) })
4233
4233
  }, null, 4),
4234
- S("span", { style: M({ color: _e.value }) }, H(e.label), 5),
4234
+ S("span", { style: M({ color: _e.value }) }, U(e.label), 5),
4235
4235
  S("span", {
4236
4236
  class: "font-semibold tabular-nums",
4237
- style: M({ color: U.value })
4238
- }, H(e.value), 5)
4239
- ]))), 128))])) : b("", !0)], 8, Ir)) : m.value ? (P(), x("div", Yr, [(P(!0), x(h, null, I(ue.value, (e, t) => (P(), x("div", { key: e.key }, [S("div", Xr, [S("span", {
4237
+ style: M({ color: he.value })
4238
+ }, U(e.value), 5)
4239
+ ]))), 128))])) : b("", !0)], 8, Rr)) : m.value ? (F(), x("div", Zr, [(F(!0), x(h, null, R(ce.value, (e, t) => (F(), x("div", { key: e.key }, [S("div", Qr, [S("span", {
4240
4240
  class: "truncate font-medium",
4241
- style: M({ color: U.value })
4242
- }, H(e.name), 5), S("span", Zr, [S("span", {
4241
+ style: M({ color: he.value })
4242
+ }, U(e.name), 5), S("span", $r, [S("span", {
4243
4243
  class: "font-semibold",
4244
- style: M({ color: U.value })
4245
- }, H(e.display), 5), S("span", {
4244
+ style: M({ color: he.value })
4245
+ }, U(e.display), 5), S("span", {
4246
4246
  class: "ml-1.5",
4247
4247
  style: M({ color: _e.value })
4248
- }, H(Math.round(e.percent * 100)) + "%", 5)])]), S("div", {
4248
+ }, U(Math.round(e.percent * 100)) + "%", 5)])]), S("div", {
4249
4249
  class: "h-1.5 w-full overflow-hidden rounded-full",
4250
4250
  style: M({ background: Ce.value })
4251
4251
  }, [S("div", {
@@ -4254,18 +4254,18 @@ var Pr = [
4254
4254
  width: `${Math.max(2, e.percent * 100)}%`,
4255
4255
  background: seriesColor(t)
4256
4256
  })
4257
- }, null, 4)], 4)]))), 128))])) : c.value && de.value ? (P(), x("div", Qr, [(P(), x("svg", {
4257
+ }, null, 4)], 4)]))), 128))])) : c.value && ue.value ? (F(), x("div", ei, [(F(), x("svg", {
4258
4258
  "data-test": "chat-visual-diagram-svg",
4259
4259
  class: "block h-auto overflow-visible",
4260
- viewBox: `0 0 ${de.value.width} ${de.value.height}`,
4260
+ viewBox: `0 0 ${ue.value.width} ${ue.value.height}`,
4261
4261
  style: M({
4262
- width: `${de.value.width}px`,
4263
- aspectRatio: `${de.value.width} / ${de.value.height}`
4262
+ width: `${ue.value.width}px`,
4263
+ aspectRatio: `${ue.value.width} / ${ue.value.height}`
4264
4264
  }),
4265
4265
  role: "img",
4266
4266
  "aria-label": o.value.meta.title
4267
4267
  }, [
4268
- (P(!0), x(h, null, I(de.value.edges, (e) => (P(), x("line", {
4268
+ (F(!0), x(h, null, R(ue.value.edges, (e) => (F(), x("line", {
4269
4269
  key: e.key,
4270
4270
  "data-test": "chat-visual-diagram-edge",
4271
4271
  "data-from": e.from,
@@ -4278,15 +4278,15 @@ var Pr = [
4278
4278
  "stroke-linecap": "round",
4279
4279
  "vector-effect": "non-scaling-stroke",
4280
4280
  style: M({ stroke: Se.value })
4281
- }, null, 12, ei))), 128)),
4282
- (P(!0), x(h, null, I(de.value.edges, (e) => (P(), x("circle", {
4281
+ }, null, 12, ni))), 128)),
4282
+ (F(!0), x(h, null, R(ue.value.edges, (e) => (F(), x("circle", {
4283
4283
  key: `${e.key}-dot`,
4284
4284
  cx: e.x2,
4285
4285
  cy: e.y2,
4286
4286
  r: "2.4",
4287
4287
  style: M({ fill: Se.value })
4288
- }, null, 12, ti))), 128)),
4289
- (P(!0), x(h, null, I(de.value.edges.filter((e) => e.label), (e) => (P(), x("foreignObject", {
4288
+ }, null, 12, ri))), 128)),
4289
+ (F(!0), x(h, null, R(ue.value.edges.filter((e) => e.label), (e) => (F(), x("foreignObject", {
4290
4290
  key: `${e.key}-label`,
4291
4291
  x: e.labelX - 55,
4292
4292
  y: e.labelY - 12,
@@ -4299,14 +4299,14 @@ var Pr = [
4299
4299
  color: _e.value,
4300
4300
  background: t.inverted ? "var(--color-theme-900)" : "var(--color-theme-0)"
4301
4301
  })
4302
- }, H(e.label), 5)], 8, ni))), 128)),
4303
- (P(!0), x(h, null, I(de.value.nodes, (e) => (P(), x("g", {
4302
+ }, U(e.label), 5)], 8, ii))), 128)),
4303
+ (F(!0), x(h, null, R(ue.value.nodes, (e) => (F(), x("g", {
4304
4304
  key: e.id,
4305
4305
  "data-test": "chat-visual-diagram-node",
4306
4306
  "data-node-id": e.id,
4307
4307
  "data-node-kind": e.kind,
4308
4308
  transform: `translate(${e.x} ${e.y})`
4309
- }, [e.kind === "decision" ? (P(), x("polygon", {
4309
+ }, [e.kind === "decision" ? (F(), x("polygon", {
4310
4310
  key: 0,
4311
4311
  points: `${e.width / 2},0 ${e.width},${e.height / 2} ${e.width / 2},${e.height} 0,${e.height / 2}`,
4312
4312
  "stroke-width": "1",
@@ -4315,7 +4315,7 @@ var Pr = [
4315
4315
  fill: diagramNodeFill(e.kind),
4316
4316
  stroke: diagramNodeStroke(e.kind)
4317
4317
  })
4318
- }, null, 12, ii)) : (P(), x("rect", {
4318
+ }, null, 12, oi)) : (F(), x("rect", {
4319
4319
  key: 1,
4320
4320
  width: e.width,
4321
4321
  height: e.height,
@@ -4326,28 +4326,28 @@ var Pr = [
4326
4326
  fill: diagramNodeFill(e.kind),
4327
4327
  stroke: diagramNodeStroke(e.kind)
4328
4328
  })
4329
- }, null, 12, ai)), (P(), x("foreignObject", {
4329
+ }, null, 12, si)), (F(), x("foreignObject", {
4330
4330
  x: "8",
4331
4331
  y: "5",
4332
4332
  width: e.width - 16,
4333
4333
  height: e.height - 10
4334
- }, [S("div", si, [S("div", {
4334
+ }, [S("div", li, [S("div", {
4335
4335
  class: "line-clamp-2 text-[13px] font-medium leading-snug",
4336
- style: M({ color: U.value })
4337
- }, H(e.label), 5), e.detail ? (P(), x("div", {
4336
+ style: M({ color: he.value })
4337
+ }, U(e.label), 5), e.detail ? (F(), x("div", {
4338
4338
  key: 0,
4339
4339
  class: "mt-0.5 line-clamp-1 text-[10.5px] leading-none",
4340
4340
  style: M({ color: _e.value })
4341
- }, H(e.detail), 5)) : b("", !0)])], 8, oi))], 8, ri))), 128))
4342
- ], 12, $r))])) : b("", !0)], 512),
4343
- o.value.meta.footer ? (P(), x("footer", {
4341
+ }, U(e.detail), 5)) : b("", !0)])], 8, ci))], 8, ai))), 128))
4342
+ ], 12, ti))])) : b("", !0)], 512),
4343
+ o.value.meta.footer ? (F(), x("footer", {
4344
4344
  key: 0,
4345
4345
  class: "mt-3 text-[11px] leading-snug",
4346
4346
  style: M({ color: W.value })
4347
- }, H(o.value.meta.footer), 5)) : b("", !0)
4348
- ], 12, Pr)) : b("", !0);
4347
+ }, U(o.value.meta.footer), 5)) : b("", !0)
4348
+ ], 12, Ir)) : b("", !0);
4349
4349
  }
4350
- }), li = ["innerHTML"], ui = /* @__PURE__ */ k({
4350
+ }), di = ["innerHTML"], fi = /* @__PURE__ */ k({
4351
4351
  __name: "ChatRichText",
4352
4352
  props: {
4353
4353
  text: {},
@@ -4356,8 +4356,8 @@ var Pr = [
4356
4356
  },
4357
4357
  emits: ["action"],
4358
4358
  setup(e, { emit: t }) {
4359
- let n = e, r = t, i = B(n.text), a;
4360
- ue([() => n.text, () => n.streaming], ([e, t]) => {
4359
+ let n = e, r = t, i = H(n.text), a;
4360
+ ce([() => n.text, () => n.streaming], ([e, t]) => {
4361
4361
  if (!t) {
4362
4362
  a !== void 0 && (cancelAnimationFrame(a), a = void 0), i.value = e;
4363
4363
  return;
@@ -4365,7 +4365,7 @@ var Pr = [
4365
4365
  a === void 0 && (a = requestAnimationFrame(() => {
4366
4366
  a = void 0, i.value = n.text;
4367
4367
  }));
4368
- }), ne(() => {
4368
+ }), P(() => {
4369
4369
  a !== void 0 && cancelAnimationFrame(a);
4370
4370
  });
4371
4371
  let o = new g.Renderer();
@@ -4387,7 +4387,7 @@ var Pr = [
4387
4387
  function renderMarkdown(e) {
4388
4388
  if (!e) return "";
4389
4389
  let t = g.parse(e, { async: !1 });
4390
- return nn.sanitize(t, {
4390
+ return an.sanitize(t, {
4391
4391
  ADD_ATTR: ["target"],
4392
4392
  ADD_DATA_URI_TAGS: ["img"]
4393
4393
  });
@@ -4518,23 +4518,23 @@ var Pr = [
4518
4518
  streaming: !!n.streaming
4519
4519
  }) : [];
4520
4520
  });
4521
- return (t, n) => (P(), x("div", {
4521
+ return (t, n) => (F(), x("div", {
4522
4522
  class: "chat-msg-rich break-words text-[14px] leading-[1.55] @sm/chat:max-w-[55ch] @sm/chat:text-[15px] @sm/chat:leading-[1.5]",
4523
4523
  onErrorCapture: onRichTextAssetError
4524
- }, [(P(!0), x(h, null, I(c.value, (t) => (P(), x(h, { key: t.key }, [t.kind === "markdown" ? (P(), x("div", {
4524
+ }, [(F(!0), x(h, null, R(c.value, (t) => (F(), x(h, { key: t.key }, [t.kind === "markdown" ? (F(), x("div", {
4525
4525
  key: 0,
4526
4526
  class: j(["chat-msg-prose", e.inverted ? "chat-msg-prose-invert" : ""]),
4527
4527
  innerHTML: t.html
4528
- }, null, 10, li)) : t.kind === "visual" ? (P(), te(ci, {
4528
+ }, null, 10, di)) : t.kind === "visual" ? (F(), te(ui, {
4529
4529
  key: 1,
4530
4530
  result: t.result,
4531
4531
  inverted: e.inverted
4532
- }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (P(), te(Cr, {
4532
+ }, null, 8, ["result", "inverted"])) : t.kind === "card" ? (F(), te(Tr, {
4533
4533
  key: 2,
4534
4534
  spec: t.spec,
4535
4535
  inverted: e.inverted,
4536
4536
  onAction: n[0] || (n[0] = (e) => r("action", e))
4537
- }, null, 8, ["spec", "inverted"])) : (P(), x("div", {
4537
+ }, null, 8, ["spec", "inverted"])) : (F(), x("div", {
4538
4538
  key: 3,
4539
4539
  "data-test": "chat-visual-pending",
4540
4540
  role: "status",
@@ -4549,20 +4549,20 @@ var Pr = [
4549
4549
  style: { background: "currentcolor" }
4550
4550
  }, null, -1), C(" Preparing chart… ", -1)])], 4))], 64))), 128))], 32));
4551
4551
  }
4552
- }), di = 80, fi = 600, pi = /* @__PURE__ */ k({
4552
+ }), pi = 80, mi = 600, hi = /* @__PURE__ */ k({
4553
4553
  __name: "ChatScroller",
4554
4554
  setup(e, { expose: t }) {
4555
- let n = F(), r = F(), i = F(!0), a, o, s = 0;
4555
+ let n = I(), r = I(), i = I(!0), a, o, s = 0;
4556
4556
  function scrollToBottom() {
4557
4557
  let e = n.value;
4558
4558
  e && (e.scrollTop = e.scrollHeight);
4559
4559
  }
4560
4560
  function onScroll() {
4561
4561
  let e = n.value;
4562
- e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= di);
4562
+ e && (i.value = e.scrollHeight - e.scrollTop - e.clientHeight <= pi);
4563
4563
  }
4564
4564
  function markUserGesture() {
4565
- s = Date.now() + fi;
4565
+ s = Date.now() + mi;
4566
4566
  }
4567
4567
  function followPinned() {
4568
4568
  i.value && Date.now() > s && scrollToBottom();
@@ -4572,16 +4572,16 @@ var Pr = [
4572
4572
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4573
4573
  });
4574
4574
  }
4575
- return t({ pin }), re(() => {
4575
+ return t({ pin }), ne(() => {
4576
4576
  requestAnimationFrame(() => {
4577
4577
  scrollToBottom(), requestAnimationFrame(scrollToBottom);
4578
4578
  }), r.value && (a = new ResizeObserver(followPinned), a.observe(r.value), n.value && a.observe(n.value), o = new MutationObserver(followPinned), o.observe(r.value, {
4579
4579
  childList: !0,
4580
4580
  subtree: !0
4581
4581
  }));
4582
- }), ne(() => {
4582
+ }), P(() => {
4583
4583
  a?.disconnect(), o?.disconnect();
4584
- }), (e, t) => (P(), x("div", {
4584
+ }), (e, t) => (F(), x("div", {
4585
4585
  ref_key: "viewport",
4586
4586
  ref: n,
4587
4587
  class: j(["overflow-y-auto overscroll-contain overflow-x-hidden min-h-0 flex flex-col [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden", i.value ? "[overflow-anchor:none]" : ""]),
@@ -4592,9 +4592,9 @@ var Pr = [
4592
4592
  ref_key: "content",
4593
4593
  ref: r,
4594
4594
  class: "flex-1 flex flex-col"
4595
- }, [ae(e.$slots, "default")], 512)], 34));
4595
+ }, [ie(e.$slots, "default")], 512)], 34));
4596
4596
  }
4597
- }), mi = {
4597
+ }), gi = {
4598
4598
  VOICE_MIC_UNAVAILABLE: "I couldn't reach your microphone. Check that this site is allowed to use it, then try again.",
4599
4599
  VOICE_AGENT_UNAVAILABLE: "Your assistant didn't pick up. Give it a moment and start the call again.",
4600
4600
  VOICE_CONNECT_TIMEOUT: "The call took too long to connect. Try again in a moment.",
@@ -4602,21 +4602,21 @@ var Pr = [
4602
4602
  VOICE_UNAVAILABLE: "Voice isn't available right now. You can keep going by typing.",
4603
4603
  VOICE_MINT_INVALID: "That call couldn't be started. Refresh the page and try again.",
4604
4604
  VOICE_PROVIDER_ERROR: "The call ended unexpectedly. Try again, or keep going by typing."
4605
- }, hi = "The call ended unexpectedly. Try again, or keep going by typing.";
4605
+ }, _i = "The call ended unexpectedly. Try again, or keep going by typing.";
4606
4606
  function voiceErrorMessage(e) {
4607
- return e && mi[e] || hi;
4607
+ return e && gi[e] || _i;
4608
4608
  }
4609
4609
  //#endregion
4610
4610
  //#region agent/ui/VoiceHistogramController.ts
4611
- var gi = [
4611
+ var vi = [
4612
4612
  0,
4613
4613
  2,
4614
4614
  4,
4615
4615
  6,
4616
4616
  8
4617
- ], _i = 5, vi = 33, yi = .7, bi = .1, xi = 60, Si = 320, Ci = .55, wi = .1, Ti = .32, Ei = .9, Di = gi.map(() => 0), Oi = gi.map(() => _i), VoiceHistogramController = class {
4617
+ ], yi = 5, bi = 33, xi = .7, Si = .1, Ci = 60, wi = 320, Ti = .55, Ei = .1, Di = .32, Oi = .9, ki = vi.map(() => 0), Ai = vi.map(() => yi), VoiceHistogramController = class {
4618
4618
  constructor(e = typeof window > "u" ? void 0 : window) {
4619
- t(this, "browser", void 0), t(this, "heights", B(Oi)), t(this, "targetBars", Di), t(this, "displayBars", Di), t(this, "level", {
4619
+ t(this, "browser", void 0), t(this, "heights", H(Ai)), t(this, "targetBars", ki), t(this, "displayBars", ki), t(this, "level", {
4620
4620
  source: "mic",
4621
4621
  level: 0
4622
4622
  }), t(this, "isMuted", !1), t(this, "usesIdleWave", !1), t(this, "frameId", 0), t(this, "lastFrameAt", 0), t(this, "easeFrame", (e) => {
@@ -4625,12 +4625,12 @@ var gi = [
4625
4625
  this.frameId = 0;
4626
4626
  let n = Math.min(64, Math.max(0, e - this.lastFrameAt));
4627
4627
  this.lastFrameAt = e;
4628
- let r = this.usesIdleWave ? gi.map((t, n) => {
4629
- let r = e / 1e3 * Ci * 2 * Math.PI - n * Ei;
4630
- return wi + Ti * (Math.sin(r) + 1) / 2;
4628
+ let r = this.usesIdleWave ? vi.map((t, n) => {
4629
+ let r = e / 1e3 * Ti * 2 * Math.PI - n * Oi;
4630
+ return Ei + Di * (Math.sin(r) + 1) / 2;
4631
4631
  }) : this.targetBars;
4632
4632
  this.displayBars = this.displayBars.map((e, t) => {
4633
- let i = r[t] ?? 0, a = i > e ? xi : Si;
4633
+ let i = r[t] ?? 0, a = i > e ? Ci : wi;
4634
4634
  return e + (i - e) * (1 - Math.exp(-n / a));
4635
4635
  }), this.publish();
4636
4636
  let i = this.displayBars.every((e, t) => Math.abs((r[t] ?? 0) - e) <= 5e-4);
@@ -4650,20 +4650,20 @@ var gi = [
4650
4650
  this.frameId && this.browser?.cancelAnimationFrame(this.frameId), this.frameId = 0;
4651
4651
  }
4652
4652
  updateTargets() {
4653
- let gate = (e) => Math.max(0, e - bi) / (1 - bi), e = this.isMuted && this.level.source === "mic";
4654
- this.targetBars = gi.map((t) => e ? 0 : gate(Math.min(1, Math.max(0, this.level.bands?.[t] ?? this.level.level)))), this.start();
4653
+ let gate = (e) => Math.max(0, e - Si) / (1 - Si), e = this.isMuted && this.level.source === "mic";
4654
+ this.targetBars = vi.map((t) => e ? 0 : gate(Math.min(1, Math.max(0, this.level.bands?.[t] ?? this.level.level)))), this.start();
4655
4655
  }
4656
4656
  start() {
4657
4657
  if (!this.browser || this.browser.matchMedia("(prefers-reduced-motion: reduce)").matches) {
4658
- this.displayBars = this.usesIdleWave ? Di : this.targetBars, this.publish();
4658
+ this.displayBars = this.usesIdleWave ? ki : this.targetBars, this.publish();
4659
4659
  return;
4660
4660
  }
4661
4661
  this.frameId || (this.lastFrameAt = this.browser.performance.now(), this.frameId = this.browser.requestAnimationFrame(this.easeFrame));
4662
4662
  }
4663
4663
  publish() {
4664
- this.heights.value = this.displayBars.map((e) => Math.round((_i + Math.min(1, Math.max(0, e)) ** yi * vi) * 10) / 10);
4664
+ this.heights.value = this.displayBars.map((e) => Math.round((yi + Math.min(1, Math.max(0, e)) ** xi * bi) * 10) / 10);
4665
4665
  }
4666
- }, ki = {
4666
+ }, ji = {
4667
4667
  connecting: {
4668
4668
  label: "Connecting",
4669
4669
  tone: "bg-amber-500",
@@ -4677,7 +4677,8 @@ var gi = [
4677
4677
  thinking: {
4678
4678
  label: "Thinking",
4679
4679
  tone: "bg-amber-500",
4680
- waits: !0
4680
+ waits: !0,
4681
+ visibleText: "Thinking"
4681
4682
  },
4682
4683
  working: {
4683
4684
  label: "Working",
@@ -4700,47 +4701,44 @@ function deriveActivity(e) {
4700
4701
  return e.hadError ? "error" : e.sessionState === "live" ? e.speaking.agent ? "speaking" : e.speaking.user ? "listening" : e.work.active ? "working" : e.providerThinking ? "thinking" : "listening" : "connecting";
4701
4702
  }
4702
4703
  function deriveVoiceModePresentation(e) {
4703
- let t = deriveActivity(e), n = ki[t], r = t === "working" ? e.work.description || "Working on it" : n.label;
4704
+ let t = deriveActivity(e), n = ji[t], r = t === "working" ? e.work.description || "Working on it" : n.label, i = t === "working" ? r : n.visibleText ?? "", a = e.takingLonger && (t === "thinking" || t === "working"), o = a ? `${i} ${K.slowHint}` : i;
4704
4705
  return {
4705
4706
  activity: t,
4706
- label: r,
4707
+ label: a ? o : r,
4707
4708
  tone: e.isMuted && t === "listening" ? "bg-theme-400" : n.tone,
4708
- visibleStatus: t === "working" ? r : n.visibleText ?? "",
4709
- usesIdleWave: n.waits || e.isMuted && t === "listening"
4709
+ visibleStatus: o,
4710
+ usesIdleWave: n.waits || e.isMuted && t === "listening",
4711
+ takingLonger: a
4710
4712
  };
4711
4713
  }
4712
4714
  //#endregion
4713
4715
  //#region agent/ui/VoiceMode.vue?vue&type=script&setup=true&lang.ts
4714
- var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4716
+ var Mi = ["data-voice-state", "data-voice-activity"], Ni = ["src"], Pi = {
4715
4717
  key: 1,
4716
4718
  "data-test": "voice-background-fallback",
4717
4719
  "aria-hidden": "true",
4718
4720
  class: "pointer-events-none absolute inset-0 bg-[#0A1522]"
4719
- }, Ni = {
4721
+ }, Fi = {
4720
4722
  "data-test": "voice-stage",
4721
4723
  class: "relative z-10 flex flex-1 flex-col items-center px-8"
4722
- }, Pi = { "data-voice-assistant-avatar": "" }, Fi = {
4724
+ }, Ii = { "data-voice-assistant-avatar": "" }, Li = {
4723
4725
  "data-test": "voice-lower-stage",
4724
4726
  class: "flex flex-1 flex-col items-center pt-10"
4725
- }, Ii = {
4727
+ }, Ri = {
4726
4728
  "data-test": "voice-histogram",
4727
4729
  "aria-hidden": "true",
4728
4730
  class: "flex h-[38px] items-center gap-[5px]"
4729
- }, Li = {
4731
+ }, zi = {
4730
4732
  "data-test": "voice-presence-status",
4731
4733
  role: "status",
4732
4734
  "aria-live": "polite",
4733
4735
  class: "sr-only"
4734
- }, Ri = {
4735
- "data-test": "voice-visible-status",
4736
- "aria-hidden": "true",
4737
- class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
4738
- }, zi = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Bi = [
4736
+ }, Bi = ["data-taking-longer"], Vi = { class: "absolute inset-x-0 bottom-0 z-20 flex items-center justify-between px-14 pb-[max(3rem,env(safe-area-inset-bottom))] sm:px-12" }, Hi = [
4739
4737
  "disabled",
4740
4738
  "aria-label",
4741
4739
  "aria-pressed",
4742
4740
  "title"
4743
- ], Vi = /* @__PURE__ */ k({
4741
+ ], Ui = /* @__PURE__ */ k({
4744
4742
  __name: "VoiceMode",
4745
4743
  props: {
4746
4744
  agent: {},
@@ -4750,38 +4748,46 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4750
4748
  },
4751
4749
  emits: ["end"],
4752
4750
  setup(e, { expose: t, emit: n }) {
4753
- let r = n, i = B(!1), a = B(!1), o = B({
4751
+ let r = n, i = H(!1), a = H(!1), o = H({
4754
4752
  user: !1,
4755
4753
  agent: !1
4756
- }), s = B({ active: !1 }), c = B(!1), u = B(), f = v(() => u.value?.state.value ?? "idle"), p = v(() => u.value?.isMuted.value ?? !1), m = new VoiceHistogramController(), _ = m.heights, te = se("endButton"), b = se("muteButton"), C = !1, k, A = v(() => deriveVoiceModePresentation({
4757
- sessionState: f.value,
4754
+ }), s = H({ active: !1 }), c = H(!1), u = H(!1), f = H(), p = v(() => f.value?.state.value ?? "idle"), m = v(() => f.value?.isMuted.value ?? !1), _ = new VoiceHistogramController(), te = _.heights, b = oe("endButton"), C = oe("muteButton"), k = !1, A, P, I = v(() => deriveVoiceModePresentation({
4755
+ sessionState: p.value,
4758
4756
  hadError: i.value,
4759
4757
  providerThinking: a.value,
4760
4758
  speaking: o.value,
4761
4759
  work: s.value,
4762
- isMuted: p.value
4763
- }));
4764
- ue(() => A.value.usesIdleWave, (e) => m.setIdleWave(e), { immediate: !0 }), ue(p, (e) => m.setMuted(e), { immediate: !0 });
4760
+ isMuted: m.value,
4761
+ takingLonger: c.value
4762
+ })), ie = v(() => {
4763
+ if (I.value.activity === "thinking") return "thinking";
4764
+ if (I.value.activity === "working") return `working:${s.value.description ?? ""}`;
4765
+ });
4766
+ ce(() => I.value.usesIdleWave, (e) => _.setIdleWave(e), { immediate: !0 }), ce(m, (e) => _.setMuted(e), { immediate: !0 }), ce(ie, (e) => {
4767
+ P && clearTimeout(P), c.value = !1, e && (P = setTimeout(() => {
4768
+ P = void 0, c.value = !0;
4769
+ }, be), P.unref?.());
4770
+ }, { immediate: !0 });
4765
4771
  async function end() {
4766
- C = !0, await u.value?.end();
4772
+ k = !0, await f.value?.end();
4767
4773
  }
4768
4774
  t({ end });
4769
4775
  function emitEnd() {
4770
- C || (C = !0, r("end"));
4776
+ k || (k = !0, r("end"));
4771
4777
  }
4772
4778
  function trapFocus(e) {
4773
- e.shiftKey && document.activeElement === te.value ? (e.preventDefault(), b.value?.focus()) : !e.shiftKey && document.activeElement === b.value && (e.preventDefault(), te.value?.focus());
4779
+ e.shiftKey && document.activeElement === b.value ? (e.preventDefault(), C.value?.focus()) : !e.shiftKey && document.activeElement === C.value && (e.preventDefault(), b.value?.focus());
4774
4780
  }
4775
4781
  async function toggleMute() {
4776
- let e = u.value;
4777
- !e || c.value || (c.value = !0, await e.toggleMuted(), c.value = !1);
4782
+ let e = f.value;
4783
+ !e || u.value || (u.value = !0, await e.toggleMuted(), u.value = !1);
4778
4784
  }
4779
- return re(async () => {
4780
- te.value?.focus({ preventScroll: !0 });
4785
+ return ne(async () => {
4786
+ b.value?.focus({ preventScroll: !0 });
4781
4787
  let t = e.chatController?.createVoiceClient({
4782
- onLevel: (e) => m.updateLevel(e),
4788
+ onLevel: (e) => _.updateLevel(e),
4783
4789
  onStateChange: (e) => {
4784
- e === "ended" && (i.value ? k = setTimeout(emitEnd, 1600) : emitEnd());
4790
+ e === "ended" && (i.value ? A = setTimeout(emitEnd, 1600) : emitEnd());
4785
4791
  },
4786
4792
  onThinkingChange: (e) => {
4787
4793
  a.value = e;
@@ -4806,17 +4812,17 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4806
4812
  emitEnd();
4807
4813
  return;
4808
4814
  }
4809
- u.value = t, await t.start();
4810
- }), ie(() => {
4811
- C = !0, k && clearTimeout(k), m.stop(), u.value?.end();
4812
- }), (t, n) => (P(), x("div", {
4815
+ f.value = t, await t.start();
4816
+ }), re(() => {
4817
+ k = !0, A && clearTimeout(A), P && clearTimeout(P), _.stop(), f.value?.end();
4818
+ }), (t, n) => (F(), x("div", {
4813
4819
  "data-test": "voice-mode",
4814
- "data-voice-state": f.value,
4815
- "data-voice-activity": A.value.activity,
4820
+ "data-voice-state": p.value,
4821
+ "data-voice-activity": I.value.activity,
4816
4822
  class: "relative flex min-h-0 flex-1 flex-col overflow-hidden bg-[#0A1522] text-white",
4817
- onKeydown: he(trapFocus, ["tab"])
4823
+ onKeydown: pe(trapFocus, ["tab"])
4818
4824
  }, [
4819
- e.backdropSrc ? (P(), x("img", {
4825
+ e.backdropSrc ? (F(), x("img", {
4820
4826
  key: 0,
4821
4827
  "data-test": "voice-background-image",
4822
4828
  src: e.backdropSrc,
@@ -4824,39 +4830,44 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4824
4830
  "aria-hidden": "true",
4825
4831
  draggable: "false",
4826
4832
  class: "pointer-events-none absolute inset-0 size-full object-cover"
4827
- }, null, 8, ji)) : (P(), x("div", Mi)),
4833
+ }, null, 8, Ni)) : (F(), x("div", Pi)),
4828
4834
  n[2] || (n[2] = S("div", {
4829
4835
  "data-test": "voice-background-overlay",
4830
4836
  "aria-hidden": "true",
4831
4837
  class: "pointer-events-none absolute inset-0 bg-gradient-to-b from-[#050F19]/65 via-[#050F19]/75 to-[#050F19]/90"
4832
4838
  }, null, -1)),
4833
- S("div", Ni, [
4839
+ S("div", Fi, [
4834
4840
  n[0] || (n[0] = S("div", {
4835
4841
  "data-test": "voice-stage-spacer",
4836
4842
  "aria-hidden": "true",
4837
4843
  class: "flex-1"
4838
4844
  }, null, -1)),
4839
- S("div", Pi, [T(Ue, {
4845
+ S("div", Ii, [T(Ge, {
4840
4846
  agent: e.agent,
4841
4847
  "show-status": !1,
4842
4848
  "show-owner-mark": !1,
4843
4849
  "is-light": !1,
4844
4850
  class: "size-32"
4845
4851
  }, null, 8, ["agent"])]),
4846
- S("div", Fi, [
4847
- S("div", Ii, [(P(!0), x(h, null, I(oe(_), (e, t) => (P(), x("span", {
4852
+ S("div", Li, [
4853
+ S("div", Ri, [(F(!0), x(h, null, R(ae(te), (e, t) => (F(), x("span", {
4848
4854
  key: t,
4849
4855
  "data-test": "voice-histogram-bar",
4850
- class: j(["w-[5px] rounded-full transition-colors duration-150", A.value.tone]),
4856
+ class: j(["w-[5px] rounded-full transition-colors duration-150", I.value.tone]),
4851
4857
  style: M({ height: `${e}px` })
4852
4858
  }, null, 6))), 128))]),
4853
- S("div", Li, H(A.value.label), 1),
4854
- S("p", Ri, H(A.value.visibleStatus), 1)
4859
+ S("div", zi, U(I.value.label), 1),
4860
+ S("p", {
4861
+ "data-test": "voice-visible-status",
4862
+ "data-taking-longer": I.value.takingLonger || void 0,
4863
+ "aria-hidden": "true",
4864
+ class: "mt-5 min-h-5 text-center text-sm font-medium tracking-wide text-white/80"
4865
+ }, U(I.value.visibleStatus), 9, Bi)
4855
4866
  ])
4856
4867
  ]),
4857
- S("div", zi, [S("button", {
4868
+ S("div", Vi, [S("button", {
4858
4869
  ref_key: "endButton",
4859
- ref: te,
4870
+ ref: b,
4860
4871
  type: "button",
4861
4872
  "data-test": "voice-end-btn",
4862
4873
  class: "flex size-16 cursor-pointer items-center justify-center rounded-full bg-white/10 text-white ring-1 ring-white/20 transition-colors hover:bg-white/15 active:bg-white/25",
@@ -4868,39 +4879,39 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4868
4879
  "aria-hidden": "true"
4869
4880
  }, null, -1)])], 512), S("button", {
4870
4881
  ref_key: "muteButton",
4871
- ref: b,
4882
+ ref: C,
4872
4883
  type: "button",
4873
4884
  "data-test": "voice-mute-btn",
4874
- class: j(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [p.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", f.value === "live" && !c.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
4875
- disabled: f.value !== "live" || c.value,
4876
- "aria-label": p.value ? "Unmute microphone" : "Mute microphone",
4877
- "aria-pressed": p.value,
4878
- title: p.value ? "Unmute microphone" : "Mute microphone",
4885
+ class: j(["flex size-16 items-center justify-center rounded-full ring-1 transition-colors active:opacity-70", [m.value ? "bg-white text-[#050F19] ring-white" : "bg-white/10 text-white ring-white/20", p.value === "live" && !u.value ? "cursor-pointer" : "cursor-default opacity-50"]]),
4886
+ disabled: p.value !== "live" || u.value,
4887
+ "aria-label": m.value ? "Unmute microphone" : "Mute microphone",
4888
+ "aria-pressed": m.value,
4889
+ title: m.value ? "Unmute microphone" : "Mute microphone",
4879
4890
  onClick: toggleMute
4880
4891
  }, [S("i", {
4881
- class: j([p.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[25px]"]),
4892
+ class: j([m.value ? "i-tabler-microphone-off" : "i-tabler-microphone", "size-[25px]"]),
4882
4893
  "aria-hidden": "true"
4883
- }, null, 2)], 10, Bi)])
4884
- ], 40, Ai));
4894
+ }, null, 2)], 10, Hi)])
4895
+ ], 40, Mi));
4885
4896
  }
4886
- }), Hi = {
4897
+ }), Wi = {
4887
4898
  key: 0,
4888
4899
  class: "pb-4"
4889
- }, Ui = {
4900
+ }, Gi = {
4890
4901
  key: 1,
4891
4902
  "data-test": "messaging-sdk-header",
4892
4903
  class: "shrink-0 border-b border-theme-100 px-4 py-3"
4893
- }, Wi = { class: "min-w-0 flex-1" }, Gi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Ki = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, qi = {
4904
+ }, Ki = { class: "min-w-0 flex-1" }, qi = { class: "truncate text-base font-semibold leading-tight text-theme-900" }, Ji = { class: "mt-1 truncate text-sm leading-tight text-theme-500" }, Yi = {
4894
4905
  key: 0,
4895
4906
  class: "shrink-0 rounded-full bg-theme-50 px-2.5 py-1 font-mono text-[11px] font-medium text-theme-500"
4896
- }, Ji = ["aria-label"], Yi = {
4907
+ }, Xi = ["aria-label"], Zi = {
4897
4908
  key: 0,
4898
4909
  "data-test": "messaging-empty-state",
4899
4910
  class: "flex flex-col items-center justify-center px-4"
4900
- }, Xi = ["title"], Zi = {
4911
+ }, Qi = ["title"], $i = {
4901
4912
  key: 0,
4902
4913
  class: "flex items-center gap-3 py-3 px-2"
4903
- }, Qi = ["data-journal-outcome"], $i = [
4914
+ }, ea = ["data-journal-outcome"], ta = [
4904
4915
  "data-message-id",
4905
4916
  "data-message-sender",
4906
4917
  "data-conversation-id",
@@ -4911,7 +4922,7 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4911
4922
  "data-issue-action-label",
4912
4923
  "data-issue-action-url",
4913
4924
  "data-streaming"
4914
- ], ea = { class: "max-w-[85%] min-w-0" }, ta = ["href"], na = [
4925
+ ], na = { class: "max-w-[85%] min-w-0" }, ra = ["href"], ia = [
4915
4926
  "data-message-id",
4916
4927
  "data-message-sender",
4917
4928
  "data-conversation-id",
@@ -4920,7 +4931,7 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4920
4931
  "data-issue-code",
4921
4932
  "data-issue-bucket",
4922
4933
  "data-streaming"
4923
- ], ra = [
4934
+ ], aa = [
4924
4935
  "data-test",
4925
4936
  "data-message-id",
4926
4937
  "data-message-sender",
@@ -4930,57 +4941,58 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
4930
4941
  "data-streaming",
4931
4942
  "data-queued",
4932
4943
  "aria-label"
4933
- ], ia = ["src", "alt"], aa = ["src"], oa = ["href"], sa = {
4944
+ ], oa = ["src", "alt"], sa = ["src"], ca = ["href"], la = {
4934
4945
  key: 0,
4935
4946
  "data-test": "messaging-message-text-part"
4936
- }, ca = [
4947
+ }, ua = [
4937
4948
  "src",
4938
4949
  "alt",
4939
4950
  "data-attachment-placement"
4940
- ], la = ["src", "data-attachment-placement"], ua = ["href", "data-attachment-placement"], da = ["data-journal-outcome"], fa = {
4951
+ ], da = ["src", "data-attachment-placement"], fa = ["href", "data-attachment-placement"], pa = ["data-journal-outcome"], ma = {
4941
4952
  key: 2,
4942
4953
  "data-test": "messaging-tool-activity-tail",
4943
4954
  "aria-label": "Assistant is still working",
4944
4955
  class: "mb-4 grid h-[17px] w-5 place-items-center"
4945
- }, pa = ["data-journal-outcome"], ma = ["data-test", "data-working-description"], ha = {
4946
- class: "flex items-center gap-[5px]",
4947
- "aria-hidden": "true"
4948
- }, ga = { class: "truncate" }, _a = ["data-issue-code"], va = ["href"], ya = ["inert", "aria-hidden"], ba = ["data-seat-state"], xa = ["src", "alt"], Sa = { class: "max-w-20 truncate" }, Ca = ["onClick"], wa = {
4956
+ }, ha = ["data-journal-outcome"], ga = [
4957
+ "data-test",
4958
+ "data-working-description",
4959
+ "data-taking-longer"
4960
+ ], _a = { class: "truncate" }, va = ["data-issue-code"], ya = ["href"], ba = ["inert", "aria-hidden"], xa = ["data-seat-state"], Sa = ["src", "alt"], Ca = { class: "max-w-20 truncate" }, wa = ["onClick"], Ta = {
4949
4961
  key: 0,
4950
4962
  class: "shrink-0 flex items-center justify-center size-14"
4951
- }, Ta = ["data-composer-action"], Ea = ["placeholder", "disabled"], Da = { class: "font-mono text-sm tabular-nums" }, Oa = { class: "mt-2.5 flex items-center" }, ka = [
4963
+ }, Ea = ["data-composer-action"], Da = ["placeholder", "disabled"], Oa = { class: "font-mono text-sm tabular-nums" }, ka = { class: "mt-2.5 flex items-center" }, Aa = [
4952
4964
  "disabled",
4953
4965
  "aria-label",
4954
4966
  "title"
4955
- ], Aa = {
4967
+ ], ja = {
4956
4968
  key: 0,
4957
4969
  class: "i-svg-spinners-ring-resize size-5"
4958
- }, ja = {
4970
+ }, Ma = {
4959
4971
  key: 1,
4960
4972
  class: "i-tabler-plus size-5"
4961
- }, Ma = { class: "sr-only" }, Na = { class: "flex items-center gap-2" }, Pa = ["aria-label", "title"], Fa = { class: "sr-only" }, Ia = [
4973
+ }, Na = { class: "sr-only" }, Pa = { class: "flex items-center gap-2" }, Fa = ["aria-label", "title"], Ia = { class: "sr-only" }, La = [
4962
4974
  "disabled",
4963
4975
  "aria-label",
4964
4976
  "title"
4965
- ], La = {
4977
+ ], Ra = {
4966
4978
  class: "flex h-4 items-center gap-[2px]",
4967
4979
  "aria-hidden": "true"
4968
- }, Ra = [
4980
+ }, za = [
4969
4981
  "data-composer-action",
4970
4982
  "disabled",
4971
4983
  "aria-label",
4972
4984
  "title"
4973
- ], za = {
4985
+ ], Ba = {
4974
4986
  key: 0,
4975
4987
  class: "i-tabler-player-stop-filled size-3.5"
4976
- }, Ba = {
4988
+ }, Va = {
4977
4989
  key: 1,
4978
4990
  class: "i-tabler-arrow-up size-[17px]"
4979
- }, Va = { class: "sr-only" }, Ha = {
4991
+ }, Ha = { class: "sr-only" }, Ua = {
4980
4992
  key: 2,
4981
4993
  "data-test": "messaging-ai-notice",
4982
4994
  class: "mx-auto max-w-[720px] pt-2 text-center text-[11.5px] leading-none text-theme-300"
4983
- }, Ua = /*@__PURE__*/ k({
4995
+ }, Wa = /*@__PURE__*/ k({
4984
4996
  __name: "ElAgentChat",
4985
4997
  props: {
4986
4998
  chatController: {},
@@ -5020,12 +5032,12 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5020
5032
  }, n = v(() => {
5021
5033
  let n = { ...t[e.scope] };
5022
5034
  return e.scope === "org" && e.scopeName && (n.label = e.scopeName, n.tooltip = `Visible to ${e.scopeName} members`), n;
5023
- }), r = F(), i = F(), o = F();
5035
+ }), r = I(), i = I(), o = I();
5024
5036
  function containsMarkdownLink(e) {
5025
5037
  return e ? /\[[^\]]+\]\([^)]+\)/.test(e) : !1;
5026
5038
  }
5027
5039
  function isSystemExplainerMessage(e) {
5028
- return e.sender === "system" && (!!e.issue || e.id === G.value);
5040
+ return e.sender === "system" && (!!e.issue || e.id === ye.value);
5029
5041
  }
5030
5042
  function isGroupEnd(e, t) {
5031
5043
  let n = e[t], r = e[t + 1];
@@ -5036,18 +5048,18 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5036
5048
  let t = m.value[e];
5037
5049
  if (t?.kind === "text") return t.id;
5038
5050
  }
5039
- }), ne = v(() => e.chatController?.liveStreamMessageId?.value), R = v(() => {
5051
+ }), P = v(() => e.chatController?.liveStreamMessageId?.value), B = v(() => {
5040
5052
  let t = e.chatController?.sharedMessages.value ?? [];
5041
- return m.value.length && ne.value ? t.filter((e) => e.id !== ne.value) : t;
5042
- }), B = v(() => {
5053
+ return m.value.length && P.value ? t.filter((e) => e.id !== P.value) : t;
5054
+ }), ae = v(() => {
5043
5055
  if (!e.chatController?.workJournal?.value) return s.value?.workingDescription?.trim() || void 0;
5044
- }), oe = v(() => e.chatController?.workJournal?.value), se = v(() => {
5056
+ }), oe = v(() => e.chatController?.workJournal?.value), _e = v(() => {
5045
5057
  if (!oe.value && !m.value.length) return;
5046
- let e = R.value, t = e[e.length - 1];
5058
+ let e = B.value, t = e[e.length - 1];
5047
5059
  if (t) return t.sender === "agent" || t.sender === "system" ? e.length >= 2 ? e[e.length - 2].id : void 0 : t.id;
5048
- }), _e = v(() => {
5060
+ }), W = v(() => {
5049
5061
  let t = {};
5050
- for (let n of R.value) {
5062
+ for (let n of B.value) {
5051
5063
  if (n.sender === "user" || !n.toolActivities?.length) continue;
5052
5064
  let r = e.chatController?.workJournalFor?.({
5053
5065
  activities: n.toolActivities,
@@ -5059,7 +5071,7 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5059
5071
  return t;
5060
5072
  });
5061
5073
  function messageWorkJournal(e) {
5062
- return _e.value[e.id];
5074
+ return W.value[e.id];
5063
5075
  }
5064
5076
  function inlineOffset(e, t) {
5065
5077
  return e.placement?.kind !== "inline" || !Number.isFinite(e.placement.offset) ? null : Math.max(0, Math.min(t.length, Math.trunc(e.placement.offset)));
@@ -5107,58 +5119,70 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5107
5119
  text: t.slice(i)
5108
5120
  }), r;
5109
5121
  }
5110
- let W = v(() => s.value?.transientIssue), G = v(() => {
5122
+ let G = v(() => s.value?.transientIssue), ye = v(() => {
5111
5123
  if (!f.value) return;
5112
- let e = R.value, t = e[e.length - 1];
5124
+ let e = B.value, t = e[e.length - 1];
5113
5125
  return t?.sender === "agent" || t?.sender === "system" ? t.id : void 0;
5114
- }), ye = v(() => !f.value || B.value || oe.value || m.value.length ? !1 : G.value === void 0), K = v(() => B.value ?? (ye.value ? "Thinking…" : void 0)), be = v(() => s.value?.sendBlockedReason), Se = v(() => be.value === "agent_deleted"), Ce = v(() => p.value ? "Connecting..." : be.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), we = v(() => c(e.agent.state.value)), Te = v(() => {
5115
- if (Ke.value || !we.value || we.value === "awake") return;
5126
+ }), Se = v(() => !f.value || ae.value || oe.value || m.value.length ? !1 : ye.value === void 0), Ce = v(() => ae.value ?? (Se.value ? "Thinking" : void 0)), we = H(!1), Te;
5127
+ ce(Ce, (e) => {
5128
+ Te && clearTimeout(Te), we.value = !1, e && (Te = setTimeout(() => {
5129
+ Te = void 0, we.value = !0;
5130
+ }, be), Te.unref?.());
5131
+ }, { immediate: !0 });
5132
+ let Ee = v(() => {
5133
+ let e = Ce.value;
5134
+ if (e) return we.value ? `${e} ${K.slowHint}` : e;
5135
+ }), De = v(() => s.value?.sendBlockedReason), Oe = v(() => De.value === "agent_deleted"), ke = v(() => p.value ? "Connecting..." : De.value === "agent_deleted" ? "This assistant was deleted" : "Send a message"), Ae = v(() => c(e.agent.state.value)), je = v(() => {
5136
+ if (q.value || !Ae.value || Ae.value === "awake") return;
5116
5137
  let t = e.agent.displayName.value || e.agent.name.value || "Your assistant";
5117
- return we.value === "changing" ? `${t} will be right back…` : `${t} is ${a[we.value].toLowerCase()}.`;
5118
- }), Ee = v(() => e.chatController?.composerState?.value ?? {
5138
+ return Ae.value === "changing" ? `${t} will be right back…` : `${t} is ${a[Ae.value].toLowerCase()}.`;
5139
+ }), Me = v(() => e.chatController?.composerState?.value ?? {
5119
5140
  text: "",
5120
5141
  pendingAttachments: [],
5121
5142
  isUploading: !1
5122
- }), De = v({
5123
- get: () => Ee.value.text,
5143
+ }), Ne = v({
5144
+ get: () => Me.value.text,
5124
5145
  set: (t) => e.chatController?.setComposerText?.({ text: t })
5125
- }), Oe = v(() => Ee.value.pendingAttachments), ke = v(() => Ee.value.isUploading), Ae = v(() => e.chatController?.voiceRecorder), je = v(() => Ae.value?.isBusy.value ?? !1), Me = v(() => e.chatController?.canAttachFile?.value ?? !1), Ne = v(() => e.chatController?.canRecordAudio?.value ?? !1), Pe = v(() => e.chatController?.composerAction?.value ?? "idle"), Fe = v(() => Pe.value !== "idle"), Ie = v(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), Le = v(() => e.chatController?.queuedMessageIds?.value);
5146
+ }), Pe = v(() => Me.value.pendingAttachments), Fe = v(() => Me.value.isUploading), Ie = v(() => e.chatController?.voiceRecorder), Le = v(() => Ie.value?.isBusy.value ?? !1), Re = v(() => e.chatController?.canAttachFile?.value ?? !1), ze = v(() => e.chatController?.canRecordAudio?.value ?? !1), Ve = v(() => e.chatController?.composerAction?.value ?? "idle"), He = v(() => Ve.value !== "idle"), Ue = v(() => e.chatController?.composerShowsSecondaryStop?.value ?? !1), We = v(() => e.chatController?.queuedMessageIds?.value);
5126
5147
  function isQueuedMessage(e) {
5127
- return Le.value?.has(e) ?? !1;
5128
- }
5129
- let ze = v(() => Pe.value === "stop" ? "Stop reply" : Ie.value ? "Send — answered after current work" : "Send message"), Be = v(() => Ne.value && !je.value && !!Ae.value?.canUseBrowserRecording), Ve = v(() => Ae.value?.isActive.value ?? !1), He = v(() => Ae.value?.elapsedLabel.value ?? "0:00"), We = v(() => Ae.value?.statusText.value ?? "Release to send"), Ge = v(() => Ae.value?.state.value.phase === "sending" ? "Sending voice message" : Ve.value ? "Release to send voice message" : "Hold to record voice message"), Ke = F(!1), qe = F(), Je = F(), Ye = F(), Xe = 0, Ze = v(() => e.chatController?.canStartVoice?.value ?? !1);
5130
- ue([() => e.agent.avatar.value?.src, Ze], ([e, t]) => {
5131
- let n = ++Xe;
5132
- if (Ye.value = void 0, !t || !e || typeof Image > "u") return;
5148
+ return We.value?.has(e) ?? !1;
5149
+ }
5150
+ let Ke = v(() => Ve.value === "stop" ? "Stop reply" : Ue.value ? "Send — answered after current work" : "Send message"), qe = v(() => ze.value && !Le.value && !!Ie.value?.canUseBrowserRecording), Je = v(() => Ie.value?.isActive.value ?? !1), Ye = v(() => Ie.value?.state.value.phase === "sending"), Xe = v(() => Ie.value?.elapsedLabel.value ?? "0:00"), Ze = v(() => {
5151
+ let e = Ie.value?.state.value.phase;
5152
+ return e === "preparing" || e === "sending" ? Ie.value?.statusText.value ?? "Starting microphone" : lt.value ? "Release to send" : "Click mic to send";
5153
+ }), Qe = v(() => Ie.value?.state.value.phase === "sending" ? "Sending voice message" : Je.value ? lt.value ? "Release to send voice message" : "Stop and send voice message" : "Record voice message"), q = I(!1), et = I(), tt = I(), nt = I(), rt = 0, it = v(() => e.chatController?.canStartVoice?.value ?? !1);
5154
+ ce([() => e.agent.avatar.value?.src, it], ([e, t]) => {
5155
+ let n = ++rt;
5156
+ if (nt.value = void 0, !t || !e || typeof Image > "u") return;
5133
5157
  let r = new Image();
5134
5158
  r.onload = () => {
5135
- n === Xe && (Ye.value = e);
5159
+ n === rt && (nt.value = e);
5136
5160
  }, r.src = e;
5137
5161
  }, { immediate: !0 });
5138
- let $e = v(() => Ze.value && !Ke.value && !Ve.value && Pe.value === "idle"), et = v(() => !u.value), tt = v(() => et.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5162
+ let J = v(() => it.value && !q.value && !Je.value && Ve.value === "idle"), X = v(() => !u.value), at = v(() => X.value ? `Voice available when ${e.agent.displayName.value || e.agent.name.value || "the assistant"} is awake` : "Start voice conversation");
5139
5163
  function startVoiceConversation() {
5140
- !$e.value || et.value || (Je.value = Ye.value, Ke.value = !0);
5164
+ !J.value || X.value || (tt.value = nt.value, q.value = !0);
5141
5165
  }
5142
5166
  async function endVoiceConversation() {
5143
- if (!Ke.value) return;
5144
- let t = qe.value?.end();
5145
- Ke.value = !1, Je.value = void 0, await A(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5167
+ if (!q.value) return;
5168
+ let t = et.value?.end();
5169
+ q.value = !1, tt.value = void 0, await A(), await t, i.value?.focus(), await e.chatController?.refreshMessages();
5146
5170
  }
5147
- let q = v(() => e.variant === "light"), nt = v(() => q.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), J = v(() => q.value ? "text-theme-300" : "text-white/30");
5148
- re(async () => {
5171
+ let Z = v(() => e.variant === "light"), st = v(() => Z.value ? "bg-gradient-to-r from-transparent via-black/5 to-transparent" : "bg-gradient-to-r from-transparent via-white/5 to-transparent"), ct = v(() => Z.value ? "text-theme-300" : "text-white/30");
5172
+ ne(async () => {
5149
5173
  e.chatController && !u.value && await e.chatController.startTextConversation();
5150
- }), ie(() => {
5151
- e.chatController?.voiceRecorder?.teardown();
5174
+ }), re(() => {
5175
+ Te && clearTimeout(Te), e.chatController?.voiceRecorder?.teardown();
5152
5176
  });
5153
5177
  async function sendMessage() {
5154
- !e.chatController || Pe.value !== "send" || (i.value && (i.value.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? i.value.blur() : i.value.focus()), r.value?.pin(), await e.chatController.sendComposerMessage());
5178
+ !e.chatController || Ve.value !== "send" || (i.value && (i.value.style.height = "auto", window.matchMedia("(pointer: coarse)").matches ? i.value.blur() : i.value.focus()), r.value?.pin(), await e.chatController.sendComposerMessage());
5155
5179
  }
5156
5180
  async function handleCardAction(t) {
5157
- !e.chatController || Se.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
5181
+ !e.chatController || Oe.value || (r.value?.pin(), await e.chatController.sendChatMessage(t));
5158
5182
  }
5159
5183
  async function handleComposerAction() {
5160
5184
  if (e.chatController) {
5161
- if (Pe.value === "send") {
5185
+ if (Ve.value === "send") {
5162
5186
  await sendMessage();
5163
5187
  return;
5164
5188
  }
@@ -5169,27 +5193,47 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5169
5193
  e.isComposing || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), await sendMessage());
5170
5194
  }
5171
5195
  function focusComposer(e) {
5172
- Ve.value || Se.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
5196
+ Je.value || Oe.value || e.target instanceof Element && e.target.closest("button, a, textarea") || i.value?.focus();
5173
5197
  }
5174
5198
  function adjustTextareaHeight() {
5175
5199
  i.value && (i.value.style.height = "auto", i.value.style.height = `${Math.min(i.value.scrollHeight, 150)}px`);
5176
5200
  }
5177
- ue(De, () => A(() => adjustTextareaHeight()));
5201
+ ce(Ne, () => A(() => adjustTextareaHeight()));
5178
5202
  function triggerFileInput() {
5179
5203
  o.value?.click();
5180
5204
  }
5181
5205
  async function handleFileSelect(t) {
5182
5206
  let n = t.target, r = n.files?.[0];
5183
- !r || !e.chatController || je.value || (await e.chatController.attachFile({ file: r }), n.value = "");
5207
+ !r || !e.chatController || Le.value || (await e.chatController.attachFile({ file: r }), n.value = "");
5184
5208
  }
5185
5209
  function removeAttachment(t) {
5186
5210
  e.chatController?.removeAttachment({ index: t });
5187
5211
  }
5188
5212
  function startRecording() {
5189
- Ae.value?.start();
5213
+ Ie.value?.start();
5190
5214
  }
5191
5215
  function finishRecording(e) {
5192
- Ae.value?.finish(e);
5216
+ Ie.value?.finish(e);
5217
+ }
5218
+ let lt = H(!1), ut = !1;
5219
+ function onRecordPointerDown(e) {
5220
+ e.pointerType === "touch" && (ut = !0, lt.value = !0, e.currentTarget.setPointerCapture?.(e.pointerId), startRecording());
5221
+ }
5222
+ function onRecordPointerUp(e) {
5223
+ e.pointerType !== "touch" || !lt.value || (lt.value = !1, finishRecording({ cancelled: !1 }));
5224
+ }
5225
+ function onRecordPointerCancel(e) {
5226
+ e.pointerType !== "touch" || !lt.value || (lt.value = !1, ut = !1, finishRecording({ cancelled: !0 }));
5227
+ }
5228
+ function toggleRecording() {
5229
+ Je.value ? finishRecording({ cancelled: !1 }) : startRecording();
5230
+ }
5231
+ function onRecordClick() {
5232
+ if (ut) {
5233
+ ut = !1;
5234
+ return;
5235
+ }
5236
+ toggleRecording();
5193
5237
  }
5194
5238
  function shouldShowTimeDivider(e, t) {
5195
5239
  if (t === 0) {
@@ -5218,37 +5262,37 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5218
5262
  ...o ? {} : { year: "numeric" }
5219
5263
  })}, ${a}`;
5220
5264
  }
5221
- return (t, a) => (P(), x("div", {
5265
+ return (t, a) => (F(), x("div", {
5222
5266
  "data-test": "messaging-root",
5223
- class: j(["@container/chat relative flex h-full flex-col", R.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5267
+ class: j(["@container/chat relative flex h-full flex-col", B.value.length === 0 ? "min-h-0 [justify-content:safe_center] overflow-y-auto" : ""])
5224
5268
  }, [
5225
- e.showHeader && !q.value ? (P(), x("div", Hi, [T(Re, {
5269
+ e.showHeader && !Z.value ? (F(), x("div", Wi, [T(Be, {
5226
5270
  agent: e.agent,
5227
5271
  "is-online": u.value
5228
- }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (P(), x("div", Ui, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5229
- T(Ue, {
5272
+ }, null, 8, ["agent", "is-online"])])) : e.showHeader ? (F(), x("div", Gi, [S("div", { class: j(["flex items-center gap-3", e.centered ? "max-w-[720px] mx-auto" : ""]) }, [
5273
+ T(Ge, {
5230
5274
  agent: e.agent,
5231
- "is-light": q.value,
5275
+ "is-light": Z.value,
5232
5276
  class: "size-10"
5233
5277
  }, null, 8, ["agent", "is-light"]),
5234
- S("div", Wi, [S("div", Gi, H(e.agent.displayName.value), 1), S("div", Ki, H(e.agent.title.value || "Assistant"), 1)]),
5235
- e.headerMeta ? (P(), x("span", qi, H(e.headerMeta), 1)) : b("", !0)
5278
+ S("div", Ki, [S("div", qi, U(e.agent.displayName.value), 1), S("div", Ji, U(e.agent.title.value || "Assistant"), 1)]),
5279
+ e.headerMeta ? (F(), x("span", Yi, U(e.headerMeta), 1)) : b("", !0)
5236
5280
  ], 2)])) : b("", !0),
5237
5281
  T(_, { name: "voice-call" }, {
5238
- default: de(() => [Ke.value ? (P(), x("div", {
5282
+ default: ue(() => [q.value ? (F(), x("div", {
5239
5283
  key: 0,
5240
5284
  "data-test": "voice-call-overlay",
5241
5285
  role: "dialog",
5242
5286
  "aria-modal": "true",
5243
5287
  "aria-label": `Voice conversation with ${e.agent.displayName.value}`,
5244
5288
  class: "fixed inset-0 z-[100] flex items-stretch justify-stretch bg-[#050F19] sm:items-center sm:justify-center sm:bg-[#050F19]/45 sm:p-6",
5245
- onKeydown: a[0] || (a[0] = he((e) => endVoiceConversation(), ["esc"]))
5246
- }, [T(Vi, {
5289
+ onKeydown: a[0] || (a[0] = pe((e) => endVoiceConversation(), ["esc"]))
5290
+ }, [T(Ui, {
5247
5291
  ref_key: "voiceMode",
5248
- ref: qe,
5292
+ ref: et,
5249
5293
  agent: e.agent,
5250
5294
  "chat-controller": e.chatController,
5251
- "backdrop-src": Je.value,
5295
+ "backdrop-src": tt.value,
5252
5296
  "is-light": !1,
5253
5297
  class: "voice-call-card h-full w-full sm:max-h-[620px] sm:max-w-[420px] sm:flex-none sm:rounded-[32px] sm:shadow-[0_32px_80px_rgba(5,15,25,0.45)]",
5254
5298
  onEnd: endVoiceConversation
@@ -5256,51 +5300,51 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5256
5300
  "agent",
5257
5301
  "chat-controller",
5258
5302
  "backdrop-src"
5259
- ])], 40, Ji)) : b("", !0)]),
5303
+ ])], 40, Xi)) : b("", !0)]),
5260
5304
  _: 1
5261
5305
  }),
5262
- p.value ? (P(), x("div", {
5306
+ p.value ? (F(), x("div", {
5263
5307
  key: 2,
5264
- class: j(["py-16 flex flex-col items-center justify-center gap-2 text-sm", q.value ? "text-theme-400" : "text-theme-600"])
5265
- }, [T(ve, { class: "size-4" })], 2)) : e.setupHint ? (P(), x("div", {
5308
+ class: j(["py-16 flex flex-col items-center justify-center gap-2 text-sm", Z.value ? "text-theme-400" : "text-theme-600"])
5309
+ }, [T(ve, { class: "size-4" })], 2)) : e.setupHint ? (F(), x("div", {
5266
5310
  key: 3,
5267
- class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", J.value])
5268
- }, [a[20] || (a[20] = S("i", { class: "i-tabler-tool size-3" }, null, -1)), S("span", null, H(e.setupHint), 1)], 2)) : b("", !0),
5269
- T(pi, {
5311
+ class: j(["flex items-center justify-center gap-1.5 py-2 text-[11px]", ct.value])
5312
+ }, [a[14] || (a[14] = S("i", { class: "i-tabler-tool size-3" }, null, -1)), S("span", null, U(e.setupHint), 1)], 2)) : b("", !0),
5313
+ T(hi, {
5270
5314
  ref_key: "chatScroller",
5271
5315
  ref: r,
5272
- inert: Ke.value,
5273
- "aria-hidden": Ke.value ? "true" : void 0,
5274
- class: j(R.value.length === 0 ? "flex-none" : "flex-1")
5316
+ inert: q.value,
5317
+ "aria-hidden": q.value ? "true" : void 0,
5318
+ class: j(B.value.length === 0 ? "flex-none" : "flex-1")
5275
5319
  }, {
5276
- default: de(() => [S("div", { class: j([R.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? R.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5277
- R.value.length === 0 && !p.value ? (P(), x("div", Yi, [ae(t.$slots, "empty-heading", {
5320
+ default: ue(() => [S("div", { class: j([B.value.length === 0 ? "flex flex-col items-center justify-center px-3 py-4" : e.centered ? "pt-20 pb-5 px-3 @lg/chat:px-5 space-y-2" : "pt-4 pb-[120px] px-3 @lg/chat:px-5 space-y-2", e.centered ? B.value.length === 0 ? "max-w-[900px] mx-auto w-full" : "max-w-[720px] mx-auto w-full" : ""]) }, [
5321
+ B.value.length === 0 && !p.value ? (F(), x("div", Zi, [ie(t.$slots, "empty-heading", {
5278
5322
  agent: e.agent,
5279
- isLight: q.value
5280
- }, () => [T(Ue, {
5323
+ isLight: Z.value
5324
+ }, () => [T(Ge, {
5281
5325
  agent: e.agent,
5282
- "is-light": q.value,
5326
+ "is-light": Z.value,
5283
5327
  class: "mb-4 size-20 @sm/chat:size-24"
5284
- }, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", q.value ? "text-theme-900" : "text-white"]) }, H(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (P(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", J.value]) }, H(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
5285
- class: j(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", q.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5328
+ }, null, 8, ["agent", "is-light"]), S("div", { class: j(["text-base @sm/chat:text-lg font-semibold", Z.value ? "text-theme-900" : "text-white"]) }, U(e.agent.displayName.value), 3)], !0), e.emptyStateMessage === "" ? b("", !0) : (F(), x(h, { key: 0 }, [S("p", { class: j(["mt-1 text-center text-xs @sm/chat:text-sm", ct.value]) }, U(e.emptyStateMessage || "Type your message to get started."), 3), S("div", {
5329
+ class: j(["inline-flex items-center gap-1.5 mt-5 px-2.5 py-1 rounded-full text-[11px]", Z.value ? "bg-theme-50 border border-theme-100 text-theme-400" : "bg-white/10 border border-white/20 text-white/40"]),
5286
5330
  title: n.value.tooltip
5287
- }, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, H(n.value.label), 1)], 10, Xi)], 64))])) : b("", !0),
5288
- (P(!0), x(h, null, I(R.value, (e, t) => (P(), x(h, { key: e.id }, [
5289
- shouldShowTimeDivider(R.value, t) ? (P(), x("div", Zi, [
5290
- S("div", { class: j(["flex-1 h-px", nt.value]) }, null, 2),
5291
- S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", J.value]) }, H(shouldShowTimeDivider(R.value, t)), 3),
5292
- S("div", { class: j(["flex-1 h-px", nt.value]) }, null, 2)
5331
+ }, [S("i", { class: j([n.value.icon, "size-3"]) }, null, 2), S("span", null, U(n.value.label), 1)], 10, Qi)], 64))])) : b("", !0),
5332
+ (F(!0), x(h, null, R(B.value, (e, t) => (F(), x(h, { key: e.id }, [
5333
+ shouldShowTimeDivider(B.value, t) ? (F(), x("div", $i, [
5334
+ S("div", { class: j(["flex-1 h-px", st.value]) }, null, 2),
5335
+ S("span", { class: j(["text-[10px] @sm/chat:text-[11px] font-medium shrink-0 tracking-widest uppercase", ct.value]) }, U(shouldShowTimeDivider(B.value, t)), 3),
5336
+ S("div", { class: j(["flex-1 h-px", st.value]) }, null, 2)
5293
5337
  ])) : b("", !0),
5294
- messageWorkJournal(e) ? (P(), x("div", {
5338
+ messageWorkJournal(e) ? (F(), x("div", {
5295
5339
  key: 1,
5296
5340
  "data-test": "messaging-message-tool-activity",
5297
5341
  "data-journal-outcome": messageWorkJournal(e)?.outcome,
5298
5342
  class: "mb-4 w-full"
5299
- }, [T(Qe, {
5343
+ }, [T($e, {
5300
5344
  model: messageWorkJournal(e),
5301
- "is-light": q.value
5302
- }, null, 8, ["model", "is-light"])], 8, Qi)) : b("", !0),
5303
- isSystemExplainerMessage(e) ? (P(), x("div", {
5345
+ "is-light": Z.value
5346
+ }, null, 8, ["model", "is-light"])], 8, ea)) : b("", !0),
5347
+ isSystemExplainerMessage(e) ? (F(), x("div", {
5304
5348
  key: 2,
5305
5349
  "data-test": "messaging-system-msg",
5306
5350
  "data-message-id": e.id,
@@ -5312,30 +5356,30 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5312
5356
  "data-issue-bucket": e.issue?.bucket,
5313
5357
  "data-issue-action-label": e.issue?.actionLabel,
5314
5358
  "data-issue-action-url": e.issue?.actionUrl,
5315
- "data-streaming": e.id === G.value ? "true" : void 0,
5359
+ "data-streaming": e.id === ye.value ? "true" : void 0,
5316
5360
  class: "flex gap-2 items-end justify-start mb-4"
5317
- }, [S("div", ea, [S("div", { class: j(["mb-1 pl-1 text-[11px] font-medium", q.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), S("div", { class: j(["pl-1", q.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (P(), te(ui, {
5361
+ }, [S("div", na, [S("div", { class: j(["mb-1 pl-1 text-[11px] font-medium", Z.value ? "text-theme-500" : "text-white/45"]) }, " System Message ", 2), S("div", { class: j(["pl-1", Z.value ? "text-theme-700" : "text-white/85"]) }, [e.text ? (F(), te(fi, {
5318
5362
  key: 0,
5319
5363
  text: e.text,
5320
- inverted: !q.value,
5321
- streaming: e.id === G.value,
5322
- onClick: a[1] || (a[1] = U(() => {}, ["stop"])),
5364
+ inverted: !Z.value,
5365
+ streaming: e.id === ye.value,
5366
+ onClick: a[1] || (a[1] = he(() => {}, ["stop"])),
5323
5367
  onAction: handleCardAction
5324
5368
  }, null, 8, [
5325
5369
  "text",
5326
5370
  "inverted",
5327
5371
  "streaming"
5328
- ])) : e.issue?.help ? (P(), te(ui, {
5372
+ ])) : e.issue?.help ? (F(), te(fi, {
5329
5373
  key: 1,
5330
5374
  text: e.issue.help,
5331
- inverted: !q.value
5332
- }, null, 8, ["text", "inverted"])) : b("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (P(), x("a", {
5375
+ inverted: !Z.value
5376
+ }, null, 8, ["text", "inverted"])) : b("", !0), e.issue?.actionUrl && !containsMarkdownLink(e.text) ? (F(), x("a", {
5333
5377
  key: 2,
5334
5378
  href: e.issue.actionUrl,
5335
5379
  "data-test": "messaging-system-msg-action",
5336
- class: j(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", q.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5337
- onClick: a[2] || (a[2] = U(() => {}, ["stop"]))
5338
- }, [C(H(e.issue.actionLabel) + " ", 1), a[21] || (a[21] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, ta)) : b("", !0)], 2)])], 8, $i)) : e.sender === "system" ? (P(), x("div", {
5380
+ class: j(["mt-2 text-[12px] font-medium inline-flex items-center gap-1", Z.value ? "text-theme-900 hover:text-theme-700" : "text-white hover:text-white/80"]),
5381
+ onClick: a[2] || (a[2] = he(() => {}, ["stop"]))
5382
+ }, [C(U(e.issue.actionLabel) + " ", 1), a[15] || (a[15] = S("i", { class: "i-tabler-arrow-right size-3" }, null, -1))], 10, ra)) : b("", !0)], 2)])], 8, ta)) : e.sender === "system" ? (F(), x("div", {
5339
5383
  key: 3,
5340
5384
  "data-test": "messaging-system-status-msg",
5341
5385
  "data-message-id": e.id,
@@ -5345,16 +5389,16 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5345
5389
  "data-system-kind": e.systemKind,
5346
5390
  "data-issue-code": e.issue?.code,
5347
5391
  "data-issue-bucket": e.issue?.bucket,
5348
- "data-streaming": e.id === G.value ? "true" : void 0,
5349
- class: j(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", q.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5350
- }, [a[22] || (a[22] = S("i", {
5392
+ "data-streaming": e.id === ye.value ? "true" : void 0,
5393
+ class: j(["mb-4 flex w-fit max-w-[85%] items-start gap-2 rounded-2xl px-3 py-2 text-[13px] leading-relaxed ring-1", Z.value ? "bg-theme-100 text-theme-600 ring-theme-200" : "bg-white/10 text-white/70 ring-white/10"])
5394
+ }, [a[16] || (a[16] = S("i", {
5351
5395
  class: "i-tabler-info-circle size-4 mt-0.5 shrink-0",
5352
5396
  "aria-hidden": "true"
5353
- }, null, -1)), T(ui, {
5397
+ }, null, -1)), T(fi, {
5354
5398
  text: e.text,
5355
- inverted: !q.value,
5356
- onClick: a[3] || (a[3] = U(() => {}, ["stop"]))
5357
- }, null, 8, ["text", "inverted"])], 10, na)) : (P(), x("div", {
5399
+ inverted: !Z.value,
5400
+ onClick: a[3] || (a[3] = he(() => {}, ["stop"]))
5401
+ }, null, 8, ["text", "inverted"])], 10, ia)) : (F(), x("div", {
5358
5402
  key: 4,
5359
5403
  "data-test": e.sender === "agent" ? "messaging-assistant-msg" : e.sender === "user" ? "messaging-user-msg" : void 0,
5360
5404
  "data-message-id": e.id,
@@ -5362,143 +5406,143 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5362
5406
  "data-conversation-id": e.conversationId,
5363
5407
  "data-message-sequence": e.sequence,
5364
5408
  "data-system-kind": e.systemKind,
5365
- "data-streaming": e.id === G.value ? "true" : void 0,
5409
+ "data-streaming": e.id === ye.value ? "true" : void 0,
5366
5410
  "data-queued": isQueuedMessage(e.id) ? "true" : void 0,
5367
5411
  "aria-label": isQueuedMessage(e.id) ? "Sent — will be answered after the current work finishes" : void 0,
5368
5412
  class: j(["flex gap-2 items-end", {
5369
5413
  "justify-end": e.sender === "user",
5370
5414
  "justify-start": e.sender === "agent",
5371
- "mb-6": isGroupEnd(R.value, t),
5415
+ "mb-6": isGroupEnd(B.value, t),
5372
5416
  "opacity-70": isQueuedMessage(e.id)
5373
5417
  }])
5374
5418
  }, [S("div", {
5375
5419
  "data-test": "messaging-message-body",
5376
5420
  class: j(e.sender === "user" ? "max-w-[min(78%,30rem)]" : "w-full min-w-0")
5377
- }, [blockAttachmentsForMessage(e).length ? (P(), x("div", {
5421
+ }, [blockAttachmentsForMessage(e).length ? (F(), x("div", {
5378
5422
  key: 0,
5379
5423
  class: j(["mb-1 space-y-1", e.sender === "user" ? "flex flex-col items-end" : ""])
5380
- }, [(P(!0), x(h, null, I(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (P(), x(h, { key: attachmentKey(e, t) }, [e.type === "image" ? (P(), x("img", {
5424
+ }, [(F(!0), x(h, null, R(blockAttachmentsForMessage(e), ({ attachment: e, index: t }) => (F(), x(h, { key: attachmentKey(e, t) }, [e.type === "image" ? (F(), x("img", {
5381
5425
  key: 0,
5382
5426
  src: e.src,
5383
5427
  alt: e.filename,
5384
5428
  "data-test": "messaging-attachment",
5385
5429
  "data-attachment-placement": "block",
5386
5430
  class: "rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5387
- }, null, 8, ia)) : e.type === "audio" ? (P(), x("audio", {
5431
+ }, null, 8, oa)) : e.type === "audio" ? (F(), x("audio", {
5388
5432
  key: 1,
5389
5433
  src: e.src,
5390
5434
  controls: "",
5391
5435
  "data-test": "messaging-attachment",
5392
5436
  "data-attachment-placement": "block",
5393
5437
  class: "max-w-full"
5394
- }, null, 8, aa)) : (P(), x("a", {
5438
+ }, null, 8, sa)) : (F(), x("a", {
5395
5439
  key: 2,
5396
5440
  href: e.src,
5397
5441
  target: "_blank",
5398
5442
  rel: "noopener",
5399
5443
  "data-test": "messaging-attachment",
5400
5444
  "data-attachment-placement": "block",
5401
- class: j(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", q.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5402
- }, [a[23] || (a[23] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(e.filename), 1)], 10, oa))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (P(), x("div", {
5445
+ class: j(["inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", Z.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5446
+ }, [a[17] || (a[17] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + U(e.filename), 1)], 10, ca))], 64))), 128))], 2)) : b("", !0), messageRenderParts(e).length ? (F(), x("div", {
5403
5447
  key: 1,
5404
5448
  "data-test": "messaging-message-content",
5405
- class: j(e.sender === "user" ? q.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : q.value ? "text-theme-800" : "text-white/95")
5406
- }, [(P(!0), x(h, null, I(messageRenderParts(e), (t) => (P(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (P(), x("div", sa, [T(ui, {
5449
+ class: j(e.sender === "user" ? Z.value ? "rounded-[14px] px-4 py-2.5 bg-theme-50 text-theme-900" : "rounded-[14px] px-4 py-2.5 bg-white/10 text-white" : Z.value ? "text-theme-800" : "text-white/95")
5450
+ }, [(F(!0), x(h, null, R(messageRenderParts(e), (t) => (F(), x(h, { key: t.key }, [t.kind === "text" && t.text ? (F(), x("div", la, [T(fi, {
5407
5451
  text: t.text,
5408
- inverted: e.sender === "user" || !q.value,
5409
- streaming: e.id === G.value,
5410
- onClick: a[4] || (a[4] = U(() => {}, ["stop"])),
5452
+ inverted: e.sender === "user" || !Z.value,
5453
+ streaming: e.id === ye.value,
5454
+ onClick: a[4] || (a[4] = he(() => {}, ["stop"])),
5411
5455
  onAction: handleCardAction
5412
5456
  }, null, 8, [
5413
5457
  "text",
5414
5458
  "inverted",
5415
5459
  "streaming"
5416
- ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (P(), x("img", {
5460
+ ])])) : t.kind === "attachment" && t.attachment.type === "image" ? (F(), x("img", {
5417
5461
  key: 1,
5418
5462
  src: t.attachment.src,
5419
5463
  alt: t.attachment.filename,
5420
5464
  "data-test": "messaging-attachment",
5421
5465
  "data-attachment-placement": t.placement,
5422
5466
  class: "my-2 rounded-xl object-cover max-h-48 max-w-[240px] @sm/chat:max-w-[320px]"
5423
- }, null, 8, ca)) : t.kind === "attachment" && t.attachment.type === "audio" ? (P(), x("audio", {
5467
+ }, null, 8, ua)) : t.kind === "attachment" && t.attachment.type === "audio" ? (F(), x("audio", {
5424
5468
  key: 2,
5425
5469
  src: t.attachment.src,
5426
5470
  controls: "",
5427
5471
  "data-test": "messaging-attachment",
5428
5472
  "data-attachment-placement": t.placement,
5429
5473
  class: "my-2 max-w-full"
5430
- }, null, 8, la)) : t.kind === "attachment" ? (P(), x("a", {
5474
+ }, null, 8, da)) : t.kind === "attachment" ? (F(), x("a", {
5431
5475
  key: 3,
5432
5476
  href: t.attachment.src,
5433
5477
  target: "_blank",
5434
5478
  rel: "noopener",
5435
5479
  "data-test": "messaging-attachment",
5436
5480
  "data-attachment-placement": t.placement,
5437
- class: j(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", q.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5438
- }, [a[24] || (a[24] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + H(t.attachment.filename), 1)], 10, ua)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, ra)),
5439
- e.id === se.value ? (P(), x(h, { key: 5 }, [m.value.length ? (P(!0), x(h, { key: 0 }, I(m.value, (e) => (P(), x(h, { key: e.id }, [e.kind === "work" ? (P(), x("div", {
5481
+ class: j(["my-2 inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs", Z.value ? "bg-theme-100 text-theme-600 hover:bg-theme-200" : "bg-white/10 text-white/80 hover:bg-white/20"])
5482
+ }, [a[18] || (a[18] = S("i", { class: "i-tabler-file size-3.5" }, null, -1)), C(" " + U(t.attachment.filename), 1)], 10, fa)) : b("", !0)], 64))), 128))], 2)) : b("", !0)], 2)], 10, aa)),
5483
+ e.id === _e.value ? (F(), x(h, { key: 5 }, [m.value.length ? (F(!0), x(h, { key: 0 }, R(m.value, (e) => (F(), x(h, { key: e.id }, [e.kind === "work" ? (F(), x("div", {
5440
5484
  key: 0,
5441
5485
  "data-test": "messaging-tool-activity",
5442
5486
  "data-journal-outcome": e.journal.outcome,
5443
5487
  class: "mb-4 w-full"
5444
- }, [T(Qe, {
5488
+ }, [T($e, {
5445
5489
  model: e.journal,
5446
- "is-light": q.value
5447
- }, null, 8, ["model", "is-light"])], 8, da)) : e.kind === "text" && e.content ? (P(), x("div", {
5490
+ "is-light": Z.value
5491
+ }, null, 8, ["model", "is-light"])], 8, pa)) : e.kind === "text" && e.content ? (F(), x("div", {
5448
5492
  key: 1,
5449
5493
  "data-test": "messaging-live-text-block",
5450
- class: j(["mb-4", q.value ? "text-theme-800" : "text-white/95"])
5451
- }, [T(ui, {
5494
+ class: j(["mb-4", Z.value ? "text-theme-800" : "text-white/95"])
5495
+ }, [T(fi, {
5452
5496
  text: e.content,
5453
- inverted: !q.value,
5497
+ inverted: !Z.value,
5454
5498
  streaming: e.id === k.value,
5455
- onClick: a[5] || (a[5] = U(() => {}, ["stop"])),
5499
+ onClick: a[5] || (a[5] = he(() => {}, ["stop"])),
5456
5500
  onAction: handleCardAction
5457
5501
  }, null, 8, [
5458
5502
  "text",
5459
5503
  "inverted",
5460
5504
  "streaming"
5461
- ])], 2)) : (P(), x("div", fa, [T(ve, { class: j(["size-3.5", q.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : oe.value ? (P(), x("div", {
5505
+ ])], 2)) : (F(), x("div", ma, [T(ve, { class: j(["size-3.5", Z.value ? "text-theme-500" : "text-white/70"]) }, null, 8, ["class"])]))], 64))), 128)) : oe.value ? (F(), x("div", {
5462
5506
  key: 1,
5463
5507
  "data-test": "messaging-tool-activity",
5464
5508
  "data-journal-outcome": oe.value.outcome,
5465
5509
  class: "mb-4 w-full"
5466
- }, [T(Qe, {
5510
+ }, [T($e, {
5467
5511
  model: oe.value,
5468
- "is-light": q.value
5469
- }, null, 8, ["model", "is-light"])], 8, pa)) : b("", !0)], 64)) : b("", !0)
5512
+ "is-light": Z.value
5513
+ }, null, 8, ["model", "is-light"])], 8, ha)) : b("", !0)], 64)) : b("", !0)
5470
5514
  ], 64))), 128)),
5471
- K.value ? (P(), x("div", {
5515
+ Ee.value ? (F(), x("div", {
5472
5516
  key: 1,
5473
- "data-test": B.value ? "messaging-working-state" : "messaging-thinking-indicator",
5474
- "data-working-description": B.value,
5517
+ "data-test": ae.value ? "messaging-working-state" : "messaging-thinking-indicator",
5518
+ "data-working-description": ae.value,
5519
+ "data-taking-longer": we.value || void 0,
5475
5520
  role: "status",
5476
5521
  "aria-live": "polite",
5477
- class: j(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", q.value ? "text-theme-500" : "text-white/50"])
5478
- }, [S("span", ha, [(P(), x(h, null, I(3, (e) => S("span", {
5479
- key: e,
5480
- "data-test": "messaging-thinking-dot",
5481
- class: "chat-working-dot size-1.5 rounded-full bg-current",
5482
- style: M({ animationDelay: `${(e - 1) * .18}s` })
5483
- }, null, 4)), 64))]), S("span", ga, H(K.value), 1)], 10, ma)) : b("", !0),
5484
- W.value ? (P(), x("div", {
5522
+ class: j(["mb-4 flex items-center gap-2.5 pl-0.5 text-[13.5px] leading-snug", Z.value ? "text-theme-500" : "text-white/50"])
5523
+ }, [a[19] || (a[19] = S("span", {
5524
+ "data-test": "messaging-thinking-line",
5525
+ class: "pageline-stroke h-[1.5px] w-6 shrink-0 rounded-full",
5526
+ "aria-hidden": "true"
5527
+ }, null, -1)), S("span", _a, U(Ee.value), 1)], 10, ga)) : b("", !0),
5528
+ G.value ? (F(), x("div", {
5485
5529
  key: 2,
5486
5530
  "data-test": "messaging-transient-issue",
5487
- "data-issue-code": W.value.code,
5488
- class: j(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", q.value ? "text-theme-600" : "text-white/60"])
5531
+ "data-issue-code": G.value.code,
5532
+ class: j(["flex items-center gap-1.5 pl-2 pr-3 pb-1 mb-3 text-[12px] leading-snug", Z.value ? "text-theme-600" : "text-white/60"])
5489
5533
  }, [
5490
- a[25] || (a[25] = S("i", {
5534
+ a[20] || (a[20] = S("i", {
5491
5535
  class: "i-tabler-alert-circle size-3.5 shrink-0 text-red-500",
5492
5536
  "aria-hidden": "true"
5493
5537
  }, null, -1)),
5494
- S("span", null, [C(H(W.value.message), 1), W.value.help ? (P(), x(h, { key: 0 }, [C(H(W.value.help), 1)], 64)) : b("", !0)]),
5495
- W.value.actionUrl && W.value.actionLabel ? (P(), x("a", {
5538
+ S("span", null, [C(U(G.value.message), 1), G.value.help ? (F(), x(h, { key: 0 }, [C(U(G.value.help), 1)], 64)) : b("", !0)]),
5539
+ G.value.actionUrl && G.value.actionLabel ? (F(), x("a", {
5496
5540
  key: 0,
5497
- href: W.value.actionUrl,
5541
+ href: G.value.actionUrl,
5498
5542
  class: "shrink-0 underline underline-offset-2",
5499
- onClick: a[6] || (a[6] = U(() => {}, ["stop"]))
5500
- }, H(W.value.actionLabel), 9, va)) : b("", !0)
5501
- ], 10, _a)) : b("", !0)
5543
+ onClick: a[6] || (a[6] = he(() => {}, ["stop"]))
5544
+ }, U(G.value.actionLabel), 9, ya)) : b("", !0)
5545
+ ], 10, va)) : b("", !0)
5502
5546
  ], 2)]),
5503
5547
  _: 3
5504
5548
  }, 8, [
@@ -5508,40 +5552,40 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5508
5552
  ]),
5509
5553
  S("div", {
5510
5554
  "data-test": "messaging-composer-footer",
5511
- inert: Ke.value,
5512
- "aria-hidden": Ke.value ? "true" : void 0,
5555
+ inert: q.value,
5556
+ "aria-hidden": q.value ? "true" : void 0,
5513
5557
  class: j(["left-0 right-0 z-30 px-3 @lg/chat:px-5 pb-[max(env(safe-area-inset-bottom),1rem)]", [
5514
- R.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5515
- e.centered && R.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
5516
- q.value ? e.centered ? "bg-theme-0" : "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"
5558
+ B.value.length === 0 || e.centered ? "relative shrink-0" : "absolute bottom-0",
5559
+ e.centered && B.value.length > 0 ? "pt-0 sm:pb-7" : "pt-3",
5560
+ Z.value ? e.centered ? "bg-theme-0" : "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"
5517
5561
  ]])
5518
- }, [ae(t.$slots, "composer", {}, () => [Te.value ? (P(), x("div", {
5562
+ }, [ie(t.$slots, "composer", {}, () => [je.value ? (F(), x("div", {
5519
5563
  key: 0,
5520
5564
  "data-test": "messaging-seat",
5521
- "data-seat-state": we.value,
5565
+ "data-seat-state": Ae.value,
5522
5566
  role: "status",
5523
5567
  "aria-live": "polite",
5524
- class: j(["py-3 text-center text-[14px]", q.value ? "text-theme-500" : "text-white/70"])
5525
- }, H(Te.value), 11, ba)) : (P(), x(h, { key: 1 }, [
5526
- Oe.value.length > 0 ? (P(), x("div", {
5568
+ class: j(["py-3 text-center text-[14px]", Z.value ? "text-theme-500" : "text-white/70"])
5569
+ }, U(je.value), 11, xa)) : (F(), x(h, { key: 1 }, [
5570
+ Pe.value.length > 0 ? (F(), x("div", {
5527
5571
  key: 0,
5528
5572
  class: j(["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" : ""])
5529
- }, [(P(!0), x(h, null, I(Oe.value, (e, t) => (P(), x("div", {
5573
+ }, [(F(!0), x(h, null, R(Pe.value, (e, t) => (F(), x("div", {
5530
5574
  key: t,
5531
5575
  class: "relative shrink-0 group"
5532
- }, [e.type === "image" ? (P(), x("img", {
5576
+ }, [e.type === "image" ? (F(), x("img", {
5533
5577
  key: 0,
5534
5578
  src: e.src,
5535
5579
  alt: e.filename,
5536
- class: j(["size-14 rounded-xl object-cover border", q.value ? "border-black/10" : "border-white/20"])
5537
- }, null, 10, xa)) : (P(), x("div", {
5580
+ class: j(["size-14 rounded-xl object-cover border", Z.value ? "border-black/10" : "border-white/20"])
5581
+ }, null, 10, Sa)) : (F(), x("div", {
5538
5582
  key: 1,
5539
- class: j(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", q.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5540
- }, [a[26] || (a[26] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", Sa, H(e.filename), 1)], 2)), S("button", {
5583
+ class: j(["h-14 px-3 rounded-xl flex items-center gap-1.5 text-xs border", Z.value ? "border-black/10 bg-theme-50 text-theme-600" : "border-white/20 bg-white/10 text-white/70"])
5584
+ }, [a[21] || (a[21] = S("i", { class: "i-tabler-file size-4" }, null, -1)), S("span", Ca, U(e.filename), 1)], 2)), S("button", {
5541
5585
  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",
5542
5586
  onClick: (e) => removeAttachment(t)
5543
- }, [...a[27] || (a[27] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, Ca)]))), 128)), ke.value ? (P(), x("div", wa, [T(ve, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
5544
- Me.value ? (P(), x("input", {
5587
+ }, [...a[22] || (a[22] = [S("i", { class: "i-tabler-x size-3" }, null, -1)])], 8, wa)]))), 128)), Fe.value ? (F(), x("div", Ta, [T(ve, { class: "size-5" })])) : b("", !0)], 2)) : b("", !0),
5588
+ Re.value ? (F(), x("input", {
5545
5589
  key: 1,
5546
5590
  ref_key: "fileInput",
5547
5591
  ref: o,
@@ -5552,22 +5596,22 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5552
5596
  }, null, 544)) : b("", !0),
5553
5597
  S("div", {
5554
5598
  "data-test": "messaging-composer",
5555
- "data-composer-action": Pe.value,
5556
- class: j(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? R.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", q.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-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5599
+ "data-composer-action": Ve.value,
5600
+ class: j(["w-full cursor-text rounded-2xl px-4 pb-2.5 pt-3 transition-colors duration-200", [e.centered ? B.value.length === 0 ? "max-w-[680px] mx-auto" : "max-w-[720px] mx-auto" : "", Z.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-200 hover:ring-theme-300 focus-within:ring-theme-300" : "bg-white/10 backdrop-blur-xl ring-1 ring-white/15 hover:ring-white/25 focus-within:bg-white/15 focus-within:ring-white/25"]]),
5557
5601
  onClick: focusComposer
5558
- }, [Ve.value ? (P(), x("div", {
5602
+ }, [Je.value ? (F(), x("div", {
5559
5603
  key: 1,
5560
5604
  "data-test": "messaging-recording-state",
5561
- class: j(["flex min-w-0 items-center gap-2 py-1", q.value ? "text-theme-700" : "text-white/80"])
5605
+ class: j(["flex min-w-0 items-center gap-2 py-1", Z.value ? "text-theme-700" : "text-white/80"])
5562
5606
  }, [
5563
- a[28] || (a[28] = S("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5564
- S("span", Da, H(He.value), 1),
5565
- S("span", { class: j(["min-w-0 truncate text-sm", q.value ? "text-theme-400" : "text-white/45"]) }, H(We.value), 3)
5566
- ], 2)) : pe((P(), x("textarea", {
5607
+ a[23] || (a[23] = S("span", { class: "size-2.5 shrink-0 rounded-full bg-red-500" }, null, -1)),
5608
+ S("span", Oa, U(Xe.value), 1),
5609
+ S("span", { class: j(["min-w-0 truncate text-sm", Z.value ? "text-theme-400" : "text-white/45"]) }, U(Ze.value), 3)
5610
+ ], 2)) : de((F(), x("textarea", {
5567
5611
  key: 0,
5568
5612
  ref_key: "textarea",
5569
5613
  ref: i,
5570
- "onUpdate:modelValue": a[7] || (a[7] = (e) => De.value = e),
5614
+ "onUpdate:modelValue": a[7] || (a[7] = (e) => Ne.value = e),
5571
5615
  "data-test": "messaging-input",
5572
5616
  rows: "1",
5573
5617
  enterkeyhint: "send",
@@ -5576,98 +5620,108 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5576
5620
  autocapitalize: "sentences",
5577
5621
  autocorrect: "on",
5578
5622
  spellcheck: "true",
5579
- placeholder: Ce.value,
5580
- disabled: Se.value,
5623
+ placeholder: ke.value,
5624
+ disabled: Oe.value,
5581
5625
  style: {
5582
5626
  fontSize: "16px",
5583
5627
  resize: "none"
5584
5628
  },
5585
- class: j(["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", q.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5629
+ class: j(["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", Z.value ? "text-theme-900 placeholder-theme-400" : "text-white placeholder-white/50"]),
5586
5630
  onKeydown: handleKeydown
5587
- }, null, 42, Ea)), [[ce, De.value]]), S("div", Oa, [
5631
+ }, null, 42, Da)), [[se, Ne.value]]), S("div", ka, [
5588
5632
  S("button", {
5589
5633
  class: j(["-ml-2 flex size-8 items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", [
5590
- Me.value ? "cursor-pointer" : "cursor-default",
5591
- q.value ? "text-theme-500" : "text-white/50",
5592
- ke.value || je.value ? "opacity-50 pointer-events-none" : ""
5634
+ Re.value ? "cursor-pointer" : "cursor-default",
5635
+ Z.value ? "text-theme-500" : "text-white/50",
5636
+ Fe.value || Le.value ? "opacity-50 pointer-events-none" : ""
5593
5637
  ]]),
5594
- disabled: Se.value || ke.value || je.value || !Me.value,
5595
- "aria-label": Me.value ? "Attach file" : "File attachments unavailable",
5596
- title: Me.value ? "Attach file" : "File attachments unavailable",
5597
- onClick: a[8] || (a[8] = (e) => Me.value && triggerFileInput())
5598
- }, [ke.value ? (P(), x("i", Aa)) : (P(), x("i", ja)), S("span", Ma, H(Me.value ? "Attach file" : "File attachments unavailable"), 1)], 10, ka),
5599
- a[31] || (a[31] = S("div", { class: "flex-1" }, null, -1)),
5600
- S("div", Na, [(Be.value || Ve.value) && !Ke.value ? (P(), x("button", {
5601
- key: 0,
5602
- "data-test": "messaging-record-audio-btn",
5603
- class: j(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Ve.value ? q.value ? "text-theme-900 scale-110" : "text-white scale-110" : q.value ? "text-theme-500" : "text-white/60"]),
5604
- "aria-label": Ge.value,
5605
- title: Ge.value,
5606
- onPointerdown: a[9] || (a[9] = U((e) => startRecording(), ["prevent"])),
5607
- onPointerup: a[10] || (a[10] = U((e) => finishRecording({ cancelled: !1 }), ["prevent"])),
5608
- onPointercancel: a[11] || (a[11] = U((e) => finishRecording({ cancelled: !0 }), ["prevent"])),
5609
- onKeydown: [
5610
- a[12] || (a[12] = he(U((e) => startRecording(), ["prevent"]), ["enter"])),
5611
- a[14] || (a[14] = he(U((e) => startRecording(), ["prevent"]), ["space"])),
5612
- a[16] || (a[16] = he(U((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5613
- ],
5614
- onKeyup: [a[13] || (a[13] = he(U((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["enter"])), a[15] || (a[15] = he(U((e) => finishRecording({ cancelled: !1 }), ["prevent"]), ["space"]))]
5615
- }, [S("i", { class: j([Ve.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", Fa, H(Ge.value), 1)], 42, Pa)) : b("", !0), $e.value ? (P(), x("button", {
5616
- key: 1,
5617
- "data-test": "messaging-voice-start-btn",
5618
- class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [q.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", et.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5619
- disabled: et.value,
5620
- "aria-label": tt.value,
5621
- title: tt.value,
5622
- onClick: a[17] || (a[17] = (e) => startVoiceConversation())
5623
- }, [S("span", La, [(P(), x(h, null, I([
5624
- 7,
5625
- 13,
5626
- 16,
5627
- 11,
5628
- 14
5629
- ], (e) => S("span", {
5630
- key: e,
5631
- class: "w-[2px] rounded-full bg-current",
5632
- style: M({ height: `${e}px` })
5633
- }, null, 4)), 64))]), a[29] || (a[29] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, Ia)) : Ve.value ? b("", !0) : (P(), x(h, { key: 2 }, [Ie.value ? (P(), x("button", {
5634
- key: 0,
5635
- "data-test": "messaging-secondary-stop-btn",
5636
- class: j(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", q.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5637
- "aria-label": "Stop work",
5638
- title: "Stop work",
5639
- onClick: a[18] || (a[18] = (t) => e.chatController?.stopChatTurn())
5640
- }, [...a[30] || (a[30] = [S("i", {
5641
- class: "i-tabler-player-stop-filled size-3.5",
5642
- "aria-hidden": "true"
5643
- }, null, -1), S("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : b("", !0), S("button", {
5644
- "data-test": "messaging-send-btn",
5645
- "data-composer-action": Pe.value,
5646
- class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Fe.value ? q.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" : q.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5647
- disabled: !Fe.value,
5648
- "aria-label": ze.value,
5649
- title: ze.value,
5650
- onClick: a[19] || (a[19] = (e) => handleComposerAction())
5651
- }, [Pe.value === "stop" ? (P(), x("i", za)) : (P(), x("i", Ba)), S("span", Va, H(ze.value), 1)], 10, Ra)], 64))])
5652
- ])], 10, Ta),
5653
- e.centered && R.value.length > 0 ? (P(), x("p", Ha, H(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
5654
- ], 64))], !0)], 10, ya)
5638
+ disabled: Oe.value || Fe.value || Le.value || !Re.value,
5639
+ "aria-label": Re.value ? "Attach file" : "File attachments unavailable",
5640
+ title: Re.value ? "Attach file" : "File attachments unavailable",
5641
+ onClick: a[8] || (a[8] = (e) => Re.value && triggerFileInput())
5642
+ }, [Fe.value ? (F(), x("i", ja)) : (F(), x("i", Ma)), S("span", Na, U(Re.value ? "Attach file" : "File attachments unavailable"), 1)], 10, Aa),
5643
+ a[27] || (a[27] = S("div", { class: "flex-1" }, null, -1)),
5644
+ S("div", Pa, [
5645
+ Je.value && !Ye.value && !q.value ? (F(), x("button", {
5646
+ key: 0,
5647
+ "data-test": "messaging-record-discard-btn",
5648
+ class: j(["flex size-8 cursor-pointer items-center justify-center transition-opacity hover:opacity-70 pointer-coarse:size-11", Z.value ? "text-theme-400" : "text-white/40"]),
5649
+ "aria-label": "Discard recording",
5650
+ title: "Discard recording",
5651
+ onClick: a[9] || (a[9] = (e) => finishRecording({ cancelled: !0 }))
5652
+ }, [...a[24] || (a[24] = [S("i", {
5653
+ class: "i-tabler-x size-[18px]",
5654
+ "aria-hidden": "true"
5655
+ }, null, -1)])], 2)) : b("", !0),
5656
+ (qe.value || Je.value) && !Ye.value && !q.value ? (F(), x("button", {
5657
+ key: 1,
5658
+ "data-test": "messaging-record-audio-btn",
5659
+ class: j(["flex size-8 cursor-pointer items-center justify-center transition-[opacity,transform] duration-200 hover:opacity-70 pointer-coarse:size-11", Je.value ? Z.value ? "text-theme-900 scale-110" : "text-white scale-110" : Z.value ? "text-theme-500" : "text-white/60"]),
5660
+ "aria-label": Qe.value,
5661
+ title: Qe.value,
5662
+ onPointerdown: he(onRecordPointerDown, ["prevent"]),
5663
+ onPointerup: he(onRecordPointerUp, ["prevent"]),
5664
+ onPointercancel: he(onRecordPointerCancel, ["prevent"]),
5665
+ onClick: onRecordClick,
5666
+ onKeydown: a[10] || (a[10] = pe(he((e) => finishRecording({ cancelled: !0 }), ["prevent"]), ["escape"]))
5667
+ }, [S("i", { class: j([Je.value ? "i-tabler-microphone-filled" : "i-tabler-microphone", "size-[18px]"]) }, null, 2), S("span", Ia, U(Qe.value), 1)], 42, Fa)) : b("", !0),
5668
+ J.value ? (F(), x("button", {
5669
+ key: 2,
5670
+ "data-test": "messaging-voice-start-btn",
5671
+ class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", [Z.value ? "bg-theme-900 text-theme-0 hover:bg-theme-800" : "bg-theme-0 text-theme-950 hover:bg-theme-100", X.value ? "cursor-not-allowed opacity-40" : "cursor-pointer"]]),
5672
+ disabled: X.value,
5673
+ "aria-label": at.value,
5674
+ title: at.value,
5675
+ onClick: a[11] || (a[11] = (e) => startVoiceConversation())
5676
+ }, [S("span", Ra, [(F(), x(h, null, R([
5677
+ 7,
5678
+ 13,
5679
+ 16,
5680
+ 11,
5681
+ 14
5682
+ ], (e) => S("span", {
5683
+ key: e,
5684
+ class: "w-[2px] rounded-full bg-current",
5685
+ style: M({ height: `${e}px` })
5686
+ }, null, 4)), 64))]), a[25] || (a[25] = S("span", { class: "sr-only" }, "Start voice conversation", -1))], 10, La)) : Je.value ? b("", !0) : (F(), x(h, { key: 3 }, [Ue.value ? (F(), x("button", {
5687
+ key: 0,
5688
+ "data-test": "messaging-secondary-stop-btn",
5689
+ class: j(["mr-2 flex size-8 cursor-pointer items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", Z.value ? "bg-theme-100 text-theme-700 hover:bg-theme-200" : "bg-white/10 text-white/70 hover:bg-white/15"]),
5690
+ "aria-label": "Stop work",
5691
+ title: "Stop work",
5692
+ onClick: a[12] || (a[12] = (t) => e.chatController?.stopChatTurn())
5693
+ }, [...a[26] || (a[26] = [S("i", {
5694
+ class: "i-tabler-player-stop-filled size-3.5",
5695
+ "aria-hidden": "true"
5696
+ }, null, -1), S("span", { class: "sr-only" }, "Stop work", -1)])], 2)) : b("", !0), S("button", {
5697
+ "data-test": "messaging-send-btn",
5698
+ "data-composer-action": Ve.value,
5699
+ class: j(["flex size-8 items-center justify-center rounded-full transition-colors duration-150 pointer-coarse:size-11", He.value ? Z.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" : Z.value ? "bg-theme-100 text-theme-400" : "bg-white/10 text-white/30"]),
5700
+ disabled: !He.value,
5701
+ "aria-label": Ke.value,
5702
+ title: Ke.value,
5703
+ onClick: a[13] || (a[13] = (e) => handleComposerAction())
5704
+ }, [Ve.value === "stop" ? (F(), x("i", Ba)) : (F(), x("i", Va)), S("span", Ha, U(Ke.value), 1)], 10, za)], 64))
5705
+ ])
5706
+ ])], 10, Ea),
5707
+ e.centered && B.value.length > 0 ? (F(), x("p", Ua, U(e.agent.displayName.value) + " is AI and can make mistakes. ", 1)) : b("", !0)
5708
+ ], 64))], !0)], 10, ba)
5655
5709
  ], 2));
5656
5710
  }
5657
- }), Wa = /* @__PURE__ */ e((e, t) => {
5711
+ }), Ga = /* @__PURE__ */ e((e, t) => {
5658
5712
  let n = e.__vccOpts || e;
5659
5713
  for (let [e, r] of t) n[e] = r;
5660
5714
  return n;
5661
- }, "default"), Ga = /*#__PURE__*/ Wa(Ua, [["__scopeId", "data-v-58487c4f"]]), Ka = { class: "agent-wrap" }, qa = {
5715
+ }, "default"), Ka = /*#__PURE__*/ Ga(Wa, [["__scopeId", "data-v-cde83966"]]), qa = { class: "agent-wrap" }, Ja = {
5662
5716
  key: 0,
5663
5717
  class: "flex items-center justify-center h-full"
5664
- }, Ja = {
5718
+ }, Ya = {
5665
5719
  key: 2,
5666
5720
  class: "flex h-full flex-col items-center justify-center gap-4 px-6 text-center",
5667
5721
  role: "status",
5668
5722
  "aria-live": "polite",
5669
5723
  "data-test": "agent-unavailable"
5670
- }, Ya = /* @__PURE__ */ k({
5724
+ }, Xa = /* @__PURE__ */ k({
5671
5725
  __name: "AgentWrap",
5672
5726
  props: {
5673
5727
  sdk: {},
@@ -5687,7 +5741,7 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5687
5741
  let t = s("AgentWrap"), i = e, a = i.sdk || n.getInstance({
5688
5742
  isDev: typeof window < "u" ? window.location.hostname === "localhost" || window.location.hostname.includes("127.0.0.1") : !1,
5689
5743
  ...i.apiBase && { apiBase: i.apiBase }
5690
- }), o = B(!i.agent), c = B(i.agent ? new r({ config: i.agent }) : void 0), u = B();
5744
+ }), o = H(!i.agent), c = H(i.agent ? new r({ config: i.agent }) : void 0), u = H();
5691
5745
  async function loadAgent() {
5692
5746
  if (i.agent) {
5693
5747
  t.debug("Agent provided via props, skipping fetch", {
@@ -5763,15 +5817,15 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5763
5817
  });
5764
5818
  }
5765
5819
  }
5766
- return re(loadAgent), (t, n) => (P(), x("div", Ka, [o.value ? (P(), x("div", qa, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ae(t.$slots, "default", {
5767
- sdk: oe(a),
5820
+ return ne(loadAgent), (t, n) => (F(), x("div", qa, [o.value ? (F(), x("div", Ja, [S("div", { class: j(["size-6 animate-spin rounded-full border-b-2", i.bare ? "border-theme-400" : "border-white"]) }, null, 2)])) : c.value ? ie(t.$slots, "default", {
5821
+ sdk: ae(a),
5768
5822
  agent: c.value,
5769
5823
  context: e.clientContext ?? e.context,
5770
5824
  firstMessage: e.firstMessage,
5771
5825
  buttonText: e.buttonText,
5772
5826
  buttonIcon: e.buttonIcon,
5773
5827
  loading: o.value
5774
- }, void 0, void 0, 1) : u.value ? (P(), x("div", Ja, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
5828
+ }, void 0, void 0, 1) : u.value ? (F(), x("div", Ya, [n[0] || (n[0] = S("p", { class: "text-sm font-medium text-theme-600" }, " This assistant is unavailable right now. ", -1)), S("button", {
5775
5829
  type: "button",
5776
5830
  class: "min-h-11 rounded-full bg-theme-900 px-5 text-sm font-semibold text-theme-0 transition-colors hover:bg-theme-700",
5777
5831
  "data-test": "agent-unavailable-retry",
@@ -5780,6 +5834,6 @@ var Ai = ["data-voice-state", "data-voice-activity"], ji = ["src"], Mi = {
5780
5834
  }
5781
5835
  });
5782
5836
  //#endregion
5783
- export { ui as a, Ae as c, handleImageError as d, parseButtonTemplate as f, ve as g, r as h, Vi as i, Oe as l, G as m, Ga as n, Re as o, AgentChatController as p, Wa as r, Me as s, Ya as t, getAgentAvatarUrl as u };
5837
+ export { fi as a, Me as c, handleImageError as d, parseButtonTemplate as f, ve as g, r as h, Ui as i, Ae as l, G as m, Ka as n, Be as o, AgentChatController as p, Ga as r, Pe as s, Xa as t, getAgentAvatarUrl as u };
5784
5838
 
5785
5839
  //# sourceMappingURL=AgentWrap.js.map