scream-code 0.10.13 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{app-DBxlfmut.mjs → app-CuAxNnOv.mjs} +67 -17
- package/dist/main.mjs +1 -1
- package/dist/public/assets/index-2xNGacMZ.js +91 -0
- package/dist/public/assets/index-2xNGacMZ.js.map +1 -0
- package/dist/public/assets/index-CufIY2bi.css +1 -0
- package/dist/public/index.html +2 -2
- package/package.json +1 -1
- package/dist/public/assets/index-DDxNjEwB.css +0 -1
- package/dist/public/assets/index-Dh3SHY7E.js +0 -93
- package/dist/public/assets/index-Dh3SHY7E.js.map +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./html-GMplVEZG.js","./javascript-wDzz0qaB.js","./css-DPfMkruS.js","./vue-DVfSmUF7.js","./typescript-BPQ3VLAy.js","./json-Cp-IABpG.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var uu=Object.defineProperty;var fu=(e,t,n)=>t in e?uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>fu(e,typeof t!="symbol"?t+"":t,n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();/**
|
|
3
|
+
* @vue/shared v3.5.40
|
|
4
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5
|
+
* @license MIT
|
|
6
|
+
**/function Oo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ae={},Nn=[],Tt=()=>{},Wl=()=>!1,mr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),vr=e=>e.startsWith("onUpdate:"),Fe=Object.assign,Do=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},du=Object.prototype.hasOwnProperty,we=(e,t)=>du.call(e,t),oe=Array.isArray,On=e=>xs(e)==="[object Map]",ql=e=>xs(e)==="[object Set]",$i=e=>xs(e)==="[object Date]",fe=e=>typeof e=="function",Pe=e=>typeof e=="string",Rt=e=>typeof e=="symbol",Se=e=>e!==null&&typeof e=="object",Vl=e=>(Se(e)||fe(e))&&fe(e.then)&&fe(e.catch),Kl=Object.prototype.toString,xs=e=>Kl.call(e),hu=e=>xs(e).slice(8,-1),Zl=e=>xs(e)==="[object Object]",Bo=e=>Pe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ss=Oo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),yr=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},pu=/-\w/g,ut=yr(e=>e.replace(pu,t=>t.slice(1).toUpperCase())),gu=/\B([A-Z])/g,dn=yr(e=>e.replace(gu,"-$1").toLowerCase()),br=yr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Or=yr(e=>e?`on${br(e)}`:""),zt=(e,t)=>!Object.is(e,t),Fs=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Yl=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},zo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},mu=e=>{const t=Pe(e)?Number(e):NaN;return isNaN(t)?e:t};let Ri;const kr=()=>Ri||(Ri=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $n(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Pe(s)?ku(s):$n(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Pe(e)||Se(e))return e}const vu=/;(?![^(]*\))/g,yu=/:([^]+)/,bu=/\/\*[^]*?\*\//g;function ku(e){const t={};return e.replace(bu,"").split(vu).forEach(n=>{if(n){const s=n.split(yu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ve(e){let t="";if(Pe(e))t=e;else if(oe(e))for(let n=0;n<e.length;n++){const s=ve(e[n]);s&&(t+=s+" ")}else if(Se(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _u="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",wu=Oo(_u);function Jl(e){return!!e||e===""}function Su(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=jo(e[s],t[s]);return n}function jo(e,t){if(e===t)return!0;let n=$i(e),s=$i(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Rt(e),s=Rt(t),n||s)return e===t;if(n=oe(e),s=oe(t),n||s)return n&&s?Su(e,t):!1;if(n=Se(e),s=Se(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),a=t.hasOwnProperty(i);if(l&&!a||!l&&a||!jo(e[i],t[i]))return!1}}return String(e)===String(t)}const Xl=e=>!!(e&&e.__v_isRef===!0),I=e=>Pe(e)?e:e==null?"":oe(e)||Se(e)&&(e.toString===Kl||!fe(e.toString))?Xl(e)?I(e.value):JSON.stringify(e,Ql,2):String(e),Ql=(e,t)=>Xl(t)?Ql(e,t.value):On(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Dr(s,o)+" =>"]=r,n),{})}:ql(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Dr(n))}:Rt(t)?Dr(t):Se(t)&&!oe(t)&&!Zl(t)?String(t):t,Dr=(e,t="")=>{var n;return Rt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function xu(e){return e==null?"initial":typeof e=="string"?e===""?" ":e:String(e)}/**
|
|
7
|
+
* @vue/reactivity v3.5.40
|
|
8
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
9
|
+
* @license MIT
|
|
10
|
+
**/let Ze;class Cu{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&&Ze&&(Ze.active?(this.parent=Ze,this.index=(Ze.scopes||(Ze.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){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[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){const r=this.scopes.slice();for(t=0,n=r.length;t<n;t++)r[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Ze;try{return Ze=this,t()}finally{Ze=n}}}on(){++this._on===1&&(this.prevScope=Ze,Ze=this)}off(){if(this._on>0&&--this._on===0){if(Ze===this)Ze=this.prevScope;else{let t=Ze;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,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const r=this.scopes.slice();for(n=0,s=r.length;n<s;n++)r[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.parent=void 0}}}function Tu(){return Ze}let Ie;const Br=new WeakSet;class ea{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,Ze&&(Ze.active?Ze.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Br.has(this)&&(Br.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||na(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ai(this),sa(this);const t=Ie,n=$t;Ie=this,$t=!0;try{return this.fn()}finally{ra(this),Ie=t,$t=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Uo(t);this.deps=this.depsTail=void 0,Ai(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Br.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){oo(this)&&this.run()}get dirty(){return oo(this)}}let ta=0,rs,os;function na(e,t=!1){if(e.flags|=8,t){e.next=os,os=e;return}e.next=rs,rs=e}function Fo(){ta++}function Go(){if(--ta>0)return;if(os){let t=os;for(os=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;rs;){let t=rs;for(rs=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function sa(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ra(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),Uo(s),$u(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function oo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(oa(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function oa(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===fs)||(e.globalVersion=fs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!oo(e))))return;e.flags|=2;const t=e.dep,n=Ie,s=$t;Ie=e,$t=!0;try{sa(e);const r=e.fn(e._value);(t.version===0||zt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Ie=n,$t=s,ra(e),e.flags&=-3}}function Uo(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)Uo(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function $u(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let $t=!0;const ia=[];function Yt(){ia.push($t),$t=!1}function Jt(){const e=ia.pop();$t=e===void 0?!0:e}function Ai(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ie;Ie=void 0;try{t()}finally{Ie=n}}}let fs=0;class Ru{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 Ho{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(!Ie||!$t||Ie===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ie)n=this.activeLink=new Ru(Ie,this),Ie.deps?(n.prevDep=Ie.depsTail,Ie.depsTail.nextDep=n,Ie.depsTail=n):Ie.deps=Ie.depsTail=n,la(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Ie.depsTail,n.nextDep=void 0,Ie.depsTail.nextDep=n,Ie.depsTail=n,Ie.deps===n&&(Ie.deps=s)}return n}trigger(t){this.version++,fs++,this.notify(t)}notify(t){Fo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Go()}}}function la(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)la(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const io=new WeakMap,_n=Symbol(""),lo=Symbol(""),ds=Symbol("");function et(e,t,n){if($t&&Ie){let s=io.get(e);s||io.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Ho),r.map=s,r.key=n),r.track()}}function Ht(e,t,n,s,r,o){const i=io.get(e);if(!i){fs++;return}const l=a=>{a&&a.trigger()};if(Fo(),t==="clear")i.forEach(l);else{const a=oe(e),c=a&&Bo(n);if(a&&n==="length"){const u=Number(s);i.forEach((d,h)=>{(h==="length"||h===ds||!Rt(h)&&h>=u)&&l(d)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(ds)),t){case"add":a?c&&l(i.get("length")):(l(i.get(_n)),On(e)&&l(i.get(lo)));break;case"delete":a||(l(i.get(_n)),On(e)&&l(i.get(lo)));break;case"set":On(e)&&l(i.get(_n));break}}Go()}function En(e){const t=_e(e);return t===e?t:(et(t,"iterate",ds),kt(e)?t:t.map(At))}function _r(e){return et(e=_e(e),"iterate",ds),e}function Dt(e,t){return Xt(e)?Gn(wn(e)?At(t):t):At(t)}const Au={__proto__:null,[Symbol.iterator](){return zr(this,Symbol.iterator,e=>Dt(this,e))},concat(...e){return En(this).concat(...e.map(t=>oe(t)?En(t):t))},entries(){return zr(this,"entries",e=>(e[1]=Dt(this,e[1]),e))},every(e,t){return jt(this,"every",e,t,void 0,arguments)},filter(e,t){return jt(this,"filter",e,t,n=>n.map(s=>Dt(this,s)),arguments)},find(e,t){return jt(this,"find",e,t,n=>Dt(this,n),arguments)},findIndex(e,t){return jt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return jt(this,"findLast",e,t,n=>Dt(this,n),arguments)},findLastIndex(e,t){return jt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return jt(this,"forEach",e,t,void 0,arguments)},includes(...e){return jr(this,"includes",e)},indexOf(...e){return jr(this,"indexOf",e)},join(e){return En(this).join(e)},lastIndexOf(...e){return jr(this,"lastIndexOf",e)},map(e,t){return jt(this,"map",e,t,void 0,arguments)},pop(){return Vn(this,"pop")},push(...e){return Vn(this,"push",e)},reduce(e,...t){return Ei(this,"reduce",e,t)},reduceRight(e,...t){return Ei(this,"reduceRight",e,t)},shift(){return Vn(this,"shift")},some(e,t){return jt(this,"some",e,t,void 0,arguments)},splice(...e){return Vn(this,"splice",e)},toReversed(){return En(this).toReversed()},toSorted(e){return En(this).toSorted(e)},toSpliced(...e){return En(this).toSpliced(...e)},unshift(...e){return Vn(this,"unshift",e)},values(){return zr(this,"values",e=>Dt(this,e))}};function zr(e,t,n){const s=_r(e),r=s[t]();return s!==e&&!kt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Eu=Array.prototype;function jt(e,t,n,s,r,o){const i=_r(e),l=i!==e&&!kt(e),a=i[t];if(a!==Eu[t]){const d=a.apply(e,o);return l?At(d):d}let c=n;i!==e&&(l?c=function(d,h){return n.call(this,Dt(e,d),h,e)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function Ei(e,t,n,s){const r=_r(e),o=r!==e&&!kt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,d){return l&&(l=!1,c=Dt(e,c)),n.call(this,c,Dt(e,u),d,e)}):n.length>3&&(i=function(c,u,d){return n.call(this,c,u,d,e)}));const a=r[t](i,...s);return l?Dt(e,a):a}function jr(e,t,n){const s=_e(e);et(s,"iterate",ds);const r=s[t](...n);return(r===-1||r===!1)&&Ko(n[0])?(n[0]=_e(n[0]),s[t](...n)):r}function Vn(e,t,n=[]){Yt(),Fo();const s=_e(e)[t].apply(e,n);return Go(),Jt(),s}const Iu=Oo("__proto__,__v_isRef,__isVue"),aa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Rt));function Lu(e){Rt(e)||(e=String(e));const t=_e(this);return et(t,"has",e),t.hasOwnProperty(e)}class ca{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(r?o?Gu:ha:o?da:fa).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=oe(t);if(!r){let a;if(i&&(a=Au[n]))return a;if(n==="hasOwnProperty")return Lu}const l=Reflect.get(t,n,rt(t)?t:s);if((Rt(n)?aa.has(n):Iu(n))||(r||et(t,"get",n),o))return l;if(rt(l)){const a=i&&Bo(n)?l:l.value;return r&&Se(a)?co(a):a}return Se(l)?r?co(l):qo(l):l}}class ua extends ca{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=oe(t)&&Bo(n);if(!this._isShallow){const c=Xt(o);if(!kt(s)&&!Xt(s)&&(o=_e(o),s=_e(s)),!i&&rt(o)&&!rt(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:we(t,n),a=Reflect.set(t,n,s,rt(t)?t:r);return t===_e(r)&&a&&(l?zt(s,o)&&Ht(t,"set",n,s):Ht(t,"add",n,s)),a}deleteProperty(t,n){const s=we(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&Ht(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!Rt(n)||!aa.has(n))&&et(t,"has",n),s}ownKeys(t){return et(t,"iterate",oe(t)?"length":_n),Reflect.ownKeys(t)}}class Pu extends ca{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Mu=new ua,Nu=new Pu,Ou=new ua(!0);const ao=e=>e,Ls=e=>Reflect.getPrototypeOf(e);function Du(e,t,n){return function(...s){const r=this.__v_raw,o=_e(r),i=On(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?ao:t?Gn:At;return!t&&et(o,"iterate",a?lo:_n),Fe(Object.create(c),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:l?[u(d[0]),u(d[1])]:u(d),done:h}}})}}function Ps(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Bu(e,t){const n={get(r){const o=this.__v_raw,i=_e(o),l=_e(r);e||(zt(r,l)&&et(i,"get",r),et(i,"get",l));const{has:a}=Ls(i),c=t?ao:e?Gn:At;if(a.call(i,r))return c(o.get(r));if(a.call(i,l))return c(o.get(l));o!==i&&o.get(r)},get size(){const r=this.__v_raw;return!e&&et(_e(r),"iterate",_n),r.size},has(r){const o=this.__v_raw,i=_e(o),l=_e(r);return e||(zt(r,l)&&et(i,"has",r),et(i,"has",l)),r===l?o.has(r):o.has(r)||o.has(l)},forEach(r,o){const i=this,l=i.__v_raw,a=_e(l),c=t?ao:e?Gn:At;return!e&&et(a,"iterate",_n),l.forEach((u,d)=>r.call(o,c(u),c(d),i))}};return Fe(n,e?{add:Ps("add"),set:Ps("set"),delete:Ps("delete"),clear:Ps("clear")}:{add(r){const o=_e(this),i=Ls(o),l=_e(r),a=!t&&!kt(r)&&!Xt(r)?l:r;return i.has.call(o,a)||zt(r,a)&&i.has.call(o,r)||zt(l,a)&&i.has.call(o,l)||(o.add(a),Ht(o,"add",a,a)),this},set(r,o){!t&&!kt(o)&&!Xt(o)&&(o=_e(o));const i=_e(this),{has:l,get:a}=Ls(i);let c=l.call(i,r);c||(r=_e(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?zt(o,u)&&Ht(i,"set",r,o):Ht(i,"add",r,o),this},delete(r){const o=_e(this),{has:i,get:l}=Ls(o);let a=i.call(o,r);a||(r=_e(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&Ht(o,"delete",r,void 0),c},clear(){const r=_e(this),o=r.size!==0,i=r.clear();return o&&Ht(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Du(r,e,t)}),n}function Wo(e,t){const n=Bu(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(we(n,r)&&r in s?n:s,r,o)}const zu={get:Wo(!1,!1)},ju={get:Wo(!1,!0)},Fu={get:Wo(!0,!1)};const fa=new WeakMap,da=new WeakMap,ha=new WeakMap,Gu=new WeakMap;function Uu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qo(e){return Xt(e)?e:Vo(e,!1,Mu,zu,fa)}function Hu(e){return Vo(e,!1,Ou,ju,da)}function co(e){return Vo(e,!0,Nu,Fu,ha)}function Vo(e,t,n,s,r){if(!Se(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=r.get(e);if(o)return o;const i=Uu(hu(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function wn(e){return Xt(e)?wn(e.__v_raw):!!(e&&e.__v_isReactive)}function Xt(e){return!!(e&&e.__v_isReadonly)}function kt(e){return!!(e&&e.__v_isShallow)}function Ko(e){return e?!!e.__v_raw:!1}function _e(e){const t=e&&e.__v_raw;return t?_e(t):e}function Wu(e){return!we(e,"__v_skip")&&Object.isExtensible(e)&&Yl(e,"__v_skip",!0),e}const At=e=>Se(e)?qo(e):e,Gn=e=>Se(e)?co(e):e;function rt(e){return e?e.__v_isRef===!0:!1}function K(e){return qu(e,!1)}function qu(e,t){return rt(e)?e:new Vu(e,t)}class Vu{constructor(t,n){this.dep=new Ho,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:_e(t),this._value=n?t:At(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||kt(t)||Xt(t);t=s?t:_e(t),zt(t,n)&&(this._rawValue=t,this._value=s?t:At(t),this.dep.trigger())}}function J(e){return rt(e)?e.value:e}function Ku(e){return fe(e)?e():J(e)}const Zu={get:(e,t,n)=>t==="__v_raw"?e:J(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return rt(r)&&!rt(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function pa(e){return wn(e)?e:new Proxy(e,Zu)}class Yu{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ho(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=fs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ie!==this)return na(this,!0),!0}get value(){const t=this.dep.track();return oa(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ju(e,t,n=!1){let s,r;return fe(e)?s=e:(s=e.get,r=e.set),new Yu(s,r,n)}const Ms={},Vs=new WeakMap;let vn;function Xu(e,t=!1,n=vn){if(n){let s=Vs.get(n);s||Vs.set(n,s=[]),s.push(e)}}function Qu(e,t,n=Ae){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=R=>r?R:kt(R)||r===!1||r===0?Wt(R,1):Wt(R);let u,d,h,p,f=!1,m=!1;if(rt(e)?(d=()=>e.value,f=kt(e)):wn(e)?(d=()=>c(e),f=!0):oe(e)?(m=!0,f=e.some(R=>wn(R)||kt(R)),d=()=>e.map(R=>{if(rt(R))return R.value;if(wn(R))return c(R);if(fe(R))return a?a(R,2):R()})):fe(e)?t?d=a?()=>a(e,2):e:d=()=>{if(h){Yt();try{h()}finally{Jt()}}const R=vn;vn=u;try{return a?a(e,3,[p]):e(p)}finally{vn=R}}:d=Tt,t&&r){const R=d,U=r===!0?1/0:r;d=()=>Wt(R(),U)}const b=Tu(),v=()=>{u.stop(),b&&b.active&&Do(b.effects,u)};if(o&&t){const R=t;t=(...U)=>{const Y=R(...U);return v(),Y}}let S=m?new Array(e.length).fill(Ms):Ms;const x=R=>{if(!(!(u.flags&1)||!u.dirty&&!R))if(t){const U=u.run();if(R||r||f||(m?U.some((Y,D)=>zt(Y,S[D])):zt(U,S))){h&&h();const Y=vn;vn=u;try{const D=[U,S===Ms?void 0:m&&S[0]===Ms?[]:S,p];S=U,a?a(t,3,D):t(...D)}finally{vn=Y}}}else u.run()};return l&&l(x),u=new ea(d),u.scheduler=i?()=>i(x,!1):x,p=R=>Xu(R,!1,u),h=u.onStop=()=>{const R=Vs.get(u);if(R){if(a)a(R,4);else for(const U of R)U();Vs.delete(u)}},t?s?x(!0):S=u.run():i?i(x.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function Wt(e,t=1/0,n){if(t<=0||!Se(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,rt(e))Wt(e.value,t,n);else if(oe(e))for(let s=0;s<e.length;s++)Wt(e[s],t,n);else if(ql(e)||On(e))e.forEach(s=>{Wt(s,t,n)});else if(Zl(e)){for(const s in e)Wt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Wt(e[s],t,n)}return e}/**
|
|
11
|
+
* @vue/runtime-core v3.5.40
|
|
12
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
13
|
+
* @license MIT
|
|
14
|
+
**/function Cs(e,t,n,s){try{return s?e(...s):e()}catch(r){wr(r,t,n)}}function wt(e,t,n,s){if(fe(e)){const r=Cs(e,t,n,s);return r&&Vl(r)&&r.catch(o=>{wr(o,t,n)}),r}if(oe(e)){const r=[];for(let o=0;o<e.length;o++)r.push(wt(e[o],t,n,s));return r}}function wr(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Ae;if(t){let l=t.parent;const a=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const u=l.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,a,c)===!1)return}l=l.parent}if(o){Yt(),Cs(o,null,10,[e,a,c]),Jt();return}}ef(e,n,r,s,i)}function ef(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const at=[];let Ot=-1;const Dn=[];let an=null,In=0;const ga=Promise.resolve();let Ks=null;function Ct(e){const t=Ks||ga;return e?t.then(this?e.bind(this):e):t}function tf(e){let t=Ot+1,n=at.length;for(;t<n;){const s=t+n>>>1,r=at[s],o=hs(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function Zo(e){if(!(e.flags&1)){const t=hs(e),n=at[at.length-1];!n||!(e.flags&2)&&t>=hs(n)?at.push(e):at.splice(tf(t),0,e),e.flags|=1,ma()}}function ma(){Ks||(Ks=ga.then(ba))}function va(e){oe(e)?Dn.push(...e):an&&e.id===-1?an.splice(In+1,0,e):e.flags&1||(Dn.push(e),e.flags|=1),ma()}function Ii(e,t,n=Ot+1){for(;n<at.length;n++){const s=at[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;at.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ya(e){if(Dn.length){const t=[...new Set(Dn)].sort((n,s)=>hs(n)-hs(s));if(Dn.length=0,an){an.push(...t);return}for(an=t,In=0;In<an.length;In++){const n=an[In];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}an=null,In=0}}const hs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ba(e){try{for(Ot=0;Ot<at.length;Ot++){const t=at[Ot];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Cs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Ot<at.length;Ot++){const t=at[Ot];t&&(t.flags&=-2)}Ot=-1,at.length=0,ya(),Ks=null,(at.length||Dn.length)&&ba()}}let Ye=null,ka=null;function Zs(e){const t=Ye;return Ye=e,ka=e&&e.type.__scopeId||null,t}function Je(e,t=Ye,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Xs(-1);const o=Zs(t),i=Zt.length;let l;try{l=e(...r)}finally{for(let a=Zt.length;a>i;a--)ni();Zs(o),s._d&&Xs(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function Ts(e,t){if(Ye===null)return e;const n=Rr(Ye),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=Ae]=t[r];o&&(fe(o)&&(o={mounted:o,updated:o}),o.deep&&Wt(i),s.push({dir:o,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function pn(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let a=l.dir[s];a&&(Yt(),wt(a,n,8,[e.el,l,e,t]),Jt())}}function Sn(e,t){if(nt){let n=nt.provides;const s=nt.parent&&nt.parent.provides;s===n&&(n=nt.provides=Object.create(s)),n[e]=t}}function _t(e,t,n=!1){const s=$r();if(s||zn){let r=zn?zn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&fe(t)?t.call(s&&s.proxy):t}}const nf=Symbol.for("v-scx"),sf=()=>_t(nf);function je(e,t,n){return _a(e,t,n)}function _a(e,t,n=Ae){const{immediate:s,deep:r,flush:o,once:i}=n,l=Fe({},n),a=t&&s||!t&&o!=="post";let c;if(vs){if(o==="sync"){const p=sf();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Tt,p.resume=Tt,p.pause=Tt,p}}const u=nt;l.call=(p,f,m)=>wt(p,u,f,m);let d=!1;o==="post"?l.scheduler=p=>{lt(p,u&&u.suspense)}:o!=="sync"&&(d=!0,l.scheduler=(p,f)=>{f?p():Zo(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const h=Qu(e,t,l);return vs&&(c?c.push(h):a&&h()),h}function rf(e,t,n){const s=this.proxy,r=Pe(e)?e.includes(".")?wa(s,e):()=>s[e]:e.bind(s,s);let o;fe(t)?o=t:(o=t.handler,n=t);const i=$s(this),l=_a(r,o.bind(s),n);return i(),l}function wa(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}const on=new WeakMap,Sa=Symbol("_vte"),xa=e=>e.__isTeleport,yn=e=>e&&(e.disabled||e.disabled===""),of=e=>e&&(e.defer||e.defer===""),Li=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Pi=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,uo=(e,t)=>{const n=e&&e.to;return Pe(n)?t?t(n):null:n},lf={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:d,pbc:h,o:{insert:p,querySelector:f,createText:m,createComment:b,parentNode:v}}=c,S=yn(t.props);let{dynamicChildren:x}=t;const R=(D,le,G)=>{D.shapeFlag&16&&u(D.children,le,G,r,o,i,l,a)},U=(D=t)=>{const le=yn(D.props),G=D.target=uo(D.props,f),ne=fo(G,D,m,p);G&&(i!=="svg"&&Li(G)?i="svg":i!=="mathml"&&Pi(G)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(G),le||(R(D,G,ne),Qn(D,!1)))},Y=D=>{const le=()=>{if(on.get(D)===le){if(on.delete(D),yn(D.props)){const G=v(D.el)||n;R(D,G,D.anchor),Qn(D,!0)}U(D)}};on.set(D,le),lt(le,o)};if(e==null){const D=t.el=m(""),le=t.anchor=m("");if(p(D,n,s),p(le,n,s),of(t.props)||o&&o.pendingBranch){Y(t);return}S&&(R(t,n,le),Qn(t,!0)),U()}else{t.el=e.el;const D=t.anchor=e.anchor,le=on.get(e);if(le){le.flags|=8,on.delete(e),Y(t);return}t.targetStart=e.targetStart;const G=t.target=e.target,ne=t.targetAnchor=e.targetAnchor,se=yn(e.props),j=se?n:G,ce=se?D:ne;if(i==="svg"||Li(G)?i="svg":(i==="mathml"||Pi(G))&&(i="mathml"),x?(h(e.dynamicChildren,x,j,r,o,i,l),ti(e,t,!0)):a||d(e,t,j,ce,r,o,i,l,!1),S)se?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Ns(t,n,D,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const he=uo(t.props,f);he&&(t.target=he,Ns(t,he,null,c,0))}else se&&Ns(t,G,ne,c,1);Qn(t,S)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:d,props:h}=e,p=yn(h),f=o||!p,m=on.get(e);if(m&&(m.flags|=8,on.delete(e)),d&&(r(c),r(u)),o&&r(a),!m&&(p||d)&&i&16)for(let b=0;b<l.length;b++){const v=l[b];s(v,t,n,f,!!v.dynamicChildren)}},move:Ns,hydrate:af};function Ns(e,t,n,{o:{insert:s},m:r},o=2){o===0&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:a,children:c,props:u}=e,d=o===2;if(d&&s(i,t,n),!on.has(e)&&(!d||yn(u))&&a&16)for(let h=0;h<c.length;h++)r(c[h],t,n,2);d&&s(l,t,n)}function af(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:a,insert:c,createText:u}},d){function h(b,v){let S=v;for(;S;){if(S&&S.nodeType===8){if(S.data==="teleport start anchor")t.targetStart=S;else if(S.data==="teleport anchor"){t.targetAnchor=S,b._lpa=t.targetAnchor&&i(t.targetAnchor);break}}S=i(S)}}function p(b,v){v.anchor=d(i(b),v,l(b),n,s,r,o)}const f=t.target=uo(t.props,a),m=yn(t.props);if(f){const b=f._lpa||f.firstChild;t.shapeFlag&16&&(m?(p(e,t),h(f,b),t.targetAnchor||fo(f,t,u,c,l(e)===f?e:null)):(t.anchor=i(e),h(f,b),t.targetAnchor||fo(f,t,u,c),d(b&&i(b),t,f,n,s,r,o))),Qn(t,m)}else m&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const Yo=lf;function Qn(e,t){const n=e.ctx;if(n&&n.ut){let s,r;for(t?(s=e.el,r=e.anchor):(s=e.targetStart,r=e.targetAnchor);s&&s!==r;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function fo(e,t,n,s,r=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[Sa]=i,e&&(s(o,e,r),s(i,e,r)),i}const yt=Symbol("_leaveCb"),Kn=Symbol("_enterCb");function Ca(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return en(()=>{e.isMounted=!0}),hn(()=>{e.isUnmounting=!0}),e}const mt=[Function,Array],Ta={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:mt,onEnter:mt,onAfterEnter:mt,onEnterCancelled:mt,onBeforeLeave:mt,onLeave:mt,onAfterLeave:mt,onLeaveCancelled:mt,onBeforeAppear:mt,onAppear:mt,onAfterAppear:mt,onAppearCancelled:mt},$a=e=>{const t=e.subTree;return t.component?$a(t.component):t},cf={name:"BaseTransition",props:Ta,setup(e,{slots:t}){const n=$r(),s=Ca();return()=>{const r=t.default&&Jo(t.default(),!0),o=r&&r.length?Ra(r):n.subTree?q():void 0;if(!o)return;const i=_e(e),{mode:l}=i;if(s.isLeaving)return Fr(o);const a=Mi(o);if(!a)return Fr(o);let c=ps(a,i,s,n,d=>c=d);a.type!==tt&&Cn(a,c);let u=n.subTree&&Mi(n.subTree);if(u&&u.type!==tt&&!bn(u,a)&&$a(n).type!==tt){let d=ps(u,i,s,n);if(Cn(u,d),l==="out-in"&&a.type!==tt)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},Fr(o);l==="in-out"&&a.type!==tt?d.delayLeave=(h,p,f)=>{const m=Aa(s,u);m[String(u.key)]=u,h[yt]=()=>{p(),h[yt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{f(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Ra(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==tt){t=n;break}}return t}const uf=cf;function Aa(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function ps(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:p,onAfterLeave:f,onLeaveCancelled:m,onBeforeAppear:b,onAppear:v,onAfterAppear:S,onAppearCancelled:x}=t,R=String(e.key),U=Aa(n,e),Y=(G,ne)=>{G&&wt(G,s,9,ne)},D=(G,ne)=>{const se=ne[1];Y(G,ne),oe(G)?G.every(j=>j.length<=1)&&se():G.length<=1&&se()},le={mode:i,persisted:l,beforeEnter(G){let ne=a;if(!n.isMounted)if(o)ne=b||a;else return;G[yt]&&G[yt](!0);const se=U[R];se&&bn(e,se)&&se.el[yt]&&se.el[yt](),Y(ne,[G])},enter(G){if(U[R]===e)return;let ne=c,se=u,j=d;if(!n.isMounted)if(o)ne=v||c,se=S||u,j=x||d;else return;let ce=!1;G[Kn]=pe=>{ce||(ce=!0,pe?Y(j,[G]):Y(se,[G]),le.delayedLeave&&le.delayedLeave(),G[Kn]=void 0)};const he=G[Kn].bind(null,!1);ne?D(ne,[G,he]):he()},leave(G,ne){const se=String(e.key);if(G[Kn]&&G[Kn](!0),n.isUnmounting)return ne();Y(h,[G]);let j=!1;G[yt]=he=>{j||(j=!0,ne(),he?Y(m,[G]):Y(f,[G]),G[yt]=void 0,U[se]===e&&delete U[se])};const ce=G[yt].bind(null,!1);U[se]=e,p?D(p,[G,ce]):ce()},clone(G){const ne=ps(G,t,n,s,r);return r&&r(ne),ne}};return le}function Fr(e){if(Sr(e))return e=un(e),e.children=null,e}function Mi(e){if(!Sr(e))return xa(e.type)&&e.children?Ra(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&fe(n.default))return n.default()}}function Cn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Cn(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 Jo(e,t=!1,n){let s=[],r=0;for(let o=0;o<e.length;o++){let i=e[o];const l=n==null?i.key:String(n)+String(i.key!=null?i.key:o);i.type===te?(i.patchFlag&128&&r++,s=s.concat(Jo(i.children,t,l))):(t||i.type!==tt)&&s.push(l!=null?un(i,{key:l}):i)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function Te(e,t){return fe(e)?Fe({name:e.name},t,{setup:e}):e}function Ea(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ni(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Ys=new WeakMap;function is(e,t,n,s,r=!1){if(oe(e)){e.forEach((m,b)=>is(m,t&&(oe(t)?t[b]:t),n,s,r));return}if(Bn(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&is(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Rr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===Ae?l.refs={}:l.refs,d=l.setupState,h=_e(d),p=d===Ae?Wl:m=>Ni(u,m)?!1:we(h,m),f=(m,b)=>!(b&&Ni(u,b));if(c!=null&&c!==a){if(Oi(t),Pe(c))u[c]=null,p(c)&&(d[c]=null);else if(rt(c)){const m=t;f(c,m.k)&&(c.value=null),m.k&&(u[m.k]=null)}}if(fe(a))Cs(a,l,12,[i,u]);else{const m=Pe(a),b=rt(a);if(m||b){const v=()=>{if(e.f){const S=m?p(a)?d[a]:u[a]:f()||!e.k?a.value:u[e.k];if(r)oe(S)&&Do(S,o);else if(oe(S))S.includes(o)||S.push(o);else if(m)u[a]=[o],p(a)&&(d[a]=u[a]);else{const x=[o];f(a,e.k)&&(a.value=x),e.k&&(u[e.k]=x)}}else m?(u[a]=i,p(a)&&(d[a]=i)):b&&(f(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const S=()=>{v(),Ys.delete(e)};S.id=-1,Ys.set(e,S),lt(S,n)}else Oi(e),v()}}}function Oi(e){const t=Ys.get(e);t&&(t.flags|=8,Ys.delete(e))}kr().requestIdleCallback;kr().cancelIdleCallback;const Bn=e=>!!e.type.__asyncLoader,Sr=e=>e.type.__isKeepAlive;function ff(e,t){Ia(e,"a",t)}function df(e,t){Ia(e,"da",t)}function Ia(e,t,n=nt){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(xr(t,s,n),n){let r=n.parent;for(;r&&r.parent;)Sr(r.parent.vnode)&&hf(s,t,n,r),r=r.parent}}function hf(e,t,n,s){const r=xr(t,e,s,!0);Xo(()=>{Do(s[t],r)},n)}function xr(e,t,n=nt,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{Yt();const l=$s(n),a=wt(t,n,e,i);return l(),Jt(),a});return s?r.unshift(o):r.push(o),o}}const Qt=e=>(t,n=nt)=>{(!vs||e==="sp")&&xr(e,(...s)=>t(...s),n)},pf=Qt("bm"),en=Qt("m"),La=Qt("bu"),Pa=Qt("u"),hn=Qt("bum"),Xo=Qt("um"),gf=Qt("sp"),mf=Qt("rtg"),vf=Qt("rtc");function yf(e,t=nt){xr("ec",e,t)}const bf="components",Ma=Symbol.for("v-ndc");function kf(e){return Pe(e)?_f(bf,e,!1)||e:e||Ma}function _f(e,t,n=!0,s=!1){const r=Ye||nt;if(r){const o=r.type;{const l=od(o,!1);if(l&&(l===t||l===ut(t)||l===br(ut(t))))return o}const i=Di(r[e]||o[e],t)||Di(r.appContext[e],t);return!i&&s?o:i}}function Di(e,t){return e&&(e[t]||e[ut(t)]||e[br(ut(t))])}function qe(e,t,n,s){let r;const o=n,i=oe(e);if(i||Pe(e)){const l=i&&wn(e);let a=!1,c=!1;l&&(a=!kt(e),c=Xt(e),e=_r(e)),r=new Array(e.length);for(let u=0,d=e.length;u<d;u++)r[u]=t(a?c?Gn(At(e[u])):At(e[u]):e[u],u,void 0,o)}else if(typeof e=="number"){r=new Array(e);for(let l=0;l<e;l++)r[l]=t(l+1,l,void 0,o)}else if(Se(e))if(e[Symbol.iterator])r=Array.from(e,(l,a)=>t(l,a,void 0,o));else{const l=Object.keys(e);r=new Array(l.length);for(let a=0,c=l.length;a<c;a++){const u=l[a];r[a]=t(e[u],u,a,o)}}else r=[];return r}function Gs(e,t,n={},s,r,o){if(Ye.ce||Ye.parent&&Bn(Ye.parent)&&Ye.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),_(),Oe(te,null,[z("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Zt.length;_();let a;try{const c=i&&Na(i(n)),u=n.key||o||c&&c.key;a=Oe(te,{key:(u&&!Rt(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=Zt.length;u>l;u--)ni();throw c}finally{i&&i._c&&(i._d=!0)}return a}function Na(e){return e.some(t=>ms(t)?!(t.type===tt||t.type===te&&!Na(t.children)):!0)?e:null}const ho=e=>e?ec(e)?Rr(e):ho(e.parent):null,ls=Fe(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=>ho(e.parent),$root:e=>ho(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Da(e),$forceUpdate:e=>e.f||(e.f=()=>{Zo(e.update)}),$nextTick:e=>e.n||(e.n=Ct.bind(e.proxy)),$watch:e=>rf.bind(e)}),Gr=(e,t)=>e!==Ae&&!e.__isScriptSetup&&we(e,t),wf={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:a}=e;if(t[0]!=="$"){const h=i[t];if(h!==void 0)switch(h){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(Gr(s,t))return i[t]=1,s[t];if(r!==Ae&&we(r,t))return i[t]=2,r[t];if(we(o,t))return i[t]=3,o[t];if(n!==Ae&&we(n,t))return i[t]=4,n[t];po&&(i[t]=0)}}const c=ls[t];let u,d;if(c)return t==="$attrs"&&et(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==Ae&&we(n,t))return i[t]=4,n[t];if(d=a.config.globalProperties,we(d,t))return d[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Gr(r,t)?(r[t]=n,!0):s!==Ae&&we(s,t)?(s[t]=n,!0):we(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,props:o,type:i}},l){let a;return!!(n[l]||e!==Ae&&l[0]!=="$"&&we(e,l)||Gr(t,l)||we(o,l)||we(s,l)||we(ls,l)||we(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:we(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Bi(e){return oe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let po=!0;function Sf(e){const t=Da(e),n=e.proxy,s=e.ctx;po=!1,t.beforeCreate&&zi(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:p,updated:f,activated:m,deactivated:b,beforeDestroy:v,beforeUnmount:S,destroyed:x,unmounted:R,render:U,renderTracked:Y,renderTriggered:D,errorCaptured:le,serverPrefetch:G,expose:ne,inheritAttrs:se,components:j,directives:ce,filters:he}=t;if(c&&xf(c,s,null),i)for(const be in i){const ge=i[be];fe(ge)&&(s[be]=ge.bind(n))}if(r){const be=r.call(n,n);Se(be)&&(e.data=qo(be))}if(po=!0,o)for(const be in o){const ge=o[be],ot=fe(ge)?ge.bind(n,n):fe(ge.get)?ge.get.bind(n,n):Tt,De=!fe(ge)&&fe(ge.set)?ge.set.bind(n):Tt,Ve=Z({get:ot,set:De});Object.defineProperty(s,be,{enumerable:!0,configurable:!0,get:()=>Ve.value,set:Be=>Ve.value=Be})}if(l)for(const be in l)Oa(l[be],s,n,be);if(a){const be=fe(a)?a.call(n):a;Reflect.ownKeys(be).forEach(ge=>{Sn(ge,be[ge])})}u&&zi(u,e,"c");function de(be,ge){oe(ge)?ge.forEach(ot=>be(ot.bind(n))):ge&&be(ge.bind(n))}if(de(pf,d),de(en,h),de(La,p),de(Pa,f),de(ff,m),de(df,b),de(yf,le),de(vf,Y),de(mf,D),de(hn,S),de(Xo,R),de(gf,G),oe(ne))if(ne.length){const be=e.exposed||(e.exposed={});ne.forEach(ge=>{Object.defineProperty(be,ge,{get:()=>n[ge],set:ot=>n[ge]=ot,enumerable:!0})})}else e.exposed||(e.exposed={});U&&e.render===Tt&&(e.render=U),se!=null&&(e.inheritAttrs=se),j&&(e.components=j),ce&&(e.directives=ce),G&&Ea(e)}function xf(e,t,n=Tt){oe(e)&&(e=go(e));for(const s in e){const r=e[s];let o;Se(r)?"default"in r?o=_t(r.from||s,r.default,!0):o=_t(r.from||s):o=_t(r),rt(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function zi(e,t,n){wt(oe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Oa(e,t,n,s){let r=s.includes(".")?wa(n,s):()=>n[s];if(Pe(e)){const o=t[e];fe(o)&&je(r,o)}else if(fe(e))je(r,e.bind(n));else if(Se(e))if(oe(e))e.forEach(o=>Oa(o,t,n,s));else{const o=fe(e.handler)?e.handler.bind(n):t[e.handler];fe(o)&&je(r,o,e)}}function Da(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let a;return l?a=l:!r.length&&!n&&!s?a=t:(a={},r.length&&r.forEach(c=>Js(a,c,i,!0)),Js(a,t,i)),Se(t)&&o.set(t,a),a}function Js(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Js(e,o,n,!0),r&&r.forEach(i=>Js(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=Cf[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const Cf={data:ji,props:Fi,emits:Fi,methods:es,computed:es,beforeCreate:it,created:it,beforeMount:it,mounted:it,beforeUpdate:it,updated:it,beforeDestroy:it,beforeUnmount:it,destroyed:it,unmounted:it,activated:it,deactivated:it,errorCaptured:it,serverPrefetch:it,components:es,directives:es,watch:$f,provide:ji,inject:Tf};function ji(e,t){return t?e?function(){return Fe(fe(e)?e.call(this,this):e,fe(t)?t.call(this,this):t)}:t:e}function Tf(e,t){return es(go(e),go(t))}function go(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function it(e,t){return e?[...new Set([].concat(e,t))]:t}function es(e,t){return e?Fe(Object.create(null),e,t):t}function Fi(e,t){return e?oe(e)&&oe(t)?[...new Set([...e,...t])]:Fe(Object.create(null),Bi(e),Bi(t??{})):t}function $f(e,t){if(!e)return t;if(!t)return e;const n=Fe(Object.create(null),e);for(const s in t)n[s]=it(e[s],t[s]);return n}function Ba(){return{app:null,config:{isNativeTag:Wl,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 Rf=0;function Af(e,t){return function(s,r=null){fe(s)||(s=Fe({},s)),r!=null&&!Se(r)&&(r=null);const o=Ba(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:Rf++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:ld,get config(){return o.config},set config(u){},use(u,...d){return i.has(u)||(u&&fe(u.install)?(i.add(u),u.install(c,...d)):fe(u)&&(i.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!a){const p=c._ceVNode||z(s,r);return p.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),e(p,u,h),a=!0,c._container=u,u.__vue_app__=c,Rr(p.component)}},onUnmount(u){l.push(u)},unmount(){a&&(wt(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=zn;zn=c;try{return u()}finally{zn=d}}};return c}}let zn=null;const Ef=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ut(t)}Modifiers`]||e[`${dn(t)}Modifiers`];function If(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ae;let r=n;const o=t.startsWith("update:"),i=o&&Ef(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>Pe(u)?u.trim():u)),i.number&&(r=n.map(zo)));let l,a=s[l=Or(t)]||s[l=Or(ut(t))];!a&&o&&(a=s[l=Or(dn(t))]),a&&wt(a,e,6,r);const c=s[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,wt(c,e,6,r)}}const Lf=new WeakMap;function za(e,t,n=!1){const s=n?Lf:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!fe(e)){const a=c=>{const u=za(c,t,!0);u&&(l=!0,Fe(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(Se(e)&&s.set(e,null),null):(oe(o)?o.forEach(a=>i[a]=null):Fe(i,o),Se(e)&&s.set(e,i),i)}function Cr(e,t){return!e||!mr(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),we(e,t[0].toLowerCase()+t.slice(1))||we(e,dn(t))||we(e,t))}function Gi(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:d,data:h,setupState:p,ctx:f,inheritAttrs:m}=e,b=Zs(e);let v,S;try{if(n.shapeFlag&4){const R=r||s,U=R;v=Bt(c.call(U,R,u,d,p,h,f)),S=l}else{const R=t;v=Bt(R.length>1?R(d,{attrs:l,slots:i,emit:a}):R(d,null)),S=t.props?l:Pf(l)}}catch(R){Zt.length=0,wr(R,e,1),v=z(tt)}let x=v;if(S&&m!==!1){const R=Object.keys(S),{shapeFlag:U}=x;R.length&&U&7&&(o&&R.some(vr)&&(S=Mf(S,o)),x=un(x,S,!1,!0))}return n.dirs&&(x=un(x,null,!1,!0),x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&Cn(x,n.transition),v=x,Zs(b),v}const Pf=e=>{let t;for(const n in e)(n==="class"||n==="style"||mr(n))&&((t||(t={}))[n]=e[n]);return t},Mf=(e,t)=>{const n={};for(const s in e)(!vr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Nf(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:a}=t,c=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return s?Ui(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(ja(i,s,h)&&!Cr(c,h))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?Ui(s,i,c):!0:!!i;return!1}function Ui(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(ja(t,e,o)&&!Cr(n,o))return!0}return!1}function ja(e,t,n){const s=e[n],r=t[n];return n==="style"&&Se(s)&&Se(r)?!jo(s,r):s!==r}function Of({vnode:e,parent:t,suspense:n},s){for(;t;){const r=t.subTree;if(r.suspense&&r.suspense.activeBranch===e&&(r.suspense.vnode.el=r.el=s,e=r),r===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const Fa={},Ga=()=>Object.create(Fa),Ua=e=>Object.getPrototypeOf(e)===Fa;function Df(e,t,n,s=!1){const r={},o=Ga();e.propsDefaults=Object.create(null),Ha(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Hu(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Bf(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=_e(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Cr(e.emitsOptions,h))continue;const p=t[h];if(a)if(we(o,h))p!==o[h]&&(o[h]=p,c=!0);else{const f=ut(h);r[f]=mo(a,l,f,p,e,!1)}else p!==o[h]&&(o[h]=p,c=!0)}}}else{Ha(e,t,r,o)&&(c=!0);let u;for(const d in l)(!t||!we(t,d)&&((u=dn(d))===d||!we(t,u)))&&(a?n&&(n[d]!==void 0||n[u]!==void 0)&&(r[d]=mo(a,l,d,void 0,e,!0)):delete r[d]);if(o!==l)for(const d in o)(!t||!we(t,d))&&(delete o[d],c=!0)}c&&Ht(e.attrs,"set","")}function Ha(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(ss(a))continue;const c=t[a];let u;r&&we(r,u=ut(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:Cr(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=_e(n),c=l||Ae;for(let u=0;u<o.length;u++){const d=o[u];n[d]=mo(r,a,d,c[d],e,!we(c,d))}}return i}function mo(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=we(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&fe(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=$s(r);s=c[n]=a.call(null,t),u()}}else s=a;r.ce&&r.ce._setProp(n,s)}i[0]&&(o&&!l?s=!1:i[1]&&(s===""||s===dn(n))&&(s=!0))}return s}const zf=new WeakMap;function Wa(e,t,n=!1){const s=n?zf:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!fe(e)){const u=d=>{a=!0;const[h,p]=Wa(d,t,!0);Fe(i,h),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!o&&!a)return Se(e)&&s.set(e,Nn),Nn;if(oe(o))for(let u=0;u<o.length;u++){const d=ut(o[u]);Hi(d)&&(i[d]=Ae)}else if(o)for(const u in o){const d=ut(u);if(Hi(d)){const h=o[u],p=i[d]=oe(h)||fe(h)?{type:h}:Fe({},h),f=p.type;let m=!1,b=!0;if(oe(f))for(let v=0;v<f.length;++v){const S=f[v],x=fe(S)&&S.name;if(x==="Boolean"){m=!0;break}else x==="String"&&(b=!1)}else m=fe(f)&&f.name==="Boolean";p[0]=m,p[1]=b,(m||we(p,"default"))&&l.push(d)}}const c=[i,l];return Se(e)&&s.set(e,c),c}function Hi(e){return e[0]!=="$"&&!ss(e)}const Qo=e=>e==="_"||e==="_ctx"||e==="$stable",ei=e=>oe(e)?e.map(Bt):[Bt(e)],jf=(e,t,n)=>{if(t._n)return t;const s=Je((...r)=>ei(t(...r)),n);return s._c=!1,s},qa=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Qo(r))continue;const o=e[r];if(fe(o))t[r]=jf(r,o,s);else if(o!=null){const i=ei(o);t[r]=()=>i}}},Va=(e,t)=>{const n=ei(t);e.slots.default=()=>n},Ka=(e,t,n)=>{for(const s in t)(n||!Qo(s))&&(e[s]=t[s])},Ff=(e,t,n)=>{const s=e.slots=Ga();if(e.vnode.shapeFlag&32){const r=t._;r?(Ka(s,t,n),n&&Yl(s,"_",r,!0)):qa(t,s)}else t&&Va(e,t)},Gf=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Ae;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Ka(r,t,n):(o=!t.$stable,qa(t,r)),i=t}else t&&(Va(e,t),i={default:1});if(o)for(const l in r)!Qo(l)&&i[l]==null&&delete r[l]},lt=Vf;function Uf(e){return Hf(e)}function Hf(e,t){const n=kr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:p=Tt,insertStaticContent:f}=e,m=(y,k,T,A=null,E=null,L=null,H=void 0,F=null,B=!!k.dynamicChildren)=>{if(y===k)return;y&&!bn(y,k)&&(A=Ke(y),Be(y,E,L,!0),y=null),k.patchFlag===-2&&(B=!1,k.dynamicChildren=null);const{type:P,ref:ee,shapeFlag:W}=k;switch(P){case Tr:b(y,k,T,A);break;case tt:v(y,k,T,A);break;case as:y==null&&S(k,T,A,H);break;case te:j(y,k,T,A,E,L,H,F,B);break;default:W&1?U(y,k,T,A,E,L,H,F,B):W&6?ce(y,k,T,A,E,L,H,F,B):(W&64||W&128)&&P.process(y,k,T,A,E,L,H,F,B,ke)}ee!=null&&E?is(ee,y&&y.ref,L,k||y,!k):ee==null&&y&&y.ref!=null&&is(y.ref,null,L,y,!0)},b=(y,k,T,A)=>{if(y==null)s(k.el=l(k.children),T,A);else{const E=k.el=y.el;k.children!==y.children&&c(E,k.children)}},v=(y,k,T,A)=>{y==null?s(k.el=a(k.children||""),T,A):k.el=y.el},S=(y,k,T,A)=>{[y.el,y.anchor]=f(y.children,k,T,A,y.el,y.anchor)},x=({el:y,anchor:k},T,A)=>{let E;for(;y&&y!==k;)E=h(y),s(y,T,A),y=E;s(k,T,A)},R=({el:y,anchor:k})=>{let T;for(;y&&y!==k;)T=h(y),r(y),y=T;r(k)},U=(y,k,T,A,E,L,H,F,B)=>{if(k.type==="svg"?H="svg":k.type==="math"&&(H="mathml"),y==null)Y(k,T,A,E,L,H,F,B);else{const P=y.el&&y.el._isVueCE?y.el:null;try{P&&P._beginPatch(),G(y,k,E,L,H,F,B)}finally{P&&P._endPatch()}}},Y=(y,k,T,A,E,L,H,F)=>{let B,P;const{props:ee,shapeFlag:W,transition:Q,dirs:re}=y;if(B=y.el=i(y.type,L,ee&&ee.is,ee),W&8?u(B,y.children):W&16&&le(y.children,B,null,A,E,Ur(y,L),H,F),re&&pn(y,null,A,"created"),D(B,y,y.scopeId,H,A),ee){for(const w in ee)w!=="value"&&!ss(w)&&o(B,w,null,ee[w],L,A);"value"in ee&&o(B,"value",null,ee.value,L),(P=ee.onVnodeBeforeMount)&&It(P,A,y)}re&&pn(y,null,A,"beforeMount");const ye=Wf(E,Q);ye&&Q.beforeEnter(B),s(B,k,T),((P=ee&&ee.onVnodeMounted)||ye||re)&<(()=>{try{P&&It(P,A,y),ye&&Q.enter(B),re&&pn(y,null,A,"mounted")}finally{}},E)},D=(y,k,T,A,E)=>{if(T&&p(y,T),A)for(let L=0;L<A.length;L++)p(y,A[L]);if(E){let L=E.subTree;if(k===L||Ja(L.type)&&(L.ssContent===k||L.ssFallback===k)){const H=E.vnode;D(y,H,H.scopeId,H.slotScopeIds,E.parent)}}},le=(y,k,T,A,E,L,H,F,B=0)=>{for(let P=B;P<y.length;P++){const ee=y[P]=F?Ut(y[P]):Bt(y[P]);m(null,ee,k,T,A,E,L,H,F)}},G=(y,k,T,A,E,L,H)=>{const F=k.el=y.el;let{patchFlag:B,dynamicChildren:P,dirs:ee}=k;B|=y.patchFlag&16;const W=y.props||Ae,Q=k.props||Ae;let re;if(T&&gn(T,!1),(re=Q.onVnodeBeforeUpdate)&&It(re,T,k,y),ee&&pn(k,y,T,"beforeUpdate"),T&&gn(T,!0),P&&(!y.dynamicChildren||y.dynamicChildren.length!==P.length)&&(B=0,H=!1,P=null),(W.innerHTML&&Q.innerHTML==null||W.textContent&&Q.textContent==null)&&u(F,""),P?ne(y.dynamicChildren,P,F,T,A,Ur(k,E),L):H||ge(y,k,F,null,T,A,Ur(k,E),L,!1),B>0){if(B&16)se(F,W,Q,T,E);else if(B&2&&W.class!==Q.class&&o(F,"class",null,Q.class,E),B&4&&o(F,"style",W.style,Q.style,E),B&8){const ye=k.dynamicProps;for(let w=0;w<ye.length;w++){const N=ye[w],X=W[N],V=Q[N];(V!==X||N==="value")&&o(F,N,X,V,E,T)}}B&1&&y.children!==k.children&&u(F,k.children)}else!H&&P==null&&se(F,W,Q,T,E);((re=Q.onVnodeUpdated)||ee)&<(()=>{re&&It(re,T,k,y),ee&&pn(k,y,T,"updated")},A)},ne=(y,k,T,A,E,L,H)=>{for(let F=0;F<k.length;F++){const B=y[F],P=k[F],ee=B.el&&(B.type===te||!bn(B,P)||B.shapeFlag&198)?d(B.el):T;m(B,P,ee,null,A,E,L,H,!0)}},se=(y,k,T,A,E)=>{if(k!==T){if(k!==Ae)for(const L in k)!ss(L)&&!(L in T)&&o(y,L,k[L],null,E,A);for(const L in T){if(ss(L))continue;const H=T[L],F=k[L];H!==F&&L!=="value"&&o(y,L,F,H,E,A)}"value"in T&&o(y,"value",k.value,T.value,E)}},j=(y,k,T,A,E,L,H,F,B)=>{const P=k.el=y?y.el:l(""),ee=k.anchor=y?y.anchor:l("");let{patchFlag:W,dynamicChildren:Q,slotScopeIds:re}=k;re&&(F=F?F.concat(re):re),y==null?(s(P,T,A),s(ee,T,A),le(k.children||[],T,ee,E,L,H,F,B)):W>0&&W&64&&Q&&y.dynamicChildren&&y.dynamicChildren.length===Q.length?(ne(y.dynamicChildren,Q,T,E,L,H,F),(k.key!=null||E&&k===E.subTree)&&ti(y,k,!0)):ge(y,k,T,ee,E,L,H,F,B)},ce=(y,k,T,A,E,L,H,F,B)=>{k.slotScopeIds=F,y==null?k.shapeFlag&512?E.ctx.activate(k,T,A,H,B):he(k,T,A,E,L,H,B):pe(y,k,B)},he=(y,k,T,A,E,L,H)=>{const F=y.component=ed(y,A,E);if(Sr(y)&&(F.ctx.renderer=ke),td(F,!1,H),F.asyncDep){if(E&&E.registerDep(F,de,H),!y.el){const B=F.subTree=z(tt);v(null,B,k,T),y.placeholder=B.el}}else de(F,y,k,T,E,L,H)},pe=(y,k,T)=>{const A=k.component=y.component;if(Nf(y,k,T))if(A.asyncDep&&!A.asyncResolved){be(A,k,T);return}else A.next=k,A.update();else k.el=y.el,A.vnode=k},de=(y,k,T,A,E,L,H)=>{const F=()=>{if(y.isMounted){let{next:W,bu:Q,u:re,parent:ye,vnode:w}=y;{const Ee=Za(y);if(Ee){W&&(W.el=w.el,be(y,W,H)),Ee.asyncDep.then(()=>{lt(()=>{y.isUnmounted||P()},E)});return}}let N=W,X;gn(y,!1),W?(W.el=w.el,be(y,W,H)):W=w,Q&&Fs(Q),(X=W.props&&W.props.onVnodeBeforeUpdate)&&It(X,ye,W,w),gn(y,!0);const V=Gi(y),me=y.subTree;y.subTree=V,m(me,V,d(me.el),Ke(me),y,E,L),W.el=V.el,N===null&&Of(y,V.el),re&<(re,E),(X=W.props&&W.props.onVnodeUpdated)&<(()=>It(X,ye,W,w),E)}else{let W;const{el:Q,props:re}=k,{bm:ye,m:w,parent:N,root:X,type:V}=y,me=Bn(k);gn(y,!1),ye&&Fs(ye),!me&&(W=re&&re.onVnodeBeforeMount)&&It(W,N,k),gn(y,!0);{X.ce&&X.ce._hasShadowRoot()&&X.ce._injectChildStyle(V,y.parent?y.parent.type:void 0);const Ee=y.subTree=Gi(y);m(null,Ee,T,A,y,E,L),k.el=Ee.el}if(w&<(w,E),!me&&(W=re&&re.onVnodeMounted)){const Ee=k;lt(()=>It(W,N,Ee),E)}(k.shapeFlag&256||N&&Bn(N.vnode)&&N.vnode.shapeFlag&256)&&y.a&<(y.a,E),y.isMounted=!0,k=T=A=null}};y.scope.on();const B=y.effect=new ea(F);y.scope.off();const P=y.update=B.run.bind(B),ee=y.job=B.runIfDirty.bind(B);ee.i=y,ee.id=y.uid,B.scheduler=()=>Zo(ee),gn(y,!0),P()},be=(y,k,T)=>{k.component=y;const A=y.vnode.props;y.vnode=k,y.next=null,Bf(y,k.props,A,T),Gf(y,k.children,T),Yt(),Ii(y),Jt()},ge=(y,k,T,A,E,L,H,F,B=!1)=>{const P=y&&y.children,ee=y?y.shapeFlag:0,W=k.children,{patchFlag:Q,shapeFlag:re}=k;if(Q>0){if(Q&128){De(P,W,T,A,E,L,H,F,B);return}else if(Q&256){ot(P,W,T,A,E,L,H,F,B);return}}re&8?(ee&16&&Xe(P,E,L),W!==P&&u(T,W)):ee&16?re&16?De(P,W,T,A,E,L,H,F,B):Xe(P,E,L,!0):(ee&8&&u(T,""),re&16&&le(W,T,A,E,L,H,F,B))},ot=(y,k,T,A,E,L,H,F,B)=>{y=y||Nn,k=k||Nn;const P=y.length,ee=k.length,W=Math.min(P,ee);let Q;for(Q=0;Q<W;Q++){const re=k[Q]=B?Ut(k[Q]):Bt(k[Q]);m(y[Q],re,T,null,E,L,H,F,B)}P>ee?Xe(y,E,L,!0,!1,W):le(k,T,A,E,L,H,F,B,W)},De=(y,k,T,A,E,L,H,F,B)=>{let P=0;const ee=k.length;let W=y.length-1,Q=ee-1;for(;P<=W&&P<=Q;){const re=y[P],ye=k[P]=B?Ut(k[P]):Bt(k[P]);if(bn(re,ye))m(re,ye,T,null,E,L,H,F,B);else break;P++}for(;P<=W&&P<=Q;){const re=y[W],ye=k[Q]=B?Ut(k[Q]):Bt(k[Q]);if(bn(re,ye))m(re,ye,T,null,E,L,H,F,B);else break;W--,Q--}if(P>W){if(P<=Q){const re=Q+1,ye=re<ee?k[re].el:A;for(;P<=Q;)m(null,k[P]=B?Ut(k[P]):Bt(k[P]),T,ye,E,L,H,F,B),P++}}else if(P>Q)for(;P<=W;)Be(y[P],E,L,!0),P++;else{const re=P,ye=P,w=new Map;for(P=ye;P<=Q;P++){const Ne=k[P]=B?Ut(k[P]):Bt(k[P]);Ne.key!=null&&w.set(Ne.key,P)}let N,X=0;const V=Q-ye+1;let me=!1,Ee=0;const Me=new Array(V);for(P=0;P<V;P++)Me[P]=0;for(P=re;P<=W;P++){const Ne=y[P];if(X>=V){Be(Ne,E,L,!0);continue}let Et;if(Ne.key!=null)Et=w.get(Ne.key);else for(N=ye;N<=Q;N++)if(Me[N-ye]===0&&bn(Ne,k[N])){Et=N;break}Et===void 0?Be(Ne,E,L,!0):(Me[Et-ye]=P+1,Et>=Ee?Ee=Et:me=!0,m(Ne,k[Et],T,null,E,L,H,F,B),X++)}const sn=me?qf(Me):Nn;for(N=sn.length-1,P=V-1;P>=0;P--){const Ne=ye+P,Et=k[Ne],Ci=k[Ne+1],Ti=Ne+1<ee?Ci.el||Ya(Ci):A;Me[P]===0?m(null,Et,T,Ti,E,L,H,F,B):me&&(N<0||P!==sn[N]?Ve(Et,T,Ti,2):N--)}}},Ve=(y,k,T,A,E=null)=>{const{el:L,type:H,transition:F,children:B,shapeFlag:P}=y;if(P&6){Ve(y.component.subTree,k,T,A);return}if(P&128){y.suspense.move(k,T,A);return}if(P&64){H.move(y,k,T,ke);return}if(H===te){s(L,k,T);for(let W=0;W<B.length;W++)Ve(B[W],k,T,A);s(y.anchor,k,T);return}if(H===as){x(y,k,T);return}if(A!==2&&P&1&&F)if(A===0)F.persisted&&!L[yt]?s(L,k,T):(F.beforeEnter(L),s(L,k,T),lt(()=>F.enter(L),E));else{const{leave:W,delayLeave:Q,afterLeave:re}=F,ye=()=>{y.ctx.isUnmounted?r(L):s(L,k,T)},w=()=>{const N=L._isLeaving||!!L[yt];L._isLeaving&&L[yt](!0),F.persisted&&!N?ye():W(L,()=>{ye(),re&&re()})};Q?Q(L,ye,w):w()}else s(L,k,T)},Be=(y,k,T,A=!1,E=!1)=>{const{type:L,props:H,ref:F,children:B,dynamicChildren:P,shapeFlag:ee,patchFlag:W,dirs:Q,cacheIndex:re,memo:ye}=y;if(W===-2&&(E=!1),F!=null&&(Yt(),is(F,null,T,y,!0),Jt()),re!=null&&(k.renderCache[re]=void 0),ee&256){k.ctx.deactivate(y);return}const w=ee&1&&Q,N=!Bn(y);let X;if(N&&(X=H&&H.onVnodeBeforeUnmount)&&It(X,k,y),ee&6)nn(y.component,T,A);else{if(ee&128){y.suspense.unmount(T,A);return}w&&pn(y,null,k,"beforeUnmount"),ee&64?y.type.remove(y,k,T,ke,A):P&&!P.hasOnce&&(L!==te||W>0&&W&64)?Xe(P,k,T,!1,!0):(L===te&&W&384||!E&&ee&16)&&Xe(B,k,T),A&&tn(y)}const V=ye!=null&&re==null;(N&&(X=H&&H.onVnodeUnmounted)||w||V)&<(()=>{X&&It(X,k,y),w&&pn(y,null,k,"unmounted"),V&&(y.el=null)},T)},tn=y=>{const{type:k,el:T,anchor:A,transition:E}=y;if(k===te){St(T,A);return}if(k===as){R(y);return}const L=()=>{r(T),E&&!E.persisted&&E.afterLeave&&E.afterLeave()};if(y.shapeFlag&1&&E&&!E.persisted){const{leave:H,delayLeave:F}=E,B=()=>H(T,L);F?F(y.el,L,B):B()}else L()},St=(y,k)=>{let T;for(;y!==k;)T=h(y),r(y),y=T;r(k)},nn=(y,k,T)=>{const{bum:A,scope:E,job:L,subTree:H,um:F,m:B,a:P}=y;Wi(B),Wi(P),A&&Fs(A),E.stop(),L&&(L.flags|=8,Be(H,y,k,T)),F&<(F,k),lt(()=>{y.isUnmounted=!0},k)},Xe=(y,k,T,A=!1,E=!1,L=0)=>{for(let H=L;H<y.length;H++)Be(y[H],k,T,A,E)},Ke=y=>{if(y.shapeFlag&6)return Ke(y.component.subTree);if(y.shapeFlag&128)return y.suspense.next();const k=h(y.anchor||y.el),T=k&&k[Sa];return T?h(T):k};let M=!1;const ie=(y,k,T)=>{let A;y==null?k._vnode&&(Be(k._vnode,null,null,!0),A=k._vnode.component):m(k._vnode||null,y,k,null,null,null,T),k._vnode=y,M||(M=!0,Ii(A),ya(),M=!1)},ke={p:m,um:Be,m:Ve,r:tn,mt:he,mc:le,pc:ge,pbc:ne,n:Ke,o:e};return{render:ie,hydrate:void 0,createApp:Af(ie)}}function Ur({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 gn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Wf(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ti(e,t,n=!1){const s=e.children,r=t.children;if(oe(s)&&oe(r))for(let o=0;o<s.length;o++){const i=s[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=Ut(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&ti(i,l)),l.type===Tr&&(l.patchFlag===-1&&(l=r[o]=Ut(l)),l.el=i.el),l.type===tt&&!l.el&&(l.el=i.el)}}function qf(e){const t=e.slice(),n=[0];let s,r,o,i,l;const a=e.length;for(s=0;s<a;s++){const c=e[s];if(c!==0){if(r=n[n.length-1],e[r]<c){t[s]=r,n.push(s);continue}for(o=0,i=n.length-1;o<i;)l=o+i>>1,e[n[l]]<c?o=l+1:i=l;c<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}function Za(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Za(t)}function Wi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ya(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ya(t.subTree):null}const Ja=e=>e.__isSuspense;function Vf(e,t){t&&t.pendingBranch?oe(e)?t.effects.push(...e):t.effects.push(e):va(e)}const te=Symbol.for("v-fgt"),Tr=Symbol.for("v-txt"),tt=Symbol.for("v-cmt"),as=Symbol.for("v-stc"),Zt=[];let gt=null;function _(e=!1){Zt.push(gt=e?null:[])}function ni(){Zt.pop(),gt=Zt[Zt.length-1]||null}let gs=1;function Xs(e,t=!1){gs+=e,e<0&>&&t&&(gt.hasOnce=!0)}function Xa(e){return e.dynamicChildren=gs>0?gt||Nn:null,ni(),gs>0&>&>.push(e),e}function C(e,t,n,s,r,o){return Xa(g(e,t,n,s,r,o,!0))}function Oe(e,t,n,s,r){return Xa(z(e,t,n,s,r,!0))}function ms(e){return e?e.__v_isVNode===!0:!1}function bn(e,t){return e.type===t.type&&e.key===t.key}const Qa=({key:e})=>e??null,Us=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Pe(e)||rt(e)||fe(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function g(e,t=null,n=null,s=0,r=null,o=e===te?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Qa(t),ref:t&&Us(t),scopeId:ka,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:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Ye};return l?(Qs(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Pe(n)?8:16),gs>0&&!i&>&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&>.push(a),a}const z=Kf;function Kf(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Ma)&&(e=tt),ms(e)){const l=un(e,t,!0);return n&&Qs(l,n),gs>0&&!o&>&&(l.shapeFlag&6?gt[gt.indexOf(e)]=l:gt.push(l)),l.patchFlag=-2,l}if(id(e)&&(e=e.__vccOpts),t){t=Zf(t);let{class:l,style:a}=t;l&&!Pe(l)&&(t.class=ve(l)),Se(a)&&(Ko(a)&&!oe(a)&&(a=Fe({},a)),t.style=$n(a))}const i=Pe(e)?1:Ja(e)?128:xa(e)?64:Se(e)?4:fe(e)?2:0;return g(e,t,n,s,r,i,o,!0)}function Zf(e){return e?Ko(e)||Ua(e)?Fe({},e):e:null}function un(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?Jf(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Qa(c),ref:t&&t.ref?n&&o?oe(o)?o.concat(Us(t)):[o,Us(t)]:Us(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==te?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&un(e.ssContent),ssFallback:e.ssFallback&&un(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&Cn(u,a.clone(u)),u}function Le(e=" ",t=0){return z(Tr,null,e,t)}function Yf(e,t){const n=z(as,null,e);return n.staticCount=t,n}function q(e="",t=!1){return t?(_(),Oe(tt,null,e)):z(tt,null,e)}function Bt(e){return e==null||typeof e=="boolean"?z(tt):oe(e)?z(te,null,e.slice()):ms(e)?Ut(e):z(Tr,null,String(e))}function Ut(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:un(e)}function Qs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(oe(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),Qs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!Ua(t)?t._ctx=Ye:r===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(fe(t)){if(s&65){Qs(e,{default:t});return}t={default:t,_ctx:Ye},n=32}else t=String(t),s&64?(n=16,t=[Le(t)]):n=8;e.children=t,e.shapeFlag|=n}function Jf(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=ve([t.class,s.class]));else if(r==="style")t.style=$n([t.style,s.style]);else if(mr(r)){const o=t[r],i=s[r];i&&o!==i&&!(oe(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!vr(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}function It(e,t,n,s=null){wt(e,t,7,[n,s])}const Xf=Ba();let Qf=0;function ed(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Xf,o={uid:Qf++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Cu(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Wa(s,r),emitsOptions:za(s,r),emit:null,emitted:null,propsDefaults:Ae,inheritAttrs:s.inheritAttrs,ctx:Ae,data:Ae,props:Ae,attrs:Ae,slots:Ae,refs:Ae,setupState:Ae,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 o.ctx={_:o},o.root=t?t.root:o,o.emit=If.bind(null,o),e.ce&&e.ce(o),o}let nt=null;const $r=()=>nt||Ye;let er,vo;{const e=kr(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),o=>{r.length>1?r.forEach(i=>i(o)):r[0](o)}};er=t("__VUE_INSTANCE_SETTERS__",n=>nt=n),vo=t("__VUE_SSR_SETTERS__",n=>vs=n)}const $s=e=>{const t=nt;return er(e),e.scope.on(),()=>{e.scope.off(),er(t)}},qi=()=>{nt&&nt.scope.off(),er(null)};function ec(e){return e.vnode.shapeFlag&4}let vs=!1;function td(e,t=!1,n=!1){t&&vo(t);const{props:s,children:r}=e.vnode,o=ec(e);Df(e,s,o,t),Ff(e,r,n||t);const i=o?nd(e,t):void 0;return t&&vo(!1),i}function nd(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,wf);const{setup:s}=n;if(s){Yt();const r=e.setupContext=s.length>1?rd(e):null,o=$s(e),i=Cs(s,e,0,[e.props,r]),l=Vl(i);if(Jt(),o(),(l||e.sp)&&!Bn(e)&&Ea(e),l){if(i.then(qi,qi),t)return i.then(a=>{Vi(e,a)}).catch(a=>{wr(a,e,0)});e.asyncDep=i}else Vi(e,i)}else tc(e)}function Vi(e,t,n){fe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Se(t)&&(e.setupState=pa(t)),tc(e)}function tc(e,t,n){const s=e.type;e.render||(e.render=s.render||Tt);{const r=$s(e);Yt();try{Sf(e)}finally{Jt(),r()}}}const sd={get(e,t){return et(e,"get",""),e[t]}};function rd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,sd),slots:e.slots,emit:e.emit,expose:t}}function Rr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(pa(Wu(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ls)return ls[n](e)},has(t,n){return n in t||n in ls}})):e.proxy}function od(e,t=!0){return fe(e)?e.displayName||e.name:e.name||t&&e.__name}function id(e){return fe(e)&&"__vccOpts"in e}const Z=(e,t)=>Ju(e,t,vs);function ft(e,t,n){try{Xs(-1);const s=arguments.length;return s===2?Se(t)&&!oe(t)?ms(t)?z(e,null,[t]):z(e,t):z(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&ms(n)&&(n=[n]),z(e,t,n))}finally{Xs(1)}}const ld="3.5.40";/**
|
|
15
|
+
* @vue/runtime-dom v3.5.40
|
|
16
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
17
|
+
* @license MIT
|
|
18
|
+
**/let yo;const Ki=typeof window<"u"&&window.trustedTypes;if(Ki)try{yo=Ki.createPolicy("vue",{createHTML:e=>e})}catch{}const nc=yo?e=>yo.createHTML(e):e=>e,ad="http://www.w3.org/2000/svg",cd="http://www.w3.org/1998/Math/MathML",Gt=typeof document<"u"?document:null,Zi=Gt&&Gt.createElement("template"),ud={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?Gt.createElementNS(ad,e):t==="mathml"?Gt.createElementNS(cd,e):n?Gt.createElement(e,{is:n}):Gt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Gt.createTextNode(e),createComment:e=>Gt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Gt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,o){const i=n?n.previousSibling:t.lastChild;if(r&&(r===o||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===o||!(r=r.nextSibling)););else{Zi.innerHTML=nc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Zi.content;if(s==="svg"||s==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},rn="transition",Zn="animation",Un=Symbol("_vtc"),sc={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},rc=Fe({},Ta,sc),fd=e=>(e.displayName="Transition",e.props=rc,e),oc=fd((e,{slots:t})=>ft(uf,ic(e),t)),mn=(e,t=[])=>{oe(e)?e.forEach(n=>n(...t)):e&&e(...t)},Yi=e=>e?oe(e)?e.some(t=>t.length>1):e.length>1:!1;function ic(e){const t={};for(const j in e)j in sc||(t[j]=e[j]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=o,appearActiveClass:c=i,appearToClass:u=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,f=dd(r),m=f&&f[0],b=f&&f[1],{onBeforeEnter:v,onEnter:S,onEnterCancelled:x,onLeave:R,onLeaveCancelled:U,onBeforeAppear:Y=v,onAppear:D=S,onAppearCancelled:le=x}=t,G=(j,ce,he,pe)=>{j._enterCancelled=pe,ln(j,ce?u:l),ln(j,ce?c:i),he&&he()},ne=(j,ce)=>{j._isLeaving=!1,ln(j,d),ln(j,p),ln(j,h),ce&&ce()},se=j=>(ce,he)=>{const pe=j?D:S,de=()=>G(ce,j,he);mn(pe,[ce,de]),Ji(()=>{ln(ce,j?a:o),Lt(ce,j?u:l),Yi(pe)||Xi(ce,s,m,de)})};return Fe(t,{onBeforeEnter(j){mn(v,[j]),Lt(j,o),Lt(j,i)},onBeforeAppear(j){mn(Y,[j]),Lt(j,a),Lt(j,c)},onEnter:se(!1),onAppear:se(!0),onLeave(j,ce){j._isLeaving=!0;const he=()=>ne(j,ce);Lt(j,d),j._enterCancelled?(Lt(j,h),bo(j)):(bo(j),Lt(j,h)),Ji(()=>{j._isLeaving&&(ln(j,d),Lt(j,p),Yi(R)||Xi(j,s,b,he))}),mn(R,[j,he])},onEnterCancelled(j){G(j,!1,void 0,!0),mn(x,[j])},onAppearCancelled(j){G(j,!0,void 0,!0),mn(le,[j])},onLeaveCancelled(j){ne(j),mn(U,[j])}})}function dd(e){if(e==null)return null;if(Se(e))return[Hr(e.enter),Hr(e.leave)];{const t=Hr(e);return[t,t]}}function Hr(e){return mu(e)}function Lt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Un]||(e[Un]=new Set)).add(t)}function ln(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Un];n&&(n.delete(t),n.size||(e[Un]=void 0))}function Ji(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hd=0;function Xi(e,t,n,s){const r=e._endId=++hd,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:a}=lc(e,t);if(!i)return s();const c=i+"end";let u=0;const d=()=>{e.removeEventListener(c,h),o()},h=p=>{p.target===e&&++u>=a&&d()};setTimeout(()=>{u<a&&d()},l+1),e.addEventListener(c,h)}function lc(e,t){const n=window.getComputedStyle(e),s=f=>(n[f]||"").split(", "),r=s(`${rn}Delay`),o=s(`${rn}Duration`),i=Qi(r,o),l=s(`${Zn}Delay`),a=s(`${Zn}Duration`),c=Qi(l,a);let u=null,d=0,h=0;t===rn?i>0&&(u=rn,d=i,h=o.length):t===Zn?c>0&&(u=Zn,d=c,h=a.length):(d=Math.max(i,c),u=d>0?i>c?rn:Zn:null,h=u?u===rn?o.length:a.length:0);const p=u===rn&&/\b(?:transform|all)(?:,|$)/.test(s(`${rn}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:p}}function Qi(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>el(n)+el(e[s])))}function el(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function bo(e){return(e?e.ownerDocument:document).body.offsetHeight}function pd(e,t,n){const s=e[Un];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const tl=Symbol("_vod"),ac=Symbol("_vsh"),cc=Symbol("");function gd(e){const t=$r();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>tr(o,r))},s=()=>{const r=e(t.proxy);t.ce?tr(t.ce,r):ko(t.subTree,r),n(r)};La(()=>{va(s)}),en(()=>{je(s,Tt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Xo(()=>r.disconnect())})}function ko(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{ko(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)tr(e.el,t);else if(e.type===te)e.children.forEach(n=>ko(n,t));else if(e.type===as){let{el:n,anchor:s}=e;for(;n&&(tr(n,t),n!==s);)n=n.nextSibling}}function tr(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t){const o=xu(t[r]);n.setProperty(`--${r}`,o),s+=`--${r}: ${o};`}n[cc]=s}}const md=/(?:^|;)\s*display\s*:/;function vd(e,t,n){const s=e.style,r=Pe(n);let o=!1;if(n&&!r){if(t)if(Pe(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&ts(s,l,"")}else for(const i in t)n[i]==null&&ts(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?bd(e,i,!Pe(t)&&t?t[i]:void 0,l)||ts(s,i,l):ts(s,i,"")}}else if(r){if(t!==n){const i=s[cc];i&&(n+=";"+i),s.cssText=n,o=md.test(n)}}else t&&e.removeAttribute("style");tl in e&&(e[tl]=o?s.display:"",e[ac]&&(s.display="none"))}const nl=/\s*!important$/;function ts(e,t,n){if(oe(n))n.forEach(s=>ts(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=yd(e,t);nl.test(n)?e.setProperty(dn(s),n.replace(nl,""),"important"):e[s]=n}}const sl=["Webkit","Moz","ms"],Wr={};function yd(e,t){const n=Wr[t];if(n)return n;let s=ut(t);if(s!=="filter"&&s in e)return Wr[t]=s;s=br(s);for(let r=0;r<sl.length;r++){const o=sl[r]+s;if(o in e)return Wr[t]=o}return t}function bd(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Pe(s)&&n===s}const rl="http://www.w3.org/1999/xlink";function ol(e,t,n,s,r,o=wu(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(rl,t.slice(6,t.length)):e.setAttributeNS(rl,t,n):n==null||o&&!Jl(n)?e.removeAttribute(t):e.setAttribute(t,o?"":Rt(n)?String(n):n)}function il(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?nc(n):n);return}const o=e.tagName;if(t==="value"&&o!=="PROGRESS"&&!o.includes("-")){const l=o==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let i=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Jl(n):n==null&&l==="string"?(n="",i=!0):l==="number"&&(n=0,i=!0)}try{e[t]=n}catch{}i&&e.removeAttribute(r||t)}function Ln(e,t,n,s){e.addEventListener(t,n,s)}function kd(e,t,n,s){e.removeEventListener(t,n,s)}const ll=Symbol("_vei");function _d(e,t,n,s,r=null){const o=e[ll]||(e[ll]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=xd(t);if(s){const c=o[t]=$d(s,r);Ln(e,l,c,a)}else i&&(kd(e,l,i,a),o[t]=void 0)}}const wd=/(Once|Passive|Capture)$/,Sd=/^on:?(?:Once|Passive|Capture)$/;function xd(e){let t,n;for(;(n=e.match(wd))&&!Sd.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):dn(e.slice(2)),t]}let qr=0;const Cd=Promise.resolve(),Td=()=>qr||(Cd.then(()=>qr=0),qr=Date.now());function $d(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(oe(r)){const o=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{o.call(s),s._stopped=!0};const i=r.slice(),l=[s];for(let a=0;a<i.length&&!s._stopped;a++){const c=i[a];c&&wt(c,t,5,l)}}else wt(r,t,5,[s])};return n.value=e,n.attached=Td(),n}const al=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Rd=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?pd(e,s,i):t==="style"?vd(e,n,s):mr(t)?vr(t)||_d(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ad(e,t,s,i))?(il(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ol(e,t,s,i,o,t!=="value")):e._isVueCE&&(Ed(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Pe(s)))?il(e,ut(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),ol(e,t,s,i))};function Ad(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&al(t)&&fe(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 r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return al(t)&&Pe(n)?!1:t in e}function Ed(e,t){const n=e._def.props;if(!n)return!1;const s=ut(t);return Array.isArray(n)?n.some(r=>ut(r)===s):Object.keys(n).some(r=>ut(r)===s)}const uc=new WeakMap,fc=new WeakMap,nr=Symbol("_moveCb"),cl=Symbol("_enterCb"),Id=e=>(delete e.props.mode,e),Ld=Id({name:"TransitionGroup",props:Fe({},rc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=$r(),s=Ca();let r,o;return Pa(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!Dd(r[0].el,n.vnode.el,i)){r=[];return}r.forEach(Md),r.forEach(Nd);const l=r.filter(Od);bo(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;Lt(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[nr]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[nr]=null,ln(c,i))};c.addEventListener("transitionend",d)}),r=[]}),()=>{const i=_e(e),l=ic(i);let a=i.tag||te;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&!u.el[ac]&&(r.push(u),Cn(u,ps(u,l,s,n)),uc.set(u,dc(u.el)))}o=t.default?Jo(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&Cn(u,ps(u,l,s,n))}return z(a,null,o)}}}),Pd=Ld;function Md(e){const t=e.el;t[nr]&&t[nr](),t[cl]&&t[cl]()}function Nd(e){fc.set(e,dc(e.el))}function Od(e){const t=uc.get(e),n=fc.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el,i=o.style,l=o.getBoundingClientRect();let a=1,c=1;return o.offsetWidth&&(a=l.width/o.offsetWidth),o.offsetHeight&&(c=l.height/o.offsetHeight),(!Number.isFinite(a)||a===0)&&(a=1),(!Number.isFinite(c)||c===0)&&(c=1),Math.abs(a-1)<.01&&(a=1),Math.abs(c-1)<.01&&(c=1),i.transform=i.webkitTransform=`translate(${s/a}px,${r/c}px)`,i.transitionDuration="0s",e}}function dc(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function Dd(e,t,n){const s=e.cloneNode(),r=e[Un];r&&r.forEach(l=>{l.split(/\s+/).forEach(a=>a&&s.classList.remove(a))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const o=t.nodeType===1?t:t.parentNode;o.appendChild(s);const{hasTransform:i}=lc(s);return o.removeChild(s),i}const ul=e=>{const t=e.props["onUpdate:modelValue"]||!1;return oe(t)?n=>Fs(t,n):t};function Bd(e){e.target.composing=!0}function fl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Vr=Symbol("_assign");function dl(e,t,n){return t&&(e=e.trim()),n&&(e=zo(e)),e}const Rs={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[Vr]=ul(r);const o=s||r.props&&r.props.type==="number";Ln(e,t?"change":"input",i=>{i.target.composing||e[Vr](dl(e.value,n,o))}),(n||o)&&Ln(e,"change",()=>{e.value=dl(e.value,n,o)}),t||(Ln(e,"compositionstart",Bd),Ln(e,"compositionend",fl),Ln(e,"change",fl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[Vr]=ul(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?zo(e.value):e.value,a=t??"";if(l===a)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===a)||(e.value=a)}},zd=["ctrl","shift","alt","meta"],jd={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)=>zd.some(n=>e[`${n}Key`]&&!t.includes(n))},fn=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((r,...o)=>{for(let i=0;i<t.length;i++){const l=jd[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},Fd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ys=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=dn(r.key);if(t.some(i=>i===o||Fd[i]===o))return e(r)}))},Gd=Fe({patchProp:Rd},ud);let hl;function Ud(){return hl||(hl=Uf(Gd))}const Hd=((...e)=>{const t=Ud().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=qd(s);if(!r)return;const o=t._component;!fe(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,Wd(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function Wd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qd(e){return Pe(e)?document.querySelector(e):e}const bs=K([]);let Vd=0;function Kd(e,t="info",n=3500){const s=`toast_${++Vd}`;bs.value=[...bs.value,{id:s,type:t,message:e}],n>0&&window.setTimeout(()=>hc(s),n)}function hc(e){bs.value=bs.value.filter(t=>t.id!==e)}function pc(){return{toasts:bs,showToast:Kd,removeToast:hc}}const Ft="/api/v1",Zd=2*3e4;function Yd(){const{showToast:e}=pc(),t=K("connecting"),n=K([]),s=K([]),r=K({busy:!1}),o=K(!1),i=K(null),l=K(null),a=K(null),c=Z(()=>r.value.busy||o.value),u=K([]),d=K(null),h=K(null),p=K([]);let f=null,m=null,b=null,v=null,S=Date.now(),x=0,R=0,U=0,Y=0,D=0,le=0,G=0,ne=0,se=!1,j=!1;const ce=new Map;function he(){const N=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/api/v1/ws`;return d.value?`${N}?sessionId=${encodeURIComponent(d.value)}`:N}function pe(w){t.value=w}function de(w){(f==null?void 0:f.readyState)===WebSocket.OPEN&&f.send(JSON.stringify(w))}function be(){j||v!==null||(v=window.setTimeout(()=>{v=null,ge()},250))}async function ge(){const w=l.value;if(!w)return;const N=Y,X=D,V=le,me=G;try{const Ee=await fetch(`${Ft}/sessions/${w}/snapshot`);if(!Ee.ok)return;const Me=await Ee.json();if(l.value!==w||Me.sessionId!==w||Y!==N||D!==X)return;if(le!==V||G!==me||R!==0&&Me.epoch!==R||Me.epoch===R&&Me.seq<x){be();return}ot(Me)}catch{}}function ot(w){const N=n.value.filter(Ne=>Ne.local),X=ce.keys().next().value,V=X?ce.get(X):void 0,me=V?n.value.find(Ne=>Ne.id===V.messageId):void 0,Ee=!!(X&&w.messages.some(Ne=>Ne.clientMessageId===X)),Me=!!(V&&!Ee&&V.connectionGeneration<D);Me&&me&&(me.isError=!0);const sn=me&&!Ee?[me]:[];n.value=[...w.messages.map(Ne=>({...Ne,id:Ne.id??De()})),...N,...sn],s.value=w.pendingApprovals,r.value={...w.status,busy:w.busy},(Ee||Me)&&(o.value=!1,se=!1,ce.clear(),Me&&e("消息未送达,已恢复连接。","error")),x=w.seq,R=w.epoch,a.value=w.workDir}function De(){return`msg_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function Ve(w){Be(),S=Date.now(),m=window.setInterval(()=>{if(Date.now()-S>Zd){f==null||f.close();return}de({type:"ping"})},w)}function Be(){m!==null&&(clearInterval(m),m=null)}function tn(){if(j||b!==null)return;pe("reconnecting"),U++;const w=Math.min(1e3*2**U,3e4);b=window.setTimeout(()=>{b=null,Ke()},w)}function St(w){switch(w.type){case"server_hello":{const N=w;l.value=N.sessionId,a.value=N.workDir,d.value=N.sessionId;const X=R;R=N.epoch,Ve(N.heartbeat_ms),de({type:"client_hello",lastSeq:x,epoch:X}),X!==0&&X!==N.epoch&&(x=0),pe("connected"),U=0,N.active?(ge(),T(),E()):A(N.sessionId).then(()=>{ge(),T(),E()});break}case"event":{typeof w.seq=="number"&&(x=Math.max(x,w.seq)),typeof w.epoch=="number"&&(R=w.epoch),nn(w.payload);break}case"user_message":{if(G++,w.clientMessageId&&ce.has(w.clientMessageId)){se=!0;break}n.value.push({id:De(),role:"user",content:w.text,clientMessageId:w.clientMessageId,tools:[],ts:Date.now()});break}case"approval_request":{G++,s.value=[...s.value,{id:w.id,toolName:w.toolName,action:w.action,display:w.display}];break}case"approval_resolved":{G++,s.value=s.value.filter(N=>N.id!==w.id);break}case"command_result":{const N=w.pendingMsgId?n.value.findIndex(X=>X.id===w.pendingMsgId):-1;if(N>=0){const X=n.value[N];n.value[N]={...X,content:w.message,isError:!w.ok,pending:!1}}else n.value.push({id:De(),role:"system",content:w.message,tools:[],isError:!w.ok,ts:Date.now(),local:!0});(w.command==="fork"||w.command==="title")&&T(),w.ok&&w.command==="compact"&&ge();break}case"resync_required":{x=0,ge();break}case"status":{G++,r.value={...r.value,...w.status};break}case"error":{if(i.value=w.message,w.clientMessageId){const N=ce.get(w.clientMessageId);if(N){ce.delete(w.clientMessageId),o.value=!1,se=!1;const X=n.value.find(V=>V.id===N.messageId);X&&(X.isError=!0),e(`消息未发送:${w.message}`,"error")}}break}case"server_empty":{pe("idle");break}}}function nn(w){var N,X;switch(w.type){case"turn.started":{se&&(o.value=!1,se=!1,ce.clear()),r.value={...r.value,busy:!0},n.value.push({id:De(),role:"assistant",content:"",tools:[],ts:Date.now()});break}case"assistant.delta":{const V=Xe();V&&(V.content+=String(w.delta));break}case"thinking.delta":{const V=Xe();if(V){const me=V.tools.find(Ee=>Ee.name==="thinking");me?me.output=(me.output??"")+String(w.delta):V.tools.push({toolCallId:"thinking",name:"thinking",output:String(w.delta)})}break}case"tool.call.started":{const V=Xe();V&&V.tools.push({toolCallId:String(w.toolCallId),name:String(w.name),args:w.args});break}case"tool.result":{const V=Xe();if(V){const me=V.tools.find(Ee=>Ee.toolCallId===w.toolCallId);me&&(me.output=String(w.output),me.isError=!!w.isError)}break}case"tool.progress":{const V=Xe();if(V){const me=V.tools.find(Ee=>Ee.toolCallId===w.toolCallId);me&&(me.output=String(w.message??w.output))}break}case"turn.ended":{if(r.value={...r.value,busy:!1},w.reason==="failed"){const V=Xe();V&&(V.isError=!0),i.value=String(((N=w.error)==null?void 0:N.message)??"Turn failed")}T(),E();break}case"session.meta.updated":{const V={};w.model!==void 0&&(V.model=w.model),w.contextTokens!==void 0&&(V.contextTokens=w.contextTokens),w.maxContextTokens!==void 0&&(V.maxContextTokens=w.maxContextTokens),w.contextUsage!==void 0&&(V.contextUsage=w.contextUsage),r.value={...r.value,...V};break}case"error":{i.value=String(((X=w.error)==null?void 0:X.message)??"Unknown error");break}}}function Xe(){for(let w=n.value.length-1;w>=0;w--)if(n.value[w].role==="assistant")return n.value[w];return null}function Ke(){if(j||f&&(f.readyState===WebSocket.CONNECTING||f.readyState===WebSocket.OPEN))return;pe("connecting"),i.value=null,D++;const w=new WebSocket(he());f=w,w.onclose=N=>{if(f===w&&(f=null,Be(),t.value!=="idle")){if(N.code===1008){l.value=null,d.value=null,pe("idle");return}pe("disconnected"),tn()}},w.onerror=()=>{f===w&&pe("reconnecting")},w.onmessage=N=>{if(f!==w)return;S=Date.now();let X;try{X=JSON.parse(N.data)}catch{return}St(X)}}function M(w){if(!w||c.value)return;if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,正在尝试重连...","error"),Ke();return}const N=`client_${Date.now()}_${Math.random().toString(36).slice(2,8)}`,X=De();ce.set(N,{messageId:X,connectionGeneration:D}),le++,se=!1,o.value=!0,n.value.push({id:X,role:"user",content:w,clientMessageId:N,tools:[],ts:Date.now()}),de({type:"prompt",text:w,clientMessageId:N})}function ie(){de({type:"abort"})}function ke(w,N){if(t.value==="idle"){e("暂无会话,请先新建会话。","warning");return}if(t.value!=="connected"){e("连接已断开,命令未发送。","error"),Ke();return}if(c.value&&w!=="btw"){e(`会话忙碌中,无法执行 /${w},请稍后再试。`,"warning");return}const X=["compact","plan","auto","yes","fork","title"];let V=null;X.includes(w)&&(V=De(),n.value.push({id:V,role:"system",content:`正在执行 /${w}${N?` ${N}`:""}...`,tools:[],pending:!0,ts:Date.now(),local:!0})),de({type:"command",command:w,...N?{args:N}:{},...V?{pendingMsgId:V}:{}})}function xt(){n.value=[],s.value=[]}function y(w){n.value.push({id:De(),role:"system",content:w,tools:[],ts:Date.now(),local:!0})}function k(w,N,X,V){if(t.value!=="connected"){e("连接已断开,审批结果未发送。","error"),Ke();return}s.value=s.value.filter(me=>me.id!==w),de({type:"approval_response",id:w,decision:N,...X?{feedback:X}:{},...V?{scope:V}:{}})}async function T(){try{const w=await fetch(`${Ft}/sessions`);if(!w.ok)return;u.value=await w.json()}catch{}}async function A(w){try{await fetch(`${Ft}/sessions/${w}/activate`,{method:"POST"})}catch{}}async function E(){try{const w=await fetch(`${Ft}/git/status`);if(!w.ok)return;const N=await w.json();h.value=N.isRepo?N:null}catch{}}async function L(){try{const w=await fetch(`${Ft}/models`);if(!w.ok)return;const N=await w.json();p.value=N.models}catch{}}async function H(w,N,X){const V=l.value;if(!V)return;const me=Y,Ee=++ne;try{const Me=await fetch(`${Ft}/sessions/${V}/${w}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N)}),sn=await Me.json();if(l.value!==V||Y!==me||ne!==Ee)return;if(!Me.ok){e(sn.message??`请求失败(HTTP ${Me.status})`,"error");return}sn.status&&(r.value={...r.value,...sn.status}),y(X)}catch(Me){if(l.value!==V||Y!==me||ne!==Ee)return;e(`请求失败:${Me instanceof Error?Me.message:String(Me)}`,"error")}}async function F(w){w!==r.value.model&&await H("model",{model:w},`已切换模型:${w}`)}async function B(w){w!==r.value.thinkingLevel&&await H("thinking",{level:w},`思考强度已切换为 ${w}`)}async function P(){try{const w=await fetch(`${Ft}/sessions`,{method:"POST"});if(!w.ok){e(`新建会话失败(HTTP ${w.status})`,"error");return}const N=await w.json();u.value=[N,...u.value],await ee(N.sessionId)}catch(w){e(`新建会话失败:${w instanceof Error?w.message:String(w)}`,"error")}}async function ee(w){d.value===w&&t.value==="connected"||(d.value=w,l.value=w,Y++,x=0,R=0,n.value=[],s.value=[],r.value={busy:!1},o.value=!1,se=!1,ce.clear(),b!==null&&(clearTimeout(b),b=null),v!==null&&(clearTimeout(v),v=null),f&&(f.onclose=null,f.close(),f=null),Be(),Ke())}async function W(w){try{const N=await fetch(`${Ft}/sessions/${w}`,{method:"DELETE"});if(!N.ok){e(`删除会话失败(HTTP ${N.status})`,"error");return}if(u.value=u.value.filter(X=>X.sessionId!==w),d.value===w){const X=u.value[0];X?await ee(X.sessionId):(l.value=null,d.value=null,x=0,R=0,n.value=[],s.value=[],r.value={busy:!1},o.value=!1,se=!1,ce.clear(),f&&(f.onclose=null,f.close(),f=null),Be(),pe("idle"))}}catch(N){e(`删除会话失败:${N instanceof Error?N.message:String(N)}`,"error")}}async function Q(w){try{const N=await fetch(`${Ft}/sessions/${w}/export`);if(!N.ok){e(`导出会话失败(HTTP ${N.status})`,"error");return}const X=await N.blob(),V=URL.createObjectURL(X),me=document.createElement("a");me.href=V,me.download=`${w}.md`,me.click(),URL.revokeObjectURL(V)}catch(N){e(`导出会话失败:${N instanceof Error?N.message:String(N)}`,"error")}}Ke(),T(),L();const re=()=>{Ke()},ye=()=>{!document.hidden&&t.value!=="connected"&&Ke()};return window.addEventListener("online",re),document.addEventListener("visibilitychange",ye),hn(()=>{j=!0,window.removeEventListener("online",re),document.removeEventListener("visibilitychange",ye),Be(),b!==null&&(clearTimeout(b),b=null),v!==null&&(clearTimeout(v),v=null),f&&(f.onclose=null,f.close(),f=null)}),{connectionStatus:t,messages:n,pendingApprovals:s,status:r,error:i,sessionId:l,workDir:a,isBusy:c,sessions:u,currentSessionId:d,gitStatus:h,models:p,sendPrompt:M,sendCommand:ke,clearMessages:xt,appendSystemMessage:y,abort:ie,resolveApproval:k,fetchSessions:T,fetchGitStatus:E,fetchModels:L,switchModel:F,switchThinking:B,createSession:P,switchSession:ee,deleteSession:W,exportSession:Q,fetchSnapshot:ge}}function Jd(e){const{storageKey:t,defaultWidth:n,min:s,max:r}=e;function o(S){return Number.isFinite(S)?Math.min(Ku(r),Math.max(s,Math.round(S))):n}function i(){try{const S=localStorage.getItem(t);if(S===null)return n;const x=Number(S);return Number.isFinite(x)?o(x):n}catch{return n}}function l(S){try{localStorage.setItem(t,String(S))}catch{}}const a=K(i()),c=K(!1);function u(S){const x=o(S);a.value=x,l(x)}let d=0,h=0,p=null,f=-1;function m(S){if(!c.value)return;const x=S.clientX-d;u(h+x)}function b(){if(c.value){if(c.value=!1,document.body.style.userSelect="",document.body.style.cursor="",p){try{p.releasePointerCapture(f)}catch{}p.removeEventListener("pointermove",m),p.removeEventListener("pointerup",b),p.removeEventListener("pointercancel",b)}p=null,f=-1}}function v(S){S.preventDefault(),c.value=!0,d=S.clientX,h=o(a.value),p=S.currentTarget,f=S.pointerId,document.body.style.userSelect="none",document.body.style.cursor="col-resize";try{p.setPointerCapture(S.pointerId)}catch{}p.addEventListener("pointermove",m),p.addEventListener("pointerup",b),p.addEventListener("pointercancel",b)}return hn(b),{width:a,dragging:c,clamp:o,setWidth:u,onPointerDown:v}}const si=[{name:"compact",description:"压缩会话上下文",target:"backend"},{name:"model",description:"切换模型 / 思考强度",target:"local"},{name:"clear",description:"清空本地消息列表",target:"local"},{name:"new",description:"新建会话",target:"local"},{name:"help",description:"显示可用命令",target:"local"},{name:"auto",description:"切换为 auto 权限模式",target:"backend"},{name:"yes",description:"切换为 yolo 权限模式",target:"backend",aliases:["yolo"]},{name:"plan",description:"切换计划模式",target:"backend"},{name:"fork",description:"复制当前会话为新分支",target:"backend"},{name:"title",description:"重命名当前会话",target:"backend",aliases:["rename"],acceptsInput:!0},{name:"status",description:"查看会话状态",target:"local"},{name:"usage",description:"查看 Token 用量",target:"local"},{name:"btw",description:"快速侧问(不打断当前回合)",target:"backend",acceptsInput:!0}];function Xd(e){const t=e.toLowerCase();return si.filter(n=>{var s;return n.name.startsWith(t)||((s=n.aliases)==null?void 0:s.some(r=>r.startsWith(t)))})}function Qd(e){const t=e.toLowerCase(),n=si.find(s=>{var r;return s.name===t||((r=s.aliases)==null?void 0:r.includes(t))});return(n==null?void 0:n.name)??t}function eh(){return["可用命令:",...si.map(t=>{var s;return`${(s=t.aliases)!=null&&s.length?[t.name,...t.aliases].map(r=>`/${r}`).join(", "):`/${t.name}`} - ${t.description}`})].join(`
|
|
19
|
+
`)}const th=["title","aria-label"],nh=["width","height","viewBox"],sh=["cx","cy","r"],rh=["cx","cy","r","stroke-dasharray","stroke-dashoffset","transform"],Kr=2,oh=Te({__name:"ContextRing",props:{usage:{default:void 0},size:{default:16}},setup(e){gd(a=>({v1d95ffa8:l.value}));const t=e,n=Z(()=>{if(t.usage===void 0||Number.isNaN(t.usage))return 0;const a=t.usage>1?t.usage/100:t.usage;return Math.min(1,Math.max(0,a))}),s=Z(()=>Math.round(n.value*100)),r=Z(()=>(t.size-Kr)/2),o=Z(()=>2*Math.PI*r.value),i=Z(()=>o.value*(1-n.value)),l=Z(()=>n.value>=.9?"var(--color-danger)":n.value>=.7?"var(--color-warning)":"var(--color-accent)");return(a,c)=>(_(),C("span",{class:"context-ring",role:"img",title:`上下文占用 ${s.value}%`,"aria-label":`上下文占用 ${s.value}%`},[(_(),C("svg",{width:e.size,height:e.size,viewBox:`0 0 ${e.size} ${e.size}`},[g("circle",{class:"ring-track",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":Kr,fill:"none"},null,8,sh),g("circle",{class:"ring-value",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":Kr,fill:"none","stroke-linecap":"round","stroke-dasharray":o.value,"stroke-dashoffset":i.value,transform:`rotate(-90 ${e.size/2} ${e.size/2})`},null,8,rh)],8,nh))],8,th))}}),$e=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},gc=$e(oh,[["__scopeId","data-v-3ffc343b"]]),ih={key:0,class:"ui-dialog-header"},lh={class:"ui-dialog-title"},ah={class:"ui-dialog-body"},ch={key:1,class:"ui-dialog-footer"},uh=Te({__name:"Dialog",props:{open:{type:Boolean},title:{default:void 0},closable:{type:Boolean,default:!0},maxWidth:{default:void 0}},emits:["close"],setup(e,{emit:t}){const n=e,s=t;function r(o){o.key==="Escape"&&n.open&&n.closable!==!1&&(o.stopPropagation(),s("close"))}return en(()=>window.addEventListener("keydown",r,!0)),hn(()=>window.removeEventListener("keydown",r,!0)),(o,i)=>(_(),Oe(Yo,{to:"body"},[z(oc,{name:"dialog"},{default:Je(()=>[e.open?(_(),C("div",{key:0,class:"ui-dialog-overlay",onClick:i[1]||(i[1]=fn(l=>e.closable!==!1&&s("close"),["self"]))},[g("div",{class:"ui-dialog",style:$n(e.maxWidth?{maxWidth:e.maxWidth}:void 0),role:"dialog","aria-modal":"true"},[e.title||o.$slots.header?(_(),C("div",ih,[Gs(o.$slots,"header",{},()=>[g("span",lh,I(e.title),1)],!0),e.closable!==!1?(_(),C("button",{key:0,class:"ui-dialog-close","aria-label":"关闭",onClick:i[0]||(i[0]=l=>s("close"))},"✕")):q("",!0)])):q("",!0),g("div",ah,[Gs(o.$slots,"default",{},void 0,!0)]),o.$slots.footer?(_(),C("div",ch,[Gs(o.$slots,"footer",{},void 0,!0)])):q("",!0)],4)])):q("",!0)]),_:3})]))}}),Ar=$e(uh,[["__scopeId","data-v-4562f775"]]),fh=["width","height"],dh={key:0,d:"M4 7h16M4 12h16M4 17h16"},hh={key:1,d:"M12 5v14M5 12h14"},ph={key:5,d:"M4 6h16M7 12h10M10 18h4"},gh={key:6,d:"M12 3v12m0 0 4-4m-4 4-4-4M5 20h14"},mh={key:7,d:"M4 7h16M9 7V4h6v3m3 0-1 13H7L6 7m4 4v5m4-5v5"},vh={key:8,d:"M3 12h4l2-7 4 14 2-7h6"},yh={key:10,d:"m15 18-6-6 6-6"},bh={key:11,d:"m9 18 6-6-6-6"},kh={key:12,d:"m6 9 6 6 6-6"},_h={key:16,d:"M20 15.5A8.5 8.5 0 0 1 8.5 4 8.5 8.5 0 1 0 20 15.5Z"},wh={key:18,d:"M5 9a11 11 0 0 1 14 0M8.5 12.5a6 6 0 0 1 7 0M12 17h.01"},Sh={key:19,d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z"},xh={key:20,d:"M12 16V4m0 0-4 4m4-4 4 4M5 20h14"},Ch={key:21,d:"m15 4 5 5M17.5 6.5 10 14m-2-2 4 4-3 4H3l1-6Z"},Th={key:22,d:"M9 6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3Z"},$h={key:24,d:"m22 2-7 20-4-9-9-4ZM22 2 11 13"},Rh={key:25,x:"6",y:"6",width:"12",height:"12",rx:"2"},Ah={key:26,d:"m8 3 4 4 4-4M8 21l4-4 4 4M12 7v10"},Eh={key:27,d:"M9.5 4.5A3 3 0 0 0 5 7a3 3 0 0 0 .5 5.5A3 3 0 0 0 9 17v2a2 2 0 0 0 4 0V5a2.5 2.5 0 0 0-3.5-.5ZM13 6a3 3 0 0 1 5 2 3 3 0 0 1 .5 5.5A3 3 0 0 1 15 18"},Ih={key:30,d:"M21 12a8 8 0 0 1-9 8 9 9 0 0 1-4-.9L3 21l1.7-4A9 9 0 1 1 21 12Z"},Lh={key:31,d:"M20 13 13 20l-9-9V4h7ZM8.5 8.5h.01"},Ph={key:32,d:"m12 3 1.3 3.7L17 8l-3.7 1.3L12 13l-1.3-3.7L7 8l3.7-1.3ZM5 15l.8 2.2L8 18l-2.2.8L5 21l-.8-2.2L2 18l2.2-.8ZM19 14l.7 1.8 1.8.7-1.8.7L19 19l-.7-1.8-1.8-.7 1.8-.7Z"},Mh={key:34,d:"M3 6h7l2 2h9v11H3Z"},Nh={key:35,d:"m5 12 4 4L19 6"},Oh=Te({__name:"SvgIcon",props:{name:{},size:{default:20}},setup(e){return(t,n)=>(_(),C("svg",{class:"svg-icon",width:e.size,height:e.size,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.8","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},[e.name==="menu"?(_(),C("path",dh)):e.name==="plus"?(_(),C("path",hh)):e.name==="panel-left"?(_(),C(te,{key:2},[n[0]||(n[0]=g("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[1]||(n[1]=g("path",{d:"M9 4v16"},null,-1))],64)):e.name==="panel-right"?(_(),C(te,{key:3},[n[2]||(n[2]=g("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[3]||(n[3]=g("path",{d:"M15 4v16"},null,-1))],64)):e.name==="search"?(_(),C(te,{key:4},[n[4]||(n[4]=g("circle",{cx:"11",cy:"11",r:"7"},null,-1)),n[5]||(n[5]=g("path",{d:"m20 20-4-4"},null,-1))],64)):e.name==="filter"?(_(),C("path",ph)):e.name==="download"?(_(),C("path",gh)):e.name==="trash"?(_(),C("path",mh)):e.name==="activity"?(_(),C("path",vh)):e.name==="help"?(_(),C(te,{key:9},[n[6]||(n[6]=g("circle",{cx:"12",cy:"12",r:"9"},null,-1)),n[7]||(n[7]=g("path",{d:"M9.7 9a2.5 2.5 0 1 1 3.5 2.3c-.8.4-1.2 1-1.2 1.7M12 17h.01"},null,-1))],64)):e.name==="chevron-left"?(_(),C("path",yh)):e.name==="chevron-right"?(_(),C("path",bh)):e.name==="chevron-down"?(_(),C("path",kh)):e.name==="bot"?(_(),C(te,{key:13},[n[8]||(n[8]=g("rect",{x:"4",y:"7",width:"16",height:"12",rx:"3"},null,-1)),n[9]||(n[9]=g("path",{d:"M12 3v4M8 12h.01M16 12h.01M9 16h6"},null,-1))],64)):e.name==="git-branch"?(_(),C(te,{key:14},[n[10]||(n[10]=g("circle",{cx:"6",cy:"5",r:"2"},null,-1)),n[11]||(n[11]=g("circle",{cx:"18",cy:"7",r:"2"},null,-1)),n[12]||(n[12]=g("circle",{cx:"6",cy:"19",r:"2"},null,-1)),n[13]||(n[13]=g("path",{d:"M6 7v10M8 10c5 0 3-3 8-3"},null,-1))],64)):e.name==="sun"?(_(),C(te,{key:15},[n[14]||(n[14]=g("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[15]||(n[15]=g("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42"},null,-1))],64)):e.name==="moon"?(_(),C("path",_h)):e.name==="monitor"?(_(),C(te,{key:17},[n[16]||(n[16]=g("rect",{x:"3",y:"4",width:"18",height:"13",rx:"2"},null,-1)),n[17]||(n[17]=g("path",{d:"M8 21h8M12 17v4"},null,-1))],64)):e.name==="wifi"?(_(),C("path",wh)):e.name==="edit"?(_(),C("path",Sh)):e.name==="upload"?(_(),C("path",xh)):e.name==="broom"?(_(),C("path",Ch)):e.name==="command"?(_(),C("path",Th)):e.name==="at"?(_(),C(te,{key:23},[n[18]||(n[18]=g("circle",{cx:"12",cy:"12",r:"4"},null,-1)),n[19]||(n[19]=g("path",{d:"M16 12v1.5a2.5 2.5 0 0 0 5 0V12a9 9 0 1 0-3.5 7"},null,-1))],64)):e.name==="send"?(_(),C("path",$h)):e.name==="stop"?(_(),C("rect",Rh)):e.name==="compact"?(_(),C("path",Ah)):e.name==="brain"?(_(),C("path",Eh)):e.name==="clipboard"?(_(),C(te,{key:28},[n[20]||(n[20]=g("rect",{x:"5",y:"4",width:"14",height:"17",rx:"2"},null,-1)),n[21]||(n[21]=g("path",{d:"M9 4V2h6v2M9 10h6M9 14h6"},null,-1))],64)):e.name==="fork"?(_(),C(te,{key:29},[n[22]||(n[22]=g("circle",{cx:"6",cy:"4",r:"2"},null,-1)),n[23]||(n[23]=g("circle",{cx:"18",cy:"6",r:"2"},null,-1)),n[24]||(n[24]=g("circle",{cx:"6",cy:"20",r:"2"},null,-1)),n[25]||(n[25]=g("path",{d:"M6 6v12M8 10c6 0 4-4 8-4"},null,-1))],64)):e.name==="message-circle"?(_(),C("path",Ih)):e.name==="tag"?(_(),C("path",Lh)):e.name==="sparkles"?(_(),C("path",Ph)):e.name==="terminal"?(_(),C(te,{key:33},[n[26]||(n[26]=g("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},null,-1)),n[27]||(n[27]=g("path",{d:"m7 9 3 3-3 3m5 0h5"},null,-1))],64)):e.name==="folder"?(_(),C("path",Mh)):e.name==="check"?(_(),C("path",Nh)):e.name==="copy"?(_(),C(te,{key:36},[n[28]||(n[28]=g("rect",{x:"8",y:"8",width:"12",height:"12",rx:"2"},null,-1)),n[29]||(n[29]=g("path",{d:"M16 8V4H4v12h4"},null,-1))],64)):q("",!0)],8,fh))}}),ae=$e(Oh,[["__scopeId","data-v-0a0ac222"]]),Dh={class:"topbar"},Bh={class:"agent-heading"},zh={class:"agent-mark"},jh={class:"agent-copy"},Fh={class:"actions"},Gh={key:0,class:"status-chip"},Uh=["title"],Hh={class:"truncate"},Wh={key:0},qh={key:1},Vh=["disabled","title"],Kh={class:"truncate"},Zh=["title"],Yh={class:"theme-toggle",role:"group","aria-label":"主题切换"},Jh=["title","aria-pressed","onClick"],Xh=["title"],Qh={key:0,class:"diff-body"},ep={key:1,class:"diff-empty"},tp=Te({__name:"TopBar",props:{connectionStatus:{},status:{},busy:{type:Boolean,default:!1},gitStatus:{default:null}},emits:["refresh-git","toggle-sidebar","open-model-picker"],setup(e,{emit:t}){const n=e,s=t,r=_t("theme",K("system")),o=_t("setTheme",()=>{}),i=[{value:"light",icon:"sun",label:"浅色主题"},{value:"dark",icon:"moon",label:"深色主题"},{value:"system",icon:"monitor",label:"跟随系统"}],l={connecting:"连接中",connected:"已连接",reconnecting:"重连中",disconnected:"已断开",idle:"空闲"},a=_t("modelSwitchable",K(!1)),c=K(!1),u=Z(()=>{const f=n.status.contextUsage;return f===void 0?null:Math.round((f>1?f/100:f)*100)}),d=Z(()=>{var f,m;return`Tokens: ${((f=n.status.contextTokens)==null?void 0:f.toLocaleString())??"-"} / ${((m=n.status.maxContextTokens)==null?void 0:m.toLocaleString())??"-"}`}),h=Z(()=>n.gitStatus?[n.gitStatus.ahead?`↑${n.gitStatus.ahead}`:"",n.gitStatus.behind?`↓${n.gitStatus.behind}`:""].filter(Boolean).join(" "):"");function p(){c.value=!c.value,c.value&&s("refresh-git")}return(f,m)=>{var b;return _(),C("header",Dh,[g("div",Bh,[g("button",{class:"mobile-menu","aria-label":"打开会话列表",title:"打开会话列表",onClick:m[0]||(m[0]=v=>s("toggle-sidebar"))},[z(ae,{name:"menu"})]),g("span",zh,[z(ae,{name:"bot",size:22})]),g("div",jh,[m[3]||(m[3]=g("strong",null,"Scream Code Agent",-1)),g("span",null,[g("i",{class:ve({busy:e.busy})},null,2),Le(I(e.busy?"正在处理会话":"已就绪,等待任务"),1)])])]),g("div",Fh,[e.status.planMode?(_(),C("span",Gh,[z(ae,{name:"clipboard",size:16}),m[4]||(m[4]=Le("计划模式",-1))])):q("",!0),e.gitStatus?(_(),C("button",{key:1,class:"action-chip git",title:`分支:${e.gitStatus.branch??"detached"},点击查看变更统计`,onClick:p},[z(ae,{name:"git-branch",size:17}),g("span",Hh,I(e.gitStatus.branch??"detached"),1),h.value?(_(),C("span",Wh,I(h.value),1)):q("",!0),e.gitStatus.changed?(_(),C("span",qh,I(e.gitStatus.changed)+" 项变更",1)):q("",!0)],8,Uh)):q("",!0),e.status.model?(_(),C("button",{key:2,class:"action-chip model",disabled:!J(a),title:e.status.model,onClick:m[1]||(m[1]=v=>s("open-model-picker"))},[z(ae,{name:"brain",size:17}),g("span",Kh,I(e.status.model),1)],8,Vh)):q("",!0),u.value!==null?(_(),C("span",{key:3,class:"action-chip context",title:d.value},[z(gc,{usage:e.status.contextUsage,size:18},null,8,["usage"]),Le(I(u.value)+"%",1)],8,Zh)):q("",!0),g("div",Yh,[(_(),C(te,null,qe(i,v=>g("button",{key:v.value,class:ve({active:J(r)===v.value}),title:v.label,"aria-pressed":J(r)===v.value,onClick:S=>J(o)(v.value)},[z(ae,{name:v.icon,size:17},null,8,["name"])],10,Jh)),64))]),g("div",{class:ve(["connection",e.connectionStatus]),title:l[e.connectionStatus]},[z(ae,{name:"wifi",size:18}),g("span",null,I(l[e.connectionStatus]),1)],10,Xh)]),z(Ar,{open:c.value&&!!e.gitStatus,title:`${((b=e.gitStatus)==null?void 0:b.branch)??"detached"} · diff 统计`,onClose:m[2]||(m[2]=v=>c.value=!1)},{default:Je(()=>{var v;return[(v=e.gitStatus)!=null&&v.diffStat?(_(),C("pre",Qh,I(e.gitStatus.diffStat),1)):(_(),C("div",ep,"工作区干净,没有变更。"))]}),_:1},8,["open","title"])])}}}),np=$e(tp,[["__scopeId","data-v-6c220d1f"]]),sp={class:"chat-header"},rp={class:"title-area"},op=["onKeydown"],ip={key:1,class:"title-copy"},lp={class:"title-line"},ap=["title"],cp={class:"status-line"},up={class:"header-actions"},fp=["title"],dp=["title"],hp=Te({__name:"ChatHeader",props:{title:{default:null},busy:{type:Boolean,default:!1}},emits:["rename","export","clear","toggle-rightbar"],setup(e,{emit:t}){const n=e,s=t,r=K(!1),o=K(""),i=K(null);je(()=>n.title,()=>{r.value||(o.value=n.title??"")},{immediate:!0});function l(){o.value=n.title??"",r.value=!0,Ct(()=>{var h,p;(h=i.value)==null||h.focus(),(p=i.value)==null||p.select()})}function a(){r.value=!1;const h=o.value.trim();h&&h!==n.title?s("rename",h):o.value=n.title??""}function c(){r.value=!1,o.value=n.title??""}const u=_t("showThinking",K(!0)),d=_t("showTools",K(!0));return(h,p)=>(_(),C("div",sp,[g("div",rp,[r.value?Ts((_(),C("input",{key:0,id:"session-title-input",ref_key:"inputRef",ref:i,"onUpdate:modelValue":p[0]||(p[0]=f=>o.value=f),name:"session-title",class:"title-input",maxlength:"80",onKeydown:[ys(fn(a,["prevent"]),["enter"]),ys(fn(c,["prevent"]),["esc"])],onBlur:a},null,40,op)),[[Rs,o.value]]):(_(),C("div",ip,[g("div",lp,[g("h1",{title:e.title??void 0},I(e.title||"新会话"),9,ap),g("button",{class:"icon-action edit",title:"重命名会话","aria-label":"重命名会话",onClick:l},[z(ae,{name:"edit",size:17})])]),g("div",cp,[g("span",{class:ve(["status-dot",{busy:e.busy}])},null,2),Le(I(e.busy?"Agent 正在运行并处理工具调用":"Agent 已就绪"),1)])]))]),g("div",up,[g("button",{class:"text-action",title:"导出会话为 Markdown",onClick:p[1]||(p[1]=f=>s("export"))},[z(ae,{name:"upload",size:18}),p[6]||(p[6]=g("span",null,"导出",-1))]),g("button",{class:"text-action",title:"清空本地消息列表",onClick:p[2]||(p[2]=f=>s("clear"))},[z(ae,{name:"broom",size:18}),p[7]||(p[7]=g("span",null,"清空",-1))]),g("button",{class:ve(["text-action",{dimmed:!J(u)}]),title:J(u)?"隐藏思考链":"显示思考链",onClick:p[3]||(p[3]=f=>u.value=!J(u))},[z(ae,{name:"brain",size:18}),p[8]||(p[8]=g("span",null,"思考",-1))],10,fp),g("button",{class:ve(["text-action",{dimmed:!J(d)}]),title:J(d)?"隐藏工具链":"显示工具链",onClick:p[4]||(p[4]=f=>d.value=!J(d))},[z(ae,{name:"terminal",size:18}),p[9]||(p[9]=g("span",null,"工具",-1))],10,dp),g("button",{class:"icon-action",title:"显示或隐藏右侧面板","aria-label":"显示或隐藏右侧面板",onClick:p[5]||(p[5]=f=>s("toggle-rightbar"))},[z(ae,{name:"panel-right",size:19})])])]))}}),pp=$e(hp,[["__scopeId","data-v-5addc6d6"]]),ri=""+new URL("../icon.ico",import.meta.url).href;function oi(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Rn=oi();function mc(e){Rn=e}var cs={exec:()=>null};function xe(e,t=""){let n=typeof e=="string"?e:e.source;const s={replace:(r,o)=>{let i=typeof o=="string"?o:o.source;return i=i.replace(ct.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,t)};return s}var 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,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ 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,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,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")},gp=/^(?:[ \t]*(?:\n|$))+/,mp=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,vp=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,As=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,yp=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ii=/(?:[*+-]|\d{1,9}[.)])/,vc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yc=xe(vc).replace(/bull/g,ii).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(),bp=xe(vc).replace(/bull/g,ii).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(),li=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kp=/^[^\n]+/,ai=/(?!\s*\])(?:\\.|[^\[\]\\])+/,_p=xe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ai).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),wp=xe(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ii).getRegex(),Er="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",ci=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Sp=xe("^ {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",ci).replace("tag",Er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bc=xe(li).replace("hr",As).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Er).getRegex(),xp=xe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bc).getRegex(),ui={blockquote:xp,code:mp,def:_p,fences:vp,heading:yp,hr:As,html:Sp,lheading:yc,list:wp,newline:gp,paragraph:bc,table:cs,text:kp},pl=xe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",As).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[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Er).getRegex(),Cp={...ui,lheading:bp,table:pl,paragraph:xe(li).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",pl).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Er).getRegex()},Tp={...ui,html:xe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ci).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:cs,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:xe(li).replace("hr",As).replace("heading",` *#{1,6} *[^
|
|
20
|
+
]`).replace("lheading",yc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},$p=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Rp=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,kc=/^( {2,}|\\)\n(?!\s*$)/,Ap=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ir=/[\p{P}\p{S}]/u,fi=/[\s\p{P}\p{S}]/u,_c=/[^\s\p{P}\p{S}]/u,Ep=xe(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,fi).getRegex(),wc=/(?!~)[\p{P}\p{S}]/u,Ip=/(?!~)[\s\p{P}\p{S}]/u,Lp=/(?:[^\s\p{P}\p{S}]|~)/u,Pp=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Sc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Mp=xe(Sc,"u").replace(/punct/g,Ir).getRegex(),Np=xe(Sc,"u").replace(/punct/g,wc).getRegex(),xc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Op=xe(xc,"gu").replace(/notPunctSpace/g,_c).replace(/punctSpace/g,fi).replace(/punct/g,Ir).getRegex(),Dp=xe(xc,"gu").replace(/notPunctSpace/g,Lp).replace(/punctSpace/g,Ip).replace(/punct/g,wc).getRegex(),Bp=xe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_c).replace(/punctSpace/g,fi).replace(/punct/g,Ir).getRegex(),zp=xe(/\\(punct)/,"gu").replace(/punct/g,Ir).getRegex(),jp=xe(/^<(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(),Fp=xe(ci).replace("(?:-->|$)","-->").getRegex(),Gp=xe("^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",Fp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Up=xe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cc=xe(/^!?\[(label)\]\[(ref)\]/).replace("label",sr).replace("ref",ai).getRegex(),Tc=xe(/^!?\[(ref)\](?:\[\])?/).replace("ref",ai).getRegex(),Hp=xe("reflink|nolink(?!\\()","g").replace("reflink",Cc).replace("nolink",Tc).getRegex(),di={_backpedal:cs,anyPunctuation:zp,autolink:jp,blockSkip:Pp,br:kc,code:Rp,del:cs,emStrongLDelim:Mp,emStrongRDelimAst:Op,emStrongRDelimUnd:Bp,escape:$p,link:Up,nolink:Tc,punctuation:Ep,reflink:Cc,reflinkSearch:Hp,tag:Gp,text:Ap,url:cs},Wp={...di,link:xe(/^!?\[(label)\]\((.*?)\)/).replace("label",sr).getRegex(),reflink:xe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sr).getRegex()},_o={...di,emStrongRDelimAst:Dp,emStrongLDelim:Np,url:xe(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},qp={..._o,br:xe(kc).replace("{2,}","*").getRegex(),text:xe(_o.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Os={normal:ui,gfm:Cp,pedantic:Tp},Yn={normal:di,gfm:_o,breaks:qp,pedantic:Wp},Vp={"&":"&","<":"<",">":">",'"':""","'":"'"},gl=e=>Vp[e];function Pt(e,t){if(t){if(ct.escapeTest.test(e))return e.replace(ct.escapeReplace,gl)}else if(ct.escapeTestNoEncode.test(e))return e.replace(ct.escapeReplaceNoEncode,gl);return e}function ml(e){try{e=encodeURI(e).replace(ct.percentDecode,"%")}catch{return null}return e}function vl(e,t){var o;const n=e.replace(ct.findPipe,(i,l,a)=>{let c=!1,u=l;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(ct.splitPipe);let r=0;if(s[0].trim()||s.shift(),s.length>0&&!((o=s.at(-1))!=null&&o.trim())&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(ct.slashPipe,"|");return s}function Jn(e,t,n){const s=e.length;if(s===0)return"";let r=0;for(;r<s&&e.charAt(s-r-1)===t;)r++;return e.slice(0,s-r)}function Kp(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])n++;else if(e[s]===t[1]&&(n--,n<0))return s;return n>0?-2:-1}function yl(e,t,n,s,r){const o=t.href,i=t.title||null,l=e[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;const a={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,a}function Zp(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(s===null)return t;const r=s[1];return t.split(`
|
|
21
|
+
`).map(o=>{const i=o.match(n.other.beginningSpace);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
|
|
22
|
+
`)}var rr=class{constructor(e){$(this,"options");$(this,"rules");$(this,"lexer");this.options=e||Rn}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Jn(n,`
|
|
23
|
+
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=Zp(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:s}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){const s=Jn(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Jn(t[0],`
|
|
24
|
+
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Jn(t[0],`
|
|
25
|
+
`).split(`
|
|
26
|
+
`),s="",r="";const o=[];for(;n.length>0;){let i=!1;const l=[];let a;for(a=0;a<n.length;a++)if(this.rules.other.blockquoteStart.test(n[a]))l.push(n[a]),i=!0;else if(!i)l.push(n[a]);else break;n=n.slice(a);const c=l.join(`
|
|
27
|
+
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
28
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
29
|
+
${c}`:c,r=r?`${r}
|
|
30
|
+
${u}`:u;const d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=d,n.length===0)break;const h=o.at(-1);if((h==null?void 0:h.type)==="code")break;if((h==null?void 0:h.type)==="blockquote"){const p=h,f=p.raw+`
|
|
31
|
+
`+n.join(`
|
|
32
|
+
`),m=this.blockquote(f);o[o.length-1]=m,s=s.substring(0,s.length-p.raw.length)+m.raw,r=r.substring(0,r.length-p.text.length)+m.text;break}else if((h==null?void 0:h.type)==="list"){const p=h,f=p.raw+`
|
|
33
|
+
`+n.join(`
|
|
34
|
+
`),m=this.list(f);o[o.length-1]=m,s=s.substring(0,s.length-h.raw.length)+m.raw,r=r.substring(0,r.length-p.raw.length)+m.raw,n=f.substring(o.at(-1).raw.length).split(`
|
|
35
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");const o=this.rules.other.listItemRegex(n);let i=!1;for(;e;){let a=!1,c="",u="";if(!(t=o.exec(e))||this.rules.block.hr.test(e))break;c=t[0],e=e.substring(c.length);let d=t[2].split(`
|
|
36
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,v=>" ".repeat(3*v.length)),h=e.split(`
|
|
37
|
+
`,1)[0],p=!d.trim(),f=0;if(this.options.pedantic?(f=2,u=d.trimStart()):p?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,u=d.slice(f),f+=t[1].length),p&&this.rules.other.blankLine.test(h)&&(c+=h+`
|
|
38
|
+
`,e=e.substring(h.length+1),a=!0),!a){const v=this.rules.other.nextBulletRegex(f),S=this.rules.other.hrRegex(f),x=this.rules.other.fencesBeginRegex(f),R=this.rules.other.headingBeginRegex(f),U=this.rules.other.htmlBeginRegex(f);for(;e;){const Y=e.split(`
|
|
39
|
+
`,1)[0];let D;if(h=Y,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),D=h):D=h.replace(this.rules.other.tabCharGlobal," "),x.test(h)||R.test(h)||U.test(h)||v.test(h)||S.test(h))break;if(D.search(this.rules.other.nonSpaceChar)>=f||!h.trim())u+=`
|
|
40
|
+
`+D.slice(f);else{if(p||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||x.test(d)||R.test(d)||S.test(d))break;u+=`
|
|
41
|
+
`+h}!p&&!h.trim()&&(p=!0),c+=Y+`
|
|
42
|
+
`,e=e.substring(Y.length+1),d=D.slice(f)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let m=null,b;this.options.gfm&&(m=this.rules.other.listIsTask.exec(u),m&&(b=m[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!m,checked:b,loose:!1,text:u,tokens:[]}),r.raw+=c}const l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let a=0;a<r.items.length;a++)if(this.lexer.state.top=!1,r.items[a].tokens=this.lexer.blockTokens(r.items[a].text,[]),!r.loose){const c=r.items[a].tokens.filter(d=>d.type==="space"),u=c.length>0&&c.some(d=>this.rules.other.anyLine.test(d.raw));r.loose=u}if(r.loose)for(let a=0;a<r.items.length;a++)r.items[a].loose=!0;return r}}html(e){const t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){const t=this.rules.block.def.exec(e);if(t){const n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:s,title:r}}}table(e){var i;const t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;const n=vl(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(i=t[3])!=null&&i.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
43
|
+
`):[],o={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===s.length){for(const l of s)this.rules.other.tableAlignRight.test(l)?o.align.push("right"):this.rules.other.tableAlignCenter.test(l)?o.align.push("center"):this.rules.other.tableAlignLeft.test(l)?o.align.push("left"):o.align.push(null);for(let l=0;l<n.length;l++)o.header.push({text:n[l],tokens:this.lexer.inline(n[l]),header:!0,align:o.align[l]});for(const l of r)o.rows.push(vl(l,o.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:o.align[c]})));return o}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const n=t[1].charAt(t[1].length-1)===`
|
|
44
|
+
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){const 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){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const 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){const t=this.rules.inline.link.exec(e);if(t){const n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const o=Jn(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=Kp(t[2],"()");if(o===-2)return;if(o>-1){const l=(t[0].indexOf("!")===0?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,l).trim(),t[3]=""}}let s=t[2],r="";if(this.options.pedantic){const o=this.rules.other.pedanticHrefTitle.exec(s);o&&(s=o[1],r=o[3])}else r=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),yl(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.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))){const s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=t[s.toLowerCase()];if(!r){const o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return yl(n,r,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!s||s[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const o=[...s[0]].length-1;let i,l,a=o,c=0;const u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+o);(s=u.exec(t))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(l=[...i].length,s[3]||s[4]){a+=l;continue}else if((s[5]||s[6])&&o%3&&!((o+l)%3)){c+=l;continue}if(a-=l,a>0)continue;l=Math.min(l,l+a+c);const d=[...s[0]][0].length,h=e.slice(0,o+s.index+d+l);if(Math.min(o,l)%2){const f=h.slice(1,-1);return{type:"em",raw:h,text:f,tokens:this.lexer.inlineTokens(f)}}const p=h.slice(2,-2);return{type:"strong",raw:h,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let n,s;return t[2]==="@"?(n=t[1],s="mailto:"+n):(n=t[1],s=n),{type:"link",raw:t[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let s,r;if(t[2]==="@")s=t[0],r="mailto:"+s;else{let o;do o=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(o!==t[0]);s=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:s,href:r,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Vt=class wo{constructor(t){$(this,"tokens");$(this,"options");$(this,"state");$(this,"tokenizer");$(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Rn,this.options.tokenizer=this.options.tokenizer||new rr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:ct,block:Os.normal,inline:Yn.normal};this.options.pedantic?(n.block=Os.pedantic,n.inline=Yn.pedantic):this.options.gfm&&(n.block=Os.gfm,this.options.breaks?n.inline=Yn.breaks:n.inline=Yn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Os,inline:Yn}}static lex(t,n){return new wo(n).lex(t)}static lexInline(t,n){return new wo(n).inlineTokens(t)}lex(t){t=t.replace(ct.carriageReturn,`
|
|
45
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],s=!1){var r,o,i;for(this.options.pedantic&&(t=t.replace(ct.tabCharGlobal," ").replace(ct.spaceLine,""));t;){let l;if((o=(r=this.options.extensions)==null?void 0:r.block)!=null&&o.some(c=>(l=c.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);const c=n.at(-1);l.raw.length===1&&c!==void 0?c.raw+=`
|
|
46
|
+
`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
47
|
+
`+l.raw,c.text+=`
|
|
48
|
+
`+l.text,this.inlineQueue.at(-1).src=c.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
49
|
+
`+l.raw,c.text+=`
|
|
50
|
+
`+l.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title});continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let a=t;if((i=this.options.extensions)!=null&&i.startBlock){let c=1/0;const u=t.slice(1);let d;this.options.extensions.startBlock.forEach(h=>{d=h.call({lexer:this},u),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(a=t.substring(0,c+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){const c=n.at(-1);s&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=`
|
|
51
|
+
`+l.raw,c.text+=`
|
|
52
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(l),s=a.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);const c=n.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=`
|
|
53
|
+
`+l.raw,c.text+=`
|
|
54
|
+
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):n.push(l);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var l,a,c;let s=t,r=null;if(this.tokens.links){const u=Object.keys(this.tokens.links);if(u.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)u.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let o=!1,i="";for(;t;){o||(i=""),o=!1;let u;if((a=(l=this.options.extensions)==null?void 0:l.inline)!=null&&a.some(h=>(u=h.call({lexer:this},t,n))?(t=t.substring(u.raw.length),n.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);const h=n.at(-1);u.type==="text"&&(h==null?void 0:h.type)==="text"?(h.raw+=u.raw,h.text+=u.text):n.push(u);continue}if(u=this.tokenizer.emStrong(t,s,i)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),n.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),n.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),n.push(u);continue}let d=t;if((c=this.options.extensions)!=null&&c.startInline){let h=1/0;const p=t.slice(1);let f;this.options.extensions.startInline.forEach(m=>{f=m.call({lexer:this},p),typeof f=="number"&&f>=0&&(h=Math.min(h,f))}),h<1/0&&h>=0&&(d=t.substring(0,h+1))}if(u=this.tokenizer.inlineText(d)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(i=u.raw.slice(-1)),o=!0;const h=n.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=u.raw,h.text+=u.text):n.push(u);continue}if(t){const h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return n}},or=class{constructor(e){$(this,"options");$(this,"parser");this.options=e||Rn}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const s=(o=(t||"").match(ct.notSpaceStart))==null?void 0:o[0],r=e.replace(ct.endingNewline,"")+`
|
|
55
|
+
`;return s?'<pre><code class="language-'+Pt(s)+'">'+(n?r:Pt(r,!0))+`</code></pre>
|
|
56
|
+
`:"<pre><code>"+(n?r:Pt(r,!0))+`</code></pre>
|
|
57
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
58
|
+
${this.parser.parse(e)}</blockquote>
|
|
59
|
+
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
60
|
+
`}hr(e){return`<hr>
|
|
61
|
+
`}list(e){const t=e.ordered,n=e.start;let s="";for(let i=0;i<e.items.length;i++){const l=e.items[i];s+=this.listitem(l)}const r=t?"ol":"ul",o=t&&n!==1?' start="'+n+'"':"";return"<"+r+o+`>
|
|
62
|
+
`+s+"</"+r+`>
|
|
63
|
+
`}listitem(e){var n;let t="";if(e.task){const s=this.checkbox({checked:!!e.checked});e.loose?((n=e.tokens[0])==null?void 0:n.type)==="paragraph"?(e.tokens[0].text=s+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type==="text"&&(e.tokens[0].tokens[0].text=s+" "+Pt(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):t+=s+" "}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
64
|
+
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
65
|
+
`}table(e){let t="",n="";for(let r=0;r<e.header.length;r++)n+=this.tablecell(e.header[r]);t+=this.tablerow({text:n});let s="";for(let r=0;r<e.rows.length;r++){const o=e.rows[r];n="";for(let i=0;i<o.length;i++)n+=this.tablecell(o[i]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
66
|
+
<thead>
|
|
67
|
+
`+t+`</thead>
|
|
68
|
+
`+s+`</table>
|
|
69
|
+
`}tablerow({text:e}){return`<tr>
|
|
70
|
+
${e}</tr>
|
|
71
|
+
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
72
|
+
`}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>${Pt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const s=this.parser.parseInline(n),r=ml(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+Pt(t)+'"'),o+=">"+s+"</a>",o}image({href:e,title:t,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));const r=ml(e);if(r===null)return Pt(n);e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${Pt(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Pt(e.text)}},hi=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""}},Kt=class So{constructor(t){$(this,"options");$(this,"renderer");$(this,"textRenderer");this.options=t||Rn,this.options.renderer=this.options.renderer||new or,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new hi}static parse(t,n){return new So(n).parse(t)}static parseInline(t,n){return new So(n).parseInline(t)}parse(t,n=!0){var r,o;let s="";for(let i=0;i<t.length;i++){const l=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[l.type]){const c=l,u=this.options.extensions.renderers[c.type].call({parser:this},c);if(u!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(c.type)){s+=u||"";continue}}const a=l;switch(a.type){case"space":{s+=this.renderer.space(a);continue}case"hr":{s+=this.renderer.hr(a);continue}case"heading":{s+=this.renderer.heading(a);continue}case"code":{s+=this.renderer.code(a);continue}case"table":{s+=this.renderer.table(a);continue}case"blockquote":{s+=this.renderer.blockquote(a);continue}case"list":{s+=this.renderer.list(a);continue}case"html":{s+=this.renderer.html(a);continue}case"paragraph":{s+=this.renderer.paragraph(a);continue}case"text":{let c=a,u=this.renderer.text(c);for(;i+1<t.length&&t[i+1].type==="text";)c=t[++i],u+=`
|
|
73
|
+
`+this.renderer.text(c);n?s+=this.renderer.paragraph({type:"paragraph",raw:u,text:u,tokens:[{type:"text",raw:u,text:u,escaped:!0}]}):s+=u;continue}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}parseInline(t,n=this.renderer){var r,o;let s="";for(let i=0;i<t.length;i++){const l=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[l.type]){const c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){s+=c||"";continue}}const a=l;switch(a.type){case"escape":{s+=n.text(a);break}case"html":{s+=n.html(a);break}case"link":{s+=n.link(a);break}case"image":{s+=n.image(a);break}case"strong":{s+=n.strong(a);break}case"em":{s+=n.em(a);break}case"codespan":{s+=n.codespan(a);break}case"br":{s+=n.br(a);break}case"del":{s+=n.del(a);break}case"text":{s+=n.text(a);break}default:{const c='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return s}},ro,Hs=(ro=class{constructor(e){$(this,"options");$(this,"block");this.options=e||Rn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?Vt.lex:Vt.lexInline}provideParser(){return this.block?Kt.parse:Kt.parseInline}},$(ro,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),ro),Yp=class{constructor(...e){$(this,"defaults",oi());$(this,"options",this.setOptions);$(this,"parse",this.parseMarkdown(!0));$(this,"parseInline",this.parseMarkdown(!1));$(this,"Parser",Kt);$(this,"Renderer",or);$(this,"TextRenderer",hi);$(this,"Lexer",Vt);$(this,"Tokenizer",rr);$(this,"Hooks",Hs);this.use(...e)}walkTokens(e,t){var s,r;let n=[];for(const o of e)switch(n=n.concat(t.call(this,o)),o.type){case"table":{const i=o;for(const l of i.header)n=n.concat(this.walkTokens(l.tokens,t));for(const l of i.rows)for(const a of l)n=n.concat(this.walkTokens(a.tokens,t));break}case"list":{const i=o;n=n.concat(this.walkTokens(i.items,t));break}default:{const i=o;(r=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&r[i.type]?this.defaults.extensions.childTokens[i.type].forEach(l=>{const a=i[l].flat(1/0);n=n.concat(this.walkTokens(a,t))}):i.tokens&&(n=n.concat(this.walkTokens(i.tokens,t)))}}return n}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{const s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const o=t.renderers[r.name];o?t.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=o.apply(this,i)),l}:t.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const o=t[r.level];o?o.unshift(r.tokenizer):t[r.level]=[r.tokenizer],r.start&&(r.level==="block"?t.startBlock?t.startBlock.push(r.start):t.startBlock=[r.start]:r.level==="inline"&&(t.startInline?t.startInline.push(r.start):t.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(t.childTokens[r.name]=r.childTokens)}),s.extensions=t),n.renderer){const r=this.defaults.renderer||new or(this.defaults);for(const o in n.renderer){if(!(o in r))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;const i=o,l=n.renderer[i],a=r[i];r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u||""}}s.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new rr(this.defaults);for(const o in n.tokenizer){if(!(o in r))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;const i=o,l=n.tokenizer[i],a=r[i];r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u}}s.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new Hs;for(const o in n.hooks){if(!(o in r))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;const i=o,l=n.hooks[i],a=r[i];Hs.passThroughHooks.has(o)?r[i]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(d=>a.call(r,d));const u=l.call(r,c);return a.call(r,u)}:r[i]=(...c)=>{let u=l.apply(r,c);return u===!1&&(u=a.apply(r,c)),u}}s.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,o=n.walkTokens;s.walkTokens=function(i){let l=[];return l.push(o.call(this,i)),r&&(l=l.concat(r.call(this,i))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Vt.lex(e,t??this.defaults)}parser(e,t){return Kt.parse(e,t??this.defaults)}parseMarkdown(e){return(n,s)=>{const r={...s},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(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 n>"u"||n===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const l=o.hooks?o.hooks.provideLexer():e?Vt.lex:Vt.lexInline,a=o.hooks?o.hooks.provideParser():e?Kt.parse:Kt.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(n):n).then(c=>l(c,o)).then(c=>o.hooks?o.hooks.processAllTokens(c):c).then(c=>o.walkTokens?Promise.all(this.walkTokens(c,o.walkTokens)).then(()=>c):c).then(c=>a(c,o)).then(c=>o.hooks?o.hooks.postprocess(c):c).catch(i);try{o.hooks&&(n=o.hooks.preprocess(n));let c=l(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let u=a(c,o);return o.hooks&&(u=o.hooks.postprocess(u)),u}catch(c){return i(c)}}}onError(e,t){return n=>{if(n.message+=`
|
|
74
|
+
Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+Pt(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},Tn=new Yp;function Ce(e,t){return Tn.parse(e,t)}Ce.options=Ce.setOptions=function(e){return Tn.setOptions(e),Ce.defaults=Tn.defaults,mc(Ce.defaults),Ce};Ce.getDefaults=oi;Ce.defaults=Rn;Ce.use=function(...e){return Tn.use(...e),Ce.defaults=Tn.defaults,mc(Ce.defaults),Ce};Ce.walkTokens=function(e,t){return Tn.walkTokens(e,t)};Ce.parseInline=Tn.parseInline;Ce.Parser=Kt;Ce.parser=Kt.parse;Ce.Renderer=or;Ce.TextRenderer=hi;Ce.Lexer=Vt;Ce.lexer=Vt.lex;Ce.Tokenizer=rr;Ce.Hooks=Hs;Ce.parse=Ce;Ce.options;Ce.setOptions;Ce.use;Ce.walkTokens;Ce.parseInline;Kt.parse;Vt.lex;const Jp="modulepreload",Xp=function(e,t){return new URL(e,t).href},bl={},ht=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const l=document.getElementsByTagName("link"),a=document.querySelector("meta[property=csp-nonce]"),c=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=i(n.map(u=>{if(u=Xp(u,s),u in bl)return;bl[u]=!0;const d=u.endsWith(".css"),h=d?'[rel="stylesheet"]':"";if(!!s)for(let m=l.length-1;m>=0;m--){const b=l[m];if(b.href===u&&(!d||b.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const f=document.createElement("link");if(f.rel=d?"stylesheet":Jp,d||(f.as="script"),f.crossOrigin="",f.href=u,c&&f.setAttribute("nonce",c),document.head.appendChild(f),d)return new Promise((m,b)=>{f.addEventListener("load",m),f.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${u}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return r.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};let We=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Qp(e){return pi(e)}function pi(e){return Array.isArray(e)?eg(e):e instanceof RegExp?e:typeof e=="object"?tg(e):e}function eg(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=pi(e[n]);return t}function tg(e){let t={};for(let n in e)t[n]=pi(e[n]);return t}function $c(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function Rc(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?Rc(e.substring(0,e.length-1)):e.substr(~t+1)}var Zr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ds=class{static hasCaptures(e){return e===null?!1:(Zr.lastIndex=0,Zr.test(e))}static replaceCaptures(e,t,n){return e.replace(Zr,(s,r,o,i)=>{let l=n[parseInt(r||o,10)];if(l){let a=t.substring(l.start,l.end);for(;a[0]===".";)a=a.substring(1);switch(i){case"downcase":return a.toLowerCase();case"upcase":return a.toUpperCase();default:return a}}else return s})}};function Ac(e,t){return e<t?-1:e>t?1:0}function Ec(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,s=t.length;if(n===s){for(let r=0;r<n;r++){let o=Ac(e[r],t[r]);if(o!==0)return o}return 0}return n-s}function kl(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function Ic(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var Lc=class{constructor(e){$(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},ir=class{constructor(e,t,n){$(this,"_cachedMatchRoot",new Lc(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(rg(e),t)}static createFromParsedTheme(e,t){return ig(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,s=this._cachedMatchRoot.get(t).find(r=>ng(e.parent,r.parentScopes));return s?new Pc(s.fontStyle,s.foreground,s.background):null}},Yr=class Ws{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new Ws(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new Ws(n,t[s]);return n}push(t){return new Ws(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let s=this;for(;s&&s!==t;)n.push(s.scopeName),s=s.parent;return s===t?n.reverse():void 0}};function ng(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let s=t[n],r=!1;if(s===">"){if(n===t.length-1)return!1;s=t[++n],r=!0}for(;e&&!sg(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function sg(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Pc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function rg(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],s=0;for(let r=0,o=t.length;r<o;r++){let i=t[r];if(!i.settings)continue;let l;if(typeof i.scope=="string"){let d=i.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),l=d.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let d=i.settings.fontStyle.split(" ");for(let h=0,p=d.length;h<p;h++)switch(d[h]){case"italic":a=a|1;break;case"bold":a=a|2;break;case"underline":a=a|4;break;case"strikethrough":a=a|8;break}}let c=null;typeof i.settings.foreground=="string"&&kl(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&kl(i.settings.background)&&(u=i.settings.background);for(let d=0,h=l.length;d<h;d++){let f=l[d].trim().split(" "),m=f[f.length-1],b=null;f.length>1&&(b=f.slice(0,f.length-1),b.reverse()),n[s++]=new og(m,b,r,a,c,u)}}return n}var og=class{constructor(e,t,n,s,r,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=s,this.foreground=r,this.background=o}},st=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(st||{});function ig(e,t){e.sort((a,c)=>{let u=Ac(a.scope,c.scope);return u!==0||(u=Ec(a.parentScopes,c.parentScopes),u!==0)?u:a.index-c.index});let n=0,s="#000000",r="#ffffff";for(;e.length>=1&&e[0].scope==="";){let a=e.shift();a.fontStyle!==-1&&(n=a.fontStyle),a.foreground!==null&&(s=a.foreground),a.background!==null&&(r=a.background)}let o=new lg(t),i=new Pc(n,o.getId(s),o.getId(r)),l=new cg(new xo(0,null,-1,0,0),[]);for(let a=0,c=e.length;a<c;a++){let u=e[a];l.insert(0,u.scope,u.parentScopes,u.fontStyle,o.getId(u.foreground),o.getId(u.background))}return new ir(o,i,l)}var lg=class{constructor(e){$(this,"_isFrozen");$(this,"_lastColorId");$(this,"_id2color");$(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},ag=Object.freeze([]),xo=class Mc{constructor(t,n,s,r,o){$(this,"scopeDepth");$(this,"parentScopes");$(this,"fontStyle");$(this,"foreground");$(this,"background");this.scopeDepth=t,this.parentScopes=n||ag,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new Mc(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let s=0,r=t.length;s<r;s++)n[s]=t[s].clone();return n}acceptOverwrite(t,n,s,r){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),s!==0&&(this.foreground=s),r!==0&&(this.background=r)}},cg=class Co{constructor(t,n=[],s={}){$(this,"_rulesWithParentScopes");this._mainRule=t,this._children=s,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let s=0,r=0;for(;t.parentScopes[s]===">"&&s++,n.parentScopes[r]===">"&&r++,!(s>=t.parentScopes.length||r>=n.parentScopes.length);){const o=n.parentScopes[r].length-t.parentScopes[s].length;if(o!==0)return o;s++,r++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let s=t.indexOf("."),r,o;if(s===-1?(r=t,o=""):(r=t.substring(0,s),o=t.substring(s+1)),this._children.hasOwnProperty(r))return this._children[r].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Co._cmpBySpecificity),n}insert(t,n,s,r,o,i){if(n===""){this._doInsertHere(t,s,r,o,i);return}let l=n.indexOf("."),a,c;l===-1?(a=n,c=""):(a=n.substring(0,l),c=n.substring(l+1));let u;this._children.hasOwnProperty(a)?u=this._children[a]:(u=new Co(this._mainRule.clone(),xo.cloneArr(this._rulesWithParentScopes)),this._children[a]=u),u.insert(t+1,c,s,r,o,i)}_doInsertHere(t,n,s,r,o){if(n===null){this._mainRule.acceptOverwrite(t,s,r,o);return}for(let i=0,l=this._rulesWithParentScopes.length;i<l;i++){let a=this._rulesWithParentScopes[i];if(Ec(a.parentScopes,n)===0){a.acceptOverwrite(t,s,r,o);return}}s===-1&&(s=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new xo(t,n,s,r,o))}},Hn=class vt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=vt.getLanguageId(t),s=vt.getTokenType(t),r=vt.getFontStyle(t),o=vt.getForeground(t),i=vt.getBackground(t);console.log({languageId:n,tokenType:s,fontStyle:r,foreground:o,background:i})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,s,r,o,i,l){let a=vt.getLanguageId(t),c=vt.getTokenType(t),u=vt.containsBalancedBrackets(t)?1:0,d=vt.getFontStyle(t),h=vt.getForeground(t),p=vt.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(d=o),i!==0&&(h=i),l!==0&&(p=l),(a<<0|c<<8|u<<10|d<<11|h<<15|p<<24)>>>0}};function lr(e,t){const n=[],s=ug(e);let r=s.next();for(;r!==null;){let a=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":a=1;break;case"L":a=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=s.next()}let c=i();if(n.push({matcher:c,priority:a}),r!==",")break;r=s.next()}return n;function o(){if(r==="-"){r=s.next();const a=o();return c=>!!a&&!a(c)}if(r==="("){r=s.next();const a=l();return r===")"&&(r=s.next()),a}if(_l(r)){const a=[];do a.push(r),r=s.next();while(_l(r));return c=>t(a,c)}return null}function i(){const a=[];let c=o();for(;c;)a.push(c),c=o();return u=>a.every(d=>d(u))}function l(){const a=[];let c=i();for(;c&&(a.push(c),r==="|"||r===",");){do r=s.next();while(r==="|"||r===",");c=i()}return u=>a.some(d=>d(u))}}function _l(e){return!!e&&!!e.match(/[\w\.:]+/)}function ug(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const s=n[0];return n=t.exec(e),s}}}function Nc(e){typeof e.dispose=="function"&&e.dispose()}var ks=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},fg=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},dg=class{constructor(){$(this,"_references",[]);$(this,"_seenReferenceKeys",new Set);$(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},hg=class{constructor(e,t){$(this,"seenFullScopeRequests",new Set);$(this,"seenPartialScopeRequests",new Set);$(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ks(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new dg;for(const n of e)pg(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof ks){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function pg(e,t,n,s){const r=n.lookup(e.scopeName);if(!r){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof ks?qs({baseGrammar:o,selfGrammar:r},s):To(e.ruleName,{baseGrammar:o,selfGrammar:r,repository:r.repository},s);const i=n.injections(e.scopeName);if(i)for(const l of i)s.add(new ks(l))}function To(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];ar([s],t,n)}}function qs(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ar(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ar(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ar(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?$c({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&ar(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const i=Oc(o);switch(i.kind){case 0:qs({...t,selfGrammar:t.baseGrammar},n);break;case 1:qs(t,n);break;case 2:To(i.ruleName,{...t,repository:r},n);break;case 3:case 4:const l=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(l){const a={baseGrammar:t.baseGrammar,selfGrammar:l,repository:r};i.kind===4?To(i.ruleName,a,n):qs(a,n)}else i.kind===4?n.add(new fg(i.scopeName,i.ruleName)):n.add(new ks(i.scopeName));break}}}var gg=class{constructor(){$(this,"kind",0)}},mg=class{constructor(){$(this,"kind",1)}},vg=class{constructor(e){$(this,"kind",2);this.ruleName=e}},yg=class{constructor(e){$(this,"kind",3);this.scopeName=e}},bg=class{constructor(e,t){$(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Oc(e){if(e==="$base")return new gg;if(e==="$self")return new mg;const t=e.indexOf("#");if(t===-1)return new yg(e);if(t===0)return new vg(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new bg(n,s)}}var kg=/\\(\d+)/,wl=/\\(\d+)/g,_g=-1,Dc=-2;var Es=class{constructor(e,t,n,s){$(this,"$location");$(this,"id");$(this,"_nameIsCapturing");$(this,"_name");$(this,"_contentNameIsCapturing");$(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ds.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Ds.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${Rc(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Ds.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ds.replaceCaptures(this._contentName,e,t)}},wg=class extends Es{constructor(t,n,s,r,o){super(t,n,s,r);$(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,s,r){throw new Error("Not supported!")}},Sg=class extends Es{constructor(t,n,s,r,o){super(t,n,s,null);$(this,"_match");$(this,"captures");$(this,"_cachedCompiledPatterns");this._match=new _s(r,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ws,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Sl=class extends Es{constructor(t,n,s,r,o){super(t,n,s,r);$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const s of this.patterns)t.getRule(s).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ws,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},$o=class extends Es{constructor(t,n,s,r,o,i,l,a,c,u){super(t,n,s,r);$(this,"_begin");$(this,"beginCaptures");$(this,"_end");$(this,"endHasBackReferences");$(this,"endCaptures");$(this,"applyEndPatternLast");$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");this._begin=new _s(o,this.id),this.beginCaptures=i,this._end=new _s(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t,n).compileAG(t,s,r)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ws;for(const s of this.patterns)t.getRule(s).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},cr=class extends Es{constructor(t,n,s,r,o,i,l,a,c){super(t,n,s,r);$(this,"_begin");$(this,"beginCaptures");$(this,"whileCaptures");$(this,"_while");$(this,"whileHasBackReferences");$(this,"hasMissingPatterns");$(this,"patterns");$(this,"_cachedCompiledPatterns");$(this,"_cachedCompiledWhilePatterns");this._begin=new _s(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new _s(l,Dc),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,s,r){return this._getCachedCompiledPatterns(t).compileAG(t,s,r)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ws;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,s,r){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,s,r)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ws,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Bc=class Qe{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new wg(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new Sg(t.$vscodeTextmateLocation,t.id,t.name,t.match,Qe._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=$c({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Sl(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Qe._compilePatterns(o,n,s))}return t.while?new cr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Qe._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,Qe._compileCaptures(t.whileCaptures||t.captures,n,s),Qe._compilePatterns(t.patterns,n,s)):new $o(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Qe._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,Qe._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,Qe._compilePatterns(t.patterns,n,s))}),t.id}static _compileCaptures(t,n,s){let r=[];if(t){let o=0;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);l>o&&(o=l)}for(let i=0;i<=o;i++)r[i]=null;for(const i in t){if(i==="$vscodeTextmateLocation")continue;const l=parseInt(i,10);let a=0;t[i].patterns&&(a=Qe.getCompiledRuleId(t[i],n,s)),r[l]=Qe.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,a)}}return r}static _compilePatterns(t,n,s){let r=[];if(t)for(let o=0,i=t.length;o<i;o++){const l=t[o];let a=-1;if(l.include){const c=Oc(l.include);switch(c.kind){case 0:case 1:a=Qe.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=Qe.getCompiledRuleId(u,n,s));break;case 3:case 4:const d=c.scopeName,h=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(d,s);if(p)if(h){let f=p.repository[h];f&&(a=Qe.getCompiledRuleId(f,n,p.repository))}else a=Qe.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=Qe.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof Sl||c instanceof $o||c instanceof cr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},_s=class zc{constructor(t,n){$(this,"source");$(this,"ruleId");$(this,"hasAnchor");$(this,"hasBackReferences");$(this,"_anchorCache");if(t&&typeof t=="string"){const s=t.length;let r=0,o=[],i=!1;for(let l=0;l<s;l++)if(t.charAt(l)==="\\"&&l+1<s){const c=t.charAt(l+1);c==="z"?(o.push(t.substring(r,l)),o.push("$(?!\\n)(?<!\\n)"),r=l+2):(c==="A"||c==="G")&&(i=!0),l++}this.hasAnchor=i,r===0?this.source=t:(o.push(t.substring(r,s)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=kg.test(this.source):this.hasBackReferences=!1}clone(){return new zc(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let s=n.map(r=>t.substring(r.start,r.end));return wl.lastIndex=0,this.source.replace(wl,(r,o)=>Ic(s[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],s=[],r=[],o,i,l,a;for(o=0,i=this.source.length;o<i;o++)l=this.source.charAt(o),t[o]=l,n[o]=l,s[o]=l,r[o]=l,l==="\\"&&o+1<i&&(a=this.source.charAt(o+1),a==="A"?(t[o+1]="",n[o+1]="",s[o+1]="A",r[o+1]="A"):a==="G"?(t[o+1]="",n[o+1]="G",s[o+1]="",r[o+1]="G"):(t[o+1]=a,n[o+1]=a,s[o+1]=a,r[o+1]=a),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:s.join(""),A1_G1:r.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ws=class{constructor(){$(this,"_items");$(this,"_hasAnchors");$(this,"_cached");$(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new xl(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let s=this._items.map(r=>r.resolveAnchors(t,n));return new xl(e,s,this._items.map(r=>r.ruleId))}},xl=class{constructor(e,t,n){$(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
75
|
+
`)}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},Jr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},qt,xg=(qt=class{constructor(t,n){$(this,"_defaultAttributes");$(this,"_embeddedLanguagesMatcher");$(this,"_getBasicScopeAttributes",new Lc(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new Jr(n,s)}));this._defaultAttributes=new Jr(t,8),this._embeddedLanguagesMatcher=new Cg(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?qt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(qt.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},$(qt,"_NULL_SCOPE_METADATA",new Jr(0,0)),$(qt,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),qt),Cg=class{constructor(e){$(this,"values");$(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,s])=>Ic(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},Cl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function jc(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const p=Tg(e,t,n,s,r,o);r=p.stack,s=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const d=Date.now();for(;!c;){if(l!==0&&Date.now()-d>l)return new Cl(r,!0);h()}return new Cl(r,!1);function h(){const p=$g(e,t,n,s,r,u);if(!p){o.produce(r,a),c=!0;return}const f=p.captureIndices,m=p.matchedRuleId,b=f&&f.length>0?f[0].end>s:!1;if(m===_g){const v=r.getRule(e);o.produce(r,f[0].start),r=r.withContentNameScopesList(r.nameScopesList),ns(e,t,n,r,o,v.endCaptures,f),o.produce(r,f[0].end);const S=r;if(r=r.parent,u=S.getAnchorPos(),!b&&S.getEnterPos()===s){r=S,o.produce(r,a),c=!0;return}}else{const v=e.getRule(m);o.produce(r,f[0].start);const S=r,x=v.getName(t.content,f),R=r.contentNameScopesList.pushAttributed(x,e);if(r=r.push(m,s,u,f[0].end===a,null,R,R),v instanceof $o){const U=v;ns(e,t,n,r,o,U.beginCaptures,f),o.produce(r,f[0].end),u=f[0].end;const Y=U.getContentName(t.content,f),D=R.pushAttributed(Y,e);if(r=r.withContentNameScopesList(D),U.endHasBackReferences&&(r=r.withEndRule(U.getEndWithResolvedBackReferences(t.content,f))),!b&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(v instanceof cr){const U=v;ns(e,t,n,r,o,U.beginCaptures,f),o.produce(r,f[0].end),u=f[0].end;const Y=U.getContentName(t.content,f),D=R.pushAttributed(Y,e);if(r=r.withContentNameScopesList(D),U.whileHasBackReferences&&(r=r.withEndRule(U.getWhileWithResolvedBackReferences(t.content,f))),!b&&S.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(ns(e,t,n,r,o,v.captures,f),o.produce(r,f[0].end),r=r.pop(),!b){r=r.safePop(),o.produce(r,a),c=!0;return}}f[0].end>s&&(s=f[0].end,n=!1)}}function Tg(e,t,n,s,r,o){let i=r.beginRuleCapturedEOL?0:-1;const l=[];for(let a=r;a;a=a.pop()){const c=a.getRule(e);c instanceof cr&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Eg(a.rule,e,a.stack.endRule,n,s===i),d=c.findNextMatchSync(t,s,u);if(d){if(d.ruleId!==Dc){r=a.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(o.produce(a.stack,d.captureIndices[0].start),ns(e,t,n,a.stack,o,a.rule.whileCaptures,d.captureIndices),o.produce(a.stack,d.captureIndices[0].end),i=d.captureIndices[0].end,d.captureIndices[0].end>s&&(s=d.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function $g(e,t,n,s,r,o){const i=Rg(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=Ag(l,e,t,n,s,r,o);if(!a)return i;if(!i)return a;const c=i.captureIndices[0].start,u=a.captureIndices[0].start;return u<c||a.priorityMatch&&u===c?a:i}function Rg(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=Fc(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Ag(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const d=o.contentNameScopesList.getScopeNames();for(let h=0,p=e.length;h<p;h++){const f=e[h];if(!f.matcher(d))continue;const m=t.getRule(f.ruleId),{ruleScanner:b,findOptions:v}=Fc(m,t,null,s,r===i),S=b.findNextMatchSync(n,r,v);if(!S)continue;const x=S.captureIndices[0].start;if(!(x>=l)&&(l=x,a=S.captureIndices,c=S.ruleId,u=f.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Fc(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function Eg(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function ns(e,t,n,s,r,o,i){if(o.length===0)return;const l=t.content,a=Math.min(o.length,i.length),c=[],u=i[0].end;for(let d=0;d<a;d++){const h=o[d];if(h===null)continue;const p=i[d];if(p.length===0)continue;if(p.start>u)break;for(;c.length>0&&c[c.length-1].endPos<=p.start;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?r.produceFromScopes(c[c.length-1].scopes,p.start):r.produce(s,p.start),h.retokenizeCapturedWithRuleId){const m=h.getName(l,i),b=s.contentNameScopesList.pushAttributed(m,e),v=h.getContentName(l,i),S=b.pushAttributed(v,e),x=s.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,b,S),R=e.createOnigString(l.substring(0,p.end));jc(e,R,n&&p.start===0,p.start,x,r,!1,0),Nc(R);continue}const f=h.getName(l,i);if(f!==null){const b=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(f,e);c.push(new Ig(b,p.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var Ig=class{constructor(e,t){$(this,"scopes");$(this,"endPos");this.scopes=e,this.endPos=t}};function Lg(e,t,n,s,r,o,i,l){return new Mg(e,t,n,s,r,o,i,l)}function Tl(e,t,n,s,r){const o=lr(t,ur),i=Bc.getCompiledRuleId(n,s,r.repository);for(const l of o)e.push({debugSelector:t,matcher:l.matcher,ruleId:i,grammar:r,priority:l.priority})}function ur(e,t){if(t.length<e.length)return!1;let n=0;return e.every(s=>{for(let r=n;r<t.length;r++)if(Pg(t[r],s))return n=r+1,!0;return!1})}function Pg(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var Mg=class{constructor(e,t,n,s,r,o,i,l){$(this,"_rootId");$(this,"_lastRuleId");$(this,"_ruleId2desc");$(this,"_includedGrammars");$(this,"_grammarRepository");$(this,"_grammar");$(this,"_injections");$(this,"_basicScopeAttributesProvider");$(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new xg(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=$l(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=lr(a,ur);for(const u of c)this._tokenTypeMatchers.push({matcher:u.matcher,type:r[a]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},t=[],n=this._rootScopeName,s=e.lookup(n);if(s){const r=s.injections;if(r)for(let i in r)Tl(t,i,r[i],this,s);const o=this._grammarRepository.injections(n);o&&o.forEach(i=>{const l=this.getExternalGrammar(i);if(l){const a=l.injectionSelector;a&&Tl(t,a,l,this,l)}})}return t.sort((r,o)=>r.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=$l(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const s=this._tokenize(e,t,!1,n);return{tokens:s.lineTokens.getResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}tokenizeLine2(e,t,n=0){const s=this._tokenize(e,t,!0,n);return{tokens:s.lineTokens.getBinaryResult(s.ruleStack,s.lineLength),ruleStack:s.ruleStack,stoppedEarly:s.stoppedEarly}}_tokenize(e,t,n,s){this._rootId===-1&&(this._rootId=Bc.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!t||t===Ro.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),d=Hn.set(0,c.languageId,c.tokenType,null,u.fontStyle,u.foregroundId,u.backgroundId),h=this.getRule(this._rootId).getName(null,null);let p;h?p=us.createRootAndLookUpScopeName(h,d,this):p=us.createRoot("unknown",d),t=new Ro(null,this._rootId,-1,-1,!1,null,p,p)}else r=!1,t.reset();e=e+`
|
|
76
|
+
`;const o=this.createOnigString(e),i=o.content.length,l=new Og(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=jc(this,o,r,0,t,l,!0,s);return Nc(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function $l(e,t){return e=Qp(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var us=class Mt{constructor(t,n,s){this.parent=t,this.scopePath=n,this.tokenAttributes=s}static fromExtension(t,n){let s=t,r=(t==null?void 0:t.scopePath)??null;for(const o of n)r=Yr.push(r,o.scopeNames),s=new Mt(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new Mt(null,new Yr(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new Yr(null,t),i=s.themeProvider.themeMatch(o),l=Mt.mergeAttributes(n,r,i);return new Mt(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Mt.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,s){let r=-1,o=0,i=0;return s!==null&&(r=s.fontStyle,o=s.foregroundId,i=s.backgroundId),Hn.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Mt._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=Mt._pushAttributed(r,o,n);return r}static _pushAttributed(t,n,s){const r=s.getMetadataForScope(n),o=t.scopePath.push(n),i=s.themeProvider.themeMatch(o),l=Mt.mergeAttributes(t.tokenAttributes,r,i);return new Mt(t,o,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var r;const n=[];let s=this;for(;s&&s!==t;)n.push({encodedTokenAttributes:s.tokenAttributes,scopeNames:s.scopePath.getExtensionIfDefined(((r=s.parent)==null?void 0:r.scopePath)??null)}),s=s.parent;return s===t?n.reverse():void 0}},bt,Ro=(bt=class{constructor(t,n,s,r,o,i,l,a){$(this,"_stackElementBrand");$(this,"_enterPos");$(this,"_anchorPos");$(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=i,this.nameScopesList=l,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=s,this._anchorPos=r}equals(t){return t===null?!1:bt._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?us.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){bt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,l){return new bt(this,t,n,s,r,o,i,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var s,r;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(s=this.nameScopesList)==null?void 0:s.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new bt(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,s;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((s=this.contentNameScopesList)==null?void 0:s.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const s=us.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new bt(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,us.fromExtension(s,n.contentNameScopesList))}},$(bt,"NULL",new bt(null,0,0,0,!1,null,null,null)),bt),Ng=class{constructor(e,t){$(this,"balancedBracketScopes");$(this,"unbalancedBracketScopes");$(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):lr(n,ur).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>lr(n,ur).map(s=>s.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Og=class{constructor(e,t,n,s){$(this,"_emitBinaryTokens");$(this,"_lineText");$(this,"_tokens");$(this,"_binaryTokens");$(this,"_lastTokenEndIndex");$(this,"_tokenTypeOverrides");this.balancedBracketSelectors=s,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var s;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((s=this.balancedBracketSelectors)!=null&&s.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=(e==null?void 0:e.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(i)&&(r=Hn.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=Hn.set(r,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let s=0,r=this._binaryTokens.length;s<r;s++)n[s]=this._binaryTokens[s];return n}},Dg=class{constructor(e,t){$(this,"_grammars",new Map);$(this,"_rawGrammars",new Map);$(this,"_injectionGrammars",new Map);$(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,s,r){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,Lg(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},Bg=class{constructor(t){$(this,"_options");$(this,"_syncRegistry");$(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new Dg(ir.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(ir.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,s){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:s})}loadGrammarWithConfiguration(t,n,s){return this._loadGrammar(t,n,s.embeddedLanguages,s.tokenTypes,new Ng(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new hg(this._syncRegistry,t);for(;i.Q.length>0;)i.Q.map(l=>this._loadSingleGrammar(l.scopeName)),i.processQueue();return this._grammarForScopeName(t,n,s,r,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const s=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,s)}}addGrammar(t,n=[],s=0,r=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,s,r)}_grammarForScopeName(t,n=0,s=null,r=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,s,r,o)}},Ao=Ro.NULL;const zg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Is{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Is.prototype.normal={};Is.prototype.property={};Is.prototype.space=void 0;function Gc(e,t){const n={},s={};for(const r of e)Object.assign(n,r.property),Object.assign(s,r.normal);return new Is(n,s,t)}function Eo(e){return e.toLowerCase()}class dt{constructor(t,n){this.attribute=n,this.property=t}}dt.prototype.attribute="";dt.prototype.booleanish=!1;dt.prototype.boolean=!1;dt.prototype.commaOrSpaceSeparated=!1;dt.prototype.commaSeparated=!1;dt.prototype.defined=!1;dt.prototype.mustUseProperty=!1;dt.prototype.number=!1;dt.prototype.overloadedBoolean=!1;dt.prototype.property="";dt.prototype.spaceSeparated=!1;dt.prototype.space=void 0;let jg=0;const ue=An(),ze=An(),Io=An(),O=An(),Re=An(),xn=An(),pt=An();function An(){return 2**++jg}const Lo=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:ze,commaOrSpaceSeparated:pt,commaSeparated:xn,number:O,overloadedBoolean:Io,spaceSeparated:Re},Symbol.toStringTag,{value:"Module"})),Xr=Object.keys(Lo);class gi extends dt{constructor(t,n,s,r){let o=-1;if(super(t,n),Rl(this,"space",r),typeof s=="number")for(;++o<Xr.length;){const i=Xr[o];Rl(this,Xr[o],(s&Lo[i])===Lo[i])}}}gi.prototype.defined=!0;function Rl(e,t,n){n&&(e[t]=n)}function Wn(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new gi(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Eo(s)]=s,n[Eo(o.attribute)]=s}return new Is(t,n,e.space)}const Uc=Wn({properties:{ariaActiveDescendant:null,ariaAtomic:ze,ariaAutoComplete:null,ariaBusy:ze,ariaChecked:ze,ariaColCount:O,ariaColIndex:O,ariaColSpan:O,ariaControls:Re,ariaCurrent:null,ariaDescribedBy:Re,ariaDetails:null,ariaDisabled:ze,ariaDropEffect:Re,ariaErrorMessage:null,ariaExpanded:ze,ariaFlowTo:Re,ariaGrabbed:ze,ariaHasPopup:null,ariaHidden:ze,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Re,ariaLevel:O,ariaLive:null,ariaModal:ze,ariaMultiLine:ze,ariaMultiSelectable:ze,ariaOrientation:null,ariaOwns:Re,ariaPlaceholder:null,ariaPosInSet:O,ariaPressed:ze,ariaReadOnly:ze,ariaRelevant:null,ariaRequired:ze,ariaRoleDescription:Re,ariaRowCount:O,ariaRowIndex:O,ariaRowSpan:O,ariaSelected:ze,ariaSetSize:O,ariaSort:null,ariaValueMax:O,ariaValueMin:O,ariaValueNow:O,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Hc(e,t){return t in e?e[t]:t}function Wc(e,t){return Hc(e,t.toLowerCase())}const Fg=Wn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xn,acceptCharset:Re,accessKey:Re,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alpha:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:Re,autoFocus:ue,autoPlay:ue,blocking:Re,capture:null,charSet:null,checked:ue,cite:null,className:Re,closedBy:null,colorSpace:null,cols:O,colSpan:O,command:null,commandFor:null,content:null,contentEditable:ze,controls:ue,controlsList:Re,coords:O|xn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:Io,draggable:ze,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:Re,height:O,hidden:Io,high:O,href:null,hrefLang:null,htmlFor:Re,httpEquiv:Re,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:Re,itemRef:Re,itemScope:ue,itemType:Re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:O,manifest:null,max:null,maxLength:O,media:null,method:null,min:null,minLength:O,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:O,pattern:null,ping:Re,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:Re,required:ue,reversed:ue,rows:O,rowSpan:O,sandbox:Re,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootCustomElementRegistry:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shadowRootSerializable:ue,shape:null,size:O,sizes:null,slot:null,span:O,spellCheck:ze,src:null,srcDoc:null,srcLang:null,srcSet:null,start:O,step:null,style:null,tabIndex:O,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:ze,width:O,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Re,axis:null,background:null,bgColor:null,border:O,borderColor:null,bottomMargin:O,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:O,leftMargin:O,link:null,longDesc:null,lowSrc:null,marginHeight:O,marginWidth:O,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:O,rules:null,scheme:null,scrolling:ze,standby:null,summary:null,text:null,topMargin:O,valueType:null,version:null,vAlign:null,vLink:null,vSpace:O,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ue,disablePictureInPicture:ue,disableRemotePlayback:ue,exportParts:xn,part:Re,prefix:null,property:null,results:O,security:null,unselectable:null},space:"html",transform:Wc}),Gg=Wn({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:pt,accentHeight:O,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:O,amplitude:O,arabicForm:null,ascent:O,attributeName:null,attributeType:null,azimuth:O,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:O,by:null,calcMode:null,capHeight:O,className:Re,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:O,diffuseConstant:O,direction:null,display:null,dur:null,divisor:O,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:O,enableBackground:null,end:null,event:null,exponent:O,externalResourcesRequired:null,fill:null,fillOpacity:O,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:xn,g2:xn,glyphName:xn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:O,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:O,horizOriginX:O,horizOriginY:O,id:null,ideographic:O,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:O,k:O,k1:O,k2:O,k3:O,k4:O,kernelMatrix:pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:O,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:O,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:O,overlineThickness:O,paintOrder:null,panose1:null,path:null,pathLength:O,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:O,pointsAtY:O,pointsAtZ:O,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pt,rev:pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pt,requiredFeatures:pt,requiredFonts:pt,requiredFormats:pt,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:O,specularExponent:O,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:O,strikethroughThickness:O,string:null,stroke:null,strokeDashArray:pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:O,strokeOpacity:O,strokeWidth:null,style:null,surfaceScale:O,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pt,tabIndex:O,tableValues:null,target:null,targetX:O,targetY:O,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:O,underlineThickness:O,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:O,values:null,vAlphabetic:O,vMathematical:O,vectorEffect:null,vHanging:O,vIdeographic:O,version:null,vertAdvY:O,vertOriginX:O,vertOriginY:O,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:O,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hc}),qc=Wn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Vc=Wn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wc}),Kc=Wn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Ug=/[A-Z]/g,Al=/-[a-z]/g,Hg=/^data[-\w.:]+$/i;function Wg(e,t){const n=Eo(t);let s=t,r=dt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hg.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Al,Vg);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Al.test(o)){let i=o.replace(Ug,qg);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=gi}return new r(s,t)}function qg(e){return"-"+e.toLowerCase()}function Vg(e){return e.charAt(1).toUpperCase()}const Kg=Gc([Uc,Fg,qc,Vc,Kc],"html"),Zc=Gc([Uc,Gg,qc,Vc,Kc],"svg"),El={}.hasOwnProperty;function Zg(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&El.call(r,e)){const a=String(r[e]);i=El.call(l,a)?l[a]:s.unknown}if(i)return i.call(this,r,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const Yg=/["&'<>`]/g,Jg=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xg=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Qg=/[|\\{}()[\]^$+*?.]/g,Il=new WeakMap;function em(e,t){if(e=e.replace(t.subset?tm(t.subset):Yg,s),t.subset||t.escapeOnly)return e;return e.replace(Jg,n).replace(Xg,s);function n(r,o,i){return t.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,i.charCodeAt(o+2),t)}function s(r,o,i){return t.format(r.charCodeAt(0),i.charCodeAt(o+1),t)}}function tm(e){let t=Il.get(e);return t||(t=nm(e),Il.set(e,t)),t}function nm(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Qg,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const sm=/[\dA-Fa-f]/;function rm(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!sm.test(String.fromCharCode(t))?s:s+";"}const om=/\d/;function im(e,t,n){const s="&#"+String(e);return n&&t&&!om.test(String.fromCharCode(t))?s:s+";"}const lm=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],Qr={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},am=["cent","copy","divide","gt","lt","not","para","times"],Yc={}.hasOwnProperty,Po={};let Bs;for(Bs in Qr)Yc.call(Qr,Bs)&&(Po[Qr[Bs]]=Bs);const cm=/[^\dA-Za-z]/;function um(e,t,n,s){const r=String.fromCharCode(e);if(Yc.call(Po,r)){const o=Po[r],i="&"+o;return n&&lm.includes(o)&&!am.includes(o)&&(!s||t&&t!==61&&cm.test(String.fromCharCode(t)))?i:i+";"}return""}function fm(e,t,n){let s=rm(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=um(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=im(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function jn(e,t){return em(e,Object.assign({format:fm},t))}const dm=/^>|^->|<!--|-->|--!>|<!-$/g,hm=[">"],pm=["<",">"];function gm(e,t,n,s){return s.settings.bogusComments?"<?"+jn(e.value,Object.assign({},s.settings.characterReferences,{subset:hm}))+">":"<!--"+e.value.replace(dm,r)+"-->";function r(o){return jn(o,Object.assign({},s.settings.characterReferences,{subset:pm}))}}function mm(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function Ll(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let s=0,r=n.indexOf(t);for(;r!==-1;)s++,r=n.indexOf(t,r+t.length);return s}function vm(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function ym(e){return e.join(" ").trim()}const bm=/[ \t\n\f\r]/g;function mi(e){return typeof e=="object"?e.type==="text"?Pl(e.value):!1:Pl(e)}function Pl(e){return e.replace(bm,"")===""}const Ue=Xc(1),Jc=Xc(-1),km=[];function Xc(e){return t;function t(n,s,r){const o=n?n.children:km;let i=(s||0)+e,l=o[i];if(!r)for(;l&&mi(l);)i+=e,l=o[i];return l}}const _m={}.hasOwnProperty;function Qc(e){return t;function t(n,s,r){return _m.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const vi=Qc({body:Sm,caption:eo,colgroup:eo,dd:$m,dt:Tm,head:eo,html:wm,li:Cm,optgroup:Rm,option:Am,p:xm,rp:Ml,rt:Ml,tbody:Im,td:Nl,tfoot:Lm,th:Nl,thead:Em,tr:Pm});function eo(e,t,n){const s=Ue(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&mi(s.value.charAt(0)))}function wm(e,t,n){const s=Ue(n,t);return!s||s.type!=="comment"}function Sm(e,t,n){const s=Ue(n,t);return!s||s.type!=="comment"}function xm(e,t,n){const s=Ue(n,t);return s?s.type==="element"&&(s.tagName==="address"||s.tagName==="article"||s.tagName==="aside"||s.tagName==="blockquote"||s.tagName==="details"||s.tagName==="div"||s.tagName==="dl"||s.tagName==="fieldset"||s.tagName==="figcaption"||s.tagName==="figure"||s.tagName==="footer"||s.tagName==="form"||s.tagName==="h1"||s.tagName==="h2"||s.tagName==="h3"||s.tagName==="h4"||s.tagName==="h5"||s.tagName==="h6"||s.tagName==="header"||s.tagName==="hgroup"||s.tagName==="hr"||s.tagName==="main"||s.tagName==="menu"||s.tagName==="nav"||s.tagName==="ol"||s.tagName==="p"||s.tagName==="pre"||s.tagName==="section"||s.tagName==="table"||s.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function Cm(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&s.tagName==="li"}function Tm(e,t,n){const s=Ue(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function $m(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function Ml(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function Rm(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function Am(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function Em(e,t,n){const s=Ue(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function Im(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function Lm(e,t,n){return!Ue(n,t)}function Pm(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function Nl(e,t,n){const s=Ue(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const Mm=Qc({body:Dm,colgroup:Bm,head:Om,html:Nm,tbody:zm});function Nm(e){const t=Ue(e,-1);return!t||t.type!=="comment"}function Om(e){const t=new Set;for(const s of e.children)if(s.type==="element"&&(s.tagName==="base"||s.tagName==="title")){if(t.has(s.tagName))return!1;t.add(s.tagName)}const n=e.children[0];return!n||n.type==="element"}function Dm(e){const t=Ue(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&mi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function Bm(e,t,n){const s=Jc(n,t),r=Ue(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&vi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function zm(e,t,n){const s=Jc(n,t),r=Ue(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&vi(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const zs={name:[[`
|
|
77
|
+
\f\r &/=>`.split(""),`
|
|
78
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
79
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
80
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
81
|
+
\f\r &>`.split(""),`\0
|
|
82
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
83
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
84
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function jm(e,t,n,s){const r=s.schema,o=r.space==="svg"?!1:s.settings.omitOptionalTags;let i=r.space==="svg"?s.settings.closeEmptyElements:s.settings.voids.includes(e.tagName.toLowerCase());const l=[];let a;r.space==="html"&&e.tagName==="svg"&&(s.schema=Zc);const c=Fm(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!Mm(e,t,n))&&(l.push("<",e.tagName,c?" "+c:""),i&&(r.space==="svg"||s.settings.closeSelfClosing)&&(a=c.charAt(c.length-1),(!s.settings.tightSelfClosing||a==="/"||a&&a!=='"'&&a!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(u),!i&&(!o||!vi(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function Fm(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=Gm(e,r,t[r]);o&&n.push(o)}}for(;++s<n.length;){const o=e.settings.tightAttributes?n[s].charAt(n[s].length-1):void 0;s!==n.length-1&&o!=='"'&&o!=="'"&&(n[s]+=" ")}return n.join("")}function Gm(e,t,n){const s=Wg(e.schema,t),r=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let i=e.quote,l;if(s.overloadedBoolean&&(n===s.attribute||n==="")?n=!0:(s.boolean||s.overloadedBoolean)&&(typeof n!="string"||n===s.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const a=jn(s.attribute,Object.assign({},e.settings.characterReferences,{subset:zs.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?vm:ym)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=jn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:zs.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&Ll(n,i)>Ll(n,e.alternative)&&(i=e.alternative),l=i+jn(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?zs.single:zs.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const Um=["<","&"];function eu(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:jn(e.value,Object.assign({},s.settings.characterReferences,{subset:Um}))}function Hm(e,t,n,s){return s.settings.allowDangerousHtml?e.value:eu(e,t,n,s)}function Wm(e,t,n,s){return s.all(e)}const qm=Zg("type",{invalid:Vm,unknown:Km,handlers:{comment:gm,doctype:mm,element:jm,raw:Hm,root:Wm,text:eu}});function Vm(e){throw new Error("Expected node, not `"+e+"`")}function Km(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const Zm={},Ym={},Jm=[];function Xm(e,t){const n=t||Zm,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:Qm,all:ev,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||zg,characterReferences:n.characterReferences||Ym,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Zc:Kg,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function Qm(e,t,n){return qm(e,t,n,this)}function ev(e){const t=[],n=e&&e.children||Jm;let s=-1;for(;++s<n.length;)t[s]=this.one(n[s],s,e);return t.join("")}function fr(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},s=typeof e=="string"?e:e.name;for(const[r,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[r]=o:r===s&&Object.assign(n,o);return n}function cn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function tv(e){return Array.isArray(e)?e:[e]}async function tu(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function yi(e){return!e||["plaintext","txt","text","plain"].includes(e)}function nv(e){return e==="ansi"||yi(e)}function bi(e){return e==="none"}function sv(e){return bi(e)}function nu(e,t){var s;if(!t)return e;e.properties||(e.properties={}),(s=e.properties).class||(s.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function Lr(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let s=0;const r=[];for(let i=0;i<n.length;i+=2){const l=t?n[i]+(n[i+1]||""):n[i];r.push([l,s]),s+=n[i].length,s+=((o=n[i+1])==null?void 0:o.length)||0}return r}function rv(e){const t=Lr(e,!0).map(([r])=>r);function n(r){if(r===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=r,i=0;for(const l of t){if(o<l.length)break;o-=l.length,i++}return{line:i,character:o}}function s(r,o){let i=0;for(let l=0;l<r;l++)i+=t[l].length;return i+=o,i}return{lines:t,indexToPos:n,posToIndex:s}}const ki="light-dark()",ov=["color","background-color"];function iv(e,t){let n=0;const s=[];for(const r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s}function lv(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((s,r)=>s-r);return n.length?e.map(s=>s.flatMap(r=>{const o=n.filter(i=>r.offset<i&&i<r.offset+r.content.length).map(i=>i-r.offset).sort((i,l)=>i-l);return o.length?iv(r,o):r})):e}function av(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>dr(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,d)=>{const h=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[u]+(d==="color"?"":h)};return i.forEach((u,d)=>{for(const h of l){const p=u[h]||"inherit";if(d===0&&s&&ov.includes(h))if(s===ki&&i.length>1){const f=t.findIndex(S=>S==="light"),m=t.findIndex(S=>S==="dark");if(f===-1||m===-1)throw new We('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const b=i[f][h]||"inherit",v=i[m][h]||"inherit";a[h]=`light-dark(${b}, ${v})`,r==="css-vars"&&(a[c(d,h)]=p)}else a[h]=p;else r==="css-vars"&&(a[c(d,h)]=p)}}),o.htmlStyle=a,o}function dr(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&st.Italic&&(t["font-style"]="italic"),e.fontStyle&st.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&st.Underline&&n.push("underline"),e.fontStyle&st.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Mo(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const su=new WeakMap;function Pr(e,t){su.set(e,t)}function Ss(e){return su.get(e)}class qn{constructor(...t){$(this,"_stacks",{});$(this,"lang");if(t.length===2){const[n,s]=t;this.lang=s,this._stacks=n}else{const[n,s,r]=t;this.lang=s,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new qn(Object.fromEntries(tv(n).map(s=>[s,Ao])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return cv(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function cv(e){const t=[],n=new Set;function s(r){var i;if(n.has(r))return;n.add(r);const o=(i=r==null?void 0:r.nameScopesList)==null?void 0:i.scopeName;o&&t.push(o),r.parent&&s(r.parent)}return s(e),t}function uv(e,t){if(!(e instanceof qn))throw new We("Invalid grammar state");return e.getInternalStack(t)}function fv(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(i){if(typeof i=="number"){if(i<0||i>n.source.length)throw new We(`Invalid decoration offset: ${i}. Code length: ${n.source.length}`);return{...r.indexToPos(i),offset:i}}else{const l=r.lines[i.line];if(l===void 0)throw new We(`Invalid decoration position ${JSON.stringify(i)}. Lines length: ${r.lines.length}`);let a=i.character;if(a<0&&(a=l.length+a),a<0||a>l.length)throw new We(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=rv(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));dv(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var i;if(!((i=this.options.decorations)!=null&&i.length))return;const r=t(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return lv(n,r)},code(n){var u;if(!((u=this.options.decorations)!=null&&u.length))return;const s=t(this),r=Array.from(n.children).filter(d=>d.type==="element"&&d.tagName==="span");if(r.length!==s.converter.lines.length)throw new We(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${s.converter.lines.length}). Failed to apply decorations.`);function o(d,h,p,f){const m=r[d];let b="",v=-1,S=-1;if(h===0&&(v=0),p===0&&(S=0),p===Number.POSITIVE_INFINITY&&(S=m.children.length),v===-1||S===-1)for(let R=0;R<m.children.length;R++)b+=ru(m.children[R]),v===-1&&b.length===h&&(v=R+1),S===-1&&b.length===p&&(S=R+1);if(v===-1)throw new We(`Failed to find start index for decoration ${JSON.stringify(f.start)}`);if(S===-1)throw new We(`Failed to find end index for decoration ${JSON.stringify(f.end)}`);const x=m.children.slice(v,S);if(!f.alwaysWrap&&x.length===m.children.length)l(m,f,"line");else if(!f.alwaysWrap&&x.length===1&&x[0].type==="element")l(x[0],f,"token");else{const R={type:"element",tagName:"span",properties:{},children:x};l(R,f,"wrapper"),m.children.splice(v,x.length,R)}}function i(d,h){r[d]=l(r[d],h,"line")}function l(d,h,p){var b;const f=h.properties||{},m=h.transform||(v=>v);return d.tagName=h.tagName||"span",d.properties={...d.properties,...f,class:d.properties.class},(b=h.properties)!=null&&b.class&&nu(d,h.properties.class),d=m(d,p)||d,d}const a=[],c=s.decorations.sort((d,h)=>h.start.offset-d.start.offset||d.end.offset-h.end.offset);for(const d of c){const{start:h,end:p}=d;if(h.line===p.line)o(h.line,h.character,p.character,d);else if(h.line<p.line){o(h.line,h.character,Number.POSITIVE_INFINITY,d);for(let f=h.line+1;f<p.line;f++)a.unshift(()=>i(f,d));o(p.line,0,p.character,d)}}a.forEach(d=>d())}}}function dv(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new We(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let s=t+1;s<e.length;s++){const r=e[s],o=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,i=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,l=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,a=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(o||i||l||a){if(o&&i||l&&a||l&&n.start.offset===n.end.offset||i&&r.start.offset===r.end.offset)continue;throw new We(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function ru(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(ru).join(""):""}const hv=[fv()];function hr(e){const t=pv(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...hv]}function pv(e){const t=[],n=[],s=[];for(const r of e)switch(r.enforce){case"pre":t.push(r);break;case"post":n.push(r);break;default:s.push(r)}return{pre:t,post:n,normal:s}}var kn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],to={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function gv(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const s=e.indexOf("m",n);if(s!==-1)return{sequence:e.substring(n+2,s).split(";"),startPosition:n,position:s+1}}return{position:e.length}}function Ol(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(s=>Number.parseInt(s));return n.length!==3||n.some(s=>Number.isNaN(s))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function mv(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const s=Number.parseInt(n);if(!Number.isNaN(s))if(s===0)t.push({type:"resetAll"});else if(s<=9)to[s]&&t.push({type:"setDecoration",value:to[s]});else if(s<=29){const r=to[s-20];r&&(t.push({type:"resetDecoration",value:r}),r==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(s<=37)t.push({type:"setForegroundColor",value:{type:"named",name:kn[s-30]}});else if(s===38){const r=Ol(e);r&&t.push({type:"setForegroundColor",value:r})}else if(s===39)t.push({type:"resetForegroundColor"});else if(s<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:kn[s-40]}});else if(s===48){const r=Ol(e);r&&t.push({type:"setBackgroundColor",value:r})}else s===49?t.push({type:"resetBackgroundColor"}):s===53?t.push({type:"setDecoration",value:"overline"}):s===55?t.push({type:"resetDecoration",value:"overline"}):s>=90&&s<=97?t.push({type:"setForegroundColor",value:{type:"named",name:kn[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:kn[s-100+8]}})}return t}function vv(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=gv(s,o),l=i.sequence?s.substring(o,i.startPosition):s.substring(o);if(l.length>0&&r.push({value:l,foreground:e,background:t,decorations:new Set(n)}),i.sequence){const a=mv(i.sequence);for(const c of a)c.type==="resetAll"?(e=null,t=null,n.clear()):c.type==="resetForegroundColor"?e=null:c.type==="resetBackgroundColor"?t=null:c.type==="resetDecoration"&&n.delete(c.value);for(const c of a)c.type==="setForegroundColor"?e=c.value:c.type==="setBackgroundColor"?t=c.value:c.type==="setDecoration"&&n.add(c.value)}o=i.position}while(o<s.length);return r}}}var yv={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function bv(e=yv){function t(l){return e[l]}function n(l){return`#${l.map(a=>Math.max(0,Math.min(a,255)).toString(16).padStart(2,"0")).join("")}`}let s;function r(){if(s)return s;s=[];for(let c=0;c<kn.length;c++)s.push(t(kn[c]));let l=[0,95,135,175,215,255];for(let c=0;c<6;c++)for(let u=0;u<6;u++)for(let d=0;d<6;d++)s.push(n([l[c],l[u],l[d]]));let a=8;for(let c=0;c<24;c++,a+=10)s.push(n([a,a,a]));return s}function o(l){return r()[l]}function i(l){switch(l.type){case"named":return t(l.name);case"rgb":return n(l.rgb);case"table":return o(l.index)}}return{value:i}}const kv={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function _v(e,t,n){const s=fr(e,n),r=Lr(t),o=Object.fromEntries(kn.map(a=>{var d;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(d=e.colors)==null?void 0:d[c];return[a,u||kv[a]]})),i=bv(o),l=vv();return r.map(a=>l.parse(a[0]).map(c=>{let u,d;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,d=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,d=c.background?i.value(c.background):void 0),u=cn(u,s),d=cn(d,s),c.decorations.has("dim")&&(u=wv(u));let h=st.None;return c.decorations.has("bold")&&(h|=st.Bold),c.decorations.has("italic")&&(h|=st.Italic),c.decorations.has("underline")&&(h|=st.Underline),c.decorations.has("strikethrough")&&(h|=st.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:d,fontStyle:h}}))}function wv(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const s=t[1];if(s.length===8){const r=Math.round(Number.parseInt(s.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${s.slice(0,6)}${r}`}else{if(s.length===6)return`#${s}80`;if(s.length===4){const r=s[0],o=s[1],i=s[2],l=s[3],a=Math.round(Number.parseInt(`${l}${l}`,16)/2).toString(16).padStart(2,"0");return`#${r}${r}${o}${o}${i}${i}${a}`}else if(s.length===3){const r=s[0],o=s[1],i=s[2];return`#${r}${r}${o}${o}${i}${i}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function _i(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(yi(r)||bi(s))return Lr(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return _v(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new We(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new We(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return xv(t,l,o,i,n)}function Sv(...e){if(e.length===2)return Ss(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(yi(r)||bi(o))throw new We("Plain language does not have grammar state");if(r==="ansi")throw new We("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new qn(wi(n,a,i,l,s).stateStack,a.name,i.name)}function xv(e,t,n,s,r){const o=wi(e,t,n,s,r),i=new qn(o.stateStack,t.name,n.name);return Pr(o.tokens,i),o.tokens}function wi(e,t,n,s,r){const o=fr(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=Lr(e);let c=r.grammarState?uv(r.grammarState,n.name)??Ao:r.grammarContextCode!=null?wi(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Ao,u=[];const d=[];for(let h=0,p=a.length;h<p;h++){const[f,m]=a[h];if(f===""){u=[],d.push([]);continue}if(i>0&&f.length>=i){u=[],d.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}let b,v,S;r.includeExplanation&&(b=t.tokenizeLine(f,c,l),v=b.tokens,S=0);const x=t.tokenizeLine2(f,c,l),R=x.tokens.length/2;for(let U=0;U<R;U++){const Y=x.tokens[2*U],D=U+1<R?x.tokens[2*U+2]:f.length;if(Y===D)continue;const le=x.tokens[2*U+1],G=cn(s[Hn.getForeground(le)],o),ne=Hn.getFontStyle(le),se={content:f.substring(Y,D),offset:m+Y,color:G,fontStyle:ne};if(r.includeExplanation){const j=[];if(r.includeExplanation!=="scopeName")for(const he of n.settings){let pe;switch(typeof he.scope){case"string":pe=he.scope.split(/,/).map(de=>de.trim());break;case"object":pe=he.scope;break;default:continue}j.push({settings:he,selectors:pe.map(de=>de.split(/ /))})}se.explanation=[];let ce=0;for(;Y+ce<D;){const he=v[S],pe=f.substring(he.startIndex,he.endIndex);ce+=pe.length,se.explanation.push({content:pe,scopes:r.includeExplanation==="scopeName"?Cv(he.scopes):Tv(j,he.scopes)}),S+=1}}u.push(se)}d.push(u),u=[],c=x.ruleStack}return{tokens:d,stateStack:c}}function Cv(e){return e.map(t=>({scopeName:t}))}function Tv(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:Rv(e,o,t.slice(0,s))}}return n}function Dl(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function $v(e,t,n){if(!Dl(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)Dl(e[s],n[r])&&(s-=1),r-=1;return s===-1}function Rv(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if($v(i,t,n)){s.push(o);break}return s}function ou(e,t,n){const s=Object.entries(n.themes).filter(a=>a[1]).map(a=>({color:a[0],theme:a[1]})),r=s.map(a=>{const c=_i(e,t,{...n,theme:a.theme}),u=Ss(c),d=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:d}}),o=Av(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,d)=>{const h={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=u.explanation),o.forEach((p,f)=>{const{content:m,explanation:b,offset:v,...S}=p[c][d];h.variants[s[f].color]=S}),h})),l=r[0].state?new qn(Object.fromEntries(r.map(a=>{var c;return[a.theme,(c=a.state)==null?void 0:c.getInternalStack(a.theme)]})),r[0].state.lang):void 0;return l&&Pr(i,l),i}function Av(...e){const t=e.map(()=>[]),n=e.length;for(let s=0;s<e[0].length;s++){const r=e.map(a=>a[s]),o=t.map(()=>[]);t.forEach((a,c)=>a.push(o[c]));const i=r.map(()=>0),l=r.map(a=>a[0]);for(;l.every(a=>a);){const a=Math.min(...l.map(c=>c.content.length));for(let c=0;c<n;c++){const u=l[c];u.content.length===a?(o[c].push(u),i[c]+=1,l[c]=r[c][i[c]]):(o[c].push({...u,content:u.content.slice(0,a)}),l[c]={...u,content:u.content.slice(a),offset:u.offset+a})}}}return t}function pr(e,t,n){let s,r,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,h=Object.entries(n.themes).filter(v=>v[1]).map(v=>({color:v[0],theme:v[1]})).sort((v,S)=>v.color===c?-1:S.color===c?1:0);if(h.length===0)throw new We("`themes` option must not be empty");const p=ou(e,t,n);if(a=Ss(p),c&&ki!==c&&!h.find(v=>v.color===c))throw new We(`\`themes\` option must contain the defaultColor key \`${c}\``);const f=h.map(v=>e.getTheme(v.theme)),m=h.map(v=>v.color);o=p.map(v=>v.map(S=>av(S,m,u,c,d))),a&&Pr(o,a);const b=h.map(v=>fr(v.theme,n));r=Bl(h,f,b,u,c,"fg",d),s=Bl(h,f,b,u,c,"bg",d),i=`shiki-themes ${f.map(v=>v.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=fr(n.theme,n);o=_i(e,t,n);const u=e.getTheme(n.theme);s=cn(u.bg,c),r=cn(u.fg,c),i=u.name,a=Ss(o)}else throw new We("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function Bl(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=cn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===ki&&e.length>1){const d=e.findIndex(m=>m.color==="light"),h=e.findIndex(m=>m.color==="dark");if(d===-1||h===-1)throw new We('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=cn(t[d][o],n[d])||"inherit",f=cn(t[h][o],n[h])||"inherit";return`light-dark(${p}, ${f});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function gr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>gr(e,r,o),codeToTokens:(r,o)=>pr(e,r,o)}){var f,m;let r=t;for(const b of hr(n))r=((f=b.preprocess)==null?void 0:f.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=pr(e,r,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:h=!1}=n;d===!0?o=Iv(o):d==="never"&&(o=Lv(o)),h&&(o=Pv(o));const p={...s,get source(){return r}};for(const b of hr(n))o=((m=b.tokens)==null?void 0:m.call(p,o))||o;return Ev(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},p,u)}function Ev(e,t,n,s=Ss(e)){var m,b,v,S;const r=hr(t),o=[],i={type:"root",children:[]},{structure:l="classic",tabindex:a="0"}=t,c={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),a!==!1&&a!=null&&(c.tabindex=a.toString());for(const[x,R]of Object.entries(t.meta||{}))x.startsWith("_")||(c[x]=R);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:o};const h=[],p={...n,structure:l,addClassToHast:nu,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return i},get pre(){return u},get code(){return d},get lines(){return h}};if(e.forEach((x,R)=>{var D,le;R&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
85
|
+
`}));let U={type:"element",tagName:"span",properties:{class:"line"},children:[]},Y=0;for(const G of x){let ne={type:"element",tagName:"span",properties:{...G.htmlAttrs},children:[{type:"text",value:G.content}]};const se=Mo(G.htmlStyle||dr(G));se&&(ne.properties.style=se);for(const j of r)ne=((D=j==null?void 0:j.span)==null?void 0:D.call(p,ne,R+1,Y,U,G))||ne;l==="inline"?i.children.push(ne):l==="classic"&&U.children.push(ne),Y+=G.content.length}if(l==="classic"){for(const G of r)U=((le=G==null?void 0:G.line)==null?void 0:le.call(p,U,R+1))||U;h.push(U),o.push(U)}else l==="inline"&&h.push(U)}),l==="classic"){for(const x of r)d=((m=x==null?void 0:x.code)==null?void 0:m.call(p,d))||d;u.children.push(d);for(const x of r)u=((b=x==null?void 0:x.pre)==null?void 0:b.call(p,u))||u;i.children.push(u)}else if(l==="inline"){const x=[];let R={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const D of i.children)D.type==="element"&&D.tagName==="br"?(x.push(R),R={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(D.type==="element"||D.type==="text")&&R.children.push(D);x.push(R);let Y={type:"element",tagName:"code",properties:{},children:x};for(const D of r)Y=((v=D==null?void 0:D.code)==null?void 0:v.call(p,Y))||Y;i.children=[];for(let D=0;D<Y.children.length;D++){D>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const le=Y.children[D];le.type==="element"&&i.children.push(...le.children)}}let f=i;for(const x of r)f=((S=x==null?void 0:x.root)==null?void 0:S.call(p,f))||f;return s&&Pr(f,s),f}function Iv(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&st.Underline||o.fontStyle&st.Strikethrough));a&&o.content.match(/^\s+$/)&&t[i+1]?(r===void 0&&(r=o.offset),s+=o.content):s?(a?n.push({...o,offset:r,content:s+o.content}):n.push({content:s,offset:r},o),r=void 0,s=""):n.push(o)}),n})}function Lv(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const s=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!s)return n;const[,r,o,i]=s;if(!r&&!i)return n;const l=[{...n,offset:n.offset+r.length,content:o}];return r&&l.unshift({content:r,offset:n.offset}),i&&l.push({content:i,offset:n.offset+r.length+o.length}),l}))}function Pv(e){return e.map(t=>{const n=[];for(const s of t){if(n.length===0){n.push({...s});continue}const r=n[n.length-1],o=Mo(r.htmlStyle||dr(r)),i=Mo(s.htmlStyle||dr(s)),l=r.fontStyle&&(r.fontStyle&st.Underline||r.fontStyle&st.Strikethrough),a=s.fontStyle&&(s.fontStyle&st.Underline||s.fontStyle&st.Strikethrough);!l&&!a&&o===i?r.content+=s.content:n.push({...s})}return n})}const Mv=Xm;function Nv(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>gr(e,i,l),codeToTokens:(i,l)=>pr(e,i,l)};let r=Mv(gr(e,t,n,s));for(const i of hr(n))r=((o=i.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const zl={light:"#333333",dark:"#bbbbbb"},jl={light:"#fffffe",dark:"#1e1e1e"},Fl="__shiki_resolved";function Si(e){var l,a,c,u,d;if(e!=null&&e[Fl])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:s}=t;if(!n||!s){const h=t.settings?t.settings.find(p=>!p.name&&!p.scope):void 0;(l=h==null?void 0:h.settings)!=null&&l.foreground&&(s=h.settings.foreground),(a=h==null?void 0:h.settings)!=null&&a.background&&(n=h.settings.background),!s&&((c=t==null?void 0:t.colors)!=null&&c["editor.foreground"])&&(s=t.colors["editor.foreground"]),!n&&((u=t==null?void 0:t.colors)!=null&&u["editor.background"])&&(n=t.colors["editor.background"]),s||(s=t.type==="light"?zl.light:zl.dark),n||(n=t.type==="light"?jl.light:jl.dark),t.fg=s,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let r=0;const o=new Map;function i(h){var f;if(o.has(h))return o.get(h);r+=1;const p=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(f=t.colorReplacements)!=null&&f[`#${p}`]?i(h):(o.set(h,p),p)}t.settings=t.settings.map(h=>{var b,v;const p=((b=h.settings)==null?void 0:b.foreground)&&!h.settings.foreground.startsWith("#"),f=((v=h.settings)==null?void 0:v.background)&&!h.settings.background.startsWith("#");if(!p&&!f)return h;const m={...h,settings:{...h.settings}};if(p){const S=i(h.settings.foreground);t.colorReplacements[S]=h.settings.foreground,m.settings.foreground=S}if(f){const S=i(h.settings.background);t.colorReplacements[S]=h.settings.background,m.settings.background=S}return m});for(const h of Object.keys(t.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!((d=t.colors[h])!=null&&d.startsWith("#"))){const p=i(t.colors[h]);t.colorReplacements[p]=t.colors[h],t.colors[h]=p}return Object.defineProperty(t,Fl,{enumerable:!1,writable:!1,value:!0}),t}async function iu(e){return Array.from(new Set((await Promise.all(e.filter(t=>!nv(t)).map(async t=>await tu(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function lu(e){return(await Promise.all(e.map(async n=>sv(n)?null:Si(await tu(n))))).filter(n=>!!n)}let Ov=3;function Dv(e,t=3){t>Ov||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Pn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function au(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Pn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class Bv extends Bg{constructor(n,s,r,o={}){super(n);$(this,"_resolvedThemes",new Map);$(this,"_resolvedGrammars",new Map);$(this,"_langMap",new Map);$(this,"_langGraph",new Map);$(this,"_textmateThemeCache",new WeakMap);$(this,"_loadedThemesCache",null);$(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=s,this._langs=r,this._alias=o,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const s=Si(n);return s.name&&(this._resolvedThemes.set(s.name,s),this._loadedThemesCache=null),s}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let s=this._textmateThemeCache.get(n);s||(s=ir.createFromRawTheme(n),this._textmateThemeCache.set(n,s)),this._syncRegistry.setTheme(s)}getGrammar(n){return n=au(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var i,l,a,c;if(this.getGrammar(n.name))return;const s=new Set([...this._langMap.values()].filter(u=>{var d;return(d=u.embeddedLangsLazy)==null?void 0:d.includes(n.name)}));this._resolver.addLanguage(n);const r={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,r);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(u=>{this._alias[u]=n.name}),this._loadedLanguagesCache=null,s.size)for(const u of s)this._resolvedGrammars.delete(u.name),this._loadedLanguagesCache=null,(l=(i=this._syncRegistry)==null?void 0:i._injectionGrammars)==null||l.delete(u.scopeName),(c=(a=this._syncRegistry)==null?void 0:a._grammars)==null||c.delete(u.scopeName),this.loadLanguage(this._langMap.get(u.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const s=Array.from(this._langGraph.entries()),r=s.filter(([o,i])=>!i);if(r.length){const o=s.filter(([i,l])=>{if(!l)return!1;const a=l.embeddedLanguages||l.embeddedLangs;return a==null?void 0:a.some(c=>r.map(([u])=>u).includes(c))}).filter(i=>!r.includes(i));throw new Pn(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${o.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[o,i]of s)this._resolver.addLanguage(i);for(const[o,i]of s)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const s=n.embeddedLanguages??n.embeddedLangs;if(s)for(const r of s)this._langGraph.set(r,this._langMap.get(r))}}class zv{constructor(t,n){$(this,"_langs",new Map);$(this,"_scopeToLang",new Map);$(this,"_injections",new Map);$(this,"_onigLib");this._onigLib={createOnigScanner:s=>t.createScanner(s),createOnigString:s=>t.createString(s)},n.forEach(s=>this.addLanguage(s))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let s=[];for(let r=1;r<=n.length;r++){const o=n.slice(0,r).join(".");s=[...s,...this._injections.get(o)||[]]}return s}}let Xn=0;function jv(e){Xn+=1,e.warnings!==!1&&Xn>=10&&Xn%10===0&&console.warn(`[Shiki] ${Xn} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Pn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(Si),r=new zv(e.engine,n),o=new Bv(r,s,n,e.langAlias);let i;function l(x){return au(x,e.langAlias)}function a(x){v();const R=o.getGrammar(typeof x=="string"?x:x.name);if(!R)throw new Pn(`Language \`${x}\` not found, you may need to load it first`);return R}function c(x){if(x==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};v();const R=o.getTheme(x);if(!R)throw new Pn(`Theme \`${x}\` not found, you may need to load it first`);return R}function u(x){v();const R=c(x);i!==x&&(o.setTheme(R),i=x);const U=o.getColorMap();return{theme:R,colorMap:U}}function d(){return v(),o.getLoadedThemes()}function h(){return v(),o.getLoadedLanguages()}function p(...x){v(),o.loadLanguages(x.flat(1))}async function f(...x){return p(await iu(x))}function m(...x){v();for(const R of x.flat(1))o.loadTheme(R)}async function b(...x){return v(),m(await lu(x))}function v(){if(t)throw new Pn("Shiki instance has been disposed")}function S(){t||(t=!0,o.dispose(),Xn-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:d,getLoadedLanguages:h,resolveLangAlias:l,loadLanguage:f,loadLanguageSync:p,loadTheme:b,loadThemeSync:m,dispose:S,[Symbol.dispose]:S}}async function Fv(e){e.engine||Dv("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,s]=await Promise.all([lu(e.themes||[]),iu(e.langs||[]),e.engine]);return jv({...e,themes:t,langs:n,engine:s})}async function Gv(e){const t=await Fv(e);return{getLastGrammarState:(...n)=>Sv(t,...n),codeToTokensBase:(n,s)=>_i(t,n,s),codeToTokensWithThemes:(n,s)=>ou(t,n,s),codeToTokens:(n,s)=>pr(t,n,s),codeToHast:(n,s)=>gr(t,n,s),codeToHtml:(n,s)=>Nv(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}class xi extends Error{constructor(t){super(t),this.name="ShikiError"}}function Uv(){return 2147483648}function Hv(){return typeof performance<"u"?performance.now():Date.now()}const Wv=(e,t)=>e+(t-e%t)%t;async function qv(e){let t,n;const s={};function r(p){n=p,s.HEAPU8=new Uint8Array(p),s.HEAPU32=new Uint32Array(p)}function o(p,f,m){s.HEAPU8.copyWithin(p,f,f+m)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}function l(p){const f=s.HEAPU8.length;p=p>>>0;const m=Uv();if(p>m)return!1;for(let b=1;b<=4;b*=2){let v=f*(1+.2/b);v=Math.min(v,p+100663296);const S=Math.min(m,Wv(Math.max(p,v),65536));if(i(S))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,f,m=1024){const b=f+m;let v=f;for(;p[v]&&!(v>=b);)++v;if(v-f>16&&p.buffer&&a)return a.decode(p.subarray(f,v));let S="";for(;f<v;){let x=p[f++];if(!(x&128)){S+=String.fromCharCode(x);continue}const R=p[f++]&63;if((x&224)===192){S+=String.fromCharCode((x&31)<<6|R);continue}const U=p[f++]&63;if((x&240)===224?x=(x&15)<<12|R<<6|U:x=(x&7)<<18|R<<12|U<<6|p[f++]&63,x<65536)S+=String.fromCharCode(x);else{const Y=x-65536;S+=String.fromCharCode(55296|Y>>10,56320|Y&1023)}}return S}function u(p,f){return p?c(s.HEAPU8,p,f):""}const d={emscripten_get_now:Hv,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function h(){const f=await e({env:d,wasi_snapshot_preview1:d});t=f.memory,r(t.buffer),Object.assign(s,f),s.UTF8ToString=u}return await h(),s}var Vv=Object.defineProperty,Kv=(e,t,n)=>t in e?Vv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ge=(e,t,n)=>Kv(e,typeof t!="symbol"?t+"":t,n);let He=null;function Zv(e){throw new xi(e.UTF8ToString(e.getLastOnigError()))}class Mr{constructor(t){Ge(this,"utf16Length"),Ge(this,"utf8Length"),Ge(this,"utf16Value"),Ge(this,"utf8Value"),Ge(this,"utf16OffsetToUtf8"),Ge(this,"utf8OffsetToUtf16");const n=t.length,s=Mr._utf8ByteLength(t),r=s!==n,o=r?new Uint32Array(n+1):null;r&&(o[n]=s);const i=r?new Uint32Array(s+1):null;r&&(i[s]=n);const l=new Uint8Array(s);let a=0;for(let c=0;c<n;c++){const u=t.charCodeAt(c);let d=u,h=!1;if(u>=55296&&u<=56319&&c+1<n){const p=t.charCodeAt(c+1);p>=56320&&p<=57343&&(d=(u-55296<<10)+65536|p-56320,h=!0)}r&&(o[c]=a,h&&(o[c+1]=a),d<=127?i[a+0]=c:d<=2047?(i[a+0]=c,i[a+1]=c):d<=65535?(i[a+0]=c,i[a+1]=c,i[a+2]=c):(i[a+0]=c,i[a+1]=c,i[a+2]=c,i[a+3]=c)),d<=127?l[a++]=d:d<=2047?(l[a++]=192|(d&1984)>>>6,l[a++]=128|(d&63)>>>0):d<=65535?(l[a++]=224|(d&61440)>>>12,l[a++]=128|(d&4032)>>>6,l[a++]=128|(d&63)>>>0):(l[a++]=240|(d&1835008)>>>18,l[a++]=128|(d&258048)>>>12,l[a++]=128|(d&4032)>>>6,l[a++]=128|(d&63)>>>0),h&&c++}this.utf16Length=n,this.utf8Length=s,this.utf16Value=t,this.utf8Value=l,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=i}static _utf8ByteLength(t){let n=0;for(let s=0,r=t.length;s<r;s++){const o=t.charCodeAt(s);let i=o,l=!1;if(o>=55296&&o<=56319&&s+1<r){const a=t.charCodeAt(s+1);a>=56320&&a<=57343&&(i=(o-55296<<10)+65536|a-56320,l=!0)}i<=127?n+=1:i<=2047?n+=2:i<=65535?n+=3:n+=4,l&&s++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const Nr=class Nt{constructor(t){if(Ge(this,"id",++Nt.LAST_ID),Ge(this,"_onigBinding"),Ge(this,"content"),Ge(this,"utf16Length"),Ge(this,"utf8Length"),Ge(this,"utf16OffsetToUtf8"),Ge(this,"utf8OffsetToUtf16"),Ge(this,"ptr"),!He)throw new xi("Must invoke loadWasm first.");this._onigBinding=He,this.content=t;const n=new Mr(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Nt._sharedPtrInUse?(Nt._sharedPtr||(Nt._sharedPtr=He.omalloc(1e4)),Nt._sharedPtrInUse=!0,He.HEAPU8.set(n.utf8Value,Nt._sharedPtr),this.ptr=Nt._sharedPtr):this.ptr=n.createString(He)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Nt._sharedPtr?Nt._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ge(Nr,"LAST_ID",0);Ge(Nr,"_sharedPtr",0);Ge(Nr,"_sharedPtrInUse",!1);let cu=Nr;class Yv{constructor(t){if(Ge(this,"_onigBinding"),Ge(this,"_ptr"),!He)throw new xi("Must invoke loadWasm first.");const n=[],s=[];for(let l=0,a=t.length;l<a;l++){const c=new Mr(t[l]);n[l]=c.createString(He),s[l]=c.utf8Length}const r=He.omalloc(4*t.length);He.HEAPU32.set(n,r/4);const o=He.omalloc(4*t.length);He.HEAPU32.set(s,o/4);const i=He.createOnigScanner(r,o,t.length);for(let l=0,a=t.length;l<a;l++)He.ofree(n[l]);He.ofree(o),He.ofree(r),i===0&&Zv(He),this._onigBinding=He,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,s){let r=0;if(typeof s=="number"&&(r=s),typeof t=="string"){t=new cu(t);const o=this._findNextMatchSync(t,n,!1,r);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,r)}_findNextMatchSync(t,n,s,r){const o=this._onigBinding,i=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),r);if(i===0)return null;const l=o.HEAPU32;let a=i/4;const c=l[a++],u=l[a++],d=[];for(let h=0;h<u;h++){const p=t.convertUtf8OffsetToUtf16(l[a++]),f=t.convertUtf8OffsetToUtf16(l[a++]);d[h]={start:p,end:f,length:f-p}}return{index:c,captureIndices:d}}}function Jv(e){return typeof e.instantiator=="function"}function Xv(e){return typeof e.default=="function"}function Qv(e){return typeof e.data<"u"}function ey(e){return typeof Response<"u"&&e instanceof Response}function ty(e){var t;return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&((t=Buffer.isBuffer)==null?void 0:t.call(Buffer,e))||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let js;function ny(e){if(js)return js;async function t(){He=await qv(async n=>{let s=e;return s=await s,typeof s=="function"&&(s=await s(n)),typeof s=="function"&&(s=await s(n)),Jv(s)?s=await s.instantiator(n):Xv(s)?s=await s.default(n):(Qv(s)&&(s=s.data),ey(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await sy(s)(n):s=await ry(s)(n):ty(s)?s=await no(s)(n):s instanceof WebAssembly.Module?s=await no(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await no(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return js=t(),js}function no(e){return t=>WebAssembly.instantiate(e,t)}function sy(e){return t=>WebAssembly.instantiateStreaming(e,t)}function ry(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function oy(e){return e&&await ny(e),{createScanner(t){return new Yv(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new cu(t)}}}const iy={class:"code-block"},ly={class:"code-header"},ay={class:"code-lang"},cy=["innerHTML"],uy=Te({__name:"CodeBlock",props:{code:{},lang:{}},setup(e){const t=e,n=_t("effectiveTheme",K("dark")),s=K(""),r=K(!1);let o=null;async function i(){if(o)return o;const[u,d,h,p,f,m,b,v,S,x,R,U]=await Promise.all([ht(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),ht(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),ht(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url),ht(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url),ht(()=>import("./python-B6aJPvgy.js"),[],import.meta.url),ht(()=>import("./bash-Yzrsuije.js"),[],import.meta.url),ht(()=>import("./json-Cp-IABpG.js"),[],import.meta.url),ht(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url),ht(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2]),import.meta.url),ht(()=>import("./css-DPfMkruS.js"),[],import.meta.url),ht(()=>import("./vue-DVfSmUF7.js"),__vite__mapDeps([3,2,1,4,5,0]),import.meta.url),ht(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url)]);return o=await Gv({themes:[u.default,d.default],langs:[h.default,p.default,f.default,m.default,b.default,v.default,S.default,x.default,R.default,U.default],engine:oy(()=>ht(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),o}async function l(){var f;const u=((f=t.lang)==null?void 0:f.toLowerCase())??"text",h=new Set(["javascript","typescript","python","bash","shell","json","yaml","html","css","vue","diff"]).has(u)?u:u==="js"?"javascript":u==="ts"?"typescript":u==="py"?"python":u==="sh"?"bash":"text",p=n.value==="light"?"github-light":"github-dark";try{const m=await i();s.value=m.codeToHtml(t.code,{lang:h,theme:p})}catch{s.value=`<pre class="shiki-fallback"><code>${a(t.code)}</code></pre>`}}function a(u){return u.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">")}function c(){navigator.clipboard.writeText(t.code).then(()=>{r.value=!0,setTimeout(()=>r.value=!1,1500)})}return je(()=>[t.code,t.lang,n.value],()=>l(),{immediate:!0}),(u,d)=>(_(),C("div",iy,[g("div",ly,[g("span",ay,I(e.lang||"text"),1),g("button",{class:"code-copy",onClick:c},I(r.value?"已复制":"复制"),1)]),g("div",{class:"code-content",innerHTML:s.value},null,8,cy)]))}}),fy=$e(uy,[["__scopeId","data-v-84cb424e"]]),dy=Te({props:{content:{type:String,required:!0}},setup(e){const t=Z(()=>Ce.lexer(e.content).flatMap(s=>No(s)));return()=>ft("div",{class:"markdown-body"},t.value)}});function No(e){switch(e.type){case"paragraph":return[ft("p",{class:"md-p"},Fn(e.tokens))];case"heading":return[ft(`h${e.depth}`,{class:`md-h${e.depth}`},Fn(e.tokens))];case"code":return[ft(fy,{code:e.text,lang:e.lang??"text"})];case"blockquote":return[ft("blockquote",{class:"md-blockquote"},e.tokens.flatMap(t=>No(t)))];case"list":{const t=e.items.map(n=>ft("li",{class:"md-li"},n.tokens.flatMap(s=>No(s))));return[ft(e.ordered?"ol":"ul",{class:e.ordered?"md-ol":"md-ul"},t)]}case"hr":return[ft("hr",{class:"md-hr"})];case"space":return[];case"text":return[ft("span",{class:"md-text"},e.tokens?Fn(e.tokens):e.text)];default:return[]}}function Fn(e){return e.map(t=>{switch(t.type){case"text":return t.text;case"codespan":return ft("code",{class:"md-code"},t.text);case"strong":return ft("strong",{class:"md-strong"},Fn(t.tokens));case"em":return ft("em",{class:"md-em"},Fn(t.tokens));case"link":{const n=t.href;return n&&!/^(https?:|mailto:|#|\/)/i.test(n)?t.raw??"":ft("a",{class:"md-a",href:n,target:"_blank",rel:"noopener"},Fn(t.tokens))}default:return t.raw??""}})}const hy=$e(dy,[["__scopeId","data-v-9c287897"]]),py=new Set(["edit","str_replace","replace","write","multi_edit","create_file","edit_file","apply_patch"]);function gy(e){return py.has(e.toLowerCase())}function Gl(e){return e.suspended?"suspended":e.isError?"error":e.output===void 0?"running":"ok"}function my(e){return e.some(t=>Gl(t)==="running")?"running":e.some(t=>Gl(t)==="error")?"error":"ok"}const vy=["onKeydown"],yy={class:"tool-name"},by=["title"],ky={class:"tool-collapse-inner"},_y={class:"tool-body"},wy={key:0,class:"tool-args"},Sy={key:1,class:"tool-result"},xy={key:2,class:"tool-running-hint"},Cy=Te({__name:"GenericToolCard",props:{tool:{}},setup(e){const t=e,n=Z(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=Z(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=K(!1);let o=!1;je(n,u=>{o||(r.value=u==="running")},{immediate:!0});function i(){o=!0,r.value=!r.value}const l=Z(()=>{const u=t.tool.args;if(!u||typeof u!="object")return u===void 0?"":String(u);const d=[];for(const[h,p]of Object.entries(u)){let f;if(typeof p=="string")f=p.length>40?`${p.slice(0,40)}…`:p;else{try{f=JSON.stringify(p)}catch{f=String(p)}f.length>40&&(f=`${f.slice(0,40)}…`)}if(d.push(`${h}=${f}`),d.length>=3)break}return d.join(" ")});function a(){if(!t.tool.args)return"";try{return JSON.stringify(t.tool.args,null,2)}catch{return String(t.tool.args)}}function c(u){return u??""}return(u,d)=>(_(),C("div",{class:ve(["tool-card",`is-${n.value}`])},[g("div",{class:"tool-header",role:"button",tabindex:"0",onClick:i,onKeydown:ys(fn(i,["prevent"]),["enter"])},[g("span",{class:ve(["status-dot",n.value])},[s.value?(_(),C(te,{key:0},[Le(I(s.value),1)],64)):q("",!0)],2),g("span",yy,I(e.tool.name),1),l.value?(_(),C("span",{key:0,class:"tool-params",title:l.value},I(l.value),9,by)):q("",!0),g("span",{class:ve(["tool-chevron",{open:r.value}])},"▸",2)],40,vy),g("div",{class:ve(["tool-collapse",{open:r.value}])},[g("div",ky,[g("div",_y,[a()?(_(),C("pre",wy,[g("code",null,I(a()),1)])):q("",!0),e.tool.output!==void 0?(_(),C("pre",Sy,[g("code",null,I(c(e.tool.output)||"(无输出)"),1)])):(_(),C("div",xy,"执行中…"))])])],2)],2))}}),Ty=$e(Cy,[["__scopeId","data-v-5d0f42c5"]]),$y=500;function Ry(e,t){const n=e.length,s=t.length,r=Array.from({length:n+1},()=>new Array(s+1).fill(0));for(let o=1;o<=n;o++)for(let i=1;i<=s;i++)r[o][i]=e[o-1]===t[i-1]?r[o-1][i-1]+1:Math.max(r[o-1][i],r[o][i-1]);return r}function Ay(e,t,n,s,r){const o=[];for(;s>0||r>0;)s>0&&r>0&&t[s-1]===n[r-1]?(o.unshift({type:"context",text:t[s-1],oldNo:s,newNo:r}),s--,r--):r>0&&(s===0||e[s][r-1]>=e[s-1][r])?(o.unshift({type:"add",text:n[r-1],newNo:r}),r--):(o.unshift({type:"del",text:t[s-1],oldNo:s}),s--);return o}function Ey(e,t){const n=e.split(`
|
|
86
|
+
`),s=t.split(`
|
|
87
|
+
`);if(n.length+s.length>$y){const o=[];return n.forEach((i,l)=>o.push({type:"del",text:i,oldNo:l+1})),s.forEach((i,l)=>o.push({type:"add",text:i,newNo:l+1})),o}const r=Ry(n,s);return Ay(r,n,s,n.length,s.length)}function Iy(e){let t=0,n=0;for(const s of e)s.type==="add"?t++:s.type==="del"&&n++;return{added:t,removed:n}}const Ly=["old_string","oldString","old_str","old_text","oldText","old","search"],Py=["new_string","newString","new_str","new_text","newText","new","replace","content"],My=["path","file_path","filePath","file","filename"];function so(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s.length>0)return s}}function Ny(e){if(!e||typeof e!="object")return null;const t=e,n=so(t,My),s=so(t,Ly),r=so(t,Py);if(!r&&!s)return null;const o=Ey(s??"",r??""),i=Iy(o);return{path:n,diff:o,stats:i}}const Oy={class:"diff-lines"},Dy={class:"dl-gutter old"},By={class:"dl-gutter new"},zy={class:"dl-sign"},jy={class:"dl-text"},Fy=Te({__name:"DiffLines",props:{lines:{}},setup(e){return(t,n)=>(_(),C("div",Oy,[(_(!0),C(te,null,qe(e.lines,(s,r)=>(_(),C("div",{key:r,class:ve(["dl",`dl-${s.type}`])},[g("span",Dy,I(s.oldNo??""),1),g("span",By,I(s.newNo??""),1),g("span",zy,I(s.type==="add"?"+":s.type==="del"?"−":" "),1),g("span",jy,I(s.text),1)],2))),128))]))}}),Gy=$e(Fy,[["__scopeId","data-v-147edc06"]]),Uy=["onKeydown"],Hy={class:"tool-name"},Wy=["title"],qy={key:1,class:"diff-chip"},Vy={class:"tool-collapse-inner"},Ky={class:"tool-body"},Zy={key:1,class:"tool-result"},Yy={key:2,class:"tool-running-hint"},Jy=Te({__name:"EditToolCard",props:{tool:{}},setup(e){const t=e,n=Z(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=Z(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=Z(()=>Ny(t.tool.args)),o=Z(()=>{const h=r.value;if(!h||n.value==="error")return"";const{added:p,removed:f}=h.stats;return!p&&!f?"":`+${p} −${f}`}),i=Z(()=>{var h;return(h=r.value)==null?void 0:h.path}),l=K(!1);let a=!1;je(n,h=>{a||(l.value=h==="running")},{immediate:!0});function c(){a=!0,l.value=!l.value}const u=Z(()=>{var h;return((h=r.value)==null?void 0:h.diff)??[]}),d=Z(()=>u.value.length>0);return(h,p)=>(_(),C("div",{class:ve(["tool-card",`is-${n.value}`,"edit-tool-card"])},[g("div",{class:"tool-header",role:"button",tabindex:"0",onClick:c,onKeydown:ys(fn(c,["prevent"]),["enter"])},[g("span",{class:ve(["status-dot",n.value])},[s.value?(_(),C(te,{key:0},[Le(I(s.value),1)],64)):q("",!0)],2),g("span",Hy,I(e.tool.name),1),i.value?(_(),C("span",{key:0,class:"tool-filepath",title:i.value},I(i.value),9,Wy)):q("",!0),o.value?(_(),C("span",qy,I(o.value),1)):q("",!0),g("span",{class:ve(["tool-chevron",{open:l.value}])},"▸",2)],40,Uy),g("div",{class:ve(["tool-collapse",{open:l.value}])},[g("div",Vy,[g("div",Ky,[d.value?(_(),Oe(Gy,{key:0,lines:u.value},null,8,["lines"])):q("",!0),e.tool.output!==void 0?(_(),C("pre",Zy,[g("code",null,I(e.tool.output||"(无输出)"),1)])):(_(),C("div",Yy,"执行中…"))])])],2)],2))}}),Xy=$e(Jy,[["__scopeId","data-v-95ab1624"]]),Qy=["aria-expanded"],eb={class:"process-copy"},tb=["title"],nb={class:"count"},sb={class:"process-collapse"},rb={class:"process-inner"},ob=Te({__name:"ToolGroup",props:{name:{},tools:{}},setup(e){const t=e,n=K(!1),s=K(!1),r=Z(()=>my(t.tools)),o=Z(()=>t.tools.filter(l=>l.output!==void 0&&!l.isError).length);je(r,l=>{!s.value&&l==="running"&&(n.value=!0)},{immediate:!0});function i(){s.value=!0,n.value=!n.value}return(l,a)=>(_(),C("section",{class:ve(["tool-process",{open:n.value,error:r.value==="error"}])},[g("button",{class:"process-head",type:"button","aria-expanded":n.value,onClick:i},[g("span",{class:ve(["process-icon",r.value])},[z(ae,{name:r.value==="ok"?"check":"terminal",size:18},null,8,["name"])],2),g("span",eb,[a[0]||(a[0]=g("strong",null,"工具调用过程",-1)),g("small",null,I(r.value==="running"?"正在执行":r.value==="error"?"包含失败调用":`已完成 ${o.value} 项`),1)]),g("span",{class:"tool-names",title:e.tools.map(c=>c.name).join("、")},I(e.tools.map(c=>c.name).join(" · ")),9,tb),g("span",nb,I(e.tools.length),1),z(ae,{name:"chevron-down",size:17,class:"chevron"})],8,Qy),g("div",sb,[g("div",rb,[(_(!0),C(te,null,qe(e.tools,c=>(_(),Oe(kf(J(gy)(c.name)?Xy:Ty),{key:c.toolCallId,tool:c},null,8,["tool"]))),128))])])],2))}}),ib=$e(ob,[["__scopeId","data-v-a044c3b3"]]),lb={class:"thinking-block"},ab={class:"teaser-text"},cb={key:1,class:"thinking-stream"},ub={class:"thinking-panel",role:"dialog","aria-label":"思考过程"},fb={class:"panel-body"},db=Te({__name:"ThinkingBlock",props:{tool:{},active:{type:Boolean,default:!1}},setup(e){const t=e,n=K(!1),s=K(null),r=Z(()=>t.tool.output??""),o=Z(()=>r.value.split(/\n+/).map(c=>c.trim()).filter(Boolean).at(-1)??"");je(r,()=>{t.active&&Ct(()=>{const a=s.value;a&&(a.scrollTop=a.scrollHeight)})});function i(){n.value=!0}function l(){n.value=!1}return(a,c)=>(_(),C("div",lb,[e.active?(_(),C("div",cb,[c[2]||(c[2]=g("div",{class:"stream-header"},[g("span",{class:"stream-icon"},"💭"),g("span",{class:"stream-title"},"思考中…"),g("span",{class:"stream-dot"})],-1)),g("div",{ref_key:"streamRef",ref:s,class:"stream-body"},I(r.value),513)])):(_(),C("button",{key:0,class:"thinking-teaser",title:"点击查看完整思考过程",onClick:i},[c[0]||(c[0]=g("span",{class:"teaser-icon"},"💭",-1)),g("span",ab,I(o.value||"思考过程"),1),c[1]||(c[1]=g("span",{class:"teaser-open"},"展开",-1))])),(_(),Oe(Yo,{to:"body"},[n.value?(_(),C("div",{key:0,class:"thinking-overlay",onClick:fn(l,["self"])},[g("aside",ub,[g("header",{class:"panel-header"},[c[3]||(c[3]=g("span",null,"💭 思考过程",-1)),g("button",{class:"panel-close","aria-label":"关闭",onClick:l},"✕")]),g("div",fb,I(r.value||"(空)"),1)])])):q("",!0)]))]))}}),hb=$e(db,[["__scopeId","data-v-890e0460"]]),pb={key:0,class:"user-wrap"},gb={class:"user-bubble"},mb={class:"message-meta user-meta"},vb={key:0},yb={key:1,class:"assistant-wrap"},bb={key:0,class:"assistant-brand"},kb={key:0},_b={class:"assistant-body"},wb={key:3,class:"streaming-cursor","aria-label":"正在生成"},Sb={key:4,class:"message-meta"},xb=["title"],Cb=Te({__name:"MessageItem",props:{message:{},isLatestUser:{type:Boolean,default:!1},idle:{type:Boolean,default:!0},streaming:{type:Boolean,default:!1}},emits:["edit"],setup(e,{emit:t}){const n=e,s=t,r=K(!1);let o=null;const i=Z(()=>n.message.role==="user"),l=Z(()=>n.message.role==="assistant"),a=Z(()=>n.message.tools.filter(m=>m.name==="thinking")),c=Z(()=>n.message.tools.filter(m=>m.name!=="thinking")),u=Z(()=>n.message.ts?new Date(n.message.ts).toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):""),d=Z(()=>i.value&&n.isLatestUser&&n.idle),h=_t("showThinking",K(!0)),p=_t("showTools",K(!0));async function f(){try{await navigator.clipboard.writeText(n.message.content)}catch{const m=document.createElement("textarea");m.value=n.message.content,document.body.append(m),m.select(),document.execCommand("copy"),m.remove()}r.value=!0,o!==null&&clearTimeout(o),o=window.setTimeout(()=>{r.value=!1},1500)}return(m,b)=>(_(),C("article",{class:ve(["message",e.message.role,{error:e.message.isError}])},[i.value?(_(),C("div",pb,[g("div",gb,I(e.message.content),1),g("div",mb,[u.value?(_(),C("span",vb,I(u.value),1)):q("",!0),d.value?(_(),C("button",{key:1,title:"编辑并重新发送",onClick:b[0]||(b[0]=v=>s("edit",e.message.content))},[z(ae,{name:"edit",size:14}),b[1]||(b[1]=Le("编辑重发",-1))])):q("",!0)])])):(_(),C("div",yb,[l.value?(_(),C("div",bb,[b[3]||(b[3]=g("span",{class:"assistant-avatar"},[g("img",{src:ri,alt:""})],-1)),g("div",null,[b[2]||(b[2]=g("strong",null,"Scream Code",-1)),g("span",null,[g("i",{class:ve({streaming:e.streaming})},null,2),Le(I(e.streaming?"正在生成回复":"Agent 回复"),1)])]),u.value?(_(),C("time",kb,I(u.value),1)):q("",!0)])):q("",!0),g("div",_b,[J(h)?(_(!0),C(te,{key:0},qe(a.value,v=>(_(),Oe(hb,{key:v.toolCallId,tool:v,active:e.streaming},null,8,["tool","active"]))),128)):q("",!0),c.value.length&&J(p)?(_(),Oe(ib,{key:1,name:"工具调用过程",tools:c.value},null,8,["tools"])):q("",!0),e.message.content?(_(),Oe(hy,{key:2,class:"assistant-content",content:e.message.content},null,8,["content"])):e.streaming?(_(),C("span",wb)):q("",!0),e.message.content?(_(),C("div",Sb,[g("button",{title:r.value?"已复制":"复制内容",onClick:f},[z(ae,{name:r.value?"check":"copy",size:14},null,8,["name"]),Le(I(r.value?"已复制":"复制"),1)],8,xb)])):q("",!0)])]))],2))}}),Tb=$e(Cb,[["__scopeId","data-v-ac630ce6"]]),$b={class:"empty-state"},Rb={class:"suggestions"},Ab=["onClick"],Eb={class:"suggestion-icon"},Ib={class:"suggestion-title"},Lb=["title"],Pb={class:"workdir-path"},Mb=Te({__name:"EmptyState",props:{workDir:{default:null}},emits:["pick"],setup(e,{emit:t}){const n=t,s=[{icon:"edit",title:"帮我写一个函数",prompt:"帮我写一个函数"},{icon:"clipboard",title:"解释这段代码",prompt:"解释这段代码"},{icon:"activity",title:"调试这个问题",prompt:"调试这个问题"}];return(r,o)=>(_(),C("div",$b,[o[1]||(o[1]=g("div",{class:"empty-logo"},[g("img",{src:ri,alt:"Scream",class:"logo-img"})],-1)),o[2]||(o[2]=g("h1",{class:"empty-title"},"Scream Web UI",-1)),o[3]||(o[3]=g("p",{class:"empty-subtitle"},"给 Scream 发消息,开始处理你的任务",-1)),g("div",Rb,[(_(),C(te,null,qe(s,i=>g("button",{key:i.title,class:"suggestion-card",onClick:l=>n("pick",i.prompt)},[g("span",Eb,[z(ae,{name:i.icon,size:22},null,8,["name"])]),g("span",Ib,I(i.title),1)],8,Ab)),64))]),e.workDir?(_(),C("div",{key:0,class:"empty-workdir",title:e.workDir},[o[0]||(o[0]=g("span",{class:"workdir-label"},"工作目录",-1)),g("span",Pb,I(e.workDir),1)],8,Lb)):q("",!0)]))}}),Nb=$e(Mb,[["__scopeId","data-v-e4fea2d2"]]),Ob={key:1,class:"message-skeleton","aria-hidden":"true"},Db=Te({__name:"MessageList",props:{messages:{},busy:{type:Boolean,default:!1},workDir:{default:null}},emits:["edit","pick"],setup(e,{emit:t}){const n=e,s=t,r=K(null),o=Z(()=>{for(let u=n.messages.length-1;u>=0;u--)if(n.messages[u].role==="user")return n.messages[u].id;return null}),i=Z(()=>{var u;return((u=n.messages.at(-1))==null?void 0:u.id)??null}),l=Z(()=>{var h;const u=n.messages.at(-1);if(!u)return 0;let d=u.content.length;for(const p of u.tools)d+=((h=p.output)==null?void 0:h.length)??0;return d});function a(){const u=r.value;return u?u.scrollHeight-u.scrollTop-u.clientHeight<80:!0}je(()=>[n.messages.length,l.value],([u],[d])=>{if(!a())return;const h=u!==d;Ct(()=>{const p=r.value;p&&p.scrollTo({top:p.scrollHeight,behavior:h?"smooth":"auto"})})});const c=Z(()=>!n.busy||n.messages.length===0?!1:n.messages.at(-1).role==="user");return(u,d)=>(_(),C("div",{ref_key:"listRef",ref:r,class:"message-list"},[e.messages.length===0?(_(),Oe(Nb,{key:0,"work-dir":e.workDir,onPick:d[0]||(d[0]=h=>s("pick",h))},null,8,["work-dir"])):q("",!0),(_(!0),C(te,null,qe(e.messages,h=>(_(),Oe(Tb,{key:h.id,message:h,"is-latest-user":h.id===o.value,idle:!e.busy,streaming:e.busy&&h.id===i.value&&h.role==="assistant",onEdit:d[1]||(d[1]=p=>s("edit",p))},null,8,["message","is-latest-user","idle","streaming"]))),128)),c.value?(_(),C("div",Ob,[...d[2]||(d[2]=[Yf('<div class="sk-avatar" data-v-0746856f></div><div class="sk-body" data-v-0746856f><div class="sk-line sk-w-60" data-v-0746856f></div><div class="sk-line sk-w-90" data-v-0746856f></div><div class="sk-line sk-w-40" data-v-0746856f></div></div>',2)])])):q("",!0)],512))}}),Bb=$e(Db,[["__scopeId","data-v-0746856f"]]),zb={class:"model-picker-root"},jb={class:"picker-list"},Fb={key:0,class:"picker-empty"},Gb={class:"picker-group-title"},Ub=["onClick"],Hb={class:"row-main"},Wb={class:"row-name"},qb={class:"row-alias"},Vb={class:"row-meta"},Kb={key:0,class:"row-check"},Zb={class:"picker-thinking"},Yb={class:"thinking-options"},Jb=["onClick"],Xb=Te({__name:"ModelPicker",props:{models:{},currentModel:{},currentThinking:{}},emits:["apply-model","apply-thinking","close"],setup(e,{emit:t}){const n=e,s=t,r=["off","low","medium","high"],o={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},i=K(""),l=K(null);en(()=>{var v;(v=l.value)==null||v.focus()});const a=Z(()=>{const v=i.value.trim().toLowerCase();return v?n.models.filter(S=>S.alias.toLowerCase().includes(v)||S.provider.toLowerCase().includes(v)||(S.displayName??"").toLowerCase().includes(v)):n.models}),c=Z(()=>{const v=new Map;for(const S of a.value){const x=v.get(S.provider)??[];x.push(S),v.set(S.provider,x)}return[...v.entries()].map(([S,x])=>({provider:S,models:x}))}),u=Z(()=>n.models.find(v=>v.alias===n.currentModel)),d=Z(()=>{var v;return((v=u.value)==null?void 0:v.thinkingLevels)??r});function h(v){return o[v]??v}function p(v){return v>=1e3?`${Math.round(v/1e3)}k`:String(v)}function f(v){return v.displayName??v.model}function m(v){v!==n.currentModel&&s("apply-model",v),s("close")}function b(v){v!==n.currentThinking&&s("apply-thinking",v)}return(v,S)=>(_(),C("div",zb,[g("div",{class:"picker-backdrop",onClick:S[0]||(S[0]=x=>s("close"))}),g("div",{class:"model-picker",role:"dialog","aria-label":"模型选择",onKeydown:S[2]||(S[2]=ys(x=>s("close"),["esc"]))},[Ts(g("input",{ref_key:"searchRef",ref:l,"onUpdate:modelValue":S[1]||(S[1]=x=>i.value=x),class:"picker-search",type:"text",placeholder:"搜索模型…"},null,512),[[Rs,i.value]]),g("div",jb,[c.value.length===0?(_(),C("div",Fb,"无匹配模型")):q("",!0),(_(!0),C(te,null,qe(c.value,x=>(_(),C("div",{key:x.provider,class:"picker-group"},[g("div",Gb,I(x.provider),1),(_(!0),C(te,null,qe(x.models,R=>(_(),C("button",{key:R.alias,class:ve(["picker-row",{active:R.alias===e.currentModel}]),onClick:U=>m(R.alias)},[g("span",Hb,[g("span",Wb,I(f(R)),1),g("span",qb,I(R.alias),1)]),g("span",Vb,I(p(R.maxContextSize)),1),R.alias===e.currentModel?(_(),C("span",Kb,"✓")):q("",!0)],10,Ub))),128))]))),128))]),g("div",Zb,[S[3]||(S[3]=g("span",{class:"thinking-label"},"思考强度",-1)),g("div",Yb,[(_(!0),C(te,null,qe(d.value,x=>(_(),C("button",{key:x,class:ve(["thinking-btn",{active:x===e.currentThinking}]),onClick:R=>b(x)},I(h(x)),11,Jb))),128))])])],32)]))}}),Qb=$e(Xb,[["__scopeId","data-v-af964b7d"]]),e1={class:"slash-menu",role:"listbox","aria-label":"斜杠命令"},t1=["aria-selected","onMousedown","onMouseenter"],n1={class:"slash-name"},s1={key:0,class:"slash-aliases"},r1={class:"slash-desc"},o1={key:0,class:"slash-badge slash-badge-input"},i1={key:1,class:"slash-badge"},l1=Te({__name:"SlashMenu",props:{commands:{},activeIndex:{}},emits:["select","hover"],setup(e,{emit:t}){const n=t;return(s,r)=>(_(),C("div",e1,[(_(!0),C(te,null,qe(e.commands,(o,i)=>{var l;return _(),C("button",{key:o.name,class:ve(["slash-item",{active:i===e.activeIndex}]),role:"option","aria-selected":i===e.activeIndex,onMousedown:fn(a=>n("select",o),["prevent"]),onMouseenter:a=>n("hover",i)},[g("span",n1,[Le("/"+I(o.name),1),(l=o.aliases)!=null&&l.length?(_(),C("span",s1,I(o.aliases.map(a=>`/${a}`).join(" ")),1)):q("",!0)]),g("span",r1,I(o.description),1),o.acceptsInput?(_(),C("span",o1,"输入参数")):q("",!0),o.target==="backend"?(_(),C("span",i1,"服务端")):q("",!0)],42,t1)}),128)),r[0]||(r[0]=g("div",{class:"slash-hint"},"↑↓ 选择 · Enter/Tab 执行 · Esc 关闭",-1))]))}}),a1=$e(l1,[["__scopeId","data-v-54d5c512"]]),c1={class:"composer"},u1=["placeholder"],f1={class:"composer-footer"},d1={class:"composer-quick-actions"},h1=["title"],p1={key:1,class:"queue-label",title:"运行结束后自动发送"},g1={class:"composer-actions"},m1=["disabled","title"],v1={key:1,class:"context-label",title:"上下文使用率"},y1=["disabled"],b1=Te({__name:"Composer",props:{busy:{type:Boolean},status:{default:void 0},sessionId:{default:null},models:{default:()=>[]}},emits:["send","abort","command","switch-model","switch-thinking"],setup(e,{expose:t,emit:n}){const s=e,r=n,o=K(""),i=K(null),l=K(0),a=K(!1),c=Z(()=>{const M=o.value;return!M.startsWith("/")||M.includes(`
|
|
88
|
+
`)||/\s/.test(M.slice(1))?null:M.slice(1)}),u=Z(()=>c.value===null?[]:Xd(c.value)),d=Z(()=>c.value!==null&&u.value.length>0&&!a.value);je(c,()=>{l.value=0,a.value=!1});function h(M){const ie=M??u.value[l.value];if(ie){if(ie.acceptsInput){o.value=`/${ie.name} `,a.value=!0,Ct(()=>{var ke;(ke=i.value)==null||ke.focus(),Y()});return}x(`/${ie.name}`),D(),r("command",ie.name)}}const p=K([]);je(()=>s.sessionId,()=>{p.value=[]}),je(()=>s.busy,M=>{if(!M&&p.value.length>0){const[ie,...ke]=p.value;p.value=ke,ie&&r("send",ie)}});const f=K([]),m=K(-1),b=K("");function v(){return`scream-history:${s.sessionId??"default"}`}function S(){try{const M=localStorage.getItem(v());f.value=M?JSON.parse(M):[]}catch{f.value=[]}m.value=-1}function x(M){if(f.value.at(-1)!==M){f.value=[...f.value,M].slice(-50);try{localStorage.setItem(v(),JSON.stringify(f.value))}catch{}}m.value=-1,b.value=""}function R(M,ie){const ke=i.value;if(!ke)return;const xt=ke.value.slice(0,ke.selectionStart??0),y=ke.value.slice(ke.selectionEnd??0);if(!(M===-1&&xt.includes(`
|
|
89
|
+
`))&&!(M===1&&y.includes(`
|
|
90
|
+
`))){if(M===-1){if(f.value.length===0)return;ie.preventDefault(),m.value===-1?(b.value=o.value,m.value=f.value.length-1):m.value>0&&m.value--,o.value=f.value[m.value]??""}else{if(m.value===-1)return;ie.preventDefault(),m.value<f.value.length-1?(m.value++,o.value=f.value[m.value]??""):(m.value=-1,o.value=b.value)}Ct(()=>{ke.selectionStart=ke.selectionEnd=ke.value.length})}}function U(){return`scream-draft:${s.sessionId??"default"}`}je(o,()=>{Y();try{o.value?localStorage.setItem(U(),o.value):localStorage.removeItem(U())}catch{}}),je(()=>s.sessionId,()=>{S();let M="";try{M=localStorage.getItem(U())??""}catch{M=""}o.value=M,Ct(Y)},{immediate:!0});function Y(){const M=i.value;if(!M)return;M.style.height="auto";const ie=Math.round(window.innerHeight*.25);M.style.height=`${Math.min(Math.max(M.scrollHeight,36),ie)}px`}function D(){o.value="",Ct(()=>{i.value&&(i.value.style.height="auto")})}function le(){const M=o.value.trim();if(M){if(M.startsWith("/")){const ie=M.indexOf(" "),ke=(ie===-1?M.slice(1):M.slice(1,ie)).toLowerCase(),xt=Qd(ke),y=ie===-1?"":M.slice(ie+1).trim();x(M),r("command",xt,y),D();return}if(s.busy){G();return}x(M),r("send",M),D()}}function G(){const M=o.value.trim();M&&(p.value=[...p.value,M],D())}function ne(M){if(d.value){if(M.key==="ArrowUp"){M.preventDefault(),l.value=(l.value-1+u.value.length)%u.value.length;return}if(M.key==="ArrowDown"){M.preventDefault(),l.value=(l.value+1)%u.value.length;return}if(M.key==="Tab"||M.key==="Enter"&&!M.shiftKey){if(M.key==="Enter"&&M.isComposing)return;M.preventDefault(),h();return}if(M.key==="Escape"){M.preventDefault(),a.value=!0;return}}if((M.ctrlKey||M.metaKey)&&M.key.toLowerCase()==="s"){M.preventDefault(),G();return}if(M.key==="Enter"&&!M.shiftKey){if(M.isComposing)return;M.preventDefault(),le();return}M.key==="ArrowUp"?R(-1,M):M.key==="ArrowDown"&&R(1,M)}function se(){p.value=[],r("abort")}function j(M){o.value=M,Ct(()=>{var ie;Y(),(ie=i.value)==null||ie.focus()})}function ce(M){o.value+=M,Ct(()=>{var ie;Y(),(ie=i.value)==null||ie.focus()})}t({insertText:j,openModelPicker:Be});const he=Z(()=>{var M;return(M=s.status)==null?void 0:M.model}),pe=Z(()=>{var M;return(M=s.status)==null?void 0:M.permission}),de=Z(()=>{var M;return(M=s.status)==null?void 0:M.contextUsage}),be=K(!1),ge={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},ot=Z(()=>{var M;return(M=s.status)==null?void 0:M.thinkingLevel}),De=Z(()=>{const M=ot.value;return!M||M==="none"?"":ge[M]??M}),Ve=Z(()=>s.models.length>0);function Be(){return Ve.value?(be.value=!0,!0):!1}function tn(){Ve.value&&(be.value=!be.value)}function St(M){r("switch-model",M)}function nn(M){r("switch-thinking",M)}const Xe=Z(()=>{switch(pe.value){case"auto":return"perm-auto";case"yolo":return"perm-yolo";default:return"perm-manual"}}),Ke=Z(()=>{switch(pe.value){case"auto":return"自动";case"yolo":return"YOLO";default:return"手动"}});return(M,ie)=>(_(),C("div",c1,[z(oc,{name:"picker"},{default:Je(()=>[be.value?(_(),Oe(Qb,{key:0,models:e.models,"current-model":he.value,"current-thinking":ot.value,onApplyModel:St,onApplyThinking:nn,onClose:ie[0]||(ie[0]=ke=>be.value=!1)},null,8,["models","current-model","current-thinking"])):q("",!0)]),_:1}),d.value?(_(),Oe(a1,{key:0,commands:u.value,"active-index":l.value,onSelect:h,onHover:ie[1]||(ie[1]=ke=>l.value=ke)},null,8,["commands","active-index"])):q("",!0),Ts(g("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":ie[2]||(ie[2]=ke=>o.value=ke),id:"composer-input",name:"message",class:"composer-input",rows:"1",placeholder:e.busy?"回合进行中:Enter/Ctrl+S 排队消息,随下一轮注入":"输入消息,@ 提及,/ 触发指令",onKeydown:ne},null,40,u1),[[Rs,o.value]]),g("div",f1,[g("div",d1,[g("button",{class:"quick-action",title:"插入 @ 提及",onClick:ie[3]||(ie[3]=ke=>ce("@"))},[z(ae,{name:"at",size:18}),ie[5]||(ie[5]=g("span",null,"提及",-1))]),g("button",{class:"quick-action",title:"插入 / 触发指令",onClick:ie[4]||(ie[4]=ke=>ce("/"))},[z(ae,{name:"command",size:18}),ie[6]||(ie[6]=g("span",null,"指令",-1))]),pe.value?(_(),C("span",{key:0,class:ve(["permission-label",Xe.value]),title:`权限模式:${pe.value}`},I(Ke.value),11,h1)):q("",!0),p.value.length?(_(),C("span",p1,"已排队 "+I(p.value.length)+" 条",1)):q("",!0)]),g("div",g1,[he.value?(_(),C("button",{key:0,class:ve(["model-select",{clickable:Ve.value}]),disabled:!Ve.value,title:`当前模型:${he.value}`,onClick:tn},[z(ae,{name:"brain",size:17}),g("span",null,I(he.value),1),De.value?(_(),C(te,{key:0},[Le(" · "+I(De.value),1)],64)):q("",!0),Ve.value?(_(),Oe(ae,{key:1,name:"chevron-down",size:14})):q("",!0)],10,m1)):q("",!0),de.value!==void 0?(_(),C("span",v1,[z(gc,{usage:de.value,size:17},null,8,["usage"])])):q("",!0),e.busy?(_(),C("button",{key:2,class:"stop-btn",title:"停止当前回合",onClick:se},[z(ae,{name:"stop",size:17}),ie[7]||(ie[7]=g("span",null,"停止",-1))])):(_(),C("button",{key:3,class:"send-btn",disabled:!o.value.trim(),title:"发送 (Enter)","aria-label":"发送",onClick:le},[z(ae,{name:"send",size:19})],8,y1))])])]))}}),k1=$e(b1,[["__scopeId","data-v-e1e7e9dd"]]),_1=["type","disabled"],w1=Te({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(_(),C("button",{class:ve(["ui-btn",[`ui-btn--${e.variant}`,`ui-btn--${e.size}`]]),type:e.type,disabled:e.disabled},[Gs(t.$slots,"default",{},void 0)],10,_1))}}),Mn=$e(w1,[["__scopeId","data-v-e28e57b8"]]),S1={key:0,class:"approval-card"},x1={class:"approval-header"},C1={class:"approval-title"},T1={class:"tool-name"},$1={class:"action-summary"},R1={key:0,class:"approval-count"},A1={class:"approval-action"},E1={key:0,class:"feedback-area"},I1={class:"approval-buttons"},L1={key:0,class:"busy-indicator","aria-label":"处理中"},P1=Te({__name:"ApprovalCard",props:{approvals:{}},emits:["resolve"],setup(e,{emit:t}){const n=e,s=t,r=K(!1),o=K(!1),i=K(""),l=K(new Set),a=Z(()=>n.approvals[0]);je(()=>n.approvals.map(f=>f.id).join(","),()=>{o.value=!1,i.value="";const f=new Set(n.approvals.map(m=>m.id));l.value=new Set([...l.value].filter(m=>f.has(m)))});function c(f){return typeof f.display=="string"?f.display:f.display&&typeof f.display=="object"&&"description"in f.display?String(f.display.description??""):f.action??"执行该操作"}function u(f){return l.value.has(f)}function d(f,m,b){const v=a.value;!v||u(v.id)||(l.value=new Set([...l.value,v.id]),s("resolve",v.id,f,m,b))}function h(){const f=i.value.trim();f&&d("rejected",f)}function p(f){if(!a.value||r.value)return;const b=f.target;if(b&&(b.tagName==="TEXTAREA"||b.tagName==="INPUT")){o.value&&f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),h());return}switch(f.key){case"1":f.preventDefault(),d("approved",void 0,"once");break;case"2":f.preventDefault(),d("approved",void 0,"session");break;case"3":f.preventDefault(),d("rejected");break;case"4":f.preventDefault(),o.value=!o.value;break}}return en(()=>window.addEventListener("keydown",p)),hn(()=>window.removeEventListener("keydown",p)),(f,m)=>e.approvals.length?(_(),C("div",S1,[r.value?(_(),C("button",{key:0,class:"approval-minibar",onClick:m[0]||(m[0]=b=>r.value=!1)}," ⚠ "+I(e.approvals.length)+" 个待审批请求 — 点击展开 ",1)):a.value?(_(),C(te,{key:1},[g("div",x1,[m[7]||(m[7]=g("span",{class:"approval-icon"},"⚠",-1)),g("span",C1,[g("span",T1,I(a.value.toolName),1),g("span",$1,I(c(a.value)),1)]),e.approvals.length>1?(_(),C("span",R1,"+"+I(e.approvals.length-1),1)):q("",!0),g("button",{class:"icon-btn",title:"最小化","aria-label":"最小化",onClick:m[1]||(m[1]=b=>r.value=!0)},"—")]),g("pre",A1,I(c(a.value)),1),o.value?(_(),C("div",E1,[Ts(g("textarea",{"onUpdate:modelValue":m[2]||(m[2]=b=>i.value=b),class:"feedback-input",rows:"2",placeholder:"输入反馈,Enter 提交(将作为拒绝原因反馈给 Agent)"},null,512),[[Rs,i.value]])])):q("",!0),g("div",I1,[z(Mn,{variant:"primary",disabled:u(a.value.id),onClick:m[3]||(m[3]=b=>d("approved",void 0,"once"))},{default:Je(()=>[...m[8]||(m[8]=[g("kbd",null,"1",-1),Le(" 批准 ",-1)])]),_:1},8,["disabled"]),z(Mn,{variant:"secondary",disabled:u(a.value.id),onClick:m[4]||(m[4]=b=>d("approved",void 0,"session"))},{default:Je(()=>[...m[9]||(m[9]=[g("kbd",null,"2",-1),Le(" 会话批准 ",-1)])]),_:1},8,["disabled"]),z(Mn,{variant:"danger",disabled:u(a.value.id),onClick:m[5]||(m[5]=b=>d("rejected"))},{default:Je(()=>[...m[10]||(m[10]=[g("kbd",null,"3",-1),Le(" 拒绝 ",-1)])]),_:1},8,["disabled"]),z(Mn,{variant:"secondary",class:ve({"feedback-active":o.value}),disabled:u(a.value.id),onClick:m[6]||(m[6]=b=>o.value=!o.value)},{default:Je(()=>[...m[11]||(m[11]=[g("kbd",null,"4",-1),Le(" 反馈 ",-1)])]),_:1},8,["class","disabled"]),u(a.value.id)?(_(),C("span",L1,[...m[12]||(m[12]=[g("span",{class:"spinner"},null,-1),Le(" 处理中… ",-1)])])):q("",!0)])],64)):q("",!0)])):q("",!0)}}),M1=$e(P1,[["__scopeId","data-v-b031b650"]]),N1={class:"brand-head"},O1=["title","aria-label"],D1={class:"primary-actions"},B1={class:"search-row"},z1={class:"list-heading"},j1={class:"session-list"},F1={class:"group-label"},G1=["title","onClick"],U1={class:"session-icon"},H1={class:"session-info"},W1={class:"session-title-row"},q1={class:"session-meta"},V1={key:0,class:"live"},K1=["onClick"],Z1=["onClick"],Y1={key:0,class:"empty"},J1={class:"agent-card"},X1={class:"agent-card-head"},Q1={class:"agent-avatar"},e0={key:0},t0=["title"],n0={key:1},s0=["title"],r0={key:0,class:"usage-track"},o0={class:"sidebar-footer","aria-label":"辅助导航"},i0=Te({__name:"SessionSidebar",props:{sessions:{},currentSessionId:{},status:{default:void 0},busy:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1},mobileOpen:{type:Boolean,default:!1}},emits:["create","switch","delete","export","toggle","open-search","show-info","help"],setup(e,{emit:t}){const n=e,s=t,r=K(null),o=Z(()=>{const p=new Date,f=new Date(p.getFullYear(),p.getMonth(),p.getDate()).getTime(),m=f-864e5,b=new Map;for(const v of n.sessions){const S=new Date(v.createdAt),x=v.createdAt>=f?"今天":v.createdAt>=m?"昨天":`${String(S.getMonth()+1).padStart(2,"0")}-${String(S.getDate()).padStart(2,"0")}`;b.set(x,[...b.get(x)??[],v])}return[...b].map(([v,S])=>({label:v,items:S}))});function i(p){const f=new Date(p);return f.toDateString()===new Date().toDateString()?f.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):f.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}const l=Z(()=>{var f;const p=(f=n.status)==null?void 0:f.contextUsage;return p===void 0?null:Math.round((p>1?p/100:p)*100)});function a(p){return p?p.inputOther+p.output+p.inputCacheRead+p.inputCacheCreation:0}const c=Z(()=>{var p,f;return a((f=(p=n.status)==null?void 0:p.usage)==null?void 0:f.total)});function u(p){return p>=1e6?`${(p/1e6).toFixed(1)}M`:p>=1e3?`${(p/1e3).toFixed(1)}k`:String(p)}const d=Z(()=>{var p;return((p=n.status)==null?void 0:p.contextTokens)!==void 0&&n.status.maxContextTokens!==void 0?`${u(n.status.contextTokens)} / ${u(n.status.maxContextTokens)}`:""});function h(){r.value&&(s("delete",r.value),r.value=null)}return(p,f)=>{var m;return _(),C("aside",{class:ve(["sidebar",{collapsed:e.collapsed,"mobile-open":e.mobileOpen}])},[g("div",N1,[f[12]||(f[12]=g("div",{class:"brand-symbol"},[g("img",{src:ri,alt:""})],-1)),f[13]||(f[13]=g("div",{class:"brand-copy"},[g("strong",null,"Scream Code"),g("span",null,"智能开发工作台")],-1)),g("button",{class:"collapse-btn",title:e.collapsed?"展开侧栏":"收起侧栏","aria-label":e.collapsed?"展开侧栏":"收起侧栏",onClick:f[0]||(f[0]=b=>s("toggle"))},[z(ae,{name:e.collapsed?"chevron-right":"chevron-left",size:19},null,8,["name"])],8,O1)]),g("div",D1,[g("button",{class:"new-session",title:"新建会话",onClick:f[1]||(f[1]=b=>s("create"))},[z(ae,{name:"plus",size:21}),f[14]||(f[14]=g("span",null,"新建会话",-1))]),g("button",{class:"square-action",title:"搜索会话","aria-label":"搜索会话",onClick:f[2]||(f[2]=b=>s("open-search"))},[z(ae,{name:"search"})])]),g("div",B1,[g("button",{class:"search-box",title:"搜索会话 (⌘K)",onClick:f[3]||(f[3]=b=>s("open-search"))},[z(ae,{name:"search",size:18}),f[15]||(f[15]=g("span",null,"搜索会话",-1)),f[16]||(f[16]=g("kbd",null,"⌘K",-1))]),g("button",{class:"filter-btn",title:"筛选和搜索会话","aria-label":"筛选和搜索会话",onClick:f[4]||(f[4]=b=>s("open-search"))},[z(ae,{name:"filter",size:18})])]),g("div",z1,[f[17]||(f[17]=g("span",null,"最近会话",-1)),g("span",null,I(e.sessions.length),1)]),g("div",j1,[(_(!0),C(te,null,qe(o.value,b=>(_(),C(te,{key:b.label},[g("div",F1,I(b.label),1),(_(!0),C(te,null,qe(b.items,v=>(_(),C("article",{key:v.sessionId,class:ve(["session-item",{active:v.sessionId===e.currentSessionId}]),title:v.title||"新会话",onClick:S=>s("switch",v.sessionId)},[g("span",U1,[z(ae,{name:"message-circle",size:18})]),g("div",H1,[g("div",W1,[g("strong",null,I(v.title||"新会话"),1),g("time",null,I(i(v.createdAt)),1)]),g("div",q1,[g("span",null,I(v.messageCount)+" 条消息",1),v.active?(_(),C("span",V1,[...f[18]||(f[18]=[g("i",null,null,-1),Le("活跃",-1)])])):q("",!0)])]),g("div",{class:"session-actions",onClick:f[5]||(f[5]=fn(()=>{},["stop"]))},[g("button",{title:"导出 Markdown","aria-label":"导出 Markdown",onClick:S=>s("export",v.sessionId)},[z(ae,{name:"download",size:16})],8,K1),g("button",{class:"danger",title:"删除会话","aria-label":"删除会话",onClick:S=>r.value=v.sessionId},[z(ae,{name:"trash",size:16})],8,Z1)])],10,G1))),128))],64))),128)),e.sessions.length===0?(_(),C("div",Y1,[z(ae,{name:"message-circle",size:28}),f[19]||(f[19]=g("strong",null,"暂无会话",-1)),f[20]||(f[20]=g("span",null,"新建会话后将在这里显示",-1))])):q("",!0),e.sessions.length?(_(),C("button",{key:1,class:"view-all",onClick:f[6]||(f[6]=b=>s("open-search"))},[f[21]||(f[21]=Le("查看全部会话 ",-1)),z(ae,{name:"chevron-right",size:16})])):q("",!0)]),g("section",J1,[g("div",X1,[g("span",Q1,[z(ae,{name:"bot",size:20})]),g("div",null,[f[22]||(f[22]=g("strong",null,"Scream Agent",-1)),g("span",null,[g("i",{class:ve({busy:e.busy})},null,2),Le(I(e.busy?"正在运行":"当前空闲"),1)])])]),g("dl",null,[(m=e.status)!=null&&m.model?(_(),C("div",e0,[f[23]||(f[23]=g("dt",null,"当前模型",-1)),g("dd",{title:e.status.model},I(e.status.model),9,t0)])):q("",!0),l.value!==null?(_(),C("div",n0,[f[24]||(f[24]=g("dt",null,"上下文",-1)),g("dd",{title:d.value||void 0},I(l.value)+"%",9,s0)])):q("",!0),g("div",null,[f[25]||(f[25]=g("dt",null,"Token 消耗",-1)),g("dd",null,I(c.value?u(c.value):"-"),1)])]),l.value!==null?(_(),C("div",r0,[g("i",{style:$n({width:`${l.value}%`})},null,4)])):q("",!0),g("button",{onClick:f[7]||(f[7]=b=>s("show-info","status"))},[z(ae,{name:"activity",size:17}),f[26]||(f[26]=Le("查看详细状态",-1))])]),g("nav",o0,[g("button",{onClick:f[8]||(f[8]=b=>s("show-info","usage"))},[z(ae,{name:"activity",size:19}),f[27]||(f[27]=g("span",null,"用量",-1))]),g("button",{onClick:f[9]||(f[9]=b=>s("help"))},[z(ae,{name:"help",size:19}),f[28]||(f[28]=g("span",null,"帮助",-1))])]),z(Ar,{open:r.value!==null,title:"删除会话",onClose:f[11]||(f[11]=b=>r.value=null)},{footer:Je(()=>[z(Mn,{variant:"ghost",size:"sm",onClick:f[10]||(f[10]=b=>r.value=null)},{default:Je(()=>[...f[29]||(f[29]=[Le("取消",-1)])]),_:1}),z(Mn,{variant:"danger",size:"sm",onClick:h},{default:Je(()=>[...f[30]||(f[30]=[Le("删除",-1)])]),_:1})]),default:Je(()=>[f[31]||(f[31]=g("p",{class:"dialog-copy"},"确定删除这个会话吗?此操作不可恢复。",-1))]),_:1},8,["open"])],2)}}}),l0=$e(i0,[["__scopeId","data-v-a4c1783b"]]),a0={class:"rightbar"},c0={class:"panel-section quick-section"},u0={class:"section-heading"},f0={class:"tool-grid"},d0=["title","onClick"],h0={class:"more-tools"},p0=["title","onClick"],g0={class:"panel-section"},m0={class:"section-heading"},v0={class:"capability-list"},y0={class:"panel-section status-section"},b0={class:"section-heading"},k0=["title"],_0={key:0},w0={key:0,class:"usage"},S0={class:"track"},x0={class:"panel-section session-section"},C0={class:"section-heading"},T0={class:"mono"},$0=["title"],R0={key:0},A0=["title"],E0=Te({__name:"RightPanel",props:{status:{},busy:{type:Boolean,default:!1},sessionId:{default:null},workDir:{default:null},gitStatus:{default:null},messageCount:{default:0}},emits:["quick-command","insert","show-info"],setup(e,{emit:t}){const n=e,s=t,r=[{icon:"compact",label:"压缩上下文",hint:"/compact",command:"compact"},{icon:"brain",label:"切换模型",hint:"/model",command:"model"},{icon:"clipboard",label:"计划模式",hint:"/plan",command:"plan"},{icon:"fork",label:"会话分支",hint:"/fork",command:"fork"}],o=[{icon:"message-circle",label:"快速侧问",hint:"/btw",insert:"/btw "},{icon:"tag",label:"重命名",hint:"/title",insert:"/title "},{icon:"broom",label:"清空",hint:"/clear",command:"clear"},{icon:"plus",label:"新会话",hint:"/new",command:"new"}];function i(m){m.command?s("quick-command",m.command):m.insert&&s("insert",m.insert)}const l=Z(()=>n.status.permission==="auto"?"自动":n.status.permission==="yolo"?"YOLO":n.status.permission==="manual"?"手动":n.status.permission??"-"),a=Z(()=>({off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"})[n.status.thinkingLevel??""]??(n.status.thinkingLevel==="none"?"-":n.status.thinkingLevel??"-")),c=Z(()=>{const m=n.status.contextUsage;return m===void 0?null:Math.round((m>1?m/100:m)*100)});function u(m){return m?m.inputOther+m.output+m.inputCacheRead+m.inputCacheCreation:0}const d=Z(()=>{var m;return u((m=n.status.usage)==null?void 0:m.total)}),h=Z(()=>n.sessionId?n.sessionId.replace(/^session_/,"").slice(0,8):"-"),p=Z(()=>{var m;return((m=n.workDir)==null?void 0:m.split("/").filter(Boolean).at(-1))??"-"}),f=[{icon:"folder",title:"项目文件",text:"读取、检索与编辑工作区文件"},{icon:"terminal",title:"命令执行",text:"运行构建、测试与开发命令"},{icon:"git-branch",title:"Git 感知",text:"读取分支与工作区变更状态"},{icon:"message-circle",title:"会话管理",text:"新建、分支、导出与恢复会话"}];return(m,b)=>(_(),C("aside",a0,[g("section",c0,[g("div",u0,[b[1]||(b[1]=g("div",null,[g("span",null,"快捷工具"),g("small",null,"真实命令入口")],-1)),z(ae,{name:"command",size:19})]),g("div",f0,[(_(),C(te,null,qe(r,v=>g("button",{key:v.label,class:"tool-card",title:`${v.label} ${v.hint}`,onClick:S=>i(v)},[g("span",null,[z(ae,{name:v.icon,size:22},null,8,["name"])]),g("strong",null,I(v.label),1),g("small",null,I(v.hint),1)],8,d0)),64))]),g("div",h0,[(_(),C(te,null,qe(o,v=>g("button",{key:v.label,title:`${v.label} ${v.hint}`,onClick:S=>i(v)},[z(ae,{name:v.icon,size:17},null,8,["name"]),g("span",null,I(v.label),1)],8,p0)),64))])]),g("section",g0,[g("div",m0,[b[2]||(b[2]=g("div",null,[g("span",null,"核心能力"),g("small",null,"当前 Web Agent 已支持")],-1)),z(ae,{name:"sparkles",size:19})]),g("div",v0,[(_(),C(te,null,qe(f,v=>g("div",{key:v.title,class:"capability"},[g("span",null,[z(ae,{name:v.icon,size:19},null,8,["name"])]),g("div",null,[g("strong",null,I(v.title),1),g("small",null,I(v.text),1)])])),64))])]),g("section",y0,[g("div",b0,[b[4]||(b[4]=g("div",null,[g("span",null,"Agent 状态"),g("small",null,"来自当前会话")],-1)),g("span",{class:ve(["state-pill",{busy:e.busy}])},[b[3]||(b[3]=g("i",null,null,-1)),Le(I(e.busy?"运行中":"空闲"),1)],2)]),g("dl",null,[g("div",null,[b[5]||(b[5]=g("dt",null,"模型",-1)),g("dd",{title:e.status.model},I(e.status.model??"-"),9,k0)]),g("div",null,[b[6]||(b[6]=g("dt",null,"思考级别",-1)),g("dd",null,I(a.value),1)]),g("div",null,[b[7]||(b[7]=g("dt",null,"权限模式",-1)),g("dd",null,I(l.value),1)]),g("div",null,[b[8]||(b[8]=g("dt",null,"计划模式",-1)),g("dd",null,I(e.status.planMode?"开启":"关闭"),1)]),e.status.wolfpackMode?(_(),C("div",_0,[...b[9]||(b[9]=[g("dt",null,"WolfPack",-1),g("dd",null,"开启",-1)])])):q("",!0)]),c.value!==null?(_(),C("div",w0,[g("div",null,[b[10]||(b[10]=g("span",null,"上下文窗口",-1)),g("strong",null,I(c.value)+"%",1)]),g("div",S0,[g("i",{style:$n({width:`${c.value}%`})},null,4)])])):q("",!0)]),g("section",x0,[g("div",C0,[b[11]||(b[11]=g("div",null,[g("span",null,"当前会话"),g("small",null,"实时快照信息")],-1)),z(ae,{name:"activity",size:19})]),g("dl",null,[g("div",null,[b[12]||(b[12]=g("dt",null,"会话 ID",-1)),g("dd",T0,I(h.value),1)]),g("div",null,[b[13]||(b[13]=g("dt",null,"消息数",-1)),g("dd",null,I(e.messageCount),1)]),g("div",null,[b[14]||(b[14]=g("dt",null,"Token 消耗",-1)),g("dd",null,I(d.value?d.value.toLocaleString():"-"),1)]),g("div",null,[b[15]||(b[15]=g("dt",null,"工作目录",-1)),g("dd",{class:"mono",title:e.workDir??void 0},I(p.value),9,$0)]),e.gitStatus?(_(),C("div",R0,[b[16]||(b[16]=g("dt",null,"Git 分支",-1)),g("dd",{class:"mono",title:e.gitStatus.branch},I(e.gitStatus.branch??"detached"),9,A0)])):q("",!0)]),g("button",{class:"detail",onClick:b[0]||(b[0]=v=>s("show-info","status"))},[b[17]||(b[17]=Le("查看详细状态 ",-1)),z(ae,{name:"chevron-right",size:16})])])]))}}),I0=$e(E0,[["__scopeId","data-v-10019d7f"]]),L0={class:"info-row"},P0={class:"info-val mono"},M0={class:"info-row"},N0={class:"info-val mono"},O0={class:"info-row"},D0={class:"info-val"},B0={class:"info-row"},z0={class:"info-val"},j0={class:"info-row"},F0={class:"info-val"},G0={class:"info-row"},U0={class:"info-val"},H0={class:"info-row"},W0={class:"info-val"},q0={class:"info-row"},V0={class:"info-val"},K0={class:"info-row"},Z0={class:"info-val"},Y0={class:"info-row"},J0={class:"info-val"},X0={key:0,class:"info-row"},Q0={class:"info-val"},ek={key:1,class:"info-row"},tk={class:"info-val"},nk={class:"info-val mono"},sk={class:"info-val"},rk={key:3,class:"info-empty"},ok=Te({__name:"InfoPanel",props:{mode:{},status:{},sessionId:{},workDir:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,r=Z(()=>n.mode==="status"?"会话状态":"Token 用量");function o(p){switch(p){case"auto":return"自动 (auto)";case"yolo":return"YOLO";case"manual":return"手动 (manual)";default:return p??"-"}}function i(p){return p?"开启":"关闭"}function l(p){return p!=null}function a(p){return l(p)?p.toLocaleString():"-"}function c(p){return l(p)?`${(p>1?p:p*100).toFixed(1)}%`:"-"}function u(p){return p?p.inputOther+p.output+p.inputCacheRead+p.inputCacheCreation:0}function d(p){return p!=null&&p.byModel?Object.entries(p.byModel).map(([f,m])=>({model:f,tokens:u(m),output:m.output,cacheRead:m.inputCacheRead})):[]}const h=Z(()=>l(n.status.usage)||l(n.status.contextTokens));return(p,f)=>(_(),Oe(Ar,{open:!0,title:r.value,onClose:f[0]||(f[0]=m=>s("close"))},{default:Je(()=>{var m,b;return[e.mode==="status"?(_(),C(te,{key:0},[g("div",L0,[f[1]||(f[1]=g("span",{class:"info-key"},"会话 ID",-1)),g("span",P0,I(e.sessionId??"-"),1)]),g("div",M0,[f[2]||(f[2]=g("span",{class:"info-key"},"工作目录",-1)),g("span",N0,I(e.workDir??"-"),1)]),g("div",O0,[f[3]||(f[3]=g("span",{class:"info-key"},"模型",-1)),g("span",D0,I(e.status.model??"-"),1)]),g("div",B0,[f[4]||(f[4]=g("span",{class:"info-key"},"权限模式",-1)),g("span",z0,I(o(e.status.permission)),1)]),g("div",j0,[f[5]||(f[5]=g("span",{class:"info-key"},"思考级别",-1)),g("span",F0,I(e.status.thinkingLevel??"-"),1)]),g("div",G0,[f[6]||(f[6]=g("span",{class:"info-key"},"计划模式",-1)),g("span",U0,I(i(e.status.planMode)),1)]),g("div",H0,[f[7]||(f[7]=g("span",{class:"info-key"},"WolfPack 模式",-1)),g("span",W0,I(i(e.status.wolfpackMode)),1)]),g("div",q0,[f[8]||(f[8]=g("span",{class:"info-key"},"上下文",-1)),g("span",V0,I(a(e.status.contextTokens))+" / "+I(a(e.status.maxContextTokens))+" ("+I(c(e.status.contextUsage))+")",1)])],64)):(_(),C(te,{key:1},[g("div",K0,[f[9]||(f[9]=g("span",{class:"info-key"},"上下文 Token",-1)),g("span",Z0,I(a(e.status.contextTokens))+" / "+I(a(e.status.maxContextTokens)),1)]),g("div",Y0,[f[10]||(f[10]=g("span",{class:"info-key"},"上下文占比",-1)),g("span",J0,I(c(e.status.contextUsage)),1)]),(m=e.status.usage)!=null&&m.total?(_(),C("div",X0,[f[11]||(f[11]=g("span",{class:"info-key"},"累计 Token",-1)),g("span",Q0,I(a(u(e.status.usage.total))),1)])):q("",!0),(b=e.status.usage)!=null&&b.currentTurn?(_(),C("div",ek,[f[12]||(f[12]=g("span",{class:"info-key"},"当前回合",-1)),g("span",tk,I(a(u(e.status.usage.currentTurn))),1)])):q("",!0),d(e.status.usage).length?(_(),C(te,{key:2},[f[13]||(f[13]=g("div",{class:"info-subhead"},"按模型",-1)),(_(!0),C(te,null,qe(d(e.status.usage),v=>(_(),C("div",{key:v.model,class:"info-row info-row-model"},[g("span",nk,I(v.model),1),g("span",sk,I(a(v.tokens))+"(输出 "+I(a(v.output))+" · 缓存读 "+I(a(v.cacheRead))+")",1)]))),128))],64)):q("",!0),h.value?q("",!0):(_(),C("div",rk,"暂无用量数据"))],64))]}),_:1},8,["title"]))}}),ik=$e(ok,[["__scopeId","data-v-407030a3"]]),lk={class:"sd-search-wrap"},ak={class:"sd-icon"},ck=["aria-selected","onClick","onMousemove"],uk={class:"sd-title"},fk={class:"sd-meta"},dk={class:"sd-time"},hk={class:"sd-count"},pk={key:0,class:"sd-active"},gk={key:0,class:"sd-empty"},mk=Te({__name:"SearchSessionsDialog",props:{sessions:{},activeId:{}},emits:["select","close"],setup(e,{emit:t}){const n=e,s=t,r=K(""),o=K(null),i=K(null),l=Z(()=>{const m=r.value.trim().toLowerCase();return m?n.sessions.filter(b=>b.title.toLowerCase().includes(m)||b.sessionId.toLowerCase().includes(m)):n.sessions}),a=K(0);je(r,()=>{a.value=0}),je(l,()=>{a.value=0});function c(m){const b=l.value.length;return b===0?0:Math.max(0,Math.min(b-1,m))}async function u(){var b;await Ct();const m=(b=i.value)==null?void 0:b.querySelector('[aria-selected="true"]');m==null||m.scrollIntoView({block:"nearest"})}function d(m){a.value=c(a.value+m),u()}function h(){const m=l.value[a.value];m&&(s("select",m.sessionId),s("close"))}function p(m){m.key==="ArrowDown"?(m.preventDefault(),d(1)):m.key==="ArrowUp"?(m.preventDefault(),d(-1)):m.key==="Enter"&&(m.preventDefault(),h())}function f(m){const b=new Date(m),v=new Date;return b.toDateString()===v.toDateString()?b.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):b.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}return en(()=>{var m;(m=o.value)==null||m.focus()}),(m,b)=>(_(),Oe(Ar,{open:!0,onClose:b[1]||(b[1]=v=>s("close"))},{header:Je(()=>[g("div",lk,[g("span",ak,[z(ae,{name:"search",size:19})]),Ts(g("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":b[0]||(b[0]=v=>r.value=v),class:"sd-input",type:"text",placeholder:"搜索会话...",id:"session-search-input",name:"session-search",autocomplete:"off",spellcheck:"false",onKeydown:p},null,544),[[Rs,r.value]])])]),footer:Je(()=>[...b[2]||(b[2]=[g("span",{class:"sd-hint"},"↑↓ 导航 · Enter 切换 · Esc 关闭",-1)])]),default:Je(()=>[g("div",{ref_key:"listRef",ref:i,class:"sd-list",role:"listbox"},[(_(!0),C(te,null,qe(l.value,(v,S)=>(_(),C("button",{key:v.sessionId,class:ve(["sd-row",{on:S===a.value,active:v.sessionId===e.activeId}]),role:"option","aria-selected":S===a.value,onClick:x=>{s("select",v.sessionId),s("close")},onMousemove:x=>a.value=S},[g("span",uk,I(v.title||"New Session"),1),g("span",fk,[g("span",dk,I(f(v.createdAt)),1),g("span",hk,I(v.messageCount)+" 条",1),v.active?(_(),C("span",pk,"●")):q("",!0)])],42,ck))),128)),l.value.length===0?(_(),C("div",gk,"没有匹配的会话")):q("",!0)],512)]),_:1}))}}),vk=$e(mk,[["__scopeId","data-v-62760c4c"]]),yk=Te({__name:"ResizeHandle",props:{dragging:{type:Boolean}},setup(e){return(t,n)=>(_(),C("div",{class:ve(["resize-handle",{dragging:e.dragging}]),role:"separator","aria-orientation":"vertical","aria-label":"拖拽调整宽度"},null,2))}}),bk=$e(yk,[["__scopeId","data-v-11060aea"]]),kk={class:"workbench-body"},_k={class:"chat-main chat-inset"},wk={class:"composer-dock"},Ul="scream-sidebar-collapsed-v2",Hl="scream-rightbar-open",Sk=Te({__name:"ChatView",setup(e){const{connectionStatus:t,messages:n,pendingApprovals:s,status:r,sessionId:o,workDir:i,isBusy:l,sessions:a,currentSessionId:c,gitStatus:u,models:d,sendPrompt:h,sendCommand:p,clearMessages:f,appendSystemMessage:m,abort:b,resolveApproval:v,createSession:S,switchSession:x,deleteSession:R,exportSession:U,fetchGitStatus:Y,fetchSnapshot:D,switchModel:le,switchThinking:G}=Yd(),ne=K(null),se=K(!1),j=K("status"),ce=Z(()=>d.value.length>0);Sn("modelSwitchable",ce);const he=Z(()=>{const T=a.value.find(A=>A.sessionId===c.value);return(T==null?void 0:T.title)??null}),pe=K(!1),de=K(!1);try{pe.value=localStorage.getItem(Ul)==="1"}catch{}function be(){return window.innerWidth<=640}function ge(){if(be()){de.value=!de.value;return}pe.value=!pe.value;try{localStorage.setItem(Ul,pe.value?"1":"0")}catch{}}function ot(T){de.value=!1,x(T)}const De=K(!0);try{De.value=localStorage.getItem(Hl)!=="0"}catch{}function Ve(){De.value=!De.value;try{localStorage.setItem(Hl,De.value?"1":"0")}catch{}}const Be=K(!0),tn=K(!0);Sn("showThinking",Be),Sn("showTools",tn);const St=K(!1);function nn(T){(T.metaKey||T.ctrlKey)&&T.key==="k"&&(T.preventDefault(),St.value=!St.value)}en(()=>window.addEventListener("keydown",nn)),hn(()=>window.removeEventListener("keydown",nn));const{width:Xe,dragging:Ke,onPointerDown:M}=Jd({storageKey:"scream-sidebar-width",defaultWidth:360,min:300,max:440});function ie(){de.value=!1,S()}function ke(T){var A;(A=ne.value)==null||A.insertText(T)}function xt(T){D(),j.value=T,se.value=!0}function y(){var A;(((A=ne.value)==null?void 0:A.openModelPicker())??!1)||m(`当前模型:${r.value.model??"unknown"}`)}function k(T,A){switch(T){case"compact":p("compact");break;case"model":y();break;case"clear":f();break;case"new":S();break;case"help":m(eh());break;case"auto":case"yes":case"plan":case"fork":case"title":case"btw":p(T,A);break;case"status":xt("status");break;case"usage":xt("usage");break;default:m(`未知命令:/${T}`)}}return(T,A)=>(_(),C("div",{class:ve(["workbench",{"sidebar-is-collapsed":pe.value}]),style:$n({"--sidebar-width":J(Xe)+"px"})},[z(l0,{sessions:J(a),"current-session-id":J(c),status:J(r),busy:J(l),collapsed:pe.value,"mobile-open":de.value,onCreate:ie,onSwitch:ot,onDelete:J(R),onExport:J(U),onToggle:ge,onOpenSearch:A[0]||(A[0]=E=>St.value=!0),onShowInfo:xt,onHelp:A[1]||(A[1]=E=>k("help"))},null,8,["sessions","current-session-id","status","busy","collapsed","mobile-open","onDelete","onExport"]),pe.value?q("",!0):(_(),Oe(bk,{key:0,class:"sidebar-resize",dragging:J(Ke),onPointerdown:J(M)},null,8,["dragging","onPointerdown"])),de.value?(_(),C("div",{key:1,class:"sidebar-backdrop","aria-hidden":"true",onClick:A[2]||(A[2]=E=>de.value=!1)})):q("",!0),z(np,{"connection-status":J(t),status:J(r),busy:J(l),"git-status":J(u),onRefreshGit:J(Y),onToggleSidebar:ge,onOpenModelPicker:y},null,8,["connection-status","status","busy","git-status","onRefreshGit"]),g("main",kk,[g("div",_k,[z(pp,{title:he.value,busy:J(l),onRename:A[3]||(A[3]=E=>J(p)("title",E)),onExport:A[4]||(A[4]=E=>J(c)&&J(U)(J(c))),onClear:J(f),onToggleRightbar:Ve},null,8,["title","busy","onClear"]),z(Bb,{messages:J(n),busy:J(l),"work-dir":J(i),onEdit:ke,onPick:J(h)},null,8,["messages","busy","work-dir","onPick"]),g("div",wk,[z(M1,{approvals:J(s),onResolve:J(v)},null,8,["approvals","onResolve"]),z(k1,{ref_key:"composerRef",ref:ne,busy:J(l),status:J(r),"session-id":J(o),models:J(d),onSend:J(h),onAbort:J(b),onCommand:k,onSwitchModel:J(le),onSwitchThinking:J(G)},null,8,["busy","status","session-id","models","onSend","onAbort","onSwitchModel","onSwitchThinking"])])]),De.value?(_(),Oe(I0,{key:0,class:"rightbar-host",status:J(r),busy:J(l),"session-id":J(o),"work-dir":J(i),"git-status":J(u),"message-count":J(n).length,onQuickCommand:k,onInsert:ke,onShowInfo:xt},null,8,["status","busy","session-id","work-dir","git-status","message-count"])):q("",!0)]),se.value?(_(),Oe(ik,{key:2,mode:j.value,status:J(r),"session-id":J(o),"work-dir":J(i),onClose:A[5]||(A[5]=E=>se.value=!1)},null,8,["mode","status","session-id","work-dir"])):q("",!0),St.value?(_(),Oe(vk,{key:3,sessions:J(a),"active-id":J(c),onSelect:ot,onClose:A[6]||(A[6]=E=>St.value=!1)},null,8,["sessions","active-id"])):q("",!0)],6))}}),xk=$e(Sk,[["__scopeId","data-v-ec327280"]]),Ck={class:"toast-container"},Tk=["onClick"],$k={class:"toast-icon"},Rk={class:"toast-msg"},Ak=Te({__name:"Toast",setup(e){const{toasts:t,removeToast:n}=pc(),s={info:"ℹ",success:"✓",error:"✗",warning:"⚠"};return(r,o)=>(_(),Oe(Yo,{to:"body"},[g("div",Ck,[z(Pd,{name:"toast"},{default:Je(()=>[(_(!0),C(te,null,qe(J(t),i=>(_(),C("div",{key:i.id,class:ve(["toast",`toast--${i.type}`]),onClick:l=>J(n)(i.id)},[g("span",$k,I(s[i.type]),1),g("span",Rk,I(i.message),1)],10,Tk))),128))]),_:1})])]))}}),Ek=$e(Ak,[["__scopeId","data-v-7200727f"]]),Ik={class:"app"},Lk=Te({__name:"App",setup(e){const t=K("system"),n=K("dark");Sn("effectiveTheme",n),Sn("theme",t);const s={light:"#f7f8f7",dark:"#0d1117"};function r(){const a=document.documentElement,c=window.matchMedia("(prefers-color-scheme: dark)").matches,u=t.value==="system"?c?"dark":"light":t.value;n.value=u,a.dataset.theme=u;const d=document.querySelector('meta[name="theme-color"]');d&&d.setAttribute("content",s[u])}let o=null;function i(a){t.value=a;try{localStorage.setItem("scream-theme",a)}catch{}const c=document.documentElement;c.classList.add("theme-transition"),r(),o!==null&&clearTimeout(o),o=window.setTimeout(()=>c.classList.remove("theme-transition"),320)}Sn("setTheme",i),en(()=>{try{const a=localStorage.getItem("scream-theme");(a==="light"||a==="dark"||a==="system")&&(t.value=a)}catch{}r()}),je(t,r);const l=window.matchMedia("(prefers-color-scheme: dark)");return l.addEventListener("change",r),hn(()=>{l.removeEventListener("change",r),o!==null&&clearTimeout(o),document.documentElement.classList.remove("theme-transition")}),(a,c)=>(_(),C("div",Ik,[z(xk),z(Ek)]))}}),Pk=$e(Lk,[["__scopeId","data-v-ba168d5b"]]);function Mk(){const e=window.matchMedia("(prefers-reduced-motion: reduce)");document.addEventListener("pointerdown",t=>{if(e.matches||t.button!==0)return;const n=t.target instanceof Element?t.target:null,s=n==null?void 0:n.closest('button:not(:disabled), [role="button"]');if(!(s instanceof HTMLElement))return;const r=s.getBoundingClientRect();if(r.width===0||r.height===0)return;const o=Math.max(r.width,r.height)*2,i=document.createElement("span");i.className="ripple-ink",i.style.width=i.style.height=`${o}px`,i.style.left=`${t.clientX-r.left-o/2}px`,i.style.top=`${t.clientY-r.top-o/2}px`,s.classList.add("ripple-host"),s.append(i),i.addEventListener("animationend",()=>i.remove(),{once:!0})},{passive:!0})}Mk();Hd(Pk).mount("#app");
|
|
91
|
+
//# sourceMappingURL=index-2xNGacMZ.js.map
|