neoctl-web 0.1.9 → 0.1.10
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/assets/index-DGNbGP2p.js +123 -0
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/index-BihhJN9D.js +0 -122
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
var vm=Object.defineProperty;var wm=(e,t,n)=>t in e?vm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $e=(e,t,n)=>wm(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();/**
|
|
2
|
+
* @vue/shared v3.5.34
|
|
3
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
|
+
* @license MIT
|
|
5
|
+
**/function al(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ue={},_s=[],en=()=>{},Pd=()=>!1,oo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ao=e=>e.startsWith("onUpdate:"),Xe=Object.assign,ll=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},xm=Object.prototype.hasOwnProperty,Oe=(e,t)=>xm.call(e,t),me=Array.isArray,vs=e=>$r(e)==="[object Map]",Ms=e=>$r(e)==="[object Set]",pu=e=>$r(e)==="[object Date]",Se=e=>typeof e=="function",Ve=e=>typeof e=="string",tn=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",$d=e=>(Pe(e)||Se(e))&&Se(e.then)&&Se(e.catch),Bd=Object.prototype.toString,$r=e=>Bd.call(e),Sm=e=>$r(e).slice(8,-1),Ud=e=>$r(e)==="[object Object]",cl=e=>Ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,_r=al(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),lo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Em=/-\w/g,yt=lo(e=>e.replace(Em,t=>t.slice(1).toUpperCase())),Tm=/\B([A-Z])/g,Pn=lo(e=>e.replace(Tm,"-$1").toLowerCase()),co=lo(e=>e.charAt(0).toUpperCase()+e.slice(1)),pa=lo(e=>e?`on${co(e)}`:""),Xt=(e,t)=>!Object.is(e,t),Pi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Fd=(e,t,n,i=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:i,value:n})},uo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Am=e=>{const t=Ve(e)?Number(e):NaN;return isNaN(t)?e:t};let hu;const fo=()=>hu||(hu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function It(e){if(me(e)){const t={};for(let n=0;n<e.length;n++){const i=e[n],o=Ve(i)?Rm(i):It(i);if(o)for(const a in o)t[a]=o[a]}return t}else if(Ve(e)||Pe(e))return e}const Cm=/;(?![^(]*\))/g,Im=/:([^]+)/,Mm=/\/\*[^]*?\*\//g;function Rm(e){const t={};return e.replace(Mm,"").split(Cm).forEach(n=>{if(n){const i=n.split(Im);i.length>1&&(t[i[0].trim()]=i[1].trim())}}),t}function de(e){let t="";if(Ve(e))t=e;else if(me(e))for(let n=0;n<e.length;n++){const i=de(e[n]);i&&(t+=i+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Nm="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Lm=al(Nm);function zd(e){return!!e||e===""}function Om(e,t){if(e.length!==t.length)return!1;let n=!0;for(let i=0;n&&i<e.length;i++)n=On(e[i],t[i]);return n}function On(e,t){if(e===t)return!0;let n=pu(e),i=pu(t);if(n||i)return n&&i?e.getTime()===t.getTime():!1;if(n=tn(e),i=tn(t),n||i)return e===t;if(n=me(e),i=me(t),n||i)return n&&i?Om(e,t):!1;if(n=Pe(e),i=Pe(t),n||i){if(!n||!i)return!1;const o=Object.keys(e).length,a=Object.keys(t).length;if(o!==a)return!1;for(const c in e){const u=e.hasOwnProperty(c),f=t.hasOwnProperty(c);if(u&&!f||!u&&f||!On(e[c],t[c]))return!1}}return String(e)===String(t)}function ul(e,t){return e.findIndex(n=>On(n,t))}const Hd=e=>!!(e&&e.__v_isRef===!0),T=e=>Ve(e)?e:e==null?"":me(e)||Pe(e)&&(e.toString===Bd||!Se(e.toString))?Hd(e)?T(e.value):JSON.stringify(e,jd,2):String(e),jd=(e,t)=>Hd(t)?jd(e,t.value):vs(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[i,o],a)=>(n[ha(i,a)+" =>"]=o,n),{})}:Ms(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ha(n))}:tn(t)?ha(t):Pe(t)&&!me(t)&&!Ud(t)?String(t):t,ha=(e,t="")=>{var n;return tn(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
|
|
6
|
+
* @vue/reactivity v3.5.34
|
|
7
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
8
|
+
* @license MIT
|
|
9
|
+
**/let Je;class Dm{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Je&&(Je.active?(this.parent=Je,this.index=(Je.scopes||(Je.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Je;try{return Je=this,t()}finally{Je=n}}}on(){++this._on===1&&(this.prevScope=Je,Je=this)}off(){if(this._on>0&&--this._on===0){if(Je===this)Je=this.prevScope;else{let t=Je;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Pm(){return Je}function $m(e,t=!1){Je&&Je.cleanups.push(e)}let Fe;const ma=new WeakSet;class Wd{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Je&&(Je.active?Je.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ma.has(this)&&(ma.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Vd(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,mu(this),Gd(this);const t=Fe,n=Ft;Fe=this,Ft=!0;try{return this.fn()}finally{qd(this),Fe=t,Ft=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)gl(t);this.deps=this.depsTail=void 0,mu(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ma.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){$a(this)&&this.run()}get dirty(){return $a(this)}}let Kd=0,vr,wr;function Vd(e,t=!1){if(e.flags|=8,t){e.next=wr,wr=e;return}e.next=vr,vr=e}function dl(){Kd++}function fl(){if(--Kd>0)return;if(wr){let t=wr;for(wr=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;vr;){let t=vr;for(vr=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(i){e||(e=i)}t=n}}if(e)throw e}function Gd(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function qd(e){let t,n=e.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),gl(i),Bm(i)):t=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}e.deps=t,e.depsTail=n}function $a(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Zd(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Zd(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ir)||(e.globalVersion=Ir,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!$a(e))))return;e.flags|=2;const t=e.dep,n=Fe,i=Ft;Fe=e,Ft=!0;try{Gd(e);const o=e.fn(e._value);(t.version===0||Xt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{Fe=n,Ft=i,qd(e),e.flags&=-3}}function gl(e,t=!1){const{dep:n,prevSub:i,nextSub:o}=e;if(i&&(i.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=i,e.nextSub=void 0),n.subs===e&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let a=n.computed.deps;a;a=a.nextDep)gl(a,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Bm(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Ft=!0;const Qd=[];function hn(){Qd.push(Ft),Ft=!1}function mn(){const e=Qd.pop();Ft=e===void 0?!0:e}function mu(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Fe;Fe=void 0;try{t()}finally{Fe=n}}}let Ir=0;class Um{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class pl{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Fe||!Ft||Fe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Fe)n=this.activeLink=new Um(Fe,this),Fe.deps?(n.prevDep=Fe.depsTail,Fe.depsTail.nextDep=n,Fe.depsTail=n):Fe.deps=Fe.depsTail=n,Yd(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Fe.depsTail,n.nextDep=void 0,Fe.depsTail.nextDep=n,Fe.depsTail=n,Fe.deps===n&&(Fe.deps=i)}return n}trigger(t){this.version++,Ir++,this.notify(t)}notify(t){dl();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{fl()}}}function Yd(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let i=t.deps;i;i=i.nextDep)Yd(i)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ba=new WeakMap,Yn=Symbol(""),Ua=Symbol(""),Mr=Symbol("");function at(e,t,n){if(Ft&&Fe){let i=Ba.get(e);i||Ba.set(e,i=new Map);let o=i.get(n);o||(i.set(n,o=new pl),o.map=i,o.key=n),o.track()}}function fn(e,t,n,i,o,a){const c=Ba.get(e);if(!c){Ir++;return}const u=f=>{f&&f.trigger()};if(dl(),t==="clear")c.forEach(u);else{const f=me(e),m=f&&cl(n);if(f&&n==="length"){const h=Number(i);c.forEach((_,w)=>{(w==="length"||w===Mr||!tn(w)&&w>=h)&&u(_)})}else switch((n!==void 0||c.has(void 0))&&u(c.get(n)),m&&u(c.get(Mr)),t){case"add":f?m&&u(c.get("length")):(u(c.get(Yn)),vs(e)&&u(c.get(Ua)));break;case"delete":f||(u(c.get(Yn)),vs(e)&&u(c.get(Ua)));break;case"set":vs(e)&&u(c.get(Yn));break}}fl()}function gs(e){const t=Ne(e);return t===e?t:(at(t,"iterate",Mr),Rt(e)?t:t.map(zt))}function go(e){return at(e=Ne(e),"iterate",Mr),e}function Yt(e,t){return bn(e)?Ts(Jn(e)?zt(t):t):zt(t)}const Fm={__proto__:null,[Symbol.iterator](){return ba(this,Symbol.iterator,e=>Yt(this,e))},concat(...e){return gs(this).concat(...e.map(t=>me(t)?gs(t):t))},entries(){return ba(this,"entries",e=>(e[1]=Yt(this,e[1]),e))},every(e,t){return an(this,"every",e,t,void 0,arguments)},filter(e,t){return an(this,"filter",e,t,n=>n.map(i=>Yt(this,i)),arguments)},find(e,t){return an(this,"find",e,t,n=>Yt(this,n),arguments)},findIndex(e,t){return an(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return an(this,"findLast",e,t,n=>Yt(this,n),arguments)},findLastIndex(e,t){return an(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return an(this,"forEach",e,t,void 0,arguments)},includes(...e){return ka(this,"includes",e)},indexOf(...e){return ka(this,"indexOf",e)},join(e){return gs(this).join(e)},lastIndexOf(...e){return ka(this,"lastIndexOf",e)},map(e,t){return an(this,"map",e,t,void 0,arguments)},pop(){return or(this,"pop")},push(...e){return or(this,"push",e)},reduce(e,...t){return bu(this,"reduce",e,t)},reduceRight(e,...t){return bu(this,"reduceRight",e,t)},shift(){return or(this,"shift")},some(e,t){return an(this,"some",e,t,void 0,arguments)},splice(...e){return or(this,"splice",e)},toReversed(){return gs(this).toReversed()},toSorted(e){return gs(this).toSorted(e)},toSpliced(...e){return gs(this).toSpliced(...e)},unshift(...e){return or(this,"unshift",e)},values(){return ba(this,"values",e=>Yt(this,e))}};function ba(e,t,n){const i=go(e),o=i[t]();return i!==e&&!Rt(e)&&(o._next=o.next,o.next=()=>{const a=o._next();return a.done||(a.value=n(a.value)),a}),o}const zm=Array.prototype;function an(e,t,n,i,o,a){const c=go(e),u=c!==e&&!Rt(e),f=c[t];if(f!==zm[t]){const _=f.apply(e,a);return u?zt(_):_}let m=n;c!==e&&(u?m=function(_,w){return n.call(this,Yt(e,_),w,e)}:n.length>2&&(m=function(_,w){return n.call(this,_,w,e)}));const h=f.call(c,m,i);return u&&o?o(h):h}function bu(e,t,n,i){const o=go(e),a=o!==e&&!Rt(e);let c=n,u=!1;o!==e&&(a?(u=i.length===0,c=function(m,h,_){return u&&(u=!1,m=Yt(e,m)),n.call(this,m,Yt(e,h),_,e)}):n.length>3&&(c=function(m,h,_){return n.call(this,m,h,_,e)}));const f=o[t](c,...i);return u?Yt(e,f):f}function ka(e,t,n){const i=Ne(e);at(i,"iterate",Mr);const o=i[t](...n);return(o===-1||o===!1)&&bl(n[0])?(n[0]=Ne(n[0]),i[t](...n)):o}function or(e,t,n=[]){hn(),dl();const i=Ne(e)[t].apply(e,n);return fl(),mn(),i}const Hm=al("__proto__,__v_isRef,__isVue"),Jd=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tn));function jm(e){tn(e)||(e=String(e));const t=Ne(this);return at(t,"has",e),t.hasOwnProperty(e)}class Xd{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,i){if(n==="__v_skip")return t.__v_skip;const o=this._isReadonly,a=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return a;if(n==="__v_raw")return i===(o?a?Xm:sf:a?nf:tf).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(i)?t:void 0;const c=me(t);if(!o){let f;if(c&&(f=Fm[n]))return f;if(n==="hasOwnProperty")return jm}const u=Reflect.get(t,n,ut(t)?t:i);if((tn(n)?Jd.has(n):Hm(n))||(o||at(t,"get",n),a))return u;if(ut(u)){const f=c&&cl(n)?u:u.value;return o&&Pe(f)?za(f):f}return Pe(u)?o?za(u):ws(u):u}}class ef extends Xd{constructor(t=!1){super(!1,t)}set(t,n,i,o){let a=t[n];const c=me(t)&&cl(n);if(!this._isShallow){const m=bn(a);if(!Rt(i)&&!bn(i)&&(a=Ne(a),i=Ne(i)),!c&&ut(a)&&!ut(i))return m||(a.value=i),!0}const u=c?Number(n)<t.length:Oe(t,n),f=Reflect.set(t,n,i,ut(t)?t:o);return t===Ne(o)&&(u?Xt(i,a)&&fn(t,"set",n,i):fn(t,"add",n,i)),f}deleteProperty(t,n){const i=Oe(t,n);t[n];const o=Reflect.deleteProperty(t,n);return o&&i&&fn(t,"delete",n,void 0),o}has(t,n){const i=Reflect.has(t,n);return(!tn(n)||!Jd.has(n))&&at(t,"has",n),i}ownKeys(t){return at(t,"iterate",me(t)?"length":Yn),Reflect.ownKeys(t)}}class Wm extends Xd{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Km=new ef,Vm=new Wm,Gm=new ef(!0);const Fa=e=>e,xi=e=>Reflect.getPrototypeOf(e);function qm(e,t,n){return function(...i){const o=this.__v_raw,a=Ne(o),c=vs(a),u=e==="entries"||e===Symbol.iterator&&c,f=e==="keys"&&c,m=o[e](...i),h=n?Fa:t?Ts:zt;return!t&&at(a,"iterate",f?Ua:Yn),Xe(Object.create(m),{next(){const{value:_,done:w}=m.next();return w?{value:_,done:w}:{value:u?[h(_[0]),h(_[1])]:h(_),done:w}}})}}function Si(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Zm(e,t){const n={get(o){const a=this.__v_raw,c=Ne(a),u=Ne(o);e||(Xt(o,u)&&at(c,"get",o),at(c,"get",u));const{has:f}=xi(c),m=t?Fa:e?Ts:zt;if(f.call(c,o))return m(a.get(o));if(f.call(c,u))return m(a.get(u));a!==c&&a.get(o)},get size(){const o=this.__v_raw;return!e&&at(Ne(o),"iterate",Yn),o.size},has(o){const a=this.__v_raw,c=Ne(a),u=Ne(o);return e||(Xt(o,u)&&at(c,"has",o),at(c,"has",u)),o===u?a.has(o):a.has(o)||a.has(u)},forEach(o,a){const c=this,u=c.__v_raw,f=Ne(u),m=t?Fa:e?Ts:zt;return!e&&at(f,"iterate",Yn),u.forEach((h,_)=>o.call(a,m(h),m(_),c))}};return Xe(n,e?{add:Si("add"),set:Si("set"),delete:Si("delete"),clear:Si("clear")}:{add(o){const a=Ne(this),c=xi(a),u=Ne(o),f=!t&&!Rt(o)&&!bn(o)?u:o;return c.has.call(a,f)||Xt(o,f)&&c.has.call(a,o)||Xt(u,f)&&c.has.call(a,u)||(a.add(f),fn(a,"add",f,f)),this},set(o,a){!t&&!Rt(a)&&!bn(a)&&(a=Ne(a));const c=Ne(this),{has:u,get:f}=xi(c);let m=u.call(c,o);m||(o=Ne(o),m=u.call(c,o));const h=f.call(c,o);return c.set(o,a),m?Xt(a,h)&&fn(c,"set",o,a):fn(c,"add",o,a),this},delete(o){const a=Ne(this),{has:c,get:u}=xi(a);let f=c.call(a,o);f||(o=Ne(o),f=c.call(a,o)),u&&u.call(a,o);const m=a.delete(o);return f&&fn(a,"delete",o,void 0),m},clear(){const o=Ne(this),a=o.size!==0,c=o.clear();return a&&fn(o,"clear",void 0,void 0),c}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=qm(o,e,t)}),n}function hl(e,t){const n=Zm(e,t);return(i,o,a)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?i:Reflect.get(Oe(n,o)&&o in i?n:i,o,a)}const Qm={get:hl(!1,!1)},Ym={get:hl(!1,!0)},Jm={get:hl(!0,!1)};const tf=new WeakMap,nf=new WeakMap,sf=new WeakMap,Xm=new WeakMap;function eb(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function tb(e){return e.__v_skip||!Object.isExtensible(e)?0:eb(Sm(e))}function ws(e){return bn(e)?e:ml(e,!1,Km,Qm,tf)}function nb(e){return ml(e,!1,Gm,Ym,nf)}function za(e){return ml(e,!0,Vm,Jm,sf)}function ml(e,t,n,i,o){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const a=tb(e);if(a===0)return e;const c=o.get(e);if(c)return c;const u=new Proxy(e,a===2?i:n);return o.set(e,u),u}function Jn(e){return bn(e)?Jn(e.__v_raw):!!(e&&e.__v_isReactive)}function bn(e){return!!(e&&e.__v_isReadonly)}function Rt(e){return!!(e&&e.__v_isShallow)}function bl(e){return e?!!e.__v_raw:!1}function Ne(e){const t=e&&e.__v_raw;return t?Ne(t):e}function sb(e){return!Oe(e,"__v_skip")&&Object.isExtensible(e)&&Fd(e,"__v_skip",!0),e}const zt=e=>Pe(e)?ws(e):e,Ts=e=>Pe(e)?za(e):e;function ut(e){return e?e.__v_isRef===!0:!1}function Ke(e){return rf(e,!1)}function rb(e){return rf(e,!0)}function rf(e,t){return ut(e)?e:new ib(e,t)}class ib{constructor(t,n){this.dep=new pl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Ne(t),this._value=n?t:zt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,i=this.__v_isShallow||Rt(t)||bn(t);t=i?t:Ne(t),Xt(t,n)&&(this._rawValue=t,this._value=i?t:zt(t),this.dep.trigger())}}function ku(e){e.dep&&e.dep.trigger()}function Mt(e){return ut(e)?e.value:e}const ob={get:(e,t,n)=>t==="__v_raw"?e:Mt(Reflect.get(e,t,n)),set:(e,t,n,i)=>{const o=e[t];return ut(o)&&!ut(n)?(o.value=n,!0):Reflect.set(e,t,n,i)}};function of(e){return Jn(e)?e:new Proxy(e,ob)}class ab{constructor(t,n,i){this.fn=t,this.setter=n,this._value=void 0,this.dep=new pl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ir-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Fe!==this)return Vd(this,!0),!0}get value(){const t=this.dep.track();return Zd(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function lb(e,t,n=!1){let i,o;return Se(e)?i=e:(i=e.get,o=e.set),new ab(i,o,n)}const Ei={},ji=new WeakMap;let Gn;function cb(e,t=!1,n=Gn){if(n){let i=ji.get(n);i||ji.set(n,i=[]),i.push(e)}}function ub(e,t,n=Ue){const{immediate:i,deep:o,once:a,scheduler:c,augmentJob:u,call:f}=n,m=R=>o?R:Rt(R)||o===!1||o===0?gn(R,1):gn(R);let h,_,w,I,A=!1,P=!1;if(ut(e)?(_=()=>e.value,A=Rt(e)):Jn(e)?(_=()=>m(e),A=!0):me(e)?(P=!0,A=e.some(R=>Jn(R)||Rt(R)),_=()=>e.map(R=>{if(ut(R))return R.value;if(Jn(R))return m(R);if(Se(R))return f?f(R,2):R()})):Se(e)?t?_=f?()=>f(e,2):e:_=()=>{if(w){hn();try{w()}finally{mn()}}const R=Gn;Gn=h;try{return f?f(e,3,[I]):e(I)}finally{Gn=R}}:_=en,t&&o){const R=_,G=o===!0?1/0:o;_=()=>gn(R(),G)}const U=Pm(),N=()=>{h.stop(),U&&U.active&&ll(U.effects,h)};if(a&&t){const R=t;t=(...G)=>{R(...G),N()}}let B=P?new Array(e.length).fill(Ei):Ei;const l=R=>{if(!(!(h.flags&1)||!h.dirty&&!R))if(t){const G=h.run();if(o||A||(P?G.some((ee,re)=>Xt(ee,B[re])):Xt(G,B))){w&&w();const ee=Gn;Gn=h;try{const re=[G,B===Ei?void 0:P&&B[0]===Ei?[]:B,I];B=G,f?f(t,3,re):t(...re)}finally{Gn=ee}}}else h.run()};return u&&u(l),h=new Wd(_),h.scheduler=c?()=>c(l,!1):l,I=R=>cb(R,!1,h),w=h.onStop=()=>{const R=ji.get(h);if(R){if(f)f(R,4);else for(const G of R)G();ji.delete(h)}},t?i?l(!0):B=h.run():c?c(l.bind(null,!0),!0):h.run(),N.pause=h.pause.bind(h),N.resume=h.resume.bind(h),N.stop=N,N}function gn(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,ut(e))gn(e.value,t,n);else if(me(e))for(let i=0;i<e.length;i++)gn(e[i],t,n);else if(Ms(e)||vs(e))e.forEach(i=>{gn(i,t,n)});else if(Ud(e)){for(const i in e)gn(e[i],t,n);for(const i of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,i)&&gn(e[i],t,n)}return e}/**
|
|
10
|
+
* @vue/runtime-core v3.5.34
|
|
11
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
12
|
+
* @license MIT
|
|
13
|
+
**/function Br(e,t,n,i){try{return i?e(...i):e()}catch(o){po(o,t,n)}}function Ht(e,t,n,i){if(Se(e)){const o=Br(e,t,n,i);return o&&$d(o)&&o.catch(a=>{po(a,t,n)}),o}if(me(e)){const o=[];for(let a=0;a<e.length;a++)o.push(Ht(e[a],t,n,i));return o}}function po(e,t,n,i=!0){const o=t?t.vnode:null,{errorHandler:a,throwUnhandledErrorInProduction:c}=t&&t.appContext.config||Ue;if(t){let u=t.parent;const f=t.proxy,m=`https://vuejs.org/error-reference/#runtime-${n}`;for(;u;){const h=u.ec;if(h){for(let _=0;_<h.length;_++)if(h[_](e,f,m)===!1)return}u=u.parent}if(a){hn(),Br(a,null,10,[e,f,m]),mn();return}}db(e,n,o,i,c)}function db(e,t,n,i=!0,o=!1){if(o)throw e;console.error(e)}const bt=[];let Qt=-1;const xs=[];let Nn=null,bs=0;const af=Promise.resolve();let Wi=null;function $t(e){const t=Wi||af;return e?t.then(this?e.bind(this):e):t}function fb(e){let t=Qt+1,n=bt.length;for(;t<n;){const i=t+n>>>1,o=bt[i],a=Rr(o);a<e||a===e&&o.flags&2?t=i+1:n=i}return t}function kl(e){if(!(e.flags&1)){const t=Rr(e),n=bt[bt.length-1];!n||!(e.flags&2)&&t>=Rr(n)?bt.push(e):bt.splice(fb(t),0,e),e.flags|=1,lf()}}function lf(){Wi||(Wi=af.then(uf))}function gb(e){me(e)?xs.push(...e):Nn&&e.id===-1?Nn.splice(bs+1,0,e):e.flags&1||(xs.push(e),e.flags|=1),lf()}function yu(e,t,n=Qt+1){for(;n<bt.length;n++){const i=bt[n];if(i&&i.flags&2){if(e&&i.id!==e.uid)continue;bt.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function cf(e){if(xs.length){const t=[...new Set(xs)].sort((n,i)=>Rr(n)-Rr(i));if(xs.length=0,Nn){Nn.push(...t);return}for(Nn=t,bs=0;bs<Nn.length;bs++){const n=Nn[bs];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Nn=null,bs=0}}const Rr=e=>e.id==null?e.flags&2?-1:1/0:e.id;function uf(e){try{for(Qt=0;Qt<bt.length;Qt++){const t=bt[Qt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Br(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Qt<bt.length;Qt++){const t=bt[Qt];t&&(t.flags&=-2)}Qt=-1,bt.length=0,cf(),Wi=null,(bt.length||xs.length)&&uf()}}let St=null,df=null;function Ki(e){const t=St;return St=e,df=e&&e.type.__scopeId||null,t}function ff(e,t=St,n){if(!t||e._n)return e;const i=(...o)=>{i._d&&Lu(-1);const a=Ki(t);let c;try{c=e(...o)}finally{Ki(a),i._d&&Lu(1)}return c};return i._n=!0,i._c=!0,i._d=!0,i}function At(e,t){if(St===null)return e;const n=ko(St),i=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[a,c,u,f=Ue]=t[o];a&&(Se(a)&&(a={mounted:a,updated:a}),a.deep&&gn(c),i.push({dir:a,instance:n,value:c,oldValue:void 0,arg:u,modifiers:f}))}return e}function Wn(e,t,n,i){const o=e.dirs,a=t&&t.dirs;for(let c=0;c<o.length;c++){const u=o[c];a&&(u.oldValue=a[c].value);let f=u.dir[i];f&&(hn(),Ht(f,n,8,[e.el,u,e,t]),mn())}}function pb(e,t){if(lt){let n=lt.provides;const i=lt.parent&<.parent.provides;i===n&&(n=lt.provides=Object.create(i)),n[e]=t}}function $i(e,t,n=!1){const i=zf();if(i||Ss){let o=Ss?Ss._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return n&&Se(t)?t.call(i&&i.proxy):t}}const hb=Symbol.for("v-scx"),mb=()=>$i(hb);function ot(e,t,n){return gf(e,t,n)}function gf(e,t,n=Ue){const{immediate:i,deep:o,flush:a,once:c}=n,u=Xe({},n),f=t&&i||!t&&a!=="post";let m;if(Or){if(a==="sync"){const I=mb();m=I.__watcherHandles||(I.__watcherHandles=[])}else if(!f){const I=()=>{};return I.stop=en,I.resume=en,I.pause=en,I}}const h=lt;u.call=(I,A,P)=>Ht(I,h,A,P);let _=!1;a==="post"?u.scheduler=I=>{mt(I,h&&h.suspense)}:a!=="sync"&&(_=!0,u.scheduler=(I,A)=>{A?I():kl(I)}),u.augmentJob=I=>{t&&(I.flags|=4),_&&(I.flags|=2,h&&(I.id=h.uid,I.i=h))};const w=ub(e,t,u);return Or&&(m?m.push(w):f&&w()),w}function bb(e,t,n){const i=this.proxy,o=Ve(e)?e.includes(".")?pf(i,e):()=>i[e]:e.bind(i,i);let a;Se(t)?a=t:(a=t.handler,n=t);const c=zr(this),u=gf(o,a.bind(i),n);return c(),u}function pf(e,t){const n=t.split(".");return()=>{let i=e;for(let o=0;o<n.length&&i;o++)i=i[n[o]];return i}}const Cn=new WeakMap,hf=Symbol("_vte"),kb=e=>e.__isTeleport,qn=e=>e&&(e.disabled||e.disabled===""),yb=e=>e&&(e.defer||e.defer===""),_u=e=>typeof SVGElement<"u"&&e instanceof SVGElement,vu=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ha=(e,t)=>{const n=e&&e.to;return Ve(n)?t?t(n):null:n},_b={name:"Teleport",__isTeleport:!0,process(e,t,n,i,o,a,c,u,f,m){const{mc:h,pc:_,pbc:w,o:{insert:I,querySelector:A,createText:P,createComment:U,parentNode:N}}=m,B=qn(t.props);let{dynamicChildren:l}=t;const R=(re,oe,ne)=>{re.shapeFlag&16&&h(re.children,oe,ne,o,a,c,u,f)},G=(re=t)=>{const oe=qn(re.props),ne=re.target=Ha(re.props,A),he=ja(ne,re,P,I);ne&&(c!=="svg"&&_u(ne)?c="svg":c!=="mathml"&&vu(ne)&&(c="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(ne),oe||(R(re,ne,he),dr(re,!1)))},ee=re=>{const oe=()=>{if(Cn.get(re)===oe){if(Cn.delete(re),qn(re.props)){const ne=N(re.el)||n;R(re,ne,re.anchor),dr(re,!0)}G(re)}};Cn.set(re,oe),mt(oe,a)};if(e==null){const re=t.el=P(""),oe=t.anchor=P("");if(I(re,n,i),I(oe,n,i),yb(t.props)||a&&a.pendingBranch){ee(t);return}B&&(R(t,n,oe),dr(t,!0)),G()}else{t.el=e.el;const re=t.anchor=e.anchor,oe=Cn.get(e);if(oe){oe.flags|=8,Cn.delete(e),ee(t);return}t.targetStart=e.targetStart;const ne=t.target=e.target,he=t.targetAnchor=e.targetAnchor,ke=qn(e.props),te=ke?n:ne,we=ke?re:he;if(c==="svg"||_u(ne)?c="svg":(c==="mathml"||vu(ne))&&(c="mathml"),l?(w(e.dynamicChildren,l,te,o,a,c,u),vl(e,t,!0)):f||_(e,t,te,we,o,a,c,u,!1),B)ke?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ti(t,n,re,m,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Ae=t.target=Ha(t.props,A);Ae&&Ti(t,Ae,null,m,0)}else ke&&Ti(t,ne,he,m,1);dr(t,B)}},remove(e,t,n,{um:i,o:{remove:o}},a){const{shapeFlag:c,children:u,anchor:f,targetStart:m,targetAnchor:h,target:_,props:w}=e;let I=a||!qn(w);const A=Cn.get(e);if(A&&(A.flags|=8,Cn.delete(e),I=!1),_&&(o(m),o(h)),a&&o(f),c&16)for(let P=0;P<u.length;P++){const U=u[P];i(U,t,n,I,!!U.dynamicChildren)}},move:Ti,hydrate:vb};function Ti(e,t,n,{o:{insert:i},m:o},a=2){a===0&&i(e.targetAnchor,t,n);const{el:c,anchor:u,shapeFlag:f,children:m,props:h}=e,_=a===2;if(_&&i(c,t,n),!Cn.has(e)&&(!_||qn(h))&&f&16)for(let w=0;w<m.length;w++)o(m[w],t,n,2);_&&i(u,t,n)}function vb(e,t,n,i,o,a,{o:{nextSibling:c,parentNode:u,querySelector:f,insert:m,createText:h}},_){function w(U,N){let B=N;for(;B;){if(B&&B.nodeType===8){if(B.data==="teleport start anchor")t.targetStart=B;else if(B.data==="teleport anchor"){t.targetAnchor=B,U._lpa=t.targetAnchor&&c(t.targetAnchor);break}}B=c(B)}}function I(U,N){N.anchor=_(c(U),N,u(U),n,i,o,a)}const A=t.target=Ha(t.props,f),P=qn(t.props);if(A){const U=A._lpa||A.firstChild;t.shapeFlag&16&&(P?(I(e,t),w(A,U),t.targetAnchor||ja(A,t,h,m,u(e)===A?e:null)):(t.anchor=c(e),w(A,U),t.targetAnchor||ja(A,t,h,m),_(U&&c(U),t,A,n,i,o,a))),dr(t,P)}else P&&t.shapeFlag&16&&(I(e,t),t.targetStart=e,t.targetAnchor=c(e));return t.anchor&&c(t.anchor)}const Kt=_b;function dr(e,t){const n=e.ctx;if(n&&n.ut){let i,o;for(t?(i=e.el,o=e.anchor):(i=e.targetStart,o=e.targetAnchor);i&&i!==o;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function ja(e,t,n,i,o=null){const a=t.targetStart=n(""),c=t.targetAnchor=n("");return a[hf]=c,e&&(i(a,e,o),i(c,e,o)),c}const In=Symbol("_leaveCb"),ar=Symbol("_enterCb");function wb(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ur(()=>{e.isMounted=!0}),Fr(()=>{e.isUnmounting=!0}),e}const Ct=[Function,Array],xb={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ct,onEnter:Ct,onAfterEnter:Ct,onEnterCancelled:Ct,onBeforeLeave:Ct,onLeave:Ct,onAfterLeave:Ct,onLeaveCancelled:Ct,onBeforeAppear:Ct,onAppear:Ct,onAfterAppear:Ct,onAppearCancelled:Ct};function Sb(e,t){const{leavingVNodes:n}=e;let i=n.get(t.type);return i||(i=Object.create(null),n.set(t.type,i)),i}function Wa(e,t,n,i,o){const{appear:a,mode:c,persisted:u=!1,onBeforeEnter:f,onEnter:m,onAfterEnter:h,onEnterCancelled:_,onBeforeLeave:w,onLeave:I,onAfterLeave:A,onLeaveCancelled:P,onBeforeAppear:U,onAppear:N,onAfterAppear:B,onAppearCancelled:l}=t,R=String(e.key),G=Sb(n,e),ee=(ne,he)=>{ne&&Ht(ne,i,9,he)},re=(ne,he)=>{const ke=he[1];ee(ne,he),me(ne)?ne.every(te=>te.length<=1)&&ke():ne.length<=1&&ke()},oe={mode:c,persisted:u,beforeEnter(ne){let he=f;if(!n.isMounted)if(a)he=U||f;else return;ne[In]&&ne[In](!0);const ke=G[R];ke&&ks(e,ke)&&ke.el[In]&&ke.el[In](),ee(he,[ne])},enter(ne){if(G[R]===e)return;let he=m,ke=h,te=_;if(!n.isMounted)if(a)he=N||m,ke=B||h,te=l||_;else return;let we=!1;ne[ar]=He=>{we||(we=!0,He?ee(te,[ne]):ee(ke,[ne]),oe.delayedLeave&&oe.delayedLeave(),ne[ar]=void 0)};const Ae=ne[ar].bind(null,!1);he?re(he,[ne,Ae]):Ae()},leave(ne,he){const ke=String(e.key);if(ne[ar]&&ne[ar](!0),n.isUnmounting)return he();ee(w,[ne]);let te=!1;ne[In]=Ae=>{te||(te=!0,he(),Ae?ee(P,[ne]):ee(A,[ne]),ne[In]=void 0,G[ke]===e&&delete G[ke])};const we=ne[In].bind(null,!1);G[ke]=e,I?re(I,[ne,we]):we()},clone(ne){return Wa(ne,t,n,i)}};return oe}function Nr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Nr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function mf(e,t=!1,n){let i=[],o=0;for(let a=0;a<e.length;a++){let c=e[a];const u=n==null?c.key:String(n)+String(c.key!=null?c.key:a);c.type===ce?(c.patchFlag&128&&o++,i=i.concat(mf(c.children,t,u))):(t||c.type!==kn)&&i.push(u!=null?es(c,{key:u}):c)}if(o>1)for(let a=0;a<i.length;a++)i[a].patchFlag=-2;return i}function bf(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function wu(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Vi=new WeakMap;function xr(e,t,n,i,o=!1){if(me(e)){e.forEach((P,U)=>xr(P,t&&(me(t)?t[U]:t),n,i,o));return}if(Sr(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&xr(e,t,n,i.component.subTree);return}const a=i.shapeFlag&4?ko(i.component):i.el,c=o?null:a,{i:u,r:f}=e,m=t&&t.r,h=u.refs===Ue?u.refs={}:u.refs,_=u.setupState,w=Ne(_),I=_===Ue?Pd:P=>wu(h,P)?!1:Oe(w,P),A=(P,U)=>!(U&&wu(h,U));if(m!=null&&m!==f){if(xu(t),Ve(m))h[m]=null,I(m)&&(_[m]=null);else if(ut(m)){const P=t;A(m,P.k)&&(m.value=null),P.k&&(h[P.k]=null)}}if(Se(f))Br(f,u,12,[c,h]);else{const P=Ve(f),U=ut(f);if(P||U){const N=()=>{if(e.f){const B=P?I(f)?_[f]:h[f]:A()||!e.k?f.value:h[e.k];if(o)me(B)&&ll(B,a);else if(me(B))B.includes(a)||B.push(a);else if(P)h[f]=[a],I(f)&&(_[f]=h[f]);else{const l=[a];A(f,e.k)&&(f.value=l),e.k&&(h[e.k]=l)}}else P?(h[f]=c,I(f)&&(_[f]=c)):U&&(A(f,e.k)&&(f.value=c),e.k&&(h[e.k]=c))};if(c){const B=()=>{N(),Vi.delete(e)};B.id=-1,Vi.set(e,B),mt(B,n)}else xu(e),N()}}}function xu(e){const t=Vi.get(e);t&&(t.flags|=8,Vi.delete(e))}fo().requestIdleCallback;fo().cancelIdleCallback;const Sr=e=>!!e.type.__asyncLoader,kf=e=>e.type.__isKeepAlive;function Eb(e,t){yf(e,"a",t)}function Tb(e,t){yf(e,"da",t)}function yf(e,t,n=lt){const i=e.__wdc||(e.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(ho(t,i,n),n){let o=n.parent;for(;o&&o.parent;)kf(o.parent.vnode)&&Ab(i,t,n,o),o=o.parent}}function Ab(e,t,n,i){const o=ho(t,e,i,!0);vf(()=>{ll(i[t],o)},n)}function ho(e,t,n=lt,i=!1){if(n){const o=n[e]||(n[e]=[]),a=t.__weh||(t.__weh=(...c)=>{hn();const u=zr(n),f=Ht(t,n,e,c);return u(),mn(),f});return i?o.unshift(a):o.push(a),a}}const yn=e=>(t,n=lt)=>{(!Or||e==="sp")&&ho(e,(...i)=>t(...i),n)},Cb=yn("bm"),Ur=yn("m"),Ib=yn("bu"),_f=yn("u"),Fr=yn("bum"),vf=yn("um"),Mb=yn("sp"),Rb=yn("rtg"),Nb=yn("rtc");function Lb(e,t=lt){ho("ec",e,t)}const Ob="components";function Db(e,t){return $b(Ob,e,!0,t)||e}const Pb=Symbol.for("v-ndc");function $b(e,t,n=!0,i=!1){const o=St||lt;if(o){const a=o.type;{const u=vk(a,!1);if(u&&(u===t||u===yt(t)||u===co(yt(t))))return a}const c=Su(o[e]||a[e],t)||Su(o.appContext[e],t);return!c&&i?a:c}}function Su(e,t){return e&&(e[t]||e[yt(t)]||e[co(yt(t))])}function Te(e,t,n,i){let o;const a=n,c=me(e);if(c||Ve(e)){const u=c&&Jn(e);let f=!1,m=!1;u&&(f=!Rt(e),m=bn(e),e=go(e)),o=new Array(e.length);for(let h=0,_=e.length;h<_;h++)o[h]=t(f?m?Ts(zt(e[h])):zt(e[h]):e[h],h,void 0,a)}else if(typeof e=="number"){o=new Array(e);for(let u=0;u<e;u++)o[u]=t(u+1,u,void 0,a)}else if(Pe(e))if(e[Symbol.iterator])o=Array.from(e,(u,f)=>t(u,f,void 0,a));else{const u=Object.keys(e);o=new Array(u.length);for(let f=0,m=u.length;f<m;f++){const h=u[f];o[f]=t(e[h],h,f,a)}}else o=[];return o}const Ka=e=>e?Hf(e)?ko(e):Ka(e.parent):null,Er=Xe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ka(e.parent),$root:e=>Ka(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>xf(e),$forceUpdate:e=>e.f||(e.f=()=>{kl(e.update)}),$nextTick:e=>e.n||(e.n=$t.bind(e.proxy)),$watch:e=>bb.bind(e)}),ya=(e,t)=>e!==Ue&&!e.__isScriptSetup&&Oe(e,t),Bb={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:i,data:o,props:a,accessCache:c,type:u,appContext:f}=e;if(t[0]!=="$"){const w=c[t];if(w!==void 0)switch(w){case 1:return i[t];case 2:return o[t];case 4:return n[t];case 3:return a[t]}else{if(ya(i,t))return c[t]=1,i[t];if(o!==Ue&&Oe(o,t))return c[t]=2,o[t];if(Oe(a,t))return c[t]=3,a[t];if(n!==Ue&&Oe(n,t))return c[t]=4,n[t];Va&&(c[t]=0)}}const m=Er[t];let h,_;if(m)return t==="$attrs"&&at(e.attrs,"get",""),m(e);if((h=u.__cssModules)&&(h=h[t]))return h;if(n!==Ue&&Oe(n,t))return c[t]=4,n[t];if(_=f.config.globalProperties,Oe(_,t))return _[t]},set({_:e},t,n){const{data:i,setupState:o,ctx:a}=e;return ya(o,t)?(o[t]=n,!0):i!==Ue&&Oe(i,t)?(i[t]=n,!0):Oe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(a[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:i,appContext:o,props:a,type:c}},u){let f;return!!(n[u]||e!==Ue&&u[0]!=="$"&&Oe(e,u)||ya(t,u)||Oe(a,u)||Oe(i,u)||Oe(Er,u)||Oe(o.config.globalProperties,u)||(f=c.__cssModules)&&f[u])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Oe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Eu(e){return me(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let Va=!0;function Ub(e){const t=xf(e),n=e.proxy,i=e.ctx;Va=!1,t.beforeCreate&&Tu(t.beforeCreate,e,"bc");const{data:o,computed:a,methods:c,watch:u,provide:f,inject:m,created:h,beforeMount:_,mounted:w,beforeUpdate:I,updated:A,activated:P,deactivated:U,beforeDestroy:N,beforeUnmount:B,destroyed:l,unmounted:R,render:G,renderTracked:ee,renderTriggered:re,errorCaptured:oe,serverPrefetch:ne,expose:he,inheritAttrs:ke,components:te,directives:we,filters:Ae}=t;if(m&&Fb(m,i,null),c)for(const Q in c){const q=c[Q];Se(q)&&(i[Q]=q.bind(n))}if(o){const Q=o.call(n,n);Pe(Q)&&(e.data=ws(Q))}if(Va=!0,a)for(const Q in a){const q=a[Q],ge=Se(q)?q.bind(n,n):Se(q.get)?q.get.bind(n,n):en,xe=!Se(q)&&Se(q.set)?q.set.bind(n):en,Ie=be({get:ge,set:xe});Object.defineProperty(i,Q,{enumerable:!0,configurable:!0,get:()=>Ie.value,set:ve=>Ie.value=ve})}if(u)for(const Q in u)wf(u[Q],i,n,Q);if(f){const Q=Se(f)?f.call(n):f;Reflect.ownKeys(Q).forEach(q=>{pb(q,Q[q])})}h&&Tu(h,e,"c");function O(Q,q){me(q)?q.forEach(ge=>Q(ge.bind(n))):q&&Q(q.bind(n))}if(O(Cb,_),O(Ur,w),O(Ib,I),O(_f,A),O(Eb,P),O(Tb,U),O(Lb,oe),O(Nb,ee),O(Rb,re),O(Fr,B),O(vf,R),O(Mb,ne),me(he))if(he.length){const Q=e.exposed||(e.exposed={});he.forEach(q=>{Object.defineProperty(Q,q,{get:()=>n[q],set:ge=>n[q]=ge,enumerable:!0})})}else e.exposed||(e.exposed={});G&&e.render===en&&(e.render=G),ke!=null&&(e.inheritAttrs=ke),te&&(e.components=te),we&&(e.directives=we),ne&&bf(e)}function Fb(e,t,n=en){me(e)&&(e=Ga(e));for(const i in e){const o=e[i];let a;Pe(o)?"default"in o?a=$i(o.from||i,o.default,!0):a=$i(o.from||i):a=$i(o),ut(a)?Object.defineProperty(t,i,{enumerable:!0,configurable:!0,get:()=>a.value,set:c=>a.value=c}):t[i]=a}}function Tu(e,t,n){Ht(me(e)?e.map(i=>i.bind(t.proxy)):e.bind(t.proxy),t,n)}function wf(e,t,n,i){let o=i.includes(".")?pf(n,i):()=>n[i];if(Ve(e)){const a=t[e];Se(a)&&ot(o,a)}else if(Se(e))ot(o,e.bind(n));else if(Pe(e))if(me(e))e.forEach(a=>wf(a,t,n,i));else{const a=Se(e.handler)?e.handler.bind(n):t[e.handler];Se(a)&&ot(o,a,e)}}function xf(e){const t=e.type,{mixins:n,extends:i}=t,{mixins:o,optionsCache:a,config:{optionMergeStrategies:c}}=e.appContext,u=a.get(t);let f;return u?f=u:!o.length&&!n&&!i?f=t:(f={},o.length&&o.forEach(m=>Gi(f,m,c,!0)),Gi(f,t,c)),Pe(t)&&a.set(t,f),f}function Gi(e,t,n,i=!1){const{mixins:o,extends:a}=t;a&&Gi(e,a,n,!0),o&&o.forEach(c=>Gi(e,c,n,!0));for(const c in t)if(!(i&&c==="expose")){const u=zb[c]||n&&n[c];e[c]=u?u(e[c],t[c]):t[c]}return e}const zb={data:Au,props:Cu,emits:Cu,methods:fr,computed:fr,beforeCreate:pt,created:pt,beforeMount:pt,mounted:pt,beforeUpdate:pt,updated:pt,beforeDestroy:pt,beforeUnmount:pt,destroyed:pt,unmounted:pt,activated:pt,deactivated:pt,errorCaptured:pt,serverPrefetch:pt,components:fr,directives:fr,watch:jb,provide:Au,inject:Hb};function Au(e,t){return t?e?function(){return Xe(Se(e)?e.call(this,this):e,Se(t)?t.call(this,this):t)}:t:e}function Hb(e,t){return fr(Ga(e),Ga(t))}function Ga(e){if(me(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function pt(e,t){return e?[...new Set([].concat(e,t))]:t}function fr(e,t){return e?Xe(Object.create(null),e,t):t}function Cu(e,t){return e?me(e)&&me(t)?[...new Set([...e,...t])]:Xe(Object.create(null),Eu(e),Eu(t??{})):t}function jb(e,t){if(!e)return t;if(!t)return e;const n=Xe(Object.create(null),e);for(const i in t)n[i]=pt(e[i],t[i]);return n}function Sf(){return{app:null,config:{isNativeTag:Pd,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Wb=0;function Kb(e,t){return function(i,o=null){Se(i)||(i=Xe({},i)),o!=null&&!Pe(o)&&(o=null);const a=Sf(),c=new WeakSet,u=[];let f=!1;const m=a.app={_uid:Wb++,_component:i,_props:o,_container:null,_context:a,_instance:null,version:xk,get config(){return a.config},set config(h){},use(h,..._){return c.has(h)||(h&&Se(h.install)?(c.add(h),h.install(m,..._)):Se(h)&&(c.add(h),h(m,..._))),m},mixin(h){return a.mixins.includes(h)||a.mixins.push(h),m},component(h,_){return _?(a.components[h]=_,m):a.components[h]},directive(h,_){return _?(a.directives[h]=_,m):a.directives[h]},mount(h,_,w){if(!f){const I=m._ceVNode||kt(i,o);return I.appContext=a,w===!0?w="svg":w===!1&&(w=void 0),e(I,h,w),f=!0,m._container=h,h.__vue_app__=m,ko(I.component)}},onUnmount(h){u.push(h)},unmount(){f&&(Ht(u,m._instance,16),e(null,m._container),delete m._container.__vue_app__)},provide(h,_){return a.provides[h]=_,m},runWithContext(h){const _=Ss;Ss=m;try{return h()}finally{Ss=_}}};return m}}let Ss=null;const Vb=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yt(t)}Modifiers`]||e[`${Pn(t)}Modifiers`];function Gb(e,t,...n){if(e.isUnmounted)return;const i=e.vnode.props||Ue;let o=n;const a=t.startsWith("update:"),c=a&&Vb(i,t.slice(7));c&&(c.trim&&(o=n.map(h=>Ve(h)?h.trim():h)),c.number&&(o=n.map(uo)));let u,f=i[u=pa(t)]||i[u=pa(yt(t))];!f&&a&&(f=i[u=pa(Pn(t))]),f&&Ht(f,e,6,o);const m=i[u+"Once"];if(m){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Ht(m,e,6,o)}}const qb=new WeakMap;function Ef(e,t,n=!1){const i=n?qb:t.emitsCache,o=i.get(e);if(o!==void 0)return o;const a=e.emits;let c={},u=!1;if(!Se(e)){const f=m=>{const h=Ef(m,t,!0);h&&(u=!0,Xe(c,h))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!a&&!u?(Pe(e)&&i.set(e,null),null):(me(a)?a.forEach(f=>c[f]=null):Xe(c,a),Pe(e)&&i.set(e,c),c)}function mo(e,t){return!e||!oo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Oe(e,t[0].toLowerCase()+t.slice(1))||Oe(e,Pn(t))||Oe(e,t))}function Iu(e){const{type:t,vnode:n,proxy:i,withProxy:o,propsOptions:[a],slots:c,attrs:u,emit:f,render:m,renderCache:h,props:_,data:w,setupState:I,ctx:A,inheritAttrs:P}=e,U=Ki(e);let N,B;try{if(n.shapeFlag&4){const R=o||i,G=R;N=Jt(m.call(G,R,h,_,I,w,A)),B=u}else{const R=t;N=Jt(R.length>1?R(_,{attrs:u,slots:c,emit:f}):R(_,null)),B=t.props?u:Zb(u)}}catch(R){Tr.length=0,po(R,e,1),N=kt(kn)}let l=N;if(B&&P!==!1){const R=Object.keys(B),{shapeFlag:G}=l;R.length&&G&7&&(a&&R.some(ao)&&(B=Qb(B,a)),l=es(l,B,!1,!0))}return n.dirs&&(l=es(l,null,!1,!0),l.dirs=l.dirs?l.dirs.concat(n.dirs):n.dirs),n.transition&&Nr(l,n.transition),N=l,Ki(U),N}const Zb=e=>{let t;for(const n in e)(n==="class"||n==="style"||oo(n))&&((t||(t={}))[n]=e[n]);return t},Qb=(e,t)=>{const n={};for(const i in e)(!ao(i)||!(i.slice(9)in t))&&(n[i]=e[i]);return n};function Yb(e,t,n){const{props:i,children:o,component:a}=e,{props:c,children:u,patchFlag:f}=t,m=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return i?Mu(i,c,m):!!c;if(f&8){const h=t.dynamicProps;for(let _=0;_<h.length;_++){const w=h[_];if(Tf(c,i,w)&&!mo(m,w))return!0}}}else return(o||u)&&(!u||!u.$stable)?!0:i===c?!1:i?c?Mu(i,c,m):!0:!!c;return!1}function Mu(e,t,n){const i=Object.keys(t);if(i.length!==Object.keys(e).length)return!0;for(let o=0;o<i.length;o++){const a=i[o];if(Tf(t,e,a)&&!mo(n,a))return!0}return!1}function Tf(e,t,n){const i=e[n],o=t[n];return n==="style"&&Pe(i)&&Pe(o)?!On(i,o):i!==o}function Jb({vnode:e,parent:t,suspense:n},i){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.suspense.vnode.el=o.el=i,e=o),o===e)(e=t.vnode).el=i,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=i)}const Af={},Cf=()=>Object.create(Af),If=e=>Object.getPrototypeOf(e)===Af;function Xb(e,t,n,i=!1){const o={},a=Cf();e.propsDefaults=Object.create(null),Mf(e,t,o,a);for(const c in e.propsOptions[0])c in o||(o[c]=void 0);n?e.props=i?o:nb(o):e.type.props?e.props=o:e.props=a,e.attrs=a}function ek(e,t,n,i){const{props:o,attrs:a,vnode:{patchFlag:c}}=e,u=Ne(o),[f]=e.propsOptions;let m=!1;if((i||c>0)&&!(c&16)){if(c&8){const h=e.vnode.dynamicProps;for(let _=0;_<h.length;_++){let w=h[_];if(mo(e.emitsOptions,w))continue;const I=t[w];if(f)if(Oe(a,w))I!==a[w]&&(a[w]=I,m=!0);else{const A=yt(w);o[A]=qa(f,u,A,I,e,!1)}else I!==a[w]&&(a[w]=I,m=!0)}}}else{Mf(e,t,o,a)&&(m=!0);let h;for(const _ in u)(!t||!Oe(t,_)&&((h=Pn(_))===_||!Oe(t,h)))&&(f?n&&(n[_]!==void 0||n[h]!==void 0)&&(o[_]=qa(f,u,_,void 0,e,!0)):delete o[_]);if(a!==u)for(const _ in a)(!t||!Oe(t,_))&&(delete a[_],m=!0)}m&&fn(e.attrs,"set","")}function Mf(e,t,n,i){const[o,a]=e.propsOptions;let c=!1,u;if(t)for(let f in t){if(_r(f))continue;const m=t[f];let h;o&&Oe(o,h=yt(f))?!a||!a.includes(h)?n[h]=m:(u||(u={}))[h]=m:mo(e.emitsOptions,f)||(!(f in i)||m!==i[f])&&(i[f]=m,c=!0)}if(a){const f=Ne(n),m=u||Ue;for(let h=0;h<a.length;h++){const _=a[h];n[_]=qa(o,f,_,m[_],e,!Oe(m,_))}}return c}function qa(e,t,n,i,o,a){const c=e[n];if(c!=null){const u=Oe(c,"default");if(u&&i===void 0){const f=c.default;if(c.type!==Function&&!c.skipFactory&&Se(f)){const{propsDefaults:m}=o;if(n in m)i=m[n];else{const h=zr(o);i=m[n]=f.call(null,t),h()}}else i=f;o.ce&&o.ce._setProp(n,i)}c[0]&&(a&&!u?i=!1:c[1]&&(i===""||i===Pn(n))&&(i=!0))}return i}const tk=new WeakMap;function Rf(e,t,n=!1){const i=n?tk:t.propsCache,o=i.get(e);if(o)return o;const a=e.props,c={},u=[];let f=!1;if(!Se(e)){const h=_=>{f=!0;const[w,I]=Rf(_,t,!0);Xe(c,w),I&&u.push(...I)};!n&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!a&&!f)return Pe(e)&&i.set(e,_s),_s;if(me(a))for(let h=0;h<a.length;h++){const _=yt(a[h]);Ru(_)&&(c[_]=Ue)}else if(a)for(const h in a){const _=yt(h);if(Ru(_)){const w=a[h],I=c[_]=me(w)||Se(w)?{type:w}:Xe({},w),A=I.type;let P=!1,U=!0;if(me(A))for(let N=0;N<A.length;++N){const B=A[N],l=Se(B)&&B.name;if(l==="Boolean"){P=!0;break}else l==="String"&&(U=!1)}else P=Se(A)&&A.name==="Boolean";I[0]=P,I[1]=U,(P||Oe(I,"default"))&&u.push(_)}}const m=[c,u];return Pe(e)&&i.set(e,m),m}function Ru(e){return e[0]!=="$"&&!_r(e)}const yl=e=>e==="_"||e==="_ctx"||e==="$stable",_l=e=>me(e)?e.map(Jt):[Jt(e)],nk=(e,t,n)=>{if(t._n)return t;const i=ff((...o)=>_l(t(...o)),n);return i._c=!1,i},Nf=(e,t,n)=>{const i=e._ctx;for(const o in e){if(yl(o))continue;const a=e[o];if(Se(a))t[o]=nk(o,a,i);else if(a!=null){const c=_l(a);t[o]=()=>c}}},Lf=(e,t)=>{const n=_l(t);e.slots.default=()=>n},Of=(e,t,n)=>{for(const i in t)(n||!yl(i))&&(e[i]=t[i])},sk=(e,t,n)=>{const i=e.slots=Cf();if(e.vnode.shapeFlag&32){const o=t._;o?(Of(i,t,n),n&&Fd(i,"_",o,!0)):Nf(t,i)}else t&&Lf(e,t)},rk=(e,t,n)=>{const{vnode:i,slots:o}=e;let a=!0,c=Ue;if(i.shapeFlag&32){const u=t._;u?n&&u===1?a=!1:Of(o,t,n):(a=!t.$stable,Nf(t,o)),c=t}else t&&(Lf(e,t),c={default:1});if(a)for(const u in o)!yl(u)&&c[u]==null&&delete o[u]},mt=ck;function ik(e){return ok(e)}function ok(e,t){const n=fo();n.__VUE__=!0;const{insert:i,remove:o,patchProp:a,createElement:c,createText:u,createComment:f,setText:m,setElementText:h,parentNode:_,nextSibling:w,setScopeId:I=en,insertStaticContent:A}=e,P=(v,E,L,F=null,W=null,z=null,$=void 0,Y=null,H=!!E.dynamicChildren)=>{if(v===E)return;v&&!ks(v,E)&&(F=_t(v),ve(v,W,z,!0),v=null),E.patchFlag===-2&&(H=!1,E.dynamicChildren=null);const{type:D,ref:ae,shapeFlag:X}=E;switch(D){case bo:U(v,E,L,F);break;case kn:N(v,E,L,F);break;case Bi:v==null&&B(E,L,F,$);break;case ce:te(v,E,L,F,W,z,$,Y,H);break;default:X&1?G(v,E,L,F,W,z,$,Y,H):X&6?we(v,E,L,F,W,z,$,Y,H):(X&64||X&128)&&D.process(v,E,L,F,W,z,$,Y,H,Lt)}ae!=null&&W?xr(ae,v&&v.ref,z,E||v,!E):ae==null&&v&&v.ref!=null&&xr(v.ref,null,z,v,!0)},U=(v,E,L,F)=>{if(v==null)i(E.el=u(E.children),L,F);else{const W=E.el=v.el;E.children!==v.children&&m(W,E.children)}},N=(v,E,L,F)=>{v==null?i(E.el=f(E.children||""),L,F):E.el=v.el},B=(v,E,L,F)=>{[v.el,v.anchor]=A(v.children,E,L,F,v.el,v.anchor)},l=({el:v,anchor:E},L,F)=>{let W;for(;v&&v!==E;)W=w(v),i(v,L,F),v=W;i(E,L,F)},R=({el:v,anchor:E})=>{let L;for(;v&&v!==E;)L=w(v),o(v),v=L;o(E)},G=(v,E,L,F,W,z,$,Y,H)=>{if(E.type==="svg"?$="svg":E.type==="math"&&($="mathml"),v==null)ee(E,L,F,W,z,$,Y,H);else{const D=v.el&&v.el._isVueCE?v.el:null;try{D&&D._beginPatch(),ne(v,E,W,z,$,Y,H)}finally{D&&D._endPatch()}}},ee=(v,E,L,F,W,z,$,Y)=>{let H,D;const{props:ae,shapeFlag:X,transition:ue,dirs:fe}=v;if(H=v.el=c(v.type,z,ae&&ae.is,ae),X&8?h(H,v.children):X&16&&oe(v.children,H,null,F,W,_a(v,z),$,Y),fe&&Wn(v,null,F,"created"),re(H,v,v.scopeId,$,F),ae){for(const J in ae)J!=="value"&&!_r(J)&&a(H,J,null,ae[J],z,F);"value"in ae&&a(H,"value",null,ae.value,z),(D=ae.onVnodeBeforeMount)&&Vt(D,F,v)}fe&&Wn(v,null,F,"beforeMount");const j=ak(W,ue);j&&ue.beforeEnter(H),i(H,E,L),((D=ae&&ae.onVnodeMounted)||j||fe)&&mt(()=>{try{D&&Vt(D,F,v),j&&ue.enter(H),fe&&Wn(v,null,F,"mounted")}finally{}},W)},re=(v,E,L,F,W)=>{if(L&&I(v,L),F)for(let z=0;z<F.length;z++)I(v,F[z]);if(W){let z=W.subTree;if(E===z||$f(z.type)&&(z.ssContent===E||z.ssFallback===E)){const $=W.vnode;re(v,$,$.scopeId,$.slotScopeIds,W.parent)}}},oe=(v,E,L,F,W,z,$,Y,H=0)=>{for(let D=H;D<v.length;D++){const ae=v[D]=Y?dn(v[D]):Jt(v[D]);P(null,ae,E,L,F,W,z,$,Y)}},ne=(v,E,L,F,W,z,$)=>{const Y=E.el=v.el;let{patchFlag:H,dynamicChildren:D,dirs:ae}=E;H|=v.patchFlag&16;const X=v.props||Ue,ue=E.props||Ue;let fe;if(L&&Kn(L,!1),(fe=ue.onVnodeBeforeUpdate)&&Vt(fe,L,E,v),ae&&Wn(E,v,L,"beforeUpdate"),L&&Kn(L,!0),(X.innerHTML&&ue.innerHTML==null||X.textContent&&ue.textContent==null)&&h(Y,""),D?he(v.dynamicChildren,D,Y,L,F,_a(E,W),z):$||q(v,E,Y,null,L,F,_a(E,W),z,!1),H>0){if(H&16)ke(Y,X,ue,L,W);else if(H&2&&X.class!==ue.class&&a(Y,"class",null,ue.class,W),H&4&&a(Y,"style",X.style,ue.style,W),H&8){const j=E.dynamicProps;for(let J=0;J<j.length;J++){const se=j[J],pe=X[se],Ce=ue[se];(Ce!==pe||se==="value")&&a(Y,se,pe,Ce,W,L)}}H&1&&v.children!==E.children&&h(Y,E.children)}else!$&&D==null&&ke(Y,X,ue,L,W);((fe=ue.onVnodeUpdated)||ae)&&mt(()=>{fe&&Vt(fe,L,E,v),ae&&Wn(E,v,L,"updated")},F)},he=(v,E,L,F,W,z,$)=>{for(let Y=0;Y<E.length;Y++){const H=v[Y],D=E[Y],ae=H.el&&(H.type===ce||!ks(H,D)||H.shapeFlag&198)?_(H.el):L;P(H,D,ae,null,F,W,z,$,!0)}},ke=(v,E,L,F,W)=>{if(E!==L){if(E!==Ue)for(const z in E)!_r(z)&&!(z in L)&&a(v,z,E[z],null,W,F);for(const z in L){if(_r(z))continue;const $=L[z],Y=E[z];$!==Y&&z!=="value"&&a(v,z,Y,$,W,F)}"value"in L&&a(v,"value",E.value,L.value,W)}},te=(v,E,L,F,W,z,$,Y,H)=>{const D=E.el=v?v.el:u(""),ae=E.anchor=v?v.anchor:u("");let{patchFlag:X,dynamicChildren:ue,slotScopeIds:fe}=E;fe&&(Y=Y?Y.concat(fe):fe),v==null?(i(D,L,F),i(ae,L,F),oe(E.children||[],L,ae,W,z,$,Y,H)):X>0&&X&64&&ue&&v.dynamicChildren&&v.dynamicChildren.length===ue.length?(he(v.dynamicChildren,ue,L,W,z,$,Y),(E.key!=null||W&&E===W.subTree)&&vl(v,E,!0)):q(v,E,L,ae,W,z,$,Y,H)},we=(v,E,L,F,W,z,$,Y,H)=>{E.slotScopeIds=Y,v==null?E.shapeFlag&512?W.ctx.activate(E,L,F,$,H):Ae(E,L,F,W,z,$,H):He(v,E,H)},Ae=(v,E,L,F,W,z,$)=>{const Y=v.component=mk(v,F,W);if(kf(v)&&(Y.ctx.renderer=Lt),bk(Y,!1,$),Y.asyncDep){if(W&&W.registerDep(Y,O,$),!v.el){const H=Y.subTree=kt(kn);N(null,H,E,L),v.placeholder=H.el}}else O(Y,v,E,L,W,z,$)},He=(v,E,L)=>{const F=E.component=v.component;if(Yb(v,E,L))if(F.asyncDep&&!F.asyncResolved){Q(F,E,L);return}else F.next=E,F.update();else E.el=v.el,F.vnode=E},O=(v,E,L,F,W,z,$)=>{const Y=()=>{if(v.isMounted){let{next:X,bu:ue,u:fe,parent:j,vnode:J}=v;{const st=Df(v);if(st){X&&(X.el=J.el,Q(v,X,$)),st.asyncDep.then(()=>{mt(()=>{v.isUnmounted||D()},W)});return}}let se=X,pe;Kn(v,!1),X?(X.el=J.el,Q(v,X,$)):X=J,ue&&Pi(ue),(pe=X.props&&X.props.onVnodeBeforeUpdate)&&Vt(pe,j,X,J),Kn(v,!0);const Ce=Iu(v),ze=v.subTree;v.subTree=Ce,P(ze,Ce,_(ze.el),_t(ze),v,W,z),X.el=Ce.el,se===null&&Jb(v,Ce.el),fe&&mt(fe,W),(pe=X.props&&X.props.onVnodeUpdated)&&mt(()=>Vt(pe,j,X,J),W)}else{let X;const{el:ue,props:fe}=E,{bm:j,m:J,parent:se,root:pe,type:Ce}=v,ze=Sr(E);Kn(v,!1),j&&Pi(j),!ze&&(X=fe&&fe.onVnodeBeforeMount)&&Vt(X,se,E),Kn(v,!0);{pe.ce&&pe.ce._hasShadowRoot()&&pe.ce._injectChildStyle(Ce,v.parent?v.parent.type:void 0);const st=v.subTree=Iu(v);P(null,st,L,F,v,W,z),E.el=st.el}if(J&&mt(J,W),!ze&&(X=fe&&fe.onVnodeMounted)){const st=E;mt(()=>Vt(X,se,st),W)}(E.shapeFlag&256||se&&Sr(se.vnode)&&se.vnode.shapeFlag&256)&&v.a&&mt(v.a,W),v.isMounted=!0,E=L=F=null}};v.scope.on();const H=v.effect=new Wd(Y);v.scope.off();const D=v.update=H.run.bind(H),ae=v.job=H.runIfDirty.bind(H);ae.i=v,ae.id=v.uid,H.scheduler=()=>kl(ae),Kn(v,!0),D()},Q=(v,E,L)=>{E.component=v;const F=v.vnode.props;v.vnode=E,v.next=null,ek(v,E.props,F,L),rk(v,E.children,L),hn(),yu(v),mn()},q=(v,E,L,F,W,z,$,Y,H=!1)=>{const D=v&&v.children,ae=v?v.shapeFlag:0,X=E.children,{patchFlag:ue,shapeFlag:fe}=E;if(ue>0){if(ue&128){xe(D,X,L,F,W,z,$,Y,H);return}else if(ue&256){ge(D,X,L,F,W,z,$,Y,H);return}}fe&8?(ae&16&&dt(D,W,z),X!==D&&h(L,X)):ae&16?fe&16?xe(D,X,L,F,W,z,$,Y,H):dt(D,W,z,!0):(ae&8&&h(L,""),fe&16&&oe(X,L,F,W,z,$,Y,H))},ge=(v,E,L,F,W,z,$,Y,H)=>{v=v||_s,E=E||_s;const D=v.length,ae=E.length,X=Math.min(D,ae);let ue;for(ue=0;ue<X;ue++){const fe=E[ue]=H?dn(E[ue]):Jt(E[ue]);P(v[ue],fe,L,null,W,z,$,Y,H)}D>ae?dt(v,W,z,!0,!1,X):oe(E,L,F,W,z,$,Y,H,X)},xe=(v,E,L,F,W,z,$,Y,H)=>{let D=0;const ae=E.length;let X=v.length-1,ue=ae-1;for(;D<=X&&D<=ue;){const fe=v[D],j=E[D]=H?dn(E[D]):Jt(E[D]);if(ks(fe,j))P(fe,j,L,null,W,z,$,Y,H);else break;D++}for(;D<=X&&D<=ue;){const fe=v[X],j=E[ue]=H?dn(E[ue]):Jt(E[ue]);if(ks(fe,j))P(fe,j,L,null,W,z,$,Y,H);else break;X--,ue--}if(D>X){if(D<=ue){const fe=ue+1,j=fe<ae?E[fe].el:F;for(;D<=ue;)P(null,E[D]=H?dn(E[D]):Jt(E[D]),L,j,W,z,$,Y,H),D++}}else if(D>ue)for(;D<=X;)ve(v[D],W,z,!0),D++;else{const fe=D,j=D,J=new Map;for(D=j;D<=ue;D++){const et=E[D]=H?dn(E[D]):Jt(E[D]);et.key!=null&&J.set(et.key,D)}let se,pe=0;const Ce=ue-j+1;let ze=!1,st=0;const jt=new Array(Ce);for(D=0;D<Ce;D++)jt[D]=0;for(D=fe;D<=X;D++){const et=v[D];if(pe>=Ce){ve(et,W,z,!0);continue}let vt;if(et.key!=null)vt=J.get(et.key);else for(se=j;se<=ue;se++)if(jt[se-j]===0&&ks(et,E[se])){vt=se;break}vt===void 0?ve(et,W,z,!0):(jt[vt-j]=D+1,vt>=st?st=vt:ze=!0,P(et,E[vt],L,null,W,z,$,Y,H),pe++)}const is=ze?lk(jt):_s;for(se=is.length-1,D=Ce-1;D>=0;D--){const et=j+D,vt=E[et],Ls=E[et+1],Os=et+1<ae?Ls.el||Pf(Ls):F;jt[D]===0?P(null,vt,L,Os,W,z,$,Y,H):ze&&(se<0||D!==is[se]?Ie(vt,L,Os,2):se--)}}},Ie=(v,E,L,F,W=null)=>{const{el:z,type:$,transition:Y,children:H,shapeFlag:D}=v;if(D&6){Ie(v.component.subTree,E,L,F);return}if(D&128){v.suspense.move(E,L,F);return}if(D&64){$.move(v,E,L,Lt);return}if($===ce){i(z,E,L);for(let X=0;X<H.length;X++)Ie(H[X],E,L,F);i(v.anchor,E,L);return}if($===Bi){l(v,E,L);return}if(F!==2&&D&1&&Y)if(F===0)Y.beforeEnter(z),i(z,E,L),mt(()=>Y.enter(z),W);else{const{leave:X,delayLeave:ue,afterLeave:fe}=Y,j=()=>{v.ctx.isUnmounted?o(z):i(z,E,L)},J=()=>{z._isLeaving&&z[In](!0),X(z,()=>{j(),fe&&fe()})};ue?ue(z,j,J):J()}else i(z,E,L)},ve=(v,E,L,F=!1,W=!1)=>{const{type:z,props:$,ref:Y,children:H,dynamicChildren:D,shapeFlag:ae,patchFlag:X,dirs:ue,cacheIndex:fe,memo:j}=v;if(X===-2&&(W=!1),Y!=null&&(hn(),xr(Y,null,L,v,!0),mn()),fe!=null&&(E.renderCache[fe]=void 0),ae&256){E.ctx.deactivate(v);return}const J=ae&1&&ue,se=!Sr(v);let pe;if(se&&(pe=$&&$.onVnodeBeforeUnmount)&&Vt(pe,E,v),ae&6)Be(v.component,L,F);else{if(ae&128){v.suspense.unmount(L,F);return}J&&Wn(v,null,E,"beforeUnmount"),ae&64?v.type.remove(v,E,L,Lt,F):D&&!D.hasOnce&&(z!==ce||X>0&&X&64)?dt(D,E,L,!1,!0):(z===ce&&X&384||!W&&ae&16)&&dt(H,E,L),F&&rt(v)}const Ce=j!=null&&fe==null;(se&&(pe=$&&$.onVnodeUnmounted)||J||Ce)&&mt(()=>{pe&&Vt(pe,E,v),J&&Wn(v,null,E,"unmounted"),Ce&&(v.el=null)},L)},rt=v=>{const{type:E,el:L,anchor:F,transition:W}=v;if(E===ce){Ye(L,F);return}if(E===Bi){R(v);return}const z=()=>{o(L),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(v.shapeFlag&1&&W&&!W.persisted){const{leave:$,delayLeave:Y}=W,H=()=>$(L,z);Y?Y(v.el,z,H):H()}else z()},Ye=(v,E)=>{let L;for(;v!==E;)L=w(v),o(v),v=L;o(E)},Be=(v,E,L)=>{const{bum:F,scope:W,job:z,subTree:$,um:Y,m:H,a:D}=v;Nu(H),Nu(D),F&&Pi(F),W.stop(),z&&(z.flags|=8,ve($,v,E,L)),Y&&mt(Y,E),mt(()=>{v.isUnmounted=!0},E)},dt=(v,E,L,F=!1,W=!1,z=0)=>{for(let $=z;$<v.length;$++)ve(v[$],E,L,F,W)},_t=v=>{if(v.shapeFlag&6)return _t(v.component.subTree);if(v.shapeFlag&128)return v.suspense.next();const E=w(v.anchor||v.el),L=E&&E[hf];return L?w(L):E};let Tt=!1;const _n=(v,E,L)=>{let F;v==null?E._vnode&&(ve(E._vnode,null,null,!0),F=E._vnode.component):P(E._vnode||null,v,E,null,null,null,L),E._vnode=v,Tt||(Tt=!0,yu(F),cf(),Tt=!1)},Lt={p:P,um:ve,m:Ie,r:rt,mt:Ae,mc:oe,pc:q,pbc:he,n:_t,o:e};return{render:_n,hydrate:void 0,createApp:Kb(_n)}}function _a({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Kn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ak(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function vl(e,t,n=!1){const i=e.children,o=t.children;if(me(i)&&me(o))for(let a=0;a<i.length;a++){const c=i[a];let u=o[a];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=o[a]=dn(o[a]),u.el=c.el),!n&&u.patchFlag!==-2&&vl(c,u)),u.type===bo&&(u.patchFlag===-1&&(u=o[a]=dn(u)),u.el=c.el),u.type===kn&&!u.el&&(u.el=c.el)}}function lk(e){const t=e.slice(),n=[0];let i,o,a,c,u;const f=e.length;for(i=0;i<f;i++){const m=e[i];if(m!==0){if(o=n[n.length-1],e[o]<m){t[i]=o,n.push(i);continue}for(a=0,c=n.length-1;a<c;)u=a+c>>1,e[n[u]]<m?a=u+1:c=u;m<e[n[a]]&&(a>0&&(t[i]=n[a-1]),n[a]=i)}}for(a=n.length,c=n[a-1];a-- >0;)n[a]=c,c=t[c];return n}function Df(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Df(t)}function Nu(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Pf(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Pf(t.subTree):null}const $f=e=>e.__isSuspense;function ck(e,t){t&&t.pendingBranch?me(e)?t.effects.push(...e):t.effects.push(e):gb(e)}const ce=Symbol.for("v-fgt"),bo=Symbol.for("v-txt"),kn=Symbol.for("v-cmt"),Bi=Symbol.for("v-stc"),Tr=[];let Et=null;function k(e=!1){Tr.push(Et=e?null:[])}function uk(){Tr.pop(),Et=Tr[Tr.length-1]||null}let Lr=1;function Lu(e,t=!1){Lr+=e,e<0&&Et&&t&&(Et.hasOnce=!0)}function Bf(e){return e.dynamicChildren=Lr>0?Et||_s:null,uk(),Lr>0&&Et&&Et.push(e),e}function y(e,t,n,i,o,a){return Bf(d(e,t,n,i,o,a,!0))}function ht(e,t,n,i,o){return Bf(kt(e,t,n,i,o,!0))}function Uf(e){return e?e.__v_isVNode===!0:!1}function ks(e,t){return e.type===t.type&&e.key===t.key}const Ff=({key:e})=>e??null,Ui=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ve(e)||ut(e)||Se(e)?{i:St,r:e,k:t,f:!!n}:e:null);function d(e,t=null,n=null,i=0,o=null,a=e===ce?0:1,c=!1,u=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ff(t),ref:t&&Ui(t),scopeId:df,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:St};return u?(wl(f,n),a&128&&e.normalize(f)):n&&(f.shapeFlag|=Ve(n)?8:16),Lr>0&&!c&&Et&&(f.patchFlag>0||a&6)&&f.patchFlag!==32&&Et.push(f),f}const kt=dk;function dk(e,t=null,n=null,i=0,o=null,a=!1){if((!e||e===Pb)&&(e=kn),Uf(e)){const u=es(e,t,!0);return n&&wl(u,n),Lr>0&&!a&&Et&&(u.shapeFlag&6?Et[Et.indexOf(e)]=u:Et.push(u)),u.patchFlag=-2,u}if(wk(e)&&(e=e.__vccOpts),t){t=fk(t);let{class:u,style:f}=t;u&&!Ve(u)&&(t.class=de(u)),Pe(f)&&(bl(f)&&!me(f)&&(f=Xe({},f)),t.style=It(f))}const c=Ve(e)?1:$f(e)?128:kb(e)?64:Pe(e)?4:Se(e)?2:0;return d(e,t,n,i,o,c,a,!0)}function fk(e){return e?bl(e)||If(e)?Xe({},e):e:null}function es(e,t,n=!1,i=!1){const{props:o,ref:a,patchFlag:c,children:u,transition:f}=e,m=t?gk(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:m,key:m&&Ff(m),ref:t&&t.ref?n&&a?me(a)?a.concat(Ui(t)):[a,Ui(t)]:Ui(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ce?c===-1?16:c|16:c,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&es(e.ssContent),ssFallback:e.ssFallback&&es(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return f&&i&&Nr(h,f.clone(h)),h}function gr(e=" ",t=0){return kt(bo,null,e,t)}function Ou(e,t){const n=kt(Bi,null,e);return n.staticCount=t,n}function V(e="",t=!1){return t?(k(),ht(kn,null,e)):kt(kn,null,e)}function Jt(e){return e==null||typeof e=="boolean"?kt(kn):me(e)?kt(ce,null,e.slice()):Uf(e)?dn(e):kt(bo,null,String(e))}function dn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:es(e)}function wl(e,t){let n=0;const{shapeFlag:i}=e;if(t==null)t=null;else if(me(t))n=16;else if(typeof t=="object")if(i&65){const o=t.default;o&&(o._c&&(o._d=!1),wl(e,o()),o._c&&(o._d=!0));return}else{n=32;const o=t._;!o&&!If(t)?t._ctx=St:o===3&&St&&(St.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else Se(t)?(t={default:t,_ctx:St},n=32):(t=String(t),i&64?(n=16,t=[gr(t)]):n=8);e.children=t,e.shapeFlag|=n}function gk(...e){const t={};for(let n=0;n<e.length;n++){const i=e[n];for(const o in i)if(o==="class")t.class!==i.class&&(t.class=de([t.class,i.class]));else if(o==="style")t.style=It([t.style,i.style]);else if(oo(o)){const a=t[o],c=i[o];c&&a!==c&&!(me(a)&&a.includes(c))?t[o]=a?[].concat(a,c):c:c==null&&a==null&&!ao(o)&&(t[o]=c)}else o!==""&&(t[o]=i[o])}return t}function Vt(e,t,n,i=null){Ht(e,t,7,[n,i])}const pk=Sf();let hk=0;function mk(e,t,n){const i=e.type,o=(t?t.appContext:e.appContext)||pk,a={uid:hk++,vnode:e,type:i,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Dm(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Rf(i,o),emitsOptions:Ef(i,o),emit:null,emitted:null,propsDefaults:Ue,inheritAttrs:i.inheritAttrs,ctx:Ue,data:Ue,props:Ue,attrs:Ue,slots:Ue,refs:Ue,setupState:Ue,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=t?t.root:a,a.emit=Gb.bind(null,a),e.ce&&e.ce(a),a}let lt=null;const zf=()=>lt||St;let qi,Za;{const e=fo(),t=(n,i)=>{let o;return(o=e[n])||(o=e[n]=[]),o.push(i),a=>{o.length>1?o.forEach(c=>c(a)):o[0](a)}};qi=t("__VUE_INSTANCE_SETTERS__",n=>lt=n),Za=t("__VUE_SSR_SETTERS__",n=>Or=n)}const zr=e=>{const t=lt;return qi(e),e.scope.on(),()=>{e.scope.off(),qi(t)}},Du=()=>{lt&<.scope.off(),qi(null)};function Hf(e){return e.vnode.shapeFlag&4}let Or=!1;function bk(e,t=!1,n=!1){t&&Za(t);const{props:i,children:o}=e.vnode,a=Hf(e);Xb(e,i,a,t),sk(e,o,n||t);const c=a?kk(e,t):void 0;return t&&Za(!1),c}function kk(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Bb);const{setup:i}=n;if(i){hn();const o=e.setupContext=i.length>1?_k(e):null,a=zr(e),c=Br(i,e,0,[e.props,o]),u=$d(c);if(mn(),a(),(u||e.sp)&&!Sr(e)&&bf(e),u){if(c.then(Du,Du),t)return c.then(f=>{Pu(e,f)}).catch(f=>{po(f,e,0)});e.asyncDep=c}else Pu(e,c)}else jf(e)}function Pu(e,t,n){Se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=of(t)),jf(e)}function jf(e,t,n){const i=e.type;e.render||(e.render=i.render||en);{const o=zr(e);hn();try{Ub(e)}finally{mn(),o()}}}const yk={get(e,t){return at(e,"get",""),e[t]}};function _k(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,yk),slots:e.slots,emit:e.emit,expose:t}}function ko(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(of(sb(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Er)return Er[n](e)},has(t,n){return n in t||n in Er}})):e.proxy}function vk(e,t=!0){return Se(e)?e.displayName||e.name:e.name||t&&e.__name}function wk(e){return Se(e)&&"__vccOpts"in e}const be=(e,t)=>lb(e,t,Or),xk="3.5.34";/**
|
|
14
|
+
* @vue/runtime-dom v3.5.34
|
|
15
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
16
|
+
* @license MIT
|
|
17
|
+
**/let Qa;const $u=typeof window<"u"&&window.trustedTypes;if($u)try{Qa=$u.createPolicy("vue",{createHTML:e=>e})}catch{}const Wf=Qa?e=>Qa.createHTML(e):e=>e,Sk="http://www.w3.org/2000/svg",Ek="http://www.w3.org/1998/Math/MathML",un=typeof document<"u"?document:null,Bu=un&&un.createElement("template"),Tk={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,i)=>{const o=t==="svg"?un.createElementNS(Sk,e):t==="mathml"?un.createElementNS(Ek,e):n?un.createElement(e,{is:n}):un.createElement(e);return e==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:e=>un.createTextNode(e),createComment:e=>un.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>un.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,i,o,a){const c=n?n.previousSibling:t.lastChild;if(o&&(o===a||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),n),!(o===a||!(o=o.nextSibling)););else{Bu.innerHTML=Wf(i==="svg"?`<svg>${e}</svg>`:i==="mathml"?`<math>${e}</math>`:e);const u=Bu.content;if(i==="svg"||i==="mathml"){const f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,n)}return[c?c.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Tn="transition",lr="animation",As=Symbol("_vtc"),Kf={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ak=Xe({},xb,Kf),Vn=(e,t=[])=>{me(e)?e.forEach(n=>n(...t)):e&&e(...t)},Uu=e=>e?me(e)?e.some(t=>t.length>1):e.length>1:!1;function Ck(e){const t={};for(const te in e)te in Kf||(t[te]=e[te]);if(e.css===!1)return t;const{name:n="v",type:i,duration:o,enterFromClass:a=`${n}-enter-from`,enterActiveClass:c=`${n}-enter-active`,enterToClass:u=`${n}-enter-to`,appearFromClass:f=a,appearActiveClass:m=c,appearToClass:h=u,leaveFromClass:_=`${n}-leave-from`,leaveActiveClass:w=`${n}-leave-active`,leaveToClass:I=`${n}-leave-to`}=e,A=Ik(o),P=A&&A[0],U=A&&A[1],{onBeforeEnter:N,onEnter:B,onEnterCancelled:l,onLeave:R,onLeaveCancelled:G,onBeforeAppear:ee=N,onAppear:re=B,onAppearCancelled:oe=l}=t,ne=(te,we,Ae,He)=>{te._enterCancelled=He,Mn(te,we?h:u),Mn(te,we?m:c),Ae&&Ae()},he=(te,we)=>{te._isLeaving=!1,Mn(te,_),Mn(te,I),Mn(te,w),we&&we()},ke=te=>(we,Ae)=>{const He=te?re:B,O=()=>ne(we,te,Ae);Vn(He,[we,O]),Fu(()=>{Mn(we,te?f:a),Gt(we,te?h:u),Uu(He)||zu(we,i,P,O)})};return Xe(t,{onBeforeEnter(te){Vn(N,[te]),Gt(te,a),Gt(te,c)},onBeforeAppear(te){Vn(ee,[te]),Gt(te,f),Gt(te,m)},onEnter:ke(!1),onAppear:ke(!0),onLeave(te,we){te._isLeaving=!0;const Ae=()=>he(te,we);Gt(te,_),te._enterCancelled?(Gt(te,w),Ya(te)):(Ya(te),Gt(te,w)),Fu(()=>{te._isLeaving&&(Mn(te,_),Gt(te,I),Uu(R)||zu(te,i,U,Ae))}),Vn(R,[te,Ae])},onEnterCancelled(te){ne(te,!1,void 0,!0),Vn(l,[te])},onAppearCancelled(te){ne(te,!0,void 0,!0),Vn(oe,[te])},onLeaveCancelled(te){he(te),Vn(G,[te])}})}function Ik(e){if(e==null)return null;if(Pe(e))return[va(e.enter),va(e.leave)];{const t=va(e);return[t,t]}}function va(e){return Am(e)}function Gt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[As]||(e[As]=new Set)).add(t)}function Mn(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.remove(i));const n=e[As];n&&(n.delete(t),n.size||(e[As]=void 0))}function Fu(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Mk=0;function zu(e,t,n,i){const o=e._endId=++Mk,a=()=>{o===e._endId&&i()};if(n!=null)return setTimeout(a,n);const{type:c,timeout:u,propCount:f}=Vf(e,t);if(!c)return i();const m=c+"end";let h=0;const _=()=>{e.removeEventListener(m,w),a()},w=I=>{I.target===e&&++h>=f&&_()};setTimeout(()=>{h<f&&_()},u+1),e.addEventListener(m,w)}function Vf(e,t){const n=window.getComputedStyle(e),i=A=>(n[A]||"").split(", "),o=i(`${Tn}Delay`),a=i(`${Tn}Duration`),c=Hu(o,a),u=i(`${lr}Delay`),f=i(`${lr}Duration`),m=Hu(u,f);let h=null,_=0,w=0;t===Tn?c>0&&(h=Tn,_=c,w=a.length):t===lr?m>0&&(h=lr,_=m,w=f.length):(_=Math.max(c,m),h=_>0?c>m?Tn:lr:null,w=h?h===Tn?a.length:f.length:0);const I=h===Tn&&/\b(?:transform|all)(?:,|$)/.test(i(`${Tn}Property`).toString());return{type:h,timeout:_,propCount:w,hasTransform:I}}function Hu(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,i)=>ju(n)+ju(e[i])))}function ju(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ya(e){return(e?e.ownerDocument:document).body.offsetHeight}function Rk(e,t,n){const i=e[As];i&&(t=(t?[t,...i]:[...i]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wu=Symbol("_vod"),Nk=Symbol("_vsh"),Lk=Symbol(""),Ok=/(?:^|;)\s*display\s*:/;function Dk(e,t,n){const i=e.style,o=Ve(n);let a=!1;if(n&&!o){if(t)if(Ve(t))for(const c of t.split(";")){const u=c.slice(0,c.indexOf(":")).trim();n[u]==null&&pr(i,u,"")}else for(const c in t)n[c]==null&&pr(i,c,"");for(const c in n){c==="display"&&(a=!0);const u=n[c];u!=null?$k(e,c,!Ve(t)&&t?t[c]:void 0,u)||pr(i,c,u):pr(i,c,"")}}else if(o){if(t!==n){const c=i[Lk];c&&(n+=";"+c),i.cssText=n,a=Ok.test(n)}}else t&&e.removeAttribute("style");Wu in e&&(e[Wu]=a?i.display:"",e[Nk]&&(i.display="none"))}const Ku=/\s*!important$/;function pr(e,t,n){if(me(n))n.forEach(i=>pr(e,t,i));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const i=Pk(e,t);Ku.test(n)?e.setProperty(Pn(i),n.replace(Ku,""),"important"):e[i]=n}}const Vu=["Webkit","Moz","ms"],wa={};function Pk(e,t){const n=wa[t];if(n)return n;let i=yt(t);if(i!=="filter"&&i in e)return wa[t]=i;i=co(i);for(let o=0;o<Vu.length;o++){const a=Vu[o]+i;if(a in e)return wa[t]=a}return t}function $k(e,t,n,i){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Ve(i)&&n===i}const Gu="http://www.w3.org/1999/xlink";function qu(e,t,n,i,o,a=Lm(t)){i&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Gu,t.slice(6,t.length)):e.setAttributeNS(Gu,t,n):n==null||a&&!zd(n)?e.removeAttribute(t):e.setAttribute(t,a?"":tn(n)?String(n):n)}function Zu(e,t,n,i,o){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Wf(n):n);return}const a=e.tagName;if(t==="value"&&a!=="PROGRESS"&&!a.includes("-")){const u=a==="OPTION"?e.getAttribute("value")||"":e.value,f=n==null?e.type==="checkbox"?"on":"":String(n);(u!==f||!("_value"in e))&&(e.value=f),n==null&&e.removeAttribute(t),e._value=n;return}let c=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=zd(n):n==null&&u==="string"?(n="",c=!0):u==="number"&&(n=0,c=!0)}try{e[t]=n}catch{}c&&e.removeAttribute(o||t)}function pn(e,t,n,i){e.addEventListener(t,n,i)}function Bk(e,t,n,i){e.removeEventListener(t,n,i)}const Qu=Symbol("_vei");function Uk(e,t,n,i,o=null){const a=e[Qu]||(e[Qu]={}),c=a[t];if(i&&c)c.value=i;else{const[u,f]=Fk(t);if(i){const m=a[t]=jk(i,o);pn(e,u,m,f)}else c&&(Bk(e,u,c,f),a[t]=void 0)}}const Yu=/(?:Once|Passive|Capture)$/;function Fk(e){let t;if(Yu.test(e)){t={};let i;for(;i=e.match(Yu);)e=e.slice(0,e.length-i[0].length),t[i[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Pn(e.slice(2)),t]}let xa=0;const zk=Promise.resolve(),Hk=()=>xa||(zk.then(()=>xa=0),xa=Date.now());function jk(e,t){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Ht(Wk(i,n.value),t,5,[i])};return n.value=e,n.attached=Hk(),n}function Wk(e,t){if(me(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(i=>o=>!o._stopped&&i&&i(o))}else return t}const Ju=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Kk=(e,t,n,i,o,a)=>{const c=o==="svg";t==="class"?Rk(e,i,c):t==="style"?Dk(e,n,i):oo(t)?ao(t)||Uk(e,t,n,i,a):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Vk(e,t,i,c))?(Zu(e,t,i),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&qu(e,t,i,c,a,t!=="value")):e._isVueCE&&(Gk(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Ve(i)))?Zu(e,yt(t),i,a,t):(t==="true-value"?e._trueValue=i:t==="false-value"&&(e._falseValue=i),qu(e,t,i,c))};function Vk(e,t,n,i){if(i)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ju(t)&&Se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Ju(t)&&Ve(n)?!1:t in e}function Gk(e,t){const n=e._def.props;if(!n)return!1;const i=yt(t);return Array.isArray(n)?n.some(o=>yt(o)===i):Object.keys(n).some(o=>yt(o)===i)}const Gf=new WeakMap,qf=new WeakMap,Zi=Symbol("_moveCb"),Xu=Symbol("_enterCb"),qk=e=>(delete e.props.mode,e),Zk=qk({name:"TransitionGroup",props:Xe({},Ak,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=zf(),i=wb();let o,a;return _f(()=>{if(!o.length)return;const c=e.moveClass||`${e.name||"v"}-move`;if(!ey(o[0].el,n.vnode.el,c)){o=[];return}o.forEach(Yk),o.forEach(Jk);const u=o.filter(Xk);Ya(n.vnode.el),u.forEach(f=>{const m=f.el,h=m.style;Gt(m,c),h.transform=h.webkitTransform=h.transitionDuration="";const _=m[Zi]=w=>{w&&w.target!==m||(!w||w.propertyName.endsWith("transform"))&&(m.removeEventListener("transitionend",_),m[Zi]=null,Mn(m,c))};m.addEventListener("transitionend",_)}),o=[]}),()=>{const c=Ne(e),u=Ck(c);let f=c.tag||ce;if(o=[],a)for(let m=0;m<a.length;m++){const h=a[m];h.el&&h.el instanceof Element&&(o.push(h),Nr(h,Wa(h,u,i,n)),Gf.set(h,Zf(h.el)))}a=t.default?mf(t.default()):[];for(let m=0;m<a.length;m++){const h=a[m];h.key!=null&&Nr(h,Wa(h,u,i,n))}return kt(f,null,a)}}}),Qk=Zk;function Yk(e){const t=e.el;t[Zi]&&t[Zi](),t[Xu]&&t[Xu]()}function Jk(e){qf.set(e,Zf(e.el))}function Xk(e){const t=Gf.get(e),n=qf.get(e),i=t.left-n.left,o=t.top-n.top;if(i||o){const a=e.el,c=a.style,u=a.getBoundingClientRect();let f=1,m=1;return a.offsetWidth&&(f=u.width/a.offsetWidth),a.offsetHeight&&(m=u.height/a.offsetHeight),(!Number.isFinite(f)||f===0)&&(f=1),(!Number.isFinite(m)||m===0)&&(m=1),Math.abs(f-1)<.01&&(f=1),Math.abs(m-1)<.01&&(m=1),c.transform=c.webkitTransform=`translate(${i/f}px,${o/m}px)`,c.transitionDuration="0s",e}}function Zf(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function ey(e,t,n){const i=e.cloneNode(),o=e[As];o&&o.forEach(u=>{u.split(/\s+/).forEach(f=>f&&i.classList.remove(f))}),n.split(/\s+/).forEach(u=>u&&i.classList.add(u)),i.style.display="none";const a=t.nodeType===1?t:t.parentNode;a.appendChild(i);const{hasTransform:c}=Vf(i);return a.removeChild(i),c}const Dn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return me(t)?n=>Pi(t,n):t};function ty(e){e.target.composing=!0}function ed(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Nt=Symbol("_assign");function td(e,t,n){return t&&(e=e.trim()),n&&(e=uo(e)),e}const Pt={created(e,{modifiers:{lazy:t,trim:n,number:i}},o){e[Nt]=Dn(o);const a=i||o.props&&o.props.type==="number";pn(e,t?"change":"input",c=>{c.target.composing||e[Nt](td(e.value,n,a))}),(n||a)&&pn(e,"change",()=>{e.value=td(e.value,n,a)}),t||(pn(e,"compositionstart",ty),pn(e,"compositionend",ed),pn(e,"change",ed))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:i,trim:o,number:a}},c){if(e[Nt]=Dn(c),e.composing)return;const u=(a||e.type==="number")&&!/^0\d/.test(e.value)?uo(e.value):e.value,f=t??"";if(u===f)return;const m=e.getRootNode();(m instanceof Document||m instanceof ShadowRoot)&&m.activeElement===e&&e.type!=="range"&&(i&&t===n||o&&e.value.trim()===f)||(e.value=f)}},Ja={deep:!0,created(e,t,n){e[Nt]=Dn(n),pn(e,"change",()=>{const i=e._modelValue,o=Cs(e),a=e.checked,c=e[Nt];if(me(i)){const u=ul(i,o),f=u!==-1;if(a&&!f)c(i.concat(o));else if(!a&&f){const m=[...i];m.splice(u,1),c(m)}}else if(Ms(i)){const u=new Set(i);a?u.add(o):u.delete(o),c(u)}else c(Qf(e,a))})},mounted:nd,beforeUpdate(e,t,n){e[Nt]=Dn(n),nd(e,t,n)}};function nd(e,{value:t,oldValue:n},i){e._modelValue=t;let o;if(me(t))o=ul(t,i.props.value)>-1;else if(Ms(t))o=t.has(i.props.value);else{if(t===n)return;o=On(t,Qf(e,!0))}e.checked!==o&&(e.checked=o)}const ny={created(e,{value:t},n){e.checked=On(t,n.props.value),e[Nt]=Dn(n),pn(e,"change",()=>{e[Nt](Cs(e))})},beforeUpdate(e,{value:t,oldValue:n},i){e[Nt]=Dn(i),t!==n&&(e.checked=On(t,i.props.value))}},sy={deep:!0,created(e,{value:t,modifiers:{number:n}},i){const o=Ms(t);pn(e,"change",()=>{const a=Array.prototype.filter.call(e.options,c=>c.selected).map(c=>n?uo(Cs(c)):Cs(c));e[Nt](e.multiple?o?new Set(a):a:a[0]),e._assigning=!0,$t(()=>{e._assigning=!1})}),e[Nt]=Dn(i)},mounted(e,{value:t}){sd(e,t)},beforeUpdate(e,t,n){e[Nt]=Dn(n)},updated(e,{value:t}){e._assigning||sd(e,t)}};function sd(e,t){const n=e.multiple,i=me(t);if(!(n&&!i&&!Ms(t))){for(let o=0,a=e.options.length;o<a;o++){const c=e.options[o],u=Cs(c);if(n)if(i){const f=typeof u;f==="string"||f==="number"?c.selected=t.some(m=>String(m)===String(u)):c.selected=ul(t,u)>-1}else c.selected=t.has(u);else if(On(Cs(c),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Cs(e){return"_value"in e?e._value:e.value}function Qf(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ry={created(e,t,n){Ai(e,t,n,null,"created")},mounted(e,t,n){Ai(e,t,n,null,"mounted")},beforeUpdate(e,t,n,i){Ai(e,t,n,i,"beforeUpdate")},updated(e,t,n,i){Ai(e,t,n,i,"updated")}};function iy(e,t){switch(e){case"SELECT":return sy;case"TEXTAREA":return Pt;default:switch(t){case"checkbox":return Ja;case"radio":return ny;default:return Pt}}}function Ai(e,t,n,i,o){const c=iy(e.tagName,n.props&&n.props.type)[o];c&&c(e,t,n,i)}const oy=["ctrl","shift","alt","meta"],ay={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>oy.some(n=>e[`${n}Key`]&&!t.includes(n))},tt=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),i=t.join(".");return n[i]||(n[i]=(o,...a)=>{for(let c=0;c<t.length;c++){const u=ay[t[c]];if(u&&u(o,t))return}return e(o,...a)})},ly={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},rd=(e,t)=>{const n=e._withKeys||(e._withKeys={}),i=t.join(".");return n[i]||(n[i]=o=>{if(!("key"in o))return;const a=Pn(o.key);if(t.some(c=>c===a||ly[c]===a))return e(o)})},cy=Xe({patchProp:Kk},Tk);let id;function uy(){return id||(id=ik(cy))}const dy=(...e)=>{const t=uy().createApp(...e),{mount:n}=t;return t.mount=i=>{const o=gy(i);if(!o)return;const a=t._component;!Se(a)&&!a.render&&!a.template&&(a.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const c=n(o,!1,fy(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),c},t};function fy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function gy(e){return Ve(e)?document.querySelector(e):e}function xl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ns=xl();function Yf(e){ns=e}var Zn={exec:()=>null};function Me(e,t=""){let n=typeof e=="string"?e:e.source,i={replace:(o,a)=>{let c=typeof a=="string"?a:a.source;return c=c.replace(ct.caret,"$1"),n=n.replace(o,c),i},getRegex:()=>new RegExp(n,t)};return i}var py=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch{return!1}})(),ct={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},hy=/^(?:[ \t]*(?:\n|$))+/,my=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,by=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Hr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ky=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Sl=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Jf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xf=Me(Jf).replace(/bull/g,Sl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),yy=Me(Jf).replace(/bull/g,Sl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),El=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_y=/^[^\n]+/,Tl=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,vy=Me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Tl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wy=Me(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Sl).getRegex(),yo="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Al=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,xy=Me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Al).replace("tag",yo).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),eg=Me(El).replace("hr",Hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yo).getRegex(),Sy=Me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",eg).getRegex(),Cl={blockquote:Sy,code:my,def:vy,fences:by,heading:ky,hr:Hr,html:xy,lheading:Xf,list:wy,newline:hy,paragraph:eg,table:Zn,text:_y},od=Me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yo).getRegex(),Ey={...Cl,lheading:yy,table:od,paragraph:Me(El).replace("hr",Hr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",od).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",yo).getRegex()},Ty={...Cl,html:Me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Al).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Zn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Me(El).replace("hr",Hr).replace("heading",` *#{1,6} *[^
|
|
18
|
+
]`).replace("lheading",Xf).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ay=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cy=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,tg=/^( {2,}|\\)\n(?!\s*$)/,Iy=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rs=/[\p{P}\p{S}]/u,_o=/[\s\p{P}\p{S}]/u,Il=/[^\s\p{P}\p{S}]/u,My=Me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_o).getRegex(),ng=/(?!~)[\p{P}\p{S}]/u,Ry=/(?!~)[\s\p{P}\p{S}]/u,Ny=/(?:[^\s\p{P}\p{S}]|~)/u,Ly=Me(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",py?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),sg=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Oy=Me(sg,"u").replace(/punct/g,Rs).getRegex(),Dy=Me(sg,"u").replace(/punct/g,ng).getRegex(),rg="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Py=Me(rg,"gu").replace(/notPunctSpace/g,Il).replace(/punctSpace/g,_o).replace(/punct/g,Rs).getRegex(),$y=Me(rg,"gu").replace(/notPunctSpace/g,Ny).replace(/punctSpace/g,Ry).replace(/punct/g,ng).getRegex(),By=Me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Il).replace(/punctSpace/g,_o).replace(/punct/g,Rs).getRegex(),Uy=Me(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Rs).getRegex(),Fy="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zy=Me(Fy,"gu").replace(/notPunctSpace/g,Il).replace(/punctSpace/g,_o).replace(/punct/g,Rs).getRegex(),Hy=Me(/\\(punct)/,"gu").replace(/punct/g,Rs).getRegex(),jy=Me(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Wy=Me(Al).replace("(?:-->|$)","-->").getRegex(),Ky=Me("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Wy).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qi=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Vy=Me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Qi).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ig=Me(/^!?\[(label)\]\[(ref)\]/).replace("label",Qi).replace("ref",Tl).getRegex(),og=Me(/^!?\[(ref)\](?:\[\])?/).replace("ref",Tl).getRegex(),Gy=Me("reflink|nolink(?!\\()","g").replace("reflink",ig).replace("nolink",og).getRegex(),ad=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Ml={_backpedal:Zn,anyPunctuation:Hy,autolink:jy,blockSkip:Ly,br:tg,code:Cy,del:Zn,delLDelim:Zn,delRDelim:Zn,emStrongLDelim:Oy,emStrongRDelimAst:Py,emStrongRDelimUnd:By,escape:Ay,link:Vy,nolink:og,punctuation:My,reflink:ig,reflinkSearch:Gy,tag:Ky,text:Iy,url:Zn},qy={...Ml,link:Me(/^!?\[(label)\]\((.*?)\)/).replace("label",Qi).getRegex(),reflink:Me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Qi).getRegex()},Xa={...Ml,emStrongRDelimAst:$y,emStrongLDelim:Dy,delLDelim:Uy,delRDelim:zy,url:Me(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",ad).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Me(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",ad).getRegex()},Zy={...Xa,br:Me(tg).replace("{2,}","*").getRegex(),text:Me(Xa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Ci={normal:Cl,gfm:Ey,pedantic:Ty},cr={normal:Ml,gfm:Xa,breaks:Zy,pedantic:qy},Qy={"&":"&","<":"<",">":">",'"':""","'":"'"},ld=e=>Qy[e];function qt(e,t){if(t){if(ct.escapeTest.test(e))return e.replace(ct.escapeReplace,ld)}else if(ct.escapeTestNoEncode.test(e))return e.replace(ct.escapeReplaceNoEncode,ld);return e}function cd(e){try{e=encodeURI(e).replace(ct.percentDecode,"%")}catch{return null}return e}function ud(e,t){var a;let n=e.replace(ct.findPipe,(c,u,f)=>{let m=!1,h=u;for(;--h>=0&&f[h]==="\\";)m=!m;return m?"|":" |"}),i=n.split(ct.splitPipe),o=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;o<i.length;o++)i[o]=i[o].trim().replace(ct.slashPipe,"|");return i}function An(e,t,n){let i=e.length;if(i===0)return"";let o=0;for(;o<i&&e.charAt(i-o-1)===t;)o++;return e.slice(0,i-o)}function dd(e){let t=e.split(`
|
|
19
|
+
`),n=t.length-1;for(;n>=0&&ct.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
20
|
+
`)}function Yy(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])n++;else if(e[i]===t[1]&&(n--,n<0))return i;return n>0?-2:-1}function Jy(e,t=0){let n=t,i="";for(let o of e)if(o===" "){let a=4-n%4;i+=" ".repeat(a),n+=a}else i+=o,n++;return i}function fd(e,t,n,i,o){let a=t.href,c=t.title||null,u=e[1].replace(o.other.outputLinkReplace,"$1");i.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:c,text:u,tokens:i.inlineTokens(u)};return i.state.inLink=!1,f}function Xy(e,t,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return t;let o=i[1];return t.split(`
|
|
21
|
+
`).map(a=>{let c=a.match(n.other.beginningSpace);if(c===null)return a;let[u]=c;return u.length>=o.length?a.slice(o.length):a}).join(`
|
|
22
|
+
`)}var Yi=class{constructor(e){$e(this,"options");$e(this,"rules");$e(this,"lexer");this.options=e||ns}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:dd(t[0]),i=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:i}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],i=Xy(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:i}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let i=An(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:An(t[0],`
|
|
23
|
+
`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:An(t[0],`
|
|
24
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=An(t[0],`
|
|
25
|
+
`).split(`
|
|
26
|
+
`),i="",o="",a=[];for(;n.length>0;){let c=!1,u=[],f;for(f=0;f<n.length;f++)if(this.rules.other.blockquoteStart.test(n[f]))u.push(n[f]),c=!0;else if(!c)u.push(n[f]);else break;n=n.slice(f);let m=u.join(`
|
|
27
|
+
`),h=m.replace(this.rules.other.blockquoteSetextReplace,`
|
|
28
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
29
|
+
${m}`:m,o=o?`${o}
|
|
30
|
+
${h}`:h;let _=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,a,!0),this.lexer.state.top=_,n.length===0)break;let w=a.at(-1);if((w==null?void 0:w.type)==="code")break;if((w==null?void 0:w.type)==="blockquote"){let I=w,A=I.raw+`
|
|
31
|
+
`+n.join(`
|
|
32
|
+
`),P=this.blockquote(A);a[a.length-1]=P,i=i.substring(0,i.length-I.raw.length)+P.raw,o=o.substring(0,o.length-I.text.length)+P.text;break}else if((w==null?void 0:w.type)==="list"){let I=w,A=I.raw+`
|
|
33
|
+
`+n.join(`
|
|
34
|
+
`),P=this.list(A);a[a.length-1]=P,i=i.substring(0,i.length-w.raw.length)+P.raw,o=o.substring(0,o.length-I.raw.length)+P.raw,n=A.substring(a.at(-1).raw.length).split(`
|
|
35
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:a,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),i=n.length>1,o={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let a=this.rules.other.listItemRegex(n),c=!1;for(;e;){let f=!1,m="",h="";if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;m=t[0],e=e.substring(m.length);let _=Jy(t[2].split(`
|
|
36
|
+
`,1)[0],t[1].length),w=e.split(`
|
|
37
|
+
`,1)[0],I=!_.trim(),A=0;if(this.options.pedantic?(A=2,h=_.trimStart()):I?A=t[1].length+1:(A=_.search(this.rules.other.nonSpaceChar),A=A>4?1:A,h=_.slice(A),A+=t[1].length),I&&this.rules.other.blankLine.test(w)&&(m+=w+`
|
|
38
|
+
`,e=e.substring(w.length+1),f=!0),!f){let P=this.rules.other.nextBulletRegex(A),U=this.rules.other.hrRegex(A),N=this.rules.other.fencesBeginRegex(A),B=this.rules.other.headingBeginRegex(A),l=this.rules.other.htmlBeginRegex(A),R=this.rules.other.blockquoteBeginRegex(A);for(;e;){let G=e.split(`
|
|
39
|
+
`,1)[0],ee;if(w=G,this.options.pedantic?(w=w.replace(this.rules.other.listReplaceNesting," "),ee=w):ee=w.replace(this.rules.other.tabCharGlobal," "),N.test(w)||B.test(w)||l.test(w)||R.test(w)||P.test(w)||U.test(w))break;if(ee.search(this.rules.other.nonSpaceChar)>=A||!w.trim())h+=`
|
|
40
|
+
`+ee.slice(A);else{if(I||_.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||N.test(_)||B.test(_)||U.test(_))break;h+=`
|
|
41
|
+
`+w}I=!w.trim(),m+=G+`
|
|
42
|
+
`,e=e.substring(G.length+1),_=ee.slice(A)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(c=!0)),o.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),o.raw+=m}let u=o.items.at(-1);if(u)u.raw=u.raw.trimEnd(),u.text=u.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let f of o.items){this.lexer.state.top=!1,f.tokens=this.lexer.blockTokens(f.text,[]);let m=f.tokens[0];if(f.task&&((m==null?void 0:m.type)==="text"||(m==null?void 0:m.type)==="paragraph")){f.text=f.text.replace(this.rules.other.listReplaceTask,""),m.raw=m.raw.replace(this.rules.other.listReplaceTask,""),m.text=m.text.replace(this.rules.other.listReplaceTask,"");for(let _=this.lexer.inlineQueue.length-1;_>=0;_--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[_].src)){this.lexer.inlineQueue[_].src=this.lexer.inlineQueue[_].src.replace(this.rules.other.listReplaceTask,"");break}let h=this.rules.other.listTaskCheckbox.exec(f.raw);if(h){let _={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};f.checked=_.checked,o.loose?f.tokens[0]&&["paragraph","text"].includes(f.tokens[0].type)&&"tokens"in f.tokens[0]&&f.tokens[0].tokens?(f.tokens[0].raw=_.raw+f.tokens[0].raw,f.tokens[0].text=_.raw+f.tokens[0].text,f.tokens[0].tokens.unshift(_)):f.tokens.unshift({type:"paragraph",raw:_.raw,text:_.raw,tokens:[_]}):f.tokens.unshift(_)}}else f.task&&(f.task=!1);if(!o.loose){let h=f.tokens.filter(w=>w.type==="space"),_=h.length>0&&h.some(w=>this.rules.other.anyLine.test(w.raw));o.loose=_}}if(o.loose)for(let f of o.items){f.loose=!0;for(let m of f.tokens)m.type==="text"&&(m.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=dd(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:An(t[0],`
|
|
43
|
+
`),href:i,title:o}}}table(e){var c;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=ud(t[1]),i=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(c=t[3])!=null&&c.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
44
|
+
`):[],a={type:"table",raw:An(t[0],`
|
|
45
|
+
`),header:[],align:[],rows:[]};if(n.length===i.length){for(let u of i)this.rules.other.tableAlignRight.test(u)?a.align.push("right"):this.rules.other.tableAlignCenter.test(u)?a.align.push("center"):this.rules.other.tableAlignLeft.test(u)?a.align.push("left"):a.align.push(null);for(let u=0;u<n.length;u++)a.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:a.align[u]});for(let u of o)a.rows.push(ud(u,a.header.length).map((f,m)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:a.align[m]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:An(t[0],`
|
|
46
|
+
`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
47
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=An(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=Yy(t[2],"()");if(a===-2)return;if(a>-1){let c=(t[0].indexOf("!")===0?5:4)+t[1].length+a;t[2]=t[2].substring(0,a),t[0]=t[0].substring(0,c).trim(),t[3]=""}}let i=t[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(i);a&&(i=a[1],o=a[3])}else o=t[3]?t[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),fd(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[i.toLowerCase()];if(!o){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return fd(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!n||this.rules.inline.punctuation.exec(n))){let o=[...i[0]].length-1,a,c,u=o,f=0,m=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*e.length+o);(i=m.exec(t))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(c=[...a].length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){f+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+f);let h=[...i[0]][0].length,_=e.slice(0,o+i.index+h+c);if(Math.min(o,c)%2){let I=_.slice(1,-1);return{type:"em",raw:_,text:I,tokens:this.lexer.inlineTokens(I)}}let w=_.slice(2,-2);return{type:"strong",raw:_,text:w,tokens:this.lexer.inlineTokens(w)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!n||this.rules.inline.punctuation.exec(n))){let o=[...i[0]].length-1,a,c,u=o,f=this.rules.inline.delRDelim;for(f.lastIndex=0,t=t.slice(-1*e.length+o);(i=f.exec(t))!==null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a||(c=[...a].length,c!==o))continue;if(i[3]||i[4]){u+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u);let m=[...i[0]][0].length,h=e.slice(0,o+i.index+m+c),_=h.slice(o,-o);return{type:"del",raw:h,text:_,tokens:this.lexer.inlineTokens(_)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,i;return t[2]==="@"?(n=t[1],i="mailto:"+n):(n=t[1],i=n),{type:"link",raw:t[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let i,o;if(t[2]==="@")i=t[0],o="mailto:"+i;else{let a;do a=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(a!==t[0]);i=t[0],t[1]==="www."?o="http://"+t[0]:o=t[0]}return{type:"link",raw:t[0],text:i,href:o,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Bt=class el{constructor(t){$e(this,"tokens");$e(this,"options");$e(this,"state");$e(this,"inlineQueue");$e(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ns,this.options.tokenizer=this.options.tokenizer||new Yi,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:ct,block:Ci.normal,inline:cr.normal};this.options.pedantic?(n.block=Ci.pedantic,n.inline=cr.pedantic):this.options.gfm&&(n.block=Ci.gfm,this.options.breaks?n.inline=cr.breaks:n.inline=cr.gfm),this.tokenizer.rules=n}static get rules(){return{block:Ci,inline:cr}}static lex(t,n){return new el(n).lex(t)}static lexInline(t,n){return new el(n).inlineTokens(t)}lex(t){t=t.replace(ct.carriageReturn,`
|
|
48
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],i=!1){var a,c,u;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(ct.tabCharGlobal," ").replace(ct.spaceLine,""));let o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let f;if((c=(a=this.options.extensions)==null?void 0:a.block)!=null&&c.some(h=>(f=h.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.space(t)){t=t.substring(f.raw.length);let h=n.at(-1);f.raw.length===1&&h!==void 0?h.raw+=`
|
|
49
|
+
`:n.push(f);continue}if(f=this.tokenizer.code(t)){t=t.substring(f.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
50
|
+
`)?"":`
|
|
51
|
+
`)+f.raw,h.text+=`
|
|
52
|
+
`+f.text,this.inlineQueue.at(-1).src=h.text):n.push(f);continue}if(f=this.tokenizer.fences(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.heading(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.hr(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.blockquote(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.list(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.html(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.def(t)){t=t.substring(f.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
53
|
+
`)?"":`
|
|
54
|
+
`)+f.raw,h.text+=`
|
|
55
|
+
`+f.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[f.tag]||(this.tokens.links[f.tag]={href:f.href,title:f.title},n.push(f));continue}if(f=this.tokenizer.table(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.lheading(t)){t=t.substring(f.raw.length),n.push(f);continue}let m=t;if((u=this.options.extensions)!=null&&u.startBlock){let h=1/0,_=t.slice(1),w;this.options.extensions.startBlock.forEach(I=>{w=I.call({lexer:this},_),typeof w=="number"&&w>=0&&(h=Math.min(h,w))}),h<1/0&&h>=0&&(m=t.substring(0,h+1))}if(this.state.top&&(f=this.tokenizer.paragraph(m))){let h=n.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
56
|
+
`)?"":`
|
|
57
|
+
`)+f.raw,h.text+=`
|
|
58
|
+
`+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(f),i=m.length!==t.length,t=t.substring(f.raw.length);continue}if(f=this.tokenizer.text(t)){t=t.substring(f.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
59
|
+
`)?"":`
|
|
60
|
+
`)+f.raw,h.text+=`
|
|
61
|
+
`+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(f);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var m,h,_,w,I;this.tokenizer.lexer=this;let i=t,o=null;if(this.tokens.links){let A=Object.keys(this.tokens.links);if(A.length>0)for(;(o=this.tokenizer.rules.inline.reflinkSearch.exec(i))!==null;)A.includes(o[0].slice(o[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,o.index)+"["+"a".repeat(o[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(o=this.tokenizer.rules.inline.anyPunctuation.exec(i))!==null;)i=i.slice(0,o.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(o=this.tokenizer.rules.inline.blockSkip.exec(i))!==null;)a=o[2]?o[2].length:0,i=i.slice(0,o.index+a)+"["+"a".repeat(o[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(m=this.options.hooks)==null?void 0:m.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let c=!1,u="",f=1/0;for(;t;){if(t.length<f)f=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}c||(u=""),c=!1;let A;if((w=(_=this.options.extensions)==null?void 0:_.inline)!=null&&w.some(U=>(A=U.call({lexer:this},t,n))?(t=t.substring(A.raw.length),n.push(A),!0):!1))continue;if(A=this.tokenizer.escape(t)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.tag(t)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.link(t)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(A.raw.length);let U=n.at(-1);A.type==="text"&&(U==null?void 0:U.type)==="text"?(U.raw+=A.raw,U.text+=A.text):n.push(A);continue}if(A=this.tokenizer.emStrong(t,i,u)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.codespan(t)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.br(t)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.del(t,i,u)){t=t.substring(A.raw.length),n.push(A);continue}if(A=this.tokenizer.autolink(t)){t=t.substring(A.raw.length),n.push(A);continue}if(!this.state.inLink&&(A=this.tokenizer.url(t))){t=t.substring(A.raw.length),n.push(A);continue}let P=t;if((I=this.options.extensions)!=null&&I.startInline){let U=1/0,N=t.slice(1),B;this.options.extensions.startInline.forEach(l=>{B=l.call({lexer:this},N),typeof B=="number"&&B>=0&&(U=Math.min(U,B))}),U<1/0&&U>=0&&(P=t.substring(0,U+1))}if(A=this.tokenizer.inlineText(P)){t=t.substring(A.raw.length),A.raw.slice(-1)!=="_"&&(u=A.raw.slice(-1)),c=!0;let U=n.at(-1);(U==null?void 0:U.type)==="text"?(U.raw+=A.raw,U.text+=A.text):n.push(A);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(this.options.silent)console.error(n);else throw new Error(n)}},Ji=class{constructor(e){$e(this,"options");$e(this,"parser");this.options=e||ns}space(e){return""}code({text:e,lang:t,escaped:n}){var a;let i=(a=(t||"").match(ct.notSpaceStart))==null?void 0:a[0],o=e.replace(ct.endingNewline,"")+`
|
|
62
|
+
`;return i?'<pre><code class="language-'+qt(i)+'">'+(n?o:qt(o,!0))+`</code></pre>
|
|
63
|
+
`:"<pre><code>"+(n?o:qt(o,!0))+`</code></pre>
|
|
64
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
65
|
+
${this.parser.parse(e)}</blockquote>
|
|
66
|
+
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
67
|
+
`}hr(e){return`<hr>
|
|
68
|
+
`}list(e){let t=e.ordered,n=e.start,i="";for(let c=0;c<e.items.length;c++){let u=e.items[c];i+=this.listitem(u)}let o=t?"ol":"ul",a=t&&n!==1?' start="'+n+'"':"";return"<"+o+a+`>
|
|
69
|
+
`+i+"</"+o+`>
|
|
70
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
71
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
72
|
+
`}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let i="";for(let o=0;o<e.rows.length;o++){let a=e.rows[o];n="";for(let c=0;c<a.length;c++)n+=this.tablecell(a[c]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
73
|
+
<thead>
|
|
74
|
+
`+t+`</thead>
|
|
75
|
+
`+i+`</table>
|
|
76
|
+
`}tablerow({text:e}){return`<tr>
|
|
77
|
+
${e}</tr>
|
|
78
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
79
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${qt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let i=this.parser.parseInline(n),o=cd(e);if(o===null)return i;e=o;let a='<a href="'+e+'"';return t&&(a+=' title="'+qt(t)+'"'),a+=">"+i+"</a>",a}image({href:e,title:t,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let o=cd(e);if(o===null)return qt(n);e=o;let a=`<img src="${e}" alt="${qt(n)}"`;return t&&(a+=` title="${qt(t)}"`),a+=">",a}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qt(e.text)}},Rl=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Ut=class tl{constructor(t){$e(this,"options");$e(this,"renderer");$e(this,"textRenderer");this.options=t||ns,this.options.renderer=this.options.renderer||new Ji,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Rl}static parse(t,n){return new tl(n).parse(t)}static parseInline(t,n){return new tl(n).parseInline(t)}parse(t){var i,o;this.renderer.parser=this;let n="";for(let a=0;a<t.length;a++){let c=t[a];if((o=(i=this.options.extensions)==null?void 0:i.renderers)!=null&&o[c.type]){let f=c,m=this.options.extensions.renderers[f.type].call({parser:this},f);if(m!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(f.type)){n+=m||"";continue}}let u=c;switch(u.type){case"space":{n+=this.renderer.space(u);break}case"hr":{n+=this.renderer.hr(u);break}case"heading":{n+=this.renderer.heading(u);break}case"code":{n+=this.renderer.code(u);break}case"table":{n+=this.renderer.table(u);break}case"blockquote":{n+=this.renderer.blockquote(u);break}case"list":{n+=this.renderer.list(u);break}case"checkbox":{n+=this.renderer.checkbox(u);break}case"html":{n+=this.renderer.html(u);break}case"def":{n+=this.renderer.def(u);break}case"paragraph":{n+=this.renderer.paragraph(u);break}case"text":{n+=this.renderer.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return n}parseInline(t,n=this.renderer){var o,a;this.renderer.parser=this;let i="";for(let c=0;c<t.length;c++){let u=t[c];if((a=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&a[u.type]){let m=this.options.extensions.renderers[u.type].call({parser:this},u);if(m!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(u.type)){i+=m||"";continue}}let f=u;switch(f.type){case"escape":{i+=n.text(f);break}case"html":{i+=n.html(f);break}case"link":{i+=n.link(f);break}case"image":{i+=n.image(f);break}case"checkbox":{i+=n.checkbox(f);break}case"strong":{i+=n.strong(f);break}case"em":{i+=n.em(f);break}case"codespan":{i+=n.codespan(f);break}case"br":{i+=n.br(f);break}case"del":{i+=n.del(f);break}case"text":{i+=n.text(f);break}default:{let m='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(m),"";throw new Error(m)}}}return i}},Di,hr=(Di=class{constructor(e){$e(this,"options");$e(this,"block");this.options=e||ns}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?Bt.lex:Bt.lexInline}provideParser(e=this.block){return e?Ut.parse:Ut.parseInline}},$e(Di,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),$e(Di,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Di),e_=class{constructor(...e){$e(this,"defaults",xl());$e(this,"options",this.setOptions);$e(this,"parse",this.parseMarkdown(!0));$e(this,"parseInline",this.parseMarkdown(!1));$e(this,"Parser",Ut);$e(this,"Renderer",Ji);$e(this,"TextRenderer",Rl);$e(this,"Lexer",Bt);$e(this,"Tokenizer",Yi);$e(this,"Hooks",hr);this.use(...e)}walkTokens(e,t){var i,o;let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":{let c=a;for(let u of c.header)n=n.concat(this.walkTokens(u.tokens,t));for(let u of c.rows)for(let f of u)n=n.concat(this.walkTokens(f.tokens,t));break}case"list":{let c=a;n=n.concat(this.walkTokens(c.items,t));break}default:{let c=a;(o=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&o[c.type]?this.defaults.extensions.childTokens[c.type].forEach(u=>{let f=c[u].flat(1/0);n=n.concat(this.walkTokens(f,t))}):c.tokens&&(n=n.concat(this.walkTokens(c.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=t.renderers[o.name];a?t.renderers[o.name]=function(...c){let u=o.renderer.apply(this,c);return u===!1&&(u=a.apply(this,c)),u}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=t[o.level];a?a.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),i.extensions=t),n.renderer){let o=this.defaults.renderer||new Ji(this.defaults);for(let a in n.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let c=a,u=n.renderer[c],f=o[c];o[c]=(...m)=>{let h=u.apply(o,m);return h===!1&&(h=f.apply(o,m)),h||""}}i.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Yi(this.defaults);for(let a in n.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let c=a,u=n.tokenizer[c],f=o[c];o[c]=(...m)=>{let h=u.apply(o,m);return h===!1&&(h=f.apply(o,m)),h}}i.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new hr;for(let a in n.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let c=a,u=n.hooks[c],f=o[c];hr.passThroughHooks.has(a)?o[c]=m=>{if(this.defaults.async&&hr.passThroughHooksRespectAsync.has(a))return(async()=>{let _=await u.call(o,m);return f.call(o,_)})();let h=u.call(o,m);return f.call(o,h)}:o[c]=(...m)=>{if(this.defaults.async)return(async()=>{let _=await u.apply(o,m);return _===!1&&(_=await f.apply(o,m)),_})();let h=u.apply(o,m);return h===!1&&(h=f.apply(o,m)),h}}i.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,a=n.walkTokens;i.walkTokens=function(c){let u=[];return u.push(a.call(this,c)),o&&(u=u.concat(o.call(this,c))),u}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Bt.lex(e,t??this.defaults)}parser(e,t){return Ut.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let i={...n},o={...this.defaults,...i},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(t):t,u=await(o.hooks?await o.hooks.provideLexer(e):e?Bt.lex:Bt.lexInline)(c,o),f=o.hooks?await o.hooks.processAllTokens(u):u;o.walkTokens&&await Promise.all(this.walkTokens(f,o.walkTokens));let m=await(o.hooks?await o.hooks.provideParser(e):e?Ut.parse:Ut.parseInline)(f,o);return o.hooks?await o.hooks.postprocess(m):m})().catch(a);try{o.hooks&&(t=o.hooks.preprocess(t));let c=(o.hooks?o.hooks.provideLexer(e):e?Bt.lex:Bt.lexInline)(t,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=(o.hooks?o.hooks.provideParser(e):e?Ut.parse:Ut.parseInline)(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return a(c)}}}onError(e,t){return n=>{if(n.message+=`
|
|
80
|
+
Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error occurred:</p><pre>"+qt(n.message+"",!0)+"</pre>";return t?Promise.resolve(i):i}if(t)return Promise.reject(n);throw n}}},ts=new e_;function Re(e,t){return ts.parse(e,t)}Re.options=Re.setOptions=function(e){return ts.setOptions(e),Re.defaults=ts.defaults,Yf(Re.defaults),Re};Re.getDefaults=xl;Re.defaults=ns;Re.use=function(...e){return ts.use(...e),Re.defaults=ts.defaults,Yf(Re.defaults),Re};Re.walkTokens=function(e,t){return ts.walkTokens(e,t)};Re.parseInline=ts.parseInline;Re.Parser=Ut;Re.parser=Ut.parse;Re.Renderer=Ji;Re.TextRenderer=Rl;Re.Lexer=Bt;Re.lexer=Bt.lex;Re.Tokenizer=Yi;Re.Hooks=hr;Re.parse=Re;Re.options;Re.setOptions;Re.use;Re.walkTokens;Re.parseInline;Ut.parse;Bt.lex;function t_(e,t,n){const i=new Array(e);return new Proxy(i,{get(o,a,c){if(typeof a=="string"){const u=a.charCodeAt(0);if(u>=48&&u<=57){const f=+a;if(Number.isInteger(f)&&f>=0&&f<e){let m=o[f];if(!m){const h=t[f*2];m=o[f]={index:f,key:n(f),start:h,size:t[f*2+1],end:h+t[f*2+1],lane:0}}return m}}if(a==="length")return e}return Reflect.get(o,a,c)}})}function ps(e,t,n){let i=n.initialDeps??[],o,a=!0;function c(){const u=e();return(u.length!==i.length||u.some((m,h)=>i[h]!==m))&&(i=u,o=t(...u),n!=null&&n.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(o),a=!1),o}return c.updateDeps=u=>{i=u},c}function gd(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const n_=(e,t)=>Math.abs(e-t)<1.01,s_=(e,t,n)=>{let i;return Object.assign(function(...o){e.clearTimeout(i),i=e.setTimeout(()=>t.apply(this,o),n)},{cancel:()=>{e.clearTimeout(i)}})};let ur;const Sa=()=>{if(ur!==void 0)return ur;if(typeof navigator>"u")return ur=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return ur=!0;const e=navigator.maxTouchPoints;return ur=navigator.platform==="MacIntel"&&e!==void 0&&e>0},pd=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},r_=e=>e,ag=e=>{const t=Math.max(e.startIndex-e.overscan,0),i=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,o=new Array(i);for(let a=0;a<i;a++)o[a]=t+a;return o},i_=(e,t)=>{const n=e.scrollElement;if(!n)return;const i=e.targetWindow;if(!i)return;const o=c=>{const{width:u,height:f}=c;t({width:Math.round(u),height:Math.round(f)})};if(o(pd(n)),!i.ResizeObserver)return()=>{};const a=new i.ResizeObserver(c=>{const u=()=>{const f=c[0];if(f!=null&&f.borderBoxSize){const m=f.borderBoxSize[0];if(m){o({width:m.inlineSize,height:m.blockSize});return}}o(pd(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(u):u()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},Xi={passive:!0},o_=typeof window>"u"?!0:"onscrollend"in window,a_=(e,t,n)=>{const i=e.scrollElement;if(!i)return;const o=e.targetWindow;if(!o)return;const a=e.options.useScrollendEvent&&o_;let c=0;const u=a?null:s_(o,()=>t(c,!1),e.options.isScrollingResetDelay),f=_=>()=>{c=n(i),u==null||u(),t(c,_)},m=f(!0),h=f(!1);return i.addEventListener("scroll",m,Xi),a&&i.addEventListener("scrollend",h,Xi),()=>{i.removeEventListener("scroll",m),a&&i.removeEventListener("scrollend",h),u==null||u.cancel()}},l_=(e,t)=>a_(e,t,n=>{const{horizontal:i,isRtl:o}=e.options;return i?n.scrollLeft*(o&&-1||1):n.scrollTop}),c_=(e,t,n)=>{if(n.options.useCachedMeasurements){const i=n.indexFromElement(e),o=n.options.getItemKey(i);return n.itemSizeCache.get(o)??n.options.estimateSize(i)}if(t!=null&&t.borderBoxSize){const i=t.borderBoxSize[0];if(i)return Math.round(i[n.options.horizontal?"inlineSize":"blockSize"])}if(!t){const i=n.indexFromElement(e),o=n.options.getItemKey(i),a=n.itemSizeCache.get(o);if(a!==void 0)return a}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},u_=(e,{adjustments:t=0,behavior:n},i)=>{var o,a;(a=(o=i.scrollElement)==null?void 0:o.scrollTo)==null||a.call(o,{[i.options.horizontal?"left":"top"]:e+t,behavior:n})},d_=u_;class f_{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var n,i,o;return((o=(i=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:i.now)==null?void 0:o.call(i))??Date.now()},this.observer=(()=>{let n=null;const i=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(o=>{o.forEach(a=>{const c=()=>{const u=a.target,f=this.indexFromElement(u);if(!u.isConnected){this.observer.unobserve(u);for(const[m,h]of this.elementsCache)if(h===u){this.elementsCache.delete(m);break}return}this.isIndexInRange(f)&&this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,this.options.measureElement(u,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()})}));return{disconnect:()=>{var o;(o=i())==null||o.disconnect(),n=null},observe:o=>{var a;return(a=i())==null?void 0:a.observe(o,{box:"border-box"})},unobserve:o=>{var a;return(a=i())==null?void 0:a.unobserve(o)}}})(),this.range=null,this.setOptions=n=>{var i,o;const a={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:r_,rangeExtractor:ag,onChange:()=>{},measureElement:c_,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const w in n){const I=n[w];I!==void 0&&(a[w]=I)}const c=this.options;let u=null,f=null,m=!1;if(c!==void 0&&c.enabled&&a.enabled&&a.anchorTo==="end"&&this.scrollElement!==null){const w=c.count,I=a.count,A=this.getMeasurements(),P=w>0?((i=A[0])==null?void 0:i.key)??c.getItemKey(0):null,U=w>0?((o=A[w-1])==null?void 0:o.key)??c.getItemKey(w-1):null;if(I!==w||w>0&&I>0&&(a.getItemKey(0)!==P||a.getItemKey(I-1)!==U)){m=!0;const l=w>0?this.getVirtualItemForOffset(this.getScrollOffset())??A[0]:null;l&&(u=[l.key,this.getScrollOffset()-l.start]);const R=a.followOnAppend===!0?"auto":a.followOnAppend||null;R&&I>w&&this.isAtEnd(c.scrollEndThreshold)&&(w===0||a.getItemKey(I-1)!==U)&&(f=R)}}this.options=a,m&&(this.pendingMin=0,this.itemSizeCacheVersion++);let h=!1,_=0;if(u&&this.scrollOffset!==null){const[w,I]=u,A=this.getMeasurements(),{count:P,getItemKey:U}=this.options;let N=0;for(;N<P&&U(N)!==w;)N++;if(N<P){const B=A[N];if(B){const l=Math.max(0,B.start+I);l!==this.scrollOffset&&(_=l-this.scrollOffset,this.scrollOffset=l,h=!0)}}}(h||f)&&(this.pendingScrollAnchor=[h?u[0]:null,h?u[1]:0,f,_])},this.notify=n=>{var i,o;(o=(i=this.options).onChange)==null||o.call(i,this,n)},this.maybeNotify=ps(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const i=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==i){if(this.cleanup(),!i){this.maybeNotify();return}if(this.scrollElement=i,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(a=>{this.observer.observe(a)}),this.unsubs.push(this.options.observeElementRect(this,a=>{this.scrollRect=a,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(a,c)=>{if(c&&this._intendedScrollOffset===null&&a===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(a-this._intendedScrollOffset)<1.5&&(a=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const u=this.getScrollOffset();this.scrollDirection=c?u===a?this.scrollDirection:u<a?"forward":"backward":null,this.scrollOffset=a,this.isScrolling=c,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const a=this.scrollElement,c=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},u=()=>{this._iosTouching=!1,!(!Sa()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};a.addEventListener("touchstart",c,Xi),a.addEventListener("touchend",u,Xi),this.unsubs.push(()=>{a.removeEventListener("touchstart",c),a.removeEventListener("touchend",u),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const o=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,o&&this.scrollElement&&this.options.enabled){const[a,c,u,f]=o;a!==null&&!u&&(Sa()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?f!==0&&(this._iosDeferredAdjustment+=f):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),u&&this.scrollToEnd({behavior:u})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const n=this.getScrollOffset(),i=this.getMaxScrollOffset();if(n<0||n>i)return;if(this._iosDeferredAdjustment<0&&n>=i-1){this._iosDeferredAdjustment=0;return}const o=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(n,{adjustments:this.scrollAdjustments+=o,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=ps(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(n,i,o,a,c,u,f,m)=>(this.prevLanes!==void 0&&this.prevLanes!==u&&(this.lanesChangedFlag=!0),this.prevLanes=u,this.pendingMin=null,{count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:c,lanes:u,laneAssignmentMode:f,gap:m}),{key:!1}),this.isIndexInRange=n=>n>=0&&n<this.options.count,this.getMeasurements=ps(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:n,paddingStart:i,scrollMargin:o,getItemKey:a,enabled:c,lanes:u,laneAssignmentMode:f,gap:m},h)=>{const _=this.itemSizeCache;if(!c)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const N of this.laneAssignments.keys())N>=n&&this.laneAssignments.delete(N);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(N=>{this.itemSizeCache.set(N.key,N.size)}));const w=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1),u===1){const N=n*2;let B=this._flatMeasurements;if(!B||B.length<N){const G=new Float64Array(N);B&&w>0&&G.set(B.subarray(0,w*2)),B=G,this._flatMeasurements=B}let l;if(w===0)l=i+o;else{const G=w-1;l=B[G*2]+B[G*2+1]+m}for(let G=w;G<n;G++){const ee=a(G),re=_.get(ee),oe=typeof re=="number"?re:this.options.estimateSize(G);B[G*2]=l,B[G*2+1]=oe,l+=oe+m}const R=t_(n,B,a);return this.measurementsCache=R,R}const I=this.measurementsCache.slice(0,w),A=new Array(u).fill(void 0),P=new Float64Array(u);let U=0;for(let N=0;N<w;N++){const B=I[N];B&&(A[B.lane]===void 0&&U++,A[B.lane]=N,P[B.lane]=B.end)}for(let N=w;N<n;N++){const B=a(N),l=this.laneAssignments.get(N);let R,G;const ee=f==="estimate"||_.has(B);if(l!==void 0&&this.options.lanes>1){R=l;const he=A[R],ke=he!==void 0?I[he]:void 0;G=ke?ke.end+m:i+o}else if(U===u){let he=0,ke=P[0],te=A[0];for(let we=1;we<u;we++){const Ae=P[we];(Ae<ke||Ae===ke&&A[we]<te)&&(he=we,ke=Ae,te=A[we])}R=he,G=ke+m,ee&&this.laneAssignments.set(N,R)}else R=N%this.options.lanes,G=i+o,ee&&this.laneAssignments.set(N,R);const re=_.get(B),oe=typeof re=="number"?re:this.options.estimateSize(N),ne=G+oe;I[N]={index:N,start:G,size:oe,end:ne,key:B,lane:R},A[R]===void 0&&U++,A[R]=N,P[R]=ne}return this.measurementsCache=I,I},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ps(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,i,o,a)=>n.length===0||i===0?(this.range=null,null):(this.range=p_(n,i,o,a,a===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ps(()=>{let n=null,i=null;const o=this.calculateRange();return o&&(n=o.startIndex,i=o.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,i]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,i]},(n,i,o,a,c)=>a===null||c===null?[]:n({startIndex:a,endIndex:c,overscan:i,count:o}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const i=this.options.indexAttribute,o=n.getAttribute(i);return o?parseInt(o,10):(console.warn(`Missing attribute name '${i}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var i;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const o=this.scrollState.index??((i=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:i.index);if(o!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),c=Math.max(0,o-a),u=Math.min(this.options.count-1,o+a);return n>=c&&n<=u}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((c,u)=>{c.isConnected||(this.observer.unobserve(c),this.elementsCache.delete(u))});return}const i=this.indexFromElement(n);if(!this.isIndexInRange(i))return;const o=this.options.getItemKey(i),a=this.elementsCache.get(o);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(o,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(i)&&this.resizeItem(i,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,i)=>{var o,a;if(!this.isIndexInRange(n))return;let c,u,f;const m=this._flatMeasurements;if(this.options.lanes===1&&m!==null)f=this.options.getItemKey(n),u=m[n*2],c=m[n*2+1];else{const w=this.measurementsCache[n];if(!w)return;f=w.key,u=w.start,c=w.size}const h=this.itemSizeCache.get(f)??c,_=i-h;if(_!==0){const w=this.options.anchorTo==="end"&&((o=this.scrollState)==null?void 0:o.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,I=w?this.getTotalSize():0,A=this.getScrollOffset()+this.scrollAdjustments,U=!this.itemSizeCache.has(f)?u<A:u+h<=A&&this.scrollDirection!=="backward",N=((a=this.scrollState)==null?void 0:a.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[n]??{index:n,key:f,start:u,size:c,end:u+c,lane:0},_,this):U);(this.pendingMin===null||n<this.pendingMin)&&(this.pendingMin=n),this.itemSizeCache.set(f,i),this.itemSizeCacheVersion++;let B=!1;w?B=this.applyScrollAdjustment(this.getTotalSize()-I):N&&(B=this.applyScrollAdjustment(_)),this.notify(B)}},this.getVirtualItems=ps(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,i)=>{const o=[];for(let a=0,c=n.length;a<c;a++){const u=n[a],f=i[u];o.push(f)}return o},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const i=this.getMeasurements();if(i.length===0)return;const o=this._flatMeasurements,a=this.options.lanes===1&&o!=null,c=lg(0,i.length-1,a?u=>o[u*2]:u=>gd(i[u]).start,n);return gd(i[c])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(n=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=n,this.getOffsetForAlignment=(n,i,o=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),c=this.getScrollOffset();i==="auto"&&(i=n>=c+a?"end":"start"),i==="center"?n+=(o-a)/2:i==="end"&&(n-=a);const u=this.getMaxScrollOffset();return Math.max(Math.min(u,n),0)},this.getOffsetForIndex=(n,i="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const o=this.getSize(),a=this.getScrollOffset(),c=this.measurementsCache[n];if(!c)return;if(i==="auto")if(c.end>=a+o-this.options.scrollPaddingEnd)i="end";else if(c.start<=a+this.options.scrollPaddingStart)i="start";else return[a,i];if(i==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),i];const u=i==="end"?c.end+this.options.scrollPaddingEnd:c.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(u,i,c.size),i]},this.scrollToOffset=(n,{align:i="start",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0;const a=this.getOffsetForAlignment(n,i),c=this.now();this.scrollState={index:null,align:i,behavior:o,startedAt:c,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:i="auto",behavior:o="auto"}={})=>{this._iosDeferredAdjustment=0,n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,i);if(!a)return;const[c,u]=a,f=this.now();this.scrollState={index:n,align:u,behavior:o,startedAt:f,lastTargetOffset:c,stableFrames:0},this._scrollToOffset(c,{adjustments:void 0,behavior:o}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:i="auto"}={})=>{const o=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:i,startedAt:a,lastTargetOffset:o,stableFrames:0},this._scrollToOffset(o,{adjustments:void 0,behavior:i}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:n="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:n});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:n})},this.getTotalSize=()=>{var n;const i=this.getMeasurements();let o;if(i.length===0)o=this.options.paddingStart;else if(this.options.lanes===1){const a=i.length-1,c=this._flatMeasurements;c!=null?o=c[a*2]+c[a*2+1]:o=((n=i[a])==null?void 0:n.end)??0}else{const a=Array(this.options.lanes).fill(null);let c=i.length-1;for(;c>=0&&a.some(u=>u===null);){const u=i[c];a[u.lane]===null&&(a[u.lane]=u.end),c--}o=Math.max(...a.filter(u=>u!==null))}return Math.max(o-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const n=[];if(this.itemSizeCache.size===0)return n;const i=this.getMeasurements();for(const o of i)o&&this.itemSizeCache.has(o.key)&&n.push({index:o.index,key:o.key,start:o.start,size:o.size,end:o.end,lane:o.lane});return n},this._scrollToOffset=(n,{adjustments:i,behavior:o})=>{this._intendedScrollOffset=n+(i??0),this.options.scrollToFn(n,{behavior:o,adjustments:i},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(t)}applyScrollAdjustment(t,n){return t===0?!1:Sa()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=t,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=t,behavior:n}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const i=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,o=i?i[0]:this.scrollState.lastTargetOffset,a=1,c=o!==this.scrollState.lastTargetOffset;if(!c&&n_(o,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.getScrollOffset()!==o&&this._scrollToOffset(o,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,c){const u=this.getSize()||600,f=Math.abs(o-this.getScrollOffset()),m=this.scrollState.behavior==="smooth"&&f>u;this.scrollState.lastTargetOffset=o,m||(this.scrollState.behavior="auto"),this._scrollToOffset(o,{adjustments:void 0,behavior:m?"smooth":"auto"})}this.scheduleScrollReconcile()}}const lg=(e,t,n,i)=>{for(;e<=t;){const o=(e+t)/2|0,a=n(o);if(a<i)e=o+1;else if(a>i)t=o-1;else return o}return e>0?e-1:0};function g_(e,t,n){let i=0;for(;i<=t;){const o=(i+t)/2|0,a=e[o*2];if(a<n)i=o+1;else if(a>n)t=o-1;else return o}return i>0?i-1:0}function p_(e,t,n,i,o){const a=e.length-1;if(e.length<=i)return{startIndex:0,endIndex:a};if(i===1&&o!==null){const m=g_(o,a,n);let h=m;const _=n+t;for(;h<a&&o[h*2]+o[h*2+1]<_;)h++;return{startIndex:m,endIndex:h}}let u=lg(0,a,m=>e[m].start,n),f=u;if(i===1)for(;f<a&&e[f].end<n+t;)f++;else if(i>1){const m=Array(i).fill(0);for(;f<a&&m.some(_=>_<n+t);){const _=e[f];m[_.lane]=_.end,f++}const h=Array(i).fill(n+t);for(;u>=0&&h.some(_=>_>=n);){const _=e[u];h[_.lane]=_.start,u--}u=Math.max(0,u-u%i),f=Math.min(a,f+(i-1-f%i))}return{startIndex:u,endIndex:f}}function h_(e){const t=new f_(Mt(e)),n=rb(t),i=t._didMount();return ot(()=>Mt(e).getScrollElement(),o=>{o&&t._willUpdate()},{immediate:!0}),ot(()=>Mt(e),o=>{t.setOptions({...o,onChange:(a,c)=>{var u;ku(n),(u=o.onChange)==null||u.call(o,a,c)}}),t._willUpdate(),ku(n)},{immediate:!0}),$m(i),n}function m_(e){return h_(be(()=>({observeElementRect:i_,observeElementOffset:l_,scrollToFn:d_,...Mt(e)})))}function b_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cg(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{const n=e[t],i=typeof n;(i==="object"||i==="function")&&!Object.isFrozen(n)&&cg(n)}),e}class hd{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ug(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Ln(e,...t){const n=Object.create(null);for(const i in e)n[i]=e[i];return t.forEach(function(i){for(const o in i)n[o]=i[o]}),n}const k_="</span>",md=e=>!!e.scope,y_=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map((i,o)=>`${i}${"_".repeat(o+1)}`)].join(" ")}return`${t}${e}`};class __{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=ug(t)}openNode(t){if(!md(t))return;const n=y_(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){md(t)&&(this.buffer+=k_)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}const bd=(e={})=>{const t={children:[]};return Object.assign(t,e),t};class Nl{constructor(){this.rootNode=bd(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const n=bd({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(i=>this._walk(t,i)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{Nl._collapse(n)}))}}class v_ extends Nl{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){const i=t.root;n&&(i.scope=`language:${n}`),this.add(i)}toHTML(){return new __(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function Dr(e){return e?typeof e=="string"?e:e.source:null}function dg(e){return ss("(?=",e,")")}function w_(e){return ss("(?:",e,")*")}function x_(e){return ss("(?:",e,")?")}function ss(...e){return e.map(n=>Dr(n)).join("")}function S_(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Ll(...e){return"("+(S_(e).capture?"":"?:")+e.map(i=>Dr(i)).join("|")+")"}function fg(e){return new RegExp(e.toString()+"|").exec("").length-1}function E_(e,t){const n=e&&e.exec(t);return n&&n.index===0}const T_=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Ol(e,{joinWith:t}){let n=0;return e.map(i=>{n+=1;const o=n;let a=Dr(i),c="";for(;a.length>0;){const u=T_.exec(a);if(!u){c+=a;break}c+=a.substring(0,u.index),a=a.substring(u.index+u[0].length),u[0][0]==="\\"&&u[1]?c+="\\"+String(Number(u[1])+o):(c+=u[0],u[0]==="("&&n++)}return c}).map(i=>`(${i})`).join(t)}const A_=/\b\B/,gg="[a-zA-Z]\\w*",Dl="[a-zA-Z_]\\w*",pg="\\b\\d+(\\.\\d+)?",hg="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",mg="\\b(0b[01]+)",C_="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",I_=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=ss(t,/.*\b/,e.binary,/\b.*/)),Ln({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,i)=>{n.index!==0&&i.ignoreMatch()}},e)},Pr={begin:"\\\\[\\s\\S]",relevance:0},M_={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Pr]},R_={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Pr]},N_={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/},vo=function(e,t,n={}){const i=Ln({scope:"comment",begin:e,end:t,contains:[]},n);i.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const o=Ll("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,}/);return i.contains.push({begin:ss(/[ ]+/,"(",o,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),i},L_=vo("//","$"),O_=vo("/\\*","\\*/"),D_=vo("#","$"),P_={scope:"number",begin:pg,relevance:0},$_={scope:"number",begin:hg,relevance:0},B_={scope:"number",begin:mg,relevance:0},U_={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Pr,{begin:/\[/,end:/\]/,relevance:0,contains:[Pr]}]},F_={scope:"title",begin:gg,relevance:0},z_={scope:"title",begin:Dl,relevance:0},H_={begin:"\\.\\s*"+Dl,relevance:0},j_=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})};var Ii=Object.freeze({__proto__:null,APOS_STRING_MODE:M_,BACKSLASH_ESCAPE:Pr,BINARY_NUMBER_MODE:B_,BINARY_NUMBER_RE:mg,COMMENT:vo,C_BLOCK_COMMENT_MODE:O_,C_LINE_COMMENT_MODE:L_,C_NUMBER_MODE:$_,C_NUMBER_RE:hg,END_SAME_AS_BEGIN:j_,HASH_COMMENT_MODE:D_,IDENT_RE:gg,MATCH_NOTHING_RE:A_,METHOD_GUARD:H_,NUMBER_MODE:P_,NUMBER_RE:pg,PHRASAL_WORDS_MODE:N_,QUOTE_STRING_MODE:R_,REGEXP_MODE:U_,RE_STARTERS_RE:C_,SHEBANG:I_,TITLE_MODE:F_,UNDERSCORE_IDENT_RE:Dl,UNDERSCORE_TITLE_MODE:z_});function W_(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function K_(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function V_(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=W_,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function G_(e,t){Array.isArray(e.illegal)&&(e.illegal=Ll(...e.illegal))}function q_(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function Z_(e,t){e.relevance===void 0&&(e.relevance=1)}const Q_=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");const n=Object.assign({},e);Object.keys(e).forEach(i=>{delete e[i]}),e.keywords=n.keywords,e.begin=ss(n.beforeMatch,dg(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},Y_=["of","and","for","in","not","or","if","then","parent","list","value"],J_="keyword";function bg(e,t,n=J_){const i=Object.create(null);return typeof e=="string"?o(n,e.split(" ")):Array.isArray(e)?o(n,e):Object.keys(e).forEach(function(a){Object.assign(i,bg(e[a],t,a))}),i;function o(a,c){t&&(c=c.map(u=>u.toLowerCase())),c.forEach(function(u){const f=u.split("|");i[f[0]]=[a,X_(f[0],f[1])]})}}function X_(e,t){return t?Number(t):ev(e)?0:1}function ev(e){return Y_.includes(e.toLowerCase())}const kd={},Xn=e=>{console.error(e)},yd=(e,...t)=>{console.log(`WARN: ${e}`,...t)},hs=(e,t)=>{kd[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),kd[`${e}/${t}`]=!0)},eo=new Error;function kg(e,t,{key:n}){let i=0;const o=e[n],a={},c={};for(let u=1;u<=t.length;u++)c[u+i]=o[u],a[u+i]=!0,i+=fg(t[u-1]);e[n]=c,e[n]._emit=a,e[n]._multi=!0}function tv(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw Xn("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),eo;if(typeof e.beginScope!="object"||e.beginScope===null)throw Xn("beginScope must be object"),eo;kg(e,e.begin,{key:"beginScope"}),e.begin=Ol(e.begin,{joinWith:""})}}function nv(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw Xn("skip, excludeEnd, returnEnd not compatible with endScope: {}"),eo;if(typeof e.endScope!="object"||e.endScope===null)throw Xn("endScope must be object"),eo;kg(e,e.end,{key:"endScope"}),e.end=Ol(e.end,{joinWith:""})}}function sv(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function rv(e){sv(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),tv(e),nv(e)}function iv(e){function t(c,u){return new RegExp(Dr(c),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(u?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(u,f){f.position=this.position++,this.matchIndexes[this.matchAt]=f,this.regexes.push([f,u]),this.matchAt+=fg(u)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const u=this.regexes.map(f=>f[1]);this.matcherRe=t(Ol(u,{joinWith:"|"}),!0),this.lastIndex=0}exec(u){this.matcherRe.lastIndex=this.lastIndex;const f=this.matcherRe.exec(u);if(!f)return null;const m=f.findIndex((_,w)=>w>0&&_!==void 0),h=this.matchIndexes[m];return f.splice(0,m),Object.assign(f,h)}}class i{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(u){if(this.multiRegexes[u])return this.multiRegexes[u];const f=new n;return this.rules.slice(u).forEach(([m,h])=>f.addRule(m,h)),f.compile(),this.multiRegexes[u]=f,f}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(u,f){this.rules.push([u,f]),f.type==="begin"&&this.count++}exec(u){const f=this.getMatcher(this.regexIndex);f.lastIndex=this.lastIndex;let m=f.exec(u);if(this.resumingScanAtSamePosition()&&!(m&&m.index===this.lastIndex)){const h=this.getMatcher(0);h.lastIndex=this.lastIndex+1,m=h.exec(u)}return m&&(this.regexIndex+=m.position+1,this.regexIndex===this.count&&this.considerAll()),m}}function o(c){const u=new i;return c.contains.forEach(f=>u.addRule(f.begin,{rule:f,type:"begin"})),c.terminatorEnd&&u.addRule(c.terminatorEnd,{type:"end"}),c.illegal&&u.addRule(c.illegal,{type:"illegal"}),u}function a(c,u){const f=c;if(c.isCompiled)return f;[K_,q_,rv,Q_].forEach(h=>h(c,u)),e.compilerExtensions.forEach(h=>h(c,u)),c.__beforeBegin=null,[V_,G_,Z_].forEach(h=>h(c,u)),c.isCompiled=!0;let m=null;return typeof c.keywords=="object"&&c.keywords.$pattern&&(c.keywords=Object.assign({},c.keywords),m=c.keywords.$pattern,delete c.keywords.$pattern),m=m||/\w+/,c.keywords&&(c.keywords=bg(c.keywords,e.case_insensitive)),f.keywordPatternRe=t(m,!0),u&&(c.begin||(c.begin=/\B|\b/),f.beginRe=t(f.begin),!c.end&&!c.endsWithParent&&(c.end=/\B|\b/),c.end&&(f.endRe=t(f.end)),f.terminatorEnd=Dr(f.end)||"",c.endsWithParent&&u.terminatorEnd&&(f.terminatorEnd+=(c.end?"|":"")+u.terminatorEnd)),c.illegal&&(f.illegalRe=t(c.illegal)),c.contains||(c.contains=[]),c.contains=[].concat(...c.contains.map(function(h){return ov(h==="self"?c:h)})),c.contains.forEach(function(h){a(h,f)}),c.starts&&a(c.starts,u),f.matcher=o(f),f}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Ln(e.classNameAliases||{}),a(e)}function yg(e){return e?e.endsWithParent||yg(e.starts):!1}function ov(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Ln(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:yg(e)?Ln(e,{starts:e.starts?Ln(e.starts):null}):Object.isFrozen(e)?Ln(e):e}var av="11.11.1";class lv extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}}const Ea=ug,_d=Ln,vd=Symbol("nomatch"),cv=7,_g=function(e){const t=Object.create(null),n=Object.create(null),i=[];let o=!0;const a="Could not find the language '{}', did you forget to load/include a language module?",c={disableAutodetect:!0,name:"Plain text",contains:[]};let u={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:v_};function f(O){return u.noHighlightRe.test(O)}function m(O){let Q=O.className+" ";Q+=O.parentNode?O.parentNode.className:"";const q=u.languageDetectRe.exec(Q);if(q){const ge=oe(q[1]);return ge||(yd(a.replace("{}",q[1])),yd("Falling back to no-highlight mode for this block.",O)),ge?q[1]:"no-highlight"}return Q.split(/\s+/).find(ge=>f(ge)||oe(ge))}function h(O,Q,q){let ge="",xe="";typeof Q=="object"?(ge=O,q=Q.ignoreIllegals,xe=Q.language):(hs("10.7.0","highlight(lang, code, ...args) has been deprecated."),hs("10.7.0",`Please use highlight(code, options) instead.
|
|
81
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),xe=O,ge=Q),q===void 0&&(q=!0);const Ie={code:ge,language:xe};Ae("before:highlight",Ie);const ve=Ie.result?Ie.result:_(Ie.language,Ie.code,q);return ve.code=Ie.code,Ae("after:highlight",ve),ve}function _(O,Q,q,ge){const xe=Object.create(null);function Ie(j,J){return j.keywords[J]}function ve(){if(!$.keywords){H.addText(D);return}let j=0;$.keywordPatternRe.lastIndex=0;let J=$.keywordPatternRe.exec(D),se="";for(;J;){se+=D.substring(j,J.index);const pe=F.case_insensitive?J[0].toLowerCase():J[0],Ce=Ie($,pe);if(Ce){const[ze,st]=Ce;if(H.addText(se),se="",xe[pe]=(xe[pe]||0)+1,xe[pe]<=cv&&(ae+=st),ze.startsWith("_"))se+=J[0];else{const jt=F.classNameAliases[ze]||ze;Be(J[0],jt)}}else se+=J[0];j=$.keywordPatternRe.lastIndex,J=$.keywordPatternRe.exec(D)}se+=D.substring(j),H.addText(se)}function rt(){if(D==="")return;let j=null;if(typeof $.subLanguage=="string"){if(!t[$.subLanguage]){H.addText(D);return}j=_($.subLanguage,D,!0,Y[$.subLanguage]),Y[$.subLanguage]=j._top}else j=I(D,$.subLanguage.length?$.subLanguage:null);$.relevance>0&&(ae+=j.relevance),H.__addSublanguage(j._emitter,j.language)}function Ye(){$.subLanguage!=null?rt():ve(),D=""}function Be(j,J){j!==""&&(H.startScope(J),H.addText(j),H.endScope())}function dt(j,J){let se=1;const pe=J.length-1;for(;se<=pe;){if(!j._emit[se]){se++;continue}const Ce=F.classNameAliases[j[se]]||j[se],ze=J[se];Ce?Be(ze,Ce):(D=ze,ve(),D=""),se++}}function _t(j,J){return j.scope&&typeof j.scope=="string"&&H.openNode(F.classNameAliases[j.scope]||j.scope),j.beginScope&&(j.beginScope._wrap?(Be(D,F.classNameAliases[j.beginScope._wrap]||j.beginScope._wrap),D=""):j.beginScope._multi&&(dt(j.beginScope,J),D="")),$=Object.create(j,{parent:{value:$}}),$}function Tt(j,J,se){let pe=E_(j.endRe,se);if(pe){if(j["on:end"]){const Ce=new hd(j);j["on:end"](J,Ce),Ce.isMatchIgnored&&(pe=!1)}if(pe){for(;j.endsParent&&j.parent;)j=j.parent;return j}}if(j.endsWithParent)return Tt(j.parent,J,se)}function _n(j){return $.matcher.regexIndex===0?(D+=j[0],1):(fe=!0,0)}function Lt(j){const J=j[0],se=j.rule,pe=new hd(se),Ce=[se.__beforeBegin,se["on:begin"]];for(const ze of Ce)if(ze&&(ze(j,pe),pe.isMatchIgnored))return _n(J);return se.skip?D+=J:(se.excludeBegin&&(D+=J),Ye(),!se.returnBegin&&!se.excludeBegin&&(D=J)),_t(se,j),se.returnBegin?0:J.length}function rs(j){const J=j[0],se=Q.substring(j.index),pe=Tt($,j,se);if(!pe)return vd;const Ce=$;$.endScope&&$.endScope._wrap?(Ye(),Be(J,$.endScope._wrap)):$.endScope&&$.endScope._multi?(Ye(),dt($.endScope,j)):Ce.skip?D+=J:(Ce.returnEnd||Ce.excludeEnd||(D+=J),Ye(),Ce.excludeEnd&&(D=J));do $.scope&&H.closeNode(),!$.skip&&!$.subLanguage&&(ae+=$.relevance),$=$.parent;while($!==pe.parent);return pe.starts&&_t(pe.starts,j),Ce.returnEnd?0:J.length}function v(){const j=[];for(let J=$;J!==F;J=J.parent)J.scope&&j.unshift(J.scope);j.forEach(J=>H.openNode(J))}let E={};function L(j,J){const se=J&&J[0];if(D+=j,se==null)return Ye(),0;if(E.type==="begin"&&J.type==="end"&&E.index===J.index&&se===""){if(D+=Q.slice(J.index,J.index+1),!o){const pe=new Error(`0 width match regex (${O})`);throw pe.languageName=O,pe.badRule=E.rule,pe}return 1}if(E=J,J.type==="begin")return Lt(J);if(J.type==="illegal"&&!q){const pe=new Error('Illegal lexeme "'+se+'" for mode "'+($.scope||"<unnamed>")+'"');throw pe.mode=$,pe}else if(J.type==="end"){const pe=rs(J);if(pe!==vd)return pe}if(J.type==="illegal"&&se==="")return D+=`
|
|
82
|
+
`,1;if(ue>1e5&&ue>J.index*3)throw new Error("potential infinite loop, way more iterations than matches");return D+=se,se.length}const F=oe(O);if(!F)throw Xn(a.replace("{}",O)),new Error('Unknown language: "'+O+'"');const W=iv(F);let z="",$=ge||W;const Y={},H=new u.__emitter(u);v();let D="",ae=0,X=0,ue=0,fe=!1;try{if(F.__emitTokens)F.__emitTokens(Q,H);else{for($.matcher.considerAll();;){ue++,fe?fe=!1:$.matcher.considerAll(),$.matcher.lastIndex=X;const j=$.matcher.exec(Q);if(!j)break;const J=Q.substring(X,j.index),se=L(J,j);X=j.index+se}L(Q.substring(X))}return H.finalize(),z=H.toHTML(),{language:O,value:z,relevance:ae,illegal:!1,_emitter:H,_top:$}}catch(j){if(j.message&&j.message.includes("Illegal"))return{language:O,value:Ea(Q),illegal:!0,relevance:0,_illegalBy:{message:j.message,index:X,context:Q.slice(X-100,X+100),mode:j.mode,resultSoFar:z},_emitter:H};if(o)return{language:O,value:Ea(Q),illegal:!1,relevance:0,errorRaised:j,_emitter:H,_top:$};throw j}}function w(O){const Q={value:Ea(O),illegal:!1,relevance:0,_top:c,_emitter:new u.__emitter(u)};return Q._emitter.addText(O),Q}function I(O,Q){Q=Q||u.languages||Object.keys(t);const q=w(O),ge=Q.filter(oe).filter(he).map(Ye=>_(Ye,O,!1));ge.unshift(q);const xe=ge.sort((Ye,Be)=>{if(Ye.relevance!==Be.relevance)return Be.relevance-Ye.relevance;if(Ye.language&&Be.language){if(oe(Ye.language).supersetOf===Be.language)return 1;if(oe(Be.language).supersetOf===Ye.language)return-1}return 0}),[Ie,ve]=xe,rt=Ie;return rt.secondBest=ve,rt}function A(O,Q,q){const ge=Q&&n[Q]||q;O.classList.add("hljs"),O.classList.add(`language-${ge}`)}function P(O){let Q=null;const q=m(O);if(f(q))return;if(Ae("before:highlightElement",{el:O,language:q}),O.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",O);return}if(O.children.length>0&&(u.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(O)),u.throwUnescapedHTML))throw new lv("One of your code blocks includes unescaped HTML.",O.innerHTML);Q=O;const ge=Q.textContent,xe=q?h(ge,{language:q,ignoreIllegals:!0}):I(ge);O.innerHTML=xe.value,O.dataset.highlighted="yes",A(O,q,xe.language),O.result={language:xe.language,re:xe.relevance,relevance:xe.relevance},xe.secondBest&&(O.secondBest={language:xe.secondBest.language,relevance:xe.secondBest.relevance}),Ae("after:highlightElement",{el:O,result:xe,text:ge})}function U(O){u=_d(u,O)}const N=()=>{R(),hs("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function B(){R(),hs("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let l=!1;function R(){function O(){R()}if(document.readyState==="loading"){l||window.addEventListener("DOMContentLoaded",O,!1),l=!0;return}document.querySelectorAll(u.cssSelector).forEach(P)}function G(O,Q){let q=null;try{q=Q(e)}catch(ge){if(Xn("Language definition for '{}' could not be registered.".replace("{}",O)),o)Xn(ge);else throw ge;q=c}q.name||(q.name=O),t[O]=q,q.rawDefinition=Q.bind(null,e),q.aliases&&ne(q.aliases,{languageName:O})}function ee(O){delete t[O];for(const Q of Object.keys(n))n[Q]===O&&delete n[Q]}function re(){return Object.keys(t)}function oe(O){return O=(O||"").toLowerCase(),t[O]||t[n[O]]}function ne(O,{languageName:Q}){typeof O=="string"&&(O=[O]),O.forEach(q=>{n[q.toLowerCase()]=Q})}function he(O){const Q=oe(O);return Q&&!Q.disableAutodetect}function ke(O){O["before:highlightBlock"]&&!O["before:highlightElement"]&&(O["before:highlightElement"]=Q=>{O["before:highlightBlock"](Object.assign({block:Q.el},Q))}),O["after:highlightBlock"]&&!O["after:highlightElement"]&&(O["after:highlightElement"]=Q=>{O["after:highlightBlock"](Object.assign({block:Q.el},Q))})}function te(O){ke(O),i.push(O)}function we(O){const Q=i.indexOf(O);Q!==-1&&i.splice(Q,1)}function Ae(O,Q){const q=O;i.forEach(function(ge){ge[q]&&ge[q](Q)})}function He(O){return hs("10.7.0","highlightBlock will be removed entirely in v12.0"),hs("10.7.0","Please use highlightElement now."),P(O)}Object.assign(e,{highlight:h,highlightAuto:I,highlightAll:R,highlightElement:P,highlightBlock:He,configure:U,initHighlighting:N,initHighlightingOnLoad:B,registerLanguage:G,unregisterLanguage:ee,listLanguages:re,getLanguage:oe,registerAliases:ne,autoDetection:he,inherit:_d,addPlugin:te,removePlugin:we}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=av,e.regex={concat:ss,lookahead:dg,either:Ll,optional:x_,anyNumberOfTimes:w_};for(const O in Ii)typeof Ii[O]=="object"&&cg(Ii[O]);return Object.assign(e,Ii),e},Is=_g({});Is.newInstance=()=>_g({});var uv=Is;Is.HighlightJS=Is;Is.default=Is;const We=b_(uv),wd="[A-Za-z$_][0-9A-Za-z$_]*",dv=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],fv=["true","false","null","undefined","NaN","Infinity"],vg=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],wg=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],xg=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],gv=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],pv=[].concat(xg,vg,wg);function Ta(e){const t=e.regex,n=(q,{after:ge})=>{const xe="</"+q[0].slice(1);return q.input.indexOf(xe,ge)!==-1},i=wd,o={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,ge)=>{const xe=q[0].length+q.index,Ie=q.input[xe];if(Ie==="<"||Ie===","){ge.ignoreMatch();return}Ie===">"&&(n(q,{after:xe})||ge.ignoreMatch());let ve;const rt=q.input.substring(xe);if(ve=rt.match(/^\s*=/)){ge.ignoreMatch();return}if((ve=rt.match(/^\s+extends\s+/))&&ve.index===0){ge.ignoreMatch();return}}},u={$pattern:wd,keyword:dv,literal:fv,built_in:pv,"variable.language":gv},f="[0-9](_?[0-9])*",m=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",_={className:"number",variants:[{begin:`(\\b(${h})((${m})|\\.)?|(${m}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"css"}},P={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},U={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,w]},B={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,A,P,U,{match:/\$\d+/},_];w.contains=l.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(l)});const R=[].concat(B,w.contains),G=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(R)}]),ee={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:G},re={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},oe={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...vg,...wg]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},he={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[ee],illegal:/%/},ke={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(q){return t.concat("(?!",q.join("|"),")")}const we={match:t.concat(/\b/,te([...xg,"super","import"].map(q=>`${q}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Ae={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},He={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},ee]},O="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Q={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[ee]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:G,CLASS_REFERENCE:oe},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,A,P,U,B,{match:/\$\d+/},_,oe,{scope:"attr",match:i+t.lookahead(":"),relevance:0},Q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[B,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:G}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},he,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[ee,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ae,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[ee]},we,ke,re,He,{match:/\$[(.]/}]}}const to="[A-Za-z$_][0-9A-Za-z$_]*",Sg=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Eg=["true","false","null","undefined","NaN","Infinity"],Tg=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Ag=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Cg=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Ig=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Mg=[].concat(Cg,Tg,Ag);function hv(e){const t=e.regex,n=(q,{after:ge})=>{const xe="</"+q[0].slice(1);return q.input.indexOf(xe,ge)!==-1},i=to,o={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(q,ge)=>{const xe=q[0].length+q.index,Ie=q.input[xe];if(Ie==="<"||Ie===","){ge.ignoreMatch();return}Ie===">"&&(n(q,{after:xe})||ge.ignoreMatch());let ve;const rt=q.input.substring(xe);if(ve=rt.match(/^\s*=/)){ge.ignoreMatch();return}if((ve=rt.match(/^\s+extends\s+/))&&ve.index===0){ge.ignoreMatch();return}}},u={$pattern:to,keyword:Sg,literal:Eg,built_in:Mg,"variable.language":Ig},f="[0-9](_?[0-9])*",m=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",_={className:"number",variants:[{begin:`(\\b(${h})((${m})|\\.)?|(${m}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},w={className:"subst",begin:"\\$\\{",end:"\\}",keywords:u,contains:[]},I={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"xml"}},A={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"css"}},P={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,w],subLanguage:"graphql"}},U={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,w]},B={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:i+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},l=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,A,P,U,{match:/\$\d+/},_];w.contains=l.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(l)});const R=[].concat(B,w.contains),G=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:u,contains:["self"].concat(R)}]),ee={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:G},re={variants:[{match:[/class/,/\s+/,i,/\s+/,/extends/,/\s+/,t.concat(i,"(",t.concat(/\./,i),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,i],scope:{1:"keyword",3:"title.class"}}]},oe={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Tg,...Ag]}},ne={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},he={variants:[{match:[/function/,/\s+/,i,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[ee],illegal:/%/},ke={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function te(q){return t.concat("(?!",q.join("|"),")")}const we={match:t.concat(/\b/,te([...Cg,"super","import"].map(q=>`${q}\\s*\\(`)),i,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Ae={begin:t.concat(/\./,t.lookahead(t.concat(i,/(?![0-9A-Za-z$_(])/))),end:i,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},He={match:[/get|set/,/\s+/,i,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},ee]},O="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",Q={match:[/const|var|let/,/\s+/,i,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(O)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[ee]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:G,CLASS_REFERENCE:oe},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ne,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,I,A,P,U,B,{match:/\$\d+/},_,oe,{scope:"attr",match:i+t.lookahead(":"),relevance:0},Q,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[B,e.REGEXP_MODE,{className:"function",begin:O,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:G}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:a},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},he,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[ee,e.inherit(e.TITLE_MODE,{begin:i,className:"title.function"})]},{match:/\.\.\./,relevance:0},Ae,{match:"\\$"+i,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[ee]},we,ke,re,He,{match:/\$[(.]/}]}}function Aa(e){const t=e.regex,n=hv(e),i=to,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[n.exports.CLASS_REFERENCE]},u={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:to,keyword:Sg.concat(f),literal:Eg,built_in:Mg.concat(o),"variable.language":Ig},h={className:"meta",begin:"@"+i},_=(P,U,N)=>{const B=P.contains.findIndex(l=>l.label===U);if(B===-1)throw new Error("can not find mode to replace");P.contains.splice(B,1,N)};Object.assign(n.keywords,m),n.exports.PARAMS_CONTAINS.push(h);const w=n.contains.find(P=>P.scope==="attr"),I=Object.assign({},w,{match:t.concat(i,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,w,I]),n.contains=n.contains.concat([h,a,c,I]),_(n,"shebang",e.SHEBANG()),_(n,"use_strict",u);const A=n.contains.find(P=>P.label==="func.def");return A.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function xd(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},h={begin:/\{\{/,relevance:0},_={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,h,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,h,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},w="[0-9](_?[0-9])*",I=`(\\b(${w}))?\\.(${w})|\\b(${w})\\.`,A=`\\b|${i.join("|")}`,P={className:"number",relevance:0,variants:[{begin:`(\\b(${w})|(${I}))[eE][+-]?(${w})[jJ]?(?=${A})`},{begin:`(${I})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${A})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${A})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${A})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${A})`},{begin:`\\b(${w})[jJ](?=${A})`}]},U={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},N={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",f,P,_,e.HASH_COMMENT_MODE]}]};return m.contains=[_,P,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[f,P,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},_,U,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[N]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[P,N,_]}]}}function Ca(e){const t=e.regex,n={},i={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},i]});const o={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,o]};o.contains.push(u);const f={match:/\\"/},m={className:"string",begin:/'/,end:/'/},h={match:/\\'/},_={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},w=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],I=e.SHEBANG({binary:`(${w.join("|")})`,relevance:10}),A={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},P=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],U=["true","false"],N={match:/(\/[a-z._-]+)+/},B=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],l=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],R=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],G=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:P,literal:U,built_in:[...B,...l,"set","shopt",...R,...G]},contains:[I,e.SHEBANG(),A,_,a,c,N,u,f,m,h,n]}}function mv(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},i=["true","false","null"],o={scope:"literal",beginKeywords:i.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:i},contains:[t,n,e.QUOTE_STRING_MODE,o,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const bv=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),kv=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],yv=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],_v=[...kv,...yv],vv=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),wv=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),xv=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Sv=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Ev(e){const t=e.regex,n=bv(e),i={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},o="and or not only",a=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",u=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,i,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+wv.join("|")+")"},{begin:":(:)?("+xv.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Sv.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...u,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...u,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:vv.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...u,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+_v.join("|")+")\\b"}]}}function Ia(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),i=/[\p{L}0-9._:-]+/u,o={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(a,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:i,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[o]},{begin:/'/,end:/'/,contains:[o]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,f,u,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,c,f,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},o,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function Sd(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},i={begin:"^[-\\*]{3,}",end:"$"},o={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},_=e.inherit(m,{contains:[]}),w=e.inherit(h,{contains:[]});m.contains.push(w),h.contains.push(_);let I=[n,f];return[m,h,_,w].forEach(N=>{N.contains=N.contains.concat(I)}),I=I.concat(m,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:I},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:I}]}]},n,a,m,h,{className:"quote",begin:"^>\\s+",contains:I,end:"$"},o,i,f,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function Ed(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",i={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},o={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,o]},u=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),w={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},I={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},A={begin:/\{/,end:/\}/,contains:[I],illegal:"\\n",relevance:0},P={begin:"\\[",end:"\\]",contains:[I],illegal:"\\n",relevance:0},U=[i,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},w,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},A,P,a,c],N=[...U];return N.pop(),N.push(u),I.contains=N,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:U}}function Tv(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}const Av=(e,t)=>{const n=e.__vccOpts||e;for(const[i,o]of t)n[i]=o;return n},Cv=["disabled","aria-label","aria-expanded"],Iv=["aria-label"],Mv=["disabled","aria-selected","onClick"],Rv={__name:"NeoSelect",props:{modelValue:{default:""},options:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:"请选择"}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=e,i=t,o=Ke(null),a=Ke(null),c=Ke(!1),u=`neo-select-${Math.random().toString(36).slice(2,10)}`,f=be(()=>n.options.map((l,R)=>l&&typeof l=="object"&&!Array.isArray(l)?{value:Object.prototype.hasOwnProperty.call(l,"value")?l.value:l.label,label:String(l.label??l.value??""),disabled:l.disabled===!0,key:String(l.key??l.value??R)}:{value:l,label:String(l??""),disabled:!1,key:`${String(l)}-${R}`})),m=be(()=>f.value.find(l=>Object.is(l.value,n.modelValue))),h=be(()=>{var l;return((l=m.value)==null?void 0:l.label)||"请选择"});function _(){c.value=!1}async function w(l=!1){var re,oe;if(n.disabled||c.value)return;c.value=!0,await $t();const R=[...((re=a.value)==null?void 0:re.querySelectorAll("button:not(:disabled)"))||[]],ee=((oe=a.value)==null?void 0:oe.querySelector('button[aria-selected="true"]'))||(l?R.at(-1):R[0]);ee==null||ee.focus()}function I(){c.value?_():w()}function A(l){l.disabled||(_(),Object.is(l.value,n.modelValue)||(i("update:modelValue",l.value),i("change",l.value)),$t(()=>{var R,G;return(G=(R=o.value)==null?void 0:R.querySelector(".neo-select-trigger"))==null?void 0:G.focus()}))}function P(l){(l.key==="ArrowDown"||l.key==="ArrowUp")&&(l.preventDefault(),w(l.key==="ArrowUp")),l.key==="Escape"&&c.value&&(l.preventDefault(),l.stopPropagation(),_())}function U(l,R){var oe,ne;const G=[...((oe=a.value)==null?void 0:oe.querySelectorAll("button:not(:disabled)"))||[]];if(!G.length)return;const ee=G.indexOf(document.activeElement),re=R==="start"?0:R==="end"?G.length-1:(ee+R+G.length)%G.length;l.preventDefault(),(ne=G[re])==null||ne.focus()}function N(l){l.key==="ArrowDown"?U(l,1):l.key==="ArrowUp"?U(l,-1):l.key==="Home"?U(l,"start"):l.key==="End"?U(l,"end"):l.key==="Escape"?(l.preventDefault(),l.stopPropagation(),_(),$t(()=>{var R,G;return(G=(R=o.value)==null?void 0:R.querySelector(".neo-select-trigger"))==null?void 0:G.focus()})):l.key==="Tab"&&_()}function B(l){var R;c.value&&!((R=o.value)!=null&&R.contains(l.target))&&_()}return Ur(()=>document.addEventListener("pointerdown",B)),Fr(()=>document.removeEventListener("pointerdown",B)),(l,R)=>(k(),y("span",{ref_key:"root",ref:o,class:de(["neo-select",{open:c.value,disabled:e.disabled}])},[d("button",{type:"button",class:"neo-select-trigger",disabled:e.disabled,"aria-label":e.ariaLabel,"aria-haspopup":"listbox","aria-expanded":c.value,"aria-controls":u,onClick:I,onKeydown:P},[d("span",null,T(h.value),1)],40,Cv),c.value?(k(),y("span",{key:0,id:u,ref_key:"menu",ref:a,class:"neo-select-menu",role:"listbox","aria-label":e.ariaLabel,onKeydown:N},[(k(!0),y(ce,null,Te(f.value,G=>(k(),y("button",{key:G.key,type:"button",role:"option",disabled:G.disabled,class:de({selected:Object.is(G.value,e.modelValue)}),"aria-selected":Object.is(G.value,e.modelValue),onClick:ee=>A(G)},T(G.label),11,Mv))),128))],40,Iv)):V("",!0)],2))}},Mi=Av(Rv,[["__scopeId","data-v-6927f03a"]]),no=1,nl=2,Pl=3,$l=4,Bl=5,Ul=6,Fl=7,zl=8,so=9,ro=10,sl=11,Fi=12,mr=13,br=14,kr=15,yr=16,ys=17,rl=18,xt=19,Ar=20,Rn=21,Rg=22,Cr=23,io=24,Ns=25,Ng=26,il=27,zi=28,Hi=29,ln=30,Zt=31,Ri=101,Td=102,Lg=103,Ad=104,Ma=105,Es=1,Hl=2,Og=4,Dg=8,Pg=16;function Nv(e){switch(e){case Es:return"href";case Hl:return"src";case Og:return"class";case Dg:return"checked";case Pg:return"start"}}const Lv=e=>{switch(e){case 1:return Pl;case 2:return $l;case 3:return Bl;case 4:return Ul;case 5:return Fl;default:return zl}},Ov=Lv,Cd=24;function Dv(e){const t=new Uint32Array(Cd);return t[0]=no,{renderer:e,text:"",pending:"",tokens:t,len:0,token:no,fence_end:0,blockquote_idx:0,hr_char:"",hr_chars:0,fence_start:0,spaces:new Uint8Array(Cd),indent:"",indent_len:0,table_state:0}}function Id(e){e.pending.length>0&&nt(e,`
|
|
83
|
+
`)}function Le(e){e.text.length!==0&&(console.assert(e.len>0,"Never adding text to root"),e.renderer.add_text(e.renderer.data,e.text),e.text="")}function Qe(e){console.assert(e.len>0,"No nodes to end"),e.len-=1,e.token=e.tokens[e.len],e.renderer.end_token(e.renderer.data)}function De(e,t){(e.tokens[e.len]===io||e.tokens[e.len]===Cr)&&t!==Ns&&Qe(e),e.len+=1,e.tokens[e.len]=t,e.token=t,e.renderer.add_token(e.renderer.data,t)}function Pv(e,t,n){for(;n<=e.len;){if(e.tokens[n]===t)return n;n+=1}return-1}function Qn(e,t){for(e.fence_start=0;e.len>t;)Qe(e)}function Ni(e,t){let n=0;for(let i=0;i<=e.len&&(t-=e.spaces[i],!(t<0));i+=1)switch(e.tokens[i]){case so:case ro:case Ar:case Ns:n=i;break}for(;e.len>n;)Qe(e);return t}function Ra(e,t){let n=-1,i=-1;for(let o=e.blockquote_idx+1;o<=e.len;o+=1)if(e.tokens[o]===Ns){if(e.indent_len<e.spaces[o]){i=-1;break}i=o}else e.tokens[o]===t&&(n=o);return i===-1?n===-1?(Qn(e,e.blockquote_idx),De(e,t),!0):(Qn(e,n),!1):(Qn(e,i),De(e,t),!0)}function Na(e,t){De(e,Ns),e.spaces[e.len]=e.indent_len+t,cn(e),e.token=Lg}function cn(e){e.indent="",e.indent_len=0,e.pending=""}function ol(e){switch(e){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return!0;default:return!1}}function $v(e){switch(e){case 32:case 58:case 59:case 41:case 44:case 33:case 46:case 63:case 93:case 10:return!0;default:return!1}}function Bv(e){return ol(e)||$v(e)}function nt(e,t){for(const n of t){if(e.token===Ri){switch(n){case" ":e.indent_len+=1;continue;case" ":e.indent_len+=4;continue}let o=Ni(e,e.indent_len);e.indent_len=0,e.token=e.tokens[e.len],o>0&&nt(e," ".repeat(o))}const i=e.pending+n;switch(e.token){case Rn:case no:case Ar:case io:case Cr:switch(console.assert(e.text.length===0,"Root should not have any text"),e.pending[0]){case void 0:e.pending=n;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=1;continue;case" ":console.assert(e.pending.length===1),e.pending=n,e.indent+=" ",e.indent_len+=4;continue;case`
|
|
84
|
+
`:if(console.assert(e.pending.length===1),e.tokens[e.len]===Ns&&e.token===Rn){Qe(e),cn(e),e.pending=n;continue}Qn(e,e.blockquote_idx),cn(e),e.blockquote_idx=0,e.fence_start=0,e.pending=n;continue;case"#":switch(n){case"#":if(e.pending.length<6){e.pending=i;continue}break;case" ":Ni(e,e.indent_len),De(e,Ov(e.pending.length)),cn(e);continue}break;case">":{const a=Pv(e,Ar,e.blockquote_idx+1);a===-1?(Qn(e,e.blockquote_idx),e.blockquote_idx+=1,e.fence_start=0,De(e,Ar)):e.blockquote_idx=a,cn(e),e.pending=n;continue}case"-":case"*":case"_":if(e.hr_chars===0&&(console.assert(e.pending.length===1,"Pending should be one character"),e.hr_chars=1,e.hr_char=e.pending),e.hr_chars>0){switch(n){case e.hr_char:e.hr_chars+=1,e.pending=i;continue;case" ":e.pending=i;continue;case`
|
|
85
|
+
`:if(e.hr_chars<3)break;Ni(e,e.indent_len),e.renderer.add_token(e.renderer.data,Rg),e.renderer.end_token(e.renderer.data),cn(e),e.hr_chars=0;continue}e.hr_chars=0}if(e.pending[0]!=="_"&&e.pending[1]===" "){Ra(e,Cr),Na(e,2),nt(e,i.slice(2));continue}break;case"`":if(e.pending.length<3){if(n==="`"){e.pending=i,e.fence_start=i.length;continue}e.fence_start=0;break}switch(n){case"`":e.pending.length===e.fence_start?(e.pending=i,e.fence_start=i.length):(De(e,nl),cn(e),e.fence_start=0,nt(e,i));continue;case`
|
|
86
|
+
`:{Ni(e,e.indent_len),De(e,ro),e.pending.length>e.fence_start&&e.renderer.set_attr(e.renderer.data,Og,e.pending.slice(e.fence_start)),cn(e),e.token=Ri;continue}default:e.pending=i;continue}case"+":if(n!==" ")break;Ra(e,Cr),Na(e,2);continue;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":if(e.pending[e.pending.length-1]==="."){if(n!==" ")break;Ra(e,io)&&e.pending!=="1."&&e.renderer.set_attr(e.renderer.data,Pg,e.pending.slice(0,-1)),Na(e,e.pending.length+1);continue}else{const a=n.charCodeAt(0);if(a===46||ol(a)){e.pending=i;continue}}break;case"|":Qn(e,e.blockquote_idx),De(e,il),De(e,zi),e.pending="",nt(e,n);continue}let o=i;if(e.token===Rn)e.token=e.tokens[e.len],e.renderer.add_token(e.renderer.data,Rn),e.renderer.end_token(e.renderer.data);else if(e.indent_len>=4){let a=0;for(;a<4;a+=1)if(e.indent[a]===" "){a=a+1;break}o=e.indent.slice(a)+i,De(e,so)}else De(e,nl);cn(e),nt(e,o);continue;case il:if(e.table_state===1)switch(n){case"-":case" ":case"|":case":":e.pending=i;continue;case`
|
|
87
|
+
`:e.table_state=2,e.pending="";continue;default:Qe(e),e.table_state=0;break}else switch(e.pending){case"|":De(e,zi),e.pending="",nt(e,n);continue;case`
|
|
88
|
+
`:Qe(e),e.pending="",e.table_state=0,nt(e,n);continue}break;case zi:switch(e.pending){case"":break;case"|":De(e,Hi),Qe(e),e.pending="",nt(e,n);continue;case`
|
|
89
|
+
`:Qe(e),e.table_state=Math.min(e.table_state+1,2),e.pending="",nt(e,n);continue;default:De(e,Hi),nt(e,n);continue}break;case Hi:if(e.pending==="|"){Le(e),Qe(e),e.pending="",nt(e,n);continue}break;case so:switch(i){case`
|
|
90
|
+
`:case`
|
|
91
|
+
`:case`
|
|
92
|
+
`:case`
|
|
93
|
+
`:case`
|
|
94
|
+
`:e.text+=`
|
|
95
|
+
`,e.pending="";continue;case`
|
|
96
|
+
`:case`
|
|
97
|
+
`:case`
|
|
98
|
+
`:case`
|
|
99
|
+
`:e.pending=i;continue;default:e.pending.length!==0?(Le(e),Qe(e),e.pending=n):e.text+=n;continue}case ro:switch(n){case"`":e.pending=i;continue;case`
|
|
100
|
+
`:if(i.length===e.fence_start+e.fence_end+1){Le(e),Qe(e),e.pending="",e.fence_start=0,e.fence_end=0,e.token=Ri;continue}e.token=Ri;break;case" ":if(e.pending[0]===`
|
|
101
|
+
`){e.pending=i,e.fence_end+=1;continue}break}e.text+=e.pending,e.pending=n,e.fence_end=1;continue;case sl:switch(n){case"`":i.length===e.fence_start+ +(e.pending[0]===" ")?(Le(e),Qe(e),e.pending="",e.fence_start=0):e.pending=i;continue;case`
|
|
102
|
+
`:e.text+=e.pending,e.pending="",e.token=Rn,e.blockquote_idx=0,Le(e);continue;case" ":e.text+=e.pending,e.pending=n;continue;default:e.text+=i,e.pending="";continue}case Lg:switch(e.pending.length){case 0:if(n!=="[")break;e.pending=i;continue;case 1:if(n!==" "&&n!=="x")break;e.pending=i;continue;case 2:if(n!=="]")break;e.pending=i;continue;case 3:if(n!==" ")break;e.renderer.add_token(e.renderer.data,Ng),e.pending[1]==="x"&&e.renderer.set_attr(e.renderer.data,Dg,""),e.renderer.end_token(e.renderer.data),e.pending=" ";continue}e.token=e.tokens[e.len],e.pending="",nt(e,i);continue;case br:case kr:{let a="*",c=Fi;if(e.token===kr&&(a="_",c=mr),a===e.pending){if(Le(e),a===n){Qe(e),e.pending="";continue}De(e,c),e.pending=n;continue}break}case Fi:case mr:{let a="*",c=br;switch(e.token===mr&&(a="_",c=kr),e.pending){case a:a===n?e.tokens[e.len-1]===c?e.pending=i:(Le(e),De(e,c),e.pending=""):(Le(e),Qe(e),e.pending=n);continue;case a+a:const u=e.token;Le(e),Qe(e),Qe(e),a!==n?(De(e,u),e.pending=n):e.pending="";continue}break}case yr:if(i==="~~"){Le(e),Qe(e),e.pending="";continue}break;case Ma:n===`
|
|
103
|
+
`?(Le(e),De(e,ln),e.pending=""):(e.token=e.tokens[e.len],e.pending[0]==="\\"?e.text+="[":e.text+="$$",e.pending="",nt(e,n));continue;case ln:if(i==="\\]"||i==="$$"){Le(e),Qe(e),e.pending="";continue}break;case Zt:if(i==="\\)"||e.pending[0]==="$"){Le(e),Qe(e),n===")"?e.pending="":e.pending=n;continue}break;case Td:i==="http://"||i==="https://"?(Le(e),De(e,rl),e.pending=i,e.text=i):"http:/"[e.pending.length]===n||"https:/"[e.pending.length]===n?e.pending=i:(e.token=e.tokens[e.len],nt(e,n));continue;case ys:case xt:if(e.pending==="]"){Le(e),n==="("?e.pending=i:(Qe(e),e.pending=n);continue}if(e.pending[0]==="]"&&e.pending[1]==="("){if(n===")"){const a=e.token===ys?Es:Hl,c=e.pending.slice(2);e.renderer.set_attr(e.renderer.data,a,c),Qe(e),e.pending=""}else e.pending+=n;continue}break;case rl:n===" "||n===`
|
|
104
|
+
`||n==="\\"?(e.renderer.set_attr(e.renderer.data,Es,e.pending),Le(e),Qe(e),e.pending=n):(e.text+=n,e.pending=i);continue;case Ad:if(i.startsWith("<br")){if(i.length===3||n===" "||n==="/"&&(i.length===4||e.pending[e.pending.length-1]===" ")){e.pending=i;continue}if(n===">"){Le(e),e.token=e.tokens[e.len],e.renderer.add_token(e.renderer.data,Rn),e.renderer.end_token(e.renderer.data),e.pending="";continue}}e.token=e.tokens[e.len],e.text+="<",e.pending=e.pending.slice(1),nt(e,n);continue}switch(e.pending[0]){case"\\":if(e.token===xt||e.token===ln||e.token===Zt)break;switch(n){case"(":Le(e),De(e,Zt),e.pending="";continue;case"[":e.token=Ma,e.pending=i;continue;case`
|
|
105
|
+
`:e.pending=n;continue;default:let o=n.charCodeAt(0);e.pending="",e.text+=ol(o)||o>=65&&o<=90||o>=97&&o<=122?i:n;continue}case`
|
|
106
|
+
`:switch(e.token){case xt:case ln:case Zt:break;case Pl:case $l:case Bl:case Ul:case Fl:case zl:Le(e),Qn(e,e.blockquote_idx),e.blockquote_idx=0,e.pending=n;continue;default:Le(e),e.pending=n,e.token=Rn,e.blockquote_idx=0;continue}break;case"<":if(e.token!==xt&&e.token!==ln&&e.token!==Zt){Le(e),e.pending=i,e.token=Ad;continue}break;case"`":if(e.token===xt)break;n==="`"?(e.fence_start+=1,e.pending=i):(e.fence_start+=1,Le(e),De(e,sl),e.text=n===" "||n===`
|
|
107
|
+
`?"":n,e.pending="");continue;case"_":case"*":{if(e.token===xt||e.token===ln||e.token===Zt||e.token===br)break;let o=Fi,a=br;const c=e.pending[0];if(c==="_"&&(o=mr,a=kr),e.pending.length===1){if(c===n){e.pending=i;continue}if(n!==" "&&n!==`
|
|
108
|
+
`){Le(e),De(e,o),e.pending=n;continue}}else{if(c===n){Le(e),De(e,a),De(e,o),e.pending="";continue}if(n!==" "&&n!==`
|
|
109
|
+
`){Le(e),De(e,a),e.pending=n;continue}}break}case"~":if(e.token!==xt&&e.token!==yr){if(e.pending==="~"){if(n==="~"){e.pending=i;continue}}else if(n!==" "&&n!==`
|
|
110
|
+
`){Le(e),De(e,yr),e.pending=n;continue}}break;case"$":if(e.token!==xt&&e.token!==yr&&e.pending==="$")if(n==="$"){e.token=Ma,e.pending=i;continue}else{if(Bv(n.charCodeAt(0)))break;Le(e),De(e,Zt),e.pending=n;continue}break;case"[":if(e.token!==xt&&e.token!==ys&&e.token!==ln&&e.token!==Zt&&n!=="]"){Le(e),De(e,ys),e.pending=n;continue}break;case"!":if(e.token!==xt&&n==="["){Le(e),De(e,xt),e.pending="";continue}break;case" ":if(e.pending.length===1&&n===" ")continue;break}if(e.token!==xt&&e.token!==ys&&e.token!==ln&&e.token!==Zt&&n==="h"&&(e.pending===" "||e.pending==="")){e.text+=e.pending,e.pending=n,e.token=Td;continue}e.text+=e.pending,e.pending=n}Le(e)}function Uv(e){return{add_token:Fv,end_token:zv,add_text:Hv,set_attr:$g,data:{nodes:[e,,,,,],index:0}}}function Fv(e,t){var o;let n=e.nodes[e.index],i;switch(t){case no:return;case Ar:i=document.createElement("blockquote");break;case nl:i=document.createElement("p");break;case Rn:i=document.createElement("br");break;case Rg:i=document.createElement("hr");break;case Pl:i=document.createElement("h1");break;case $l:i=document.createElement("h2");break;case Bl:i=document.createElement("h3");break;case Ul:i=document.createElement("h4");break;case Fl:i=document.createElement("h5");break;case zl:i=document.createElement("h6");break;case Fi:case mr:i=document.createElement("em");break;case br:case kr:i=document.createElement("strong");break;case yr:i=document.createElement("s");break;case sl:i=document.createElement("code");break;case rl:case ys:i=document.createElement("a");break;case xt:i=document.createElement("img");break;case Cr:i=document.createElement("ul");break;case io:i=document.createElement("ol");break;case Ns:i=document.createElement("li");break;case Ng:let a=i=document.createElement("input");a.type="checkbox",a.disabled=!0;break;case so:case ro:n=n.appendChild(document.createElement("pre")),i=document.createElement("code");break;case il:i=document.createElement("table");break;case zi:switch(n.children.length){case 0:n=n.appendChild(document.createElement("thead"));break;case 1:n=n.appendChild(document.createElement("tbody"));break;default:n=n.children[1]}i=document.createElement("tr");break;case Hi:i=document.createElement(((o=n.parentElement)==null?void 0:o.tagName)==="THEAD"?"th":"td");break;case ln:i=document.createElement("equation-block");break;case Zt:i=document.createElement("equation-inline");break}e.nodes[++e.index]=n.appendChild(i)}function zv(e){e.index-=1}function Hv(e,t){e.nodes[e.index].appendChild(document.createTextNode(t))}function $g(e,t,n){e.nodes[e.index].setAttribute(Nv(t),n)}const jv={__name:"StreamingMarkdown",props:{text:{type:String,default:""},exposedResources:{type:Array,default:()=>[]}},setup(e){const t=e,n=Ke(null);let i,o="",a="",c;function u(){c&&clearTimeout(c),c=void 0}function f(){u(),c=setTimeout(()=>{c=void 0,i!=null&&i.pending&&o&&A(`${o}
|
|
111
|
+
`,o)},80)}function m(P){const U=String(P||"").trim();return U?/^(?:https?:|mailto:|\/|#)/i.test(U)?!0:!/^[a-z][a-z\d+.-]*:/i.test(U):!1}function h(P){const U=String(P||"").trim();return t.exposedResources.find(N=>String((N==null?void 0:N.reference)||"").trim()===U)}function _(P){const U=Number(P);if(!Number.isFinite(U)||U<=0)return"";const N=["B","KB","MB","GB"];let B=U,l=0;for(;B>=1024&&l<N.length-1;)B/=1024,l+=1;return`${B>=10||l===0?Math.round(B):B.toFixed(1)}${N[l]}`}function w(P){return{...Uv(P),set_attr(N,B,l){const R=B===Es?h(l):void 0,G=(R==null?void 0:R.url)||l;if(!((B===Es||B===Hl)&&!m(G))&&($g(N,B,G),B===Es)){const ee=N.nodes[N.index];if(R){if(ee.classList.add("inline-resource-link",`inline-resource-${R.kind||"link"}`),R.kind==="download"||R.downloadName){ee.setAttribute("download",R.downloadName||R.label||""),ee.setAttribute("title",`下载 ${R.label||R.downloadName||"资源"}`),ee.removeAttribute("target"),ee.removeAttribute("rel"),ee.dataset.resourceDownload="true",ee.dataset.resourceExpiresAt=String(Number(R.expiresAt)||0);const re=_(R.sizeBytes);re&&(ee.dataset.resourceSize=`(${re})`)}}else ee.setAttribute("target","_blank"),ee.setAttribute("rel","noreferrer noopener")}}}}function I(P){if(!i)return;const U=String(P||"");if(u(),!U.startsWith(o)||a!==o){A(U),f();return}const N=U.slice(o.length);o=U,a=U,N&&nt(i,N),f()}function A(P=t.text,U=P){const N=n.value;N&&(i&&Id(i),N.replaceChildren(),i=Dv(w(N)),a=String(P||""),o=String(U||""),a&&nt(i,a))}return Ur(()=>{A(),f()}),ot(()=>t.text,I,{flush:"post"}),ot(()=>t.exposedResources,()=>A(),{deep:!0,flush:"post"}),Fr(()=>{u(),i&&Id(i),i=void 0}),(P,U)=>(k(),y("div",{ref_key:"root",ref:n,class:"streaming-markdown-content"},null,512))}},Wv=["onDblclick"],Kv=["aria-label","onClick"],Vv=["title","onClick"],Gv=["aria-label","onClick"],qv=Object.assign({name:"CwdTreeNode"},{__name:"CwdTreeNode",props:{nodes:{type:Array,default:()=>[]},children:{type:Object,default:()=>({})},expanded:{type:Object,default:()=>({})},selectedPath:{type:String,default:""},level:{type:Number,default:0},allowDelete:{type:Boolean,default:!0}},emits:["toggle","select","delete"],setup(e,{emit:t}){const n=t;return(i,o)=>{const a=Db("CwdTreeNode",!0);return k(!0),y(ce,null,Te(e.nodes,c=>(k(),y("div",{key:c.path,class:"cwd-tree-branch"},[d("div",{class:de(["cwd-tree-row",{selected:e.selectedPath===c.path}]),style:It({"--cwd-tree-level":e.level}),onDblclick:u=>n("toggle",c)},[d("button",{type:"button",class:"cwd-tree-toggle","aria-label":e.expanded[c.path]?"收起":"展开",onClick:tt(u=>n("toggle",c),["stop"])},T(e.expanded[c.path]?"▾":"▸"),9,Kv),d("button",{type:"button",class:"cwd-tree-name",title:c.path,onClick:u=>n("select",c)},[o[3]||(o[3]=d("span",{"aria-hidden":"true"},"◇",-1)),d("strong",null,T(c.name),1)],8,Vv),e.allowDelete?(k(),y("button",{key:0,type:"button",class:"cwd-tree-delete","aria-label":`删除 ${c.name}`,onClick:tt(u=>n("delete",c),["stop"])},"×",8,Gv)):V("",!0)],46,Wv),e.expanded[c.path]&&e.children[c.path]?(k(),ht(a,{key:0,nodes:e.children[c.path],children:e.children,expanded:e.expanded,"selected-path":e.selectedPath,level:e.level+1,onToggle:o[0]||(o[0]=u=>n("toggle",u)),onSelect:o[1]||(o[1]=u=>n("select",u)),onDelete:o[2]||(o[2]=u=>n("delete",u))},null,8,["nodes","children","expanded","selected-path","level"])):V("",!0)]))),128)}}}),Bg=e=>["completed","failed","killed"].includes(e==null?void 0:e.status);function Md(e){var n,i;return Bg(e)?String(((n=e==null?void 0:e.result)==null?void 0:n.content)||(e==null?void 0:e.error)||"")+((i=e==null?void 0:e.result)!=null&&i.truncated||e!=null&&e.errorTruncated?`
|
|
112
|
+
…(预览已截断,完整结果请用 subagent_output;历史详情用 subagent_get detail=true)`:""):""}function Rd(e){return{queued:Number.isFinite(e==null?void 0:e.pendingMessageCount)?e.pendingMessageCount:"未提供",delivered:Number.isFinite(e==null?void 0:e.deliveredRetainedThisRun)?e.deliveredRetainedThisRun:"未提供"}}function Zv(e){return Bg(e)&&Number(e==null?void 0:e.pendingMessageCount)>0}function Nd(e){return(Array.isArray(e==null?void 0:e.runHistory)?e.runHistory:[]).filter(t=>Number(t.runGeneration)<Number((e==null?void 0:e.runGeneration)||1)).slice(-3).reverse()}function Qv(e){var i,o;if(!String((e==null?void 0:e.toolName)||"").startsWith("subagent_"))return;if(e!=null&&e.live)return{key:"running",label:"调用中"};if((e==null?void 0:e.titleStatus)==="failure"||(e==null?void 0:e.kind)==="error")return{key:"failed",label:"调用失败"};const t=(o=(((i=e==null?void 0:e.toolDisplay)==null?void 0:i.facts)||[]).find(a=>a.label==="任务状态"))==null?void 0:o.value,n={pending:"排队中",running:"运行中",completed:"已完成",failed:"失败",killed:"已停止",queued:"已入队",queued_for_resume:"待续跑",resumed:"已启动续跑",incomplete:"未完成"};return n[t]?{key:["failed","incomplete"].includes(t)?"failed":["running","pending","queued","queued_for_resume","resumed"].includes(t)?"running":t==="killed"?"stopped":"completed",label:n[t]}:{key:"unknown",label:"调用完成 / 状态未知"}}const Yv={class:"shell"},Jv={class:"sidebar"},Xv={class:"brand-row logo-only"},e0=["aria-label","aria-pressed","title"],t0={class:"nav"},n0=["title"],s0={class:"session-entry-main"},r0={key:0,"aria-hidden":"true"},i0={class:"sidebar-card prompt-stack"},o0={class:"prompt-stack-head"},a0={class:"prompt-list"},l0={key:0,class:"prompt-list-empty"},c0={key:1,class:"prompt-list-empty"},u0=["onDragstart","onDblclick"],d0={class:"prompt-card-body"},f0={class:"prompt-card-actions"},g0=["onClick"],p0=["onClick"],h0={class:"workspace"},m0={class:"topbar"},b0={class:"top-actions"},k0=["aria-label","aria-pressed","title"],y0={key:0,class:"content-grid chat-grid"},_0={class:"chat-panel"},v0={key:0,class:"runtime-context-bar"},w0={key:0,class:"runtime-context-bar-actions"},x0={key:2,class:"runtime-context-syncing"},S0={key:1,class:"runtime-context-bar project-context-bar"},E0={class:"runtime-context-bar-actions"},T0=["data-index"],A0={class:"tool-group-shell"},C0=["aria-expanded","onClick"],I0={class:"tool-group-label"},M0={class:"tool-group-label-name"},R0={key:0,class:"tool-group-label-count"},N0={key:1,class:"tool-group-label-separator"},L0={key:1,class:"tool-group-lines"},O0=["open"],D0={class:"reasoning-reveal"},P0={class:"reasoning-paper"},$0=["innerHTML"],B0={class:"compaction-context-actions"},U0={key:0},F0=["onClick"],z0={class:"tool-result-title-row"},H0={class:"tool-result-name"},j0={key:0,class:"tool-result-failure-mark","aria-label":"执行失败"},W0={class:"tool-result-detail-row"},K0={key:0,class:"tool-result-primary"},V0={key:1,class:"tool-group-shell"},G0=["aria-expanded","onClick"],q0={class:"tool-group-label"},Z0={class:"tool-group-label-name"},Q0={key:0,class:"tool-group-label-count"},Y0={key:1,class:"tool-group-label-separator"},J0={key:0,class:"tool-group-purposes"},X0={key:2,class:"tool-result-primary"},ew={key:0},tw={key:3,class:"tool-result-previews"},nw={class:"tool-result-preview kind-list"},sw={tabindex:"0"},rw={key:4,class:"tool-result-previews"},iw={class:"tool-result-preview kind-code"},ow={tabindex:"0"},aw={key:5,class:"tool-result-previews"},lw={key:0},cw={tabindex:"0"},uw={key:6,class:"tool-result-facts"},dw={key:3},fw={class:"message-head"},gw=["innerHTML"],pw={key:0,class:"message-body compaction-message-body"},hw={class:"compaction-context-actions"},mw={key:0},bw=["onClick"],kw={key:1,class:"message-body reasoning-body"},yw=["open"],_w={key:0,class:"reasoning-elapsed"},vw={class:"reasoning-reveal"},ww={class:"reasoning-paper"},xw=["innerHTML"],Sw={key:2,class:"message-body"},Ew={key:0,class:"message-head"},Tw={key:0},Aw={key:1,class:"elapsed-pill"},Cw={key:1,class:"image2-result-shell"},Iw=["innerHTML"],Mw={key:0,class:"message-image-attachments image2-output-images"},Rw=["data-preview-src","aria-label"],Nw=["src","alt"],Lw={key:1,class:"image-unavailable-placeholder",role:"status"},Ow={class:"image-card-actions"},Dw=["href","download"],Pw=["onClick"],$w=["onClick"],Bw={class:"tool-result-title-row"},Uw={class:"tool-result-name"},Fw={key:0,class:"tool-result-failure-mark","aria-label":"执行失败"},zw={class:"tool-result-detail-row"},Hw={key:0,class:"tool-result-primary"},jw={key:1,class:"tool-group-shell"},Ww=["aria-expanded","onClick"],Kw={class:"tool-group-label"},Vw={class:"tool-group-label-name"},Gw={key:0,class:"tool-group-label-count"},qw={key:1,class:"tool-group-label-separator"},Zw={key:0,class:"tool-group-purposes"},Qw={key:2,class:"tool-result-primary"},Yw={key:0},Jw={key:3,class:"tool-result-previews"},Xw={class:"tool-result-preview kind-list"},ex={tabindex:"0"},tx={key:4,class:"tool-result-previews"},nx={class:"tool-result-preview kind-code"},sx={tabindex:"0"},rx={key:5,class:"tool-result-previews"},ix={key:0},ox={tabindex:"0"},ax={key:6,class:"tool-result-facts"},lx={class:"plugin-resource-stack"},cx=["src","title"],ux=["innerHTML"],dx={key:1,class:"message-text markdown streaming-markdown"},fx=["innerHTML"],gx={key:0,class:"message-image-attachments"},px=["data-preview-src","aria-label"],hx=["src","alt"],mx={key:1,class:"image-unavailable-placeholder",role:"status"},bx=["href","download"],kx={key:2,class:"message-loading",role:"status","aria-live":"polite"},yx={class:"message-loading-body"},_x={class:"message-loading-label"},vx={key:0,class:"queued"},wx={key:0,class:"composer-app-prompt"},xx={key:1,class:"attachments file-attachments"},Sx=["onClick"],Ex={key:2,class:"attachments image-attachments"},Tx=["src","alt"],Ax=["onClick"],Cx=["title"],Ix={class:"mobile-session-options"},Mx={class:"mobile-session-options-body"},Rx={class:"mobile-session-actions"},Nx=["aria-pressed"],Lx=["disabled"],Ox={class:"mobile-runtime-info"},Dx={class:"mobile-runtime-grid"},Px={key:1,class:"mobile-runtime-card"},$x={key:2,class:"mobile-runtime-card"},Bx={class:"mobile-runtime-card"},Ux={class:"composer-footer"},Fx={class:"composer-metrics","aria-label":"运行状态指标"},zx={class:"metric-chip model-chip"},Hx=["aria-pressed","title"],jx={class:"compress-wrap"},Wx=["disabled"],Kx=["disabled"],Vx=["type","disabled","aria-label"],Gx={class:"right-panel"},qx={class:"background-task-section"},Zx={class:"background-task-head"},Qx={key:0,class:"background-task-count"},Yx={key:0,class:"empty-mini"},Jx=["title"],Xx={key:0,class:"background-task-more"},e1={key:2},t1=["onClick"],n1={key:0,class:"quota-card"},s1={class:"quota-card-head"},r1={class:"quota-card-controls"},i1=["aria-valuenow"],o1={class:"quota-card-foot"},a1={class:"quota-card-update"},l1={class:"quota-card memory-card"},c1={class:"memory-card-head"},u1={class:"memory-trend",viewBox:"0 0 260 44",preserveAspectRatio:"none",role:"img","aria-label":"最近一小时 RSS 趋势"},d1=["d"],f1=["cx","cy","r","onFocus"],g1={key:1,class:"memory-trend-empty"},p1={class:"memory-stats"},h1={class:"memory-card-foot"},m1={key:1,class:"content-grid single"},b1={class:"panel-page sessions-page"},k1={class:"session-toolbar"},y1={class:"session-search","aria-label":"搜索会话"},_1={class:"session-count"},v1={key:0,class:"empty-state"},w1={key:1,class:"empty-state"},x1={key:2,class:"empty-state"},S1={key:3,class:"session-list"},E1={class:"session-card-main"},T1={class:"session-card-title"},A1={key:0,class:"current-pill"},C1={key:1,class:"live-pill"},I1={class:"session-card-meta"},M1=["title"],R1=["datetime"],N1={class:"session-actions"},L1=["disabled","onClick"],O1=["disabled","onClick"],D1={key:4,class:"session-pagination","aria-label":"会话分页"},P1=["disabled"],$1=["aria-current","onClick"],B1=["disabled"],U1={key:2,class:"content-grid single"},F1={class:"panel-page prompt-page"},z1={class:"page-head"},H1={class:"page-head-actions"},j1={class:"prompt-workbench"},W1={class:"prompt-library-panel"},K1={class:"prompt-library-head"},V1={class:"prompt-library-list"},G1={key:0,class:"prompt-list-empty"},q1={key:1,class:"prompt-list-empty"},Z1=["onClick","onDblclick","onDragstart","onDragover","onDrop"],Q1={key:0},Y1={class:"prompt-editor-panel"},J1={class:"prompt-editor-toolbar"},X1={class:"prompt-editor-current"},eS={class:"prompt-editor-toolbar-actions"},tS=["disabled"],nS=["disabled"],sS={class:"prompt-editor-grid"},rS={class:"prompt-editor-field"},iS={class:"prompt-editor-field prompt-editor-field-full"},oS={class:"prompt-editor-field prompt-editor-field-full"},aS={key:3,class:"content-grid single"},lS={class:"panel-page settings-page"},cS={class:"page-head settings-page-head"},uS=["disabled"],dS={key:0,class:"empty-state"},fS={class:"settings-card"},gS={class:"settings-field-grid"},pS={class:"settings-field"},hS={key:0,class:"settings-required","aria-label":"必填"},mS=["onUpdate:modelValue","type","placeholder"],bS={class:"settings-card"},kS={class:"settings-field-grid"},yS={class:"settings-field"},_S={class:"settings-field"},vS={class:"settings-card settings-plugin-card"},wS={class:"settings-card-head"},xS=["disabled"],SS={class:"plugin-settings-list"},ES={class:"plugin-toggle"},TS=["onUpdate:modelValue","aria-label"],AS={class:"settings-card settings-plugin-card"},CS={class:"settings-card-head"},IS=["disabled"],MS={class:"plugin-settings-list"},RS={class:"plugin-toggle"},NS=["onUpdate:modelValue","disabled","aria-label"],LS={key:4,class:"content-grid single"},OS={class:"panel-page"},DS={class:"capability-grid"},PS={key:0,class:"toast"},$S=["title","onKeydown"],BS={class:"cwd-picker-modal",role:"dialog","aria-modal":"true","aria-label":"选择工作目录"},US=["disabled"],FS=["disabled"],zS={class:"cwd-picker-shortcuts"},HS={class:"cwd-picker-browser"},jS={class:"cwd-picker-locations","aria-label":"常用位置"},WS=["title","onClick"],KS={"aria-hidden":"true"},VS={class:"cwd-picker-tree"},GS={key:0,class:"cwd-picker-empty"},qS={key:1,class:"cwd-picker-error"},ZS={class:"cwd-picker-actions"},QS=["disabled"],YS={class:"runtime-context-modal",role:"dialog","aria-modal":"true","aria-label":"项目上下文"},JS={class:"runtime-context-modal-head"},XS={key:0,class:"runtime-context-kicker"},eE=["aria-label"],tE={class:"runtime-context-modal-content"},nE={key:0,class:"runtime-context-index"},sE=["onClick"],rE={key:1,class:"project-context-document"},iE=["aria-label"],oE={class:"confirm-dialog-content"},aE={class:"confirm-dialog-actions"},lE={class:"context-window-modal",role:"dialog","aria-modal":"true","aria-label":"调整上下文窗口"},cE={class:"context-window-input-wrap"},uE={key:0,class:"context-window-error",role:"alert"},dE={class:"context-window-actions"},fE=["disabled"],gE=["disabled"],pE=["aria-label"],hE={class:"image-preview-canvas"},mE=["src","alt"],bE={key:0,class:"image-preview-caption"},kE={class:"runtime-context-detail-modal compaction-detail-modal",role:"dialog","aria-modal":"true","aria-label":"压缩上下文详情"},yE={class:"runtime-context-detail-content compaction-detail-content"},_E={class:"compaction-detail-stats"},vE={class:"runtime-context-modal",role:"dialog","aria-modal":"true","aria-label":"运行上下文"},wE={class:"runtime-context-modal-head"},xE={class:"runtime-context-modal-content"},SE={key:0,class:"runtime-context-index"},EE=["onClick"],TE={key:1,class:"runtime-plugin-list"},AE={key:0,class:"runtime-context-empty"},CE={class:"runtime-tool-status"},IE=["disabled","onClick"],ME={key:2,class:"runtime-plugin-list"},RE={key:0,class:"runtime-context-empty"},NE=["aria-label"],LE={class:"runtime-context-modal-head"},OE={key:0,class:"runtime-context-kicker"},DE={class:"runtime-context-detail-content"},PE={key:0},$E={key:1},BE={class:"tool-result-modal background-task-modal",role:"dialog","aria-modal":"true","aria-label":"后台任务"},UE={class:"tool-result-modal-head"},FE={class:"tool-result-modal-title"},zE={class:"background-task-modal-count"},HE={key:0,class:"background-task-index","aria-label":"后台任务列表"},jE=["title","onClick"],WE={class:"background-task-detail"},KE={class:"background-task-detail-head"},VE={class:"background-task-detail-title"},GE={class:"background-task-meta"},qE={key:0},ZE={key:1},QE={key:2},YE={key:3},JE={key:4},XE={key:5},eT={key:6},tT={key:7},nT={key:8,class:"wide"},sT={key:9,class:"wide"},rT={key:0,class:"background-task-command-section"},iT={class:"background-task-command"},oT={key:1,class:"background-task-output-section"},aT={class:"background-task-output-head"},lT={key:0,"aria-label":"实时更新"},cT={key:2,class:"background-task-output-section"},uT={class:"background-task-output-head"},dT={key:0,"aria-label":"实时更新"},fT={key:0,class:"background-task-activity"},gT={key:1,class:"background-task-activity"},pT={key:3,class:"background-task-output-section"},hT={key:0},mT={class:"background-task-output-head"},bT={class:"background-task-activity"},kT={key:1},yT={class:"background-task-activity"},_T=["aria-label"],vT={class:"tool-result-modal-head"},wT={class:"tool-result-modal-title"},xT={key:0},ST={class:"tool-result-modal-content"},ET=["innerHTML"],TT=2048,AT=18e5,La=.62,Oa=10,CT="System hint: if the user is asking you to draw, render, create, generate, or illustrate a new image, you must call the image2 tool with mode=generate instead of replying with text-only description. After the tool returns images, continue the response normally so the UI can display them in the conversation.",IT="System hint: the user attached an image. If this request involves image editing, modification, redraw, background replacement, style transfer, repair, object removal, or localized changes, you must call the image2 tool with mode=edit and use the attached or most recent image as the source image. Image operations may take a while, so wait up to 10 minutes by default unless the tool returns an error or the user interrupts.",MT="System hint from web UI: if your final answer produces, creates, modifies, exports, packages, or identifies local files that the user should receive, you must call the expose_downloads tool with all relevant absolute file paths before your final textual response. Do not paste absolute paths as the primary delivery method; expose them as browser downloads.",RT="<<ATTACHMENT_MANIFEST>>",NT="<</ATTACHMENT_MANIFEST>>",Li="••••••••••••••••••",Oi="neoctl-web.tabId",ms="neoctl-web.sessionId",Ld="neoctl-web.theme",Da="neoctl-web.clientRevision",Od="neoctl-web.clientReloadRequest",Pa="__neo_reload",LT=112,Dd=4e4,OT={__name:"App",setup(e){We.registerLanguage("javascript",Ta),We.registerLanguage("js",Ta),We.registerLanguage("jsx",Ta),We.registerLanguage("typescript",Aa),We.registerLanguage("ts",Aa),We.registerLanguage("tsx",Aa),We.registerLanguage("python",xd),We.registerLanguage("py",xd),We.registerLanguage("bash",Ca),We.registerLanguage("sh",Ca),We.registerLanguage("shell",Ca),We.registerLanguage("json",mv),We.registerLanguage("css",Ev),We.registerLanguage("html",Ia),We.registerLanguage("xml",Ia),We.registerLanguage("vue",Ia),We.registerLanguage("markdown",Sd),We.registerLanguage("md",Sd),We.registerLanguage("yaml",Ed),We.registerLanguage("yml",Ed),We.registerLanguage("diff",Tv);const t=[{value:"inherit",label:"跟随全局"},{value:"enabled",label:"启用"},{value:"disabled",label:"关闭"}],n={Assistant:"助手",You:"你",User:"你",System:"系统","Context compaction":"上下文压缩",Config:"配置",Reasoning:"思考","Runtime tool":"运行时工具",multi_tool_use:"并行执行工具",文件下载:"文件下载"},i={pending:"排队中",running:"运行中",completed:"已完成",failed:"失败",killed:"已停止",queued:"已入队",resumed:"已启动续跑",queued_for_resume:"待续跑",incomplete:"未完成",stopped:"已停止"},o={"API key":"API Key","Base URL":"Base URL",Model:"模型","Fallback model":"备用模型",Endpoint:"Endpoint","Reasoning effort":"推理强度","Reasoning summary":"推理摘要","Max output tokens":"最大输出 Token","Timeout ms":"请求超时(ms)","Stream idle timeout ms":"流式空闲超时(ms)","Max retries":"最大重试次数"},a={openai:"OpenAI"},c={INVALID_REQUEST:"请求参数无效",SESSION_ACTIVE:"当前会话不能删除,请先切换到其他会话",SESSION_RUNNING:"运行中的会话不能删除,请等待运行结束",SESSION_NOT_FOUND:"会话不存在或已被删除",SESSION_RESUME_FAILED:"打开会话失败",SESSION_CREATE_FAILED:"新建会话失败",SESSION_DELETE_FAILED:"删除会话失败",PLUGIN_UPDATE_BLOCKED:"模型回答期间不能修改会话插件",PLUGIN_NOT_CONFIGURED:"插件功能未配置",PLUGIN_INVALID:"插件配置无效",PLUGIN_UPDATE_FAILED:"插件配置更新失败",PLUGINS_LOCKED:"插件配置已由环境变量锁定",TOOL_UPDATE_BLOCKED:"模型回答期间不能修改会话工具",TOOL_NOT_CONFIGURED:"工具配置功能未启用",TOOL_INVALID:"工具配置无效",TOOL_UPDATE_FAILED:"工具配置更新失败",PROMPT_UPDATE_FAILED:"提示词更新失败",PROMPT_INVALID:"提示词内容无效",FAST_MODE_UPDATE_FAILED:"快速模式切换失败",CONTEXT_WINDOW_UPDATE_BLOCKED:"回答期间不能调整上下文窗口",CONTEXT_WINDOW_INVALID:"请输入大于 0 的整数",CONTEXT_WINDOW_UPDATE_FAILED:"上下文窗口调整失败",CWD_NOT_CONFIGURED:"当前运行时不支持工作目录切换",CWD_INVALID:"路径不存在或不可访问",CWD_UPDATE_BLOCKED:"模型回答期间不能切换工作目录",CWD_UPDATE_FAILED:"工作目录切换失败",CWD_CREATE_FAILED:"文件夹新建失败",CWD_DELETE_FAILED:"只能删除空文件夹,且不能删除当前目录或其上级目录",LOGIN_INVALID:"模型配置无效",LOGIN_SAVE_FAILED:"模型配置保存失败",API_NOT_FOUND:"当前运行时不支持此功能,请重启服务",WEB_REQUEST_FAILED:"请求处理失败"};let u=P(),f=sessionStorage.getItem(ms)||"",m=!f,h=!1;const _=[];function w(){return{id:"",title:"",content:"",usage:""}}function I(s){if(!s||typeof s!="object")return null;const r=String(s.title||"").trim(),g=String(s.content||"").trim();return!r||!g?null:{id:String(s.id||A()).trim(),title:r,content:g,usage:String(s.usage||"").trim()}}function A(){return`prompt-${Math.random().toString(36).slice(2,10)}`}function P(){let s=sessionStorage.getItem(Oi);return s||(s=U(),sessionStorage.setItem(Oi,s)),s}function U(){var g,p;if((g=globalThis.crypto)!=null&&g.randomUUID)return globalThis.crypto.randomUUID();const s=new Uint8Array(16);if((p=globalThis.crypto)!=null&&p.getRandomValues)globalThis.crypto.getRandomValues(s);else for(let b=0;b<s.length;b+=1)s[b]=Math.floor(Math.random()*256);s[6]=s[6]&15|64,s[8]=s[8]&63|128;const r=[...s].map(b=>b.toString(16).padStart(2,"0"));return`${r.slice(0,4).join("")}-${r.slice(4,6).join("")}-${r.slice(6,8).join("")}-${r.slice(8,10).join("")}-${r.slice(10).join("")}`}function N(s){const r=new URL(s,window.location.origin);return r.searchParams.set("tabId",u),f&&r.searchParams.set("sessionId",f),`${r.pathname}${r.search}${r.hash}`}function B(s,r=!1){const g=(s==null?void 0:s.sessionId)||"";!g||g===f||!r&&!m&&f||(f=g,m=!1,sessionStorage.setItem(ms,g))}const l=ws({connected:!1,connecting:!0,coreVersion:"",coreEasterEgg:!1,lines:[],status:{phase:"ready",streamedOutputTokens:0},appPrompt:{hasActivePrompt:!1,activePrompt:void 0},runtimeContext:void 0,runtimeContextLoading:!0,runtimeContextError:"",runtimeContextModal:"",runtimeContextDetail:void 0,projectContextOpen:!1,projectContextDocument:void 0,globalPlugins:{items:[],locked:!1,restartRequired:!0,loading:!1},sessionPlugins:{items:[],busy:!1,loading:!1},globalTools:{items:[],loading:!1},sessionTools:{items:[],busy:!1,loading:!1},fastMode:!1,fastModeMutating:!1,contextWindowModalOpen:!1,contextWindowDraft:"",contextWindowError:"",contextWindowSaving:!1,busy:!1,queuedInput:void 0,backgroundTaskCount:0,backgroundTasks:[],agentTaskHistory:[],backgroundSessionRunCount:0,runningSessionIds:[],session:void 0,cwd:"",cwdPicker:{open:!1,cwd:"",parent:"",home:"",entries:[],locations:[],treeRoots:[],treeChildren:{},treeExpanded:{},selectedPath:"",selectionExplicit:!1,input:"",loading:!1,mutating:!1,error:""},sessionsLoading:!1,sessionResumeLoading:!1,pendingResumeSessionId:"",catalog:{commands:[],modelIds:[],reasoning:[]},interactive:{},sessions:[],login:void 0,cpaConfig:{url:"",password:"",hasPassword:!1,loaded:!1},cpaQuotas:[],cpaQuotaIndex:0,memory:{current:null,history:[],sampleMs:6e4,retentionMs:864e5},activePanel:"chat",toolDetailLineId:void 0,expandedToolGroups:{},compactionDetailLineId:void 0,backgroundTaskDetail:void 0,imagePreview:void 0,confirmDialog:{open:!1,title:"",message:"",confirmLabel:"确认",cancelLabel:"取消",tone:"warning"},promptLibrary:[],promptLibraryLoading:!0,promptManagerOpen:!1,selectedPromptId:"",composerDropActive:!1,composerDropMode:"prompt",attachments:[],attachmentCounter:0,uploadingFiles:!1,messageImagePreviews:[],liveToolStartedAt:{},clockTick:Date.now(),composerMetrics:{context:{display:0,target:0,bump:0,initialized:!1},inputTokens:{display:0,target:0,bump:0,initialized:!1},outputTokens:{display:0,target:0,bump:0,initialized:!1}},toast:""}),R=Ke(""),G=Ke(""),ee=Ke(1),re=Ke(zh()),oe=Ke(null),ne=Ke(null),he=Ke(null),ke=Ke(null),te=Ke(null),we=Ke(null),Ae=Ke(""),He=ws({}),O=ws(w()),Q=Ke(""),q=Ke(""),ge=Ke(""),xe=Ke("before"),Ie=Ke(-1);let ve,rt,Ye=0,Be=0,dt=0,_t,Tt=!1,_n,Lt,rs,v=0,E=Promise.resolve(),L=0,F,W=!1,z,$;np();const Y=new Map,H=new Map,D=Ke(0),ae=be(()=>[...l.lines||[]].reverse().find(s=>Uo(s))||null),X=be(()=>{var s;return eh((s=l.status)==null?void 0:s.phase)}),ue=be(()=>{var s,r;if(ae.value)return Ac(ae.value)?"整理图片结果":"图片生成中";if(((s=l.status)==null?void 0:s.phase)==="running_tools"){const g=(r=l.status)==null?void 0:r.currentTool;if(String((g==null?void 0:g.name)||"").toLowerCase()==="image2")return"图片生成中";if(g!=null&&g.name)return`调用 ${g.name}${g.kind?` · ${g.kind}`:""}`}return X.value}),fe=be(()=>{var s;return ym((s=l.status)==null?void 0:s.phase)}),j=be(()=>fe.value||l.busy||l.sessionResumeLoading),J=be(()=>{if(l.sessionResumeLoading)return"正在加载会话";if(ae.value){const s=Qs(ae.value),r=Ac(ae.value)?"正在载入图片结果":"图片模型正在生成";return s?`${r} · 已用时 ${s}`:r}return`正在${ue.value}`}),se=s=>String(s||"").replace(/设计/g,"").trim(),pe=s=>se(s==null?void 0:s.title)||"未命名会话",Ce=be(()=>{var r;const s=se((r=l.session)==null?void 0:r.title);return s&&s!=="neo"?s:""}),ze=be(()=>Ce.value||"未命名会话"),st=Ke(null),jt=Ke(null),is=Ke(!1);let et;const vt=async()=>{await $t();const s=st.value,r=jt.value;is.value=!!(s&&r&&r.scrollWidth>s.clientWidth+2)},Ls=be(()=>l.cwd||"—"),Os=be(()=>{var s,r;return((r=(s=l.status)==null?void 0:s.metrics)==null?void 0:r.model)||"模型未配置"}),jl=be(()=>`${l.composerMetrics.context.display.toFixed(1)}%`),Ug=be(()=>{var r,g;const s=Number((g=(r=l.status)==null?void 0:r.metrics)==null?void 0:g.contextWindowTokens);return Number.isFinite(s)&&s>0?String(Math.max(1,Math.round(s/1e3))):""}),Wl=be(()=>rn(l.composerMetrics.inputTokens.display)),Kl=be(()=>rn(l.composerMetrics.outputTokens.display)),$n=be(()=>fe.value||l.busy),vn=be(()=>l.backgroundTasks.length),wn=be(()=>[...l.backgroundTasks,...l.agentTaskHistory]),jr=be(()=>l.backgroundTasks[0]),Vl=be(()=>!!(R.value.trim()||l.attachments.length)),Gl=be(()=>$n.value?Vl.value?"打断并发送":l.queuedInput?"立即发送":"停止":"发送 ↵"),Ds=be(()=>{const s=G.value.trim().toLocaleLowerCase(),r=l.sessions||[];return s?r.filter(g=>[pe(g),g.title,g.sessionId,g.updatedAt,g.createdAt].some(p=>String(p||"").toLocaleLowerCase().includes(s))):r}),Wr=be(()=>Math.max(1,Math.ceil(Ds.value.length/Oa))),Fg=be(()=>{const s=(ee.value-1)*Oa;return Ds.value.slice(s,s+Oa)}),zg=be(()=>{const s=Wr.value,r=Math.max(1,Math.min(ee.value-2,s-4)),g=Math.min(s,r+4);return Array.from({length:g-r+1},(p,b)=>r+b)}),Bn=be(()=>l.sessionResumeLoading?[]:Wp((l.lines||[]).filter(s=>!Zp(s)))),Kr=m_(be(()=>({count:Bn.value.length,getScrollElement:()=>he.value,estimateSize:pm,getItemKey:s=>gm(Bn.value[s]),rangeExtractor:s=>{const r=new Set(ag(s));return Bn.value.forEach((g,p)=>{(g==null?void 0:g.live)===!0&&r.add(p)}),[...r].sort((g,p)=>g-p)},overscan:8,scrollMargin:D.value,anchorTo:"end",followOnAppend:!0,scrollEndThreshold:96,useAnimationFrameWithResizeObserver:!0}))),Hg=be(()=>Kr.value.getVirtualItems().filter(s=>Bn.value[s.index])),jg=be(()=>Kr.value.getTotalSize()),ql=be(()=>{var s,r;return Array.isArray((r=(s=l.runtimeContext)==null?void 0:s.prompt)==null?void 0:r.sections)?l.runtimeContext.prompt.sections:[]}),wo=be(()=>{var s;return Array.isArray((s=l.runtimeContext)==null?void 0:s.tools)?l.runtimeContext.tools:[]}),Ps=be(()=>{var s,r;return Array.isArray((r=(s=l.runtimeContext)==null?void 0:s.project)==null?void 0:r.documents)?l.runtimeContext.project.documents:[]}),Wg=be(()=>l.sessionPlugins.items.filter(s=>s.effectiveEnabled).length),Kg=be(()=>l.sessionTools.items.filter(s=>s.effectiveEnabled).length),xn=be(()=>l.lines.find(s=>String(s.id)===String(l.toolDetailLineId))||null),nn=be(()=>l.lines.find(s=>String(s.id)===String(l.compactionDetailLineId))||null),Un=be(()=>{var s;return((s=l.appPrompt)==null?void 0:s.activePrompt)||void 0}),Vg=be(()=>{var s,r;return((s=Un.value)==null?void 0:s.title)||((r=Un.value)==null?void 0:r.id)||""}),Vr=be(()=>l.promptLibrary.find(s=>s.id===l.selectedPromptId)||l.promptLibrary[0]||null),Gr=be(()=>re.value==="dark"),qr=be(()=>Gr.value?"切换到日间模式":"切换到夜间模式"),Ot=be(()=>l.cpaQuotas.length?l.cpaQuotas[l.cpaQuotaIndex%l.cpaQuotas.length]||l.cpaQuotas[0]:null),Fn=be(()=>{var s;return((s=l.memory)==null?void 0:s.current)||null}),Zr=be(()=>{var S;const s=(((S=l.memory)==null?void 0:S.history)||[]).filter(C=>Number.isFinite(Number(C==null?void 0:C.rss))),r=s.map(C=>Number(C.rss));if(!r.length)return[];const g=Math.min(...r),p=Math.max(...r),b=Math.max(1,p-g);return r.map((C,K)=>({entry:s[K],x:r.length===1?130:K/(r.length-1)*260,y:r.length===1?22:40-(C-g)/b*36}))}),Zl=be(()=>Zr.value.map((s,r)=>`${r?"L":"M"} ${s.x.toFixed(1)} ${s.y.toFixed(1)}`).join(" ")),$s=be(()=>Zr.value[Ie.value]||null);ot(re,Hh,{immediate:!0}),ot([$n,Gr],([s,r])=>{const p=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path d="M32 4 50 32 32 60 14 32Z" fill="${s?r?"#bef264":"#a3e635":r?"#38bdf8":"#7dd3fc"}"/></svg>`,b=document.querySelector('link[rel="icon"]');b&&(b.href=`data:image/svg+xml,${encodeURIComponent(p)}`)},{immediate:!0}),ot(Ce,s=>{document.title=s||"对话工作台"},{immediate:!0}),ot(ze,vt,{immediate:!0}),ot(G,()=>{ee.value=1}),ot(Wr,s=>{ee.value>s&&(ee.value=s)}),ot(()=>{var s;return(s=l.backgroundTaskDetail)==null?void 0:s.output},async()=>{await $t();const s=te.value;s&&(s.scrollTop=s.scrollHeight)}),ot(()=>Bn.value.length,async()=>{await $t(),ua(),_i()}),ot(()=>l.activePanel,async s=>{s==="chat"&&(await $t(),ua(),_i())}),Ur(async()=>{typeof ResizeObserver<"u"&&($=new ResizeObserver(_i),ua()),_i(),await Promise.all([os(),Gg(),Qr(),xo(),Yr(),Ql(),Co(),fc()]),Jr(),_n=setInterval(()=>{l.clockTick=Date.now()},1e3),Lt=setInterval(Co,6e4),rs=setInterval(fc,6e4),window.addEventListener("keydown",Wc),document.addEventListener("click",yc),document.addEventListener("click",_c),typeof ResizeObserver<"u"&&st.value&&(et=new ResizeObserver(vt),et.observe(st.value)),vt()}),Fr(()=>{ve&&ve.close(),Ye&&cancelAnimationFrame(Ye),Be&&cancelAnimationFrame(Be),Xr(),_t=void 0,v&&cancelAnimationFrame(v),_n&&clearInterval(_n),Lt&&clearInterval(Lt),rs&&clearInterval(rs),z&&clearTimeout(z),et&&et.disconnect(),$&&$.disconnect(),document.body.classList.remove("tool-detail-open","image-preview-open","runtime-context-open","context-window-open","cwd-picker-lock"),F&&as(!1),window.removeEventListener("keydown",Wc),document.removeEventListener("click",yc),document.removeEventListener("click",_c)});async function os(s={}){try{const r=await fetch(N("/api/state"));if(!r.ok)throw new Error(`state ${r.status}`);return sc(await r.json()),!0}catch(r){return s.silent||ye(`运行时不可用:${r.message||r}`),!1}}async function Gg(){try{const s=await fetch(N("/api/client-info"),{cache:"no-store"});if(!s.ok)return;Yl(await s.json())}catch{}}async function Qr(){l.runtimeContextLoading=!0;try{const s=await fetch(N("/api/runtime-context")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`runtime-context ${s.status}`);return Xl(r),!0}catch(s){return l.runtimeContextError=s.message||String(s),!1}finally{l.runtimeContextLoading=!1}}async function qg(){l.globalTools.loading=!0;try{const s=await fetch(N("/api/tools")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`tools ${s.status}`);l.globalTools={items:Array.isArray(r.items)?r.items.map(g=>({...g})):[],loading:!1}}catch(s){l.globalTools.loading=!1,ye(s.message||String(s))}}async function Zg(){const s=Object.fromEntries(l.globalTools.items.map(r=>[r.name,r.configuredEnabled!==!1]));l.globalTools.loading=!0;try{const r=await Ge("/api/tools/global",{overrides:s});l.globalTools={...r.state,loading:!1},await Promise.all([Yr(),Qr()]),ye("全局工具配置已保存并立即生效")}catch(r){l.globalTools.loading=!1,wt(r,"工具配置保存失败")}}async function Yr(){l.sessionTools.loading=!0;try{const s=await fetch(N("/api/session-tools")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`session-tools ${s.status}`);l.sessionTools={...r,items:Array.isArray(r.items)?r.items:[],loading:!1}}catch(s){l.sessionTools.loading=!1,ye(s.message||String(s))}}async function Qg(s,r){const g=Object.fromEntries(l.sessionTools.items.map(p=>[p.name,p.name===s.name?r:p.mode]));l.sessionTools.busy=!0;try{const p=await Ge("/api/session-tools",{overrides:g});l.sessionTools={...p.state,loading:!1,busy:!1}}catch(p){l.sessionTools.busy=!1,wt(p,"会话工具更新失败")}}async function Yg(){l.globalPlugins.loading=!0;try{const s=await fetch(N("/api/plugins")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`plugins ${s.status}`);l.globalPlugins={items:Array.isArray(r.items)?r.items.map(g=>({...g})):[],locked:r.locked===!0,restartRequired:r.restartRequired!==!1,loading:!1}}catch(s){l.globalPlugins.loading=!1,ye(s.message||String(s))}}async function Jg(){const s=l.globalPlugins.items.filter(r=>r.configuredEnabled!==!1).map(r=>r.id);l.globalPlugins.loading=!0;try{const r=await Ge("/api/plugins/global",{enabledIds:s}),g=new Set(r.enabledIds||s);l.globalPlugins.items=l.globalPlugins.items.map(p=>({...p,configuredEnabled:g.has(p.id)})),ye("插件配置已保存,重启后生效")}catch(r){wt(r,"插件配置保存失败")}finally{l.globalPlugins.loading=!1}}async function xo(){l.sessionPlugins.loading=!0;try{const s=await fetch(N("/api/session-plugins")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`session-plugins ${s.status}`);l.sessionPlugins={...r,items:Array.isArray(r.items)?r.items:[],loading:!1}}catch(s){l.sessionPlugins.loading=!1,ye(s.message||String(s))}}async function Xg(s,r){const g=Object.fromEntries(l.sessionPlugins.items.map(p=>[p.id,p.id===s.id?r:p.mode]));l.sessionPlugins.busy=!0;try{const p=await Ge("/api/session-plugins",{overrides:g});l.sessionPlugins={...p.state,loading:!1,busy:!1}}catch(p){l.sessionPlugins.busy=!1,wt(p,"会话插件更新失败")}}async function Ql(){l.promptLibraryLoading=!0;try{const s=await fetch(N("/api/prompt-library")),r=await s.json().catch(()=>({}));if(!s.ok)throw new Error(r.error||`prompt-library ${s.status}`);Bs(Array.isArray(r.items)?r.items:_)}catch(s){Bs([]),ye(s.message||String(s))}finally{l.promptLibraryLoading=!1}}function Jr(){ve&&ve.close(),Be&&cancelAnimationFrame(Be),Be=0,Xr(),_t=void 0,Tt=!1,l.connecting=!0,ve=new EventSource(N("/events")),ve.addEventListener("open",()=>{Tt=!1,l.connected=!0,l.connecting=!1}),ve.addEventListener("error",()=>{Eo(),l.connected=!1,l.connecting=!1}),ve.addEventListener("sync",s=>{if(!Tt){Tt=!0,tc(s.data);return}sp(s.data)}),ve.addEventListener("delta",s=>{Eo(),rp(s.data)}),ve.addEventListener("terminal.output",s=>{try{Eo(),cp(JSON.parse(s.data))}catch{}}),ve.addEventListener("client.version",s=>{try{Yl(JSON.parse(s.data))}catch{}}),ve.addEventListener("client.reload",s=>{try{ep(JSON.parse(s.data))}catch{}}),ve.addEventListener("runtime.context",s=>{try{Xl(JSON.parse(s.data))}catch(r){l.runtimeContextError=r.message||String(r)}}),ve.addEventListener("runtime.context.error",s=>{try{const r=JSON.parse(s.data);l.runtimeContextError=r.message||"运行上下文同步失败"}catch{l.runtimeContextError="运行上下文同步失败"}})}function Yl(s){if(Number(s==null?void 0:s.protocolVersion)!==1)return;l.coreVersion=String(s.coreVersion||"");const r=String(s.revision||"").trim();if(!r)return;const g=localStorage.getItem(Da);localStorage.setItem(Da,r),g&&g!==r&&Jl({...s,requestId:`revision:${r}`,clearCache:!0})}async function ep(s){if(Number(s==null?void 0:s.protocolVersion)!==1)return;const r=String(s.requestId||"").trim();if(!r||sessionStorage.getItem(Od)===r)return;sessionStorage.setItem(Od,r);const g=String(s.revision||"").trim();g&&localStorage.setItem(Da,g),l.coreVersion=String(s.coreVersion||l.coreVersion||""),await Jl(s)}async function Jl(s){if(W)return;W=!0,s.clearCache!==!1&&await tp();const r=new URL(window.location.href);r.searchParams.set(Pa,String(s.requestId||s.revision||Date.now())),window.location.replace(r.href)}async function tp(){const s=[];"caches"in window&&s.push(caches.keys().then(r=>Promise.all(r.map(g=>caches.delete(g))))),"serviceWorker"in navigator&&s.push(navigator.serviceWorker.getRegistrations().then(r=>Promise.all(r.map(g=>g.unregister())))),await Promise.allSettled(s)}function np(){const s=new URL(window.location.href);s.searchParams.has(Pa)&&(s.searchParams.delete(Pa),window.history.replaceState(window.history.state,"",s.href))}function So(){z&&clearTimeout(z),l.coreEasterEgg=!1,requestAnimationFrame(()=>{l.coreEasterEgg=!0,z=setTimeout(()=>{l.coreEasterEgg=!1},1300)})}function Xl(s){var b,S;if(![1,2].includes(Number(s==null?void 0:s.protocolVersion)))throw new Error(`不支持的运行上下文协议版本:${(s==null?void 0:s.protocolVersion)??"未知"}`);const r=Number(s.revision||0),g=Number(((b=l.runtimeContext)==null?void 0:b.revision)||0);(!s.sessionId||!((S=l.runtimeContext)!=null&&S.sessionId)||s.sessionId===l.runtimeContext.sessionId)&&r<g||(l.runtimeContext=s,l.projectContextDocument&&!Ps.value.some(C=>C.path===l.projectContextDocument.path)&&(l.projectContextDocument=void 0),l.projectContextOpen&&Ps.value.length===0&&(l.projectContextOpen=!1,document.body.classList.remove("runtime-context-open")),l.runtimeContextLoading=!1,l.runtimeContextError="")}function sp(s){_t=s,!Be&&(Be=requestAnimationFrame(()=>{Be=0,ec()}))}function Eo(){Be&&cancelAnimationFrame(Be),Be=0,ec()}function ec(){const s=_t;_t=void 0,s&&tc(s)}function tc(s){try{sc(JSON.parse(s))}catch(r){ye(`运行状态同步失败:${r.message||r}`)}}function rp(s){try{lp(JSON.parse(s))}catch(r){ye(`流式增量同步失败:${r.message||r}`),os()}}function ip(s,r){const g=String(r||"");if(!g)return;const p=String(s);H.set(p,`${H.get(p)||""}${g}`),nc()}function nc(){dt||(dt=requestAnimationFrame(op))}function op(){dt=0;const s=la(),r=[...H];H.clear();for(const[g,p]of r){const b=l.lines.findIndex(C=>String(C.id)===g);if(b<0)continue;const S=l.lines[b];l.lines[b]={...S,text:`${S.text||""}${p}`}}s&&fa(),H.size&&nc()}function ap(s){const r=String(s),g=H.get(r);if(!g)return;H.delete(r);const p=l.lines.findIndex(S=>String(S.id)===r);if(p<0)return;const b=l.lines[p];l.lines[p]={...b,text:`${b.text||""}${g}`}}function Xr(){dt&&cancelAnimationFrame(dt),dt=0,H.clear()}function lp(s){const r=String(s.sessionId||"");if(f&&r&&r!==f&&!m){Dc();return}const g=la();for(const p of s.operations||[]){if(p.type==="line.append"){l.lines.some(S=>{var C;return String(S.id)===String((C=p.line)==null?void 0:C.id)})||l.lines.push(p.line);continue}const b=l.lines.findIndex(S=>String(S.id)===String(p.id));if(b<0)throw new Error(`找不到增量消息行 ${p.id}`);if(l.lines[b],p.type==="line.text.append")ip(p.id,p.text);else if(p.type==="line.patch"){ap(p.id);const S=l.lines[b];l.lines[b]={...S,...p.patch||{}}}}s.status&&(l.status=s.status),Fo(),l.connected=!0,l.connecting=!1,g&&fa()}function cp(s){var r;for(const g of(s==null?void 0:s.updates)||[]){const p=String((g==null?void 0:g.sessionId)||"");if(!p)continue;const b=l.backgroundTasks.findIndex(on=>String((on==null?void 0:on.sessionId)||"")===p);if(b<0)continue;const S=String(g.text||"");if(!S)continue;const C=l.backgroundTasks[b],K=String(C.output||""),le=Number(C.outputEnd??K.length),ie=Number(g.outputStart??le),Ee=Number(g.outputEnd??ie+S.length),qe=ie===le?up(K,S,Dd):S.slice(-Dd);l.backgroundTasks[b]={...C,output:qe,outputEnd:Ee},String(((r=l.backgroundTaskDetail)==null?void 0:r.sessionId)||"")===p&&(l.backgroundTaskDetail={...l.backgroundTaskDetail,output:qe,outputEnd:Ee})}}function up(s,r,g){const p=`${s}${r}`;return p.length<=g?p:p.slice(-g)}function sc(s){var b,S,C;Xr();const r=String(((b=s.session)==null?void 0:b.sessionId)||""),g=String(((S=l.session)==null?void 0:S.sessionId)||"");if(f&&r&&r!==f&&!m){Dc();return}const p=la();if(r!==g&&(da(),l.messageImagePreviews=l.messageImagePreviews.filter(K=>K.sessionId===r),l.attachmentCounter=0),l.lines=s.lines||[],l.toolDetailLineId!==void 0&&!l.lines.some(K=>String(K.id)===String(l.toolDetailLineId))&&Gs(),l.compactionDetailLineId!==void 0&&!l.lines.some(K=>String(K.id)===String(l.compactionDetailLineId))&&si(),Zh(l.lines),Qp(l.lines),l.status=s.status||l.status,Fo(),l.busy=!!s.busy,l.queuedInput=s.queuedInput,l.backgroundTaskCount=s.backgroundTaskCount||0,l.backgroundTasks=s.backgroundTasks||[],l.agentTaskHistory=s.agentTaskHistory||[],l.backgroundTaskDetail){const K=wn.value.find(le=>us(le)===us(l.backgroundTaskDetail));K?l.backgroundTaskDetail={...K}:ci()}if(l.backgroundSessionRunCount=s.backgroundSessionRunCount||0,l.runningSessionIds=s.runningSessionIds||[],l.session=s.session,l.cwd=s.cwd||"",l.fastModeMutating||(l.fastMode=s.fastMode===!0),l.appPrompt=s.appPrompt||{hasActivePrompt:!1,activePrompt:void 0},B(s.session,m),r&&r!==g&&Promise.all([xo(),Yr()]),l.sessionResumeLoading){const K=((C=s.session)==null?void 0:C.sessionId)||"";l.pendingResumeSessionId&&K===l.pendingResumeSessionId&&(l.sessionResumeLoading=!1,l.pendingResumeSessionId="")}s.catalog&&(l.catalog=s.catalog),s.interactive&&(l.interactive=s.interactive),s.tips&&(l.tips=s.tips),s.tipIndex!==void 0&&l.tipIndex===0&&(l.tipIndex=s.tipIndex),l.connected=!0,l.connecting=!1,Jp(l.backgroundTasks),km(),p&&fa()}function Bs(s,r=l.selectedPromptId){const g=(s||[]).map(I).filter(Boolean);l.promptLibrary=g;const p=g.find(b=>b.id===r)||g[0]||null;l.selectedPromptId=(p==null?void 0:p.id)||"",Us(p||w())}function Us(s){O.id=(s==null?void 0:s.id)||"",O.title=(s==null?void 0:s.title)||"",O.content=(s==null?void 0:s.content)||"",O.usage=(s==null?void 0:s.usage)||""}function To(s){l.activePanel="prompts",l.promptManagerOpen=!0,s&&(l.selectedPromptId=s);const r=l.promptLibrary.find(g=>g.id===l.selectedPromptId)||l.promptLibrary[0]||w();l.selectedPromptId=r.id||"",Us(r)}function dp(s){l.selectedPromptId=s.id,To(s.id)}function fp(){l.selectedPromptId="",Us(w()),l.activePanel="prompts",l.promptManagerOpen=!0}function gp(s){l.selectedPromptId=s.id,Us(s)}async function pp(){const s=I({id:O.id||A(),title:O.title,content:O.content,usage:O.usage});if(!s){ye("标题和内容不能为空");return}try{const r=await Ge("/api/prompt-library",{item:s});Bs(r.items,s.id)}catch(r){ye(r.message||String(r));return}ye("已保存提示词")}async function hp(){var p;const s=String(O.id||"").trim();if(!s){Us(w());return}const r=l.promptLibrary.find(b=>b.id===s);if(!(!r||!await zs({title:"删除提示词?",message:`“${r.title}”删除后无法恢复。`,confirmLabel:"确认删除",tone:"danger"}))){try{const b=await Ge("/api/prompt-library/delete",{id:s});Bs(b.items)}catch(b){ye(b.message||String(b));return}((p=Un.value)==null?void 0:p.id)===r.id&&rc({confirm:!1}),ye("已删除提示词")}}async function Fs(s){const r=I(s);if(!r){ye("提示词无效");return}const g=Un.value;if(g&&(g.id!==r.id||String(g.content||"").trim()!==r.content)){const b=g.id===r.id;if(!await zs({title:b?"更新当前提示词?":"切换当前提示词?",message:b?`“${r.title}”的内容已经变化。重新应用会影响模型对后续问题的理解和回答方式。`:`将从“${g.title||g.id||"当前提示词"}”切换为“${r.title}”。提示词变化会影响模型对后续问题的理解和回答方式。`,confirmLabel:b?"确认更新":"确认切换"}))return}try{const b=await Ge("/api/app-prompt",{id:r.id,title:r.title,usage:r.usage,source:"sidebar-library",content:r.content});(b==null?void 0:b.ok)!==!1&&(l.appPrompt=b.appPrompt||{hasActivePrompt:!0,activePrompt:r},ye(`已应用:${r.title}`))}catch(b){wt(b,"应用提示词失败")}}async function rc(s={}){if(Un.value&&!(s.confirm!==!1&&!await zs({title:"清除当前提示词?",message:"清除后,模型将不再遵循当前应用提示词,这会改变它对后续问题的理解和回答方式。",confirmLabel:"确认清除",tone:"danger"})))try{const r=await Ge("/api/app-prompt",{clear:!0});(r==null?void 0:r.ok)!==!1&&(l.appPrompt=r.appPrompt||{hasActivePrompt:!1,activePrompt:void 0},ye("已清空应用提示词"))}catch(r){wt(r,"清空提示词失败")}}function zs(s){return F&&as(!1),Object.assign(l.confirmDialog,{open:!0,title:String((s==null?void 0:s.title)||"请确认"),message:String((s==null?void 0:s.message)||""),confirmLabel:String((s==null?void 0:s.confirmLabel)||"确认"),cancelLabel:String((s==null?void 0:s.cancelLabel)||"取消"),tone:(s==null?void 0:s.tone)==="danger"?"danger":"warning"}),new Promise(r=>{F=r})}function as(s){const r=F;F=void 0,l.confirmDialog.open=!1,r==null||r(s===!0)}function mp(s,r){Q.value=r.id,s!=null&&s.dataTransfer&&(s.dataTransfer.effectAllowed="copy",s.dataTransfer.setData("application/x-neoctl-prompt-id",r.id),s.dataTransfer.setData("text/plain",r.title))}function bp(s){var p;const r=Array.from(((p=s==null?void 0:s.dataTransfer)==null?void 0:p.types)||[]),g=_p(s);!r.includes("application/x-neoctl-prompt-id")&&!g||(s.preventDefault(),l.composerDropActive=!0,l.composerDropMode=g?"files":"prompt",s.dataTransfer&&(s.dataTransfer.dropEffect="copy"))}function kp(s){s!=null&&s.currentTarget&&(s!=null&&s.relatedTarget)&&s.currentTarget.contains(s.relatedTarget)||(l.composerDropActive=!1,l.composerDropMode="prompt")}async function yp(s){var b,S;const r=vp(s==null?void 0:s.dataTransfer);if(r.length){s.preventDefault(),l.composerDropActive=!1,l.composerDropMode="prompt",Q.value="",await Vc(r),(b=oe.value)==null||b.focus();return}const g=((S=s==null?void 0:s.dataTransfer)==null?void 0:S.getData("application/x-neoctl-prompt-id"))||Q.value;if(l.composerDropActive=!1,l.composerDropMode="prompt",!g)return;s.preventDefault();const p=l.promptLibrary.find(C=>C.id===g);if(Q.value="",!p){ye("未找到提示词");return}await Fs(p)}function _p(s){var g,p;return Array.from(((g=s==null?void 0:s.dataTransfer)==null?void 0:g.types)||[]).includes("Files")?!0:Array.from(((p=s==null?void 0:s.dataTransfer)==null?void 0:p.items)||[]).some(b=>b.kind==="file")}function vp(s){const r=Array.from((s==null?void 0:s.files)||[]);return r.length?r:Array.from((s==null?void 0:s.items)||[]).filter(g=>g.kind==="file").map(g=>g.getAsFile()).filter(Boolean)}function wp(){Q.value="",l.composerDropActive=!1,l.composerDropMode="prompt"}function xp(s,r){q.value=r.id,ge.value="",s!=null&&s.dataTransfer&&(s.dataTransfer.effectAllowed="move",s.dataTransfer.setData("application/x-neoctl-prompt-sort-id",r.id),s.dataTransfer.setData("text/plain",r.title))}function Sp(s,r){var b,S,C;const g=q.value||((b=s==null?void 0:s.dataTransfer)==null?void 0:b.getData("application/x-neoctl-prompt-sort-id"));if(!g||g===r.id)return;s.preventDefault();const p=(C=(S=s.currentTarget)==null?void 0:S.getBoundingClientRect)==null?void 0:C.call(S);ge.value=r.id,xe.value=p&&s.clientY>p.top+p.height/2?"after":"before",s.dataTransfer&&(s.dataTransfer.dropEffect="move")}async function Ep(s,r){var le;s.preventDefault();const g=((le=s==null?void 0:s.dataTransfer)==null?void 0:le.getData("application/x-neoctl-prompt-sort-id"))||q.value,p=xe.value;if(ic(),!g||g===r.id)return;const b=[...l.promptLibrary],S=b.findIndex(ie=>ie.id===g);if(S<0)return;const[C]=b.splice(S,1),K=b.findIndex(ie=>ie.id===r.id);if(!(K<0)){b.splice(K+(p==="after"?1:0),0,C),l.promptLibrary=b;try{const ie=await Ge("/api/prompt-library/reorder",{ids:b.map(Ee=>Ee.id)});Bs(ie.items,l.selectedPromptId),ye("提示词顺序已更新")}catch(ie){await Ql(),ye(ie.message||String(ie))}}}function ic(){q.value="",ge.value="",xe.value="before"}async function oc(){const s=R.value;if(!s.trim()&&l.attachments.length===0)return;if(s.trim()==="/sessions"){R.value="",nr(),await ei();return}if(s.trim()==="/login"){R.value="",nr(),await Hs();return}if(s.trim()==="/new"){R.value="",nr(),await ti();return}const r=[...l.attachments],g=r.filter(S=>S.kind==="image"),p=r.filter(S=>S.kind==="file"&&S.absolutePath),b=qc(s,g);Zc(g),R.value="",l.attachments=[],nr();try{const S=await fetch(N("/api/submit"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b,attachments:[...g,...p]})}),C=await S.json();if(!S.ok||C!=null&&C.error)throw new Error(C.error||`submit ${S.status}`)}catch(S){ye(S.message||String(S))}}async function Tp(){if(!Vl.value){l.queuedInput?await lc():await ac();return}const s=R.value,r=[...l.attachments],g=r.filter(S=>S.kind==="image"),p=r.filter(S=>S.kind==="file"&&S.absolutePath),b=qc(s,g);Zc(g),R.value="",l.attachments=[],nr();try{await Ge("/api/submit-now",{text:b,attachments:[...g,...p]})}catch(S){ye(S.message||String(S))}}async function ac(){try{await Ge("/api/interrupt",{})}catch(s){wt(s,"停止回答失败")}}async function Ap(){try{const s=await Ge("/api/queue/cancel",{});ye(s.cancelled?"已撤回排队消息":"没有待撤回的消息")}catch(s){wt(s,"撤回排队消息失败")}}async function lc(){try{const s=await Ge("/api/queue/send-now",{});ye(s.interrupted?"已打断并发送排队消息":"已发送排队消息")}catch(s){wt(s,"发送排队消息失败")}}async function cc(){try{await Ge("/api/submit",{text:"/compact",attachments:[]}),ye("压缩会话将在下一轮生效")}catch(s){wt(s,"压缩上下文失败")}}function uc(){l.contextWindowDraft=Ug.value,l.contextWindowError="",l.contextWindowModalOpen=!0,document.body.classList.add("context-window-open")}function Ao(){l.contextWindowSaving||(l.contextWindowModalOpen=!1,l.contextWindowError="",document.body.classList.remove("context-window-open"))}function Cp(){l.contextWindowError=""}async function Ip(){var r;const s=String(l.contextWindowDraft||"");if(!/^\d+$/.test(s)||s==="0"){l.contextWindowError="请输入大于 0 的整数";return}l.contextWindowSaving=!0,l.contextWindowError="";try{const g=await Ge("/api/context-window",{value:s}),p=((r=l.status)==null?void 0:r.metrics)||{},b=Number(g.contextWindowTokens),S=Number(p.estimatedInputTokens||0);l.status={...l.status,metrics:{...p,contextWindowTokens:b,contextWindowSource:"session",contextUsageRatio:b>0?S/b:void 0}},Fo(),l.contextWindowModalOpen=!1,document.body.classList.remove("context-window-open")}catch(g){l.contextWindowError=sn(g,"调整失败")}finally{l.contextWindowSaving=!1}}function dc(){const s=!l.fastMode,r=++L;l.fastMode=s,l.fastModeMutating=!0,E=E.catch(()=>{}).then(()=>Ge("/api/fast-mode",{enabled:s})).then(g=>{r===L&&(l.fastMode=g.fastMode===!0,l.fastModeMutating=!1,ye(l.fastMode?"快速模式已为当前会话启动":"快速模式已关闭"))}).catch(async g=>{r===L&&(l.fastModeMutating=!1,await os(),wt(g,"快速模式切换失败"))})}async function ei(){l.activePanel="sessions",l.sessionsLoading=!0;try{const s=await fetch(N("/api/sessions")),r=await s.json().catch(()=>({}));if(!s.ok||r!=null&&r.error||(r==null?void 0:r.ok)===!1)throw js(r,s.status);l.sessions=r.sessions||[],l.runningSessionIds=r.runningSessionIds||[]}catch(s){wt(s,"加载会话失败")}finally{l.sessionsLoading=!1}}async function Mp(s){const r=u,g=f;if(l.pendingResumeSessionId=s,l.sessionResumeLoading=!0,await Pc(s))l.activePanel="chat",ye("已打开会话");else{const b=await $c(r,g);ye(b?"打开会话失败,已恢复原会话":"打开会话失败,运行时连接已断开")}l.sessionResumeLoading=!1,l.pendingResumeSessionId=""}async function Co(){try{const s=await fetch(N("/api/cpa-quota"));if(!s.ok)throw new Error(`cpa-quota ${s.status}`);const r=await s.json();l.cpaQuotas=Array.isArray(r==null?void 0:r.quotas)?r.quotas:[],l.cpaQuotaIndex>=l.cpaQuotas.length&&(l.cpaQuotaIndex=0),r!=null&&r.config&&(l.cpaConfig.loaded||(l.cpaConfig.url=String(r.config.url||""),l.cpaConfig.password=r.config.hasPassword?Li:"",l.cpaConfig.loaded=!0),l.cpaConfig.hasPassword=!!r.config.hasPassword)}catch{l.cpaQuotas=[],l.cpaQuotaIndex=0}}async function fc(){try{const s=await fetch(N("/api/memory"));if(!s.ok)throw new Error(`memory ${s.status}`);const r=await s.json();l.memory={current:(r==null?void 0:r.current)||null,history:Array.isArray(r==null?void 0:r.history)?r.history:[],sampleMs:Number(r==null?void 0:r.sampleMs)||6e4,retentionMs:Number(r==null?void 0:r.retentionMs)||864e5}}catch{}}async function ti(){const s=u,r=f;if(Xo(),u=U(),f="",m=!0,sessionStorage.setItem(Oi,u),sessionStorage.removeItem(ms),l.sessionResumeLoading=!0,l.pendingResumeSessionId="",await os({silent:!0}))l.activePanel="chat",ye("已创建新会话"),Jr();else{const p=await $c(s,r);ye(p?"新建会话失败,已恢复原会话":"新建会话失败,运行时连接已断开")}l.sessionResumeLoading=!1}function Io(s){var r;return!!s&&String(((r=l.session)==null?void 0:r.sessionId)||"")===String(s)}function Mo(s){return l.runningSessionIds.includes(s)}async function Rp(s){const r=l.sessions.find(p=>p.sessionId===s);if(Io(s)){ye(c.SESSION_ACTIVE);return}if(Mo(s)){ye(c.SESSION_RUNNING);return}if(await zs({title:"删除会话?",message:`“${(r==null?void 0:r.title)||s||"这个会话"}”删除后无法恢复。`,confirmLabel:"确认删除",tone:"danger"}))try{await Ge("/api/sessions/delete",{sessionId:s}),await ei(),ye("会话已删除")}catch(p){wt(p,"删除会话失败")}}async function Hs(s){l.activePanel="settings";const r=s?`?provider=${encodeURIComponent(s)}`:"";try{const g=await fetch(N(`/api/login${r}`)),p=await g.json().catch(()=>({}));if(!g.ok||p!=null&&p.error||(p==null?void 0:p.ok)===!1)throw js(p,g.status);l.login=p,Ae.value=p.provider,Object.keys(He).forEach(b=>delete He[b]),Object.assign(He,p.values||{}),await Promise.all([Co(),Yg(),qg()])}catch(g){wt(g,"加载模型配置失败")}}async function Np(){await Hs(Ae.value)}async function gc(){var p;const[s,r]=await Promise.allSettled([Ge("/api/login",{provider:Ae.value,values:{...He}}),Ge("/api/cpa-config",{url:l.cpaConfig.url,password:l.cpaConfig.password===Li?"":l.cpaConfig.password,preservePassword:l.cpaConfig.hasPassword&&(!l.cpaConfig.password||l.cpaConfig.password===Li)})]);if(r.status==="fulfilled"){const b=r.value;l.cpaQuotas=Array.isArray(b==null?void 0:b.quotas)?b.quotas:[],l.cpaQuotaIndex=0,l.cpaConfig.loaded=!0,l.cpaConfig.hasPassword=!!((p=b==null?void 0:b.config)!=null&&p.hasPassword),l.cpaConfig.password=l.cpaConfig.hasPassword?Li:""}if(s.status==="fulfilled"&&r.status==="fulfilled"){ye("模型配置已保存");return}const g=[];s.status==="rejected"&&g.push(sn(s.reason,"模型配置保存失败")),r.status==="rejected"&&g.push(sn(r.reason,"CPA 配置保存失败")),ye(g.join(";"))}function Ro(s){const r=Number.parseFloat(String(s??"").replace("%",""));return Number.isFinite(r)?Math.max(0,Math.min(100,r)):0}function No(s){const r=Number.parseFloat(String(s??"").replace("%",""));if(!Number.isFinite(r))return"—";const g=Ro(r);return`${g.toFixed(g%1?1:0)}%`}function Lo(s){const r=new Date(s);return Number.isNaN(r.getTime())?"—":new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(r)}function ni(s){const r=new Date(s);return Number.isNaN(r.getTime())?"—":new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!1}).format(r)}function pc(s){const r=l.cpaQuotas.length;r<2||(l.cpaQuotaIndex=(l.cpaQuotaIndex+s+r)%r)}function Lp(s){const r=String(s||"").trim();if(!r)return"Codex 凭据";const[g,p]=r.split("@");return!p||g.length<=3?r:`${g.slice(0,3)}***@${p}`}function zn(s){const r=Number(s);if(!Number.isFinite(r)||r<0)return"—";const g=r/1024/1024;return`${g.toFixed(g>=100?0:1)} MB`}function Op(s){const r=new Date(s);return Number.isNaN(r.getTime())?"等待采样":new Intl.DateTimeFormat("zh-CN",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r)}function Dp(s){const r=new Date(s);return Number.isNaN(r.getTime())?"—":new Intl.DateTimeFormat("zh-CN",{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r)}function Pp(s){const r=Zr.value.length;if(!r)return;const g=s.currentTarget.getBoundingClientRect(),p=Math.min(1,Math.max(0,(s.clientX-g.left)/Math.max(1,g.width)));Ie.value=r===1?0:Math.round(p*(r-1))}function hc(){Ie.value=-1}async function Ge(s,r){const g=await fetch(N(s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}),p=await g.json().catch(()=>({}));if(!g.ok||p!=null&&p.error||(p==null?void 0:p.ok)===!1)throw js(p,g.status);return p}class $p extends Error{constructor(r,g=""){super(r),this.name="ActionRequestError",this.code=g}}function js(s,r){const g=String((s==null?void 0:s.errorCode)||(r===404?"API_NOT_FOUND":""));return new $p((s==null?void 0:s.error)||`请求失败(${r})`,g)}function sn(s,r="操作失败"){const g=String((s==null?void 0:s.code)||"");if(g&&c[g])return c[g];const p=String((s==null?void 0:s.message)||s||"").trim();return p?`${r}:${p}`:r}function wt(s,r){ye(sn(s,r))}function Hn(s){const r=qh(Gh(Vh(s.text||"")));return s.kind==="system"||s.kind==="meta"?Bp(r):r}function Bp(s){return String(s||"").replace(/^Interactive web UI enabled\.\s*Type \/help for commands\.\s*/i,"工作台已连接。输入 `/help` 可查看命令说明。").replace(/\bSession:\s*/gi,"会话:").replace(/\bTip:\s*/gi,"提示:").replace(/Start fresh/gi,"重新开始").replace(/\/reset clears the visible conversation and adds a reset marker so you can start a fresh thread in the same session\./gi,"`/reset` 会清空当前可见对话,并插入一个重置标记,方便你在同一会话中重新开始。").replace(/^new session\s+/i,"已新建会话:").replace(/^deleted session\s+/i,"已删除会话:").replace(/^resumed session\s+(.+?):\s+(\d+)\s+messages?\s+from\s+(.+)$/i,"已恢复会话:$1,共载入 $2 条消息,来源:$3").replace(/\((\d+)\s+resumed messages\)/gi,"(已恢复 $1 条消息)").replace(/\bType \/help for commands\./gi,"输入 `/help` 可查看命令说明。")}function jn(s){var r;if(s.kind==="tool"||s.toolName){const g=Ws(s);return(r=s==null?void 0:s.toolPresentation)!=null&&r.label?String(s.toolPresentation.label):Oo(s)?"任务计划":s.title?n[s.title]||n[String(s.title).toLowerCase()]||s.title:n[g]||g}return s.title?n[s.title]||n[String(s.title).toLowerCase()]||s.title:s.kind==="assistant"?"助手":s.kind==="user"?"你":s.kind==="thinking"?"思考":"系统"}function Ws(s){return String((s==null?void 0:s.toolName)||"tool").trim()||"tool"}function Oo(s){return(s==null?void 0:s.kind)==="tool"&&Ws(s)==="plan_update"}function Up(s){return Oo(s)||Dt(s)||ds(s).length>0}function Fp(s){return(s==null?void 0:s.kind)==="meta"&&String((s==null?void 0:s.title)||"")==="提示词用法"}function Ks(s){return!!(s!=null&&s.compaction&&typeof s.compaction=="object")}function zp(s){var r;return(r=s==null?void 0:s.compaction)!=null&&r.modelDriven?"模型生成摘要":"确定性摘要"}function mc(s){Ks(s)&&(l.compactionDetailLineId=s.id,document.body.classList.add("runtime-context-open"))}function si(){l.compactionDetailLineId=void 0,!l.runtimeContextModal&&!l.runtimeContextDetail&&!l.projectContextOpen&&document.body.classList.remove("runtime-context-open")}function Vs(s){return((s==null?void 0:s.kind)==="tool"||(s==null?void 0:s.kind)==="error"&&(s==null?void 0:s.toolName))&&!Up(s)}function Do(s){return(s==null?void 0:s.kind)==="tool-group"&&Array.isArray(s.lines)}function Hp(s){return!s||s.presentationLevel==="primary"||s.kind==="user"||s.kind==="assistant"?!0:Dt(s)}function jp(s){return!s||Hp(s)?!1:["thinking","tool","error","meta","system","agent"].includes(String(s.kind||"system"))}function Wp(s){const r=[];let g=[];const p=()=>{if(!g.length)return;const b=g.some(S=>(S==null?void 0:S.kind)!=="thinking");g.length===1||!b?r.push(...g):r.push({id:`tool-group:${g[0].id}`,kind:"tool-group",lines:g,live:g.some(S=>(S==null?void 0:S.live)===!0)}),g=[]};for(const b of s||[])jp(b)?g.push(b):(p(),r.push(b));return p(),r}function ls(s){return l.expandedToolGroups[s==null?void 0:s.id]===!0}async function Kp(s){Do(s)&&(l.expandedToolGroups[s.id]=!ls(s),await $t(),da())}function bc(s){const r=new Map;for(const p of(s==null?void 0:s.lines)||[]){const b=(p==null?void 0:p.kind)==="thinking"?"思考":jn(p);b&&r.set(b,(r.get(b)||0)+1)}const g=[...r.entries()].map(([p,b])=>({name:p,count:b}));return g.length?g:[{name:"过程",count:1}]}function Po(s){return((s==null?void 0:s.lines)||[]).flatMap((r,g)=>{var b;const p=String(((b=r==null?void 0:r.toolDisplay)==null?void 0:b.purpose)||"").trim();return p?[{id:`${r.id}:purpose:${g}`,text:p,live:(r==null?void 0:r.live)===!0}]:[]})}function kc(s){!s||!s.text||(l.toolDetailLineId=s.id,document.body.classList.add("tool-detail-open"))}function Gs(){l.toolDetailLineId=void 0,document.body.classList.remove("tool-detail-open")}function yc(s){var p;const r=s.target instanceof HTMLImageElement?s.target:null;if(!r||r.closest(".image-preview-modal"))return;const g=((p=r.closest("[data-preview-src]"))==null?void 0:p.dataset.previewSrc)||r.currentSrc||r.src;g&&(s.preventDefault(),s.stopPropagation(),Vp(g,r.alt))}async function _c(s){const r=s.target instanceof Element?s.target.closest('a[data-resource-download="true"]'):null;if(!(r instanceof HTMLAnchorElement))return;s.preventDefault(),s.stopPropagation();const g=Number(r.dataset.resourceExpiresAt);if(Number.isFinite(g)&&g>0&&Date.now()>=g){ye("下载链接已过期,请重新生成");return}try{const p=await fetch(r.href);if(!p.ok){ye(p.status===404||p.status===410?"下载链接已过期,请重新生成":`下载失败(${p.status})`);return}const b=URL.createObjectURL(await p.blob()),S=document.createElement("a");S.href=b,S.download=r.download||"download",document.body.appendChild(S),S.click(),S.remove(),setTimeout(()=>URL.revokeObjectURL(b),3e4)}catch{ye("下载失败,请稍后重试")}}function Vp(s,r=""){l.imagePreview={src:String(s||""),caption:String(r||"").trim()},document.body.classList.add("image-preview-open")}function $o(){l.imagePreview=void 0,document.body.classList.remove("image-preview-open")}function cs(s){return Qv(s)||Tc(s).status}function vc(s){return Tc(s).summary}function ri(s){var g;return(Array.isArray((g=s==null?void 0:s.toolDisplay)==null?void 0:g.facts)?s.toolDisplay.facts:[]).filter(p=>String((p==null?void 0:p.label)||"").trim()!=="状态")}function Sn(s){var r;return Array.isArray((r=s==null?void 0:s.toolStream)==null?void 0:r.steps)?s.toolStream.steps:[]}function En(s){return Ws(s)==="subagent_run"}function Bo(s){const r=Ws(s).toLowerCase();return r==="terminal_run"||r==="terminal_control"}function wc(s){var r;return Array.isArray((r=s==null?void 0:s.toolDisplay)==null?void 0:r.previews)&&s.toolDisplay.previews.length>0&&!Ws(s).startsWith("subagent_")&&!(Bo(s)&&(s==null?void 0:s.live)===!0&&Gp(s))}function qs(s){var S,C,K,le;const r=Array.isArray((S=s==null?void 0:s.toolStream)==null?void 0:S.chunks)?s.toolStream.chunks:[];if(r.length)return r.map(ie=>String((ie==null?void 0:ie.text)||"")).join("").trimEnd();const g=String(((C=s==null?void 0:s.toolStream)==null?void 0:C.stdout)||""),p=String(((K=s==null?void 0:s.toolStream)==null?void 0:K.stderr)||""),b=String(((le=s==null?void 0:s.toolStream)==null?void 0:le.output)||"");return[g,p,b].filter(Boolean).join(`
|
|
113
|
+
`).trimEnd()}function Zs(s){var p,b,S;const r=String(((p=s==null?void 0:s.toolStream)==null?void 0:p.message)||"").trim(),g=String(((b=s==null?void 0:s.toolDisplay)==null?void 0:b.purpose)||((S=s==null?void 0:s.toolDisplay)==null?void 0:S.subject)||"").trim();return r&&r!==g?r:""}function xc(s){return Sn(s).map(r=>`${(r==null?void 0:r.status)==="completed"?"✓":(r==null?void 0:r.status)==="failed"?"×":"•"} ${String((r==null?void 0:r.message)||"").trim()}`.trimEnd()).join(`
|
|
114
|
+
`)}function ii(s){const r=new Map;for(const g of Sn(s)){const p=String((g==null?void 0:g.toolName)||"").trim();if(!p)continue;const b=r.get(p);r.set(p,{label:(b==null?void 0:b.label)||String((g==null?void 0:g.toolLabel)||p),count:((b==null?void 0:b.count)||0)+1})}return[...r.entries()].map(([g,p])=>({name:g,label:p.label,count:p.count}))}function Sc(s){return Sn(s).flatMap((r,g)=>{const p=String((r==null?void 0:r.message)||"").trim();return p?[{key:`${r.key}:${g}`,purpose:p}]:[]})}function oi(s){return l.expandedToolGroups[`agent:${s==null?void 0:s.id}`]===!0}async function Ec(s){const r=`agent:${s==null?void 0:s.id}`;l.expandedToolGroups[r]=!l.expandedToolGroups[r],await $t(),da()}function Gp(s){return!!(Zs(s)||Sn(s).length||qs(s))}function ai(s){var b,S,C;const r=Number((b=s==null?void 0:s.toolStream)==null?void 0:b.current),g=Number((S=s==null?void 0:s.toolStream)==null?void 0:S.total);if(!Number.isFinite(r))return"";const p=String(((C=s==null?void 0:s.toolStream)==null?void 0:C.unit)||"").trim();return Number.isFinite(g)&&g>0?`${r}/${g}${p?` ${p}`:""}`:`${r}${p?` ${p}`:""}`}function Tc(s){const r=(s==null?void 0:s.live)===!0,g=(s==null?void 0:s.titleStatus)==="failure"||(s==null?void 0:s.kind)==="error",p=r?{key:"running",label:"运行中"}:g?{key:"failed",label:"失败"}:{key:"completed",label:"成功"},b=s!=null&&s.toolDisplay&&typeof s.toolDisplay=="object"?s.toolDisplay:void 0,S=String((b==null?void 0:b.purpose)||(b==null?void 0:b.subject)||(s==null?void 0:s.bodyTitle)||"").trim();return{status:p,summary:S}}function qp(s,r){const g=String(s||"").replace(/\s+/g," ").trim();return g.length>r?`${g.slice(0,r)}…`:g}function Dt(s){return(s==null?void 0:s.kind)==="tool"&&String((s==null?void 0:s.toolName)||"").toLowerCase()==="image2"}function Uo(s){return(s==null?void 0:s.live)&&Dt(s)}function Ac(s){return Dt(s)&&(s==null?void 0:s.pendingReplacement)===!0}function Zp(s){var g,p;if(yi(s)&&!Dt(s)||((g=s==null?void 0:s.toolPresentation)==null?void 0:g.visibility)==="hidden"&&(s==null?void 0:s.kind)!=="error")return!0;if((s==null?void 0:s.kind)!=="user")return!1;const r=Yc(s);return Yh(r)?String((p=Jh(r))==null?void 0:p.id)!==String(s==null?void 0:s.id):!Hn(s)&&bi(s).length===0&&hi(s==null?void 0:s.text).length===0}function Qp(s){const r=new Set,g=Date.now();for(const p of s||[]){if(!Uo(p))continue;const b=String(p.id);r.add(b),l.liveToolStartedAt[b]||(l.liveToolStartedAt[b]=g)}for(const p of Object.keys(l.liveToolStartedAt))r.has(p)||delete l.liveToolStartedAt[p]}function Qs(s){if(!Uo(s))return"";const r=l.liveToolStartedAt[String(s.id)];return r?pi(l.clockTick-r):""}function Fo(){var r,g,p,b,S,C,K,le,ie;const s=(g=(r=l.status)==null?void 0:r.metrics)==null?void 0:g.contextUsageRatio;zo("context",s===void 0?0:s*100),zo("inputTokens",Number(((b=(p=l.status)==null?void 0:p.usage)==null?void 0:b.inputTokens)??((C=(S=l.status)==null?void 0:S.metrics)==null?void 0:C.estimatedInputTokens)??0)),zo("outputTokens",Number(((le=(K=l.status)==null?void 0:K.usage)==null?void 0:le.outputTokens)??((ie=l.status)==null?void 0:ie.streamedOutputTokens)??0))}function zo(s,r){const g=l.composerMetrics[s],p=Number.isFinite(r)?Math.max(0,r):0;if(!g.initialized){g.display=p,g.target=p,g.initialized=!0;return}Math.abs(g.target-p)<.001||(g.target=p,g.bump+=1,Yp())}function Yp(){if(v)return;const s=()=>{let r=!1;for(const g of Object.values(l.composerMetrics)){const p=g.target-g.display;if(Math.abs(p)<.01){g.display=g.target;continue}const b=Math.min(.42,Math.max(.14,Math.abs(p)>1e3?.32:.2)),S=Math.sin(Date.now()/90)*Math.min(Math.abs(p)*.018,g.target*.006+1);g.display+=p*b+S,g.display<0&&(g.display=0),r=!0}r?v=requestAnimationFrame(s):v=0};v=requestAnimationFrame(s)}function Ho(s){return`bump-${l.composerMetrics[s].bump%2}`}function Jp(s=[]){return new Map(s.map(r=>[String(r.taskId||r.agentId||r.description||r.type),r.status]))}function us(s){return String((s==null?void 0:s.taskId)||(s==null?void 0:s.agentId)||(s==null?void 0:s.sessionId)||"")}function jo(s){return String((s==null?void 0:s.description)||(s==null?void 0:s.command)||(s==null?void 0:s.type)||"后台任务").replace(/\s+/g," ").trim()||"后台任务"}function Ys(s){const r=jo(s);return r.length>72?`${r.slice(0,72)}…`:r}function Cc(s){if((s==null?void 0:s.kind)==="agent"&&Number(s==null?void 0:s.runGeneration)>1)return"";const r=s==null?void 0:s.createdAt,g=Number(r),p=Number.isFinite(g)&&g>0?g:Date.parse(String(r||""));return!Number.isFinite(p)||p<=0?"":pi((s!=null&&s.completedAt?Date.parse(s.completedAt):l.clockTick)-p)}function Ic(s){return String((s==null?void 0:s.prompt)||(s==null?void 0:s.command)||"").trim()}function Wo(s){var r;return String(((r=s==null?void 0:s.progress)==null?void 0:r.currentAction)||"").trim()}function Ko(s){var r;return Array.isArray((r=s==null?void 0:s.progress)==null?void 0:r.steps)?s.progress.steps:[]}function Xp(s){return sr(String((s==null?void 0:s.output)||""))}function li(s){l.backgroundTaskDetail={...s},document.body.classList.add("tool-detail-open")}function ci(){l.backgroundTaskDetail=void 0,document.body.classList.remove("tool-detail-open")}function eh(s="ready"){return{ready:"就绪",running:"运行中",preparing:"准备中",calling_model:"调用模型",thinking:"推理中",running_tools:"调用工具",injecting_context:"注入上下文",compacting:"压缩上下文",stopped:"已停止",error:"出错"}[s]||s}function Js(s){return i[s]||s||"未知"}function Vo(s){return o[s]||s}function th(s){return(s||[]).map(r=>({value:r,label:a[r]||r}))}function nh(s){return((s==null?void 0:s.options)||[]).map(r=>({value:r,label:r||"默认"}))}function sh(s){return!["ansi","plain","diff"].includes(s.format)&&["assistant","thinking","system","tool"].includes(s.kind)}function rh(s){return JSON.stringify((s==null?void 0:s.inputSchema)||{},null,2)}function Mc(s){return s!=null&&s.cacheStable?"稳定缓存段":"动态段"}function Go(s){l.runtimeContextModal=s,l.runtimeContextDetail=void 0,document.body.classList.add("runtime-context-open"),s==="plugins"&&xo(),s==="tools"&&Yr()}function qo(){l.runtimeContextDetail=void 0,l.runtimeContextModal="",document.body.classList.remove("runtime-context-open")}function Zo(){l.runtimeContextDetail=void 0}function ih(){l.projectContextOpen=!0,l.projectContextDocument=void 0,document.body.classList.add("runtime-context-open")}function oh(s){l.projectContextDocument=s}function Qo(){if(l.projectContextDocument){l.projectContextDocument=void 0;return}l.projectContextOpen=!1,document.body.classList.remove("runtime-context-open")}async function ah(){l.cwdPicker.open=!0,l.cwdPicker.input=l.cwd||"",l.cwdPicker.selectionExplicit=!1,l.cwdPicker.error="",document.body.classList.add("cwd-picker-lock"),await di(l.cwd)}function ui(){l.cwdPicker.mutating||(l.cwdPicker.open=!1,l.cwdPicker.error="",document.body.classList.remove("cwd-picker-lock"))}async function di(s=l.cwdPicker.input){l.cwdPicker.loading=!0,l.cwdPicker.error="";try{const r=new URL("/api/cwd",window.location.origin);String(s||"").trim()&&r.searchParams.set("path",String(s).trim());const g=await fetch(N(`${r.pathname}${r.search}`)),p=await g.json().catch(()=>({}));if(!g.ok||p!=null&&p.error||(p==null?void 0:p.ok)===!1)throw js(p,g.status);Yo(p)}catch(r){l.cwdPicker.error=sn(r,"无法打开路径")}finally{l.cwdPicker.loading=!1}}function lh(s){return String(s||"").replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean).at(-1)||String(s||"")}function Yo(s){const r=String(s.cwd||""),g={name:lh(r),path:r};l.cwdPicker.cwd=r,l.cwdPicker.parent=s.parent||"",l.cwdPicker.home=s.home||"",l.cwdPicker.locations=Array.isArray(s.locations)?s.locations:l.cwdPicker.locations,l.cwdPicker.entries=Array.isArray(s.entries)?s.entries:[],l.cwdPicker.input=r,l.cwdPicker.selectedPath=s.fallback?"":r,l.cwdPicker.selectionExplicit=!1,l.cwdPicker.treeRoots=[g],l.cwdPicker.treeChildren={[r]:l.cwdPicker.entries},l.cwdPicker.treeExpanded={[r]:!0}}async function ch(s){const r=new URL("/api/cwd",window.location.origin);r.searchParams.set("path",s);const g=await fetch(N(`${r.pathname}${r.search}`)),p=await g.json().catch(()=>({}));if(!g.ok||p!=null&&p.error||(p==null?void 0:p.ok)===!1)throw js(p,g.status);return Array.isArray(p.locations)&&(l.cwdPicker.locations=p.locations),p}async function uh(s){const r=s.path;if(l.cwdPicker.treeExpanded[r]){l.cwdPicker.treeExpanded={...l.cwdPicker.treeExpanded,[r]:!1};return}l.cwdPicker.error="";try{if(!l.cwdPicker.treeChildren[r]){const g=await ch(r);l.cwdPicker.treeChildren={...l.cwdPicker.treeChildren,[r]:g.entries||[]}}l.cwdPicker.treeExpanded={...l.cwdPicker.treeExpanded,[r]:!0}}catch(g){l.cwdPicker.error=sn(g,"无法展开路径")}}function dh(s){l.cwdPicker.selectedPath=s.path,l.cwdPicker.selectionExplicit=!0,l.cwdPicker.input=s.path}async function fh(){const s=String(l.cwdPicker.input||"").trim();if(s){l.cwdPicker.mutating=!0,l.cwdPicker.error="";try{const r=await Ge("/api/cwd/create",{path:s});Yo(r)}catch(r){l.cwdPicker.error=sn(r,"新建失败")}finally{l.cwdPicker.mutating=!1}}}async function gh(s){if(await zs({title:"删除文件夹?",message:s.path,confirmLabel:"删除",tone:"danger"})){l.cwdPicker.mutating=!0;try{const g=await Ge("/api/cwd/delete",{path:s.path});Yo(g)}catch(g){l.cwdPicker.error=sn(g,"删除失败")}finally{l.cwdPicker.mutating=!1}}}async function ph(){const s=String(l.cwdPicker.selectionExplicit?l.cwdPicker.selectedPath:l.cwdPicker.input).trim();if(s&&!(!l.cwdPicker.selectionExplicit&&s===l.cwdPicker.cwd&&s!==l.cwd)){l.cwdPicker.mutating=!0,l.cwdPicker.error="";try{const r=await Ge("/api/cwd/change",{path:s});l.cwd=r.cwd||s,l.cwdPicker.open=!1,document.body.classList.remove("cwd-picker-lock"),await Qr(),ye(r.unchanged?"工作目录未变":"工作目录已切换")}catch(r){l.cwdPicker.error=sn(r,"切换失败")}finally{l.cwdPicker.mutating=!1}}}function hh(s){l.runtimeContextDetail={kind:"prompt",title:s.name,meta:Mc(s),content:s.content}}function mh(){var s,r,g,p;l.runtimeContextDetail={kind:"prompt",title:"完整系统提示词",meta:`${rn(((r=(s=l.runtimeContext)==null?void 0:s.prompt)==null?void 0:r.chars)||0)} 字符`,content:((p=(g=l.runtimeContext)==null?void 0:g.prompt)==null?void 0:p.systemPrompt)||""}}function bh(s){s&&(l.runtimeContextDetail={kind:"tool",title:s.name,meta:s.strict?"严格模式":"兼容模式",description:s.description||"",schema:rh(s)})}function fi(s){if(Oo(s))return yh(s);if(gi(s))return na(s);if(ds(s).length)return Fc(s);if(wh(s))return Th(s);if(xh(s))return Sh(s);const r=Hn(s),g=zc(s),p=g.map(K=>`${K.kind}:${K.reference||""}:${K.url}:${K.label||K.downloadName||""}:${K.expiresAt||""}`).join("|"),b=[s.id,s.kind,s.format,s.title,s.titleStatus,s.live?"1":"0",p,r].join(""),S=Y.get(b);if(S!==void 0)return S;let C;return s.format==="diff"?C=Oc(r):s.format==="ansi"||!sh(s)?C=au(Ze(sr(r))):C=Mh(er(Re.parse(r||""),g.map(Hc)),g),Y.set(b,C),C}function kh(s){if(!s)return"";if(Dt(s))return Ph(s);const r=Hn(s);if(s.format==="diff"||/(?:^|\n)---\s+.+\n\+\+\+\s+/.test(r))return Oc(r);if(s.format==="ansi")return`<pre class="tool-detail-pre">${Ze(sr(r))}</pre>`;const g=ta(r);if(g){const p=JSON.stringify(g,null,2);return er(Re.parse(`\`\`\`json
|
|
115
|
+
${p}
|
|
116
|
+
\`\`\``))}return`<pre class="tool-detail-pre">${Ze(sr(r))}</pre>`}function yh(s){const r=_h(s),g=Array.isArray(r==null?void 0:r.items)?r.items:[];if(!r||!g.length)return er(Re.parse(Hn(s)||""));const p=Nc(g),b=Number.isFinite(Number(r.completed))?Number(r.completed):p.completed,S=Number.isFinite(Number(r.total))?Number(r.total):p.total,C=S>0?Math.max(0,Math.min(100,b/S*100)):0,K=Ze(r.title||"任务计划"),le=Rc(g),ie=r.note?`<div class="plan-note"><span>说明</span><p>${Ze(r.note)}</p></div>`:"";return`<section class="plan-card"><div class="plan-card-head"><div><span class="plan-kicker">执行计划</span><strong>${K}</strong></div><span class="plan-progress-label">${b} / ${S}</span></div><div class="plan-progress-track" aria-label="计划进度 ${Math.round(C)}%"><span style="width:${C.toFixed(2)}%"></span></div><ol class="plan-items">${le}</ol>${ie}</section>`}function Rc(s,r=0){return s.map((g,p)=>{const b=Lc(g==null?void 0:g.status),S=b==="completed"?"✓":b==="in_progress"?"●":b==="failed"?"!":String(p+1),C=Array.isArray(g==null?void 0:g.subitems)?g.subitems:[],K=C.length?`<ol class="plan-subitems" aria-label="${Ze((g==null?void 0:g.description)||`步骤 ${p+1}`)}的子步骤">${Rc(C,r+1)}</ol>`:"";return`<li class="plan-item status-${b}" data-plan-depth="${r}"><div class="plan-item-row"><span class="plan-item-marker" aria-hidden="true">${S}</span><span class="plan-item-text">${Ze((g==null?void 0:g.description)||`步骤 ${p+1}`)}</span><span class="plan-item-status">${vh(b)}</span></div>${K}</li>`}).join("")}function Nc(s){return s.reduce((r,g)=>{if(r.total+=1,Lc(g==null?void 0:g.status)==="completed"&&(r.completed+=1),Array.isArray(g==null?void 0:g.subitems)&&g.subitems.length){const p=Nc(g.subitems);r.total+=p.total,r.completed+=p.completed}return r},{total:0,completed:0})}function _h(s){const r=String((s==null?void 0:s.text)||""),g=ta(r),p=g!=null&&g.output&&typeof g.output=="object"?g.output:g;if(Array.isArray(p==null?void 0:p.items))return p;const b=r.split(/\r?\n/).map(ie=>ie.trim()).filter(Boolean),S=/^(\d+)\s*\/\s*(\d+)\s+completed/i.exec(b[0]||""),K=b.filter(ie=>/^[-*]\s+/.test(ie)).map(ie=>{let Ee=ie.replace(/^[-*]\s+/,"").trim(),qe="pending";return/^~~[\s\S]+~~$/.test(Ee)?(qe="completed",Ee=Ee.slice(2,-2).trim()):/^[▶►●]\s*/.test(Ee)?(qe="in_progress",Ee=Ee.replace(/^[▶►●]\s*/,"").trim()):/^[!✗×]\s*/.test(Ee)&&(qe="failed",Ee=Ee.replace(/^[!✗×]\s*/,"").trim()),{description:Ee,status:qe}});return{title:"当前执行计划",note:b.slice(S?1:0).filter(ie=>!/^[-*]\s+/.test(ie)).join(" "),items:K,completed:S?Number(S[1]):K.filter(ie=>ie.status==="completed").length,total:S?Number(S[2]):K.length}}function Lc(s){const r=String(s||"pending").toLowerCase().replace(/[\s-]+/g,"_");return r==="complete"||r==="done"?"completed":r==="running"||r==="inprogress"?"in_progress":r==="error"?"failed":["completed","in_progress","failed","pending"].includes(r)?r:"pending"}function vh(s){return{completed:"已完成",in_progress:"进行中",failed:"失败",pending:"待处理"}[s]||"待处理"}function Oc(s){return`<pre class="diff-block">${Ze(s)}</pre>`}function gi(s){return Dt(s)&&/\b(ok|failed|generated|edited|image\s+(?:generate|edit)\s+failed)\b/i.test(String((s==null?void 0:s.text)||""))}function wh(s){const r=String((s==null?void 0:s.title)||"").toLowerCase();return(s==null?void 0:s.kind)==="tool"&&r==="image_note"}function xh(s){const r=String((s==null?void 0:s.title)||"").toLowerCase();return(s==null?void 0:s.kind)==="tool"&&r==="skill_read"}function Sh(s){return er(Re.parse(`技能${Eh((s==null?void 0:s.text)||"")}`))}function Eh(s){var b,S,C;const r=String(s||""),g=((b=/\bname:\s*([^\s]+)/i.exec(r))==null?void 0:b[1])||((S=/(?:^|\s)skill:\s*([^\s]+)/i.exec(r))==null?void 0:S[1])||((C=/(?:^|\s)id:\s*([^\s]+)/i.exec(r))==null?void 0:C[1]),p=String(g||"").trim();return p||""}function Th(s){return er(Re.parse(`图片记录${Ah((s==null?void 0:s.text)||"")}`))}function Ah(s){const r=Ch(s);return r?` ${r}`:""}function Ch(s){var K,le,ie,Ee,qe;const r=String(s||""),g=(K=/(?:^|\s)(?:storagePath|path|file|filename):\s*([^\s]+\.(?:png|jpe?g|webp|gif|bmp|avif|txt))/i.exec(r))==null?void 0:K[1],p=g?Jo(g.split(/[\\/]/).pop()||""):"";if(p)return p;const b=(le=/(?:^|\s)imageRef:\s*([^\s]+)/i.exec(r))==null?void 0:le[1],S=Jo(b||"");if(S)return S;const C=((ie=/(?:^|\s)tags:\s*(?:[-*]\s*)?([^\n\r,,]+)/i.exec(r))==null?void 0:ie[1])||((Ee=/(?:^|\s)detectedText:\s*(?:[-*]\s*)?([^\n\r,,]+)/i.exec(r))==null?void 0:Ee[1])||((qe=/(?:^|\s)caption:\s*([^.,,。;\n\r]{2,24})/i.exec(r))==null?void 0:qe[1]);return Jo(C||"")}function Jo(s){let r=String(s||"").trim();return r=r.replace(/\.base64\.txt$/i,"").replace(/\.(?:png|jpe?g|webp|gif|bmp|avif|txt)$/i,""),r=r.replace(/^[-*]\s*/,"").replace(/[_-]+/g," ").replace(/\s+/g," ").trim(),!r||/^ok$/i.test(r)?"":r.length>18?`${r.slice(0,18)}...`:r}async function Dc(){if(!(h||!f)){h=!0;try{if(!await Pc(f))throw new Error("无法重新绑定目标会话")}catch(s){ye(`会话恢复失败:${s.message||s}`)}finally{h=!1}}}async function Pc(s){var p;const r=String(s||"").trim();return!r||(Xo(),f=r,m=!1,sessionStorage.setItem(ms,r),!await os({silent:!0})||String(((p=l.session)==null?void 0:p.sessionId)||"")!==r)?!1:(Jr(),!0)}async function $c(s,r){Xo(),u=s,f=r,m=!r,sessionStorage.setItem(Oi,s),r?sessionStorage.setItem(ms,r):sessionStorage.removeItem(ms);const g=await os({silent:!0});return g&&Jr(),g}function Xo(){ve&&ve.close(),ve=void 0,Be&&cancelAnimationFrame(Be),Be=0,Xr(),_t=void 0,Tt=!1,l.connected=!1,l.connecting=!0}function ds(s){return Array.isArray(s==null?void 0:s.resources)?s.resources.filter(r=>r&&typeof r=="object"&&typeof r.url=="string"&&r.url):[]}function ea(s){return ds(s).filter(r=>r.kind==="embed")}function Bc(s){return ds(s).filter(r=>r.kind!=="embed")}function Ih(s){const r=new URL(s.url,window.location.origin);return r.searchParams.set("theme",re.value),r.origin===window.location.origin?`${r.pathname}${r.search}${r.hash}`:r.href}function Uc(s){const r=Number(s==null?void 0:s.height);return Number.isFinite(r)?Math.max(240,Math.min(1600,Math.round(r))):640}function Fc(s){const r=Bc(s);return r.length?`<div class="resource-result"><div class="resource-grid">${r.map((p,b)=>{const S=Ze(p.label||p.downloadName||`资源 ${b+1}`),C=Ze(p.url),K=p.sizeBytes?ia(p.sizeBytes):"",le=p.expiresAt?Nh(p.expiresAt):"",ie=[K,le].filter(Boolean).join(" · "),Ee=p.kind==="download"||p.downloadName,qe=Ee?"下载":"打开",on=Ee?` download="${Ze(p.downloadName||p.label||"")}"`:' target="_blank" rel="noreferrer noopener"';if(Ee){const rr=Ze(K.replace(/\s+/g,"")),wi=Number(p.expiresAt)||0;return`<a class="resource-file-link" href="${C}"${on} data-resource-download="true" data-resource-expires-at="${wi}"><span class="resource-file-name">${S}</span>${rr?`<span class="resource-file-size">(${rr})</span>`:""}</a>`}return`<a class="resource-card resource-${Ze(p.kind||"link")}" href="${C}"${on}><span class="resource-icon" aria-hidden="true"></span><span class="resource-main"><strong>${S}</strong><span>${Ze(ie||(Ee?"文件已就绪":"资源已就绪"))}</span></span><span class="resource-action"><span>${qe}</span><i aria-hidden="true">${Ee?"↓":"↗"}</i></span></a>`}).join("")}</div></div>`:au(Ze(sr(Hn(s))))}function zc(s){if((s==null?void 0:s.kind)!=="assistant")return[];const r=l.lines||[],g=r.findIndex(C=>String(C==null?void 0:C.id)===String(s==null?void 0:s.id)),p=g>=0?g:r.length,b=[],S=new Set;for(let C=0;C<p;C+=1){const K=r[C];if(!(K!=null&&K.live))for(const le of ds(K))S.has(le.url)||(S.add(le.url),b.push(le))}return b}function Mh(s,r){if(!r.length)return s;const g=new Map(r.map(b=>[Hc(b),b]).filter(([b])=>b)),p=document.createElement("template");p.innerHTML=String(s||"");for(const b of p.content.querySelectorAll("a[href]")){const S=b.getAttribute("href")||"",C=g.get(S);C&&(b.classList.add("inline-resource-link",`inline-resource-${C.kind||"link"}`),b.setAttribute("href",C.url),(C.kind==="download"||C.downloadName)&&(b.setAttribute("download",C.downloadName||C.label||""),b.removeAttribute("target"),b.removeAttribute("rel"),b.setAttribute("title",`下载 ${C.label||C.downloadName||"资源"}`),b.dataset.resourceDownload="true",b.dataset.resourceExpiresAt=String(Number(C.expiresAt)||0),C.sizeBytes&&(b.dataset.resourceSize=`(${ia(C.sizeBytes).replace(/\s+/g,"")})`)))}return p.innerHTML}function Hc(s){return String((s==null?void 0:s.reference)||"").trim()}function ta(s){const r=String(s||"");if(!r.includes("{"))return null;const g=Rh(r);g.sort((p,b)=>p.start-b.start||b.end-p.end);for(const{start:p,end:b}of g)try{return JSON.parse(r.slice(p,b+1))}catch{}return null}function Rh(s){const r=[],g=[];let p=!1,b=!1;for(let S=0;S<s.length;S+=1){const C=s[S];if(p){b?b=!1:C==="\\"?b=!0:C==='"'?p=!1:(C===`
|
|
117
|
+
`||C==="\r")&&(p=!1,b=!1);continue}if(g.length&&C==='"'){p=!0;continue}if(C==="{"){g.push(S);continue}C==="}"&&g.length&&r.push({start:g.pop(),end:S})}return r}function Nh(s){const r=Number(s);if(!Number.isFinite(r))return"";const g=r-Date.now();return g<=0?"已过期":`${pi(g)} 后过期`}function Lh(s){return mi(s).length||gi(s)?na(s):Oh(s)}function Oh(s){const r=Dh(s),g=r.prompt?`<div class="image2-stage-prompt"><p>${Ze(qp(r.prompt,240))}</p></div>`:"";return`<div class="image2-stage"><div class="image2-diamond-field" aria-hidden="true">${Array.from({length:11},(b,S)=>`<i class="diamond-${S+1}"></i>`).join("")}<b></b></div>${g}</div>`}function Dh(s){const r=ta((s==null?void 0:s.text)||"")||{},g=r.input||r.arguments||r.args||r;return{mode:String(g.mode||"").toLowerCase(),model:String(g.model||""),size:String(g.size||""),prompt:String(g.prompt||"")}}function na(s){const r=jc(s.text||""),g=String(s.text||""),p=/\bfail(?:ed)?\b|failed/i.test(g)?"生成失败":/^edited\b/i.test(g.trim())?"修改完成":"生成完成",b=[r.count?`${r.count} 张`:"",r.model,r.size,r.quality,r.outputFormat,r.sourceImages?`源图 ${r.sourceImages} 张`:"",r.duration].filter(Boolean);return`<div class="image2-result"><div class="image2-summary"><strong>${Ze(p)}</strong>${b.map(S=>`<span>${Ze(S)}</span>`).join("")}</div></div>`}function Ph(s){const r=jc((s==null?void 0:s.text)||""),g=[["模型",r.model],["模式",r.mode],["尺寸",r.size],["质量",r.quality],["格式",r.outputFormat],["背景",r.background],["图片数量",r.count?`${r.count} 张`:""],["源图数量",r.sourceImages?`${r.sourceImages} 张`:""],["耗时",r.duration],["语义名称",r.semanticName],["开始时间",r.startedAt],["完成时间",r.finishedAt]].filter(([,C])=>C),p=g.length?`<dl class="image2-detail-grid">${g.map(([C,K])=>`<div><dt>${Ze(C)}</dt><dd>${Ze(K)}</dd></div>`).join("")}</dl>`:"",b=r.prompt?`<section class="image2-detail-prompt"><span>调用提示词</span><p>${Ze(r.prompt)}</p></section>`:'<section class="image2-detail-prompt empty"><span>调用提示词</span><p>当前历史记录未保存提示词;新执行的 image2 调用会在这里显示。</p></section>',S=r.revisedPrompt&&r.revisedPrompt!==r.prompt?`<section class="image2-detail-prompt"><span>修订提示词</span><p>${Ze(r.revisedPrompt)}</p></section>`:"";return`<div class="image2-detail-view">${p}${b}${S}</div>`}function jc(s){const r=String(s||""),g=r.replace(/\s+/g," ").trim(),p=r.split(/\r?\n/).map(le=>le.trim()).filter(Boolean),b=/^(generated|edited)\s+(\d+)\s+images?/i.exec(p[0]||g),C=(p.find(le=>le.includes(" · "))||"").split(" · ").map(le=>le.trim()).filter(Boolean),K=$h(g,["duration","durationMs","elapsed","elapsedMs"]);return{provider:ft(g,"provider",["model","prompt"])||C[0]||"",model:ft(g,"model",["prompt"])||C[1]||"",prompt:ft(g,"prompt",["revisedPrompt","mode","semanticName","size","quality","outputFormat","background","returnedImages","startedAt","finishedAt","duration"]),mode:ft(g,"mode",["semanticName","prompt","size","quality"]),semanticName:ft(g,"semanticName",["prompt","size","quality","outputFormat"]),size:ft(g,"size",["quality","outputFormat","background","returnedImages","duration"])||C.find(le=>/^\d+x\d+$/i.test(le))||"",quality:ft(g,"quality",["outputFormat","background","returnedImages","duration"])||C.find(le=>["low","medium","high"].includes(le.toLowerCase()))||"",outputFormat:ft(g,"outputFormat",["background","returnedImages","images","duration"])||C.find(le=>["png","jpeg","jpg","webp"].includes(le.toLowerCase()))||"",background:ft(g,"background",["returnedImages","images","startedAt","finishedAt","duration"]),sourceImages:ft(g,"source images",["prompt","mode","semanticName","duration"]),count:ft(g,"returnedImages",["images","index","duration"])||(b==null?void 0:b[2])||"",revisedPrompt:ft(g,"revisedPrompt",["mode","semanticName","raw","created","data","b64_json","background","output_format","quality","size","usage","startedAt","finishedAt","duration"]),usage:ft(g,"usage",["duration"]),startedAt:ft(g,"startedAt",["finishedAt","duration"]),finishedAt:ft(g,"finishedAt",["duration"]),duration:K===void 0?"":pi(K)}}function ft(s,r,g){var C;const p=g.length?`(?=\\s(?:${g.map(Xs).join("|")}):)`:"$",S=new RegExp(`(?:^|\\s)${Xs(r)}:\\s*([\\s\\S]*?)${p}`,"i").exec(s);return((C=S==null?void 0:S[1])==null?void 0:C.replace(/\[(?:base64 image|data URL) omitted[^\]]*\]/gi,"").trim().replace(/\s{2,}/g," "))||""}function $h(s,r){for(const g of r){const p=new RegExp(`(?:^|\\s)${Xs(g)}:\\s*(\\d+(?:\\.\\d+)?)\\s*ms?\\b`,"i").exec(s);if(p)return Number(p[1])}}function pi(s){const r=Math.max(0,Number(s)||0);if(r<1e3)return`${Math.round(r)}ms`;if(r<6e4)return`${(r/1e3).toFixed(r<1e4?1:0).replace(/\.0$/,"")}s`;const g=Math.floor(r/6e4),p=Math.round(r%6e4/1e3);return`${g}m ${p}s`}function Xs(s){return String(s).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function er(s,r=[]){const g=new Set(r.map(K=>String(K||"").trim()).filter(Boolean)),p=document.createElement("template");p.innerHTML=String(s);const b=new Set(["A","P","BR","STRONG","B","EM","I","CODE","PRE","BLOCKQUOTE","UL","OL","LI","H1","H2","H3","H4","H5","H6","HR","TABLE","THEAD","TBODY","TR","TH","TD","DEL","S","INPUT"]),S=document.createTreeWalker(p.content,NodeFilter.SHOW_ELEMENT),C=[];for(;S.nextNode();)C.push(S.currentNode);for(const K of C){if(!b.has(K.tagName)){K.replaceWith(document.createTextNode(K.textContent||""));continue}for(const le of Array.from(K.attributes)){const ie=le.name.toLowerCase(),Ee=le.value;K.tagName==="A"&&ie==="href"&&(_m(Ee)||g.has(Ee))||K.tagName==="A"&&ie==="title"||K.tagName==="CODE"&&ie==="class"&&/^language-[\w-]+$/.test(Ee)||K.tagName==="PRE"&&ie==="data-lang"&&/^[\w-]+$/.test(Ee)||K.tagName==="INPUT"&&["type","checked","disabled"].includes(ie)||K.removeAttribute(le.name)}K.tagName==="A"&&!g.has(K.getAttribute("href")||"")&&(K.setAttribute("target","_blank"),K.setAttribute("rel","noreferrer noopener"))}return Bh(p.content),p.innerHTML}function Bh(s){for(const r of s.querySelectorAll("pre > code")){const g=Uh(r.className),p=r.textContent||"",b=r.parentElement;b&&g&&b.setAttribute("data-lang",g);try{const S=g&&We.getLanguage(g)?We.highlight(p,{language:g,ignoreIllegals:!0}):p.length<=2e4?We.highlightAuto(p):void 0;if(!S)continue;r.innerHTML=S.value,r.className=["hljs",S.language?`language-${S.language}`:g?`language-${g}`:""].filter(Boolean).join(" "),b&&S.language&&!b.hasAttribute("data-lang")&&b.setAttribute("data-lang",S.language)}catch{r.textContent=p}}}function Uh(s){const r=/(?:^|\s)language-([\w-]+)/.exec(s||"")||/(?:^|\s)lang-([\w-]+)/.exec(s||"");if(!r)return"";const g=r[1].toLowerCase();return{cjs:"javascript",mjs:"javascript",node:"javascript",shell:"bash",zsh:"bash",powershell:"bash",ps1:"bash",python3:"python",yml:"yaml",html:"xml",vue:"xml"}[g]||g}function Fh(s){s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),oc())}function Wc(s){var r;if(s.key==="Escape"&&l.confirmDialog.open){s.preventDefault(),as(!1);return}if(s.key==="Escape"&&l.contextWindowModalOpen){s.preventDefault(),Ao();return}if(s.key==="Escape"&&l.compactionDetailLineId!==void 0){s.preventDefault(),si();return}if(s.key==="Escape"&&l.backgroundTaskDetail){s.preventDefault(),ci();return}if(s.key==="Escape"&&l.projectContextOpen){s.preventDefault(),Qo();return}if(s.key==="Escape"&&l.cwdPicker.open){s.preventDefault(),ui();return}if(s.key==="Escape"&&l.runtimeContextDetail){s.preventDefault(),Zo();return}if(s.key==="Escape"&&l.runtimeContextModal){s.preventDefault(),qo();return}if(s.key==="Escape"&&l.imagePreview){s.preventDefault(),$o();return}if(s.key==="Escape"&&l.toolDetailLineId!==void 0){s.preventDefault(),Gs();return}(s.ctrlKey||s.metaKey)&&s.key.toLowerCase()==="k"&&(s.preventDefault(),(r=oe.value)==null||r.focus()),(s.ctrlKey||s.metaKey)&&s.key.toLowerCase()==="c"&&!R.value&&ac()}function zh(){var s;try{const r=localStorage.getItem(Ld);if(r==="light"||r==="dark")return r}catch{}return(s=window.matchMedia)!=null&&s.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}function Hh(s){var r,g,p,b;document.documentElement.dataset.theme=s,document.documentElement.style.colorScheme=s,(r=document.querySelector('meta[name="theme-color"]'))==null||r.setAttribute("content",s==="dark"?"#0c0c0f":"#ffffff"),(b=(p=(g=window.__TAURI__)==null?void 0:g.core)==null?void 0:p.invoke)==null||b.call(p,"sync_window_theme",{theme:s}).catch(()=>{});try{localStorage.setItem(Ld,s)}catch{}}function Kc(){re.value=re.value==="dark"?"light":"dark"}async function jh(s){var p;const r=Array.from(((p=s.clipboardData)==null?void 0:p.files)||[]).filter(b=>b.type.startsWith("image/"));if(!r.length)return;s.preventDefault();const g=[];for(const b of r){const S=++l.attachmentCounter,C=`[img#${S}]`,K=await nu(b);K.compressionRate>0&&g.push(K.compressionRate),l.attachments.push({kind:"image",imageId:Gc(),label:C,mimeType:K.mimeType,data:K.data,previewUrl:K.previewUrl,name:b.name||`图片 ${S}`})}ye(`已添加 ${r.length} 张图片附件`),g.length&&setTimeout(()=>ye(ru(g)),0)}function Wh(){var s;(s=ne.value)==null||s.click()}async function Kh(s){var g;const r=Array.from(((g=s==null?void 0:s.target)==null?void 0:g.files)||[]);r.length&&(await Vc(r),s!=null&&s.target&&(s.target.value=""))}async function Vc(s){var r;l.uploadingFiles=!0;try{const g=[],p=[];for(const b of s){if(b.type.startsWith("image/")){const K=await nu(b),le=`[img#${++l.attachmentCounter}]`;K.compressionRate>0&&p.push(K.compressionRate),g.push({kind:"image",imageId:Gc(),label:le,name:b.name||le,mimeType:K.mimeType,data:K.data,previewUrl:K.previewUrl});continue}const S=await om(b),C=await Ge("/api/uploads",{name:b.name,mimeType:b.type||"application/octet-stream",data:S.data});if(!((r=C==null?void 0:C.file)!=null&&r.absolutePath))throw new Error("upload response missing path");g.push({kind:"file",label:`[file#${++l.attachmentCounter}]`,name:C.file.name||b.name||`附件 ${l.attachmentCounter}`,mimeType:C.file.mimeType||b.type||"application/octet-stream",size:Number(C.file.size||b.size||0),absolutePath:C.file.absolutePath,relativePath:C.file.relativePath||""})}l.attachments.push(...g),p.length&&setTimeout(()=>ye(ru(p)),0),ye(`已上传 ${g.length} 个附件`)}catch(g){ye(g.message||String(g))}finally{l.uploadingFiles=!1}}function Gc(){return typeof(crypto==null?void 0:crypto.randomUUID)=="function"?`image_${crypto.randomUUID()}`:`image_${Date.now().toString(16).slice(-8).padStart(8,"0")}-${Math.random().toString(16).slice(2,6).padEnd(4,"0")}-4${Math.random().toString(16).slice(2,5).padEnd(3,"0")}-a${Math.random().toString(16).slice(2,5).padEnd(3,"0")}-${Math.random().toString(16).slice(2,14).padEnd(12,"0")}`}function qc(s,r){if(!r.length)return s;const g=r.map(p=>p.label).join(" ");return s.trim()?`${s.trim()}
|
|
118
|
+
|
|
119
|
+
${g}`:g}function Vh(s){return String(s).replace(/\s*\[img#\d+\]\s*/g," ").replace(/[ \t]{2,}/g," ").trim()}function Gh(s){return String(s).replace(CT,"").replace(IT,"").replace(MT,"").replace(/[ \t]{2,}/g," ").trim()}function qh(s){return String(s||"").replace(new RegExp(`${Xs(RT)}[\\s\\S]*?${Xs(NT)}`,"g"),"").replace(/[ \t]{2,}/g," ").replace(/\n{3,}/g,`
|
|
120
|
+
|
|
121
|
+
`).trim()}function hi(s){return Array.from(new Set(String(s||"").match(/\[img#\d+\]/g)||[]))}function Zc(s){var p;const r=String(((p=l.session)==null?void 0:p.sessionId)||f||""),g=s.filter(b=>(b==null?void 0:b.kind)==="image"&&b.imageId&&b.previewUrl).map(b=>({sessionId:r,imageId:b.imageId,label:b.label,mimeType:b.mimeType,previewUrl:b.previewUrl,originalUrl:b.previewUrl,name:b.name,available:!0,pending:!0}));Qc(g)}function Zh(s){const r=[];for(const g of s||[])ki(g,r);Qc(r.map(sa).filter(Boolean))}function tr(s){var g;const r=String((s==null?void 0:s.sessionId)||((g=l.session)==null?void 0:g.sessionId)||f||"");return s!=null&&s.imageId?`${r}:image:${s.imageId}`:s!=null&&s.messageId&&Number.isInteger(Number(s==null?void 0:s.blockIndex))?`${r}:block:${s.messageId}:${Number(s.blockIndex)}`:""}function Qc(s){if(!s.length)return;const r=s.map(p=>{var b;return{...p,sessionId:String(p.sessionId||((b=l.session)==null?void 0:b.sessionId)||f||"")}}),g=new Set(r.map(tr).filter(Boolean));l.messageImagePreviews=[...l.messageImagePreviews.filter(p=>{const b=tr(p);return!b||!g.has(b)}),...r].slice(-200)}function mi(s){var p;if(Dt(s))return Qh(s);const r=(s==null?void 0:s.kind)==="user"?Yc(s):[s],g=[];for(const b of r){g.push(...bi(b));for(const S of hi(b==null?void 0:b.text)){const C=String(((p=l.session)==null?void 0:p.sessionId)||f||""),K=l.messageImagePreviews.filter(ie=>ie.sessionId===C&&ie.label===S),le=String((b==null?void 0:b.messageId)||"").startsWith("web-user-")?[...K].reverse().find(ie=>ie.pending):K.length===1?K[0]:void 0;le&&g.push(le)}}return ra(g)}function Qh(s){const r=[];ki(s,r);for(const g of Xh(s))ki(g,r);return ra(r.map(sa).filter(Boolean))}function bi(s){const r=[];return ki(s,r),ra(r.map(g=>sa(g)).filter(Boolean))}function Yc(s){if((s==null?void 0:s.kind)!=="user")return[s];const r=String((s==null?void 0:s.messageId)||"");return r?(l.lines||[]).filter(p=>(p==null?void 0:p.kind)==="user"&&String((p==null?void 0:p.messageId)||"")===r):[s]}function Yh(s){return s.some(r=>bi(r).length>0||hi(r==null?void 0:r.text).length>0)}function Jh(s){return s.find(r=>Hn(r))||s.find(r=>bi(r).length>0||hi(r==null?void 0:r.text).length>0)||s[0]}function Xh(s){const r=l.lines||[],g=String((s==null?void 0:s.toolUseId)||"");if(g)return r.filter(S=>yi(S)&&String((S==null?void 0:S.parentToolUseId)||"")===g);const p=r.findIndex(S=>(S==null?void 0:S.id)===(s==null?void 0:s.id));if(p<0)return[];const b=[];for(let S=p+1;S<r.length;S+=1){const C=r[S];if(yi(C)&&!Dt(C)){b.push(C);continue}if((C==null?void 0:C.kind)==="tool"||(C==null?void 0:C.kind)==="user"||(C==null?void 0:C.kind)==="assistant"&&String((C==null?void 0:C.text)||"").trim())break}return b}function ki(s,r){if(!s||typeof s!="object")return;const g=b=>{var S;return r.push({...b,messageId:b.messageId||s.messageId,sessionId:b.sessionId||((S=l.session)==null?void 0:S.sessionId)||f||""})},p=[s.images,s.imageAttachments,s.attachments,s.thumbnails];for(const b of p)if(Array.isArray(b))for(const S of b)!S||S.kind&&S.kind!=="image"||S.type&&S.type!=="image"||g(S);if(Array.isArray(s.blocks))for(const b of s.blocks)(b==null?void 0:b.type)==="image"&&g(b);s.image&&g(s.image)}function sa(s){var S,C,K,le,ie,Ee;if(!s||typeof s!="object")return;const r=s.mimeType||((S=s.thumbnail)==null?void 0:S.mimeType)||((C=s.original)==null?void 0:C.mimeType)||"image/png",g=s.thumbnailSrc||((K=s.thumbnail)==null?void 0:K.src)||s.previewUrl||s.src||s.originalSrc||((le=s.original)==null?void 0:le.src)||em(s.data,r);if(!g&&s.available!==!1)return;const p=g?lu(g):"",b=s.originalSrc||((ie=s.original)==null?void 0:ie.src)||s.src||s.previewUrl||g;return{sessionId:String(s.sessionId||((Ee=l.session)==null?void 0:Ee.sessionId)||f||""),messageId:s.messageId,blockIndex:Number.isInteger(Number(s.blockIndex??s.index))?Number(s.blockIndex??s.index):void 0,imageId:s.imageId,label:s.label,mimeType:r,available:s.available!==!1&&!!p,error:s.error,previewUrl:p,originalUrl:b?lu(b):"",name:s.name||s.filename||s.label,sizeBytes:s.sizeBytes,pending:s.pending===!0}}function em(s,r){return!s||typeof s!="string"?"":s.startsWith("data:")?s:`data:${r};base64,${s}`}function ra(s){const r=new Set,g=[];for(const[p,b]of s.entries()){const S=tr(b)||(b.previewUrl?`url:${b.previewUrl}`:`position:${b.messageId||"unknown"}:${b.blockIndex??p}`);r.has(S)||(r.add(S),g.push(b))}return g}function fs(s,r){return(s==null?void 0:s.label)||(s!=null&&s.name&&!/^\[img#\d+\]$/.test(s.name)?s.name:`图片 ${r+1}`)}function Jc(s,r){const g=tm(s==null?void 0:s.mimeType),p=((s==null?void 0:s.name)||(s==null?void 0:s.label)||`image-${r+1}`).replace(/[^\p{L}\p{N}._-]+/gu,"-").replace(/^-+|-+$/g,"")||`image-${r+1}`;return/\.[a-z0-9]{2,5}$/i.test(p)?p:`${p}.${g}`}function tm(s){const r=String(s||"").toLowerCase();return r.includes("jpeg")?"jpg":r.includes("webp")?"webp":r.includes("gif")?"gif":"png"}function yi(s){return(s==null?void 0:s.kind)==="tool"&&String((s==null?void 0:s.parentToolName)||"").toLowerCase()==="image2"}function nm(s){return yi(s)&&mi(s).length>0}function Xc(s){l.attachments=l.attachments.filter(r=>r.label!==s)}function eu(){return l.attachments.filter(s=>s.kind==="file")}function tu(){return l.attachments.filter(s=>s.kind==="image")}function sm(s,r){return(s==null?void 0:s.name)||`附件 ${r+1}`}function rm(s){return`${im(s)} · ${ia(s==null?void 0:s.size)}`}function im(s){const r=String((s==null?void 0:s.mimeType)||"").toLowerCase();return r?r.includes("pdf")?"PDF":r.includes("spreadsheet")||r.includes("excel")||r.includes("csv")?"表格":r.includes("word")||r.includes("document")?"文档":r.startsWith("text/")?"文本":r.startsWith("image/")?"图片":"文件":"文件"}function ia(s){const r=Number(s||0);return!Number.isFinite(r)||r<=0?"0 B":r<1024?`${r} B`:r<1024*1024?`${(r/1024).toFixed(r<10*1024?1:0).replace(/\.0$/,"")} KB`:r<1024*1024*1024?`${(r/(1024*1024)).toFixed(r<10*1024*1024?1:0).replace(/\.0$/,"")} MB`:`${(r/(1024*1024*1024)).toFixed(1).replace(/\.0$/,"")} GB`}async function nu(s){const r=await oa(s);return am(r,s.type||"image/png")}async function om(s){const r=await oa(s),g=r.indexOf(",");return{mimeType:s.type||"application/octet-stream",data:g>=0?r.slice(g+1):r}}async function oa(s){return new Promise((r,g)=>{const p=new FileReader;p.onload=()=>r(String(p.result||"")),p.onerror=()=>g(p.error||new Error("read failed")),p.readAsDataURL(s)})}async function am(s,r="image/png"){const g=su(s,r),p=lm(g.base64),b=await um(g.dataUrl).catch(()=>{});if(!b){const qe=aa(g.base64);if(!qe)throw new Error("图片格式异常,无法读取为有效图片");return{mimeType:g.mimeType,data:qe,previewUrl:`data:${g.mimeType};base64,${qe}`,compressionRate:0}}const S=Math.min(1,TT/Math.max(b.naturalWidth||b.width,b.naturalHeight||b.height));let C=Math.max(1,Math.round((b.naturalWidth||b.width)*S)),K=Math.max(1,Math.round((b.naturalHeight||b.height)*S)),le=.88,ie;for(let qe=0;qe<8&&(ie=await dm(b,C,K,"image/jpeg",le),!(ie.bytes<=AT||le<=La&&Math.max(C,K)<=1280));qe+=1)le>La?le=Math.max(La,le-.1):(C=Math.max(1,Math.round(C*.82)),K=Math.max(1,Math.round(K*.82)));const Ee=aa(ie==null?void 0:ie.base64);if(!Ee)throw new Error("图片格式异常,无法转换为有效图片");return{mimeType:ie.mimeType,data:Ee,previewUrl:`data:${ie.mimeType};base64,${Ee}`,compressionRate:cm(p,ie.bytes)}}function su(s,r){var C;const g=String(s||"").trim(),p=/^data:([^;,]+);base64,([\s\S]*)$/i.exec(g),b=(C=p==null?void 0:p[1])!=null&&C.startsWith("image/")?p[1]:r,S=p?p[2]:g;return{mimeType:b,base64:S,dataUrl:p?g:`data:${b};base64,${S}`}}function lm(s){const r=aa(s);if(!r)return 0;const g=r.endsWith("==")?2:r.endsWith("=")?1:0;return Math.max(0,Math.floor(r.length*.75)-g)}function cm(s,r){return!s||!r||r>=s?0:Math.round((1-r/s)*100)}function ru(s){const r=Math.max(...s);return s.length>1?`图片已压缩,最高压缩率为 ${r}%`:`图片已压缩,压缩率为 ${r}%`}function aa(s){let r=String(s||"").trim().replace(/^data:[^;,]+;base64,/i,"").replace(/\s+/g,"");if(!r)return"";r=r.replace(/-/g,"+").replace(/_/g,"/");const g=r.length%4;if(g&&(r+="=".repeat(4-g)),!/^[A-Za-z0-9+/]*={0,2}$/.test(r))return"";try{return atob(r),r}catch{return""}}function um(s){return new Promise((r,g)=>{const p=new Image;p.onload=()=>r(p),p.onerror=()=>g(new Error("image decode failed")),p.src=s})}async function dm(s,r,g,p,b){const S=document.createElement("canvas");S.width=r,S.height=g;const C=S.getContext("2d");if(!C)throw new Error("canvas unavailable");C.fillStyle="#fff",C.fillRect(0,0,r,g),C.drawImage(s,0,0,r,g);const K=await new Promise(Ee=>S.toBlob(Ee,p,b));if(!K)throw new Error("image encode failed");const le=await oa(K),ie=su(le,p);return{mimeType:ie.mimeType,base64:ie.base64,bytes:K.size}}function iu(){return window.matchMedia("(max-width: 820px)").matches?50:64}function nr(){const s=oe.value;s&&(s.style.height=`${iu()}px`,s.scrollTop=0)}function fm(){const s=oe.value;if(!s)return;s.style.height="auto";const r=window.innerHeight*(window.matchMedia("(max-width: 820px)").matches?.28:.34);s.style.height=`${Math.max(iu(),Math.min(s.scrollHeight,r))}px`}function la(s=96){const r=he.value;return r?r.scrollHeight-r.scrollTop-r.clientHeight<=s:!0}function gm(s){return String((s==null?void 0:s.id)??"")}function pm(s){const r=Bn.value[s];if(!r)return LT;if(Do(r))return ls(r)?Math.min(1200,72+r.lines.reduce((p,b)=>p+ca(b),0)):Math.max(72,52+Po(r).length*28);if(Ks(r))return 74;if(Vs(r))return 88;const g=ea(r);return g.length?64+g.reduce((p,b)=>p+Uc(b),0):Dt(r)||hm(r)?Math.max(560,ca(r)):ca(r)}function ca(s){const r=Hn(s),g=Math.max(1,r.split(`
|
|
122
|
+
`).length),p=Math.ceil(r.length/72);return Math.max(72,Math.min(1200,52+Math.max(g,p)*24))}function hm(s){return s!=null&&s.image||[s==null?void 0:s.images,s==null?void 0:s.imageAttachments,s==null?void 0:s.thumbnails].some(r=>Array.isArray(r)&&r.length)||Array.isArray(s==null?void 0:s.attachments)&&s.attachments.some(r=>(r==null?void 0:r.kind)==="image"||(r==null?void 0:r.type)==="image"||String((r==null?void 0:r.mimeType)||"").startsWith("image/"))?!0:Array.isArray(s==null?void 0:s.blocks)&&s.blocks.some(r=>(r==null?void 0:r.type)==="image")}function _i(){const s=he.value,r=ke.value;!s||!r||(D.value=Math.max(0,r.getBoundingClientRect().top-s.getBoundingClientRect().top+s.scrollTop))}function ua(){$&&($.disconnect(),he.value&&$.observe(he.value),ke.value&&$.observe(ke.value))}function mm(s){s instanceof Element&&Kr.value.measureElement(s)}function da(){Kr.value.measure()}function fa(){Ye||(Ye=requestAnimationFrame(()=>{Ye=0,bm()}))}function bm(){const s=he.value;s&&(s.scrollTop=s.scrollHeight)}function km(){if(Y.size<300)return;const s=new Set(l.lines.map(r=>r.id));for(const r of Y.keys()){const g=Number(String(r).split("",1)[0]);s.has(g)||Y.delete(r)}Y.size>500&&Y.clear()}function ye(s){l.toast=s,clearTimeout(rt),rt=setTimeout(()=>{l.toast=""},3600)}function ym(s){return["running","preparing","calling_model","thinking","running_tools","compacting","injecting_context"].includes(s)}function rn(s){if(s==null||!Number.isFinite(Number(s)))return"—";const r=Math.max(0,Math.round(Number(s)));return r>=1e6?`${ou(r/1e6)}m`:r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${ou(r/1e3)}k`:String(r)}function ou(s){return s>=10?s.toFixed(0):s.toFixed(1).replace(/\.0$/,"")}function sr(s){return String(s).replace(/\x1b\[[0-9;]*m/g,"")}function _m(s){try{const r=new URL(s,window.location.href);return["http:","https:","mailto:"].includes(r.protocol)}catch{return!1}}function Ze(s){return String(s).replace(/[&<>"']/g,r=>({"&":"&","<":"<",">":">",'"':""","'":"'"})[r])}function au(s){return s.replace(/(https?:\/\/[^\s<]+)/g,'<a target="_blank" rel="noreferrer noopener" href="$1">$1</a>')}function lu(s){const r=String(s||"");return r.startsWith("/api/images/")?N(r):r}function cu(){var s;(s=we.value)==null||s.removeAttribute("open")}function vi(s){if(cu(),s==="sessions")return ei();if(s==="prompts")return To();if(s==="settings")return Hs();l.activePanel="chat"}function uu(){return cu(),ti()}return(s,r)=>{var g,p,b,S,C,K,le,ie,Ee,qe,on,rr,wi;return k(),y(ce,null,[d("div",Yv,[d("aside",Jv,[d("div",Xv,[d("button",{class:"theme-toggle celestial-theme-toggle",type:"button","aria-label":qr.value,"aria-pressed":Gr.value,title:qr.value,onClick:Kc},[...r[35]||(r[35]=[Ou('<span class="theme-orbit-scene" aria-hidden="true"><i class="theme-cloud theme-cloud-one"></i><i class="theme-cloud theme-cloud-two"></i><i class="theme-star theme-star-one"></i><i class="theme-star theme-star-two"></i><i class="theme-star theme-star-three"></i><span class="theme-orbit-body"><svg class="theme-sun" viewBox="0 0 28 28"><circle cx="14" cy="14" r="5.2"></circle><path d="M14 2.5v3M14 22.5v3M2.5 14h3M22.5 14h3M5.9 5.9 8 8M20 20l2.1 2.1M22.1 5.9 20 8M8 20l-2.1 2.1"></path></svg><svg class="theme-moon" viewBox="0 0 28 28"><path d="M20.8 18.8A9.2 9.2 0 0 1 9.2 7.2a9.2 9.2 0 1 0 11.6 11.6Z"></path><circle cx="10.2" cy="16.8" r="1"></circle><circle cx="15.4" cy="21" r=".75"></circle></svg></span></span>',1)])],8,e0)]),d("nav",t0,[d("button",{class:de({active:l.activePanel==="chat"}),onClick:ti},[...r[36]||(r[36]=[d("span",{class:"nav-button-content"},[d("svg",{class:"ui-icon nav-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M10 4v12M4 10h12"})]),d("span",null,"新建会话")],-1)])],2),d("button",{class:de({active:l.activePanel==="sessions"}),onClick:ei},[...r[37]||(r[37]=[d("span",{class:"nav-button-content"},[d("svg",{class:"ui-icon nav-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M5 4.5h10a1.5 1.5 0 0 1 1.5 1.5v8A1.5 1.5 0 0 1 15 15.5H8l-3.5 2v-3.5A1.5 1.5 0 0 1 3 12.5V6A1.5 1.5 0 0 1 4.5 4.5Z"}),d("path",{d:"M6.75 8h6.5M6.75 11h4.5"})]),d("span",null,"会话管理")],-1)])],2),d("button",{class:de({active:l.activePanel==="settings"}),onClick:r[0]||(r[0]=x=>Hs())},[...r[38]||(r[38]=[d("span",{class:"nav-button-content"},[d("svg",{class:"ui-icon nav-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M10 3.5v2M10 14.5v2M5.4 5.4l1.4 1.4M13.2 13.2l1.4 1.4M3.5 10h2M14.5 10h2M5.4 14.6l1.4-1.4M13.2 6.8l1.4-1.4"}),d("circle",{cx:"10",cy:"10",r:"2.75"})]),d("span",null,"模型配置")],-1)])],2)]),d("button",{class:de(["sidebar-card","session-entry",{working:$n.value}]),type:"button",onClick:r[1]||(r[1]=x=>l.activePanel="chat"),title:ze.value},[r[39]||(r[39]=d("span",{class:"session-entry-icon","aria-hidden":"true"},[d("i",{class:"session-diamond"})],-1)),d("span",s0,[d("span",{ref_key:"sessionTitleViewport",ref:st,class:de(["session-title-line",{marquee:is.value}])},[d("strong",{ref_key:"sessionTitleText",ref:jt},T(ze.value),513),is.value?(k(),y("strong",r0,T(ze.value),1)):V("",!0)],2)])],10,n0),d("section",i0,[d("div",o0,[d("button",{type:"button",class:"mini-button",onClick:r[2]||(r[2]=x=>To())},"提示词管理")]),d("div",a0,[l.promptLibraryLoading?(k(),y("div",l0,"正在加载…")):l.promptLibrary.length?(k(!0),y(ce,{key:2},Te(l.promptLibrary,x=>{var M;return k(),y("article",{key:x.id,class:de(["prompt-card",{active:((M=Un.value)==null?void 0:M.id)===x.id}]),draggable:"true",onDragstart:it=>mp(it,x),onDragend:wp,onDblclick:it=>Fs(x)},[d("div",d0,[d("strong",null,T(x.title),1)]),d("div",f0,[d("button",{type:"button",class:"mini-button",onClick:it=>Fs(x)},"应用",8,g0),d("button",{type:"button",class:"mini-button",onClick:it=>dp(x)},"编辑",8,p0)])],42,u0)}),128)):(k(),y("div",c0,"暂无提示词"))])])]),d("main",h0,[d("header",m0,[d("div",b0,[d("details",{ref_key:"mobileMenu",ref:we,class:"mobile-nav-menu"},[r[40]||(r[40]=d("summary",{"aria-label":"打开导航菜单",title:"导航菜单"},[d("svg",{class:"ui-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M4 5.5h12M4 10h12M4 14.5h12"})])],-1)),d("nav",null,[d("button",{type:"button",class:de({active:l.activePanel==="chat"}),onClick:r[3]||(r[3]=x=>vi("chat"))},"对话",2),d("button",{type:"button",class:de({active:l.activePanel==="sessions"}),onClick:r[4]||(r[4]=x=>vi("sessions"))},"会话",2),d("button",{type:"button",class:de({active:l.activePanel==="prompts"}),onClick:r[5]||(r[5]=x=>vi("prompts"))},"提示词",2),d("button",{type:"button",class:de({active:l.activePanel==="settings"}),onClick:r[6]||(r[6]=x=>vi("settings"))},"模型配置",2),d("button",{type:"button",onClick:uu},"新建会话")])],512),d("button",{class:"ghost mobile-theme-toggle celestial-theme-toggle",type:"button","aria-label":qr.value,"aria-pressed":Gr.value,title:qr.value,onClick:Kc},[...r[41]||(r[41]=[Ou('<span class="theme-orbit-scene" aria-hidden="true"><i class="theme-cloud theme-cloud-one"></i><i class="theme-cloud theme-cloud-two"></i><i class="theme-star theme-star-one"></i><i class="theme-star theme-star-two"></i><i class="theme-star theme-star-three"></i><span class="theme-orbit-body"><svg class="theme-sun" viewBox="0 0 28 28"><circle cx="14" cy="14" r="5.2"></circle><path d="M14 2.5v3M14 22.5v3M2.5 14h3M22.5 14h3M5.9 5.9 8 8M20 20l2.1 2.1M22.1 5.9 20 8M8 20l-2.1 2.1"></path></svg><svg class="theme-moon" viewBox="0 0 28 28"><path d="M20.8 18.8A9.2 9.2 0 0 1 9.2 7.2a9.2 9.2 0 1 0 11.6 11.6Z"></path><circle cx="10.2" cy="16.8" r="1"></circle><circle cx="15.4" cy="21" r=".75"></circle></svg></span></span>',1)])],8,k0),d("button",{class:"ghost desktop-config-button",onClick:r[7]||(r[7]=x=>Hs())},"配置模型"),d("button",{class:"primary new-session-button",onClick:uu},"+ 新建")])]),l.activePanel==="chat"?(k(),y("section",y0,[d("div",_0,[d("div",{ref_key:"transcript",ref:he,class:"transcript"},[l.runtimeContext||l.runtimeContextLoading||l.runtimeContextError?(k(),y("section",v0,[r[45]||(r[45]=d("div",{class:"runtime-context-bar-title"},[d("strong",null,"运行上下文")],-1)),l.runtimeContext?(k(),y("div",w0,[d("button",{type:"button",onClick:r[8]||(r[8]=x=>Go("prompt"))},[r[42]||(r[42]=d("span",null,"系统提示词",-1)),d("strong",null,T(ql.value.length),1)]),d("button",{type:"button",onClick:r[9]||(r[9]=x=>Go("tools"))},[r[43]||(r[43]=d("span",null,"工具",-1)),d("strong",null,T(wo.value.length),1)]),d("button",{type:"button",onClick:r[10]||(r[10]=x=>Go("plugins"))},[r[44]||(r[44]=d("span",null,"插件",-1)),d("strong",null,T(Wg.value),1)])])):l.runtimeContextError?(k(),y("button",{key:1,type:"button",class:"runtime-context-retry",onClick:Qr},"重试")):(k(),y("span",x0,"同步中"))])):V("",!0),Ps.value.length?(k(),y("section",S0,[r[47]||(r[47]=d("div",{class:"runtime-context-bar-title"},[d("strong",null,"项目上下文")],-1)),d("div",E0,[d("button",{type:"button",onClick:ih},[r[46]||(r[46]=d("span",null,"文档",-1)),d("strong",null,T(Ps.value.length),1)])])])):V("",!0),d("div",{ref_key:"messageList",ref:ke,class:"virtual-message-list",style:It({height:`${jg.value}px`})},[(k(!0),y(ce,null,Te(Hg.value,x=>(k(),y("div",{key:x.key,ref_for:!0,ref:mm,class:"virtual-message-row","data-index":x.index,style:It({transform:`translateY(${x.start-D.value}px)`})},[(k(!0),y(ce,null,Te([Bn.value[x.index]],M=>{var it,Wt,du,fu;return k(),y(ce,{key:M.id},[Do(M)?(k(),y("article",{key:0,class:de(["message","tool-group-message",{live:M.live,expanded:ls(M)}])},[d("div",A0,[d("button",{type:"button",class:"tool-group-trigger","aria-expanded":ls(M),onClick:Z=>Kp(M)},[d("span",I0,[(k(!0),y(ce,null,Te(bc(M),(Z,_e)=>(k(),y(ce,{key:Z.name},[d("span",M0,T(Z.name),1),Z.count>1?(k(),y("span",R0,"×"+T(Z.count),1)):V("",!0),_e<bc(M).length-1?(k(),y("span",N0,"、")):V("",!0)],64))),128))]),r[48]||(r[48]=d("span",{class:"tool-group-chevron","aria-hidden":"true"},null,-1))],8,C0),!ls(M)&&Po(M).length?(k(),ht(Qk,{key:0,name:"tool-purpose",tag:"div",class:"tool-group-purposes"},{default:ff(()=>[(k(!0),y(ce,null,Te(Po(M),(Z,_e)=>(k(),y("div",{key:Z.id,class:de(["tool-group-purpose",{live:Z.live}]),style:It({"--purpose-index":_e})},[d("span",null,T(Z.text),1)],6))),128))]),_:2},1024)):V("",!0),ls(M)?(k(),y("div",L0,[(k(!0),y(ce,null,Te(M.lines,Z=>{var _e,gt,ga,gu;return k(),y("div",{key:Z.id,class:de(["tool-group-result",`kind-${Z.kind||"system"}`])},[Z.kind==="thinking"?(k(),y("details",{key:0,class:"reasoning-sheet",open:Z.live||void 0},[r[49]||(r[49]=d("summary",null,[d("span",{class:"reasoning-title-mark","aria-hidden":"true"},[d("i"),d("i"),d("i")]),d("span",{class:"reasoning-heading"},"思考")],-1)),d("div",D0,[d("div",P0,[d("div",{class:"message-text markdown reasoning-text",innerHTML:fi(Z)},null,8,$0)])])],8,O0)):Ks(Z)?(k(),y("section",{key:1,class:de(["compaction-context-bar",{current:Z.compaction.current}])},[r[53]||(r[53]=d("div",{class:"compaction-context-title"},[d("strong",null,"压缩上下文")],-1)),d("div",B0,[d("span",null,[r[50]||(r[50]=d("span",null,"摘要",-1)),d("strong",null,T(rn(String(Z.compaction.summary||"").length)),1)]),Z.compaction.imageCount?(k(),y("span",U0,[r[51]||(r[51]=d("span",null,"图片",-1)),d("strong",null,T(Z.compaction.imageCount),1)])):V("",!0),d("button",{type:"button",onClick:je=>mc(Z)},[...r[52]||(r[52]=[d("span",null,"详情",-1),d("strong",null,"›",-1)])],8,F0)])],2)):Vs(Z)?(k(),y("div",{key:2,class:de(["tool-result-summary",`status-${cs(Z).key}`])},[d("div",z0,[(k(),y("svg",{class:de(["tool-result-diamond",{spinning:Z.live}]),viewBox:"0 0 20 20","aria-hidden":"true"},[...r[54]||(r[54]=[d("path",{d:"M10 2.75 17.25 10 10 17.25 2.75 10Z"},null,-1)])],2)),d("strong",H0,T(jn(Z)),1),cs(Z).key==="failed"?(k(),y("span",j0,"×")):V("",!0)]),d("div",W0,[(_e=Z.toolDisplay)!=null&&_e.purpose||(gt=Z.toolDisplay)!=null&>.subject?(k(),y("p",K0,T(((ga=Z.toolDisplay)==null?void 0:ga.purpose)||((gu=Z.toolDisplay)==null?void 0:gu.subject)),1)):V("",!0),En(Z)&&Sn(Z).length?(k(),y("div",V0,[d("button",{type:"button",class:"tool-group-trigger","aria-expanded":oi(Z),onClick:je=>Ec(Z)},[d("span",q0,[(k(!0),y(ce,null,Te(ii(Z),(je,ir)=>(k(),y(ce,{key:je.name},[d("span",Z0,T(je.label),1),je.count>1?(k(),y("span",Q0,"×"+T(je.count),1)):V("",!0),ir<ii(Z).length-1?(k(),y("span",Y0,"、")):V("",!0)],64))),128))]),r[55]||(r[55]=d("span",{class:"tool-group-chevron","aria-hidden":"true"},null,-1))],8,G0),oi(Z)?(k(),y("div",J0,[(k(!0),y(ce,null,Te(Sc(Z),(je,ir)=>(k(),y("div",{key:je.key,class:"tool-group-purpose",style:It({"--purpose-index":ir})},[d("span",null,T(je.purpose),1)],4))),128))])):V("",!0)])):Zs(Z)?(k(),y("p",X0,[gr(T(Zs(Z)),1),ai(Z)?(k(),y("span",ew,T(ai(Z)),1)):V("",!0)])):V("",!0),!En(Z)&&Sn(Z).length?(k(),y("div",tw,[d("section",nw,[d("pre",sw,T(xc(Z)),1)])])):V("",!0),!En(Z)&&qs(Z)&&(!Bo(Z)||Z.live===!0)?(k(),y("div",rw,[d("section",iw,[d("pre",ow,T(qs(Z)),1)])])):V("",!0),!En(Z)&&wc(Z)?(k(),y("div",aw,[(k(!0),y(ce,null,Te(Z.toolDisplay.previews,(je,ir)=>(k(),y("section",{key:`${je.kind}-${ir}`,class:de(["tool-result-preview",`kind-${je.kind}`])},[je.label?(k(),y("span",lw,T(je.label),1)):V("",!0),d("pre",cw,T(je.content),1)],2))),128))])):V("",!0),ri(Z).length?(k(),y("dl",uw,[(k(!0),y(ce,null,Te(ri(Z),je=>(k(),y("div",{key:`${je.label}-${je.value}`,class:de(["tool-result-fact",`tone-${je.tone||"neutral"}`])},[d("dt",null,T(je.label),1),d("dd",{class:de({code:je.code})},T(je.label==="任务状态"?Js(je.value):je.value),3)],2))),128))])):V("",!0)])],2)):(k(),y("div",dw,[d("div",fw,[d("strong",null,T(jn(Z)),1)]),d("div",{class:"message-text markdown",innerHTML:fi(Z)},null,8,gw)]))],2)}),128))])):V("",!0)])],2)):(k(),y("article",{key:1,class:de(["message",M.kind||"system",{live:M.live,"prompt-usage":Fp(M),"context-compaction":Ks(M),"compact-tool":Vs(M)}])},[d("div",{class:de(["message-marker",{spinning:M.live}])},[...r[56]||(r[56]=[d("svg",{class:"message-marker-icon",viewBox:"0 0 20 20","aria-hidden":"true"},[d("path",{d:"M10 2.75 17.25 10 10 17.25 2.75 10Z"})],-1)])],2),Ks(M)?(k(),y("div",pw,[d("section",{class:de(["compaction-context-bar",{current:M.compaction.current}])},[r[60]||(r[60]=d("div",{class:"compaction-context-title"},[d("strong",null,"压缩上下文")],-1)),d("div",hw,[d("span",null,[r[57]||(r[57]=d("span",null,"摘要",-1)),d("strong",null,T(rn(String(M.compaction.summary||"").length)),1)]),M.compaction.imageCount?(k(),y("span",mw,[r[58]||(r[58]=d("span",null,"图片",-1)),d("strong",null,T(M.compaction.imageCount),1)])):V("",!0),d("button",{type:"button",onClick:Z=>mc(M)},[...r[59]||(r[59]=[d("span",null,"详情",-1),d("strong",null,"›",-1)])],8,bw)])],2)])):M.kind==="thinking"?(k(),y("div",kw,[d("details",{class:"reasoning-sheet",open:M.live||void 0},[d("summary",null,[r[61]||(r[61]=d("span",{class:"reasoning-title-mark","aria-hidden":"true"},[d("i"),d("i"),d("i")],-1)),r[62]||(r[62]=d("span",{class:"reasoning-heading"},"思考",-1)),Qs(M)?(k(),y("span",_w,T(Qs(M)),1)):V("",!0)]),d("div",vw,[d("div",ww,[d("div",{class:"message-text markdown reasoning-text",innerHTML:fi(M)},null,8,xw)])])],8,yw)])):(k(),y("div",Sw,[(M.kind!=="tool"||ds(M).length)&&!Vs(M)?(k(),y("div",Ew,[d("strong",null,T(jn(M)),1),!M.toolName&&M.titleStatus?(k(),y("span",Tw,T(M.titleStatus),1)):V("",!0),Qs(M)?(k(),y("span",Aw,T(Qs(M)),1)):V("",!0)])):V("",!0),Dt(M)?(k(),y("div",Cw,[d("div",{class:"message-text markdown image2-stage-wrap",innerHTML:Lh(M)},null,8,Iw),(k(!0),y(ce,null,Te([mi(M)],Z=>(k(),y(ce,{key:`${M.id}-image2-images`},[Z.length?(k(),y("div",Mw,[(k(!0),y(ce,null,Te(Z,(_e,gt)=>(k(),y("figure",{key:tr(_e)||_e.previewUrl||gt,class:de(["message-image-attachment",{"image-unavailable":!_e.available}])},[_e.available&&_e.previewUrl?(k(),y("button",{key:0,type:"button",class:"image-preview-trigger","data-preview-src":_e.originalUrl||_e.previewUrl,"aria-label":`预览 ${fs(_e,gt)}`},[d("img",{src:_e.previewUrl,alt:fs(_e,gt),loading:"lazy",decoding:"async"},null,8,Nw)],8,Rw)):(k(),y("div",Lw,"图片不可用")),d("figcaption",null,T(fs(_e,gt)),1),d("div",Ow,[_e.available&&_e.previewUrl?(k(),y("a",{key:0,class:"image-download",href:_e.originalUrl||_e.previewUrl,download:Jc(_e,gt)},"下载",8,Dw)):V("",!0),gt===0&&gi(M)?(k(),y("button",{key:1,type:"button",class:"image2-detail-button",onClick:ga=>kc(M)},"详情",8,Pw)):V("",!0)])],2))),128))])):gi(M)?(k(),y("button",{key:1,type:"button",class:"image2-detail-button",onClick:_e=>kc(M)},"详情",8,$w)):V("",!0)],64))),128))])):Vs(M)?(k(),y("div",{key:2,class:de(["tool-result-summary",`status-${cs(M).key}`])},[d("div",Bw,[(k(),y("svg",{class:de(["tool-result-diamond",{spinning:M.live}]),viewBox:"0 0 20 20","aria-hidden":"true"},[...r[63]||(r[63]=[d("path",{d:"M10 2.75 17.25 10 10 17.25 2.75 10Z"},null,-1)])],2)),d("strong",Uw,T(jn(M)),1),cs(M).key==="failed"?(k(),y("span",Fw,"×")):V("",!0)]),d("div",zw,[(it=M.toolDisplay)!=null&&it.purpose||(Wt=M.toolDisplay)!=null&&Wt.subject?(k(),y("p",Hw,T(((du=M.toolDisplay)==null?void 0:du.purpose)||((fu=M.toolDisplay)==null?void 0:fu.subject)),1)):V("",!0),En(M)&&Sn(M).length?(k(),y("div",jw,[d("button",{type:"button",class:"tool-group-trigger","aria-expanded":oi(M),onClick:Z=>Ec(M)},[d("span",Kw,[(k(!0),y(ce,null,Te(ii(M),(Z,_e)=>(k(),y(ce,{key:Z.name},[d("span",Vw,T(Z.label),1),Z.count>1?(k(),y("span",Gw,"×"+T(Z.count),1)):V("",!0),_e<ii(M).length-1?(k(),y("span",qw,"、")):V("",!0)],64))),128))]),r[64]||(r[64]=d("span",{class:"tool-group-chevron","aria-hidden":"true"},null,-1))],8,Ww),oi(M)?(k(),y("div",Zw,[(k(!0),y(ce,null,Te(Sc(M),(Z,_e)=>(k(),y("div",{key:Z.key,class:"tool-group-purpose",style:It({"--purpose-index":_e})},[d("span",null,T(Z.purpose),1)],4))),128))])):V("",!0)])):Zs(M)?(k(),y("p",Qw,[gr(T(Zs(M)),1),ai(M)?(k(),y("span",Yw,T(ai(M)),1)):V("",!0)])):V("",!0),!En(M)&&Sn(M).length?(k(),y("div",Jw,[d("section",Xw,[d("pre",ex,T(xc(M)),1)])])):V("",!0),!En(M)&&qs(M)&&(!Bo(M)||M.live===!0)?(k(),y("div",tx,[d("section",nx,[d("pre",sx,T(qs(M)),1)])])):V("",!0),!En(M)&&wc(M)?(k(),y("div",rx,[(k(!0),y(ce,null,Te(M.toolDisplay.previews,(Z,_e)=>(k(),y("section",{key:`${Z.kind}-${_e}`,class:de(["tool-result-preview",`kind-${Z.kind}`])},[Z.label?(k(),y("span",ix,T(Z.label),1)):V("",!0),d("pre",ox,T(Z.content),1)],2))),128))])):V("",!0),ri(M).length?(k(),y("dl",ax,[(k(!0),y(ce,null,Te(ri(M),Z=>(k(),y("div",{key:`${Z.label}-${Z.value}`,class:de(["tool-result-fact",`tone-${Z.tone||"neutral"}`])},[d("dt",null,T(Z.label),1),d("dd",{class:de({code:Z.code})},T(Z.label==="任务状态"?Js(Z.value):Z.value),3)],2))),128))])):V("",!0)])],2)):(k(),y(ce,{key:3},[ea(M).length?(k(),y(ce,{key:0},[d("div",lx,[(k(!0),y(ce,null,Te(ea(M),Z=>(k(),y("iframe",{key:Z.url,class:"plugin-resource-frame",src:Ih(Z),title:Z.label||"插件资源",style:It({height:`${Uc(Z)}px`}),loading:"lazy",allow:"fullscreen",allowfullscreen:""},null,12,cx))),128))]),Bc(M).length?(k(),y("div",{key:0,class:"message-text markdown",innerHTML:Fc(M)},null,8,ux)):V("",!0)],64)):M.kind==="assistant"&&M.live?(k(),y("div",dx,[kt(jv,{text:M.text||"","exposed-resources":zc(M)},null,8,["text","exposed-resources"])])):nm(M)?V("",!0):(k(),y("div",{key:2,class:"message-text markdown",innerHTML:fi(M)},null,8,fx)),(k(!0),y(ce,null,Te([mi(M)],Z=>(k(),y(ce,{key:`${M.id}-images`},[Z.length?(k(),y("div",gx,[(k(!0),y(ce,null,Te(Z,(_e,gt)=>(k(),y("figure",{key:tr(_e)||_e.previewUrl||gt,class:de(["message-image-attachment",{"image-unavailable":!_e.available}])},[_e.available&&_e.previewUrl?(k(),y("button",{key:0,type:"button",class:"image-preview-trigger","data-preview-src":_e.originalUrl||_e.previewUrl,"aria-label":`预览 ${fs(_e,gt)}`},[d("img",{src:_e.previewUrl,alt:fs(_e,gt),loading:"lazy",decoding:"async"},null,8,hx)],8,px)):(k(),y("div",mx,"图片不可用")),d("figcaption",null,T(fs(_e,gt)),1),_e.available&&_e.previewUrl?(k(),y("a",{key:2,class:"image-download",href:_e.originalUrl||_e.previewUrl,download:Jc(_e,gt)},"下载",8,bx)):V("",!0)],2))),128))])):V("",!0)],64))),128))],64))]))],2))],64)}),128))],12,T0))),128))],4),j.value?(k(),y("div",kx,[d("div",yx,[d("span",_x,T(J.value),1)]),r[65]||(r[65]=d("span",{class:"message-loading-emblem","aria-hidden":"true"},[d("i"),d("i"),d("i")],-1))])):V("",!0)],512),l.queuedInput?(k(),y("div",vx,[d("span",null,"已排队:"+T(l.queuedInput),1),d("div",null,[d("button",{type:"button",onClick:lc},"立即发送"),d("button",{type:"button",onClick:Ap},"取消")])])):V("",!0),d("form",{class:de(["composer",{"drop-active":l.composerDropActive}]),onSubmit:tt(oc,["prevent"]),onDragover:bp,onDragleave:kp,onDrop:yp},[(g=l.appPrompt)!=null&&g.hasActivePrompt?(k(),y("div",wx,[r[66]||(r[66]=d("span",{class:"composer-app-prompt-label"},"当前提示词",-1)),d("strong",null,T(Vg.value),1),d("button",{type:"button",class:"mini-button danger",onClick:rc},"清空")])):V("",!0),eu().length?(k(),y("div",xx,[(k(!0),y(ce,null,Te(eu(),(x,M)=>(k(),y("figure",{key:x.label,class:"file-attachment"},[d("figcaption",null,[d("strong",null,T(sm(x,M)),1),d("span",null,T(rm(x)),1)]),d("button",{type:"button","aria-label":"移除附件",onClick:it=>Xc(x.label)},"×",8,Sx)]))),128))])):V("",!0),tu().length?(k(),y("div",Ex,[(k(!0),y(ce,null,Te(tu(),(x,M)=>(k(),y("figure",{key:x.label,class:"image-attachment"},[d("img",{src:x.previewUrl,alt:x.name||`图片 ${M+1}`},null,8,Tx),d("figcaption",null,"图片 "+T(M+1),1),d("button",{type:"button","aria-label":"移除图片",onClick:it=>Xc(x.label)},"×",8,Ax)]))),128))])):V("",!0),d("input",{ref_key:"fileInput",ref:ne,type:"file",multiple:"",hidden:"",onChange:Kh},null,544),At(d("textarea",{ref_key:"composer",ref:oe,"onUpdate:modelValue":r[11]||(r[11]=x=>R.value=x),placeholder:"在这里输入你的问题、需求或下一步安排…",onKeydown:Fh,onPaste:jh,onInput:fm},null,544),[[Pt,R.value]]),d("button",{type:"button",class:"composer-cwd",title:"切换工作目录",onClick:ah},[r[67]||(r[67]=d("strong",null,"CWD",-1)),d("span",{title:Ls.value},T(Ls.value),9,Cx)]),d("details",Ix,[d("summary",null,[r[68]||(r[68]=d("span",null,"会话选项",-1)),d("small",null,T(ue.value),1),r[69]||(r[69]=d("svg",{class:"mobile-session-chevron",viewBox:"0 0 12 12","aria-hidden":"true"},[d("path",{d:"m3 4.5 3 3 3-3"})],-1))]),d("div",Mx,[d("dl",null,[d("div",null,[r[70]||(r[70]=d("dt",null,"模型",-1)),d("dd",null,T(Os.value),1)]),d("div",null,[r[71]||(r[71]=d("dt",null,"上下文",-1)),d("dd",null,[d("button",{type:"button",class:"mobile-context-button",onClick:uc},T(jl.value),1)])]),d("div",null,[r[72]||(r[72]=d("dt",null,"Token",-1)),d("dd",null,"↑ "+T(Wl.value)+" / ↓ "+T(Kl.value),1)])]),d("div",Rx,[d("button",{type:"button",class:de(["fast-mode-button",{active:l.fastMode,syncing:l.fastModeMutating}]),"aria-pressed":l.fastMode,onClick:dc},[...r[73]||(r[73]=[d("span",null,"快速模式",-1)])],10,Nx),d("button",{type:"button",class:"compact-button",disabled:fe.value,onClick:cc},"压缩会话",8,Lx)]),d("details",Ox,[d("summary",null,[r[74]||(r[74]=gr("运行信息 ",-1)),d("span",null,T(vn.value?`${vn.value} 个后台任务`:"无后台任务"),1)]),d("div",Dx,[wn.value.length?(k(),y("button",{key:0,type:"button",class:"mobile-runtime-card",onClick:r[12]||(r[12]=x=>li(wn.value[0]))},[d("span",null,T(vn.value?"后台任务":"最近结束"),1),d("strong",null,T(Ys(wn.value[0])),1)])):(k(),y("div",Px,[...r[75]||(r[75]=[d("span",null,"后台任务",-1),d("strong",null,"暂无",-1)])])),Ot.value?(k(),y("div",$x,[r[76]||(r[76]=d("span",null,"周额度",-1)),d("strong",null,T(No(Ot.value.remainingPercent)),1),d("small",null,"续期 "+T(Lo(Ot.value.resetAt)),1)])):V("",!0),d("div",Bx,[r[77]||(r[77]=d("span",null,"服务端内存",-1)),d("strong",null,T(zn((p=Fn.value)==null?void 0:p.rss)),1),d("small",null,"堆 "+T(zn((b=Fn.value)==null?void 0:b.heapUsed))+" · 外部 "+T(zn((S=Fn.value)==null?void 0:S.external)),1)])])])])]),d("div",Ux,[d("div",Fx,[d("span",zx,[r[78]||(r[78]=d("em",null,"模型",-1)),d("strong",null,T(Os.value),1)]),(k(),y("button",{type:"button",class:de(["metric-chip","numeric","context-window-trigger",Ho("context")]),key:`context-${l.composerMetrics.context.bump}`,onClick:uc},[r[79]||(r[79]=d("em",null,"上下文",-1)),d("strong",null,T(jl.value),1)],2)),(k(),y("span",{class:de(["metric-chip numeric",Ho("inputTokens")]),key:`input-${l.composerMetrics.inputTokens.bump}`},[r[80]||(r[80]=d("em",null,"输入",-1)),d("strong",null,T(Wl.value),1)],2)),(k(),y("span",{class:de(["metric-chip numeric",Ho("outputTokens")]),key:`output-${l.composerMetrics.outputTokens.bump}`},[r[81]||(r[81]=d("em",null,"输出",-1)),d("strong",null,T(Kl.value),1)],2)),d("button",{type:"button",class:de(["fast-mode-button",{active:l.fastMode,syncing:l.fastModeMutating}]),"aria-pressed":l.fastMode,title:l.fastMode?"关闭当前会话的快速模式":"为当前会话启动快速模式",onClick:dc},[...r[82]||(r[82]=[d("span",null,"快速模式",-1)])],10,Hx),d("span",jx,[d("button",{type:"button",class:"compact-button",disabled:fe.value,onClick:cc},"压缩会话",8,Wx)])]),d("div",null,[d("button",{type:"button",class:"ghost",disabled:l.uploadingFiles,onClick:Wh},T(l.uploadingFiles?"上传中…":"上传附件"),9,Kx),d("button",{type:$n.value?"button":"submit",class:de(["primary","composer-action",{stop:$n.value}]),disabled:!$n.value&&(l.uploadingFiles||!R.value.trim()&&!l.attachments.length),"aria-label":Gl.value,onClick:r[13]||(r[13]=x=>$n.value?Tp():void 0)},T(Gl.value),11,Vx)])])],34)]),d("aside",Gx,[d("section",qx,[d("div",Zx,[r[83]||(r[83]=d("div",{class:"panel-title"},"后台任务",-1)),vn.value?(k(),y("strong",Qx,T(vn.value),1)):V("",!0)]),vn.value?(k(),y("button",{key:1,type:"button",class:"background-task-summary",title:jo(jr.value),onClick:r[14]||(r[14]=x=>li(jr.value))},[d("span",{class:de(["background-task-dot",`status-${jr.value.status}`])},null,2),d("strong",null,T(Ys(jr.value)),1),vn.value>1?(k(),y("span",Xx,"+"+T(vn.value-1),1)):V("",!0),r[84]||(r[84]=d("b",{"aria-hidden":"true"},"›",-1))],8,Jx)):(k(),y("div",Yx,"暂无后台任务")),l.agentTaskHistory.length?(k(),y("details",e1,[d("summary",null,"最近结束 · "+T(l.agentTaskHistory.length),1),(k(!0),y(ce,null,Te(l.agentTaskHistory,x=>(k(),y("button",{key:us(x),type:"button",class:"background-task-summary",onClick:M=>li(x)},[d("span",{class:de(["background-task-dot","status-"+x.status])},null,2),d("strong",null,T(Ys(x)),1),d("span",null,T(Js(x.status)),1)],8,t1))),128))])):V("",!0)]),Ot.value?(k(),y("section",n1,[d("div",s1,[d("div",null,[d("span",null,"周额度 · "+T(Lp(Ot.value.account)),1),d("strong",null,T(No(Ot.value.remainingPercent)),1)]),d("div",r1,[l.cpaQuotas.length>1?(k(),y("button",{key:0,type:"button","aria-label":"上一个凭据",onClick:r[15]||(r[15]=x=>pc(-1))},"‹")):V("",!0),d("small",null,T(l.cpaQuotas.length>1?`${l.cpaQuotaIndex+1}/${l.cpaQuotas.length}`:"剩余"),1),l.cpaQuotas.length>1?(k(),y("button",{key:1,type:"button","aria-label":"下一个凭据",onClick:r[16]||(r[16]=x=>pc(1))},"›")):V("",!0)])]),d("div",{class:"quota-progress",role:"progressbar","aria-label":"周额度剩余","aria-valuenow":Ro(Ot.value.remainingPercent),"aria-valuemin":"0","aria-valuemax":"100"},[d("span",{class:"quota-progress-fill",style:It({width:`${Ro(Ot.value.remainingPercent)}%`})},null,4)],8,i1),d("div",o1,[d("span",null,"已使用 "+T(No(Ot.value.usedPercent)),1),d("span",null,"续期时间 "+T(Lo(Ot.value.resetAt)),1)]),d("div",a1,"更新于 "+T(Lo(Ot.value.updatedAt)),1)])):V("",!0),d("section",l1,[d("div",c1,[d("div",null,[r[85]||(r[85]=d("span",null,"服务端内存",-1)),d("strong",null,T(zn((C=Fn.value)==null?void 0:C.rss)),1)]),r[86]||(r[86]=d("small",null,"RSS",-1))]),Zl.value?(k(),y("div",{key:0,class:"memory-chart",onMousemove:Pp,onMouseleave:hc},[(k(),y("svg",u1,[d("path",{d:Zl.value},null,8,d1),(k(!0),y(ce,null,Te(Zr.value,(x,M)=>(k(),y("circle",{key:x.entry.at,class:de(["memory-trend-point",{active:M===Ie.value}]),cx:x.x,cy:x.y,r:M===Ie.value?3.2:1.5,tabindex:"0",onFocus:it=>Ie.value=M,onBlur:hc},null,42,f1))),128))])),$s.value?(k(),y("div",{key:0,class:"memory-tooltip",style:It({left:`clamp(58px, ${$s.value.x/260*100}%, calc(100% - 58px))`,top:`${$s.value.y/44*100}%`})},[d("strong",null,T(zn($s.value.entry.rss)),1),d("span",null,T(Dp($s.value.entry.at)),1)],4)):V("",!0)],32)):(k(),y("div",g1,"—")),d("div",p1,[d("div",null,[r[87]||(r[87]=d("span",null,"V8 堆",-1)),d("strong",null,T(zn((K=Fn.value)==null?void 0:K.heapUsed)),1)]),d("div",null,[r[88]||(r[88]=d("span",null,"外部内存",-1)),d("strong",null,T(zn((le=Fn.value)==null?void 0:le.external)),1)])]),d("div",h1,[d("span",null,"更新于 "+T(Op((ie=Fn.value)==null?void 0:ie.at)),1)])])])])):l.activePanel==="sessions"?(k(),y("section",m1,[d("div",b1,[d("div",{class:"page-head sessions-page-head"},[r[89]||(r[89]=d("div",null,[d("h2",null,"会话管理"),d("p",null,"查找、继续或整理历史会话")],-1)),d("button",{class:"primary",onClick:ti},"+ 新建会话")]),d("div",k1,[d("label",y1,[At(d("input",{"onUpdate:modelValue":r[17]||(r[17]=x=>G.value=x),type:"search",placeholder:"搜索标题或 ID",autocomplete:"off"},null,512),[[Pt,G.value]])]),d("span",_1,T(G.value.trim()?`${Ds.value.length} / ${l.sessions.length}`:`${l.sessions.length} 个会话`),1)]),l.sessionsLoading?(k(),y("div",v1,"正在加载会话…")):l.sessions.length?Ds.value.length?(k(),y("div",S1,[(k(!0),y(ce,null,Te(Fg.value,x=>(k(),y("article",{key:x.sessionId,class:de(["session-card",{current:Io(x.sessionId),running:Mo(x.sessionId)}])},[d("div",E1,[d("div",T1,[d("strong",null,T(pe(x)),1),Io(x.sessionId)?(k(),y("span",A1,"当前")):Mo(x.sessionId)?(k(),y("span",C1,"运行中")):V("",!0)]),d("div",I1,[d("code",{title:x.sessionId},"ID · "+T(x.sessionId),9,M1),d("time",{datetime:x.updatedAt||x.createdAt},"更新于 "+T(ni(x.updatedAt||x.createdAt)),9,R1)])]),d("div",N1,[d("button",{disabled:l.sessionResumeLoading||l.sessionsLoading,onClick:M=>Mp(x.sessionId)},T(l.pendingResumeSessionId===x.sessionId&&l.sessionResumeLoading?"打开中…":"打开"),9,L1),d("button",{class:"danger",disabled:l.sessionResumeLoading||l.sessionsLoading,onClick:M=>Rp(x.sessionId)},"删除",8,O1)])],2))),128))])):(k(),y("div",x1,"没有匹配的会话")):(k(),y("div",w1,"暂无会话")),!l.sessionsLoading&&Ds.value.length&&Wr.value>1?(k(),y("nav",D1,[d("button",{type:"button",disabled:ee.value===1,onClick:r[18]||(r[18]=x=>ee.value-=1)},"上一页",8,P1),(k(!0),y(ce,null,Te(zg.value,x=>(k(),y("button",{key:x,type:"button",class:de({active:x===ee.value}),"aria-current":x===ee.value?"page":void 0,onClick:M=>ee.value=x},T(x),11,$1))),128)),d("button",{type:"button",disabled:ee.value===Wr.value,onClick:r[19]||(r[19]=x=>ee.value+=1)},"下一页",8,B1)])):V("",!0)])])):l.activePanel==="prompts"?(k(),y("section",U1,[d("div",F1,[d("div",z1,[r[90]||(r[90]=d("h2",null,"提示词",-1)),d("div",H1,[d("button",{class:"ghost",onClick:r[20]||(r[20]=x=>l.activePanel="chat")},"回到对话"),d("button",{class:"primary",onClick:fp},"+ 新建提示词")])]),d("div",j1,[d("aside",W1,[d("div",K1,[d("strong",null,T(l.promptLibrary.length)+" 个提示词",1)]),d("div",V1,[l.promptLibraryLoading?(k(),y("div",G1,"正在加载…")):l.promptLibrary.length?(k(!0),y(ce,{key:2},Te(l.promptLibrary,x=>{var M,it;return k(),y("button",{key:x.id,class:de(["prompt-library-item",{active:((M=Vr.value)==null?void 0:M.id)===x.id,applied:((it=Un.value)==null?void 0:it.id)===x.id,dragging:q.value===x.id,"drop-before":ge.value===x.id&&xe.value==="before","drop-after":ge.value===x.id&&xe.value==="after"}]),type:"button",draggable:"true",onClick:Wt=>gp(x),onDblclick:Wt=>Fs(x),onDragstart:Wt=>xp(Wt,x),onDragover:Wt=>Sp(Wt,x),onDrop:Wt=>Ep(Wt,x),onDragend:ic},[d("strong",null,T(x.title),1),x.usage?(k(),y("span",Q1,"用法:"+T(x.usage),1)):V("",!0)],42,Z1)}),128)):(k(),y("div",q1,"暂无提示词"))])]),d("section",Y1,[d("div",J1,[d("strong",X1,T(O.title||"新提示词"),1),d("div",eS,[d("button",{class:"mini-button",type:"button",disabled:!Vr.value,onClick:r[21]||(r[21]=x=>Vr.value&&Fs(Vr.value))},"应用",8,tS),d("button",{class:"mini-button",type:"button",onClick:pp},"保存"),d("button",{class:"mini-button danger",type:"button",disabled:!O.id,onClick:hp},"删除",8,nS)])]),d("div",sS,[d("label",rS,[r[91]||(r[91]=d("span",null,"名称",-1)),At(d("input",{"onUpdate:modelValue":r[22]||(r[22]=x=>O.title=x),type:"text",placeholder:"例如:代码评审"},null,512),[[Pt,O.title]])]),d("label",iS,[r[92]||(r[92]=d("span",null,"提示词内容",-1)),At(d("textarea",{"onUpdate:modelValue":r[23]||(r[23]=x=>O.content=x),rows:"14",placeholder:"输入提示词内容"},null,512),[[Pt,O.content]])]),d("label",oS,[r[93]||(r[93]=d("span",null,"用法(选填)",-1)),At(d("textarea",{"onUpdate:modelValue":r[24]||(r[24]=x=>O.usage=x),rows:"4",placeholder:"输入适用场景"},null,512),[[Pt,O.usage]])])])])])])])):l.activePanel==="settings"?(k(),y("section",aS,[d("div",lS,[d("div",cS,[r[94]||(r[94]=d("h2",null,"模型配置",-1)),d("button",{class:"primary",onClick:gc,disabled:!l.login},"保存",8,uS)]),l.login?(k(),y("form",{key:1,class:"settings-form",onSubmit:tt(gc,["prevent"])},[d("section",fS,[r[96]||(r[96]=d("header",{class:"settings-card-head"},[d("strong",null,"模型")],-1)),d("div",gS,[d("label",pS,[r[95]||(r[95]=d("span",null,"供应商",-1)),kt(Mi,{modelValue:Ae.value,"onUpdate:modelValue":r[25]||(r[25]=x=>Ae.value=x),options:th(l.login.providers),"aria-label":"供应商",onChange:Np},null,8,["modelValue","options"])]),(k(!0),y(ce,null,Te(l.login.fields,x=>(k(),y("label",{key:x.key,class:"settings-field"},[d("span",null,[gr(T(Vo(x.label)),1),x.required?(k(),y("i",hS)):V("",!0)]),x.options?(k(),ht(Mi,{key:0,modelValue:He[x.key],"onUpdate:modelValue":M=>He[x.key]=M,options:nh(x),"aria-label":Vo(x.label)},null,8,["modelValue","onUpdate:modelValue","options","aria-label"])):At((k(),y("input",{key:1,"onUpdate:modelValue":M=>He[x.key]=M,type:x.secret?"password":"text",placeholder:x.placeholder||`请输入${Vo(x.label)}`},null,8,mS)),[[ry,He[x.key]]])]))),128))])]),d("section",bS,[r[99]||(r[99]=d("header",{class:"settings-card-head"},[d("strong",null,"CPA")],-1)),d("div",kS,[d("label",yS,[r[97]||(r[97]=d("span",null,"URL",-1)),At(d("input",{"onUpdate:modelValue":r[26]||(r[26]=x=>l.cpaConfig.url=x),type:"text",placeholder:"http://127.0.0.1:8317",autocomplete:"off"},null,512),[[Pt,l.cpaConfig.url]])]),d("label",_S,[r[98]||(r[98]=d("span",null,"管理密码",-1)),At(d("input",{"onUpdate:modelValue":r[27]||(r[27]=x=>l.cpaConfig.password=x),type:"password",placeholder:"请输入管理密码",autocomplete:"new-password"},null,512),[[Pt,l.cpaConfig.password]])])])]),d("section",vS,[d("header",wS,[r[100]||(r[100]=d("div",null,[d("strong",null,"工具"),d("small",null,"内置与插件工具默认开启,关闭后立即对当前会话生效。")],-1)),d("button",{type:"button",class:"mini-button",disabled:l.busy||l.globalTools.loading,onClick:Zg},"保存",8,xS)]),d("div",SS,[(k(!0),y(ce,null,Te(l.globalTools.items,x=>(k(),y("label",{key:x.name,class:"plugin-settings-row"},[d("span",null,[d("strong",null,[d("code",null,T(x.name),1)]),d("small",null,T(x.source==="plugin"?`插件 · ${x.pluginName||x.pluginId}`:x.source==="external"?"外部工具":"内置工具"),1)]),d("span",ES,[At(d("input",{"onUpdate:modelValue":M=>x.configuredEnabled=M,type:"checkbox","aria-label":x.name},null,8,TS),[[Ja,x.configuredEnabled]]),r[101]||(r[101]=d("span",{"aria-hidden":"true"},null,-1))])]))),128))])]),d("section",AS,[d("header",CS,[r[102]||(r[102]=d("strong",null,"插件",-1)),d("button",{type:"button",class:"mini-button",disabled:l.globalPlugins.locked||l.globalPlugins.loading,onClick:Jg},"保存",8,IS)]),d("div",MS,[(k(!0),y(ce,null,Te(l.globalPlugins.items,x=>(k(),y("label",{key:x.id,class:"plugin-settings-row"},[d("span",null,[d("strong",null,T(x.name),1),d("small",null,T(x.tools.length)+" 个工具",1)]),d("span",RS,[At(d("input",{"onUpdate:modelValue":M=>x.configuredEnabled=M,type:"checkbox",disabled:l.globalPlugins.locked,"aria-label":x.name},null,8,NS),[[Ja,x.configuredEnabled]]),r[103]||(r[103]=d("span",{"aria-hidden":"true"},null,-1))])]))),128))])])],32)):(k(),y("div",dS,"正在加载配置…"))])])):(k(),y("section",LS,[d("div",OS,[r[104]||(r[104]=d("h2",null,"运行时能力",-1)),d("div",DS,[(k(),y(ce,null,Te(["流式模型循环","工具执行","上下文指标","会话恢复","后台代理","登录配置","图片附件","Markdown 输出"],x=>d("div",{key:x,class:"capability-card"},T(x),1)),64))])])]))]),l.toast?(k(),y("div",PS,T(l.toast),1)):V("",!0)]),(k(),ht(Kt,{to:"body"},[l.coreVersion?(k(),y("div",{key:0,class:de(["core-version",{celebrating:l.coreEasterEgg}]),role:"button",tabindex:"0",title:`内核版本 ${l.coreVersion} · 点击试试`,onClick:So,onKeydown:[rd(tt(So,["prevent"]),["enter"]),rd(tt(So,["prevent"]),["space"])]},[r[105]||(r[105]=d("span",{class:"core-version-spark spark-a","aria-hidden":"true"},null,-1)),r[106]||(r[106]=d("span",{class:"core-version-spark spark-b","aria-hidden":"true"},null,-1)),r[107]||(r[107]=d("span",{class:"core-version-spark spark-c","aria-hidden":"true"},null,-1)),d("span",null,"内核版本 "+T(l.coreVersion),1)],42,$S)):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.cwdPicker.open?(k(),y("div",{key:0,class:"cwd-picker-backdrop",onClick:tt(ui,["self"])},[d("section",BS,[d("header",{class:"cwd-picker-head"},[r[108]||(r[108]=d("strong",null,"CWD",-1)),d("button",{type:"button","aria-label":"关闭",onClick:ui},"×")]),d("form",{class:"cwd-picker-path",onSubmit:r[29]||(r[29]=tt(x=>di(),["prevent"]))},[At(d("input",{"onUpdate:modelValue":r[28]||(r[28]=x=>l.cwdPicker.input=x),autocomplete:"off",spellcheck:"false","aria-label":"工作目录路径"},null,512),[[Pt,l.cwdPicker.input]]),d("button",{type:"submit",disabled:l.cwdPicker.loading},"前往",8,US),d("button",{type:"button",disabled:l.cwdPicker.mutating,onClick:fh},"新建",8,FS)],32),d("div",zS,[l.cwdPicker.parent?(k(),y("button",{key:0,type:"button",onClick:r[30]||(r[30]=x=>di(l.cwdPicker.parent))},"← 上级")):V("",!0),d("span",null,T(l.cwdPicker.selectedPath||l.cwdPicker.cwd),1)]),d("div",HS,[d("nav",jS,[(k(!0),y(ce,null,Te(l.cwdPicker.locations,x=>(k(),y("button",{key:`${x.id}-${x.path}`,type:"button",class:de({active:l.cwdPicker.cwd===x.path}),title:x.path,onClick:M=>di(x.path)},[d("span",KS,T(x.kind==="drive"||x.kind==="volume"?"▣":x.kind==="home"?"◆":"◇"),1),d("strong",null,T(x.label),1)],10,WS))),128))]),d("div",VS,[l.cwdPicker.loading?(k(),y("div",GS,"读取中")):l.cwdPicker.error?(k(),y("div",qS,T(l.cwdPicker.error),1)):(k(),ht(qv,{key:2,nodes:l.cwdPicker.treeRoots,children:l.cwdPicker.treeChildren,expanded:l.cwdPicker.treeExpanded,"selected-path":l.cwdPicker.selectedPath,"allow-delete":!1,onToggle:uh,onSelect:dh,onDelete:gh},null,8,["nodes","children","expanded","selected-path"]))])]),d("footer",ZS,[d("button",{type:"button",onClick:ui},"取消"),d("button",{type:"button",class:"primary",disabled:l.cwdPicker.mutating||l.cwdPicker.loading,onClick:ph},"选择",8,QS)])])])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.projectContextOpen?(k(),y("div",{key:0,class:"runtime-context-modal-backdrop",onClick:tt(Qo,["self"])},[d("section",YS,[d("header",JS,[d("div",null,[l.projectContextDocument?(k(),y("span",XS,T(l.projectContextDocument.path),1)):V("",!0),d("strong",null,T(((Ee=l.projectContextDocument)==null?void 0:Ee.name)||"项目上下文"),1)]),d("button",{type:"button","aria-label":l.projectContextDocument?"返回":"关闭",onClick:Qo},"×",8,eE)]),d("div",tE,[l.projectContextDocument?(k(),y("pre",rE,T(l.projectContextDocument.content),1)):(k(),y("div",nE,[(k(!0),y(ce,null,Te(Ps.value,x=>(k(),y("button",{key:x.path,type:"button",class:"runtime-context-index-item",onClick:M=>oh(x)},[d("span",null,[d("strong",null,T(x.name),1),d("small",null,T(rn(x.chars||0))+" 字符",1)]),r[109]||(r[109]=d("b",null,"›",-1))],8,sE))),128))]))])])])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.confirmDialog.open?(k(),y("div",{key:0,class:"confirm-dialog-backdrop",onClick:r[33]||(r[33]=tt(x=>as(!1),["self"]))},[d("section",{class:"confirm-dialog",role:"alertdialog","aria-modal":"true","aria-label":l.confirmDialog.title},[d("div",{class:de(["confirm-dialog-icon",`tone-${l.confirmDialog.tone}`]),"aria-hidden":"true"},"!",2),d("div",oE,[d("h3",null,T(l.confirmDialog.title),1),d("p",null,T(l.confirmDialog.message),1)]),d("div",aE,[d("button",{type:"button",class:"ghost",onClick:r[31]||(r[31]=x=>as(!1))},T(l.confirmDialog.cancelLabel),1),d("button",{type:"button",class:de(["primary",{danger:l.confirmDialog.tone==="danger"}]),onClick:r[32]||(r[32]=x=>as(!0))},T(l.confirmDialog.confirmLabel),3)])],8,iE)])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.contextWindowModalOpen?(k(),y("div",{key:0,class:"context-window-backdrop",onClick:tt(Ao,["self"])},[d("section",lE,[d("form",{onSubmit:tt(Ip,["prevent"])},[r[111]||(r[111]=d("label",{for:"context-window-input"},"调整本次会话上下文窗口大小:",-1)),d("div",cE,[At(d("input",{id:"context-window-input","onUpdate:modelValue":r[34]||(r[34]=x=>l.contextWindowDraft=x),type:"text",inputmode:"numeric",autocomplete:"off",autofocus:"","aria-describedby":"context-window-unit",onInput:Cp},null,544),[[Pt,l.contextWindowDraft]]),r[110]||(r[110]=d("span",{id:"context-window-unit"},"k",-1))]),l.contextWindowError?(k(),y("p",uE,T(l.contextWindowError),1)):V("",!0),d("div",dE,[d("button",{type:"button",class:"ghost",disabled:l.contextWindowSaving,onClick:Ao},"取消",8,fE),d("button",{type:"submit",class:"primary",disabled:l.contextWindowSaving},T(l.contextWindowSaving?"保存中…":"确认"),9,gE)])],32)])])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.imagePreview?(k(),y("div",{key:0,class:"image-preview-backdrop",onClick:tt($o,["self"])},[d("section",{class:"image-preview-modal",role:"dialog","aria-modal":"true","aria-label":l.imagePreview.caption||"图片预览"},[d("button",{type:"button",class:"image-preview-close","aria-label":"关闭图片预览",onClick:$o},"×"),d("div",hE,[d("img",{src:l.imagePreview.src,alt:l.imagePreview.caption||"图片预览"},null,8,mE)]),l.imagePreview.caption?(k(),y("footer",bE,T(l.imagePreview.caption),1)):V("",!0)],8,pE)])):V("",!0)])),(k(),ht(Kt,{to:"body"},[nn.value?(k(),y("div",{key:0,class:"runtime-context-detail-backdrop",onClick:tt(si,["self"])},[d("section",kE,[d("header",{class:"runtime-context-modal-head"},[r[112]||(r[112]=d("div",null,[d("strong",null,"压缩上下文详情")],-1)),d("button",{type:"button","aria-label":"关闭",onClick:si},"×")]),d("div",yE,[d("dl",_E,[d("div",null,[r[113]||(r[113]=d("dt",null,"压缩方式",-1)),d("dd",null,T(zp(nn.value)),1)]),d("div",null,[r[114]||(r[114]=d("dt",null,"发生时间",-1)),d("dd",null,T(ni(nn.value.compaction.createdAt)),1)]),d("div",null,[r[115]||(r[115]=d("dt",null,"新窗口消息",-1)),d("dd",null,T(nn.value.compaction.newWindowMessages),1)]),d("div",null,[r[116]||(r[116]=d("dt",null,"保留用户消息",-1)),d("dd",null,T(nn.value.compaction.preservedUserMessages),1)]),d("div",null,[r[117]||(r[117]=d("dt",null,"释放字符",-1)),d("dd",null,T(rn(nn.value.compaction.charsFreed)),1)]),d("div",null,[r[118]||(r[118]=d("dt",null,"图片引用",-1)),d("dd",null,T(nn.value.compaction.imageCount||0),1)])]),r[119]||(r[119]=d("h3",null,"实际续接上下文",-1)),d("pre",null,T(nn.value.compaction.continuationState||nn.value.compaction.summary||"未提供续接上下文"),1)])])])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.runtimeContextModal?(k(),y("div",{key:0,class:"runtime-context-modal-backdrop",onClick:tt(qo,["self"])},[d("section",vE,[d("header",wE,[d("div",null,[d("strong",null,T(l.runtimeContextModal==="prompt"?"系统提示词":l.runtimeContextModal==="tools"?"可用工具":"会话插件"),1)]),d("button",{type:"button","aria-label":"关闭",onClick:qo},"×")]),d("div",xE,[l.runtimeContextModal==="prompt"?(k(),y("div",SE,[d("button",{type:"button",class:"runtime-context-index-item featured",onClick:mh},[d("span",null,[r[120]||(r[120]=d("strong",null,"完整系统提示词",-1)),d("small",null,T(rn(((on=(qe=l.runtimeContext)==null?void 0:qe.prompt)==null?void 0:on.chars)||0))+" 字符",1)]),r[121]||(r[121]=d("b",null,"›",-1))]),(k(!0),y(ce,null,Te(ql.value,(x,M)=>(k(),y("button",{key:`${x.name}-${M}`,type:"button",class:"runtime-context-index-item",onClick:it=>hh(x)},[d("span",null,[d("strong",null,T(x.name),1),d("small",null,T(Mc(x))+" · "+T(rn(x.chars||0))+" 字符",1)]),r[122]||(r[122]=d("b",null,"›",-1))],8,EE))),128))])):l.runtimeContextModal==="tools"?(k(),y("div",TE,[l.sessionTools.loading?(k(),y("div",AE,"同步中")):(k(),y(ce,{key:1},[d("div",CE,[d("span",null,"可用 "+T(Kg.value)+" / "+T(l.sessionTools.items.length),1)]),(k(!0),y(ce,null,Te(l.sessionTools.items,x=>(k(),y("div",{key:x.name,class:"runtime-plugin-row"},[d("button",{type:"button",class:"runtime-tool-detail-button",disabled:!wo.value.some(M=>M.name===x.name),onClick:M=>bh(wo.value.find(it=>it.name===x.name))},[d("code",null,T(x.name),1),d("small",null,T(x.available===!1?`插件未启用 · ${x.pluginName||x.pluginId}`:x.source==="plugin"?`插件 · ${x.pluginName||x.pluginId}`:x.source==="external"?"外部工具":"内置工具"),1)],8,IE),kt(Mi,{class:"runtime-plugin-control","model-value":x.mode,options:t,disabled:l.busy||l.sessionTools.busy||x.available===!1,"aria-label":`${x.name}状态`,"data-mode":x.mode,"onUpdate:modelValue":M=>Qg(x,M)},null,8,["model-value","disabled","aria-label","data-mode","onUpdate:modelValue"])]))),128))],64))])):(k(),y("div",ME,[l.sessionPlugins.loading?(k(),y("div",RE,"同步中")):(k(!0),y(ce,{key:1},Te(l.sessionPlugins.items,x=>(k(),y("div",{key:x.id,class:"runtime-plugin-row"},[d("span",null,[d("strong",null,T(x.name),1),d("small",null,T(x.tools.length)+" 个工具",1)]),kt(Mi,{class:"runtime-plugin-control","model-value":x.mode,options:t,disabled:l.busy||l.sessionPlugins.busy||!x.globallyEnabled,"aria-label":`${x.name}状态`,"data-mode":x.mode,"onUpdate:modelValue":M=>Xg(x,M)},null,8,["model-value","disabled","aria-label","data-mode","onUpdate:modelValue"])]))),128))]))])])])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.runtimeContextDetail?(k(),y("div",{key:0,class:"runtime-context-detail-backdrop",onClick:tt(Zo,["self"])},[d("section",{class:"runtime-context-detail-modal",role:"dialog","aria-modal":"true","aria-label":l.runtimeContextDetail.title},[d("header",LE,[d("div",null,[l.runtimeContextDetail.meta?(k(),y("span",OE,T(l.runtimeContextDetail.meta),1)):V("",!0),d("strong",null,T(l.runtimeContextDetail.title),1)]),d("button",{type:"button","aria-label":"返回",onClick:Zo},"×")]),d("div",DE,[l.runtimeContextDetail.kind==="tool"?(k(),y(ce,{key:0},[l.runtimeContextDetail.description?(k(),y("p",PE,T(l.runtimeContextDetail.description),1)):V("",!0),d("pre",null,T(l.runtimeContextDetail.schema),1)],64)):(k(),y("pre",$E,T(l.runtimeContextDetail.content),1))])],8,NE)])):V("",!0)])),(k(),ht(Kt,{to:"body"},[l.backgroundTaskDetail?(k(),y("div",{key:0,class:"tool-result-modal-backdrop",onClick:tt(ci,["self"])},[d("section",BE,[d("header",UE,[d("div",FE,[r[123]||(r[123]=d("strong",null,"后台任务",-1)),d("span",zE,T(wn.value.length),1)]),d("button",{type:"button",class:"tool-result-modal-close","aria-label":"关闭",onClick:ci},"×")]),d("div",{class:de(["tool-result-modal-content","background-task-page",{single:wn.value.length<=1}])},[wn.value.length>1?(k(),y("nav",HE,[(k(!0),y(ce,null,Te(wn.value,x=>(k(),y("button",{key:us(x),type:"button",class:de(["background-task-index-item",{active:us(x)===us(l.backgroundTaskDetail)}]),title:jo(x),onClick:M=>li(x)},[d("span",{class:de(["background-task-dot",`status-${x.status}`])},null,2),d("strong",null,T(Ys(x)),1)],10,jE))),128))])):V("",!0),d("article",WE,[d("header",KE,[d("div",VE,[d("span",{class:de(["background-task-dot",`status-${l.backgroundTaskDetail.status}`])},null,2),d("strong",null,T(Ys(l.backgroundTaskDetail)),1)]),d("span",{class:de(["tool-result-modal-status",`status-${l.backgroundTaskDetail.status}`])},T(Js(l.backgroundTaskDetail.status)),3)]),d("dl",GE,[Cc(l.backgroundTaskDetail)?(k(),y("div",qE,[r[124]||(r[124]=d("dt",null,"时长",-1)),d("dd",null,T(Cc(l.backgroundTaskDetail)),1)])):V("",!0),d("div",null,[r[125]||(r[125]=d("dt",null,"创建",-1)),d("dd",null,T(ni(l.backgroundTaskDetail.createdAt)),1)]),l.backgroundTaskDetail.kind==="agent"?(k(),y("div",ZE,[r[126]||(r[126]=d("dt",null,"轮次",-1)),d("dd",null,"第 "+T(l.backgroundTaskDetail.runGeneration||1)+" 轮",1)])):V("",!0),l.backgroundTaskDetail.processId?(k(),y("div",QE,[r[127]||(r[127]=d("dt",null,"PID",-1)),d("dd",null,T(l.backgroundTaskDetail.processId),1)])):V("",!0),l.backgroundTaskDetail.shell?(k(),y("div",YE,[r[128]||(r[128]=d("dt",null,"Shell",-1)),d("dd",null,T(l.backgroundTaskDetail.shell)+T(l.backgroundTaskDetail.tty?" · TTY":""),1)])):V("",!0),l.backgroundTaskDetail.sessionId?(k(),y("div",JE,[r[129]||(r[129]=d("dt",null,"会话",-1)),d("dd",null,T(l.backgroundTaskDetail.sessionId),1)])):V("",!0),l.backgroundTaskDetail.agentId?(k(),y("div",XE,[r[130]||(r[130]=d("dt",null,"代理",-1)),d("dd",null,T(l.backgroundTaskDetail.agentId),1)])):V("",!0),l.backgroundTaskDetail.taskId&&l.backgroundTaskDetail.kind==="agent"?(k(),y("div",eT,[r[131]||(r[131]=d("dt",null,"任务",-1)),d("dd",null,T(l.backgroundTaskDetail.taskId),1)])):V("",!0),l.backgroundTaskDetail.progress?(k(),y("div",tT,[r[132]||(r[132]=d("dt",null,"工具",-1)),d("dd",null,T(l.backgroundTaskDetail.progress.totalToolUseCount||0),1)])):V("",!0),l.backgroundTaskDetail.cwd?(k(),y("div",nT,[r[133]||(r[133]=d("dt",null,"目录",-1)),d("dd",null,T(l.backgroundTaskDetail.cwd),1)])):V("",!0),l.backgroundTaskDetail.outputFile?(k(),y("div",sT,[r[134]||(r[134]=d("dt",null,"输出",-1)),d("dd",null,T(l.backgroundTaskDetail.outputFile),1)])):V("",!0)]),l.backgroundTaskDetail.kind!=="agent"&&Ic(l.backgroundTaskDetail)?(k(),y("section",rT,[r[135]||(r[135]=d("header",null,"命令",-1)),d("pre",iT,T(Ic(l.backgroundTaskDetail)),1)])):V("",!0),l.backgroundTaskDetail.kind==="terminal"?(k(),y("section",oT,[d("div",aT,[r[136]||(r[136]=d("strong",null,"输出",-1)),l.backgroundTaskDetail.status==="running"?(k(),y("i",lT)):V("",!0)]),d("pre",{ref_key:"backgroundTaskOutput",ref:te,class:"background-task-live-output"},T(Xp(l.backgroundTaskDetail)||"等待输出…"),513)])):Wo(l.backgroundTaskDetail)||Ko(l.backgroundTaskDetail).length?(k(),y("section",cT,[d("div",uT,[r[137]||(r[137]=d("strong",null,"进度",-1)),l.backgroundTaskDetail.status==="running"?(k(),y("i",dT)):V("",!0)]),Wo(l.backgroundTaskDetail)?(k(),y("pre",fT,T(Wo(l.backgroundTaskDetail)),1)):V("",!0),Ko(l.backgroundTaskDetail).length?(k(),y("pre",gT,T(Ko(l.backgroundTaskDetail).map(x=>`${x.status==="completed"?"✓":x.status==="failed"?"×":"•"} ${x.title}`).join(`
|
|
123
|
+
`)),1)):V("",!0)])):V("",!0),l.backgroundTaskDetail.kind==="agent"?(k(),y("section",pT,[r[139]||(r[139]=d("div",{class:"background-task-output-head"},[d("strong",null,"消息交付")],-1)),d("p",null,"待交付 "+T(Mt(Rd)(l.backgroundTaskDetail).queued)+" · 本轮最近已交付 "+T(Mt(Rd)(l.backgroundTaskDetail).delivered)+"(保留记录,非累计)",1),Mt(Zv)(l.backgroundTaskDetail)?(k(),y("p",hT,[d("strong",null,"待续跑 · "+T(l.backgroundTaskDetail.pendingMessageCount)+" 条未交付,需要显式续跑",1)])):V("",!0),d("p",null,"最后活动:"+T((rr=l.backgroundTaskDetail.progress)!=null&&rr.lastActivity?ni(l.backgroundTaskDetail.progress.lastActivity):"未提供"),1),r[140]||(r[140]=d("p",null,"已交付仅表示进入模型上下文,不代表采纳或完成。结束后仍有待交付消息时,需要显式续跑。",-1)),d("div",mT,[d("strong",null,"本轮结果"+T(((wi=l.backgroundTaskDetail.result)==null?void 0:wi.status)==="incomplete"?" · 未完成":""),1)]),d("pre",bT,T(Mt(Md)(l.backgroundTaskDetail)||"本轮尚无最终结果"),1),Mt(Nd)(l.backgroundTaskDetail).length?(k(),y("details",kT,[r[138]||(r[138]=d("summary",null,"历史轮次(最近 3 轮)",-1)),(k(!0),y(ce,null,Te(Mt(Nd)(l.backgroundTaskDetail),x=>{var M;return k(),y("section",{key:x.runGeneration},[d("header",null,"第 "+T(x.runGeneration)+" 轮 · "+T(Js(((M=x.result)==null?void 0:M.status)==="incomplete"?"incomplete":x.status)),1),d("pre",yT,T(Mt(Md)(x)||"无结果"),1)])}),128))])):V("",!0)])):V("",!0)])],2)])])):V("",!0),xn.value?(k(),y("div",{key:1,class:"tool-result-modal-backdrop",onClick:tt(Gs,["self"])},[d("section",{class:"tool-result-modal",role:"dialog","aria-modal":"true","aria-label":`${jn(xn.value)}详情`},[d("header",vT,[d("div",null,[d("div",wT,[d("strong",null,T(jn(xn.value)),1),d("span",{class:de(["tool-result-modal-status",`status-${cs(xn.value).key}`])},T(cs(xn.value).label),3)]),vc(xn.value)?(k(),y("p",xT,T(vc(xn.value)),1)):V("",!0)]),d("button",{type:"button",class:"tool-result-modal-close","aria-label":"关闭工具结果",onClick:Gs},"×")]),d("div",ST,[d("div",{class:"message-text markdown tool-detail-markdown",innerHTML:kh(xn.value)},null,8,ET)]),d("footer",{class:"tool-result-modal-footer"},[d("button",{type:"button",class:"primary",onClick:Gs},"关闭")])],8,_T)])):V("",!0)]))],64)}}};dy(OT).mount("#app");
|