page-agent-sdk 3.15.0 → 3.16.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.
- package/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/dist/page-agent-sdk.headless.js +3 -2
- package/dist/page-agent-sdk.iife.js +147 -144
- package/dist/page-agent-sdk.js +852 -759
- package/dist/page-agent-sdk.umd.cjs +35 -32
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/page-agent-sdk.js
CHANGED
|
@@ -5718,9 +5718,9 @@ var $u = {
|
|
|
5718
5718
|
function ed(e, t = "code") {
|
|
5719
5719
|
let n = `use_${e}`;
|
|
5720
5720
|
return [
|
|
5721
|
-
`【执行纪律(最重要)】收到代码组件任务后:**新建类直接委派**(追加组件无需通读/翻页现有数组,子 agent
|
|
5721
|
+
`【执行纪律(最重要)】收到代码组件任务后:**新建类直接委派**(追加组件无需通读/翻页现有数组,子 agent 自会采样一个组件看结构;**新建组件由子 agent 全权创建** —— 它自己把整个组件(含 ${t})写进数组,你不需要也不能替它创建/追加/落地代码)→ 修改类才 read 定位(by name)→ 调 ${n} 委派 → read 核对 → 回复用户。**中间绝不输出过渡性文字** —— 「我先看看…」「稍后委派」「接下来我会…」这类计划性回复等于任务没做就结束了(回复即本轮终止);所有调研和委派在本轮内连续完成,完成后才回复总结。`,
|
|
5722
5722
|
"【产物形态】每个组件是完整、自包含的 HTML 页面(含 style/script,可独立成页);你只负责委派和收尾,不关心宿主如何渲染(v-html / iframe / SFC 是集成方的事)。",
|
|
5723
|
-
`【主 agent 职责边界(硬规则)】禁止直接 read/write 代码组件的 ${t} 字段(read 只得 <code Nkb> 摘要没用;write 绕过 vfs/verify 危险)—— 生成/修改/排查代码一律经 ${n},收尾 read
|
|
5723
|
+
`【主 agent 职责边界(硬规则)】禁止直接 read/write 代码组件的 ${t} 字段(read 只得 <code Nkb> 摘要没用;write 绕过 vfs/verify 危险)—— 生成/修改/排查代码一律经 ${n},收尾 read 核对。**委派返回即已落地**:${n} 的结论说「已创建组件 X」= 组件已在数组里,**不要再 write/append 一遍**(子 agent 已自己创建,你再写 = 造出重复组件,还得花轮次删;真 LLM 实测踩过:主 agent 把返回的 code 又追加了一次 → 索引 8/9 重复)。核对方式 = read 该数组尾部(确认新组件存在 + name 唯一),仅此而已。`,
|
|
5724
5724
|
`【多组件委派(防上下文污染)】一次要多个组件:① write_todos 列出(每项 name + 要点)② **不同组件可在同一轮并行发多个 ${n} 委派**(每组件一次 ${n},task 只写该组件 name + 要点 + 主题/风格;每次委派是独立子 agent 实例,互不共享上下文);**同一组件同一时间只能有一个委派在途**,勿对同一组件同轮发两个委派 ③ 委派返回后逐个 read 核对(确认已生成 + 名称对)+ update_todo 标完成 ④ 主题/风格在每次 task 里转述(每个子 agent 全新上下文,不知其他组件)。一次 task 塞多个组件仍禁止(同一子 agent 共享上下文生成多个 → class/样式冲突污染);主 agent 自己的 write(普通组件属性)可与委派同轮发出,不必等委派返回。`,
|
|
5725
5725
|
`【委派 task 规格化(收窄子 agent 决策,防开放任务致装饰穷举)】委派 ${n} 的 task 必须含:① 组件定位(by name)② 视觉风格(配色/质感/字体;**给 1-2 个具体视觉锚** —— 主色 hex **取自平台 UI/设计规范 skill 的定义值**(有规范类 skill 先 load 再引用其 hex,勿凭页面观察自造近似色;无规范才自定,如「金黄 #F7C948」)、主体占比(如「杯高约画布 60%」)或装饰密度(如「仅 2 类背景装饰」)—— 细节空间收窄,子 agent 不在装饰细节上展开推演)③ 内容(文案/数据/图)④ 交互意图(动效/状态/触发)⑤ 历史偏好(可选):聊天上下文中有与该组件相关的用户历史偏好/反馈(如「用户偏好深色系」「上轮嫌动画太快」),提炼一句附 task 末尾(新子 agent 无记忆,全靠 task);**不含技术实现**(SVG vs CSS / keyframes vs transition 归子 agent 选)。❌「生成啤酒杯动画」→ ✅「啤酒杯倒酒(beer):金黄啤酒 #F7C948 从上方倒入透明杯(杯高约画布 60%),深绿背景,液体循环下落 2s,hover 杯子放大」。规格简练(4 要素各半句),远省子 agent 思考 token。`,
|
|
5726
5726
|
`【委派失败重试】${n} 返回乱码/内部标记(如 <|DSML|)/空结论或报错 = 子 agent 异常,**重新委派一次**(task 附「上次失败,这次先把代码写短些/分步」);连续两次失败才降级告知用户。**不要因此自己直接 write/edit ${t} 字段**(绕过 vfs/格式校验,且你拿不到规范全文)。`,
|
|
@@ -9011,6 +9011,7 @@ ${`- 输出形态:完整、自包含的 HTML 页面(.${r},可独立成页)`}
|
|
|
9011
9011
|
|
|
9012
9012
|
诚实交付:
|
|
9013
9013
|
- 按用户需求产出完整 HTML 页面。若某需求无法实现,结论简短说明(不展开权衡、不解释渲染原理)。禁止假装实现了未做到的特性。
|
|
9014
|
+
- **结论首行必须是落地声明**(主 agent 据此判定已完成,不再自己写):新建写「已创建组件 <name>(索引 N)」、修改写「已修改组件 <name>」;**结论里不要贴代码全文**(已写进 data,主 agent 贴了会诱发它再写一遍造成重复组件)。
|
|
9014
9015
|
- 收尾回复末尾附 1 行交接笔记(格式见文末「收口格式」,**必守**)。
|
|
9015
9016
|
|
|
9016
9017
|
工作方式:
|
|
@@ -14288,16 +14289,31 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14288
14289
|
}, $_ = {
|
|
14289
14290
|
key: 2,
|
|
14290
14291
|
class: "step-duration"
|
|
14291
|
-
}, ev = {
|
|
14292
|
+
}, ev = ["onClick"], tv = {
|
|
14293
|
+
key: 0,
|
|
14294
|
+
class: "step-detail"
|
|
14295
|
+
}, nv = {
|
|
14296
|
+
key: 0,
|
|
14297
|
+
class: "step-detail-call-label"
|
|
14298
|
+
}, rv = {
|
|
14292
14299
|
key: 1,
|
|
14300
|
+
class: "step-detail-section"
|
|
14301
|
+
}, iv = { class: "step-detail-head" }, av = ["onClick"], ov = { class: "step-detail-pre" }, sv = {
|
|
14302
|
+
key: 2,
|
|
14303
|
+
class: "step-detail-section"
|
|
14304
|
+
}, cv = { class: "step-detail-head" }, lv = ["onClick"], uv = {
|
|
14305
|
+
key: 3,
|
|
14306
|
+
class: "step-detail-empty"
|
|
14307
|
+
}, dv = {
|
|
14308
|
+
key: 2,
|
|
14293
14309
|
class: "step-children"
|
|
14294
|
-
},
|
|
14310
|
+
}, fv = { class: "step-name" }, pv = {
|
|
14295
14311
|
key: 0,
|
|
14296
14312
|
class: "step-count"
|
|
14297
|
-
},
|
|
14313
|
+
}, mv = {
|
|
14298
14314
|
key: 1,
|
|
14299
14315
|
class: "step-status running"
|
|
14300
|
-
},
|
|
14316
|
+
}, hv = 2e3, gv = 4e3, _v = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
14301
14317
|
__name: "MessageSteps",
|
|
14302
14318
|
props: { steps: {} },
|
|
14303
14319
|
setup(e) {
|
|
@@ -14309,12 +14325,13 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14309
14325
|
let t = [];
|
|
14310
14326
|
for (let n of e) {
|
|
14311
14327
|
let e = t.length ? t[t.length - 1] : null;
|
|
14312
|
-
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), n.subReasonFull && (e.subReasonFull = (e.subReasonFull || "") + n.subReasonFull)) : t.push({
|
|
14328
|
+
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), n.subReasonFull && (e.subReasonFull = (e.subReasonFull || "") + n.subReasonFull), e.calls.push(n)) : t.push({
|
|
14313
14329
|
name: n.name,
|
|
14314
14330
|
count: 1,
|
|
14315
14331
|
hasRunning: n.status === "running",
|
|
14316
14332
|
hasError: n.status === "error",
|
|
14317
14333
|
children: n.children?.length ? [...n.children] : [],
|
|
14334
|
+
calls: [n],
|
|
14318
14335
|
totalMs: n.durationMs ?? 0,
|
|
14319
14336
|
subReason: n.subReason,
|
|
14320
14337
|
subReasonFull: n.subReasonFull
|
|
@@ -14325,6 +14342,7 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14325
14342
|
count: e.count,
|
|
14326
14343
|
status: e.hasError ? "error" : e.hasRunning ? "running" : "done",
|
|
14327
14344
|
children: e.children,
|
|
14345
|
+
calls: e.calls,
|
|
14328
14346
|
durationMs: e.totalMs || void 0,
|
|
14329
14347
|
subReason: e.subReason,
|
|
14330
14348
|
subReasonFull: e.subReasonFull
|
|
@@ -14341,6 +14359,63 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14341
14359
|
}
|
|
14342
14360
|
return `${e}ms`;
|
|
14343
14361
|
}
|
|
14362
|
+
let s = /* @__PURE__ */ ln(/* @__PURE__ */ new Set()), c = 0, l = `s${++c}`, u = {
|
|
14363
|
+
has: (e) => s.has(`${l}:${e}`),
|
|
14364
|
+
toggle: (e) => {
|
|
14365
|
+
let t = `${l}:${e}`;
|
|
14366
|
+
s.has(t) ? s.delete(t) : (s.clear(), s.add(t));
|
|
14367
|
+
}
|
|
14368
|
+
};
|
|
14369
|
+
function d(e) {
|
|
14370
|
+
u.toggle(e);
|
|
14371
|
+
}
|
|
14372
|
+
function f(e) {
|
|
14373
|
+
return !!e?.some((e) => e.args != null || e.result != null);
|
|
14374
|
+
}
|
|
14375
|
+
function p(e) {
|
|
14376
|
+
if (e == null) return {
|
|
14377
|
+
text: "",
|
|
14378
|
+
truncated: !1
|
|
14379
|
+
};
|
|
14380
|
+
let t;
|
|
14381
|
+
try {
|
|
14382
|
+
t = typeof e == "string" ? e : JSON.stringify(e, null, 2);
|
|
14383
|
+
} catch {
|
|
14384
|
+
t = String(e);
|
|
14385
|
+
}
|
|
14386
|
+
return t.length > hv ? {
|
|
14387
|
+
text: t.slice(0, hv) + "\n…(展示截断,复制可得全量)",
|
|
14388
|
+
truncated: !0
|
|
14389
|
+
} : {
|
|
14390
|
+
text: t,
|
|
14391
|
+
truncated: !1
|
|
14392
|
+
};
|
|
14393
|
+
}
|
|
14394
|
+
function m(e) {
|
|
14395
|
+
return e == null || e === "" ? {
|
|
14396
|
+
text: "",
|
|
14397
|
+
truncated: !1
|
|
14398
|
+
} : e.length > gv ? {
|
|
14399
|
+
text: e.slice(0, gv) + "\n…(展示截断,复制可得全量)",
|
|
14400
|
+
truncated: !0
|
|
14401
|
+
} : {
|
|
14402
|
+
text: e,
|
|
14403
|
+
truncated: !1
|
|
14404
|
+
};
|
|
14405
|
+
}
|
|
14406
|
+
function h(e, t, n) {
|
|
14407
|
+
if (t && n != null) {
|
|
14408
|
+
let e;
|
|
14409
|
+
try {
|
|
14410
|
+
e = typeof n == "string" ? n : JSON.stringify(n, null, 2);
|
|
14411
|
+
} catch {
|
|
14412
|
+
e = String(n);
|
|
14413
|
+
}
|
|
14414
|
+
g_(e);
|
|
14415
|
+
return;
|
|
14416
|
+
}
|
|
14417
|
+
g_(e);
|
|
14418
|
+
}
|
|
14344
14419
|
return (t, s) => e.steps.length ? (Y(), X("div", J_, [(Y(!0), X(J, null, sa(i.value, (e, t) => (Y(), X("div", {
|
|
14345
14420
|
key: t,
|
|
14346
14421
|
class: H(["step-item", e.status])
|
|
@@ -14351,10 +14426,32 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14351
14426
|
a(e.name) ? (Y(), X("span", Z_, "🤖 子")) : Q("", !0),
|
|
14352
14427
|
e.count > 1 ? (Y(), X("span", Q_, "×" + U(e.count), 1)) : Q("", !0),
|
|
14353
14428
|
Z("span", { class: H(["step-status", e.status]) }, U(n(e.status)), 3),
|
|
14354
|
-
e.durationMs != null && e.status !== "running" ? (Y(), X("span", $_, U(o(e.durationMs)), 1)) : Q("", !0)
|
|
14429
|
+
e.durationMs != null && e.status !== "running" ? (Y(), X("span", $_, U(o(e.durationMs)), 1)) : Q("", !0),
|
|
14430
|
+
f(e.calls) ? (Y(), X("button", {
|
|
14431
|
+
key: 3,
|
|
14432
|
+
type: "button",
|
|
14433
|
+
class: H(["step-detail-toggle", { open: u.has(t) }]),
|
|
14434
|
+
onClick: (e) => d(t)
|
|
14435
|
+
}, U(u.has(t) ? "收起" : "展开"), 11, ev)) : Q("", !0)
|
|
14355
14436
|
]),
|
|
14437
|
+
u.has(t) && e.calls?.length ? (Y(), X("div", tv, [(Y(!0), X(J, null, sa(e.calls, (t, n) => (Y(), X("div", {
|
|
14438
|
+
key: n,
|
|
14439
|
+
class: "step-detail-call"
|
|
14440
|
+
}, [
|
|
14441
|
+
e.count > 1 ? (Y(), X("div", nv, "第 " + U(n + 1) + " 次", 1)) : Q("", !0),
|
|
14442
|
+
p(t.args).text ? (Y(), X("div", rv, [Z("div", iv, [s[0] ||= _s("入参", -1), Z("button", {
|
|
14443
|
+
type: "button",
|
|
14444
|
+
class: "step-detail-copy",
|
|
14445
|
+
onClick: (e) => h(p(t.args).text, p(t.args).truncated, t.args)
|
|
14446
|
+
}, "复制", 8, av)]), Z("pre", ov, U(p(t.args).text), 1)])) : Q("", !0),
|
|
14447
|
+
t.status !== "running" && m(t.result).text ? (Y(), X("div", sv, [Z("div", cv, [s[1] ||= _s("返回值", -1), Z("button", {
|
|
14448
|
+
type: "button",
|
|
14449
|
+
class: "step-detail-copy",
|
|
14450
|
+
onClick: (e) => h(m(t.result).text, m(t.result).truncated, t.result)
|
|
14451
|
+
}, "复制", 8, lv)]), Z("pre", { class: H(["step-detail-pre", { err: t.status === "error" }]) }, U(m(t.result).text), 3)])) : t.status !== "running" && !m(t.result).text ? (Y(), X("div", uv, "(无返回值)")) : Q("", !0)
|
|
14452
|
+
]))), 128))])) : Q("", !0),
|
|
14356
14453
|
e.subReason ? (Y(), as(q_, {
|
|
14357
|
-
key:
|
|
14454
|
+
key: 1,
|
|
14358
14455
|
"sub-reason": e.subReason,
|
|
14359
14456
|
"sub-reason-full": e.subReasonFull,
|
|
14360
14457
|
status: e.status
|
|
@@ -14363,21 +14460,21 @@ var b_ = { class: "chat-header" }, x_ = { class: "header-left" }, S_ = { class:
|
|
|
14363
14460
|
"sub-reason-full",
|
|
14364
14461
|
"status"
|
|
14365
14462
|
])) : Q("", !0),
|
|
14366
|
-
e.children && e.children.length ? (Y(), X("div",
|
|
14463
|
+
e.children && e.children.length ? (Y(), X("div", dv, [s[2] ||= Z("div", { class: "step-children-label" }, "🧬 子 agent 进度", -1), (Y(!0), X(J, null, sa(r(e.children), (e, t) => (Y(), X("div", {
|
|
14367
14464
|
key: t,
|
|
14368
14465
|
class: H(["step-child", e.status])
|
|
14369
14466
|
}, [
|
|
14370
14467
|
Z("span", { class: H(["status-dot sm", e.status]) }, null, 2),
|
|
14371
|
-
Z("span",
|
|
14372
|
-
e.count > 1 ? (Y(), X("span",
|
|
14373
|
-
e.status === "running" ? (Y(), X("span",
|
|
14468
|
+
Z("span", fv, U(e.name), 1),
|
|
14469
|
+
e.count > 1 ? (Y(), X("span", pv, "×" + U(e.count), 1)) : Q("", !0),
|
|
14470
|
+
e.status === "running" ? (Y(), X("span", mv, "…")) : Q("", !0)
|
|
14374
14471
|
], 2))), 128))])) : Q("", !0)
|
|
14375
14472
|
], 2))), 128))])) : Q("", !0);
|
|
14376
14473
|
}
|
|
14377
|
-
}), [["__scopeId", "data-v-
|
|
14474
|
+
}), [["__scopeId", "data-v-d4720585"]]);
|
|
14378
14475
|
//#endregion
|
|
14379
14476
|
//#region node_modules/marked/lib/marked.esm.js
|
|
14380
|
-
function
|
|
14477
|
+
function vv() {
|
|
14381
14478
|
return {
|
|
14382
14479
|
async: !1,
|
|
14383
14480
|
breaks: !1,
|
|
@@ -14391,35 +14488,35 @@ function av() {
|
|
|
14391
14488
|
walkTokens: null
|
|
14392
14489
|
};
|
|
14393
14490
|
}
|
|
14394
|
-
var
|
|
14395
|
-
function
|
|
14396
|
-
|
|
14491
|
+
var yv = vv();
|
|
14492
|
+
function bv(e) {
|
|
14493
|
+
yv = e;
|
|
14397
14494
|
}
|
|
14398
|
-
var
|
|
14399
|
-
function
|
|
14495
|
+
var xv = { exec: () => null };
|
|
14496
|
+
function Sv(e) {
|
|
14400
14497
|
let t = [];
|
|
14401
14498
|
return (n) => {
|
|
14402
14499
|
let r = Math.max(0, Math.min(3, n - 1)), i = t[r];
|
|
14403
14500
|
return i || (i = e(r), t[r] = i), i;
|
|
14404
14501
|
};
|
|
14405
14502
|
}
|
|
14406
|
-
function
|
|
14503
|
+
function Cv(e, t = "") {
|
|
14407
14504
|
let n = typeof e == "string" ? e : e.source, r = {
|
|
14408
14505
|
replace: (e, t) => {
|
|
14409
14506
|
let i = typeof t == "string" ? t : t.source;
|
|
14410
|
-
return i = i.replace(
|
|
14507
|
+
return i = i.replace(Tv.caret, "$1"), n = n.replace(e, i), r;
|
|
14411
14508
|
},
|
|
14412
14509
|
getRegex: () => new RegExp(n, t)
|
|
14413
14510
|
};
|
|
14414
14511
|
return r;
|
|
14415
14512
|
}
|
|
14416
|
-
var
|
|
14513
|
+
var wv = ((e = "") => {
|
|
14417
14514
|
try {
|
|
14418
14515
|
return !!RegExp("(?<=1)(?<!1)" + e);
|
|
14419
14516
|
} catch {
|
|
14420
14517
|
return !1;
|
|
14421
14518
|
}
|
|
14422
|
-
})(),
|
|
14519
|
+
})(), Tv = {
|
|
14423
14520
|
codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm,
|
|
14424
14521
|
outputLinkReplace: /\\([\[\]])/g,
|
|
14425
14522
|
indentCodeCompensation: /^(\s+)(?:```)/,
|
|
@@ -14470,121 +14567,121 @@ var dv = ((e = "") => {
|
|
|
14470
14567
|
notSpaceStart: /^\S*/,
|
|
14471
14568
|
endingNewline: /\n$/,
|
|
14472
14569
|
listItemRegex: (e) => RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),
|
|
14473
|
-
nextBulletRegex:
|
|
14474
|
-
hrRegex:
|
|
14475
|
-
fencesBeginRegex:
|
|
14476
|
-
headingBeginRegex:
|
|
14477
|
-
htmlBeginRegex:
|
|
14478
|
-
blockquoteBeginRegex:
|
|
14479
|
-
},
|
|
14480
|
-
blockquote:
|
|
14481
|
-
code:
|
|
14482
|
-
def:
|
|
14483
|
-
fences:
|
|
14484
|
-
heading:
|
|
14485
|
-
hr:
|
|
14486
|
-
html:
|
|
14487
|
-
lheading:
|
|
14488
|
-
list:
|
|
14489
|
-
newline:
|
|
14490
|
-
paragraph:
|
|
14491
|
-
table:
|
|
14492
|
-
text:
|
|
14493
|
-
},
|
|
14494
|
-
...
|
|
14495
|
-
lheading:
|
|
14496
|
-
table:
|
|
14497
|
-
paragraph:
|
|
14498
|
-
},
|
|
14499
|
-
...
|
|
14500
|
-
html:
|
|
14570
|
+
nextBulletRegex: Sv((e) => RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),
|
|
14571
|
+
hrRegex: Sv((e) => RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),
|
|
14572
|
+
fencesBeginRegex: Sv((e) => RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),
|
|
14573
|
+
headingBeginRegex: Sv((e) => RegExp(`^ {0,${e}}#`)),
|
|
14574
|
+
htmlBeginRegex: Sv((e) => RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")),
|
|
14575
|
+
blockquoteBeginRegex: Sv((e) => RegExp(`^ {0,${e}}>`))
|
|
14576
|
+
}, Ev = /^(?:[ \t]*(?:\n|$))+/, Dv = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Ov = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, kv = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Av = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, jv = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Mv = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Nv = Cv(Mv).replace(/bull/g, jv).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(), Pv = Cv(Mv).replace(/bull/g, jv).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(), Fv = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Iv = /^[^\n]+/, Lv = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Rv = Cv(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Lv).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), zv = Cv(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, jv).getRegex(), Bv = "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", Vv = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Hv = Cv("^ {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", Vv).replace("tag", Bv).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Uv = (e) => Cv(Fv).replace("hr", kv).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", Bv).getRegex(), Wv = Uv(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Gv = Uv(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/), Kv = {
|
|
14577
|
+
blockquote: Cv(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Gv).getRegex(),
|
|
14578
|
+
code: Dv,
|
|
14579
|
+
def: Rv,
|
|
14580
|
+
fences: Ov,
|
|
14581
|
+
heading: Av,
|
|
14582
|
+
hr: kv,
|
|
14583
|
+
html: Hv,
|
|
14584
|
+
lheading: Nv,
|
|
14585
|
+
list: zv,
|
|
14586
|
+
newline: Ev,
|
|
14587
|
+
paragraph: Wv,
|
|
14588
|
+
table: xv,
|
|
14589
|
+
text: Iv
|
|
14590
|
+
}, qv = Cv("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", kv).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", Bv).getRegex(), Jv = {
|
|
14591
|
+
...Kv,
|
|
14592
|
+
lheading: Pv,
|
|
14593
|
+
table: qv,
|
|
14594
|
+
paragraph: Cv(Fv).replace("hr", kv).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", qv).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", Bv).getRegex()
|
|
14595
|
+
}, Yv = {
|
|
14596
|
+
...Kv,
|
|
14597
|
+
html: Cv("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment", Vv).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(),
|
|
14501
14598
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
14502
14599
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
14503
|
-
fences:
|
|
14600
|
+
fences: xv,
|
|
14504
14601
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
14505
|
-
paragraph:
|
|
14506
|
-
},
|
|
14507
|
-
_backpedal:
|
|
14508
|
-
anyPunctuation:
|
|
14509
|
-
autolink:
|
|
14510
|
-
blockSkip:
|
|
14511
|
-
br:
|
|
14512
|
-
code:
|
|
14513
|
-
del:
|
|
14514
|
-
delLDelim:
|
|
14515
|
-
delRDelim:
|
|
14516
|
-
emStrongLDelim:
|
|
14517
|
-
emStrongRDelimAst:
|
|
14518
|
-
emStrongRDelimUnd:
|
|
14519
|
-
escape:
|
|
14520
|
-
link:
|
|
14521
|
-
nolink:
|
|
14522
|
-
punctuation:
|
|
14523
|
-
reflink:
|
|
14524
|
-
reflinkSearch:
|
|
14525
|
-
tag:
|
|
14526
|
-
text:
|
|
14527
|
-
url:
|
|
14528
|
-
},
|
|
14529
|
-
...
|
|
14530
|
-
link:
|
|
14531
|
-
reflink:
|
|
14532
|
-
},
|
|
14533
|
-
...
|
|
14534
|
-
emStrongRDelimAst:
|
|
14535
|
-
emStrongLDelim:
|
|
14536
|
-
delLDelim:
|
|
14537
|
-
delRDelim:
|
|
14538
|
-
url:
|
|
14602
|
+
paragraph: Cv(Fv).replace("hr", kv).replace("heading", " *#{1,6} *[^\n]").replace("lheading", Nv).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
14603
|
+
}, Xv = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Zv = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Qv = /^( {2,}|\\)\n(?!\s*$)/, $v = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ey = /[\p{P}\p{S}]/u, ty = /[\s\p{P}\p{S}]/u, ny = /[^\s\p{P}\p{S}]/u, ry = Cv(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, ty).getRegex(), iy = /(?!~)[\p{P}\p{S}]/u, ay = /(?!~)[\s\p{P}\p{S}]/u, oy = /(?:[^\s\p{P}\p{S}]|~)/u, sy = Cv(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", wv ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), cy = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ly = Cv(cy, "u").replace(/punct/g, ey).getRegex(), uy = Cv(cy, "u").replace(/punct/g, iy).getRegex(), dy = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", fy = Cv(dy, "gu").replace(/notPunctSpace/g, ny).replace(/punctSpace/g, ty).replace(/punct/g, ey).getRegex(), py = Cv(dy, "gu").replace(/notPunctSpace/g, oy).replace(/punctSpace/g, ay).replace(/punct/g, iy).getRegex(), my = Cv("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, ny).replace(/punctSpace/g, ty).replace(/punct/g, ey).getRegex(), hy = Cv(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, ey).getRegex(), gy = Cv("^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", "gu").replace(/notPunctSpace/g, ny).replace(/punctSpace/g, ty).replace(/punct/g, ey).getRegex(), _y = Cv(/\\(punct)/, "gu").replace(/punct/g, ey).getRegex(), vy = Cv(/^<(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(), yy = Cv(Vv).replace("(?:-->|$)", "-->").getRegex(), by = Cv("^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", yy).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xy = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Sy = Cv(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", xy).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Cy = Cv(/^!?\[(label)\]\[(ref)\]/).replace("label", xy).replace("ref", Lv).getRegex(), wy = Cv(/^!?\[(ref)\](?:\[\])?/).replace("ref", Lv).getRegex(), Ty = Cv("reflink|nolink(?!\\()", "g").replace("reflink", Cy).replace("nolink", wy).getRegex(), Ey = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Dy = {
|
|
14604
|
+
_backpedal: xv,
|
|
14605
|
+
anyPunctuation: _y,
|
|
14606
|
+
autolink: vy,
|
|
14607
|
+
blockSkip: sy,
|
|
14608
|
+
br: Qv,
|
|
14609
|
+
code: Zv,
|
|
14610
|
+
del: xv,
|
|
14611
|
+
delLDelim: xv,
|
|
14612
|
+
delRDelim: xv,
|
|
14613
|
+
emStrongLDelim: ly,
|
|
14614
|
+
emStrongRDelimAst: fy,
|
|
14615
|
+
emStrongRDelimUnd: my,
|
|
14616
|
+
escape: Xv,
|
|
14617
|
+
link: Sy,
|
|
14618
|
+
nolink: wy,
|
|
14619
|
+
punctuation: ry,
|
|
14620
|
+
reflink: Cy,
|
|
14621
|
+
reflinkSearch: Ty,
|
|
14622
|
+
tag: by,
|
|
14623
|
+
text: $v,
|
|
14624
|
+
url: xv
|
|
14625
|
+
}, Oy = {
|
|
14626
|
+
...Dy,
|
|
14627
|
+
link: Cv(/^!?\[(label)\]\((.*?)\)/).replace("label", xy).getRegex(),
|
|
14628
|
+
reflink: Cv(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", xy).getRegex()
|
|
14629
|
+
}, ky = {
|
|
14630
|
+
...Dy,
|
|
14631
|
+
emStrongRDelimAst: py,
|
|
14632
|
+
emStrongLDelim: uy,
|
|
14633
|
+
delLDelim: hy,
|
|
14634
|
+
delRDelim: gy,
|
|
14635
|
+
url: Cv(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ey).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
14539
14636
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
14540
14637
|
del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,
|
|
14541
|
-
text:
|
|
14542
|
-
},
|
|
14543
|
-
...
|
|
14544
|
-
br:
|
|
14545
|
-
text:
|
|
14546
|
-
},
|
|
14547
|
-
normal:
|
|
14548
|
-
gfm:
|
|
14549
|
-
pedantic:
|
|
14550
|
-
},
|
|
14551
|
-
normal:
|
|
14552
|
-
gfm:
|
|
14553
|
-
breaks:
|
|
14554
|
-
pedantic:
|
|
14555
|
-
},
|
|
14638
|
+
text: Cv(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ey).getRegex()
|
|
14639
|
+
}, Ay = {
|
|
14640
|
+
...ky,
|
|
14641
|
+
br: Cv(Qv).replace("{2,}", "*").getRegex(),
|
|
14642
|
+
text: Cv(ky.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
14643
|
+
}, jy = {
|
|
14644
|
+
normal: Kv,
|
|
14645
|
+
gfm: Jv,
|
|
14646
|
+
pedantic: Yv
|
|
14647
|
+
}, My = {
|
|
14648
|
+
normal: Dy,
|
|
14649
|
+
gfm: ky,
|
|
14650
|
+
breaks: Ay,
|
|
14651
|
+
pedantic: Oy
|
|
14652
|
+
}, Ny = {
|
|
14556
14653
|
"&": "&",
|
|
14557
14654
|
"<": "<",
|
|
14558
14655
|
">": ">",
|
|
14559
14656
|
"\"": """,
|
|
14560
14657
|
"'": "'"
|
|
14561
|
-
},
|
|
14562
|
-
function
|
|
14658
|
+
}, Py = (e) => Ny[e];
|
|
14659
|
+
function Fy(e, t) {
|
|
14563
14660
|
if (t) {
|
|
14564
|
-
if (
|
|
14565
|
-
} else if (
|
|
14661
|
+
if (Tv.escapeTest.test(e)) return e.replace(Tv.escapeReplace, Py);
|
|
14662
|
+
} else if (Tv.escapeTestNoEncode.test(e)) return e.replace(Tv.escapeReplaceNoEncode, Py);
|
|
14566
14663
|
return e;
|
|
14567
14664
|
}
|
|
14568
|
-
function
|
|
14665
|
+
function Iy(e) {
|
|
14569
14666
|
try {
|
|
14570
|
-
e = encodeURI(e).replace(
|
|
14667
|
+
e = encodeURI(e).replace(Tv.percentDecode, "%");
|
|
14571
14668
|
} catch {
|
|
14572
14669
|
return null;
|
|
14573
14670
|
}
|
|
14574
14671
|
return e;
|
|
14575
14672
|
}
|
|
14576
|
-
function
|
|
14577
|
-
let n = e.replace(
|
|
14673
|
+
function Ly(e, t) {
|
|
14674
|
+
let n = e.replace(Tv.findPipe, (e, t, n) => {
|
|
14578
14675
|
let r = !1, i = t;
|
|
14579
14676
|
for (; --i >= 0 && n[i] === "\\";) r = !r;
|
|
14580
14677
|
return r ? "|" : " |";
|
|
14581
|
-
}).split(
|
|
14678
|
+
}).split(Tv.splitPipe), r = 0;
|
|
14582
14679
|
if (n[0].trim() || n.shift(), n.length > 0 && !n.at(-1)?.trim() && n.pop(), t) if (n.length > t) n.splice(t);
|
|
14583
14680
|
else for (; n.length < t;) n.push("");
|
|
14584
|
-
for (; r < n.length; r++) n[r] = n[r].trim().replace(
|
|
14681
|
+
for (; r < n.length; r++) n[r] = n[r].trim().replace(Tv.slashPipe, "|");
|
|
14585
14682
|
return n;
|
|
14586
14683
|
}
|
|
14587
|
-
function
|
|
14684
|
+
function Ry(e, t, n) {
|
|
14588
14685
|
let r = e.length;
|
|
14589
14686
|
if (r === 0) return "";
|
|
14590
14687
|
let i = 0;
|
|
@@ -14596,12 +14693,12 @@ function Ty(e, t, n) {
|
|
|
14596
14693
|
}
|
|
14597
14694
|
return e.slice(0, r - i);
|
|
14598
14695
|
}
|
|
14599
|
-
function
|
|
14696
|
+
function zy(e) {
|
|
14600
14697
|
let t = e.split("\n"), n = t.length - 1;
|
|
14601
|
-
for (; n >= 0 &&
|
|
14698
|
+
for (; n >= 0 && Tv.blankLine.test(t[n]);) n--;
|
|
14602
14699
|
return t.length - n <= 2 ? e : t.slice(0, n + 1).join("\n");
|
|
14603
14700
|
}
|
|
14604
|
-
function
|
|
14701
|
+
function By(e, t) {
|
|
14605
14702
|
if (e.indexOf(t[1]) === -1) return -1;
|
|
14606
14703
|
let n = 0;
|
|
14607
14704
|
for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
|
|
@@ -14609,7 +14706,7 @@ function Dy(e, t) {
|
|
|
14609
14706
|
else if (e[r] === t[1] && (n--, n < 0)) return r;
|
|
14610
14707
|
return n > 0 ? -2 : -1;
|
|
14611
14708
|
}
|
|
14612
|
-
function
|
|
14709
|
+
function Vy(e, t = 0) {
|
|
14613
14710
|
let n = t, r = "";
|
|
14614
14711
|
for (let t of e) if (t === " ") {
|
|
14615
14712
|
let e = 4 - n % 4;
|
|
@@ -14617,7 +14714,7 @@ function Oy(e, t = 0) {
|
|
|
14617
14714
|
} else r += t, n++;
|
|
14618
14715
|
return r;
|
|
14619
14716
|
}
|
|
14620
|
-
function
|
|
14717
|
+
function Hy(e, t, n, r, i) {
|
|
14621
14718
|
let a = t.href, o = t.title || null, s = e[1].replace(i.other.outputLinkReplace, "$1");
|
|
14622
14719
|
r.state.inLink = !0;
|
|
14623
14720
|
let c = {
|
|
@@ -14630,7 +14727,7 @@ function ky(e, t, n, r, i) {
|
|
|
14630
14727
|
};
|
|
14631
14728
|
return r.state.inLink = !1, c;
|
|
14632
14729
|
}
|
|
14633
|
-
function
|
|
14730
|
+
function Uy(e, t, n) {
|
|
14634
14731
|
let r = e.match(n.other.indentCodeCompensation);
|
|
14635
14732
|
if (r === null) return t;
|
|
14636
14733
|
let i = r[1];
|
|
@@ -14641,12 +14738,12 @@ function Ay(e, t, n) {
|
|
|
14641
14738
|
return r.length >= i.length ? e.slice(i.length) : e;
|
|
14642
14739
|
}).join("\n");
|
|
14643
14740
|
}
|
|
14644
|
-
var
|
|
14741
|
+
var Wy = class {
|
|
14645
14742
|
options;
|
|
14646
14743
|
rules;
|
|
14647
14744
|
lexer;
|
|
14648
14745
|
constructor(e) {
|
|
14649
|
-
this.options = e ||
|
|
14746
|
+
this.options = e || yv;
|
|
14650
14747
|
}
|
|
14651
14748
|
space(e) {
|
|
14652
14749
|
let t = this.rules.block.newline.exec(e);
|
|
@@ -14658,7 +14755,7 @@ var jy = class {
|
|
|
14658
14755
|
code(e) {
|
|
14659
14756
|
let t = this.rules.block.code.exec(e);
|
|
14660
14757
|
if (t) {
|
|
14661
|
-
let e = this.options.pedantic ? t[0] :
|
|
14758
|
+
let e = this.options.pedantic ? t[0] : zy(t[0]);
|
|
14662
14759
|
return {
|
|
14663
14760
|
type: "code",
|
|
14664
14761
|
raw: e,
|
|
@@ -14670,7 +14767,7 @@ var jy = class {
|
|
|
14670
14767
|
fences(e) {
|
|
14671
14768
|
let t = this.rules.block.fences.exec(e);
|
|
14672
14769
|
if (t) {
|
|
14673
|
-
let e = t[0], n =
|
|
14770
|
+
let e = t[0], n = Uy(e, t[3] || "", this.rules);
|
|
14674
14771
|
return {
|
|
14675
14772
|
type: "code",
|
|
14676
14773
|
raw: e,
|
|
@@ -14684,12 +14781,12 @@ var jy = class {
|
|
|
14684
14781
|
if (t) {
|
|
14685
14782
|
let e = t[2].trim();
|
|
14686
14783
|
if (this.rules.other.endingHash.test(e)) {
|
|
14687
|
-
let t =
|
|
14784
|
+
let t = Ry(e, "#");
|
|
14688
14785
|
(this.options.pedantic || !t || this.rules.other.endingSpaceChar.test(t)) && (e = t.trim());
|
|
14689
14786
|
}
|
|
14690
14787
|
return {
|
|
14691
14788
|
type: "heading",
|
|
14692
|
-
raw:
|
|
14789
|
+
raw: Ry(t[0], "\n"),
|
|
14693
14790
|
depth: t[1].length,
|
|
14694
14791
|
text: e,
|
|
14695
14792
|
tokens: this.lexer.inline(e)
|
|
@@ -14700,13 +14797,13 @@ var jy = class {
|
|
|
14700
14797
|
let t = this.rules.block.hr.exec(e);
|
|
14701
14798
|
if (t) return {
|
|
14702
14799
|
type: "hr",
|
|
14703
|
-
raw:
|
|
14800
|
+
raw: Ry(t[0], "\n")
|
|
14704
14801
|
};
|
|
14705
14802
|
}
|
|
14706
14803
|
blockquote(e) {
|
|
14707
14804
|
let t = this.rules.block.blockquote.exec(e);
|
|
14708
14805
|
if (t) {
|
|
14709
|
-
let e =
|
|
14806
|
+
let e = Ry(t[0], "\n").split("\n"), n = "", r = "", i = [];
|
|
14710
14807
|
for (; e.length > 0;) {
|
|
14711
14808
|
let t = !1, a = [], o;
|
|
14712
14809
|
for (o = 0; o < e.length; o++) if (this.rules.other.blockquoteStart.test(e[o])) a.push(e[o]), t = !0;
|
|
@@ -14756,7 +14853,7 @@ ${c}` : c;
|
|
|
14756
14853
|
let n = !1, r = "", s = "";
|
|
14757
14854
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e)) break;
|
|
14758
14855
|
r = t[0], e = e.substring(r.length);
|
|
14759
|
-
let c =
|
|
14856
|
+
let c = Vy(t[2].split("\n", 1)[0], t[1].length), l = e.split("\n", 1)[0], u = !c.trim(), d = 0;
|
|
14760
14857
|
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) {
|
|
14761
14858
|
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);
|
|
14762
14859
|
for (; e;) {
|
|
@@ -14822,7 +14919,7 @@ ${c}` : c;
|
|
|
14822
14919
|
html(e) {
|
|
14823
14920
|
let t = this.rules.block.html.exec(e);
|
|
14824
14921
|
if (t) {
|
|
14825
|
-
let e =
|
|
14922
|
+
let e = zy(t[0]);
|
|
14826
14923
|
return {
|
|
14827
14924
|
type: "html",
|
|
14828
14925
|
block: !0,
|
|
@@ -14839,7 +14936,7 @@ ${c}` : c;
|
|
|
14839
14936
|
return {
|
|
14840
14937
|
type: "def",
|
|
14841
14938
|
tag: e,
|
|
14842
|
-
raw:
|
|
14939
|
+
raw: Ry(t[0], "\n"),
|
|
14843
14940
|
href: n,
|
|
14844
14941
|
title: r
|
|
14845
14942
|
};
|
|
@@ -14848,9 +14945,9 @@ ${c}` : c;
|
|
|
14848
14945
|
table(e) {
|
|
14849
14946
|
let t = this.rules.block.table.exec(e);
|
|
14850
14947
|
if (!t || !this.rules.other.tableDelimiter.test(t[2])) return;
|
|
14851
|
-
let n =
|
|
14948
|
+
let n = Ly(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 = {
|
|
14852
14949
|
type: "table",
|
|
14853
|
-
raw:
|
|
14950
|
+
raw: Ry(t[0], "\n"),
|
|
14854
14951
|
header: [],
|
|
14855
14952
|
align: [],
|
|
14856
14953
|
rows: []
|
|
@@ -14863,7 +14960,7 @@ ${c}` : c;
|
|
|
14863
14960
|
header: !0,
|
|
14864
14961
|
align: a.align[e]
|
|
14865
14962
|
});
|
|
14866
|
-
for (let e of i) a.rows.push(
|
|
14963
|
+
for (let e of i) a.rows.push(Ly(e, a.header.length).map((e, t) => ({
|
|
14867
14964
|
text: e,
|
|
14868
14965
|
tokens: this.lexer.inline(e),
|
|
14869
14966
|
header: !1,
|
|
@@ -14878,7 +14975,7 @@ ${c}` : c;
|
|
|
14878
14975
|
let e = t[1].trim();
|
|
14879
14976
|
return {
|
|
14880
14977
|
type: "heading",
|
|
14881
|
-
raw:
|
|
14978
|
+
raw: Ry(t[0], "\n"),
|
|
14882
14979
|
depth: t[2].charAt(0) === "=" ? 1 : 2,
|
|
14883
14980
|
text: e,
|
|
14884
14981
|
tokens: this.lexer.inline(e)
|
|
@@ -14931,10 +15028,10 @@ ${c}` : c;
|
|
|
14931
15028
|
let e = t[2].trim();
|
|
14932
15029
|
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(e)) {
|
|
14933
15030
|
if (!this.rules.other.endAngleBracket.test(e)) return;
|
|
14934
|
-
let t =
|
|
15031
|
+
let t = Ry(e.slice(0, -1), "\\");
|
|
14935
15032
|
if ((e.length - t.length) % 2 == 0) return;
|
|
14936
15033
|
} else {
|
|
14937
|
-
let e =
|
|
15034
|
+
let e = By(t[2], "()");
|
|
14938
15035
|
if (e === -2) return;
|
|
14939
15036
|
if (e > -1) {
|
|
14940
15037
|
let n = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + e;
|
|
@@ -14946,7 +15043,7 @@ ${c}` : c;
|
|
|
14946
15043
|
let e = this.rules.other.pedanticHrefTitle.exec(n);
|
|
14947
15044
|
e && (n = e[1], r = e[3]);
|
|
14948
15045
|
} else r = t[3] ? t[3].slice(1, -1) : "";
|
|
14949
|
-
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)),
|
|
15046
|
+
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)), Hy(t, {
|
|
14950
15047
|
href: n && n.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
14951
15048
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
14952
15049
|
}, t[0], this.lexer, this.rules);
|
|
@@ -14964,7 +15061,7 @@ ${c}` : c;
|
|
|
14964
15061
|
text: e
|
|
14965
15062
|
};
|
|
14966
15063
|
}
|
|
14967
|
-
return
|
|
15064
|
+
return Hy(n, e, n[0], this.lexer, this.rules);
|
|
14968
15065
|
}
|
|
14969
15066
|
}
|
|
14970
15067
|
emStrong(e, t, n = "") {
|
|
@@ -15096,29 +15193,29 @@ ${c}` : c;
|
|
|
15096
15193
|
};
|
|
15097
15194
|
}
|
|
15098
15195
|
}
|
|
15099
|
-
},
|
|
15196
|
+
}, Gy = class e {
|
|
15100
15197
|
tokens;
|
|
15101
15198
|
options;
|
|
15102
15199
|
state;
|
|
15103
15200
|
inlineQueue;
|
|
15104
15201
|
tokenizer;
|
|
15105
15202
|
constructor(e) {
|
|
15106
|
-
this.tokens = [], this.tokens.links = Object.create(null), this.options = e ||
|
|
15203
|
+
this.tokens = [], this.tokens.links = Object.create(null), this.options = e || yv, this.options.tokenizer = this.options.tokenizer || new Wy(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
15107
15204
|
inLink: !1,
|
|
15108
15205
|
inRawBlock: !1,
|
|
15109
15206
|
top: !0
|
|
15110
15207
|
};
|
|
15111
15208
|
let t = {
|
|
15112
|
-
other:
|
|
15113
|
-
block:
|
|
15114
|
-
inline:
|
|
15209
|
+
other: Tv,
|
|
15210
|
+
block: jy.normal,
|
|
15211
|
+
inline: My.normal
|
|
15115
15212
|
};
|
|
15116
|
-
this.options.pedantic ? (t.block =
|
|
15213
|
+
this.options.pedantic ? (t.block = jy.pedantic, t.inline = My.pedantic) : this.options.gfm && (t.block = jy.gfm, this.options.breaks ? t.inline = My.breaks : t.inline = My.gfm), this.tokenizer.rules = t;
|
|
15117
15214
|
}
|
|
15118
15215
|
static get rules() {
|
|
15119
15216
|
return {
|
|
15120
|
-
block:
|
|
15121
|
-
inline:
|
|
15217
|
+
block: jy,
|
|
15218
|
+
inline: My
|
|
15122
15219
|
};
|
|
15123
15220
|
}
|
|
15124
15221
|
static lex(t, n) {
|
|
@@ -15128,7 +15225,7 @@ ${c}` : c;
|
|
|
15128
15225
|
return new e(n).inlineTokens(t);
|
|
15129
15226
|
}
|
|
15130
15227
|
lex(e) {
|
|
15131
|
-
e = e.replace(
|
|
15228
|
+
e = e.replace(Tv.carriageReturn, "\n"), this.blockTokens(e, this.tokens);
|
|
15132
15229
|
for (let e = 0; e < this.inlineQueue.length; e++) {
|
|
15133
15230
|
let t = this.inlineQueue[e];
|
|
15134
15231
|
this.inlineTokens(t.src, t.tokens);
|
|
@@ -15136,7 +15233,7 @@ ${c}` : c;
|
|
|
15136
15233
|
return this.inlineQueue = [], this.tokens;
|
|
15137
15234
|
}
|
|
15138
15235
|
blockTokens(e, t = [], n = !1) {
|
|
15139
|
-
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(
|
|
15236
|
+
this.tokenizer.lexer = this, this.options.pedantic && (e = e.replace(Tv.tabCharGlobal, " ").replace(Tv.spaceLine, ""));
|
|
15140
15237
|
let r = Infinity;
|
|
15141
15238
|
for (; e;) {
|
|
15142
15239
|
if (e.length < r) r = e.length;
|
|
@@ -15318,18 +15415,18 @@ ${c}` : c;
|
|
|
15318
15415
|
if (this.options.silent) console.error(t);
|
|
15319
15416
|
else throw Error(t);
|
|
15320
15417
|
}
|
|
15321
|
-
},
|
|
15418
|
+
}, Ky = class {
|
|
15322
15419
|
options;
|
|
15323
15420
|
parser;
|
|
15324
15421
|
constructor(e) {
|
|
15325
|
-
this.options = e ||
|
|
15422
|
+
this.options = e || yv;
|
|
15326
15423
|
}
|
|
15327
15424
|
space(e) {
|
|
15328
15425
|
return "";
|
|
15329
15426
|
}
|
|
15330
15427
|
code({ text: e, lang: t, escaped: n }) {
|
|
15331
|
-
let r = (t || "").match(
|
|
15332
|
-
return r ? "<pre><code class=\"language-" +
|
|
15428
|
+
let r = (t || "").match(Tv.notSpaceStart)?.[0], i = e.replace(Tv.endingNewline, "") + "\n";
|
|
15429
|
+
return r ? "<pre><code class=\"language-" + Fy(r) + "\">" + (n ? i : Fy(i, !0)) + "</code></pre>\n" : "<pre><code>" + (n ? i : Fy(i, !0)) + "</code></pre>\n";
|
|
15333
15430
|
}
|
|
15334
15431
|
blockquote({ tokens: e }) {
|
|
15335
15432
|
return `<blockquote>
|
|
@@ -15399,7 +15496,7 @@ ${e}</tr>
|
|
|
15399
15496
|
return `<em>${this.parser.parseInline(e)}</em>`;
|
|
15400
15497
|
}
|
|
15401
15498
|
codespan({ text: e }) {
|
|
15402
|
-
return `<code>${
|
|
15499
|
+
return `<code>${Fy(e, !0)}</code>`;
|
|
15403
15500
|
}
|
|
15404
15501
|
br(e) {
|
|
15405
15502
|
return "<br>";
|
|
@@ -15408,24 +15505,24 @@ ${e}</tr>
|
|
|
15408
15505
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
15409
15506
|
}
|
|
15410
15507
|
link({ href: e, title: t, tokens: n }) {
|
|
15411
|
-
let r = this.parser.parseInline(n), i =
|
|
15508
|
+
let r = this.parser.parseInline(n), i = Iy(e);
|
|
15412
15509
|
if (i === null) return r;
|
|
15413
15510
|
e = i;
|
|
15414
15511
|
let a = "<a href=\"" + e + "\"";
|
|
15415
|
-
return t && (a += " title=\"" +
|
|
15512
|
+
return t && (a += " title=\"" + Fy(t) + "\""), a += ">" + r + "</a>", a;
|
|
15416
15513
|
}
|
|
15417
15514
|
image({ href: e, title: t, text: n, tokens: r }) {
|
|
15418
15515
|
r && (n = this.parser.parseInline(r, this.parser.textRenderer));
|
|
15419
|
-
let i =
|
|
15420
|
-
if (i === null) return
|
|
15516
|
+
let i = Iy(e);
|
|
15517
|
+
if (i === null) return Fy(n);
|
|
15421
15518
|
e = i;
|
|
15422
|
-
let a = `<img src="${e}" alt="${
|
|
15423
|
-
return t && (a += ` title="${
|
|
15519
|
+
let a = `<img src="${e}" alt="${Fy(n)}"`;
|
|
15520
|
+
return t && (a += ` title="${Fy(t)}"`), a += ">", a;
|
|
15424
15521
|
}
|
|
15425
15522
|
text(e) {
|
|
15426
|
-
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text :
|
|
15523
|
+
return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : Fy(e.text);
|
|
15427
15524
|
}
|
|
15428
|
-
},
|
|
15525
|
+
}, qy = class {
|
|
15429
15526
|
strong({ text: e }) {
|
|
15430
15527
|
return e;
|
|
15431
15528
|
}
|
|
@@ -15456,12 +15553,12 @@ ${e}</tr>
|
|
|
15456
15553
|
checkbox({ raw: e }) {
|
|
15457
15554
|
return e;
|
|
15458
15555
|
}
|
|
15459
|
-
},
|
|
15556
|
+
}, Jy = class e {
|
|
15460
15557
|
options;
|
|
15461
15558
|
renderer;
|
|
15462
15559
|
textRenderer;
|
|
15463
15560
|
constructor(e) {
|
|
15464
|
-
this.options = e ||
|
|
15561
|
+
this.options = e || yv, this.options.renderer = this.options.renderer || new Ky(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new qy();
|
|
15465
15562
|
}
|
|
15466
15563
|
static parse(t, n) {
|
|
15467
15564
|
return new e(n).parse(t);
|
|
@@ -15607,11 +15704,11 @@ ${e}</tr>
|
|
|
15607
15704
|
}
|
|
15608
15705
|
return n;
|
|
15609
15706
|
}
|
|
15610
|
-
},
|
|
15707
|
+
}, Yy = class {
|
|
15611
15708
|
options;
|
|
15612
15709
|
block;
|
|
15613
15710
|
constructor(e) {
|
|
15614
|
-
this.options = e ||
|
|
15711
|
+
this.options = e || yv;
|
|
15615
15712
|
}
|
|
15616
15713
|
static passThroughHooks = /* @__PURE__ */ new Set([
|
|
15617
15714
|
"preprocess",
|
|
@@ -15637,22 +15734,22 @@ ${e}</tr>
|
|
|
15637
15734
|
return e;
|
|
15638
15735
|
}
|
|
15639
15736
|
provideLexer(e = this.block) {
|
|
15640
|
-
return e ?
|
|
15737
|
+
return e ? Gy.lex : Gy.lexInline;
|
|
15641
15738
|
}
|
|
15642
15739
|
provideParser(e = this.block) {
|
|
15643
|
-
return e ?
|
|
15740
|
+
return e ? Jy.parse : Jy.parseInline;
|
|
15644
15741
|
}
|
|
15645
|
-
},
|
|
15646
|
-
defaults =
|
|
15742
|
+
}, Xy = new class {
|
|
15743
|
+
defaults = vv();
|
|
15647
15744
|
options = this.setOptions;
|
|
15648
15745
|
parse = this.parseMarkdown(!0);
|
|
15649
15746
|
parseInline = this.parseMarkdown(!1);
|
|
15650
|
-
Parser =
|
|
15651
|
-
Renderer =
|
|
15652
|
-
TextRenderer =
|
|
15653
|
-
Lexer =
|
|
15654
|
-
Tokenizer =
|
|
15655
|
-
Hooks =
|
|
15747
|
+
Parser = Jy;
|
|
15748
|
+
Renderer = Ky;
|
|
15749
|
+
TextRenderer = qy;
|
|
15750
|
+
Lexer = Gy;
|
|
15751
|
+
Tokenizer = Wy;
|
|
15752
|
+
Hooks = Yy;
|
|
15656
15753
|
constructor(...e) {
|
|
15657
15754
|
this.use(...e);
|
|
15658
15755
|
}
|
|
@@ -15703,7 +15800,7 @@ ${e}</tr>
|
|
|
15703
15800
|
}
|
|
15704
15801
|
"childTokens" in e && e.childTokens && (t.childTokens[e.name] = e.childTokens);
|
|
15705
15802
|
}), n.extensions = t), e.renderer) {
|
|
15706
|
-
let t = this.defaults.renderer || new
|
|
15803
|
+
let t = this.defaults.renderer || new Ky(this.defaults);
|
|
15707
15804
|
for (let n in e.renderer) {
|
|
15708
15805
|
if (!(n in t)) throw Error(`renderer '${n}' does not exist`);
|
|
15709
15806
|
if (["options", "parser"].includes(n)) continue;
|
|
@@ -15716,7 +15813,7 @@ ${e}</tr>
|
|
|
15716
15813
|
n.renderer = t;
|
|
15717
15814
|
}
|
|
15718
15815
|
if (e.tokenizer) {
|
|
15719
|
-
let t = this.defaults.tokenizer || new
|
|
15816
|
+
let t = this.defaults.tokenizer || new Wy(this.defaults);
|
|
15720
15817
|
for (let n in e.tokenizer) {
|
|
15721
15818
|
if (!(n in t)) throw Error(`tokenizer '${n}' does not exist`);
|
|
15722
15819
|
if ([
|
|
@@ -15733,13 +15830,13 @@ ${e}</tr>
|
|
|
15733
15830
|
n.tokenizer = t;
|
|
15734
15831
|
}
|
|
15735
15832
|
if (e.hooks) {
|
|
15736
|
-
let t = this.defaults.hooks || new
|
|
15833
|
+
let t = this.defaults.hooks || new Yy();
|
|
15737
15834
|
for (let n in e.hooks) {
|
|
15738
15835
|
if (!(n in t)) throw Error(`hook '${n}' does not exist`);
|
|
15739
15836
|
if (["options", "block"].includes(n)) continue;
|
|
15740
15837
|
let r = n, i = e.hooks[r], a = t[r];
|
|
15741
|
-
|
|
15742
|
-
if (this.defaults.async &&
|
|
15838
|
+
Yy.passThroughHooks.has(n) ? t[r] = (e) => {
|
|
15839
|
+
if (this.defaults.async && Yy.passThroughHooksRespectAsync.has(n)) return (async () => {
|
|
15743
15840
|
let n = await i.call(t, e);
|
|
15744
15841
|
return a.call(t, n);
|
|
15745
15842
|
})();
|
|
@@ -15776,10 +15873,10 @@ ${e}</tr>
|
|
|
15776
15873
|
}, this;
|
|
15777
15874
|
}
|
|
15778
15875
|
lexer(e, t) {
|
|
15779
|
-
return
|
|
15876
|
+
return Gy.lex(e, t ?? this.defaults);
|
|
15780
15877
|
}
|
|
15781
15878
|
parser(e, t) {
|
|
15782
|
-
return
|
|
15879
|
+
return Jy.parse(e, t ?? this.defaults);
|
|
15783
15880
|
}
|
|
15784
15881
|
parseMarkdown(e) {
|
|
15785
15882
|
return (t, n) => {
|
|
@@ -15791,16 +15888,16 @@ ${e}</tr>
|
|
|
15791
15888
|
if (typeof t > "u" || t === null) return a(/* @__PURE__ */ Error("marked(): input parameter is undefined or null"));
|
|
15792
15889
|
if (typeof t != "string") return a(/* @__PURE__ */ Error("marked(): input parameter is of type " + Object.prototype.toString.call(t) + ", string expected"));
|
|
15793
15890
|
if (i.hooks && (i.hooks.options = i, i.hooks.block = e), i.async) return (async () => {
|
|
15794
|
-
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ?
|
|
15891
|
+
let n = i.hooks ? await i.hooks.preprocess(t) : t, r = await (i.hooks ? await i.hooks.provideLexer(e) : e ? Gy.lex : Gy.lexInline)(n, i), a = i.hooks ? await i.hooks.processAllTokens(r) : r;
|
|
15795
15892
|
i.walkTokens && await Promise.all(this.walkTokens(a, i.walkTokens));
|
|
15796
|
-
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ?
|
|
15893
|
+
let o = await (i.hooks ? await i.hooks.provideParser(e) : e ? Jy.parse : Jy.parseInline)(a, i);
|
|
15797
15894
|
return i.hooks ? await i.hooks.postprocess(o) : o;
|
|
15798
15895
|
})().catch(a);
|
|
15799
15896
|
try {
|
|
15800
15897
|
i.hooks && (t = i.hooks.preprocess(t));
|
|
15801
|
-
let n = (i.hooks ? i.hooks.provideLexer(e) : e ?
|
|
15898
|
+
let n = (i.hooks ? i.hooks.provideLexer(e) : e ? Gy.lex : Gy.lexInline)(t, i);
|
|
15802
15899
|
i.hooks && (n = i.hooks.processAllTokens(n)), i.walkTokens && this.walkTokens(n, i.walkTokens);
|
|
15803
|
-
let r = (i.hooks ? i.hooks.provideParser(e) : e ?
|
|
15900
|
+
let r = (i.hooks ? i.hooks.provideParser(e) : e ? Jy.parse : Jy.parseInline)(n, i);
|
|
15804
15901
|
return i.hooks && (r = i.hooks.postprocess(r)), r;
|
|
15805
15902
|
} catch (e) {
|
|
15806
15903
|
return a(e);
|
|
@@ -15810,7 +15907,7 @@ ${e}</tr>
|
|
|
15810
15907
|
onError(e, t) {
|
|
15811
15908
|
return (n) => {
|
|
15812
15909
|
if (n.message += "\nPlease report this to https://github.com/markedjs/marked.", e) {
|
|
15813
|
-
let e = "<p>An error occurred:</p><pre>" +
|
|
15910
|
+
let e = "<p>An error occurred:</p><pre>" + Fy(n.message + "", !0) + "</pre>";
|
|
15814
15911
|
return t ? Promise.resolve(e) : e;
|
|
15815
15912
|
}
|
|
15816
15913
|
if (t) return Promise.reject(n);
|
|
@@ -15818,19 +15915,19 @@ ${e}</tr>
|
|
|
15818
15915
|
};
|
|
15819
15916
|
}
|
|
15820
15917
|
}();
|
|
15821
|
-
function
|
|
15822
|
-
return
|
|
15823
|
-
}
|
|
15824
|
-
|
|
15825
|
-
return
|
|
15826
|
-
},
|
|
15827
|
-
return
|
|
15828
|
-
},
|
|
15829
|
-
return
|
|
15830
|
-
},
|
|
15918
|
+
function Zy(e, t) {
|
|
15919
|
+
return Xy.parse(e, t);
|
|
15920
|
+
}
|
|
15921
|
+
Zy.options = Zy.setOptions = function(e) {
|
|
15922
|
+
return Xy.setOptions(e), Zy.defaults = Xy.defaults, bv(Zy.defaults), Zy;
|
|
15923
|
+
}, Zy.getDefaults = vv, Zy.defaults = yv, Zy.use = function(...e) {
|
|
15924
|
+
return Xy.use(...e), Zy.defaults = Xy.defaults, bv(Zy.defaults), Zy;
|
|
15925
|
+
}, Zy.walkTokens = function(e, t) {
|
|
15926
|
+
return Xy.walkTokens(e, t);
|
|
15927
|
+
}, Zy.parseInline = Xy.parseInline, Zy.Parser = Jy, Zy.parser = Jy.parse, Zy.Renderer = Ky, Zy.TextRenderer = qy, Zy.Lexer = Gy, Zy.lexer = Gy.lex, Zy.Tokenizer = Wy, Zy.Hooks = Yy, Zy.parse = Zy, Zy.options, Zy.setOptions, Zy.use, Zy.walkTokens, Zy.parseInline, Jy.parse, Gy.lex;
|
|
15831
15928
|
//#endregion
|
|
15832
15929
|
//#region node_modules/highlight.js/lib/core.js
|
|
15833
|
-
var
|
|
15930
|
+
var Qy = /* @__PURE__ */ h(((e, t) => {
|
|
15834
15931
|
function n(e) {
|
|
15835
15932
|
return e instanceof Map ? e.clear = e.delete = e.set = function() {
|
|
15836
15933
|
throw Error("map is read-only");
|
|
@@ -16671,7 +16768,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
16671
16768
|
return Object.assign(e, L), e;
|
|
16672
16769
|
}, je = Ae({});
|
|
16673
16770
|
je.newInstance = () => Ae({}), t.exports = je, je.HighlightJS = je, je.default = je;
|
|
16674
|
-
})),
|
|
16771
|
+
})), $y = /* @__PURE__ */ h(((e, t) => {
|
|
16675
16772
|
function n(e) {
|
|
16676
16773
|
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 = {
|
|
16677
16774
|
className: "symbol",
|
|
@@ -16836,7 +16933,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
16836
16933
|
};
|
|
16837
16934
|
}
|
|
16838
16935
|
t.exports = n;
|
|
16839
|
-
})),
|
|
16936
|
+
})), eb = /* @__PURE__ */ h(((e, t) => {
|
|
16840
16937
|
function n(e) {
|
|
16841
16938
|
let t = e.regex, n = {}, r = {
|
|
16842
16939
|
begin: /\$\{/,
|
|
@@ -17004,7 +17101,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17004
17101
|
};
|
|
17005
17102
|
}
|
|
17006
17103
|
t.exports = n;
|
|
17007
|
-
})),
|
|
17104
|
+
})), tb = /* @__PURE__ */ h(((e, t) => {
|
|
17008
17105
|
function n(e) {
|
|
17009
17106
|
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 = {
|
|
17010
17107
|
className: "type",
|
|
@@ -17179,7 +17276,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17179
17276
|
};
|
|
17180
17277
|
}
|
|
17181
17278
|
t.exports = n;
|
|
17182
|
-
})),
|
|
17279
|
+
})), nb = /* @__PURE__ */ h(((e, t) => {
|
|
17183
17280
|
function n(e) {
|
|
17184
17281
|
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 = {
|
|
17185
17282
|
className: "type",
|
|
@@ -17403,7 +17500,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17403
17500
|
};
|
|
17404
17501
|
}
|
|
17405
17502
|
t.exports = n;
|
|
17406
|
-
})),
|
|
17503
|
+
})), rb = /* @__PURE__ */ h(((e, t) => {
|
|
17407
17504
|
function n(e) {
|
|
17408
17505
|
let t = [
|
|
17409
17506
|
"bool",
|
|
@@ -17662,7 +17759,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17662
17759
|
};
|
|
17663
17760
|
}
|
|
17664
17761
|
t.exports = n;
|
|
17665
|
-
})),
|
|
17762
|
+
})), ib = /* @__PURE__ */ h(((e, t) => {
|
|
17666
17763
|
var n = (e) => ({
|
|
17667
17764
|
IMPORTANT: {
|
|
17668
17765
|
scope: "meta",
|
|
@@ -17801,7 +17898,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17801
17898
|
};
|
|
17802
17899
|
}
|
|
17803
17900
|
t.exports = u;
|
|
17804
|
-
})),
|
|
17901
|
+
})), ab = /* @__PURE__ */ h(((e, t) => {
|
|
17805
17902
|
function n(e) {
|
|
17806
17903
|
let t = e.regex, n = {
|
|
17807
17904
|
begin: /<\/?[A-Za-z_]/,
|
|
@@ -17981,7 +18078,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
17981
18078
|
};
|
|
17982
18079
|
}
|
|
17983
18080
|
t.exports = n;
|
|
17984
|
-
})),
|
|
18081
|
+
})), ob = /* @__PURE__ */ h(((e, t) => {
|
|
17985
18082
|
function n(e) {
|
|
17986
18083
|
let t = e.regex;
|
|
17987
18084
|
return {
|
|
@@ -18019,7 +18116,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18019
18116
|
};
|
|
18020
18117
|
}
|
|
18021
18118
|
t.exports = n;
|
|
18022
|
-
})),
|
|
18119
|
+
})), sb = /* @__PURE__ */ h(((e, t) => {
|
|
18023
18120
|
function n(e) {
|
|
18024
18121
|
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 = {
|
|
18025
18122
|
"variable.constant": [
|
|
@@ -18280,7 +18377,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18280
18377
|
};
|
|
18281
18378
|
}
|
|
18282
18379
|
t.exports = n;
|
|
18283
|
-
})),
|
|
18380
|
+
})), cb = /* @__PURE__ */ h(((e, t) => {
|
|
18284
18381
|
function n(e) {
|
|
18285
18382
|
let t = {
|
|
18286
18383
|
keyword: [
|
|
@@ -18419,7 +18516,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18419
18516
|
};
|
|
18420
18517
|
}
|
|
18421
18518
|
t.exports = n;
|
|
18422
|
-
})),
|
|
18519
|
+
})), lb = /* @__PURE__ */ h(((e, t) => {
|
|
18423
18520
|
function n(e) {
|
|
18424
18521
|
let t = e.regex;
|
|
18425
18522
|
return {
|
|
@@ -18485,7 +18582,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18485
18582
|
};
|
|
18486
18583
|
}
|
|
18487
18584
|
t.exports = n;
|
|
18488
|
-
})),
|
|
18585
|
+
})), ub = /* @__PURE__ */ h(((e, t) => {
|
|
18489
18586
|
function n(e) {
|
|
18490
18587
|
let t = e.regex, n = {
|
|
18491
18588
|
className: "number",
|
|
@@ -18572,7 +18669,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18572
18669
|
};
|
|
18573
18670
|
}
|
|
18574
18671
|
t.exports = n;
|
|
18575
|
-
})),
|
|
18672
|
+
})), db = /* @__PURE__ */ h(((e, t) => {
|
|
18576
18673
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
18577
18674
|
className: "number",
|
|
18578
18675
|
variants: [
|
|
@@ -18740,7 +18837,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
18740
18837
|
};
|
|
18741
18838
|
}
|
|
18742
18839
|
t.exports = s;
|
|
18743
|
-
})),
|
|
18840
|
+
})), fb = /* @__PURE__ */ h(((e, t) => {
|
|
18744
18841
|
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 = [
|
|
18745
18842
|
"true",
|
|
18746
18843
|
"false",
|
|
@@ -19175,7 +19272,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19175
19272
|
};
|
|
19176
19273
|
}
|
|
19177
19274
|
t.exports = u;
|
|
19178
|
-
})),
|
|
19275
|
+
})), pb = /* @__PURE__ */ h(((e, t) => {
|
|
19179
19276
|
function n(e) {
|
|
19180
19277
|
let t = {
|
|
19181
19278
|
className: "attr",
|
|
@@ -19210,7 +19307,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19210
19307
|
};
|
|
19211
19308
|
}
|
|
19212
19309
|
t.exports = n;
|
|
19213
|
-
})),
|
|
19310
|
+
})), mb = /* @__PURE__ */ h(((e, t) => {
|
|
19214
19311
|
var n = "[0-9](_*[0-9])*", r = `\\.(${n})`, i = "[0-9a-fA-F](_*[0-9a-fA-F])*", a = {
|
|
19215
19312
|
className: "number",
|
|
19216
19313
|
variants: [
|
|
@@ -19410,7 +19507,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19410
19507
|
};
|
|
19411
19508
|
}
|
|
19412
19509
|
t.exports = o;
|
|
19413
|
-
})),
|
|
19510
|
+
})), hb = /* @__PURE__ */ h(((e, t) => {
|
|
19414
19511
|
var n = (e) => ({
|
|
19415
19512
|
IMPORTANT: {
|
|
19416
19513
|
scope: "meta",
|
|
@@ -19601,7 +19698,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19601
19698
|
};
|
|
19602
19699
|
}
|
|
19603
19700
|
t.exports = d;
|
|
19604
|
-
})),
|
|
19701
|
+
})), gb = /* @__PURE__ */ h(((e, t) => {
|
|
19605
19702
|
function n(e) {
|
|
19606
19703
|
let t = "\\[=*\\[", n = "\\]=*\\]", r = {
|
|
19607
19704
|
begin: t,
|
|
@@ -19646,7 +19743,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19646
19743
|
};
|
|
19647
19744
|
}
|
|
19648
19745
|
t.exports = n;
|
|
19649
|
-
})),
|
|
19746
|
+
})), _b = /* @__PURE__ */ h(((e, t) => {
|
|
19650
19747
|
function n(e) {
|
|
19651
19748
|
let t = {
|
|
19652
19749
|
className: "variable",
|
|
@@ -19702,7 +19799,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19702
19799
|
};
|
|
19703
19800
|
}
|
|
19704
19801
|
t.exports = n;
|
|
19705
|
-
})),
|
|
19802
|
+
})), vb = /* @__PURE__ */ h(((e, t) => {
|
|
19706
19803
|
function n(e) {
|
|
19707
19804
|
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 = {
|
|
19708
19805
|
$pattern: /[\w.]+/,
|
|
@@ -19893,7 +19990,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
19893
19990
|
};
|
|
19894
19991
|
}
|
|
19895
19992
|
t.exports = n;
|
|
19896
|
-
})),
|
|
19993
|
+
})), yb = /* @__PURE__ */ h(((e, t) => {
|
|
19897
19994
|
function n(e) {
|
|
19898
19995
|
let t = {
|
|
19899
19996
|
className: "built_in",
|
|
@@ -20009,7 +20106,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20009
20106
|
};
|
|
20010
20107
|
}
|
|
20011
20108
|
t.exports = n;
|
|
20012
|
-
})),
|
|
20109
|
+
})), bb = /* @__PURE__ */ h(((e, t) => {
|
|
20013
20110
|
function n(e) {
|
|
20014
20111
|
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 = {
|
|
20015
20112
|
scope: "variable",
|
|
@@ -20302,7 +20399,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20302
20399
|
};
|
|
20303
20400
|
}
|
|
20304
20401
|
t.exports = n;
|
|
20305
|
-
})),
|
|
20402
|
+
})), xb = /* @__PURE__ */ h(((e, t) => {
|
|
20306
20403
|
function n(e) {
|
|
20307
20404
|
return {
|
|
20308
20405
|
name: "PHP template",
|
|
@@ -20344,7 +20441,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20344
20441
|
};
|
|
20345
20442
|
}
|
|
20346
20443
|
t.exports = n;
|
|
20347
|
-
})),
|
|
20444
|
+
})), Sb = /* @__PURE__ */ h(((e, t) => {
|
|
20348
20445
|
function n(e) {
|
|
20349
20446
|
return {
|
|
20350
20447
|
name: "Plain text",
|
|
@@ -20353,7 +20450,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20353
20450
|
};
|
|
20354
20451
|
}
|
|
20355
20452
|
t.exports = n;
|
|
20356
|
-
})),
|
|
20453
|
+
})), Cb = /* @__PURE__ */ h(((e, t) => {
|
|
20357
20454
|
function n(e) {
|
|
20358
20455
|
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 = {
|
|
20359
20456
|
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
@@ -20590,7 +20687,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20590
20687
|
};
|
|
20591
20688
|
}
|
|
20592
20689
|
t.exports = n;
|
|
20593
|
-
})),
|
|
20690
|
+
})), wb = /* @__PURE__ */ h(((e, t) => {
|
|
20594
20691
|
function n(e) {
|
|
20595
20692
|
return {
|
|
20596
20693
|
aliases: ["pycon"],
|
|
@@ -20608,7 +20705,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20608
20705
|
};
|
|
20609
20706
|
}
|
|
20610
20707
|
t.exports = n;
|
|
20611
|
-
})),
|
|
20708
|
+
})), Tb = /* @__PURE__ */ h(((e, t) => {
|
|
20612
20709
|
function n(e) {
|
|
20613
20710
|
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(/[()]/, /[{}]/, /\[\[/, /[[\]]/, /\\/, /,/);
|
|
20614
20711
|
return {
|
|
@@ -20747,7 +20844,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20747
20844
|
};
|
|
20748
20845
|
}
|
|
20749
20846
|
t.exports = n;
|
|
20750
|
-
})),
|
|
20847
|
+
})), Eb = /* @__PURE__ */ h(((e, t) => {
|
|
20751
20848
|
function n(e) {
|
|
20752
20849
|
let t = e.regex, n = /(r#)?/, r = t.concat(n, e.UNDERSCORE_IDENT_RE), i = t.concat(n, e.IDENT_RE), a = {
|
|
20753
20850
|
className: "title.function.invoke",
|
|
@@ -20915,7 +21012,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
20915
21012
|
};
|
|
20916
21013
|
}
|
|
20917
21014
|
t.exports = n;
|
|
20918
|
-
})),
|
|
21015
|
+
})), Db = /* @__PURE__ */ h(((e, t) => {
|
|
20919
21016
|
var n = (e) => ({
|
|
20920
21017
|
IMPORTANT: {
|
|
20921
21018
|
scope: "meta",
|
|
@@ -21064,7 +21161,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21064
21161
|
};
|
|
21065
21162
|
}
|
|
21066
21163
|
t.exports = u;
|
|
21067
|
-
})),
|
|
21164
|
+
})), Ob = /* @__PURE__ */ h(((e, t) => {
|
|
21068
21165
|
function n(e) {
|
|
21069
21166
|
return {
|
|
21070
21167
|
name: "Shell Session",
|
|
@@ -21080,7 +21177,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21080
21177
|
};
|
|
21081
21178
|
}
|
|
21082
21179
|
t.exports = n;
|
|
21083
|
-
})),
|
|
21180
|
+
})), kb = /* @__PURE__ */ h(((e, t) => {
|
|
21084
21181
|
function n(e) {
|
|
21085
21182
|
let t = e.regex, n = e.COMMENT("--", "$"), r = {
|
|
21086
21183
|
scope: "string",
|
|
@@ -21197,7 +21294,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21197
21294
|
};
|
|
21198
21295
|
}
|
|
21199
21296
|
t.exports = n;
|
|
21200
|
-
})),
|
|
21297
|
+
})), Ab = /* @__PURE__ */ h(((e, t) => {
|
|
21201
21298
|
function n(e) {
|
|
21202
21299
|
return e ? typeof e == "string" ? e : e.source : null;
|
|
21203
21300
|
}
|
|
@@ -21770,7 +21867,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21770
21867
|
};
|
|
21771
21868
|
}
|
|
21772
21869
|
t.exports = T;
|
|
21773
|
-
})),
|
|
21870
|
+
})), jb = /* @__PURE__ */ h(((e, t) => {
|
|
21774
21871
|
function n(e) {
|
|
21775
21872
|
let t = "true false yes no null", n = {
|
|
21776
21873
|
className: "attr",
|
|
@@ -21913,7 +22010,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
21913
22010
|
};
|
|
21914
22011
|
}
|
|
21915
22012
|
t.exports = n;
|
|
21916
|
-
})),
|
|
22013
|
+
})), Mb = /* @__PURE__ */ h(((e, t) => {
|
|
21917
22014
|
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 = [
|
|
21918
22015
|
"true",
|
|
21919
22016
|
"false",
|
|
@@ -22433,7 +22530,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
22433
22530
|
}), a;
|
|
22434
22531
|
}
|
|
22435
22532
|
t.exports = d;
|
|
22436
|
-
})),
|
|
22533
|
+
})), Nb = /* @__PURE__ */ h(((e, t) => {
|
|
22437
22534
|
function n(e) {
|
|
22438
22535
|
let t = e.regex, n = {
|
|
22439
22536
|
className: "string",
|
|
@@ -22501,7 +22598,7 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
22501
22598
|
};
|
|
22502
22599
|
}
|
|
22503
22600
|
t.exports = n;
|
|
22504
|
-
})),
|
|
22601
|
+
})), Pb = /* @__PURE__ */ h(((e, t) => {
|
|
22505
22602
|
function n(e) {
|
|
22506
22603
|
e.regex;
|
|
22507
22604
|
let t = e.COMMENT(/\(;/, /;\)/);
|
|
@@ -22563,21 +22660,21 @@ var zy = /* @__PURE__ */ h(((e, t) => {
|
|
|
22563
22660
|
};
|
|
22564
22661
|
}
|
|
22565
22662
|
t.exports = n;
|
|
22566
|
-
})),
|
|
22567
|
-
var n =
|
|
22568
|
-
n.registerLanguage("xml",
|
|
22663
|
+
})), Fb = (/* @__PURE__ */ _((/* @__PURE__ */ h(((e, t) => {
|
|
22664
|
+
var n = Qy();
|
|
22665
|
+
n.registerLanguage("xml", $y()), n.registerLanguage("bash", eb()), n.registerLanguage("c", tb()), n.registerLanguage("cpp", nb()), n.registerLanguage("csharp", rb()), n.registerLanguage("css", ib()), n.registerLanguage("markdown", ab()), n.registerLanguage("diff", ob()), n.registerLanguage("ruby", sb()), n.registerLanguage("go", cb()), n.registerLanguage("graphql", lb()), n.registerLanguage("ini", ub()), n.registerLanguage("java", db()), n.registerLanguage("javascript", fb()), n.registerLanguage("json", pb()), n.registerLanguage("kotlin", mb()), n.registerLanguage("less", hb()), n.registerLanguage("lua", gb()), n.registerLanguage("makefile", _b()), n.registerLanguage("perl", vb()), n.registerLanguage("objectivec", yb()), n.registerLanguage("php", bb()), n.registerLanguage("php-template", xb()), n.registerLanguage("plaintext", Sb()), n.registerLanguage("python", Cb()), n.registerLanguage("python-repl", wb()), n.registerLanguage("r", Tb()), n.registerLanguage("rust", Eb()), n.registerLanguage("scss", Db()), n.registerLanguage("shell", Ob()), n.registerLanguage("sql", kb()), n.registerLanguage("swift", Ab()), n.registerLanguage("yaml", jb()), n.registerLanguage("typescript", Mb()), n.registerLanguage("vbnet", Nb()), n.registerLanguage("wasm", Pb()), n.HighlightJS = n, n.default = n, t.exports = n;
|
|
22569
22666
|
})))())).default;
|
|
22570
22667
|
//#endregion
|
|
22571
22668
|
//#region node_modules/dompurify/dist/purify.es.mjs
|
|
22572
|
-
function
|
|
22669
|
+
function Ib(e, t) {
|
|
22573
22670
|
(t == null || t > e.length) && (t = e.length);
|
|
22574
22671
|
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
|
|
22575
22672
|
return r;
|
|
22576
22673
|
}
|
|
22577
|
-
function
|
|
22674
|
+
function Lb(e) {
|
|
22578
22675
|
if (Array.isArray(e)) return e;
|
|
22579
22676
|
}
|
|
22580
|
-
function
|
|
22677
|
+
function Rb(e, t) {
|
|
22581
22678
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
22582
22679
|
if (n != null) {
|
|
22583
22680
|
var r, i, a, o, s = [], c = !0, l = !1;
|
|
@@ -22595,113 +22692,113 @@ function Tb(e, t) {
|
|
|
22595
22692
|
return s;
|
|
22596
22693
|
}
|
|
22597
22694
|
}
|
|
22598
|
-
function
|
|
22695
|
+
function zb() {
|
|
22599
22696
|
throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
22600
22697
|
}
|
|
22601
|
-
function
|
|
22602
|
-
return
|
|
22698
|
+
function Bb(e, t) {
|
|
22699
|
+
return Lb(e) || Rb(e, t) || Vb(e, t) || zb();
|
|
22603
22700
|
}
|
|
22604
|
-
function
|
|
22701
|
+
function Vb(e, t) {
|
|
22605
22702
|
if (e) {
|
|
22606
|
-
if (typeof e == "string") return
|
|
22703
|
+
if (typeof e == "string") return Ib(e, t);
|
|
22607
22704
|
var n = {}.toString.call(e).slice(8, -1);
|
|
22608
|
-
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) ?
|
|
22705
|
+
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) ? Ib(e, t) : void 0;
|
|
22609
22706
|
}
|
|
22610
22707
|
}
|
|
22611
|
-
var
|
|
22612
|
-
|
|
22708
|
+
var Hb = Object.entries, Ub = Object.setPrototypeOf, Wb = Object.isFrozen, Gb = Object.getPrototypeOf, Kb = Object.getOwnPropertyDescriptor, qb = Object.freeze, Jb = Object.seal, Yb = Object.create, Xb = typeof Reflect < "u" && Reflect, Zb = Xb.apply, Qb = Xb.construct;
|
|
22709
|
+
qb ||= function(e) {
|
|
22613
22710
|
return e;
|
|
22614
|
-
},
|
|
22711
|
+
}, Jb ||= function(e) {
|
|
22615
22712
|
return e;
|
|
22616
|
-
},
|
|
22713
|
+
}, Zb ||= function(e, t) {
|
|
22617
22714
|
var n = [...arguments].slice(2);
|
|
22618
22715
|
return e.apply(t, n);
|
|
22619
|
-
},
|
|
22716
|
+
}, Qb ||= function(e) {
|
|
22620
22717
|
return new e(...[...arguments].slice(1));
|
|
22621
22718
|
};
|
|
22622
|
-
var
|
|
22623
|
-
function
|
|
22719
|
+
var $b = yx(Array.prototype.forEach), ex = yx(Array.prototype.lastIndexOf), tx = yx(Array.prototype.pop), nx = yx(Array.prototype.push), rx = yx(Array.prototype.splice), ix = Array.isArray, ax = yx(String.prototype.toLowerCase), ox = yx(String.prototype.toString), sx = yx(String.prototype.match), cx = yx(String.prototype.replace), lx = yx(String.prototype.indexOf), ux = yx(String.prototype.trim), dx = yx(Number.prototype.toString), fx = yx(Boolean.prototype.toString), px = typeof BigInt > "u" ? null : yx(BigInt.prototype.toString), mx = typeof Symbol > "u" ? null : yx(Symbol.prototype.toString), hx = yx(Object.prototype.hasOwnProperty), gx = yx(Object.prototype.toString), _x = yx(RegExp.prototype.test), vx = bx(TypeError);
|
|
22720
|
+
function yx(e) {
|
|
22624
22721
|
return function(t) {
|
|
22625
22722
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
22626
22723
|
var n = [...arguments].slice(1);
|
|
22627
|
-
return
|
|
22724
|
+
return Zb(e, t, n);
|
|
22628
22725
|
};
|
|
22629
22726
|
}
|
|
22630
|
-
function
|
|
22727
|
+
function bx(e) {
|
|
22631
22728
|
return function() {
|
|
22632
|
-
return
|
|
22729
|
+
return Qb(e, [...arguments]);
|
|
22633
22730
|
};
|
|
22634
22731
|
}
|
|
22635
|
-
function
|
|
22636
|
-
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
22637
|
-
if (
|
|
22732
|
+
function xx(e, t) {
|
|
22733
|
+
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ax;
|
|
22734
|
+
if (Ub && Ub(e, null), !ix(t)) return e;
|
|
22638
22735
|
let r = t.length;
|
|
22639
22736
|
for (; r--;) {
|
|
22640
22737
|
let i = t[r];
|
|
22641
22738
|
if (typeof i == "string") {
|
|
22642
22739
|
let e = n(i);
|
|
22643
|
-
e !== i && (
|
|
22740
|
+
e !== i && (Wb(t) || (t[r] = e), i = e);
|
|
22644
22741
|
}
|
|
22645
22742
|
e[i] = !0;
|
|
22646
22743
|
}
|
|
22647
22744
|
return e;
|
|
22648
22745
|
}
|
|
22649
|
-
function
|
|
22650
|
-
for (let t = 0; t < e.length; t++)
|
|
22746
|
+
function Sx(e) {
|
|
22747
|
+
for (let t = 0; t < e.length; t++) hx(e, t) || (e[t] = null);
|
|
22651
22748
|
return e;
|
|
22652
22749
|
}
|
|
22653
|
-
function
|
|
22654
|
-
let t =
|
|
22655
|
-
for (let r of
|
|
22656
|
-
var n =
|
|
22750
|
+
function Cx(e) {
|
|
22751
|
+
let t = Yb(null);
|
|
22752
|
+
for (let r of Hb(e)) {
|
|
22753
|
+
var n = Bb(r, 2);
|
|
22657
22754
|
let i = n[0], a = n[1];
|
|
22658
|
-
|
|
22755
|
+
hx(e, i) && (ix(a) ? t[i] = Sx(a) : a && typeof a == "object" && a.constructor === Object ? t[i] = Cx(a) : t[i] = a);
|
|
22659
22756
|
}
|
|
22660
22757
|
return t;
|
|
22661
22758
|
}
|
|
22662
|
-
function
|
|
22759
|
+
function wx(e) {
|
|
22663
22760
|
switch (typeof e) {
|
|
22664
22761
|
case "string": return e;
|
|
22665
|
-
case "number": return
|
|
22666
|
-
case "boolean": return
|
|
22667
|
-
case "bigint": return
|
|
22668
|
-
case "symbol": return
|
|
22669
|
-
case "undefined": return
|
|
22762
|
+
case "number": return dx(e);
|
|
22763
|
+
case "boolean": return fx(e);
|
|
22764
|
+
case "bigint": return px ? px(e) : "0";
|
|
22765
|
+
case "symbol": return mx ? mx(e) : "Symbol()";
|
|
22766
|
+
case "undefined": return gx(e);
|
|
22670
22767
|
case "function":
|
|
22671
22768
|
case "object": {
|
|
22672
|
-
if (e === null) return
|
|
22673
|
-
let t = e, n =
|
|
22769
|
+
if (e === null) return gx(e);
|
|
22770
|
+
let t = e, n = Tx(t, "toString");
|
|
22674
22771
|
if (typeof n == "function") {
|
|
22675
22772
|
let e = n(t);
|
|
22676
|
-
return typeof e == "string" ? e :
|
|
22773
|
+
return typeof e == "string" ? e : gx(e);
|
|
22677
22774
|
}
|
|
22678
|
-
return
|
|
22775
|
+
return gx(e);
|
|
22679
22776
|
}
|
|
22680
|
-
default: return
|
|
22777
|
+
default: return gx(e);
|
|
22681
22778
|
}
|
|
22682
22779
|
}
|
|
22683
|
-
function
|
|
22780
|
+
function Tx(e, t) {
|
|
22684
22781
|
for (; e !== null;) {
|
|
22685
|
-
let n =
|
|
22782
|
+
let n = Kb(e, t);
|
|
22686
22783
|
if (n) {
|
|
22687
|
-
if (n.get) return
|
|
22688
|
-
if (typeof n.value == "function") return
|
|
22784
|
+
if (n.get) return yx(n.get);
|
|
22785
|
+
if (typeof n.value == "function") return yx(n.value);
|
|
22689
22786
|
}
|
|
22690
|
-
e =
|
|
22787
|
+
e = Gb(e);
|
|
22691
22788
|
}
|
|
22692
22789
|
function n() {
|
|
22693
22790
|
return null;
|
|
22694
22791
|
}
|
|
22695
22792
|
return n;
|
|
22696
22793
|
}
|
|
22697
|
-
function
|
|
22794
|
+
function Ex(e) {
|
|
22698
22795
|
try {
|
|
22699
|
-
return
|
|
22796
|
+
return _x(e, ""), !0;
|
|
22700
22797
|
} catch {
|
|
22701
22798
|
return !1;
|
|
22702
22799
|
}
|
|
22703
22800
|
}
|
|
22704
|
-
var
|
|
22801
|
+
var Dx = qb(/* @__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(".")), Ox = qb(/* @__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(".")), kx = qb([
|
|
22705
22802
|
"feBlend",
|
|
22706
22803
|
"feColorMatrix",
|
|
22707
22804
|
"feComponentTransfer",
|
|
@@ -22727,7 +22824,7 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22727
22824
|
"feSpotLight",
|
|
22728
22825
|
"feTile",
|
|
22729
22826
|
"feTurbulence"
|
|
22730
|
-
]),
|
|
22827
|
+
]), Ax = qb([
|
|
22731
22828
|
"animate",
|
|
22732
22829
|
"color-profile",
|
|
22733
22830
|
"cursor",
|
|
@@ -22750,7 +22847,7 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22750
22847
|
"solidcolor",
|
|
22751
22848
|
"unknown",
|
|
22752
22849
|
"use"
|
|
22753
|
-
]),
|
|
22850
|
+
]), jx = qb(/* @__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(".")), Mx = qb([
|
|
22754
22851
|
"maction",
|
|
22755
22852
|
"maligngroup",
|
|
22756
22853
|
"malignmark",
|
|
@@ -22766,13 +22863,13 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22766
22863
|
"annotation-xml",
|
|
22767
22864
|
"mprescripts",
|
|
22768
22865
|
"none"
|
|
22769
|
-
]),
|
|
22866
|
+
]), Nx = qb(["#text"]), Px = qb(/* @__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(".")), Fx = qb(/* @__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(".")), Ix = qb(/* @__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(".")), Lx = qb([
|
|
22770
22867
|
"xlink:href",
|
|
22771
22868
|
"xml:id",
|
|
22772
22869
|
"xlink:title",
|
|
22773
22870
|
"xml:space",
|
|
22774
22871
|
"xmlns:xlink"
|
|
22775
|
-
]),
|
|
22872
|
+
]), Rx = Jb(/{{[\w\W]*|^[\w\W]*}}/g), zx = Jb(/<%[\w\W]*|^[\w\W]*%>/g), Bx = Jb(/\${[\w\W]*/g), Vx = Jb(/^data-[\-\w.\u00B7-\uFFFF]+$/), Hx = Jb(/^aria-[\-\w]+$/), Ux = Jb(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i), Wx = Jb(/^(?:\w+script|data):/i), Gx = Jb(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g), Kx = Jb(/^html$/i), qx = Jb(/^[a-z][.\w]*(-[.\w]+)+$/i), Jx = Jb(/<[/\w!]/g), Yx = Jb(/<[/\w]/g), Xx = Jb(/<\/no(script|embed|frames)/i), Zx = Jb(/\/>/i), Qx = {
|
|
22776
22873
|
element: 1,
|
|
22777
22874
|
attribute: 2,
|
|
22778
22875
|
text: 3,
|
|
@@ -22785,9 +22882,9 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22785
22882
|
documentType: 10,
|
|
22786
22883
|
documentFragment: 11,
|
|
22787
22884
|
notation: 12
|
|
22788
|
-
},
|
|
22885
|
+
}, $x = function() {
|
|
22789
22886
|
return typeof window > "u" ? null : window;
|
|
22790
|
-
},
|
|
22887
|
+
}, eS = function(e, t) {
|
|
22791
22888
|
if (typeof e != "object" || typeof e.createPolicy != "function") return null;
|
|
22792
22889
|
let n = null, r = "data-tt-policy-suffix";
|
|
22793
22890
|
t && t.hasAttribute(r) && (n = t.getAttribute(r));
|
|
@@ -22804,7 +22901,7 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22804
22901
|
} catch {
|
|
22805
22902
|
return console.warn("TrustedTypes policy " + i + " could not be created."), null;
|
|
22806
22903
|
}
|
|
22807
|
-
},
|
|
22904
|
+
}, tS = function() {
|
|
22808
22905
|
return {
|
|
22809
22906
|
afterSanitizeAttributes: [],
|
|
22810
22907
|
afterSanitizeElements: [],
|
|
@@ -22816,23 +22913,23 @@ var mx = Pb(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.audio.b.b
|
|
|
22816
22913
|
uponSanitizeElement: [],
|
|
22817
22914
|
uponSanitizeShadowNode: []
|
|
22818
22915
|
};
|
|
22819
|
-
},
|
|
22820
|
-
return
|
|
22916
|
+
}, nS = function(e, t, n, r) {
|
|
22917
|
+
return hx(e, t) && ix(e[t]) ? xx(r.base ? Cx(r.base) : {}, e[t], r.transform) : n;
|
|
22821
22918
|
};
|
|
22822
|
-
function
|
|
22823
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
22824
|
-
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !==
|
|
22919
|
+
function rS() {
|
|
22920
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : $x(), t = (e) => rS(e);
|
|
22921
|
+
if (t.version = "3.4.13", t.removed = [], !e || !e.document || e.document.nodeType !== Qx.document || !e.Element) return t.isSupported = !1, t;
|
|
22825
22922
|
let n = e.document, r = n, i = r.currentScript;
|
|
22826
22923
|
e.DocumentFragment;
|
|
22827
22924
|
let a = e.HTMLTemplateElement, o = e.Node, s = e.Element, c = e.NodeFilter;
|
|
22828
22925
|
e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
|
|
22829
|
-
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f =
|
|
22926
|
+
let l = e.DOMParser, u = e.trustedTypes, d = s.prototype, f = Tx(d, "cloneNode"), p = Tx(d, "remove"), m = Tx(d, "nextSibling"), h = Tx(d, "childNodes"), g = Tx(d, "parentNode"), _ = Tx(d, "shadowRoot"), v = Tx(d, "attributes"), y = o && o.prototype ? Tx(o.prototype, "nodeType") : null, b = o && o.prototype ? Tx(o.prototype, "nodeName") : null, x = o && o.prototype ? Tx(o.prototype, "ownerDocument") : null;
|
|
22830
22927
|
if (typeof a == "function") {
|
|
22831
22928
|
let e = n.createElement("template");
|
|
22832
22929
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
22833
22930
|
}
|
|
22834
22931
|
let S, C = "", w, T = !1, E = 0, D = function() {
|
|
22835
|
-
if (E > 0) throw
|
|
22932
|
+
if (E > 0) throw vx("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.");
|
|
22836
22933
|
}, O = function(e) {
|
|
22837
22934
|
D(), E++;
|
|
22838
22935
|
try {
|
|
@@ -22848,21 +22945,21 @@ function Wx() {
|
|
|
22848
22945
|
E--;
|
|
22849
22946
|
}
|
|
22850
22947
|
}, A = function() {
|
|
22851
|
-
return T ||= (w =
|
|
22852
|
-
}, ee = n, j = ee.implementation, M = ee.createNodeIterator, N = ee.createDocumentFragment, te = ee.getElementsByTagName, P = r.importNode, F =
|
|
22853
|
-
t.isSupported = typeof
|
|
22854
|
-
let ne =
|
|
22855
|
-
...
|
|
22856
|
-
...
|
|
22857
|
-
...
|
|
22858
|
-
...
|
|
22859
|
-
...
|
|
22860
|
-
]), ce = null, le =
|
|
22861
|
-
...
|
|
22862
|
-
...
|
|
22863
|
-
...
|
|
22864
|
-
...
|
|
22865
|
-
]), ue = Object.seal(
|
|
22948
|
+
return T ||= (w = eS(u, i), !0), w;
|
|
22949
|
+
}, ee = n, j = ee.implementation, M = ee.createNodeIterator, N = ee.createDocumentFragment, te = ee.getElementsByTagName, P = r.importNode, F = tS();
|
|
22950
|
+
t.isSupported = typeof Hb == "function" && typeof g == "function" && j && j.createHTMLDocument !== void 0;
|
|
22951
|
+
let ne = Rx, I = zx, L = Bx, re = Vx, R = Hx, ie = Wx, z = Gx, ae = qx, oe = Ux, B = null, se = xx({}, [
|
|
22952
|
+
...Dx,
|
|
22953
|
+
...Ox,
|
|
22954
|
+
...kx,
|
|
22955
|
+
...jx,
|
|
22956
|
+
...Nx
|
|
22957
|
+
]), ce = null, le = xx({}, [
|
|
22958
|
+
...Px,
|
|
22959
|
+
...Fx,
|
|
22960
|
+
...Ix,
|
|
22961
|
+
...Lx
|
|
22962
|
+
]), ue = Object.seal(Yb(null, {
|
|
22866
22963
|
tagNameCheck: {
|
|
22867
22964
|
writable: !0,
|
|
22868
22965
|
configurable: !1,
|
|
@@ -22881,7 +22978,7 @@ function Wx() {
|
|
|
22881
22978
|
enumerable: !0,
|
|
22882
22979
|
value: !1
|
|
22883
22980
|
}
|
|
22884
|
-
})), de = null, V = null, fe = Object.seal(
|
|
22981
|
+
})), de = null, V = null, fe = Object.seal(Yb(null, {
|
|
22885
22982
|
tagCheck: {
|
|
22886
22983
|
writable: !0,
|
|
22887
22984
|
configurable: !1,
|
|
@@ -22894,14 +22991,14 @@ function Wx() {
|
|
|
22894
22991
|
enumerable: !0,
|
|
22895
22992
|
value: null
|
|
22896
22993
|
}
|
|
22897
|
-
})), pe = !0, me = !0, he = !1, ge = !0, _e = !1, ve = !0, ye = !1, be = !1, xe = null, Se = null, Ce = !1, we = !1, Te = !1, Ee = !1, De = !0, Oe = !1, ke = "user-content-", Ae = !0, je = !1, Me = {}, H = null, Ne =
|
|
22994
|
+
})), pe = !0, me = !0, he = !1, ge = !0, _e = !1, ve = !0, ye = !1, be = !1, xe = null, Se = null, Ce = !1, we = !1, Te = !1, Ee = !1, De = !0, Oe = !1, ke = "user-content-", Ae = !0, je = !1, Me = {}, H = null, Ne = xx({}, /* @__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(".")), Pe = null, Fe = xx({}, [
|
|
22898
22995
|
"audio",
|
|
22899
22996
|
"video",
|
|
22900
22997
|
"img",
|
|
22901
22998
|
"source",
|
|
22902
22999
|
"image",
|
|
22903
23000
|
"track"
|
|
22904
|
-
]), Ie = null, Le =
|
|
23001
|
+
]), Ie = null, Le = xx({}, [
|
|
22905
23002
|
"alt",
|
|
22906
23003
|
"class",
|
|
22907
23004
|
"for",
|
|
@@ -22916,17 +23013,17 @@ function Wx() {
|
|
|
22916
23013
|
"value",
|
|
22917
23014
|
"style",
|
|
22918
23015
|
"xmlns"
|
|
22919
|
-
]), Re = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", Be = "http://www.w3.org/1999/xhtml", Ve = Be, He = !1, Ue = null, We =
|
|
23016
|
+
]), Re = "http://www.w3.org/1998/Math/MathML", ze = "http://www.w3.org/2000/svg", Be = "http://www.w3.org/1999/xhtml", Ve = Be, He = !1, Ue = null, We = xx({}, [
|
|
22920
23017
|
Re,
|
|
22921
23018
|
ze,
|
|
22922
23019
|
Be
|
|
22923
|
-
],
|
|
23020
|
+
], ox), U = qb([
|
|
22924
23021
|
"mi",
|
|
22925
23022
|
"mo",
|
|
22926
23023
|
"mn",
|
|
22927
23024
|
"ms",
|
|
22928
23025
|
"mtext"
|
|
22929
|
-
]), Ge =
|
|
23026
|
+
]), Ge = xx({}, U), Ke = qb(["annotation-xml"]), qe = xx({}, Ke), Je = xx({}, [
|
|
22930
23027
|
"title",
|
|
22931
23028
|
"style",
|
|
22932
23029
|
"font",
|
|
@@ -22937,21 +23034,21 @@ function Wx() {
|
|
|
22937
23034
|
}, et = function() {
|
|
22938
23035
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
22939
23036
|
if (W && W === e) return;
|
|
22940
|
-
(!e || typeof e != "object") && (e = {}), e =
|
|
23037
|
+
(!e || typeof e != "object") && (e = {}), e = Cx(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? ox : ax, B = nS(e, "ALLOWED_TAGS", se, { transform: Ze }), ce = nS(e, "ALLOWED_ATTR", le, { transform: Ze }), Ue = nS(e, "ALLOWED_NAMESPACES", We, { transform: ox }), Ie = nS(e, "ADD_URI_SAFE_ATTR", Le, {
|
|
22941
23038
|
transform: Ze,
|
|
22942
23039
|
base: Le
|
|
22943
|
-
}), Pe =
|
|
23040
|
+
}), Pe = nS(e, "ADD_DATA_URI_TAGS", Fe, {
|
|
22944
23041
|
transform: Ze,
|
|
22945
23042
|
base: Fe
|
|
22946
|
-
}), H =
|
|
22947
|
-
let t =
|
|
22948
|
-
if (ue =
|
|
23043
|
+
}), H = nS(e, "FORBID_CONTENTS", Ne, { transform: Ze }), de = nS(e, "FORBID_TAGS", Cx({}), { transform: Ze }), V = nS(e, "FORBID_ATTR", Cx({}), { transform: Ze }), Me = hx(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? Cx(e.USE_PROFILES) : e.USE_PROFILES : !1, pe = e.ALLOW_ARIA_ATTR !== !1, me = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _e = e.SAFE_FOR_TEMPLATES || !1, ve = e.SAFE_FOR_XML !== !1, ye = e.WHOLE_DOCUMENT || !1, we = e.RETURN_DOM || !1, Te = e.RETURN_DOM_FRAGMENT || !1, Ee = e.RETURN_TRUSTED_TYPE || !1, Ce = e.FORCE_BODY || !1, De = e.SANITIZE_DOM !== !1, Oe = e.SANITIZE_NAMED_PROPS || !1, Ae = e.KEEP_CONTENT !== !1, je = e.IN_PLACE || !1, oe = Ex(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : Ux, Ve = typeof e.NAMESPACE == "string" ? e.NAMESPACE : Be, Ge = hx(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Cx(e.MATHML_TEXT_INTEGRATION_POINTS) : xx({}, U), qe = hx(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? Cx(e.HTML_INTEGRATION_POINTS) : xx({}, Ke);
|
|
23044
|
+
let t = hx(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? Cx(e.CUSTOM_ELEMENT_HANDLING) : Yb(null);
|
|
23045
|
+
if (ue = Yb(null), hx(t, "tagNameCheck") && $e(t.tagNameCheck) && (ue.tagNameCheck = t.tagNameCheck), hx(t, "attributeNameCheck") && $e(t.attributeNameCheck) && (ue.attributeNameCheck = t.attributeNameCheck), hx(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (ue.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), Jb(ue), _e && (me = !1), Te && (we = !0), Me && (B = xx({}, Nx), ce = Yb(null), Me.html === !0 && (xx(B, Dx), xx(ce, Px)), Me.svg === !0 && (xx(B, Ox), xx(ce, Fx), xx(ce, Lx)), Me.svgFilters === !0 && (xx(B, kx), xx(ce, Fx), xx(ce, Lx)), Me.mathMl === !0 && (xx(B, jx), xx(ce, Ix), xx(ce, Lx))), fe.tagCheck = null, fe.attributeCheck = null, hx(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? fe.tagCheck = e.ADD_TAGS : ix(e.ADD_TAGS) && (B === se && (B = Cx(B)), xx(B, e.ADD_TAGS, Ze))), hx(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? fe.attributeCheck = e.ADD_ATTR : ix(e.ADD_ATTR) && (ce === le && (ce = Cx(ce)), xx(ce, e.ADD_ATTR, Ze))), hx(e, "ADD_URI_SAFE_ATTR") && ix(e.ADD_URI_SAFE_ATTR) && xx(Ie, e.ADD_URI_SAFE_ATTR, Ze), hx(e, "FORBID_CONTENTS") && ix(e.FORBID_CONTENTS) && (H === Ne && (H = Cx(H)), xx(H, e.FORBID_CONTENTS, Ze)), hx(e, "ADD_FORBID_CONTENTS") && ix(e.ADD_FORBID_CONTENTS) && (H === Ne && (H = Cx(H)), xx(H, e.ADD_FORBID_CONTENTS, Ze)), Ae && (B["#text"] = !0), ye && xx(B, [
|
|
22949
23046
|
"html",
|
|
22950
23047
|
"head",
|
|
22951
23048
|
"body"
|
|
22952
|
-
]), B.table && (
|
|
22953
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw
|
|
22954
|
-
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw
|
|
23049
|
+
]), B.table && (xx(B, ["tbody"]), delete de.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
23050
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw vx("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
23051
|
+
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw vx("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
22955
23052
|
let t = S;
|
|
22956
23053
|
S = e.TRUSTED_TYPES_POLICY;
|
|
22957
23054
|
try {
|
|
@@ -22960,12 +23057,12 @@ function Wx() {
|
|
|
22960
23057
|
throw S = t, e;
|
|
22961
23058
|
}
|
|
22962
23059
|
} else e.TRUSTED_TYPES_POLICY === null ? (S = void 0, C = "") : (S === void 0 && (S = A()), S && typeof C == "string" && (C = O("")));
|
|
22963
|
-
|
|
22964
|
-
}, tt =
|
|
22965
|
-
...
|
|
22966
|
-
...
|
|
22967
|
-
...
|
|
22968
|
-
]), nt =
|
|
23060
|
+
qb && qb(e), W = e;
|
|
23061
|
+
}, tt = xx({}, [
|
|
23062
|
+
...Ox,
|
|
23063
|
+
...kx,
|
|
23064
|
+
...Ax
|
|
23065
|
+
]), nt = xx({}, [...jx, ...Mx]), rt = function(e, t, n) {
|
|
22969
23066
|
return t.namespaceURI === Be ? e === "svg" : t.namespaceURI === Re ? e === "svg" && (n === "annotation-xml" || Ge[n]) : !!tt[e];
|
|
22970
23067
|
}, it = function(e, t, n) {
|
|
22971
23068
|
return t.namespaceURI === Be ? e === "math" : t.namespaceURI === ze ? e === "math" && qe[n] : !!nt[e];
|
|
@@ -22977,23 +23074,23 @@ function Wx() {
|
|
|
22977
23074
|
namespaceURI: Ve,
|
|
22978
23075
|
tagName: "template"
|
|
22979
23076
|
});
|
|
22980
|
-
let n =
|
|
23077
|
+
let n = ax(e.tagName), r = ax(t.tagName);
|
|
22981
23078
|
return Ue[e.namespaceURI] ? e.namespaceURI === ze ? rt(n, t, r) : e.namespaceURI === Re ? it(n, t, r) : e.namespaceURI === Be ? at(n, t, r) : !!(Ye === "application/xhtml+xml" && Ue[e.namespaceURI]) : !1;
|
|
22982
23079
|
}, st = function(e) {
|
|
22983
|
-
|
|
23080
|
+
nx(t.removed, { element: e });
|
|
22984
23081
|
try {
|
|
22985
23082
|
g(e).removeChild(e);
|
|
22986
23083
|
} catch {
|
|
22987
|
-
if (p(e), !g(e)) throw
|
|
23084
|
+
if (p(e), !g(e)) throw vx("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
|
|
22988
23085
|
}
|
|
22989
23086
|
}, ct = function(e) {
|
|
22990
23087
|
dt(e);
|
|
22991
23088
|
let t = h(e);
|
|
22992
23089
|
if (t) {
|
|
22993
23090
|
let e = [];
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
}),
|
|
23091
|
+
$b(t, (t) => {
|
|
23092
|
+
nx(e, t);
|
|
23093
|
+
}), $b(e, (e) => {
|
|
22997
23094
|
try {
|
|
22998
23095
|
p(e);
|
|
22999
23096
|
} catch {}
|
|
@@ -23008,12 +23105,12 @@ function Wx() {
|
|
|
23008
23105
|
}
|
|
23009
23106
|
}, lt = function(e, n) {
|
|
23010
23107
|
try {
|
|
23011
|
-
|
|
23108
|
+
nx(t.removed, {
|
|
23012
23109
|
attribute: n.getAttributeNode(e),
|
|
23013
23110
|
from: n
|
|
23014
23111
|
});
|
|
23015
23112
|
} catch {
|
|
23016
|
-
|
|
23113
|
+
nx(t.removed, {
|
|
23017
23114
|
attribute: null,
|
|
23018
23115
|
from: n
|
|
23019
23116
|
});
|
|
@@ -23036,7 +23133,7 @@ function Wx() {
|
|
|
23036
23133
|
let t = [e];
|
|
23037
23134
|
for (; t.length > 0;) {
|
|
23038
23135
|
let e = t.pop();
|
|
23039
|
-
(y ? y(e) : e.nodeType) ===
|
|
23136
|
+
(y ? y(e) : e.nodeType) === Qx.element && ut(e);
|
|
23040
23137
|
let n = h(e);
|
|
23041
23138
|
if (n) for (let e = n.length - 1; e >= 0; --e) t.push(n[e]);
|
|
23042
23139
|
}
|
|
@@ -23045,13 +23142,13 @@ function Wx() {
|
|
|
23045
23142
|
let t = [e];
|
|
23046
23143
|
for (; t.length > 0;) {
|
|
23047
23144
|
let e = t.pop(), n = y ? y(e) : e.nodeType;
|
|
23048
|
-
if (n ===
|
|
23145
|
+
if (n === Qx.processingInstruction || n === Qx.comment && _x(Yx, e.data)) {
|
|
23049
23146
|
try {
|
|
23050
23147
|
p(e);
|
|
23051
23148
|
} catch {}
|
|
23052
23149
|
continue;
|
|
23053
23150
|
}
|
|
23054
|
-
if (n ===
|
|
23151
|
+
if (n === Qx.element) {
|
|
23055
23152
|
let t = e, n = Ze(b ? b(e) : e.nodeName);
|
|
23056
23153
|
try {
|
|
23057
23154
|
t.hasAttribute && t.hasAttribute("patchsrc") && t.removeAttribute("patchsrc"), t.hasAttribute && t.hasAttribute("for") && n !== "label" && n !== "output" && t.removeAttribute("for");
|
|
@@ -23064,7 +23161,7 @@ function Wx() {
|
|
|
23064
23161
|
let t = null, r = null;
|
|
23065
23162
|
if (Ce) e = "<remove></remove>" + e;
|
|
23066
23163
|
else {
|
|
23067
|
-
let t =
|
|
23164
|
+
let t = sx(e, /^[\r\n\t ]+/);
|
|
23068
23165
|
r = t && t[0];
|
|
23069
23166
|
}
|
|
23070
23167
|
Ye === "application/xhtml+xml" && Ve === Be && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
@@ -23084,13 +23181,13 @@ function Wx() {
|
|
|
23084
23181
|
let t = x ? x(e) : e.ownerDocument;
|
|
23085
23182
|
return M.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
23086
23183
|
}, ht = function(e) {
|
|
23087
|
-
return e =
|
|
23184
|
+
return e = cx(e, ne, " "), e = cx(e, I, " "), e = cx(e, L, " "), e;
|
|
23088
23185
|
}, gt = function(e) {
|
|
23089
23186
|
e.normalize();
|
|
23090
23187
|
let t = x ? x(e) : e.ownerDocument, n = M.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
23091
23188
|
for (; r;) r.data = ht(r.data), r = n.nextNode();
|
|
23092
23189
|
let i = e.querySelectorAll?.call(e, "template");
|
|
23093
|
-
i &&
|
|
23190
|
+
i && $b(i, (e) => {
|
|
23094
23191
|
vt(e.content) && gt(e.content);
|
|
23095
23192
|
});
|
|
23096
23193
|
}, _t = function(e) {
|
|
@@ -23099,7 +23196,7 @@ function Wx() {
|
|
|
23099
23196
|
}, vt = function(e) {
|
|
23100
23197
|
if (!y || typeof e != "object" || !e) return !1;
|
|
23101
23198
|
try {
|
|
23102
|
-
return y(e) ===
|
|
23199
|
+
return y(e) === Qx.documentFragment;
|
|
23103
23200
|
} catch {
|
|
23104
23201
|
return !1;
|
|
23105
23202
|
}
|
|
@@ -23112,14 +23209,14 @@ function Wx() {
|
|
|
23112
23209
|
}
|
|
23113
23210
|
};
|
|
23114
23211
|
function bt(e, n, r) {
|
|
23115
|
-
e.length !== 0 &&
|
|
23212
|
+
e.length !== 0 && $b(e, (e) => {
|
|
23116
23213
|
e.call(t, n, r, W);
|
|
23117
23214
|
});
|
|
23118
23215
|
}
|
|
23119
23216
|
let xt = function(e, t) {
|
|
23120
|
-
return !!(ve && e.hasChildNodes() && !yt(e.firstElementChild) &&
|
|
23217
|
+
return !!(ve && e.hasChildNodes() && !yt(e.firstElementChild) && _x(Jx, e.textContent) && _x(Jx, e.innerHTML) || ve && e.namespaceURI === Be && t === "style" && yt(e.firstElementChild) || e.nodeType === Qx.processingInstruction || ve && e.nodeType === Qx.comment && _x(Yx, e.data));
|
|
23121
23218
|
}, St = function(e, t, n) {
|
|
23122
|
-
if (!de[t] && Dt(t) && (ue.tagNameCheck instanceof RegExp &&
|
|
23219
|
+
if (!de[t] && Dt(t) && (ue.tagNameCheck instanceof RegExp && _x(ue.tagNameCheck, t) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(t))) return !1;
|
|
23123
23220
|
if (Ae && !H[t]) {
|
|
23124
23221
|
let t = g(e), r = h(e);
|
|
23125
23222
|
if (r && t) {
|
|
@@ -23132,7 +23229,7 @@ function Wx() {
|
|
|
23132
23229
|
}
|
|
23133
23230
|
return st(e), !0;
|
|
23134
23231
|
}, Ct = function(e, t, n, r) {
|
|
23135
|
-
return e.length === 0 ? t : t === n || t === r ?
|
|
23232
|
+
return e.length === 0 ? t : t === n || t === r ? Cx(t) : t;
|
|
23136
23233
|
}, wt = function(e, n) {
|
|
23137
23234
|
if (bt(F.beforeSanitizeElements, e, null), e !== n && g(e) === null) return je && dt(e), !0;
|
|
23138
23235
|
if (_t(e)) return st(e), !0;
|
|
@@ -23146,22 +23243,22 @@ function Wx() {
|
|
|
23146
23243
|
let t = St(e, r, n);
|
|
23147
23244
|
return t === !1 && bt(F.afterSanitizeElements, e, null), t;
|
|
23148
23245
|
}
|
|
23149
|
-
if ((y ? y(e) : e.nodeType) ===
|
|
23150
|
-
if (_e && e.nodeType ===
|
|
23246
|
+
if ((y ? y(e) : e.nodeType) === Qx.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && _x(Xx, e.innerHTML)) return st(e), !0;
|
|
23247
|
+
if (_e && e.nodeType === Qx.text) {
|
|
23151
23248
|
let n = ht(e.textContent);
|
|
23152
|
-
e.textContent !== n && (
|
|
23249
|
+
e.textContent !== n && (nx(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
23153
23250
|
}
|
|
23154
23251
|
return bt(F.afterSanitizeElements, e, null), !1;
|
|
23155
23252
|
}, Tt = function(e, t, r) {
|
|
23156
23253
|
if (V[t] || ve && t === "patchsrc" || ve && t === "for" && e !== "label" && e !== "output" || De && (t === "id" || t === "name") && (r in n || r in Qe)) return !1;
|
|
23157
23254
|
let i = ce[t] || fe.attributeCheck instanceof Function && fe.attributeCheck(t, e);
|
|
23158
|
-
if (!(me &&
|
|
23255
|
+
if (!(me && _x(re, t)) && !(pe && _x(R, t))) {
|
|
23159
23256
|
if (!i) {
|
|
23160
|
-
if (!(Dt(e) && (ue.tagNameCheck instanceof RegExp &&
|
|
23161
|
-
} else if (!Ie[t] && !
|
|
23257
|
+
if (!(Dt(e) && (ue.tagNameCheck instanceof RegExp && _x(ue.tagNameCheck, e) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(e)) && (ue.attributeNameCheck instanceof RegExp && _x(ue.attributeNameCheck, t) || ue.attributeNameCheck instanceof Function && ue.attributeNameCheck(t, e)) || t === "is" && ue.allowCustomizedBuiltInElements && (ue.tagNameCheck instanceof RegExp && _x(ue.tagNameCheck, r) || ue.tagNameCheck instanceof Function && ue.tagNameCheck(r)))) return !1;
|
|
23258
|
+
} else if (!Ie[t] && !_x(oe, cx(r, z, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && lx(r, "data:") === 0 && Pe[e]) && !(he && !_x(ie, cx(r, z, ""))) && r) return !1;
|
|
23162
23259
|
}
|
|
23163
23260
|
return !0;
|
|
23164
|
-
}, Et =
|
|
23261
|
+
}, Et = xx({}, [
|
|
23165
23262
|
"annotation-xml",
|
|
23166
23263
|
"color-profile",
|
|
23167
23264
|
"font-face",
|
|
@@ -23171,7 +23268,7 @@ function Wx() {
|
|
|
23171
23268
|
"font-face-uri",
|
|
23172
23269
|
"missing-glyph"
|
|
23173
23270
|
]), Dt = function(e) {
|
|
23174
|
-
return !Et[
|
|
23271
|
+
return !Et[ax(e)] && _x(ae, e);
|
|
23175
23272
|
}, G = function(e, t, n, r) {
|
|
23176
23273
|
if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
23177
23274
|
case "TrustedHTML": return O(r);
|
|
@@ -23180,7 +23277,7 @@ function Wx() {
|
|
|
23180
23277
|
return r;
|
|
23181
23278
|
}, Ot = function(e, n, r, i) {
|
|
23182
23279
|
try {
|
|
23183
|
-
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _t(e) ? st(e) :
|
|
23280
|
+
r ? e.setAttributeNS(r, n, i) : e.setAttribute(n, i), _t(e) ? st(e) : tx(t.removed);
|
|
23184
23281
|
} catch {
|
|
23185
23282
|
lt(n, e);
|
|
23186
23283
|
}
|
|
@@ -23197,12 +23294,12 @@ function Wx() {
|
|
|
23197
23294
|
forceKeepAttr: void 0
|
|
23198
23295
|
}, r = t.length, i = Ze(e.nodeName);
|
|
23199
23296
|
for (; r--;) {
|
|
23200
|
-
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u :
|
|
23201
|
-
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(F.uponSanitizeAttribute, e, n), d = n.attrValue, Oe && (l === "id" || l === "name") &&
|
|
23297
|
+
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u : ux(u);
|
|
23298
|
+
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(F.uponSanitizeAttribute, e, n), d = n.attrValue, Oe && (l === "id" || l === "name") && lx(d, ke) !== 0 && (lt(o, e), d = ke + d), ve && _x(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
23202
23299
|
lt(o, e);
|
|
23203
23300
|
continue;
|
|
23204
23301
|
}
|
|
23205
|
-
if (l === "attributename" &&
|
|
23302
|
+
if (l === "attributename" && sx(d, "href")) {
|
|
23206
23303
|
lt(o, e);
|
|
23207
23304
|
continue;
|
|
23208
23305
|
}
|
|
@@ -23211,7 +23308,7 @@ function Wx() {
|
|
|
23211
23308
|
lt(o, e);
|
|
23212
23309
|
continue;
|
|
23213
23310
|
}
|
|
23214
|
-
if (!ge &&
|
|
23311
|
+
if (!ge && _x(Zx, d)) {
|
|
23215
23312
|
lt(o, e);
|
|
23216
23313
|
continue;
|
|
23217
23314
|
}
|
|
@@ -23225,7 +23322,7 @@ function Wx() {
|
|
|
23225
23322
|
bt(F.afterSanitizeAttributes, e, null);
|
|
23226
23323
|
}, At = function(e) {
|
|
23227
23324
|
let t = null, n = mt(e);
|
|
23228
|
-
for (bt(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(F.uponSanitizeShadowNode, t, null), wt(t, e), kt(t), vt(t.content) && At(t.content), (y ? y(t) : t.nodeType) ===
|
|
23325
|
+
for (bt(F.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(F.uponSanitizeShadowNode, t, null), wt(t, e), kt(t), vt(t.content) && At(t.content), (y ? y(t) : t.nodeType) === Qx.element) {
|
|
23229
23326
|
let e = _(t);
|
|
23230
23327
|
vt(e) && (jt(e), At(e));
|
|
23231
23328
|
}
|
|
@@ -23241,7 +23338,7 @@ function Wx() {
|
|
|
23241
23338
|
At(e.shadow);
|
|
23242
23339
|
continue;
|
|
23243
23340
|
}
|
|
23244
|
-
let n = e.node, r = (y ? y(n) : n.nodeType) ===
|
|
23341
|
+
let n = e.node, r = (y ? y(n) : n.nodeType) === Qx.element, i = h(n);
|
|
23245
23342
|
if (i) for (let e = i.length - 1; e >= 0; --e) t.push({
|
|
23246
23343
|
node: i[e],
|
|
23247
23344
|
shadow: null
|
|
@@ -23270,24 +23367,24 @@ function Wx() {
|
|
|
23270
23367
|
};
|
|
23271
23368
|
return t.sanitize = function(e) {
|
|
23272
23369
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
23273
|
-
if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yt(e) && (e =
|
|
23370
|
+
if (He = !e, He && (e = "<!-->"), typeof e != "string" && !yt(e) && (e = wx(e), typeof e != "string")) throw vx("dirty is not a string, aborting");
|
|
23274
23371
|
if (!t.isSupported) return e;
|
|
23275
|
-
be ? (B = xe, ce = Se) : et(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (B =
|
|
23372
|
+
be ? (B = xe, ce = Se) : et(n), (F.uponSanitizeElement.length > 0 || F.uponSanitizeAttribute.length > 0) && (B = Cx(B)), F.uponSanitizeAttribute.length > 0 && (ce = Cx(ce)), t.removed = [];
|
|
23276
23373
|
let c = je && typeof e != "string" && yt(e);
|
|
23277
23374
|
if (c) {
|
|
23278
23375
|
ft(e);
|
|
23279
23376
|
let t = b ? b(e) : e.nodeName;
|
|
23280
23377
|
if (typeof t == "string") {
|
|
23281
23378
|
let n = Ze(t);
|
|
23282
|
-
if (!B[n] || de[n]) throw ct(e),
|
|
23379
|
+
if (!B[n] || de[n]) throw ct(e), vx("root node is forbidden and cannot be sanitized in-place");
|
|
23283
23380
|
}
|
|
23284
|
-
if (_t(e)) throw ct(e),
|
|
23381
|
+
if (_t(e)) throw ct(e), vx("root node is clobbered and cannot be sanitized in-place");
|
|
23285
23382
|
try {
|
|
23286
23383
|
jt(e);
|
|
23287
23384
|
} catch (t) {
|
|
23288
23385
|
throw ct(e), t;
|
|
23289
23386
|
}
|
|
23290
|
-
} else if (yt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType ===
|
|
23387
|
+
} else if (yt(e)) i = pt("<!---->"), a = i.ownerDocument.importNode(e, !0), a.nodeType === Qx.element && a.nodeName === "BODY" || a.nodeName === "HTML" ? i = a : i.appendChild(a), jt(a);
|
|
23291
23388
|
else {
|
|
23292
23389
|
if (!we && !_e && !ye && e.indexOf("<") === -1) return S && Ee ? O(e) : e;
|
|
23293
23390
|
if (i = pt(e), !i) return we ? null : Ee ? C : "";
|
|
@@ -23298,11 +23395,11 @@ function Wx() {
|
|
|
23298
23395
|
let e = mt(l);
|
|
23299
23396
|
for (; o = e.nextNode();) wt(o, l), kt(o), vt(o.content) && At(o.content);
|
|
23300
23397
|
} catch (n) {
|
|
23301
|
-
throw c && (ct(e),
|
|
23398
|
+
throw c && (ct(e), $b(t.removed, (e) => {
|
|
23302
23399
|
e.element && dt(e.element);
|
|
23303
23400
|
})), n;
|
|
23304
23401
|
}
|
|
23305
|
-
if (c) return
|
|
23402
|
+
if (c) return $b(t.removed, (e) => {
|
|
23306
23403
|
e.element && dt(e.element);
|
|
23307
23404
|
}), _e && gt(e), e;
|
|
23308
23405
|
if (we) {
|
|
@@ -23311,7 +23408,7 @@ function Wx() {
|
|
|
23311
23408
|
return (ce.shadowroot || ce.shadowrootmode) && (s = P.call(r, s, !0)), s;
|
|
23312
23409
|
}
|
|
23313
23410
|
let u = ye ? i.outerHTML : i.innerHTML;
|
|
23314
|
-
return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name &&
|
|
23411
|
+
return ye && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && _x(Kx, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), _e && (u = ht(u)), S && Ee ? O(u) : u;
|
|
23315
23412
|
}, t.setConfig = function() {
|
|
23316
23413
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
23317
23414
|
et(e), be = !0, xe = B, Se = ce;
|
|
@@ -23322,77 +23419,77 @@ function Wx() {
|
|
|
23322
23419
|
let r = Ze(e), i = Ze(t);
|
|
23323
23420
|
return Tt(r, i, n);
|
|
23324
23421
|
}, t.addHook = function(e, t) {
|
|
23325
|
-
typeof t == "function" &&
|
|
23422
|
+
typeof t == "function" && hx(F, e) && nx(F[e], t);
|
|
23326
23423
|
}, t.removeHook = function(e, t) {
|
|
23327
|
-
if (
|
|
23424
|
+
if (hx(F, e)) {
|
|
23328
23425
|
if (t !== void 0) {
|
|
23329
|
-
let n =
|
|
23330
|
-
return n === -1 ? void 0 :
|
|
23426
|
+
let n = ex(F[e], t);
|
|
23427
|
+
return n === -1 ? void 0 : rx(F[e], n, 1)[0];
|
|
23331
23428
|
}
|
|
23332
|
-
return
|
|
23429
|
+
return tx(F[e]);
|
|
23333
23430
|
}
|
|
23334
23431
|
}, t.removeHooks = function(e) {
|
|
23335
|
-
|
|
23432
|
+
hx(F, e) && (F[e] = []);
|
|
23336
23433
|
}, t.removeAllHooks = function() {
|
|
23337
|
-
F =
|
|
23434
|
+
F = tS();
|
|
23338
23435
|
}, t;
|
|
23339
23436
|
}
|
|
23340
|
-
var
|
|
23437
|
+
var iS = rS();
|
|
23341
23438
|
//#endregion
|
|
23342
23439
|
//#region src/core/composables/useMarkdown.ts
|
|
23343
|
-
|
|
23440
|
+
Zy.setOptions({
|
|
23344
23441
|
breaks: !0,
|
|
23345
23442
|
gfm: !0
|
|
23346
23443
|
});
|
|
23347
|
-
var
|
|
23348
|
-
|
|
23444
|
+
var aS = 2e4, oS = new Zy.Renderer();
|
|
23445
|
+
oS.code = ({ text: e, lang: t }) => {
|
|
23349
23446
|
let n = (t || "").trim() || "plaintext", r = "";
|
|
23350
|
-
if (e.length > 2e4) r =
|
|
23447
|
+
if (e.length > 2e4) r = cS(e);
|
|
23351
23448
|
else try {
|
|
23352
|
-
r =
|
|
23449
|
+
r = Fb.highlight(e, {
|
|
23353
23450
|
language: n,
|
|
23354
23451
|
ignoreIllegals: !0
|
|
23355
23452
|
}).value;
|
|
23356
23453
|
} catch {
|
|
23357
|
-
r =
|
|
23454
|
+
r = cS(e);
|
|
23358
23455
|
}
|
|
23359
|
-
let i = encodeURIComponent(e), a =
|
|
23456
|
+
let i = encodeURIComponent(e), a = sS(n);
|
|
23360
23457
|
return `<pre class="code-block" data-lang="${a}" data-code="${i}"><code class="hljs language-${a}">${r}</code></pre>`;
|
|
23361
23458
|
};
|
|
23362
|
-
function
|
|
23459
|
+
function sS(e) {
|
|
23363
23460
|
return e.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
23364
23461
|
}
|
|
23365
|
-
function
|
|
23462
|
+
function cS(e) {
|
|
23366
23463
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
23367
23464
|
}
|
|
23368
|
-
var
|
|
23465
|
+
var lS = { ADD_ATTR: [
|
|
23369
23466
|
"data-code",
|
|
23370
23467
|
"data-lang",
|
|
23371
23468
|
"target",
|
|
23372
23469
|
"rel"
|
|
23373
23470
|
] };
|
|
23374
|
-
function
|
|
23375
|
-
return
|
|
23471
|
+
function uS(e) {
|
|
23472
|
+
return iS.sanitize(e, lS);
|
|
23376
23473
|
}
|
|
23377
|
-
function
|
|
23378
|
-
return
|
|
23474
|
+
function dS(e) {
|
|
23475
|
+
return Zy.parse(e || "", { renderer: oS });
|
|
23379
23476
|
}
|
|
23380
|
-
function
|
|
23381
|
-
return
|
|
23477
|
+
function fS(e) {
|
|
23478
|
+
return uS(dS(e));
|
|
23382
23479
|
}
|
|
23383
|
-
var
|
|
23384
|
-
function
|
|
23385
|
-
let t = /* @__PURE__ */ wn(
|
|
23480
|
+
var pS = 100, mS = 2e3;
|
|
23481
|
+
function hS(e) {
|
|
23482
|
+
let t = /* @__PURE__ */ wn(fS(e())), n = 0, r = null;
|
|
23386
23483
|
function i() {
|
|
23387
|
-
r = null, n = Date.now(), t.value =
|
|
23484
|
+
r = null, n = Date.now(), t.value = fS(e());
|
|
23388
23485
|
}
|
|
23389
23486
|
return ni(e, () => {
|
|
23390
23487
|
let a = e();
|
|
23391
|
-
if (a.length <=
|
|
23392
|
-
r &&= (clearTimeout(r), null), n = Date.now(), t.value =
|
|
23488
|
+
if (a.length <= mS) {
|
|
23489
|
+
r &&= (clearTimeout(r), null), n = Date.now(), t.value = fS(a);
|
|
23393
23490
|
return;
|
|
23394
23491
|
}
|
|
23395
|
-
let o = n +
|
|
23492
|
+
let o = n + pS - Date.now();
|
|
23396
23493
|
o <= 0 ? (r &&= (clearTimeout(r), null), i()) : r ||= setTimeout(i, o);
|
|
23397
23494
|
}), Ze(() => {
|
|
23398
23495
|
r &&= (clearTimeout(r), null);
|
|
@@ -23410,20 +23507,20 @@ function nS(e) {
|
|
|
23410
23507
|
}
|
|
23411
23508
|
//#endregion
|
|
23412
23509
|
//#region src/core/components/CodePreview.vue?vue&type=script&setup=true&lang.ts
|
|
23413
|
-
var
|
|
23510
|
+
var gS = { class: "code-preview-modal" }, _S = { class: "preview-header" }, vS = { class: "preview-title" }, yS = { class: "preview-tabs" }, bS = ["disabled"], xS = { class: "preview-actions" }, SS = ["title"], CS = {
|
|
23414
23511
|
key: 0,
|
|
23415
23512
|
viewBox: "0 0 16 16",
|
|
23416
23513
|
fill: "none",
|
|
23417
23514
|
"aria-hidden": "true"
|
|
23418
|
-
},
|
|
23515
|
+
}, wS = {
|
|
23419
23516
|
key: 1,
|
|
23420
23517
|
viewBox: "0 0 16 16",
|
|
23421
23518
|
fill: "none",
|
|
23422
23519
|
"aria-hidden": "true"
|
|
23423
|
-
},
|
|
23520
|
+
}, TS = { class: "preview-body" }, ES = ["srcdoc"], DS = {
|
|
23424
23521
|
key: 1,
|
|
23425
23522
|
class: "preview-source"
|
|
23426
|
-
},
|
|
23523
|
+
}, OS = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23427
23524
|
__name: "CodePreview",
|
|
23428
23525
|
props: {
|
|
23429
23526
|
code: {},
|
|
@@ -23482,28 +23579,28 @@ app.mount('#app');
|
|
|
23482
23579
|
return (t, n) => (Y(), X("div", {
|
|
23483
23580
|
class: "code-preview-overlay",
|
|
23484
23581
|
onClick: n[3] ||= yl((e) => r("close"), ["self"])
|
|
23485
|
-
}, [Z("div",
|
|
23486
|
-
Z("span",
|
|
23487
|
-
Z("div",
|
|
23582
|
+
}, [Z("div", gS, [Z("div", _S, [
|
|
23583
|
+
Z("span", vS, "代码预览 · " + U(e.lang), 1),
|
|
23584
|
+
Z("div", yS, [Z("button", {
|
|
23488
23585
|
class: H({ active: a.value === "preview" }),
|
|
23489
23586
|
disabled: !s.value,
|
|
23490
23587
|
onClick: n[0] ||= (e) => a.value = "preview"
|
|
23491
|
-
}, "预览", 10,
|
|
23588
|
+
}, "预览", 10, bS), Z("button", {
|
|
23492
23589
|
class: H({ active: a.value === "source" }),
|
|
23493
23590
|
onClick: n[1] ||= (e) => a.value = "source"
|
|
23494
23591
|
}, "源码", 2)]),
|
|
23495
|
-
Z("div",
|
|
23592
|
+
Z("div", xS, [
|
|
23496
23593
|
Z("button", {
|
|
23497
23594
|
class: H(["icon-btn", { done: o.value }]),
|
|
23498
23595
|
title: o.value ? "已复制" : "复制代码",
|
|
23499
23596
|
onClick: u
|
|
23500
|
-
}, [o.value ? (Y(), X("svg",
|
|
23597
|
+
}, [o.value ? (Y(), X("svg", CS, [...n[4] ||= [Z("path", {
|
|
23501
23598
|
d: "M3 8.5l3 3 7-7",
|
|
23502
23599
|
stroke: "currentColor",
|
|
23503
23600
|
"stroke-width": "1.6",
|
|
23504
23601
|
"stroke-linecap": "round",
|
|
23505
23602
|
"stroke-linejoin": "round"
|
|
23506
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
23603
|
+
}, null, -1)]])) : (Y(), X("svg", wS, [...n[5] ||= [Z("rect", {
|
|
23507
23604
|
x: "5.5",
|
|
23508
23605
|
y: "5.5",
|
|
23509
23606
|
width: "8",
|
|
@@ -23515,7 +23612,7 @@ app.mount('#app');
|
|
|
23515
23612
|
d: "M10.5 3.5v-.5A1.5 1.5 0 0 0 9 1.5H3.5A1.5 1.5 0 0 0 2 3v5.5A1.5 1.5 0 0 0 3.5 10H4",
|
|
23516
23613
|
stroke: "currentColor",
|
|
23517
23614
|
"stroke-width": "1.3"
|
|
23518
|
-
}, null, -1)]]))], 10,
|
|
23615
|
+
}, null, -1)]]))], 10, SS),
|
|
23519
23616
|
Z("button", {
|
|
23520
23617
|
class: "icon-btn",
|
|
23521
23618
|
title: "新窗口打开",
|
|
@@ -23551,20 +23648,20 @@ app.mount('#app');
|
|
|
23551
23648
|
"stroke-linecap": "round"
|
|
23552
23649
|
})], -1)]])
|
|
23553
23650
|
])
|
|
23554
|
-
]), Z("div",
|
|
23651
|
+
]), Z("div", TS, [a.value === "preview" && s.value ? (Y(), X("iframe", {
|
|
23555
23652
|
key: 0,
|
|
23556
23653
|
ref_key: "iframeRef",
|
|
23557
23654
|
ref: i,
|
|
23558
23655
|
class: "preview-iframe",
|
|
23559
23656
|
sandbox: "allow-scripts allow-modals allow-popups allow-forms",
|
|
23560
23657
|
srcdoc: c.value
|
|
23561
|
-
}, null, 8,
|
|
23658
|
+
}, null, 8, ES)) : (Y(), X("pre", DS, [Z("code", null, U(e.code), 1)]))])])]));
|
|
23562
23659
|
}
|
|
23563
|
-
}), [["__scopeId", "data-v-bf0ccf96"]]),
|
|
23660
|
+
}), [["__scopeId", "data-v-bf0ccf96"]]), kS = ["innerHTML"], AS = /* @__PURE__ */ Fi({
|
|
23564
23661
|
__name: "MessageContent",
|
|
23565
23662
|
props: { content: {} },
|
|
23566
23663
|
setup(e) {
|
|
23567
|
-
let t = e, { html: n, codeBlocks: r } =
|
|
23664
|
+
let t = e, { html: n, codeBlocks: r } = hS(() => t.content), i = /* @__PURE__ */ Cn(null), a = /* @__PURE__ */ Cn(null), o = [
|
|
23568
23665
|
"html",
|
|
23569
23666
|
"htm",
|
|
23570
23667
|
"vue",
|
|
@@ -23637,17 +23734,17 @@ app.mount('#app');
|
|
|
23637
23734
|
ref_key: "containerRef",
|
|
23638
23735
|
ref: i,
|
|
23639
23736
|
innerHTML: K(n)
|
|
23640
|
-
}, null, 8,
|
|
23737
|
+
}, null, 8, kS), (Y(), as(_i, { to: "body" }, [a.value ? (Y(), as(OS, {
|
|
23641
23738
|
key: 0,
|
|
23642
23739
|
code: a.value.code,
|
|
23643
23740
|
lang: a.value.lang,
|
|
23644
23741
|
onClose: t[0] ||= (e) => a.value = null
|
|
23645
23742
|
}, null, 8, ["code", "lang"])) : Q("", !0)]))], 64));
|
|
23646
23743
|
}
|
|
23647
|
-
}),
|
|
23744
|
+
}), jS = {
|
|
23648
23745
|
key: 0,
|
|
23649
23746
|
class: "stream-cursor"
|
|
23650
|
-
},
|
|
23747
|
+
}, MS = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23651
23748
|
__name: "MessageBubble",
|
|
23652
23749
|
props: {
|
|
23653
23750
|
content: {},
|
|
@@ -23657,43 +23754,43 @@ app.mount('#app');
|
|
|
23657
23754
|
showCursor: { type: Boolean }
|
|
23658
23755
|
},
|
|
23659
23756
|
setup(e) {
|
|
23660
|
-
return (t, n) => (Y(), X(J, null, [Z("div", { class: H(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: H(["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(), as(
|
|
23757
|
+
return (t, n) => (Y(), X(J, null, [Z("div", { class: H(["message-bubble", [e.role, { typing: e.isPendingAssistant }]]) }, [e.isPendingAssistant ? (Y(), X(J, { key: 0 }, [Z("span", { class: H(["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(), as(AS, {
|
|
23661
23758
|
key: 0,
|
|
23662
23759
|
content: e.content
|
|
23663
|
-
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [_s(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span",
|
|
23760
|
+
}, null, 8, ["content"])) : (Y(), X(J, { key: 1 }, [_s(U(e.content), 1)], 64))], 64))], 2), e.showCursor ? (Y(), X("span", jS)) : Q("", !0)], 64));
|
|
23664
23761
|
}
|
|
23665
|
-
}), [["__scopeId", "data-v-c38029d9"]]),
|
|
23762
|
+
}), [["__scopeId", "data-v-c38029d9"]]), NS = { class: "message-time" }, PS = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23666
23763
|
__name: "MessageTime",
|
|
23667
23764
|
props: { time: {} },
|
|
23668
23765
|
setup(e) {
|
|
23669
|
-
return (t, n) => (Y(), X("div",
|
|
23766
|
+
return (t, n) => (Y(), X("div", NS, U(e.time), 1));
|
|
23670
23767
|
}
|
|
23671
|
-
}), [["__scopeId", "data-v-4a976e4a"]]),
|
|
23768
|
+
}), [["__scopeId", "data-v-4a976e4a"]]), FS = { class: "msg-actions" }, IS = ["title"], LS = {
|
|
23672
23769
|
key: 0,
|
|
23673
23770
|
viewBox: "0 0 16 16",
|
|
23674
23771
|
fill: "none",
|
|
23675
23772
|
"aria-hidden": "true"
|
|
23676
|
-
},
|
|
23773
|
+
}, RS = {
|
|
23677
23774
|
key: 1,
|
|
23678
23775
|
viewBox: "0 0 16 16",
|
|
23679
23776
|
fill: "none",
|
|
23680
23777
|
"aria-hidden": "true"
|
|
23681
|
-
},
|
|
23778
|
+
}, zS = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23682
23779
|
__name: "MessageActions",
|
|
23683
23780
|
props: { copied: { type: Boolean } },
|
|
23684
23781
|
emits: ["copy", "regenerate"],
|
|
23685
23782
|
setup(e) {
|
|
23686
|
-
return (t, n) => (Y(), X("div",
|
|
23783
|
+
return (t, n) => (Y(), X("div", FS, [Z("button", {
|
|
23687
23784
|
class: H(["msg-action-btn", { done: e.copied }]),
|
|
23688
23785
|
title: e.copied ? "已复制" : "复制",
|
|
23689
23786
|
onClick: n[0] ||= (e) => t.$emit("copy")
|
|
23690
|
-
}, [e.copied ? (Y(), X("svg",
|
|
23787
|
+
}, [e.copied ? (Y(), X("svg", LS, [...n[2] ||= [Z("path", {
|
|
23691
23788
|
d: "M3 8.5l3 3 7-7",
|
|
23692
23789
|
stroke: "currentColor",
|
|
23693
23790
|
"stroke-width": "1.6",
|
|
23694
23791
|
"stroke-linecap": "round",
|
|
23695
23792
|
"stroke-linejoin": "round"
|
|
23696
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
23793
|
+
}, null, -1)]])) : (Y(), X("svg", RS, [...n[3] ||= [Z("rect", {
|
|
23697
23794
|
x: "5.5",
|
|
23698
23795
|
y: "5.5",
|
|
23699
23796
|
width: "8",
|
|
@@ -23705,7 +23802,7 @@ app.mount('#app');
|
|
|
23705
23802
|
d: "M10.5 3.5v-.5A1.5 1.5 0 0 0 9 1.5H3.5A1.5 1.5 0 0 0 2 3v5.5A1.5 1.5 0 0 0 3.5 10H4",
|
|
23706
23803
|
stroke: "currentColor",
|
|
23707
23804
|
"stroke-width": "1.3"
|
|
23708
|
-
}, null, -1)]])), Z("span", null, U(e.copied ? "已复制" : "复制"), 1)], 10,
|
|
23805
|
+
}, null, -1)]])), Z("span", null, U(e.copied ? "已复制" : "复制"), 1)], 10, IS), Z("button", {
|
|
23709
23806
|
class: "msg-action-btn",
|
|
23710
23807
|
title: "重新生成",
|
|
23711
23808
|
onClick: n[1] ||= (e) => t.$emit("regenerate")
|
|
@@ -23726,31 +23823,31 @@ app.mount('#app');
|
|
|
23726
23823
|
"stroke-linejoin": "round"
|
|
23727
23824
|
})], -1), Z("span", null, "重新生成", -1)]])]));
|
|
23728
23825
|
}
|
|
23729
|
-
}), [["__scopeId", "data-v-49dbc830"]]),
|
|
23826
|
+
}), [["__scopeId", "data-v-49dbc830"]]), BS = {
|
|
23730
23827
|
key: 0,
|
|
23731
23828
|
class: "avatar-icon",
|
|
23732
23829
|
viewBox: "0 0 1024 1024",
|
|
23733
23830
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23734
23831
|
"aria-hidden": "true"
|
|
23735
|
-
},
|
|
23832
|
+
}, VS = {
|
|
23736
23833
|
key: 1,
|
|
23737
23834
|
class: "avatar-icon",
|
|
23738
23835
|
viewBox: "0 0 1024 1024",
|
|
23739
23836
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23740
23837
|
"aria-hidden": "true"
|
|
23741
|
-
},
|
|
23838
|
+
}, HS = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23742
23839
|
__name: "AvatarIcon",
|
|
23743
23840
|
props: { role: {} },
|
|
23744
23841
|
setup(e) {
|
|
23745
|
-
return (t, n) => e.role === "user" ? (Y(), X("svg",
|
|
23842
|
+
return (t, n) => e.role === "user" ? (Y(), X("svg", BS, [...n[0] ||= [Z("path", { d: "M512 170.688a149.312 149.312 0 1 0 0 298.624 149.312 149.312 0 0 0 0-298.624zM277.312 320a234.688 234.688 0 1 1 469.376 0 234.688 234.688 0 0 1-469.376 0zM128 810.688a213.312 213.312 0 0 1 213.312-213.312h341.376A213.312 213.312 0 0 1 896 810.688v128H128v-128z m213.312-128a128 128 0 0 0-128 128v42.688h597.376v-42.688a128 128 0 0 0-128-128H341.312z" }, null, -1)]])) : (Y(), X("svg", VS, [...n[1] ||= [Z("path", { d: "M717.12 274H762c82.842 0 150 67.158 150 150v200c0 82.842-67.158 150-150 150H262c-82.842 0-150-67.158-150-150V424c0-82.842 67.158-150 150-150h44.88l-18.268-109.602c-4.086-24.514 12.476-47.7 36.99-51.786 24.514-4.086 47.7 12.476 51.786 36.99l20 120c0.246 1.472 0.416 2.94 0.516 4.398h228.192c0.1-1.46 0.27-2.926 0.516-4.398l20-120c4.086-24.514 27.272-41.076 51.786-36.99 24.514 4.086 41.076 27.272 36.99 51.786L717.12 274zM262 364c-33.138 0-60 26.862-60 60v200c0 33.138 26.862 60 60 60h500c33.138 0 60-26.862 60-60V424c0-33.138-26.862-60-60-60H262z m50 548c-24.852 0-45-20.148-45-45S287.148 822 312 822h400c24.852 0 45 20.148 45 45S736.852 912 712 912H312z m-4-428c0-24.852 20.148-45 45-45S398 459.148 398 484v40c0 24.852-20.148 45-45 45S308 548.852 308 524v-40z m318 0c0-24.852 20.148-45 45-45S716 459.148 716 484v40c0 24.852-20.148 45-45 45S626 548.852 626 524v-40z" }, null, -1)]]));
|
|
23746
23843
|
}
|
|
23747
|
-
}), [["__scopeId", "data-v-dd253c12"]]),
|
|
23844
|
+
}), [["__scopeId", "data-v-dd253c12"]]), US = ["data-msg-idx"], WS = {
|
|
23748
23845
|
key: 0,
|
|
23749
23846
|
class: "message-avatar"
|
|
23750
|
-
},
|
|
23847
|
+
}, GS = { class: "message-content" }, KS = {
|
|
23751
23848
|
key: 2,
|
|
23752
23849
|
class: "msg-focuses"
|
|
23753
|
-
},
|
|
23850
|
+
}, qS = ["title", "onClick"], JS = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23754
23851
|
__name: "MessageRow",
|
|
23755
23852
|
props: {
|
|
23756
23853
|
message: {},
|
|
@@ -23774,28 +23871,24 @@ app.mount('#app');
|
|
|
23774
23871
|
return (t, c) => (Y(), X("div", {
|
|
23775
23872
|
class: H(["message-row", e.message.role]),
|
|
23776
23873
|
"data-msg-idx": e.index
|
|
23777
|
-
}, [e.showAvatar ? (Y(), X("div",
|
|
23874
|
+
}, [e.showAvatar ? (Y(), X("div", WS, [fs(HS, { role: e.message.role }, null, 8, ["role"])])) : Q("", !0), Z("div", GS, [
|
|
23778
23875
|
r.value ? (Y(), as(H_, {
|
|
23779
23876
|
key: 0,
|
|
23780
23877
|
text: i.value,
|
|
23781
23878
|
expanded: e.reasoningExpanded,
|
|
23782
23879
|
onToggle: c[0] ||= (e) => t.$emit("toggle-reasoning")
|
|
23783
23880
|
}, null, 8, ["text", "expanded"])) : Q("", !0),
|
|
23784
|
-
r.value ? (Y(), as(
|
|
23881
|
+
r.value ? (Y(), as(_v, {
|
|
23785
23882
|
key: 1,
|
|
23786
23883
|
steps: a.value
|
|
23787
23884
|
}, null, 8, ["steps"])) : Q("", !0),
|
|
23788
|
-
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div",
|
|
23885
|
+
e.message.role === "user" && e.message.focuses?.length ? (Y(), X("div", KS, [(Y(!0), X(J, null, sa(e.message.focuses, (e) => (Y(), X("span", {
|
|
23789
23886
|
key: e.path,
|
|
23790
23887
|
class: "msg-focus-chip",
|
|
23791
23888
|
title: `回看 ${e.path}`,
|
|
23792
23889
|
onClick: (t) => K(n).focusChipClick(e)
|
|
23793
|
-
},
|
|
23794
|
-
|
|
23795
|
-
class: "msg-focus-chip-x",
|
|
23796
|
-
onClick: yl((t) => K(n).removeFocus(e.path), ["stop"])
|
|
23797
|
-
}, "✕", 8, FS)], 8, PS))), 128))])) : Q("", !0),
|
|
23798
|
-
fs(yS, {
|
|
23890
|
+
}, "🎯 " + U(e.path), 9, qS))), 128))])) : Q("", !0),
|
|
23891
|
+
fs(MS, {
|
|
23799
23892
|
content: e.message.content,
|
|
23800
23893
|
role: e.message.role,
|
|
23801
23894
|
"is-pending-assistant": e.isPendingAssistant,
|
|
@@ -23808,28 +23901,28 @@ app.mount('#app');
|
|
|
23808
23901
|
"show-typing",
|
|
23809
23902
|
"show-cursor"
|
|
23810
23903
|
]),
|
|
23811
|
-
fs(
|
|
23812
|
-
o.value ? (Y(), as(
|
|
23904
|
+
fs(PS, { time: e.time }, null, 8, ["time"]),
|
|
23905
|
+
o.value ? (Y(), as(zS, {
|
|
23813
23906
|
key: 3,
|
|
23814
23907
|
copied: e.copied,
|
|
23815
23908
|
onCopy: c[1] ||= (e) => t.$emit("copy"),
|
|
23816
23909
|
onRegenerate: c[2] ||= (e) => t.$emit("regenerate")
|
|
23817
23910
|
}, null, 8, ["copied"])) : Q("", !0)
|
|
23818
|
-
])], 10,
|
|
23911
|
+
])], 10, US));
|
|
23819
23912
|
}
|
|
23820
|
-
}), [["__scopeId", "data-v-
|
|
23913
|
+
}), [["__scopeId", "data-v-49e439dc"]]), YS = { class: "chat-body" }, XS = {
|
|
23821
23914
|
key: 0,
|
|
23822
23915
|
class: "empty-state"
|
|
23823
|
-
},
|
|
23916
|
+
}, ZS = {
|
|
23824
23917
|
key: 1,
|
|
23825
23918
|
class: "message-row assistant"
|
|
23826
|
-
},
|
|
23919
|
+
}, QS = {
|
|
23827
23920
|
key: 0,
|
|
23828
23921
|
class: "message-avatar"
|
|
23829
|
-
},
|
|
23922
|
+
}, $S = { class: "message-content" }, eC = {
|
|
23830
23923
|
key: 2,
|
|
23831
23924
|
class: "error-bar"
|
|
23832
|
-
},
|
|
23925
|
+
}, tC = { class: "error-text" }, nC = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23833
23926
|
__name: "MessageList",
|
|
23834
23927
|
props: {
|
|
23835
23928
|
showAvatar: { type: Boolean },
|
|
@@ -23837,9 +23930,9 @@ app.mount('#app');
|
|
|
23837
23930
|
},
|
|
23838
23931
|
setup(e) {
|
|
23839
23932
|
let { chat: t, formatTime: n, copiedMsg: r, copyMessage: i, isPendingAssistant: a, isReasoningExpanded: o, toggleReasoning: s, canUndo: c, undo: l } = y_(), { state: u, retry: d, regenerate: f } = t, p = Qs(() => u.messages.length > 0), m = Qs(() => u.messages.some((e) => e.role === "user")), h = Qs(() => u.messages[u.messages.length - 1]?.role === "assistant");
|
|
23840
|
-
return (t, g) => (Y(), X("div",
|
|
23841
|
-
p.value ? Q("", !0) : (Y(), X("div",
|
|
23842
|
-
(Y(!0), X(J, null, sa(K(u).messages, (t, c) => (Y(), as(
|
|
23933
|
+
return (t, g) => (Y(), X("div", YS, [
|
|
23934
|
+
p.value ? Q("", !0) : (Y(), X("div", XS, [...g[2] ||= [Z("div", { class: "empty-icon" }, "💬", -1), Z("p", null, "有什么可以帮你的?", -1)]])),
|
|
23935
|
+
(Y(!0), X(J, null, sa(K(u).messages, (t, c) => (Y(), as(JS, {
|
|
23843
23936
|
key: c,
|
|
23844
23937
|
message: t,
|
|
23845
23938
|
index: c,
|
|
@@ -23869,15 +23962,15 @@ app.mount('#app');
|
|
|
23869
23962
|
"onCopy",
|
|
23870
23963
|
"onRegenerate"
|
|
23871
23964
|
]))), 128)),
|
|
23872
|
-
K(u).loading && !h.value ? (Y(), X("div",
|
|
23965
|
+
K(u).loading && !h.value ? (Y(), X("div", ZS, [e.showAvatar ? (Y(), X("div", QS, [fs(HS, { role: "assistant" })])) : Q("", !0), Z("div", $S, [fs(MS, {
|
|
23873
23966
|
content: "",
|
|
23874
23967
|
role: "assistant",
|
|
23875
23968
|
"is-pending-assistant": !0,
|
|
23876
23969
|
"show-typing": e.showTyping,
|
|
23877
23970
|
"show-cursor": !1
|
|
23878
23971
|
}, null, 8, ["show-typing"])])])) : Q("", !0),
|
|
23879
|
-
K(u).error ? (Y(), X("div",
|
|
23880
|
-
Z("span",
|
|
23972
|
+
K(u).error ? (Y(), X("div", eC, [
|
|
23973
|
+
Z("span", tC, U(K(u).error), 1),
|
|
23881
23974
|
m.value ? (Y(), X("button", {
|
|
23882
23975
|
key: 0,
|
|
23883
23976
|
class: "retry-btn",
|
|
@@ -23892,54 +23985,54 @@ app.mount('#app');
|
|
|
23892
23985
|
])) : Q("", !0)
|
|
23893
23986
|
]));
|
|
23894
23987
|
}
|
|
23895
|
-
}), [["__scopeId", "data-v-79cdf41e"]]),
|
|
23988
|
+
}), [["__scopeId", "data-v-79cdf41e"]]), rC = {
|
|
23896
23989
|
key: 0,
|
|
23897
23990
|
class: "queued-bar"
|
|
23898
|
-
},
|
|
23991
|
+
}, iC = { class: "queued-head" }, aC = { class: "queued-count" }, oC = { class: "queued-idx" }, sC = { class: "queued-text" }, cC = ["onClick"], lC = ["onClick"], uC = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23899
23992
|
__name: "QueuedBar",
|
|
23900
23993
|
setup(e) {
|
|
23901
23994
|
let { chat: t, editQueued: n } = y_(), { queuedTasks: r, removeQueuedTask: i } = t;
|
|
23902
|
-
return (e, t) => K(r).length ? (Y(), X("div",
|
|
23995
|
+
return (e, t) => K(r).length ? (Y(), X("div", rC, [Z("div", iC, [
|
|
23903
23996
|
t[0] ||= Z("span", { class: "queued-icon" }, "📋", -1),
|
|
23904
23997
|
t[1] ||= Z("span", { class: "queued-title" }, "排队中 · 生成完后自动执行", -1),
|
|
23905
|
-
Z("span",
|
|
23998
|
+
Z("span", aC, U(K(r).length), 1)
|
|
23906
23999
|
]), (Y(!0), X(J, null, sa(K(r), (e, t) => (Y(), X("div", {
|
|
23907
24000
|
key: t,
|
|
23908
24001
|
class: "queued-item"
|
|
23909
24002
|
}, [
|
|
23910
|
-
Z("span",
|
|
23911
|
-
Z("span",
|
|
24003
|
+
Z("span", oC, U(t + 1), 1),
|
|
24004
|
+
Z("span", sC, U(e), 1),
|
|
23912
24005
|
Z("button", {
|
|
23913
24006
|
class: "queued-act",
|
|
23914
24007
|
title: "修改(填回输入框编辑)",
|
|
23915
24008
|
onClick: (e) => K(n)(t)
|
|
23916
|
-
}, "✏️", 8,
|
|
24009
|
+
}, "✏️", 8, cC),
|
|
23917
24010
|
Z("button", {
|
|
23918
24011
|
class: "queued-act queued-del",
|
|
23919
24012
|
title: "撤销该任务",
|
|
23920
24013
|
onClick: (e) => K(i)(t)
|
|
23921
|
-
}, "✕", 8,
|
|
24014
|
+
}, "✕", 8, lC)
|
|
23922
24015
|
]))), 128))])) : Q("", !0);
|
|
23923
24016
|
}
|
|
23924
|
-
}), [["__scopeId", "data-v-f32730a9"]]),
|
|
24017
|
+
}), [["__scopeId", "data-v-f32730a9"]]), dC = {
|
|
23925
24018
|
key: 0,
|
|
23926
24019
|
class: "approval-bar"
|
|
23927
|
-
},
|
|
24020
|
+
}, fC = {
|
|
23928
24021
|
key: 0,
|
|
23929
24022
|
class: "approval-question"
|
|
23930
|
-
},
|
|
24023
|
+
}, pC = {
|
|
23931
24024
|
key: 1,
|
|
23932
24025
|
class: "approval-context"
|
|
23933
|
-
},
|
|
24026
|
+
}, mC = {
|
|
23934
24027
|
key: 2,
|
|
23935
24028
|
class: "approval-recommend"
|
|
23936
|
-
},
|
|
24029
|
+
}, hC = {
|
|
23937
24030
|
key: 3,
|
|
23938
24031
|
class: "approval-options"
|
|
23939
|
-
},
|
|
24032
|
+
}, gC = ["onClick"], _C = { class: "approval-actions" }, vC = { class: "approval-head" }, yC = { class: "approval-title" }, bC = {
|
|
23940
24033
|
key: 0,
|
|
23941
24034
|
class: "approval-args"
|
|
23942
|
-
},
|
|
24035
|
+
}, xC = { class: "approval-actions" }, SC = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
23943
24036
|
__name: "ApprovalBar",
|
|
23944
24037
|
setup(e) {
|
|
23945
24038
|
let { pendingApproval: t, resolveApproval: n } = y_().chat, r = /* @__PURE__ */ Cn(!1);
|
|
@@ -23959,17 +24052,17 @@ app.mount('#app');
|
|
|
23959
24052
|
return String(e);
|
|
23960
24053
|
}
|
|
23961
24054
|
});
|
|
23962
|
-
return (e, s) => K(t) ? (Y(), X("div",
|
|
24055
|
+
return (e, s) => K(t) ? (Y(), X("div", dC, [i.value ? (Y(), X(J, { key: 0 }, [
|
|
23963
24056
|
s[5] ||= Z("div", { class: "approval-head" }, [Z("span", { class: "approval-icon" }, "❓"), Z("span", { class: "approval-title" }, "AI 需要你确认")], -1),
|
|
23964
|
-
K(t).args?.question ? (Y(), X("div",
|
|
23965
|
-
K(t).args?.context ? (Y(), X("div",
|
|
23966
|
-
K(t).args?.recommendation ? (Y(), X("div",
|
|
23967
|
-
a.value.length ? (Y(), X("div",
|
|
24057
|
+
K(t).args?.question ? (Y(), X("div", fC, U(K(t).args.question), 1)) : Q("", !0),
|
|
24058
|
+
K(t).args?.context ? (Y(), X("div", pC, U(K(t).args.context), 1)) : Q("", !0),
|
|
24059
|
+
K(t).args?.recommendation ? (Y(), X("div", mC, "💡 推荐:" + U(K(t).args.recommendation), 1)) : Q("", !0),
|
|
24060
|
+
a.value.length ? (Y(), X("div", hC, [(Y(!0), X(J, null, sa(a.value, (e) => (Y(), X("button", {
|
|
23968
24061
|
key: e,
|
|
23969
24062
|
class: "approval-opt",
|
|
23970
24063
|
onClick: (t) => K(n)(e)
|
|
23971
|
-
}, U(e), 9,
|
|
23972
|
-
Z("div",
|
|
24064
|
+
}, U(e), 9, gC))), 128))])) : Q("", !0),
|
|
24065
|
+
Z("div", _C, [Z("button", {
|
|
23973
24066
|
class: "approval-deny",
|
|
23974
24067
|
onClick: s[0] ||= (e) => K(n)(!1)
|
|
23975
24068
|
}, "拒绝"), a.value.length ? Q("", !0) : (Y(), X("button", {
|
|
@@ -23978,17 +24071,17 @@ app.mount('#app');
|
|
|
23978
24071
|
onClick: s[1] ||= (e) => K(n)(!0)
|
|
23979
24072
|
}, "允许"))])
|
|
23980
24073
|
], 64)) : (Y(), X(J, { key: 1 }, [
|
|
23981
|
-
Z("div",
|
|
24074
|
+
Z("div", vC, [
|
|
23982
24075
|
s[7] ||= Z("span", { class: "approval-icon" }, "✋", -1),
|
|
23983
|
-
Z("span",
|
|
24076
|
+
Z("span", yC, [s[6] ||= _s("需确认工具调用:", -1), Z("code", null, U(K(t).toolName), 1)]),
|
|
23984
24077
|
o.value ? (Y(), X("button", {
|
|
23985
24078
|
key: 0,
|
|
23986
24079
|
class: "approval-toggle",
|
|
23987
24080
|
onClick: s[2] ||= (e) => r.value = !r.value
|
|
23988
24081
|
}, U(r.value ? "收起参数" : "查看参数") + U(r.value ? " ▴" : " ▾"), 1)) : Q("", !0)
|
|
23989
24082
|
]),
|
|
23990
|
-
o.value && r.value ? (Y(), X("pre",
|
|
23991
|
-
Z("div",
|
|
24083
|
+
o.value && r.value ? (Y(), X("pre", bC, U(o.value), 1)) : Q("", !0),
|
|
24084
|
+
Z("div", xC, [Z("button", {
|
|
23992
24085
|
class: "approval-deny",
|
|
23993
24086
|
onClick: s[3] ||= (e) => K(n)(!1)
|
|
23994
24087
|
}, "拒绝"), Z("button", {
|
|
@@ -23997,13 +24090,13 @@ app.mount('#app');
|
|
|
23997
24090
|
}, "允许")])
|
|
23998
24091
|
], 64))])) : Q("", !0);
|
|
23999
24092
|
}
|
|
24000
|
-
}), [["__scopeId", "data-v-296a936f"]]),
|
|
24093
|
+
}), [["__scopeId", "data-v-296a936f"]]), CC = {
|
|
24001
24094
|
key: 0,
|
|
24002
24095
|
class: "conflict-bar"
|
|
24003
|
-
},
|
|
24096
|
+
}, wC = { class: "conflict-head" }, TC = { class: "conflict-title" }, EC = { class: "conflict-detail" }, DC = {
|
|
24004
24097
|
key: 0,
|
|
24005
24098
|
class: "conflict-diff"
|
|
24006
|
-
},
|
|
24099
|
+
}, OC = { class: "conflict-diff-col" }, kC = { class: "conflict-diff-pre" }, AC = { class: "conflict-diff-col" }, jC = { class: "conflict-diff-pre" }, MC = { class: "conflict-actions" }, NC = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
24007
24100
|
__name: "ConflictBar",
|
|
24008
24101
|
props: {
|
|
24009
24102
|
pendingConflict: {},
|
|
@@ -24033,19 +24126,19 @@ app.mount('#app');
|
|
|
24033
24126
|
return String(e);
|
|
24034
24127
|
}
|
|
24035
24128
|
});
|
|
24036
|
-
return (t, a) => e.pendingConflict ? (Y(), X("div",
|
|
24037
|
-
Z("div",
|
|
24129
|
+
return (t, a) => e.pendingConflict ? (Y(), X("div", CC, [
|
|
24130
|
+
Z("div", wC, [a[6] ||= Z("span", { class: "conflict-icon" }, "⚠️", -1), Z("span", TC, [
|
|
24038
24131
|
a[4] ||= _s("写入冲突:", -1),
|
|
24039
24132
|
Z("code", null, U(e.pendingConflict.path), 1),
|
|
24040
24133
|
a[5] ||= _s(" 已被外部修改", -1)
|
|
24041
24134
|
])]),
|
|
24042
|
-
Z("div",
|
|
24135
|
+
Z("div", EC, " AI 基于「读取时的旧值」准备" + U(e.pendingConflict.op === "delete" ? "删除" : "写入") + ",但该属性在你读取之后被外部代码/其他 agent/手动改过。 ", 1),
|
|
24043
24136
|
Z("button", {
|
|
24044
24137
|
class: "conflict-toggle",
|
|
24045
24138
|
onClick: a[0] ||= (e) => n.value = !n.value
|
|
24046
24139
|
}, U(n.value ? "收起对比" : "查看值对比") + U(n.value ? " ▴" : " ▾"), 1),
|
|
24047
|
-
n.value ? (Y(), X("div",
|
|
24048
|
-
Z("div",
|
|
24140
|
+
n.value ? (Y(), X("div", DC, [Z("div", OC, [a[7] ||= Z("div", { class: "conflict-diff-label" }, "AI 想写的值", -1), Z("pre", kC, U(r.value || "(delete 操作无值)"), 1)]), Z("div", AC, [a[8] ||= Z("div", { class: "conflict-diff-label" }, "外部改后的当前值", -1), Z("pre", jC, U(i.value), 1)])])) : Q("", !0),
|
|
24141
|
+
Z("div", MC, [
|
|
24049
24142
|
Z("button", {
|
|
24050
24143
|
class: "conflict-keep",
|
|
24051
24144
|
onClick: a[1] ||= (t) => e.onResolve?.("keep_external"),
|
|
@@ -24064,16 +24157,16 @@ app.mount('#app');
|
|
|
24064
24157
|
])
|
|
24065
24158
|
])) : Q("", !0);
|
|
24066
24159
|
}
|
|
24067
|
-
}), [["__scopeId", "data-v-195e5b23"]]),
|
|
24160
|
+
}), [["__scopeId", "data-v-195e5b23"]]), PC = { class: "chat-footer" }, FC = { class: "chat-input-wrap" }, IC = {
|
|
24068
24161
|
key: 0,
|
|
24069
24162
|
class: "focus-chips"
|
|
24070
|
-
},
|
|
24163
|
+
}, LC = ["title", "onClick"], RC = { class: "focus-chip-path" }, zC = ["onClick"], BC = ["placeholder", "rows"], VC = { class: "input-actions" }, HC = ["disabled", "title"], UC = {
|
|
24071
24164
|
key: 0,
|
|
24072
24165
|
width: "16",
|
|
24073
24166
|
height: "16",
|
|
24074
24167
|
viewBox: "0 0 24 24",
|
|
24075
24168
|
fill: "currentColor"
|
|
24076
|
-
},
|
|
24169
|
+
}, WC = {
|
|
24077
24170
|
key: 1,
|
|
24078
24171
|
width: "18",
|
|
24079
24172
|
height: "18",
|
|
@@ -24081,7 +24174,7 @@ app.mount('#app');
|
|
|
24081
24174
|
fill: "none",
|
|
24082
24175
|
stroke: "currentColor",
|
|
24083
24176
|
"stroke-width": "2"
|
|
24084
|
-
},
|
|
24177
|
+
}, GC = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
24085
24178
|
__name: "ChatInput",
|
|
24086
24179
|
props: {
|
|
24087
24180
|
placeholder: {},
|
|
@@ -24089,238 +24182,238 @@ app.mount('#app');
|
|
|
24089
24182
|
},
|
|
24090
24183
|
setup(e) {
|
|
24091
24184
|
let t = y_(), { inputText: n, send: r, keydown: i, canUndo: a, undo: o, focuses: s, removeFocus: c, focusChipClick: l } = t, { state: u, stop: d } = t.chat;
|
|
24092
|
-
return (t, f) => (Y(), X("div",
|
|
24185
|
+
return (t, f) => (Y(), X("div", PC, [K(a) ? (Y(), X("button", {
|
|
24093
24186
|
key: 0,
|
|
24094
24187
|
class: "undo-foot-btn",
|
|
24095
24188
|
title: "回退到上次正常状态(还原对话历史 + 页面属性 + 工作区)",
|
|
24096
24189
|
onClick: f[0] ||= (...e) => K(o) && K(o)(...e)
|
|
24097
|
-
}, "↩ 回退")) : Q("", !0), Z("div",
|
|
24098
|
-
K(s).length ? (Y(), X("div",
|
|
24190
|
+
}, "↩ 回退")) : Q("", !0), Z("div", FC, [
|
|
24191
|
+
K(s).length ? (Y(), X("div", IC, [(Y(!0), X(J, null, sa(K(s), (e) => (Y(), X("span", {
|
|
24099
24192
|
key: e.path,
|
|
24100
24193
|
class: "focus-chip",
|
|
24101
24194
|
title: `精修中:${e.path}(点击回看 · ✕ 移除)`,
|
|
24102
24195
|
onClick: (t) => K(l)(e)
|
|
24103
24196
|
}, [
|
|
24104
24197
|
f[4] ||= Z("span", { class: "focus-chip-icon" }, "🎯", -1),
|
|
24105
|
-
Z("code",
|
|
24198
|
+
Z("code", RC, U(e.path), 1),
|
|
24106
24199
|
Z("button", {
|
|
24107
24200
|
type: "button",
|
|
24108
24201
|
class: "focus-chip-x",
|
|
24109
24202
|
"data-test": "focus-clear",
|
|
24110
24203
|
title: "移除此焦点",
|
|
24111
24204
|
onClick: yl((t) => K(c)(e.path), ["stop"])
|
|
24112
|
-
}, "✕", 8,
|
|
24113
|
-
], 8,
|
|
24205
|
+
}, "✕", 8, zC)
|
|
24206
|
+
], 8, LC))), 128))])) : Q("", !0),
|
|
24114
24207
|
Xr(Z("textarea", {
|
|
24115
24208
|
"onUpdate:modelValue": f[1] ||= (e) => /* @__PURE__ */ Sn(n) ? n.value = e : null,
|
|
24116
24209
|
class: H(["chat-input", { "has-focus-chip": K(s).length > 0 }]),
|
|
24117
24210
|
placeholder: e.placeholder,
|
|
24118
24211
|
rows: e.inputRows,
|
|
24119
24212
|
onKeydown: f[2] ||= (...e) => K(i) && K(i)(...e)
|
|
24120
|
-
}, null, 42,
|
|
24121
|
-
Z("div",
|
|
24213
|
+
}, null, 42, BC), [[gl, K(n)]]),
|
|
24214
|
+
Z("div", VC, [f[7] ||= Z("span", { class: "send-hint" }, "Enter 发送 · Shift+Enter 换行", -1), Z("button", {
|
|
24122
24215
|
class: H(["send-btn", { "stop-btn": K(u).loading }]),
|
|
24123
24216
|
disabled: !K(u).loading && !K(n).trim(),
|
|
24124
24217
|
title: K(u).loading ? "停止生成" : "发送",
|
|
24125
24218
|
onClick: f[3] ||= (e) => K(u).loading ? K(d)() : K(r)()
|
|
24126
|
-
}, [K(u).loading ? (Y(), X("svg",
|
|
24219
|
+
}, [K(u).loading ? (Y(), X("svg", UC, [...f[5] ||= [Z("rect", {
|
|
24127
24220
|
x: "6",
|
|
24128
24221
|
y: "6",
|
|
24129
24222
|
width: "12",
|
|
24130
24223
|
height: "12",
|
|
24131
24224
|
rx: "2"
|
|
24132
|
-
}, null, -1)]])) : (Y(), X("svg",
|
|
24225
|
+
}, null, -1)]])) : (Y(), X("svg", WC, [...f[6] ||= [Z("line", {
|
|
24133
24226
|
x1: "22",
|
|
24134
24227
|
y1: "2",
|
|
24135
24228
|
x2: "11",
|
|
24136
24229
|
y2: "13"
|
|
24137
|
-
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10,
|
|
24230
|
+
}, null, -1), Z("polygon", { points: "22 2 15 22 11 13 2 9 22 2" }, null, -1)]]))], 10, HC)])
|
|
24138
24231
|
])]));
|
|
24139
24232
|
}
|
|
24140
|
-
}), [["__scopeId", "data-v-a9087737"]]),
|
|
24233
|
+
}), [["__scopeId", "data-v-a9087737"]]), KC = {
|
|
24141
24234
|
key: 0,
|
|
24142
24235
|
class: "debug-drawer"
|
|
24143
|
-
},
|
|
24236
|
+
}, qC = { class: "drawer-header" }, JC = { class: "tab-group" }, YC = { class: "header-actions" }, XC = {
|
|
24144
24237
|
key: 0,
|
|
24145
24238
|
class: "drawer-filters"
|
|
24146
|
-
},
|
|
24239
|
+
}, ZC = ["onClick"], QC = { class: "chip-count" }, $C = { class: "chip-count" }, ew = { class: "drawer-body" }, tw = {
|
|
24147
24240
|
key: 0,
|
|
24148
24241
|
class: "trace-panel"
|
|
24149
|
-
},
|
|
24242
|
+
}, nw = {
|
|
24150
24243
|
key: 0,
|
|
24151
24244
|
class: "trace-empty"
|
|
24152
|
-
},
|
|
24245
|
+
}, rw = { class: "trace-metrics" }, iw = { class: "metric-card" }, aw = { class: "metric-card" }, ow = { class: "metric-card" }, sw = { class: "metric-card" }, cw = {
|
|
24153
24246
|
key: 0,
|
|
24154
24247
|
class: "metric-card"
|
|
24155
|
-
},
|
|
24248
|
+
}, lw = {
|
|
24156
24249
|
key: 1,
|
|
24157
24250
|
class: "metric-card"
|
|
24158
|
-
},
|
|
24251
|
+
}, uw = { class: "trace-spans" }, dw = { class: "span-ico" }, fw = { class: "span-name" }, pw = {
|
|
24159
24252
|
key: 0,
|
|
24160
24253
|
class: "span-dur"
|
|
24161
|
-
},
|
|
24254
|
+
}, mw = {
|
|
24162
24255
|
key: 1,
|
|
24163
24256
|
class: "span-status"
|
|
24164
|
-
},
|
|
24257
|
+
}, hw = {
|
|
24165
24258
|
key: 1,
|
|
24166
24259
|
class: "context-panel"
|
|
24167
|
-
},
|
|
24260
|
+
}, gw = {
|
|
24168
24261
|
key: 0,
|
|
24169
24262
|
class: "trace-empty"
|
|
24170
|
-
},
|
|
24263
|
+
}, _w = { class: "ctx-overview" }, vw = { class: "ctx-occupancy" }, yw = ["title"], bw = { class: "ctx-pct" }, xw = { class: "ctx-kv-row" }, Sw = { class: "ctx-kv" }, Cw = {
|
|
24171
24264
|
key: 0,
|
|
24172
24265
|
class: "ctx-kv"
|
|
24173
|
-
},
|
|
24266
|
+
}, ww = {
|
|
24174
24267
|
key: 1,
|
|
24175
24268
|
class: "ctx-kv"
|
|
24176
|
-
},
|
|
24269
|
+
}, Tw = ["title"], Ew = { class: "ctx-cat-bar" }, Dw = { class: "ctx-cat-tokens" }, Ow = {
|
|
24177
24270
|
key: 0,
|
|
24178
24271
|
class: "ctx-compression"
|
|
24179
|
-
},
|
|
24272
|
+
}, kw = { class: "ctx-kv-row" }, Aw = { class: "ctx-kv" }, jw = { class: "ctx-kv" }, Mw = { class: "ctx-kv" }, Nw = {
|
|
24180
24273
|
key: 0,
|
|
24181
24274
|
class: "ctx-kv"
|
|
24182
|
-
},
|
|
24275
|
+
}, Pw = {
|
|
24183
24276
|
key: 2,
|
|
24184
24277
|
class: "subagent-panel"
|
|
24185
|
-
},
|
|
24278
|
+
}, Fw = {
|
|
24186
24279
|
key: 0,
|
|
24187
24280
|
class: "sub-section"
|
|
24188
|
-
},
|
|
24281
|
+
}, Iw = { class: "sub-section-title" }, Lw = {
|
|
24189
24282
|
key: 1,
|
|
24190
24283
|
class: "trace-empty"
|
|
24191
|
-
},
|
|
24284
|
+
}, Rw = {
|
|
24192
24285
|
key: 0,
|
|
24193
24286
|
class: "sub-section"
|
|
24194
|
-
},
|
|
24287
|
+
}, zw = { class: "sub-section-title" }, Bw = { class: "sub-head" }, Vw = { class: "sub-label" }, Hw = { class: "sub-steps-badge" }, Uw = { class: "sub-task" }, Ww = {
|
|
24195
24288
|
key: 1,
|
|
24196
24289
|
class: "sub-section"
|
|
24197
|
-
},
|
|
24290
|
+
}, Gw = { class: "sub-section-title" }, Kw = { class: "sub-head" }, qw = { class: "sub-label" }, Jw = {
|
|
24198
24291
|
key: 0,
|
|
24199
24292
|
class: "sub-dur"
|
|
24200
|
-
},
|
|
24293
|
+
}, Yw = ["onClick"], Xw = { class: "sub-task" }, Zw = {
|
|
24201
24294
|
key: 0,
|
|
24202
24295
|
class: "sub-result"
|
|
24203
|
-
},
|
|
24296
|
+
}, Qw = {
|
|
24204
24297
|
key: 1,
|
|
24205
24298
|
class: "sub-steps-list"
|
|
24206
|
-
},
|
|
24299
|
+
}, $w = { class: "sub-step-kind" }, eT = { class: "sub-step-name" }, tT = { class: "sub-step-ts" }, nT = {
|
|
24207
24300
|
key: 0,
|
|
24208
24301
|
class: "empty"
|
|
24209
|
-
},
|
|
24302
|
+
}, rT = { class: "log-head" }, iT = {
|
|
24210
24303
|
key: 0,
|
|
24211
24304
|
class: "log-source"
|
|
24212
|
-
},
|
|
24305
|
+
}, aT = { class: "log-time" }, oT = { class: "log-body" }, sT = { class: "kv-grid" }, cT = { class: "kv" }, lT = { class: "v" }, uT = { class: "kv" }, dT = { class: "v" }, fT = { class: "kv" }, pT = { class: "v" }, mT = { class: "kv" }, hT = { class: "v" }, gT = { class: "section-label" }, _T = { class: "chip-row" }, vT = { class: "msg-list" }, yT = { class: "msg-text" }, bT = { class: "badge-row" }, xT = { class: "badge" }, ST = {
|
|
24213
24306
|
key: 0,
|
|
24214
24307
|
class: "badge muted"
|
|
24215
|
-
},
|
|
24308
|
+
}, CT = { class: "badge muted" }, wT = {
|
|
24216
24309
|
key: 1,
|
|
24217
24310
|
class: "badge muted"
|
|
24218
|
-
},
|
|
24311
|
+
}, TT = ["onClick"], ET = {
|
|
24219
24312
|
key: 0,
|
|
24220
24313
|
class: "msg-list"
|
|
24221
|
-
},
|
|
24314
|
+
}, DT = { class: "msg-detail" }, OT = {
|
|
24222
24315
|
key: 0,
|
|
24223
24316
|
class: "msg-text"
|
|
24224
|
-
},
|
|
24317
|
+
}, kT = { class: "tc-inline-name" }, AT = { class: "tc-inline-args" }, jT = {
|
|
24225
24318
|
key: 1,
|
|
24226
24319
|
class: "tc-id"
|
|
24227
|
-
},
|
|
24320
|
+
}, MT = {
|
|
24228
24321
|
key: 1,
|
|
24229
24322
|
class: "log-raw"
|
|
24230
|
-
},
|
|
24323
|
+
}, NT = { class: "badge-row" }, PT = { class: "badge" }, FT = {
|
|
24231
24324
|
key: 0,
|
|
24232
24325
|
class: "badge warn"
|
|
24233
|
-
},
|
|
24326
|
+
}, IT = {
|
|
24234
24327
|
key: 0,
|
|
24235
24328
|
class: "resp-content"
|
|
24236
|
-
},
|
|
24329
|
+
}, LT = {
|
|
24237
24330
|
key: 1,
|
|
24238
24331
|
class: "tc-list"
|
|
24239
|
-
},
|
|
24332
|
+
}, RT = { class: "tc-name" }, zT = { class: "tc-args" }, BT = {
|
|
24240
24333
|
key: 2,
|
|
24241
24334
|
class: "usage-row"
|
|
24242
|
-
},
|
|
24335
|
+
}, VT = { class: "usage" }, HT = { class: "usage" }, UT = { class: "usage" }, WT = {
|
|
24243
24336
|
key: 3,
|
|
24244
24337
|
class: "tc-card inline"
|
|
24245
|
-
},
|
|
24338
|
+
}, GT = { class: "tc-name" }, KT = { class: "tc-args" }, qT = {
|
|
24246
24339
|
key: 4,
|
|
24247
24340
|
class: "tc-card inline"
|
|
24248
|
-
},
|
|
24341
|
+
}, JT = { class: "tc-name" }, YT = { class: "tc-args" }, XT = {
|
|
24249
24342
|
key: 5,
|
|
24250
24343
|
class: "err-box"
|
|
24251
|
-
},
|
|
24344
|
+
}, ZT = { class: "log-footer" }, QT = ["onClick"], $T = ["onClick"], eE = {
|
|
24252
24345
|
key: 0,
|
|
24253
24346
|
class: "log-raw"
|
|
24254
|
-
},
|
|
24347
|
+
}, tE = {
|
|
24255
24348
|
key: 0,
|
|
24256
24349
|
class: "empty"
|
|
24257
|
-
},
|
|
24350
|
+
}, nE = {
|
|
24258
24351
|
key: 1,
|
|
24259
24352
|
class: "flow-section"
|
|
24260
|
-
},
|
|
24353
|
+
}, rE = { class: "flow-ico" }, iE = { class: "flow-label" }, aE = { class: "flow-detail" }, oE = { class: "flow-time" }, sE = { class: "flow-round-head" }, cE = { class: "flow-round-body" }, lE = { class: "flow-ico" }, uE = { class: "flow-label" }, dE = { class: "flow-detail" }, fE = { class: "flow-time" }, pE = {
|
|
24261
24354
|
key: 5,
|
|
24262
24355
|
class: "info-body"
|
|
24263
|
-
},
|
|
24356
|
+
}, mE = {
|
|
24264
24357
|
key: 0,
|
|
24265
24358
|
class: "empty"
|
|
24266
|
-
},
|
|
24359
|
+
}, hE = { class: "info-section" }, gE = { class: "kv-grid" }, _E = { class: "kv" }, vE = { class: "v" }, yE = { class: "kv" }, bE = { class: "v" }, xE = { class: "kv" }, SE = { class: "v" }, CE = { class: "kv" }, wE = { class: "v" }, TE = {
|
|
24267
24360
|
class: "kv",
|
|
24268
24361
|
style: { "margin-top": "6px" }
|
|
24269
|
-
},
|
|
24362
|
+
}, EE = {
|
|
24270
24363
|
class: "v",
|
|
24271
24364
|
style: { "font-size": "11px" }
|
|
24272
|
-
},
|
|
24365
|
+
}, DE = { class: "info-section" }, OE = { class: "info-title" }, kE = { class: "info-name" }, AE = { class: "info-desc" }, jE = {
|
|
24273
24366
|
key: 0,
|
|
24274
24367
|
class: "info-section"
|
|
24275
|
-
},
|
|
24368
|
+
}, ME = { class: "info-title" }, NE = ["onClick"], PE = { class: "info-desc" }, FE = {
|
|
24276
24369
|
key: 0,
|
|
24277
24370
|
class: "skill-content"
|
|
24278
|
-
},
|
|
24371
|
+
}, IE = {
|
|
24279
24372
|
key: 0,
|
|
24280
24373
|
class: "skill-loading"
|
|
24281
|
-
},
|
|
24374
|
+
}, LE = {
|
|
24282
24375
|
key: 1,
|
|
24283
24376
|
class: "skill-error"
|
|
24284
|
-
},
|
|
24377
|
+
}, RE = {
|
|
24285
24378
|
key: 2,
|
|
24286
24379
|
class: "skill-pre"
|
|
24287
|
-
},
|
|
24380
|
+
}, zE = {
|
|
24288
24381
|
key: 1,
|
|
24289
24382
|
class: "info-section"
|
|
24290
|
-
},
|
|
24383
|
+
}, BE = { class: "info-item" }, VE = { class: "info-name" }, HE = { class: "info-desc" }, UE = { class: "info-section" }, WE = { class: "kv-grid" }, GE = { class: "kv" }, KE = { class: "v" }, qE = { class: "kv" }, JE = { class: "v" }, YE = { class: "kv" }, XE = { class: "v" }, ZE = { class: "kv" }, QE = {
|
|
24291
24384
|
class: "v",
|
|
24292
24385
|
style: { "font-size": "11px" }
|
|
24293
|
-
},
|
|
24386
|
+
}, $E = {
|
|
24294
24387
|
key: 2,
|
|
24295
24388
|
class: "info-section"
|
|
24296
|
-
},
|
|
24389
|
+
}, eD = { class: "info-title" }, tD = { class: "info-name" }, nD = { class: "src-tag mcp" }, rD = { class: "info-desc" }, iD = {
|
|
24297
24390
|
key: 3,
|
|
24298
24391
|
class: "info-section"
|
|
24299
|
-
},
|
|
24392
|
+
}, aD = { class: "kv-grid" }, oD = { class: "kv" }, sD = { class: "v" }, cD = { class: "kv" }, lD = { class: "v" }, uD = { class: "kv" }, dD = { class: "v" }, fD = {
|
|
24300
24393
|
key: 0,
|
|
24301
24394
|
class: "kv"
|
|
24302
|
-
},
|
|
24395
|
+
}, pD = {
|
|
24303
24396
|
class: "v",
|
|
24304
24397
|
style: { "font-size": "11px" }
|
|
24305
|
-
},
|
|
24398
|
+
}, mD = {
|
|
24306
24399
|
key: 4,
|
|
24307
24400
|
class: "info-section"
|
|
24308
|
-
},
|
|
24401
|
+
}, hD = { class: "info-title" }, gD = {
|
|
24309
24402
|
key: 5,
|
|
24310
24403
|
class: "info-section"
|
|
24311
|
-
},
|
|
24404
|
+
}, _D = { class: "info-pre" }, vD = {
|
|
24312
24405
|
key: 6,
|
|
24313
24406
|
class: "info-section"
|
|
24314
|
-
},
|
|
24407
|
+
}, yD = { class: "info-kv" }, bD = { class: "kv" }, xD = { class: "v" }, SD = { class: "kv" }, CD = { class: "v" }, wD = { class: "kv" }, TD = { class: "v" }, ED = { class: "kv" }, DD = { class: "v" }, OD = { class: "kv" }, kD = {
|
|
24315
24408
|
class: "v",
|
|
24316
24409
|
style: { "font-size": "11px" }
|
|
24317
|
-
},
|
|
24410
|
+
}, AD = {
|
|
24318
24411
|
key: 0,
|
|
24319
24412
|
class: "kv"
|
|
24320
|
-
},
|
|
24413
|
+
}, jD = {
|
|
24321
24414
|
class: "v",
|
|
24322
24415
|
style: { "font-size": "11px" }
|
|
24323
|
-
},
|
|
24416
|
+
}, MD = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
24324
24417
|
__name: "DebugDrawer",
|
|
24325
24418
|
props: {
|
|
24326
24419
|
logs: { default: () => [] },
|
|
@@ -24572,8 +24665,8 @@ app.mount('#app');
|
|
|
24572
24665
|
}
|
|
24573
24666
|
}
|
|
24574
24667
|
return (t, n) => (Y(), as(_i, { to: "body" }, [fs(gc, { name: "drawer" }, {
|
|
24575
|
-
default: Jr(() => [e.visible ? (Y(), X("div",
|
|
24576
|
-
Z("div",
|
|
24668
|
+
default: Jr(() => [e.visible ? (Y(), X("div", KC, [Z("div", { class: H(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
24669
|
+
Z("div", qC, [Z("div", JC, [
|
|
24577
24670
|
Z("button", {
|
|
24578
24671
|
class: H(["tab-btn", { active: y.value === "logs" }]),
|
|
24579
24672
|
onClick: n[0] ||= (e) => w("logs")
|
|
@@ -24602,7 +24695,7 @@ app.mount('#app');
|
|
|
24602
24695
|
class: H(["tab-btn", { active: y.value === "info" }]),
|
|
24603
24696
|
onClick: n[5] ||= (e) => w("info")
|
|
24604
24697
|
}, "🧬 Agent 信息", 2)) : Q("", !0)
|
|
24605
|
-
]), Z("div",
|
|
24698
|
+
]), Z("div", YC, [y.value === "logs" ? (Y(), X("button", {
|
|
24606
24699
|
key: 0,
|
|
24607
24700
|
class: "hd-btn",
|
|
24608
24701
|
title: "清空日志",
|
|
@@ -24612,38 +24705,38 @@ app.mount('#app');
|
|
|
24612
24705
|
title: "关闭",
|
|
24613
24706
|
onClick: _
|
|
24614
24707
|
}, "✕")])]),
|
|
24615
|
-
y.value === "logs" ? (Y(), X("div",
|
|
24708
|
+
y.value === "logs" ? (Y(), X("div", XC, [(Y(), X(J, null, sa(s, (e, t) => Z("button", {
|
|
24616
24709
|
key: t,
|
|
24617
24710
|
class: H(["filter-chip", { active: i.value === t }]),
|
|
24618
24711
|
style: Oe({ "--chip-color": e.color }),
|
|
24619
24712
|
onClick: (e) => i.value = t
|
|
24620
|
-
}, [_s(U(e.icon) + " " + U(e.label) + " ", 1), Z("span",
|
|
24713
|
+
}, [_s(U(e.icon) + " " + U(e.label) + " ", 1), Z("span", QC, U(u.value[t] || 0), 1)], 14, ZC)), 64)), Z("button", {
|
|
24621
24714
|
class: H(["filter-chip all", { active: i.value === "all" }]),
|
|
24622
24715
|
onClick: n[6] ||= (e) => i.value = "all"
|
|
24623
|
-
}, [n[7] ||= _s(" 全部 ", -1), Z("span",
|
|
24624
|
-
Z("div",
|
|
24625
|
-
y.value === "trace" ? (Y(), X("div",
|
|
24626
|
-
Z("div",
|
|
24627
|
-
Z("div",
|
|
24628
|
-
Z("div",
|
|
24629
|
-
Z("div",
|
|
24630
|
-
j.value.compressions ? (Y(), X("div",
|
|
24631
|
-
j.value.totalTokens ? (Y(), X("div",
|
|
24632
|
-
]), Z("div",
|
|
24716
|
+
}, [n[7] ||= _s(" 全部 ", -1), Z("span", $C, U(u.value.all || 0), 1)], 2)])) : Q("", !0),
|
|
24717
|
+
Z("div", ew, [
|
|
24718
|
+
y.value === "trace" ? (Y(), X("div", tw, [j.value ? (Y(), X(J, { key: 1 }, [Z("div", rw, [
|
|
24719
|
+
Z("div", iw, [n[9] ||= Z("span", null, "轮次", -1), Z("b", null, U(j.value.rounds), 1)]),
|
|
24720
|
+
Z("div", aw, [n[10] ||= Z("span", null, "总耗时", -1), Z("b", null, U(j.value.totalDurationMs) + "ms", 1)]),
|
|
24721
|
+
Z("div", ow, [n[11] ||= Z("span", null, "平均/轮", -1), Z("b", null, U(j.value.avgRoundMs) + "ms", 1)]),
|
|
24722
|
+
Z("div", sw, [n[12] ||= Z("span", null, "工具", -1), Z("b", null, U(j.value.toolCalls) + "(✅" + U(Math.round(j.value.toolSuccessRate * 100)) + "%)", 1)]),
|
|
24723
|
+
j.value.compressions ? (Y(), X("div", cw, [n[13] ||= Z("span", null, "压缩", -1), Z("b", null, U(j.value.compressions), 1)])) : Q("", !0),
|
|
24724
|
+
j.value.totalTokens ? (Y(), X("div", lw, [n[14] ||= Z("span", null, "Token", -1), Z("b", null, U(j.value.totalTokens.total), 1)])) : Q("", !0)
|
|
24725
|
+
]), Z("div", uw, [(Y(!0), X(J, null, sa(ee.value, (e) => (Y(), X("div", {
|
|
24633
24726
|
key: e.id,
|
|
24634
24727
|
class: H(["trace-span", [e.type, e.status]])
|
|
24635
24728
|
}, [
|
|
24636
|
-
Z("span",
|
|
24637
|
-
Z("span",
|
|
24638
|
-
e.durationMs ? (Y(), X("span",
|
|
24639
|
-
e.status === "error" ? (Y(), X("span",
|
|
24640
|
-
], 2))), 128))])], 64)) : (Y(), X("div",
|
|
24729
|
+
Z("span", dw, U(re(e.type)), 1),
|
|
24730
|
+
Z("span", fw, U(e.name), 1),
|
|
24731
|
+
e.durationMs ? (Y(), X("span", pw, U(A(e.durationMs)), 1)) : Q("", !0),
|
|
24732
|
+
e.status === "error" ? (Y(), X("span", mw, "❌")) : Q("", !0)
|
|
24733
|
+
], 2))), 128))])], 64)) : (Y(), X("div", nw, [...n[8] ||= [
|
|
24641
24734
|
_s("未开启 tracing(", -1),
|
|
24642
24735
|
Z("code", null, "capabilities.tracing:true", -1),
|
|
24643
24736
|
_s(")或暂无 trace。跑一轮 agent 后刷新。", -1)
|
|
24644
24737
|
]]))])) : Q("", !0),
|
|
24645
|
-
y.value === "context" ? (Y(), X("div",
|
|
24646
|
-
Z("div",
|
|
24738
|
+
y.value === "context" ? (Y(), X("div", hw, [M.value ? (Y(), X(J, { key: 1 }, [
|
|
24739
|
+
Z("div", _w, [Z("div", vw, [Z("div", {
|
|
24647
24740
|
class: "ctx-bar-track",
|
|
24648
24741
|
title: `占用 ${Math.round(M.value.occupancy * 100)}%`
|
|
24649
24742
|
}, [Z("div", {
|
|
@@ -24654,10 +24747,10 @@ app.mount('#app');
|
|
|
24654
24747
|
class: "ctx-threshold-mark",
|
|
24655
24748
|
style: Oe({ left: Math.min(M.value.thresholdRatio * 100, 100) + "%" }),
|
|
24656
24749
|
title: "压缩阈值"
|
|
24657
|
-
}, null, 4)) : Q("", !0)], 8,
|
|
24658
|
-
Z("span",
|
|
24659
|
-
M.value.contextWindow ? (Y(), X("span",
|
|
24660
|
-
M.value.thresholdRatio > 0 ? (Y(), X("span",
|
|
24750
|
+
}, null, 4)) : Q("", !0)], 8, yw), Z("span", bw, U(Math.round(M.value.occupancy * 100)) + "%", 1)]), Z("div", xw, [
|
|
24751
|
+
Z("span", Sw, "估算 " + U(M.value.totalTokens) + " token", 1),
|
|
24752
|
+
M.value.contextWindow ? (Y(), X("span", Cw, "窗口 " + U(M.value.contextWindow), 1)) : Q("", !0),
|
|
24753
|
+
M.value.thresholdRatio > 0 ? (Y(), X("span", ww, "阈值 " + U(Math.round(M.value.thresholdRatio * 100)) + "%", 1)) : Q("", !0)
|
|
24661
24754
|
])]),
|
|
24662
24755
|
n[16] ||= Z("div", { class: "ctx-section-title" }, "分类构成(近似)", -1),
|
|
24663
24756
|
(Y(!0), X(J, null, sa(M.value.categories, (e) => (Y(), X("div", {
|
|
@@ -24667,228 +24760,228 @@ app.mount('#app');
|
|
|
24667
24760
|
Z("span", {
|
|
24668
24761
|
class: "ctx-cat-label",
|
|
24669
24762
|
title: e.label
|
|
24670
|
-
}, U(e.label), 9,
|
|
24671
|
-
Z("div",
|
|
24763
|
+
}, U(e.label), 9, Tw),
|
|
24764
|
+
Z("div", Ew, [Z("div", {
|
|
24672
24765
|
class: "ctx-cat-fill",
|
|
24673
24766
|
style: Oe({ width: Math.max(Math.round(e.pct * 100), 2) + "%" })
|
|
24674
24767
|
}, null, 4)]),
|
|
24675
|
-
Z("span",
|
|
24768
|
+
Z("span", Dw, [_s(U(e.tokens) + " ", 1), Z("i", null, "(" + U(Math.round(e.pct * 100)) + "%)", 1)])
|
|
24676
24769
|
]))), 128)),
|
|
24677
|
-
M.value.compression ? (Y(), X("div",
|
|
24678
|
-
Z("span",
|
|
24679
|
-
Z("span",
|
|
24680
|
-
Z("span",
|
|
24681
|
-
M.value.compression.decision ? (Y(), X("span",
|
|
24770
|
+
M.value.compression ? (Y(), X("div", Ow, [n[15] ||= Z("div", { class: "ctx-section-title" }, "最近压缩", -1), Z("div", kw, [
|
|
24771
|
+
Z("span", Aw, "摘要 " + U(M.value.compression.roundsSummarized) + "/" + U(M.value.compression.roundsTotal) + " 轮", 1),
|
|
24772
|
+
Z("span", jw, "召回 " + U(M.value.compression.roundsRecalled), 1),
|
|
24773
|
+
Z("span", Mw, U(M.value.compression.strategy), 1),
|
|
24774
|
+
M.value.compression.decision ? (Y(), X("span", Nw, "🤖 agent 决策:" + U(R(M.value.compression.decision)), 1)) : Q("", !0)
|
|
24682
24775
|
])])) : Q("", !0)
|
|
24683
|
-
], 64)) : (Y(), X("div",
|
|
24684
|
-
y.value === "subagent" ? (Y(), X("div",
|
|
24776
|
+
], 64)) : (Y(), X("div", gw, "未开启 contextInspector(默认开)或暂无快照。跑一轮 agent 后切回刷新。"))])) : Q("", !0),
|
|
24777
|
+
y.value === "subagent" ? (Y(), X("div", Pw, [F.value.length ? (Y(), X("div", Fw, [Z("div", Iw, "🔒 组件锁 (" + U(F.value.length) + ")", 1), (Y(!0), X(J, null, sa(F.value, ([e, t]) => (Y(), X("div", {
|
|
24685
24778
|
key: "lock-" + e,
|
|
24686
24779
|
class: "sub-task"
|
|
24687
|
-
}, "🔒 " + U(e) + " ← " + U(t), 1))), 128))])) : Q("", !0), !te.value.length && !P.value.length ? (Y(), X("div",
|
|
24780
|
+
}, "🔒 " + U(e) + " ← " + U(t), 1))), 128))])) : Q("", !0), !te.value.length && !P.value.length ? (Y(), X("div", Lw, [...n[17] ||= [
|
|
24688
24781
|
_s(" 尚未委派子 agent。主 agent 调用 ", -1),
|
|
24689
24782
|
Z("code", null, "use_<id>", -1),
|
|
24690
24783
|
_s(" 或 ", -1),
|
|
24691
24784
|
Z("code", null, "spawn_agent", -1),
|
|
24692
24785
|
_s(" 后,这里展示运行状态与委派历史。 ", -1)
|
|
24693
|
-
]])) : (Y(), X(J, { key: 2 }, [te.value.length ? (Y(), X("div",
|
|
24786
|
+
]])) : (Y(), X(J, { key: 2 }, [te.value.length ? (Y(), X("div", Rw, [Z("div", zw, "▶ 运行中 (" + U(te.value.length) + ")", 1), (Y(!0), X(J, null, sa(te.value, (e, t) => (Y(), X("div", {
|
|
24694
24787
|
key: "a" + t,
|
|
24695
24788
|
class: H(["sub-card", e.status])
|
|
24696
|
-
}, [Z("div",
|
|
24789
|
+
}, [Z("div", Bw, [
|
|
24697
24790
|
Z("span", {
|
|
24698
24791
|
class: "sub-status",
|
|
24699
24792
|
style: Oe({ background: ne[e.status] && ne[e.status].color || "#9ca3af" })
|
|
24700
24793
|
}, U(ne[e.status] && ne[e.status].label || e.status), 5),
|
|
24701
|
-
Z("span",
|
|
24702
|
-
Z("span",
|
|
24703
|
-
]), Z("div",
|
|
24794
|
+
Z("span", Vw, U(e.label), 1),
|
|
24795
|
+
Z("span", Hw, U(e.steps.length) + " 步", 1)
|
|
24796
|
+
]), Z("div", Uw, U(k(e.task, 80)), 1)], 2))), 128))])) : Q("", !0), P.value.length ? (Y(), X("div", Ww, [Z("div", Gw, "🕐 历史 (" + U(P.value.length) + ")", 1), (Y(!0), X(J, null, sa(P.value, (e, t) => (Y(), X("div", {
|
|
24704
24797
|
key: "h" + t,
|
|
24705
24798
|
class: H(["sub-card", e.status])
|
|
24706
24799
|
}, [
|
|
24707
|
-
Z("div",
|
|
24800
|
+
Z("div", Kw, [
|
|
24708
24801
|
Z("span", {
|
|
24709
24802
|
class: "sub-status",
|
|
24710
24803
|
style: Oe({ background: ne[e.status] && ne[e.status].color || "#9ca3af" })
|
|
24711
24804
|
}, U(ne[e.status] && ne[e.status].label || e.status), 5),
|
|
24712
|
-
Z("span",
|
|
24713
|
-
e.durationMs == null ? Q("", !0) : (Y(), X("span",
|
|
24805
|
+
Z("span", qw, U(e.label), 1),
|
|
24806
|
+
e.durationMs == null ? Q("", !0) : (Y(), X("span", Jw, U(A(e.durationMs)), 1)),
|
|
24714
24807
|
e.steps.length ? (Y(), X("button", {
|
|
24715
24808
|
key: 1,
|
|
24716
24809
|
class: "sub-toggle",
|
|
24717
24810
|
onClick: (e) => L(t)
|
|
24718
|
-
}, U(I.value.has(t) ? "收起" : "步骤"), 9,
|
|
24811
|
+
}, U(I.value.has(t) ? "收起" : "步骤"), 9, Yw)) : Q("", !0)
|
|
24719
24812
|
]),
|
|
24720
|
-
Z("div",
|
|
24721
|
-
e.resultPreview ? (Y(), X("div",
|
|
24722
|
-
I.value.has(t) && e.steps.length ? (Y(), X("div",
|
|
24813
|
+
Z("div", Xw, U(k(e.task, 80)), 1),
|
|
24814
|
+
e.resultPreview ? (Y(), X("div", Zw, U(e.resultPreview), 1)) : Q("", !0),
|
|
24815
|
+
I.value.has(t) && e.steps.length ? (Y(), X("div", Qw, [(Y(!0), X(J, null, sa(e.steps, (e, t) => (Y(), X("div", {
|
|
24723
24816
|
key: t,
|
|
24724
24817
|
class: "sub-step"
|
|
24725
24818
|
}, [
|
|
24726
|
-
Z("span",
|
|
24727
|
-
Z("span",
|
|
24728
|
-
Z("span",
|
|
24819
|
+
Z("span", $w, U(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
24820
|
+
Z("span", eT, U(e.name), 1),
|
|
24821
|
+
Z("span", tT, U(d(e.ts)), 1)
|
|
24729
24822
|
]))), 128))])) : Q("", !0)
|
|
24730
24823
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
24731
|
-
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div",
|
|
24824
|
+
y.value === "logs" ? (Y(), X(J, { key: 3 }, [l.value.length === 0 ? (Y(), X("div", nT, " 暂无日志,发送消息后这里会显示 Agent 的完整上下文、工具调用等信息 ")) : Q("", !0), (Y(!0), X(J, null, sa(l.value, (e, t) => (Y(), X("div", {
|
|
24732
24825
|
key: t,
|
|
24733
24826
|
class: "log-item"
|
|
24734
24827
|
}, [
|
|
24735
|
-
Z("div",
|
|
24828
|
+
Z("div", rT, [
|
|
24736
24829
|
Z("span", {
|
|
24737
24830
|
class: "log-type",
|
|
24738
24831
|
style: Oe({ background: s[e.type].color })
|
|
24739
24832
|
}, U(s[e.type].icon) + " " + U(s[e.type].label), 5),
|
|
24740
|
-
e.source ? (Y(), X("span",
|
|
24741
|
-
Z("span",
|
|
24833
|
+
e.source ? (Y(), X("span", iT, "↳ " + U(e.source), 1)) : Q("", !0),
|
|
24834
|
+
Z("span", aT, U(d(e.timestamp)), 1)
|
|
24742
24835
|
]),
|
|
24743
|
-
Z("div",
|
|
24744
|
-
Z("div",
|
|
24745
|
-
Z("div",
|
|
24746
|
-
Z("div",
|
|
24747
|
-
Z("div",
|
|
24748
|
-
Z("div",
|
|
24836
|
+
Z("div", oT, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
24837
|
+
Z("div", sT, [
|
|
24838
|
+
Z("div", cT, [n[18] ||= Z("span", { class: "k" }, "模型", -1), Z("span", lT, U(e.data.model), 1)]),
|
|
24839
|
+
Z("div", uT, [n[19] ||= Z("span", { class: "k" }, "温度", -1), Z("span", dT, U(e.data.temperature), 1)]),
|
|
24840
|
+
Z("div", fT, [n[20] ||= Z("span", { class: "k" }, "MaxTokens", -1), Z("span", pT, U(e.data.maxTokens), 1)]),
|
|
24841
|
+
Z("div", mT, [n[21] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", hT, U(e.data.totalMessages), 1)])
|
|
24749
24842
|
]),
|
|
24750
|
-
Z("div",
|
|
24751
|
-
Z("div",
|
|
24843
|
+
Z("div", gT, "工具 (" + U(e.data.tools?.length || 0) + ")", 1),
|
|
24844
|
+
Z("div", _T, [(Y(!0), X(J, null, sa(e.data.tools, (e) => (Y(), X("span", {
|
|
24752
24845
|
key: e,
|
|
24753
24846
|
class: "tool-chip"
|
|
24754
24847
|
}, U(e), 1))), 128))]),
|
|
24755
24848
|
n[22] ||= Z("div", { class: "section-label" }, "上下文消息", -1),
|
|
24756
|
-
Z("div",
|
|
24849
|
+
Z("div", vT, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
|
|
24757
24850
|
key: t,
|
|
24758
24851
|
class: "msg-row"
|
|
24759
24852
|
}, [Z("span", {
|
|
24760
24853
|
class: "msg-role",
|
|
24761
24854
|
style: Oe({ background: g(e.type).color })
|
|
24762
|
-
}, U(g(e.type).label), 5), Z("span",
|
|
24763
|
-
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div",
|
|
24764
|
-
Z("span",
|
|
24765
|
-
e.data.model ? (Y(), X("span",
|
|
24766
|
-
Z("span",
|
|
24767
|
-
e.data.tools?.length ? (Y(), X("span",
|
|
24855
|
+
}, U(g(e.type).label), 5), Z("span", yT, U(e.content), 1)]))), 128))])
|
|
24856
|
+
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", bT, [
|
|
24857
|
+
Z("span", xT, "第 " + U(e.data.round) + " 轮", 1),
|
|
24858
|
+
e.data.model ? (Y(), X("span", ST, U(e.data.model), 1)) : Q("", !0),
|
|
24859
|
+
Z("span", CT, U((e.data.messages || []).length) + " 条消息", 1),
|
|
24860
|
+
e.data.tools?.length ? (Y(), X("span", wT, U(e.data.tools.length) + " 工具", 1)) : Q("", !0),
|
|
24768
24861
|
Z("button", {
|
|
24769
24862
|
class: "view-toggle",
|
|
24770
24863
|
onClick: (e) => p(t)
|
|
24771
|
-
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9,
|
|
24772
|
-
]), o.value.has(t) ? (Y(), X("pre",
|
|
24864
|
+
}, U(o.value.has(t) ? "🗂 卡片视图" : "📋 请求体"), 9, TT)
|
|
24865
|
+
]), o.value.has(t) ? (Y(), X("pre", MT, [Z("code", null, U(m(e.data.messages)), 1)])) : (Y(), X("div", ET, [(Y(!0), X(J, null, sa(e.data.messages, (e, t) => (Y(), X("div", {
|
|
24773
24866
|
key: t,
|
|
24774
24867
|
class: "msg-row"
|
|
24775
24868
|
}, [Z("span", {
|
|
24776
24869
|
class: "msg-role",
|
|
24777
24870
|
style: Oe({ background: g(e.role).color })
|
|
24778
|
-
}, U(g(e.role).label), 5), Z("div",
|
|
24779
|
-
e.content ? (Y(), X("span",
|
|
24871
|
+
}, U(g(e.role).label), 5), Z("div", DT, [
|
|
24872
|
+
e.content ? (Y(), X("span", OT, U(e.content), 1)) : Q("", !0),
|
|
24780
24873
|
(Y(!0), X(J, null, sa(e.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
24781
24874
|
key: t,
|
|
24782
24875
|
class: "tc-inline"
|
|
24783
|
-
}, [Z("span",
|
|
24784
|
-
e.tool_call_id ? (Y(), X("span",
|
|
24876
|
+
}, [Z("span", kT, "🔧 " + U(e.function?.name || e.name), 1), Z("code", AT, U(e.function?.arguments ?? e.args), 1)]))), 128)),
|
|
24877
|
+
e.tool_call_id ? (Y(), X("span", jT, "↳ tool_call_id: " + U(e.tool_call_id), 1)) : Q("", !0)
|
|
24785
24878
|
])]))), 128))]))], 64)) : e.type === "llm_response" ? (Y(), X(J, { key: 2 }, [
|
|
24786
|
-
Z("div",
|
|
24787
|
-
e.data.content ? (Y(), X("div",
|
|
24788
|
-
e.data.toolCalls?.length ? (Y(), X("div",
|
|
24879
|
+
Z("div", NT, [Z("span", PT, "第 " + U(e.data.round) + " 轮", 1), e.data.toolCalls?.length ? (Y(), X("span", FT, "🔧 " + U(e.data.toolCalls.length) + " 个工具调用", 1)) : Q("", !0)]),
|
|
24880
|
+
e.data.content ? (Y(), X("div", IT, U(e.data.content), 1)) : Q("", !0),
|
|
24881
|
+
e.data.toolCalls?.length ? (Y(), X("div", LT, [(Y(!0), X(J, null, sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
24789
24882
|
key: t,
|
|
24790
24883
|
class: "tc-card"
|
|
24791
|
-
}, [Z("div",
|
|
24792
|
-
e.data.usage ? (Y(), X("div",
|
|
24793
|
-
Z("span",
|
|
24794
|
-
Z("span",
|
|
24795
|
-
Z("span",
|
|
24884
|
+
}, [Z("div", RT, "🔧 " + U(e.name), 1), Z("pre", zT, U(m(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
24885
|
+
e.data.usage ? (Y(), X("div", BT, [
|
|
24886
|
+
Z("span", VT, "prompt: " + U(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
24887
|
+
Z("span", HT, "completion: " + U(e.data.usage.completion_tokens ?? "-"), 1),
|
|
24888
|
+
Z("span", UT, "total: " + U(e.data.usage.total_tokens ?? "-"), 1)
|
|
24796
24889
|
])) : Q("", !0)
|
|
24797
|
-
], 64)) : e.type === "tool_call" ? (Y(), X("div",
|
|
24798
|
-
Z("div",
|
|
24890
|
+
], 64)) : e.type === "tool_call" ? (Y(), X("div", WT, [Z("div", GT, "🔧 " + U(e.data.name), 1), Z("pre", KT, U(m(e.data.args)), 1)])) : e.type === "tool_result" ? (Y(), X("div", qT, [Z("div", JT, "✅ " + U(e.data.name) + " 结果", 1), Z("pre", YT, U(e.data.result), 1)])) : e.type === "error" ? (Y(), X("div", XT, U(e.data.tool ? `[${e.data.tool}] ` : "") + U(e.data.error), 1)) : Q("", !0)]),
|
|
24891
|
+
Z("div", ZT, [Z("button", {
|
|
24799
24892
|
class: "raw-toggle",
|
|
24800
24893
|
onClick: (e) => f(t)
|
|
24801
|
-
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9,
|
|
24894
|
+
}, U(a.value.has(t) ? "收起原始 JSON" : "查看原始 JSON"), 9, QT), Z("button", {
|
|
24802
24895
|
class: "raw-toggle",
|
|
24803
24896
|
onClick: (t) => K(g_)(m(e.data))
|
|
24804
|
-
}, "复制", 8,
|
|
24805
|
-
a.value.has(t) ? (Y(), X("pre",
|
|
24897
|
+
}, "复制", 8, $T)]),
|
|
24898
|
+
a.value.has(t) ? (Y(), X("pre", eE, [Z("code", null, U(m(e.data)), 1)])) : Q("", !0)
|
|
24806
24899
|
]))), 128))], 64)) : y.value === "flow" ? (Y(), X(J, { key: 4 }, [
|
|
24807
|
-
c.value.length ? Q("", !0) : (Y(), X("div",
|
|
24808
|
-
O.value.pre.length ? (Y(), X("div",
|
|
24900
|
+
c.value.length ? Q("", !0) : (Y(), X("div", tE, "暂无日志,发送消息后这里按轮次展示执行流程")),
|
|
24901
|
+
O.value.pre.length ? (Y(), X("div", nE, [n[23] ||= Z("div", { class: "flow-section-title" }, "⚙️ 准备 / 其他", -1), (Y(!0), X(J, null, sa(O.value.pre, (e, t) => (Y(), X("div", {
|
|
24809
24902
|
key: "p" + t,
|
|
24810
24903
|
class: H(["flow-node", e.type])
|
|
24811
24904
|
}, [
|
|
24812
|
-
Z("span",
|
|
24813
|
-
Z("span",
|
|
24814
|
-
Z("span",
|
|
24815
|
-
Z("span",
|
|
24905
|
+
Z("span", rE, U(s[e.type]?.icon), 1),
|
|
24906
|
+
Z("span", iE, U(s[e.type]?.label), 1),
|
|
24907
|
+
Z("span", aE, U(ie(e)), 1),
|
|
24908
|
+
Z("span", oE, U(d(e.timestamp)), 1)
|
|
24816
24909
|
], 2))), 128))])) : Q("", !0),
|
|
24817
24910
|
(Y(!0), X(J, null, sa(O.value.rounds, (e) => (Y(), X("div", {
|
|
24818
24911
|
key: e.round,
|
|
24819
24912
|
class: "flow-round"
|
|
24820
|
-
}, [Z("div",
|
|
24913
|
+
}, [Z("div", sE, "🔁 第 " + U(e.round) + " 轮", 1), Z("div", cE, [(Y(!0), X(J, null, sa(e.items, (e, t) => (Y(), X("div", {
|
|
24821
24914
|
key: t,
|
|
24822
24915
|
class: H(["flow-node", e.type])
|
|
24823
24916
|
}, [
|
|
24824
|
-
Z("span",
|
|
24825
|
-
Z("span",
|
|
24826
|
-
Z("span",
|
|
24827
|
-
Z("span",
|
|
24917
|
+
Z("span", lE, U(s[e.type]?.icon), 1),
|
|
24918
|
+
Z("span", uE, U(s[e.type]?.label), 1),
|
|
24919
|
+
Z("span", dE, U(ie(e)), 1),
|
|
24920
|
+
Z("span", fE, U(d(e.timestamp)), 1)
|
|
24828
24921
|
], 2))), 128))])]))), 128))
|
|
24829
|
-
], 64)) : (Y(), X("div",
|
|
24830
|
-
Z("div",
|
|
24922
|
+
], 64)) : (Y(), X("div", pE, [b.value ? (Y(), X(J, { key: 1 }, [
|
|
24923
|
+
Z("div", hE, [
|
|
24831
24924
|
n[29] ||= Z("div", { class: "info-title" }, "基本信息", -1),
|
|
24832
|
-
Z("div",
|
|
24833
|
-
Z("div",
|
|
24834
|
-
Z("div",
|
|
24835
|
-
Z("div",
|
|
24836
|
-
Z("div",
|
|
24925
|
+
Z("div", gE, [
|
|
24926
|
+
Z("div", _E, [n[24] ||= Z("span", { class: "k" }, "ID", -1), Z("span", vE, U(b.value.id), 1)]),
|
|
24927
|
+
Z("div", yE, [n[25] ||= Z("span", { class: "k" }, "模型", -1), Z("span", bE, U(b.value.model || "-"), 1)]),
|
|
24928
|
+
Z("div", xE, [n[26] ||= Z("span", { class: "k" }, "工具数", -1), Z("span", SE, U(b.value.tools.length), 1)]),
|
|
24929
|
+
Z("div", CE, [n[27] ||= Z("span", { class: "k" }, "中间件", -1), Z("span", wE, U(b.value.middleware.length), 1)])
|
|
24837
24930
|
]),
|
|
24838
|
-
Z("div",
|
|
24931
|
+
Z("div", TE, [n[28] ||= Z("span", { class: "k" }, "中间件栈", -1), Z("span", EE, U(b.value.middleware.join(" → ") || "-"), 1)])
|
|
24839
24932
|
]),
|
|
24840
|
-
Z("div",
|
|
24933
|
+
Z("div", DE, [Z("div", OE, "🔧 工具 (" + U(b.value.tools.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.tools, (e) => (Y(), X("div", {
|
|
24841
24934
|
key: e.name,
|
|
24842
24935
|
class: "info-item"
|
|
24843
|
-
}, [Z("div",
|
|
24936
|
+
}, [Z("div", kE, [_s(U(e.name), 1), e.source ? (Y(), X("span", {
|
|
24844
24937
|
key: 0,
|
|
24845
24938
|
class: H(["src-tag", D(e.source)])
|
|
24846
|
-
}, U(e.source), 3)) : Q("", !0)]), Z("div",
|
|
24847
|
-
b.value.skills.length ? (Y(), X("div",
|
|
24939
|
+
}, U(e.source), 3)) : Q("", !0)]), Z("div", AE, U(e.description), 1)]))), 128))]),
|
|
24940
|
+
b.value.skills.length ? (Y(), X("div", jE, [Z("div", ME, [_s("📘 技能 (" + U(b.value.skills.length) + ")", 1), n[30] ||= Z("span", { class: "info-hint" }, "点击展开查看全文", -1)]), (Y(!0), X(J, null, sa(b.value.skills, (e) => (Y(), X("div", {
|
|
24848
24941
|
key: e.name,
|
|
24849
24942
|
class: "info-item"
|
|
24850
24943
|
}, [
|
|
24851
24944
|
Z("div", {
|
|
24852
24945
|
class: "info-name skill-toggle",
|
|
24853
24946
|
onClick: (t) => S(e.name)
|
|
24854
|
-
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), _s(" " + U(e.name), 1)], 8,
|
|
24855
|
-
Z("div",
|
|
24856
|
-
x.value[e.name] ? (Y(), X("div",
|
|
24947
|
+
}, [Z("span", { class: H(["skill-arrow", { open: !!x.value[e.name] }]) }, "▶", 2), _s(" " + U(e.name), 1)], 8, NE),
|
|
24948
|
+
Z("div", PE, U(e.description), 1),
|
|
24949
|
+
x.value[e.name] ? (Y(), X("div", FE, [x.value[e.name].loading ? (Y(), X("div", IE, "加载中…")) : x.value[e.name].error ? (Y(), X("div", LE, U(x.value[e.name].error), 1)) : x.value[e.name].content ? (Y(), X("pre", RE, U(x.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
24857
24950
|
]))), 128))])) : Q("", !0),
|
|
24858
|
-
b.value.data ? (Y(), X("div",
|
|
24859
|
-
Z("div",
|
|
24860
|
-
Z("div",
|
|
24861
|
-
Z("div",
|
|
24862
|
-
Z("div",
|
|
24863
|
-
Z("div",
|
|
24951
|
+
b.value.data ? (Y(), X("div", zE, [n[31] ||= Z("div", { class: "info-title" }, "📊 可操作数据", -1), Z("div", BE, [Z("div", VE, U(b.value.data.description || "主数据对象"), 1), Z("div", HE, "schema: " + U(b.value.data.schema ? "已声明" : "未声明"), 1)])])) : Q("", !0),
|
|
24952
|
+
Z("div", UE, [n[36] ||= Z("div", { class: "info-title" }, "🧬 子 Agent", -1), Z("div", WE, [
|
|
24953
|
+
Z("div", GE, [n[32] ||= Z("span", { class: "k" }, "启用", -1), Z("span", KE, U(b.value.subagent.enabled ? "是" : "否"), 1)]),
|
|
24954
|
+
Z("div", qE, [n[33] ||= Z("span", { class: "k" }, "最大递归", -1), Z("span", JE, U(b.value.subagent.maxDepth), 1)]),
|
|
24955
|
+
Z("div", YE, [n[34] ||= Z("span", { class: "k" }, "并行上限", -1), Z("span", XE, U(b.value.subagent.maxParallel), 1)]),
|
|
24956
|
+
Z("div", ZE, [n[35] ||= Z("span", { class: "k" }, "额外工具", -1), Z("span", QE, U(b.value.subagent.allowedTools.length ? b.value.subagent.allowedTools.join(", ") : "默认只读"), 1)])
|
|
24864
24957
|
])]),
|
|
24865
|
-
b.value.mcp?.servers?.length ? (Y(), X("div",
|
|
24958
|
+
b.value.mcp?.servers?.length ? (Y(), X("div", $E, [Z("div", eD, "🔌 MCP (" + U(b.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.mcp.servers, (e) => (Y(), X("div", {
|
|
24866
24959
|
key: e.name,
|
|
24867
24960
|
class: "info-item"
|
|
24868
|
-
}, [Z("div",
|
|
24869
|
-
b.value.verify ? (Y(), X("div",
|
|
24870
|
-
Z("div",
|
|
24871
|
-
Z("div",
|
|
24872
|
-
Z("div",
|
|
24873
|
-
b.value.verify.adversarial ? (Y(), X("div",
|
|
24961
|
+
}, [Z("div", tD, [_s(U(e.name) + " ", 1), Z("span", nD, U(e.toolCount) + " 工具", 1)]), Z("div", rD, U(e.url), 1)]))), 128))])) : Q("", !0),
|
|
24962
|
+
b.value.verify ? (Y(), X("div", iD, [n[41] ||= Z("div", { class: "info-title" }, "✅ Verify 自检", -1), Z("div", aD, [
|
|
24963
|
+
Z("div", oD, [n[37] ||= Z("span", { class: "k" }, "启用", -1), Z("span", sD, U(b.value.verify.enabled ? "是" : "否"), 1)]),
|
|
24964
|
+
Z("div", cD, [n[38] ||= Z("span", { class: "k" }, "自纠上限", -1), Z("span", lD, U(b.value.verify.maxAttempts), 1)]),
|
|
24965
|
+
Z("div", uD, [n[39] ||= Z("span", { class: "k" }, "对抗验证", -1), Z("span", dD, U(b.value.verify.adversarial ? "开启" : "关闭"), 1)]),
|
|
24966
|
+
b.value.verify.adversarial ? (Y(), X("div", fD, [n[40] ||= Z("span", { class: "k" }, "对抗模型", -1), Z("span", pD, U(b.value.model || "-") + "(同主)", 1)])) : Q("", !0)
|
|
24874
24967
|
])])) : Q("", !0),
|
|
24875
|
-
b.value.todos.length ? (Y(), X("div",
|
|
24968
|
+
b.value.todos.length ? (Y(), X("div", mD, [Z("div", hD, "📋 任务清单 (" + U(b.value.todos.length) + ")", 1), (Y(!0), X(J, null, sa(b.value.todos, (e, t) => (Y(), X("div", {
|
|
24876
24969
|
key: t,
|
|
24877
24970
|
class: "info-todo"
|
|
24878
24971
|
}, [Z("span", {
|
|
24879
24972
|
class: "todo-tag",
|
|
24880
24973
|
style: Oe({ background: T[e.status] && T[e.status].color || "#9ca3af" })
|
|
24881
24974
|
}, U(E(e.status)), 5), Z("span", null, U(e.content), 1)]))), 128))])) : Q("", !0),
|
|
24882
|
-
b.value.memory ? (Y(), X("div",
|
|
24883
|
-
b.value.lastCompression ? (Y(), X("div",
|
|
24884
|
-
Z("div",
|
|
24885
|
-
Z("div",
|
|
24886
|
-
Z("div",
|
|
24887
|
-
Z("div",
|
|
24888
|
-
Z("div",
|
|
24889
|
-
b.value.lastCompression.decision ? (Y(), X("div",
|
|
24975
|
+
b.value.memory ? (Y(), X("div", gD, [n[42] ||= Z("div", { class: "info-title" }, "📝 持久指令 (memory)", -1), Z("pre", _D, U(b.value.memory), 1)])) : Q("", !0),
|
|
24976
|
+
b.value.lastCompression ? (Y(), X("div", vD, [n[49] ||= Z("div", { class: "info-title" }, "🗜️ 上轮压缩", -1), Z("div", yD, [
|
|
24977
|
+
Z("div", bD, [n[43] ||= Z("span", { class: "k" }, "触发", -1), Z("span", xD, U(b.value.lastCompression.triggered ? "✓" : "✗(未达阈值)"), 1)]),
|
|
24978
|
+
Z("div", SD, [n[44] ||= Z("span", { class: "k" }, "摘要轮次", -1), Z("span", CD, U(b.value.lastCompression.roundsSummarized) + " / " + U(b.value.lastCompression.roundsTotal), 1)]),
|
|
24979
|
+
Z("div", wD, [n[45] ||= Z("span", { class: "k" }, "召回", -1), Z("span", TD, U(b.value.lastCompression.roundsRecalled) + " 条", 1)]),
|
|
24980
|
+
Z("div", ED, [n[46] ||= Z("span", { class: "k" }, "消息数", -1), Z("span", DD, U(b.value.lastCompression.originalMessages) + " → " + U(b.value.lastCompression.compressedMessages), 1)]),
|
|
24981
|
+
Z("div", OD, [n[47] ||= Z("span", { class: "k" }, "策略", -1), Z("span", kD, U(b.value.lastCompression.strategy), 1)]),
|
|
24982
|
+
b.value.lastCompression.decision ? (Y(), X("div", AD, [n[48] ||= Z("span", { class: "k" }, "压缩决策", -1), Z("span", jD, "🤖 " + U(R(b.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
24890
24983
|
])])) : Q("", !0)
|
|
24891
|
-
], 64)) : (Y(), X("div",
|
|
24984
|
+
], 64)) : (Y(), X("div", mE, "暂无信息"))]))
|
|
24892
24985
|
])
|
|
24893
24986
|
], 2), Z("div", {
|
|
24894
24987
|
class: "drawer-mask",
|
|
@@ -24897,16 +24990,16 @@ app.mount('#app');
|
|
|
24897
24990
|
_: 1
|
|
24898
24991
|
})]));
|
|
24899
24992
|
}
|
|
24900
|
-
}), [["__scopeId", "data-v-9c201fc3"]]),
|
|
24993
|
+
}), [["__scopeId", "data-v-9c201fc3"]]), ND = { class: "skill-panel" }, PD = { class: "skill-header" }, FD = { class: "skill-section" }, ID = { class: "section-title" }, LD = { class: "field" }, RD = ["disabled"], zD = { class: "field" }, BD = { class: "field field-textarea" }, VD = {
|
|
24901
24994
|
key: 0,
|
|
24902
24995
|
class: "skill-error"
|
|
24903
|
-
},
|
|
24996
|
+
}, HD = { class: "skill-section" }, UD = { class: "section-title" }, WD = {
|
|
24904
24997
|
key: 0,
|
|
24905
24998
|
class: "empty-hint"
|
|
24906
|
-
},
|
|
24999
|
+
}, GD = {
|
|
24907
25000
|
key: 1,
|
|
24908
25001
|
class: "skill-list"
|
|
24909
|
-
},
|
|
25002
|
+
}, KD = { class: "skill-actions" }, qD = ["onClick"], JD = ["onClick"], YD = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
24910
25003
|
__name: "SkillPanel",
|
|
24911
25004
|
props: {
|
|
24912
25005
|
visible: { type: Boolean },
|
|
@@ -24960,54 +25053,54 @@ app.mount('#app');
|
|
|
24960
25053
|
key: 0,
|
|
24961
25054
|
class: "skill-mask",
|
|
24962
25055
|
onClick: n[4] ||= yl((e) => r("close"), ["self"])
|
|
24963
|
-
}, [Z("div",
|
|
24964
|
-
Z("div",
|
|
25056
|
+
}, [Z("div", ND, [
|
|
25057
|
+
Z("div", PD, [n[5] ||= Z("span", { class: "skill-title" }, "🧩 Skill 管理", -1), Z("button", {
|
|
24965
25058
|
class: "skill-close",
|
|
24966
25059
|
title: "关闭",
|
|
24967
25060
|
onClick: n[0] ||= (e) => r("close")
|
|
24968
25061
|
}, "✕")]),
|
|
24969
|
-
Z("div",
|
|
24970
|
-
Z("div",
|
|
25062
|
+
Z("div", FD, [
|
|
25063
|
+
Z("div", ID, [_s(U(u.value ? `编辑 Skill: ${u.value}` : "创建新 Skill") + " ", 1), u.value ? (Y(), X("button", {
|
|
24971
25064
|
key: 0,
|
|
24972
25065
|
class: "btn btn-ghost btn-cancel",
|
|
24973
25066
|
title: "取消编辑,回到新建",
|
|
24974
25067
|
onClick: h
|
|
24975
25068
|
}, "取消编辑")) : Q("", !0)]),
|
|
24976
|
-
Z("label",
|
|
25069
|
+
Z("label", LD, [n[6] ||= Z("span", { class: "field-label" }, "名称", -1), Xr(Z("input", {
|
|
24977
25070
|
"onUpdate:modelValue": n[1] ||= (e) => i.value = e,
|
|
24978
25071
|
disabled: !!u.value,
|
|
24979
25072
|
placeholder: "如:my-writer",
|
|
24980
25073
|
class: "field-input"
|
|
24981
|
-
}, null, 8,
|
|
24982
|
-
Z("label",
|
|
25074
|
+
}, null, 8, RD), [[gl, i.value]])]),
|
|
25075
|
+
Z("label", zD, [n[7] ||= Z("span", { class: "field-label" }, "描述", -1), Xr(Z("input", {
|
|
24983
25076
|
"onUpdate:modelValue": n[2] ||= (e) => a.value = e,
|
|
24984
25077
|
placeholder: "一句话说明用途与触发时机",
|
|
24985
25078
|
class: "field-input"
|
|
24986
25079
|
}, null, 512), [[gl, a.value]])]),
|
|
24987
|
-
Z("label",
|
|
25080
|
+
Z("label", BD, [n[8] ||= Z("span", { class: "field-label" }, "内容", -1), Xr(Z("textarea", {
|
|
24988
25081
|
"onUpdate:modelValue": n[3] ||= (e) => o.value = e,
|
|
24989
25082
|
placeholder: "skill 全文指令(支持 Markdown)",
|
|
24990
25083
|
rows: "6",
|
|
24991
25084
|
class: "field-input"
|
|
24992
25085
|
}, null, 512), [[gl, o.value]])]),
|
|
24993
|
-
s.value ? (Y(), X("div",
|
|
25086
|
+
s.value ? (Y(), X("div", VD, U(s.value), 1)) : Q("", !0),
|
|
24994
25087
|
Z("button", {
|
|
24995
25088
|
class: "btn btn-primary",
|
|
24996
25089
|
onClick: f
|
|
24997
25090
|
}, U(u.value ? "保存修改" : "添加 Skill"), 1)
|
|
24998
25091
|
]),
|
|
24999
|
-
Z("div",
|
|
25092
|
+
Z("div", HD, [Z("div", UD, "已创建 Skill(" + U(c.value.length) + ")", 1), c.value.length ? (Y(), X("ul", GD, [(Y(!0), X(J, null, sa(c.value, (e) => (Y(), X("li", {
|
|
25000
25093
|
key: e,
|
|
25001
25094
|
class: "skill-item"
|
|
25002
|
-
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span",
|
|
25095
|
+
}, [Z("span", { class: H(["skill-name", { active: u.value === e }]) }, U(e), 3), Z("span", KD, [Z("button", {
|
|
25003
25096
|
class: "btn btn-ghost btn-edit",
|
|
25004
25097
|
title: "加载到表单编辑",
|
|
25005
25098
|
onClick: (t) => m(e)
|
|
25006
|
-
}, "编辑", 8,
|
|
25099
|
+
}, "编辑", 8, qD), Z("button", {
|
|
25007
25100
|
class: "btn btn-ghost btn-del",
|
|
25008
25101
|
title: "删除该用户 skill",
|
|
25009
25102
|
onClick: (t) => p(e)
|
|
25010
|
-
}, "删除", 8,
|
|
25103
|
+
}, "删除", 8, JD)])]))), 128))])) : (Y(), X("div", WD, "暂无用户创建的 skill"))]),
|
|
25011
25104
|
n[9] ||= Z("div", { class: "skill-hint" }, [
|
|
25012
25105
|
_s(" 💡 创建/编辑的 skill 会自动加入 agent(下轮 system prompt 索引可见),agent 经 "),
|
|
25013
25106
|
Z("code", null, "load_skill(name)"),
|
|
@@ -25019,7 +25112,7 @@ app.mount('#app');
|
|
|
25019
25112
|
_: 1
|
|
25020
25113
|
})]));
|
|
25021
25114
|
}
|
|
25022
|
-
}), [["__scopeId", "data-v-c6a22ea5"]]),
|
|
25115
|
+
}), [["__scopeId", "data-v-c6a22ea5"]]), XD = /*#__PURE__*/ M_(/* @__PURE__ */ Fi({
|
|
25023
25116
|
__name: "ChatDialog",
|
|
25024
25117
|
props: {
|
|
25025
25118
|
fetchResponse: {},
|
|
@@ -25163,7 +25256,7 @@ app.mount('#app');
|
|
|
25163
25256
|
key: 0,
|
|
25164
25257
|
name: "cs-slide"
|
|
25165
25258
|
}, {
|
|
25166
|
-
default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(
|
|
25259
|
+
default: Jr(() => [ca(t.$slots, "body", { chat: K(i) }, () => [Xr(fs(nC, {
|
|
25167
25260
|
"show-avatar": e.showAvatar,
|
|
25168
25261
|
"show-typing": e.showTyping
|
|
25169
25262
|
}, null, 8, ["show-avatar", "show-typing"]), [[Pc, K(a)]])], !0)]),
|
|
@@ -25172,15 +25265,15 @@ app.mount('#app');
|
|
|
25172
25265
|
f("queued") ? ca(t.$slots, "queued", {
|
|
25173
25266
|
key: 1,
|
|
25174
25267
|
chat: K(i)
|
|
25175
|
-
}, () => [fs(
|
|
25268
|
+
}, () => [fs(uC)], !0) : Q("", !0),
|
|
25176
25269
|
f("approval") ? ca(t.$slots, "approval", {
|
|
25177
25270
|
key: 2,
|
|
25178
25271
|
chat: K(i)
|
|
25179
|
-
}, () => [fs(
|
|
25272
|
+
}, () => [fs(SC)], !0) : Q("", !0),
|
|
25180
25273
|
f("conflict") ? ca(t.$slots, "conflict", {
|
|
25181
25274
|
key: 3,
|
|
25182
25275
|
chat: K(i)
|
|
25183
|
-
}, () => [fs(
|
|
25276
|
+
}, () => [fs(NC, {
|
|
25184
25277
|
"pending-conflict": e.pendingConflict,
|
|
25185
25278
|
"on-resolve": e.onResolveConflict
|
|
25186
25279
|
}, null, 8, ["pending-conflict", "on-resolve"])], !0) : Q("", !0)
|
|
@@ -25189,7 +25282,7 @@ app.mount('#app');
|
|
|
25189
25282
|
key: 2,
|
|
25190
25283
|
name: "cs-slide"
|
|
25191
25284
|
}, {
|
|
25192
|
-
default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(
|
|
25285
|
+
default: Jr(() => [ca(t.$slots, "footer", { chat: K(i) }, () => [fs(GC, {
|
|
25193
25286
|
placeholder: e.placeholder,
|
|
25194
25287
|
"input-rows": e.inputRows
|
|
25195
25288
|
}, null, 8, ["placeholder", "input-rows"])], !0)]),
|
|
@@ -25198,7 +25291,7 @@ app.mount('#app');
|
|
|
25198
25291
|
f("debug") ? ca(t.$slots, "debug", {
|
|
25199
25292
|
key: 3,
|
|
25200
25293
|
chat: K(i)
|
|
25201
|
-
}, () => [fs(
|
|
25294
|
+
}, () => [fs(MD, {
|
|
25202
25295
|
visible: K(o),
|
|
25203
25296
|
"onUpdate:visible": n[4] ||= (e) => /* @__PURE__ */ Sn(o) ? o.value = e : null,
|
|
25204
25297
|
logs: e.debugLogs,
|
|
@@ -25217,7 +25310,7 @@ app.mount('#app');
|
|
|
25217
25310
|
f("skill") ? ca(t.$slots, "skill", {
|
|
25218
25311
|
key: 4,
|
|
25219
25312
|
chat: K(i)
|
|
25220
|
-
}, () => [fs(
|
|
25313
|
+
}, () => [fs(YD, {
|
|
25221
25314
|
visible: K(s),
|
|
25222
25315
|
"on-add-skill": e.onAddSkill,
|
|
25223
25316
|
"on-remove-skill": e.onRemoveSkill,
|
|
@@ -25237,10 +25330,10 @@ app.mount('#app');
|
|
|
25237
25330
|
}), [["__scopeId", "data-v-69c13a8d"]]);
|
|
25238
25331
|
//#endregion
|
|
25239
25332
|
//#region src/core/sdk/mountChatDialog.ts
|
|
25240
|
-
function
|
|
25333
|
+
function ZD(e) {
|
|
25241
25334
|
let { core: t, dialogCfg: n } = e, r = null, i = e.el, a = t.agent.debugLogs;
|
|
25242
25335
|
return r = Tl(/* @__PURE__ */ Fi({ setup() {
|
|
25243
|
-
return () => $s(
|
|
25336
|
+
return () => $s(XD, {
|
|
25244
25337
|
fetchStream: e.streaming ? t.stream : void 0,
|
|
25245
25338
|
fetchResponse: e.streaming ? void 0 : (e, n) => {
|
|
25246
25339
|
if (n) {
|
|
@@ -25339,7 +25432,7 @@ function zD(e) {
|
|
|
25339
25432
|
}
|
|
25340
25433
|
//#endregion
|
|
25341
25434
|
//#region src/core/sdk/ragSubagent.ts
|
|
25342
|
-
function
|
|
25435
|
+
function QD(e, t, n, r, i) {
|
|
25343
25436
|
let a = [];
|
|
25344
25437
|
e && a.push("vfs_grep + vfs_read(搜预注入文档)"), t && a.push(`${r}(语义检索)`), n && a.push(`${i}(按 source 加载)`), a.push("fetch_document(公网 URL)");
|
|
25345
25438
|
let o = [];
|
|
@@ -25354,7 +25447,7 @@ function BD(e, t, n, r, i) {
|
|
|
25354
25447
|
|
|
25355
25448
|
你是只读检索角色,不要尝试修改任何数据。不要尝试上面未列出的工具。`;
|
|
25356
25449
|
}
|
|
25357
|
-
function
|
|
25450
|
+
function $D(e, t, n, r, i) {
|
|
25358
25451
|
let a = [], o = [];
|
|
25359
25452
|
return e && (a.push("- vfs_grep / vfs_read:搜集成方预注入 vfs 的文档(组件文档 / UI 规范)—— 快、静态,先查"), o.push("- 静态文档(组件库文档 / UI 规范):vfs_grep")), t && (a.push(`- ${r}:语义检索(retriever 向量库)—— 模糊匹配,关键词不确定 / 语义相似时用`), o.push(`- 语义相似(「瀑布流组件」「倒计时」「拼团」):${r}`)), n && (a.push(`- ${i}:按 source 精确加载(已知文档 id / URL / key)—— 精确取特定文档`), o.push(`- 已知文档 id / URL:${i}`)), a.push("- fetch_document:公网 URL —— 查公开资料"), o.push("- 公开 URL(设计规范网站 / 第三方文档):fetch_document"), `# 知识检索策略(RAG)
|
|
25360
25453
|
|
|
@@ -25371,12 +25464,12 @@ ${a.join("\n")}
|
|
|
25371
25464
|
## 何时用何源
|
|
25372
25465
|
${o.join("\n")}`;
|
|
25373
25466
|
}
|
|
25374
|
-
var
|
|
25467
|
+
var eO = {
|
|
25375
25468
|
name: "rag-search",
|
|
25376
25469
|
description: "多源知识检索策略:vfs 预注入文档 → 语义检索 → 指定文档加载 → 公网;综合结构化结论 + 溯源",
|
|
25377
|
-
getContent: () =>
|
|
25470
|
+
getContent: () => $D(!0, !0, !0, "search_docs", "load_doc")
|
|
25378
25471
|
};
|
|
25379
|
-
function
|
|
25472
|
+
function tO(e, n, i) {
|
|
25380
25473
|
return r(async ({ query: e, topK: t }) => {
|
|
25381
25474
|
try {
|
|
25382
25475
|
let r = await n(e, { topK: t ?? i });
|
|
@@ -25393,7 +25486,7 @@ function UD(e, n, i) {
|
|
|
25393
25486
|
})
|
|
25394
25487
|
});
|
|
25395
25488
|
}
|
|
25396
|
-
function
|
|
25489
|
+
function nO(e, n) {
|
|
25397
25490
|
return r(async ({ source: e }) => {
|
|
25398
25491
|
try {
|
|
25399
25492
|
let t = await n(e), r = Array.isArray(t) ? t : [t];
|
|
@@ -25407,19 +25500,19 @@ function WD(e, n) {
|
|
|
25407
25500
|
schema: t.object({ source: t.string().describe("文档标识(id/URL/key)") })
|
|
25408
25501
|
});
|
|
25409
25502
|
}
|
|
25410
|
-
function
|
|
25503
|
+
function rO(e) {
|
|
25411
25504
|
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;
|
|
25412
25505
|
if (!t && !n && r === !1) throw Error("[page-agent-sdk][createRagSubagent] 至少配一种知识源:retriever / loader / useVfs(true)");
|
|
25413
25506
|
let p = [];
|
|
25414
|
-
t && p.push(
|
|
25507
|
+
t && p.push(tO(s, t, o)), n && p.push(nO(c, n)), f && p.push(...f);
|
|
25415
25508
|
let m = r ? [
|
|
25416
25509
|
"vfs_grep",
|
|
25417
25510
|
"vfs_read",
|
|
25418
25511
|
"vfs_json_read"
|
|
25419
|
-
] : void 0, h =
|
|
25512
|
+
] : void 0, h = QD(r, !!t, !!n, s, c), g = {
|
|
25420
25513
|
name: "rag-search",
|
|
25421
|
-
description:
|
|
25422
|
-
getContent: () =>
|
|
25514
|
+
description: eO.description,
|
|
25515
|
+
getContent: () => $D(r, !!t, !!n, s, c)
|
|
25423
25516
|
};
|
|
25424
25517
|
return {
|
|
25425
25518
|
id: i,
|
|
@@ -25434,8 +25527,8 @@ function GD(e) {
|
|
|
25434
25527
|
}
|
|
25435
25528
|
//#endregion
|
|
25436
25529
|
//#region src/core/index.ts
|
|
25437
|
-
function
|
|
25438
|
-
return p_(e,
|
|
25530
|
+
function iO(e) {
|
|
25531
|
+
return p_(e, ZD);
|
|
25439
25532
|
}
|
|
25440
25533
|
//#endregion
|
|
25441
|
-
export {
|
|
25534
|
+
export { SC as ApprovalBar, Eh as CAPABILITIES, kh as CONTEXT_PRESETS, XD as ChatDialog, N_ as ChatHeader, GC as ChatInput, OS as CodePreview, Bm as CompressDecisionSchema, NC as ConflictBar, Kf as DEFAULT_PROMPT_SOFT_CAP, Wp as DEFAULT_SYSTEM_PROMPT, MD as DebugDrawer, z_ as FocusBar, aS as HLJS_BLOCK_MAX_CHARS, om as HTML_VOID_TAGS, vf as HUMAN_CONFIRM_TOOL_NAME, Ul as MIN_CONTEXT_WINDOW, AS as MessageContent, nC as MessageList, JS as MessageRow, uC as QueuedBar, Gf as SOFT_CAP_MIN_WINDOW, zf as STOP_WORDS, YD as SkillPanel, hd as UNSAFE_KEYS, Hg as actionsToInspectInfo, Vg as actionsToTools, Il as agentError, Lp as analyzeContext, Od as applyPatchToClone, jd as applyPatchToLive, Fl as asAgentError, Gp as buildDataPrompt, jm as buildHtmlFragmentSkill, Kp as buildSystemPrompt, __ as chatContextKey, hg as commitSetToBind, Up as connectMcp, C as constructLlmFromConfig, S as constructOpenLlmSync, g_ as copyText, ku as createAgent, _f as createApprovalMiddleware, v_ as createChatContext, iO as createChatSdk, Of as createCheckpointManager, kf as createCheckpointMiddleware, Qm as createConflictManager, Rp as createContextInspectorMiddleware, Cg as createDataOps, Nm as createHtmlFormatCheck, Im as createHtmlSubagent, xf as createHumanConfirmMiddleware, bf as createHumanConfirmTool, yh as createMemoryBackend, uf as createMemoryMiddleware, y as createProxyLlm, rO as createRagSubagent, qd as createSandboxRunner, Oh as createSdkEvents, a_ as createSerialRunner, Ch as createSessionStore, t_ as createSkillStore, mp as createSubagentMiddleware, Qf as createSubagentTracker, _p as createSubagentsMiddleware, Yg as createUsageHintsMiddleware, vp as createVerifyMiddleware, Xp as createVfs, xh as createWebStorageBackend, wp as createWriteBackCheck, xd as deepClone, Gg as defineDataToolset, Yd as defineSkill, Lm as defineTool, bd as deleteByPath, Vm as deriveTitle, Ku as describeSchemaNode, pu as detectGarbledToolCall, _u as detectTransitionalReply, Fd as diffObjects, kg as domToStructure, jg as domTools, Wg as domToolsStatic, Vf as estimateMessageTokens, Hf as estimateRoundTokens, Gl as estimateTokens, T as extractReasoningDelta, ad as extractSchemaHint, zp as extractText, w as extractTextDelta, E as extractUsage, Tg as fetchDocTools, Ug as fetchTools, mg as filterByToolMode, Pd as findStrippedKeys, qu as formatConstraints, jl as formatZodIssues, vd as getByPath, Ag as getDomTool, Pg as getEnvSummary, Nu as getSchemaAtPath, Au as getSchemaTopKeys, Jl as getTraceMetrics, Dd as hashValue, Mm as htmlFragmentSkill, ed as htmlOrchestratorPrompt, Uf as indexSummarize, Lg as inspectEnvTool, Rg as inspectTools, Hm as isChatModel, iu as isContextLengthError, ju as isPathAllowed, dh as isQuotaError, gd as isUnsafePath, Uh as jpEval, Nl as jsonParseError, wd as limitDepth, dS as markedToHtml, Sd as maybeParseValue, Ad as moveByPath, x as normalizeBaseUrl, O as normalizeUsage, ql as offloadPassThroughChars, Kl as offloadThresholdChars, $u as presets, Bu as projectBySchema, zu as projectBySchemaDeep, Cd as projectFields, Wf as recallRounds, fS as renderMarkdownHtml, Ju as renderSchemaHint, Yu as renderSchemaOverview, Qu as renderSchemaShallow, Dh as resolveCapabilities, jh as resolveContextOptions, Th as resolveDialogConfig, Zm as resolveLlm, Wl as resolveModelCaps, qf as resolvePromptSoftCap, wh as resolveStorage, Nd as restoreInPlace, Md as restoreLive, Pl as routeError, Jd as runHostScript, qh as runSandboxedScript, _d as safeMerge, Ng as safeSerialize, Td as safeStringify, mu as sanitizeGarbledContent, Gh as searchJson, Kg as selectBuiltinTools, yd as setByPath, Jf as shouldTriggerCompression, b as stripStainlessFetch, td as systemPromptHelpers, Bf as tokenize, $ as toolError, Mu as unwrapSchema, h_ as useChat, y_ as useChatContext, cm as validateHtmlFormat, e as z, Ml as zodError };
|