page-agent-sdk 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6886,7 +6886,7 @@ async function Df(e, t, n, r, i, a) {
6886
6886
  a?.(e);
6887
6887
  return;
6888
6888
  }
6889
- r && (e.type === "tool_call" || e.type === "tool_result") && r(e);
6889
+ r && (e.type === "tool_call" || e.type === "tool_result" || e.type === "reasoning") && r(e);
6890
6890
  }, b.signal);
6891
6891
  if (!t.timeoutMs || t.timeoutMs <= 0) try {
6892
6892
  return await C;
@@ -6907,6 +6907,17 @@ async function Df(e, t, n, r, i, a) {
6907
6907
  }
6908
6908
  function Of(e) {
6909
6909
  let n = e.maxParallel ?? gf, i, a, o, s = (t, n) => (r) => {
6910
+ if (r.type === "reasoning") {
6911
+ a?.({
6912
+ type: "subagent",
6913
+ taskId: t,
6914
+ label: n,
6915
+ kind: "reasoning",
6916
+ name: "",
6917
+ delta: r.delta
6918
+ });
6919
+ return;
6920
+ }
6910
6921
  e.tracker?.pushStep(t, {
6911
6922
  kind: r.type,
6912
6923
  name: r.name,
@@ -7015,6 +7026,17 @@ function Af(e, t) {
7015
7026
  }
7016
7027
  function jf(e, n) {
7017
7028
  let i, a, o, s = (e, t) => (n) => {
7029
+ if (n.type === "reasoning") {
7030
+ a?.({
7031
+ type: "subagent",
7032
+ taskId: e,
7033
+ label: t,
7034
+ kind: "reasoning",
7035
+ name: "",
7036
+ delta: n.delta
7037
+ });
7038
+ return;
7039
+ }
7018
7040
  a && a({
7019
7041
  type: "subagent",
7020
7042
  taskId: e,
@@ -7043,7 +7065,7 @@ function jf(e, n) {
7043
7065
  ...e,
7044
7066
  source: `子:${d.id}`
7045
7067
  }), c = n.tracker, l = c ? `use_${d.id}-${Math.random().toString(36).slice(2, 6)}` : `use_${d.id}`, u = s(`use_${d.id}`, d.id), f = c ? (e) => {
7046
- c.pushStep(l, {
7068
+ e.type !== "reasoning" && c.pushStep(l, {
7047
7069
  kind: e.type,
7048
7070
  name: e.name,
7049
7071
  ts: Date.now()
@@ -11863,7 +11885,7 @@ function hg(e, n) {
11863
11885
  if (!G.agent) throw Error("page-agent-sdk: agent 尚未初始化完成,请先 await mount()");
11864
11886
  y?.setProtectedRefs?.(sg(e));
11865
11887
  let r = (e) => {
11866
- t?.(e), Ze(e);
11888
+ t?.(e), Ze(e), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && G.infoTick.value++;
11867
11889
  };
11868
11890
  if (n) {
11869
11891
  let e = () => a.resolve("keep_external");
@@ -12462,12 +12484,18 @@ function _g(e = {}) {
12462
12484
  case "tool_result":
12463
12485
  for (let n = t.steps.length - 1; n >= 0; n--) if (t.steps[n].name === e.name && t.steps[n].status === "running") {
12464
12486
  t.steps[n].result = e.result, t.steps[n].status = e.status, t.steps[n].durationMs = e.durationMs;
12487
+ let r = t.steps[n].subReason;
12488
+ r && r.length > 80 && (t.steps[n].subReason = r.slice(0, 80) + "…");
12465
12489
  break;
12466
12490
  }
12467
12491
  break;
12468
12492
  case "subagent": {
12469
12493
  let n = t.steps[t.steps.length - 1];
12470
12494
  if (!n) break;
12495
+ if (e.kind === "reasoning") {
12496
+ n.subReason = (n.subReason || "") + (e.delta || "");
12497
+ break;
12498
+ }
12471
12499
  n.children ||= [];
12472
12500
  let r = e.label ? `[${e.label}] ${e.name}` : e.name;
12473
12501
  if (e.kind === "tool_call") n.children.push({
@@ -13007,11 +13035,17 @@ var Sg = { class: "chat-header" }, Cg = { class: "header-left" }, wg = { class:
13007
13035
  class: "step-duration"
13008
13036
  }, Xg = {
13009
13037
  key: 0,
13038
+ class: "step-sub-reason"
13039
+ }, Zg = { class: "sub-reason-head" }, Qg = { class: "sub-reason-label" }, $g = { class: "sub-reason-body" }, e_ = {
13040
+ key: 1,
13010
13041
  class: "step-children"
13011
- }, Zg = { class: "step-name" }, Qg = {
13042
+ }, t_ = { class: "step-name" }, n_ = {
13012
13043
  key: 0,
13044
+ class: "step-count"
13045
+ }, r_ = {
13046
+ key: 1,
13013
13047
  class: "step-status running"
13014
- }, $g = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
13048
+ }, i_ = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
13015
13049
  __name: "MessageSteps",
13016
13050
  props: { steps: {} },
13017
13051
  setup(e) {
@@ -13023,13 +13057,14 @@ var Sg = { class: "chat-header" }, Cg = { class: "header-left" }, wg = { class:
13023
13057
  let t = [];
13024
13058
  for (let n of e) {
13025
13059
  let e = t.length ? t[t.length - 1] : null;
13026
- e && e.name === n.name ? (e.count++, n.status === "running" && (e.hasRunning = !0), n.status === "error" && (e.hasError = !0), n.durationMs && (e.totalMs += n.durationMs), n.children?.length && e.children.push(...n.children)) : t.push({
13060
+ e && e.name === n.name ? (e.count++, n.status === "running" && (e.hasRunning = !0), n.status === "error" && (e.hasError = !0), n.durationMs && (e.totalMs += n.durationMs), n.children?.length && e.children.push(...n.children), n.subReason && (e.subReason = (e.subReason || "") + n.subReason)) : t.push({
13027
13061
  name: n.name,
13028
13062
  count: 1,
13029
13063
  hasRunning: n.status === "running",
13030
13064
  hasError: n.status === "error",
13031
13065
  children: n.children?.length ? [...n.children] : [],
13032
- totalMs: n.durationMs ?? 0
13066
+ totalMs: n.durationMs ?? 0,
13067
+ subReason: n.subReason
13033
13068
  });
13034
13069
  }
13035
13070
  return t.map((e) => ({
@@ -13037,32 +13072,38 @@ var Sg = { class: "chat-header" }, Cg = { class: "header-left" }, wg = { class:
13037
13072
  count: e.count,
13038
13073
  status: e.hasError ? "error" : e.hasRunning ? "running" : "done",
13039
13074
  children: e.children,
13040
- durationMs: e.totalMs || void 0
13075
+ durationMs: e.totalMs || void 0,
13076
+ subReason: e.subReason
13041
13077
  }));
13042
13078
  }
13043
13079
  let i = Ys(() => r(t.steps));
13044
- return (t, r) => e.steps.length ? (Y(), X("div", Gg, [(Y(!0), X(J, null, ia(i.value, (e, t) => (Y(), X("div", {
13080
+ return (t, a) => e.steps.length ? (Y(), X("div", Gg, [(Y(!0), X(J, null, ia(i.value, (e, t) => (Y(), X("div", {
13045
13081
  key: t,
13046
13082
  class: U(["step-item", e.status])
13047
- }, [Z("div", Kg, [
13048
- Z("span", { class: U(["status-dot", e.status]) }, null, 2),
13049
- Z("span", qg, W(e.name), 1),
13050
- e.count > 1 ? (Y(), X("span", Jg, "×" + W(e.count), 1)) : Q("", !0),
13051
- Z("span", { class: U(["step-status", e.status]) }, W(n(e.status)), 3),
13052
- e.durationMs != null && e.status !== "running" ? (Y(), X("span", Yg, W(e.durationMs) + "ms", 1)) : Q("", !0)
13053
- ]), e.children && e.children.length ? (Y(), X("div", Xg, [r[0] ||= Z("div", { class: "step-children-label" }, "🧬 子 agent 进度", -1), (Y(!0), X(J, null, ia(e.children, (e, t) => (Y(), X("div", {
13054
- key: t,
13055
- class: U(["step-child", e.status])
13056
13083
  }, [
13057
- Z("span", { class: U(["status-dot sm", e.status]) }, null, 2),
13058
- Z("span", Zg, W(e.name), 1),
13059
- e.status === "running" ? (Y(), X("span", Qg, "…")) : Q("", !0)
13060
- ], 2))), 128))])) : Q("", !0)], 2))), 128))])) : Q("", !0);
13061
- }
13062
- }), [["__scopeId", "data-v-c9f48455"]]);
13084
+ Z("div", Kg, [
13085
+ Z("span", { class: U(["status-dot", e.status]) }, null, 2),
13086
+ Z("span", qg, W(e.name), 1),
13087
+ e.count > 1 ? (Y(), X("span", Jg, "×" + W(e.count), 1)) : Q("", !0),
13088
+ Z("span", { class: U(["step-status", e.status]) }, W(n(e.status)), 3),
13089
+ e.durationMs != null && e.status !== "running" ? (Y(), X("span", Yg, W(e.durationMs) + "ms", 1)) : Q("", !0)
13090
+ ]),
13091
+ e.subReason ? (Y(), X("details", Xg, [Z("summary", Zg, [Z("span", { class: U(["status-dot sm", e.status === "running" ? "running" : "ok"]) }, null, 2), Z("span", Qg, W(e.status === "running" ? "思考中…" : "思考过程"), 1)]), Z("div", $g, W(e.subReason), 1)])) : Q("", !0),
13092
+ e.children && e.children.length ? (Y(), X("div", e_, [a[0] ||= Z("div", { class: "step-children-label" }, "🧬 子 agent 进度", -1), (Y(!0), X(J, null, ia(r(e.children), (e, t) => (Y(), X("div", {
13093
+ key: t,
13094
+ class: U(["step-child", e.status])
13095
+ }, [
13096
+ Z("span", { class: U(["status-dot sm", e.status]) }, null, 2),
13097
+ Z("span", t_, W(e.name), 1),
13098
+ e.count > 1 ? (Y(), X("span", n_, "×" + W(e.count), 1)) : Q("", !0),
13099
+ e.status === "running" ? (Y(), X("span", r_, "…")) : Q("", !0)
13100
+ ], 2))), 128))])) : Q("", !0)
13101
+ ], 2))), 128))])) : Q("", !0);
13102
+ }
13103
+ }), [["__scopeId", "data-v-ab63d20b"]]);
13063
13104
  //#endregion
13064
13105
  //#region node_modules/marked/lib/marked.esm.js
13065
- function e_() {
13106
+ function a_() {
13066
13107
  return {
13067
13108
  async: !1,
13068
13109
  breaks: !1,
@@ -13076,35 +13117,35 @@ function e_() {
13076
13117
  walkTokens: null
13077
13118
  };
13078
13119
  }
13079
- var t_ = e_();
13080
- function n_(e) {
13081
- t_ = e;
13120
+ var o_ = a_();
13121
+ function s_(e) {
13122
+ o_ = e;
13082
13123
  }
13083
- var r_ = { exec: () => null };
13084
- function i_(e) {
13124
+ var c_ = { exec: () => null };
13125
+ function l_(e) {
13085
13126
  let t = [];
13086
13127
  return (n) => {
13087
13128
  let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
13088
13129
  return i || (i = e(r), t[r] = i), i;
13089
13130
  };
13090
13131
  }
13091
- function a_(e, t = "") {
13132
+ function u_(e, t = "") {
13092
13133
  let n = typeof e == "string" ? e : e.source, r = {
13093
13134
  replace: (e, t) => {
13094
13135
  let i = typeof t == "string" ? t : t.source;
13095
- return i = i.replace(s_.caret, "$1"), n = n.replace(e, i), r;
13136
+ return i = i.replace(f_.caret, "$1"), n = n.replace(e, i), r;
13096
13137
  },
13097
13138
  getRegex: () => new RegExp(n, t)
13098
13139
  };
13099
13140
  return r;
13100
13141
  }
13101
- var o_ = ((e = "") => {
13142
+ var d_ = ((e = "") => {
13102
13143
  try {
13103
13144
  return !!RegExp("(?<=1)(?<!1)" + e);
13104
13145
  } catch {
13105
13146
  return !1;
13106
13147
  }
13107
- })(), s_ = {
13148
+ })(), f_ = {
13108
13149
  codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
13109
13150
  outputLinkReplace: /\\([\[\]])/g,
13110
13151
  indentCodeCompensation: /^(\s+)(?:```)/,
@@ -13155,121 +13196,121 @@ var o_ = ((e = "") => {
13155
13196
  notSpaceStart: /^\S*/,
13156
13197
  endingNewline: /\n$/,
13157
13198
  listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
13158
- nextBulletRegex: i_((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
13159
- hrRegex: i_((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
13160
- fencesBeginRegex: i_((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
13161
- headingBeginRegex: i_((e) => RegExp(`^ {0,${e}}#`)),
13162
- htmlBeginRegex: i_((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
13163
- blockquoteBeginRegex: i_((e) => RegExp(`^ {0,${e}}>`))
13164
- }, c_ = /^(?:[ \t]*(?:\n|$))+/, l_ = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, u_ = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, d_ = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, f_ = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, p_ = / {0,3}(?:[*+-]|\d{1,9}[.)])/, m_ = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, h_ = a_(m_).replace(/bull/g, p_).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), g_ = a_(m_).replace(/bull/g, p_).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), __ = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, v_ = /^[^\n]+/, y_ = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, b_ = a_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", y_).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), x_ = a_(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, p_).getRegex(), S_ = "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", C_ = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, w_ = a_("^ {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", C_).replace("tag", S_).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), T_ = (e) => a_(__).replace("hr", d_).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", S_).getRegex(), E_ = T_(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), D_ = T_(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), O_ = {
13165
- blockquote: a_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", D_).getRegex(),
13166
- code: l_,
13167
- def: b_,
13168
- fences: u_,
13169
- heading: f_,
13170
- hr: d_,
13171
- html: w_,
13172
- lheading: h_,
13173
- list: x_,
13174
- newline: c_,
13175
- paragraph: E_,
13176
- table: r_,
13177
- text: v_
13178
- }, k_ = a_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", d_).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", S_).getRegex(), A_ = {
13179
- ...O_,
13180
- lheading: g_,
13181
- table: k_,
13182
- paragraph: a_(__).replace("hr", d_).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", k_).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", S_).getRegex()
13183
- }, j_ = {
13184
- ...O_,
13185
- html: a_("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", C_).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(),
13199
+ nextBulletRegex: l_((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
13200
+ hrRegex: l_((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
13201
+ fencesBeginRegex: l_((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
13202
+ headingBeginRegex: l_((e) => RegExp(`^ {0,${e}}#`)),
13203
+ htmlBeginRegex: l_((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
13204
+ blockquoteBeginRegex: l_((e) => RegExp(`^ {0,${e}}>`))
13205
+ }, p_ = /^(?:[ \t]*(?:\n|$))+/, m_ = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, h_ = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, g_ = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, __ = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, v_ = / {0,3}(?:[*+-]|\d{1,9}[.)])/, y_ = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, b_ = u_(y_).replace(/bull/g, v_).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), x_ = u_(y_).replace(/bull/g, v_).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), S_ = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, C_ = /^[^\n]+/, w_ = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, T_ = u_(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", w_).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), E_ = u_(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, v_).getRegex(), D_ = "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", O_ = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, k_ = u_("^ {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", O_).replace("tag", D_).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), A_ = (e) => u_(S_).replace("hr", g_).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D_).getRegex(), j_ = A_(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), M_ = A_(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), N_ = {
13206
+ blockquote: u_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", M_).getRegex(),
13207
+ code: m_,
13208
+ def: T_,
13209
+ fences: h_,
13210
+ heading: __,
13211
+ hr: g_,
13212
+ html: k_,
13213
+ lheading: b_,
13214
+ list: E_,
13215
+ newline: p_,
13216
+ paragraph: j_,
13217
+ table: c_,
13218
+ text: C_
13219
+ }, P_ = u_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", g_).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D_).getRegex(), F_ = {
13220
+ ...N_,
13221
+ lheading: x_,
13222
+ table: P_,
13223
+ paragraph: u_(S_).replace("hr", g_).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", P_).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", D_).getRegex()
13224
+ }, I_ = {
13225
+ ...N_,
13226
+ html: u_("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", O_).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(),
13186
13227
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
13187
13228
  heading: /^(#{1,6})(.*)(?:\n+|$)/,
13188
- fences: r_,
13229
+ fences: c_,
13189
13230
  lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
13190
- paragraph: a_(__).replace("hr", d_).replace("heading", " *#{1,6} *[^\n]").replace("lheading", h_).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
13191
- }, M_ = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, N_ = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, P_ = /^( {2,}|\\)\n(?!\s*$)/, F_ = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, I_ = /[\p{P}\p{S}]/u, L_ = /[\s\p{P}\p{S}]/u, R_ = /[^\s\p{P}\p{S}]/u, z_ = a_(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, L_).getRegex(), B_ = /(?!~)[\p{P}\p{S}]/u, V_ = /(?!~)[\s\p{P}\p{S}]/u, H_ = /(?:[^\s\p{P}\p{S}]|~)/u, U_ = a_(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", o_ ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), W_ = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, G_ = a_(W_, "u").replace(/punct/g, I_).getRegex(), K_ = a_(W_, "u").replace(/punct/g, B_).getRegex(), q_ = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", J_ = a_(q_, "gu").replace(/notPunctSpace/g, R_).replace(/punctSpace/g, L_).replace(/punct/g, I_).getRegex(), Y_ = a_(q_, "gu").replace(/notPunctSpace/g, H_).replace(/punctSpace/g, V_).replace(/punct/g, B_).getRegex(), X_ = a_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, R_).replace(/punctSpace/g, L_).replace(/punct/g, I_).getRegex(), Z_ = a_(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, I_).getRegex(), Q_ = a_("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, R_).replace(/punctSpace/g, L_).replace(/punct/g, I_).getRegex(), $_ = a_(/\\(punct)/, "gu").replace(/punct/g, I_).getRegex(), ev = a_(/^<(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(), tv = a_(C_).replace("(?:-->|$)", "-->").getRegex(), nv = a_("^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", tv).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), rv = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, iv = a_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", rv).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), av = a_(/^!?\[(label)\]\[(ref)\]/).replace("label", rv).replace("ref", y_).getRegex(), ov = a_(/^!?\[(ref)\](?:\[\])?/).replace("ref", y_).getRegex(), sv = a_("reflink|nolink(?!\\()", "g").replace("reflink", av).replace("nolink", ov).getRegex(), cv = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, lv = {
13192
- _backpedal: r_,
13193
- anyPunctuation: $_,
13194
- autolink: ev,
13195
- blockSkip: U_,
13196
- br: P_,
13197
- code: N_,
13198
- del: r_,
13199
- delLDelim: r_,
13200
- delRDelim: r_,
13201
- emStrongLDelim: G_,
13202
- emStrongRDelimAst: J_,
13203
- emStrongRDelimUnd: X_,
13204
- escape: M_,
13205
- link: iv,
13206
- nolink: ov,
13207
- punctuation: z_,
13208
- reflink: av,
13209
- reflinkSearch: sv,
13210
- tag: nv,
13211
- text: F_,
13212
- url: r_
13213
- }, uv = {
13214
- ...lv,
13215
- link: a_(/^!?\[(label)\]\((.*?)\)/).replace("label", rv).getRegex(),
13216
- reflink: a_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", rv).getRegex()
13217
- }, dv = {
13218
- ...lv,
13219
- emStrongRDelimAst: Y_,
13220
- emStrongLDelim: K_,
13221
- delLDelim: Z_,
13222
- delRDelim: Q_,
13223
- url: a_(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", cv).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
13231
+ paragraph: u_(S_).replace("hr", g_).replace("heading", " *#{1,6} *[^\n]").replace("lheading", b_).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
13232
+ }, L_ = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, R_ = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, z_ = /^( {2,}|\\)\n(?!\s*$)/, B_ = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, V_ = /[\p{P}\p{S}]/u, H_ = /[\s\p{P}\p{S}]/u, U_ = /[^\s\p{P}\p{S}]/u, W_ = u_(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, H_).getRegex(), G_ = /(?!~)[\p{P}\p{S}]/u, K_ = /(?!~)[\s\p{P}\p{S}]/u, q_ = /(?:[^\s\p{P}\p{S}]|~)/u, J_ = u_(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", d_ ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Y_ = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, X_ = u_(Y_, "u").replace(/punct/g, V_).getRegex(), Z_ = u_(Y_, "u").replace(/punct/g, G_).getRegex(), Q_ = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", $_ = u_(Q_, "gu").replace(/notPunctSpace/g, U_).replace(/punctSpace/g, H_).replace(/punct/g, V_).getRegex(), ev = u_(Q_, "gu").replace(/notPunctSpace/g, q_).replace(/punctSpace/g, K_).replace(/punct/g, G_).getRegex(), tv = u_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, U_).replace(/punctSpace/g, H_).replace(/punct/g, V_).getRegex(), nv = u_(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, V_).getRegex(), rv = u_("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, U_).replace(/punctSpace/g, H_).replace(/punct/g, V_).getRegex(), iv = u_(/\\(punct)/, "gu").replace(/punct/g, V_).getRegex(), av = u_(/^<(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(), ov = u_(O_).replace("(?:-->|$)", "-->").getRegex(), sv = u_("^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", ov).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), cv = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, lv = u_(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", cv).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), uv = u_(/^!?\[(label)\]\[(ref)\]/).replace("label", cv).replace("ref", w_).getRegex(), dv = u_(/^!?\[(ref)\](?:\[\])?/).replace("ref", w_).getRegex(), fv = u_("reflink|nolink(?!\\()", "g").replace("reflink", uv).replace("nolink", dv).getRegex(), pv = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, mv = {
13233
+ _backpedal: c_,
13234
+ anyPunctuation: iv,
13235
+ autolink: av,
13236
+ blockSkip: J_,
13237
+ br: z_,
13238
+ code: R_,
13239
+ del: c_,
13240
+ delLDelim: c_,
13241
+ delRDelim: c_,
13242
+ emStrongLDelim: X_,
13243
+ emStrongRDelimAst: $_,
13244
+ emStrongRDelimUnd: tv,
13245
+ escape: L_,
13246
+ link: lv,
13247
+ nolink: dv,
13248
+ punctuation: W_,
13249
+ reflink: uv,
13250
+ reflinkSearch: fv,
13251
+ tag: sv,
13252
+ text: B_,
13253
+ url: c_
13254
+ }, hv = {
13255
+ ...mv,
13256
+ link: u_(/^!?\[(label)\]\((.*?)\)/).replace("label", cv).getRegex(),
13257
+ reflink: u_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", cv).getRegex()
13258
+ }, gv = {
13259
+ ...mv,
13260
+ emStrongRDelimAst: ev,
13261
+ emStrongLDelim: Z_,
13262
+ delLDelim: nv,
13263
+ delRDelim: rv,
13264
+ url: u_(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", pv).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
13224
13265
  _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
13225
13266
  del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
13226
- text: a_(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", cv).getRegex()
13227
- }, fv = {
13228
- ...dv,
13229
- br: a_(P_).replace("{2,}", "*").getRegex(),
13230
- text: a_(dv.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
13231
- }, pv = {
13232
- normal: O_,
13233
- gfm: A_,
13234
- pedantic: j_
13235
- }, mv = {
13236
- normal: lv,
13237
- gfm: dv,
13238
- breaks: fv,
13239
- pedantic: uv
13240
- }, hv = {
13267
+ text: u_(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", pv).getRegex()
13268
+ }, _v = {
13269
+ ...gv,
13270
+ br: u_(z_).replace("{2,}", "*").getRegex(),
13271
+ text: u_(gv.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
13272
+ }, vv = {
13273
+ normal: N_,
13274
+ gfm: F_,
13275
+ pedantic: I_
13276
+ }, yv = {
13277
+ normal: mv,
13278
+ gfm: gv,
13279
+ breaks: _v,
13280
+ pedantic: hv
13281
+ }, bv = {
13241
13282
  "&": "&amp;",
13242
13283
  "<": "&lt;",
13243
13284
  ">": "&gt;",
13244
13285
  "\"": "&quot;",
13245
13286
  "'": "&#39;"
13246
- }, gv = (e) => hv[e];
13247
- function _v(e, t) {
13287
+ }, xv = (e) => bv[e];
13288
+ function Sv(e, t) {
13248
13289
  if (t) {
13249
- if (s_.escapeTest.test(e)) return e.replace(s_.escapeReplace, gv);
13250
- } else if (s_.escapeTestNoEncode.test(e)) return e.replace(s_.escapeReplaceNoEncode, gv);
13290
+ if (f_.escapeTest.test(e)) return e.replace(f_.escapeReplace, xv);
13291
+ } else if (f_.escapeTestNoEncode.test(e)) return e.replace(f_.escapeReplaceNoEncode, xv);
13251
13292
  return e;
13252
13293
  }
13253
- function vv(e) {
13294
+ function Cv(e) {
13254
13295
  try {
13255
- e = encodeURI(e).replace(s_.percentDecode, "%");
13296
+ e = encodeURI(e).replace(f_.percentDecode, "%");
13256
13297
  } catch {
13257
13298
  return null;
13258
13299
  }
13259
13300
  return e;
13260
13301
  }
13261
- function yv(e, t) {
13262
- let n = e.replace(s_.findPipe, (e, t, n) => {
13302
+ function wv(e, t) {
13303
+ let n = e.replace(f_.findPipe, (e, t, n) => {
13263
13304
  let r = !1, i = t;
13264
13305
  for (; --i >= 0 && n[i] === "\\";) r = !r;
13265
13306
  return r ? "|" : " |";
13266
- }).split(s_.splitPipe), r = 0;
13307
+ }).split(f_.splitPipe), r = 0;
13267
13308
  if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
13268
13309
  else for (; n.length < t;) n.push("");
13269
- for (; r < n.length; r++) n[r] = n[r].trim().replace(s_.slashPipe, "|");
13310
+ for (; r < n.length; r++) n[r] = n[r].trim().replace(f_.slashPipe, "|");
13270
13311
  return n;
13271
13312
  }
13272
- function bv(e, t, n) {
13313
+ function Tv(e, t, n) {
13273
13314
  let r = e.length;
13274
13315
  if (r === 0) return "";
13275
13316
  let i = 0;
@@ -13281,12 +13322,12 @@ function bv(e, t, n) {
13281
13322
  }
13282
13323
  return e.slice(0, r - i);
13283
13324
  }
13284
- function xv(e) {
13325
+ function Ev(e) {
13285
13326
  let t = e.split("\n"), n = t.length - 1;
13286
- for (; n >= 0 && s_.blankLine.test(t[n]);) n--;
13327
+ for (; n >= 0 && f_.blankLine.test(t[n]);) n--;
13287
13328
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
13288
13329
  }
13289
- function Sv(e, t) {
13330
+ function Dv(e, t) {
13290
13331
  if (e.indexOf(t[1]) === -1) return -1;
13291
13332
  let n = 0;
13292
13333
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -13294,7 +13335,7 @@ function Sv(e, t) {
13294
13335
  else if (e[r] === t[1] && (n--, n < 0)) return r;
13295
13336
  return n > 0 ? -2 : -1;
13296
13337
  }
13297
- function Cv(e, t = 0) {
13338
+ function Ov(e, t = 0) {
13298
13339
  let n = t, r = "";
13299
13340
  for (let t of e) if (t === " ") {
13300
13341
  let e = 4 - n % 4;
@@ -13302,7 +13343,7 @@ function Cv(e, t = 0) {
13302
13343
  } else r += t, n++;
13303
13344
  return r;
13304
13345
  }
13305
- function wv(e, t, n, r, i) {
13346
+ function kv(e, t, n, r, i) {
13306
13347
  let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
13307
13348
  r.state.inLink = !0;
13308
13349
  let c = {
@@ -13315,7 +13356,7 @@ function wv(e, t, n, r, i) {
13315
13356
  };
13316
13357
  return r.state.inLink = !1, c;
13317
13358
  }
13318
- function Tv(e, t, n) {
13359
+ function Av(e, t, n) {
13319
13360
  let r = e.match(n.other.indentCodeCompensation);
13320
13361
  if (r === null) return t;
13321
13362
  let i = r[1];
@@ -13326,12 +13367,12 @@ function Tv(e, t, n) {
13326
13367
  return r.length >= i.length ? e.slice(i.length) : e;
13327
13368
  }).join("\n");
13328
13369
  }
13329
- var Ev = class {
13370
+ var jv = class {
13330
13371
  options;
13331
13372
  rules;
13332
13373
  lexer;
13333
13374
  constructor(e) {
13334
- this.options = e || t_;
13375
+ this.options = e || o_;
13335
13376
  }
13336
13377
  space(e) {
13337
13378
  let t = this.rules.block.newline.exec(e);
@@ -13343,7 +13384,7 @@ var Ev = class {
13343
13384
  code(e) {
13344
13385
  let t = this.rules.block.code.exec(e);
13345
13386
  if (t) {
13346
- let e = this.options.pedantic ? t[0] : xv(t[0]);
13387
+ let e = this.options.pedantic ? t[0] : Ev(t[0]);
13347
13388
  return {
13348
13389
  type: "code",
13349
13390
  raw: e,
@@ -13355,7 +13396,7 @@ var Ev = class {
13355
13396
  fences(e) {
13356
13397
  let t = this.rules.block.fences.exec(e);
13357
13398
  if (t) {
13358
- let e = t[0], n = Tv(e, t[3] || "", this.rules);
13399
+ let e = t[0], n = Av(e, t[3] || "", this.rules);
13359
13400
  return {
13360
13401
  type: "code",
13361
13402
  raw: e,
@@ -13369,12 +13410,12 @@ var Ev = class {
13369
13410
  if (t) {
13370
13411
  let e = t[2].trim();
13371
13412
  if (this.rules.other.endingHash.test(e)) {
13372
- let t = bv(e, "#");
13413
+ let t = Tv(e, "#");
13373
13414
  (this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
13374
13415
  }
13375
13416
  return {
13376
13417
  type: "heading",
13377
- raw: bv(t[0], "\n"),
13418
+ raw: Tv(t[0], "\n"),
13378
13419
  depth: t[1].length,
13379
13420
  text: e,
13380
13421
  tokens: this.lexer.inline(e)
@@ -13385,13 +13426,13 @@ var Ev = class {
13385
13426
  let t = this.rules.block.hr.exec(e);
13386
13427
  if (t) return {
13387
13428
  type: "hr",
13388
- raw: bv(t[0], "\n")
13429
+ raw: Tv(t[0], "\n")
13389
13430
  };
13390
13431
  }
13391
13432
  blockquote(e) {
13392
13433
  let t = this.rules.block.blockquote.exec(e);
13393
13434
  if (t) {
13394
- let e = bv(t[0], "\n").split("\n"), n = "", r = "", i = [];
13435
+ let e = Tv(t[0], "\n").split("\n"), n = "", r = "", i = [];
13395
13436
  for (; e.length > 0;) {
13396
13437
  let t = !1, a = [], o;
13397
13438
  for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
@@ -13441,7 +13482,7 @@ ${c}` : c;
13441
13482
  let n = !1, r = "", s = "";
13442
13483
  if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
13443
13484
  r = t[0], e = e.substring(r.length);
13444
- let c = Cv(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
13485
+ let c = Ov(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
13445
13486
  if (this.options.pedantic ? (d = 2, s = c.trimStart()) : u ? d = t[1].length + 1 : (d = c.search(this.rules.other.nonSpaceChar), d = d > 4 ? 1 : d, s = c.slice(d), d += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
13446
13487
  let t = this.rules.other.nextBulletRegex(d), n = this.rules.other.hrRegex(d), i = this.rules.other.fencesBeginRegex(d), a = this.rules.other.headingBeginRegex(d), o = this.rules.other.htmlBeginRegex(d), f = this.rules.other.blockquoteBeginRegex(d);
13447
13488
  for (; e;) {
@@ -13507,7 +13548,7 @@ ${c}` : c;
13507
13548
  html(e) {
13508
13549
  let t = this.rules.block.html.exec(e);
13509
13550
  if (t) {
13510
- let e = xv(t[0]);
13551
+ let e = Ev(t[0]);
13511
13552
  return {
13512
13553
  type: "html",
13513
13554
  block: !0,
@@ -13524,7 +13565,7 @@ ${c}` : c;
13524
13565
  return {
13525
13566
  type: "def",
13526
13567
  tag: e,
13527
- raw: bv(t[0], "\n"),
13568
+ raw: Tv(t[0], "\n"),
13528
13569
  href: n,
13529
13570
  title: r
13530
13571
  };
@@ -13533,9 +13574,9 @@ ${c}` : c;
13533
13574
  table(e) {
13534
13575
  let t = this.rules.block.table.exec(e);
13535
13576
  if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
13536
- let n = yv(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
13577
+ let n = wv(t[1]), r = t[2].replace(this.rules.other.tableAlignChars, "").split("|"), i = t[3]?.trim() ? t[3].replace(this.rules.other.tableRowBlankLine, "").split("\n") : [], a = {
13537
13578
  type: "table",
13538
- raw: bv(t[0], "\n"),
13579
+ raw: Tv(t[0], "\n"),
13539
13580
  header: [],
13540
13581
  align: [],
13541
13582
  rows: []
@@ -13548,7 +13589,7 @@ ${c}` : c;
13548
13589
  header: !0,
13549
13590
  align: a.align[e]
13550
13591
  });
13551
- for (let e of i) a.rows.push(yv(e, a.header.length).map((e, t) => ({
13592
+ for (let e of i) a.rows.push(wv(e, a.header.length).map((e, t) => ({
13552
13593
  text: e,
13553
13594
  tokens: this.lexer.inline(e),
13554
13595
  header: !1,
@@ -13563,7 +13604,7 @@ ${c}` : c;
13563
13604
  let e = t[1].trim();
13564
13605
  return {
13565
13606
  type: "heading",
13566
- raw: bv(t[0], "\n"),
13607
+ raw: Tv(t[0], "\n"),
13567
13608
  depth: t[2].charAt(0) === "=" ? 1 : 2,
13568
13609
  text: e,
13569
13610
  tokens: this.lexer.inline(e)
@@ -13616,10 +13657,10 @@ ${c}` : c;
13616
13657
  let e = t[2].trim();
13617
13658
  if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
13618
13659
  if (!this.rules.other.endAngleBracket.test(e)) return;
13619
- let t = bv(e.slice(0, -1), "\\");
13660
+ let t = Tv(e.slice(0, -1), "\\");
13620
13661
  if ((e.length - t.length) % 2 == 0) return;
13621
13662
  } else {
13622
- let e = Sv(t[2], "()");
13663
+ let e = Dv(t[2], "()");
13623
13664
  if (e === -2) return;
13624
13665
  if (e > -1) {
13625
13666
  let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
@@ -13631,7 +13672,7 @@ ${c}` : c;
13631
13672
  let e = this.rules.other.pedanticHrefTitle.exec(n);
13632
13673
  e && (n = e[1], r = e[3]);
13633
13674
  } else r = t[3] ? t[3].slice(1, -1) : "";
13634
- return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), wv(t, {
13675
+ return n = n.trim(), this.rules.other.startAngleBracket.test(n) && (n = this.options.pedantic && !this.rules.other.endAngleBracket.test(e) ? n.slice(1) : n.slice(1, -1)), kv(t, {
13635
13676
  href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
13636
13677
  title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
13637
13678
  }, t[0], this.lexer, this.rules);
@@ -13649,7 +13690,7 @@ ${c}` : c;
13649
13690
  text: e
13650
13691
  };
13651
13692
  }
13652
- return wv(n, e, n[0], this.lexer, this.rules);
13693
+ return kv(n, e, n[0], this.lexer, this.rules);
13653
13694
  }
13654
13695
  }
13655
13696
  emStrong(e, t, n = "") {
@@ -13781,29 +13822,29 @@ ${c}` : c;
13781
13822
  };
13782
13823
  }
13783
13824
  }
13784
- }, Dv = class e {
13825
+ }, Mv = class e {
13785
13826
  tokens;
13786
13827
  options;
13787
13828
  state;
13788
13829
  inlineQueue;
13789
13830
  tokenizer;
13790
13831
  constructor(e) {
13791
- this.tokens = [], this.tokens.links = Object.create(null), this.options = e || t_, this.options.tokenizer = this.options.tokenizer || new Ev(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
13832
+ this.tokens = [], this.tokens.links = Object.create(null), this.options = e || o_, this.options.tokenizer = this.options.tokenizer || new jv(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
13792
13833
  inLink: !1,
13793
13834
  inRawBlock: !1,
13794
13835
  top: !0
13795
13836
  };
13796
13837
  let t = {
13797
- other: s_,
13798
- block: pv.normal,
13799
- inline: mv.normal
13838
+ other: f_,
13839
+ block: vv.normal,
13840
+ inline: yv.normal
13800
13841
  };
13801
- this.options.pedantic ? (t.block = pv.pedantic, t.inline = mv.pedantic) : this.options.gfm && (t.block = pv.gfm, this.options.breaks ? t.inline = mv.breaks : t.inline = mv.gfm), this.tokenizer.rules = t;
13842
+ this.options.pedantic ? (t.block = vv.pedantic, t.inline = yv.pedantic) : this.options.gfm && (t.block = vv.gfm, this.options.breaks ? t.inline = yv.breaks : t.inline = yv.gfm), this.tokenizer.rules = t;
13802
13843
  }
13803
13844
  static get rules() {
13804
13845
  return {
13805
- block: pv,
13806
- inline: mv
13846
+ block: vv,
13847
+ inline: yv
13807
13848
  };
13808
13849
  }
13809
13850
  static lex(t, n) {
@@ -13813,7 +13854,7 @@ ${c}` : c;
13813
13854
  return new e(n).inlineTokens(t);
13814
13855
  }
13815
13856
  lex(e) {
13816
- e = e.replace(s_.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
13857
+ e = e.replace(f_.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
13817
13858
  for (let e = 0; e < this.inlineQueue.length; e++) {
13818
13859
  let t = this.inlineQueue[e];
13819
13860
  this.inlineTokens(t.src, t.tokens);
@@ -13821,7 +13862,7 @@ ${c}` : c;
13821
13862
  return this.inlineQueue = [], this.tokens;
13822
13863
  }
13823
13864
  blockTokens(e, t = [], n = !1) {
13824
- this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(s_.tabCharGlobal, " ").replace(s_.spaceLine, ""));
13865
+ this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(f_.tabCharGlobal, " ").replace(f_.spaceLine, ""));
13825
13866
  let r = Infinity;
13826
13867
  for (; e;) {
13827
13868
  if (e.length < r) r = e.length;
@@ -14003,18 +14044,18 @@ ${c}` : c;
14003
14044
  if (this.options.silent) console.error(t);
14004
14045
  else throw Error(t);
14005
14046
  }
14006
- }, Ov = class {
14047
+ }, Nv = class {
14007
14048
  options;
14008
14049
  parser;
14009
14050
  constructor(e) {
14010
- this.options = e || t_;
14051
+ this.options = e || o_;
14011
14052
  }
14012
14053
  space(e) {
14013
14054
  return "";
14014
14055
  }
14015
14056
  code({ text: e, lang: t, escaped: n }) {
14016
- let r = (t || "").match(s_.notSpaceStart)?.[0], i = e.replace(s_.endingNewline, "") + "\n";
14017
- return r ? "<pre><code class=\"language-" + _v(r) + "\">" + (n ? i : _v(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : _v(i, !0)) + "</code></pre>\n";
14057
+ let r = (t || "").match(f_.notSpaceStart)?.[0], i = e.replace(f_.endingNewline, "") + "\n";
14058
+ return r ? "<pre><code class=\"language-" + Sv(r) + "\">" + (n ? i : Sv(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : Sv(i, !0)) + "</code></pre>\n";
14018
14059
  }
14019
14060
  blockquote({ tokens: e }) {
14020
14061
  return `<blockquote>
@@ -14084,7 +14125,7 @@ ${e}</tr>
14084
14125
  return `<em>${this.parser.parseInline(e)}</em>`;
14085
14126
  }
14086
14127
  codespan({ text: e }) {
14087
- return `<code>${_v(e, !0)}</code>`;
14128
+ return `<code>${Sv(e, !0)}</code>`;
14088
14129
  }
14089
14130
  br(e) {
14090
14131
  return "<br>";
@@ -14093,24 +14134,24 @@ ${e}</tr>
14093
14134
  return `<del>${this.parser.parseInline(e)}</del>`;
14094
14135
  }
14095
14136
  link({ href: e, title: t, tokens: n }) {
14096
- let r = this.parser.parseInline(n), i = vv(e);
14137
+ let r = this.parser.parseInline(n), i = Cv(e);
14097
14138
  if (i === null) return r;
14098
14139
  e = i;
14099
14140
  let a = "<a href=\"" + e + "\"";
14100
- return t && (a += " title=\"" + _v(t) + "\""), a += ">" + r + "</a>", a;
14141
+ return t && (a += " title=\"" + Sv(t) + "\""), a += ">" + r + "</a>", a;
14101
14142
  }
14102
14143
  image({ href: e, title: t, text: n, tokens: r }) {
14103
14144
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
14104
- let i = vv(e);
14105
- if (i === null) return _v(n);
14145
+ let i = Cv(e);
14146
+ if (i === null) return Sv(n);
14106
14147
  e = i;
14107
- let a = `<img src="${e}" alt="${_v(n)}"`;
14108
- return t && (a += ` title="${_v(t)}"`), a += ">", a;
14148
+ let a = `<img src="${e}" alt="${Sv(n)}"`;
14149
+ return t && (a += ` title="${Sv(t)}"`), a += ">", a;
14109
14150
  }
14110
14151
  text(e) {
14111
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : _v(e.text);
14152
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : Sv(e.text);
14112
14153
  }
14113
- }, kv = class {
14154
+ }, Pv = class {
14114
14155
  strong({ text: e }) {
14115
14156
  return e;
14116
14157
  }
@@ -14141,12 +14182,12 @@ ${e}</tr>
14141
14182
  checkbox({ raw: e }) {
14142
14183
  return e;
14143
14184
  }
14144
- }, Av = class e {
14185
+ }, Fv = class e {
14145
14186
  options;
14146
14187
  renderer;
14147
14188
  textRenderer;
14148
14189
  constructor(e) {
14149
- this.options = e || t_, this.options.renderer = this.options.renderer || new Ov(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new kv();
14190
+ this.options = e || o_, this.options.renderer = this.options.renderer || new Nv(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new Pv();
14150
14191
  }
14151
14192
  static parse(t, n) {
14152
14193
  return new e(n).parse(t);
@@ -14292,11 +14333,11 @@ ${e}</tr>
14292
14333
  }
14293
14334
  return n;
14294
14335
  }
14295
- }, jv = class {
14336
+ }, Iv = class {
14296
14337
  options;
14297
14338
  block;
14298
14339
  constructor(e) {
14299
- this.options = e || t_;
14340
+ this.options = e || o_;
14300
14341
  }
14301
14342
  static passThroughHooks = /* @__PURE__ */ new Set([
14302
14343
  "preprocess",
@@ -14322,22 +14363,22 @@ ${e}</tr>
14322
14363
  return e;
14323
14364
  }
14324
14365
  provideLexer(e = this.block) {
14325
- return e ? Dv.lex : Dv.lexInline;
14366
+ return e ? Mv.lex : Mv.lexInline;
14326
14367
  }
14327
14368
  provideParser(e = this.block) {
14328
- return e ? Av.parse : Av.parseInline;
14369
+ return e ? Fv.parse : Fv.parseInline;
14329
14370
  }
14330
- }, Mv = new class {
14331
- defaults = e_();
14371
+ }, Lv = new class {
14372
+ defaults = a_();
14332
14373
  options = this.setOptions;
14333
14374
  parse = this.parseMarkdown(!0);
14334
14375
  parseInline = this.parseMarkdown(!1);
14335
- Parser = Av;
14336
- Renderer = Ov;
14337
- TextRenderer = kv;
14338
- Lexer = Dv;
14339
- Tokenizer = Ev;
14340
- Hooks = jv;
14376
+ Parser = Fv;
14377
+ Renderer = Nv;
14378
+ TextRenderer = Pv;
14379
+ Lexer = Mv;
14380
+ Tokenizer = jv;
14381
+ Hooks = Iv;
14341
14382
  constructor(...e) {
14342
14383
  this.use(...e);
14343
14384
  }
@@ -14388,7 +14429,7 @@ ${e}</tr>
14388
14429
  }
14389
14430
  "childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
14390
14431
  }), n.extensions = t), e.renderer) {
14391
- let t = this.defaults.renderer || new Ov(this.defaults);
14432
+ let t = this.defaults.renderer || new Nv(this.defaults);
14392
14433
  for (let n in e.renderer) {
14393
14434
  if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
14394
14435
  if (["options", "parser"].includes(n)) continue;
@@ -14401,7 +14442,7 @@ ${e}</tr>
14401
14442
  n.renderer = t;
14402
14443
  }
14403
14444
  if (e.tokenizer) {
14404
- let t = this.defaults.tokenizer || new Ev(this.defaults);
14445
+ let t = this.defaults.tokenizer || new jv(this.defaults);
14405
14446
  for (let n in e.tokenizer) {
14406
14447
  if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
14407
14448
  if ([
@@ -14418,13 +14459,13 @@ ${e}</tr>
14418
14459
  n.tokenizer = t;
14419
14460
  }
14420
14461
  if (e.hooks) {
14421
- let t = this.defaults.hooks || new jv();
14462
+ let t = this.defaults.hooks || new Iv();
14422
14463
  for (let n in e.hooks) {
14423
14464
  if (!(n in t)) throw Error(`hook '${n}' does not exist`);
14424
14465
  if (["options", "block"].includes(n)) continue;
14425
14466
  let r = n, i = e.hooks[r], a = t[r];
14426
- jv.passThroughHooks.has(n) ? t[r] = (e) => {
14427
- if (this.defaults.async && jv.passThroughHooksRespectAsync.has(n)) return (async () => {
14467
+ Iv.passThroughHooks.has(n) ? t[r] = (e) => {
14468
+ if (this.defaults.async && Iv.passThroughHooksRespectAsync.has(n)) return (async () => {
14428
14469
  let n = await i.call(t, e);
14429
14470
  return a.call(t, n);
14430
14471
  })();
@@ -14461,10 +14502,10 @@ ${e}</tr>
14461
14502
  }, this;
14462
14503
  }
14463
14504
  lexer(e, t) {
14464
- return Dv.lex(e, t ?? this.defaults);
14505
+ return Mv.lex(e, t ?? this.defaults);
14465
14506
  }
14466
14507
  parser(e, t) {
14467
- return Av.parse(e, t ?? this.defaults);
14508
+ return Fv.parse(e, t ?? this.defaults);
14468
14509
  }
14469
14510
  parseMarkdown(e) {
14470
14511
  return (t, n) => {
@@ -14476,16 +14517,16 @@ ${e}</tr>
14476
14517
  if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
14477
14518
  if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
14478
14519
  if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
14479
- let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? Dv.lex : Dv.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
14520
+ let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? Mv.lex : Mv.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
14480
14521
  i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
14481
- let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Av.parse : Av.parseInline)(a, i);
14522
+ let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Fv.parse : Fv.parseInline)(a, i);
14482
14523
  return i.hooks ? await i.hooks.postprocess(o) : o;
14483
14524
  })().catch(a);
14484
14525
  try {
14485
14526
  i.hooks && (t = i.hooks.preprocess(t));
14486
- let n = (i.hooks ? i.hooks.provideLexer(e) : e ? Dv.lex : Dv.lexInline)(t, i);
14527
+ let n = (i.hooks ? i.hooks.provideLexer(e) : e ? Mv.lex : Mv.lexInline)(t, i);
14487
14528
  i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
14488
- let r = (i.hooks ? i.hooks.provideParser(e) : e ? Av.parse : Av.parseInline)(n, i);
14529
+ let r = (i.hooks ? i.hooks.provideParser(e) : e ? Fv.parse : Fv.parseInline)(n, i);
14489
14530
  return i.hooks && (r = i.hooks.postprocess(r)), r;
14490
14531
  } catch (e) {
14491
14532
  return a(e);
@@ -14495,7 +14536,7 @@ ${e}</tr>
14495
14536
  onError(e, t) {
14496
14537
  return (n) => {
14497
14538
  if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
14498
- let e = "<p>An error occurred:</p><pre>" + _v(n.message + "", !0) + "</pre>";
14539
+ let e = "<p>An error occurred:</p><pre>" + Sv(n.message + "", !0) + "</pre>";
14499
14540
  return t ? Promise.resolve(e) : e;
14500
14541
  }
14501
14542
  if (t) return Promise.reject(n);
@@ -14503,19 +14544,19 @@ ${e}</tr>
14503
14544
  };
14504
14545
  }
14505
14546
  }();
14506
- function Nv(e, t) {
14507
- return Mv.parse(e, t);
14508
- }
14509
- Nv.options = Nv.setOptions = function(e) {
14510
- return Mv.setOptions(e), Nv.defaults = Mv.defaults, n_(Nv.defaults), Nv;
14511
- }, Nv.getDefaults = e_, Nv.defaults = t_, Nv.use = function(...e) {
14512
- return Mv.use(...e), Nv.defaults = Mv.defaults, n_(Nv.defaults), Nv;
14513
- }, Nv.walkTokens = function(e, t) {
14514
- return Mv.walkTokens(e, t);
14515
- }, Nv.parseInline = Mv.parseInline, Nv.Parser = Av, Nv.parser = Av.parse, Nv.Renderer = Ov, Nv.TextRenderer = kv, Nv.Lexer = Dv, Nv.lexer = Dv.lex, Nv.Tokenizer = Ev, Nv.Hooks = jv, Nv.parse = Nv, Nv.options, Nv.setOptions, Nv.use, Nv.walkTokens, Nv.parseInline, Av.parse, Dv.lex;
14547
+ function Rv(e, t) {
14548
+ return Lv.parse(e, t);
14549
+ }
14550
+ Rv.options = Rv.setOptions = function(e) {
14551
+ return Lv.setOptions(e), Rv.defaults = Lv.defaults, s_(Rv.defaults), Rv;
14552
+ }, Rv.getDefaults = a_, Rv.defaults = o_, Rv.use = function(...e) {
14553
+ return Lv.use(...e), Rv.defaults = Lv.defaults, s_(Rv.defaults), Rv;
14554
+ }, Rv.walkTokens = function(e, t) {
14555
+ return Lv.walkTokens(e, t);
14556
+ }, Rv.parseInline = Lv.parseInline, Rv.Parser = Fv, Rv.parser = Fv.parse, Rv.Renderer = Nv, Rv.TextRenderer = Pv, Rv.Lexer = Mv, Rv.lexer = Mv.lex, Rv.Tokenizer = jv, Rv.Hooks = Iv, Rv.parse = Rv, Rv.options, Rv.setOptions, Rv.use, Rv.walkTokens, Rv.parseInline, Fv.parse, Mv.lex;
14516
14557
  //#endregion
14517
14558
  //#region node_modules/highlight.js/lib/core.js
14518
- var Pv = /* @__PURE__ */ h(((e, t) => {
14559
+ var zv = /* @__PURE__ */ h(((e, t) => {
14519
14560
  function n(e) {
14520
14561
  return e instanceof Map ? e.clear = e.delete = e.set = function() {
14521
14562
  throw Error("map is read-only");
@@ -15356,7 +15397,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
15356
15397
  return Object.assign(e, ne), e;
15357
15398
  }, ke = U({});
15358
15399
  ke.newInstance = () => U({}), t.exports = ke, ke.HighlightJS = ke, ke.default = ke;
15359
- })), Fv = /* @__PURE__ */ h(((e, t) => {
15400
+ })), Bv = /* @__PURE__ */ h(((e, t) => {
15360
15401
  function n(e) {
15361
15402
  let t = e.regex, n = t.concat(/[\p{L}_]/u, t.optional(/[\p{L}0-9_.-]*:/u), /[\p{L}0-9_.-]*/u), r = /[\p{L}0-9._:-]+/u, i = {
15362
15403
  className: "symbol",
@@ -15521,7 +15562,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
15521
15562
  };
15522
15563
  }
15523
15564
  t.exports = n;
15524
- })), Iv = /* @__PURE__ */ h(((e, t) => {
15565
+ })), Vv = /* @__PURE__ */ h(((e, t) => {
15525
15566
  function n(e) {
15526
15567
  let t = e.regex, n = {}, r = {
15527
15568
  begin: /\$\{/,
@@ -15689,7 +15730,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
15689
15730
  };
15690
15731
  }
15691
15732
  t.exports = n;
15692
- })), Lv = /* @__PURE__ */ h(((e, t) => {
15733
+ })), Hv = /* @__PURE__ */ h(((e, t) => {
15693
15734
  function n(e) {
15694
15735
  let t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "[a-zA-Z_]\\w*::", i = "(decltype\\(auto\\)|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
15695
15736
  className: "type",
@@ -15864,7 +15905,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
15864
15905
  };
15865
15906
  }
15866
15907
  t.exports = n;
15867
- })), Rv = /* @__PURE__ */ h(((e, t) => {
15908
+ })), Uv = /* @__PURE__ */ h(((e, t) => {
15868
15909
  function n(e) {
15869
15910
  let t = e.regex, n = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), r = "[a-zA-Z_]\\w*::", i = "(?!struct)(decltype\\(auto\\)|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", a = {
15870
15911
  className: "type",
@@ -16088,7 +16129,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
16088
16129
  };
16089
16130
  }
16090
16131
  t.exports = n;
16091
- })), zv = /* @__PURE__ */ h(((e, t) => {
16132
+ })), Wv = /* @__PURE__ */ h(((e, t) => {
16092
16133
  function n(e) {
16093
16134
  let t = [
16094
16135
  "bool",
@@ -16347,7 +16388,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
16347
16388
  };
16348
16389
  }
16349
16390
  t.exports = n;
16350
- })), Bv = /* @__PURE__ */ h(((e, t) => {
16391
+ })), Gv = /* @__PURE__ */ h(((e, t) => {
16351
16392
  var n = (e) => ({
16352
16393
  IMPORTANT: {
16353
16394
  scope: "meta",
@@ -16486,7 +16527,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
16486
16527
  };
16487
16528
  }
16488
16529
  t.exports = u;
16489
- })), Vv = /* @__PURE__ */ h(((e, t) => {
16530
+ })), Kv = /* @__PURE__ */ h(((e, t) => {
16490
16531
  function n(e) {
16491
16532
  let t = e.regex, n = {
16492
16533
  begin: /<\/?[A-Za-z_]/,
@@ -16666,7 +16707,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
16666
16707
  };
16667
16708
  }
16668
16709
  t.exports = n;
16669
- })), Hv = /* @__PURE__ */ h(((e, t) => {
16710
+ })), qv = /* @__PURE__ */ h(((e, t) => {
16670
16711
  function n(e) {
16671
16712
  let t = e.regex;
16672
16713
  return {
@@ -16704,7 +16745,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
16704
16745
  };
16705
16746
  }
16706
16747
  t.exports = n;
16707
- })), Uv = /* @__PURE__ */ h(((e, t) => {
16748
+ })), Jv = /* @__PURE__ */ h(((e, t) => {
16708
16749
  function n(e) {
16709
16750
  let t = e.regex, n = "([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)", r = t.either(/\b([A-Z]+[a-z0-9]+)+/, /\b([A-Z]+[a-z0-9]+)+[A-Z]+/), i = t.concat(r, /(::\w+)*/), a = {
16710
16751
  "variable.constant": [
@@ -16965,7 +17006,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
16965
17006
  };
16966
17007
  }
16967
17008
  t.exports = n;
16968
- })), Wv = /* @__PURE__ */ h(((e, t) => {
17009
+ })), Yv = /* @__PURE__ */ h(((e, t) => {
16969
17010
  function n(e) {
16970
17011
  let t = {
16971
17012
  keyword: [
@@ -17104,7 +17145,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
17104
17145
  };
17105
17146
  }
17106
17147
  t.exports = n;
17107
- })), Gv = /* @__PURE__ */ h(((e, t) => {
17148
+ })), Xv = /* @__PURE__ */ h(((e, t) => {
17108
17149
  function n(e) {
17109
17150
  let t = e.regex;
17110
17151
  return {
@@ -17170,7 +17211,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
17170
17211
  };
17171
17212
  }
17172
17213
  t.exports = n;
17173
- })), Kv = /* @__PURE__ */ h(((e, t) => {
17214
+ })), Zv = /* @__PURE__ */ h(((e, t) => {
17174
17215
  function n(e) {
17175
17216
  let t = e.regex, n = {
17176
17217
  className: "number",
@@ -17257,7 +17298,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
17257
17298
  };
17258
17299
  }
17259
17300
  t.exports = n;
17260
- })), qv = /* @__PURE__ */ h(((e, t) => {
17301
+ })), Qv = /* @__PURE__ */ h(((e, t) => {
17261
17302
  var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
17262
17303
  className: "number",
17263
17304
  variants: [
@@ -17425,7 +17466,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
17425
17466
  };
17426
17467
  }
17427
17468
  t.exports = s;
17428
- })), Jv = /* @__PURE__ */ h(((e, t) => {
17469
+ })), $v = /* @__PURE__ */ h(((e, t) => {
17429
17470
  var n = "[A-Za-z$_][0-9A-Za-z$_]*", r = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), i = [
17430
17471
  "true",
17431
17472
  "false",
@@ -17860,7 +17901,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
17860
17901
  };
17861
17902
  }
17862
17903
  t.exports = u;
17863
- })), Yv = /* @__PURE__ */ h(((e, t) => {
17904
+ })), ey = /* @__PURE__ */ h(((e, t) => {
17864
17905
  function n(e) {
17865
17906
  let t = {
17866
17907
  className: "attr",
@@ -17895,7 +17936,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
17895
17936
  };
17896
17937
  }
17897
17938
  t.exports = n;
17898
- })), Xv = /* @__PURE__ */ h(((e, t) => {
17939
+ })), ty = /* @__PURE__ */ h(((e, t) => {
17899
17940
  var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
17900
17941
  className: "number",
17901
17942
  variants: [
@@ -18095,7 +18136,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18095
18136
  };
18096
18137
  }
18097
18138
  t.exports = o;
18098
- })), Zv = /* @__PURE__ */ h(((e, t) => {
18139
+ })), ny = /* @__PURE__ */ h(((e, t) => {
18099
18140
  var n = (e) => ({
18100
18141
  IMPORTANT: {
18101
18142
  scope: "meta",
@@ -18286,7 +18327,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18286
18327
  };
18287
18328
  }
18288
18329
  t.exports = d;
18289
- })), Qv = /* @__PURE__ */ h(((e, t) => {
18330
+ })), ry = /* @__PURE__ */ h(((e, t) => {
18290
18331
  function n(e) {
18291
18332
  let t = "\\[=*\\[", n = "\\]=*\\]", r = {
18292
18333
  begin: t,
@@ -18331,7 +18372,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18331
18372
  };
18332
18373
  }
18333
18374
  t.exports = n;
18334
- })), $v = /* @__PURE__ */ h(((e, t) => {
18375
+ })), iy = /* @__PURE__ */ h(((e, t) => {
18335
18376
  function n(e) {
18336
18377
  let t = {
18337
18378
  className: "variable",
@@ -18387,7 +18428,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18387
18428
  };
18388
18429
  }
18389
18430
  t.exports = n;
18390
- })), ey = /* @__PURE__ */ h(((e, t) => {
18431
+ })), ay = /* @__PURE__ */ h(((e, t) => {
18391
18432
  function n(e) {
18392
18433
  let t = e.regex, n = /* @__PURE__ */ "abs.accept.alarm.and.atan2.bind.binmode.bless.break.caller.chdir.chmod.chomp.chop.chown.chr.chroot.class.close.closedir.connect.continue.cos.crypt.dbmclose.dbmopen.defined.delete.die.do.dump.each.else.elsif.endgrent.endhostent.endnetent.endprotoent.endpwent.endservent.eof.eval.exec.exists.exit.exp.fcntl.field.fileno.flock.for.foreach.fork.format.formline.getc.getgrent.getgrgid.getgrnam.gethostbyaddr.gethostbyname.gethostent.getlogin.getnetbyaddr.getnetbyname.getnetent.getpeername.getpgrp.getpriority.getprotobyname.getprotobynumber.getprotoent.getpwent.getpwnam.getpwuid.getservbyname.getservbyport.getservent.getsockname.getsockopt.given.glob.gmtime.goto.grep.gt.hex.if.index.int.ioctl.join.keys.kill.last.lc.lcfirst.length.link.listen.local.localtime.log.lstat.lt.ma.map.method.mkdir.msgctl.msgget.msgrcv.msgsnd.my.ne.next.no.not.oct.open.opendir.or.ord.our.pack.package.pipe.pop.pos.print.printf.prototype.push.q|0.qq.quotemeta.qw.qx.rand.read.readdir.readline.readlink.readpipe.recv.redo.ref.rename.require.reset.return.reverse.rewinddir.rindex.rmdir.say.scalar.seek.seekdir.select.semctl.semget.semop.send.setgrent.sethostent.setnetent.setpgrp.setpriority.setprotoent.setpwent.setservent.setsockopt.shift.shmctl.shmget.shmread.shmwrite.shutdown.sin.sleep.socket.socketpair.sort.splice.split.sprintf.sqrt.srand.stat.state.study.sub.substr.symlink.syscall.sysopen.sysread.sysseek.system.syswrite.tell.telldir.tie.tied.time.times.tr.truncate.uc.ucfirst.umask.undef.unless.unlink.unpack.unshift.untie.until.use.utime.values.vec.wait.waitpid.wantarray.warn.when.while.write.x|0.xor.y|0".split("."), r = /[dualxmsipngr]{0,12}/, i = {
18393
18434
  $pattern: /[\w.]+/,
@@ -18578,7 +18619,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18578
18619
  };
18579
18620
  }
18580
18621
  t.exports = n;
18581
- })), ty = /* @__PURE__ */ h(((e, t) => {
18622
+ })), oy = /* @__PURE__ */ h(((e, t) => {
18582
18623
  function n(e) {
18583
18624
  let t = {
18584
18625
  className: "built_in",
@@ -18694,7 +18735,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18694
18735
  };
18695
18736
  }
18696
18737
  t.exports = n;
18697
- })), ny = /* @__PURE__ */ h(((e, t) => {
18738
+ })), sy = /* @__PURE__ */ h(((e, t) => {
18698
18739
  function n(e) {
18699
18740
  let t = e.regex, n = /(?![A-Za-z0-9])(?![$])/, r = t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/, n), i = t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/, n), a = t.concat(/[A-Z]+/, n), o = {
18700
18741
  scope: "variable",
@@ -18987,7 +19028,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
18987
19028
  };
18988
19029
  }
18989
19030
  t.exports = n;
18990
- })), ry = /* @__PURE__ */ h(((e, t) => {
19031
+ })), cy = /* @__PURE__ */ h(((e, t) => {
18991
19032
  function n(e) {
18992
19033
  return {
18993
19034
  name: "PHP template",
@@ -19029,7 +19070,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19029
19070
  };
19030
19071
  }
19031
19072
  t.exports = n;
19032
- })), iy = /* @__PURE__ */ h(((e, t) => {
19073
+ })), ly = /* @__PURE__ */ h(((e, t) => {
19033
19074
  function n(e) {
19034
19075
  return {
19035
19076
  name: "Plain text",
@@ -19038,7 +19079,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19038
19079
  };
19039
19080
  }
19040
19081
  t.exports = n;
19041
- })), ay = /* @__PURE__ */ h(((e, t) => {
19082
+ })), uy = /* @__PURE__ */ h(((e, t) => {
19042
19083
  function n(e) {
19043
19084
  let t = e.regex, n = /[\p{XID_Start}_]\p{XID_Continue}*/u, r = /* @__PURE__ */ "and.as.assert.async.await.break.case.class.continue.def.del.elif.else.except.finally.for.from.global.if.import.in.is.lambda.match.nonlocal|10.not.or.pass.raise.return.try.while.with.yield".split("."), i = {
19044
19085
  $pattern: /[A-Za-z]\w+|__\w+__/,
@@ -19275,7 +19316,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19275
19316
  };
19276
19317
  }
19277
19318
  t.exports = n;
19278
- })), oy = /* @__PURE__ */ h(((e, t) => {
19319
+ })), dy = /* @__PURE__ */ h(((e, t) => {
19279
19320
  function n(e) {
19280
19321
  return {
19281
19322
  aliases: ["pycon"],
@@ -19293,7 +19334,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19293
19334
  };
19294
19335
  }
19295
19336
  t.exports = n;
19296
- })), sy = /* @__PURE__ */ h(((e, t) => {
19337
+ })), fy = /* @__PURE__ */ h(((e, t) => {
19297
19338
  function n(e) {
19298
19339
  let t = e.regex, n = /(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/, r = t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/, /0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/, /(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/), i = /[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/, a = t.either(/[()]/, /[{}]/, /\[\[/, /[[\]]/, /\\/, /,/);
19299
19340
  return {
@@ -19432,7 +19473,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19432
19473
  };
19433
19474
  }
19434
19475
  t.exports = n;
19435
- })), cy = /* @__PURE__ */ h(((e, t) => {
19476
+ })), py = /* @__PURE__ */ h(((e, t) => {
19436
19477
  function n(e) {
19437
19478
  let t = e.regex, n = /(r#)?/, r = t.concat(n, e.UNDERSCORE_IDENT_RE), i = t.concat(n, e.IDENT_RE), a = {
19438
19479
  className: "title.function.invoke",
@@ -19600,7 +19641,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19600
19641
  };
19601
19642
  }
19602
19643
  t.exports = n;
19603
- })), ly = /* @__PURE__ */ h(((e, t) => {
19644
+ })), my = /* @__PURE__ */ h(((e, t) => {
19604
19645
  var n = (e) => ({
19605
19646
  IMPORTANT: {
19606
19647
  scope: "meta",
@@ -19749,7 +19790,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19749
19790
  };
19750
19791
  }
19751
19792
  t.exports = u;
19752
- })), uy = /* @__PURE__ */ h(((e, t) => {
19793
+ })), hy = /* @__PURE__ */ h(((e, t) => {
19753
19794
  function n(e) {
19754
19795
  return {
19755
19796
  name: "Shell Session",
@@ -19765,7 +19806,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19765
19806
  };
19766
19807
  }
19767
19808
  t.exports = n;
19768
- })), dy = /* @__PURE__ */ h(((e, t) => {
19809
+ })), gy = /* @__PURE__ */ h(((e, t) => {
19769
19810
  function n(e) {
19770
19811
  let t = e.regex, n = e.COMMENT("--", "$"), r = {
19771
19812
  scope: "string",
@@ -19882,7 +19923,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
19882
19923
  };
19883
19924
  }
19884
19925
  t.exports = n;
19885
- })), fy = /* @__PURE__ */ h(((e, t) => {
19926
+ })), _y = /* @__PURE__ */ h(((e, t) => {
19886
19927
  function n(e) {
19887
19928
  return e ? typeof e == "string" ? e : e.source : null;
19888
19929
  }
@@ -20455,7 +20496,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
20455
20496
  };
20456
20497
  }
20457
20498
  t.exports = T;
20458
- })), py = /* @__PURE__ */ h(((e, t) => {
20499
+ })), vy = /* @__PURE__ */ h(((e, t) => {
20459
20500
  function n(e) {
20460
20501
  let t = "true false yes no null", n = {
20461
20502
  className: "attr",
@@ -20598,7 +20639,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
20598
20639
  };
20599
20640
  }
20600
20641
  t.exports = n;
20601
- })), my = /* @__PURE__ */ h(((e, t) => {
20642
+ })), yy = /* @__PURE__ */ h(((e, t) => {
20602
20643
  var n = "[A-Za-z$_][0-9A-Za-z$_]*", r = /* @__PURE__ */ "as.in.of.if.for.while.finally.var.new.function.do.return.void.else.break.catch.instanceof.with.throw.case.default.try.switch.continue.typeof.delete.let.yield.const.class.debugger.async.await.static.import.from.export.extends.using".split("."), i = [
20603
20644
  "true",
20604
20645
  "false",
@@ -21118,7 +21159,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
21118
21159
  }), a;
21119
21160
  }
21120
21161
  t.exports = d;
21121
- })), hy = /* @__PURE__ */ h(((e, t) => {
21162
+ })), by = /* @__PURE__ */ h(((e, t) => {
21122
21163
  function n(e) {
21123
21164
  let t = e.regex, n = {
21124
21165
  className: "string",
@@ -21186,7 +21227,7 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
21186
21227
  };
21187
21228
  }
21188
21229
  t.exports = n;
21189
- })), gy = /* @__PURE__ */ h(((e, t) => {
21230
+ })), xy = /* @__PURE__ */ h(((e, t) => {
21190
21231
  function n(e) {
21191
21232
  e.regex;
21192
21233
  let t = e.COMMENT(/\(;/, /;\)/);
@@ -21248,21 +21289,21 @@ var Pv = /* @__PURE__ */ h(((e, t) => {
21248
21289
  };
21249
21290
  }
21250
21291
  t.exports = n;
21251
- })), _y = (/* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
21252
- var n = Pv();
21253
- n.registerLanguage("xml", Fv()), n.registerLanguage("bash", Iv()), n.registerLanguage("c", Lv()), n.registerLanguage("cpp", Rv()), n.registerLanguage("csharp", zv()), n.registerLanguage("css", Bv()), n.registerLanguage("markdown", Vv()), n.registerLanguage("diff", Hv()), n.registerLanguage("ruby", Uv()), n.registerLanguage("go", Wv()), n.registerLanguage("graphql", Gv()), n.registerLanguage("ini", Kv()), n.registerLanguage("java", qv()), n.registerLanguage("javascript", Jv()), n.registerLanguage("json", Yv()), n.registerLanguage("kotlin", Xv()), n.registerLanguage("less", Zv()), n.registerLanguage("lua", Qv()), n.registerLanguage("makefile", $v()), n.registerLanguage("perl", ey()), n.registerLanguage("objectivec", ty()), n.registerLanguage("php", ny()), n.registerLanguage("php-template", ry()), n.registerLanguage("plaintext", iy()), n.registerLanguage("python", ay()), n.registerLanguage("python-repl", oy()), n.registerLanguage("r", sy()), n.registerLanguage("rust", cy()), n.registerLanguage("scss", ly()), n.registerLanguage("shell", uy()), n.registerLanguage("sql", dy()), n.registerLanguage("swift", fy()), n.registerLanguage("yaml", py()), n.registerLanguage("typescript", my()), n.registerLanguage("vbnet", hy()), n.registerLanguage("wasm", gy()), n.HighlightJS = n, n.default = n, t.exports = n;
21292
+ })), Sy = (/* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
21293
+ var n = zv();
21294
+ n.registerLanguage("xml", Bv()), n.registerLanguage("bash", Vv()), n.registerLanguage("c", Hv()), n.registerLanguage("cpp", Uv()), n.registerLanguage("csharp", Wv()), n.registerLanguage("css", Gv()), n.registerLanguage("markdown", Kv()), n.registerLanguage("diff", qv()), n.registerLanguage("ruby", Jv()), n.registerLanguage("go", Yv()), n.registerLanguage("graphql", Xv()), n.registerLanguage("ini", Zv()), n.registerLanguage("java", Qv()), n.registerLanguage("javascript", $v()), n.registerLanguage("json", ey()), n.registerLanguage("kotlin", ty()), n.registerLanguage("less", ny()), n.registerLanguage("lua", ry()), n.registerLanguage("makefile", iy()), n.registerLanguage("perl", ay()), n.registerLanguage("objectivec", oy()), n.registerLanguage("php", sy()), n.registerLanguage("php-template", cy()), n.registerLanguage("plaintext", ly()), n.registerLanguage("python", uy()), n.registerLanguage("python-repl", dy()), n.registerLanguage("r", fy()), n.registerLanguage("rust", py()), n.registerLanguage("scss", my()), n.registerLanguage("shell", hy()), n.registerLanguage("sql", gy()), n.registerLanguage("swift", _y()), n.registerLanguage("yaml", vy()), n.registerLanguage("typescript", yy()), n.registerLanguage("vbnet", by()), n.registerLanguage("wasm", xy()), n.HighlightJS = n, n.default = n, t.exports = n;
21254
21295
  })))())).default;
21255
21296
  //#endregion
21256
21297
  //#region node_modules/dompurify/dist/purify.es.mjs
21257
- function vy(e, t) {
21298
+ function Cy(e, t) {
21258
21299
  (t == null || t > e.length) && (t = e.length);
21259
21300
  for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
21260
21301
  return r;
21261
21302
  }
21262
- function yy(e) {
21303
+ function wy(e) {
21263
21304
  if (Array.isArray(e)) return e;
21264
21305
  }
21265
- function by(e, t) {
21306
+ function Ty(e, t) {
21266
21307
  var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
21267
21308
  if (n != null) {
21268
21309
  var r, i, a, o, s = [], c = !0, l = !1;
@@ -21280,113 +21321,113 @@ function by(e, t) {
21280
21321
  return s;
21281
21322
  }
21282
21323
  }
21283
- function xy() {
21324
+ function Ey() {
21284
21325
  throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
21285
21326
  }
21286
- function Sy(e, t) {
21287
- return yy(e) || by(e, t) || Cy(e, t) || xy();
21327
+ function Dy(e, t) {
21328
+ return wy(e) || Ty(e, t) || Oy(e, t) || Ey();
21288
21329
  }
21289
- function Cy(e, t) {
21330
+ function Oy(e, t) {
21290
21331
  if (e) {
21291
- if (typeof e == "string") return vy(e, t);
21332
+ if (typeof e == "string") return Cy(e, t);
21292
21333
  var n = {}.toString.call(e).slice(8, -1);
21293
- 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) ? vy(e, t) : void 0;
21334
+ 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) ? Cy(e, t) : void 0;
21294
21335
  }
21295
21336
  }
21296
- var wy = Object.entries, Ty = Object.setPrototypeOf, Ey = Object.isFrozen, Dy = Object.getPrototypeOf, Oy = Object.getOwnPropertyDescriptor, ky = Object.freeze, Ay = Object.seal, jy = Object.create, My = typeof Reflect < "u" && Reflect, Ny = My.apply, Py = My.construct;
21297
- ky ||= function(e) {
21337
+ var ky = Object.entries, Ay = Object.setPrototypeOf, jy = Object.isFrozen, My = Object.getPrototypeOf, Ny = Object.getOwnPropertyDescriptor, Py = Object.freeze, Fy = Object.seal, Iy = Object.create, Ly = typeof Reflect < "u" && Reflect, Ry = Ly.apply, zy = Ly.construct;
21338
+ Py ||= function(e) {
21298
21339
  return e;
21299
- }, Ay ||= function(e) {
21340
+ }, Fy ||= function(e) {
21300
21341
  return e;
21301
- }, Ny ||= function(e, t) {
21342
+ }, Ry ||= function(e, t) {
21302
21343
  var n = [...arguments].slice(2);
21303
21344
  return e.apply(t, n);
21304
- }, Py ||= function(e) {
21345
+ }, zy ||= function(e) {
21305
21346
  return new e(...[...arguments].slice(1));
21306
21347
  };
21307
- var Fy = tb(Array.prototype.forEach), Iy = tb(Array.prototype.lastIndexOf), Ly = tb(Array.prototype.pop), Ry = tb(Array.prototype.push), zy = tb(Array.prototype.splice), By = Array.isArray, Vy = tb(String.prototype.toLowerCase), Hy = tb(String.prototype.toString), Uy = tb(String.prototype.match), Wy = tb(String.prototype.replace), Gy = tb(String.prototype.indexOf), Ky = tb(String.prototype.trim), qy = tb(Number.prototype.toString), Jy = tb(Boolean.prototype.toString), Yy = typeof BigInt > "u" ? null : tb(BigInt.prototype.toString), Xy = typeof Symbol > "u" ? null : tb(Symbol.prototype.toString), Zy = tb(Object.prototype.hasOwnProperty), Qy = tb(Object.prototype.toString), $y = tb(RegExp.prototype.test), eb = nb(TypeError);
21308
- function tb(e) {
21348
+ var By = ob(Array.prototype.forEach), Vy = ob(Array.prototype.lastIndexOf), Hy = ob(Array.prototype.pop), Uy = ob(Array.prototype.push), Wy = ob(Array.prototype.splice), Gy = Array.isArray, Ky = ob(String.prototype.toLowerCase), qy = ob(String.prototype.toString), Jy = ob(String.prototype.match), Yy = ob(String.prototype.replace), Xy = ob(String.prototype.indexOf), Zy = ob(String.prototype.trim), Qy = ob(Number.prototype.toString), $y = ob(Boolean.prototype.toString), eb = typeof BigInt > "u" ? null : ob(BigInt.prototype.toString), tb = typeof Symbol > "u" ? null : ob(Symbol.prototype.toString), nb = ob(Object.prototype.hasOwnProperty), rb = ob(Object.prototype.toString), ib = ob(RegExp.prototype.test), ab = sb(TypeError);
21349
+ function ob(e) {
21309
21350
  return function(t) {
21310
21351
  t instanceof RegExp && (t.lastIndex = 0);
21311
21352
  var n = [...arguments].slice(1);
21312
- return Ny(e, t, n);
21353
+ return Ry(e, t, n);
21313
21354
  };
21314
21355
  }
21315
- function nb(e) {
21356
+ function sb(e) {
21316
21357
  return function() {
21317
- return Py(e, [...arguments]);
21358
+ return zy(e, [...arguments]);
21318
21359
  };
21319
21360
  }
21320
- function rb(e, t) {
21321
- let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Vy;
21322
- if (Ty && Ty(e, null), !By(t)) return e;
21361
+ function cb(e, t) {
21362
+ let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ky;
21363
+ if (Ay && Ay(e, null), !Gy(t)) return e;
21323
21364
  let r = t.length;
21324
21365
  for (; r--;) {
21325
21366
  let i = t[r];
21326
21367
  if (typeof i == "string") {
21327
21368
  let e = n(i);
21328
- e !== i && (Ey(t) || (t[r] = e), i = e);
21369
+ e !== i && (jy(t) || (t[r] = e), i = e);
21329
21370
  }
21330
21371
  e[i] = !0;
21331
21372
  }
21332
21373
  return e;
21333
21374
  }
21334
- function ib(e) {
21335
- for (let t = 0; t < e.length; t++) Zy(e, t) || (e[t] = null);
21375
+ function lb(e) {
21376
+ for (let t = 0; t < e.length; t++) nb(e, t) || (e[t] = null);
21336
21377
  return e;
21337
21378
  }
21338
- function ab(e) {
21339
- let t = jy(null);
21340
- for (let r of wy(e)) {
21341
- var n = Sy(r, 2);
21379
+ function ub(e) {
21380
+ let t = Iy(null);
21381
+ for (let r of ky(e)) {
21382
+ var n = Dy(r, 2);
21342
21383
  let i = n[0], a = n[1];
21343
- Zy(e, i) && (By(a) ? t[i] = ib(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = ab(a) : t[i] = a);
21384
+ nb(e, i) && (Gy(a) ? t[i] = lb(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = ub(a) : t[i] = a);
21344
21385
  }
21345
21386
  return t;
21346
21387
  }
21347
- function ob(e) {
21388
+ function db(e) {
21348
21389
  switch (typeof e) {
21349
21390
  case "string": return e;
21350
- case "number": return qy(e);
21351
- case "boolean": return Jy(e);
21352
- case "bigint": return Yy ? Yy(e) : "0";
21353
- case "symbol": return Xy ? Xy(e) : "Symbol()";
21354
- case "undefined": return Qy(e);
21391
+ case "number": return Qy(e);
21392
+ case "boolean": return $y(e);
21393
+ case "bigint": return eb ? eb(e) : "0";
21394
+ case "symbol": return tb ? tb(e) : "Symbol()";
21395
+ case "undefined": return rb(e);
21355
21396
  case "function":
21356
21397
  case "object": {
21357
- if (e === null) return Qy(e);
21358
- let t = e, n = sb(t, "toString");
21398
+ if (e === null) return rb(e);
21399
+ let t = e, n = fb(t, "toString");
21359
21400
  if (typeof n == "function") {
21360
21401
  let e = n(t);
21361
- return typeof e == "string" ? e : Qy(e);
21402
+ return typeof e == "string" ? e : rb(e);
21362
21403
  }
21363
- return Qy(e);
21404
+ return rb(e);
21364
21405
  }
21365
- default: return Qy(e);
21406
+ default: return rb(e);
21366
21407
  }
21367
21408
  }
21368
- function sb(e, t) {
21409
+ function fb(e, t) {
21369
21410
  for (; e !== null;) {
21370
- let n = Oy(e, t);
21411
+ let n = Ny(e, t);
21371
21412
  if (n) {
21372
- if (n.get) return tb(n.get);
21373
- if (typeof n.value == "function") return tb(n.value);
21413
+ if (n.get) return ob(n.get);
21414
+ if (typeof n.value == "function") return ob(n.value);
21374
21415
  }
21375
- e = Dy(e);
21416
+ e = My(e);
21376
21417
  }
21377
21418
  function n() {
21378
21419
  return null;
21379
21420
  }
21380
21421
  return n;
21381
21422
  }
21382
- function cb(e) {
21423
+ function pb(e) {
21383
21424
  try {
21384
- return $y(e, ""), !0;
21425
+ return ib(e, ""), !0;
21385
21426
  } catch {
21386
21427
  return !1;
21387
21428
  }
21388
21429
  }
21389
- var lb = ky(/* @__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(".")), ub = ky(/* @__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(".")), db = ky([
21430
+ var mb = Py(/* @__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(".")), hb = Py(/* @__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(".")), gb = Py([
21390
21431
  "feBlend",
21391
21432
  "feColorMatrix",
21392
21433
  "feComponentTransfer",
@@ -21412,7 +21453,7 @@ var lb = ky(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
21412
21453
  "feSpotLight",
21413
21454
  "feTile",
21414
21455
  "feTurbulence"
21415
- ]), fb = ky([
21456
+ ]), _b = Py([
21416
21457
  "animate",
21417
21458
  "color-profile",
21418
21459
  "cursor",
@@ -21435,7 +21476,7 @@ var lb = ky(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
21435
21476
  "solidcolor",
21436
21477
  "unknown",
21437
21478
  "use"
21438
- ]), pb = ky(/* @__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(".")), mb = ky([
21479
+ ]), vb = Py(/* @__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(".")), yb = Py([
21439
21480
  "maction",
21440
21481
  "maligngroup",
21441
21482
  "malignmark",
@@ -21451,13 +21492,13 @@ var lb = ky(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
21451
21492
  "annotation-xml",
21452
21493
  "mprescripts",
21453
21494
  "none"
21454
- ]), hb = ky(["#text"]), gb = ky(/* @__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(".")), _b = ky(/* @__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(".")), vb = ky(/* @__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(".")), yb = ky([
21495
+ ]), bb = Py(["#text"]), xb = Py(/* @__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(".")), Sb = Py(/* @__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(".")), Cb = Py(/* @__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(".")), wb = Py([
21455
21496
  "xlink:href",
21456
21497
  "xml:id",
21457
21498
  "xlink:title",
21458
21499
  "xml:space",
21459
21500
  "xmlns:xlink"
21460
- ]), bb = Ay(/{{[\w\W]*|^[\w\W]*}}/g), xb = Ay(/<%[\w\W]*|^[\w\W]*%>/g), Sb = Ay(/\${[\w\W]*/g), Cb = Ay(/^data-[\-\w.\u00B7-\uFFFF]+$/), wb = Ay(/^aria-[\-\w]+$/), Tb = Ay(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Eb = Ay(/^(?:\w+script|data):/i), Db = Ay(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Ob = Ay(/^html$/i), kb = Ay(/^[a-z][.\w]*(-[.\w]+)+$/i), Ab = Ay(/<[/\w!]/g), jb = Ay(/<[/\w]/g), Mb = Ay(/<\/no(script|embed|frames)/i), Nb = Ay(/\/>/i), Pb = {
21501
+ ]), Tb = Fy(/{{[\w\W]*|^[\w\W]*}}/g), Eb = Fy(/<%[\w\W]*|^[\w\W]*%>/g), Db = Fy(/\${[\w\W]*/g), Ob = Fy(/^data-[\-\w.\u00B7-\uFFFF]+$/), kb = Fy(/^aria-[\-\w]+$/), Ab = Fy(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), jb = Fy(/^(?:\w+script|data):/i), Mb = Fy(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Nb = Fy(/^html$/i), Pb = Fy(/^[a-z][.\w]*(-[.\w]+)+$/i), Fb = Fy(/<[/\w!]/g), Ib = Fy(/<[/\w]/g), Lb = Fy(/<\/no(script|embed|frames)/i), Rb = Fy(/\/>/i), zb = {
21461
21502
  element: 1,
21462
21503
  attribute: 2,
21463
21504
  text: 3,
@@ -21470,9 +21511,9 @@ var lb = ky(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
21470
21511
  documentType: 10,
21471
21512
  documentFragment: 11,
21472
21513
  notation: 12
21473
- }, Fb = function() {
21514
+ }, Bb = function() {
21474
21515
  return typeof window > "u" ? null : window;
21475
- }, Ib = function(e, t) {
21516
+ }, Vb = function(e, t) {
21476
21517
  if (typeof e != "object" || typeof e.createPolicy != "function") return null;
21477
21518
  let n = null, r = "data-tt-policy-suffix";
21478
21519
  t && t.hasAttribute(r) && (n = t.getAttribute(r));
@@ -21489,7 +21530,7 @@ var lb = ky(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
21489
21530
  } catch {
21490
21531
  return console.warn("TrustedTypes policy " + i + " could not be created."), null;
21491
21532
  }
21492
- }, Lb = function() {
21533
+ }, Hb = function() {
21493
21534
  return {
21494
21535
  afterSanitizeAttributes: [],
21495
21536
  afterSanitizeElements: [],
@@ -21501,23 +21542,23 @@ var lb = ky(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
21501
21542
  uponSanitizeElement: [],
21502
21543
  uponSanitizeShadowNode: []
21503
21544
  };
21504
- }, Rb = function(e, t, n, r) {
21505
- return Zy(e, t) && By(e[t]) ? rb(r.base ? ab(r.base) : {}, e[t], r.transform) : n;
21545
+ }, Ub = function(e, t, n, r) {
21546
+ return nb(e, t) && Gy(e[t]) ? cb(r.base ? ub(r.base) : {}, e[t], r.transform) : n;
21506
21547
  };
21507
- function zb() {
21508
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fb(), t = (e) => zb(e);
21509
- if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== Pb.document || !e.Element) return t.isSupported = !1, t;
21548
+ function Wb() {
21549
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Bb(), t = (e) => Wb(e);
21550
+ if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== zb.document || !e.Element) return t.isSupported = !1, t;
21510
21551
  let n = e.document, r = n, i = r.currentScript;
21511
21552
  e.DocumentFragment;
21512
21553
  let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
21513
21554
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
21514
- let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = sb(d, "cloneNode"), p = sb(d, "remove"), m = sb(d, "nextSibling"), h = sb(d, "childNodes"), g = sb(d, "parentNode"), _ = sb(d, "shadowRoot"), v = sb(d, "attributes"), y = o && o.prototype ? sb(o.prototype, "nodeType") : null, b = o && o.prototype ? sb(o.prototype, "nodeName") : null, x = o && o.prototype ? sb(o.prototype, "ownerDocument") : null;
21555
+ let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = fb(d, "cloneNode"), p = fb(d, "remove"), m = fb(d, "nextSibling"), h = fb(d, "childNodes"), g = fb(d, "parentNode"), _ = fb(d, "shadowRoot"), v = fb(d, "attributes"), y = o && o.prototype ? fb(o.prototype, "nodeType") : null, b = o && o.prototype ? fb(o.prototype, "nodeName") : null, x = o && o.prototype ? fb(o.prototype, "ownerDocument") : null;
21515
21556
  if (typeof a == "function") {
21516
21557
  let e = n.createElement("template");
21517
21558
  e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
21518
21559
  }
21519
21560
  let S, C = "", w, T = !1, E = 0, D = function() {
21520
- if (E > 0) throw eb("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.");
21561
+ if (E > 0) throw ab("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.");
21521
21562
  }, O = function(e) {
21522
21563
  D(), E++;
21523
21564
  try {
@@ -21533,21 +21574,21 @@ function zb() {
21533
21574
  E--;
21534
21575
  }
21535
21576
  }, A = function() {
21536
- return T ||= (w = Ib(u, i), !0), w;
21537
- }, j = n, M = j.implementation, N = j.createNodeIterator, P = j.createDocumentFragment, ee = j.getElementsByTagName, F = r.importNode, I = Lb();
21538
- t.isSupported = typeof wy == "function" && typeof g == "function" && M && M.createHTMLDocument !== void 0;
21539
- let L = bb, te = xb, ne = Sb, R = Cb, z = wb, re = Eb, B = Db, ie = kb, ae = Tb, V = null, oe = rb({}, [
21540
- ...lb,
21541
- ...ub,
21542
- ...db,
21543
- ...pb,
21544
- ...hb
21545
- ]), H = null, se = rb({}, [
21577
+ return T ||= (w = Vb(u, i), !0), w;
21578
+ }, j = n, M = j.implementation, N = j.createNodeIterator, P = j.createDocumentFragment, ee = j.getElementsByTagName, F = r.importNode, I = Hb();
21579
+ t.isSupported = typeof ky == "function" && typeof g == "function" && M && M.createHTMLDocument !== void 0;
21580
+ let L = Tb, te = Eb, ne = Db, R = Ob, z = kb, re = jb, B = Mb, ie = Pb, ae = Ab, V = null, oe = cb({}, [
21581
+ ...mb,
21582
+ ...hb,
21546
21583
  ...gb,
21547
- ..._b,
21548
21584
  ...vb,
21549
- ...yb
21550
- ]), ce = Object.seal(jy(null, {
21585
+ ...bb
21586
+ ]), H = null, se = cb({}, [
21587
+ ...xb,
21588
+ ...Sb,
21589
+ ...Cb,
21590
+ ...wb
21591
+ ]), ce = Object.seal(Iy(null, {
21551
21592
  tagNameCheck: {
21552
21593
  writable: !0,
21553
21594
  configurable: !1,
@@ -21566,7 +21607,7 @@ function zb() {
21566
21607
  enumerable: !0,
21567
21608
  value: !1
21568
21609
  }
21569
- })), le = null, ue = null, de = Object.seal(jy(null, {
21610
+ })), le = null, ue = null, de = Object.seal(Iy(null, {
21570
21611
  tagCheck: {
21571
21612
  writable: !0,
21572
21613
  configurable: !1,
@@ -21579,14 +21620,14 @@ function zb() {
21579
21620
  enumerable: !0,
21580
21621
  value: null
21581
21622
  }
21582
- })), fe = !0, pe = !0, me = !1, he = !0, ge = !1, _e = !0, ve = !1, ye = !1, be = null, xe = null, Se = !1, Ce = !1, we = !1, Te = !1, Ee = !0, De = !1, Oe = "user-content-", U = !0, ke = !1, Ae = {}, je = null, Me = rb({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ne = null, Pe = rb({}, [
21623
+ })), fe = !0, pe = !0, me = !1, he = !0, ge = !1, _e = !0, ve = !1, ye = !1, be = null, xe = null, Se = !1, Ce = !1, we = !1, Te = !1, Ee = !0, De = !1, Oe = "user-content-", U = !0, ke = !1, Ae = {}, je = null, Me = cb({}, /* @__PURE__ */ "annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp".split(".")), Ne = null, Pe = cb({}, [
21583
21624
  "audio",
21584
21625
  "video",
21585
21626
  "img",
21586
21627
  "source",
21587
21628
  "image",
21588
21629
  "track"
21589
- ]), Fe = null, Ie = rb({}, [
21630
+ ]), Fe = null, Ie = cb({}, [
21590
21631
  "alt",
21591
21632
  "class",
21592
21633
  "for",
@@ -21601,17 +21642,17 @@ function zb() {
21601
21642
  "value",
21602
21643
  "style",
21603
21644
  "xmlns"
21604
- ]), Le = "http://www.w3.org/1998/Math/MathML", Re = "http://www.w3.org/2000/svg", ze = "http://www.w3.org/1999/xhtml", Be = ze, W = !1, Ve = null, He = rb({}, [
21645
+ ]), Le = "http://www.w3.org/1998/Math/MathML", Re = "http://www.w3.org/2000/svg", ze = "http://www.w3.org/1999/xhtml", Be = ze, W = !1, Ve = null, He = cb({}, [
21605
21646
  Le,
21606
21647
  Re,
21607
21648
  ze
21608
- ], Hy), Ue = ky([
21649
+ ], qy), Ue = Py([
21609
21650
  "mi",
21610
21651
  "mo",
21611
21652
  "mn",
21612
21653
  "ms",
21613
21654
  "mtext"
21614
- ]), We = rb({}, Ue), Ge = ky(["annotation-xml"]), Ke = rb({}, Ge), qe = rb({}, [
21655
+ ]), We = cb({}, Ue), Ge = Py(["annotation-xml"]), Ke = cb({}, Ge), qe = cb({}, [
21615
21656
  "title",
21616
21657
  "style",
21617
21658
  "font",
@@ -21622,21 +21663,21 @@ function zb() {
21622
21663
  }, et = function() {
21623
21664
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
21624
21665
  if (Ze && Ze === e) return;
21625
- (!e || typeof e != "object") && (e = {}), e = ab(e), Je = Ye.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Xe = Je === "application/xhtml+xml" ? Hy : Vy, V = Rb(e, "ALLOWED_TAGS", oe, { transform: Xe }), H = Rb(e, "ALLOWED_ATTR", se, { transform: Xe }), Ve = Rb(e, "ALLOWED_NAMESPACES", He, { transform: Hy }), Fe = Rb(e, "ADD_URI_SAFE_ATTR", Ie, {
21666
+ (!e || typeof e != "object") && (e = {}), e = ub(e), Je = Ye.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Xe = Je === "application/xhtml+xml" ? qy : Ky, V = Ub(e, "ALLOWED_TAGS", oe, { transform: Xe }), H = Ub(e, "ALLOWED_ATTR", se, { transform: Xe }), Ve = Ub(e, "ALLOWED_NAMESPACES", He, { transform: qy }), Fe = Ub(e, "ADD_URI_SAFE_ATTR", Ie, {
21626
21667
  transform: Xe,
21627
21668
  base: Ie
21628
- }), Ne = Rb(e, "ADD_DATA_URI_TAGS", Pe, {
21669
+ }), Ne = Ub(e, "ADD_DATA_URI_TAGS", Pe, {
21629
21670
  transform: Xe,
21630
21671
  base: Pe
21631
- }), je = Rb(e, "FORBID_CONTENTS", Me, { transform: Xe }), le = Rb(e, "FORBID_TAGS", ab({}), { transform: Xe }), ue = Rb(e, "FORBID_ATTR", ab({}), { transform: Xe }), Ae = Zy(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? ab(e.USE_PROFILES) : e.USE_PROFILES : !1, fe = e.ALLOW_ARIA_ATTR !== !1, pe = e.ALLOW_DATA_ATTR !== !1, me = e.ALLOW_UNKNOWN_PROTOCOLS || !1, he = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ge = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Ce = e.RETURN_DOM || !1, we = e.RETURN_DOM_FRAGMENT || !1, Te = e.RETURN_TRUSTED_TYPE || !1, Se = e.FORCE_BODY || !1, Ee = e.SANITIZE_DOM !== !1, De = e.SANITIZE_NAMED_PROPS || !1, U = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, ae = cb(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Tb, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, We = Zy(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ab(e.MATHML_TEXT_INTEGRATION_POINTS) : rb({}, Ue), Ke = Zy(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? ab(e.HTML_INTEGRATION_POINTS) : rb({}, Ge);
21632
- let t = Zy(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? ab(e.CUSTOM_ELEMENT_HANDLING) : jy(null);
21633
- if (ce = jy(null), Zy(t, "tagNameCheck") && $e(t.tagNameCheck) && (ce.tagNameCheck = t.tagNameCheck), Zy(t, "attributeNameCheck") && $e(t.attributeNameCheck) && (ce.attributeNameCheck = t.attributeNameCheck), Zy(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ce.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Ay(ce), ge && (pe = !1), we && (Ce = !0), Ae && (V = rb({}, hb), H = jy(null), Ae.html === !0 && (rb(V, lb), rb(H, gb)), Ae.svg === !0 && (rb(V, ub), rb(H, _b), rb(H, yb)), Ae.svgFilters === !0 && (rb(V, db), rb(H, _b), rb(H, yb)), Ae.mathMl === !0 && (rb(V, pb), rb(H, vb), rb(H, yb))), de.tagCheck = null, de.attributeCheck = null, Zy(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? de.tagCheck = e.ADD_TAGS : By(e.ADD_TAGS) && (V === oe && (V = ab(V)), rb(V, e.ADD_TAGS, Xe))), Zy(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? de.attributeCheck = e.ADD_ATTR : By(e.ADD_ATTR) && (H === se && (H = ab(H)), rb(H, e.ADD_ATTR, Xe))), Zy(e, "ADD_URI_SAFE_ATTR") && By(e.ADD_URI_SAFE_ATTR) && rb(Fe, e.ADD_URI_SAFE_ATTR, Xe), Zy(e, "FORBID_CONTENTS") && By(e.FORBID_CONTENTS) && (je === Me && (je = ab(je)), rb(je, e.FORBID_CONTENTS, Xe)), Zy(e, "ADD_FORBID_CONTENTS") && By(e.ADD_FORBID_CONTENTS) && (je === Me && (je = ab(je)), rb(je, e.ADD_FORBID_CONTENTS, Xe)), U && (V["#text"] = !0), ve && rb(V, [
21672
+ }), je = Ub(e, "FORBID_CONTENTS", Me, { transform: Xe }), le = Ub(e, "FORBID_TAGS", ub({}), { transform: Xe }), ue = Ub(e, "FORBID_ATTR", ub({}), { transform: Xe }), Ae = nb(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? ub(e.USE_PROFILES) : e.USE_PROFILES : !1, fe = e.ALLOW_ARIA_ATTR !== !1, pe = e.ALLOW_DATA_ATTR !== !1, me = e.ALLOW_UNKNOWN_PROTOCOLS || !1, he = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ge = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Ce = e.RETURN_DOM || !1, we = e.RETURN_DOM_FRAGMENT || !1, Te = e.RETURN_TRUSTED_TYPE || !1, Se = e.FORCE_BODY || !1, Ee = e.SANITIZE_DOM !== !1, De = e.SANITIZE_NAMED_PROPS || !1, U = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, ae = pb(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ab, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, We = nb(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? ub(e.MATHML_TEXT_INTEGRATION_POINTS) : cb({}, Ue), Ke = nb(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? ub(e.HTML_INTEGRATION_POINTS) : cb({}, Ge);
21673
+ let t = nb(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? ub(e.CUSTOM_ELEMENT_HANDLING) : Iy(null);
21674
+ if (ce = Iy(null), nb(t, "tagNameCheck") && $e(t.tagNameCheck) && (ce.tagNameCheck = t.tagNameCheck), nb(t, "attributeNameCheck") && $e(t.attributeNameCheck) && (ce.attributeNameCheck = t.attributeNameCheck), nb(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ce.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Fy(ce), ge && (pe = !1), we && (Ce = !0), Ae && (V = cb({}, bb), H = Iy(null), Ae.html === !0 && (cb(V, mb), cb(H, xb)), Ae.svg === !0 && (cb(V, hb), cb(H, Sb), cb(H, wb)), Ae.svgFilters === !0 && (cb(V, gb), cb(H, Sb), cb(H, wb)), Ae.mathMl === !0 && (cb(V, vb), cb(H, Cb), cb(H, wb))), de.tagCheck = null, de.attributeCheck = null, nb(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? de.tagCheck = e.ADD_TAGS : Gy(e.ADD_TAGS) && (V === oe && (V = ub(V)), cb(V, e.ADD_TAGS, Xe))), nb(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? de.attributeCheck = e.ADD_ATTR : Gy(e.ADD_ATTR) && (H === se && (H = ub(H)), cb(H, e.ADD_ATTR, Xe))), nb(e, "ADD_URI_SAFE_ATTR") && Gy(e.ADD_URI_SAFE_ATTR) && cb(Fe, e.ADD_URI_SAFE_ATTR, Xe), nb(e, "FORBID_CONTENTS") && Gy(e.FORBID_CONTENTS) && (je === Me && (je = ub(je)), cb(je, e.FORBID_CONTENTS, Xe)), nb(e, "ADD_FORBID_CONTENTS") && Gy(e.ADD_FORBID_CONTENTS) && (je === Me && (je = ub(je)), cb(je, e.ADD_FORBID_CONTENTS, Xe)), U && (V["#text"] = !0), ve && cb(V, [
21634
21675
  "html",
21635
21676
  "head",
21636
21677
  "body"
21637
- ]), V.table && (rb(V, ["tbody"]), delete le.tbody), e.TRUSTED_TYPES_POLICY) {
21638
- if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw eb("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
21639
- if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw eb("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
21678
+ ]), V.table && (cb(V, ["tbody"]), delete le.tbody), e.TRUSTED_TYPES_POLICY) {
21679
+ if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw ab("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
21680
+ if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw ab("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
21640
21681
  let t = S;
21641
21682
  S = e.TRUSTED_TYPES_POLICY;
21642
21683
  try {
@@ -21645,12 +21686,12 @@ function zb() {
21645
21686
  throw S = t, e;
21646
21687
  }
21647
21688
  } else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = A()), S && typeof C == "string" && (C = O("")));
21648
- ky && ky(e), Ze = e;
21649
- }, tt = rb({}, [
21650
- ...ub,
21651
- ...db,
21652
- ...fb
21653
- ]), nt = rb({}, [...pb, ...mb]), rt = function(e, t, n) {
21689
+ Py && Py(e), Ze = e;
21690
+ }, tt = cb({}, [
21691
+ ...hb,
21692
+ ...gb,
21693
+ ..._b
21694
+ ]), nt = cb({}, [...vb, ...yb]), rt = function(e, t, n) {
21654
21695
  return t.namespaceURI === ze ? e === "svg" : t.namespaceURI === Le ? e === "svg" && (n === "annotation-xml" || We[n]) : !!tt[e];
21655
21696
  }, it = function(e, t, n) {
21656
21697
  return t.namespaceURI === ze ? e === "math" : t.namespaceURI === Re ? e === "math" && Ke[n] : !!nt[e];
@@ -21662,23 +21703,23 @@ function zb() {
21662
21703
  namespaceURI: Be,
21663
21704
  tagName: "template"
21664
21705
  });
21665
- let n = Vy(e.tagName), r = Vy(t.tagName);
21706
+ let n = Ky(e.tagName), r = Ky(t.tagName);
21666
21707
  return Ve[e.namespaceURI] ? e.namespaceURI === Re ? rt(n, t, r) : e.namespaceURI === Le ? it(n, t, r) : e.namespaceURI === ze ? at(n, t, r) : !!(Je === "application/xhtml+xml" && Ve[e.namespaceURI]) : !1;
21667
21708
  }, st = function(e) {
21668
- Ry(t.removed, { element: e });
21709
+ Uy(t.removed, { element: e });
21669
21710
  try {
21670
21711
  g(e).removeChild(e);
21671
21712
  } catch {
21672
- if (p(e), !g(e)) throw eb("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
21713
+ if (p(e), !g(e)) throw ab("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
21673
21714
  }
21674
21715
  }, ct = function(e) {
21675
21716
  dt(e);
21676
21717
  let t = h(e);
21677
21718
  if (t) {
21678
21719
  let e = [];
21679
- Fy(t, (t) => {
21680
- Ry(e, t);
21681
- }), Fy(e, (e) => {
21720
+ By(t, (t) => {
21721
+ Uy(e, t);
21722
+ }), By(e, (e) => {
21682
21723
  try {
21683
21724
  p(e);
21684
21725
  } catch {}
@@ -21693,12 +21734,12 @@ function zb() {
21693
21734
  }
21694
21735
  }, lt = function(e, n) {
21695
21736
  try {
21696
- Ry(t.removed, {
21737
+ Uy(t.removed, {
21697
21738
  attribute: n.getAttributeNode(e),
21698
21739
  from: n
21699
21740
  });
21700
21741
  } catch {
21701
- Ry(t.removed, {
21742
+ Uy(t.removed, {
21702
21743
  attribute: null,
21703
21744
  from: n
21704
21745
  });
@@ -21721,7 +21762,7 @@ function zb() {
21721
21762
  let t = [e];
21722
21763
  for (; t.length > 0;) {
21723
21764
  let e = t.pop();
21724
- (y ? y(e) : e.nodeType) === Pb.element && ut(e);
21765
+ (y ? y(e) : e.nodeType) === zb.element && ut(e);
21725
21766
  let n = h(e);
21726
21767
  if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
21727
21768
  }
@@ -21730,13 +21771,13 @@ function zb() {
21730
21771
  let t = [e];
21731
21772
  for (; t.length > 0;) {
21732
21773
  let e = t.pop(), n = y ? y(e) : e.nodeType;
21733
- if (n === Pb.processingInstruction || n === Pb.comment && $y(jb, e.data)) {
21774
+ if (n === zb.processingInstruction || n === zb.comment && ib(Ib, e.data)) {
21734
21775
  try {
21735
21776
  p(e);
21736
21777
  } catch {}
21737
21778
  continue;
21738
21779
  }
21739
- if (n === Pb.element) {
21780
+ if (n === zb.element) {
21740
21781
  let t = e, n = Xe(b ? b(e) : e.nodeName);
21741
21782
  try {
21742
21783
  t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
@@ -21749,7 +21790,7 @@ function zb() {
21749
21790
  let t = null, r = null;
21750
21791
  if (Se) e = "<remove></remove>" + e;
21751
21792
  else {
21752
- let t = Uy(e, /^[\r\n\t ]+/);
21793
+ let t = Jy(e, /^[\r\n\t ]+/);
21753
21794
  r = t && t[0];
21754
21795
  }
21755
21796
  Je === "application/xhtml+xml" && Be === ze && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
@@ -21769,13 +21810,13 @@ function zb() {
21769
21810
  let t = x ? x(e) : e.ownerDocument;
21770
21811
  return N.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
21771
21812
  }, ht = function(e) {
21772
- return e = Wy(e, L, " "), e = Wy(e, te, " "), e = Wy(e, ne, " "), e;
21813
+ return e = Yy(e, L, " "), e = Yy(e, te, " "), e = Yy(e, ne, " "), e;
21773
21814
  }, gt = function(e) {
21774
21815
  e.normalize();
21775
21816
  let t = x ? x(e) : e.ownerDocument, n = N.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
21776
21817
  for (; r;) r.data = ht(r.data), r = n.nextNode();
21777
21818
  let i = e.querySelectorAll?.call(e, "template");
21778
- i && Fy(i, (e) => {
21819
+ i && By(i, (e) => {
21779
21820
  _t(e.content) && gt(e.content);
21780
21821
  });
21781
21822
  }, G = function(e) {
@@ -21784,7 +21825,7 @@ function zb() {
21784
21825
  }, _t = function(e) {
21785
21826
  if (!y || typeof e != "object" || !e) return !1;
21786
21827
  try {
21787
- return y(e) === Pb.documentFragment;
21828
+ return y(e) === zb.documentFragment;
21788
21829
  } catch {
21789
21830
  return !1;
21790
21831
  }
@@ -21797,14 +21838,14 @@ function zb() {
21797
21838
  }
21798
21839
  };
21799
21840
  function yt(e, n, r) {
21800
- e.length !== 0 && Fy(e, (e) => {
21841
+ e.length !== 0 && By(e, (e) => {
21801
21842
  e.call(t, n, r, Ze);
21802
21843
  });
21803
21844
  }
21804
21845
  let bt = function(e, t) {
21805
- return !!(_e && e.hasChildNodes() && !vt(e.firstElementChild) && $y(Ab, e.textContent) && $y(Ab, e.innerHTML) || _e && e.namespaceURI === ze && t === "style" && vt(e.firstElementChild) || e.nodeType === Pb.processingInstruction || _e && e.nodeType === Pb.comment && $y(jb, e.data));
21846
+ return !!(_e && e.hasChildNodes() && !vt(e.firstElementChild) && ib(Fb, e.textContent) && ib(Fb, e.innerHTML) || _e && e.namespaceURI === ze && t === "style" && vt(e.firstElementChild) || e.nodeType === zb.processingInstruction || _e && e.nodeType === zb.comment && ib(Ib, e.data));
21806
21847
  }, xt = function(e, t, n) {
21807
- if (!le[t] && Et(t) && (ce.tagNameCheck instanceof RegExp && $y(ce.tagNameCheck, t) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(t))) return !1;
21848
+ if (!le[t] && Et(t) && (ce.tagNameCheck instanceof RegExp && ib(ce.tagNameCheck, t) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(t))) return !1;
21808
21849
  if (U && !je[t]) {
21809
21850
  let t = g(e), r = h(e);
21810
21851
  if (r && t) {
@@ -21817,7 +21858,7 @@ function zb() {
21817
21858
  }
21818
21859
  return st(e), !0;
21819
21860
  }, St = function(e, t, n, r) {
21820
- return e.length === 0 ? t : t === n || t === r ? ab(t) : t;
21861
+ return e.length === 0 ? t : t === n || t === r ? ub(t) : t;
21821
21862
  }, Ct = function(e, n) {
21822
21863
  if (yt(I.beforeSanitizeElements, e, null), e !== n && g(e) === null) return ke && dt(e), !0;
21823
21864
  if (G(e)) return st(e), !0;
@@ -21831,22 +21872,22 @@ function zb() {
21831
21872
  let t = xt(e, r, n);
21832
21873
  return t === !1 && yt(I.afterSanitizeElements, e, null), t;
21833
21874
  }
21834
- if ((y ? y(e) : e.nodeType) === Pb.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && $y(Mb, e.innerHTML)) return st(e), !0;
21835
- if (ge && e.nodeType === Pb.text) {
21875
+ if ((y ? y(e) : e.nodeType) === zb.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && ib(Lb, e.innerHTML)) return st(e), !0;
21876
+ if (ge && e.nodeType === zb.text) {
21836
21877
  let n = ht(e.textContent);
21837
- e.textContent !== n && (Ry(t.removed, { element: e.cloneNode() }), e.textContent = n);
21878
+ e.textContent !== n && (Uy(t.removed, { element: e.cloneNode() }), e.textContent = n);
21838
21879
  }
21839
21880
  return yt(I.afterSanitizeElements, e, null), !1;
21840
21881
  }, wt = function(e, t, r) {
21841
21882
  if (ue[t] || _e && t === "patchsrc" || _e && t === "for" && e !== "label" && e !== "output" || Ee && (t === "id" || t === "name") && (r in n || r in Qe)) return !1;
21842
21883
  let i = H[t] || de.attributeCheck instanceof Function && de.attributeCheck(t, e);
21843
- if (!(pe && $y(R, t)) && !(fe && $y(z, t))) {
21884
+ if (!(pe && ib(R, t)) && !(fe && ib(z, t))) {
21844
21885
  if (!i) {
21845
- if (!(Et(e) && (ce.tagNameCheck instanceof RegExp && $y(ce.tagNameCheck, e) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(e)) && (ce.attributeNameCheck instanceof RegExp && $y(ce.attributeNameCheck, t) || ce.attributeNameCheck instanceof Function && ce.attributeNameCheck(t, e)) || t === "is" && ce.allowCustomizedBuiltInElements && (ce.tagNameCheck instanceof RegExp && $y(ce.tagNameCheck, r) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(r)))) return !1;
21846
- } else if (!Fe[t] && !$y(ae, Wy(r, B, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Gy(r, "data:") === 0 && Ne[e]) && !(me && !$y(re, Wy(r, B, ""))) && r) return !1;
21886
+ if (!(Et(e) && (ce.tagNameCheck instanceof RegExp && ib(ce.tagNameCheck, e) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(e)) && (ce.attributeNameCheck instanceof RegExp && ib(ce.attributeNameCheck, t) || ce.attributeNameCheck instanceof Function && ce.attributeNameCheck(t, e)) || t === "is" && ce.allowCustomizedBuiltInElements && (ce.tagNameCheck instanceof RegExp && ib(ce.tagNameCheck, r) || ce.tagNameCheck instanceof Function && ce.tagNameCheck(r)))) return !1;
21887
+ } else if (!Fe[t] && !ib(ae, Yy(r, B, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && Xy(r, "data:") === 0 && Ne[e]) && !(me && !ib(re, Yy(r, B, ""))) && r) return !1;
21847
21888
  }
21848
21889
  return !0;
21849
- }, Tt = rb({}, [
21890
+ }, Tt = cb({}, [
21850
21891
  "annotation-xml",
21851
21892
  "color-profile",
21852
21893
  "font-face",
@@ -21856,7 +21897,7 @@ function zb() {
21856
21897
  "font-face-uri",
21857
21898
  "missing-glyph"
21858
21899
  ]), Et = function(e) {
21859
- return !Tt[Vy(e)] && $y(ie, e);
21900
+ return !Tt[Ky(e)] && ib(ie, e);
21860
21901
  }, Dt = function(e, t, n, r) {
21861
21902
  if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
21862
21903
  case "TrustedHTML": return O(r);
@@ -21865,7 +21906,7 @@ function zb() {
21865
21906
  return r;
21866
21907
  }, Ot = function(e, n, r, i) {
21867
21908
  try {
21868
- r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), G(e) ? st(e) : Ly(t.removed);
21909
+ r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), G(e) ? st(e) : Hy(t.removed);
21869
21910
  } catch {
21870
21911
  lt(n, e);
21871
21912
  }
@@ -21882,12 +21923,12 @@ function zb() {
21882
21923
  forceKeepAttr: void 0
21883
21924
  }, r = t.length, i = Xe(e.nodeName);
21884
21925
  for (; r--;) {
21885
- let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Xe(o), u = c, d = o === "value" ? u : Ky(u);
21886
- if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, yt(I.uponSanitizeAttribute, e, n), d = n.attrValue, De && (l === "id" || l === "name") && Gy(d, Oe) !== 0 && (lt(o, e), d = Oe + d), _e && $y(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
21926
+ let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Xe(o), u = c, d = o === "value" ? u : Zy(u);
21927
+ if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, yt(I.uponSanitizeAttribute, e, n), d = n.attrValue, De && (l === "id" || l === "name") && Xy(d, Oe) !== 0 && (lt(o, e), d = Oe + d), _e && ib(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
21887
21928
  lt(o, e);
21888
21929
  continue;
21889
21930
  }
21890
- if (l === "attributename" && Uy(d, "href")) {
21931
+ if (l === "attributename" && Jy(d, "href")) {
21891
21932
  lt(o, e);
21892
21933
  continue;
21893
21934
  }
@@ -21896,7 +21937,7 @@ function zb() {
21896
21937
  lt(o, e);
21897
21938
  continue;
21898
21939
  }
21899
- if (!he && $y(Nb, d)) {
21940
+ if (!he && ib(Rb, d)) {
21900
21941
  lt(o, e);
21901
21942
  continue;
21902
21943
  }
@@ -21910,7 +21951,7 @@ function zb() {
21910
21951
  yt(I.afterSanitizeAttributes, e, null);
21911
21952
  }, At = function(e) {
21912
21953
  let t = null, n = mt(e);
21913
- for (yt(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (yt(I.uponSanitizeShadowNode, t, null), Ct(t, e), kt(t), _t(t.content) && At(t.content), (y ? y(t) : t.nodeType) === Pb.element) {
21954
+ for (yt(I.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (yt(I.uponSanitizeShadowNode, t, null), Ct(t, e), kt(t), _t(t.content) && At(t.content), (y ? y(t) : t.nodeType) === zb.element) {
21914
21955
  let e = _(t);
21915
21956
  _t(e) && (jt(e), At(e));
21916
21957
  }
@@ -21926,7 +21967,7 @@ function zb() {
21926
21967
  At(e.shadow);
21927
21968
  continue;
21928
21969
  }
21929
- let n = e.node, r = (y ? y(n) : n.nodeType) === Pb.element, i = h(n);
21970
+ let n = e.node, r = (y ? y(n) : n.nodeType) === zb.element, i = h(n);
21930
21971
  if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
21931
21972
  node: i[e],
21932
21973
  shadow: null
@@ -21955,24 +21996,24 @@ function zb() {
21955
21996
  };
21956
21997
  return t.sanitize = function(e) {
21957
21998
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
21958
- if (W = !e, W && (e = "<!-->"), typeof e != "string" && !vt(e) && (e = ob(e), typeof e != "string")) throw eb("dirty is not a string, aborting");
21999
+ if (W = !e, W && (e = "<!-->"), typeof e != "string" && !vt(e) && (e = db(e), typeof e != "string")) throw ab("dirty is not a string, aborting");
21959
22000
  if (!t.isSupported) return e;
21960
- ye ? (V = be, H = xe) : et(n), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (V = ab(V)), I.uponSanitizeAttribute.length > 0 && (H = ab(H)), t.removed = [];
22001
+ ye ? (V = be, H = xe) : et(n), (I.uponSanitizeElement.length > 0 || I.uponSanitizeAttribute.length > 0) && (V = ub(V)), I.uponSanitizeAttribute.length > 0 && (H = ub(H)), t.removed = [];
21961
22002
  let c = ke && typeof e != "string" && vt(e);
21962
22003
  if (c) {
21963
22004
  ft(e);
21964
22005
  let t = b ? b(e) : e.nodeName;
21965
22006
  if (typeof t == "string") {
21966
22007
  let n = Xe(t);
21967
- if (!V[n] || le[n]) throw ct(e), eb("root node is forbidden and cannot be sanitized in-place");
22008
+ if (!V[n] || le[n]) throw ct(e), ab("root node is forbidden and cannot be sanitized in-place");
21968
22009
  }
21969
- if (G(e)) throw ct(e), eb("root node is clobbered and cannot be sanitized in-place");
22010
+ if (G(e)) throw ct(e), ab("root node is clobbered and cannot be sanitized in-place");
21970
22011
  try {
21971
22012
  jt(e);
21972
22013
  } catch (t) {
21973
22014
  throw ct(e), t;
21974
22015
  }
21975
- } else if (vt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === Pb.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), jt(a);
22016
+ } else if (vt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === zb.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), jt(a);
21976
22017
  else {
21977
22018
  if (!Ce && !ge && !ve && e.indexOf("<") === -1) return S && Te ? O(e) : e;
21978
22019
  if (i = pt(e), !i) return Ce ? null : Te ? C : "";
@@ -21983,11 +22024,11 @@ function zb() {
21983
22024
  let e = mt(l);
21984
22025
  for (; o = e.nextNode();) Ct(o, l), kt(o), _t(o.content) && At(o.content);
21985
22026
  } catch (n) {
21986
- throw c && (ct(e), Fy(t.removed, (e) => {
22027
+ throw c && (ct(e), By(t.removed, (e) => {
21987
22028
  e.element && dt(e.element);
21988
22029
  })), n;
21989
22030
  }
21990
- if (c) return Fy(t.removed, (e) => {
22031
+ if (c) return By(t.removed, (e) => {
21991
22032
  e.element && dt(e.element);
21992
22033
  }), ge && gt(e), e;
21993
22034
  if (Ce) {
@@ -21996,7 +22037,7 @@ function zb() {
21996
22037
  return (H.shadowroot || H.shadowrootmode) && (s = F.call(r, s, !0)), s;
21997
22038
  }
21998
22039
  let u = ve ? i.outerHTML : i.innerHTML;
21999
- return ve && V["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && $y(Ob, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), ge && (u = ht(u)), S && Te ? O(u) : u;
22040
+ return ve && V["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && ib(Nb, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), ge && (u = ht(u)), S && Te ? O(u) : u;
22000
22041
  }, t.setConfig = function() {
22001
22042
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
22002
22043
  et(e), ye = !0, be = V, xe = H;
@@ -22007,77 +22048,77 @@ function zb() {
22007
22048
  let r = Xe(e), i = Xe(t);
22008
22049
  return wt(r, i, n);
22009
22050
  }, t.addHook = function(e, t) {
22010
- typeof t == "function" && Zy(I, e) && Ry(I[e], t);
22051
+ typeof t == "function" && nb(I, e) && Uy(I[e], t);
22011
22052
  }, t.removeHook = function(e, t) {
22012
- if (Zy(I, e)) {
22053
+ if (nb(I, e)) {
22013
22054
  if (t !== void 0) {
22014
- let n = Iy(I[e], t);
22015
- return n === -1 ? void 0 : zy(I[e], n, 1)[0];
22055
+ let n = Vy(I[e], t);
22056
+ return n === -1 ? void 0 : Wy(I[e], n, 1)[0];
22016
22057
  }
22017
- return Ly(I[e]);
22058
+ return Hy(I[e]);
22018
22059
  }
22019
22060
  }, t.removeHooks = function(e) {
22020
- Zy(I, e) && (I[e] = []);
22061
+ nb(I, e) && (I[e] = []);
22021
22062
  }, t.removeAllHooks = function() {
22022
- I = Lb();
22063
+ I = Hb();
22023
22064
  }, t;
22024
22065
  }
22025
- var Bb = zb();
22066
+ var Gb = Wb();
22026
22067
  //#endregion
22027
22068
  //#region src/core/composables/useMarkdown.ts
22028
- Nv.setOptions({
22069
+ Rv.setOptions({
22029
22070
  breaks: !0,
22030
22071
  gfm: !0
22031
22072
  });
22032
- var Vb = 2e4, Hb = new Nv.Renderer();
22033
- Hb.code = ({ text: e, lang: t }) => {
22073
+ var Kb = 2e4, qb = new Rv.Renderer();
22074
+ qb.code = ({ text: e, lang: t }) => {
22034
22075
  let n = (t || "").trim() || "plaintext", r = "";
22035
- if (e.length > 2e4) r = Wb(e);
22076
+ if (e.length > 2e4) r = Yb(e);
22036
22077
  else try {
22037
- r = _y.highlight(e, {
22078
+ r = Sy.highlight(e, {
22038
22079
  language: n,
22039
22080
  ignoreIllegals: !0
22040
22081
  }).value;
22041
22082
  } catch {
22042
- r = Wb(e);
22083
+ r = Yb(e);
22043
22084
  }
22044
- let i = encodeURIComponent(e), a = Ub(n);
22085
+ let i = encodeURIComponent(e), a = Jb(n);
22045
22086
  return `<pre class="code-block" data-lang="${a}" data-code="${i}"><code class="hljs language-${a}">${r}</code></pre>`;
22046
22087
  };
22047
- function Ub(e) {
22088
+ function Jb(e) {
22048
22089
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
22049
22090
  }
22050
- function Wb(e) {
22091
+ function Yb(e) {
22051
22092
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
22052
22093
  }
22053
- var Gb = { ADD_ATTR: [
22094
+ var Xb = { ADD_ATTR: [
22054
22095
  "data-code",
22055
22096
  "data-lang",
22056
22097
  "target",
22057
22098
  "rel"
22058
22099
  ] };
22059
- function Kb(e) {
22060
- return Bb.sanitize(e, Gb);
22100
+ function Zb(e) {
22101
+ return Gb.sanitize(e, Xb);
22061
22102
  }
22062
- function qb(e) {
22063
- return Nv.parse(e || "", { renderer: Hb });
22103
+ function Qb(e) {
22104
+ return Rv.parse(e || "", { renderer: qb });
22064
22105
  }
22065
- function Jb(e) {
22066
- return Kb(qb(e));
22106
+ function $b(e) {
22107
+ return Zb(Qb(e));
22067
22108
  }
22068
- var Yb = 100, Xb = 2e3;
22069
- function Zb(e) {
22070
- let t = /* @__PURE__ */ xn(Jb(e())), n = 0, r = null;
22109
+ var ex = 100, tx = 2e3;
22110
+ function nx(e) {
22111
+ let t = /* @__PURE__ */ xn($b(e())), n = 0, r = null;
22071
22112
  function i() {
22072
- r = null, n = Date.now(), t.value = Jb(e());
22113
+ r = null, n = Date.now(), t.value = $b(e());
22073
22114
  }
22074
22115
  return $r(e, () => {
22075
22116
  let a = e();
22076
- if (a.length <= Xb) {
22077
- r &&= (clearTimeout(r), null), n = Date.now(), t.value = Jb(a);
22117
+ if (a.length <= tx) {
22118
+ r &&= (clearTimeout(r), null), n = Date.now(), t.value = $b(a);
22078
22119
  return;
22079
22120
  }
22080
- let o = n + Yb - Date.now();
22121
+ let o = n + ex - Date.now();
22081
22122
  o <= 0 ? (r &&= (clearTimeout(r), null), i()) : r ||= setTimeout(i, o);
22082
22123
  }), qe(() => {
22083
22124
  r &&= (clearTimeout(r), null);
@@ -22095,10 +22136,10 @@ function Zb(e) {
22095
22136
  }
22096
22137
  //#endregion
22097
22138
  //#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
22098
- var Qb = { class: "code-preview-modal" }, $b = { class: "preview-header" }, ex = { class: "preview-title" }, tx = { class: "preview-tabs" }, nx = ["disabled"], rx = { class: "preview-actions" }, ix = ["title"], ax = { class: "preview-body" }, ox = ["srcdoc"], sx = {
22139
+ var rx = { class: "code-preview-modal" }, ix = { class: "preview-header" }, ax = { class: "preview-title" }, ox = { class: "preview-tabs" }, sx = ["disabled"], cx = { class: "preview-actions" }, lx = ["title"], ux = { class: "preview-body" }, dx = ["srcdoc"], fx = {
22099
22140
  key: 1,
22100
22141
  class: "preview-source"
22101
- }, cx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22142
+ }, px = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22102
22143
  __name: "CodePreview",
22103
22144
  props: {
22104
22145
  code: {},
@@ -22157,22 +22198,22 @@ app.mount('#app');
22157
22198
  return (t, n) => (Y(), X("div", {
22158
22199
  class: "code-preview-overlay",
22159
22200
  onClick: n[3] ||= gl((e) => r("close"), ["self"])
22160
- }, [Z("div", Qb, [Z("div", $b, [
22161
- Z("span", ex, "代码预览 · " + W(e.lang), 1),
22162
- Z("div", tx, [Z("button", {
22201
+ }, [Z("div", rx, [Z("div", ix, [
22202
+ Z("span", ax, "代码预览 · " + W(e.lang), 1),
22203
+ Z("div", ox, [Z("button", {
22163
22204
  class: U({ active: a.value === "preview" }),
22164
22205
  disabled: !s.value,
22165
22206
  onClick: n[0] ||= (e) => a.value = "preview"
22166
- }, "预览", 10, nx), Z("button", {
22207
+ }, "预览", 10, sx), Z("button", {
22167
22208
  class: U({ active: a.value === "source" }),
22168
22209
  onClick: n[1] ||= (e) => a.value = "source"
22169
22210
  }, "源码", 2)]),
22170
- Z("div", rx, [
22211
+ Z("div", cx, [
22171
22212
  Z("button", {
22172
22213
  class: "icon-btn",
22173
22214
  title: o.value ? "已复制" : "复制代码",
22174
22215
  onClick: u
22175
- }, W(o.value ? "✓" : "📋"), 9, ix),
22216
+ }, W(o.value ? "✓" : "📋"), 9, lx),
22176
22217
  Z("button", {
22177
22218
  class: "icon-btn",
22178
22219
  title: "新窗口打开",
@@ -22184,20 +22225,20 @@ app.mount('#app');
22184
22225
  onClick: n[2] ||= (e) => r("close")
22185
22226
  }, "✕")
22186
22227
  ])
22187
- ]), Z("div", ax, [a.value === "preview" && s.value ? (Y(), X("iframe", {
22228
+ ]), Z("div", ux, [a.value === "preview" && s.value ? (Y(), X("iframe", {
22188
22229
  key: 0,
22189
22230
  ref_key: "iframeRef",
22190
22231
  ref: i,
22191
22232
  class: "preview-iframe",
22192
22233
  sandbox: "allow-scripts allow-modals allow-popups allow-forms",
22193
22234
  srcdoc: c.value
22194
- }, null, 8, ox)) : (Y(), X("pre", sx, [Z("code", null, W(e.code), 1)]))])])]));
22235
+ }, null, 8, dx)) : (Y(), X("pre", fx, [Z("code", null, W(e.code), 1)]))])])]));
22195
22236
  }
22196
- }), [["__scopeId", "data-v-985c5382"]]), lx = ["innerHTML"], ux = /* @__PURE__ */ Mi({
22237
+ }), [["__scopeId", "data-v-985c5382"]]), mx = ["innerHTML"], hx = /* @__PURE__ */ Mi({
22197
22238
  __name: "MessageContent",
22198
22239
  props: { content: {} },
22199
22240
  setup(e) {
22200
- let t = e, { html: n, codeBlocks: r } = Zb(() => t.content), i = /* @__PURE__ */ bn(null), a = /* @__PURE__ */ bn(null), o = [
22241
+ let t = e, { html: n, codeBlocks: r } = nx(() => t.content), i = /* @__PURE__ */ bn(null), a = /* @__PURE__ */ bn(null), o = [
22201
22242
  "html",
22202
22243
  "htm",
22203
22244
  "vue",
@@ -22260,17 +22301,17 @@ app.mount('#app');
22260
22301
  ref_key: "containerRef",
22261
22302
  ref: i,
22262
22303
  innerHTML: K(n)
22263
- }, null, 8, lx), (Y(), ns(mi, { to: "body" }, [a.value ? (Y(), ns(cx, {
22304
+ }, null, 8, mx), (Y(), ns(mi, { to: "body" }, [a.value ? (Y(), ns(px, {
22264
22305
  key: 0,
22265
22306
  code: a.value.code,
22266
22307
  lang: a.value.lang,
22267
22308
  onClose: t[0] ||= (e) => a.value = null
22268
22309
  }, null, 8, ["code", "lang"])) : Q("", !0)]))], 64));
22269
22310
  }
22270
- }), dx = {
22311
+ }), gx = {
22271
22312
  key: 0,
22272
22313
  class: "stream-cursor"
22273
- }, fx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22314
+ }, _x = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22274
22315
  __name: "MessageBubble",
22275
22316
  props: {
22276
22317
  content: {},
@@ -22280,39 +22321,39 @@ app.mount('#app');
22280
22321
  showCursor: { type: Boolean }
22281
22322
  },
22282
22323
  setup(e) {
22283
- return (t, n) => (Y(), X(J, null, [Z("div", { class: U(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: U(["typing-dot", { pulse: e.showTyping }]) }, null, 2), n[0] ||= Z("span", { class: "typing-text" }, "思考中...", -1)], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), ns(ux, {
22324
+ return (t, n) => (Y(), X(J, null, [Z("div", { class: U(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: U(["typing-dot", { pulse: e.showTyping }]) }, null, 2), n[0] ||= Z("span", { class: "typing-text" }, "思考中...", -1)], 64)) : (Y(), X(J, { key: 1 }, [e.role === "assistant" ? (Y(), ns(hx, {
22284
22325
  key: 0,
22285
22326
  content: e.content
22286
- }, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [ms(W(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", dx)) : Q("", !0)], 64));
22327
+ }, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [ms(W(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", gx)) : Q("", !0)], 64));
22287
22328
  }
22288
- }), [["__scopeId", "data-v-c38029d9"]]), px = { class: "message-time" }, mx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22329
+ }), [["__scopeId", "data-v-c38029d9"]]), vx = { class: "message-time" }, yx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22289
22330
  __name: "MessageTime",
22290
22331
  props: { time: {} },
22291
22332
  setup(e) {
22292
- return (t, n) => (Y(), X("div", px, W(e.time), 1));
22333
+ return (t, n) => (Y(), X("div", vx, W(e.time), 1));
22293
22334
  }
22294
- }), [["__scopeId", "data-v-4a976e4a"]]), hx = { class: "msg-actions" }, gx = ["title"], _x = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22335
+ }), [["__scopeId", "data-v-4a976e4a"]]), bx = { class: "msg-actions" }, xx = ["title"], Sx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22295
22336
  __name: "MessageActions",
22296
22337
  props: { copied: { type: Boolean } },
22297
22338
  emits: ["copy", "regenerate"],
22298
22339
  setup(e) {
22299
- return (t, n) => (Y(), X("div", hx, [Z("button", {
22340
+ return (t, n) => (Y(), X("div", bx, [Z("button", {
22300
22341
  class: "msg-action-btn",
22301
22342
  title: e.copied ? "已复制" : "复制",
22302
22343
  onClick: n[0] ||= (e) => t.$emit("copy")
22303
- }, W(e.copied ? "✓ 已复制" : "📋 复制"), 9, gx), Z("button", {
22344
+ }, W(e.copied ? "✓ 已复制" : "📋 复制"), 9, xx), Z("button", {
22304
22345
  class: "msg-action-btn",
22305
22346
  title: "重新生成",
22306
22347
  onClick: n[1] ||= (e) => t.$emit("regenerate")
22307
22348
  }, "🔄 重新生成")]));
22308
22349
  }
22309
- }), [["__scopeId", "data-v-33638c4b"]]), vx = ["data-msg-idx"], yx = {
22350
+ }), [["__scopeId", "data-v-33638c4b"]]), Cx = ["data-msg-idx"], wx = {
22310
22351
  key: 0,
22311
22352
  class: "message-avatar"
22312
- }, bx = { class: "message-content" }, xx = {
22353
+ }, Tx = { class: "message-content" }, Ex = {
22313
22354
  key: 2,
22314
22355
  class: "msg-focuses"
22315
- }, Sx = ["title", "onClick"], Cx = ["onClick"], wx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22356
+ }, Dx = ["title", "onClick"], Ox = ["onClick"], kx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22316
22357
  __name: "MessageRow",
22317
22358
  props: {
22318
22359
  message: {},
@@ -22336,18 +22377,18 @@ app.mount('#app');
22336
22377
  return (t, c) => (Y(), X("div", {
22337
22378
  class: U(["message-row", e.message.role]),
22338
22379
  "data-msg-idx": e.index
22339
- }, [e.showAvatar ? (Y(), X("div", yx, W(e.message.role === "user" ? "👤" : "🤖"), 1)) : Q("", !0), Z("div", bx, [
22380
+ }, [e.showAvatar ? (Y(), X("div", wx, W(e.message.role === "user" ? "👤" : "🤖"), 1)) : Q("", !0), Z("div", Tx, [
22340
22381
  r.value ? (Y(), ns(Wg, {
22341
22382
  key: 0,
22342
22383
  text: i.value,
22343
22384
  expanded: e.reasoningExpanded,
22344
22385
  onToggle: c[0] ||= (e) => t.$emit("toggle-reasoning")
22345
22386
  }, null, 8, ["text", "expanded"])) : Q("", !0),
22346
- r.value ? (Y(), ns($g, {
22387
+ r.value ? (Y(), ns(i_, {
22347
22388
  key: 1,
22348
22389
  steps: a.value
22349
22390
  }, null, 8, ["steps"])) : Q("", !0),
22350
- e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", xx, [(Y(!0), X(J, null, ia(e.message.focuses, (e) => (Y(), X("span", {
22391
+ e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", Ex, [(Y(!0), X(J, null, ia(e.message.focuses, (e) => (Y(), X("span", {
22351
22392
  key: e.path,
22352
22393
  class: "msg-focus-chip",
22353
22394
  title: `回看 ${e.path}`,
@@ -22356,8 +22397,8 @@ app.mount('#app');
22356
22397
  type: "button",
22357
22398
  class: "msg-focus-chip-x",
22358
22399
  onClick: gl((t) => K(n).removeFocus(e.path), ["stop"])
22359
- }, "✕", 8, Cx)], 8, Sx))), 128))])) : Q("", !0),
22360
- ls(fx, {
22400
+ }, "✕", 8, Ox)], 8, Dx))), 128))])) : Q("", !0),
22401
+ ls(_x, {
22361
22402
  content: e.message.content,
22362
22403
  role: e.message.role,
22363
22404
  "is-pending-assistant": e.isPendingAssistant,
@@ -22370,44 +22411,38 @@ app.mount('#app');
22370
22411
  "show-typing",
22371
22412
  "show-cursor"
22372
22413
  ]),
22373
- ls(mx, { time: e.time }, null, 8, ["time"]),
22374
- o.value ? (Y(), ns(_x, {
22414
+ ls(yx, { time: e.time }, null, 8, ["time"]),
22415
+ o.value ? (Y(), ns(Sx, {
22375
22416
  key: 3,
22376
22417
  copied: e.copied,
22377
22418
  onCopy: c[1] ||= (e) => t.$emit("copy"),
22378
22419
  onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
22379
22420
  }, null, 8, ["copied"])) : Q("", !0)
22380
- ])], 10, vx));
22421
+ ])], 10, Cx));
22381
22422
  }
22382
- }), [["__scopeId", "data-v-77afcc15"]]), Tx = {
22423
+ }), [["__scopeId", "data-v-77afcc15"]]), Ax = { class: "chat-body" }, jx = {
22383
22424
  key: 0,
22384
22425
  class: "empty-state"
22385
- }, Ex = {
22426
+ }, Mx = {
22386
22427
  key: 1,
22387
22428
  class: "message-row assistant"
22388
- }, Dx = {
22429
+ }, Nx = {
22389
22430
  key: 0,
22390
22431
  class: "message-avatar"
22391
- }, Ox = { class: "message-content" }, kx = {
22432
+ }, Px = { class: "message-content" }, Fx = {
22392
22433
  key: 2,
22393
22434
  class: "error-bar"
22394
- }, Ax = { class: "error-text" }, jx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22435
+ }, Ix = { class: "error-text" }, Lx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22395
22436
  __name: "MessageList",
22396
22437
  props: {
22397
22438
  showAvatar: { type: Boolean },
22398
22439
  showTyping: { type: Boolean }
22399
22440
  },
22400
22441
  setup(e) {
22401
- let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l } = xg(), { state: u, scrollContainer: d, onScroll: f, onWheel: p, retry: m, regenerate: h } = t, g = Ys(() => u.messages.length > 0), _ = Ys(() => u.messages.some((e) => e.role === "user")), v = Ys(() => u.messages[u.messages.length - 1]?.role === "assistant");
22402
- return (t, y) => (Y(), X("div", {
22403
- class: "chat-body",
22404
- ref_key: "scrollContainer",
22405
- ref: d,
22406
- onScroll: y[2] ||= (...e) => K(f) && K(f)(...e),
22407
- onWheel: y[3] ||= (...e) => K(p) && K(p)(...e)
22408
- }, [
22409
- g.value ? Q("", !0) : (Y(), X("div", Tx, [...y[4] ||= [Z("div", { class: "empty-icon" }, "💬", -1), Z("p", null, "有什么可以帮你的?", -1)]])),
22410
- (Y(!0), X(J, null, ia(K(u).messages, (t, c) => (Y(), ns(wx, {
22442
+ let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l } = xg(), { state: u, retry: d, regenerate: f } = t, p = Ys(() => u.messages.length > 0), m = Ys(() => u.messages.some((e) => e.role === "user")), h = Ys(() => u.messages[u.messages.length - 1]?.role === "assistant");
22443
+ return (t, g) => (Y(), X("div", Ax, [
22444
+ p.value ? Q("", !0) : (Y(), X("div", jx, [...g[2] ||= [Z("div", { class: "empty-icon" }, "💬", -1), Z("p", null, "有什么可以帮你的?", -1)]])),
22445
+ (Y(!0), X(J, null, ia(K(u).messages, (t, c) => (Y(), ns(kx, {
22411
22446
  key: c,
22412
22447
  message: t,
22413
22448
  index: c,
@@ -22421,7 +22456,7 @@ app.mount('#app');
22421
22456
  time: K(n)(t.timestamp),
22422
22457
  onToggleReasoning: (e) => K(s)(c),
22423
22458
  onCopy: (e) => K(i)(t.content),
22424
- onRegenerate: K(h)
22459
+ onRegenerate: K(f)
22425
22460
  }, null, 8, [
22426
22461
  "message",
22427
22462
  "index",
@@ -22437,77 +22472,77 @@ app.mount('#app');
22437
22472
  "onCopy",
22438
22473
  "onRegenerate"
22439
22474
  ]))), 128)),
22440
- K(u).loading && !v.value ? (Y(), X("div", Ex, [e.showAvatar ? (Y(), X("div", Dx, "🤖")) : Q("", !0), Z("div", Ox, [ls(fx, {
22475
+ K(u).loading && !h.value ? (Y(), X("div", Mx, [e.showAvatar ? (Y(), X("div", Nx, "🤖")) : Q("", !0), Z("div", Px, [ls(_x, {
22441
22476
  content: "",
22442
22477
  role: "assistant",
22443
22478
  "is-pending-assistant": !0,
22444
22479
  "show-typing": e.showTyping,
22445
22480
  "show-cursor": !1
22446
22481
  }, null, 8, ["show-typing"])])])) : Q("", !0),
22447
- K(u).error ? (Y(), X("div", kx, [
22448
- Z("span", Ax, W(K(u).error), 1),
22449
- _.value ? (Y(), X("button", {
22482
+ K(u).error ? (Y(), X("div", Fx, [
22483
+ Z("span", Ix, W(K(u).error), 1),
22484
+ m.value ? (Y(), X("button", {
22450
22485
  key: 0,
22451
22486
  class: "retry-btn",
22452
- onClick: y[0] ||= (...e) => K(m) && K(m)(...e)
22487
+ onClick: g[0] ||= (...e) => K(d) && K(d)(...e)
22453
22488
  }, "重试")) : Q("", !0),
22454
22489
  K(c) ? (Y(), X("button", {
22455
22490
  key: 1,
22456
22491
  class: "undo-btn",
22457
22492
  title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
22458
- onClick: y[1] ||= (...e) => K(l) && K(l)(...e)
22493
+ onClick: g[1] ||= (...e) => K(l) && K(l)(...e)
22459
22494
  }, "↩ 回退")) : Q("", !0)
22460
22495
  ])) : Q("", !0)
22461
- ], 544));
22496
+ ]));
22462
22497
  }
22463
- }), [["__scopeId", "data-v-fe599f6d"]]), Mx = {
22498
+ }), [["__scopeId", "data-v-1c5192aa"]]), Rx = {
22464
22499
  key: 0,
22465
22500
  class: "queued-bar"
22466
- }, Nx = { class: "queued-head" }, Px = { class: "queued-count" }, Fx = { class: "queued-idx" }, Ix = { class: "queued-text" }, Lx = ["onClick"], Rx = ["onClick"], zx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22501
+ }, zx = { class: "queued-head" }, Bx = { class: "queued-count" }, Vx = { class: "queued-idx" }, Hx = { class: "queued-text" }, Ux = ["onClick"], Wx = ["onClick"], Gx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22467
22502
  __name: "QueuedBar",
22468
22503
  setup(e) {
22469
22504
  let { chat: t, editQueued: n } = xg(), { queuedTasks: r, removeQueuedTask: i } = t;
22470
- return (e, t) => K(r).length ? (Y(), X("div", Mx, [Z("div", Nx, [
22505
+ return (e, t) => K(r).length ? (Y(), X("div", Rx, [Z("div", zx, [
22471
22506
  t[0] ||= Z("span", { class: "queued-icon" }, "📋", -1),
22472
22507
  t[1] ||= Z("span", { class: "queued-title" }, "排队中 · 生成完后自动执行", -1),
22473
- Z("span", Px, W(K(r).length), 1)
22508
+ Z("span", Bx, W(K(r).length), 1)
22474
22509
  ]), (Y(!0), X(J, null, ia(K(r), (e, t) => (Y(), X("div", {
22475
22510
  key: t,
22476
22511
  class: "queued-item"
22477
22512
  }, [
22478
- Z("span", Fx, W(t + 1), 1),
22479
- Z("span", Ix, W(e), 1),
22513
+ Z("span", Vx, W(t + 1), 1),
22514
+ Z("span", Hx, W(e), 1),
22480
22515
  Z("button", {
22481
22516
  class: "queued-act",
22482
22517
  title: "修改(填回输入框编辑)",
22483
22518
  onClick: (e) => K(n)(t)
22484
- }, "✏️", 8, Lx),
22519
+ }, "✏️", 8, Ux),
22485
22520
  Z("button", {
22486
22521
  class: "queued-act queued-del",
22487
22522
  title: "撤销该任务",
22488
22523
  onClick: (e) => K(i)(t)
22489
- }, "✕", 8, Rx)
22524
+ }, "✕", 8, Wx)
22490
22525
  ]))), 128))])) : Q("", !0);
22491
22526
  }
22492
- }), [["__scopeId", "data-v-f32730a9"]]), Bx = {
22527
+ }), [["__scopeId", "data-v-f32730a9"]]), Kx = {
22493
22528
  key: 0,
22494
22529
  class: "approval-bar"
22495
- }, Vx = {
22530
+ }, qx = {
22496
22531
  key: 0,
22497
22532
  class: "approval-question"
22498
- }, Hx = {
22533
+ }, Jx = {
22499
22534
  key: 1,
22500
22535
  class: "approval-context"
22501
- }, Ux = {
22536
+ }, Yx = {
22502
22537
  key: 2,
22503
22538
  class: "approval-recommend"
22504
- }, Wx = {
22539
+ }, Xx = {
22505
22540
  key: 3,
22506
22541
  class: "approval-options"
22507
- }, Gx = ["onClick"], Kx = { class: "approval-actions" }, qx = { class: "approval-head" }, Jx = { class: "approval-title" }, Yx = {
22542
+ }, Zx = ["onClick"], Qx = { class: "approval-actions" }, $x = { class: "approval-head" }, eS = { class: "approval-title" }, tS = {
22508
22543
  key: 0,
22509
22544
  class: "approval-args"
22510
- }, Xx = { class: "approval-actions" }, Zx = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22545
+ }, nS = { class: "approval-actions" }, rS = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22511
22546
  __name: "ApprovalBar",
22512
22547
  setup(e) {
22513
22548
  let { pendingApproval: t, resolveApproval: n } = xg().chat, r = /* @__PURE__ */ bn(!1);
@@ -22527,17 +22562,17 @@ app.mount('#app');
22527
22562
  return String(e);
22528
22563
  }
22529
22564
  });
22530
- return (e, s) => K(t) ? (Y(), X("div", Bx, [i.value ? (Y(), X(J, { key: 0 }, [
22565
+ return (e, s) => K(t) ? (Y(), X("div", Kx, [i.value ? (Y(), X(J, { key: 0 }, [
22531
22566
  s[5] ||= Z("div", { class: "approval-head" }, [Z("span", { class: "approval-icon" }, "❓"), Z("span", { class: "approval-title" }, "AI 需要你确认")], -1),
22532
- K(t).args?.question ? (Y(), X("div", Vx, W(K(t).args.question), 1)) : Q("", !0),
22533
- K(t).args?.context ? (Y(), X("div", Hx, W(K(t).args.context), 1)) : Q("", !0),
22534
- K(t).args?.recommendation ? (Y(), X("div", Ux, "💡 推荐:" + W(K(t).args.recommendation), 1)) : Q("", !0),
22535
- a.value.length ? (Y(), X("div", Wx, [(Y(!0), X(J, null, ia(a.value, (e) => (Y(), X("button", {
22567
+ K(t).args?.question ? (Y(), X("div", qx, W(K(t).args.question), 1)) : Q("", !0),
22568
+ K(t).args?.context ? (Y(), X("div", Jx, W(K(t).args.context), 1)) : Q("", !0),
22569
+ K(t).args?.recommendation ? (Y(), X("div", Yx, "💡 推荐:" + W(K(t).args.recommendation), 1)) : Q("", !0),
22570
+ a.value.length ? (Y(), X("div", Xx, [(Y(!0), X(J, null, ia(a.value, (e) => (Y(), X("button", {
22536
22571
  key: e,
22537
22572
  class: "approval-opt",
22538
22573
  onClick: (t) => K(n)(e)
22539
- }, W(e), 9, Gx))), 128))])) : Q("", !0),
22540
- Z("div", Kx, [Z("button", {
22574
+ }, W(e), 9, Zx))), 128))])) : Q("", !0),
22575
+ Z("div", Qx, [Z("button", {
22541
22576
  class: "approval-deny",
22542
22577
  onClick: s[0] ||= (e) => K(n)(!1)
22543
22578
  }, "拒绝"), a.value.length ? Q("", !0) : (Y(), X("button", {
@@ -22546,17 +22581,17 @@ app.mount('#app');
22546
22581
  onClick: s[1] ||= (e) => K(n)(!0)
22547
22582
  }, "允许"))])
22548
22583
  ], 64)) : (Y(), X(J, { key: 1 }, [
22549
- Z("div", qx, [
22584
+ Z("div", $x, [
22550
22585
  s[7] ||= Z("span", { class: "approval-icon" }, "✋", -1),
22551
- Z("span", Jx, [s[6] ||= ms("需确认工具调用:", -1), Z("code", null, W(K(t).toolName), 1)]),
22586
+ Z("span", eS, [s[6] ||= ms("需确认工具调用:", -1), Z("code", null, W(K(t).toolName), 1)]),
22552
22587
  o.value ? (Y(), X("button", {
22553
22588
  key: 0,
22554
22589
  class: "approval-toggle",
22555
22590
  onClick: s[2] ||= (e) => r.value = !r.value
22556
22591
  }, W(r.value ? "收起参数" : "查看参数") + W(r.value ? " ▴" : " ▾"), 1)) : Q("", !0)
22557
22592
  ]),
22558
- o.value && r.value ? (Y(), X("pre", Yx, W(o.value), 1)) : Q("", !0),
22559
- Z("div", Xx, [Z("button", {
22593
+ o.value && r.value ? (Y(), X("pre", tS, W(o.value), 1)) : Q("", !0),
22594
+ Z("div", nS, [Z("button", {
22560
22595
  class: "approval-deny",
22561
22596
  onClick: s[3] ||= (e) => K(n)(!1)
22562
22597
  }, "拒绝"), Z("button", {
@@ -22565,13 +22600,13 @@ app.mount('#app');
22565
22600
  }, "允许")])
22566
22601
  ], 64))])) : Q("", !0);
22567
22602
  }
22568
- }), [["__scopeId", "data-v-296a936f"]]), Qx = {
22603
+ }), [["__scopeId", "data-v-296a936f"]]), iS = {
22569
22604
  key: 0,
22570
22605
  class: "conflict-bar"
22571
- }, $x = { class: "conflict-head" }, eS = { class: "conflict-title" }, tS = { class: "conflict-detail" }, nS = {
22606
+ }, aS = { class: "conflict-head" }, oS = { class: "conflict-title" }, sS = { class: "conflict-detail" }, cS = {
22572
22607
  key: 0,
22573
22608
  class: "conflict-diff"
22574
- }, rS = { class: "conflict-diff-col" }, iS = { class: "conflict-diff-pre" }, aS = { class: "conflict-diff-col" }, oS = { class: "conflict-diff-pre" }, sS = { class: "conflict-actions" }, cS = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22609
+ }, lS = { class: "conflict-diff-col" }, uS = { class: "conflict-diff-pre" }, dS = { class: "conflict-diff-col" }, fS = { class: "conflict-diff-pre" }, pS = { class: "conflict-actions" }, mS = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22575
22610
  __name: "ConflictBar",
22576
22611
  props: {
22577
22612
  pendingConflict: {},
@@ -22601,19 +22636,19 @@ app.mount('#app');
22601
22636
  return String(e);
22602
22637
  }
22603
22638
  });
22604
- return (t, a) => e.pendingConflict ? (Y(), X("div", Qx, [
22605
- Z("div", $x, [a[6] ||= Z("span", { class: "conflict-icon" }, "⚠️", -1), Z("span", eS, [
22639
+ return (t, a) => e.pendingConflict ? (Y(), X("div", iS, [
22640
+ Z("div", aS, [a[6] ||= Z("span", { class: "conflict-icon" }, "⚠️", -1), Z("span", oS, [
22606
22641
  a[4] ||= ms("写入冲突:", -1),
22607
22642
  Z("code", null, W(e.pendingConflict.path), 1),
22608
22643
  a[5] ||= ms(" 已被外部修改", -1)
22609
22644
  ])]),
22610
- Z("div", tS, " AI 基于「读取时的旧值」准备" + W(e.pendingConflict.op === "delete" ? "删除" : "写入") + ",但该属性在你读取之后被外部代码/其他 agent/手动改过。 ", 1),
22645
+ Z("div", sS, " AI 基于「读取时的旧值」准备" + W(e.pendingConflict.op === "delete" ? "删除" : "写入") + ",但该属性在你读取之后被外部代码/其他 agent/手动改过。 ", 1),
22611
22646
  Z("button", {
22612
22647
  class: "conflict-toggle",
22613
22648
  onClick: a[0] ||= (e) => n.value = !n.value
22614
22649
  }, W(n.value ? "收起对比" : "查看值对比") + W(n.value ? " ▴" : " ▾"), 1),
22615
- n.value ? (Y(), X("div", nS, [Z("div", rS, [a[7] ||= Z("div", { class: "conflict-diff-label" }, "AI 想写的值", -1), Z("pre", iS, W(r.value || "(delete 操作无值)"), 1)]), Z("div", aS, [a[8] ||= Z("div", { class: "conflict-diff-label" }, "外部改后的当前值", -1), Z("pre", oS, W(i.value), 1)])])) : Q("", !0),
22616
- Z("div", sS, [
22650
+ n.value ? (Y(), X("div", cS, [Z("div", lS, [a[7] ||= Z("div", { class: "conflict-diff-label" }, "AI 想写的值", -1), Z("pre", uS, W(r.value || "(delete 操作无值)"), 1)]), Z("div", dS, [a[8] ||= Z("div", { class: "conflict-diff-label" }, "外部改后的当前值", -1), Z("pre", fS, W(i.value), 1)])])) : Q("", !0),
22651
+ Z("div", pS, [
22617
22652
  Z("button", {
22618
22653
  class: "conflict-keep",
22619
22654
  onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
@@ -22632,16 +22667,16 @@ app.mount('#app');
22632
22667
  ])
22633
22668
  ])) : Q("", !0);
22634
22669
  }
22635
- }), [["__scopeId", "data-v-195e5b23"]]), lS = { class: "chat-footer" }, uS = { class: "chat-input-wrap" }, dS = {
22670
+ }), [["__scopeId", "data-v-195e5b23"]]), hS = { class: "chat-footer" }, gS = { class: "chat-input-wrap" }, _S = {
22636
22671
  key: 0,
22637
22672
  class: "focus-chips"
22638
- }, fS = ["title", "onClick"], pS = { class: "focus-chip-path" }, mS = ["onClick"], hS = ["placeholder", "rows"], gS = { class: "input-actions" }, _S = ["disabled", "title"], vS = {
22673
+ }, vS = ["title", "onClick"], yS = { class: "focus-chip-path" }, bS = ["onClick"], xS = ["placeholder", "rows"], SS = { class: "input-actions" }, CS = ["disabled", "title"], wS = {
22639
22674
  key: 0,
22640
22675
  width: "16",
22641
22676
  height: "16",
22642
22677
  viewBox: "0 0 24 24",
22643
22678
  fill: "currentColor"
22644
- }, yS = {
22679
+ }, TS = {
22645
22680
  key: 1,
22646
22681
  width: "18",
22647
22682
  height: "18",
@@ -22649,7 +22684,7 @@ app.mount('#app');
22649
22684
  fill: "none",
22650
22685
  stroke: "currentColor",
22651
22686
  "stroke-width": "2"
22652
- }, bS = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22687
+ }, ES = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22653
22688
  __name: "ChatInput",
22654
22689
  props: {
22655
22690
  placeholder: {},
@@ -22657,235 +22692,235 @@ app.mount('#app');
22657
22692
  },
22658
22693
  setup(e) {
22659
22694
  let t = xg(), { inputText: n, send: r, keydown: i, canUndo: a, undo: o, focuses: s, removeFocus: c, focusChipClick: l } = t, { state: u, stop: d } = t.chat;
22660
- return (t, f) => (Y(), X("div", lS, [K(a) ? (Y(), X("button", {
22695
+ return (t, f) => (Y(), X("div", hS, [K(a) ? (Y(), X("button", {
22661
22696
  key: 0,
22662
22697
  class: "undo-foot-btn",
22663
22698
  title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
22664
22699
  onClick: f[0] ||= (...e) => K(o) && K(o)(...e)
22665
- }, "↩ 回退")) : Q("", !0), Z("div", uS, [
22666
- K(s).length ? (Y(), X("div", dS, [(Y(!0), X(J, null, ia(K(s), (e) => (Y(), X("span", {
22700
+ }, "↩ 回退")) : Q("", !0), Z("div", gS, [
22701
+ K(s).length ? (Y(), X("div", _S, [(Y(!0), X(J, null, ia(K(s), (e) => (Y(), X("span", {
22667
22702
  key: e.path,
22668
22703
  class: "focus-chip",
22669
22704
  title: `精修中:${e.path}(点击回看 · ✕ 移除)`,
22670
22705
  onClick: (t) => K(l)(e)
22671
22706
  }, [
22672
22707
  f[4] ||= Z("span", { class: "focus-chip-icon" }, "🎯", -1),
22673
- Z("code", pS, W(e.path), 1),
22708
+ Z("code", yS, W(e.path), 1),
22674
22709
  Z("button", {
22675
22710
  type: "button",
22676
22711
  class: "focus-chip-x",
22677
22712
  "data-test": "focus-clear",
22678
22713
  title: "移除此焦点",
22679
22714
  onClick: gl((t) => K(c)(e.path), ["stop"])
22680
- }, "✕", 8, mS)
22681
- ], 8, fS))), 128))])) : Q("", !0),
22715
+ }, "✕", 8, bS)
22716
+ ], 8, vS))), 128))])) : Q("", !0),
22682
22717
  qr(Z("textarea", {
22683
22718
  "onUpdate:modelValue": f[1] ||= (e) => /* @__PURE__ */ yn(n) ? n.value = e : null,
22684
22719
  class: U(["chat-input", { "has-focus-chip": K(s).length > 0 }]),
22685
22720
  placeholder: e.placeholder,
22686
22721
  rows: e.inputRows,
22687
22722
  onKeydown: f[2] ||= (...e) => K(i) && K(i)(...e)
22688
- }, null, 42, hS), [[pl, K(n)]]),
22689
- Z("div", gS, [f[7] ||= Z("span", { class: "send-hint" }, "Enter 发送 · Shift+Enter 换行", -1), Z("button", {
22723
+ }, null, 42, xS), [[pl, K(n)]]),
22724
+ Z("div", SS, [f[7] ||= Z("span", { class: "send-hint" }, "Enter 发送 · Shift+Enter 换行", -1), Z("button", {
22690
22725
  class: U(["send-btn", { "stop-btn": K(u).loading }]),
22691
22726
  disabled: !K(u).loading && !K(n).trim(),
22692
22727
  title: K(u).loading ? "停止生成" : "发送",
22693
22728
  onClick: f[3] ||= (e) => K(u).loading ? K(d)() : K(r)()
22694
- }, [K(u).loading ? (Y(), X("svg", vS, [...f[5] ||= [Z("rect", {
22729
+ }, [K(u).loading ? (Y(), X("svg", wS, [...f[5] ||= [Z("rect", {
22695
22730
  x: "6",
22696
22731
  y: "6",
22697
22732
  width: "12",
22698
22733
  height: "12",
22699
22734
  rx: "2"
22700
- }, null, -1)]])) : (Y(), X("svg", yS, [...f[6] ||= [Z("line", {
22735
+ }, null, -1)]])) : (Y(), X("svg", TS, [...f[6] ||= [Z("line", {
22701
22736
  x1: "22",
22702
22737
  y1: "2",
22703
22738
  x2: "11",
22704
22739
  y2: "13"
22705
- }, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, _S)])
22740
+ }, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, CS)])
22706
22741
  ])]));
22707
22742
  }
22708
- }), [["__scopeId", "data-v-a9087737"]]), xS = {
22743
+ }), [["__scopeId", "data-v-a9087737"]]), DS = {
22709
22744
  key: 0,
22710
22745
  class: "debug-drawer"
22711
- }, SS = { class: "drawer-header" }, CS = { class: "tab-group" }, wS = { class: "header-actions" }, TS = {
22746
+ }, OS = { class: "drawer-header" }, kS = { class: "tab-group" }, AS = { class: "header-actions" }, jS = {
22712
22747
  key: 0,
22713
22748
  class: "drawer-filters"
22714
- }, ES = ["onClick"], DS = { class: "chip-count" }, OS = { class: "chip-count" }, kS = { class: "drawer-body" }, AS = {
22749
+ }, MS = ["onClick"], NS = { class: "chip-count" }, PS = { class: "chip-count" }, FS = { class: "drawer-body" }, IS = {
22715
22750
  key: 0,
22716
22751
  class: "trace-panel"
22717
- }, jS = {
22752
+ }, LS = {
22718
22753
  key: 0,
22719
22754
  class: "trace-empty"
22720
- }, MS = { class: "trace-metrics" }, NS = { class: "metric-card" }, PS = { class: "metric-card" }, FS = { class: "metric-card" }, IS = { class: "metric-card" }, LS = {
22755
+ }, RS = { class: "trace-metrics" }, zS = { class: "metric-card" }, BS = { class: "metric-card" }, VS = { class: "metric-card" }, HS = { class: "metric-card" }, US = {
22721
22756
  key: 0,
22722
22757
  class: "metric-card"
22723
- }, RS = {
22758
+ }, WS = {
22724
22759
  key: 1,
22725
22760
  class: "metric-card"
22726
- }, zS = { class: "trace-spans" }, BS = { class: "span-ico" }, VS = { class: "span-name" }, HS = {
22761
+ }, GS = { class: "trace-spans" }, KS = { class: "span-ico" }, qS = { class: "span-name" }, JS = {
22727
22762
  key: 0,
22728
22763
  class: "span-dur"
22729
- }, US = {
22764
+ }, YS = {
22730
22765
  key: 1,
22731
22766
  class: "span-status"
22732
- }, WS = {
22767
+ }, XS = {
22733
22768
  key: 1,
22734
22769
  class: "context-panel"
22735
- }, GS = {
22770
+ }, ZS = {
22736
22771
  key: 0,
22737
22772
  class: "trace-empty"
22738
- }, KS = { class: "ctx-overview" }, qS = { class: "ctx-occupancy" }, JS = ["title"], YS = { class: "ctx-pct" }, XS = { class: "ctx-kv-row" }, ZS = { class: "ctx-kv" }, QS = {
22773
+ }, QS = { class: "ctx-overview" }, $S = { class: "ctx-occupancy" }, eC = ["title"], tC = { class: "ctx-pct" }, nC = { class: "ctx-kv-row" }, rC = { class: "ctx-kv" }, iC = {
22739
22774
  key: 0,
22740
22775
  class: "ctx-kv"
22741
- }, $S = {
22776
+ }, aC = {
22742
22777
  key: 1,
22743
22778
  class: "ctx-kv"
22744
- }, eC = ["title"], tC = { class: "ctx-cat-bar" }, nC = { class: "ctx-cat-tokens" }, rC = {
22779
+ }, oC = ["title"], sC = { class: "ctx-cat-bar" }, cC = { class: "ctx-cat-tokens" }, lC = {
22745
22780
  key: 0,
22746
22781
  class: "ctx-compression"
22747
- }, iC = { class: "ctx-kv-row" }, aC = { class: "ctx-kv" }, oC = { class: "ctx-kv" }, sC = { class: "ctx-kv" }, cC = {
22782
+ }, uC = { class: "ctx-kv-row" }, dC = { class: "ctx-kv" }, fC = { class: "ctx-kv" }, pC = { class: "ctx-kv" }, mC = {
22748
22783
  key: 0,
22749
22784
  class: "ctx-kv"
22750
- }, lC = {
22785
+ }, hC = {
22751
22786
  key: 2,
22752
22787
  class: "subagent-panel"
22753
- }, uC = {
22788
+ }, gC = {
22754
22789
  key: 0,
22755
22790
  class: "trace-empty"
22756
- }, dC = {
22791
+ }, _C = {
22757
22792
  key: 0,
22758
22793
  class: "sub-section"
22759
- }, fC = { class: "sub-section-title" }, pC = { class: "sub-head" }, mC = { class: "sub-label" }, hC = { class: "sub-steps-badge" }, gC = { class: "sub-task" }, _C = {
22794
+ }, vC = { class: "sub-section-title" }, yC = { class: "sub-head" }, bC = { class: "sub-label" }, xC = { class: "sub-steps-badge" }, SC = { class: "sub-task" }, CC = {
22760
22795
  key: 1,
22761
22796
  class: "sub-section"
22762
- }, vC = { class: "sub-section-title" }, yC = { class: "sub-head" }, bC = { class: "sub-label" }, xC = {
22797
+ }, wC = { class: "sub-section-title" }, TC = { class: "sub-head" }, EC = { class: "sub-label" }, DC = {
22763
22798
  key: 0,
22764
22799
  class: "sub-dur"
22765
- }, SC = ["onClick"], CC = { class: "sub-task" }, wC = {
22800
+ }, OC = ["onClick"], kC = { class: "sub-task" }, AC = {
22766
22801
  key: 0,
22767
22802
  class: "sub-result"
22768
- }, TC = {
22803
+ }, jC = {
22769
22804
  key: 1,
22770
22805
  class: "sub-steps-list"
22771
- }, EC = { class: "sub-step-kind" }, DC = { class: "sub-step-name" }, OC = { class: "sub-step-ts" }, kC = {
22806
+ }, MC = { class: "sub-step-kind" }, NC = { class: "sub-step-name" }, PC = { class: "sub-step-ts" }, FC = {
22772
22807
  key: 0,
22773
22808
  class: "empty"
22774
- }, AC = { class: "log-head" }, jC = {
22809
+ }, IC = { class: "log-head" }, LC = {
22775
22810
  key: 0,
22776
22811
  class: "log-source"
22777
- }, MC = { class: "log-time" }, NC = { class: "log-body" }, PC = { class: "kv-grid" }, FC = { class: "kv" }, IC = { class: "v" }, LC = { class: "kv" }, RC = { class: "v" }, zC = { class: "kv" }, BC = { class: "v" }, VC = { class: "kv" }, HC = { class: "v" }, UC = { class: "section-label" }, WC = { class: "chip-row" }, GC = { class: "msg-list" }, KC = { class: "msg-text" }, qC = { class: "badge-row" }, JC = { class: "badge" }, YC = {
22812
+ }, RC = { class: "log-time" }, zC = { class: "log-body" }, BC = { class: "kv-grid" }, VC = { class: "kv" }, HC = { class: "v" }, UC = { class: "kv" }, WC = { class: "v" }, GC = { class: "kv" }, KC = { class: "v" }, qC = { class: "kv" }, JC = { class: "v" }, YC = { class: "section-label" }, XC = { class: "chip-row" }, ZC = { class: "msg-list" }, QC = { class: "msg-text" }, $C = { class: "badge-row" }, ew = { class: "badge" }, tw = {
22778
22813
  key: 0,
22779
22814
  class: "badge muted"
22780
- }, XC = { class: "badge muted" }, ZC = {
22815
+ }, nw = { class: "badge muted" }, rw = {
22781
22816
  key: 1,
22782
22817
  class: "badge muted"
22783
- }, QC = ["onClick"], $C = {
22818
+ }, iw = ["onClick"], aw = {
22784
22819
  key: 0,
22785
22820
  class: "msg-list"
22786
- }, ew = { class: "msg-detail" }, tw = {
22821
+ }, ow = { class: "msg-detail" }, sw = {
22787
22822
  key: 0,
22788
22823
  class: "msg-text"
22789
- }, nw = { class: "tc-inline-name" }, rw = { class: "tc-inline-args" }, iw = {
22824
+ }, cw = { class: "tc-inline-name" }, lw = { class: "tc-inline-args" }, uw = {
22790
22825
  key: 1,
22791
22826
  class: "tc-id"
22792
- }, aw = {
22827
+ }, dw = {
22793
22828
  key: 1,
22794
22829
  class: "log-raw"
22795
- }, ow = { class: "badge-row" }, sw = { class: "badge" }, cw = {
22830
+ }, fw = { class: "badge-row" }, pw = { class: "badge" }, mw = {
22796
22831
  key: 0,
22797
22832
  class: "badge warn"
22798
- }, lw = {
22833
+ }, hw = {
22799
22834
  key: 0,
22800
22835
  class: "resp-content"
22801
- }, uw = {
22836
+ }, gw = {
22802
22837
  key: 1,
22803
22838
  class: "tc-list"
22804
- }, dw = { class: "tc-name" }, fw = { class: "tc-args" }, pw = {
22839
+ }, _w = { class: "tc-name" }, vw = { class: "tc-args" }, yw = {
22805
22840
  key: 2,
22806
22841
  class: "usage-row"
22807
- }, mw = { class: "usage" }, hw = { class: "usage" }, gw = { class: "usage" }, _w = {
22842
+ }, bw = { class: "usage" }, xw = { class: "usage" }, Sw = { class: "usage" }, Cw = {
22808
22843
  key: 3,
22809
22844
  class: "tc-card inline"
22810
- }, vw = { class: "tc-name" }, yw = { class: "tc-args" }, bw = {
22845
+ }, ww = { class: "tc-name" }, Tw = { class: "tc-args" }, Ew = {
22811
22846
  key: 4,
22812
22847
  class: "tc-card inline"
22813
- }, xw = { class: "tc-name" }, Sw = { class: "tc-args" }, Cw = {
22848
+ }, Dw = { class: "tc-name" }, Ow = { class: "tc-args" }, kw = {
22814
22849
  key: 5,
22815
22850
  class: "err-box"
22816
- }, ww = { class: "log-footer" }, Tw = ["onClick"], Ew = ["onClick"], Dw = {
22851
+ }, Aw = { class: "log-footer" }, jw = ["onClick"], Mw = ["onClick"], Nw = {
22817
22852
  key: 0,
22818
22853
  class: "log-raw"
22819
- }, Ow = {
22854
+ }, Pw = {
22820
22855
  key: 0,
22821
22856
  class: "empty"
22822
- }, kw = {
22857
+ }, Fw = {
22823
22858
  key: 1,
22824
22859
  class: "flow-section"
22825
- }, Aw = { class: "flow-ico" }, jw = { class: "flow-label" }, Mw = { class: "flow-detail" }, Nw = { class: "flow-time" }, Pw = { class: "flow-round-head" }, Fw = { class: "flow-round-body" }, Iw = { class: "flow-ico" }, Lw = { class: "flow-label" }, Rw = { class: "flow-detail" }, zw = { class: "flow-time" }, Bw = {
22860
+ }, Iw = { class: "flow-ico" }, Lw = { class: "flow-label" }, Rw = { class: "flow-detail" }, zw = { class: "flow-time" }, Bw = { class: "flow-round-head" }, Vw = { class: "flow-round-body" }, Hw = { class: "flow-ico" }, Uw = { class: "flow-label" }, Ww = { class: "flow-detail" }, Gw = { class: "flow-time" }, Kw = {
22826
22861
  key: 5,
22827
22862
  class: "info-body"
22828
- }, Vw = {
22863
+ }, qw = {
22829
22864
  key: 0,
22830
22865
  class: "empty"
22831
- }, Hw = { class: "info-section" }, Uw = { class: "kv-grid" }, Ww = { class: "kv" }, Gw = { class: "v" }, Kw = { class: "kv" }, qw = { class: "v" }, Jw = { class: "kv" }, Yw = { class: "v" }, Xw = { class: "kv" }, Zw = { class: "v" }, Qw = {
22866
+ }, Jw = { class: "info-section" }, Yw = { class: "kv-grid" }, Xw = { class: "kv" }, Zw = { class: "v" }, Qw = { class: "kv" }, $w = { class: "v" }, eT = { class: "kv" }, tT = { class: "v" }, nT = { class: "kv" }, rT = { class: "v" }, iT = {
22832
22867
  class: "kv",
22833
22868
  style: { "margin-top": "6px" }
22834
- }, $w = {
22869
+ }, aT = {
22835
22870
  class: "v",
22836
22871
  style: { "font-size": "11px" }
22837
- }, eT = { class: "info-section" }, tT = { class: "info-title" }, nT = { class: "info-name" }, rT = { class: "info-desc" }, iT = {
22872
+ }, oT = { class: "info-section" }, sT = { class: "info-title" }, cT = { class: "info-name" }, lT = { class: "info-desc" }, uT = {
22838
22873
  key: 0,
22839
22874
  class: "info-section"
22840
- }, aT = { class: "info-title" }, oT = ["onClick"], sT = { class: "info-desc" }, cT = {
22875
+ }, dT = { class: "info-title" }, fT = ["onClick"], pT = { class: "info-desc" }, mT = {
22841
22876
  key: 0,
22842
22877
  class: "skill-content"
22843
- }, lT = {
22878
+ }, hT = {
22844
22879
  key: 0,
22845
22880
  class: "skill-loading"
22846
- }, uT = {
22881
+ }, gT = {
22847
22882
  key: 1,
22848
22883
  class: "skill-error"
22849
- }, dT = {
22884
+ }, _T = {
22850
22885
  key: 2,
22851
22886
  class: "skill-pre"
22852
- }, fT = {
22887
+ }, vT = {
22853
22888
  key: 1,
22854
22889
  class: "info-section"
22855
- }, pT = { class: "info-item" }, mT = { class: "info-name" }, hT = { class: "info-desc" }, gT = { class: "info-section" }, _T = { class: "kv-grid" }, vT = { class: "kv" }, yT = { class: "v" }, bT = { class: "kv" }, xT = { class: "v" }, ST = { class: "kv" }, CT = { class: "v" }, wT = { class: "kv" }, TT = {
22890
+ }, yT = { class: "info-item" }, bT = { class: "info-name" }, xT = { class: "info-desc" }, ST = { class: "info-section" }, CT = { class: "kv-grid" }, wT = { class: "kv" }, TT = { class: "v" }, ET = { class: "kv" }, DT = { class: "v" }, OT = { class: "kv" }, kT = { class: "v" }, AT = { class: "kv" }, jT = {
22856
22891
  class: "v",
22857
22892
  style: { "font-size": "11px" }
22858
- }, ET = {
22893
+ }, MT = {
22859
22894
  key: 2,
22860
22895
  class: "info-section"
22861
- }, DT = { class: "info-title" }, OT = { class: "info-name" }, kT = { class: "src-tag mcp" }, AT = { class: "info-desc" }, jT = {
22896
+ }, NT = { class: "info-title" }, PT = { class: "info-name" }, FT = { class: "src-tag mcp" }, IT = { class: "info-desc" }, LT = {
22862
22897
  key: 3,
22863
22898
  class: "info-section"
22864
- }, MT = { class: "kv-grid" }, NT = { class: "kv" }, PT = { class: "v" }, FT = { class: "kv" }, IT = { class: "v" }, LT = { class: "kv" }, RT = { class: "v" }, zT = {
22899
+ }, RT = { class: "kv-grid" }, zT = { class: "kv" }, BT = { class: "v" }, VT = { class: "kv" }, HT = { class: "v" }, UT = { class: "kv" }, WT = { class: "v" }, GT = {
22865
22900
  key: 0,
22866
22901
  class: "kv"
22867
- }, BT = {
22902
+ }, KT = {
22868
22903
  class: "v",
22869
22904
  style: { "font-size": "11px" }
22870
- }, VT = {
22905
+ }, qT = {
22871
22906
  key: 4,
22872
22907
  class: "info-section"
22873
- }, HT = { class: "info-title" }, UT = {
22908
+ }, JT = { class: "info-title" }, YT = {
22874
22909
  key: 5,
22875
22910
  class: "info-section"
22876
- }, WT = { class: "info-pre" }, GT = {
22911
+ }, XT = { class: "info-pre" }, ZT = {
22877
22912
  key: 6,
22878
22913
  class: "info-section"
22879
- }, KT = { class: "info-kv" }, qT = { class: "kv" }, JT = { class: "v" }, YT = { class: "kv" }, XT = { class: "v" }, ZT = { class: "kv" }, QT = { class: "v" }, $T = { class: "kv" }, eE = { class: "v" }, tE = { class: "kv" }, nE = {
22914
+ }, QT = { class: "info-kv" }, $T = { class: "kv" }, eE = { class: "v" }, tE = { class: "kv" }, nE = { class: "v" }, rE = { class: "kv" }, iE = { class: "v" }, aE = { class: "kv" }, oE = { class: "v" }, sE = { class: "kv" }, cE = {
22880
22915
  class: "v",
22881
22916
  style: { "font-size": "11px" }
22882
- }, rE = {
22917
+ }, lE = {
22883
22918
  key: 0,
22884
22919
  class: "kv"
22885
- }, iE = {
22920
+ }, uE = {
22886
22921
  class: "v",
22887
22922
  style: { "font-size": "11px" }
22888
- }, aE = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22923
+ }, dE = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
22889
22924
  __name: "DebugDrawer",
22890
22925
  props: {
22891
22926
  logs: { default: () => [] },
@@ -23130,8 +23165,8 @@ app.mount('#app');
23130
23165
  }
23131
23166
  }
23132
23167
  return (t, n) => (Y(), ns(mi, { to: "body" }, [ls(pc, { name: "drawer" }, {
23133
- default: Gr(() => [e.visible ? (Y(), X("div", xS, [Z("div", { class: U(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
23134
- Z("div", SS, [Z("div", CS, [
23168
+ default: Gr(() => [e.visible ? (Y(), X("div", DS, [Z("div", { class: U(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
23169
+ Z("div", OS, [Z("div", kS, [
23135
23170
  Z("button", {
23136
23171
  class: U(["tab-btn", { active: y.value === "logs" }]),
23137
23172
  onClick: n[0] ||= (e) => w("logs")
@@ -23160,7 +23195,7 @@ app.mount('#app');
23160
23195
  class: U(["tab-btn", { active: y.value === "info" }]),
23161
23196
  onClick: n[5] ||= (e) => w("info")
23162
23197
  }, "🧬 Agent 信息", 2)) : Q("", !0)
23163
- ]), Z("div", wS, [y.value === "logs" ? (Y(), X("button", {
23198
+ ]), Z("div", AS, [y.value === "logs" ? (Y(), X("button", {
23164
23199
  key: 0,
23165
23200
  class: "hd-btn",
23166
23201
  title: "清空日志",
@@ -23170,38 +23205,38 @@ app.mount('#app');
23170
23205
  title: "关闭",
23171
23206
  onClick: _
23172
23207
  }, "✕")])]),
23173
- y.value === "logs" ? (Y(), X("div", TS, [(Y(), X(J, null, ia(s, (e, t) => Z("button", {
23208
+ y.value === "logs" ? (Y(), X("div", jS, [(Y(), X(J, null, ia(s, (e, t) => Z("button", {
23174
23209
  key: t,
23175
23210
  class: U(["filter-chip", { active: i.value === t }]),
23176
23211
  style: we({ "--chip-color": e.color }),
23177
23212
  onClick: (e) => i.value = t
23178
- }, [ms(W(e.icon) + " " + W(e.label) + " ", 1), Z("span", DS, W(u.value[t] || 0), 1)], 14, ES)), 64)), Z("button", {
23213
+ }, [ms(W(e.icon) + " " + W(e.label) + " ", 1), Z("span", NS, W(u.value[t] || 0), 1)], 14, MS)), 64)), Z("button", {
23179
23214
  class: U(["filter-chip all", { active: i.value === "all" }]),
23180
23215
  onClick: n[6] ||= (e) => i.value = "all"
23181
- }, [n[7] ||= ms(" 全部 ", -1), Z("span", OS, W(u.value.all || 0), 1)], 2)])) : Q("", !0),
23182
- Z("div", kS, [
23183
- y.value === "trace" ? (Y(), X("div", AS, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", MS, [
23184
- Z("div", NS, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, W(j.value.rounds), 1)]),
23185
- Z("div", PS, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, W(j.value.totalDurationMs) + "ms", 1)]),
23186
- Z("div", FS, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, W(j.value.avgRoundMs) + "ms", 1)]),
23187
- Z("div", IS, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, W(j.value.toolCalls) + "(✅" + W(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
23188
- j.value.compressions ? (Y(), X("div", LS, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, W(j.value.compressions), 1)])) : Q("", !0),
23189
- j.value.totalTokens ? (Y(), X("div", RS, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, W(j.value.totalTokens.total), 1)])) : Q("", !0)
23190
- ]), Z("div", zS, [(Y(!0), X(J, null, ia(A.value, (e) => (Y(), X("div", {
23216
+ }, [n[7] ||= ms(" 全部 ", -1), Z("span", PS, W(u.value.all || 0), 1)], 2)])) : Q("", !0),
23217
+ Z("div", FS, [
23218
+ y.value === "trace" ? (Y(), X("div", IS, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", RS, [
23219
+ Z("div", zS, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, W(j.value.rounds), 1)]),
23220
+ Z("div", BS, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, W(j.value.totalDurationMs) + "ms", 1)]),
23221
+ Z("div", VS, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, W(j.value.avgRoundMs) + "ms", 1)]),
23222
+ Z("div", HS, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, W(j.value.toolCalls) + "(✅" + W(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
23223
+ j.value.compressions ? (Y(), X("div", US, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, W(j.value.compressions), 1)])) : Q("", !0),
23224
+ j.value.totalTokens ? (Y(), X("div", WS, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, W(j.value.totalTokens.total), 1)])) : Q("", !0)
23225
+ ]), Z("div", GS, [(Y(!0), X(J, null, ia(A.value, (e) => (Y(), X("div", {
23191
23226
  key: e.id,
23192
23227
  class: U(["trace-span", [e.type, e.status]])
23193
23228
  }, [
23194
- Z("span", BS, W(te(e.type)), 1),
23195
- Z("span", VS, W(e.name), 1),
23196
- e.durationMs ? (Y(), X("span", HS, W(e.durationMs) + "ms", 1)) : Q("", !0),
23197
- e.status === "error" ? (Y(), X("span", US, "❌")) : Q("", !0)
23198
- ], 2))), 128))])], 64)) : (Y(), X("div", jS, [...n[8] ||= [
23229
+ Z("span", KS, W(te(e.type)), 1),
23230
+ Z("span", qS, W(e.name), 1),
23231
+ e.durationMs ? (Y(), X("span", JS, W(e.durationMs) + "ms", 1)) : Q("", !0),
23232
+ e.status === "error" ? (Y(), X("span", YS, "❌")) : Q("", !0)
23233
+ ], 2))), 128))])], 64)) : (Y(), X("div", LS, [...n[8] ||= [
23199
23234
  ms("未开启 tracing(", -1),
23200
23235
  Z("code", null, "capabilities.tracing:true", -1),
23201
23236
  ms(")或暂无 trace。跑一轮 agent 后刷新。", -1)
23202
23237
  ]]))])) : Q("", !0),
23203
- y.value === "context" ? (Y(), X("div", WS, [M.value ? (Y(), X(J, { key: 1 }, [
23204
- Z("div", KS, [Z("div", qS, [Z("div", {
23238
+ y.value === "context" ? (Y(), X("div", XS, [M.value ? (Y(), X(J, { key: 1 }, [
23239
+ Z("div", QS, [Z("div", $S, [Z("div", {
23205
23240
  class: "ctx-bar-track",
23206
23241
  title: `占用 ${Math.round(M.value.occupancy * 100)}%`
23207
23242
  }, [Z("div", {
@@ -23212,10 +23247,10 @@ app.mount('#app');
23212
23247
  class: "ctx-threshold-mark",
23213
23248
  style: we({ left: Math.min(M.value.thresholdRatio * 100, 100) + "%" }),
23214
23249
  title: "压缩阈值"
23215
- }, null, 4)) : Q("", !0)], 8, JS), Z("span", YS, W(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", XS, [
23216
- Z("span", ZS, "估算 " + W(M.value.totalTokens) + " token", 1),
23217
- M.value.contextWindow ? (Y(), X("span", QS, "窗口 " + W(M.value.contextWindow), 1)) : Q("", !0),
23218
- M.value.thresholdRatio > 0 ? (Y(), X("span", $S, "阈值 " + W(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
23250
+ }, null, 4)) : Q("", !0)], 8, eC), Z("span", tC, W(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", nC, [
23251
+ Z("span", rC, "估算 " + W(M.value.totalTokens) + " token", 1),
23252
+ M.value.contextWindow ? (Y(), X("span", iC, "窗口 " + W(M.value.contextWindow), 1)) : Q("", !0),
23253
+ M.value.thresholdRatio > 0 ? (Y(), X("span", aC, "阈值 " + W(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
23219
23254
  ])]),
23220
23255
  n[16] ||= Z("div", { class: "ctx-section-title" }, "分类构成(近似)", -1),
23221
23256
  (Y(!0), X(J, null, ia(M.value.categories, (e) => (Y(), X("div", {
@@ -23225,225 +23260,225 @@ app.mount('#app');
23225
23260
  Z("span", {
23226
23261
  class: "ctx-cat-label",
23227
23262
  title: e.label
23228
- }, W(e.label), 9, eC),
23229
- Z("div", tC, [Z("div", {
23263
+ }, W(e.label), 9, oC),
23264
+ Z("div", sC, [Z("div", {
23230
23265
  class: "ctx-cat-fill",
23231
23266
  style: we({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
23232
23267
  }, null, 4)]),
23233
- Z("span", nC, [ms(W(e.tokens) + " ", 1), Z("i", null, "(" + W(Math.round(e.pct * 100)) + "%)", 1)])
23268
+ Z("span", cC, [ms(W(e.tokens) + " ", 1), Z("i", null, "(" + W(Math.round(e.pct * 100)) + "%)", 1)])
23234
23269
  ]))), 128)),
23235
- M.value.compression ? (Y(), X("div", rC, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", iC, [
23236
- Z("span", aC, "摘要 " + W(M.value.compression.roundsSummarized) + "/" + W(M.value.compression.roundsTotal) + " 轮", 1),
23237
- Z("span", oC, "召回 " + W(M.value.compression.roundsRecalled), 1),
23238
- Z("span", sC, W(M.value.compression.strategy), 1),
23239
- M.value.compression.decision ? (Y(), X("span", cC, "🤖 agent 决策:" + W(ne(M.value.compression.decision)), 1)) : Q("", !0)
23270
+ M.value.compression ? (Y(), X("div", lC, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", uC, [
23271
+ Z("span", dC, "摘要 " + W(M.value.compression.roundsSummarized) + "/" + W(M.value.compression.roundsTotal) + " 轮", 1),
23272
+ Z("span", fC, "召回 " + W(M.value.compression.roundsRecalled), 1),
23273
+ Z("span", pC, W(M.value.compression.strategy), 1),
23274
+ M.value.compression.decision ? (Y(), X("span", mC, "🤖 agent 决策:" + W(ne(M.value.compression.decision)), 1)) : Q("", !0)
23240
23275
  ])])) : Q("", !0)
23241
- ], 64)) : (Y(), X("div", GS, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
23242
- y.value === "subagent" ? (Y(), X("div", lC, [!P.value.length && !ee.value.length ? (Y(), X("div", uC, [...n[17] ||= [
23276
+ ], 64)) : (Y(), X("div", ZS, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
23277
+ y.value === "subagent" ? (Y(), X("div", hC, [!P.value.length && !ee.value.length ? (Y(), X("div", gC, [...n[17] ||= [
23243
23278
  ms(" 尚未委派子 agent。主 agent 调用 ", -1),
23244
23279
  Z("code", null, "use_<id>", -1),
23245
23280
  ms(" 或 ", -1),
23246
23281
  Z("code", null, "spawn_agent", -1),
23247
23282
  ms(" 后,这里展示运行状态与委派历史。 ", -1)
23248
- ]])) : (Y(), X(J, { key: 1 }, [P.value.length ? (Y(), X("div", dC, [Z("div", fC, "▶ 运行中 (" + W(P.value.length) + ")", 1), (Y(!0), X(J, null, ia(P.value, (e, t) => (Y(), X("div", {
23283
+ ]])) : (Y(), X(J, { key: 1 }, [P.value.length ? (Y(), X("div", _C, [Z("div", vC, "▶ 运行中 (" + W(P.value.length) + ")", 1), (Y(!0), X(J, null, ia(P.value, (e, t) => (Y(), X("div", {
23249
23284
  key: "a" + t,
23250
23285
  class: U(["sub-card", e.status])
23251
- }, [Z("div", pC, [
23286
+ }, [Z("div", yC, [
23252
23287
  Z("span", {
23253
23288
  class: "sub-status",
23254
23289
  style: we({ background: F[e.status] && F[e.status].color || "#9ca3af" })
23255
23290
  }, W(F[e.status] && F[e.status].label || e.status), 5),
23256
- Z("span", mC, W(e.label), 1),
23257
- Z("span", hC, W(e.steps.length) + " 步", 1)
23258
- ]), Z("div", gC, W(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), ee.value.length ? (Y(), X("div", _C, [Z("div", vC, "🕐 历史 (" + W(ee.value.length) + ")", 1), (Y(!0), X(J, null, ia(ee.value, (e, t) => (Y(), X("div", {
23291
+ Z("span", bC, W(e.label), 1),
23292
+ Z("span", xC, W(e.steps.length) + " 步", 1)
23293
+ ]), Z("div", SC, W(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), ee.value.length ? (Y(), X("div", CC, [Z("div", wC, "🕐 历史 (" + W(ee.value.length) + ")", 1), (Y(!0), X(J, null, ia(ee.value, (e, t) => (Y(), X("div", {
23259
23294
  key: "h" + t,
23260
23295
  class: U(["sub-card", e.status])
23261
23296
  }, [
23262
- Z("div", yC, [
23297
+ Z("div", TC, [
23263
23298
  Z("span", {
23264
23299
  class: "sub-status",
23265
23300
  style: we({ background: F[e.status] && F[e.status].color || "#9ca3af" })
23266
23301
  }, W(F[e.status] && F[e.status].label || e.status), 5),
23267
- Z("span", bC, W(e.label), 1),
23268
- e.durationMs == null ? Q("", !0) : (Y(), X("span", xC, W(e.durationMs) + "ms", 1)),
23302
+ Z("span", EC, W(e.label), 1),
23303
+ e.durationMs == null ? Q("", !0) : (Y(), X("span", DC, W(e.durationMs) + "ms", 1)),
23269
23304
  e.steps.length ? (Y(), X("button", {
23270
23305
  key: 1,
23271
23306
  class: "sub-toggle",
23272
23307
  onClick: (e) => L(t)
23273
- }, W(I.value.has(t) ? "收起" : "步骤"), 9, SC)) : Q("", !0)
23308
+ }, W(I.value.has(t) ? "收起" : "步骤"), 9, OC)) : Q("", !0)
23274
23309
  ]),
23275
- Z("div", CC, W(k(e.task, 80)), 1),
23276
- e.resultPreview ? (Y(), X("div", wC, W(e.resultPreview), 1)) : Q("", !0),
23277
- I.value.has(t) && e.steps.length ? (Y(), X("div", TC, [(Y(!0), X(J, null, ia(e.steps, (e, t) => (Y(), X("div", {
23310
+ Z("div", kC, W(k(e.task, 80)), 1),
23311
+ e.resultPreview ? (Y(), X("div", AC, W(e.resultPreview), 1)) : Q("", !0),
23312
+ I.value.has(t) && e.steps.length ? (Y(), X("div", jC, [(Y(!0), X(J, null, ia(e.steps, (e, t) => (Y(), X("div", {
23278
23313
  key: t,
23279
23314
  class: "sub-step"
23280
23315
  }, [
23281
- Z("span", EC, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
23282
- Z("span", DC, W(e.name), 1),
23283
- Z("span", OC, W(d(e.ts)), 1)
23316
+ Z("span", MC, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
23317
+ Z("span", NC, W(e.name), 1),
23318
+ Z("span", PC, W(d(e.ts)), 1)
23284
23319
  ]))), 128))])) : Q("", !0)
23285
23320
  ], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
23286
- y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", kC, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, ia(l.value, (e, t) => (Y(), X("div", {
23321
+ y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", FC, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, ia(l.value, (e, t) => (Y(), X("div", {
23287
23322
  key: t,
23288
23323
  class: "log-item"
23289
23324
  }, [
23290
- Z("div", AC, [
23325
+ Z("div", IC, [
23291
23326
  Z("span", {
23292
23327
  class: "log-type",
23293
23328
  style: we({ background: s[e.type].color })
23294
23329
  }, W(s[e.type].icon) + " " + W(s[e.type].label), 5),
23295
- e.source ? (Y(), X("span", jC, "↳ " + W(e.source), 1)) : Q("", !0),
23296
- Z("span", MC, W(d(e.timestamp)), 1)
23330
+ e.source ? (Y(), X("span", LC, "↳ " + W(e.source), 1)) : Q("", !0),
23331
+ Z("span", RC, W(d(e.timestamp)), 1)
23297
23332
  ]),
23298
- Z("div", NC, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
23299
- Z("div", PC, [
23300
- Z("div", FC, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", IC, W(e.data.model), 1)]),
23301
- Z("div", LC, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", RC, W(e.data.temperature), 1)]),
23302
- Z("div", zC, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", BC, W(e.data.maxTokens), 1)]),
23303
- Z("div", VC, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", HC, W(e.data.totalMessages), 1)])
23333
+ Z("div", zC, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
23334
+ Z("div", BC, [
23335
+ Z("div", VC, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", HC, W(e.data.model), 1)]),
23336
+ Z("div", UC, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", WC, W(e.data.temperature), 1)]),
23337
+ Z("div", GC, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", KC, W(e.data.maxTokens), 1)]),
23338
+ Z("div", qC, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", JC, W(e.data.totalMessages), 1)])
23304
23339
  ]),
23305
- Z("div", UC, "工具 (" + W(e.data.tools?.length || 0) + ")", 1),
23306
- Z("div", WC, [(Y(!0), X(J, null, ia(e.data.tools, (e) => (Y(), X("span", {
23340
+ Z("div", YC, "工具 (" + W(e.data.tools?.length || 0) + ")", 1),
23341
+ Z("div", XC, [(Y(!0), X(J, null, ia(e.data.tools, (e) => (Y(), X("span", {
23307
23342
  key: e,
23308
23343
  class: "tool-chip"
23309
23344
  }, W(e), 1))), 128))]),
23310
23345
  n[22] ||= Z("div", { class: "section-label" }, "上下文消息", -1),
23311
- Z("div", GC, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
23346
+ Z("div", ZC, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
23312
23347
  key: t,
23313
23348
  class: "msg-row"
23314
23349
  }, [Z("span", {
23315
23350
  class: "msg-role",
23316
23351
  style: we({ background: g(e.type).color })
23317
- }, W(g(e.type).label), 5), Z("span", KC, W(e.content), 1)]))), 128))])
23318
- ], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", qC, [
23319
- Z("span", JC, "第 " + W(e.data.round) + " 轮", 1),
23320
- e.data.model ? (Y(), X("span", YC, W(e.data.model), 1)) : Q("", !0),
23321
- Z("span", XC, W((e.data.messages || []).length) + " 条消息", 1),
23322
- e.data.tools?.length ? (Y(), X("span", ZC, W(e.data.tools.length) + " 工具", 1)) : Q("", !0),
23352
+ }, W(g(e.type).label), 5), Z("span", QC, W(e.content), 1)]))), 128))])
23353
+ ], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", $C, [
23354
+ Z("span", ew, "第 " + W(e.data.round) + " 轮", 1),
23355
+ e.data.model ? (Y(), X("span", tw, W(e.data.model), 1)) : Q("", !0),
23356
+ Z("span", nw, W((e.data.messages || []).length) + " 条消息", 1),
23357
+ e.data.tools?.length ? (Y(), X("span", rw, W(e.data.tools.length) + " 工具", 1)) : Q("", !0),
23323
23358
  Z("button", {
23324
23359
  class: "view-toggle",
23325
23360
  onClick: (e) => p(t)
23326
- }, W(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, QC)
23327
- ]), o.value.has(t) ? (Y(), X("pre", aw, [Z("code", null, W(m(e.data.messages)), 1)])) : (Y(), X("div", $C, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
23361
+ }, W(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, iw)
23362
+ ]), o.value.has(t) ? (Y(), X("pre", dw, [Z("code", null, W(m(e.data.messages)), 1)])) : (Y(), X("div", aw, [(Y(!0), X(J, null, ia(e.data.messages, (e, t) => (Y(), X("div", {
23328
23363
  key: t,
23329
23364
  class: "msg-row"
23330
23365
  }, [Z("span", {
23331
23366
  class: "msg-role",
23332
23367
  style: we({ background: g(e.role).color })
23333
- }, W(g(e.role).label), 5), Z("div", ew, [
23334
- e.content ? (Y(), X("span", tw, W(e.content), 1)) : Q("", !0),
23368
+ }, W(g(e.role).label), 5), Z("div", ow, [
23369
+ e.content ? (Y(), X("span", sw, W(e.content), 1)) : Q("", !0),
23335
23370
  (Y(!0), X(J, null, ia(e.tool_calls || [], (e, t) => (Y(), X("div", {
23336
23371
  key: t,
23337
23372
  class: "tc-inline"
23338
- }, [Z("span", nw, "🔧 " + W(e.function?.name || e.name), 1), Z("code", rw, W(e.function?.arguments ?? e.args), 1)]))), 128)),
23339
- e.tool_call_id ? (Y(), X("span", iw, "↳ tool_call_id: " + W(e.tool_call_id), 1)) : Q("", !0)
23373
+ }, [Z("span", cw, "🔧 " + W(e.function?.name || e.name), 1), Z("code", lw, W(e.function?.arguments ?? e.args), 1)]))), 128)),
23374
+ e.tool_call_id ? (Y(), X("span", uw, "↳ tool_call_id: " + W(e.tool_call_id), 1)) : Q("", !0)
23340
23375
  ])]))), 128))]))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
23341
- Z("div", ow, [Z("span", sw, "第 " + W(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", cw, "🔧 " + W(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
23342
- e.data.content ? (Y(), X("div", lw, W(e.data.content), 1)) : Q("", !0),
23343
- e.data.toolCalls?.length ? (Y(), X("div", uw, [(Y(!0), X(J, null, ia(e.data.toolCalls, (e, t) => (Y(), X("div", {
23376
+ Z("div", fw, [Z("span", pw, "第 " + W(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", mw, "🔧 " + W(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
23377
+ e.data.content ? (Y(), X("div", hw, W(e.data.content), 1)) : Q("", !0),
23378
+ e.data.toolCalls?.length ? (Y(), X("div", gw, [(Y(!0), X(J, null, ia(e.data.toolCalls, (e, t) => (Y(), X("div", {
23344
23379
  key: t,
23345
23380
  class: "tc-card"
23346
- }, [Z("div", dw, "🔧 " + W(e.name), 1), Z("pre", fw, W(m(e.args)), 1)]))), 128))])) : Q("", !0),
23347
- e.data.usage ? (Y(), X("div", pw, [
23348
- Z("span", mw, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
23349
- Z("span", hw, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
23350
- Z("span", gw, "total: " + W(e.data.usage.total_tokens ?? "-"), 1)
23381
+ }, [Z("div", _w, "🔧 " + W(e.name), 1), Z("pre", vw, W(m(e.args)), 1)]))), 128))])) : Q("", !0),
23382
+ e.data.usage ? (Y(), X("div", yw, [
23383
+ Z("span", bw, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
23384
+ Z("span", xw, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
23385
+ Z("span", Sw, "total: " + W(e.data.usage.total_tokens ?? "-"), 1)
23351
23386
  ])) : Q("", !0)
23352
- ], 64)) : e.type === "tool_call" ? (Y(), X("div", _w, [Z("div", vw, "🔧 " + W(e.data.name), 1), Z("pre", yw, W(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", bw, [Z("div", xw, "✅ " + W(e.data.name) + " 结果", 1), Z("pre", Sw, W(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", Cw, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
23353
- Z("div", ww, [Z("button", {
23387
+ ], 64)) : e.type === "tool_call" ? (Y(), X("div", Cw, [Z("div", ww, "🔧 " + W(e.data.name), 1), Z("pre", Tw, W(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", Ew, [Z("div", Dw, "✅ " + W(e.data.name) + " 结果", 1), Z("pre", Ow, W(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", kw, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
23388
+ Z("div", Aw, [Z("button", {
23354
23389
  class: "raw-toggle",
23355
23390
  onClick: (e) => f(t)
23356
- }, W(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, Tw), Z("button", {
23391
+ }, W(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, jw), Z("button", {
23357
23392
  class: "raw-toggle",
23358
23393
  onClick: (t) => K(vg)(m(e.data))
23359
- }, "复制", 8, Ew)]),
23360
- a.value.has(t) ? (Y(), X("pre", Dw, [Z("code", null, W(m(e.data)), 1)])) : Q("", !0)
23394
+ }, "复制", 8, Mw)]),
23395
+ a.value.has(t) ? (Y(), X("pre", Nw, [Z("code", null, W(m(e.data)), 1)])) : Q("", !0)
23361
23396
  ]))), 128))], 64)) : y.value === "flow" ? (Y(), X(J, { key: 4 }, [
23362
- c.value.length ? Q("", !0) : (Y(), X("div", Ow, "暂无日志,发送消息后这里按轮次展示执行流程")),
23363
- O.value.pre.length ? (Y(), X("div", kw, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, ia(O.value.pre, (e, t) => (Y(), X("div", {
23397
+ c.value.length ? Q("", !0) : (Y(), X("div", Pw, "暂无日志,发送消息后这里按轮次展示执行流程")),
23398
+ O.value.pre.length ? (Y(), X("div", Fw, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, ia(O.value.pre, (e, t) => (Y(), X("div", {
23364
23399
  key: "p" + t,
23365
23400
  class: U(["flow-node", e.type])
23366
23401
  }, [
23367
- Z("span", Aw, W(s[e.type]?.icon), 1),
23368
- Z("span", jw, W(s[e.type]?.label), 1),
23369
- Z("span", Mw, W(R(e)), 1),
23370
- Z("span", Nw, W(d(e.timestamp)), 1)
23402
+ Z("span", Iw, W(s[e.type]?.icon), 1),
23403
+ Z("span", Lw, W(s[e.type]?.label), 1),
23404
+ Z("span", Rw, W(R(e)), 1),
23405
+ Z("span", zw, W(d(e.timestamp)), 1)
23371
23406
  ], 2))), 128))])) : Q("", !0),
23372
23407
  (Y(!0), X(J, null, ia(O.value.rounds, (e) => (Y(), X("div", {
23373
23408
  key: e.round,
23374
23409
  class: "flow-round"
23375
- }, [Z("div", Pw, "🔁 第 " + W(e.round) + " 轮", 1), Z("div", Fw, [(Y(!0), X(J, null, ia(e.items, (e, t) => (Y(), X("div", {
23410
+ }, [Z("div", Bw, "🔁 第 " + W(e.round) + " 轮", 1), Z("div", Vw, [(Y(!0), X(J, null, ia(e.items, (e, t) => (Y(), X("div", {
23376
23411
  key: t,
23377
23412
  class: U(["flow-node", e.type])
23378
23413
  }, [
23379
- Z("span", Iw, W(s[e.type]?.icon), 1),
23380
- Z("span", Lw, W(s[e.type]?.label), 1),
23381
- Z("span", Rw, W(R(e)), 1),
23382
- Z("span", zw, W(d(e.timestamp)), 1)
23414
+ Z("span", Hw, W(s[e.type]?.icon), 1),
23415
+ Z("span", Uw, W(s[e.type]?.label), 1),
23416
+ Z("span", Ww, W(R(e)), 1),
23417
+ Z("span", Gw, W(d(e.timestamp)), 1)
23383
23418
  ], 2))), 128))])]))), 128))
23384
- ], 64)) : (Y(), X("div", Bw, [b.value ? (Y(), X(J, { key: 1 }, [
23385
- Z("div", Hw, [
23419
+ ], 64)) : (Y(), X("div", Kw, [b.value ? (Y(), X(J, { key: 1 }, [
23420
+ Z("div", Jw, [
23386
23421
  n[29] ||= Z("div", { class: "info-title" }, "基本信息", -1),
23387
- Z("div", Uw, [
23388
- Z("div", Ww, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", Gw, W(b.value.id), 1)]),
23389
- Z("div", Kw, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", qw, W(b.value.model || "-"), 1)]),
23390
- Z("div", Jw, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", Yw, W(b.value.tools.length), 1)]),
23391
- Z("div", Xw, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", Zw, W(b.value.middleware.length), 1)])
23422
+ Z("div", Yw, [
23423
+ Z("div", Xw, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", Zw, W(b.value.id), 1)]),
23424
+ Z("div", Qw, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", $w, W(b.value.model || "-"), 1)]),
23425
+ Z("div", eT, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", tT, W(b.value.tools.length), 1)]),
23426
+ Z("div", nT, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", rT, W(b.value.middleware.length), 1)])
23392
23427
  ]),
23393
- Z("div", Qw, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", $w, W(b.value.middleware.join(" → ") || "-"), 1)])
23428
+ Z("div", iT, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", aT, W(b.value.middleware.join(" → ") || "-"), 1)])
23394
23429
  ]),
23395
- Z("div", eT, [Z("div", tT, "🔧 工具 (" + W(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.tools, (e) => (Y(), X("div", {
23430
+ Z("div", oT, [Z("div", sT, "🔧 工具 (" + W(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.tools, (e) => (Y(), X("div", {
23396
23431
  key: e.name,
23397
23432
  class: "info-item"
23398
- }, [Z("div", nT, [ms(W(e.name), 1), e.source ? (Y(), X("span", {
23433
+ }, [Z("div", cT, [ms(W(e.name), 1), e.source ? (Y(), X("span", {
23399
23434
  key: 0,
23400
23435
  class: U(["src-tag", D(e.source)])
23401
- }, W(e.source), 3)) : Q("", !0)]), Z("div", rT, W(e.description), 1)]))), 128))]),
23402
- b.value.skills.length ? (Y(), X("div", iT, [Z("div", aT, [ms("📘 技能 (" + W(b.value.skills.length) + ")", 1), n[30] ||= Z("span", { class: "info-hint" }, "点击展开查看全文", -1)]), (Y(!0), X(J, null, ia(b.value.skills, (e) => (Y(), X("div", {
23436
+ }, W(e.source), 3)) : Q("", !0)]), Z("div", lT, W(e.description), 1)]))), 128))]),
23437
+ b.value.skills.length ? (Y(), X("div", uT, [Z("div", dT, [ms("📘 技能 (" + W(b.value.skills.length) + ")", 1), n[30] ||= Z("span", { class: "info-hint" }, "点击展开查看全文", -1)]), (Y(!0), X(J, null, ia(b.value.skills, (e) => (Y(), X("div", {
23403
23438
  key: e.name,
23404
23439
  class: "info-item"
23405
23440
  }, [
23406
23441
  Z("div", {
23407
23442
  class: "info-name skill-toggle",
23408
23443
  onClick: (t) => S(e.name)
23409
- }, [Z("span", { class: U(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), ms(" " + W(e.name), 1)], 8, oT),
23410
- Z("div", sT, W(e.description), 1),
23411
- x.value[e.name] ? (Y(), X("div", cT, [x.value[e.name].loading ? (Y(), X("div", lT, "加载中…")) : x.value[e.name].error ? (Y(), X("div", uT, W(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", dT, W(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
23444
+ }, [Z("span", { class: U(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), ms(" " + W(e.name), 1)], 8, fT),
23445
+ Z("div", pT, W(e.description), 1),
23446
+ x.value[e.name] ? (Y(), X("div", mT, [x.value[e.name].loading ? (Y(), X("div", hT, "加载中…")) : x.value[e.name].error ? (Y(), X("div", gT, W(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", _T, W(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
23412
23447
  ]))), 128))])) : Q("", !0),
23413
- b.value.data ? (Y(), X("div", fT, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", pT, [Z("div", mT, W(b.value.data.description || "主数据对象"), 1), Z("div", hT, "schema: " + W(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
23414
- Z("div", gT, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", _T, [
23415
- Z("div", vT, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", yT, W(b.value.subagent.enabled ? "是" : "否"), 1)]),
23416
- Z("div", bT, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", xT, W(b.value.subagent.maxDepth), 1)]),
23417
- Z("div", ST, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", CT, W(b.value.subagent.maxParallel), 1)]),
23418
- Z("div", wT, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", TT, W(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
23448
+ b.value.data ? (Y(), X("div", vT, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", yT, [Z("div", bT, W(b.value.data.description || "主数据对象"), 1), Z("div", xT, "schema: " + W(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
23449
+ Z("div", ST, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", CT, [
23450
+ Z("div", wT, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", TT, W(b.value.subagent.enabled ? "是" : "否"), 1)]),
23451
+ Z("div", ET, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", DT, W(b.value.subagent.maxDepth), 1)]),
23452
+ Z("div", OT, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", kT, W(b.value.subagent.maxParallel), 1)]),
23453
+ Z("div", AT, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", jT, W(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
23419
23454
  ])]),
23420
- b.value.mcp?.servers?.length ? (Y(), X("div", ET, [Z("div", DT, "🔌 MCP (" + W(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.mcp.servers, (e) => (Y(), X("div", {
23455
+ b.value.mcp?.servers?.length ? (Y(), X("div", MT, [Z("div", NT, "🔌 MCP (" + W(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.mcp.servers, (e) => (Y(), X("div", {
23421
23456
  key: e.name,
23422
23457
  class: "info-item"
23423
- }, [Z("div", OT, [ms(W(e.name) + " ", 1), Z("span", kT, W(e.toolCount) + " 工具", 1)]), Z("div", AT, W(e.url), 1)]))), 128))])) : Q("", !0),
23424
- b.value.verify ? (Y(), X("div", jT, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", MT, [
23425
- Z("div", NT, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", PT, W(b.value.verify.enabled ? "是" : "否"), 1)]),
23426
- Z("div", FT, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", IT, W(b.value.verify.maxAttempts), 1)]),
23427
- Z("div", LT, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", RT, W(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
23428
- b.value.verify.adversarial ? (Y(), X("div", zT, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", BT, W(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
23458
+ }, [Z("div", PT, [ms(W(e.name) + " ", 1), Z("span", FT, W(e.toolCount) + " 工具", 1)]), Z("div", IT, W(e.url), 1)]))), 128))])) : Q("", !0),
23459
+ b.value.verify ? (Y(), X("div", LT, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", RT, [
23460
+ Z("div", zT, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", BT, W(b.value.verify.enabled ? "是" : "否"), 1)]),
23461
+ Z("div", VT, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", HT, W(b.value.verify.maxAttempts), 1)]),
23462
+ Z("div", UT, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", WT, W(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
23463
+ b.value.verify.adversarial ? (Y(), X("div", GT, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", KT, W(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
23429
23464
  ])])) : Q("", !0),
23430
- b.value.todos.length ? (Y(), X("div", VT, [Z("div", HT, "📋 任务清单 (" + W(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.todos, (e, t) => (Y(), X("div", {
23465
+ b.value.todos.length ? (Y(), X("div", qT, [Z("div", JT, "📋 任务清单 (" + W(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, ia(b.value.todos, (e, t) => (Y(), X("div", {
23431
23466
  key: t,
23432
23467
  class: "info-todo"
23433
23468
  }, [Z("span", {
23434
23469
  class: "todo-tag",
23435
23470
  style: we({ background: T[e.status] && T[e.status].color || "#9ca3af" })
23436
23471
  }, W(E(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
23437
- b.value.memory ? (Y(), X("div", UT, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", WT, W(b.value.memory), 1)])) : Q("", !0),
23438
- b.value.lastCompression ? (Y(), X("div", GT, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", KT, [
23439
- Z("div", qT, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", JT, W(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
23440
- Z("div", YT, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", XT, W(b.value.lastCompression.roundsSummarized) + " / " + W(b.value.lastCompression.roundsTotal), 1)]),
23441
- Z("div", ZT, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", QT, W(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
23442
- Z("div", $T, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", eE, W(b.value.lastCompression.originalMessages) + " → " + W(b.value.lastCompression.compressedMessages), 1)]),
23443
- Z("div", tE, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", nE, W(b.value.lastCompression.strategy), 1)]),
23444
- b.value.lastCompression.decision ? (Y(), X("div", rE, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", iE, "🤖 " + W(ne(b.value.lastCompression.decision)), 1)])) : Q("", !0)
23472
+ b.value.memory ? (Y(), X("div", YT, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", XT, W(b.value.memory), 1)])) : Q("", !0),
23473
+ b.value.lastCompression ? (Y(), X("div", ZT, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", QT, [
23474
+ Z("div", $T, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", eE, W(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
23475
+ Z("div", tE, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", nE, W(b.value.lastCompression.roundsSummarized) + " / " + W(b.value.lastCompression.roundsTotal), 1)]),
23476
+ Z("div", rE, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", iE, W(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
23477
+ Z("div", aE, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", oE, W(b.value.lastCompression.originalMessages) + " → " + W(b.value.lastCompression.compressedMessages), 1)]),
23478
+ Z("div", sE, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", cE, W(b.value.lastCompression.strategy), 1)]),
23479
+ b.value.lastCompression.decision ? (Y(), X("div", lE, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", uE, "🤖 " + W(ne(b.value.lastCompression.decision)), 1)])) : Q("", !0)
23445
23480
  ])])) : Q("", !0)
23446
- ], 64)) : (Y(), X("div", Vw, "暂无信息"))]))
23481
+ ], 64)) : (Y(), X("div", qw, "暂无信息"))]))
23447
23482
  ])
23448
23483
  ], 2), Z("div", {
23449
23484
  class: "drawer-mask",
@@ -23452,16 +23487,16 @@ app.mount('#app');
23452
23487
  _: 1
23453
23488
  })]));
23454
23489
  }
23455
- }), [["__scopeId", "data-v-bb8e2650"]]), oE = { class: "skill-panel" }, sE = { class: "skill-header" }, cE = { class: "skill-section" }, lE = { class: "section-title" }, uE = { class: "field" }, dE = ["disabled"], fE = { class: "field" }, pE = { class: "field field-textarea" }, mE = {
23490
+ }), [["__scopeId", "data-v-bb8e2650"]]), fE = { class: "skill-panel" }, pE = { class: "skill-header" }, mE = { class: "skill-section" }, hE = { class: "section-title" }, gE = { class: "field" }, _E = ["disabled"], vE = { class: "field" }, yE = { class: "field field-textarea" }, bE = {
23456
23491
  key: 0,
23457
23492
  class: "skill-error"
23458
- }, hE = { class: "skill-section" }, gE = { class: "section-title" }, _E = {
23493
+ }, xE = { class: "skill-section" }, SE = { class: "section-title" }, CE = {
23459
23494
  key: 0,
23460
23495
  class: "empty-hint"
23461
- }, vE = {
23496
+ }, wE = {
23462
23497
  key: 1,
23463
23498
  class: "skill-list"
23464
- }, yE = { class: "skill-actions" }, bE = ["onClick"], xE = ["onClick"], SE = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
23499
+ }, TE = { class: "skill-actions" }, EE = ["onClick"], DE = ["onClick"], OE = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
23465
23500
  __name: "SkillPanel",
23466
23501
  props: {
23467
23502
  visible: { type: Boolean },
@@ -23515,54 +23550,54 @@ app.mount('#app');
23515
23550
  key: 0,
23516
23551
  class: "skill-mask",
23517
23552
  onClick: n[4] ||= gl((e) => r("close"), ["self"])
23518
- }, [Z("div", oE, [
23519
- Z("div", sE, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
23553
+ }, [Z("div", fE, [
23554
+ Z("div", pE, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
23520
23555
  class: "skill-close",
23521
23556
  title: "关闭",
23522
23557
  onClick: n[0] ||= (e) => r("close")
23523
23558
  }, "✕")]),
23524
- Z("div", cE, [
23525
- Z("div", lE, [ms(W(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
23559
+ Z("div", mE, [
23560
+ Z("div", hE, [ms(W(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
23526
23561
  key: 0,
23527
23562
  class: "btn btn-ghost btn-cancel",
23528
23563
  title: "取消编辑,回到新建",
23529
23564
  onClick: h
23530
23565
  }, "取消编辑")) : Q("", !0)]),
23531
- Z("label", uE, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), qr(Z("input", {
23566
+ Z("label", gE, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), qr(Z("input", {
23532
23567
  "onUpdate:modelValue": n[1] ||= (e) => i.value = e,
23533
23568
  disabled: !!u.value,
23534
23569
  placeholder: "如:my-writer",
23535
23570
  class: "field-input"
23536
- }, null, 8, dE), [[pl, i.value]])]),
23537
- Z("label", fE, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), qr(Z("input", {
23571
+ }, null, 8, _E), [[pl, i.value]])]),
23572
+ Z("label", vE, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), qr(Z("input", {
23538
23573
  "onUpdate:modelValue": n[2] ||= (e) => a.value = e,
23539
23574
  placeholder: "一句话说明用途与触发时机",
23540
23575
  class: "field-input"
23541
23576
  }, null, 512), [[pl, a.value]])]),
23542
- Z("label", pE, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), qr(Z("textarea", {
23577
+ Z("label", yE, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), qr(Z("textarea", {
23543
23578
  "onUpdate:modelValue": n[3] ||= (e) => o.value = e,
23544
23579
  placeholder: "skill 全文指令(支持 Markdown)",
23545
23580
  rows: "6",
23546
23581
  class: "field-input"
23547
23582
  }, null, 512), [[pl, o.value]])]),
23548
- s.value ? (Y(), X("div", mE, W(s.value), 1)) : Q("", !0),
23583
+ s.value ? (Y(), X("div", bE, W(s.value), 1)) : Q("", !0),
23549
23584
  Z("button", {
23550
23585
  class: "btn btn-primary",
23551
23586
  onClick: f
23552
23587
  }, W(u.value ? "保存修改" : "添加 Skill"), 1)
23553
23588
  ]),
23554
- Z("div", hE, [Z("div", gE, "已创建 Skill(" + W(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", vE, [(Y(!0), X(J, null, ia(c.value, (e) => (Y(), X("li", {
23589
+ Z("div", xE, [Z("div", SE, "已创建 Skill(" + W(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", wE, [(Y(!0), X(J, null, ia(c.value, (e) => (Y(), X("li", {
23555
23590
  key: e,
23556
23591
  class: "skill-item"
23557
- }, [Z("span", { class: U(["skill-name", { active: u.value === e }]) }, W(e), 3), Z("span", yE, [Z("button", {
23592
+ }, [Z("span", { class: U(["skill-name", { active: u.value === e }]) }, W(e), 3), Z("span", TE, [Z("button", {
23558
23593
  class: "btn btn-ghost btn-edit",
23559
23594
  title: "加载到表单编辑",
23560
23595
  onClick: (t) => m(e)
23561
- }, "编辑", 8, bE), Z("button", {
23596
+ }, "编辑", 8, EE), Z("button", {
23562
23597
  class: "btn btn-ghost btn-del",
23563
23598
  title: "删除该用户 skill",
23564
23599
  onClick: (t) => p(e)
23565
- }, "删除", 8, xE)])]))), 128))])) : (Y(), X("div", _E, "暂无用户创建的 skill"))]),
23600
+ }, "删除", 8, DE)])]))), 128))])) : (Y(), X("div", CE, "暂无用户创建的 skill"))]),
23566
23601
  n[9] ||= Z("div", { class: "skill-hint" }, [
23567
23602
  ms(" 💡 创建/编辑的 skill 会自动加入 agent(下轮 system prompt 索引可见),agent 经 "),
23568
23603
  Z("code", null, "load_skill(name)"),
@@ -23574,7 +23609,7 @@ app.mount('#app');
23574
23609
  _: 1
23575
23610
  })]));
23576
23611
  }
23577
- }), [["__scopeId", "data-v-c6a22ea5"]]), CE = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
23612
+ }), [["__scopeId", "data-v-c6a22ea5"]]), kE = /*#__PURE__*/ Pg(/* @__PURE__ */ Mi({
23578
23613
  __name: "ChatDialog",
23579
23614
  props: {
23580
23615
  fetchResponse: {},
@@ -23644,11 +23679,11 @@ app.mount('#app');
23644
23679
  infoTick: n.infoTick
23645
23680
  });
23646
23681
  Yr(yg, i);
23647
- let { isExpanded: a, debugVisible: o, skillVisible: s, closeSkill: c } = i;
23648
- function l(e) {
23682
+ let { isExpanded: a, debugVisible: o, skillVisible: s, closeSkill: c } = i, { scrollContainer: l, onScroll: u, onWheel: d } = i.chat;
23683
+ function f(e) {
23649
23684
  return e === "focus" ? n.sections?.focus === !0 : n.sections?.[e] !== !1;
23650
23685
  }
23651
- let u = Ys(() => !!n.onAddSkill), d = Ys(() => {
23686
+ let p = Ys(() => !!n.onAddSkill), m = Ys(() => {
23652
23687
  if (!n.drawer || n.drawerWidth == null) return null;
23653
23688
  let e = n.drawerWidth;
23654
23689
  return typeof e == "number" ? `${e}px` : e;
@@ -23663,19 +23698,19 @@ app.mount('#app');
23663
23698
  drawer: e.drawer,
23664
23699
  "cs-theme-dark": e.csTheme === "dark"
23665
23700
  }]),
23666
- style: we(d.value ? {
23667
- width: d.value,
23668
- maxWidth: d.value
23701
+ style: we(m.value ? {
23702
+ width: m.value,
23703
+ maxWidth: m.value
23669
23704
  } : null)
23670
23705
  }, [
23671
- l("header") ? aa(t.$slots, "header", {
23706
+ f("header") ? aa(t.$slots, "header", {
23672
23707
  key: 0,
23673
23708
  chat: K(i)
23674
23709
  }, () => [ls(Fg, {
23675
23710
  title: e.title,
23676
23711
  drawer: e.drawer,
23677
23712
  "debug-logs": e.debugLogs,
23678
- "skill-available": u.value,
23713
+ "skill-available": p.value,
23679
23714
  sessions: e.sessions,
23680
23715
  "current-session-id": e.currentSessionId,
23681
23716
  "on-new-session": e.onNewSession,
@@ -23693,7 +23728,7 @@ app.mount('#app');
23693
23728
  "on-open-session",
23694
23729
  "on-remove-session"
23695
23730
  ])], !0) : Q("", !0),
23696
- l("focus") ? aa(t.$slots, "focus", {
23731
+ f("focus") ? aa(t.$slots, "focus", {
23697
23732
  key: 1,
23698
23733
  chat: K(i)
23699
23734
  }, () => [ls(Vg, {
@@ -23707,47 +23742,55 @@ app.mount('#app');
23707
23742
  "on-clear-focus",
23708
23743
  "info-tick"
23709
23744
  ])], !0) : Q("", !0),
23710
- l("body") ? (Y(), ns(pc, {
23745
+ Z("div", {
23746
+ class: "chat-main",
23747
+ ref_key: "scrollContainer",
23748
+ ref: l,
23749
+ onScroll: n[2] ||= (...e) => K(u) && K(u)(...e),
23750
+ onWheel: n[3] ||= (...e) => K(d) && K(d)(...e)
23751
+ }, [
23752
+ f("body") ? (Y(), ns(pc, {
23753
+ key: 0,
23754
+ name: "cs-slide"
23755
+ }, {
23756
+ default: Gr(() => [aa(t.$slots, "body", { chat: K(i) }, () => [qr(ls(Lx, {
23757
+ "show-avatar": e.showAvatar,
23758
+ "show-typing": e.showTyping
23759
+ }, null, 8, ["show-avatar", "show-typing"]), [[jc, K(a)]])], !0)]),
23760
+ _: 3
23761
+ })) : Q("", !0),
23762
+ f("queued") ? aa(t.$slots, "queued", {
23763
+ key: 1,
23764
+ chat: K(i)
23765
+ }, () => [ls(Gx)], !0) : Q("", !0),
23766
+ f("approval") ? aa(t.$slots, "approval", {
23767
+ key: 2,
23768
+ chat: K(i)
23769
+ }, () => [ls(rS)], !0) : Q("", !0),
23770
+ f("conflict") ? aa(t.$slots, "conflict", {
23771
+ key: 3,
23772
+ chat: K(i)
23773
+ }, () => [ls(mS, {
23774
+ "pending-conflict": e.pendingConflict,
23775
+ "on-resolve": e.onResolveConflict
23776
+ }, null, 8, ["pending-conflict", "on-resolve"])], !0) : Q("", !0)
23777
+ ], 544),
23778
+ f("footer") ? (Y(), ns(pc, {
23711
23779
  key: 2,
23712
23780
  name: "cs-slide"
23713
23781
  }, {
23714
- default: Gr(() => [aa(t.$slots, "body", { chat: K(i) }, () => [qr(ls(jx, {
23715
- "show-avatar": e.showAvatar,
23716
- "show-typing": e.showTyping
23717
- }, null, 8, ["show-avatar", "show-typing"]), [[jc, K(a)]])], !0)]),
23718
- _: 3
23719
- })) : Q("", !0),
23720
- l("queued") ? aa(t.$slots, "queued", {
23721
- key: 3,
23722
- chat: K(i)
23723
- }, () => [ls(zx)], !0) : Q("", !0),
23724
- l("approval") ? aa(t.$slots, "approval", {
23725
- key: 4,
23726
- chat: K(i)
23727
- }, () => [ls(Zx)], !0) : Q("", !0),
23728
- l("conflict") ? aa(t.$slots, "conflict", {
23729
- key: 5,
23730
- chat: K(i)
23731
- }, () => [ls(cS, {
23732
- "pending-conflict": e.pendingConflict,
23733
- "on-resolve": e.onResolveConflict
23734
- }, null, 8, ["pending-conflict", "on-resolve"])], !0) : Q("", !0),
23735
- l("footer") ? (Y(), ns(pc, {
23736
- key: 6,
23737
- name: "cs-slide"
23738
- }, {
23739
- default: Gr(() => [aa(t.$slots, "footer", { chat: K(i) }, () => [ls(bS, {
23782
+ default: Gr(() => [aa(t.$slots, "footer", { chat: K(i) }, () => [ls(ES, {
23740
23783
  placeholder: e.placeholder,
23741
23784
  "input-rows": e.inputRows
23742
23785
  }, null, 8, ["placeholder", "input-rows"])], !0)]),
23743
23786
  _: 3
23744
23787
  })) : Q("", !0),
23745
- l("debug") ? aa(t.$slots, "debug", {
23746
- key: 7,
23788
+ f("debug") ? aa(t.$slots, "debug", {
23789
+ key: 3,
23747
23790
  chat: K(i)
23748
- }, () => [ls(aE, {
23791
+ }, () => [ls(dE, {
23749
23792
  visible: K(o),
23750
- "onUpdate:visible": n[2] ||= (e) => /* @__PURE__ */ yn(o) ? o.value = e : null,
23793
+ "onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ yn(o) ? o.value = e : null,
23751
23794
  logs: e.debugLogs,
23752
23795
  "get-info": e.getInfo,
23753
23796
  "info-tick": e.infoTick,
@@ -23761,10 +23804,10 @@ app.mount('#app');
23761
23804
  "get-skill-content",
23762
23805
  "cs-theme"
23763
23806
  ])], !0) : Q("", !0),
23764
- l("skill") ? aa(t.$slots, "skill", {
23765
- key: 8,
23807
+ f("skill") ? aa(t.$slots, "skill", {
23808
+ key: 4,
23766
23809
  chat: K(i)
23767
- }, () => [ls(SE, {
23810
+ }, () => [ls(OE, {
23768
23811
  visible: K(s),
23769
23812
  "on-add-skill": e.onAddSkill,
23770
23813
  "on-remove-skill": e.onRemoveSkill,
@@ -23781,13 +23824,13 @@ app.mount('#app');
23781
23824
  ])], !0) : Q("", !0)
23782
23825
  ], 6)], 64));
23783
23826
  }
23784
- }), [["__scopeId", "data-v-e0eb0bbe"]]);
23827
+ }), [["__scopeId", "data-v-aad3820e"]]);
23785
23828
  //#endregion
23786
23829
  //#region src/core/sdk/mountChatDialog.ts
23787
- function wE(e) {
23830
+ function AE(e) {
23788
23831
  let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
23789
23832
  return r = Sl(/* @__PURE__ */ Mi({ setup() {
23790
- return () => Xs(CE, {
23833
+ return () => Xs(kE, {
23791
23834
  fetchStream: e.streaming ? t.stream : void 0,
23792
23835
  fetchResponse: e.streaming ? void 0 : (e, n) => {
23793
23836
  if (n) {
@@ -23886,12 +23929,12 @@ function wE(e) {
23886
23929
  }
23887
23930
  //#endregion
23888
23931
  //#region src/core/sdk/ragSubagent.ts
23889
- var TE = "你是知识检索专家。可用工具:search_docs(语义检索)/ load_doc(按 source 加载)/ vfs_grep+vfs_read(搜预注入文档)/ fetch_document(公网 URL)。\n\n工作方式:\n1. 分析任务,拆出需查证的要点(如:需要哪些组件、各自的 props 约束、UI 规范要求);\n2. 多源检索:先 vfs_grep 搜预注入文档(快、静态)→ 不够用 search_docs 语义检索 → 需特定文档用 load_doc → 公网用 fetch_document;\n3. 检索结果不足时换关键词、扩大 topK、或换源重试;\n4. 综合成结构化、可执行结论(不堆原文,提炼成可直接用于决策/配置的信息);\n5. 标注关键信息来源(文档名/段落),便于溯源;检索不到明确说「未检索到」,不编造。\n\n你是只读检索角色,不要尝试修改任何数据。", EE = "# 知识检索策略(RAG)\n\n## 多源决策树\n- vfs_grep / vfs_read:搜集成方预注入 vfs 的文档(组件文档 / UI 规范)—— 快、静态,先查\n- search_docs:语义检索(retriever 向量库)—— 模糊匹配,关键词不确定 / 语义相似时用\n- load_doc:按 source 精确加载(已知文档 id / URL / key)—— 精确取特定文档\n- fetch_document:公网 URL —— 查公开资料\n\n## 综合规范\n- 多源交叉验证(关键结论优先 ≥2 源印证,或单一权威源)\n- 标注来源(文档名 / URL / 段落),便于溯源\n- 结构化、可执行结论(组件清单 + 各自 props 约束 + 适用场景),不堆原文\n- 未检索到明确说「未检索到」,不编造;建议替代方案(改关键词 / 建议写代码组件等)\n\n## 何时用何源\n- 静态文档(组件库文档 / UI 规范):vfs_grep\n- 语义相似(「瀑布流组件」「倒计时」「拼团」):search_docs\n- 已知文档 id / URL:load_doc\n- 公开 URL(设计规范网站 / 第三方文档):fetch_document", DE = {
23932
+ var jE = "你是知识检索专家。可用工具:search_docs(语义检索)/ load_doc(按 source 加载)/ vfs_grep+vfs_read(搜预注入文档)/ fetch_document(公网 URL)。\n\n工作方式:\n1. 分析任务,拆出需查证的要点(如:需要哪些组件、各自的 props 约束、UI 规范要求);\n2. 多源检索:先 vfs_grep 搜预注入文档(快、静态)→ 不够用 search_docs 语义检索 → 需特定文档用 load_doc → 公网用 fetch_document;\n3. 检索结果不足时换关键词、扩大 topK、或换源重试;\n4. 综合成结构化、可执行结论(不堆原文,提炼成可直接用于决策/配置的信息);\n5. 标注关键信息来源(文档名/段落),便于溯源;检索不到明确说「未检索到」,不编造。\n\n你是只读检索角色,不要尝试修改任何数据。", ME = "# 知识检索策略(RAG)\n\n## 多源决策树\n- vfs_grep / vfs_read:搜集成方预注入 vfs 的文档(组件文档 / UI 规范)—— 快、静态,先查\n- search_docs:语义检索(retriever 向量库)—— 模糊匹配,关键词不确定 / 语义相似时用\n- load_doc:按 source 精确加载(已知文档 id / URL / key)—— 精确取特定文档\n- fetch_document:公网 URL —— 查公开资料\n\n## 综合规范\n- 多源交叉验证(关键结论优先 ≥2 源印证,或单一权威源)\n- 标注来源(文档名 / URL / 段落),便于溯源\n- 结构化、可执行结论(组件清单 + 各自 props 约束 + 适用场景),不堆原文\n- 未检索到明确说「未检索到」,不编造;建议替代方案(改关键词 / 建议写代码组件等)\n\n## 何时用何源\n- 静态文档(组件库文档 / UI 规范):vfs_grep\n- 语义相似(「瀑布流组件」「倒计时」「拼团」):search_docs\n- 已知文档 id / URL:load_doc\n- 公开 URL(设计规范网站 / 第三方文档):fetch_document", NE = {
23890
23933
  name: "rag-search",
23891
23934
  description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
23892
- getContent: () => EE
23935
+ getContent: () => ME
23893
23936
  };
23894
- function OE(e, n, i) {
23937
+ function PE(e, n, i) {
23895
23938
  return r(async ({ query: e, topK: t }) => {
23896
23939
  try {
23897
23940
  let r = await n(e, { topK: t ?? i });
@@ -23908,7 +23951,7 @@ function OE(e, n, i) {
23908
23951
  })
23909
23952
  });
23910
23953
  }
23911
- function kE(e, n) {
23954
+ function FE(e, n) {
23912
23955
  return r(async ({ source: e }) => {
23913
23956
  try {
23914
23957
  let t = await n(e), r = Array.isArray(t) ? t : [t];
@@ -23922,11 +23965,11 @@ function kE(e, n) {
23922
23965
  schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
23923
23966
  });
23924
23967
  }
23925
- function AE(e) {
23968
+ function IE(e) {
23926
23969
  let { retriever: t, loader: n, useVfs: r = !0, id: i = "rag", description: a, topK: o = 5, searchToolName: s = "search_docs", loadToolName: c = "load_doc", maxToolRounds: l = 8, summarization: u, skills: d, extraTools: f } = e;
23927
23970
  if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
23928
23971
  let p = [];
23929
- t && p.push(OE(s, t, o)), n && p.push(kE(c, n)), f && p.push(...f);
23972
+ t && p.push(PE(s, t, o)), n && p.push(FE(c, n)), f && p.push(...f);
23930
23973
  let m = r ? [
23931
23974
  "vfs_grep",
23932
23975
  "vfs_read",
@@ -23935,17 +23978,17 @@ function AE(e) {
23935
23978
  return {
23936
23979
  id: i,
23937
23980
  description: a ?? "检索知识库(组件文档/UI 规范/业务规则),返回有依据的结构化结论。需要查阅文档才能回答或决定如何配置时委派",
23938
- systemPrompt: TE,
23981
+ systemPrompt: jE,
23939
23982
  tools: p.length ? p : void 0,
23940
23983
  allowedTools: m,
23941
- skills: d ?? [DE],
23984
+ skills: d ?? [NE],
23942
23985
  maxToolRounds: l,
23943
23986
  ...u === void 0 ? {} : { summarization: u }
23944
23987
  };
23945
23988
  }
23946
23989
  //#endregion
23947
23990
  //#region src/core/tools/htmlValidate.ts
23948
- var jE = /* @__PURE__ */ new Set([
23991
+ var LE = /* @__PURE__ */ new Set([
23949
23992
  "area",
23950
23993
  "base",
23951
23994
  "br",
@@ -23960,12 +24003,12 @@ var jE = /* @__PURE__ */ new Set([
23960
24003
  "source",
23961
24004
  "track",
23962
24005
  "wbr"
23963
- ]), ME = /* @__PURE__ */ new Set(["script", "style"]), NE = /* @__PURE__ */ new Set([
24006
+ ]), RE = /* @__PURE__ */ new Set(["script", "style"]), zE = /* @__PURE__ */ new Set([
23964
24007
  "html",
23965
24008
  "head",
23966
24009
  "body"
23967
24010
  ]);
23968
- function PE(e, t = {}) {
24011
+ function BE(e, t = {}) {
23969
24012
  let n = t.sfc === !0, r = [], i = e.length;
23970
24013
  if (!e.trim()) return r;
23971
24014
  let a = [0];
@@ -24046,12 +24089,12 @@ function PE(e, t = {}) {
24046
24089
  }
24047
24090
  continue;
24048
24091
  }
24049
- if (NE.has(m) && r.push({
24092
+ if (zE.has(m) && r.push({
24050
24093
  line: o(t),
24051
24094
  code: "DOC_TAG_IN_FRAGMENT",
24052
24095
  message: `<${m}> 不应出现(v-html 注入场景只输出内容片段,不要 html/head/body 外围)`
24053
- }), !(jE.has(m) || h)) {
24054
- if (ME.has(m)) {
24096
+ }), !(LE.has(m) || h)) {
24097
+ if (RE.has(m)) {
24055
24098
  m === "script" && !n && r.push({
24056
24099
  line: o(t),
24057
24100
  code: "SCRIPT_IN_FRAGMENT",
@@ -24085,7 +24128,7 @@ function PE(e, t = {}) {
24085
24128
  }
24086
24129
  //#endregion
24087
24130
  //#region src/core/sdk/htmlSubagent.ts
24088
- function FE(e, t) {
24131
+ function VE(e, t) {
24089
24132
  let n = t === "html" ? "html" : "vue";
24090
24133
  return `你是纯代码组件生成专家。可用工具:vfs_write / vfs_edit / vfs_rm(写/改/删代码工作副本 vfs ${e}) / vfs_read + vfs_grep(读 vfs) / validate_code(代码格式自检) / write + set(写 data,writablePaths 限定) / read / write_todos + update_todo(规划)。
24091
24134
 
@@ -24115,16 +24158,16 @@ ${t === "html" ? `- 输出纯 HTML 片段(.${n}):结构 + 内联 <style>(class
24115
24158
  5. 生成/修改完成后必须调 validate_code 自检(标签闭合 + 片段契约),报错用 vfs_edit 修正后复查,直到通过;
24116
24159
  6. 最后 read(vfs + data)确认结构正确;只写 writablePaths 内 data + ${e} 下 vfs。`;
24117
24160
  }
24118
- var IE = "# 纯代码组件生成规范\n\n## 代码资产模型(重要)\n- 代码正文是 data 的 code 字段(资产,随 data json 进服务端 DB);UI 绑 data.code 渲染\n- vfs 是编辑工作副本:框架自动 checkout(data.code→vfs)/ commit(vfs→data.code),你只改 vfs\n- __pgId 框架管(read 看不到、write 写不进),别碰\n\n## 两条工作路径\n- 修改已有组件:必经 vfs(vfs_read → vfs_edit 增量改 → validate_code);勿直接 write data.code\n- 新建组件:write({patch:{op:'set',jsonPath:'components.N',value:{name,code,props}}}) —— code 直接进 data,框架补 __pgId\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制交互 / 一次性特效 / 特殊布局)→ 写 custom 代码组件\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## Vue SFC 规范\n- Vue 3 <template> + <script setup>(组合式)\n- props 用 defineProps;事件用 defineEmits\n- 只渲染 UI,不做副作用(不发请求 / 不读写 storage)\n\n## 输出契约(必须)\n- 渲染产物经 v-html 等方式注入宿主:<template> 内不要 <!DOCTYPE> / <html> / <head> / <body> 外围标签,只输出内容片段\n- <template> 内不写 <script>;不引入外部脚本 / CDN\n- 每次生成/修改后调 validate_code 自检,报错修正直到通过\n\n## props 定义\n- 代码组件 defineProps 接受外部 data 传入(集成方渲染时按 data 的 props 字段传)\n\n## 组件库引用\n- 代码内可 import 组件库组件(如 <Button>);所用依赖以集成方渲染层已注入为准,不重复造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", LE = "# HTML 片段生成规范\n\n## 代码资产模型(重要)\n- 代码正文是 data 的 code 字段(资产,随 data json 进服务端 DB);UI 绑 data.code 渲染\n- vfs 是编辑工作副本:框架自动 checkout(data.code→vfs)/ commit(vfs→data.code),你只改 vfs\n- __pgId 框架管(read 看不到、write 写不进),别碰\n\n## 两条工作路径\n- 修改已有组件:必经 vfs(vfs_read → vfs_edit 增量改 → validate_code);勿直接 write data.code\n- 新建组件:write({patch:{op:'set',jsonPath:'components.N',value:{name,code,props}}}) —— code 直接进 data,框架补 __pgId\n\n## 输出契约(必须)\n- 输出经 v-html 注入宿主的 HTML 片段:不要 <!DOCTYPE>,不要 <html> / <head> / <body> 外围标签\n- 单根元素包裹(如 <section class=\"hero\">…</section>)\n- 不写 <script>(v-html 注入不执行脚本);交互交宿主页面已有机制\n- 样式用片段内 <style>,class 统一加前缀防冲突(如 .pg-hero-…)\n- 不引入外部脚本 / CDN / 外链样式\n\n## 标签闭合(必须)\n- 非自闭合标签必须成对闭合(<img> / <br> / <input> 等 void 元素除外)\n- 每次生成/修改后调 validate_code 自检,报错用 vfs_edit 修正直到通过\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制布局 / 一次性专题页 / 特殊视觉效果)→ 写 HTML 片段\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", RE = {
24161
+ var HE = "# 纯代码组件生成规范\n\n## 代码资产模型(重要)\n- 代码正文是 data 的 code 字段(资产,随 data json 进服务端 DB);UI 绑 data.code 渲染\n- vfs 是编辑工作副本:框架自动 checkout(data.code→vfs)/ commit(vfs→data.code),你只改 vfs\n- __pgId 框架管(read 看不到、write 写不进),别碰\n\n## 两条工作路径\n- 修改已有组件:必经 vfs(vfs_read → vfs_edit 增量改 → validate_code);勿直接 write data.code\n- 新建组件:write({patch:{op:'set',jsonPath:'components.N',value:{name,code,props}}}) —— code 直接进 data,框架补 __pgId\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制交互 / 一次性特效 / 特殊布局)→ 写 custom 代码组件\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## Vue SFC 规范\n- Vue 3 <template> + <script setup>(组合式)\n- props 用 defineProps;事件用 defineEmits\n- 只渲染 UI,不做副作用(不发请求 / 不读写 storage)\n\n## 输出契约(必须)\n- 渲染产物经 v-html 等方式注入宿主:<template> 内不要 <!DOCTYPE> / <html> / <head> / <body> 外围标签,只输出内容片段\n- <template> 内不写 <script>;不引入外部脚本 / CDN\n- 每次生成/修改后调 validate_code 自检,报错修正直到通过\n\n## props 定义\n- 代码组件 defineProps 接受外部 data 传入(集成方渲染时按 data 的 props 字段传)\n\n## 组件库引用\n- 代码内可 import 组件库组件(如 <Button>);所用依赖以集成方渲染层已注入为准,不重复造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", UE = "# HTML 片段生成规范\n\n## 代码资产模型(重要)\n- 代码正文是 data 的 code 字段(资产,随 data json 进服务端 DB);UI 绑 data.code 渲染\n- vfs 是编辑工作副本:框架自动 checkout(data.code→vfs)/ commit(vfs→data.code),你只改 vfs\n- __pgId 框架管(read 看不到、write 写不进),别碰\n\n## 两条工作路径\n- 修改已有组件:必经 vfs(vfs_read → vfs_edit 增量改 → validate_code);勿直接 write data.code\n- 新建组件:write({patch:{op:'set',jsonPath:'components.N',value:{name,code,props}}}) —— code 直接进 data,框架补 __pgId\n\n## 输出契约(必须)\n- 输出经 v-html 注入宿主的 HTML 片段:不要 <!DOCTYPE>,不要 <html> / <head> / <body> 外围标签\n- 单根元素包裹(如 <section class=\"hero\">…</section>)\n- 不写 <script>(v-html 注入不执行脚本);交互交宿主页面已有机制\n- 样式用片段内 <style>,class 统一加前缀防冲突(如 .pg-hero-…)\n- 不引入外部脚本 / CDN / 外链样式\n\n## 标签闭合(必须)\n- 非自闭合标签必须成对闭合(<img> / <br> / <input> 等 void 元素除外)\n- 每次生成/修改后调 validate_code 自检,报错用 vfs_edit 修正直到通过\n\n## 何时写代码组件\n- 组件库无对应类型(高度定制布局 / 一次性专题页 / 特殊视觉效果)→ 写 HTML 片段\n- 组件库已有(按钮 / 卡片 / 列表)→ 用现有组件配置,不重造\n\n## 安全底线(必须)\n- 禁 eval / new Function / Function 构造器\n- 禁访问 window 敏感属性(document.cookie / apiKey / token)\n- 不引入外部脚本 / CDN\n\n## 可访问性 + 语义化\n- 语义化标签(button / nav / section);图片 alt;交互可键盘聚焦\n- 颜色对比达标;不只用颜色传达信息", WE = {
24119
24162
  name: "html-builder",
24120
24163
  description: "纯代码组件(custom Vue SFC)生成规范:代码作为 data 资产 / vfs 工作副本 / SFC 规范 / 输出契约 / props / 组件库引用 / 可访问性",
24121
- getContent: () => IE
24122
- }, zE = {
24164
+ getContent: () => HE
24165
+ }, GE = {
24123
24166
  name: "html-fragment",
24124
24167
  description: "纯 HTML 片段(v-html 注入)生成规范:代码作为 data 资产 / vfs 工作副本 / 无外围标签 / 单根元素 / 标签闭合 / validate_code 自检 / 安全底线 / 可访问性",
24125
- getContent: () => LE
24168
+ getContent: () => UE
24126
24169
  };
24127
- function BE(e = {}) {
24170
+ function KE(e = {}) {
24128
24171
  let t = e.vfsPrefix ?? "html/";
24129
24172
  return ({ state: e }) => {
24130
24173
  let n = e.files;
@@ -24132,7 +24175,7 @@ function BE(e = {}) {
24132
24175
  let r = [];
24133
24176
  for (let [e, i] of Object.entries(n)) {
24134
24177
  if (!e.startsWith(t)) continue;
24135
- let n = PE(i.content, { sfc: e.endsWith(".vue") });
24178
+ let n = BE(i.content, { sfc: e.endsWith(".vue") });
24136
24179
  for (let t of n) r.push(`${e} 第 ${t.line} 行:${t.message}(${t.code})`);
24137
24180
  }
24138
24181
  return r.length ? {
@@ -24141,7 +24184,7 @@ function BE(e = {}) {
24141
24184
  } : { ok: !0 };
24142
24185
  };
24143
24186
  }
24144
- function VE(e) {
24187
+ function qE(e) {
24145
24188
  let n;
24146
24189
  return {
24147
24190
  name: "html-validate-tools",
@@ -24170,7 +24213,7 @@ function VE(e) {
24170
24213
  }
24171
24214
  let a = [];
24172
24215
  for (let e of i) {
24173
- let t = PE(e.content, { sfc: e.path.endsWith(".vue") });
24216
+ let t = BE(e.content, { sfc: e.path.endsWith(".vue") });
24174
24217
  t.length && a.push(`${e.path}:\n${t.map((e) => ` 第 ${e.line} 行 ${e.message}(${e.code})`).join("\n")}`);
24175
24218
  }
24176
24219
  return a.length ? `❌ 格式校验未通过:\n${a.join("\n")}\n请用 vfs_edit 修正后重新调用 validate_code 复查。` : `✅ 格式校验通过(${i.map((e) => e.path).join(", ")}:标签闭合、片段契约)。`;
@@ -24184,17 +24227,17 @@ function VE(e) {
24184
24227
  })]
24185
24228
  };
24186
24229
  }
24187
- var HE = 2;
24188
- function UE(e) {
24230
+ var JE = 2;
24231
+ function YE(e) {
24189
24232
  let { writablePaths: t, codeVfsPrefix: n = "html/", id: r = "html", description: i, planning: a = !0, summarization: o = !0, maxToolRounds: s = 12, temperature: c = .4, skills: l, extraTools: u, codeKind: d = "sfc", formatCheck: f = !0 } = e;
24190
24233
  if (!t?.length) throw Error("[page-agent-sdk][createHtmlSubagent] writablePaths 必填(代码组件 data 区,如 [\"components\"])");
24191
24234
  let p = d === "html" ? "html" : "vue", m = [];
24192
- a && m.push(Hu()), f && (m.push(VE(n)), m.push(Mf({ check: BE({ vfsPrefix: n }) })));
24235
+ a && m.push(Hu()), f && (m.push(qE(n)), m.push(Mf({ check: KE({ vfsPrefix: n }) })));
24193
24236
  let h = u ?? [];
24194
24237
  return {
24195
24238
  id: r,
24196
24239
  description: i ?? "生成/修改纯代码组件(custom 代码)。代码作为 data 资产(code 字段进 DB),vfs 作工作副本;能规划(write_todos)+ 执行。需写代码组件或灵活定制时委派",
24197
- systemPrompt: FE(n, d),
24240
+ systemPrompt: VE(n, d),
24198
24241
  writablePaths: t,
24199
24242
  allowedTools: [
24200
24243
  "vfs_write",
@@ -24205,9 +24248,9 @@ function UE(e) {
24205
24248
  ],
24206
24249
  middleware: m.length ? m : void 0,
24207
24250
  summarization: o === !1 ? void 0 : o,
24208
- maxVerifyAttempts: f ? HE : void 0,
24251
+ maxVerifyAttempts: f ? JE : void 0,
24209
24252
  temperature: c,
24210
- skills: l ?? (d === "html" ? [zE] : [RE]),
24253
+ skills: l ?? (d === "html" ? [GE] : [WE]),
24211
24254
  maxToolRounds: s,
24212
24255
  tools: h.length ? h : void 0,
24213
24256
  _codeAsset: {
@@ -24219,8 +24262,8 @@ function UE(e) {
24219
24262
  }
24220
24263
  //#endregion
24221
24264
  //#region src/core/index.ts
24222
- function WE(e) {
24223
- return gg(e, wE);
24265
+ function XE(e) {
24266
+ return gg(e, AE);
24224
24267
  }
24225
24268
  //#endregion
24226
- export { Zx as ApprovalBar, Am as CAPABILITIES, Nm as CONTEXT_PRESETS, CE as ChatDialog, Fg as ChatHeader, bS as ChatInput, cx as CodePreview, Wp as CompressDecisionSchema, cS as ConflictBar, rp as DEFAULT_SYSTEM_PROMPT, aE as DebugDrawer, Vg as FocusBar, Vb as HLJS_BLOCK_MAX_CHARS, jE as HTML_VOID_TAGS, Pd as HUMAN_CONFIRM_TOOL_NAME, Bl as MIN_CONTEXT_WINDOW, ux as MessageContent, jx as MessageList, wx as MessageRow, zx as QueuedBar, tf as STOP_WORDS, SE as SkillPanel, op as UNSAFE_KEYS, Kh as actionsToInspectInfo, Gh as actionsToTools, Nl as agentError, Zf as analyzeContext, yp as applyPatchToClone, bp as applyPatchToLive, Ml as asAgentError, ip as buildDataPrompt, ap as buildSystemPrompt, yg as chatContextKey, yh as commitSetToBind, np as connectMcp, x as constructLlmFromConfig, b as constructOpenLlmSync, vg as copyText, bu as createAgent, Nd as createApprovalMiddleware, bg as createChatContext, WE as createChatSdk, Wd as createCheckpointManager, Gd as createCheckpointMiddleware, nm as createConflictManager, Qf as createContextInspectorMiddleware, Dh as createDataOps, BE as createHtmlFormatCheck, UE as createHtmlSubagent, Ld as createHumanConfirmMiddleware, Id as createHumanConfirmTool, Cm as createMemoryBackend, Ed as createMemoryMiddleware, y as createProxyLlm, AE as createRagSubagent, ud as createSandboxRunner, Mm as createSdkEvents, lg as createSerialRunner, Dm as createSessionStore, ag as createSkillStore, Of as createSubagentMiddleware, ff as createSubagentTracker, jf as createSubagentsMiddleware, $h as createUsageHintsMiddleware, Mf as createVerifyMiddleware, Dp as createVfs, Tm as createWebStorageBackend, Rf as createWriteBackCheck, fp as deepClone, Yh as defineDataToolset, fd as defineSkill, Vp as defineTool, dp as deleteByPath, Gp as deriveTitle, Mu as describeSchemaNode, uu as detectGarbledToolCall, Cp as diffObjects, Nh as domToStructure, Fh as domTools, Jh as domToolsStatic, rf as estimateMessageTokens, af as estimateRoundTokens, Hl as estimateTokens, C as extractReasoningDelta, Qu as extractSchemaHint, $f as extractText, S as extractTextDelta, w as extractUsage, kh as fetchDocTools, qh as fetchTools, vh as filterByToolMode, Nu as formatConstraints, Ol as formatZodIssues, lp as getByPath, Ph as getDomTool, Rh as getEnvSummary, wu as getSchemaAtPath, xu as getSchemaTopKeys, Gl as getTraceMetrics, vp as hashValue, of as indexSummarize, Vh as inspectEnvTool, Hh as inspectTools, Kp as isChatModel, tu as isContextLengthError, Su as isPathAllowed, hm as isQuotaError, sp as isUnsafePath, qm as jpEval, Al as jsonParseError, hp as limitDepth, qb as markedToHtml, pp as maybeParseValue, T as normalizeUsage, Wl as offloadPassThroughChars, Ul as offloadThresholdChars, qu as presets, Eu as projectBySchema, Tu as projectBySchemaDeep, mp as projectFields, sf as recallRounds, Jb as renderMarkdownHtml, Pu as renderSchemaHint, Fu as renderSchemaOverview, Ru as renderSchemaShallow, jm as resolveCapabilities, Fm as resolveContextOptions, km as resolveDialogConfig, tm as resolveLlm, Vl as resolveModelCaps, Om as resolveStorage, Sp as restoreInPlace, xp as restoreLive, jl as routeError, dd as runHostScript, Zm as runSandboxedScript, cp as safeMerge, Lh as safeSerialize, gp as safeStringify, Ym as searchJson, Xh as selectBuiltinTools, up as setByPath, cf as shouldTriggerCompression, Ju as systemPromptHelpers, nf as tokenize, $ as toolError, Cu as unwrapSchema, _g as useChat, xg as useChatContext, PE as validateHtmlFormat, e as z, kl as zodError };
24269
+ export { rS as ApprovalBar, Am as CAPABILITIES, Nm as CONTEXT_PRESETS, kE as ChatDialog, Fg as ChatHeader, ES as ChatInput, px as CodePreview, Wp as CompressDecisionSchema, mS as ConflictBar, rp as DEFAULT_SYSTEM_PROMPT, dE as DebugDrawer, Vg as FocusBar, Kb as HLJS_BLOCK_MAX_CHARS, LE as HTML_VOID_TAGS, Pd as HUMAN_CONFIRM_TOOL_NAME, Bl as MIN_CONTEXT_WINDOW, hx as MessageContent, Lx as MessageList, kx as MessageRow, Gx as QueuedBar, tf as STOP_WORDS, OE as SkillPanel, op as UNSAFE_KEYS, Kh as actionsToInspectInfo, Gh as actionsToTools, Nl as agentError, Zf as analyzeContext, yp as applyPatchToClone, bp as applyPatchToLive, Ml as asAgentError, ip as buildDataPrompt, ap as buildSystemPrompt, yg as chatContextKey, yh as commitSetToBind, np as connectMcp, x as constructLlmFromConfig, b as constructOpenLlmSync, vg as copyText, bu as createAgent, Nd as createApprovalMiddleware, bg as createChatContext, XE as createChatSdk, Wd as createCheckpointManager, Gd as createCheckpointMiddleware, nm as createConflictManager, Qf as createContextInspectorMiddleware, Dh as createDataOps, KE as createHtmlFormatCheck, YE as createHtmlSubagent, Ld as createHumanConfirmMiddleware, Id as createHumanConfirmTool, Cm as createMemoryBackend, Ed as createMemoryMiddleware, y as createProxyLlm, IE as createRagSubagent, ud as createSandboxRunner, Mm as createSdkEvents, lg as createSerialRunner, Dm as createSessionStore, ag as createSkillStore, Of as createSubagentMiddleware, ff as createSubagentTracker, jf as createSubagentsMiddleware, $h as createUsageHintsMiddleware, Mf as createVerifyMiddleware, Dp as createVfs, Tm as createWebStorageBackend, Rf as createWriteBackCheck, fp as deepClone, Yh as defineDataToolset, fd as defineSkill, Vp as defineTool, dp as deleteByPath, Gp as deriveTitle, Mu as describeSchemaNode, uu as detectGarbledToolCall, Cp as diffObjects, Nh as domToStructure, Fh as domTools, Jh as domToolsStatic, rf as estimateMessageTokens, af as estimateRoundTokens, Hl as estimateTokens, C as extractReasoningDelta, Qu as extractSchemaHint, $f as extractText, S as extractTextDelta, w as extractUsage, kh as fetchDocTools, qh as fetchTools, vh as filterByToolMode, Nu as formatConstraints, Ol as formatZodIssues, lp as getByPath, Ph as getDomTool, Rh as getEnvSummary, wu as getSchemaAtPath, xu as getSchemaTopKeys, Gl as getTraceMetrics, vp as hashValue, of as indexSummarize, Vh as inspectEnvTool, Hh as inspectTools, Kp as isChatModel, tu as isContextLengthError, Su as isPathAllowed, hm as isQuotaError, sp as isUnsafePath, qm as jpEval, Al as jsonParseError, hp as limitDepth, Qb as markedToHtml, pp as maybeParseValue, T as normalizeUsage, Wl as offloadPassThroughChars, Ul as offloadThresholdChars, qu as presets, Eu as projectBySchema, Tu as projectBySchemaDeep, mp as projectFields, sf as recallRounds, $b as renderMarkdownHtml, Pu as renderSchemaHint, Fu as renderSchemaOverview, Ru as renderSchemaShallow, jm as resolveCapabilities, Fm as resolveContextOptions, km as resolveDialogConfig, tm as resolveLlm, Vl as resolveModelCaps, Om as resolveStorage, Sp as restoreInPlace, xp as restoreLive, jl as routeError, dd as runHostScript, Zm as runSandboxedScript, cp as safeMerge, Lh as safeSerialize, gp as safeStringify, Ym as searchJson, Xh as selectBuiltinTools, up as setByPath, cf as shouldTriggerCompression, Ju as systemPromptHelpers, nf as tokenize, $ as toolError, Cu as unwrapSchema, _g as useChat, xg as useChatContext, BE as validateHtmlFormat, e as z, kl as zodError };