page-agent-sdk 4.24.0 → 4.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/page-agent-sdk.headless.js +1138 -1138
- package/dist/page-agent-sdk.iife.js +8 -8
- package/dist/page-agent-sdk.js +878 -878
- package/dist/page-agent-sdk.legacy.js +579 -576
- package/dist/page-agent-sdk.umd.cjs +6 -6
- package/package.json +1 -1
- package/types/headless.d.ts +2 -2
- package/types/index.d.ts +5 -2
package/dist/page-agent-sdk.js
CHANGED
|
@@ -431,17 +431,17 @@ function te(e, t = {}) {
|
|
|
431
431
|
...e.extraBody ? { modelKwargs: e.extraBody } : {}
|
|
432
432
|
});
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function ne(e) {
|
|
435
435
|
return e.some((e, t) => t > 0 && e.getType() === "system") ? e.map((e, t) => t === 0 || e.getType() !== "system" ? e : new i({ content: typeof e.content == "string" ? `〔系统注记〕\n${e.content}` : e.content })) : e;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
let t = e, n = (e) => Array.isArray(e) ?
|
|
437
|
+
function P(e) {
|
|
438
|
+
let t = e, n = (e) => Array.isArray(e) ? ne(e) : e, r = t.invoke.bind(e), i = t.stream.bind(e);
|
|
439
439
|
return t.invoke = async (e, t) => r(n(e), t), t.stream = async (e, t) => i(n(e), t), e;
|
|
440
440
|
}
|
|
441
|
-
async function
|
|
441
|
+
async function F(e, t = {}) {
|
|
442
442
|
if (e = j(e, M(e, t.thinkingMode, t.thinkingFallback)), (e.provider ?? "openai") === "openai") return te(e, t);
|
|
443
443
|
let { ChatAnthropic: n } = await import("@langchain/anthropic");
|
|
444
|
-
return
|
|
444
|
+
return P(new n({
|
|
445
445
|
apiKey: e.apiKey,
|
|
446
446
|
model: e.model,
|
|
447
447
|
temperature: e.thinking ? 1 : t.temperature ?? e.temperature,
|
|
@@ -458,15 +458,15 @@ async function I(e, t = {}) {
|
|
|
458
458
|
}
|
|
459
459
|
//#endregion
|
|
460
460
|
//#region src/core/utils/contentParts.ts
|
|
461
|
-
function
|
|
461
|
+
function re(e) {
|
|
462
462
|
let t = e.content;
|
|
463
463
|
return typeof t == "string" ? t : Array.isArray(t) ? t.map((e) => typeof e == "string" ? e : e?.type === "text" && typeof e.text == "string" ? e.text : "").join("") : "";
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function ie(e) {
|
|
466
466
|
let t = e.additional_kwargs || {}, n = t.reasoning_content || t.reasoning || "";
|
|
467
467
|
return !n && Array.isArray(e.content) && (n = e.content.map((e) => e?.type === "thinking" ? e.thinking ?? "" : e?.type === "thinking_delta" ? e.delta ?? e.thinking ?? "" : "").join("")), n;
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function ae(e) {
|
|
470
470
|
let t = e, n = [
|
|
471
471
|
t?.additional_kwargs?.usage,
|
|
472
472
|
t?.usage_metadata,
|
|
@@ -474,9 +474,9 @@ function ie(e) {
|
|
|
474
474
|
t?.response_metadata?.token_usage,
|
|
475
475
|
t?.response_metadata?.tokenUsage
|
|
476
476
|
];
|
|
477
|
-
for (let e of n) if (e && typeof e == "object" &&
|
|
477
|
+
for (let e of n) if (e && typeof e == "object" && oe(e)) return e;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function oe(e) {
|
|
480
480
|
return [
|
|
481
481
|
"prompt_tokens",
|
|
482
482
|
"completion_tokens",
|
|
@@ -490,8 +490,8 @@ function ae(e) {
|
|
|
490
490
|
"outputTokens"
|
|
491
491
|
].some((t) => typeof e[t] == "number" && e[t] > 0);
|
|
492
492
|
}
|
|
493
|
-
function
|
|
494
|
-
let t =
|
|
493
|
+
function se(e) {
|
|
494
|
+
let t = ae(e);
|
|
495
495
|
if (!t || typeof t != "object") return null;
|
|
496
496
|
let n = t, r = Number(n.prompt_tokens ?? n.promptTokens ?? n.input_tokens ?? n.inputTokens ?? 0) || 0, i = Number(n.completion_tokens ?? n.completionTokens ?? n.output_tokens ?? n.outputTokens ?? 0) || 0, a = Number(n.total_tokens ?? n.totalTokens ?? r + i) || 0;
|
|
497
497
|
if (!r && !i && !a) return null;
|
|
@@ -508,15 +508,15 @@ function oe(e) {
|
|
|
508
508
|
//#endregion
|
|
509
509
|
//#region node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
510
510
|
// @__NO_SIDE_EFFECTS__
|
|
511
|
-
function
|
|
511
|
+
function ce(e) {
|
|
512
512
|
let t = /* @__PURE__ */ Object.create(null);
|
|
513
513
|
for (let n of e.split(",")) t[n] = 1;
|
|
514
514
|
return (e) => e in t;
|
|
515
515
|
}
|
|
516
|
-
var
|
|
516
|
+
var le = process.env.NODE_ENV === "production" ? {} : Object.freeze({}), I = process.env.NODE_ENV === "production" ? [] : Object.freeze([]), L = () => {}, ue = () => !1, de = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), fe = (e) => e.startsWith("onUpdate:"), R = Object.assign, pe = (e, t) => {
|
|
517
517
|
let n = e.indexOf(t);
|
|
518
518
|
n > -1 && e.splice(n, 1);
|
|
519
|
-
}, me = Object.prototype.hasOwnProperty, z = (e, t) => me.call(e, t), B = Array.isArray, V = (e) => xe(e) === "[object Map]", he = (e) => xe(e) === "[object Set]", ge = (e) => xe(e) === "[object Date]", H = (e) => typeof e == "function", _e = (e) => typeof e == "string", ve = (e) => typeof e == "symbol", U = (e) => typeof e == "object" && !!e, ye = (e) => (U(e) || H(e)) && H(e.then) && H(e.catch), be = Object.prototype.toString, xe = (e) => be.call(e), Se = (e) => xe(e).slice(8, -1), Ce = (e) => xe(e) === "[object Object]", we = (e) => _e(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Te = /* @__PURE__ */
|
|
519
|
+
}, me = Object.prototype.hasOwnProperty, z = (e, t) => me.call(e, t), B = Array.isArray, V = (e) => xe(e) === "[object Map]", he = (e) => xe(e) === "[object Set]", ge = (e) => xe(e) === "[object Date]", H = (e) => typeof e == "function", _e = (e) => typeof e == "string", ve = (e) => typeof e == "symbol", U = (e) => typeof e == "object" && !!e, ye = (e) => (U(e) || H(e)) && H(e.then) && H(e.catch), be = Object.prototype.toString, xe = (e) => be.call(e), Se = (e) => xe(e).slice(8, -1), Ce = (e) => xe(e) === "[object Object]", we = (e) => _e(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Te = /* @__PURE__ */ ce(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"), Ee = /* @__PURE__ */ ce("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"), De = (e) => {
|
|
520
520
|
let t = /* @__PURE__ */ Object.create(null);
|
|
521
521
|
return ((n) => t[n] || (t[n] = e(n)));
|
|
522
522
|
}, Oe = /-\w/g, ke = De((e) => e.replace(Oe, (e) => e.slice(1).toUpperCase())), Ae = /\B([A-Z])/g, je = De((e) => e.replace(Ae, "-$1").toLowerCase()), Me = De((e) => e.charAt(0).toUpperCase() + e.slice(1)), Ne = De((e) => e ? `on${Me(e)}` : ""), Pe = (e, t) => !Object.is(e, t), Fe = (e, ...t) => {
|
|
@@ -565,7 +565,7 @@ function Ke(e) {
|
|
|
565
565
|
else if (U(e)) for (let n in e) e[n] && (t += n + " ");
|
|
566
566
|
return t.trim();
|
|
567
567
|
}
|
|
568
|
-
var qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Je = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", Ye = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", Xe = /* @__PURE__ */
|
|
568
|
+
var qe = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Je = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", Ye = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", Xe = /* @__PURE__ */ ce(qe), Ze = /* @__PURE__ */ ce(Je), Qe = /* @__PURE__ */ ce(Ye), $e = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", et = /* @__PURE__ */ ce($e);
|
|
569
569
|
$e + "";
|
|
570
570
|
function tt(e) {
|
|
571
571
|
return !!e || e === "";
|
|
@@ -825,7 +825,7 @@ var Mt = 0, Nt = class {
|
|
|
825
825
|
let e = t.nextDep;
|
|
826
826
|
e.prevDep = t.prevDep, t.prevDep && (t.prevDep.nextDep = e), t.prevDep = ft.depsTail, t.nextDep = void 0, ft.depsTail.nextDep = t, ft.depsTail = t, ft.deps === t && (ft.deps = e);
|
|
827
827
|
}
|
|
828
|
-
return process.env.NODE_ENV !== "production" && ft.onTrack && ft.onTrack(
|
|
828
|
+
return process.env.NODE_ENV !== "production" && ft.onTrack && ft.onTrack(R({ effect: ft }, e)), t;
|
|
829
829
|
}
|
|
830
830
|
trigger(e) {
|
|
831
831
|
this.version++, Mt++, this.notify(e);
|
|
@@ -833,7 +833,7 @@ var Mt = 0, Nt = class {
|
|
|
833
833
|
notify(e) {
|
|
834
834
|
yt();
|
|
835
835
|
try {
|
|
836
|
-
if (process.env.NODE_ENV !== "production") for (let t = this.subsHead; t; t = t.nextSub) t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(
|
|
836
|
+
if (process.env.NODE_ENV !== "production") for (let t = this.subsHead; t; t = t.nextSub) t.sub.onTrigger && !(t.sub.flags & 8) && t.sub.onTrigger(R({ effect: t.sub }, e));
|
|
837
837
|
for (let e = this.subs; e; e = e.prevSub) e.sub.notify() && e.sub.dep.notify();
|
|
838
838
|
} finally {
|
|
839
839
|
bt();
|
|
@@ -1040,7 +1040,7 @@ function Zt(e, t, n = []) {
|
|
|
1040
1040
|
let r = (/* @__PURE__ */ Nn(e))[t].apply(e, n);
|
|
1041
1041
|
return bt(), At(), r;
|
|
1042
1042
|
}
|
|
1043
|
-
var Qt = /* @__PURE__ */
|
|
1043
|
+
var Qt = /* @__PURE__ */ ce("__proto__,__v_isRef,__isVue"), $t = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(ve));
|
|
1044
1044
|
function en(e) {
|
|
1045
1045
|
ve(e) || (e = String(e));
|
|
1046
1046
|
let t = /* @__PURE__ */ Nn(this);
|
|
@@ -1109,7 +1109,7 @@ var tn = class {
|
|
|
1109
1109
|
function dn(e, t, n) {
|
|
1110
1110
|
return function(...r) {
|
|
1111
1111
|
let i = this.__v_raw, a = /* @__PURE__ */ Nn(i), o = V(a), s = e === "entries" || e === Symbol.iterator && o, c = e === "keys" && o, l = i[e](...r), u = n ? ln : t ? In : Fn;
|
|
1112
|
-
return !t && Bt(a, "iterate", c ? Rt : Lt),
|
|
1112
|
+
return !t && Bt(a, "iterate", c ? Rt : Lt), R(Object.create(l), { next() {
|
|
1113
1113
|
let { value: e, done: t } = l.next();
|
|
1114
1114
|
return t ? {
|
|
1115
1115
|
value: e,
|
|
@@ -1121,7 +1121,7 @@ function dn(e, t, n) {
|
|
|
1121
1121
|
} });
|
|
1122
1122
|
};
|
|
1123
1123
|
}
|
|
1124
|
-
function
|
|
1124
|
+
function fn(e) {
|
|
1125
1125
|
return function(...t) {
|
|
1126
1126
|
if (process.env.NODE_ENV !== "production") {
|
|
1127
1127
|
let n = t[0] ? `on key "${t[0]}" ` : "";
|
|
@@ -1130,7 +1130,7 @@ function G(e) {
|
|
|
1130
1130
|
return e === "delete" ? !1 : e === "clear" ? void 0 : this;
|
|
1131
1131
|
};
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function pn(e, t) {
|
|
1134
1134
|
let n = {
|
|
1135
1135
|
get(n) {
|
|
1136
1136
|
let r = this.__v_raw, i = /* @__PURE__ */ Nn(r), a = /* @__PURE__ */ Nn(n);
|
|
@@ -1153,11 +1153,11 @@ function fn(e, t) {
|
|
|
1153
1153
|
return !e && Bt(o, "iterate", Lt), a.forEach((e, t) => n.call(r, s(e), s(t), i));
|
|
1154
1154
|
}
|
|
1155
1155
|
};
|
|
1156
|
-
return
|
|
1157
|
-
add:
|
|
1158
|
-
set:
|
|
1159
|
-
delete:
|
|
1160
|
-
clear:
|
|
1156
|
+
return R(n, e ? {
|
|
1157
|
+
add: fn("add"),
|
|
1158
|
+
set: fn("set"),
|
|
1159
|
+
delete: fn("delete"),
|
|
1160
|
+
clear: fn("clear")
|
|
1161
1161
|
} : {
|
|
1162
1162
|
add(e) {
|
|
1163
1163
|
let n = /* @__PURE__ */ Nn(this), r = un(n), i = /* @__PURE__ */ Nn(e), a = !t && !/* @__PURE__ */ jn(e) && !/* @__PURE__ */ An(e) ? i : e;
|
|
@@ -1189,11 +1189,11 @@ function fn(e, t) {
|
|
|
1189
1189
|
n[r] = dn(r, e, t);
|
|
1190
1190
|
}), n;
|
|
1191
1191
|
}
|
|
1192
|
-
function
|
|
1193
|
-
let n =
|
|
1192
|
+
function G(e, t) {
|
|
1193
|
+
let n = pn(e, t);
|
|
1194
1194
|
return (t, r, i) => r === "__v_isReactive" ? !e : r === "__v_isReadonly" ? e : r === "__v_raw" ? t : Reflect.get(z(n, r) && r in t ? n : t, r, i);
|
|
1195
1195
|
}
|
|
1196
|
-
var mn = { get: /* @__PURE__ */
|
|
1196
|
+
var mn = { get: /* @__PURE__ */ G(!1, !1) }, hn = { get: /* @__PURE__ */ G(!1, !0) }, gn = { get: /* @__PURE__ */ G(!0, !1) }, _n = { get: /* @__PURE__ */ G(!0, !0) };
|
|
1197
1197
|
function vn(e, t, n) {
|
|
1198
1198
|
let r = /* @__PURE__ */ Nn(n);
|
|
1199
1199
|
if (r !== n && t.call(e, r)) {
|
|
@@ -1356,7 +1356,7 @@ function Xn(e, t = !1, n = Yn) {
|
|
|
1356
1356
|
t || Jn.set(n, t = []), t.push(e);
|
|
1357
1357
|
} else process.env.NODE_ENV !== "production" && !t && st("onWatcherCleanup() was called when there was no active watcher to associate with.");
|
|
1358
1358
|
}
|
|
1359
|
-
function Zn(e, t, n =
|
|
1359
|
+
function Zn(e, t, n = le) {
|
|
1360
1360
|
let { immediate: r, deep: i, once: a, scheduler: o, augmentJob: s, call: c } = n, l = (e) => {
|
|
1361
1361
|
(n.onWarn || st)("Invalid watch source: ", e, "A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.");
|
|
1362
1362
|
}, u = (e) => i ? e : /* @__PURE__ */ jn(e) || i === !1 || i === 0 ? Qn(e, 1) : Qn(e), d, f, p, m, h = !1, g = !1;
|
|
@@ -1381,7 +1381,7 @@ function Zn(e, t, n = ce) {
|
|
|
1381
1381
|
} finally {
|
|
1382
1382
|
Yn = t;
|
|
1383
1383
|
}
|
|
1384
|
-
} : (f =
|
|
1384
|
+
} : (f = L, process.env.NODE_ENV !== "production" && l(e)), t && i) {
|
|
1385
1385
|
let e = f, t = i === !0 ? Infinity : i;
|
|
1386
1386
|
f = () => Qn(e(), t);
|
|
1387
1387
|
}
|
|
@@ -1562,7 +1562,7 @@ function dr(e, t, n, r) {
|
|
|
1562
1562
|
} else process.env.NODE_ENV !== "production" && q(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof e}`);
|
|
1563
1563
|
}
|
|
1564
1564
|
function fr(e, t, n, r = !0) {
|
|
1565
|
-
let i = t ? t.vnode : null, { errorHandler: a, throwUnhandledErrorInProduction: o } = t && t.appContext.config ||
|
|
1565
|
+
let i = t ? t.vnode : null, { errorHandler: a, throwUnhandledErrorInProduction: o } = t && t.appContext.config || le;
|
|
1566
1566
|
if (t) {
|
|
1567
1567
|
let r = t.parent, i = t.proxy, o = process.env.NODE_ENV === "production" ? `https://vuejs.org/error-reference/#runtime-${n}` : lr[n];
|
|
1568
1568
|
for (; r;) {
|
|
@@ -1642,7 +1642,7 @@ function Or(e) {
|
|
|
1642
1642
|
var kr = (e) => e.id == null ? e.flags & 2 ? -1 : Infinity : e.id;
|
|
1643
1643
|
function Ar(e) {
|
|
1644
1644
|
process.env.NODE_ENV !== "production" && (e ||= /* @__PURE__ */ new Map());
|
|
1645
|
-
let t = process.env.NODE_ENV === "production" ?
|
|
1645
|
+
let t = process.env.NODE_ENV === "production" ? L : (t) => jr(e, t);
|
|
1646
1646
|
try {
|
|
1647
1647
|
for (hr = 0; hr < mr.length; hr++) {
|
|
1648
1648
|
let e = mr[hr];
|
|
@@ -1718,7 +1718,7 @@ function Vr(e, t) {
|
|
|
1718
1718
|
});
|
|
1719
1719
|
}
|
|
1720
1720
|
function Hr(e, t) {
|
|
1721
|
-
|
|
1721
|
+
R(e, t);
|
|
1722
1722
|
for (let n in e) n !== "__file" && !(n in t) && delete e[n];
|
|
1723
1723
|
}
|
|
1724
1724
|
function Ur(e) {
|
|
@@ -1799,7 +1799,7 @@ function di(e, t) {
|
|
|
1799
1799
|
if (oi === null) return process.env.NODE_ENV !== "production" && q("withDirectives can only be used inside render functions."), e;
|
|
1800
1800
|
let n = sc(oi), r = e.dirs ||= [];
|
|
1801
1801
|
for (let e = 0; e < t.length; e++) {
|
|
1802
|
-
let [i, a, o, s =
|
|
1802
|
+
let [i, a, o, s = le] = t[e];
|
|
1803
1803
|
i && (H(i) && (i = {
|
|
1804
1804
|
mounted: i,
|
|
1805
1805
|
updated: i
|
|
@@ -1852,10 +1852,10 @@ var hi = /* @__PURE__ */ Symbol.for("v-scx"), gi = () => {
|
|
|
1852
1852
|
function _i(e, t, n) {
|
|
1853
1853
|
return process.env.NODE_ENV !== "production" && !H(t) && q("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."), vi(e, t, n);
|
|
1854
1854
|
}
|
|
1855
|
-
function vi(e, t, n =
|
|
1855
|
+
function vi(e, t, n = le) {
|
|
1856
1856
|
let { immediate: r, deep: i, flush: a, once: o } = n;
|
|
1857
1857
|
process.env.NODE_ENV !== "production" && !t && (r !== void 0 && q("watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature."), i !== void 0 && q("watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature."), o !== void 0 && q("watch() \"once\" option is only respected when using the watch(source, callback, options?) signature."));
|
|
1858
|
-
let s =
|
|
1858
|
+
let s = R({}, n);
|
|
1859
1859
|
process.env.NODE_ENV !== "production" && (s.onWarn = q);
|
|
1860
1860
|
let c = t && r || !t && a !== "post", l;
|
|
1861
1861
|
if (Xs) {
|
|
@@ -1864,7 +1864,7 @@ function vi(e, t, n = ce) {
|
|
|
1864
1864
|
l = e.__watcherHandles ||= [];
|
|
1865
1865
|
} else if (!c) {
|
|
1866
1866
|
let e = () => {};
|
|
1867
|
-
return e.stop =
|
|
1867
|
+
return e.stop = L, e.resume = L, e.pause = L, e;
|
|
1868
1868
|
}
|
|
1869
1869
|
}
|
|
1870
1870
|
let u = Vs;
|
|
@@ -2159,7 +2159,7 @@ function Yi(e, t = !1, n) {
|
|
|
2159
2159
|
}
|
|
2160
2160
|
// @__NO_SIDE_EFFECTS__
|
|
2161
2161
|
function Xi(e, t) {
|
|
2162
|
-
return H(e) ? /* @__PURE__ */
|
|
2162
|
+
return H(e) ? /* @__PURE__ */ R({ name: e.name }, t, { setup: e }) : e;
|
|
2163
2163
|
}
|
|
2164
2164
|
function Zi(e) {
|
|
2165
2165
|
e.ids = [
|
|
@@ -2188,7 +2188,7 @@ function ta(e, t, n, r, i = !1) {
|
|
|
2188
2188
|
q("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");
|
|
2189
2189
|
return;
|
|
2190
2190
|
}
|
|
2191
|
-
let l = t && t.r, u = s.refs ===
|
|
2191
|
+
let l = t && t.r, u = s.refs === le ? s.refs = {} : s.refs, d = s.setupState, f = /* @__PURE__ */ Nn(d), p = d === le ? ue : (e) => process.env.NODE_ENV !== "production" && (z(f, e) && !/* @__PURE__ */ Ln(f[e]) && q(`Template ref "${e}" used on a non-ref value. It will not work in the production build.`), Qi.has(f[e])) || $i(u, e) ? !1 : z(f, e), m = (e, t) => !(process.env.NODE_ENV !== "production" && Qi.has(e) || t && $i(u, t));
|
|
2192
2192
|
if (l != null && l !== c) {
|
|
2193
2193
|
if (na(t), _e(l)) u[l] = null, p(l) && (d[l] = null);
|
|
2194
2194
|
else if (/* @__PURE__ */ Ln(l)) {
|
|
@@ -2312,7 +2312,7 @@ function Ca(e, t, n = {}, r, i) {
|
|
|
2312
2312
|
function wa(e) {
|
|
2313
2313
|
return e.some((e) => !xs(e) || !(e.type === fs || e.type === J && !wa(e.children))) ? e : null;
|
|
2314
2314
|
}
|
|
2315
|
-
var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */
|
|
2315
|
+
var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ R(/* @__PURE__ */ Object.create(null), {
|
|
2316
2316
|
$: (e) => e,
|
|
2317
2317
|
$el: (e) => e.vnode.el,
|
|
2318
2318
|
$data: (e) => e.data,
|
|
@@ -2330,7 +2330,7 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
|
|
|
2330
2330
|
},
|
|
2331
2331
|
$nextTick: (e) => e.n ||= Sr.bind(e.proxy),
|
|
2332
2332
|
$watch: (e) => yi.bind(e)
|
|
2333
|
-
}), Da = (e) => e === "_" || e === "$", Oa = (e, t) => e !==
|
|
2333
|
+
}), Da = (e) => e === "_" || e === "$", Oa = (e, t) => e !== le && !e.__isScriptSetup && z(e, t), ka = {
|
|
2334
2334
|
get({ _: e }, t) {
|
|
2335
2335
|
if (t === "__v_skip") return !0;
|
|
2336
2336
|
let { ctx: n, setupState: r, data: i, props: a, accessCache: o, type: s, appContext: c } = e;
|
|
@@ -2344,21 +2344,21 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
|
|
|
2344
2344
|
case 3: return a[t];
|
|
2345
2345
|
}
|
|
2346
2346
|
else if (Oa(r, t)) return o[t] = 1, r[t];
|
|
2347
|
-
else if (i !==
|
|
2347
|
+
else if (i !== le && z(i, t)) return o[t] = 2, i[t];
|
|
2348
2348
|
else if (z(a, t)) return o[t] = 3, a[t];
|
|
2349
|
-
else if (n !==
|
|
2349
|
+
else if (n !== le && z(n, t)) return o[t] = 4, n[t];
|
|
2350
2350
|
else Fa && (o[t] = 0);
|
|
2351
2351
|
}
|
|
2352
2352
|
let l = Ea[t], u, d;
|
|
2353
2353
|
if (l) return t === "$attrs" ? (Bt(e.attrs, "get", ""), process.env.NODE_ENV !== "production" && oo()) : process.env.NODE_ENV !== "production" && t === "$slots" && Bt(e, "get", t), l(e);
|
|
2354
2354
|
if ((u = s.__cssModules) && (u = u[t])) return u;
|
|
2355
|
-
if (n !==
|
|
2355
|
+
if (n !== le && z(n, t)) return o[t] = 4, n[t];
|
|
2356
2356
|
if (d = c.config.globalProperties, z(d, t)) return d[t];
|
|
2357
|
-
process.env.NODE_ENV !== "production" && oi && (!_e(t) || t.indexOf("__v") !== 0) && (i !==
|
|
2357
|
+
process.env.NODE_ENV !== "production" && oi && (!_e(t) || t.indexOf("__v") !== 0) && (i !== le && Da(t[0]) && z(i, t) ? q(`Property ${JSON.stringify(t)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`) : e === oi && q(`Property ${JSON.stringify(t)} was accessed during render but is not defined on instance.`));
|
|
2358
2358
|
},
|
|
2359
2359
|
set({ _: e }, t, n) {
|
|
2360
2360
|
let { data: r, setupState: i, ctx: a } = e;
|
|
2361
|
-
return Oa(i, t) ? (i[t] = n, !0) : process.env.NODE_ENV !== "production" && i.__isScriptSetup && z(i, t) ? (q(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : r !==
|
|
2361
|
+
return Oa(i, t) ? (i[t] = n, !0) : process.env.NODE_ENV !== "production" && i.__isScriptSetup && z(i, t) ? (q(`Cannot mutate <script setup> binding "${t}" from Options API.`), !1) : r !== le && z(r, t) ? (r[t] = n, !0) : z(e.props, t) ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate prop "${t}". Props are readonly.`), !1) : t[0] === "$" && t.slice(1) in e ? (process.env.NODE_ENV !== "production" && q(`Attempting to mutate public property "${t}". Properties starting with $ are reserved and readonly.`), !1) : (process.env.NODE_ENV !== "production" && t in e.appContext.config.globalProperties ? Object.defineProperty(a, t, {
|
|
2362
2362
|
enumerable: !0,
|
|
2363
2363
|
configurable: !0,
|
|
2364
2364
|
value: n
|
|
@@ -2366,7 +2366,7 @@ var Ta = (e) => e ? Ys(e) ? sc(e) : Ta(e.parent) : null, Ea = /* @__PURE__ */ fe
|
|
|
2366
2366
|
},
|
|
2367
2367
|
has({ _: { data: e, setupState: t, accessCache: n, ctx: r, appContext: i, props: a, type: o } }, s) {
|
|
2368
2368
|
let c;
|
|
2369
|
-
return !!(n[s] || e !==
|
|
2369
|
+
return !!(n[s] || e !== le && s[0] !== "$" && z(e, s) || Oa(t, s) || z(a, s) || z(r, s) || z(Ea, s) || z(i.config.globalProperties, s) || (c = o.__cssModules) && c[s]);
|
|
2370
2370
|
},
|
|
2371
2371
|
defineProperty(e, t, n) {
|
|
2372
2372
|
return n.get == null ? z(n, "value") && this.set(e, t, n.value, null) : e._.accessCache[t] = 0, Reflect.defineProperty(e, t, n);
|
|
@@ -2384,7 +2384,7 @@ function Aa(e) {
|
|
|
2384
2384
|
configurable: !0,
|
|
2385
2385
|
enumerable: !1,
|
|
2386
2386
|
get: () => Ea[n](e),
|
|
2387
|
-
set:
|
|
2387
|
+
set: L
|
|
2388
2388
|
});
|
|
2389
2389
|
}), t;
|
|
2390
2390
|
}
|
|
@@ -2395,7 +2395,7 @@ function ja(e) {
|
|
|
2395
2395
|
enumerable: !0,
|
|
2396
2396
|
configurable: !0,
|
|
2397
2397
|
get: () => e.props[n],
|
|
2398
|
-
set:
|
|
2398
|
+
set: L
|
|
2399
2399
|
});
|
|
2400
2400
|
});
|
|
2401
2401
|
}
|
|
@@ -2411,7 +2411,7 @@ function Ma(e) {
|
|
|
2411
2411
|
enumerable: !0,
|
|
2412
2412
|
configurable: !0,
|
|
2413
2413
|
get: () => n[e],
|
|
2414
|
-
set:
|
|
2414
|
+
set: L
|
|
2415
2415
|
});
|
|
2416
2416
|
}
|
|
2417
2417
|
});
|
|
@@ -2451,15 +2451,15 @@ function Ia(e) {
|
|
|
2451
2451
|
configurable: !0,
|
|
2452
2452
|
enumerable: !0,
|
|
2453
2453
|
get: () => t[e],
|
|
2454
|
-
set:
|
|
2454
|
+
set: L
|
|
2455
2455
|
});
|
|
2456
2456
|
}
|
|
2457
2457
|
if (Fa = !0, a) for (let e in a) {
|
|
2458
|
-
let t = a[e], i = H(t) ? t.bind(n, n) : H(t.get) ? t.get.bind(n, n) :
|
|
2459
|
-
process.env.NODE_ENV !== "production" && i ===
|
|
2458
|
+
let t = a[e], i = H(t) ? t.bind(n, n) : H(t.get) ? t.get.bind(n, n) : L;
|
|
2459
|
+
process.env.NODE_ENV !== "production" && i === L && q(`Computed property "${e}" has no getter.`);
|
|
2460
2460
|
let o = pc({
|
|
2461
2461
|
get: i,
|
|
2462
|
-
set: !H(t) && H(t.set) ? t.set.bind(n) : process.env.NODE_ENV === "production" ?
|
|
2462
|
+
set: !H(t) && H(t.set) ? t.set.bind(n) : process.env.NODE_ENV === "production" ? L : () => {
|
|
2463
2463
|
q(`Write operation failed: computed property "${e}" is readonly.`);
|
|
2464
2464
|
}
|
|
2465
2465
|
});
|
|
@@ -2491,9 +2491,9 @@ function Ia(e) {
|
|
|
2491
2491
|
});
|
|
2492
2492
|
});
|
|
2493
2493
|
} else e.exposed ||= {};
|
|
2494
|
-
x && e.render ===
|
|
2494
|
+
x && e.render === L && (e.render = x), D != null && (e.inheritAttrs = D), O && (e.components = O), k && (e.directives = k), T && Zi(e);
|
|
2495
2495
|
}
|
|
2496
|
-
function La(e, t, n =
|
|
2496
|
+
function La(e, t, n = L) {
|
|
2497
2497
|
B(e) && (e = Ga(e));
|
|
2498
2498
|
for (let r in e) {
|
|
2499
2499
|
let i = e[r], a;
|
|
@@ -2563,7 +2563,7 @@ var Ha = {
|
|
|
2563
2563
|
};
|
|
2564
2564
|
function Ua(e, t) {
|
|
2565
2565
|
return t ? e ? function() {
|
|
2566
|
-
return
|
|
2566
|
+
return R(H(e) ? e.call(this, this) : e, H(t) ? t.call(this, this) : t);
|
|
2567
2567
|
} : t : e;
|
|
2568
2568
|
}
|
|
2569
2569
|
function Wa(e, t) {
|
|
@@ -2581,15 +2581,15 @@ function Ka(e, t) {
|
|
|
2581
2581
|
return e ? [...new Set([].concat(e, t))] : t;
|
|
2582
2582
|
}
|
|
2583
2583
|
function qa(e, t) {
|
|
2584
|
-
return e ?
|
|
2584
|
+
return e ? R(/* @__PURE__ */ Object.create(null), e, t) : t;
|
|
2585
2585
|
}
|
|
2586
2586
|
function Ja(e, t) {
|
|
2587
|
-
return e ? B(e) && B(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] :
|
|
2587
|
+
return e ? B(e) && B(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : R(/* @__PURE__ */ Object.create(null), Na(e), Na(t ?? {})) : t;
|
|
2588
2588
|
}
|
|
2589
2589
|
function Ya(e, t) {
|
|
2590
2590
|
if (!e) return t;
|
|
2591
2591
|
if (!t) return e;
|
|
2592
|
-
let n =
|
|
2592
|
+
let n = R(/* @__PURE__ */ Object.create(null), e);
|
|
2593
2593
|
for (let r in t) n[r] = Ka(e[r], t[r]);
|
|
2594
2594
|
return n;
|
|
2595
2595
|
}
|
|
@@ -2597,7 +2597,7 @@ function Xa() {
|
|
|
2597
2597
|
return {
|
|
2598
2598
|
app: null,
|
|
2599
2599
|
config: {
|
|
2600
|
-
isNativeTag:
|
|
2600
|
+
isNativeTag: ue,
|
|
2601
2601
|
performance: !1,
|
|
2602
2602
|
globalProperties: {},
|
|
2603
2603
|
optionMergeStrategies: {},
|
|
@@ -2617,7 +2617,7 @@ function Xa() {
|
|
|
2617
2617
|
var Za = 0;
|
|
2618
2618
|
function Qa(e, t) {
|
|
2619
2619
|
return function(n, r = null) {
|
|
2620
|
-
H(n) || (n =
|
|
2620
|
+
H(n) || (n = R({}, n)), r != null && !U(r) && (process.env.NODE_ENV !== "production" && q("root props passed to app.mount() must be an object."), r = null);
|
|
2621
2621
|
let i = Xa(), a = /* @__PURE__ */ new WeakSet(), o = [], s = !1, c = i.app = {
|
|
2622
2622
|
_uid: Za++,
|
|
2623
2623
|
_component: n,
|
|
@@ -2680,7 +2680,7 @@ function Qa(e, t) {
|
|
|
2680
2680
|
var $a = null, eo = (e, t) => t === "modelValue" || t === "model-value" ? e.modelModifiers : e[`${t}Modifiers`] || e[`${ke(t)}Modifiers`] || e[`${je(t)}Modifiers`];
|
|
2681
2681
|
function to(e, t, ...n) {
|
|
2682
2682
|
if (e.isUnmounted) return;
|
|
2683
|
-
let r = e.vnode.props ||
|
|
2683
|
+
let r = e.vnode.props || le;
|
|
2684
2684
|
if (process.env.NODE_ENV !== "production") {
|
|
2685
2685
|
let { emitsOptions: r, propsOptions: [i] } = e;
|
|
2686
2686
|
if (r) if (!(t in r)) (!i || !(Ne(ke(t)) in i)) && q(`Component emitted event "${t}" but it is neither declared in the emits option nor as an "${Ne(ke(t))}" prop.`);
|
|
@@ -2711,14 +2711,14 @@ function ro(e, t, n = !1) {
|
|
|
2711
2711
|
if (!H(e)) {
|
|
2712
2712
|
let r = (e) => {
|
|
2713
2713
|
let n = ro(e, t, !0);
|
|
2714
|
-
n && (s = !0,
|
|
2714
|
+
n && (s = !0, R(o, n));
|
|
2715
2715
|
};
|
|
2716
2716
|
!n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r);
|
|
2717
2717
|
}
|
|
2718
|
-
return !a && !s ? (U(e) && r.set(e, null), null) : (B(a) ? a.forEach((e) => o[e] = null) :
|
|
2718
|
+
return !a && !s ? (U(e) && r.set(e, null), null) : (B(a) ? a.forEach((e) => o[e] = null) : R(o, a), U(e) && r.set(e, o), o);
|
|
2719
2719
|
}
|
|
2720
2720
|
function io(e, t) {
|
|
2721
|
-
return !e || !
|
|
2721
|
+
return !e || !de(t) ? !1 : (t = t.slice(2), t = t === "Once" ? t : t.replace(/Once$/, ""), z(e, t[0].toLowerCase() + t.slice(1)) || z(e, je(t)) || z(e, t));
|
|
2722
2722
|
}
|
|
2723
2723
|
var ao = !1;
|
|
2724
2724
|
function oo() {
|
|
@@ -2754,12 +2754,12 @@ function so(e) {
|
|
|
2754
2754
|
if (process.env.NODE_ENV !== "production" && _.patchFlag > 0 && _.patchFlag & 2048 && ([y, b] = co(_)), v && h !== !1) {
|
|
2755
2755
|
let e = Object.keys(v), { shapeFlag: t } = y;
|
|
2756
2756
|
if (e.length) {
|
|
2757
|
-
if (t & 7) a && e.some(
|
|
2757
|
+
if (t & 7) a && e.some(fe) && (v = fo(v, a)), y = As(y, v, !1, !0);
|
|
2758
2758
|
else if (process.env.NODE_ENV !== "production" && !ao && y.type !== fs) {
|
|
2759
2759
|
let e = Object.keys(s), t = [], n = [];
|
|
2760
2760
|
for (let r = 0, i = e.length; r < i; r++) {
|
|
2761
2761
|
let i = e[r];
|
|
2762
|
-
|
|
2762
|
+
de(i) ? fe(i) || t.push(i[2].toLowerCase() + i.slice(3)) : n.push(i);
|
|
2763
2763
|
}
|
|
2764
2764
|
n.length && q(`Extraneous non-props attributes (${n.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`), t.length && q(`Extraneous non-emits event listeners (${t.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`);
|
|
2765
2765
|
}
|
|
@@ -2791,11 +2791,11 @@ function lo(e, t = !0) {
|
|
|
2791
2791
|
}
|
|
2792
2792
|
var uo = (e) => {
|
|
2793
2793
|
let t;
|
|
2794
|
-
for (let n in e) (n === "class" || n === "style" ||
|
|
2794
|
+
for (let n in e) (n === "class" || n === "style" || de(n)) && ((t ||= {})[n] = e[n]);
|
|
2795
2795
|
return t;
|
|
2796
2796
|
}, fo = (e, t) => {
|
|
2797
2797
|
let n = {};
|
|
2798
|
-
for (let r in e) (!
|
|
2798
|
+
for (let r in e) (!fe(r) || !(r.slice(9) in t)) && (n[r] = e[r]);
|
|
2799
2799
|
return n;
|
|
2800
2800
|
}, po = (e) => e.shapeFlag & 7 || e.type === fs;
|
|
2801
2801
|
function mo(e, t, n) {
|
|
@@ -2881,7 +2881,7 @@ function wo(e, t, n, r) {
|
|
|
2881
2881
|
i && z(i, u = ke(c)) ? !a || !a.includes(u) ? n[u] = l : (s ||= {})[u] = l : io(e.emitsOptions, c) || (!(c in r) || l !== r[c]) && (r[c] = l, o = !0);
|
|
2882
2882
|
}
|
|
2883
2883
|
if (a) {
|
|
2884
|
-
let t = /* @__PURE__ */ Nn(n), r = s ||
|
|
2884
|
+
let t = /* @__PURE__ */ Nn(n), r = s || le;
|
|
2885
2885
|
for (let o = 0; o < a.length; o++) {
|
|
2886
2886
|
let s = a[o];
|
|
2887
2887
|
n[s] = To(i, t, s, r[s], e, !z(r, s));
|
|
@@ -2918,22 +2918,22 @@ function Do(e, t, n = !1) {
|
|
|
2918
2918
|
let r = (e) => {
|
|
2919
2919
|
c = !0;
|
|
2920
2920
|
let [n, r] = Do(e, t, !0);
|
|
2921
|
-
|
|
2921
|
+
R(o, n), r && s.push(...r);
|
|
2922
2922
|
};
|
|
2923
2923
|
!n && t.mixins.length && t.mixins.forEach(r), e.extends && r(e.extends), e.mixins && e.mixins.forEach(r);
|
|
2924
2924
|
}
|
|
2925
|
-
if (!a && !c) return U(e) && r.set(e,
|
|
2925
|
+
if (!a && !c) return U(e) && r.set(e, I), I;
|
|
2926
2926
|
if (B(a)) for (let e = 0; e < a.length; e++) {
|
|
2927
2927
|
process.env.NODE_ENV !== "production" && !_e(a[e]) && q("props must be strings when using array syntax.", a[e]);
|
|
2928
2928
|
let t = ke(a[e]);
|
|
2929
|
-
Oo(t) && (o[t] =
|
|
2929
|
+
Oo(t) && (o[t] = le);
|
|
2930
2930
|
}
|
|
2931
2931
|
else if (a) {
|
|
2932
2932
|
process.env.NODE_ENV !== "production" && !U(a) && q("invalid props options", a);
|
|
2933
2933
|
for (let e in a) {
|
|
2934
2934
|
let t = ke(e);
|
|
2935
2935
|
if (Oo(t)) {
|
|
2936
|
-
let n = a[e], r = o[t] = B(n) || H(n) ? { type: n } :
|
|
2936
|
+
let n = a[e], r = o[t] = B(n) || H(n) ? { type: n } : R({}, n), i = r.type, c = !1, l = !0;
|
|
2937
2937
|
if (B(i)) for (let e = 0; e < i.length; ++e) {
|
|
2938
2938
|
let t = i[e], n = H(t) && t.name;
|
|
2939
2939
|
if (n === "Boolean") {
|
|
@@ -2983,7 +2983,7 @@ function jo(e, t, n, r, i) {
|
|
|
2983
2983
|
s && !s(t, r) && q("Invalid prop: custom validator check failed for prop \"" + e + "\".");
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
|
-
var Mo = /* @__PURE__ */
|
|
2986
|
+
var Mo = /* @__PURE__ */ ce("String,Number,Boolean,Function,Symbol,BigInt");
|
|
2987
2987
|
function No(e, t) {
|
|
2988
2988
|
let n, r = ko(t);
|
|
2989
2989
|
if (r === "null") n = e === null;
|
|
@@ -3046,7 +3046,7 @@ var Ro = (e) => e === "_" || e === "_ctx" || e === "$stable", zo = (e) => B(e) ?
|
|
|
3046
3046
|
e ? (Uo(r, t, n), n && Ie(r, "_", e, !0)) : Vo(t, r);
|
|
3047
3047
|
} else t && Ho(e, t);
|
|
3048
3048
|
}, Go = (e, t, n) => {
|
|
3049
|
-
let { vnode: r, slots: i } = e, a = !0, o =
|
|
3049
|
+
let { vnode: r, slots: i } = e, a = !0, o = le;
|
|
3050
3050
|
if (r.shapeFlag & 32) {
|
|
3051
3051
|
let r = t._;
|
|
3052
3052
|
r ? process.env.NODE_ENV !== "production" && Mr ? (Uo(i, t, n), Vt(e, "set", "$slots")) : n && r === 1 ? a = !1 : Uo(i, t, n) : (a = !t.$stable, Vo(t, i)), o = t;
|
|
@@ -3083,9 +3083,9 @@ function es(e, t) {
|
|
|
3083
3083
|
Zo();
|
|
3084
3084
|
let n = Be();
|
|
3085
3085
|
n.__VUE__ = !0, process.env.NODE_ENV !== "production" && Jr(n.__VUE_DEVTOOLS_GLOBAL_HOOK__, n);
|
|
3086
|
-
let { insert: r, remove: i, patchProp: a, createElement: o, createText: s, createComment: c, setText: l, setElementText: u, parentNode: d, nextSibling: f, setScopeId: p =
|
|
3086
|
+
let { insert: r, remove: i, patchProp: a, createElement: o, createText: s, createComment: c, setText: l, setElementText: u, parentNode: d, nextSibling: f, setScopeId: p = L, insertStaticContent: m } = e, h = (e, t, n, r = null, i = null, a = null, o = void 0, s = null, c = process.env.NODE_ENV !== "production" && Mr ? !1 : !!t.dynamicChildren) => {
|
|
3087
3087
|
if (e === t) return;
|
|
3088
|
-
e && !Ss(e, t) && (r =
|
|
3088
|
+
e && !Ss(e, t) && (r = ce(e), re(e, i, a, !0), e = null), t.patchFlag === -2 && (c = !1, t.dynamicChildren = null);
|
|
3089
3089
|
let { type: l, ref: u, shapeFlag: d } = t;
|
|
3090
3090
|
switch (l) {
|
|
3091
3091
|
case ds:
|
|
@@ -3100,7 +3100,7 @@ function es(e, t) {
|
|
|
3100
3100
|
case J:
|
|
3101
3101
|
k(e, t, n, r, i, a, o, s, c);
|
|
3102
3102
|
break;
|
|
3103
|
-
default: d & 1 ? S(e, t, n, r, i, a, o, s, c) : d & 6 ? A(e, t, n, r, i, a, o, s, c) : d & 64 || d & 128 ? l.process(e, t, n, r, i, a, o, s, c,
|
|
3103
|
+
default: d & 1 ? S(e, t, n, r, i, a, o, s, c) : d & 6 ? A(e, t, n, r, i, a, o, s, c) : d & 64 || d & 128 ? l.process(e, t, n, r, i, a, o, s, c, fe) : process.env.NODE_ENV !== "production" && q("Invalid VNode type:", l, `(${typeof l})`);
|
|
3104
3104
|
}
|
|
3105
3105
|
u != null && i ? ta(u, e && e.ref, a, t || e, !t) : u == null && e && e.ref != null && ta(e.ref, null, a, e, !0);
|
|
3106
3106
|
}, g = (e, t, n, i) => {
|
|
@@ -3175,7 +3175,7 @@ function es(e, t) {
|
|
|
3175
3175
|
process.env.NODE_ENV !== "production" && (c.__vnode = t);
|
|
3176
3176
|
let { patchFlag: l, dynamicChildren: d, dirs: f } = t;
|
|
3177
3177
|
l |= e.patchFlag & 16;
|
|
3178
|
-
let p = e.props ||
|
|
3178
|
+
let p = e.props || le, m = t.props || le, h;
|
|
3179
3179
|
if (n && ns(n, !1), (h = m.onVnodeBeforeUpdate) && Ls(h, n, t, e), f && fi(t, e, n, "beforeUpdate"), n && ns(n, !0), (process.env.NODE_ENV !== "production" && Mr || d && (!e.dynamicChildren || e.dynamicChildren.length !== d.length)) && (l = 0, s = !1, d = null), (p.innerHTML && m.innerHTML == null || p.textContent && m.textContent == null) && u(c, ""), d ? (D(e.dynamicChildren, d, c, n, r, ts(t, i), o), process.env.NODE_ENV !== "production" && is(e, t)) : s || te(e, t, c, null, n, r, ts(t, i), o, !1), l > 0) {
|
|
3180
3180
|
if (l & 16) O(c, p, m, n, i);
|
|
3181
3181
|
else if (l & 2 && p.class !== m.class && a(c, "class", null, m.class, i), l & 4 && a(c, "style", p.style, m.style, i), l & 8) {
|
|
@@ -3197,7 +3197,7 @@ function es(e, t) {
|
|
|
3197
3197
|
}
|
|
3198
3198
|
}, O = (e, t, n, r, i) => {
|
|
3199
3199
|
if (t !== n) {
|
|
3200
|
-
if (t !==
|
|
3200
|
+
if (t !== le) for (let o in t) !Te(o) && !(o in n) && a(e, o, t[o], null, i, r);
|
|
3201
3201
|
for (let o in n) {
|
|
3202
3202
|
if (Te(o)) continue;
|
|
3203
3203
|
let s = n[o], c = t[o];
|
|
@@ -3212,7 +3212,7 @@ function es(e, t) {
|
|
|
3212
3212
|
t.slotScopeIds = s, e == null ? t.shapeFlag & 512 ? i.ctx.activate(t, n, r, o, c) : j(t, n, r, i, a, o, c) : M(e, t, c);
|
|
3213
3213
|
}, j = (e, t, n, r, i, a, o) => {
|
|
3214
3214
|
let s = e.component = Bs(e, r, i);
|
|
3215
|
-
if (process.env.NODE_ENV !== "production" && s.type.__hmrId && Ir(s), process.env.NODE_ENV !== "production" && (er(e), Jo(s, "mount")), ia(e) && (s.ctx.renderer =
|
|
3215
|
+
if (process.env.NODE_ENV !== "production" && s.type.__hmrId && Ir(s), process.env.NODE_ENV !== "production" && (er(e), Jo(s, "mount")), ia(e) && (s.ctx.renderer = fe), process.env.NODE_ENV !== "production" && Jo(s, "init"), Zs(s, !1, o), process.env.NODE_ENV !== "production" && Yo(s, "init"), process.env.NODE_ENV !== "production" && Mr && (e.el = null), s.asyncDep) {
|
|
3216
3216
|
if (i && i.registerDep(s, ee, o), !e.el) {
|
|
3217
3217
|
let r = s.subTree = Ds(fs);
|
|
3218
3218
|
_(null, r, t, n), e.placeholder = r.el;
|
|
@@ -3246,7 +3246,7 @@ function es(e, t) {
|
|
|
3246
3246
|
let p = so(e);
|
|
3247
3247
|
process.env.NODE_ENV !== "production" && Yo(e, "render");
|
|
3248
3248
|
let m = e.subTree;
|
|
3249
|
-
e.subTree = p, process.env.NODE_ENV !== "production" && Jo(e, "patch"), h(m, p, d(m.el),
|
|
3249
|
+
e.subTree = p, process.env.NODE_ENV !== "production" && Jo(e, "patch"), h(m, p, d(m.el), ce(m), e, i, a), process.env.NODE_ENV !== "production" && Yo(e, "patch"), t.el = p.el, u === null && _o(e, p.el), r && Qo(r, i), (f = t.props && t.props.onVnodeUpdated) && Qo(() => Ls(f, s, t, c), i), process.env.NODE_ENV !== "production" && Qr(e), process.env.NODE_ENV !== "production" && tr();
|
|
3250
3250
|
} else {
|
|
3251
3251
|
let o, { el: s, props: c } = t, { bm: l, m: u, parent: d, root: f, type: p } = e, m = ra(t);
|
|
3252
3252
|
if (ns(e, !1), l && Fe(l), !m && (o = c && c.onVnodeBeforeMount) && Ls(o, d, t), ns(e, !0), s && pe) {
|
|
@@ -3279,23 +3279,23 @@ function es(e, t) {
|
|
|
3279
3279
|
let l = e && e.children, d = e ? e.shapeFlag : 0, f = t.children, { patchFlag: p, shapeFlag: m } = t;
|
|
3280
3280
|
if (p > 0) {
|
|
3281
3281
|
if (p & 128) {
|
|
3282
|
-
|
|
3282
|
+
P(l, f, n, r, i, a, o, s, c);
|
|
3283
3283
|
return;
|
|
3284
3284
|
} else if (p & 256) {
|
|
3285
|
-
|
|
3285
|
+
ne(l, f, n, r, i, a, o, s, c);
|
|
3286
3286
|
return;
|
|
3287
3287
|
}
|
|
3288
3288
|
}
|
|
3289
|
-
m & 8 ? (d & 16 &&
|
|
3290
|
-
},
|
|
3291
|
-
e ||=
|
|
3289
|
+
m & 8 ? (d & 16 && se(l, i, a), f !== l && u(n, f)) : d & 16 ? m & 16 ? P(l, f, n, r, i, a, o, s, c) : se(l, i, a, !0) : (d & 8 && u(n, ""), m & 16 && T(f, n, r, i, a, o, s, c));
|
|
3290
|
+
}, ne = (e, t, n, r, i, a, o, s, c) => {
|
|
3291
|
+
e ||= I, t ||= I;
|
|
3292
3292
|
let l = e.length, u = t.length, d = Math.min(l, u), f;
|
|
3293
3293
|
for (f = 0; f < d; f++) {
|
|
3294
3294
|
let r = t[f] = c ? Ps(t[f]) : Ns(t[f]);
|
|
3295
3295
|
h(e[f], r, n, null, i, a, o, s, c);
|
|
3296
3296
|
}
|
|
3297
|
-
l > u ?
|
|
3298
|
-
},
|
|
3297
|
+
l > u ? se(e, i, a, !0, !1, d) : T(t, n, r, i, a, o, s, c, d);
|
|
3298
|
+
}, P = (e, t, n, r, i, a, o, s, c) => {
|
|
3299
3299
|
let l = 0, u = t.length, d = e.length - 1, f = u - 1;
|
|
3300
3300
|
for (; l <= d && l <= f;) {
|
|
3301
3301
|
let r = e[l], u = t[l] = c ? Ps(t[l]) : Ns(t[l]);
|
|
@@ -3314,7 +3314,7 @@ function es(e, t) {
|
|
|
3314
3314
|
let e = f + 1, d = e < u ? t[e].el : r;
|
|
3315
3315
|
for (; l <= f;) h(null, t[l] = c ? Ps(t[l]) : Ns(t[l]), n, d, i, a, o, s, c), l++;
|
|
3316
3316
|
}
|
|
3317
|
-
} else if (l > f) for (; l <= d;)
|
|
3317
|
+
} else if (l > f) for (; l <= d;) re(e[l], i, a, !0), l++;
|
|
3318
3318
|
else {
|
|
3319
3319
|
let p = l, m = l, g = /* @__PURE__ */ new Map();
|
|
3320
3320
|
for (l = m; l <= f; l++) {
|
|
@@ -3326,7 +3326,7 @@ function es(e, t) {
|
|
|
3326
3326
|
for (l = p; l <= d; l++) {
|
|
3327
3327
|
let r = e[l];
|
|
3328
3328
|
if (v >= y) {
|
|
3329
|
-
|
|
3329
|
+
re(r, i, a, !0);
|
|
3330
3330
|
continue;
|
|
3331
3331
|
}
|
|
3332
3332
|
let u;
|
|
@@ -3335,18 +3335,18 @@ function es(e, t) {
|
|
|
3335
3335
|
u = _;
|
|
3336
3336
|
break;
|
|
3337
3337
|
}
|
|
3338
|
-
u === void 0 ?
|
|
3338
|
+
u === void 0 ? re(r, i, a, !0) : (S[u - m] = l + 1, u >= x ? x = u : b = !0, h(r, t[u], n, null, i, a, o, s, c), v++);
|
|
3339
3339
|
}
|
|
3340
|
-
let C = b ? as(S) :
|
|
3340
|
+
let C = b ? as(S) : I;
|
|
3341
3341
|
for (_ = C.length - 1, l = y - 1; l >= 0; l--) {
|
|
3342
3342
|
let e = m + l, d = t[e], f = t[e + 1], p = e + 1 < u ? f.el || cs(f) : r;
|
|
3343
|
-
S[l] === 0 ? h(null, d, n, p, i, a, o, s, c) : b && (_ < 0 || l !== C[_] ?
|
|
3343
|
+
S[l] === 0 ? h(null, d, n, p, i, a, o, s, c) : b && (_ < 0 || l !== C[_] ? F(d, n, p, 2) : _--);
|
|
3344
3344
|
}
|
|
3345
3345
|
}
|
|
3346
|
-
},
|
|
3346
|
+
}, F = (e, t, n, a, o = null) => {
|
|
3347
3347
|
let { el: s, type: c, transition: l, children: u, shapeFlag: d } = e;
|
|
3348
3348
|
if (d & 6) {
|
|
3349
|
-
|
|
3349
|
+
F(e.component.subTree, t, n, a);
|
|
3350
3350
|
return;
|
|
3351
3351
|
}
|
|
3352
3352
|
if (d & 128) {
|
|
@@ -3354,12 +3354,12 @@ function es(e, t) {
|
|
|
3354
3354
|
return;
|
|
3355
3355
|
}
|
|
3356
3356
|
if (d & 64) {
|
|
3357
|
-
c.move(e, t, n,
|
|
3357
|
+
c.move(e, t, n, fe);
|
|
3358
3358
|
return;
|
|
3359
3359
|
}
|
|
3360
3360
|
if (c === J) {
|
|
3361
3361
|
r(s, t, n);
|
|
3362
|
-
for (let e = 0; e < u.length; e++)
|
|
3362
|
+
for (let e = 0; e < u.length; e++) F(u[e], t, n, a);
|
|
3363
3363
|
r(e.anchor, t, n);
|
|
3364
3364
|
return;
|
|
3365
3365
|
}
|
|
@@ -3380,31 +3380,31 @@ function es(e, t) {
|
|
|
3380
3380
|
o ? o(s, u, d) : d();
|
|
3381
3381
|
}
|
|
3382
3382
|
else r(s, t, n);
|
|
3383
|
-
},
|
|
3383
|
+
}, re = (e, t, n, r = !1, i = !1) => {
|
|
3384
3384
|
let { type: a, props: o, ref: s, children: c, dynamicChildren: l, shapeFlag: u, patchFlag: d, dirs: f, cacheIndex: p, memo: m } = e;
|
|
3385
3385
|
if (d === -2 && (i = !1), s != null && (kt(), ta(s, null, n, e, !0), At()), p != null && (t.renderCache[p] = void 0), u & 256) {
|
|
3386
3386
|
t.ctx.deactivate(e);
|
|
3387
3387
|
return;
|
|
3388
3388
|
}
|
|
3389
3389
|
let h = u & 1 && f, g = !ra(e), _;
|
|
3390
|
-
if (g && (_ = o && o.onVnodeBeforeUnmount) && Ls(_, t, e), u & 6)
|
|
3390
|
+
if (g && (_ = o && o.onVnodeBeforeUnmount) && Ls(_, t, e), u & 6) oe(e.component, n, r);
|
|
3391
3391
|
else {
|
|
3392
3392
|
if (u & 128) {
|
|
3393
3393
|
e.suspense.unmount(n, r);
|
|
3394
3394
|
return;
|
|
3395
3395
|
}
|
|
3396
|
-
h && fi(e, null, t, "beforeUnmount"), u & 64 ? e.type.remove(e, t, n,
|
|
3396
|
+
h && fi(e, null, t, "beforeUnmount"), u & 64 ? e.type.remove(e, t, n, fe, r) : l && !l.hasOnce && (a !== J || d > 0 && d & 64) ? se(l, t, n, !1, !0) : (a === J && d & 384 || !i && u & 16) && se(c, t, n), r && ie(e);
|
|
3397
3397
|
}
|
|
3398
3398
|
let v = m != null && p == null;
|
|
3399
3399
|
(g && (_ = o && o.onVnodeUnmounted) || h || v) && Qo(() => {
|
|
3400
3400
|
_ && Ls(_, t, e), h && fi(e, null, t, "unmounted"), v && (e.el = null);
|
|
3401
3401
|
}, n);
|
|
3402
|
-
},
|
|
3402
|
+
}, ie = (e) => {
|
|
3403
3403
|
let { type: t, el: n, anchor: r, transition: a } = e;
|
|
3404
3404
|
if (t === J) {
|
|
3405
3405
|
process.env.NODE_ENV !== "production" && e.patchFlag > 0 && e.patchFlag & 2048 && a && !a.persisted ? e.children.forEach((e) => {
|
|
3406
|
-
e.type === fs ? i(e.el) :
|
|
3407
|
-
}) :
|
|
3406
|
+
e.type === fs ? i(e.el) : ie(e);
|
|
3407
|
+
}) : ae(n, r);
|
|
3408
3408
|
return;
|
|
3409
3409
|
}
|
|
3410
3410
|
if (t === ps) {
|
|
@@ -3418,42 +3418,42 @@ function es(e, t) {
|
|
|
3418
3418
|
let { leave: t, delayLeave: r } = a, i = () => t(n, o);
|
|
3419
3419
|
r ? r(e.el, o, i) : i();
|
|
3420
3420
|
} else o();
|
|
3421
|
-
},
|
|
3421
|
+
}, ae = (e, t) => {
|
|
3422
3422
|
let n;
|
|
3423
3423
|
for (; e !== t;) n = f(e), i(e), e = n;
|
|
3424
3424
|
i(t);
|
|
3425
|
-
},
|
|
3425
|
+
}, oe = (e, t, n) => {
|
|
3426
3426
|
process.env.NODE_ENV !== "production" && e.type.__hmrId && Lr(e);
|
|
3427
3427
|
let { bum: r, scope: i, job: a, subTree: o, um: s, m: c, a: l } = e;
|
|
3428
|
-
ss(c), ss(l), r && Fe(r), i.stop(), a && (a.flags |= 8,
|
|
3428
|
+
ss(c), ss(l), r && Fe(r), i.stop(), a && (a.flags |= 8, re(o, e, t, n)), s && Qo(s, t), Qo(() => {
|
|
3429
3429
|
e.isUnmounted = !0;
|
|
3430
3430
|
}, t), process.env.NODE_ENV !== "production" && ei(e);
|
|
3431
|
-
},
|
|
3432
|
-
for (let o = a; o < e.length; o++)
|
|
3433
|
-
},
|
|
3434
|
-
if (e.shapeFlag & 6) return
|
|
3431
|
+
}, se = (e, t, n, r = !1, i = !1, a = 0) => {
|
|
3432
|
+
for (let o = a; o < e.length; o++) re(e[o], t, n, r, i);
|
|
3433
|
+
}, ce = (e) => {
|
|
3434
|
+
if (e.shapeFlag & 6) return ce(e.component.subTree);
|
|
3435
3435
|
if (e.shapeFlag & 128) return e.suspense.next();
|
|
3436
3436
|
let t = f(e.anchor || e.el), n = t && t[Si];
|
|
3437
3437
|
return n ? f(n) : t;
|
|
3438
|
-
},
|
|
3438
|
+
}, ue = !1, de = (e, t, n) => {
|
|
3439
3439
|
let r;
|
|
3440
|
-
e == null ? t._vnode && (
|
|
3441
|
-
},
|
|
3440
|
+
e == null ? t._vnode && (re(t._vnode, null, null, !0), r = t._vnode.component) : h(t._vnode || null, e, t, null, null, null, n), t._vnode = e, ue ||= (ue = !0, Dr(r), Or(), !1);
|
|
3441
|
+
}, fe = {
|
|
3442
3442
|
p: h,
|
|
3443
|
-
um:
|
|
3444
|
-
m:
|
|
3445
|
-
r:
|
|
3443
|
+
um: re,
|
|
3444
|
+
m: F,
|
|
3445
|
+
r: ie,
|
|
3446
3446
|
mt: j,
|
|
3447
3447
|
mc: T,
|
|
3448
3448
|
pc: te,
|
|
3449
3449
|
pbc: D,
|
|
3450
|
-
n:
|
|
3450
|
+
n: ce,
|
|
3451
3451
|
o: e
|
|
3452
|
-
},
|
|
3453
|
-
return t && ([
|
|
3454
|
-
render:
|
|
3455
|
-
hydrate:
|
|
3456
|
-
createApp: Qa(
|
|
3452
|
+
}, R, pe;
|
|
3453
|
+
return t && ([R, pe] = t(fe)), {
|
|
3454
|
+
render: de,
|
|
3455
|
+
hydrate: R,
|
|
3456
|
+
createApp: Qa(de, R)
|
|
3457
3457
|
};
|
|
3458
3458
|
}
|
|
3459
3459
|
function ts({ type: e, props: t }, n) {
|
|
@@ -3516,7 +3516,7 @@ function vs(e, t = !1) {
|
|
|
3516
3516
|
_s += e, e < 0 && hs && t && (hs.hasOnce = !0);
|
|
3517
3517
|
}
|
|
3518
3518
|
function ys(e) {
|
|
3519
|
-
return e.dynamicChildren = _s > 0 ? hs ||
|
|
3519
|
+
return e.dynamicChildren = _s > 0 ? hs || I : null, gs(), _s > 0 && hs && hs.push(e), e;
|
|
3520
3520
|
}
|
|
3521
3521
|
function X(e, t, n, r, i, a) {
|
|
3522
3522
|
return ys(Z(e, t, n, r, i, a, !0));
|
|
@@ -3581,13 +3581,13 @@ function Os(e, t = null, n = null, r = 0, i = null, a = !1) {
|
|
|
3581
3581
|
if (fc(e) && (e = e.__vccOpts), t) {
|
|
3582
3582
|
t = ks(t);
|
|
3583
3583
|
let { class: e, style: n } = t;
|
|
3584
|
-
e && !_e(e) && (t.class = Ke(e)), U(n) && (/* @__PURE__ */ Mn(n) && !B(n) && (n =
|
|
3584
|
+
e && !_e(e) && (t.class = Ke(e)), U(n) && (/* @__PURE__ */ Mn(n) && !B(n) && (n = R({}, n)), t.style = Ve(n));
|
|
3585
3585
|
}
|
|
3586
3586
|
let o = _e(e) ? 1 : ls(e) ? 128 : Ci(e) ? 64 : U(e) ? 4 : H(e) ? 2 : 0;
|
|
3587
3587
|
return process.env.NODE_ENV !== "production" && o & 4 && /* @__PURE__ */ Mn(e) && (e = /* @__PURE__ */ Nn(e), q("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.", "\nComponent that was made reactive: ", e)), Z(e, t, n, r, i, o, a, !0);
|
|
3588
3588
|
}
|
|
3589
3589
|
function ks(e) {
|
|
3590
|
-
return e ? /* @__PURE__ */ Mn(e) || bo(e) ?
|
|
3590
|
+
return e ? /* @__PURE__ */ Mn(e) || bo(e) ? R({}, e) : e : null;
|
|
3591
3591
|
}
|
|
3592
3592
|
function As(e, t, n = !1, r = !1) {
|
|
3593
3593
|
let { props: i, ref: a, patchFlag: o, children: s, transition: c } = e, l = t ? Is(i || {}, t) : i, u = {
|
|
@@ -3670,9 +3670,9 @@ function Is(...e) {
|
|
|
3670
3670
|
let r = e[n];
|
|
3671
3671
|
for (let e in r) if (e === "class") t.class !== r.class && (t.class = Ke([t.class, r.class]));
|
|
3672
3672
|
else if (e === "style") t.style = Ve([t.style, r.style]);
|
|
3673
|
-
else if (
|
|
3673
|
+
else if (de(e)) {
|
|
3674
3674
|
let n = t[e], i = r[e];
|
|
3675
|
-
i && n !== i && !(B(n) && n.includes(i)) ? t[e] = n ? [].concat(n, i) : i : i == null && n == null && !
|
|
3675
|
+
i && n !== i && !(B(n) && n.includes(i)) ? t[e] = n ? [].concat(n, i) : i : i == null && n == null && !fe(e) && (t[e] = i);
|
|
3676
3676
|
} else e !== "" && (t[e] = r[e]);
|
|
3677
3677
|
}
|
|
3678
3678
|
return t;
|
|
@@ -3714,15 +3714,15 @@ function Bs(e, t, n) {
|
|
|
3714
3714
|
emitsOptions: ro(r, i),
|
|
3715
3715
|
emit: null,
|
|
3716
3716
|
emitted: null,
|
|
3717
|
-
propsDefaults:
|
|
3717
|
+
propsDefaults: le,
|
|
3718
3718
|
inheritAttrs: r.inheritAttrs,
|
|
3719
|
-
ctx:
|
|
3720
|
-
data:
|
|
3721
|
-
props:
|
|
3722
|
-
attrs:
|
|
3723
|
-
slots:
|
|
3724
|
-
refs:
|
|
3725
|
-
setupState:
|
|
3719
|
+
ctx: le,
|
|
3720
|
+
data: le,
|
|
3721
|
+
props: le,
|
|
3722
|
+
attrs: le,
|
|
3723
|
+
slots: le,
|
|
3724
|
+
refs: le,
|
|
3725
|
+
setupState: le,
|
|
3726
3726
|
setupContext: null,
|
|
3727
3727
|
suspense: n,
|
|
3728
3728
|
suspenseId: n ? n.pendingId : 0,
|
|
@@ -3765,7 +3765,7 @@ var Gs = (e) => {
|
|
|
3765
3765
|
};
|
|
3766
3766
|
}, Ks = () => {
|
|
3767
3767
|
Vs && Vs.scope.off(), Us(null);
|
|
3768
|
-
}, qs = /* @__PURE__ */
|
|
3768
|
+
}, qs = /* @__PURE__ */ ce("slot,component");
|
|
3769
3769
|
function Js(e, { isNativeTag: t }) {
|
|
3770
3770
|
(qs(e) || t(e)) && q("Do not use built-in or reserved HTML elements as component id: " + e);
|
|
3771
3771
|
}
|
|
@@ -3820,13 +3820,13 @@ function rc(e, t, n) {
|
|
|
3820
3820
|
if (t) {
|
|
3821
3821
|
process.env.NODE_ENV !== "production" && Jo(e, "compile");
|
|
3822
3822
|
let { isCustomElement: n, compilerOptions: i } = e.appContext.config, { delimiters: a, compilerOptions: o } = r;
|
|
3823
|
-
r.render = ec(t,
|
|
3823
|
+
r.render = ec(t, R(R({
|
|
3824
3824
|
isCustomElement: n,
|
|
3825
3825
|
delimiters: a
|
|
3826
3826
|
}, i), o)), process.env.NODE_ENV !== "production" && Yo(e, "compile");
|
|
3827
3827
|
}
|
|
3828
3828
|
}
|
|
3829
|
-
e.render = r.render ||
|
|
3829
|
+
e.render = r.render || L, tc && tc(e);
|
|
3830
3830
|
}
|
|
3831
3831
|
{
|
|
3832
3832
|
let t = Gs(e);
|
|
@@ -3837,7 +3837,7 @@ function rc(e, t, n) {
|
|
|
3837
3837
|
At(), t();
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
process.env.NODE_ENV !== "production" && !r.render && e.render ===
|
|
3840
|
+
process.env.NODE_ENV !== "production" && !r.render && e.render === L && !t && (!ec && r.template ? q("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".") : q("Component is missing template or render function: ", r));
|
|
3841
3841
|
}
|
|
3842
3842
|
var ic = process.env.NODE_ENV === "production" ? { get(e, t) {
|
|
3843
3843
|
return Bt(e, "get", ""), e[t];
|
|
@@ -4000,7 +4000,7 @@ function hc() {
|
|
|
4000
4000
|
};
|
|
4001
4001
|
function a(e) {
|
|
4002
4002
|
let t = [];
|
|
4003
|
-
e.type.props && e.props && t.push(o("props", /* @__PURE__ */ Nn(e.props))), e.setupState !==
|
|
4003
|
+
e.type.props && e.props && t.push(o("props", /* @__PURE__ */ Nn(e.props))), e.setupState !== le && t.push(o("setup", e.setupState)), e.data !== le && t.push(o("data", /* @__PURE__ */ Nn(e.data)));
|
|
4004
4004
|
let n = c(e, "computed");
|
|
4005
4005
|
n && t.push(o("computed", n));
|
|
4006
4006
|
let i = c(e, "inject");
|
|
@@ -4016,7 +4016,7 @@ function hc() {
|
|
|
4016
4016
|
]), t;
|
|
4017
4017
|
}
|
|
4018
4018
|
function o(e, t) {
|
|
4019
|
-
return t =
|
|
4019
|
+
return t = R({}, t), Object.keys(t).length ? [
|
|
4020
4020
|
"div",
|
|
4021
4021
|
{ style: "line-height:1.25em;margin-bottom:0.6em" },
|
|
4022
4022
|
[
|
|
@@ -4075,7 +4075,7 @@ function hc() {
|
|
|
4075
4075
|
}
|
|
4076
4076
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(i) : window.devtoolsFormatters = [i];
|
|
4077
4077
|
}
|
|
4078
|
-
var gc = "3.5.39", _c = process.env.NODE_ENV === "production" ?
|
|
4078
|
+
var gc = "3.5.39", _c = process.env.NODE_ENV === "production" ? L : q;
|
|
4079
4079
|
process.env.NODE_ENV, process.env.NODE_ENV;
|
|
4080
4080
|
//#endregion
|
|
4081
4081
|
//#region node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
@@ -4147,7 +4147,7 @@ var bc = vc ? (e) => vc.createHTML(e) : (e) => e, xc = "http://www.w3.org/2000/s
|
|
|
4147
4147
|
leaveFromClass: String,
|
|
4148
4148
|
leaveActiveClass: String,
|
|
4149
4149
|
leaveToClass: String
|
|
4150
|
-
}, Ac = /* @__PURE__ */
|
|
4150
|
+
}, Ac = /* @__PURE__ */ R({}, zi, kc), jc = /* @__PURE__ */ ((e) => (e.displayName = "Transition", e.props = Ac, e))((e, { slots: t }) => mc(Ui, Pc(e), t)), Mc = (e, t = []) => {
|
|
4151
4151
|
B(e) ? e.forEach((e) => e(...t)) : e && e(...t);
|
|
4152
4152
|
}, Nc = (e) => e ? B(e) ? e.some((e) => e.length > 1) : e.length > 1 : !1;
|
|
4153
4153
|
function Pc(e) {
|
|
@@ -4164,7 +4164,7 @@ function Pc(e) {
|
|
|
4164
4164
|
Rc(t, e ? c : a), Lc(t, e ? u : s), Nc(i) || Vc(t, r, h, o);
|
|
4165
4165
|
});
|
|
4166
4166
|
};
|
|
4167
|
-
return
|
|
4167
|
+
return R(t, {
|
|
4168
4168
|
onBeforeEnter(e) {
|
|
4169
4169
|
Mc(_, [e]), Lc(e, a), Lc(e, o);
|
|
4170
4170
|
},
|
|
@@ -4399,11 +4399,11 @@ function bl(e, t) {
|
|
|
4399
4399
|
}
|
|
4400
4400
|
function xl(e, t) {
|
|
4401
4401
|
return H(e) || B(e) ? e : (_c(`Wrong type passed as event handler to ${t} - did you forget @ or : in front of your prop?
|
|
4402
|
-
Expected function or array of functions, received type ${typeof e}.`),
|
|
4402
|
+
Expected function or array of functions, received type ${typeof e}.`), L);
|
|
4403
4403
|
}
|
|
4404
4404
|
var Sl = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, Cl = (e, t, n, r, i, a) => {
|
|
4405
4405
|
let o = i === "svg";
|
|
4406
|
-
t === "class" ? Kc(e, r, o) : t === "style" ? $c(e, n, r) :
|
|
4406
|
+
t === "class" ? Kc(e, r, o) : t === "style" ? $c(e, n, r) : de(t) ? fe(t) || pl(e, t, n, r, a) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : wl(e, t, r, o)) ? (ll(e, t, r), !e.tagName.includes("-") && (t === "value" || t === "checked" || t === "selected") && cl(e, t, r, o, a, t !== "value")) : e._isVueCE && (Tl(e, t) || e._def.__asyncLoader && (/[A-Z]/.test(t) || !_e(r))) ? ll(e, ke(t), r, a, t) : (t === "true-value" ? e._trueValue = r : t === "false-value" && (e._falseValue = r), cl(e, t, r, o));
|
|
4407
4407
|
};
|
|
4408
4408
|
function wl(e, t, n, r) {
|
|
4409
4409
|
if (r) return !!(t === "innerHTML" || t === "textContent" || t in e && Sl(t) && H(n));
|
|
@@ -4497,7 +4497,7 @@ var jl = {
|
|
|
4497
4497
|
let r = je(n.key);
|
|
4498
4498
|
if (t.some((e) => e === r || Fl[e] === r)) return e(n);
|
|
4499
4499
|
}));
|
|
4500
|
-
}, Ll = /* @__PURE__ */
|
|
4500
|
+
}, Ll = /* @__PURE__ */ R({ patchProp: Cl }, Tc), Rl;
|
|
4501
4501
|
function zl() {
|
|
4502
4502
|
return Rl ||= $o(Ll);
|
|
4503
4503
|
}
|
|
@@ -6429,52 +6429,52 @@ function vp(e) {
|
|
|
6429
6429
|
return Array.isArray(r) && r.length && r[0] && typeof r[0].jsonPath == "string" ? r[0].jsonPath : "";
|
|
6430
6430
|
}
|
|
6431
6431
|
function yp(e) {
|
|
6432
|
-
let { apiKey: t, baseUrl: s, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = $u, streamMaxMs: x = td, toolTimeoutMs: S, maxParallelTools: C = 1, maxVerifyAttempts: w = 0, roundTokenBudget: T = 0, onLog: E, onLlmChange: j, imageContentFormat: M = "openai", staleReadInvalidation: te = !0, debug:
|
|
6433
|
-
(!Number.isFinite(
|
|
6434
|
-
let
|
|
6432
|
+
let { apiKey: t, baseUrl: s, model: c = "deepseek-v4-flash", temperature: l = .7, maxTokens: u, extraBody: d, extraConfig: f, systemPrompt: p, tools: m = [], middleware: h = [], maxToolRounds: g, maxIterations: _, maxRetries: v = 2, retryDelayMs: y = 500, stallMs: b = $u, streamMaxMs: x = td, toolTimeoutMs: S, maxParallelTools: C = 1, maxVerifyAttempts: w = 0, roundTokenBudget: T = 0, onLog: E, onLlmChange: j, imageContentFormat: M = "openai", staleReadInvalidation: te = !0, debug: ne = !1 } = e, P = g ?? cp;
|
|
6433
|
+
(!Number.isFinite(P) || P < 1) && (console.warn(`[page-agent-sdk] maxToolRounds=${P} 非法(须 ≥1 正整数),已 clamp 到 1(0/负数致主循环 while 不进 → agent 不调 LLM 静默返回兜底文案)`), P = 1);
|
|
6434
|
+
let F = D({
|
|
6435
6435
|
model: c,
|
|
6436
6436
|
contextWindow: e.contextWindow,
|
|
6437
6437
|
maxOutputTokens: e.maxOutputTokens,
|
|
6438
6438
|
vision: e.vision
|
|
6439
|
-
}),
|
|
6440
|
-
function
|
|
6441
|
-
|
|
6439
|
+
}), ae = u ?? F.maxOutputTokens, oe = k(F.contextWindow), ce = A(F.contextWindow);
|
|
6440
|
+
function le(e) {
|
|
6441
|
+
F = e, oe = k(F.contextWindow), ce = A(F.contextWindow);
|
|
6442
6442
|
}
|
|
6443
|
-
let
|
|
6443
|
+
let I = /* @__PURE__ */ zn([]), L = 0, ue = () => ({
|
|
6444
6444
|
retries: 0,
|
|
6445
6445
|
exhausted: 0
|
|
6446
|
-
}),
|
|
6447
|
-
transitional_retry:
|
|
6448
|
-
completion_gate:
|
|
6449
|
-
evidence_audit_gate:
|
|
6450
|
-
zero_tool_gate:
|
|
6451
|
-
status_query_gate:
|
|
6452
|
-
...e.pageAssertionGate === !0 ? { page_assertion_gate:
|
|
6453
|
-
},
|
|
6446
|
+
}), de = {
|
|
6447
|
+
transitional_retry: ue(),
|
|
6448
|
+
completion_gate: ue(),
|
|
6449
|
+
evidence_audit_gate: ue(),
|
|
6450
|
+
zero_tool_gate: ue(),
|
|
6451
|
+
status_query_gate: ue(),
|
|
6452
|
+
...e.pageAssertionGate === !0 ? { page_assertion_gate: ue() } : {}
|
|
6453
|
+
}, fe = {
|
|
6454
6454
|
ZERO_TOOL_GATE_EXHAUSTED: "zero_tool_gate",
|
|
6455
6455
|
AUDIT_GATE_EXHAUSTED: "evidence_audit_gate",
|
|
6456
6456
|
COMPLETION_GATE_EXHAUSTED: "completion_gate",
|
|
6457
6457
|
PAGE_ASSERTION_GATE_EXHAUSTED: "page_assertion_gate"
|
|
6458
|
-
},
|
|
6458
|
+
}, R = [], pe = 0, me = 0, z = /* @__PURE__ */ new Set();
|
|
6459
6459
|
function B(e, t) {
|
|
6460
6460
|
let n = {
|
|
6461
6461
|
timestamp: Date.now(),
|
|
6462
6462
|
type: e,
|
|
6463
6463
|
data: pp(t)
|
|
6464
6464
|
};
|
|
6465
|
-
|
|
6465
|
+
I.value.push(n), I.value.length > lp && I.value.splice(0, I.value.length - lp), Hn(I), E?.(n), ne && console.log(`%c[Agent] ${e}`, "color:#667eea;font-weight:bold", t);
|
|
6466
6466
|
}
|
|
6467
6467
|
let V = (e) => {
|
|
6468
|
-
|
|
6468
|
+
I.value.push({
|
|
6469
6469
|
...e,
|
|
6470
6470
|
timestamp: typeof e.timestamp == "number" ? e.timestamp : Date.now(),
|
|
6471
6471
|
data: pp(e.data)
|
|
6472
|
-
}),
|
|
6472
|
+
}), I.value.length > lp && I.value.splice(0, I.value.length - lp), Hn(I);
|
|
6473
6473
|
}, he = [...h.flatMap((e) => e.tools || []), ...m], ge = e.llm ?? new n({
|
|
6474
6474
|
apiKey: t,
|
|
6475
6475
|
model: c,
|
|
6476
6476
|
temperature: l,
|
|
6477
|
-
maxTokens:
|
|
6477
|
+
maxTokens: ae,
|
|
6478
6478
|
maxRetries: 0,
|
|
6479
6479
|
configuration: {
|
|
6480
6480
|
...s ? { baseURL: N(s) } : {},
|
|
@@ -6511,16 +6511,16 @@ function yp(e) {
|
|
|
6511
6511
|
pin: be.has(e.name)
|
|
6512
6512
|
});
|
|
6513
6513
|
}
|
|
6514
|
-
let n = Math.max(2e3, Math.round(
|
|
6514
|
+
let n = Math.max(2e3, Math.round(F.contextWindow * ye)), r = O(e) + t.reduce((e, t) => e + t.tokens, 0), i = /* @__PURE__ */ new Set();
|
|
6515
6515
|
if (r > n) {
|
|
6516
6516
|
let e = r, a = [];
|
|
6517
6517
|
for (let e of t.filter((e) => !e.pin).sort((e, t) => t.tokens - e.tokens)) {
|
|
6518
6518
|
if (r <= n) break;
|
|
6519
6519
|
a.push(`${e.name}(${e.tokens})`), i.add(e.name), r -= e.tokens, e.text = "";
|
|
6520
6520
|
}
|
|
6521
|
-
a.length && console.warn(`[page-agent-sdk] 系统段超预算(${e} > ${n} tokens,窗口 ${
|
|
6521
|
+
a.length && console.warn(`[page-agent-sdk] 系统段超预算(${e} > ${n} tokens,窗口 ${F.contextWindow} 的 ${ye * 100}%),drop 非核心段:${a.join(", ")}(保 base/mission/workingMemory)`);
|
|
6522
6522
|
}
|
|
6523
|
-
return
|
|
6523
|
+
return R = t.map((e) => ({
|
|
6524
6524
|
name: e.name,
|
|
6525
6525
|
tokens: e.tokens,
|
|
6526
6526
|
dropped: i.has(e.name)
|
|
@@ -6529,7 +6529,7 @@ function yp(e) {
|
|
|
6529
6529
|
function Se(e) {
|
|
6530
6530
|
let t = [new a(xe())];
|
|
6531
6531
|
for (let n of e) if (n.role === "user") {
|
|
6532
|
-
let e = n.quote ? bu(n.content, n.quote) : n.content, r =
|
|
6532
|
+
let e = n.quote ? bu(n.content, n.quote) : n.content, r = F.vision && n.images?.length ? au(e, n.images, M) : null;
|
|
6533
6533
|
r ? t.push(new i({ content: r })) : n.images?.some((e) => e.description) ? t.push(new i(ou(e, n.images))) : t.push(new i(e));
|
|
6534
6534
|
} else n.role === "assistant" ? t.push(new r(n.content)) : n.role === "system" && t.push(new a(n.content));
|
|
6535
6535
|
return t;
|
|
@@ -6578,13 +6578,13 @@ function yp(e) {
|
|
|
6578
6578
|
};
|
|
6579
6579
|
if (rd(a) && !e._ctxRetry) {
|
|
6580
6580
|
e._ctxRetry = !0;
|
|
6581
|
-
let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(
|
|
6581
|
+
let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(F.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
|
|
6582
6582
|
return B("error", {
|
|
6583
6583
|
stage: "context_overflow_retry",
|
|
6584
6584
|
at: "launch",
|
|
6585
6585
|
beforeTokens: a,
|
|
6586
6586
|
afterTokens: s,
|
|
6587
|
-
window:
|
|
6587
|
+
window: F.contextWindow
|
|
6588
6588
|
}), console.warn(`[page-agent-sdk] 上下文超限(启动)→ 激进 trim 重试:${a} → ${s} tokens`), we({
|
|
6589
6589
|
...e,
|
|
6590
6590
|
messages: o
|
|
@@ -6611,12 +6611,12 @@ function yp(e) {
|
|
|
6611
6611
|
try {
|
|
6612
6612
|
for await (let e of nd(c, b, x)) {
|
|
6613
6613
|
l = l ? l.concat(e) : e;
|
|
6614
|
-
let n =
|
|
6614
|
+
let n = re(e);
|
|
6615
6615
|
n && t && (u += n, t({
|
|
6616
6616
|
type: "text",
|
|
6617
6617
|
delta: n
|
|
6618
6618
|
}));
|
|
6619
|
-
let r =
|
|
6619
|
+
let r = ie(e);
|
|
6620
6620
|
r && t && t({
|
|
6621
6621
|
type: "reasoning",
|
|
6622
6622
|
delta: r
|
|
@@ -6637,13 +6637,13 @@ function yp(e) {
|
|
|
6637
6637
|
};
|
|
6638
6638
|
if (rd(a) && l === null && u === "" && !e._ctxRetry) {
|
|
6639
6639
|
e._ctxRetry = !0;
|
|
6640
|
-
let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(
|
|
6640
|
+
let r = (e) => O(typeof e.content == "string" ? e.content : JSON.stringify(e.content)), a = e.messages.reduce((e, t) => e + r(t), 0), o = De(e.messages, Math.round(F.contextWindow * .3)), s = o.reduce((e, t) => e + r(t), 0);
|
|
6641
6641
|
return B("error", {
|
|
6642
6642
|
stage: "context_overflow_retry",
|
|
6643
6643
|
beforeTokens: a,
|
|
6644
6644
|
afterTokens: s,
|
|
6645
|
-
window:
|
|
6646
|
-
}), console.warn(`[page-agent-sdk] 上下文超限 → 激进 trim 重试:${a} → ${s} tokens(窗口 ${
|
|
6645
|
+
window: F.contextWindow
|
|
6646
|
+
}), console.warn(`[page-agent-sdk] 上下文超限 → 激进 trim 重试:${a} → ${s} tokens(窗口 ${F.contextWindow})`), we({
|
|
6647
6647
|
...e,
|
|
6648
6648
|
messages: o
|
|
6649
6649
|
}, t, n, i);
|
|
@@ -6745,8 +6745,8 @@ function yp(e) {
|
|
|
6745
6745
|
files: e.state.files,
|
|
6746
6746
|
vfsAvailable: !!e.state.files && o,
|
|
6747
6747
|
toolName: e.name,
|
|
6748
|
-
threshold:
|
|
6749
|
-
passThroughChars:
|
|
6748
|
+
threshold: oe,
|
|
6749
|
+
passThroughChars: ce
|
|
6750
6750
|
}).content, {
|
|
6751
6751
|
content: a,
|
|
6752
6752
|
status: "done"
|
|
@@ -6765,7 +6765,7 @@ function yp(e) {
|
|
|
6765
6765
|
return mp(e, t);
|
|
6766
6766
|
}
|
|
6767
6767
|
function Oe(e) {
|
|
6768
|
-
return !
|
|
6768
|
+
return !ne && !E ? [] : e.map((e) => {
|
|
6769
6769
|
let t = Ee(e), n = { role: t === "human" ? "user" : t === "ai" ? "assistant" : t }, r = typeof e.content == "string" ? e.content : JSON.stringify(e.content);
|
|
6770
6770
|
r && (n.content = r.length > up ? r.slice(0, up) + `…(截断 ${r.length - up} 字符)` : r);
|
|
6771
6771
|
let i = e.tool_calls;
|
|
@@ -6793,9 +6793,9 @@ function yp(e) {
|
|
|
6793
6793
|
});
|
|
6794
6794
|
}
|
|
6795
6795
|
{
|
|
6796
|
-
let e = O(p || "你是一个智能助手。"), t = Math.max(2e3, Math.round(
|
|
6796
|
+
let e = O(p || "你是一个智能助手。"), t = Math.max(2e3, Math.round(F.contextWindow * ye));
|
|
6797
6797
|
if (e > t) {
|
|
6798
|
-
let r = `[page-agent-sdk] systemPrompt 本身(${e} tokens)超过系统段预算(${t} tokens,窗口 ${
|
|
6798
|
+
let r = `[page-agent-sdk] systemPrompt 本身(${e} tokens)超过系统段预算(${t} tokens,窗口 ${F.contextWindow} 的 ${ye * 100}%);请缩减 systemPrompt 或换更大窗口模型`;
|
|
6799
6799
|
return console.error(r), n({
|
|
6800
6800
|
type: "error",
|
|
6801
6801
|
message: r,
|
|
@@ -6815,7 +6815,7 @@ function yp(e) {
|
|
|
6815
6815
|
});
|
|
6816
6816
|
let l = ep(h, (e) => we(e, n, r)), u = tp(h, Te), d = {
|
|
6817
6817
|
rounds: 0,
|
|
6818
|
-
maxToolRounds:
|
|
6818
|
+
maxToolRounds: P,
|
|
6819
6819
|
invokeUsage: {
|
|
6820
6820
|
prompt_tokens: 0,
|
|
6821
6821
|
completion_tokens: 0,
|
|
@@ -6834,8 +6834,8 @@ function yp(e) {
|
|
|
6834
6834
|
}])), v = /* @__PURE__ */ new Map(), y = 0, b = (e) => {
|
|
6835
6835
|
let t = he.find((t) => t.name === e);
|
|
6836
6836
|
return t && "writeCapable" in t ? typeof t.writeCapable == "function" || t.writeCapable === !0 : _p.has(e);
|
|
6837
|
-
}, x = 0, S = 0, E = hp(
|
|
6838
|
-
for (; (x <
|
|
6837
|
+
}, x = 0, S = 0, E = hp(P, _), D = null, k = 0, A = !1, j = !1;
|
|
6838
|
+
for (; (x < P || j) && S < E && (S++, !r?.aborted);) {
|
|
6839
6839
|
if (T > 0 && d.invokeUsage.total_tokens > T) {
|
|
6840
6840
|
let e = `本轮 token 预算(约 ${T})已用尽:任务在 ${x} 轮工具调用后中断,已完成的部分均保留。可继续对话,指定下一步(如「继续完成」/「只改 X」/「提高预算重试」)。`;
|
|
6841
6841
|
return B("error", {
|
|
@@ -6863,7 +6863,7 @@ function yp(e) {
|
|
|
6863
6863
|
}), U = Xf(h, {
|
|
6864
6864
|
messages: c,
|
|
6865
6865
|
state: U
|
|
6866
|
-
}), c = Ce(c, gp(x,
|
|
6866
|
+
}), c = Ce(c, gp(x, P, e.hasSubagent)), c = De(c, Math.round(F.contextWindow * .6)), B("llm_request", {
|
|
6867
6867
|
round: x + 1,
|
|
6868
6868
|
model: _e(),
|
|
6869
6869
|
tools: he.map((e) => e.name),
|
|
@@ -6874,7 +6874,7 @@ function yp(e) {
|
|
|
6874
6874
|
state: U
|
|
6875
6875
|
});
|
|
6876
6876
|
c.push(t.message);
|
|
6877
|
-
let a =
|
|
6877
|
+
let a = se(t.message);
|
|
6878
6878
|
if (B("llm_response", {
|
|
6879
6879
|
round: x + 1,
|
|
6880
6880
|
content: t.content,
|
|
@@ -6886,7 +6886,7 @@ function yp(e) {
|
|
|
6886
6886
|
}), t.content;
|
|
6887
6887
|
if (!t.toolCalls.length) {
|
|
6888
6888
|
{
|
|
6889
|
-
let e = t.message?.response_metadata ?? t.message?.responseMetadata, n = e?.stop_reason ?? e?.finish_reason, r =
|
|
6889
|
+
let e = t.message?.response_metadata ?? t.message?.responseMetadata, n = e?.stop_reason ?? e?.finish_reason, r = se(t.message);
|
|
6890
6890
|
if ((n === "length" || !t.content && (r?.completion_tokens ?? 0) >= 4e3) && !A) {
|
|
6891
6891
|
A = !0, j = !0, B("error", {
|
|
6892
6892
|
stage: "completion_truncated_retry",
|
|
@@ -6950,7 +6950,7 @@ function yp(e) {
|
|
|
6950
6950
|
});
|
|
6951
6951
|
if (a?.kind === "feedback") {
|
|
6952
6952
|
j = !0;
|
|
6953
|
-
let e =
|
|
6953
|
+
let e = de[a.gate.stage];
|
|
6954
6954
|
e && (e.retries += 1), B("middleware", {
|
|
6955
6955
|
stage: a.gate.stage,
|
|
6956
6956
|
attempt: a.gate.attempt,
|
|
@@ -6960,8 +6960,8 @@ function yp(e) {
|
|
|
6960
6960
|
continue;
|
|
6961
6961
|
}
|
|
6962
6962
|
if (a?.kind === "observable") {
|
|
6963
|
-
let e =
|
|
6964
|
-
e &&
|
|
6963
|
+
let e = fe[a.obs.code];
|
|
6964
|
+
e && de[e] && (de[e].exhausted += 1), B("error", {
|
|
6965
6965
|
stage: a.obs.code,
|
|
6966
6966
|
...a.obs.context,
|
|
6967
6967
|
content: t.content.slice(0, 160)
|
|
@@ -7116,7 +7116,7 @@ function yp(e) {
|
|
|
7116
7116
|
round: x + 1,
|
|
7117
7117
|
maxParallelTools: C
|
|
7118
7118
|
});
|
|
7119
|
-
e.invalidatedCount > 0 && (c = e.messages,
|
|
7119
|
+
e.invalidatedCount > 0 && (c = e.messages, L += e.invalidatedCount, B("middleware", {
|
|
7120
7120
|
stage: "stale_read_invalidated",
|
|
7121
7121
|
round: x + 1,
|
|
7122
7122
|
writtenPaths: E.map((e) => vp(e.args) || "(整体)"),
|
|
@@ -7130,28 +7130,28 @@ function yp(e) {
|
|
|
7130
7130
|
type: "done",
|
|
7131
7131
|
content: ""
|
|
7132
7132
|
}), "";
|
|
7133
|
-
let M = `\n\n(提示:工具调用次数已达上限(${
|
|
7133
|
+
let M = `\n\n(提示:工具调用次数已达上限(${P} 轮 / ${E} 次迭代),以上为基于已完成操作的阶段性结果,任务可能未完成。回复「继续」或告诉我下一步重点,即可接着做。)`;
|
|
7134
7134
|
B("error", {
|
|
7135
7135
|
stage: "react_call_limit_exceeded",
|
|
7136
7136
|
rounds: x,
|
|
7137
|
-
maxToolRounds:
|
|
7137
|
+
maxToolRounds: P,
|
|
7138
7138
|
iterations: S,
|
|
7139
7139
|
maxIterations: E
|
|
7140
7140
|
}), n({
|
|
7141
7141
|
type: "error",
|
|
7142
|
-
message: `ReAct 循环达到调用上限(rounds=${x}/${
|
|
7142
|
+
message: `ReAct 循环达到调用上限(rounds=${x}/${P},iterations=${S}/${E}),已强制收口,可回复「继续」。`,
|
|
7143
7143
|
severity: "observable",
|
|
7144
7144
|
code: "REACT_CALL_LIMIT_EXCEEDED",
|
|
7145
7145
|
context: {
|
|
7146
7146
|
rounds: x,
|
|
7147
|
-
maxToolRounds:
|
|
7147
|
+
maxToolRounds: P,
|
|
7148
7148
|
iterations: S,
|
|
7149
7149
|
maxIterations: E
|
|
7150
7150
|
}
|
|
7151
7151
|
});
|
|
7152
7152
|
let ee = Gf(U.todos ?? [], g, z);
|
|
7153
7153
|
if (ee.length) {
|
|
7154
|
-
|
|
7154
|
+
de.evidence_audit_gate.exhausted += 1;
|
|
7155
7155
|
let e = ee.map((e) => ({
|
|
7156
7156
|
id: e.id,
|
|
7157
7157
|
evidence: e.evidence
|
|
@@ -7215,11 +7215,11 @@ function yp(e) {
|
|
|
7215
7215
|
}), e + M;
|
|
7216
7216
|
}
|
|
7217
7217
|
}
|
|
7218
|
-
let
|
|
7218
|
+
let ne = "我已完成本轮能做的操作,但未能综合出最终结论。请基于上方已完成的工具操作结果继续,或告诉我下一步重点。";
|
|
7219
7219
|
return n({
|
|
7220
7220
|
type: "done",
|
|
7221
|
-
content:
|
|
7222
|
-
}),
|
|
7221
|
+
content: ne + M
|
|
7222
|
+
}), ne + M;
|
|
7223
7223
|
} finally {
|
|
7224
7224
|
try {
|
|
7225
7225
|
await Qf(h, U);
|
|
@@ -7248,19 +7248,19 @@ function yp(e) {
|
|
|
7248
7248
|
get allTools() {
|
|
7249
7249
|
return he;
|
|
7250
7250
|
},
|
|
7251
|
-
getStaleReadsInvalidated: () =>
|
|
7251
|
+
getStaleReadsInvalidated: () => L,
|
|
7252
7252
|
getLlmRetries: () => pe,
|
|
7253
7253
|
getLlmCallFailures: () => me,
|
|
7254
|
-
getGateStats: () =>
|
|
7255
|
-
getLastSystemSegments: () =>
|
|
7254
|
+
getGateStats: () => de,
|
|
7255
|
+
getLastSystemSegments: () => R,
|
|
7256
7256
|
resetSessionCounters: () => {
|
|
7257
|
-
|
|
7258
|
-
for (let e of Object.keys(
|
|
7257
|
+
L = 0, pe = 0, me = 0;
|
|
7258
|
+
for (let e of Object.keys(de)) de[e] = ue();
|
|
7259
7259
|
},
|
|
7260
7260
|
setTools: je,
|
|
7261
7261
|
setLlm: Me,
|
|
7262
|
-
setModelCaps:
|
|
7263
|
-
debugLogs:
|
|
7262
|
+
setModelCaps: le,
|
|
7263
|
+
debugLogs: I,
|
|
7264
7264
|
getEffectiveSystemPrompt: () => xe()
|
|
7265
7265
|
};
|
|
7266
7266
|
}
|
|
@@ -8967,7 +8967,7 @@ async function Kh(e, t, n, r, i, a) {
|
|
|
8967
8967
|
} : { contextWindow: g.contextWindow }), v = t.onUsage ? {
|
|
8968
8968
|
name: "sub-usage",
|
|
8969
8969
|
afterModel: (e) => {
|
|
8970
|
-
let n =
|
|
8970
|
+
let n = se(e.message);
|
|
8971
8971
|
n && t.onUsage(n);
|
|
8972
8972
|
}
|
|
8973
8973
|
} : void 0;
|
|
@@ -8992,7 +8992,7 @@ async function Kh(e, t, n, r, i, a) {
|
|
|
8992
8992
|
});
|
|
8993
8993
|
}
|
|
8994
8994
|
let b;
|
|
8995
|
-
!Oh(y) && y.provider === "anthropic" && (b = await
|
|
8995
|
+
!Oh(y) && y.provider === "anthropic" && (b = await F({
|
|
8996
8996
|
...y,
|
|
8997
8997
|
model: e.model ?? y.model
|
|
8998
8998
|
}, {
|
|
@@ -11825,32 +11825,32 @@ function rv(e, n = {}) {
|
|
|
11825
11825
|
let N = (e) => {
|
|
11826
11826
|
let t = k();
|
|
11827
11827
|
return T(t, e), t;
|
|
11828
|
-
}, te = n.largeTextThreshold ?? 200,
|
|
11828
|
+
}, te = n.largeTextThreshold ?? 200, ne = (n.largeTextPaths ?? []).map((e) => {
|
|
11829
11829
|
let t = e.lastIndexOf(".");
|
|
11830
11830
|
return t > 0 ? {
|
|
11831
11831
|
arrayPath: e.slice(0, t),
|
|
11832
11832
|
field: e.slice(t + 1)
|
|
11833
11833
|
} : null;
|
|
11834
|
-
}).filter((e) => e !== null),
|
|
11835
|
-
function
|
|
11836
|
-
|
|
11834
|
+
}).filter((e) => e !== null), P = !0;
|
|
11835
|
+
function F() {
|
|
11836
|
+
P = !0;
|
|
11837
11837
|
}
|
|
11838
|
-
let
|
|
11838
|
+
let re = {
|
|
11839
11839
|
get: () => ({
|
|
11840
11840
|
schema: o,
|
|
11841
11841
|
bind: c,
|
|
11842
11842
|
description: u
|
|
11843
11843
|
}),
|
|
11844
11844
|
set: (e) => {
|
|
11845
|
-
o = r.length ? Jp(e.schema, r).schema : e.schema, c = e.bind, u = e.description ?? "主数据对象", d = bp(o), g.length = 0, v.clear(), m(e.resources), p?.clear(),
|
|
11845
|
+
o = r.length ? Jp(e.schema, r).schema : e.schema, c = e.bind, u = e.description ?? "主数据对象", d = bp(o), g.length = 0, v.clear(), m(e.resources), p?.clear(), F();
|
|
11846
11846
|
},
|
|
11847
11847
|
update: (e) => {
|
|
11848
|
-
c = e, g.length = 0, v.clear(),
|
|
11848
|
+
c = e, g.length = 0, v.clear(), F();
|
|
11849
11849
|
},
|
|
11850
|
-
markDataDirty:
|
|
11850
|
+
markDataDirty: F,
|
|
11851
11851
|
consumeDataDirty: () => {
|
|
11852
|
-
let e =
|
|
11853
|
-
return
|
|
11852
|
+
let e = P;
|
|
11853
|
+
return P = !1, e;
|
|
11854
11854
|
},
|
|
11855
11855
|
enterScope: (e) => {
|
|
11856
11856
|
let t = y;
|
|
@@ -11904,14 +11904,14 @@ function rv(e, n = {}) {
|
|
|
11904
11904
|
} : void 0,
|
|
11905
11905
|
updateResource: p ? (e, t) => {
|
|
11906
11906
|
let n = T_(e);
|
|
11907
|
-
p.update(n, t), mm(c, n, t),
|
|
11907
|
+
p.update(n, t), mm(c, n, t), F(), T(k(), "");
|
|
11908
11908
|
} : void 0,
|
|
11909
11909
|
deleteResource: p ? (e) => p.delete(e) : void 0,
|
|
11910
11910
|
listResources: p ? () => p.list() : void 0
|
|
11911
|
-
},
|
|
11911
|
+
}, ie = (e) => {
|
|
11912
11912
|
n.onAudit?.(e);
|
|
11913
11913
|
};
|
|
11914
|
-
function
|
|
11914
|
+
function ae(e, t) {
|
|
11915
11915
|
let n = gm(l()), r = g.length ? g[g.length - 1].id + 1 : 1;
|
|
11916
11916
|
for (g.push({
|
|
11917
11917
|
id: r,
|
|
@@ -11922,7 +11922,7 @@ function rv(e, n = {}) {
|
|
|
11922
11922
|
}); g.length > _;) g.shift();
|
|
11923
11923
|
return r;
|
|
11924
11924
|
}
|
|
11925
|
-
async function
|
|
11925
|
+
async function oe(e, t, r, i, a) {
|
|
11926
11926
|
if (!t || t === "") return null;
|
|
11927
11927
|
let o = k();
|
|
11928
11928
|
if (o === t) return null;
|
|
@@ -11944,7 +11944,7 @@ function rv(e, n = {}) {
|
|
|
11944
11944
|
if (u.action === "restore") {
|
|
11945
11945
|
await i?.reacquire();
|
|
11946
11946
|
let e = k();
|
|
11947
|
-
if (e !== o) return
|
|
11947
|
+
if (e !== o) return ie({
|
|
11948
11948
|
op: "conflict_recheck",
|
|
11949
11949
|
detail: `restore 裁决基于 ${o} 恢复时 ${e}(ask 窗口新修改落地,回退被拦)`,
|
|
11950
11950
|
timestamp: Date.now()
|
|
@@ -11960,13 +11960,13 @@ function rv(e, n = {}) {
|
|
|
11960
11960
|
message: `restore 裁决所锚定的快照 #${s} 已不在快照栈(可能被 maxSnapshots 淘汰)`,
|
|
11961
11961
|
hint: "重新 read 拿最新值,或用 restore_data 显式指定快照 id 回退"
|
|
11962
11962
|
});
|
|
11963
|
-
km(c, gm(t.value)),
|
|
11963
|
+
km(c, gm(t.value)), F();
|
|
11964
11964
|
let n = k();
|
|
11965
11965
|
return T(n, a), `已回退主数据到历史快照 #${t.id}[${t.op}]。当前值:${xm(l(), 400)} (hash=${n})。请基于回退后的值重写或停止。`;
|
|
11966
11966
|
}
|
|
11967
11967
|
await i?.reacquire();
|
|
11968
11968
|
let d = k();
|
|
11969
|
-
return d === o ? (T(d, a), null) : (
|
|
11969
|
+
return d === o ? (T(d, a), null) : (ie({
|
|
11970
11970
|
op: "conflict_recheck",
|
|
11971
11971
|
detail: `裁决基于 ${o} 恢复时 ${d}(ask 窗口新修改落地,overwrite 被拦)`,
|
|
11972
11972
|
timestamp: Date.now()
|
|
@@ -11976,9 +11976,9 @@ function rv(e, n = {}) {
|
|
|
11976
11976
|
hint: "重新 read 拿最新值与 hash,基于最新值修改后再写入(单次校验,不再二次挂起)。"
|
|
11977
11977
|
}));
|
|
11978
11978
|
}
|
|
11979
|
-
let
|
|
11979
|
+
let se = (e, t = !0) => {
|
|
11980
11980
|
e.writeCapable = t;
|
|
11981
|
-
},
|
|
11981
|
+
}, ce = s(async ({ id: e }, t) => {
|
|
11982
11982
|
let n = b(t), r = await ee();
|
|
11983
11983
|
try {
|
|
11984
11984
|
if (!g.length) return $({
|
|
@@ -11993,7 +11993,7 @@ function rv(e, n = {}) {
|
|
|
11993
11993
|
hint: "用 history_data({list:true}) 查看可用快照序号"
|
|
11994
11994
|
});
|
|
11995
11995
|
let r = o.safeParse(t.value);
|
|
11996
|
-
r.success ||
|
|
11996
|
+
r.success || ie({
|
|
11997
11997
|
op: "restore",
|
|
11998
11998
|
detail: `#${t.id} 快照含当前 schema 违例 ${r.error.issues.length} 处(历史既有数据非本次写入,放行回退)`,
|
|
11999
11999
|
timestamp: Date.now()
|
|
@@ -12006,7 +12006,7 @@ function rv(e, n = {}) {
|
|
|
12006
12006
|
cur: n
|
|
12007
12007
|
});
|
|
12008
12008
|
}
|
|
12009
|
-
if (!i.length) return km(c, gm(t.value)),
|
|
12009
|
+
if (!i.length) return km(c, gm(t.value)), F(), ie({
|
|
12010
12010
|
op: "restore",
|
|
12011
12011
|
detail: `#${t.id}`,
|
|
12012
12012
|
timestamp: Date.now()
|
|
@@ -12039,7 +12039,7 @@ function rv(e, n = {}) {
|
|
|
12039
12039
|
}
|
|
12040
12040
|
e.val === void 0 ? l.push(e.p) : mm(c, n, e.val), s.push(e.p);
|
|
12041
12041
|
}
|
|
12042
|
-
|
|
12042
|
+
F(), ie({
|
|
12043
12043
|
op: "restore",
|
|
12044
12044
|
detail: `#${t.id}(保护字段保留 ${s.length}${l.length ? `,未能回填 ${l.length}` : ""})`,
|
|
12045
12045
|
timestamp: Date.now()
|
|
@@ -12054,8 +12054,8 @@ function rv(e, n = {}) {
|
|
|
12054
12054
|
description: "把主数据回退到某个快照(不传 id 回退最近一次)。快照列表用 history_data({list:true})。",
|
|
12055
12055
|
schema: t.object({ id: t.number().int().optional().describe("快照序号;不传回退最近一次") })
|
|
12056
12056
|
});
|
|
12057
|
-
|
|
12058
|
-
let
|
|
12057
|
+
se(ce);
|
|
12058
|
+
let le = s(async ({ id: e, jsonPath: t, list: n }) => {
|
|
12059
12059
|
if (n) {
|
|
12060
12060
|
if (!g.length) return "无快照。set/edit/delete 会自动存快照。";
|
|
12061
12061
|
let e = g.map((e) => {
|
|
@@ -12100,7 +12100,7 @@ function rv(e, n = {}) {
|
|
|
12100
12100
|
jsonPath: t.string().optional().describe("只看快照的某子路径"),
|
|
12101
12101
|
list: t.boolean().optional().describe("true 列出快照时间线(序号/操作/标签/时间/大小)")
|
|
12102
12102
|
})
|
|
12103
|
-
}),
|
|
12103
|
+
}), I = s(async ({ expr: e, queries: t, limit: n }, r) => {
|
|
12104
12104
|
let i = b(r);
|
|
12105
12105
|
if (typeof c != "object" || !c) return $({
|
|
12106
12106
|
code: "NOT_OBJECT",
|
|
@@ -12119,7 +12119,7 @@ function rv(e, n = {}) {
|
|
|
12119
12119
|
details: { expr: e }
|
|
12120
12120
|
});
|
|
12121
12121
|
}
|
|
12122
|
-
let r = n ?? 50, o = t.slice(0, r), c = o.map((e) => `{"path":${JSON.stringify(e.path)},"index":${e.index === void 0 ? "null" : e.index},"value":${xm(Q_(e.value, i === "",
|
|
12122
|
+
let r = n ?? 50, o = t.slice(0, r), c = o.map((e) => `{"path":${JSON.stringify(e.path)},"index":${e.index === void 0 ? "null" : e.index},"value":${xm(Q_(e.value, i === "", ne, te, {
|
|
12123
12123
|
rootExempt: !1,
|
|
12124
12124
|
rootPath: String(e.path ?? ""),
|
|
12125
12125
|
fullTextPrefixes: s,
|
|
@@ -12143,7 +12143,7 @@ function rv(e, n = {}) {
|
|
|
12143
12143
|
queries: t.array(t.string()).min(2).max(10).optional().describe("批量模式:2-10 条 JSONPath 一次取回(与 expr 同传按 queries);逐条独立返回,单条失败该项标 error 不整批"),
|
|
12144
12144
|
limit: t.number().int().min(1).max(200).optional().describe("返回结果上限(批量时逐条适用),默认 50")
|
|
12145
12145
|
})
|
|
12146
|
-
}),
|
|
12146
|
+
}), L = s(async ({ query: e, mode: t, fuzzyThreshold: n, matchKey: r, limit: i }) => {
|
|
12147
12147
|
if (c == null) return $({
|
|
12148
12148
|
code: "EMPTY",
|
|
12149
12149
|
message: "主数据为空,无可搜索内容"
|
|
@@ -12181,7 +12181,7 @@ function rv(e, n = {}) {
|
|
|
12181
12181
|
matchKey: t.boolean().optional().describe("是否同时匹配 key 名,默认 true"),
|
|
12182
12182
|
limit: t.number().int().min(1).max(200).optional().describe("返回上限,默认 50")
|
|
12183
12183
|
})
|
|
12184
|
-
}),
|
|
12184
|
+
}), ue = s(async ({ script: e, mode: t, jsonPath: n }, r) => {
|
|
12185
12185
|
let s = b(r);
|
|
12186
12186
|
if (e.length > 8e3) return $({
|
|
12187
12187
|
code: "SCRIPT_TOO_LARGE",
|
|
@@ -12224,7 +12224,7 @@ function rv(e, n = {}) {
|
|
|
12224
12224
|
if (u) {
|
|
12225
12225
|
let e = await ee();
|
|
12226
12226
|
try {
|
|
12227
|
-
let n = await
|
|
12227
|
+
let n = await oe("edit", O ? w(s) : void 0, void 0, e, s);
|
|
12228
12228
|
if (n !== null) return n;
|
|
12229
12229
|
let r = K_({
|
|
12230
12230
|
bindRef: c,
|
|
@@ -12237,13 +12237,13 @@ function rv(e, n = {}) {
|
|
|
12237
12237
|
allowKeys: d,
|
|
12238
12238
|
snapshots: g,
|
|
12239
12239
|
maxSnapshots: _,
|
|
12240
|
-
markDataDirty:
|
|
12240
|
+
markDataDirty: F,
|
|
12241
12241
|
schemaErrorMode: "schema_invalid",
|
|
12242
12242
|
snapshotLabel: "eval_transform_subtree",
|
|
12243
12243
|
internalAfterWrite: a,
|
|
12244
12244
|
protectedCtx: h
|
|
12245
12245
|
});
|
|
12246
|
-
return r.ok ? (
|
|
12246
|
+
return r.ok ? (ie({
|
|
12247
12247
|
op: "edit",
|
|
12248
12248
|
detail: `eval_transform_subtree @ ${u}`,
|
|
12249
12249
|
timestamp: Date.now()
|
|
@@ -12260,7 +12260,7 @@ function rv(e, n = {}) {
|
|
|
12260
12260
|
});
|
|
12261
12261
|
let e = await ee();
|
|
12262
12262
|
try {
|
|
12263
|
-
let n = await
|
|
12263
|
+
let n = await oe("edit", O ? w(s) : void 0, void 0, e, s);
|
|
12264
12264
|
if (n !== null) return n;
|
|
12265
12265
|
let r = K_({
|
|
12266
12266
|
bindRef: c,
|
|
@@ -12269,13 +12269,13 @@ function rv(e, n = {}) {
|
|
|
12269
12269
|
allowKeys: d,
|
|
12270
12270
|
snapshots: g,
|
|
12271
12271
|
maxSnapshots: _,
|
|
12272
|
-
markDataDirty:
|
|
12272
|
+
markDataDirty: F,
|
|
12273
12273
|
schemaErrorMode: "schema_invalid",
|
|
12274
12274
|
snapshotLabel: "eval_transform",
|
|
12275
12275
|
internalAfterWrite: a,
|
|
12276
12276
|
protectedCtx: h
|
|
12277
12277
|
});
|
|
12278
|
-
return r.ok ? (
|
|
12278
|
+
return r.ok ? (ie({
|
|
12279
12279
|
op: "edit",
|
|
12280
12280
|
detail: `eval_transform(${r.applied.length} patches)`,
|
|
12281
12281
|
timestamp: Date.now()
|
|
@@ -12301,7 +12301,7 @@ function rv(e, n = {}) {
|
|
|
12301
12301
|
});
|
|
12302
12302
|
let i = await ee();
|
|
12303
12303
|
try {
|
|
12304
|
-
let e = await
|
|
12304
|
+
let e = await oe("set", O ? w(s) : void 0, n, i, s);
|
|
12305
12305
|
if (e !== null) return e;
|
|
12306
12306
|
let t = a ? gm(l()) : null, r = U_({
|
|
12307
12307
|
schema: o,
|
|
@@ -12309,7 +12309,7 @@ function rv(e, n = {}) {
|
|
|
12309
12309
|
value: n,
|
|
12310
12310
|
bindRef: c
|
|
12311
12311
|
});
|
|
12312
|
-
return r.ok ? (
|
|
12312
|
+
return r.ok ? (ae("edit", "eval_transform"), r.wholeParsed ? Am(c, r.assembly) : r.assembly !== null && typeof r.assembly == "object" && fm(c, r.assembly), F(), a && (a(c, t), F()), ie({
|
|
12313
12313
|
op: "edit",
|
|
12314
12314
|
detail: "eval_transform",
|
|
12315
12315
|
timestamp: Date.now()
|
|
@@ -12337,8 +12337,8 @@ function rv(e, n = {}) {
|
|
|
12337
12337
|
jsonPath: t.string().optional().describe("子树模式:仅对该子树执行;transform 返回值作为子树新值")
|
|
12338
12338
|
})
|
|
12339
12339
|
});
|
|
12340
|
-
|
|
12341
|
-
let
|
|
12340
|
+
se(ue, (e) => e?.mode === "transform");
|
|
12341
|
+
let de = s(async ({ jsonPath: e, jsonPaths: t, fields: n, depth: r, offset: i, limit: a }, s) => {
|
|
12342
12342
|
let c = b(s), f = x(s), p = l(), m, g = () => m ??= k();
|
|
12343
12343
|
if (t && t.length) {
|
|
12344
12344
|
let e = !1, i = t.map((t) => {
|
|
@@ -12357,7 +12357,7 @@ function rv(e, n = {}) {
|
|
|
12357
12357
|
resolved: s,
|
|
12358
12358
|
resourcesByPath: h.resourcesByPath,
|
|
12359
12359
|
resourceStore: h.resourceStore
|
|
12360
|
-
})), n && n.length && (s = ym(s, n)), r != null && (s = bm(s, r)), s = Q_(s, c === "",
|
|
12360
|
+
})), n && n.length && (s = ym(s, n)), r != null && (s = bm(s, r)), s = Q_(s, c === "", ne, te, {
|
|
12361
12361
|
rootExempt: !0,
|
|
12362
12362
|
rootPath: i,
|
|
12363
12363
|
fullTextPrefixes: f,
|
|
@@ -12405,7 +12405,7 @@ function rv(e, n = {}) {
|
|
|
12405
12405
|
resolved: S,
|
|
12406
12406
|
resourcesByPath: h.resourcesByPath,
|
|
12407
12407
|
resourceStore: h.resourceStore
|
|
12408
|
-
})), T(g(), c), n && n.length && (S = ym(S, n)), r != null && (S = bm(S, r)), S = Q_(S, c === "",
|
|
12408
|
+
})), T(g(), c), n && n.length && (S = ym(S, n)), r != null && (S = bm(S, r)), S = Q_(S, c === "", ne, te, {
|
|
12409
12409
|
rootExempt: !0,
|
|
12410
12410
|
rootPath: _,
|
|
12411
12411
|
fullTextPrefixes: f,
|
|
@@ -12428,7 +12428,7 @@ function rv(e, n = {}) {
|
|
|
12428
12428
|
offset: t.number().int().min(0).optional().describe("数组分页起始偏移(仅数组目标,默认 0)"),
|
|
12429
12429
|
limit: t.number().int().min(1).max(200).optional().describe("数组分页每页条数(默认 50,上限 200),返回切片+total/hasMore")
|
|
12430
12430
|
})
|
|
12431
|
-
}),
|
|
12431
|
+
}), fe = s(async ({ value: e, patch: t, patches: n, del: i, dryRun: s }, u) => {
|
|
12432
12432
|
let f = b(u), p = "set";
|
|
12433
12433
|
i ? p = "delete" : (n && n.length || t) && (p = "edit");
|
|
12434
12434
|
let m = t?.value === void 0 ? e : t.value, v = await ee();
|
|
@@ -12466,19 +12466,19 @@ function rv(e, n = {}) {
|
|
|
12466
12466
|
hint: e.spec.mode === "freeze" ? "冻结字段不可删" : "verbatim 字段不可直接删;先 resource_delete 释放"
|
|
12467
12467
|
});
|
|
12468
12468
|
}
|
|
12469
|
-
let n = await
|
|
12469
|
+
let n = await oe("delete", e, void 0, v, f);
|
|
12470
12470
|
if (n !== null) return n;
|
|
12471
12471
|
if (s) {
|
|
12472
12472
|
let e = gm(l());
|
|
12473
12473
|
return hm(e, t.jsonPath) ? `dryRun(delete): 将删除 @ ${t.jsonPath}。预览剩余:${xm(e, 600)}。未实际写入、未入快照。` : `dryRun(delete): @ ${t.jsonPath} 不存在(无需删除)。未实际写入。`;
|
|
12474
12474
|
}
|
|
12475
|
-
|
|
12475
|
+
ae("delete");
|
|
12476
12476
|
let r = hm(c, t.jsonPath);
|
|
12477
|
-
return
|
|
12477
|
+
return F(), ie({
|
|
12478
12478
|
op: "delete",
|
|
12479
12479
|
detail: t.jsonPath,
|
|
12480
12480
|
timestamp: Date.now()
|
|
12481
|
-
}), a && (a(c, null),
|
|
12481
|
+
}), a && (a(c, null), F()), T(k(), f), r ? `已删除主数据 @ ${t.jsonPath}` : `主数据 @ ${t.jsonPath} 不存在(无需删除)`;
|
|
12482
12482
|
}
|
|
12483
12483
|
if (p === "edit") {
|
|
12484
12484
|
if (typeof c != "object" || !c) return $({
|
|
@@ -12486,7 +12486,7 @@ function rv(e, n = {}) {
|
|
|
12486
12486
|
message: `edit 仅适用于对象/数组主数据,当前是 ${c === void 0 ? "undefined" : typeof c}`,
|
|
12487
12487
|
hint: "叶子用 write(value) 整体设置"
|
|
12488
12488
|
});
|
|
12489
|
-
let r = await
|
|
12489
|
+
let r = await oe("edit", e, void 0, v, f);
|
|
12490
12490
|
if (r !== null) return r;
|
|
12491
12491
|
let i = n && n.length ? n : [{
|
|
12492
12492
|
op: t.op ?? "set",
|
|
@@ -12499,7 +12499,7 @@ function rv(e, n = {}) {
|
|
|
12499
12499
|
allowKeys: d,
|
|
12500
12500
|
snapshots: g,
|
|
12501
12501
|
maxSnapshots: _,
|
|
12502
|
-
markDataDirty:
|
|
12502
|
+
markDataDirty: F,
|
|
12503
12503
|
schemaErrorMode: "zod",
|
|
12504
12504
|
dryRun: s,
|
|
12505
12505
|
internalAfterWrite: a,
|
|
@@ -12507,7 +12507,7 @@ function rv(e, n = {}) {
|
|
|
12507
12507
|
});
|
|
12508
12508
|
if (!l.ok) return l.error;
|
|
12509
12509
|
if (s) return `dryRun(edit): ${l.applied.length} 个 patch 预检通过(schema 校验 OK)。预览结果:${xm(l.clone, 600)}。未实际写入、未入快照。`;
|
|
12510
|
-
|
|
12510
|
+
ie({
|
|
12511
12511
|
op: "edit",
|
|
12512
12512
|
detail: `${l.applied.length} 个 patch${l.applied.length > 1 ? "(批量)" : ""}`,
|
|
12513
12513
|
value: l.applied.map((e) => `${e.op}@${e.jp}`),
|
|
@@ -12518,7 +12518,7 @@ function rv(e, n = {}) {
|
|
|
12518
12518
|
}
|
|
12519
12519
|
let i = vm(m);
|
|
12520
12520
|
if (i.parseError) return Jl("", m, i.parseError);
|
|
12521
|
-
let u = await
|
|
12521
|
+
let u = await oe("set", e, m, v, f);
|
|
12522
12522
|
if (u !== null) return u;
|
|
12523
12523
|
let y = G_({
|
|
12524
12524
|
bindRef: c,
|
|
@@ -12527,9 +12527,9 @@ function rv(e, n = {}) {
|
|
|
12527
12527
|
allowKeys: d,
|
|
12528
12528
|
snapshots: g,
|
|
12529
12529
|
maxSnapshots: _,
|
|
12530
|
-
audit:
|
|
12530
|
+
audit: ie,
|
|
12531
12531
|
dryRun: s,
|
|
12532
|
-
onWrite:
|
|
12532
|
+
onWrite: F,
|
|
12533
12533
|
internalAfterWrite: a,
|
|
12534
12534
|
protectedCtx: h,
|
|
12535
12535
|
hashFn: k
|
|
@@ -12574,8 +12574,8 @@ function rv(e, n = {}) {
|
|
|
12574
12574
|
dryRun: t.boolean().optional().describe("预检:走完整校验链但不落盘不入快照;冲突返回 VERSION_CONFLICT 不挂起")
|
|
12575
12575
|
})
|
|
12576
12576
|
});
|
|
12577
|
-
|
|
12578
|
-
let
|
|
12577
|
+
se(fe);
|
|
12578
|
+
let R = s(async ({ jsonPath: e }) => {
|
|
12579
12579
|
let t = e || "", n = t ? Cp(o, t) : o;
|
|
12580
12580
|
return n ? `schema${t ? ` @ ${t}` : ""} = ${xm(Up(n))}` : $({
|
|
12581
12581
|
code: "PATH_DENIED",
|
|
@@ -12661,7 +12661,7 @@ function rv(e, n = {}) {
|
|
|
12661
12661
|
}
|
|
12662
12662
|
let f = await ee();
|
|
12663
12663
|
try {
|
|
12664
|
-
let n = await
|
|
12664
|
+
let n = await oe("set", O ? w(i) : void 0, u, f, i);
|
|
12665
12665
|
if (n !== null) return n;
|
|
12666
12666
|
let r = G_({
|
|
12667
12667
|
bindRef: c,
|
|
@@ -12670,9 +12670,9 @@ function rv(e, n = {}) {
|
|
|
12670
12670
|
allowKeys: d,
|
|
12671
12671
|
snapshots: g,
|
|
12672
12672
|
maxSnapshots: _,
|
|
12673
|
-
audit:
|
|
12673
|
+
audit: ie,
|
|
12674
12674
|
op: "draft_commit",
|
|
12675
|
-
onWrite:
|
|
12675
|
+
onWrite: F,
|
|
12676
12676
|
internalAfterWrite: a,
|
|
12677
12677
|
protectedCtx: h,
|
|
12678
12678
|
hashFn: k
|
|
@@ -12686,7 +12686,7 @@ function rv(e, n = {}) {
|
|
|
12686
12686
|
description: "把 draft_write 累积的草稿合并 + JSON.parse + 乐观锁 + schema 校验,原子提交主数据(任一步失败不写,草稿保留可修后重试;成功清草稿 + 自动快照可回退)。仅大 JSON 从零生成用;小改用 write。",
|
|
12687
12687
|
schema: t.object({ draftId: t.string().describe("要提交的草稿标识(对应 draft_write 的 draftId)") })
|
|
12688
12688
|
});
|
|
12689
|
-
|
|
12689
|
+
se(l), me.push(i, l);
|
|
12690
12690
|
}
|
|
12691
12691
|
let z = [];
|
|
12692
12692
|
if (e.resources?.length && p) {
|
|
@@ -12760,7 +12760,7 @@ function rv(e, n = {}) {
|
|
|
12760
12760
|
}
|
|
12761
12761
|
let l = await ee();
|
|
12762
12762
|
try {
|
|
12763
|
-
p.update(i, t), mm(c, i, t), T(k(), r),
|
|
12763
|
+
p.update(i, t), mm(c, i, t), T(k(), r), F();
|
|
12764
12764
|
} finally {
|
|
12765
12765
|
l.release();
|
|
12766
12766
|
}
|
|
@@ -12774,7 +12774,7 @@ function rv(e, n = {}) {
|
|
|
12774
12774
|
value: t.unknown().describe("新值(需符合字段 schema 类型)")
|
|
12775
12775
|
})
|
|
12776
12776
|
});
|
|
12777
|
-
|
|
12777
|
+
se(n);
|
|
12778
12778
|
let r = s(async () => {
|
|
12779
12779
|
let e = p.list();
|
|
12780
12780
|
if (!e.length) {
|
|
@@ -12805,17 +12805,17 @@ function rv(e, n = {}) {
|
|
|
12805
12805
|
handle: t.string().optional().describe("占位符句柄(与 path 二选一)")
|
|
12806
12806
|
})
|
|
12807
12807
|
});
|
|
12808
|
-
|
|
12808
|
+
se(i), z.push(e, n, r, i);
|
|
12809
12809
|
}
|
|
12810
12810
|
let B = [
|
|
12811
|
-
se,
|
|
12812
12811
|
ce,
|
|
12813
|
-
L,
|
|
12814
|
-
R,
|
|
12815
12812
|
le,
|
|
12813
|
+
I,
|
|
12814
|
+
L,
|
|
12816
12815
|
ue,
|
|
12817
12816
|
de,
|
|
12818
12817
|
fe,
|
|
12818
|
+
R,
|
|
12819
12819
|
pe,
|
|
12820
12820
|
...me,
|
|
12821
12821
|
...z
|
|
@@ -12915,7 +12915,7 @@ function rv(e, n = {}) {
|
|
|
12915
12915
|
};
|
|
12916
12916
|
}
|
|
12917
12917
|
Object.defineProperty(B, "controller", {
|
|
12918
|
-
value:
|
|
12918
|
+
value: re,
|
|
12919
12919
|
enumerable: !1,
|
|
12920
12920
|
configurable: !1,
|
|
12921
12921
|
writable: !1
|
|
@@ -14367,7 +14367,7 @@ function gy(e) {
|
|
|
14367
14367
|
function _y(e) {
|
|
14368
14368
|
if (!e) return e;
|
|
14369
14369
|
let t = e;
|
|
14370
|
-
return t.__pgAnthropicShaped || t._llmType?.() !== "chat-anthropic" ? e : (t.__pgAnthropicShaped = !0,
|
|
14370
|
+
return t.__pgAnthropicShaped || t._llmType?.() !== "chat-anthropic" ? e : (t.__pgAnthropicShaped = !0, P(e));
|
|
14371
14371
|
}
|
|
14372
14372
|
function vy(e) {
|
|
14373
14373
|
return !!e && typeof e == "object" && typeof e.invoke == "function" && typeof e.stream == "function";
|
|
@@ -14405,7 +14405,7 @@ function Sy(e) {
|
|
|
14405
14405
|
return async (e) => {
|
|
14406
14406
|
let t = new AbortController(), s = setTimeout(() => t.abort(), o);
|
|
14407
14407
|
try {
|
|
14408
|
-
return !l && c && (l = await
|
|
14408
|
+
return !l && c && (l = await F(c, {
|
|
14409
14409
|
temperature: n,
|
|
14410
14410
|
maxTokens: r,
|
|
14411
14411
|
thinkingFallback: "simple"
|
|
@@ -14424,7 +14424,7 @@ function Cy(e) {
|
|
|
14424
14424
|
return async (t) => {
|
|
14425
14425
|
let n = t.filter((e) => e.role === "user" || e.role === "assistant").map((e) => `${e.role === "user" ? "用户" : "助手"}: ${e.content}`).join("\n").slice(0, 800), s = new AbortController(), c = setTimeout(() => s.abort(), 1e4);
|
|
14426
14426
|
try {
|
|
14427
|
-
!o && r && (o = await
|
|
14427
|
+
!o && r && (o = await F(r, {
|
|
14428
14428
|
temperature: 0,
|
|
14429
14429
|
maxTokens: 30,
|
|
14430
14430
|
thinkingFallback: "simple"
|
|
@@ -14490,7 +14490,7 @@ function Oy(e) {
|
|
|
14490
14490
|
return async (e) => {
|
|
14491
14491
|
let t = new AbortController(), n = setTimeout(() => t.abort(), o);
|
|
14492
14492
|
try {
|
|
14493
|
-
!c && r && (c = await
|
|
14493
|
+
!c && r && (c = await F(r, {
|
|
14494
14494
|
temperature: 0,
|
|
14495
14495
|
maxTokens: s,
|
|
14496
14496
|
thinkingFallback: "simple"
|
|
@@ -17540,7 +17540,7 @@ function RC(e, t, n, r) {
|
|
|
17540
17540
|
}), i;
|
|
17541
17541
|
},
|
|
17542
17542
|
afterModel: (t) => {
|
|
17543
|
-
let n =
|
|
17543
|
+
let n = se(t.message);
|
|
17544
17544
|
n && (r.prompt_tokens = (r.prompt_tokens ?? 0) + (n.prompt_tokens ?? 0), r.completion_tokens = (r.completion_tokens ?? 0) + (n.completion_tokens ?? 0), r.total_tokens = (r.total_tokens ?? 0) + (n.total_tokens ?? 0), n.reasoning_tokens && (r.reasoning_tokens = (r.reasoning_tokens ?? 0) + n.reasoning_tokens), i++, e({
|
|
17545
17545
|
type: "usage",
|
|
17546
17546
|
round: i,
|
|
@@ -17584,7 +17584,7 @@ function BC(e, n, r) {
|
|
|
17584
17584
|
prompt_tokens: 0,
|
|
17585
17585
|
completion_tokens: 0,
|
|
17586
17586
|
total_tokens: 0
|
|
17587
|
-
}, o = Ay(() =>
|
|
17587
|
+
}, o = Ay(() => Jt, () => e.conflictPolicy ?? "ask", () => G.agent?.debugLogs?.value), c = /* @__PURE__ */ Rn(0), l = ab(e.storage);
|
|
17588
17588
|
l && (e.debug && l.onEvent((e) => console.log("[page-agent-sdk][storage]", e)), l.onEvent((e) => {
|
|
17589
17589
|
e.type === "quota" && G.agent?.debugLogs?.value?.push({
|
|
17590
17590
|
timestamp: Date.now(),
|
|
@@ -17606,7 +17606,7 @@ function BC(e, n, r) {
|
|
|
17606
17606
|
e.debug && !d && console.warn("[page-agent-sdk][summarization] 未构造 llmInvoke(apiKey 缺失?),摘要回退零成本索引摘要");
|
|
17607
17607
|
let b = /* @__PURE__ */ wn([]), x = u_(e.vfs?.initialFiles, {
|
|
17608
17608
|
persist: l ? { save: (e) => {
|
|
17609
|
-
|
|
17609
|
+
bn.persistSave({ vfs: e });
|
|
17610
17610
|
} } : void 0,
|
|
17611
17611
|
maxBytes: e.vfs?.maxBytes,
|
|
17612
17612
|
poolBytes: e.vfs?.poolBytes
|
|
@@ -17626,7 +17626,7 @@ function BC(e, n, r) {
|
|
|
17626
17626
|
data: { stage: "resume_notice" }
|
|
17627
17627
|
});
|
|
17628
17628
|
}), A = _b(), j = e.approval?.timeoutMs, M = j !== void 0 && Number.isFinite(j) && j > 0 ? j : j !== void 0 && (!Number.isFinite(j) || j < 0) ? 0 : 3e4, ee = (e) => {
|
|
17629
|
-
|
|
17629
|
+
Jt({
|
|
17630
17630
|
type: "error",
|
|
17631
17631
|
message: `确认请求(${e.toolName})${Math.round(e.waitedMs / 1e3)}s 无响应已自动拒绝 —— 当前路径无 UI 响应方;可传 approval.timeoutMs 调整(Infinity = 无限等)`,
|
|
17632
17632
|
severity: "observable",
|
|
@@ -17634,7 +17634,7 @@ function BC(e, n, r) {
|
|
|
17634
17634
|
context: e
|
|
17635
17635
|
});
|
|
17636
17636
|
}, N = pg((e) => {
|
|
17637
|
-
A.lastPlanConfirmation = e,
|
|
17637
|
+
A.lastPlanConfirmation = e, bn.persistSave({ planConfirmation: e }), G.agent?.debugLogs?.value?.push({
|
|
17638
17638
|
timestamp: Date.now(),
|
|
17639
17639
|
type: "middleware",
|
|
17640
17640
|
data: {
|
|
@@ -17646,62 +17646,62 @@ function BC(e, n, r) {
|
|
|
17646
17646
|
}, {
|
|
17647
17647
|
timeoutMs: M,
|
|
17648
17648
|
onAutoReject: ee
|
|
17649
|
-
}),
|
|
17649
|
+
}), ne = Bm({
|
|
17650
17650
|
getSchema: () => Ce()?.schema,
|
|
17651
17651
|
getBind: () => Ce()?.bind,
|
|
17652
|
-
onChange: (e) =>
|
|
17652
|
+
onChange: (e) => Jt({
|
|
17653
17653
|
type: "focus_change",
|
|
17654
17654
|
focuses: e
|
|
17655
17655
|
})
|
|
17656
|
-
}),
|
|
17656
|
+
}), P = (e) => {
|
|
17657
17657
|
let t = Rm(Ce()?.bind, e.path);
|
|
17658
17658
|
return t ? {
|
|
17659
17659
|
...e,
|
|
17660
17660
|
pgId: t
|
|
17661
17661
|
} : e;
|
|
17662
|
-
},
|
|
17663
|
-
typeof e.memory == "function" &&
|
|
17664
|
-
let
|
|
17662
|
+
}, re = tg(), ie = ng(e.memory || "");
|
|
17663
|
+
typeof e.memory == "function" && ie.refresh();
|
|
17664
|
+
let ae = { current: null }, oe = e.data ? {
|
|
17665
17665
|
...e.data,
|
|
17666
17666
|
description: e.data.description ?? "主数据对象"
|
|
17667
|
-
} : void 0,
|
|
17668
|
-
|
|
17669
|
-
let
|
|
17670
|
-
for (let e of
|
|
17667
|
+
} : void 0, se = !(e.subagents ?? []).some((e) => e._codeAsset) && ub(e.capabilities).subagent, ce = e.subagents;
|
|
17668
|
+
se && oe?.schema && Fp(oe.schema).length && (ce = [...e.subagents ?? [], dy()], console.info("[page-agent-sdk] 检测到 schema 含代码组件数组(如 components[].code),已自动装配 HTML 代码子 agent(委派编排 + vfs 工作副本 + 格式校验 + 增量 commit)。需定制(codeField/formatCheck/craftNotes 等)请显式传 createHtmlSubagent(...)"));
|
|
17669
|
+
let le = (ce ?? []).filter((e) => !!e._codeAsset), I = /* @__PURE__ */ new Set();
|
|
17670
|
+
for (let e of le) {
|
|
17671
17671
|
if (e._codeAsset.writablePaths.length) continue;
|
|
17672
|
-
let t = Fp(
|
|
17673
|
-
t.length ? (e._codeAsset.writablePaths = t, Array.isArray(e.writablePaths) && (e.writablePaths = t), e._rebuildCodeAssetPaths?.(t[0]), console.info(`[page-agent-sdk][createHtmlSubagent] 未传 writablePaths,已从 schema 推断: [${t.map((e) => `'${e}'`).join(", ")}]`)) : (console.warn("[page-agent-sdk][createHtmlSubagent] 未能从 schema 推断 writablePaths(开放 schema(z.any()/z.record())/嵌套容器(如 sections[].children[])/点路径 codeField(如 props.html_code)不支持自动推断),已跳过该 html 子 agent(整体不受影响);如确需代码资产机制(vfs + 格式校验 + 增量 commit),请显式传 writablePaths(代码组件 data 区,如 ['components'])"),
|
|
17672
|
+
let t = Fp(oe?.schema, e._codeAsset.codeField);
|
|
17673
|
+
t.length ? (e._codeAsset.writablePaths = t, Array.isArray(e.writablePaths) && (e.writablePaths = t), e._rebuildCodeAssetPaths?.(t[0]), console.info(`[page-agent-sdk][createHtmlSubagent] 未传 writablePaths,已从 schema 推断: [${t.map((e) => `'${e}'`).join(", ")}]`)) : (console.warn("[page-agent-sdk][createHtmlSubagent] 未能从 schema 推断 writablePaths(开放 schema(z.any()/z.record())/嵌套容器(如 sections[].children[])/点路径 codeField(如 props.html_code)不支持自动推断),已跳过该 html 子 agent(整体不受影响);如确需代码资产机制(vfs + 格式校验 + 增量 commit),请显式传 writablePaths(代码组件 data 区,如 ['components'])"), I.add(e));
|
|
17674
17674
|
}
|
|
17675
|
-
let
|
|
17675
|
+
let L = I.size ? le.filter((e) => !I.has(e)) : le, ue = I.size ? (ce ?? []).filter((e) => !I.has(e)) : ce, de = L.length > 0, fe = L.flatMap((e) => e._codeAsset.writablePaths), R = L.flatMap((e) => e._codeAsset.writablePaths.map((t) => `${t}.${e._codeAsset.codeField}`)), pe = e.checkpoint, me = pe !== void 0 && pe !== !1, z = me ? xg({
|
|
17676
17676
|
getData: () => Ce()?.bind,
|
|
17677
17677
|
consumeDataDirty: () => be?.consumeDataDirty?.() ?? !0,
|
|
17678
|
-
slotPaths:
|
|
17678
|
+
slotPaths: oe ? [""] : [],
|
|
17679
17679
|
vfsStore: x,
|
|
17680
17680
|
todosMw: C,
|
|
17681
|
-
getTodos: () =>
|
|
17681
|
+
getTodos: () => ae.current?.getState?.()?.todos ?? [],
|
|
17682
17682
|
messages: b,
|
|
17683
17683
|
maxCheckpoints: pe && typeof pe == "object" ? pe.maxCheckpoints : void 0
|
|
17684
17684
|
}) : null, B = !pe || typeof pe != "object" || pe.auto !== !1, V = ub(e.capabilities), he = V.dataOps, ge = V.draftWrite, H = V.automation, _e = V.domInspect && (m.vision === !0 || typeof e.images?.describe == "function"), ve = o_({
|
|
17685
17685
|
...e,
|
|
17686
17686
|
locale: e.i18n?.locale,
|
|
17687
|
-
dataOps: he && !!
|
|
17687
|
+
dataOps: he && !!oe,
|
|
17688
17688
|
domInspect: V.domInspect === !0,
|
|
17689
17689
|
screenshot: _e
|
|
17690
17690
|
});
|
|
17691
|
-
if (
|
|
17692
|
-
let e =
|
|
17691
|
+
if (de) {
|
|
17692
|
+
let e = L.map((e) => e._codeAsset.orchestratorPrompt).filter(Boolean).join("\n\n");
|
|
17693
17693
|
e && (ve += "\n\n" + e);
|
|
17694
|
-
} else
|
|
17695
|
-
let U = he &&
|
|
17694
|
+
} else oe?.schema && Pp(oe.schema) && (ve += "\n\n" + Qp.htmlDirectWriteFallback, console.warn("[page-agent-sdk] 检测到 schema 含 code 字段但未注册 html 子 agent:已自动注入「主 agent 自己写 HTML」编排(code 作普通字段直接 write,无 vfs 工作副本 / 无格式校验门禁)。如需代码资产机制(vfs + 格式校验 + 增量 commit + 主上下文 code 摘要),注册 createHtmlSubagent;若确为降级意图可忽略。"));
|
|
17695
|
+
let U = he && oe ? rv(oe, {
|
|
17696
17696
|
onAudit: e.onAudit ?? (e.debug ? (e) => console.log("[page-agent-sdk][data audit]", e) : void 0),
|
|
17697
17697
|
maxSnapshots: e.maxSnapshots,
|
|
17698
17698
|
onConflict: o.set,
|
|
17699
17699
|
conflictWatchFields: e.conflictWatchFields,
|
|
17700
17700
|
maxParallelTools: e.maxParallelTools,
|
|
17701
|
-
vfsStore: ge ||
|
|
17702
|
-
...
|
|
17703
|
-
...
|
|
17704
|
-
}) : [], ye = he ? U : [], be = he &&
|
|
17701
|
+
vfsStore: ge || oe?.resources?.length ? x : void 0,
|
|
17702
|
+
...fe.length ? { pgIdPaths: fe } : {},
|
|
17703
|
+
...R.length ? { largeTextPaths: R } : {}
|
|
17704
|
+
}) : [], ye = he ? U : [], be = he && oe ? U.controller ?? null : null, xe = he && oe ? U.previewWrite : void 0, Se = he && oe?.resources?.length && be?.getResourcesSnapshot ? wC({ getResourcesSnapshot: () => be?.getResourcesSnapshot?.() ?? [] }) : void 0, Ce = () => be?.get() ?? oe, we = new Set(U.map((e) => e.name)), Te = e.conflictWatchFields ?? [], Ee = !Te.includes("*") && Te.length ? new Set(Te) : void 0, De = be ? Iv({
|
|
17705
17705
|
getBind: () => Ce()?.bind,
|
|
17706
17706
|
recomputeAll: () => be.recomputeAllBaselines?.(),
|
|
17707
17707
|
hasBaselines: () => be.hasBaselines?.() ?? !1,
|
|
@@ -17799,7 +17799,7 @@ function BC(e, n, r) {
|
|
|
17799
17799
|
let Re = e.proposals ? TS(e.proposals, {
|
|
17800
17800
|
emit: (e) => {
|
|
17801
17801
|
try {
|
|
17802
|
-
|
|
17802
|
+
Jt(e);
|
|
17803
17803
|
} catch {}
|
|
17804
17804
|
},
|
|
17805
17805
|
log: (e, t) => {
|
|
@@ -17837,7 +17837,7 @@ function BC(e, n, r) {
|
|
|
17837
17837
|
Ye.forEach((e) => Oe.set(e.name, "builtin"));
|
|
17838
17838
|
let Xe = V.focus, Ze = s(async ({ path: e, label: t }) => {
|
|
17839
17839
|
let n = Ce()?.schema;
|
|
17840
|
-
return n ? Cp(n, e) ? (
|
|
17840
|
+
return n ? Cp(n, e) ? (ne.setFocus(P({
|
|
17841
17841
|
path: e,
|
|
17842
17842
|
...t ? { label: t } : {}
|
|
17843
17843
|
}), "agent"), `已聚焦到 ${e}${t ? `(${t})` : ""}。后续仅可写该子树(越界被拒),每轮只看到该组件结构。完成精修后调 clear_focus 退出。`) : `PATH_DENIED · 聚焦失败:path "${e}" 不在 schema 内。请先用 read 查看可操作路径再聚焦。` : "聚焦失败:当前无主数据 schema,无法聚焦。";
|
|
@@ -17848,7 +17848,7 @@ function BC(e, n, r) {
|
|
|
17848
17848
|
path: t.string().describe("要聚焦的组件 jsonPath,如 components.3"),
|
|
17849
17849
|
label: t.string().optional().describe("人类可读标签,如「导航栏」")
|
|
17850
17850
|
})
|
|
17851
|
-
}), Qe = s(async () => (
|
|
17851
|
+
}), Qe = s(async () => (ne.clearFocus("agent"), "已清除聚焦,恢复全量可操作范围(可读写所有组件)。"), {
|
|
17852
17852
|
name: "clear_focus",
|
|
17853
17853
|
description: "清除当前聚焦,退出精修模式,恢复对全部组件的读写权限。",
|
|
17854
17854
|
schema: t.object({}).optional()
|
|
@@ -17856,11 +17856,11 @@ function BC(e, n, r) {
|
|
|
17856
17856
|
let n = Ce()?.schema;
|
|
17857
17857
|
if (!n) return "聚焦失败:当前无主数据 schema,无法聚焦。";
|
|
17858
17858
|
if (!Cp(n, e)) return `PATH_DENIED · 聚焦失败:path "${e}" 不在 schema 内。请先用 read 查看可操作路径再聚焦。`;
|
|
17859
|
-
|
|
17859
|
+
ne.addFocus(P({
|
|
17860
17860
|
path: e,
|
|
17861
17861
|
...t ? { label: t } : {}
|
|
17862
17862
|
}), "agent");
|
|
17863
|
-
let r =
|
|
17863
|
+
let r = ne.getFocuses();
|
|
17864
17864
|
return `已聚焦 ${e}${t ? `(${t})` : ""}(当前共 ${r.length} 个焦点:${r.map((e) => e.path).join(", ")})。后续仅可写这些子树之一(越界被拒)。`;
|
|
17865
17865
|
}, {
|
|
17866
17866
|
name: "add_focus",
|
|
@@ -17870,9 +17870,9 @@ function BC(e, n, r) {
|
|
|
17870
17870
|
label: t.string().optional().describe("人类可读标签")
|
|
17871
17871
|
})
|
|
17872
17872
|
}), et = s(async ({ path: e }) => {
|
|
17873
|
-
let t =
|
|
17874
|
-
|
|
17875
|
-
let n =
|
|
17873
|
+
let t = ne.getFocuses().length;
|
|
17874
|
+
ne.removeFocus(e, "agent");
|
|
17875
|
+
let n = ne.getFocuses();
|
|
17876
17876
|
return n.length === t ? `path "${e}" 不在当前焦点列表中(当前:${n.map((e) => e.path).join(", ") || "无"})。` : n.length ? `已移除焦点 ${e}(剩余 ${n.length} 个:${n.map((e) => e.path).join(", ")})。` : `已移除焦点 ${e},聚焦已清空,恢复全量操作范围。`;
|
|
17877
17877
|
}, {
|
|
17878
17878
|
name: "remove_focus",
|
|
@@ -17894,23 +17894,23 @@ function BC(e, n, r) {
|
|
|
17894
17894
|
focusTools: () => tt,
|
|
17895
17895
|
mcpTools: () => Ge,
|
|
17896
17896
|
loadedSkillTools: () => nt
|
|
17897
|
-
}), W = it(), at = V.planning, ot = V.missionAnchor, st = V.workingMemory, ct = V.skills, lt = V.vfs ||
|
|
17897
|
+
}), W = it(), at = V.planning, ot = V.missionAnchor, st = V.workingMemory, ct = V.skills, lt = V.vfs || de;
|
|
17898
17898
|
if (lt) for (let e of g_) Oe.set(e, "builtin");
|
|
17899
17899
|
if (at) for (let e of C.tools ?? []) Oe.set(e.name, "builtin");
|
|
17900
17900
|
let ut = V.summarization, dt = V.agentCompression && !!p;
|
|
17901
17901
|
e.debug && V.agentCompression && !p && console.warn("[page-agent-sdk][agentCompression] agentCompression 开启但 summaryLlm 不可用(或缺 apiKey / 模型不支持工具),压缩决策不启用,回退静态压缩");
|
|
17902
17902
|
let ft = V.memory, pt = V.subagent, mt = pt ? Dh() : void 0, ht = e.verify?.maxAttempts ?? 2, gt = !!(e.verify?.check || e.verify?.maxAttempts || e.verify?.adversarial), _t = e.capabilities?.verify === !1, vt = (V.verify || gt && !_t) && e.verify?.enabled !== !1 && ht > 0, yt = V.contextInspector;
|
|
17903
17903
|
gt && !vt && e.verify?.enabled !== !1 && console.warn("[page-agent-sdk][verify] 检测到 verify 配置(check/maxAttempts/adversarial)但未装载(capabilities.verify:false 显式关闭 或 maxAttempts≤0)");
|
|
17904
|
-
let bt = e.subagent, xt = bt?.allowedTools ?? [], St = e.permissions?.length ? cg(e.permissions) : void 0, Ct = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? lg({
|
|
17904
|
+
let bt = e.subagent, xt = bt?.allowedTools ?? [], St = e.permissions?.length ? cg(e.permissions) : void 0, Ct = e.approval?.preview === !0 && xe ? (e, t) => e === "write" ? xe(t) : null : void 0, wt = e.approval?.previewWrite || Ct ? (t, n) => e.approval?.previewWrite?.(t, n) ?? Ct?.(t, n) ?? null : void 0, Tt = e.approval && (e.approval.tools !== void 0 || e.approval.confirm) ? lg({
|
|
17905
17905
|
...e.approval,
|
|
17906
17906
|
timeoutMs: e.approval.timeoutMs ?? M,
|
|
17907
17907
|
onAutoReject: ee,
|
|
17908
|
-
previewWrite:
|
|
17909
|
-
}) : void 0,
|
|
17908
|
+
previewWrite: wt
|
|
17909
|
+
}) : void 0, Et = [
|
|
17910
17910
|
...St ? [St] : [],
|
|
17911
|
-
...
|
|
17911
|
+
...Tt ? [Tt] : [],
|
|
17912
17912
|
...De ? [De] : []
|
|
17913
|
-
],
|
|
17913
|
+
], Dt = !pt || bt?.enabled === !1 ? void 0 : qh({
|
|
17914
17914
|
llm: bt?.llm ?? e.llm,
|
|
17915
17915
|
allTools: () => G.agent?.allTools ?? W,
|
|
17916
17916
|
allowedTools: xt.length ? xt : void 0,
|
|
@@ -17923,10 +17923,10 @@ function BC(e, n, r) {
|
|
|
17923
17923
|
maxParallel: bt?.maxParallel,
|
|
17924
17924
|
thinkingMode: bt?.thinkingMode,
|
|
17925
17925
|
debug: e.debug,
|
|
17926
|
-
getFocuses: () =>
|
|
17926
|
+
getFocuses: () => ne.getActiveFocuses(),
|
|
17927
17927
|
getSchema: () => Ce()?.schema ?? null,
|
|
17928
17928
|
tracker: mt,
|
|
17929
|
-
guardMiddleware:
|
|
17929
|
+
guardMiddleware: Et.length ? Et : void 0,
|
|
17930
17930
|
getVfsFiles: lt ? () => x.files : void 0,
|
|
17931
17931
|
enterDataScope: be?.enterScope ? (e) => be.enterScope(e) : void 0,
|
|
17932
17932
|
exitDataScope: be?.exitScope ? (e) => be.exitScope(e) : void 0,
|
|
@@ -17934,7 +17934,7 @@ function BC(e, n, r) {
|
|
|
17934
17934
|
a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
|
|
17935
17935
|
},
|
|
17936
17936
|
timeoutMs: bt?.timeoutMs
|
|
17937
|
-
}),
|
|
17937
|
+
}), Ot = ue?.map((e) => {
|
|
17938
17938
|
if (!e._codeAsset) return e;
|
|
17939
17939
|
let t = e._codeAsset, n = xv({
|
|
17940
17940
|
writablePaths: t.writablePaths,
|
|
@@ -17951,29 +17951,29 @@ function BC(e, n, r) {
|
|
|
17951
17951
|
...e,
|
|
17952
17952
|
middleware: r
|
|
17953
17953
|
};
|
|
17954
|
-
}),
|
|
17954
|
+
}), kt = de && pt ? Sv() : void 0, At = kt ? kv({
|
|
17955
17955
|
getBind: () => Ce()?.bind,
|
|
17956
|
-
writablePaths:
|
|
17957
|
-
getLocked: () =>
|
|
17956
|
+
writablePaths: fe,
|
|
17957
|
+
getLocked: () => kt.locked(),
|
|
17958
17958
|
tools: W,
|
|
17959
|
-
getCodeFieldPaths: () => Dv(Ce()?.bind,
|
|
17959
|
+
getCodeFieldPaths: () => Dv(Ce()?.bind, L.map((e) => ({
|
|
17960
17960
|
writablePaths: e._codeAsset.writablePaths,
|
|
17961
17961
|
codeField: e._codeAsset.codeField
|
|
17962
17962
|
})))
|
|
17963
|
-
}) : void 0,
|
|
17963
|
+
}) : void 0, jt = be?.getSummarizedPaths && be.clearSummarizedPaths ? Mv({
|
|
17964
17964
|
getSummarizedPaths: () => be.getSummarizedPaths(),
|
|
17965
17965
|
clearSummarizedPaths: () => be.clearSummarizedPaths()
|
|
17966
|
-
}) : void 0,
|
|
17966
|
+
}) : void 0, Mt = pt && Ot !== void 0 ? Xh(Ot, {
|
|
17967
17967
|
llm: e.llm,
|
|
17968
17968
|
thinkingModeDefault: e.subagent?.thinkingMode,
|
|
17969
17969
|
staleReadInvalidation: e.staleReadInvalidation,
|
|
17970
17970
|
allTools: () => G.agent?.allTools ?? W,
|
|
17971
17971
|
debug: e.debug,
|
|
17972
|
-
getFocuses: () =>
|
|
17972
|
+
getFocuses: () => ne.getActiveFocuses(),
|
|
17973
17973
|
getSchema: () => Ce()?.schema ?? null,
|
|
17974
17974
|
getBind: () => Ce()?.bind,
|
|
17975
17975
|
tracker: mt,
|
|
17976
|
-
guardMiddleware:
|
|
17976
|
+
guardMiddleware: Et.length ? Et : void 0,
|
|
17977
17977
|
getVfsFiles: lt ? () => x.files : void 0,
|
|
17978
17978
|
enterDataScope: be?.enterScope ? (e) => be.enterScope(e) : void 0,
|
|
17979
17979
|
exitDataScope: be?.exitScope ? (e) => be.exitScope(e) : void 0,
|
|
@@ -17981,30 +17981,30 @@ function BC(e, n, r) {
|
|
|
17981
17981
|
a.prompt_tokens = (a.prompt_tokens ?? 0) + (e.prompt_tokens ?? 0), a.completion_tokens = (a.completion_tokens ?? 0) + (e.completion_tokens ?? 0), a.total_tokens = (a.total_tokens ?? 0) + (e.total_tokens ?? 0), e.reasoning_tokens && (a.reasoning_tokens = (a.reasoning_tokens ?? 0) + e.reasoning_tokens);
|
|
17982
17982
|
},
|
|
17983
17983
|
timeoutMs: e.subagent?.timeoutMs,
|
|
17984
|
-
...
|
|
17985
|
-
componentLock:
|
|
17986
|
-
resolveComponents: (e) => Cv(e, _v(Ce()?.bind,
|
|
17984
|
+
...kt ? {
|
|
17985
|
+
componentLock: kt,
|
|
17986
|
+
resolveComponents: (e) => Cv(e, _v(Ce()?.bind, fe))
|
|
17987
17987
|
} : {}
|
|
17988
|
-
}) : void 0,
|
|
17988
|
+
}) : void 0, Nt = Mt ? Mt.controller : null, Pt = (t) => {
|
|
17989
17989
|
let n = t.thinkingMode ?? e.subagent?.thinkingMode, r = n ? vy(t.llm ?? e.llm) ? "instance-noop" : "applied" : "inherited";
|
|
17990
17990
|
return {
|
|
17991
17991
|
...t,
|
|
17992
17992
|
...n ? { thinkingMode: n } : {},
|
|
17993
17993
|
thinkingApplied: r
|
|
17994
17994
|
};
|
|
17995
|
-
},
|
|
17995
|
+
}, Ft = ["read", "fetch_document"], It = W.filter((e) => Ft.includes(e.name)), Lt = vt ? wg({
|
|
17996
17996
|
check: e.verify.check ?? Ag({
|
|
17997
17997
|
schemas: () => Ce() ? { "": Ce().schema } : {},
|
|
17998
17998
|
root: () => Ce()?.bind
|
|
17999
17999
|
}),
|
|
18000
18000
|
adversarial: e.verify?.adversarial ? {
|
|
18001
18001
|
llm: e.llm,
|
|
18002
|
-
tools:
|
|
18002
|
+
tools: It
|
|
18003
18003
|
} : void 0
|
|
18004
|
-
}) : void 0,
|
|
18004
|
+
}) : void 0, Rt = yt ? Wg({
|
|
18005
18005
|
contextWindow: m.contextWindow,
|
|
18006
18006
|
thresholdRatio: mb(e, m.contextWindow).summaryThresholdRatio
|
|
18007
|
-
}) : void 0,
|
|
18007
|
+
}) : void 0, zt = xC({
|
|
18008
18008
|
...V,
|
|
18009
18009
|
humanConfirm: qe,
|
|
18010
18010
|
screenshot: !!Me,
|
|
@@ -18012,21 +18012,21 @@ function BC(e, n, r) {
|
|
|
18012
18012
|
hasActions: !!e.actions && Object.keys(e.actions).length > 0,
|
|
18013
18013
|
hasProposals: !!e.proposals,
|
|
18014
18014
|
viewImage: !!je,
|
|
18015
|
-
subagents:
|
|
18016
|
-
}, he && !!
|
|
18015
|
+
subagents: ue?.map(Pt)
|
|
18016
|
+
}, he && !!oe, { promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens) }), Bt = V.pageContext ? CC({
|
|
18017
18017
|
getPageInfo: () => typeof document < "u" && typeof location < "u" ? {
|
|
18018
18018
|
title: document.title || "",
|
|
18019
18019
|
url: location.href
|
|
18020
18020
|
} : null,
|
|
18021
18021
|
canReadPage: V.domInspect === !0
|
|
18022
|
-
}) : void 0,
|
|
18022
|
+
}) : void 0, Vt = {
|
|
18023
18023
|
epoch: 0,
|
|
18024
18024
|
notices: [],
|
|
18025
18025
|
readsInvalidated: 0
|
|
18026
|
-
},
|
|
18026
|
+
}, Ht = 0, Ut = {
|
|
18027
18027
|
name: "hostNotice",
|
|
18028
18028
|
beforeAgent: () => {
|
|
18029
|
-
|
|
18029
|
+
Ht = Vt.epoch;
|
|
18030
18030
|
},
|
|
18031
18031
|
wrapModelCall: async (e, t) => {
|
|
18032
18032
|
if (Fe) {
|
|
@@ -18044,18 +18044,18 @@ function BC(e, n, r) {
|
|
|
18044
18044
|
});
|
|
18045
18045
|
}
|
|
18046
18046
|
}
|
|
18047
|
-
if (
|
|
18048
|
-
|
|
18049
|
-
let t =
|
|
18047
|
+
if (Vt.epoch > Ht) {
|
|
18048
|
+
Ht = Vt.epoch;
|
|
18049
|
+
let t = Vt.notices[Vt.notices.length - 1] ?? "", n = Vd(e.messages, t || void 0, Ue);
|
|
18050
18050
|
if (n.invalidatedCount > 0) {
|
|
18051
18051
|
for (let t = 0; t < n.messages.length; t++) e.messages[t] = n.messages[t];
|
|
18052
|
-
|
|
18052
|
+
Vt.readsInvalidated += n.invalidatedCount, G.agent?.debugLogs?.value?.push({
|
|
18053
18053
|
timestamp: Date.now(),
|
|
18054
18054
|
type: "middleware",
|
|
18055
18055
|
data: {
|
|
18056
18056
|
stage: "host_read_invalidated",
|
|
18057
18057
|
count: n.invalidatedCount,
|
|
18058
|
-
epoch:
|
|
18058
|
+
epoch: Vt.epoch,
|
|
18059
18059
|
reason: t || void 0
|
|
18060
18060
|
}
|
|
18061
18061
|
});
|
|
@@ -18063,24 +18063,24 @@ function BC(e, n, r) {
|
|
|
18063
18063
|
}
|
|
18064
18064
|
return t(e);
|
|
18065
18065
|
},
|
|
18066
|
-
augmentPrompt: () =>
|
|
18066
|
+
augmentPrompt: () => Vt.notices.length ? [
|
|
18067
18067
|
"【宿主页面已变更】",
|
|
18068
|
-
...
|
|
18068
|
+
...Vt.notices.filter(Boolean).map((e) => `· ${e}`),
|
|
18069
18069
|
V.domInspect === !0 ? "此前的页面读取/截图结果已过期,回答任何关于当前页面的问题前必须重新 read_page / get_dom 读取当前页面;不要凭此前的读取结果或记忆作答。" : "页面内容可能已变化,断言页面前先核实当前状态;不要凭此前的印象作答。"
|
|
18070
18070
|
].join("\n") : void 0,
|
|
18071
18071
|
afterAgent: () => {
|
|
18072
|
-
|
|
18072
|
+
Vt.notices.length = 0;
|
|
18073
18073
|
}
|
|
18074
|
-
},
|
|
18074
|
+
}, Wt = Re ? {
|
|
18075
18075
|
name: "proposalNotice",
|
|
18076
18076
|
augmentPrompt: () => Re.state.notices.length ? ["【内容提案裁决结果】(以此为准,不要凭提案前状态作答)", ...Re.state.notices].join("\n") : void 0,
|
|
18077
18077
|
afterAgent: () => {
|
|
18078
18078
|
Re.state.notices.length = 0;
|
|
18079
18079
|
}
|
|
18080
|
-
} : null,
|
|
18080
|
+
} : null, Gt = oe ? {
|
|
18081
18081
|
name: "dataHint",
|
|
18082
18082
|
augmentPrompt: () => a_(Ce(), e.schemaHint) || void 0
|
|
18083
|
-
} : null,
|
|
18083
|
+
} : null, Kt = e.augmentSystem ? {
|
|
18084
18084
|
name: "augmentSystem",
|
|
18085
18085
|
augmentPrompt: (t) => {
|
|
18086
18086
|
try {
|
|
@@ -18093,51 +18093,51 @@ function BC(e, n, r) {
|
|
|
18093
18093
|
return;
|
|
18094
18094
|
}
|
|
18095
18095
|
}
|
|
18096
|
-
} : null,
|
|
18096
|
+
} : null, qt = db(e.onEvent), Jt = qt.emit, Yt, Xt = [], Zt = (e) => ({
|
|
18097
18097
|
name: e.name,
|
|
18098
18098
|
description: e.description,
|
|
18099
18099
|
content: typeof e.getContent == "function" ? e.getContent() : ""
|
|
18100
|
-
}),
|
|
18100
|
+
}), Qt = (e) => ({
|
|
18101
18101
|
name: e.name,
|
|
18102
18102
|
description: e.description,
|
|
18103
18103
|
getContent: () => e.content
|
|
18104
|
-
}),
|
|
18104
|
+
}), $t = e.skillStorage === !1 ? null : kC({
|
|
18105
18105
|
...typeof e.skillStorage == "object" ? e.skillStorage : {},
|
|
18106
18106
|
id: e.skillStorage && typeof e.skillStorage == "object" && e.skillStorage.id ? e.skillStorage.id : `agent::${n}`
|
|
18107
|
-
}),
|
|
18108
|
-
let t =
|
|
18107
|
+
}), en = () => {
|
|
18108
|
+
let t = Yt ? Yt.controller : null;
|
|
18109
18109
|
if (t) {
|
|
18110
|
-
let n = (e.skills || []).filter((e) => !
|
|
18111
|
-
t.set([...n, ...
|
|
18110
|
+
let n = (e.skills || []).filter((e) => !Xt.some((t) => t.name === e.name));
|
|
18111
|
+
t.set([...n, ...Xt]);
|
|
18112
18112
|
}
|
|
18113
18113
|
G.infoTick.value++;
|
|
18114
|
-
},
|
|
18115
|
-
if (
|
|
18116
|
-
let t = await
|
|
18114
|
+
}, tn = async () => {
|
|
18115
|
+
if ($t) try {
|
|
18116
|
+
let t = await $t.list();
|
|
18117
18117
|
if (t.length) {
|
|
18118
|
-
|
|
18119
|
-
let n =
|
|
18118
|
+
Xt = t.map(Qt);
|
|
18119
|
+
let n = Yt ? Yt.controller : null;
|
|
18120
18120
|
if (n) {
|
|
18121
|
-
let t = (e.skills || []).filter((e) => !
|
|
18122
|
-
n.set([...t, ...
|
|
18121
|
+
let t = (e.skills || []).filter((e) => !Xt.some((t) => t.name === e.name));
|
|
18122
|
+
n.set([...t, ...Xt]);
|
|
18123
18123
|
}
|
|
18124
18124
|
G.infoTick.value++;
|
|
18125
18125
|
}
|
|
18126
18126
|
} catch {}
|
|
18127
|
-
},
|
|
18127
|
+
}, nn = ut ? Eh({
|
|
18128
18128
|
...h,
|
|
18129
18129
|
llmInvoke: d,
|
|
18130
18130
|
getRegisteredData: () => Ce() ? [{ description: Ce().description ?? "主数据对象" }] : [],
|
|
18131
18131
|
preserveLastToolResults: _,
|
|
18132
18132
|
...dt ? {
|
|
18133
18133
|
decideInvoke: p,
|
|
18134
|
-
getSnapshot: () =>
|
|
18134
|
+
getSnapshot: () => Rt?.getSnapshot()
|
|
18135
18135
|
} : {}
|
|
18136
|
-
}) : void 0,
|
|
18136
|
+
}) : void 0, rn = ct ? th([
|
|
18137
18137
|
...V.domInspect && !(e.skills || []).some((e) => e.name === "dom-inspect") ? [QS({
|
|
18138
18138
|
withScreenshot: !!Me,
|
|
18139
18139
|
withDomEdit: V.domEdit,
|
|
18140
|
-
withDataOps: he && !!
|
|
18140
|
+
withDataOps: he && !!oe
|
|
18141
18141
|
})] : [],
|
|
18142
18142
|
...V.domInspect && !(e.skills || []).some((e) => e.name === "page-analysis") ? [eC({
|
|
18143
18143
|
withScreenshot: !!Me,
|
|
@@ -18155,78 +18155,78 @@ function BC(e, n, r) {
|
|
|
18155
18155
|
W = it(), G.agent && G.agent.setTools(W), G.infoTick.value++;
|
|
18156
18156
|
}
|
|
18157
18157
|
}) : void 0;
|
|
18158
|
-
|
|
18159
|
-
let
|
|
18160
|
-
...
|
|
18161
|
-
|
|
18162
|
-
...
|
|
18163
|
-
|
|
18164
|
-
...
|
|
18158
|
+
Yt = rn;
|
|
18159
|
+
let an = gb([
|
|
18160
|
+
...Gt ? [Gt] : [],
|
|
18161
|
+
zt,
|
|
18162
|
+
...Bt ? [Bt] : [],
|
|
18163
|
+
Ut,
|
|
18164
|
+
...Wt ? [Wt] : [],
|
|
18165
18165
|
...ot ? [T] : [],
|
|
18166
18166
|
O,
|
|
18167
18167
|
k,
|
|
18168
18168
|
...at ? [C] : [],
|
|
18169
|
-
...
|
|
18169
|
+
...rn ? [rn] : [],
|
|
18170
18170
|
...lt ? [v_(x)] : [],
|
|
18171
|
-
...
|
|
18172
|
-
...st ? [
|
|
18173
|
-
...Xe ? [
|
|
18171
|
+
...nn ? [nn] : [],
|
|
18172
|
+
...st ? [re] : [],
|
|
18173
|
+
...Xe ? [ne] : [],
|
|
18174
18174
|
...Se ? [Se] : [],
|
|
18175
|
-
...ft ? [
|
|
18175
|
+
...ft ? [ie] : [],
|
|
18176
18176
|
...St ? [St] : [],
|
|
18177
18177
|
...me && B && z ? [Sg(z)] : [],
|
|
18178
18178
|
...qe ? [N] : [],
|
|
18179
|
-
...Ct ? [Ct] : [],
|
|
18180
|
-
...De ? [De] : [],
|
|
18181
|
-
...Ft ? [Ft] : [],
|
|
18182
18179
|
...Tt ? [Tt] : [],
|
|
18180
|
+
...De ? [De] : [],
|
|
18181
|
+
...Lt ? [Lt] : [],
|
|
18182
|
+
...Dt ? [Dt] : [],
|
|
18183
|
+
...Mt ? [Mt] : [],
|
|
18183
18184
|
...At ? [At] : [],
|
|
18184
|
-
...
|
|
18185
|
-
...kt ? [kt] : [],
|
|
18185
|
+
...jt ? [jt] : [],
|
|
18186
18186
|
...be && pt ? [Fv({
|
|
18187
18187
|
getBind: () => Ce()?.bind,
|
|
18188
18188
|
getTools: () => G.agent?.allTools ?? W
|
|
18189
18189
|
})] : [],
|
|
18190
|
-
...
|
|
18191
|
-
...
|
|
18190
|
+
...Kt ? [Kt] : [],
|
|
18191
|
+
...Rt ? [Rt] : [],
|
|
18192
18192
|
...Pe ? [Pe] : [],
|
|
18193
18193
|
...e.middleware || [],
|
|
18194
18194
|
...H ? [lC(a, {
|
|
18195
18195
|
tokenBudget: e.tokenBudget,
|
|
18196
18196
|
timeBudgetMs: e.timeBudgetMs
|
|
18197
|
-
},
|
|
18198
|
-
RC(
|
|
18199
|
-
]),
|
|
18200
|
-
function
|
|
18197
|
+
}, Jt)] : [],
|
|
18198
|
+
RC(Jt, b, Ce, a)
|
|
18199
|
+
]), on = e.maxMemoryRounds ?? PC;
|
|
18200
|
+
function sn(e) {
|
|
18201
18201
|
return (e) => {
|
|
18202
|
-
e.type !== "approval_request" &&
|
|
18202
|
+
e.type !== "approval_request" && Jt(Ae(e));
|
|
18203
18203
|
};
|
|
18204
18204
|
}
|
|
18205
|
-
let
|
|
18206
|
-
function
|
|
18205
|
+
let cn = /* @__PURE__ */ Rn([]), ln = NC(), un = /* @__PURE__ */ new Set();
|
|
18206
|
+
function dn(e) {
|
|
18207
18207
|
let t = new AbortController(), n = () => t.abort();
|
|
18208
|
-
return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })),
|
|
18208
|
+
return e && (e.aborted ? t.abort() : e.addEventListener("abort", n, { once: !0 })), un.add(t), {
|
|
18209
18209
|
controller: t,
|
|
18210
18210
|
untrack: () => {
|
|
18211
|
-
|
|
18211
|
+
un.delete(t), e?.removeEventListener("abort", n);
|
|
18212
18212
|
}
|
|
18213
18213
|
};
|
|
18214
18214
|
}
|
|
18215
|
-
function
|
|
18216
|
-
for (let e of
|
|
18217
|
-
|
|
18215
|
+
function fn() {
|
|
18216
|
+
for (let e of un) e.abort();
|
|
18217
|
+
un.clear();
|
|
18218
18218
|
}
|
|
18219
|
-
let
|
|
18219
|
+
let pn = /* @__PURE__ */ Rn(null), G = {
|
|
18220
18220
|
agentId: n,
|
|
18221
18221
|
store: l,
|
|
18222
18222
|
messages: b,
|
|
18223
18223
|
vfsStore: x,
|
|
18224
|
-
listeners:
|
|
18224
|
+
listeners: qt.listeners,
|
|
18225
18225
|
todosMw: C,
|
|
18226
|
-
memoryMw:
|
|
18226
|
+
memoryMw: ie,
|
|
18227
18227
|
missionMw: T,
|
|
18228
|
-
workingMemoryMw:
|
|
18229
|
-
focusMw:
|
|
18228
|
+
workingMemoryMw: re,
|
|
18229
|
+
focusMw: ne,
|
|
18230
18230
|
agent: null,
|
|
18231
18231
|
initDone: Promise.resolve(),
|
|
18232
18232
|
sessionId: "",
|
|
@@ -18236,18 +18236,18 @@ function BC(e, n, r) {
|
|
|
18236
18236
|
mcpFailed: [],
|
|
18237
18237
|
checkpoint: z,
|
|
18238
18238
|
dataOpsController: be,
|
|
18239
|
-
skillsController:
|
|
18239
|
+
skillsController: Yt ? Yt.controller : null,
|
|
18240
18240
|
infoTick: c,
|
|
18241
18241
|
pendingConflict: o.pendingConflict,
|
|
18242
|
-
pendingQuote:
|
|
18243
|
-
sessions:
|
|
18244
|
-
refreshSessions: () =>
|
|
18242
|
+
pendingQuote: pn,
|
|
18243
|
+
sessions: cn,
|
|
18244
|
+
refreshSessions: () => bn.refreshSessions(),
|
|
18245
18245
|
liveData: Ce,
|
|
18246
18246
|
usage: a,
|
|
18247
|
-
emit:
|
|
18248
|
-
runSerial:
|
|
18249
|
-
trackActive:
|
|
18250
|
-
abortAllActive:
|
|
18247
|
+
emit: Jt,
|
|
18248
|
+
runSerial: ln,
|
|
18249
|
+
trackActive: dn,
|
|
18250
|
+
abortAllActive: fn,
|
|
18251
18251
|
unloadSkillTools(e) {
|
|
18252
18252
|
if (e) {
|
|
18253
18253
|
let t = nt.length;
|
|
@@ -18260,31 +18260,31 @@ function BC(e, n, r) {
|
|
|
18260
18260
|
W = it(), G.agent && G.agent.setTools(W);
|
|
18261
18261
|
},
|
|
18262
18262
|
applySnapshot(t) {
|
|
18263
|
-
if (t.vfs && x.hydrate && x.hydrate(t.vfs), t.messages?.length && (b.push(...lu(t.messages, (e) => (e ? G.vfsStore?.files?.[e]?.content : void 0) || void 0)), k.markResumed()), t.todos?.length && C.reset(t.todos), t.memory && !e.memory &&
|
|
18263
|
+
if (t.vfs && x.hydrate && x.hydrate(t.vfs), t.messages?.length && (b.push(...lu(t.messages, (e) => (e ? G.vfsStore?.files?.[e]?.content : void 0) || void 0)), k.markResumed()), t.todos?.length && C.reset(t.todos), t.memory && !e.memory && ie.reset(t.memory), t.checkpoints?.length && z && z.importStack(t.checkpoints), t.usage && Object.assign(a, t.usage), t.mission && ot && T.setMission(t.mission), t.workingMemory && st && re.restore(t.workingMemory), t.planConfirmation && (A.lastPlanConfirmation = t.planConfirmation), Xe) {
|
|
18264
18264
|
let n = t.focus, r = n ? Array.isArray(n) ? n : [n] : [];
|
|
18265
18265
|
if (r.length) {
|
|
18266
18266
|
let t = Ce()?.schema, n = t ? r.filter((e) => Cp(t, e.path)) : [];
|
|
18267
|
-
if (n.length && (
|
|
18267
|
+
if (n.length && (ne.setFocus(null), n.forEach((e) => ne.addFocus(P(e)))), e.debug && n.length < r.length) {
|
|
18268
18268
|
let e = r.filter((e) => !n.includes(e)).map((e) => e.path);
|
|
18269
18269
|
console.warn("[page-agent-sdk][focus] 恢复的焦点部分 path 已失效(schema 变化/无 schema),剔除:", e);
|
|
18270
18270
|
}
|
|
18271
18271
|
}
|
|
18272
18272
|
}
|
|
18273
|
-
|
|
18273
|
+
_n();
|
|
18274
18274
|
},
|
|
18275
18275
|
addSkill(e) {
|
|
18276
|
-
let t =
|
|
18277
|
-
t >= 0 ?
|
|
18276
|
+
let t = Xt.findIndex((t) => t.name === e.name);
|
|
18277
|
+
t >= 0 ? Xt[t] = e : Xt.push(e), en(), $t && $t.put(Zt(e));
|
|
18278
18278
|
},
|
|
18279
18279
|
removeSkill(e) {
|
|
18280
|
-
let t =
|
|
18281
|
-
return t < 0 ? !1 : (
|
|
18280
|
+
let t = Xt.findIndex((t) => t.name === e);
|
|
18281
|
+
return t < 0 ? !1 : (Xt.splice(t, 1), en(), $t && $t.remove(e), !0);
|
|
18282
18282
|
},
|
|
18283
18283
|
listUserSkills() {
|
|
18284
|
-
return
|
|
18284
|
+
return Xt.map((e) => e.name);
|
|
18285
18285
|
},
|
|
18286
18286
|
getUserSkill(e) {
|
|
18287
|
-
let t =
|
|
18287
|
+
let t = Xt.find((t) => t.name === e);
|
|
18288
18288
|
if (t) return {
|
|
18289
18289
|
name: t.name,
|
|
18290
18290
|
description: t.description,
|
|
@@ -18292,7 +18292,7 @@ function BC(e, n, r) {
|
|
|
18292
18292
|
};
|
|
18293
18293
|
},
|
|
18294
18294
|
afterRound() {
|
|
18295
|
-
|
|
18295
|
+
vn(), bn.persistRuntime();
|
|
18296
18296
|
},
|
|
18297
18297
|
clearCodeReuse() {
|
|
18298
18298
|
let e = x;
|
|
@@ -18303,9 +18303,9 @@ function BC(e, n, r) {
|
|
|
18303
18303
|
t ??= {}, t?.mission && ot && T.setMission(t.mission);
|
|
18304
18304
|
let n = e, r = (t.images ?? []).filter((e) => e && (e.dataUri || e.vfsRef || e.url));
|
|
18305
18305
|
if (r.length > 4) throw Error(`[page-agent-sdk] 单轮最多 4 张图片(收到 ${r.length})`);
|
|
18306
|
-
if (r.length && (await
|
|
18306
|
+
if (r.length && (await yn.stowImages(r), await yn.describeIfNeeded(r, n)), r.length && !m.vision && !r.every((e) => e.description)) {
|
|
18307
18307
|
let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述(集成方识图子 agent / 自有 vision API)";
|
|
18308
|
-
throw
|
|
18308
|
+
throw Jt({
|
|
18309
18309
|
type: "error",
|
|
18310
18310
|
message: e,
|
|
18311
18311
|
severity: "recoverable",
|
|
@@ -18313,7 +18313,7 @@ function BC(e, n, r) {
|
|
|
18313
18313
|
}), Error(`[page-agent-sdk] ${e}`);
|
|
18314
18314
|
}
|
|
18315
18315
|
x?.setProtectedRefs?.(jC(b));
|
|
18316
|
-
let i = H ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c =
|
|
18316
|
+
let i = H ? t.maxAutoRetries ?? 1 : 0, a = 0, s = !1, c = sn(t.signal);
|
|
18317
18317
|
if (t.signal) {
|
|
18318
18318
|
let e = () => o.resolve("keep_external");
|
|
18319
18319
|
t.signal.aborted ? e() : t.signal.addEventListener("abort", e, { once: !0 });
|
|
@@ -18330,14 +18330,14 @@ function BC(e, n, r) {
|
|
|
18330
18330
|
...n ? { anchor: n } : {}
|
|
18331
18331
|
};
|
|
18332
18332
|
}
|
|
18333
|
-
let i = e ??
|
|
18333
|
+
let i = e ?? pn.value ?? void 0;
|
|
18334
18334
|
b.push({
|
|
18335
18335
|
role: "user",
|
|
18336
18336
|
content: n,
|
|
18337
18337
|
timestamp: Date.now(),
|
|
18338
18338
|
...r.length ? { images: r } : {},
|
|
18339
18339
|
...i ? { quote: i } : {}
|
|
18340
|
-
}), s = !0, !e &&
|
|
18340
|
+
}), s = !0, !e && pn.value && (pn.value = null);
|
|
18341
18341
|
}
|
|
18342
18342
|
try {
|
|
18343
18343
|
let e = await G.agent.invoke(b, t.signal, c);
|
|
@@ -18358,7 +18358,7 @@ function BC(e, n, r) {
|
|
|
18358
18358
|
}), G.afterRound(), l) try {
|
|
18359
18359
|
await l.flush();
|
|
18360
18360
|
} catch (e) {
|
|
18361
|
-
|
|
18361
|
+
Jt({
|
|
18362
18362
|
type: "error",
|
|
18363
18363
|
message: `落盘失败(不影响本轮回复):${e instanceof Error ? e.message : String(e)}`,
|
|
18364
18364
|
severity: "observable",
|
|
@@ -18374,7 +18374,7 @@ function BC(e, n, r) {
|
|
|
18374
18374
|
code: "MODEL_UNAVAILABLE",
|
|
18375
18375
|
message: e instanceof Error ? e.message : n.message
|
|
18376
18376
|
}), a < i && z?.canRestore()) {
|
|
18377
|
-
a += 1, z.restore(), s = !0,
|
|
18377
|
+
a += 1, z.restore(), s = !0, Jt({
|
|
18378
18378
|
type: "error",
|
|
18379
18379
|
message: `致命错误自动恢复(${a}/${i}):${n.message},已回退 checkpoint 重试`,
|
|
18380
18380
|
severity: "observable",
|
|
@@ -18386,7 +18386,7 @@ function BC(e, n, r) {
|
|
|
18386
18386
|
});
|
|
18387
18387
|
continue;
|
|
18388
18388
|
}
|
|
18389
|
-
throw
|
|
18389
|
+
throw Jt({
|
|
18390
18390
|
type: "error",
|
|
18391
18391
|
message: n.message,
|
|
18392
18392
|
severity: n.severity,
|
|
@@ -18399,7 +18399,7 @@ function BC(e, n, r) {
|
|
|
18399
18399
|
async batch(e, t, n) {
|
|
18400
18400
|
if (await G.initDone, !e.length) return [];
|
|
18401
18401
|
if (G.refCount <= 0) throw Error("page-agent-sdk: agent 已释放(unmount),拒绝排队中的 batch");
|
|
18402
|
-
let r = [], i =
|
|
18402
|
+
let r = [], i = sn(n);
|
|
18403
18403
|
if (x?.setProtectedRefs?.(jC(b)), n) {
|
|
18404
18404
|
let e = () => o.resolve("keep_external");
|
|
18405
18405
|
n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
|
|
@@ -18431,7 +18431,7 @@ function BC(e, n, r) {
|
|
|
18431
18431
|
}), G.afterRound(), l) try {
|
|
18432
18432
|
await l.flush();
|
|
18433
18433
|
} catch (e) {
|
|
18434
|
-
|
|
18434
|
+
Jt({
|
|
18435
18435
|
type: "error",
|
|
18436
18436
|
message: `落盘失败(不影响本任务结果):${e instanceof Error ? e.message : String(e)}`,
|
|
18437
18437
|
severity: "observable",
|
|
@@ -18467,7 +18467,7 @@ function BC(e, n, r) {
|
|
|
18467
18467
|
}
|
|
18468
18468
|
od(i);
|
|
18469
18469
|
let c = Xl(i, "fatal");
|
|
18470
|
-
|
|
18470
|
+
Jt({
|
|
18471
18471
|
type: "error",
|
|
18472
18472
|
message: `批量任务 ${a + 1}/${e.length} 失败:${c.message}`,
|
|
18473
18473
|
severity: "observable",
|
|
@@ -18491,16 +18491,16 @@ function BC(e, n, r) {
|
|
|
18491
18491
|
}
|
|
18492
18492
|
return r;
|
|
18493
18493
|
},
|
|
18494
|
-
switchSession: (e) =>
|
|
18495
|
-
exportSession: (e) =>
|
|
18496
|
-
importSession: (e) =>
|
|
18497
|
-
resetSession: () =>
|
|
18494
|
+
switchSession: (e) => bn.switchSession(e),
|
|
18495
|
+
exportSession: (e) => bn.exportSession(e),
|
|
18496
|
+
importSession: (e) => bn.importSession(e),
|
|
18497
|
+
resetSession: () => bn.resetSession(),
|
|
18498
18498
|
stream: async (e, t, n) => {
|
|
18499
18499
|
if (!G.agent) throw Error("page-agent-sdk: agent 尚未初始化完成,请先 await mount()");
|
|
18500
18500
|
let r = [...e].reverse().find((e) => e.role === "user" && e.images?.length);
|
|
18501
|
-
if (r?.images?.length && (await
|
|
18501
|
+
if (r?.images?.length && (await yn.stowImages(r.images), await yn.describeIfNeeded(r.images, r.content), !m.vision && !r.images.every((e) => e.description))) {
|
|
18502
18502
|
let e = "当前主模型不支持图片输入(modelCaps.vision=false)。请换多模态模型(gpt-4o/claude/qwen-vl)或 LLMConfig 声明 vision:true;或配置 images.describe 绑定识图转述";
|
|
18503
|
-
throw
|
|
18503
|
+
throw Jt({
|
|
18504
18504
|
type: "error",
|
|
18505
18505
|
message: e,
|
|
18506
18506
|
severity: "recoverable",
|
|
@@ -18509,18 +18509,18 @@ function BC(e, n, r) {
|
|
|
18509
18509
|
}
|
|
18510
18510
|
x?.setProtectedRefs?.(jC(e));
|
|
18511
18511
|
let i = (e) => {
|
|
18512
|
-
t?.(Ae(e)),
|
|
18512
|
+
t?.(Ae(e)), Jt(Ae(e)), e.type === "subagent" && (e.kind === "tool_call" || e.kind === "tool_result") && G.infoTick.value++;
|
|
18513
18513
|
};
|
|
18514
18514
|
if (n) {
|
|
18515
18515
|
let e = () => o.resolve("keep_external");
|
|
18516
18516
|
n.aborted ? e() : n.addEventListener("abort", e, { once: !0 });
|
|
18517
18517
|
}
|
|
18518
|
-
let { controller: a, untrack: s } =
|
|
18518
|
+
let { controller: a, untrack: s } = dn(n);
|
|
18519
18519
|
return G.agent.stream(e, i, a.signal).finally(s);
|
|
18520
18520
|
},
|
|
18521
18521
|
release() {
|
|
18522
18522
|
if (G.refCount--, G.refCount <= 0) {
|
|
18523
|
-
|
|
18523
|
+
fn(), Ke = !0, l && (x.flush?.(), l.flush(), l.dispose()), $t && $t.dispose();
|
|
18524
18524
|
let e = G.mcpClosers.splice(0);
|
|
18525
18525
|
e.length && Promise.allSettled(e.map((e) => e())), FC.delete(n);
|
|
18526
18526
|
}
|
|
@@ -18548,7 +18548,7 @@ function BC(e, n, r) {
|
|
|
18548
18548
|
if ((e.provider ?? "openai") === "anthropic") throw Error("[page-agent-sdk][setLlm] 切换到 Anthropic 需传 BaseChatModel 实例(动态 import 无法同步);请先 const { ChatAnthropic } = await import(\"@langchain/anthropic\") 构造实例后传入");
|
|
18549
18549
|
n = te(e);
|
|
18550
18550
|
}
|
|
18551
|
-
typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), by(n, { emit:
|
|
18551
|
+
typeof n.bindTools != "function" && e.debug && console.warn("[page-agent-sdk][setLlm] 新模型不支持 bindTools(tool calling 会失效)"), by(n, { emit: Jt }), y = t;
|
|
18552
18552
|
let r = vy(t) ? void 0 : t;
|
|
18553
18553
|
if (m = D({
|
|
18554
18554
|
model: r?.model ?? t.model ?? t.modelName,
|
|
@@ -18556,31 +18556,31 @@ function BC(e, n, r) {
|
|
|
18556
18556
|
maxOutputTokens: e.maxOutputTokens ?? r?.maxOutputTokens,
|
|
18557
18557
|
vision: r?.vision ?? t.vision
|
|
18558
18558
|
}), m.contextWindow < 2e5) throw Error(`[page-agent-sdk][setLlm] 新模型上下文窗口 ${m.contextWindow} 小于最小支持 ${S}(需 ≥200K 窗口模型)`);
|
|
18559
|
-
G.agent && (G.agent.setLlm(n), G.agent.setModelCaps?.(m)),
|
|
18559
|
+
G.agent && (G.agent.setLlm(n), G.agent.setModelCaps?.(m)), nn?.setContextWindow?.(m.contextWindow), Rt?.setContextWindow?.(m.contextWindow), G.infoTick.value++, e.debug && console.log("[page-agent-sdk][setLlm] 重解析 modelCaps + 回灌:", m);
|
|
18560
18560
|
},
|
|
18561
18561
|
setMemory(e) {
|
|
18562
|
-
|
|
18562
|
+
ie.reset(e), typeof e == "function" && ie.refresh(), G.infoTick.value++;
|
|
18563
18563
|
},
|
|
18564
18564
|
refreshMemory() {
|
|
18565
|
-
return
|
|
18565
|
+
return ie.refresh();
|
|
18566
18566
|
},
|
|
18567
18567
|
setSubagents(t) {
|
|
18568
|
-
if (!
|
|
18568
|
+
if (!Nt) {
|
|
18569
18569
|
e.debug && console.warn("[page-agent-sdk][setSubagents] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
|
|
18570
18570
|
return;
|
|
18571
18571
|
}
|
|
18572
|
-
|
|
18572
|
+
Nt.set(t), G.infoTick.value++;
|
|
18573
18573
|
},
|
|
18574
18574
|
addSubagent(t) {
|
|
18575
|
-
if (!
|
|
18575
|
+
if (!Nt) {
|
|
18576
18576
|
e.debug && console.warn("[page-agent-sdk][addSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略");
|
|
18577
18577
|
return;
|
|
18578
18578
|
}
|
|
18579
|
-
|
|
18579
|
+
Nt.add(t), G.infoTick.value++;
|
|
18580
18580
|
},
|
|
18581
18581
|
removeSubagent(t) {
|
|
18582
|
-
if (!
|
|
18583
|
-
let n =
|
|
18582
|
+
if (!Nt) return e.debug && console.warn("[page-agent-sdk][removeSubagent] 未配 subagents:[] 或 capabilities.subagent 关闭,忽略"), !1;
|
|
18583
|
+
let n = Nt.remove(t);
|
|
18584
18584
|
return n && G.infoTick.value++, n;
|
|
18585
18585
|
},
|
|
18586
18586
|
getActiveSubagents() {
|
|
@@ -18601,7 +18601,7 @@ function BC(e, n, r) {
|
|
|
18601
18601
|
schema: e.schema,
|
|
18602
18602
|
source: Oe.get(e.name) || "user"
|
|
18603
18603
|
})),
|
|
18604
|
-
skills: (
|
|
18604
|
+
skills: (Yt ? Yt.controller.get() : e.skills ?? []).map((e) => ({
|
|
18605
18605
|
name: e.name,
|
|
18606
18606
|
description: e.description
|
|
18607
18607
|
})),
|
|
@@ -18615,16 +18615,16 @@ function BC(e, n, r) {
|
|
|
18615
18615
|
summaryThresholdRatio: h.summaryThresholdRatio ?? .5,
|
|
18616
18616
|
promptSoftCap: Sh(m.contextWindow, h.promptSoftCapTokens)
|
|
18617
18617
|
},
|
|
18618
|
-
memory:
|
|
18618
|
+
memory: ie.get(),
|
|
18619
18619
|
staleReadsInvalidated: G.agent?.getStaleReadsInvalidated?.() ?? 0,
|
|
18620
|
-
hostReadsInvalidated:
|
|
18620
|
+
hostReadsInvalidated: Vt.readsInvalidated,
|
|
18621
18621
|
...Re ? { proposals: Re.snapshot() } : {},
|
|
18622
18622
|
...r ? { hostWatch: { ...r } } : {},
|
|
18623
18623
|
llmRetries: G.agent?.getLlmRetries?.() ?? 0,
|
|
18624
18624
|
llmCallFailures: G.agent?.getLlmCallFailures?.() ?? 0,
|
|
18625
18625
|
gates: G.agent?.getGateStats?.(),
|
|
18626
18626
|
systemSegments: G.agent?.getLastSystemSegments?.() ?? [],
|
|
18627
|
-
middleware:
|
|
18627
|
+
middleware: an.map((e) => e.name),
|
|
18628
18628
|
todos: (G.agent?.getState?.()?.todos ?? []).map((e) => ({
|
|
18629
18629
|
id: e.id,
|
|
18630
18630
|
content: e.content,
|
|
@@ -18637,28 +18637,28 @@ function BC(e, n, r) {
|
|
|
18637
18637
|
planPhase: C.getPlanPhase(),
|
|
18638
18638
|
mission: ot ? T.getMission() : void 0,
|
|
18639
18639
|
planConfirmation: A.lastPlanConfirmation,
|
|
18640
|
-
workingMemory: st ?
|
|
18641
|
-
focus: Xe ?
|
|
18642
|
-
focuses: Xe ?
|
|
18640
|
+
workingMemory: st ? re.getWorkingMemory() : void 0,
|
|
18641
|
+
focus: Xe ? ne.getFocus() : void 0,
|
|
18642
|
+
focuses: Xe ? ne.getFocuses() : [],
|
|
18643
18643
|
actions: fC(e.actions ?? {}),
|
|
18644
18644
|
subagent: {
|
|
18645
|
-
enabled: !!
|
|
18645
|
+
enabled: !!Dt,
|
|
18646
18646
|
maxDepth: e.subagent?.maxDepth ?? 1,
|
|
18647
18647
|
maxParallel: e.subagent?.maxParallel ?? 4,
|
|
18648
18648
|
timeoutMs: e.subagent?.timeoutMs === void 0 ? 18e5 : e.subagent.timeoutMs > 0 ? e.subagent.timeoutMs : 0,
|
|
18649
18649
|
allowedTools: e.subagent?.allowedTools ?? [],
|
|
18650
|
-
subagents: (
|
|
18650
|
+
subagents: (Nt?.get() ?? []).map(Pt),
|
|
18651
18651
|
active: mt?.getActive() ?? [],
|
|
18652
18652
|
history: mt?.getHistory() ?? [],
|
|
18653
|
-
lockedComponents:
|
|
18653
|
+
lockedComponents: kt?.locked() ?? {}
|
|
18654
18654
|
},
|
|
18655
18655
|
verify: {
|
|
18656
|
-
enabled: !!
|
|
18656
|
+
enabled: !!Lt,
|
|
18657
18657
|
maxAttempts: vt ? ht : 0,
|
|
18658
18658
|
adversarial: vt && !!e.verify?.adversarial
|
|
18659
18659
|
},
|
|
18660
18660
|
context: (() => {
|
|
18661
|
-
let e =
|
|
18661
|
+
let e = Rt?.getSnapshot();
|
|
18662
18662
|
if (e) {
|
|
18663
18663
|
let t = G.agent?.getState?.()?.lastCompression;
|
|
18664
18664
|
t && (e.compression = t);
|
|
@@ -18721,31 +18721,31 @@ function BC(e, n, r) {
|
|
|
18721
18721
|
T.setMission(t), G.infoTick.value++;
|
|
18722
18722
|
},
|
|
18723
18723
|
getFocus() {
|
|
18724
|
-
return Xe ?
|
|
18724
|
+
return Xe ? ne.getFocus() : void 0;
|
|
18725
18725
|
},
|
|
18726
18726
|
getFocuses() {
|
|
18727
|
-
return Xe ?
|
|
18727
|
+
return Xe ? ne.getFocuses() : [];
|
|
18728
18728
|
},
|
|
18729
18729
|
setFocus(t) {
|
|
18730
18730
|
let n = zC(t, "setFocus", Xe, () => Ce()?.schema, e.debug);
|
|
18731
|
-
return n.ok ? (
|
|
18731
|
+
return n.ok ? (ne.setFocus(P(t)), e.debug && ne.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
|
|
18732
18732
|
},
|
|
18733
18733
|
addFocus(t) {
|
|
18734
18734
|
let n = zC(t, "addFocus", Xe, () => Ce()?.schema, e.debug);
|
|
18735
|
-
return n.ok ?
|
|
18735
|
+
return n.ok ? ne.getFocuses().length >= 8 ? (e.debug && console.warn("[page-agent-sdk][focus] addFocus 拒绝:焦点数已达上限 8(augmentPrompt 注入每焦点子树 schema,过多致 system prompt 超预算)"), {
|
|
18736
18736
|
ok: !1,
|
|
18737
18737
|
error: "焦点数上限 8(避免 system prompt 撑爆)"
|
|
18738
|
-
}) : (
|
|
18738
|
+
}) : (ne.addFocus(P(t)), e.debug && ne.isInvokeActive() && console.info("[page-agent-sdk][focus] 在途流程进行中,聚焦将在下一次输入生效(当前流程不受影响)"), G.infoTick.value++, { ok: !0 }) : n;
|
|
18739
18739
|
},
|
|
18740
18740
|
removeFocus(e) {
|
|
18741
|
-
Xe && (
|
|
18741
|
+
Xe && (ne.removeFocus(e), G.infoTick.value++);
|
|
18742
18742
|
},
|
|
18743
18743
|
clearFocus() {
|
|
18744
|
-
Xe && (
|
|
18744
|
+
Xe && (ne.clearFocus(), G.infoTick.value++);
|
|
18745
18745
|
},
|
|
18746
18746
|
setQuote(e, t, n) {
|
|
18747
18747
|
let r = yu(e ?? ""), i = Mu(n);
|
|
18748
|
-
|
|
18748
|
+
pn.value = r ? {
|
|
18749
18749
|
text: r,
|
|
18750
18750
|
...t ? { source: t } : {},
|
|
18751
18751
|
...i ? { anchor: i } : {}
|
|
@@ -18753,18 +18753,18 @@ function BC(e, n, r) {
|
|
|
18753
18753
|
},
|
|
18754
18754
|
notifyHostChange(e) {
|
|
18755
18755
|
let t = typeof e?.reason == "string" ? e.reason.trim().slice(0, 200) : "";
|
|
18756
|
-
|
|
18756
|
+
Vt.epoch += 1, t && !Vt.notices.includes(t) ? Vt.notices.push(t) : t || Vt.notices.push(""), Vt.notices.length > 5 && Vt.notices.splice(0, Vt.notices.length - 5), G.agent?.debugLogs?.value?.push({
|
|
18757
18757
|
timestamp: Date.now(),
|
|
18758
18758
|
type: "middleware",
|
|
18759
18759
|
data: {
|
|
18760
18760
|
stage: "host_change_notified",
|
|
18761
|
-
epoch:
|
|
18761
|
+
epoch: Vt.epoch,
|
|
18762
18762
|
reason: t || void 0
|
|
18763
18763
|
}
|
|
18764
18764
|
}), G.infoTick.value++;
|
|
18765
18765
|
},
|
|
18766
18766
|
clearQuote() {
|
|
18767
|
-
|
|
18767
|
+
pn.value = null;
|
|
18768
18768
|
},
|
|
18769
18769
|
resolveProposal(e, t, n) {
|
|
18770
18770
|
let r = Re ? Re.resolve(e, t, n) : !1;
|
|
@@ -18774,13 +18774,13 @@ function BC(e, n, r) {
|
|
|
18774
18774
|
return Re ? Re.snapshot() : null;
|
|
18775
18775
|
}
|
|
18776
18776
|
};
|
|
18777
|
-
async function
|
|
18777
|
+
async function mn() {
|
|
18778
18778
|
if (!l) return;
|
|
18779
18779
|
let t = async (e) => {
|
|
18780
18780
|
try {
|
|
18781
18781
|
return await l.load(n, e);
|
|
18782
18782
|
} catch (t) {
|
|
18783
|
-
|
|
18783
|
+
Jt({
|
|
18784
18784
|
type: "error",
|
|
18785
18785
|
message: `会话快照读取失败,已降级空会话:${t instanceof Error ? t.message : String(t)}`,
|
|
18786
18786
|
severity: "observable",
|
|
@@ -18793,7 +18793,7 @@ function BC(e, n, r) {
|
|
|
18793
18793
|
try {
|
|
18794
18794
|
return await l.listSessions(n);
|
|
18795
18795
|
} catch (e) {
|
|
18796
|
-
return
|
|
18796
|
+
return Jt({
|
|
18797
18797
|
type: "error",
|
|
18798
18798
|
message: `会话列表读取失败,已降级新建会话:${e instanceof Error ? e.message : String(e)}`,
|
|
18799
18799
|
severity: "observable",
|
|
@@ -18801,7 +18801,7 @@ function BC(e, n, r) {
|
|
|
18801
18801
|
}), [];
|
|
18802
18802
|
}
|
|
18803
18803
|
}, i = Symbol("storage-ready-timeout");
|
|
18804
|
-
await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"),
|
|
18804
|
+
await Promise.race([l.ready.then(() => "ready"), new Promise((e) => setTimeout(() => e(i), 5e3))]) === i && (console.warn("[page-agent-sdk][persist] 存储初始化 5s 未就绪(可能被其他标签页锁住),已放行;持久化暂降级内存,就绪后自动恢复"), Jt({
|
|
18805
18805
|
type: "error",
|
|
18806
18806
|
message: "存储初始化 5s 未就绪(IDB blocked?),已放行降级运行",
|
|
18807
18807
|
severity: "observable",
|
|
@@ -18811,7 +18811,7 @@ function BC(e, n, r) {
|
|
|
18811
18811
|
if (a.id) {
|
|
18812
18812
|
G.sessionId = a.id;
|
|
18813
18813
|
let e = await t(G.sessionId);
|
|
18814
|
-
e ? (G.applySnapshot(e),
|
|
18814
|
+
e ? (G.applySnapshot(e), Jt({
|
|
18815
18815
|
type: "session_restored",
|
|
18816
18816
|
sessionId: G.sessionId,
|
|
18817
18817
|
rounds: e.messages?.length ?? 0
|
|
@@ -18821,19 +18821,19 @@ function BC(e, n, r) {
|
|
|
18821
18821
|
if (e.debug && console.log("[page-agent-sdk][restore] listSessions", n, i.length, i.map((e) => e.sessionId)), i.length) {
|
|
18822
18822
|
G.sessionId = i[0].sessionId;
|
|
18823
18823
|
let n = await t(G.sessionId);
|
|
18824
|
-
n ? (G.applySnapshot(n),
|
|
18824
|
+
n ? (G.applySnapshot(n), Jt({
|
|
18825
18825
|
type: "session_restored",
|
|
18826
18826
|
sessionId: G.sessionId,
|
|
18827
18827
|
rounds: n.messages?.length ?? 0
|
|
18828
18828
|
}), e.debug && console.log("[page-agent-sdk][restore] 恢复会话", G.sessionId, `${n.messages?.length ?? 0} msgs`)) : e.debug && console.log("[page-agent-sdk][restore] 会话 meta 存在但快照为空", G.sessionId);
|
|
18829
18829
|
} else G.sessionId = await l.createSession(n, a.title), e.debug && console.log("[page-agent-sdk][restore] 新建会话(无历史)", G.sessionId);
|
|
18830
18830
|
} else G.sessionId = await l.createSession(n, a.title);
|
|
18831
|
-
e.memory &&
|
|
18831
|
+
e.memory && bn.persistSave({ memory: ie.get() || (typeof e.memory == "string" ? e.memory : "") }), bn.refreshSessions();
|
|
18832
18832
|
}
|
|
18833
|
-
async function
|
|
18834
|
-
await
|
|
18833
|
+
async function hn() {
|
|
18834
|
+
await tn();
|
|
18835
18835
|
}
|
|
18836
|
-
function
|
|
18836
|
+
function gn(e) {
|
|
18837
18837
|
let t = {};
|
|
18838
18838
|
for (let n of jC(e)) {
|
|
18839
18839
|
let e = x.files[n];
|
|
@@ -18841,15 +18841,15 @@ function BC(e, n, r) {
|
|
|
18841
18841
|
}
|
|
18842
18842
|
return t;
|
|
18843
18843
|
}
|
|
18844
|
-
function
|
|
18844
|
+
function _n() {
|
|
18845
18845
|
let e = MC(x.files, jC(b));
|
|
18846
18846
|
for (let t of e) delete x.files[t];
|
|
18847
18847
|
}
|
|
18848
|
-
function
|
|
18849
|
-
let e = uh(b,
|
|
18848
|
+
function vn() {
|
|
18849
|
+
let e = uh(b, on);
|
|
18850
18850
|
if (!e.trimmed) return;
|
|
18851
18851
|
let { older: t, summary: n } = e;
|
|
18852
|
-
if (
|
|
18852
|
+
if (Jt({
|
|
18853
18853
|
type: "context_trimmed",
|
|
18854
18854
|
dropped: t.map((e) => ({
|
|
18855
18855
|
round: e.round,
|
|
@@ -18857,43 +18857,43 @@ function BC(e, n, r) {
|
|
|
18857
18857
|
assistant: e.assistantMsgs.map((e) => e.content),
|
|
18858
18858
|
steps: e.assistantMsgs.flatMap((e) => e.steps ?? [])
|
|
18859
18859
|
})),
|
|
18860
|
-
vfsResults:
|
|
18860
|
+
vfsResults: gn(t.flatMap((e) => [e.userMsg, ...e.assistantMsgs])),
|
|
18861
18861
|
summary: n.content,
|
|
18862
18862
|
reason: "max_memory_rounds"
|
|
18863
|
-
}), b.splice(e.deleteFrom, e.deleteCount, n),
|
|
18863
|
+
}), b.splice(e.deleteFrom, e.deleteCount, n), _n(), g && d) {
|
|
18864
18864
|
let n = e.summary, { prevSeg: r } = e;
|
|
18865
18865
|
(async () => {
|
|
18866
18866
|
try {
|
|
18867
18867
|
let e = await d(_h(t, v)), i = b.indexOf(n);
|
|
18868
18868
|
if (i < 0) return;
|
|
18869
|
-
b[i].content = lh(t, r, e),
|
|
18869
|
+
b[i].content = lh(t, r, e), bn.persistRuntime();
|
|
18870
18870
|
} catch {}
|
|
18871
18871
|
})();
|
|
18872
18872
|
}
|
|
18873
18873
|
}
|
|
18874
|
-
let
|
|
18874
|
+
let yn = hu({
|
|
18875
18875
|
getConfig: () => e.images,
|
|
18876
18876
|
getVision: () => m.vision === !0,
|
|
18877
|
-
emit:
|
|
18877
|
+
emit: Jt,
|
|
18878
18878
|
getVfsStore: () => G.vfsStore,
|
|
18879
|
-
noteFailure: (e, t) =>
|
|
18880
|
-
}),
|
|
18879
|
+
noteFailure: (e, t) => bn.notePersistFailure(e, t)
|
|
18880
|
+
}), bn = yb({
|
|
18881
18881
|
agentId: n,
|
|
18882
18882
|
options: e,
|
|
18883
|
-
emit:
|
|
18883
|
+
emit: Jt,
|
|
18884
18884
|
getStore: () => l,
|
|
18885
18885
|
core: G,
|
|
18886
|
-
sessionsRef:
|
|
18886
|
+
sessionsRef: cn,
|
|
18887
18887
|
sessionVars: A,
|
|
18888
18888
|
messages: b,
|
|
18889
18889
|
getUsage: () => a,
|
|
18890
18890
|
mw: {
|
|
18891
18891
|
todosMw: C,
|
|
18892
|
-
memoryMw:
|
|
18892
|
+
memoryMw: ie,
|
|
18893
18893
|
missionMw: T,
|
|
18894
|
-
workingMemoryMw:
|
|
18895
|
-
focusMw:
|
|
18896
|
-
summarizationMw:
|
|
18894
|
+
workingMemoryMw: re,
|
|
18895
|
+
focusMw: ne,
|
|
18896
|
+
summarizationMw: nn,
|
|
18897
18897
|
resumeNoticeMw: k,
|
|
18898
18898
|
useMission: ot,
|
|
18899
18899
|
useWorkingMemory: st,
|
|
@@ -18903,13 +18903,13 @@ function BC(e, n, r) {
|
|
|
18903
18903
|
vfsStore: x,
|
|
18904
18904
|
checkpointMgr: z,
|
|
18905
18905
|
conflictResolve: (e) => o.resolve(e),
|
|
18906
|
-
abortAllActive:
|
|
18906
|
+
abortAllActive: fn,
|
|
18907
18907
|
titleLlmInvoke: f
|
|
18908
18908
|
});
|
|
18909
18909
|
return G.initDone = (async () => {
|
|
18910
|
-
await
|
|
18910
|
+
await mn(), await hn(), e.mcp?.length && Xg({
|
|
18911
18911
|
servers: e.mcp,
|
|
18912
|
-
emit:
|
|
18912
|
+
emit: Jt,
|
|
18913
18913
|
isReleased: () => Ke,
|
|
18914
18914
|
core: {
|
|
18915
18915
|
mcpClosers: G.mcpClosers,
|
|
@@ -18931,12 +18931,12 @@ function BC(e, n, r) {
|
|
|
18931
18931
|
},
|
|
18932
18932
|
debug: e.debug
|
|
18933
18933
|
});
|
|
18934
|
-
let t = vy(e.llm) ? e.llm : await
|
|
18935
|
-
by(t, { emit:
|
|
18934
|
+
let t = vy(e.llm) ? e.llm : await F(e.llm);
|
|
18935
|
+
by(t, { emit: Jt }), G.agent = yp({
|
|
18936
18936
|
llm: t,
|
|
18937
18937
|
systemPrompt: ve,
|
|
18938
18938
|
tools: W,
|
|
18939
|
-
middleware:
|
|
18939
|
+
middleware: an,
|
|
18940
18940
|
maxToolRounds: e.maxToolRounds,
|
|
18941
18941
|
hasSubagent: pt,
|
|
18942
18942
|
pageAssertionGate: V.domInspect === !0,
|
|
@@ -18958,7 +18958,7 @@ function BC(e, n, r) {
|
|
|
18958
18958
|
y = e;
|
|
18959
18959
|
},
|
|
18960
18960
|
debug: e.debug
|
|
18961
|
-
}),
|
|
18961
|
+
}), ae.current = G.agent, Mt && Mt.setReconfigureHook(() => {
|
|
18962
18962
|
G.agent && G.agent.setTools(it());
|
|
18963
18963
|
});
|
|
18964
18964
|
})(), G;
|
|
@@ -19839,13 +19839,13 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
19839
19839
|
}, te = (e, t) => {
|
|
19840
19840
|
let [, n] = A(), r = { xt: n };
|
|
19841
19841
|
return M(r), n && !t && j(r, e ? o : i), r;
|
|
19842
|
-
},
|
|
19842
|
+
}, ne = (e, t, n) => {
|
|
19843
19843
|
let r = { Ht: t };
|
|
19844
19844
|
return M(r), t && !n && j(r, i), r;
|
|
19845
|
-
}, [
|
|
19845
|
+
}, [P, F] = y ? OD(g, ee) : [], re = !b && DD(g, N, { ft: !0 }), [ie, ae] = TD(g, !1, ne, {
|
|
19846
19846
|
ct: m,
|
|
19847
19847
|
et: m
|
|
19848
|
-
}),
|
|
19848
|
+
}), oe = b && nw && new nw(((e) => {
|
|
19849
19849
|
let t = e[e.length - 1].contentRect;
|
|
19850
19850
|
N({
|
|
19851
19851
|
_t: !0,
|
|
@@ -19854,8 +19854,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
19854
19854
|
}));
|
|
19855
19855
|
return [
|
|
19856
19856
|
() => {
|
|
19857
|
-
|
|
19858
|
-
let e =
|
|
19857
|
+
oe && oe.observe(g);
|
|
19858
|
+
let e = re && re(), t = P && P(), n = ie(), r = O.G(((e) => {
|
|
19859
19859
|
let [, t] = A();
|
|
19860
19860
|
j({
|
|
19861
19861
|
Et: e,
|
|
@@ -19864,7 +19864,7 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
19864
19864
|
}, s);
|
|
19865
19865
|
}));
|
|
19866
19866
|
return () => {
|
|
19867
|
-
|
|
19867
|
+
oe && oe.disconnect(), e && e(), t && t(), l && l(), n(), r();
|
|
19868
19868
|
};
|
|
19869
19869
|
},
|
|
19870
19870
|
({ Dt: e, zt: t, It: n }) => {
|
|
@@ -19883,8 +19883,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
19883
19883
|
l = e(), c = t;
|
|
19884
19884
|
}
|
|
19885
19885
|
if (S && (j.O(), uw(x) || ow(x) ? (i = x, a = !1, o = pD, s = mD) : pw(x) ? (i = x.mutation, a = x.resize, o = x.event, s = x.env) : (i = !1, a = !1, o = !1, s = !1)), w) {
|
|
19886
|
-
let e =
|
|
19887
|
-
e && Xw(r,
|
|
19886
|
+
let e = ae(), t = F && F(), n = c && c();
|
|
19887
|
+
e && Xw(r, ne(e[0], e[1], w)), t && Xw(r, ee(t[0], w)), n && Xw(r, te(n[0], w));
|
|
19888
19888
|
}
|
|
19889
19889
|
return M(r), r;
|
|
19890
19890
|
},
|
|
@@ -20013,21 +20013,21 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20013
20013
|
}, O = (e) => {
|
|
20014
20014
|
let { Rt: t } = n, r = UT(h)[c] - UT(g)[c], i = 1 / T * e / r;
|
|
20015
20015
|
D(i * t[l]);
|
|
20016
|
-
}, k = r[i], A = v(), j = C(), M = A[a], ee = w(A, j) + M / 2, N = k - j[o] - ee, te = m ? 0 : N,
|
|
20017
|
-
ww(
|
|
20018
|
-
},
|
|
20019
|
-
QT(f, t,
|
|
20016
|
+
}, k = r[i], A = v(), j = C(), M = A[a], ee = w(A, j) + M / 2, N = k - j[o] - ee, te = m ? 0 : N, ne = (e) => {
|
|
20017
|
+
ww(re), _.releasePointerCapture(e.pointerId);
|
|
20018
|
+
}, P = m || e, F = p(), re = [
|
|
20019
|
+
QT(f, t, ne),
|
|
20020
20020
|
QT(f, "selectstart", ((e) => eE(e)), { D: !1 }),
|
|
20021
|
-
QT(h, t,
|
|
20022
|
-
|
|
20023
|
-
|
|
20021
|
+
QT(h, t, ne),
|
|
20022
|
+
P && QT(h, "pointermove", ((e) => O(te + e[i] - k))),
|
|
20023
|
+
P && (() => {
|
|
20024
20024
|
let e = rE(d);
|
|
20025
|
-
|
|
20025
|
+
F();
|
|
20026
20026
|
let t = rE(d), n = {
|
|
20027
20027
|
x: t.x - e.x,
|
|
20028
20028
|
y: t.y - e.y
|
|
20029
20029
|
};
|
|
20030
|
-
(qC(n.x) > 3 || qC(n.y) > 3) && (p(), nE(d, e), x(n), y(
|
|
20030
|
+
(qC(n.x) > 3 || qC(n.y) > 3) && (p(), nE(d, e), x(n), y(F));
|
|
20031
20031
|
})
|
|
20032
20032
|
];
|
|
20033
20033
|
if (_.setPointerCapture(r.pointerId), e) O(N);
|
|
@@ -20035,9 +20035,9 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20035
20035
|
let e = gE(lD);
|
|
20036
20036
|
if (e) {
|
|
20037
20037
|
let { Vt: t } = n, r = e(D, O, Ww(w), N, t[l], S, !!s, ((e) => {
|
|
20038
|
-
e ?
|
|
20038
|
+
e ? F() : yw(re, F);
|
|
20039
20039
|
}));
|
|
20040
|
-
yw(
|
|
20040
|
+
yw(re, r), yw(u, Ww(r, !0));
|
|
20041
20041
|
}
|
|
20042
20042
|
}
|
|
20043
20043
|
}
|
|
@@ -20091,7 +20091,7 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20091
20091
|
}, ID = (e, t, n, r, i, a, o) => {
|
|
20092
20092
|
let s, c, l, u, d, f = $w, p = 0, m = ["mouse", "pen"], h = (e) => (t) => {
|
|
20093
20093
|
n.Kt || e(t);
|
|
20094
|
-
}, g = (e) => m.includes(e.pointerType), [_, v] = Gw(), [y, b] = Gw(100), [x, S] = Gw(50), [C, w] = Gw((() => p)), [T, E] = PD(e, a, i, FD(t, a, i, h, ((e) => g(e) &&
|
|
20094
|
+
}, g = (e) => m.includes(e.pointerType), [_, v] = Gw(), [y, b] = Gw(100), [x, S] = Gw(50), [C, w] = Gw((() => p)), [T, E] = PD(e, a, i, FD(t, a, i, h, ((e) => g(e) && ne()))), { vt: D, Qt: O, bt: k } = a, { Ft: A, Ut: j, Nt: M, qt: ee, Bt: N } = T, te = (e, t) => {
|
|
20095
20095
|
w();
|
|
20096
20096
|
let r = (e) => {
|
|
20097
20097
|
n.Kt || A(QE, e);
|
|
@@ -20101,45 +20101,45 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20101
20101
|
let e = !l || !s;
|
|
20102
20102
|
p > 0 && !t ? C(Ww(r, e)) : r(e);
|
|
20103
20103
|
}
|
|
20104
|
-
},
|
|
20104
|
+
}, ne = () => {
|
|
20105
20105
|
(l ? !s : !u) && (te(!0), y((() => {
|
|
20106
20106
|
te(!1);
|
|
20107
20107
|
})));
|
|
20108
|
-
},
|
|
20108
|
+
}, P = (e) => {
|
|
20109
20109
|
g(e) && (s = !0, !n.Kt && l && te(!0));
|
|
20110
|
-
},
|
|
20110
|
+
}, F = (e) => {
|
|
20111
20111
|
g(e) && (s = !1, !n.Kt && l && te(!1));
|
|
20112
|
-
},
|
|
20112
|
+
}, re = (e) => {
|
|
20113
20113
|
A(ZE, e, !0), A(ZE, e, !1);
|
|
20114
|
-
},
|
|
20114
|
+
}, ie = [
|
|
20115
20115
|
w,
|
|
20116
20116
|
b,
|
|
20117
20117
|
S,
|
|
20118
20118
|
v,
|
|
20119
20119
|
() => f(),
|
|
20120
|
-
QT(D, "pointerover",
|
|
20121
|
-
QT(D, "pointerenter",
|
|
20122
|
-
QT(D, "pointerleave",
|
|
20120
|
+
QT(D, "pointerover", P, { A: !0 }),
|
|
20121
|
+
QT(D, "pointerenter", P),
|
|
20122
|
+
QT(D, "pointerleave", F),
|
|
20123
20123
|
QT(D, "pointermove", h(((e) => {
|
|
20124
|
-
g(e) && c &&
|
|
20124
|
+
g(e) && c && ne();
|
|
20125
20125
|
}))),
|
|
20126
20126
|
QT(O, "scroll", h(((e) => {
|
|
20127
20127
|
_((() => {
|
|
20128
|
-
M(),
|
|
20128
|
+
M(), ne();
|
|
20129
20129
|
})), o(e), N();
|
|
20130
20130
|
})))
|
|
20131
|
-
],
|
|
20131
|
+
], ae = gE(cD);
|
|
20132
20132
|
return [
|
|
20133
|
-
() => Ww(ww, yw(
|
|
20133
|
+
() => Ww(ww, yw(ie, E())),
|
|
20134
20134
|
({ Dt: e, It: t, Zt: n, tn: a }) => {
|
|
20135
|
-
let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = CD(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D,
|
|
20136
|
-
let r = e.includes(Rw) && (
|
|
20135
|
+
let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = CD(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, ne] = e("scrollbars.theme"), [P, F] = e("scrollbars.visibility"), [ie, oe] = e("scrollbars.autoHide"), [se, ce] = e("scrollbars.autoHideSuspend"), [le] = e("scrollbars.autoHideDelay"), [I, L] = e("scrollbars.dragScroll"), [ue, de] = e("scrollbars.clickScroll"), [fe, R] = e("overflow"), pe = v && !t, me = o || s || g || _ || t, z = m || F || R, B = T && b.x && b.y, V = !S && !ae, he = B || V, ge = (e, t, n) => {
|
|
20136
|
+
let r = e.includes(Rw) && (P === Iw || P === "auto" && t === Rw);
|
|
20137
20137
|
return A(qE, r, n), r;
|
|
20138
20138
|
};
|
|
20139
|
-
if (p =
|
|
20140
|
-
f = QT(O, Rw, h(Ww(
|
|
20141
|
-
}))) :
|
|
20142
|
-
let e = ge(
|
|
20139
|
+
if (p = le, (E || V) && A(BE, he), ne && (A(d), A(D, !0), d = D), (ce || pe) && (re(!se), pe && se && (w.x || w.y ? (f(), x((() => {
|
|
20140
|
+
f = QT(O, Rw, h(Ww(re, !0)), { A: !0 });
|
|
20141
|
+
}))) : re(!0))), oe && (c = ie === "move", l = ie === "leave", u = ie === "never", te(u, !0)), L && A(tD, I), de && A(eD, !!ue), z) {
|
|
20142
|
+
let e = ge(fe.x, C.x, !0), t = ge(fe.y, C.y, !1);
|
|
20143
20143
|
A(JE, !(e && t));
|
|
20144
20144
|
}
|
|
20145
20145
|
me && (M(), j(), N(), g && ee(), A(XE, !w.x, !0), A(XE, !w.y, !1), A(HE, y && !k));
|
|
@@ -20156,13 +20156,13 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20156
20156
|
k,
|
|
20157
20157
|
j,
|
|
20158
20158
|
A
|
|
20159
|
-
].map(((e) => mw(e) && !yT(e) && e)), N = (e) => e && _w(ee, e), te = !N(k) && C(k) ? k : p,
|
|
20159
|
+
].map(((e) => mw(e) && !yT(e) && e)), N = (e) => e && _w(ee, e), te = !N(k) && C(k) ? k : p, ne = E ? g : k, P = {
|
|
20160
20160
|
dt: p,
|
|
20161
20161
|
vt: A,
|
|
20162
20162
|
L: k,
|
|
20163
20163
|
ln: j,
|
|
20164
20164
|
ht: M,
|
|
20165
|
-
gt:
|
|
20165
|
+
gt: ne,
|
|
20166
20166
|
Qt: E ? h : k,
|
|
20167
20167
|
an: m ? g : te,
|
|
20168
20168
|
Gt: h,
|
|
@@ -20172,31 +20172,31 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20172
20172
|
un: _,
|
|
20173
20173
|
yt: (e) => uT(k, EE, e),
|
|
20174
20174
|
wt: (e, t) => lT(k, EE, e, t),
|
|
20175
|
-
St: () => lT(
|
|
20176
|
-
}, { dt:
|
|
20177
|
-
aT(
|
|
20178
|
-
}],
|
|
20175
|
+
St: () => lT(ne, EE, jE, !0)
|
|
20176
|
+
}, { dt: F, vt: re, ln: ie, L: ae, ht: oe } = P, se = [() => {
|
|
20177
|
+
aT(re, [wE, xE]), aT(F, xE), m && aT(g, [xE, wE]);
|
|
20178
|
+
}], ce = vT([
|
|
20179
|
+
oe,
|
|
20179
20180
|
ae,
|
|
20180
20181
|
ie,
|
|
20181
20182
|
re,
|
|
20182
|
-
|
|
20183
|
-
|
|
20184
|
-
].find(((e) => e && !N(e)))), ce = E ? I : ae || ie, L = Ww(ww, oe);
|
|
20183
|
+
F
|
|
20184
|
+
].find(((e) => e && !N(e)))), le = E ? F : oe || ae, I = Ww(ww, se);
|
|
20185
20185
|
return [
|
|
20186
|
-
|
|
20186
|
+
P,
|
|
20187
20187
|
() => {
|
|
20188
20188
|
let e = _(), t = xT(), r = (e) => {
|
|
20189
20189
|
wT(yT(e), vT(e)), CT(e);
|
|
20190
20190
|
}, i = (e) => QT(e, "focusin focusout focus blur", tE, {
|
|
20191
20191
|
I: !0,
|
|
20192
20192
|
D: !1
|
|
20193
|
-
}), a = "tabindex", o = nT(
|
|
20194
|
-
return iT(
|
|
20195
|
-
let e = xT(), t = N(
|
|
20196
|
-
aT(
|
|
20197
|
-
}]), n && !T && (cT(
|
|
20193
|
+
}), a = "tabindex", o = nT(ae, a), s = i(t);
|
|
20194
|
+
return iT(re, wE, T ? "" : TE), iT(ie, PE, ""), iT(ae, EE, ""), iT(oe, FE, ""), T || (iT(ae, a, o || "-1"), m && iT(g, CE, "")), wT(le, ce), wT(re, ie), wT(ie || re, !T && ae), wT(ae, oe), yw(se, [s, () => {
|
|
20195
|
+
let e = xT(), t = N(ae), n = t && e === ae ? F : e, s = i(n);
|
|
20196
|
+
aT(ie, PE), aT(oe, FE), aT(ae, EE), m && aT(g, CE), o ? iT(ae, a, o) : aT(ae, a), N(oe) && r(oe), t && r(ae), N(ie) && r(ie), cE(n), s();
|
|
20197
|
+
}]), n && !T && (cT(ae, EE, ME), yw(se, Ww(aT, ae, EE))), cE(!T && m && t === F && e.top === e ? ae : t), s(), ce = 0, I;
|
|
20198
20198
|
},
|
|
20199
|
-
|
|
20199
|
+
I
|
|
20200
20200
|
];
|
|
20201
20201
|
}, RD = ({ ht: e }) => ({ Zt: t, fn: n, It: r }) => {
|
|
20202
20202
|
let { $t: i } = t || {}, { Ot: a } = n;
|
|
@@ -20324,20 +20324,20 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20324
20324
|
Iw,
|
|
20325
20325
|
Lw,
|
|
20326
20326
|
Rw
|
|
20327
|
-
].map(((t) =>
|
|
20328
|
-
u(n), u(Yw(e).map(((t) =>
|
|
20327
|
+
].map(((t) => re(oD(t), e))), n = t(!0).concat(t()).join(" ");
|
|
20328
|
+
u(n), u(Yw(e).map(((t) => re(e[t], t === "x"))).join(" "), !0);
|
|
20329
20329
|
}, [T, E] = HC(_, Ww(KT, a)), [D, O] = HC(_, Ww(GT, a)), [k, A] = HC(_), [j] = HC(v), [M, ee] = HC(_), [N] = HC(v), [te] = HC({
|
|
20330
20330
|
i: (e, t) => Bw(e, t, Cw(vw(Yw(e), Yw(t)))),
|
|
20331
20331
|
o: {}
|
|
20332
|
-
}), [
|
|
20332
|
+
}), [ne, P] = HC({
|
|
20333
20333
|
i: (e, t) => Hw(e.T, t.T) && Hw(e.k, t.k),
|
|
20334
20334
|
o: iE()
|
|
20335
|
-
}),
|
|
20335
|
+
}), F = gE(cD), re = (e, t) => `${t ? DE : OE}${zw(e)}`;
|
|
20336
20336
|
return ({ Dt: o, Zt: s, fn: c, It: l }, { dn: h }) => {
|
|
20337
|
-
let { _t: g, Ht: _, xt: v, Ct:
|
|
20338
|
-
if (
|
|
20337
|
+
let { _t: g, Ht: _, xt: v, Ct: re, ft: ie, Et: ae } = s || {}, { X: oe, Y: se, W: ce } = F && F.R(e, t, c, n, o) || {}, [le, I] = rD(o, n), [L, ue] = o("overflow"), de = iD(L.x), fe = iD(L.y), R = g || h || v || re || ae || I, pe = E(l), me = O(l), z = A(l), B = ee(l);
|
|
20338
|
+
if (I && f && u(ME, !le), R) {
|
|
20339
20339
|
uT(r, wE, SE) && y(!0);
|
|
20340
|
-
let e =
|
|
20340
|
+
let e = se && se(), [t] = pe = T(l), [n] = me = D(l), i = WT(a), o = p && HT(d()), s = {
|
|
20341
20341
|
w: m(n.w + t.w),
|
|
20342
20342
|
h: m(n.h + t.h)
|
|
20343
20343
|
}, c = {
|
|
@@ -20349,8 +20349,8 @@ var zE = "os-trinsic-observer", BE = "os-theme-none", VE = "os-scrollbar", HE =
|
|
|
20349
20349
|
let [V, he] = B, [ge, H] = z, [_e, ve] = me, [U, ye] = pe, [be] = j({
|
|
20350
20350
|
x: ge.w > 0,
|
|
20351
20351
|
y: ge.h > 0
|
|
20352
|
-
}), xe =
|
|
20353
|
-
y(!1), Se && (w(Oe), Oe = sD(a, be),
|
|
20352
|
+
}), xe = de && fe && (be.x || be.y) || de && be.x && !be.y || fe && be.y && !be.x, Se = h || re || ae || ye || ve || he || H || ue || I || R || _ && p, [Ce] = o("update.flowDirectionStyles"), [we, Te] = te(Ce ? Ce(a) || {} : b(), l), [Ee, De] = re || ie || Te || l ? ne(x(we, !!Ce), l) : P(), Oe = C(be, L);
|
|
20353
|
+
y(!1), Se && (w(Oe), Oe = sD(a, be), ce && oe && (oe(Oe, _e, U), FT(a, ce(Oe))));
|
|
20354
20354
|
let [ke, Ae] = N(Oe);
|
|
20355
20355
|
return lT(r, wE, SE, xe), lT(i, PE, SE, xe), Xw(t, {
|
|
20356
20356
|
rn: ke,
|
|
@@ -21391,12 +21391,12 @@ function iO(e = {}) {
|
|
|
21391
21391
|
};
|
|
21392
21392
|
}), x = pc(() => (n.messages.length, typeof e.canUndo == "function" && !!e.canUndo())), S = () => {
|
|
21393
21393
|
e.onUndo?.() && (n.error = null);
|
|
21394
|
-
}, C = (e) => new Date(e).toLocaleTimeString(
|
|
21394
|
+
}, C = (e) => new Date(e).toLocaleTimeString(le, {
|
|
21395
21395
|
hour: "2-digit",
|
|
21396
21396
|
minute: "2-digit"
|
|
21397
21397
|
}), w = () => {
|
|
21398
21398
|
let e = T.value, t = M.value;
|
|
21399
|
-
!o.value.trim() && !e.length || (r(o.value,
|
|
21399
|
+
!o.value.trim() && !e.length || (r(o.value, F.value, e.length ? [...e] : void 0, t ?? void 0), o.value = "", T.value = [], t && N());
|
|
21400
21400
|
}, T = /* @__PURE__ */ Rn([]), E = /* @__PURE__ */ Rn(""), D = /* @__PURE__ */ Rn(!1), O, k = (e) => {
|
|
21401
21401
|
E.value = e, clearTimeout(O), O = setTimeout(() => {
|
|
21402
21402
|
E.value = "";
|
|
@@ -21406,16 +21406,16 @@ function iO(e = {}) {
|
|
|
21406
21406
|
if (!t.length) return;
|
|
21407
21407
|
let n = 4 - T.value.length;
|
|
21408
21408
|
if (n <= 0) {
|
|
21409
|
-
k(`${
|
|
21409
|
+
k(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`);
|
|
21410
21410
|
return;
|
|
21411
21411
|
}
|
|
21412
|
-
t.length > n && k(`${
|
|
21412
|
+
t.length > n && k(`${I.imageCountLimitPrefix}4${I.imageCountLimitSuffix}`), D.value = !0;
|
|
21413
21413
|
try {
|
|
21414
21414
|
for (let e of t.slice(0, n)) try {
|
|
21415
21415
|
let t = await fu(e, { name: e.name });
|
|
21416
21416
|
T.value.push(t);
|
|
21417
21417
|
} catch (e) {
|
|
21418
|
-
k(e instanceof tu ? `${e.message}` :
|
|
21418
|
+
k(e instanceof tu ? `${e.message}` : I.imageInvalid);
|
|
21419
21419
|
}
|
|
21420
21420
|
} finally {
|
|
21421
21421
|
D.value = !1;
|
|
@@ -21428,23 +21428,23 @@ function iO(e = {}) {
|
|
|
21428
21428
|
e.onClearQuote?.();
|
|
21429
21429
|
}, te = (e) => {
|
|
21430
21430
|
e.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), w());
|
|
21431
|
-
},
|
|
21431
|
+
}, ne = (e) => {
|
|
21432
21432
|
o.value = a.value[e] || "", i(e);
|
|
21433
|
-
},
|
|
21433
|
+
}, P = (e) => {
|
|
21434
21434
|
let t = n.messages, r = t[e];
|
|
21435
21435
|
if (!r || r.role !== "assistant") return !1;
|
|
21436
21436
|
let i = "reasoning" in r ? r.reasoning : void 0, a = "steps" in r ? r.steps : void 0;
|
|
21437
21437
|
return n.loading && e === t.length - 1 && !r.content && !i && !(a && a.length);
|
|
21438
|
-
},
|
|
21438
|
+
}, F = pc(() => (e.infoTick?.value, e.getFocuses?.() ?? [])), re = pc(() => (e.infoTick?.value, e.getInfo?.()?.planConfirmation)), ie = (t) => e.onAddFocus ? e.onAddFocus(t) : {
|
|
21439
21439
|
ok: !1,
|
|
21440
21440
|
error: "focus 未启用"
|
|
21441
|
-
},
|
|
21441
|
+
}, ae = (t) => {
|
|
21442
21442
|
e.onRemoveFocus?.(t);
|
|
21443
|
-
},
|
|
21443
|
+
}, oe = () => {
|
|
21444
21444
|
e.onClearFocus?.();
|
|
21445
|
-
},
|
|
21445
|
+
}, se = (t) => {
|
|
21446
21446
|
e.onFocusChipClick?.(t);
|
|
21447
|
-
},
|
|
21447
|
+
}, ce = QD(e.icons), le = e.locale ?? "zh-CN", I = nO(le, e.dialogMessages);
|
|
21448
21448
|
return {
|
|
21449
21449
|
chat: t,
|
|
21450
21450
|
inputText: o,
|
|
@@ -21475,17 +21475,17 @@ function iO(e = {}) {
|
|
|
21475
21475
|
quote: M,
|
|
21476
21476
|
setQuote: ee,
|
|
21477
21477
|
clearQuote: N,
|
|
21478
|
-
editQueued:
|
|
21479
|
-
isPendingAssistant:
|
|
21480
|
-
focuses:
|
|
21481
|
-
planConfirmation:
|
|
21482
|
-
addFocus:
|
|
21483
|
-
removeFocus:
|
|
21484
|
-
clearFocus:
|
|
21485
|
-
focusChipClick:
|
|
21486
|
-
icons:
|
|
21487
|
-
locale:
|
|
21488
|
-
messages:
|
|
21478
|
+
editQueued: ne,
|
|
21479
|
+
isPendingAssistant: P,
|
|
21480
|
+
focuses: F,
|
|
21481
|
+
planConfirmation: re,
|
|
21482
|
+
addFocus: ie,
|
|
21483
|
+
removeFocus: ae,
|
|
21484
|
+
clearFocus: oe,
|
|
21485
|
+
focusChipClick: se,
|
|
21486
|
+
icons: ce,
|
|
21487
|
+
locale: le,
|
|
21488
|
+
messages: I,
|
|
21489
21489
|
toolStepView: e.toolStepView
|
|
21490
21490
|
};
|
|
21491
21491
|
}
|
|
@@ -21776,20 +21776,20 @@ function Dk() {
|
|
|
21776
21776
|
}
|
|
21777
21777
|
}, A = function() {
|
|
21778
21778
|
return T ||= (w = wk(u, i), !0), w;
|
|
21779
|
-
}, j = n, M = j.implementation, ee = j.createNodeIterator, N = j.createDocumentFragment, te = j.getElementsByTagName,
|
|
21779
|
+
}, j = n, M = j.implementation, ee = j.createNodeIterator, N = j.createDocumentFragment, te = j.getElementsByTagName, ne = r.importNode, P = Tk();
|
|
21780
21780
|
t.isSupported = typeof fO == "function" && typeof g == "function" && M && M.createHTMLDocument !== void 0;
|
|
21781
|
-
let
|
|
21781
|
+
let F = ck, re = lk, ie = uk, ae = dk, oe = fk, se = mk, ce = hk, le = _k, I = pk, L = null, ue = GO({}, [
|
|
21782
21782
|
...ZO,
|
|
21783
21783
|
...QO,
|
|
21784
21784
|
...$O,
|
|
21785
21785
|
...tk,
|
|
21786
21786
|
...rk
|
|
21787
|
-
]),
|
|
21787
|
+
]), de = null, fe = GO({}, [
|
|
21788
21788
|
...ik,
|
|
21789
21789
|
...ak,
|
|
21790
21790
|
...ok,
|
|
21791
21791
|
...sk
|
|
21792
|
-
]),
|
|
21792
|
+
]), R = Object.seal(yO(null, {
|
|
21793
21793
|
tagNameCheck: {
|
|
21794
21794
|
writable: !0,
|
|
21795
21795
|
configurable: !1,
|
|
@@ -21864,19 +21864,19 @@ function Dk() {
|
|
|
21864
21864
|
}, tt = function() {
|
|
21865
21865
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
21866
21866
|
if (Qe && Qe === e) return;
|
|
21867
|
-
(!e || typeof e != "object") && (e = {}), e = qO(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? AO : kO,
|
|
21867
|
+
(!e || typeof e != "object") && (e = {}), e = qO(e), Ye = Xe.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Ze = Ye === "application/xhtml+xml" ? AO : kO, L = Ek(e, "ALLOWED_TAGS", ue, { transform: Ze }), de = Ek(e, "ALLOWED_ATTR", fe, { transform: Ze }), He = Ek(e, "ALLOWED_NAMESPACES", Ue, { transform: AO }), Fe = Ek(e, "ADD_URI_SAFE_ATTR", Ie, {
|
|
21868
21868
|
transform: Ze,
|
|
21869
21869
|
base: Ie
|
|
21870
21870
|
}), Ne = Ek(e, "ADD_DATA_URI_TAGS", Pe, {
|
|
21871
21871
|
transform: Ze,
|
|
21872
21872
|
base: Pe
|
|
21873
|
-
}), je = Ek(e, "FORBID_CONTENTS", Me, { transform: Ze }), pe = Ek(e, "FORBID_TAGS", qO({}), { transform: Ze }), me = Ek(e, "FORBID_ATTR", qO({}), { transform: Ze }), Ae = zO(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? qO(e.USE_PROFILES) : e.USE_PROFILES : !1, B = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Ce = e.RETURN_DOM_FRAGMENT || !1, we = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, Te = e.SANITIZE_DOM !== !1, Ee = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1,
|
|
21873
|
+
}), je = Ek(e, "FORBID_CONTENTS", Me, { transform: Ze }), pe = Ek(e, "FORBID_TAGS", qO({}), { transform: Ze }), me = Ek(e, "FORBID_ATTR", qO({}), { transform: Ze }), Ae = zO(e, "USE_PROFILES") ? e.USE_PROFILES && typeof e.USE_PROFILES == "object" ? qO(e.USE_PROFILES) : e.USE_PROFILES : !1, B = e.ALLOW_ARIA_ATTR !== !1, V = e.ALLOW_DATA_ATTR !== !1, he = e.ALLOW_UNKNOWN_PROTOCOLS || !1, ge = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, H = e.SAFE_FOR_TEMPLATES || !1, _e = e.SAFE_FOR_XML !== !1, ve = e.WHOLE_DOCUMENT || !1, Se = e.RETURN_DOM || !1, Ce = e.RETURN_DOM_FRAGMENT || !1, we = e.RETURN_TRUSTED_TYPE || !1, xe = e.FORCE_BODY || !1, Te = e.SANITIZE_DOM !== !1, Ee = e.SANITIZE_NAMED_PROPS || !1, Oe = e.KEEP_CONTENT !== !1, ke = e.IN_PLACE || !1, I = XO(e.ALLOWED_URI_REGEXP) ? e.ALLOWED_URI_REGEXP : pk, Be = typeof e.NAMESPACE == "string" ? e.NAMESPACE : ze, Ge = zO(e, "MATHML_TEXT_INTEGRATION_POINTS") && e.MATHML_TEXT_INTEGRATION_POINTS && typeof e.MATHML_TEXT_INTEGRATION_POINTS == "object" ? qO(e.MATHML_TEXT_INTEGRATION_POINTS) : GO({}, We), qe = zO(e, "HTML_INTEGRATION_POINTS") && e.HTML_INTEGRATION_POINTS && typeof e.HTML_INTEGRATION_POINTS == "object" ? qO(e.HTML_INTEGRATION_POINTS) : GO({}, Ke);
|
|
21874
21874
|
let t = zO(e, "CUSTOM_ELEMENT_HANDLING") && e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING == "object" ? qO(e.CUSTOM_ELEMENT_HANDLING) : yO(null);
|
|
21875
|
-
if (
|
|
21875
|
+
if (R = yO(null), zO(t, "tagNameCheck") && et(t.tagNameCheck) && (R.tagNameCheck = t.tagNameCheck), zO(t, "attributeNameCheck") && et(t.attributeNameCheck) && (R.attributeNameCheck = t.attributeNameCheck), zO(t, "allowCustomizedBuiltInElements") && typeof t.allowCustomizedBuiltInElements == "boolean" && (R.allowCustomizedBuiltInElements = t.allowCustomizedBuiltInElements), vO(R), H && (V = !1), Ce && (Se = !0), Ae && (L = GO({}, rk), de = yO(null), Ae.html === !0 && (GO(L, ZO), GO(de, ik)), Ae.svg === !0 && (GO(L, QO), GO(de, ak), GO(de, sk)), Ae.svgFilters === !0 && (GO(L, $O), GO(de, ak), GO(de, sk)), Ae.mathMl === !0 && (GO(L, tk), GO(de, ok), GO(de, sk))), z.tagCheck = null, z.attributeCheck = null, zO(e, "ADD_TAGS") && (typeof e.ADD_TAGS == "function" ? z.tagCheck = e.ADD_TAGS : OO(e.ADD_TAGS) && (L === ue && (L = qO(L)), GO(L, e.ADD_TAGS, Ze))), zO(e, "ADD_ATTR") && (typeof e.ADD_ATTR == "function" ? z.attributeCheck = e.ADD_ATTR : OO(e.ADD_ATTR) && (de === fe && (de = qO(de)), GO(de, e.ADD_ATTR, Ze))), zO(e, "ADD_URI_SAFE_ATTR") && OO(e.ADD_URI_SAFE_ATTR) && GO(Fe, e.ADD_URI_SAFE_ATTR, Ze), zO(e, "FORBID_CONTENTS") && OO(e.FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.FORBID_CONTENTS, Ze)), zO(e, "ADD_FORBID_CONTENTS") && OO(e.ADD_FORBID_CONTENTS) && (je === Me && (je = qO(je)), GO(je, e.ADD_FORBID_CONTENTS, Ze)), Oe && (L["#text"] = !0), ve && GO(L, [
|
|
21876
21876
|
"html",
|
|
21877
21877
|
"head",
|
|
21878
21878
|
"body"
|
|
21879
|
-
]),
|
|
21879
|
+
]), L.table && (GO(L, ["tbody"]), delete pe.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
21880
21880
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw HO("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
21881
21881
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw HO("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
21882
21882
|
let t = S;
|
|
@@ -21955,7 +21955,7 @@ function Dk() {
|
|
|
21955
21955
|
let t = v(e);
|
|
21956
21956
|
if (t) for (let n = t.length - 1; n >= 0; --n) {
|
|
21957
21957
|
let r = t[n], i = r && r.name;
|
|
21958
|
-
if (!(typeof i != "string" ||
|
|
21958
|
+
if (!(typeof i != "string" || de[Ze(i)])) try {
|
|
21959
21959
|
e.removeAttribute(i);
|
|
21960
21960
|
} catch {}
|
|
21961
21961
|
}
|
|
@@ -22011,7 +22011,7 @@ function Dk() {
|
|
|
22011
22011
|
let t = x ? x(e) : e.ownerDocument;
|
|
22012
22012
|
return ee.call(t || e, e, c.SHOW_ELEMENT | c.SHOW_COMMENT | c.SHOW_TEXT | c.SHOW_PROCESSING_INSTRUCTION | c.SHOW_CDATA_SECTION, null);
|
|
22013
22013
|
}, ht = function(e) {
|
|
22014
|
-
return e = MO(e,
|
|
22014
|
+
return e = MO(e, F, " "), e = MO(e, re, " "), e = MO(e, ie, " "), e;
|
|
22015
22015
|
}, gt = function(e) {
|
|
22016
22016
|
e.normalize();
|
|
22017
22017
|
let t = x ? x(e) : e.ownerDocument, n = ee.call(t || e, e, c.SHOW_TEXT | c.SHOW_COMMENT | c.SHOW_CDATA_SECTION | c.SHOW_PROCESSING_INSTRUCTION, null), r = n.nextNode();
|
|
@@ -22046,7 +22046,7 @@ function Dk() {
|
|
|
22046
22046
|
let xt = function(e, t) {
|
|
22047
22047
|
return !!(_e && e.hasChildNodes() && !yt(e.firstElementChild) && VO(vk, e.textContent) && VO(vk, e.innerHTML) || _e && e.namespaceURI === ze && t === "style" && yt(e.firstElementChild) || e.nodeType === Sk.processingInstruction || _e && e.nodeType === Sk.comment && VO(yk, e.data));
|
|
22048
22048
|
}, St = function(e, t, n) {
|
|
22049
|
-
if (!pe[t] && Dt(t) && (
|
|
22049
|
+
if (!pe[t] && Dt(t) && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, t) || R.tagNameCheck instanceof Function && R.tagNameCheck(t))) return !1;
|
|
22050
22050
|
if (Oe && !je[t]) {
|
|
22051
22051
|
let t = g(e), r = h(e);
|
|
22052
22052
|
if (r && t) {
|
|
@@ -22061,31 +22061,31 @@ function Dk() {
|
|
|
22061
22061
|
}, Ct = function(e, t, n, r) {
|
|
22062
22062
|
return e.length === 0 ? t : t === n || t === r ? qO(t) : t;
|
|
22063
22063
|
}, wt = function(e, n) {
|
|
22064
|
-
if (bt(
|
|
22064
|
+
if (bt(P.beforeSanitizeElements, e, null), e !== n && g(e) === null) return ke && dt(e), !0;
|
|
22065
22065
|
if (_t(e)) return st(e), !0;
|
|
22066
22066
|
let r = Ze(b ? b(e) : e.nodeName);
|
|
22067
|
-
if (
|
|
22067
|
+
if (L = Ct(P.uponSanitizeElement, L, ue, ye), bt(P.uponSanitizeElement, e, {
|
|
22068
22068
|
tagName: r,
|
|
22069
|
-
allowedTags:
|
|
22069
|
+
allowedTags: L
|
|
22070
22070
|
}), e !== n && g(e) === null) return ke && dt(e), !0;
|
|
22071
22071
|
if (xt(e, r)) return st(e), !0;
|
|
22072
|
-
if (pe[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !
|
|
22072
|
+
if (pe[r] || !(z.tagCheck instanceof Function && z.tagCheck(r)) && !L[r]) {
|
|
22073
22073
|
let t = St(e, r, n);
|
|
22074
|
-
return t === !1 && bt(
|
|
22074
|
+
return t === !1 && bt(P.afterSanitizeElements, e, null), t;
|
|
22075
22075
|
}
|
|
22076
22076
|
if ((y ? y(e) : e.nodeType) === Sk.element && !ot(e) || (r === "noscript" || r === "noembed" || r === "noframes") && VO(bk, e.innerHTML)) return st(e), !0;
|
|
22077
22077
|
if (H && e.nodeType === Sk.text) {
|
|
22078
22078
|
let n = ht(e.textContent);
|
|
22079
22079
|
e.textContent !== n && (EO(t.removed, { element: e.cloneNode() }), e.textContent = n);
|
|
22080
22080
|
}
|
|
22081
|
-
return bt(
|
|
22081
|
+
return bt(P.afterSanitizeElements, e, null), !1;
|
|
22082
22082
|
}, Tt = function(e, t, r) {
|
|
22083
22083
|
if (me[t] || _e && t === "patchsrc" || _e && t === "for" && e !== "label" && e !== "output" || Te && (t === "id" || t === "name") && (r in n || r in $e)) return !1;
|
|
22084
|
-
let i =
|
|
22085
|
-
if (!(V && VO(
|
|
22084
|
+
let i = de[t] || z.attributeCheck instanceof Function && z.attributeCheck(t, e);
|
|
22085
|
+
if (!(V && VO(ae, t)) && !(B && VO(oe, t))) {
|
|
22086
22086
|
if (!i) {
|
|
22087
|
-
if (!(Dt(e) && (
|
|
22088
|
-
} else if (!Fe[t] && !VO(
|
|
22087
|
+
if (!(Dt(e) && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, e) || R.tagNameCheck instanceof Function && R.tagNameCheck(e)) && (R.attributeNameCheck instanceof RegExp && VO(R.attributeNameCheck, t) || R.attributeNameCheck instanceof Function && R.attributeNameCheck(t, e)) || t === "is" && R.allowCustomizedBuiltInElements && (R.tagNameCheck instanceof RegExp && VO(R.tagNameCheck, r) || R.tagNameCheck instanceof Function && R.tagNameCheck(r)))) return !1;
|
|
22088
|
+
} else if (!Fe[t] && !VO(I, MO(r, ce, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && NO(r, "data:") === 0 && Ne[e]) && !(he && !VO(se, MO(r, ce, ""))) && r) return !1;
|
|
22089
22089
|
}
|
|
22090
22090
|
return !0;
|
|
22091
22091
|
}, Et = GO({}, [
|
|
@@ -22098,7 +22098,7 @@ function Dk() {
|
|
|
22098
22098
|
"font-face-uri",
|
|
22099
22099
|
"missing-glyph"
|
|
22100
22100
|
]), Dt = function(e) {
|
|
22101
|
-
return !Et[kO(e)] && VO(
|
|
22101
|
+
return !Et[kO(e)] && VO(le, e);
|
|
22102
22102
|
}, Ot = function(e, t, n, r) {
|
|
22103
22103
|
if (S && typeof u == "object" && typeof u.getAttributeType == "function" && !n) switch (u.getAttributeType(e, t)) {
|
|
22104
22104
|
case "TrustedHTML": return O(r);
|
|
@@ -22112,20 +22112,20 @@ function Dk() {
|
|
|
22112
22112
|
lt(n, e);
|
|
22113
22113
|
}
|
|
22114
22114
|
}, At = function(e) {
|
|
22115
|
-
bt(
|
|
22115
|
+
bt(P.beforeSanitizeAttributes, e, null);
|
|
22116
22116
|
let t = e.attributes;
|
|
22117
22117
|
if (!t || _t(e)) return;
|
|
22118
|
-
|
|
22118
|
+
de = Ct(P.uponSanitizeAttribute, de, fe, be);
|
|
22119
22119
|
let n = {
|
|
22120
22120
|
attrName: "",
|
|
22121
22121
|
attrValue: "",
|
|
22122
22122
|
keepAttr: !0,
|
|
22123
|
-
allowedAttributes:
|
|
22123
|
+
allowedAttributes: de,
|
|
22124
22124
|
forceKeepAttr: void 0
|
|
22125
22125
|
}, r = t.length, i = Ze(e.nodeName);
|
|
22126
22126
|
for (; r--;) {
|
|
22127
22127
|
let a = t[r], o = a.name, s = a.namespaceURI, c = a.value, l = Ze(o), u = c, d = o === "value" ? u : PO(u);
|
|
22128
|
-
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(
|
|
22128
|
+
if (n.attrName = l, n.attrValue = d, n.keepAttr = !0, n.forceKeepAttr = void 0, bt(P.uponSanitizeAttribute, e, n), d = n.attrValue, Ee && (l === "id" || l === "name") && NO(d, De) !== 0 && (lt(o, e), d = De + d), _e && VO(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, d)) {
|
|
22129
22129
|
lt(o, e);
|
|
22130
22130
|
continue;
|
|
22131
22131
|
}
|
|
@@ -22149,14 +22149,14 @@ function Dk() {
|
|
|
22149
22149
|
d = Ot(i, l, s, d), d !== u && kt(e, o, s, d);
|
|
22150
22150
|
}
|
|
22151
22151
|
}
|
|
22152
|
-
bt(
|
|
22152
|
+
bt(P.afterSanitizeAttributes, e, null);
|
|
22153
22153
|
}, jt = function(e) {
|
|
22154
22154
|
let t = null, n = mt(e);
|
|
22155
|
-
for (bt(
|
|
22155
|
+
for (bt(P.beforeSanitizeShadowDOM, e, null); t = n.nextNode();) if (bt(P.uponSanitizeShadowNode, t, null), wt(t, e), At(t), vt(t.content) && jt(t.content), (y ? y(t) : t.nodeType) === Sk.element) {
|
|
22156
22156
|
let e = _(t);
|
|
22157
22157
|
vt(e) && (Mt(e), jt(e));
|
|
22158
22158
|
}
|
|
22159
|
-
bt(
|
|
22159
|
+
bt(P.afterSanitizeShadowDOM, e, null);
|
|
22160
22160
|
}, Mt = function(e) {
|
|
22161
22161
|
let t = [{
|
|
22162
22162
|
node: e,
|
|
@@ -22199,14 +22199,14 @@ function Dk() {
|
|
|
22199
22199
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, a = null, o = null, s = null;
|
|
22200
22200
|
if (Ve = !e, Ve && (e = "<!-->"), typeof e != "string" && !yt(e) && (e = JO(e), typeof e != "string")) throw HO("dirty is not a string, aborting");
|
|
22201
22201
|
if (!t.isSupported) return e;
|
|
22202
|
-
U ? (
|
|
22202
|
+
U ? (L = ye, de = be) : tt(n), (P.uponSanitizeElement.length > 0 || P.uponSanitizeAttribute.length > 0) && (L = qO(L)), P.uponSanitizeAttribute.length > 0 && (de = qO(de)), t.removed = [];
|
|
22203
22203
|
let c = ke && typeof e != "string" && yt(e);
|
|
22204
22204
|
if (c) {
|
|
22205
22205
|
ft(e);
|
|
22206
22206
|
let t = b ? b(e) : e.nodeName;
|
|
22207
22207
|
if (typeof t == "string") {
|
|
22208
22208
|
let n = Ze(t);
|
|
22209
|
-
if (!
|
|
22209
|
+
if (!L[n] || pe[n]) throw ct(e), HO("root node is forbidden and cannot be sanitized in-place");
|
|
22210
22210
|
}
|
|
22211
22211
|
if (_t(e)) throw ct(e), HO("root node is clobbered and cannot be sanitized in-place");
|
|
22212
22212
|
try {
|
|
@@ -22235,13 +22235,13 @@ function Dk() {
|
|
|
22235
22235
|
if (Se) {
|
|
22236
22236
|
if (H && gt(i), Ce) for (s = N.call(i.ownerDocument); i.firstChild;) s.appendChild(i.firstChild);
|
|
22237
22237
|
else s = i;
|
|
22238
|
-
return (
|
|
22238
|
+
return (de.shadowroot || de.shadowrootmode) && (s = ne.call(r, s, !0)), s;
|
|
22239
22239
|
}
|
|
22240
22240
|
let u = ve ? i.outerHTML : i.innerHTML;
|
|
22241
|
-
return ve &&
|
|
22241
|
+
return ve && L["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && VO(gk, i.ownerDocument.doctype.name) && (u = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + u), H && (u = ht(u)), S && we ? O(u) : u;
|
|
22242
22242
|
}, t.setConfig = function() {
|
|
22243
22243
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
22244
|
-
tt(e), U = !0, ye =
|
|
22244
|
+
tt(e), U = !0, ye = L, be = de;
|
|
22245
22245
|
}, t.clearConfig = function() {
|
|
22246
22246
|
Qe = null, U = !1, ye = null, be = null, S = w, C = "";
|
|
22247
22247
|
}, t.isValidAttribute = function(e, t, n) {
|
|
@@ -22249,19 +22249,19 @@ function Dk() {
|
|
|
22249
22249
|
let r = Ze(e), i = Ze(t);
|
|
22250
22250
|
return Tt(r, i, n);
|
|
22251
22251
|
}, t.addHook = function(e, t) {
|
|
22252
|
-
typeof t == "function" && zO(
|
|
22252
|
+
typeof t == "function" && zO(P, e) && EO(P[e], t);
|
|
22253
22253
|
}, t.removeHook = function(e, t) {
|
|
22254
|
-
if (zO(
|
|
22254
|
+
if (zO(P, e)) {
|
|
22255
22255
|
if (t !== void 0) {
|
|
22256
|
-
let n = wO(
|
|
22257
|
-
return n === -1 ? void 0 : DO(
|
|
22256
|
+
let n = wO(P[e], t);
|
|
22257
|
+
return n === -1 ? void 0 : DO(P[e], n, 1)[0];
|
|
22258
22258
|
}
|
|
22259
|
-
return TO(
|
|
22259
|
+
return TO(P[e]);
|
|
22260
22260
|
}
|
|
22261
22261
|
}, t.removeHooks = function(e) {
|
|
22262
|
-
zO(
|
|
22262
|
+
zO(P, e) && (P[e] = []);
|
|
22263
22263
|
}, t.removeAllHooks = function() {
|
|
22264
|
-
|
|
22264
|
+
P = Tk();
|
|
22265
22265
|
}, t;
|
|
22266
22266
|
}
|
|
22267
22267
|
var Ok = Dk();
|
|
@@ -24739,7 +24739,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24739
24739
|
end: "\"",
|
|
24740
24740
|
illegal: "\\n",
|
|
24741
24741
|
contains: [M]
|
|
24742
|
-
}, te = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ },
|
|
24742
|
+
}, te = { begin: /\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ }, ne = function(e, t, n = {}) {
|
|
24743
24743
|
let r = a({
|
|
24744
24744
|
scope: "comment",
|
|
24745
24745
|
begin: e,
|
|
@@ -24755,7 +24755,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24755
24755
|
});
|
|
24756
24756
|
let i = y("I", "a", "is", "so", "us", "to", "at", "if", "in", "it", "on", /[A-Za-z]+['](d|ve|re|ll|t|s|n)/, /[A-Za-z]+[-][a-z]+/, /[A-Za-z][a-z]{2,}/);
|
|
24757
24757
|
return r.contains.push({ begin: _(/[ ]+/, "(", i, /[.]?[:]?([.][ ]|[ ])/, "){3}") }), r;
|
|
24758
|
-
},
|
|
24758
|
+
}, P = ne("//", "$"), F = ne("/\\*", "\\*/"), re = ne("#", "$"), ie = /*#__PURE__*/ Object.freeze({
|
|
24759
24759
|
__proto__: null,
|
|
24760
24760
|
APOS_STRING_MODE: ee,
|
|
24761
24761
|
BACKSLASH_ESCAPE: M,
|
|
@@ -24765,9 +24765,9 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24765
24765
|
relevance: 0
|
|
24766
24766
|
},
|
|
24767
24767
|
BINARY_NUMBER_RE: k,
|
|
24768
|
-
COMMENT:
|
|
24769
|
-
C_BLOCK_COMMENT_MODE:
|
|
24770
|
-
C_LINE_COMMENT_MODE:
|
|
24768
|
+
COMMENT: ne,
|
|
24769
|
+
C_BLOCK_COMMENT_MODE: F,
|
|
24770
|
+
C_LINE_COMMENT_MODE: P,
|
|
24771
24771
|
C_NUMBER_MODE: {
|
|
24772
24772
|
scope: "number",
|
|
24773
24773
|
begin: O,
|
|
@@ -24784,7 +24784,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24784
24784
|
}
|
|
24785
24785
|
});
|
|
24786
24786
|
},
|
|
24787
|
-
HASH_COMMENT_MODE:
|
|
24787
|
+
HASH_COMMENT_MODE: re,
|
|
24788
24788
|
IDENT_RE: T,
|
|
24789
24789
|
MATCH_NOTHING_RE: w,
|
|
24790
24790
|
METHOD_GUARD: {
|
|
@@ -24824,28 +24824,28 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24824
24824
|
relevance: 0
|
|
24825
24825
|
}
|
|
24826
24826
|
});
|
|
24827
|
-
function ie(e, t) {
|
|
24828
|
-
e.input[e.index - 1] === "." && t.ignoreMatch();
|
|
24829
|
-
}
|
|
24830
24827
|
function ae(e, t) {
|
|
24831
|
-
e.
|
|
24828
|
+
e.input[e.index - 1] === "." && t.ignoreMatch();
|
|
24832
24829
|
}
|
|
24833
24830
|
function oe(e, t) {
|
|
24834
|
-
|
|
24831
|
+
e.className !== void 0 && (e.scope = e.className, delete e.className);
|
|
24835
24832
|
}
|
|
24836
24833
|
function se(e, t) {
|
|
24837
|
-
|
|
24834
|
+
t && e.beginKeywords && (e.begin = "\\b(" + e.beginKeywords.split(" ").join("|") + ")(?!\\.)(?=\\b|\\s)", e.__beforeBegin = ae, e.keywords = e.keywords || e.beginKeywords, delete e.beginKeywords, e.relevance === void 0 && (e.relevance = 0));
|
|
24838
24835
|
}
|
|
24839
24836
|
function ce(e, t) {
|
|
24837
|
+
Array.isArray(e.illegal) && (e.illegal = y(...e.illegal));
|
|
24838
|
+
}
|
|
24839
|
+
function le(e, t) {
|
|
24840
24840
|
if (e.match) {
|
|
24841
24841
|
if (e.begin || e.end) throw Error("begin & end are not supported with match");
|
|
24842
24842
|
e.begin = e.match, delete e.match;
|
|
24843
24843
|
}
|
|
24844
24844
|
}
|
|
24845
|
-
function
|
|
24845
|
+
function I(e, t) {
|
|
24846
24846
|
e.relevance === void 0 && (e.relevance = 1);
|
|
24847
24847
|
}
|
|
24848
|
-
var
|
|
24848
|
+
var L = (e, t) => {
|
|
24849
24849
|
if (!e.beforeMatch) return;
|
|
24850
24850
|
if (e.starts) throw Error("beforeMatch cannot be used with starts");
|
|
24851
24851
|
let n = Object.assign({}, e);
|
|
@@ -24855,7 +24855,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24855
24855
|
relevance: 0,
|
|
24856
24856
|
contains: [Object.assign(n, { endsParent: !0 })]
|
|
24857
24857
|
}, e.relevance = 0, delete n.beforeMatch;
|
|
24858
|
-
},
|
|
24858
|
+
}, ue = [
|
|
24859
24859
|
"of",
|
|
24860
24860
|
"and",
|
|
24861
24861
|
"for",
|
|
@@ -24867,24 +24867,24 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24867
24867
|
"parent",
|
|
24868
24868
|
"list",
|
|
24869
24869
|
"value"
|
|
24870
|
-
],
|
|
24871
|
-
function
|
|
24870
|
+
], de = "keyword";
|
|
24871
|
+
function fe(e, t, n = de) {
|
|
24872
24872
|
let r = Object.create(null);
|
|
24873
24873
|
return typeof e == "string" ? i(n, e.split(" ")) : Array.isArray(e) ? i(n, e) : Object.keys(e).forEach(function(n) {
|
|
24874
|
-
Object.assign(r,
|
|
24874
|
+
Object.assign(r, fe(e[n], t, n));
|
|
24875
24875
|
}), r;
|
|
24876
24876
|
function i(e, n) {
|
|
24877
24877
|
t && (n = n.map((e) => e.toLowerCase())), n.forEach(function(t) {
|
|
24878
24878
|
let n = t.split("|");
|
|
24879
|
-
r[n[0]] = [e,
|
|
24879
|
+
r[n[0]] = [e, R(n[0], n[1])];
|
|
24880
24880
|
});
|
|
24881
24881
|
}
|
|
24882
24882
|
}
|
|
24883
|
-
function
|
|
24883
|
+
function R(e, t) {
|
|
24884
24884
|
return t ? Number(t) : +!pe(e);
|
|
24885
24885
|
}
|
|
24886
24886
|
function pe(e) {
|
|
24887
|
-
return
|
|
24887
|
+
return ue.includes(e.toLowerCase());
|
|
24888
24888
|
}
|
|
24889
24889
|
var me = {}, z = (e) => {
|
|
24890
24890
|
console.error(e);
|
|
@@ -24982,17 +24982,17 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
24982
24982
|
let a = n;
|
|
24983
24983
|
if (n.isCompiled) return a;
|
|
24984
24984
|
[
|
|
24985
|
-
|
|
24986
|
-
|
|
24985
|
+
oe,
|
|
24986
|
+
le,
|
|
24987
24987
|
U,
|
|
24988
|
-
|
|
24988
|
+
L
|
|
24989
24989
|
].forEach((e) => e(n, r)), e.compilerExtensions.forEach((e) => e(n, r)), n.__beforeBegin = null, [
|
|
24990
|
-
oe,
|
|
24991
24990
|
se,
|
|
24992
|
-
|
|
24991
|
+
ce,
|
|
24992
|
+
I
|
|
24993
24993
|
].forEach((e) => e(n, r)), n.isCompiled = !0;
|
|
24994
24994
|
let s = null;
|
|
24995
|
-
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&=
|
|
24995
|
+
return typeof n.keywords == "object" && n.keywords.$pattern && (n.keywords = Object.assign({}, n.keywords), s = n.keywords.$pattern, delete n.keywords.$pattern), s ||= /\w+/, n.keywords &&= fe(n.keywords, e.case_insensitive), a.keywordPatternRe = t(s, !0), r && (n.begin ||= /\B|\b/, a.beginRe = t(a.begin), !n.end && !n.endsWithParent && (n.end = /\B|\b/), n.end && (a.endRe = t(a.end)), a.terminatorEnd = p(a.end) || "", n.endsWithParent && r.terminatorEnd && (a.terminatorEnd += (n.end ? "|" : "") + r.terminatorEnd)), n.illegal && (a.illegalRe = t(n.illegal)), n.contains ||= [], n.contains = [].concat(...n.contains.map(function(e) {
|
|
24996
24996
|
return xe(e === "self" ? n : e);
|
|
24997
24997
|
})), n.contains.forEach(function(e) {
|
|
24998
24998
|
o(e, a);
|
|
@@ -25048,9 +25048,9 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25048
25048
|
code: r,
|
|
25049
25049
|
language: i
|
|
25050
25050
|
};
|
|
25051
|
-
|
|
25051
|
+
re("before:highlight", a);
|
|
25052
25052
|
let o = a.result ? a.result : v(a.language, a.code, n);
|
|
25053
|
-
return o.code = a.code,
|
|
25053
|
+
return o.code = a.code, re("after:highlight", o), o;
|
|
25054
25054
|
}
|
|
25055
25055
|
function v(e, n, i, a) {
|
|
25056
25056
|
let c = Object.create(null);
|
|
@@ -25127,7 +25127,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25127
25127
|
if (e.endsWithParent) return _(e.parent, t, n);
|
|
25128
25128
|
}
|
|
25129
25129
|
function y(e) {
|
|
25130
|
-
return A.matcher.regexIndex === 0 ? (N += e[0], 1) : (
|
|
25130
|
+
return A.matcher.regexIndex === 0 ? (N += e[0], 1) : (F = !0, 0);
|
|
25131
25131
|
}
|
|
25132
25132
|
function b(e) {
|
|
25133
25133
|
let t = e[0], n = e.rule, i = new r(n), a = [n.__beforeBegin, n["on:begin"]];
|
|
@@ -25169,25 +25169,25 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25169
25169
|
if (e !== Ee) return e;
|
|
25170
25170
|
}
|
|
25171
25171
|
if (r.type === "illegal" && a === "") return N += "\n", 1;
|
|
25172
|
-
if (
|
|
25172
|
+
if (P > 1e5 && P > r.index * 3) throw /* @__PURE__ */ Error("potential infinite loop, way more iterations than matches");
|
|
25173
25173
|
return N += a, a.length;
|
|
25174
25174
|
}
|
|
25175
25175
|
let D = ee(e);
|
|
25176
25176
|
if (!D) throw z(s.replace("{}", e)), Error("Unknown language: \"" + e + "\"");
|
|
25177
25177
|
let O = ye(D), k = "", A = a || O, j = {}, M = new l.__emitter(l);
|
|
25178
25178
|
w();
|
|
25179
|
-
let N = "", te = 0,
|
|
25179
|
+
let N = "", te = 0, ne = 0, P = 0, F = !1;
|
|
25180
25180
|
try {
|
|
25181
25181
|
if (D.__emitTokens) D.__emitTokens(n, M);
|
|
25182
25182
|
else {
|
|
25183
25183
|
for (A.matcher.considerAll();;) {
|
|
25184
|
-
|
|
25184
|
+
P++, F ? F = !1 : A.matcher.considerAll(), A.matcher.lastIndex = ne;
|
|
25185
25185
|
let e = A.matcher.exec(n);
|
|
25186
25186
|
if (!e) break;
|
|
25187
|
-
let t = E(n.substring(
|
|
25188
|
-
|
|
25187
|
+
let t = E(n.substring(ne, e.index), e);
|
|
25188
|
+
ne = e.index + t;
|
|
25189
25189
|
}
|
|
25190
|
-
E(n.substring(
|
|
25190
|
+
E(n.substring(ne));
|
|
25191
25191
|
}
|
|
25192
25192
|
return M.finalize(), k = M.toHTML(), {
|
|
25193
25193
|
language: e,
|
|
@@ -25205,8 +25205,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25205
25205
|
relevance: 0,
|
|
25206
25206
|
_illegalBy: {
|
|
25207
25207
|
message: t.message,
|
|
25208
|
-
index:
|
|
25209
|
-
context: n.slice(
|
|
25208
|
+
index: ne,
|
|
25209
|
+
context: n.slice(ne - 100, ne + 100),
|
|
25210
25210
|
mode: t.mode,
|
|
25211
25211
|
resultSoFar: k
|
|
25212
25212
|
},
|
|
@@ -25255,7 +25255,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25255
25255
|
function w(e) {
|
|
25256
25256
|
let t = null, n = d(e);
|
|
25257
25257
|
if (u(n)) return;
|
|
25258
|
-
if (
|
|
25258
|
+
if (re("before:highlightElement", {
|
|
25259
25259
|
el: e,
|
|
25260
25260
|
language: n
|
|
25261
25261
|
}), e.dataset.highlighted) {
|
|
@@ -25275,7 +25275,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25275
25275
|
}, i.secondBest && (e.secondBest = {
|
|
25276
25276
|
language: i.secondBest.language,
|
|
25277
25277
|
relevance: i.secondBest.relevance
|
|
25278
|
-
}),
|
|
25278
|
+
}), re("after:highlightElement", {
|
|
25279
25279
|
el: e,
|
|
25280
25280
|
result: i,
|
|
25281
25281
|
text: r
|
|
@@ -25331,27 +25331,27 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25331
25331
|
let t = ee(e);
|
|
25332
25332
|
return t && !t.disableAutodetect;
|
|
25333
25333
|
}
|
|
25334
|
-
function
|
|
25334
|
+
function ne(e) {
|
|
25335
25335
|
e["before:highlightBlock"] && !e["before:highlightElement"] && (e["before:highlightElement"] = (t) => {
|
|
25336
25336
|
e["before:highlightBlock"](Object.assign({ block: t.el }, t));
|
|
25337
25337
|
}), e["after:highlightBlock"] && !e["after:highlightElement"] && (e["after:highlightElement"] = (t) => {
|
|
25338
25338
|
e["after:highlightBlock"](Object.assign({ block: t.el }, t));
|
|
25339
25339
|
});
|
|
25340
25340
|
}
|
|
25341
|
-
function
|
|
25342
|
-
|
|
25341
|
+
function P(e) {
|
|
25342
|
+
ne(e), a.push(e);
|
|
25343
25343
|
}
|
|
25344
|
-
function
|
|
25344
|
+
function F(e) {
|
|
25345
25345
|
let t = a.indexOf(e);
|
|
25346
25346
|
t !== -1 && a.splice(t, 1);
|
|
25347
25347
|
}
|
|
25348
|
-
function
|
|
25348
|
+
function re(e, t) {
|
|
25349
25349
|
let n = e;
|
|
25350
25350
|
a.forEach(function(e) {
|
|
25351
25351
|
e[n] && e[n](t);
|
|
25352
25352
|
});
|
|
25353
25353
|
}
|
|
25354
|
-
function
|
|
25354
|
+
function ae(e) {
|
|
25355
25355
|
return V("10.7.0", "highlightBlock will be removed entirely in v12.0"), V("10.7.0", "Please use highlightElement now."), w(e);
|
|
25356
25356
|
}
|
|
25357
25357
|
Object.assign(e, {
|
|
@@ -25359,7 +25359,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25359
25359
|
highlightAuto: S,
|
|
25360
25360
|
highlightAll: k,
|
|
25361
25361
|
highlightElement: w,
|
|
25362
|
-
highlightBlock:
|
|
25362
|
+
highlightBlock: ae,
|
|
25363
25363
|
configure: T,
|
|
25364
25364
|
initHighlighting: E,
|
|
25365
25365
|
initHighlightingOnLoad: D,
|
|
@@ -25370,8 +25370,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25370
25370
|
registerAliases: N,
|
|
25371
25371
|
autoDetection: te,
|
|
25372
25372
|
inherit: Te,
|
|
25373
|
-
addPlugin:
|
|
25374
|
-
removePlugin:
|
|
25373
|
+
addPlugin: P,
|
|
25374
|
+
removePlugin: F
|
|
25375
25375
|
}), e.debugMode = function() {
|
|
25376
25376
|
o = !1;
|
|
25377
25377
|
}, e.safeMode = function() {
|
|
@@ -25383,8 +25383,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
25383
25383
|
optional: g,
|
|
25384
25384
|
anyNumberOfTimes: h
|
|
25385
25385
|
};
|
|
25386
|
-
for (let e in
|
|
25387
|
-
return Object.assign(e,
|
|
25386
|
+
for (let e in ie) typeof ie[e] == "object" && n(ie[e]);
|
|
25387
|
+
return Object.assign(e, ie), e;
|
|
25388
25388
|
}, ke = Oe({});
|
|
25389
25389
|
ke.newInstance = () => Oe({}), t.exports = ke, ke.HighlightJS = ke, ke.default = ke;
|
|
25390
25390
|
})), QM = /* @__PURE__ */ h(((e, t) => {
|
|
@@ -27710,7 +27710,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27710
27710
|
function te(e) {
|
|
27711
27711
|
return t.concat("(?!", e.join("|"), ")");
|
|
27712
27712
|
}
|
|
27713
|
-
let
|
|
27713
|
+
let ne = {
|
|
27714
27714
|
match: t.concat(/\b/, te([
|
|
27715
27715
|
...s,
|
|
27716
27716
|
"super",
|
|
@@ -27718,14 +27718,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27718
27718
|
].map((e) => `${e}\\s*\\(`)), d, t.lookahead(/\s*\(/)),
|
|
27719
27719
|
className: "title.function",
|
|
27720
27720
|
relevance: 0
|
|
27721
|
-
},
|
|
27721
|
+
}, P = {
|
|
27722
27722
|
begin: t.concat(/\./, t.lookahead(t.concat(d, /(?![0-9A-Za-z$_(])/))),
|
|
27723
27723
|
end: d,
|
|
27724
27724
|
excludeBegin: !0,
|
|
27725
27725
|
keywords: "prototype",
|
|
27726
27726
|
className: "property",
|
|
27727
27727
|
relevance: 0
|
|
27728
|
-
},
|
|
27728
|
+
}, F = {
|
|
27729
27729
|
match: [
|
|
27730
27730
|
/get|set/,
|
|
27731
27731
|
/\s+/,
|
|
@@ -27737,7 +27737,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27737
27737
|
3: "title.function"
|
|
27738
27738
|
},
|
|
27739
27739
|
contains: [{ begin: /\(\)/ }, k]
|
|
27740
|
-
},
|
|
27740
|
+
}, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", ie = {
|
|
27741
27741
|
match: [
|
|
27742
27742
|
/const|var|let/,
|
|
27743
27743
|
/\s+/,
|
|
@@ -27745,7 +27745,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27745
27745
|
/\s*/,
|
|
27746
27746
|
/=\s*/,
|
|
27747
27747
|
/(async\s*)?/,
|
|
27748
|
-
t.lookahead(
|
|
27748
|
+
t.lookahead(re)
|
|
27749
27749
|
],
|
|
27750
27750
|
keywords: "async",
|
|
27751
27751
|
className: {
|
|
@@ -27790,7 +27790,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27790
27790
|
match: d + t.lookahead(":"),
|
|
27791
27791
|
relevance: 0
|
|
27792
27792
|
},
|
|
27793
|
-
|
|
27793
|
+
ie,
|
|
27794
27794
|
{
|
|
27795
27795
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
27796
27796
|
keywords: "return throw case",
|
|
@@ -27800,7 +27800,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27800
27800
|
e.REGEXP_MODE,
|
|
27801
27801
|
{
|
|
27802
27802
|
className: "function",
|
|
27803
|
-
begin:
|
|
27803
|
+
begin: re,
|
|
27804
27804
|
returnBegin: !0,
|
|
27805
27805
|
end: "\\s*=>",
|
|
27806
27806
|
contains: [{
|
|
@@ -27872,7 +27872,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27872
27872
|
match: /\.\.\./,
|
|
27873
27873
|
relevance: 0
|
|
27874
27874
|
},
|
|
27875
|
-
|
|
27875
|
+
P,
|
|
27876
27876
|
{
|
|
27877
27877
|
match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
|
|
27878
27878
|
relevance: 0
|
|
@@ -27882,10 +27882,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
27882
27882
|
className: { 1: "title.function" },
|
|
27883
27883
|
contains: [k]
|
|
27884
27884
|
},
|
|
27885
|
-
|
|
27885
|
+
ne,
|
|
27886
27886
|
N,
|
|
27887
27887
|
A,
|
|
27888
|
-
|
|
27888
|
+
F,
|
|
27889
27889
|
{ match: /\$[(.]/ }
|
|
27890
27890
|
]
|
|
27891
27891
|
};
|
|
@@ -30151,68 +30151,68 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30151
30151
|
}, te = (e = "") => ({
|
|
30152
30152
|
className: "subst",
|
|
30153
30153
|
variants: [{ match: i(/\\/, e, /[0\\tnr"']/) }, { match: i(/\\/, e, /u\{[0-9a-fA-F]{1,8}\}/) }]
|
|
30154
|
-
}),
|
|
30154
|
+
}), ne = (e = "") => ({
|
|
30155
30155
|
className: "subst",
|
|
30156
30156
|
match: i(/\\/, e, /[\t ]*(?:[\r\n]|\r\n)/)
|
|
30157
|
-
}),
|
|
30157
|
+
}), P = (e = "") => ({
|
|
30158
30158
|
className: "subst",
|
|
30159
30159
|
label: "interpol",
|
|
30160
30160
|
begin: i(/\\/, e, /\(/),
|
|
30161
30161
|
end: /\)/
|
|
30162
|
-
}),
|
|
30162
|
+
}), F = (e = "") => ({
|
|
30163
30163
|
begin: i(e, /"""/),
|
|
30164
30164
|
end: i(/"""/, e),
|
|
30165
30165
|
contains: [
|
|
30166
30166
|
te(e),
|
|
30167
|
-
|
|
30168
|
-
|
|
30167
|
+
ne(e),
|
|
30168
|
+
P(e)
|
|
30169
30169
|
]
|
|
30170
|
-
}),
|
|
30170
|
+
}), re = (e = "") => ({
|
|
30171
30171
|
begin: i(e, /"/),
|
|
30172
30172
|
end: i(/"/, e),
|
|
30173
|
-
contains: [te(e),
|
|
30174
|
-
}),
|
|
30173
|
+
contains: [te(e), P(e)]
|
|
30174
|
+
}), ie = {
|
|
30175
30175
|
className: "string",
|
|
30176
30176
|
variants: [
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
|
|
30181
|
-
|
|
30182
|
-
|
|
30183
|
-
|
|
30184
|
-
|
|
30177
|
+
F(),
|
|
30178
|
+
F("#"),
|
|
30179
|
+
F("##"),
|
|
30180
|
+
F("###"),
|
|
30181
|
+
re(),
|
|
30182
|
+
re("#"),
|
|
30183
|
+
re("##"),
|
|
30184
|
+
re("###")
|
|
30185
30185
|
]
|
|
30186
|
-
},
|
|
30186
|
+
}, ae = [e.BACKSLASH_ESCAPE, {
|
|
30187
30187
|
begin: /\[/,
|
|
30188
30188
|
end: /\]/,
|
|
30189
30189
|
relevance: 0,
|
|
30190
30190
|
contains: [e.BACKSLASH_ESCAPE]
|
|
30191
|
-
}],
|
|
30191
|
+
}], oe = {
|
|
30192
30192
|
begin: /\/[^\s](?=[^/\n]*\/)/,
|
|
30193
30193
|
end: /\//,
|
|
30194
|
-
contains:
|
|
30195
|
-
},
|
|
30194
|
+
contains: ae
|
|
30195
|
+
}, se = (e) => {
|
|
30196
30196
|
let t = i(e, /\//), n = i(/\//, e);
|
|
30197
30197
|
return {
|
|
30198
30198
|
begin: t,
|
|
30199
30199
|
end: n,
|
|
30200
|
-
contains: [...
|
|
30200
|
+
contains: [...ae, {
|
|
30201
30201
|
scope: "comment",
|
|
30202
30202
|
begin: `#(?!.*${n})`,
|
|
30203
30203
|
end: /$/
|
|
30204
30204
|
}]
|
|
30205
30205
|
};
|
|
30206
|
-
},
|
|
30206
|
+
}, ce = {
|
|
30207
30207
|
scope: "regexp",
|
|
30208
30208
|
variants: [
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30209
|
+
se("###"),
|
|
30210
|
+
se("##"),
|
|
30211
|
+
se("#"),
|
|
30212
|
+
oe
|
|
30213
30213
|
]
|
|
30214
|
-
},
|
|
30215
|
-
|
|
30214
|
+
}, le = { match: i(/`/, x, /`/) }, I = [
|
|
30215
|
+
le,
|
|
30216
30216
|
{
|
|
30217
30217
|
className: "variable",
|
|
30218
30218
|
match: /\$\d+/
|
|
@@ -30221,7 +30221,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30221
30221
|
className: "variable",
|
|
30222
30222
|
match: `\\$${b}+`
|
|
30223
30223
|
}
|
|
30224
|
-
],
|
|
30224
|
+
], L = [
|
|
30225
30225
|
{
|
|
30226
30226
|
match: /(@|#(un)?)available/,
|
|
30227
30227
|
scope: "keyword",
|
|
@@ -30232,7 +30232,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30232
30232
|
contains: [
|
|
30233
30233
|
...j,
|
|
30234
30234
|
N,
|
|
30235
|
-
|
|
30235
|
+
ie
|
|
30236
30236
|
]
|
|
30237
30237
|
}] }
|
|
30238
30238
|
},
|
|
@@ -30244,7 +30244,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30244
30244
|
scope: "meta",
|
|
30245
30245
|
match: i(/@/, x)
|
|
30246
30246
|
}
|
|
30247
|
-
],
|
|
30247
|
+
], ue = {
|
|
30248
30248
|
match: r(/\b[A-Z]/),
|
|
30249
30249
|
relevance: 0,
|
|
30250
30250
|
contains: [
|
|
@@ -30270,20 +30270,20 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30270
30270
|
relevance: 0
|
|
30271
30271
|
}
|
|
30272
30272
|
]
|
|
30273
|
-
},
|
|
30273
|
+
}, de = {
|
|
30274
30274
|
begin: /</,
|
|
30275
30275
|
end: />/,
|
|
30276
30276
|
keywords: D,
|
|
30277
30277
|
contains: [
|
|
30278
30278
|
...a,
|
|
30279
30279
|
...O,
|
|
30280
|
-
...
|
|
30280
|
+
...L,
|
|
30281
30281
|
A,
|
|
30282
|
-
|
|
30282
|
+
ue
|
|
30283
30283
|
]
|
|
30284
30284
|
};
|
|
30285
|
-
|
|
30286
|
-
let
|
|
30285
|
+
ue.contains.push(de);
|
|
30286
|
+
let fe = {
|
|
30287
30287
|
begin: /\(/,
|
|
30288
30288
|
end: /\)/,
|
|
30289
30289
|
relevance: 0,
|
|
@@ -30296,21 +30296,21 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30296
30296
|
relevance: 0
|
|
30297
30297
|
},
|
|
30298
30298
|
...a,
|
|
30299
|
-
|
|
30299
|
+
ce,
|
|
30300
30300
|
...O,
|
|
30301
30301
|
...k,
|
|
30302
30302
|
...j,
|
|
30303
30303
|
N,
|
|
30304
|
-
|
|
30304
|
+
ie,
|
|
30305
|
+
...I,
|
|
30305
30306
|
...L,
|
|
30306
|
-
|
|
30307
|
-
le
|
|
30307
|
+
ue
|
|
30308
30308
|
]
|
|
30309
|
-
},
|
|
30309
|
+
}, R = {
|
|
30310
30310
|
begin: /</,
|
|
30311
30311
|
end: />/,
|
|
30312
30312
|
keywords: "repeat each",
|
|
30313
|
-
contains: [...a,
|
|
30313
|
+
contains: [...a, ue]
|
|
30314
30314
|
}, pe = {
|
|
30315
30315
|
begin: /\(/,
|
|
30316
30316
|
end: /\)/,
|
|
@@ -30332,10 +30332,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30332
30332
|
...O,
|
|
30333
30333
|
...j,
|
|
30334
30334
|
N,
|
|
30335
|
-
|
|
30336
|
-
...
|
|
30337
|
-
|
|
30338
|
-
|
|
30335
|
+
ie,
|
|
30336
|
+
...L,
|
|
30337
|
+
ue,
|
|
30338
|
+
fe
|
|
30339
30339
|
],
|
|
30340
30340
|
endsParent: !0,
|
|
30341
30341
|
illegal: /["']/
|
|
@@ -30343,14 +30343,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30343
30343
|
match: [
|
|
30344
30344
|
/(func|macro)/,
|
|
30345
30345
|
/\s+/,
|
|
30346
|
-
o(
|
|
30346
|
+
o(le.match, x, v)
|
|
30347
30347
|
],
|
|
30348
30348
|
className: {
|
|
30349
30349
|
1: "keyword",
|
|
30350
30350
|
3: "title.function"
|
|
30351
30351
|
},
|
|
30352
30352
|
contains: [
|
|
30353
|
-
|
|
30353
|
+
R,
|
|
30354
30354
|
pe,
|
|
30355
30355
|
t
|
|
30356
30356
|
],
|
|
@@ -30359,7 +30359,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30359
30359
|
match: [/\b(?:subscript|init[?!]?)/, /\s*(?=[<(])/],
|
|
30360
30360
|
className: { 1: "keyword" },
|
|
30361
30361
|
contains: [
|
|
30362
|
-
|
|
30362
|
+
R,
|
|
30363
30363
|
pe,
|
|
30364
30364
|
t
|
|
30365
30365
|
],
|
|
@@ -30384,7 +30384,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30384
30384
|
1: "keyword",
|
|
30385
30385
|
3: "title"
|
|
30386
30386
|
},
|
|
30387
|
-
contains: [
|
|
30387
|
+
contains: [ue],
|
|
30388
30388
|
keywords: [...p, ...f],
|
|
30389
30389
|
end: /}/
|
|
30390
30390
|
}, he = {
|
|
@@ -30423,7 +30423,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30423
30423
|
},
|
|
30424
30424
|
keywords: D,
|
|
30425
30425
|
contains: [
|
|
30426
|
-
|
|
30426
|
+
R,
|
|
30427
30427
|
...O,
|
|
30428
30428
|
{
|
|
30429
30429
|
begin: /:/,
|
|
@@ -30437,7 +30437,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30437
30437
|
}
|
|
30438
30438
|
]
|
|
30439
30439
|
};
|
|
30440
|
-
for (let e of
|
|
30440
|
+
for (let e of ie.variants) {
|
|
30441
30441
|
let t = e.contains.find((e) => e.label === "interpol");
|
|
30442
30442
|
t.keywords = D;
|
|
30443
30443
|
let n = [
|
|
@@ -30445,8 +30445,8 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30445
30445
|
...k,
|
|
30446
30446
|
...j,
|
|
30447
30447
|
N,
|
|
30448
|
-
|
|
30449
|
-
...
|
|
30448
|
+
ie,
|
|
30449
|
+
...I
|
|
30450
30450
|
];
|
|
30451
30451
|
t.contains = [...n, {
|
|
30452
30452
|
begin: /\(/,
|
|
@@ -30472,16 +30472,16 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30472
30472
|
contains: [...a],
|
|
30473
30473
|
relevance: 0
|
|
30474
30474
|
},
|
|
30475
|
-
|
|
30475
|
+
ce,
|
|
30476
30476
|
...O,
|
|
30477
30477
|
...k,
|
|
30478
30478
|
...j,
|
|
30479
30479
|
N,
|
|
30480
|
-
|
|
30480
|
+
ie,
|
|
30481
|
+
...I,
|
|
30481
30482
|
...L,
|
|
30482
|
-
|
|
30483
|
-
|
|
30484
|
-
de
|
|
30483
|
+
ue,
|
|
30484
|
+
fe
|
|
30485
30485
|
]
|
|
30486
30486
|
};
|
|
30487
30487
|
}
|
|
@@ -30883,7 +30883,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30883
30883
|
function te(e) {
|
|
30884
30884
|
return t.concat("(?!", e.join("|"), ")");
|
|
30885
30885
|
}
|
|
30886
|
-
let
|
|
30886
|
+
let ne = {
|
|
30887
30887
|
match: t.concat(/\b/, te([
|
|
30888
30888
|
...s,
|
|
30889
30889
|
"super",
|
|
@@ -30891,14 +30891,14 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30891
30891
|
].map((e) => `${e}\\s*\\(`)), d, t.lookahead(/\s*\(/)),
|
|
30892
30892
|
className: "title.function",
|
|
30893
30893
|
relevance: 0
|
|
30894
|
-
},
|
|
30894
|
+
}, P = {
|
|
30895
30895
|
begin: t.concat(/\./, t.lookahead(t.concat(d, /(?![0-9A-Za-z$_(])/))),
|
|
30896
30896
|
end: d,
|
|
30897
30897
|
excludeBegin: !0,
|
|
30898
30898
|
keywords: "prototype",
|
|
30899
30899
|
className: "property",
|
|
30900
30900
|
relevance: 0
|
|
30901
|
-
},
|
|
30901
|
+
}, F = {
|
|
30902
30902
|
match: [
|
|
30903
30903
|
/get|set/,
|
|
30904
30904
|
/\s+/,
|
|
@@ -30910,7 +30910,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30910
30910
|
3: "title.function"
|
|
30911
30911
|
},
|
|
30912
30912
|
contains: [{ begin: /\(\)/ }, k]
|
|
30913
|
-
},
|
|
30913
|
+
}, re = "(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|" + e.UNDERSCORE_IDENT_RE + ")\\s*=>", ie = {
|
|
30914
30914
|
match: [
|
|
30915
30915
|
/const|var|let/,
|
|
30916
30916
|
/\s+/,
|
|
@@ -30918,7 +30918,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30918
30918
|
/\s*/,
|
|
30919
30919
|
/=\s*/,
|
|
30920
30920
|
/(async\s*)?/,
|
|
30921
|
-
t.lookahead(
|
|
30921
|
+
t.lookahead(re)
|
|
30922
30922
|
],
|
|
30923
30923
|
keywords: "async",
|
|
30924
30924
|
className: {
|
|
@@ -30963,7 +30963,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30963
30963
|
match: d + t.lookahead(":"),
|
|
30964
30964
|
relevance: 0
|
|
30965
30965
|
},
|
|
30966
|
-
|
|
30966
|
+
ie,
|
|
30967
30967
|
{
|
|
30968
30968
|
begin: "(" + e.RE_STARTERS_RE + "|\\b(case|return|throw)\\b)\\s*",
|
|
30969
30969
|
keywords: "return throw case",
|
|
@@ -30973,7 +30973,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
30973
30973
|
e.REGEXP_MODE,
|
|
30974
30974
|
{
|
|
30975
30975
|
className: "function",
|
|
30976
|
-
begin:
|
|
30976
|
+
begin: re,
|
|
30977
30977
|
returnBegin: !0,
|
|
30978
30978
|
end: "\\s*=>",
|
|
30979
30979
|
contains: [{
|
|
@@ -31045,7 +31045,7 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
31045
31045
|
match: /\.\.\./,
|
|
31046
31046
|
relevance: 0
|
|
31047
31047
|
},
|
|
31048
|
-
|
|
31048
|
+
P,
|
|
31049
31049
|
{
|
|
31050
31050
|
match: "\\$[A-Za-z$_][0-9A-Za-z$_]*",
|
|
31051
31051
|
relevance: 0
|
|
@@ -31055,10 +31055,10 @@ var ZM = /* @__PURE__ */ h(((e, t) => {
|
|
|
31055
31055
|
className: { 1: "title.function" },
|
|
31056
31056
|
contains: [k]
|
|
31057
31057
|
},
|
|
31058
|
-
|
|
31058
|
+
ne,
|
|
31059
31059
|
N,
|
|
31060
31060
|
A,
|
|
31061
|
-
|
|
31061
|
+
F,
|
|
31062
31062
|
{ match: /\$[(.]/ }
|
|
31063
31063
|
]
|
|
31064
31064
|
};
|
|
@@ -32046,13 +32046,13 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32046
32046
|
e.target instanceof Element && (ee = e.target, N && clearTimeout(N), N = setTimeout(() => {
|
|
32047
32047
|
ee = null;
|
|
32048
32048
|
}, 2e3));
|
|
32049
|
-
},
|
|
32049
|
+
}, ne = () => {
|
|
32050
32050
|
ee = null;
|
|
32051
32051
|
};
|
|
32052
32052
|
return fa(() => {
|
|
32053
|
-
t.onDropElement && (window.addEventListener("dragstart", te, !0), window.addEventListener("dragend",
|
|
32053
|
+
t.onDropElement && (window.addEventListener("dragstart", te, !0), window.addEventListener("dragend", ne, !0));
|
|
32054
32054
|
}), ha(() => {
|
|
32055
|
-
window.removeEventListener("dragstart", te, !0), window.removeEventListener("dragend",
|
|
32055
|
+
window.removeEventListener("dragstart", te, !0), window.removeEventListener("dragend", ne, !0), N && clearTimeout(N);
|
|
32056
32056
|
}), (t, n) => (Y(), X("div", OF, [K(o) ? (Y(), X("button", {
|
|
32057
32057
|
key: 0,
|
|
32058
32058
|
class: "undo-foot-btn",
|
|
@@ -32595,7 +32595,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32595
32595
|
function te(e) {
|
|
32596
32596
|
return e.kind === "pre" ? y.value.debugFlowPrep : e.kind === "wrap_up" ? y.value.debugLogsWrapUp : `${y.value.debugRoundPrefix}${e.round}${y.value.debugRoundSuffix}`;
|
|
32597
32597
|
}
|
|
32598
|
-
function
|
|
32598
|
+
function ne(e, t, n) {
|
|
32599
32599
|
let r = e.data?.messages ?? [];
|
|
32600
32600
|
return n && t != null && t > 0 && t < r.length ? {
|
|
32601
32601
|
list: r.slice(t),
|
|
@@ -32605,25 +32605,25 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32605
32605
|
base: 0
|
|
32606
32606
|
};
|
|
32607
32607
|
}
|
|
32608
|
-
function
|
|
32608
|
+
function P(e) {
|
|
32609
32609
|
return new Date(e).toLocaleTimeString(n.locale, { hour12: !1 }) + "." + String(e % 1e3).padStart(3, "0");
|
|
32610
32610
|
}
|
|
32611
|
-
function
|
|
32611
|
+
function F(e) {
|
|
32612
32612
|
let t = new Set(a.value);
|
|
32613
32613
|
t.has(e) ? t.delete(e) : t.add(e), a.value = t;
|
|
32614
32614
|
}
|
|
32615
|
-
function
|
|
32615
|
+
function re(e) {
|
|
32616
32616
|
let t = new Set(d.value);
|
|
32617
32617
|
t.has(e) ? t.delete(e) : t.add(e), d.value = t;
|
|
32618
32618
|
}
|
|
32619
|
-
function
|
|
32619
|
+
function ie(e) {
|
|
32620
32620
|
try {
|
|
32621
32621
|
return JSON.stringify(e, null, 2);
|
|
32622
32622
|
} catch {
|
|
32623
32623
|
return String(e);
|
|
32624
32624
|
}
|
|
32625
32625
|
}
|
|
32626
|
-
let
|
|
32626
|
+
let ae = {
|
|
32627
32627
|
system: {
|
|
32628
32628
|
label: "SYSTEM",
|
|
32629
32629
|
color: "#6b7280"
|
|
@@ -32649,27 +32649,27 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32649
32649
|
color: "#2563eb"
|
|
32650
32650
|
}
|
|
32651
32651
|
};
|
|
32652
|
-
function
|
|
32653
|
-
return
|
|
32652
|
+
function oe(e) {
|
|
32653
|
+
return ae[e] || {
|
|
32654
32654
|
label: (e || "?").toUpperCase(),
|
|
32655
32655
|
color: "#9ca3af"
|
|
32656
32656
|
};
|
|
32657
32657
|
}
|
|
32658
|
-
function
|
|
32658
|
+
function se() {
|
|
32659
32659
|
r("update:visible", !1);
|
|
32660
32660
|
}
|
|
32661
|
-
function
|
|
32661
|
+
function ce() {
|
|
32662
32662
|
a.value = /* @__PURE__ */ new Set(), A.value = /* @__PURE__ */ new Set(), j.value = /* @__PURE__ */ new Set(), r("clear");
|
|
32663
32663
|
}
|
|
32664
|
-
let
|
|
32665
|
-
async function
|
|
32666
|
-
if (
|
|
32667
|
-
delete
|
|
32664
|
+
let le = /* @__PURE__ */ Rn("logs"), I = /* @__PURE__ */ Rn(null), L = /* @__PURE__ */ Rn({});
|
|
32665
|
+
async function ue(e) {
|
|
32666
|
+
if (L.value[e]) {
|
|
32667
|
+
delete L.value[e], L.value = { ...L.value };
|
|
32668
32668
|
return;
|
|
32669
32669
|
}
|
|
32670
32670
|
if (!n.getSkillContent) {
|
|
32671
|
-
|
|
32672
|
-
...
|
|
32671
|
+
L.value = {
|
|
32672
|
+
...L.value,
|
|
32673
32673
|
[e]: {
|
|
32674
32674
|
loading: !1,
|
|
32675
32675
|
content: null,
|
|
@@ -32678,8 +32678,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32678
32678
|
};
|
|
32679
32679
|
return;
|
|
32680
32680
|
}
|
|
32681
|
-
|
|
32682
|
-
...
|
|
32681
|
+
L.value = {
|
|
32682
|
+
...L.value,
|
|
32683
32683
|
[e]: {
|
|
32684
32684
|
loading: !0,
|
|
32685
32685
|
content: null
|
|
@@ -32687,8 +32687,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32687
32687
|
};
|
|
32688
32688
|
try {
|
|
32689
32689
|
let t = await n.getSkillContent(e);
|
|
32690
|
-
|
|
32691
|
-
...
|
|
32690
|
+
L.value = {
|
|
32691
|
+
...L.value,
|
|
32692
32692
|
[e]: {
|
|
32693
32693
|
loading: !1,
|
|
32694
32694
|
content: t,
|
|
@@ -32696,8 +32696,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32696
32696
|
}
|
|
32697
32697
|
};
|
|
32698
32698
|
} catch (t) {
|
|
32699
|
-
|
|
32700
|
-
...
|
|
32699
|
+
L.value = {
|
|
32700
|
+
...L.value,
|
|
32701
32701
|
[e]: {
|
|
32702
32702
|
loading: !1,
|
|
32703
32703
|
content: null,
|
|
@@ -32706,20 +32706,20 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32706
32706
|
};
|
|
32707
32707
|
}
|
|
32708
32708
|
}
|
|
32709
|
-
function
|
|
32709
|
+
function de() {
|
|
32710
32710
|
if (n.getInfo) try {
|
|
32711
|
-
|
|
32711
|
+
I.value = n.getInfo();
|
|
32712
32712
|
} catch {
|
|
32713
|
-
|
|
32713
|
+
I.value = null;
|
|
32714
32714
|
}
|
|
32715
32715
|
}
|
|
32716
|
-
function
|
|
32717
|
-
|
|
32716
|
+
function fe(e) {
|
|
32717
|
+
le.value = e, (e === "subagent" || e === "info" || e === "context") && de();
|
|
32718
32718
|
}
|
|
32719
32719
|
_i(() => n.infoTick?.value, () => {
|
|
32720
|
-
n.visible && (
|
|
32720
|
+
n.visible && (le.value === "subagent" || le.value === "info" || le.value === "context") && de();
|
|
32721
32721
|
});
|
|
32722
|
-
let
|
|
32722
|
+
let R = pc(() => ({
|
|
32723
32723
|
pending: {
|
|
32724
32724
|
label: y.value.debugTodoPending,
|
|
32725
32725
|
color: "#9ca3af"
|
|
@@ -32734,7 +32734,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32734
32734
|
}
|
|
32735
32735
|
}));
|
|
32736
32736
|
function pe(e) {
|
|
32737
|
-
return
|
|
32737
|
+
return R.value[e]?.label ?? e;
|
|
32738
32738
|
}
|
|
32739
32739
|
function me(e) {
|
|
32740
32740
|
return e ? e === "builtin" ? "builtin" : e.startsWith("mcp:") ? "mcp" : "user" : "";
|
|
@@ -32749,10 +32749,10 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32749
32749
|
}
|
|
32750
32750
|
return `${e}ms`;
|
|
32751
32751
|
}
|
|
32752
|
-
let V = pc(() =>
|
|
32752
|
+
let V = pc(() => I.value?.context), he = pc(() => {
|
|
32753
32753
|
let e = V.value;
|
|
32754
32754
|
return e ? e.occupancy >= 1 ? "red" : e.thresholdRatio > 0 && e.occupancy >= e.thresholdRatio ? "yellow" : "green" : "";
|
|
32755
|
-
}), ge = pc(() =>
|
|
32755
|
+
}), ge = pc(() => I.value?.subagent?.active ?? []), H = pc(() => I.value?.subagent?.history ?? []), _e = pc(() => Object.entries(I.value?.subagent?.lockedComponents ?? {})), ve = pc(() => ({
|
|
32756
32756
|
running: {
|
|
32757
32757
|
label: y.value.debugSubRunning,
|
|
32758
32758
|
color: "#059669"
|
|
@@ -32777,23 +32777,23 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32777
32777
|
default: li(() => [e.visible ? (Y(), X("div", iI, [Z("div", { class: Ke(["drawer-panel", { "cs-theme-dark": e.csTheme === "dark" }]) }, [
|
|
32778
32778
|
Z("div", aI, [Z("div", oI, [
|
|
32779
32779
|
Z("button", {
|
|
32780
|
-
class: Ke(["tab-btn", { active:
|
|
32781
|
-
onClick: n[0] ||= (e) =>
|
|
32780
|
+
class: Ke(["tab-btn", { active: le.value === "logs" }]),
|
|
32781
|
+
onClick: n[0] ||= (e) => fe("logs")
|
|
32782
32782
|
}, "🐛 " + W(y.value.debugTabLogs), 3),
|
|
32783
32783
|
e.getInfo ? (Y(), X("button", {
|
|
32784
32784
|
key: 0,
|
|
32785
|
-
class: Ke(["tab-btn", { active:
|
|
32786
|
-
onClick: n[1] ||= (e) =>
|
|
32785
|
+
class: Ke(["tab-btn", { active: le.value === "context" }]),
|
|
32786
|
+
onClick: n[1] ||= (e) => fe("context")
|
|
32787
32787
|
}, "📊 " + W(y.value.debugTabContext), 3)) : Q("", !0),
|
|
32788
32788
|
e.getInfo ? (Y(), X("button", {
|
|
32789
32789
|
key: 1,
|
|
32790
|
-
class: Ke(["tab-btn", { active:
|
|
32791
|
-
onClick: n[2] ||= (e) =>
|
|
32790
|
+
class: Ke(["tab-btn", { active: le.value === "subagent" }]),
|
|
32791
|
+
onClick: n[2] ||= (e) => fe("subagent")
|
|
32792
32792
|
}, "🤖 " + W(y.value.debugTabSubagent), 3)) : Q("", !0),
|
|
32793
32793
|
e.getInfo ? (Y(), X("button", {
|
|
32794
32794
|
key: 2,
|
|
32795
|
-
class: Ke(["tab-btn", { active:
|
|
32796
|
-
onClick: n[3] ||= (e) =>
|
|
32795
|
+
class: Ke(["tab-btn", { active: le.value === "info" }]),
|
|
32796
|
+
onClick: n[3] ||= (e) => fe("info")
|
|
32797
32797
|
}, "🧬 " + W(y.value.debugTabInfo), 3)) : Q("", !0)
|
|
32798
32798
|
]), Z("div", sI, [
|
|
32799
32799
|
Z("button", {
|
|
@@ -32801,19 +32801,19 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32801
32801
|
title: y.value.debugCopyReport,
|
|
32802
32802
|
onClick: v
|
|
32803
32803
|
}, W(g.value === "report" ? "✓" : "💾"), 9, cI),
|
|
32804
|
-
|
|
32804
|
+
le.value === "logs" ? (Y(), X("button", {
|
|
32805
32805
|
key: 0,
|
|
32806
32806
|
class: "hd-btn",
|
|
32807
32807
|
title: y.value.debugClearLogs,
|
|
32808
|
-
onClick:
|
|
32808
|
+
onClick: ce
|
|
32809
32809
|
}, "🗑️", 8, lI)) : Q("", !0),
|
|
32810
32810
|
Z("button", {
|
|
32811
32811
|
class: "hd-btn",
|
|
32812
32812
|
title: y.value.close,
|
|
32813
|
-
onClick:
|
|
32813
|
+
onClick: se
|
|
32814
32814
|
}, "✕", 8, uI)
|
|
32815
32815
|
])]),
|
|
32816
|
-
|
|
32816
|
+
le.value === "logs" ? (Y(), X("div", dI, [(Y(!0), X(J, null, Sa(b.value, (e, t) => (Y(), X("button", {
|
|
32817
32817
|
key: t,
|
|
32818
32818
|
class: Ke(["filter-chip", { active: i.value === t }]),
|
|
32819
32819
|
style: Ve({ "--chip-color": e.color }),
|
|
@@ -32835,7 +32835,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32835
32835
|
ref_key: "drawerContentsEl",
|
|
32836
32836
|
ref: c
|
|
32837
32837
|
}, [
|
|
32838
|
-
|
|
32838
|
+
le.value === "context" ? (Y(), X("div", hI, [V.value ? (Y(), X(J, { key: 1 }, [V.value ? (Y(), X(J, { key: 0 }, [
|
|
32839
32839
|
Z("div", _I, [Z("div", vI, [Z("div", {
|
|
32840
32840
|
class: "ctx-bar-track",
|
|
32841
32841
|
title: `${y.value.debugCtxOccupancy} ${Math.round(V.value.occupancy * 100)}%`
|
|
@@ -32874,7 +32874,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32874
32874
|
V.value.compression.decision ? (Y(), X("span", II, "🤖 " + W(y.value.debugCtxAgentDecision) + W(be(V.value.compression.decision)), 1)) : Q("", !0)
|
|
32875
32875
|
])])) : Q("", !0)
|
|
32876
32876
|
], 64)) : Q("", !0)], 64)) : (Y(), X("div", gI, W(y.value.debugCtxEmpty), 1))])) : Q("", !0),
|
|
32877
|
-
|
|
32877
|
+
le.value === "subagent" ? (Y(), X("div", LI, [_e.value.length ? (Y(), X("div", RI, [Z("div", zI, "🔒 " + W(y.value.debugLocksTitle) + " (" + W(_e.value.length) + ")", 1), (Y(!0), X(J, null, Sa(_e.value, ([e, t]) => (Y(), X("div", {
|
|
32878
32878
|
key: "lock-" + e,
|
|
32879
32879
|
class: "sub-task"
|
|
32880
32880
|
}, "🔒 " + W(e) + " ← " + W(t), 1))), 128))])) : Q("", !0), !ge.value.length && !H.value.length ? (Y(), X("div", BI, W(y.value.debugSubagentEmpty), 1)) : (Y(), X(J, { key: 2 }, [ge.value.length ? (Y(), X("div", VI, [Z("div", HI, "▶ " + W(y.value.debugSubRunningTitle) + " (" + W(ge.value.length) + ")", 1), (Y(!0), X(J, null, Sa(ge.value, (e, t) => (Y(), X("div", {
|
|
@@ -32912,10 +32912,10 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32912
32912
|
}, [
|
|
32913
32913
|
Z("span", nL, W(e.kind === "tool_call" ? "🔧" : "✅"), 1),
|
|
32914
32914
|
Z("span", rL, W(e.name), 1),
|
|
32915
|
-
Z("span", iL, W(
|
|
32915
|
+
Z("span", iL, W(P(e.ts)), 1)
|
|
32916
32916
|
]))), 128))])) : Q("", !0)
|
|
32917
32917
|
], 2))), 128))])) : Q("", !0)], 64))])) : Q("", !0),
|
|
32918
|
-
|
|
32918
|
+
le.value === "logs" ? (Y(), X(J, { key: 2 }, [S.value.length === 0 ? (Y(), X("div", aL, W(y.value.debugLogsEmpty), 1)) : Q("", !0), (Y(!0), X(J, null, Sa(k.value, (e) => (Y(), X("div", {
|
|
32919
32919
|
key: e.key,
|
|
32920
32920
|
class: "log-group"
|
|
32921
32921
|
}, [Z("div", {
|
|
@@ -32925,8 +32925,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32925
32925
|
Z("span", { class: Ke(["log-group-arrow", { open: ee(e.key) }]) }, "▶", 2),
|
|
32926
32926
|
Z("span", sL, W(te(e)), 1),
|
|
32927
32927
|
Z("span", cL, [
|
|
32928
|
-
Ms(W(
|
|
32929
|
-
e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Ms(" ~ " + W(
|
|
32928
|
+
Ms(W(P(e.firstTs)), 1),
|
|
32929
|
+
e.lastTs > e.firstTs ? (Y(), X(J, { key: 0 }, [Ms(" ~ " + W(P(e.lastTs)), 1)], 64)) : Q("", !0),
|
|
32930
32930
|
Ms(" · " + W(B(e.lastTs - e.firstTs)), 1)
|
|
32931
32931
|
]),
|
|
32932
32932
|
e.toolCount ? (Y(), X("span", lL, "🔧 " + W(e.toolCount), 1)) : Q("", !0),
|
|
@@ -32942,7 +32942,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32942
32942
|
style: Ve({ background: b.value[e.type].color })
|
|
32943
32943
|
}, W(b.value[e.type].icon) + " " + W(b.value[e.type].label), 5),
|
|
32944
32944
|
e.source ? (Y(), X("span", mL, "↳ " + W(e.source), 1)) : Q("", !0),
|
|
32945
|
-
Z("span", hL, W(
|
|
32945
|
+
Z("span", hL, W(P(e.timestamp)), 1)
|
|
32946
32946
|
]),
|
|
32947
32947
|
Z("div", gL, [e.type === "context" ? (Y(), X(J, { key: 0 }, [
|
|
32948
32948
|
Z("div", _L, [
|
|
@@ -32962,8 +32962,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32962
32962
|
class: "msg-row"
|
|
32963
32963
|
}, [Z("span", {
|
|
32964
32964
|
class: "msg-role",
|
|
32965
|
-
style: Ve({ background:
|
|
32966
|
-
}, W(
|
|
32965
|
+
style: Ve({ background: oe(e.type).color })
|
|
32966
|
+
}, W(oe(e.type).label), 5), Z("span", NL, W(e.content), 1)]))), 128))])
|
|
32967
32967
|
], 64)) : e.type === "llm_request" ? (Y(), X(J, { key: 1 }, [Z("div", PL, [
|
|
32968
32968
|
Z("span", FL, W(y.value.debugRoundPrefix) + W(e.data.round) + W(y.value.debugRoundSuffix), 1),
|
|
32969
32969
|
e.data.model ? (Y(), X("span", IL, W(e.data.model), 1)) : Q("", !0),
|
|
@@ -32977,13 +32977,13 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32977
32977
|
Z("button", {
|
|
32978
32978
|
class: "view-toggle copy-btn",
|
|
32979
32979
|
title: y.value.copy,
|
|
32980
|
-
onClick: (t) => _(
|
|
32980
|
+
onClick: (t) => _(ie(e.data.messages), "req" + i)
|
|
32981
32981
|
}, W(g.value === "req" + i ? "✓" : "📋"), 9, BL),
|
|
32982
32982
|
Z("button", {
|
|
32983
32983
|
class: "view-toggle",
|
|
32984
|
-
onClick: (e) =>
|
|
32984
|
+
onClick: (e) => re(i)
|
|
32985
32985
|
}, W(d.value.has(i) ? y.value.debugCardView : y.value.debugRequestBody), 9, VL)
|
|
32986
|
-
]), d.value.has(i) ? (Y(), X("pre", JL, [Z("code", null, W(
|
|
32986
|
+
]), d.value.has(i) ? (Y(), X("pre", JL, [Z("code", null, W(ie(e.data.messages)), 1)])) : (Y(!0), X(J, { key: 0 }, Sa([ne(e, r, m.value.has(i))], (e) => (Y(), X("div", {
|
|
32987
32987
|
key: e.base,
|
|
32988
32988
|
class: "msg-list"
|
|
32989
32989
|
}, [(Y(!0), X(J, null, Sa(e.list, (t, n) => (Y(), X("div", {
|
|
@@ -32993,8 +32993,8 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
32993
32993
|
onClick: (r) => String(t.content ?? "").length > fB && p(i + ":" + (e.base + n))
|
|
32994
32994
|
}, [Z("span", {
|
|
32995
32995
|
class: "msg-role",
|
|
32996
|
-
style: Ve({ background:
|
|
32997
|
-
}, W(
|
|
32996
|
+
style: Ve({ background: oe(t.role).color })
|
|
32997
|
+
}, W(oe(t.role).label), 5), Z("div", UL, [
|
|
32998
32998
|
t.content ? (Y(), X("span", WL, W(t.content), 1)) : Q("", !0),
|
|
32999
32999
|
(Y(!0), X(J, null, Sa(t.tool_calls || [], (e, t) => (Y(), X("div", {
|
|
33000
33000
|
key: t,
|
|
@@ -33007,7 +33007,7 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
33007
33007
|
e.data.toolCalls?.length ? (Y(), X("div", $L, [(Y(!0), X(J, null, Sa(e.data.toolCalls, (e, t) => (Y(), X("div", {
|
|
33008
33008
|
key: t,
|
|
33009
33009
|
class: "tc-card"
|
|
33010
|
-
}, [Z("div", eR, "🔧 " + W(e.name), 1), Z("pre", tR, W(
|
|
33010
|
+
}, [Z("div", eR, "🔧 " + W(e.name), 1), Z("pre", tR, W(ie(e.args)), 1)]))), 128))])) : Q("", !0),
|
|
33011
33011
|
e.data.usage ? (Y(), X("div", nR, [
|
|
33012
33012
|
Z("span", rR, "prompt: " + W(e.data.usage.prompt_tokens ?? "-"), 1),
|
|
33013
33013
|
Z("span", iR, "completion: " + W(e.data.usage.completion_tokens ?? "-"), 1),
|
|
@@ -33027,85 +33027,85 @@ var KN = ["innerHTML"], qN = /* @__PURE__ */ Xi({
|
|
|
33027
33027
|
onClick: (t) => _(String(e.data.result ?? ""), "res" + i)
|
|
33028
33028
|
}, W(g.value === "res" + i ? "✓" : "📋"), 9, lR)
|
|
33029
33029
|
]),
|
|
33030
|
-
Z("pre", uR, W(
|
|
33030
|
+
Z("pre", uR, W(ie(t.data.args)), 1),
|
|
33031
33031
|
Z("div", dR, "↓ " + W(y.value.resultLabel), 1),
|
|
33032
33032
|
Z("pre", fR, W(e.data.result), 1)
|
|
33033
|
-
], 2)) : (Y(), X("div", pR, [Z("div", mR, [Ms(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", hR, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", gR, W(e.type === "tool_call" ?
|
|
33033
|
+
], 2)) : (Y(), X("div", pR, [Z("div", mR, [Ms(W(e.type === "tool_call" ? "🔧" : "✅") + " " + W(e.data.name) + " ", 1), e.type === "tool_call" ? (Y(), X("span", hR, W(y.value.statusRunning) + "…", 1)) : Q("", !0)]), Z("pre", gR, W(e.type === "tool_call" ? ie(e.data.args) : e.data.result), 1)]))], 64)) : e.type === "error" ? (Y(), X("div", _R, W(e.data.tool ? `[${e.data.tool}] ` : "") + W(e.data.error), 1)) : Q("", !0)]),
|
|
33034
33034
|
Z("div", vR, [Z("button", {
|
|
33035
33035
|
class: "raw-toggle",
|
|
33036
|
-
onClick: (e) =>
|
|
33036
|
+
onClick: (e) => F(i)
|
|
33037
33037
|
}, W(a.value.has(i) ? y.value.debugCollapseRawJson : y.value.debugViewRawJson), 9, yR), Z("button", {
|
|
33038
33038
|
class: "raw-toggle",
|
|
33039
|
-
onClick: (t) => K(XD)(
|
|
33039
|
+
onClick: (t) => K(XD)(ie(e.data))
|
|
33040
33040
|
}, W(y.value.copy), 9, bR)]),
|
|
33041
|
-
a.value.has(i) ? (Y(), X("pre", xR, [Z("code", null, W(
|
|
33042
|
-
]))), 128))], 512), [[Yc, ee(e.key)]])]))), 128))], 64)) :
|
|
33041
|
+
a.value.has(i) ? (Y(), X("pre", xR, [Z("code", null, W(ie(e.data)), 1)])) : Q("", !0)
|
|
33042
|
+
]))), 128))], 512), [[Yc, ee(e.key)]])]))), 128))], 64)) : le.value === "info" ? (Y(), X("div", SR, [I.value ? (Y(), X(J, { key: 1 }, [
|
|
33043
33043
|
Z("div", wR, [
|
|
33044
33044
|
Z("div", TR, W(y.value.debugInfoBasic), 1),
|
|
33045
33045
|
Z("div", ER, [
|
|
33046
|
-
Z("div", DR, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OR, W(
|
|
33047
|
-
Z("div", kR, [Z("span", AR, W(y.value.debugModel), 1), Z("span", jR, W(
|
|
33048
|
-
Z("div", MR, [Z("span", NR, W(y.value.debugToolCount), 1), Z("span", PR, W(
|
|
33049
|
-
Z("div", FR, [Z("span", IR, W(y.value.debugMiddleware), 1), Z("span", LR, W(
|
|
33046
|
+
Z("div", DR, [n[6] ||= Z("span", { class: "k" }, "ID", -1), Z("span", OR, W(I.value.id), 1)]),
|
|
33047
|
+
Z("div", kR, [Z("span", AR, W(y.value.debugModel), 1), Z("span", jR, W(I.value.model || "-"), 1)]),
|
|
33048
|
+
Z("div", MR, [Z("span", NR, W(y.value.debugToolCount), 1), Z("span", PR, W(I.value.tools.length), 1)]),
|
|
33049
|
+
Z("div", FR, [Z("span", IR, W(y.value.debugMiddleware), 1), Z("span", LR, W(I.value.middleware.length), 1)])
|
|
33050
33050
|
]),
|
|
33051
|
-
Z("div", RR, [Z("span", zR, W(y.value.debugMiddlewareStack), 1), Z("span", BR, W(
|
|
33051
|
+
Z("div", RR, [Z("span", zR, W(y.value.debugMiddlewareStack), 1), Z("span", BR, W(I.value.middleware.join(" → ") || "-"), 1)])
|
|
33052
33052
|
]),
|
|
33053
|
-
Z("div", VR, [Z("div", HR, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(
|
|
33053
|
+
Z("div", VR, [Z("div", HR, "🔧 " + W(y.value.debugToolsLabel) + " (" + W(I.value.tools.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.tools, (e) => (Y(), X("div", {
|
|
33054
33054
|
key: e.name,
|
|
33055
33055
|
class: "info-item"
|
|
33056
33056
|
}, [Z("div", UR, [Ms(W(e.name), 1), e.source ? (Y(), X("span", {
|
|
33057
33057
|
key: 0,
|
|
33058
33058
|
class: Ke(["src-tag", me(e.source)])
|
|
33059
33059
|
}, W(e.source), 3)) : Q("", !0)]), Z("div", WR, W(e.description), 1)]))), 128))]),
|
|
33060
|
-
|
|
33060
|
+
I.value.skills.length ? (Y(), X("div", GR, [Z("div", KR, [Ms("📘 " + W(y.value.debugSkillsTitle) + " (" + W(I.value.skills.length) + ")", 1), Z("span", qR, W(y.value.debugSkillsHint), 1)]), (Y(!0), X(J, null, Sa(I.value.skills, (e) => (Y(), X("div", {
|
|
33061
33061
|
key: e.name,
|
|
33062
33062
|
class: "info-item"
|
|
33063
33063
|
}, [
|
|
33064
33064
|
Z("div", {
|
|
33065
33065
|
class: "info-name skill-toggle",
|
|
33066
|
-
onClick: (t) =>
|
|
33067
|
-
}, [Z("span", { class: Ke(["skill-arrow", { open: !!
|
|
33066
|
+
onClick: (t) => ue(e.name)
|
|
33067
|
+
}, [Z("span", { class: Ke(["skill-arrow", { open: !!L.value[e.name] }]) }, "▶", 2), Ms(" " + W(e.name), 1)], 8, JR),
|
|
33068
33068
|
Z("div", YR, W(e.description), 1),
|
|
33069
|
-
|
|
33069
|
+
L.value[e.name] ? (Y(), X("div", XR, [L.value[e.name].loading ? (Y(), X("div", ZR, W(y.value.debugLoading), 1)) : L.value[e.name].error ? (Y(), X("div", QR, W(L.value[e.name].error), 1)) : L.value[e.name].content ? (Y(), X("pre", $R, W(L.value[e.name].content), 1)) : Q("", !0)])) : Q("", !0)
|
|
33070
33070
|
]))), 128))])) : Q("", !0),
|
|
33071
|
-
|
|
33071
|
+
I.value.data ? (Y(), X("div", ez, [Z("div", tz, "📊 " + W(y.value.debugDataTitle), 1), Z("div", nz, [Z("div", rz, W(I.value.data.description || y.value.debugDataFallback), 1), Z("div", iz, W(y.value.debugSchemaPrefix) + W(I.value.data.schema ? y.value.debugSchemaDeclared : y.value.debugSchemaMissing), 1)])])) : Q("", !0),
|
|
33072
33072
|
Z("div", az, [Z("div", oz, "🧬 " + W(y.value.debugSubagentTitle), 1), Z("div", sz, [
|
|
33073
|
-
Z("div", cz, [Z("span", lz, W(y.value.debugEnabled), 1), Z("span", uz, W(
|
|
33074
|
-
Z("div", dz, [Z("span", fz, W(y.value.debugMaxDepth), 1), Z("span", pz, W(
|
|
33075
|
-
Z("div", mz, [Z("span", hz, W(y.value.debugMaxParallel), 1), Z("span", gz, W(
|
|
33076
|
-
Z("div", _z, [Z("span", vz, W(y.value.debugExtraTools), 1), Z("span", yz, W(
|
|
33073
|
+
Z("div", cz, [Z("span", lz, W(y.value.debugEnabled), 1), Z("span", uz, W(I.value.subagent.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
33074
|
+
Z("div", dz, [Z("span", fz, W(y.value.debugMaxDepth), 1), Z("span", pz, W(I.value.subagent.maxDepth), 1)]),
|
|
33075
|
+
Z("div", mz, [Z("span", hz, W(y.value.debugMaxParallel), 1), Z("span", gz, W(I.value.subagent.maxParallel), 1)]),
|
|
33076
|
+
Z("div", _z, [Z("span", vz, W(y.value.debugExtraTools), 1), Z("span", yz, W(I.value.subagent.allowedTools.length ? I.value.subagent.allowedTools.join(", ") : y.value.debugDefaultReadonly), 1)])
|
|
33077
33077
|
])]),
|
|
33078
|
-
|
|
33078
|
+
I.value.mcp?.servers?.length ? (Y(), X("div", bz, [Z("div", xz, "🔌 MCP (" + W(I.value.mcp.servers.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.mcp.servers, (e) => (Y(), X("div", {
|
|
33079
33079
|
key: e.name,
|
|
33080
33080
|
class: "info-item"
|
|
33081
33081
|
}, [Z("div", Sz, [Ms(W(e.name) + " ", 1), Z("span", Cz, W(e.toolCount) + W(y.value.debugToolCountSuffix), 1)]), Z("div", wz, W(e.url), 1)]))), 128))])) : Q("", !0),
|
|
33082
|
-
|
|
33083
|
-
Z("div", Oz, [Z("span", kz, W(y.value.debugEnabled), 1), Z("span", Az, W(
|
|
33084
|
-
Z("div", jz, [Z("span", Mz, W(y.value.debugMaxAttempts), 1), Z("span", Nz, W(
|
|
33085
|
-
Z("div", Pz, [Z("span", Fz, W(y.value.debugAdversarial), 1), Z("span", Iz, W(
|
|
33086
|
-
|
|
33082
|
+
I.value.verify ? (Y(), X("div", Tz, [Z("div", Ez, "✅ " + W(y.value.debugVerifyTitle), 1), Z("div", Dz, [
|
|
33083
|
+
Z("div", Oz, [Z("span", kz, W(y.value.debugEnabled), 1), Z("span", Az, W(I.value.verify.enabled ? y.value.debugYes : y.value.debugNo), 1)]),
|
|
33084
|
+
Z("div", jz, [Z("span", Mz, W(y.value.debugMaxAttempts), 1), Z("span", Nz, W(I.value.verify.maxAttempts), 1)]),
|
|
33085
|
+
Z("div", Pz, [Z("span", Fz, W(y.value.debugAdversarial), 1), Z("span", Iz, W(I.value.verify.adversarial ? y.value.debugOn : y.value.debugOff), 1)]),
|
|
33086
|
+
I.value.verify.adversarial ? (Y(), X("div", Lz, [Z("span", Rz, W(y.value.debugAdversarialModel), 1), Z("span", zz, W(I.value.model || "-") + W(y.value.debugSameAsMain), 1)])) : Q("", !0)
|
|
33087
33087
|
])])) : Q("", !0),
|
|
33088
|
-
|
|
33088
|
+
I.value.todos.length ? (Y(), X("div", Bz, [Z("div", Vz, "📋 " + W(y.value.debugTodosTitle) + " (" + W(I.value.todos.length) + ")", 1), (Y(!0), X(J, null, Sa(I.value.todos, (e, t) => (Y(), X("div", {
|
|
33089
33089
|
key: t,
|
|
33090
33090
|
class: "info-todo"
|
|
33091
33091
|
}, [Z("span", {
|
|
33092
33092
|
class: "todo-tag",
|
|
33093
|
-
style: Ve({ background:
|
|
33093
|
+
style: Ve({ background: R.value[e.status] && R.value[e.status].color || "#9ca3af" })
|
|
33094
33094
|
}, W(pe(e.status)), 5), Z("span", null, W(e.content), 1)]))), 128))])) : Q("", !0),
|
|
33095
|
-
|
|
33096
|
-
|
|
33097
|
-
Z("div", Jz, [Z("span", Yz, W(y.value.debugTriggered), 1), Z("span", Xz, W(
|
|
33098
|
-
Z("div", Zz, [Z("span", Qz, W(y.value.debugRoundsSummarized), 1), Z("span", $z, W(
|
|
33099
|
-
Z("div", eB, [Z("span", tB, W(y.value.debugCtxRecalled), 1), Z("span", nB, W(
|
|
33100
|
-
Z("div", rB, [Z("span", iB, W(y.value.debugMessageCount), 1), Z("span", aB, W(
|
|
33101
|
-
Z("div", oB, [Z("span", sB, W(y.value.debugStrategy), 1), Z("span", cB, W(
|
|
33102
|
-
|
|
33095
|
+
I.value.memory ? (Y(), X("div", Hz, [Z("div", Uz, "📝 " + W(y.value.debugMemoryTitle), 1), Z("pre", Wz, W(I.value.memory), 1)])) : Q("", !0),
|
|
33096
|
+
I.value.lastCompression ? (Y(), X("div", Gz, [Z("div", Kz, "🗜️ " + W(y.value.debugLastCompTitle), 1), Z("div", qz, [
|
|
33097
|
+
Z("div", Jz, [Z("span", Yz, W(y.value.debugTriggered), 1), Z("span", Xz, W(I.value.lastCompression.triggered ? "✓" : y.value.debugNotTriggered), 1)]),
|
|
33098
|
+
Z("div", Zz, [Z("span", Qz, W(y.value.debugRoundsSummarized), 1), Z("span", $z, W(I.value.lastCompression.roundsSummarized) + " / " + W(I.value.lastCompression.roundsTotal), 1)]),
|
|
33099
|
+
Z("div", eB, [Z("span", tB, W(y.value.debugCtxRecalled), 1), Z("span", nB, W(I.value.lastCompression.roundsRecalled) + W(y.value.debugCountSuffix), 1)]),
|
|
33100
|
+
Z("div", rB, [Z("span", iB, W(y.value.debugMessageCount), 1), Z("span", aB, W(I.value.lastCompression.originalMessages) + " → " + W(I.value.lastCompression.compressedMessages), 1)]),
|
|
33101
|
+
Z("div", oB, [Z("span", sB, W(y.value.debugStrategy), 1), Z("span", cB, W(I.value.lastCompression.strategy), 1)]),
|
|
33102
|
+
I.value.lastCompression.decision ? (Y(), X("div", lB, [Z("span", uB, W(y.value.debugDecision), 1), Z("span", dB, "🤖 " + W(be(I.value.lastCompression.decision)), 1)])) : Q("", !0)
|
|
33103
33103
|
])])) : Q("", !0)
|
|
33104
33104
|
], 64)) : (Y(), X("div", CR, W(y.value.debugNoInfo), 1))])) : Q("", !0)
|
|
33105
33105
|
], 512)], 512)], 512)
|
|
33106
33106
|
], 2), Z("div", {
|
|
33107
33107
|
class: "drawer-mask",
|
|
33108
|
-
onClick:
|
|
33108
|
+
onClick: se
|
|
33109
33109
|
})])) : Q("", !0)]),
|
|
33110
33110
|
_: 1
|
|
33111
33111
|
})]));
|
|
@@ -34189,4 +34189,4 @@ function bV(e) {
|
|
|
34189
34189
|
return VC(e, JB);
|
|
34190
34190
|
}
|
|
34191
34191
|
//#endregion
|
|
34192
|
-
export { uF as ApprovalBar, lb as CAPABILITIES, fb as CONTEXT_PRESETS, qB as ChatDialog, _A as ChatHeader, rI as ChatInput, yV as CodePreview, hy as CompressDecisionSchema, DF as ConflictBar, BS as DEFAULT_COMPUTED_STYLES, ZD as DEFAULT_DIALOG_ICONS, bh as DEFAULT_PROMPT_SOFT_CAP, Zg as DEFAULT_SYSTEM_PROMPT, Qg as DEFAULT_SYSTEM_PROMPT_EN, pB as DebugDrawer, OA as FocusBar, FN as HLJS_BLOCK_MAX_CHARS, iv as HTML_VOID_TAGS, ug as HUMAN_CONFIRM_TOOL_NAME, Vk as IconGlyph, tu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, eO as MESSAGES_EN_US, $D as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, ad as MODEL_UNAVAILABLE_GUIDANCE, qN as MessageContent, kP as MessageList, yP as MessageRow, zP as QueuedBar, yh as SOFT_CAP_MIN_WINDOW, dh as STOP_WORDS, VB as SkillPanel, um as UNSAFE_KEYS, fC as actionsToInspectInfo, dC as actionsToTools, Zl as agentError, Ug as analyzeContext, Tm as applyPatchToClone, Om as applyPatchToLive, K_ as applyPatchesToBind, bS as applyProposalOps, kp as arrayMinLength, Xl as asAgentError, Yv as buildCollectorJs, GS as buildCssPath, a_ as buildDataPrompt, Vv as buildDiagnosticsReport, ay as buildHtmlFragmentSkill, Xv as buildSandboxSrcdoc, o_ as buildSystemPrompt, Pu as captureSelectionQuote, rO as chatContextKey, G_ as commitSetToBind, ny as composeStructureThenRender, fu as compressImage, Yg as connectMcp,
|
|
34192
|
+
export { uF as ApprovalBar, lb as CAPABILITIES, fb as CONTEXT_PRESETS, qB as ChatDialog, _A as ChatHeader, rI as ChatInput, yV as CodePreview, hy as CompressDecisionSchema, DF as ConflictBar, BS as DEFAULT_COMPUTED_STYLES, ZD as DEFAULT_DIALOG_ICONS, bh as DEFAULT_PROMPT_SOFT_CAP, Zg as DEFAULT_SYSTEM_PROMPT, Qg as DEFAULT_SYSTEM_PROMPT_EN, pB as DebugDrawer, OA as FocusBar, FN as HLJS_BLOCK_MAX_CHARS, iv as HTML_VOID_TAGS, ug as HUMAN_CONFIRM_TOOL_NAME, Vk as IconGlyph, tu as ImageInputError, T as LOW_CAPS_HINT_BASELINE, eO as MESSAGES_EN_US, $D as MESSAGES_ZH_CN, S as MIN_CONTEXT_WINDOW, ad as MODEL_UNAVAILABLE_GUIDANCE, qN as MessageContent, kP as MessageList, yP as MessageRow, zP as QueuedBar, yh as SOFT_CAP_MIN_WINDOW, dh as STOP_WORDS, VB as SkillPanel, um as UNSAFE_KEYS, fC as actionsToInspectInfo, dC as actionsToTools, Zl as agentError, Ug as analyzeContext, Tm as applyPatchToClone, Om as applyPatchToLive, K_ as applyPatchesToBind, bS as applyProposalOps, kp as arrayMinLength, Xl as asAgentError, Yv as buildCollectorJs, GS as buildCssPath, a_ as buildDataPrompt, Vv as buildDiagnosticsReport, ay as buildHtmlFragmentSkill, Xv as buildSandboxSrcdoc, o_ as buildSystemPrompt, Pu as captureSelectionQuote, rO as chatContextKey, G_ as commitSetToBind, ny as composeStructureThenRender, fu as compressImage, Yg as connectMcp, F as constructLlmFromConfig, te as constructOpenLlmSync, XD as copyText, yS as countOccurrences, yp as createAgent, lg as createApprovalMiddleware, iO as createChatContext, bV as createChatSdk, xg as createCheckpointManager, Sg as createCheckpointMiddleware, Ay as createConflictManager, Wg as createContextInspectorMiddleware, ly as createCraftNoteCheck, rv as createDataOps, iV as createEvalHarness, sy as createHtmlFormatCheck, ty as createHtmlRenderCheck, dy as createHtmlSubagent, pg as createHumanConfirmMiddleware, fg as createHumanConfirmTool, tV as createIdleDetector, Qy as createMemoryBackend, ng as createMemoryMiddleware, y as createProxyLlm, eV as createRagSubagent, dd as createSandboxRunner, db as createSdkEvents, NC as createSerialRunner, nb as createSessionStore, rb as createSessionStoreWithBackend, kC as createSkillStore, qh as createSubagentMiddleware, Dh as createSubagentTracker, Xh as createSubagentsMiddleware, xC as createUsageHintsMiddleware, wg as createVerifyMiddleware, u_ as createVfs, eb as createWebStorageBackend, Ag as createWriteBackCheck, od as decorateModelUnavailable, gm as deepClone, hC as defineDataToolset, Vm as defineSkill, fy as defineTool, hm as deleteByPath, gy as deriveTitle, Up as describeSchemaNode, np as detectGarbledToolCall, ff as detectTransitionalReply, Mm as diffObjects, rV as diffReport, XS as domInfoTool, tC as domInspectSkill, YS as domSearchTool, jS as domToStructure, zS as domTools, mC as domToolsStatic, Ap as elementSchemaCandidates, US as ensureDomListenerRecorder, ph as estimateMessageTokens, gh as estimateRoundTokens, O as estimateTokens, ie as extractReasoningDelta, nm as extractSchemaHint, Gg as extractText, re as extractTextDelta, ae as extractUsage, DS as fetchDocTools, pC as fetchTools, jm as findStrippedKeys, Wp as formatConstraints, Kl as formatZodIssues, pm as getByPath, MS as getDomTool, JS as getElementInfo, iC as getEnvSummary, WS as getRecordedListeners, $v as getSandboxLifecycle, Cp as getSchemaAtPath, bp as getSchemaTopKeys, xS as hashContent, Cm as hashValue, oy as htmlFragmentSkill, Zp as htmlOrchestratorPrompt, _h as indexSummarize, sC as inspectEnvTool, cC as inspectTools, vy as isChatModel, rd as isContextLengthError, kk as isIconHtml, id as isModelUnavailableError, xp as isPathAllowed, Wy as isQuotaError, dm as isUnsafePath, xd as jpEval, Jl as jsonParseError, bm as limitDepth, _S as lineDiff, E as lowCapsHint, VN as markedToHtml, zv as maskUrlCredentials, vm as maybeParseValue, Nv as measureWriteScale, Dm as moveByPath, N as normalizeBaseUrl, Jv as normalizeRenderResult, se as normalizeUsage, A as offloadPassThroughChars, k as offloadThresholdChars, Xp as presets, Lp as projectBySchema, Ip as projectBySchemaDeep, ym as projectFields, vh as recallRounds, ey as renderInSandbox, HN as renderMarkdownHtml, Gp as renderSchemaHint, Kp as renderSchemaOverview, Yp as renderSchemaShallow, ub as resolveCapabilities, mb as resolveContextOptions, ob as resolveDialogConfig, QD as resolveDialogIcons, nO as resolveDialogMessages, ky as resolveLlm, D as resolveModelCaps, Sh as resolvePromptSoftCap, Ep as resolveSchemaPath, ab as resolveStorage, Am as restoreInPlace, km as restoreLive, Yl as routeError, Td as runSandboxedScript, fm as safeMerge, rC as safeSerialize, xm as safeStringify, rp as sanitizeGarbledContent, Nk as sanitizeIconHtml, Ik as sanitizeMessageHtml, Op as schemaHasRefinement, KS as searchDom, Cd as searchJson, gC as selectBuiltinTools, mm as setByPath, Ch as shouldTriggerCompression, Hv as stringifyDiagnosticsReport, ee as stripStainlessFetch, Qp as systemPromptHelpers, w as tableMaxOutputTokens, fh as tokenize, $ as toolError, Sp as unwrapSchema, YD as useChat, aO as useChatContext, Dp as validateAtPath, ov as validateHtmlFormat, U_ as validateRootValueLocally, W_ as validateWriteLocally, wm as watchFieldsHash, e as z, ql as zodError };
|