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
|
@@ -1,93 +0,0 @@
|
|
|
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 du=Object.defineProperty;var pu=(e,t,n)=>t in e?du(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var C=(e,t,n)=>pu(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 Po(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ke={},Rn=[],bt=()=>{},Gl=()=>!1,ur=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),fr=e=>e.startsWith("onUpdate:"),Ne=Object.assign,Lo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},gu=Object.prototype.hasOwnProperty,pe=(e,t)=>gu.call(e,t),J=Array.isArray,$n=e=>bs(e)==="[object Map]",zl=e=>bs(e)==="[object Set]",xi=e=>bs(e)==="[object Date]",se=e=>typeof e=="function",Re=e=>typeof e=="string",kt=e=>typeof e=="symbol",ge=e=>e!==null&&typeof e=="object",Hl=e=>(ge(e)||se(e))&&se(e.then)&&se(e.catch),Wl=Object.prototype.toString,bs=e=>Wl.call(e),mu=e=>bs(e).slice(8,-1),Vl=e=>bs(e)==="[object Object]",No=e=>Re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Zn=Po(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),hr=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},vu=/-\w/g,tt=hr(e=>e.replace(vu,t=>t.slice(1).toUpperCase())),yu=/\B([A-Z])/g,rn=hr(e=>e.replace(yu,"-$1").toLowerCase()),dr=hr(e=>e.charAt(0).toUpperCase()+e.slice(1)),Pr=hr(e=>e?`on${dr(e)}`:""),Nt=(e,t)=>!Object.is(e,t),Os=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},ql=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Mo=e=>{const t=parseFloat(e);return isNaN(t)?e:t},bu=e=>{const t=Re(e)?Number(e):NaN;return isNaN(t)?e:t};let Ci;const pr=()=>Ci||(Ci=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _s(e){if(J(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Re(s)?Su(s):_s(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Re(e)||ge(e))return e}const _u=/;(?![^(]*\))/g,ku=/:([^]+)/,wu=/\/\*[^]*?\*\//g;function Su(e){const t={};return e.replace(wu,"").split(_u).forEach(n=>{if(n){const s=n.split(ku);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function he(e){let t="";if(Re(e))t=e;else if(J(e))for(let n=0;n<e.length;n++){const s=he(e[n]);s&&(t+=s+" ")}else if(ge(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const xu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Cu=Po(xu);function Kl(e){return!!e||e===""}function Tu(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Oo(e[s],t[s]);return n}function Oo(e,t){if(e===t)return!0;let n=xi(e),s=xi(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=kt(e),s=kt(t),n||s)return e===t;if(n=J(e),s=J(t),n||s)return n&&s?Tu(e,t):!1;if(n=ge(e),s=ge(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||!Oo(e[i],t[i]))return!1}}return String(e)===String(t)}const Yl=e=>!!(e&&e.__v_isRef===!0),D=e=>Re(e)?e:e==null?"":J(e)||ge(e)&&(e.toString===Wl||!se(e.toString))?Yl(e)?D(e.value):JSON.stringify(e,Jl,2):String(e),Jl=(e,t)=>Yl(t)?Jl(e,t.value):$n(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[Lr(s,o)+" =>"]=r,n),{})}:zl(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Lr(n))}:kt(t)?Lr(t):ge(t)&&!J(t)&&!Vl(t)?String(t):t,Lr=(e,t="")=>{var n;return kt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};function Ru(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 Ge;class $u{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&&Ge&&(Ge.active?(this.parent=Ge,this.index=(Ge.scopes||(Ge.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=Ge;try{return Ge=this,t()}finally{Ge=n}}}on(){++this._on===1&&(this.prevScope=Ge,Ge=this)}off(){if(this._on>0&&--this._on===0){if(Ge===this)Ge=this.prevScope;else{let t=Ge;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 Au(){return Ge}let xe;const Nr=new WeakSet;class Zl{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,Ge&&(Ge.active?Ge.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Nr.has(this)&&(Nr.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ql(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Ti(this),ea(this);const t=xe,n=_t;xe=this,_t=!0;try{return this.fn()}finally{ta(this),xe=t,_t=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)jo(t);this.deps=this.depsTail=void 0,Ti(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Nr.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){to(this)&&this.run()}get dirty(){return to(this)}}let Xl=0,Xn,Qn;function Ql(e,t=!1){if(e.flags|=8,t){e.next=Qn,Qn=e;return}e.next=Xn,Xn=e}function Do(){Xl++}function Bo(){if(--Xl>0)return;if(Qn){let t=Qn;for(Qn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Xn;){let t=Xn;for(Xn=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 ea(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ta(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),jo(s),Eu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function to(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(na(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function na(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ls)||(e.globalVersion=ls,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!to(e))))return;e.flags|=2;const t=e.dep,n=xe,s=_t;xe=e,_t=!0;try{ea(e);const r=e.fn(e._value);(t.version===0||Nt(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{xe=n,_t=s,ta(e),e.flags&=-3}}function jo(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)jo(o,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Eu(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 sa=[];function Vt(){sa.push(_t),_t=!1}function qt(){const e=sa.pop();_t=e===void 0?!0:e}function Ti(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=xe;xe=void 0;try{t()}finally{xe=n}}}let ls=0;class Iu{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 Fo{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(!xe||!_t||xe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==xe)n=this.activeLink=new Iu(xe,this),xe.deps?(n.prevDep=xe.depsTail,xe.depsTail.nextDep=n,xe.depsTail=n):xe.deps=xe.depsTail=n,ra(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=xe.depsTail,n.nextDep=void 0,xe.depsTail.nextDep=n,xe.depsTail=n,xe.deps===n&&(xe.deps=s)}return n}trigger(t){this.version++,ls++,this.notify(t)}notify(t){Do();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Bo()}}}function ra(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)ra(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const no=new WeakMap,mn=Symbol(""),so=Symbol(""),as=Symbol("");function We(e,t,n){if(_t&&xe){let s=no.get(e);s||no.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new Fo),r.map=s,r.key=n),r.track()}}function jt(e,t,n,s,r,o){const i=no.get(e);if(!i){ls++;return}const l=a=>{a&&a.trigger()};if(Do(),t==="clear")i.forEach(l);else{const a=J(e),c=a&&No(n);if(a&&n==="length"){const u=Number(s);i.forEach((f,h)=>{(h==="length"||h===as||!kt(h)&&h>=u)&&l(f)})}else switch((n!==void 0||i.has(void 0))&&l(i.get(n)),c&&l(i.get(as)),t){case"add":a?c&&l(i.get("length")):(l(i.get(mn)),$n(e)&&l(i.get(so)));break;case"delete":a||(l(i.get(mn)),$n(e)&&l(i.get(so)));break;case"set":$n(e)&&l(i.get(mn));break}}Bo()}function Sn(e){const t=de(e);return t===e?t:(We(t,"iterate",as),mt(e)?t:t.map(wt))}function gr(e){return We(e=de(e),"iterate",as),e}function Pt(e,t){return Kt(e)?Nn(vn(e)?wt(t):t):wt(t)}const Pu={__proto__:null,[Symbol.iterator](){return Mr(this,Symbol.iterator,e=>Pt(this,e))},concat(...e){return Sn(this).concat(...e.map(t=>J(t)?Sn(t):t))},entries(){return Mr(this,"entries",e=>(e[1]=Pt(this,e[1]),e))},every(e,t){return Mt(this,"every",e,t,void 0,arguments)},filter(e,t){return Mt(this,"filter",e,t,n=>n.map(s=>Pt(this,s)),arguments)},find(e,t){return Mt(this,"find",e,t,n=>Pt(this,n),arguments)},findIndex(e,t){return Mt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Mt(this,"findLast",e,t,n=>Pt(this,n),arguments)},findLastIndex(e,t){return Mt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Mt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Or(this,"includes",e)},indexOf(...e){return Or(this,"indexOf",e)},join(e){return Sn(this).join(e)},lastIndexOf(...e){return Or(this,"lastIndexOf",e)},map(e,t){return Mt(this,"map",e,t,void 0,arguments)},pop(){return Un(this,"pop")},push(...e){return Un(this,"push",e)},reduce(e,...t){return Ri(this,"reduce",e,t)},reduceRight(e,...t){return Ri(this,"reduceRight",e,t)},shift(){return Un(this,"shift")},some(e,t){return Mt(this,"some",e,t,void 0,arguments)},splice(...e){return Un(this,"splice",e)},toReversed(){return Sn(this).toReversed()},toSorted(e){return Sn(this).toSorted(e)},toSpliced(...e){return Sn(this).toSpliced(...e)},unshift(...e){return Un(this,"unshift",e)},values(){return Mr(this,"values",e=>Pt(this,e))}};function Mr(e,t,n){const s=gr(e),r=s[t]();return s!==e&&!mt(e)&&(r._next=r.next,r.next=()=>{const o=r._next();return o.done||(o.value=n(o.value)),o}),r}const Lu=Array.prototype;function Mt(e,t,n,s,r,o){const i=gr(e),l=i!==e&&!mt(e),a=i[t];if(a!==Lu[t]){const f=a.apply(e,o);return l?wt(f):f}let c=n;i!==e&&(l?c=function(f,h){return n.call(this,Pt(e,f),h,e)}:n.length>2&&(c=function(f,h){return n.call(this,f,h,e)}));const u=a.call(i,c,s);return l&&r?r(u):u}function Ri(e,t,n,s){const r=gr(e),o=r!==e&&!mt(e);let i=n,l=!1;r!==e&&(o?(l=s.length===0,i=function(c,u,f){return l&&(l=!1,c=Pt(e,c)),n.call(this,c,Pt(e,u),f,e)}):n.length>3&&(i=function(c,u,f){return n.call(this,c,u,f,e)}));const a=r[t](i,...s);return l?Pt(e,a):a}function Or(e,t,n){const s=de(e);We(s,"iterate",as);const r=s[t](...n);return(r===-1||r===!1)&&Ho(n[0])?(n[0]=de(n[0]),s[t](...n)):r}function Un(e,t,n=[]){Vt(),Do();const s=de(e)[t].apply(e,n);return Bo(),qt(),s}const Nu=Po("__proto__,__v_isRef,__isVue"),oa=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(kt));function Mu(e){kt(e)||(e=String(e));const t=de(this);return We(t,"has",e),t.hasOwnProperty(e)}class ia{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?Wu:ua:o?ca:aa).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const i=J(t);if(!r){let a;if(i&&(a=Pu[n]))return a;if(n==="hasOwnProperty")return Mu}const l=Reflect.get(t,n,Ye(t)?t:s);if((kt(n)?oa.has(n):Nu(n))||(r||We(t,"get",n),o))return l;if(Ye(l)){const a=i&&No(n)?l:l.value;return r&&ge(a)?oo(a):a}return ge(l)?r?oo(l):Go(l):l}}class la extends ia{constructor(t=!1){super(!1,t)}set(t,n,s,r){let o=t[n];const i=J(t)&&No(n);if(!this._isShallow){const c=Kt(o);if(!mt(s)&&!Kt(s)&&(o=de(o),s=de(s)),!i&&Ye(o)&&!Ye(s))return c||(o.value=s),!0}const l=i?Number(n)<t.length:pe(t,n),a=Reflect.set(t,n,s,Ye(t)?t:r);return t===de(r)&&a&&(l?Nt(s,o)&&jt(t,"set",n,s):jt(t,"add",n,s)),a}deleteProperty(t,n){const s=pe(t,n);t[n];const r=Reflect.deleteProperty(t,n);return r&&s&&jt(t,"delete",n,void 0),r}has(t,n){const s=Reflect.has(t,n);return(!kt(n)||!oa.has(n))&&We(t,"has",n),s}ownKeys(t){return We(t,"iterate",J(t)?"length":mn),Reflect.ownKeys(t)}}class Ou extends ia{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Du=new la,Bu=new Ou,ju=new la(!0);const ro=e=>e,Rs=e=>Reflect.getPrototypeOf(e);function Fu(e,t,n){return function(...s){const r=this.__v_raw,o=de(r),i=$n(o),l=e==="entries"||e===Symbol.iterator&&i,a=e==="keys"&&i,c=r[e](...s),u=n?ro:t?Nn:wt;return!t&&We(o,"iterate",a?so:mn),Ne(Object.create(c),{next(){const{value:f,done:h}=c.next();return h?{value:f,done:h}:{value:l?[u(f[0]),u(f[1])]:u(f),done:h}}})}}function $s(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Uu(e,t){const n={get(r){const o=this.__v_raw,i=de(o),l=de(r);e||(Nt(r,l)&&We(i,"get",r),We(i,"get",l));const{has:a}=Rs(i),c=t?ro:e?Nn:wt;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&&We(de(r),"iterate",mn),r.size},has(r){const o=this.__v_raw,i=de(o),l=de(r);return e||(Nt(r,l)&&We(i,"has",r),We(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=de(l),c=t?ro:e?Nn:wt;return!e&&We(a,"iterate",mn),l.forEach((u,f)=>r.call(o,c(u),c(f),i))}};return Ne(n,e?{add:$s("add"),set:$s("set"),delete:$s("delete"),clear:$s("clear")}:{add(r){const o=de(this),i=Rs(o),l=de(r),a=!t&&!mt(r)&&!Kt(r)?l:r;return i.has.call(o,a)||Nt(r,a)&&i.has.call(o,r)||Nt(l,a)&&i.has.call(o,l)||(o.add(a),jt(o,"add",a,a)),this},set(r,o){!t&&!mt(o)&&!Kt(o)&&(o=de(o));const i=de(this),{has:l,get:a}=Rs(i);let c=l.call(i,r);c||(r=de(r),c=l.call(i,r));const u=a.call(i,r);return i.set(r,o),c?Nt(o,u)&&jt(i,"set",r,o):jt(i,"add",r,o),this},delete(r){const o=de(this),{has:i,get:l}=Rs(o);let a=i.call(o,r);a||(r=de(r),a=i.call(o,r)),l&&l.call(o,r);const c=o.delete(r);return a&&jt(o,"delete",r,void 0),c},clear(){const r=de(this),o=r.size!==0,i=r.clear();return o&&jt(r,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=Fu(r,e,t)}),n}function Uo(e,t){const n=Uu(e,t);return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(pe(n,r)&&r in s?n:s,r,o)}const Gu={get:Uo(!1,!1)},zu={get:Uo(!1,!0)},Hu={get:Uo(!0,!1)};const aa=new WeakMap,ca=new WeakMap,ua=new WeakMap,Wu=new WeakMap;function Vu(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Go(e){return Kt(e)?e:zo(e,!1,Du,Gu,aa)}function qu(e){return zo(e,!1,ju,zu,ca)}function oo(e){return zo(e,!0,Bu,Hu,ua)}function zo(e,t,n,s,r){if(!ge(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=Vu(mu(e));if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function vn(e){return Kt(e)?vn(e.__v_raw):!!(e&&e.__v_isReactive)}function Kt(e){return!!(e&&e.__v_isReadonly)}function mt(e){return!!(e&&e.__v_isShallow)}function Ho(e){return e?!!e.__v_raw:!1}function de(e){const t=e&&e.__v_raw;return t?de(t):e}function Ku(e){return!pe(e,"__v_skip")&&Object.isExtensible(e)&&ql(e,"__v_skip",!0),e}const wt=e=>ge(e)?Go(e):e,Nn=e=>ge(e)?oo(e):e;function Ye(e){return e?e.__v_isRef===!0:!1}function K(e){return Yu(e,!1)}function Yu(e,t){return Ye(e)?e:new Ju(e,t)}class Ju{constructor(t,n){this.dep=new Fo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:de(t),this._value=n?t:wt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||mt(t)||Kt(t);t=s?t:de(t),Nt(t,n)&&(this._rawValue=t,this._value=s?t:wt(t),this.dep.trigger())}}function ae(e){return Ye(e)?e.value:e}function Zu(e){return se(e)?e():ae(e)}const Xu={get:(e,t,n)=>t==="__v_raw"?e:ae(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return Ye(r)&&!Ye(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function fa(e){return vn(e)?e:new Proxy(e,Xu)}class Qu{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Fo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ls-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&xe!==this)return Ql(this,!0),!0}get value(){const t=this.dep.track();return na(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function ef(e,t,n=!1){let s,r;return se(e)?s=e:(s=e.get,r=e.set),new Qu(s,r,n)}const As={},Us=new WeakMap;let hn;function tf(e,t=!1,n=hn){if(n){let s=Us.get(n);s||Us.set(n,s=[]),s.push(e)}}function nf(e,t,n=ke){const{immediate:s,deep:r,once:o,scheduler:i,augmentJob:l,call:a}=n,c=A=>r?A:mt(A)||r===!1||r===0?Ft(A,1):Ft(A);let u,f,h,p,d=!1,g=!1;if(Ye(e)?(f=()=>e.value,d=mt(e)):vn(e)?(f=()=>c(e),d=!0):J(e)?(g=!0,d=e.some(A=>vn(A)||mt(A)),f=()=>e.map(A=>{if(Ye(A))return A.value;if(vn(A))return c(A);if(se(A))return a?a(A,2):A()})):se(e)?t?f=a?()=>a(e,2):e:f=()=>{if(h){Vt();try{h()}finally{qt()}}const A=hn;hn=u;try{return a?a(e,3,[p]):e(p)}finally{hn=A}}:f=bt,t&&r){const A=f,F=r===!0?1/0:r;f=()=>Ft(A(),F)}const k=Au(),y=()=>{u.stop(),k&&k.active&&Lo(k.effects,u)};if(o&&t){const A=t;t=(...F)=>{const z=A(...F);return y(),z}}let w=g?new Array(e.length).fill(As):As;const S=A=>{if(!(!(u.flags&1)||!u.dirty&&!A))if(t){const F=u.run();if(A||r||d||(g?F.some((z,B)=>Nt(z,w[B])):Nt(F,w))){h&&h();const z=hn;hn=u;try{const B=[F,w===As?void 0:g&&w[0]===As?[]:w,p];w=F,a?a(t,3,B):t(...B)}finally{hn=z}}}else u.run()};return l&&l(S),u=new Zl(f),u.scheduler=i?()=>i(S,!1):S,p=A=>tf(A,!1,u),h=u.onStop=()=>{const A=Us.get(u);if(A){if(a)a(A,4);else for(const F of A)F();Us.delete(u)}},t?s?S(!0):w=u.run():i?i(S.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function Ft(e,t=1/0,n){if(t<=0||!ge(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ye(e))Ft(e.value,t,n);else if(J(e))for(let s=0;s<e.length;s++)Ft(e[s],t,n);else if(zl(e)||$n(e))e.forEach(s=>{Ft(s,t,n)});else if(Vl(e)){for(const s in e)Ft(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Ft(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 ks(e,t,n,s){try{return s?e(...s):e()}catch(r){mr(r,t,n)}}function vt(e,t,n,s){if(se(e)){const r=ks(e,t,n,s);return r&&Hl(r)&&r.catch(o=>{mr(o,t,n)}),r}if(J(e)){const r=[];for(let o=0;o<e.length;o++)r.push(vt(e[o],t,n,s));return r}}function mr(e,t,n,s=!0){const r=t?t.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||ke;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 f=0;f<u.length;f++)if(u[f](e,a,c)===!1)return}l=l.parent}if(o){Vt(),ks(o,null,10,[e,a,c]),qt();return}}sf(e,n,r,s,i)}function sf(e,t,n,s=!0,r=!1){if(r)throw e;console.error(e)}const Qe=[];let It=-1;const An=[];let en=null,xn=0;const ha=Promise.resolve();let Gs=null;function Ut(e){const t=Gs||ha;return e?t.then(this?e.bind(this):e):t}function rf(e){let t=It+1,n=Qe.length;for(;t<n;){const s=t+n>>>1,r=Qe[s],o=cs(r);o<e||o===e&&r.flags&2?t=s+1:n=s}return t}function Wo(e){if(!(e.flags&1)){const t=cs(e),n=Qe[Qe.length-1];!n||!(e.flags&2)&&t>=cs(n)?Qe.push(e):Qe.splice(rf(t),0,e),e.flags|=1,da()}}function da(){Gs||(Gs=ha.then(ma))}function pa(e){J(e)?An.push(...e):en&&e.id===-1?en.splice(xn+1,0,e):e.flags&1||(An.push(e),e.flags|=1),da()}function $i(e,t,n=It+1){for(;n<Qe.length;n++){const s=Qe[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;Qe.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function ga(e){if(An.length){const t=[...new Set(An)].sort((n,s)=>cs(n)-cs(s));if(An.length=0,en){en.push(...t);return}for(en=t,xn=0;xn<en.length;xn++){const n=en[xn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}en=null,xn=0}}const cs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function ma(e){try{for(It=0;It<Qe.length;It++){const t=Qe[It];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),ks(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;It<Qe.length;It++){const t=Qe[It];t&&(t.flags&=-2)}It=-1,Qe.length=0,ga(),Gs=null,(Qe.length||An.length)&&ma()}}let ze=null,va=null;function zs(e){const t=ze;return ze=e,va=e&&e.type.__scopeId||null,t}function Ee(e,t=ze,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Vs(-1);const o=zs(t),i=Wt.length;let l;try{l=e(...r)}finally{for(let a=Wt.length;a>i;a--)Xo();zs(o),s._d&&Vs(1)}return l};return s._n=!0,s._c=!0,s._d=!0,s}function vr(e,t){if(ze===null)return e;const n=Sr(ze),s=e.dirs||(e.dirs=[]);for(let r=0;r<t.length;r++){let[o,i,l,a=ke]=t[r];o&&(se(o)&&(o={mounted:o,updated:o}),o.deep&&Ft(i),s.push({dir:o,instance:n,value:i,oldValue:void 0,arg:l,modifiers:a}))}return e}function cn(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&&(Vt(),vt(a,n,8,[e.el,l,e,t]),qt())}}function ya(e,t){if(qe){let n=qe.provides;const s=qe.parent&&qe.parent.provides;s===n&&(n=qe.provides=Object.create(s)),n[e]=t}}function es(e,t,n=!1){const s=wr();if(s||In){let r=In?In._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&&se(t)?t.call(s&&s.proxy):t}}const of=Symbol.for("v-scx"),lf=()=>es(of);function je(e,t,n){return ba(e,t,n)}function ba(e,t,n=ke){const{immediate:s,deep:r,flush:o,once:i}=n,l=Ne({},n),a=t&&s||!t&&o!=="post";let c;if(ds){if(o==="sync"){const p=lf();c=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=bt,p.resume=bt,p.pause=bt,p}}const u=qe;l.call=(p,d,g)=>vt(p,u,d,g);let f=!1;o==="post"?l.scheduler=p=>{Xe(p,u&&u.suspense)}:o!=="sync"&&(f=!0,l.scheduler=(p,d)=>{d?p():Wo(p)}),l.augmentJob=p=>{t&&(p.flags|=4),f&&(p.flags|=2,u&&(p.id=u.uid,p.i=u))};const h=nf(e,t,l);return ds&&(c?c.push(h):a&&h()),h}function af(e,t,n){const s=this.proxy,r=Re(e)?e.includes(".")?_a(s,e):()=>s[e]:e.bind(s,s);let o;se(t)?o=t:(o=t.handler,n=t);const i=Ss(this),l=ba(r,o.bind(s),n);return i(),l}function _a(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 Xt=new WeakMap,ka=Symbol("_vte"),wa=e=>e.__isTeleport,dn=e=>e&&(e.disabled||e.disabled===""),cf=e=>e&&(e.defer||e.defer===""),Ai=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Ei=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,io=(e,t)=>{const n=e&&e.to;return Re(n)?t?t(n):null:n},uf={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,o,i,l,a,c){const{mc:u,pc:f,pbc:h,o:{insert:p,querySelector:d,createText:g,createComment:k,parentNode:y}}=c,w=dn(t.props);let{dynamicChildren:S}=t;const A=(B,Z,U)=>{B.shapeFlag&16&&u(B.children,Z,U,r,o,i,l,a)},F=(B=t)=>{const Z=dn(B.props),U=B.target=io(B.props,d),V=lo(U,B,g,p);U&&(i!=="svg"&&Ai(U)?i="svg":i!=="mathml"&&Ei(U)&&(i="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(U),Z||(A(B,U,V),qn(B,!1)))},z=B=>{const Z=()=>{if(Xt.get(B)===Z){if(Xt.delete(B),dn(B.props)){const U=y(B.el)||n;A(B,U,B.anchor),qn(B,!0)}F(B)}};Xt.set(B,Z),Xe(Z,o)};if(e==null){const B=t.el=g(""),Z=t.anchor=g("");if(p(B,n,s),p(Z,n,s),cf(t.props)||o&&o.pendingBranch){z(t);return}w&&(A(t,n,Z),qn(t,!0)),F()}else{t.el=e.el;const B=t.anchor=e.anchor,Z=Xt.get(e);if(Z){Z.flags|=8,Xt.delete(e),z(t);return}t.targetStart=e.targetStart;const U=t.target=e.target,V=t.targetAnchor=e.targetAnchor,re=dn(e.props),j=re?n:U,Q=re?B:V;if(i==="svg"||Ai(U)?i="svg":(i==="mathml"||Ei(U))&&(i="mathml"),S?(h(e.dynamicChildren,S,j,r,o,i,l),Zo(e,t,!0)):a||f(e,t,j,Q,r,o,i,l,!1),w)re?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Es(t,n,B,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const te=io(t.props,d);te&&(t.target=te,Es(t,te,null,c,0))}else re&&Es(t,U,V,c,1);qn(t,w)}},remove(e,t,n,{um:s,o:{remove:r}},o){const{shapeFlag:i,children:l,anchor:a,targetStart:c,targetAnchor:u,target:f,props:h}=e,p=dn(h),d=o||!p,g=Xt.get(e);if(g&&(g.flags|=8,Xt.delete(e)),f&&(r(c),r(u)),o&&r(a),!g&&(p||f)&&i&16)for(let k=0;k<l.length;k++){const y=l[k];s(y,t,n,d,!!y.dynamicChildren)}},move:Es,hydrate:ff};function Es(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,f=o===2;if(f&&s(i,t,n),!Xt.has(e)&&(!f||dn(u))&&a&16)for(let h=0;h<c.length;h++)r(c[h],t,n,2);f&&s(l,t,n)}function ff(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:a,insert:c,createText:u}},f){function h(k,y){let w=y;for(;w;){if(w&&w.nodeType===8){if(w.data==="teleport start anchor")t.targetStart=w;else if(w.data==="teleport anchor"){t.targetAnchor=w,k._lpa=t.targetAnchor&&i(t.targetAnchor);break}}w=i(w)}}function p(k,y){y.anchor=f(i(k),y,l(k),n,s,r,o)}const d=t.target=io(t.props,a),g=dn(t.props);if(d){const k=d._lpa||d.firstChild;t.shapeFlag&16&&(g?(p(e,t),h(d,k),t.targetAnchor||lo(d,t,u,c,l(e)===d?e:null)):(t.anchor=i(e),h(d,k),t.targetAnchor||lo(d,t,u,c),f(k&&i(k),t,d,n,s,r,o))),qn(t,g)}else g&&t.shapeFlag&16&&(p(e,t),t.targetStart=e,t.targetAnchor=i(e));return t.anchor&&i(t.anchor)}const Vo=uf;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 lo(e,t,n,s,r=null){const o=t.targetStart=n(""),i=t.targetAnchor=n("");return o[ka]=i,e&&(s(o,e,r),s(i,e,r)),i}const pt=Symbol("_leaveCb"),Gn=Symbol("_enterCb");function Sa(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return on(()=>{e.isMounted=!0}),ws(()=>{e.isUnmounting=!0}),e}const ht=[Function,Array],xa={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ht,onEnter:ht,onAfterEnter:ht,onEnterCancelled:ht,onBeforeLeave:ht,onLeave:ht,onAfterLeave:ht,onLeaveCancelled:ht,onBeforeAppear:ht,onAppear:ht,onAfterAppear:ht,onAppearCancelled:ht},Ca=e=>{const t=e.subTree;return t.component?Ca(t.component):t},hf={name:"BaseTransition",props:xa,setup(e,{slots:t}){const n=wr(),s=Sa();return()=>{const r=t.default&&qo(t.default(),!0),o=r&&r.length?Ta(r):n.subTree?W():void 0;if(!o)return;const i=de(e),{mode:l}=i;if(s.isLeaving)return Dr(o);const a=Ii(o);if(!a)return Dr(o);let c=us(a,i,s,n,f=>c=f);a.type!==Ve&&bn(a,c);let u=n.subTree&&Ii(n.subTree);if(u&&u.type!==Ve&&!pn(u,a)&&Ca(n).type!==Ve){let f=us(u,i,s,n);if(bn(u,f),l==="out-in"&&a.type!==Ve)return s.isLeaving=!0,f.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete f.afterLeave,u=void 0},Dr(o);l==="in-out"&&a.type!==Ve?f.delayLeave=(h,p,d)=>{const g=Ra(s,u);g[String(u.key)]=u,h[pt]=()=>{p(),h[pt]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{d(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function Ta(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ve){t=n;break}}return t}const df=hf;function Ra(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 us(e,t,n,s,r){const{appear:o,mode:i,persisted:l=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:f,onBeforeLeave:h,onLeave:p,onAfterLeave:d,onLeaveCancelled:g,onBeforeAppear:k,onAppear:y,onAfterAppear:w,onAppearCancelled:S}=t,A=String(e.key),F=Ra(n,e),z=(U,V)=>{U&&vt(U,s,9,V)},B=(U,V)=>{const re=V[1];z(U,V),J(U)?U.every(j=>j.length<=1)&&re():U.length<=1&&re()},Z={mode:i,persisted:l,beforeEnter(U){let V=a;if(!n.isMounted)if(o)V=k||a;else return;U[pt]&&U[pt](!0);const re=F[A];re&&pn(e,re)&&re.el[pt]&&re.el[pt](),z(V,[U])},enter(U){if(F[A]===e)return;let V=c,re=u,j=f;if(!n.isMounted)if(o)V=y||c,re=w||u,j=S||f;else return;let Q=!1;U[Gn]=Ae=>{Q||(Q=!0,Ae?z(j,[U]):z(re,[U]),Z.delayedLeave&&Z.delayedLeave(),U[Gn]=void 0)};const te=U[Gn].bind(null,!1);V?B(V,[U,te]):te()},leave(U,V){const re=String(e.key);if(U[Gn]&&U[Gn](!0),n.isUnmounting)return V();z(h,[U]);let j=!1;U[pt]=te=>{j||(j=!0,V(),te?z(g,[U]):z(d,[U]),U[pt]=void 0,F[re]===e&&delete F[re])};const Q=U[pt].bind(null,!1);F[re]=e,p?B(p,[U,Q]):Q()},clone(U){const V=us(U,t,n,s,r);return r&&r(V),V}};return Z}function Dr(e){if(yr(e))return e=sn(e),e.children=null,e}function Ii(e){if(!yr(e))return wa(e.type)&&e.children?Ta(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&&se(n.default))return n.default()}}function bn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,bn(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 qo(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===oe?(i.patchFlag&128&&r++,s=s.concat(qo(i.children,t,l))):(t||i.type!==Ve)&&s.push(l!=null?sn(i,{key:l}):i)}if(r>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function Ce(e,t){return se(e)?Ne({name:e.name},t,{setup:e}):e}function $a(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Pi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const Hs=new WeakMap;function ts(e,t,n,s,r=!1){if(J(e)){e.forEach((g,k)=>ts(g,t&&(J(t)?t[k]:t),n,s,r));return}if(En(s)&&!r){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ts(e,t,n,s.component.subTree);return}const o=s.shapeFlag&4?Sr(s.component):s.el,i=r?null:o,{i:l,r:a}=e,c=t&&t.r,u=l.refs===ke?l.refs={}:l.refs,f=l.setupState,h=de(f),p=f===ke?Gl:g=>Pi(u,g)?!1:pe(h,g),d=(g,k)=>!(k&&Pi(u,k));if(c!=null&&c!==a){if(Li(t),Re(c))u[c]=null,p(c)&&(f[c]=null);else if(Ye(c)){const g=t;d(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(se(a))ks(a,l,12,[i,u]);else{const g=Re(a),k=Ye(a);if(g||k){const y=()=>{if(e.f){const w=g?p(a)?f[a]:u[a]:d()||!e.k?a.value:u[e.k];if(r)J(w)&&Lo(w,o);else if(J(w))w.includes(o)||w.push(o);else if(g)u[a]=[o],p(a)&&(f[a]=u[a]);else{const S=[o];d(a,e.k)&&(a.value=S),e.k&&(u[e.k]=S)}}else g?(u[a]=i,p(a)&&(f[a]=i)):k&&(d(a,e.k)&&(a.value=i),e.k&&(u[e.k]=i))};if(i){const w=()=>{y(),Hs.delete(e)};w.id=-1,Hs.set(e,w),Xe(w,n)}else Li(e),y()}}}function Li(e){const t=Hs.get(e);t&&(t.flags|=8,Hs.delete(e))}pr().requestIdleCallback;pr().cancelIdleCallback;const En=e=>!!e.type.__asyncLoader,yr=e=>e.type.__isKeepAlive;function pf(e,t){Aa(e,"a",t)}function gf(e,t){Aa(e,"da",t)}function Aa(e,t,n=qe){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(br(t,s,n),n){let r=n.parent;for(;r&&r.parent;)yr(r.parent.vnode)&&mf(s,t,n,r),r=r.parent}}function mf(e,t,n,s){const r=br(t,e,s,!0);Ko(()=>{Lo(s[t],r)},n)}function br(e,t,n=qe,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{Vt();const l=Ss(n),a=vt(t,n,e,i);return l(),qt(),a});return s?r.unshift(o):r.push(o),o}}const Yt=e=>(t,n=qe)=>{(!ds||e==="sp")&&br(e,(...s)=>t(...s),n)},vf=Yt("bm"),on=Yt("m"),Ea=Yt("bu"),Ia=Yt("u"),ws=Yt("bum"),Ko=Yt("um"),yf=Yt("sp"),bf=Yt("rtg"),_f=Yt("rtc");function kf(e,t=qe){br("ec",e,t)}const wf="components",Pa=Symbol.for("v-ndc");function Sf(e){return Re(e)?xf(wf,e,!1)||e:e||Pa}function xf(e,t,n=!0,s=!1){const r=ze||qe;if(r){const o=r.type;{const l=ah(o,!1);if(l&&(l===t||l===tt(t)||l===dr(tt(t))))return o}const i=Ni(r[e]||o[e],t)||Ni(r.appContext[e],t);return!i&&s?o:i}}function Ni(e,t){return e&&(e[t]||e[tt(t)]||e[dr(tt(t))])}function nt(e,t,n,s){let r;const o=n,i=J(e);if(i||Re(e)){const l=i&&vn(e);let a=!1,c=!1;l&&(a=!mt(e),c=Kt(e),e=gr(e)),r=new Array(e.length);for(let u=0,f=e.length;u<f;u++)r[u]=t(a?c?Nn(wt(e[u])):wt(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(ge(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 ns(e,t,n={},s,r,o){if(ze.ce||ze.parent&&En(ze.parent)&&ze.parent.ce){const c=n,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),T(),$e(oe,null,[ie("slot",c,s&&s())],u?-2:64)}let i=e[t];i&&i._c&&(i._d=!1);const l=Wt.length;T();let a;try{const c=i&&La(i(n)),u=n.key||o||c&&c.key;a=$e(oe,{key:(u&&!kt(u)?u:`_${t}`)+(!c&&s?"_fb":"")},c||(s?s():[]),c&&e._===1?64:-2)}catch(c){for(let u=Wt.length;u>l;u--)Xo();throw c}finally{i&&i._c&&(i._d=!0)}return a}function La(e){return e.some(t=>hs(t)?!(t.type===Ve||t.type===oe&&!La(t.children)):!0)?e:null}const ao=e=>e?Xa(e)?Sr(e):ao(e.parent):null,ss=Ne(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=>ao(e.parent),$root:e=>ao(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ma(e),$forceUpdate:e=>e.f||(e.f=()=>{Wo(e.update)}),$nextTick:e=>e.n||(e.n=Ut.bind(e.proxy)),$watch:e=>af.bind(e)}),Br=(e,t)=>e!==ke&&!e.__isScriptSetup&&pe(e,t),Cf={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(Br(s,t))return i[t]=1,s[t];if(r!==ke&&pe(r,t))return i[t]=2,r[t];if(pe(o,t))return i[t]=3,o[t];if(n!==ke&&pe(n,t))return i[t]=4,n[t];co&&(i[t]=0)}}const c=ss[t];let u,f;if(c)return t==="$attrs"&&We(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(n!==ke&&pe(n,t))return i[t]=4,n[t];if(f=a.config.globalProperties,pe(f,t))return f[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;return Br(r,t)?(r[t]=n,!0):s!==ke&&pe(s,t)?(s[t]=n,!0):pe(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!==ke&&l[0]!=="$"&&pe(e,l)||Br(t,l)||pe(o,l)||pe(s,l)||pe(ss,l)||pe(r.config.globalProperties,l)||(a=i.__cssModules)&&a[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:pe(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Mi(e){return J(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let co=!0;function Tf(e){const t=Ma(e),n=e.proxy,s=e.ctx;co=!1,t.beforeCreate&&Oi(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:a,inject:c,created:u,beforeMount:f,mounted:h,beforeUpdate:p,updated:d,activated:g,deactivated:k,beforeDestroy:y,beforeUnmount:w,destroyed:S,unmounted:A,render:F,renderTracked:z,renderTriggered:B,errorCaptured:Z,serverPrefetch:U,expose:V,inheritAttrs:re,components:j,directives:Q,filters:te}=t;if(c&&Rf(c,s,null),i)for(const ue in i){const ce=i[ue];se(ce)&&(s[ue]=ce.bind(n))}if(r){const ue=r.call(n,n);ge(ue)&&(e.data=Go(ue))}if(co=!0,o)for(const ue in o){const ce=o[ue],Je=se(ce)?ce.bind(n,n):se(ce.get)?ce.get.bind(n,n):bt,ut=!se(ce)&&se(ce.set)?ce.set.bind(n):bt,ot=H({get:Je,set:ut});Object.defineProperty(s,ue,{enumerable:!0,configurable:!0,get:()=>ot.value,set:Fe=>ot.value=Fe})}if(l)for(const ue in l)Na(l[ue],s,n,ue);if(a){const ue=se(a)?a.call(n):a;Reflect.ownKeys(ue).forEach(ce=>{ya(ce,ue[ce])})}u&&Oi(u,e,"c");function le(ue,ce){J(ce)?ce.forEach(Je=>ue(Je.bind(n))):ce&&ue(ce.bind(n))}if(le(vf,f),le(on,h),le(Ea,p),le(Ia,d),le(pf,g),le(gf,k),le(kf,Z),le(_f,z),le(bf,B),le(ws,w),le(Ko,A),le(yf,U),J(V))if(V.length){const ue=e.exposed||(e.exposed={});V.forEach(ce=>{Object.defineProperty(ue,ce,{get:()=>n[ce],set:Je=>n[ce]=Je,enumerable:!0})})}else e.exposed||(e.exposed={});F&&e.render===bt&&(e.render=F),re!=null&&(e.inheritAttrs=re),j&&(e.components=j),Q&&(e.directives=Q),U&&$a(e)}function Rf(e,t,n=bt){J(e)&&(e=uo(e));for(const s in e){const r=e[s];let o;ge(r)?"default"in r?o=es(r.from||s,r.default,!0):o=es(r.from||s):o=es(r),Ye(o)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:i=>o.value=i}):t[s]=o}}function Oi(e,t,n){vt(J(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Na(e,t,n,s){let r=s.includes(".")?_a(n,s):()=>n[s];if(Re(e)){const o=t[e];se(o)&&je(r,o)}else if(se(e))je(r,e.bind(n));else if(ge(e))if(J(e))e.forEach(o=>Na(o,t,n,s));else{const o=se(e.handler)?e.handler.bind(n):t[e.handler];se(o)&&je(r,o,e)}}function Ma(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=>Ws(a,c,i,!0)),Ws(a,t,i)),ge(t)&&o.set(t,a),a}function Ws(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Ws(e,o,n,!0),r&&r.forEach(i=>Ws(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=$f[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const $f={data:Di,props:Bi,emits:Bi,methods:Kn,computed:Kn,beforeCreate:Ze,created:Ze,beforeMount:Ze,mounted:Ze,beforeUpdate:Ze,updated:Ze,beforeDestroy:Ze,beforeUnmount:Ze,destroyed:Ze,unmounted:Ze,activated:Ze,deactivated:Ze,errorCaptured:Ze,serverPrefetch:Ze,components:Kn,directives:Kn,watch:Ef,provide:Di,inject:Af};function Di(e,t){return t?e?function(){return Ne(se(e)?e.call(this,this):e,se(t)?t.call(this,this):t)}:t:e}function Af(e,t){return Kn(uo(e),uo(t))}function uo(e){if(J(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ze(e,t){return e?[...new Set([].concat(e,t))]:t}function Kn(e,t){return e?Ne(Object.create(null),e,t):t}function Bi(e,t){return e?J(e)&&J(t)?[...new Set([...e,...t])]:Ne(Object.create(null),Mi(e),Mi(t??{})):t}function Ef(e,t){if(!e)return t;if(!t)return e;const n=Ne(Object.create(null),e);for(const s in t)n[s]=Ze(e[s],t[s]);return n}function Oa(){return{app:null,config:{isNativeTag:Gl,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 If=0;function Pf(e,t){return function(s,r=null){se(s)||(s=Ne({},s)),r!=null&&!ge(r)&&(r=null);const o=Oa(),i=new WeakSet,l=[];let a=!1;const c=o.app={_uid:If++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:uh,get config(){return o.config},set config(u){},use(u,...f){return i.has(u)||(u&&se(u.install)?(i.add(u),u.install(c,...f)):se(u)&&(i.add(u),u(c,...f))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,f){return f?(o.components[u]=f,c):o.components[u]},directive(u,f){return f?(o.directives[u]=f,c):o.directives[u]},mount(u,f,h){if(!a){const p=c._ceVNode||ie(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,Sr(p.component)}},onUnmount(u){l.push(u)},unmount(){a&&(vt(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,f){return o.provides[u]=f,c},runWithContext(u){const f=In;In=c;try{return u()}finally{In=f}}};return c}}let In=null;const Lf=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${tt(t)}Modifiers`]||e[`${rn(t)}Modifiers`];function Nf(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||ke;let r=n;const o=t.startsWith("update:"),i=o&&Lf(s,t.slice(7));i&&(i.trim&&(r=n.map(u=>Re(u)?u.trim():u)),i.number&&(r=n.map(Mo)));let l,a=s[l=Pr(t)]||s[l=Pr(tt(t))];!a&&o&&(a=s[l=Pr(rn(t))]),a&&vt(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,vt(c,e,6,r)}}const Mf=new WeakMap;function Da(e,t,n=!1){const s=n?Mf:t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!se(e)){const a=c=>{const u=Da(c,t,!0);u&&(l=!0,Ne(i,u))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!o&&!l?(ge(e)&&s.set(e,null),null):(J(o)?o.forEach(a=>i[a]=null):Ne(i,o),ge(e)&&s.set(e,i),i)}function _r(e,t){return!e||!ur(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),pe(e,t[0].toLowerCase()+t.slice(1))||pe(e,rn(t))||pe(e,t))}function ji(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[o],slots:i,attrs:l,emit:a,render:c,renderCache:u,props:f,data:h,setupState:p,ctx:d,inheritAttrs:g}=e,k=zs(e);let y,w;try{if(n.shapeFlag&4){const A=r||s,F=A;y=Lt(c.call(F,A,u,f,p,h,d)),w=l}else{const A=t;y=Lt(A.length>1?A(f,{attrs:l,slots:i,emit:a}):A(f,null)),w=t.props?l:Of(l)}}catch(A){Wt.length=0,mr(A,e,1),y=ie(Ve)}let S=y;if(w&&g!==!1){const A=Object.keys(w),{shapeFlag:F}=S;A.length&&F&7&&(o&&A.some(fr)&&(w=Df(w,o)),S=sn(S,w,!1,!0))}return n.dirs&&(S=sn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&bn(S,n.transition),y=S,zs(k),y}const Of=e=>{let t;for(const n in e)(n==="class"||n==="style"||ur(n))&&((t||(t={}))[n]=e[n]);return t},Df=(e,t)=>{const n={};for(const s in e)(!fr(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Bf(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?Fi(s,i,c):!!i;if(a&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const h=u[f];if(Ba(i,s,h)&&!_r(c,h))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?Fi(s,i,c):!0:!!i;return!1}function Fi(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(Ba(t,e,o)&&!_r(n,o))return!0}return!1}function Ba(e,t,n){const s=e[n],r=t[n];return n==="style"&&ge(s)&&ge(r)?!Oo(s,r):s!==r}function jf({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 ja={},Fa=()=>Object.create(ja),Ua=e=>Object.getPrototypeOf(e)===ja;function Ff(e,t,n,s=!1){const r={},o=Fa();e.propsDefaults=Object.create(null),Ga(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:qu(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function Uf(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=de(r),[a]=e.propsOptions;let c=!1;if((s||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let h=u[f];if(_r(e.emitsOptions,h))continue;const p=t[h];if(a)if(pe(o,h))p!==o[h]&&(o[h]=p,c=!0);else{const d=tt(h);r[d]=fo(a,l,d,p,e,!1)}else p!==o[h]&&(o[h]=p,c=!0)}}}else{Ga(e,t,r,o)&&(c=!0);let u;for(const f in l)(!t||!pe(t,f)&&((u=rn(f))===f||!pe(t,u)))&&(a?n&&(n[f]!==void 0||n[u]!==void 0)&&(r[f]=fo(a,l,f,void 0,e,!0)):delete r[f]);if(o!==l)for(const f in o)(!t||!pe(t,f))&&(delete o[f],c=!0)}c&&jt(e.attrs,"set","")}function Ga(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let a in t){if(Zn(a))continue;const c=t[a];let u;r&&pe(r,u=tt(a))?!o||!o.includes(u)?n[u]=c:(l||(l={}))[u]=c:_r(e.emitsOptions,a)||(!(a in s)||c!==s[a])&&(s[a]=c,i=!0)}if(o){const a=de(n),c=l||ke;for(let u=0;u<o.length;u++){const f=o[u];n[f]=fo(r,a,f,c[f],e,!pe(c,f))}}return i}function fo(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=pe(i,"default");if(l&&s===void 0){const a=i.default;if(i.type!==Function&&!i.skipFactory&&se(a)){const{propsDefaults:c}=r;if(n in c)s=c[n];else{const u=Ss(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===rn(n))&&(s=!0))}return s}const Gf=new WeakMap;function za(e,t,n=!1){const s=n?Gf:t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let a=!1;if(!se(e)){const u=f=>{a=!0;const[h,p]=za(f,t,!0);Ne(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 ge(e)&&s.set(e,Rn),Rn;if(J(o))for(let u=0;u<o.length;u++){const f=tt(o[u]);Ui(f)&&(i[f]=ke)}else if(o)for(const u in o){const f=tt(u);if(Ui(f)){const h=o[u],p=i[f]=J(h)||se(h)?{type:h}:Ne({},h),d=p.type;let g=!1,k=!0;if(J(d))for(let y=0;y<d.length;++y){const w=d[y],S=se(w)&&w.name;if(S==="Boolean"){g=!0;break}else S==="String"&&(k=!1)}else g=se(d)&&d.name==="Boolean";p[0]=g,p[1]=k,(g||pe(p,"default"))&&l.push(f)}}const c=[i,l];return ge(e)&&s.set(e,c),c}function Ui(e){return e[0]!=="$"&&!Zn(e)}const Yo=e=>e==="_"||e==="_ctx"||e==="$stable",Jo=e=>J(e)?e.map(Lt):[Lt(e)],zf=(e,t,n)=>{if(t._n)return t;const s=Ee((...r)=>Jo(t(...r)),n);return s._c=!1,s},Ha=(e,t,n)=>{const s=e._ctx;for(const r in e){if(Yo(r))continue;const o=e[r];if(se(o))t[r]=zf(r,o,s);else if(o!=null){const i=Jo(o);t[r]=()=>i}}},Wa=(e,t)=>{const n=Jo(t);e.slots.default=()=>n},Va=(e,t,n)=>{for(const s in t)(n||!Yo(s))&&(e[s]=t[s])},Hf=(e,t,n)=>{const s=e.slots=Fa();if(e.vnode.shapeFlag&32){const r=t._;r?(Va(s,t,n),n&&ql(s,"_",r,!0)):Ha(t,s)}else t&&Wa(e,t)},Wf=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=ke;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:Va(r,t,n):(o=!t.$stable,Ha(t,r)),i=t}else t&&(Wa(e,t),i={default:1});if(o)for(const l in r)!Yo(l)&&i[l]==null&&delete r[l]},Xe=Jf;function Vf(e){return qf(e)}function qf(e,t){const n=pr();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:a,setText:c,setElementText:u,parentNode:f,nextSibling:h,setScopeId:p=bt,insertStaticContent:d}=e,g=(m,b,R,v=null,x=null,$=null,E=void 0,N=null,O=!!b.dynamicChildren)=>{if(m===b)return;m&&!pn(m,b)&&(v=P(m),Fe(m,x,$,!0),m=null),b.patchFlag===-2&&(O=!1,b.dynamicChildren=null);const{type:L,ref:Y,shapeFlag:G}=b;switch(L){case kr:k(m,b,R,v);break;case Ve:y(m,b,R,v);break;case rs:m==null&&w(b,R,v,E);break;case oe:j(m,b,R,v,x,$,E,N,O);break;default:G&1?F(m,b,R,v,x,$,E,N,O):G&6?Q(m,b,R,v,x,$,E,N,O):(G&64||G&128)&&L.process(m,b,R,v,x,$,E,N,O,yt)}Y!=null&&x?ts(Y,m&&m.ref,$,b||m,!b):Y==null&&m&&m.ref!=null&&ts(m.ref,null,$,m,!0)},k=(m,b,R,v)=>{if(m==null)s(b.el=l(b.children),R,v);else{const x=b.el=m.el;b.children!==m.children&&c(x,b.children)}},y=(m,b,R,v)=>{m==null?s(b.el=a(b.children||""),R,v):b.el=m.el},w=(m,b,R,v)=>{[m.el,m.anchor]=d(m.children,b,R,v,m.el,m.anchor)},S=({el:m,anchor:b},R,v)=>{let x;for(;m&&m!==b;)x=h(m),s(m,R,v),m=x;s(b,R,v)},A=({el:m,anchor:b})=>{let R;for(;m&&m!==b;)R=h(m),r(m),m=R;r(b)},F=(m,b,R,v,x,$,E,N,O)=>{if(b.type==="svg"?E="svg":b.type==="math"&&(E="mathml"),m==null)z(b,R,v,x,$,E,N,O);else{const L=m.el&&m.el._isVueCE?m.el:null;try{L&&L._beginPatch(),U(m,b,x,$,E,N,O)}finally{L&&L._endPatch()}}},z=(m,b,R,v,x,$,E,N)=>{let O,L;const{props:Y,shapeFlag:G,transition:q,dirs:ee}=m;if(O=m.el=i(m.type,$,Y&&Y.is,Y),G&8?u(O,m.children):G&16&&Z(m.children,O,null,v,x,jr(m,$),E,N),ee&&cn(m,null,v,"created"),B(O,m,m.scopeId,E,v),Y){for(const be in Y)be!=="value"&&!Zn(be)&&o(O,be,null,Y[be],$,v);"value"in Y&&o(O,"value",null,Y.value,$),(L=Y.onVnodeBeforeMount)&&Tt(L,v,m)}ee&&cn(m,null,v,"beforeMount");const fe=Kf(x,q);fe&&q.beforeEnter(O),s(O,b,R),((L=Y&&Y.onVnodeMounted)||fe||ee)&&Xe(()=>{try{L&&Tt(L,v,m),fe&&q.enter(O),ee&&cn(m,null,v,"mounted")}finally{}},x)},B=(m,b,R,v,x)=>{if(R&&p(m,R),v)for(let $=0;$<v.length;$++)p(m,v[$]);if(x){let $=x.subTree;if(b===$||Ya($.type)&&($.ssContent===b||$.ssFallback===b)){const E=x.vnode;B(m,E,E.scopeId,E.slotScopeIds,x.parent)}}},Z=(m,b,R,v,x,$,E,N,O=0)=>{for(let L=O;L<m.length;L++){const Y=m[L]=N?Bt(m[L]):Lt(m[L]);g(null,Y,b,R,v,x,$,E,N)}},U=(m,b,R,v,x,$,E)=>{const N=b.el=m.el;let{patchFlag:O,dynamicChildren:L,dirs:Y}=b;O|=m.patchFlag&16;const G=m.props||ke,q=b.props||ke;let ee;if(R&&un(R,!1),(ee=q.onVnodeBeforeUpdate)&&Tt(ee,R,b,m),Y&&cn(b,m,R,"beforeUpdate"),R&&un(R,!0),L&&(!m.dynamicChildren||m.dynamicChildren.length!==L.length)&&(O=0,E=!1,L=null),(G.innerHTML&&q.innerHTML==null||G.textContent&&q.textContent==null)&&u(N,""),L?V(m.dynamicChildren,L,N,R,v,jr(b,x),$):E||ce(m,b,N,null,R,v,jr(b,x),$,!1),O>0){if(O&16)re(N,G,q,R,x);else if(O&2&&G.class!==q.class&&o(N,"class",null,q.class,x),O&4&&o(N,"style",G.style,q.style,x),O&8){const fe=b.dynamicProps;for(let be=0;be<fe.length;be++){const ye=fe[be],Ie=G[ye],Ue=q[ye];(Ue!==Ie||ye==="value")&&o(N,ye,Ie,Ue,x,R)}}O&1&&m.children!==b.children&&u(N,b.children)}else!E&&L==null&&re(N,G,q,R,x);((ee=q.onVnodeUpdated)||Y)&&Xe(()=>{ee&&Tt(ee,R,b,m),Y&&cn(b,m,R,"updated")},v)},V=(m,b,R,v,x,$,E)=>{for(let N=0;N<b.length;N++){const O=m[N],L=b[N],Y=O.el&&(O.type===oe||!pn(O,L)||O.shapeFlag&198)?f(O.el):R;g(O,L,Y,null,v,x,$,E,!0)}},re=(m,b,R,v,x)=>{if(b!==R){if(b!==ke)for(const $ in b)!Zn($)&&!($ in R)&&o(m,$,b[$],null,x,v);for(const $ in R){if(Zn($))continue;const E=R[$],N=b[$];E!==N&&$!=="value"&&o(m,$,N,E,x,v)}"value"in R&&o(m,"value",b.value,R.value,x)}},j=(m,b,R,v,x,$,E,N,O)=>{const L=b.el=m?m.el:l(""),Y=b.anchor=m?m.anchor:l("");let{patchFlag:G,dynamicChildren:q,slotScopeIds:ee}=b;ee&&(N=N?N.concat(ee):ee),m==null?(s(L,R,v),s(Y,R,v),Z(b.children||[],R,Y,x,$,E,N,O)):G>0&&G&64&&q&&m.dynamicChildren&&m.dynamicChildren.length===q.length?(V(m.dynamicChildren,q,R,x,$,E,N),(b.key!=null||x&&b===x.subTree)&&Zo(m,b,!0)):ce(m,b,R,Y,x,$,E,N,O)},Q=(m,b,R,v,x,$,E,N,O)=>{b.slotScopeIds=N,m==null?b.shapeFlag&512?x.ctx.activate(b,R,v,E,O):te(b,R,v,x,$,E,O):Ae(m,b,O)},te=(m,b,R,v,x,$,E)=>{const N=m.component=sh(m,v,x);if(yr(m)&&(N.ctx.renderer=yt),rh(N,!1,E),N.asyncDep){if(x&&x.registerDep(N,le,E),!m.el){const O=N.subTree=ie(Ve);y(null,O,b,R),m.placeholder=O.el}}else le(N,m,b,R,x,$,E)},Ae=(m,b,R)=>{const v=b.component=m.component;if(Bf(m,b,R))if(v.asyncDep&&!v.asyncResolved){ue(v,b,R);return}else v.next=b,v.update();else b.el=m.el,v.vnode=b},le=(m,b,R,v,x,$,E)=>{const N=()=>{if(m.isMounted){let{next:G,bu:q,u:ee,parent:fe,vnode:be}=m;{const xt=qa(m);if(xt){G&&(G.el=be.el,ue(m,G,E)),xt.asyncDep.then(()=>{Xe(()=>{m.isUnmounted||L()},x)});return}}let ye=G,Ie;un(m,!1),G?(G.el=be.el,ue(m,G,E)):G=be,q&&Os(q),(Ie=G.props&&G.props.onVnodeBeforeUpdate)&&Tt(Ie,fe,G,be),un(m,!0);const Ue=ji(m),St=m.subTree;m.subTree=Ue,g(St,Ue,f(St.el),P(St),m,x,$),G.el=Ue.el,ye===null&&jf(m,Ue.el),ee&&Xe(ee,x),(Ie=G.props&&G.props.onVnodeUpdated)&&Xe(()=>Tt(Ie,fe,G,be),x)}else{let G;const{el:q,props:ee}=b,{bm:fe,m:be,parent:ye,root:Ie,type:Ue}=m,St=En(b);un(m,!1),fe&&Os(fe),!St&&(G=ee&&ee.onVnodeBeforeMount)&&Tt(G,ye,b),un(m,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(Ue,m.parent?m.parent.type:void 0);const xt=m.subTree=ji(m);g(null,xt,R,v,m,x,$),b.el=xt.el}if(be&&Xe(be,x),!St&&(G=ee&&ee.onVnodeMounted)){const xt=b;Xe(()=>Tt(G,ye,xt),x)}(b.shapeFlag&256||ye&&En(ye.vnode)&&ye.vnode.shapeFlag&256)&&m.a&&Xe(m.a,x),m.isMounted=!0,b=R=v=null}};m.scope.on();const O=m.effect=new Zl(N);m.scope.off();const L=m.update=O.run.bind(O),Y=m.job=O.runIfDirty.bind(O);Y.i=m,Y.id=m.uid,O.scheduler=()=>Wo(Y),un(m,!0),L()},ue=(m,b,R)=>{b.component=m;const v=m.vnode.props;m.vnode=b,m.next=null,Uf(m,b.props,v,R),Wf(m,b.children,R),Vt(),$i(m),qt()},ce=(m,b,R,v,x,$,E,N,O=!1)=>{const L=m&&m.children,Y=m?m.shapeFlag:0,G=b.children,{patchFlag:q,shapeFlag:ee}=b;if(q>0){if(q&128){ut(L,G,R,v,x,$,E,N,O);return}else if(q&256){Je(L,G,R,v,x,$,E,N,O);return}}ee&8?(Y&16&&we(L,x,$),G!==L&&u(R,G)):Y&16?ee&16?ut(L,G,R,v,x,$,E,N,O):we(L,x,$,!0):(Y&8&&u(R,""),ee&16&&Z(G,R,v,x,$,E,N,O))},Je=(m,b,R,v,x,$,E,N,O)=>{m=m||Rn,b=b||Rn;const L=m.length,Y=b.length,G=Math.min(L,Y);let q;for(q=0;q<G;q++){const ee=b[q]=O?Bt(b[q]):Lt(b[q]);g(m[q],ee,R,null,x,$,E,N,O)}L>Y?we(m,x,$,!0,!1,G):Z(b,R,v,x,$,E,N,O,G)},ut=(m,b,R,v,x,$,E,N,O)=>{let L=0;const Y=b.length;let G=m.length-1,q=Y-1;for(;L<=G&&L<=q;){const ee=m[L],fe=b[L]=O?Bt(b[L]):Lt(b[L]);if(pn(ee,fe))g(ee,fe,R,null,x,$,E,N,O);else break;L++}for(;L<=G&&L<=q;){const ee=m[G],fe=b[q]=O?Bt(b[q]):Lt(b[q]);if(pn(ee,fe))g(ee,fe,R,null,x,$,E,N,O);else break;G--,q--}if(L>G){if(L<=q){const ee=q+1,fe=ee<Y?b[ee].el:v;for(;L<=q;)g(null,b[L]=O?Bt(b[L]):Lt(b[L]),R,fe,x,$,E,N,O),L++}}else if(L>q)for(;L<=G;)Fe(m[L],x,$,!0),L++;else{const ee=L,fe=L,be=new Map;for(L=fe;L<=q;L++){const it=b[L]=O?Bt(b[L]):Lt(b[L]);it.key!=null&&be.set(it.key,L)}let ye,Ie=0;const Ue=q-fe+1;let St=!1,xt=0;const Fn=new Array(Ue);for(L=0;L<Ue;L++)Fn[L]=0;for(L=ee;L<=G;L++){const it=m[L];if(Ie>=Ue){Fe(it,x,$,!0);continue}let Ct;if(it.key!=null)Ct=be.get(it.key);else for(ye=fe;ye<=q;ye++)if(Fn[ye-fe]===0&&pn(it,b[ye])){Ct=ye;break}Ct===void 0?Fe(it,x,$,!0):(Fn[Ct-fe]=L+1,Ct>=xt?xt=Ct:St=!0,g(it,b[Ct],R,null,x,$,E,N,O),Ie++)}const ki=St?Yf(Fn):Rn;for(ye=ki.length-1,L=Ue-1;L>=0;L--){const it=fe+L,Ct=b[it],wi=b[it+1],Si=it+1<Y?wi.el||Ka(wi):v;Fn[L]===0?g(null,Ct,R,Si,x,$,E,N,O):St&&(ye<0||L!==ki[ye]?ot(Ct,R,Si,2):ye--)}}},ot=(m,b,R,v,x=null)=>{const{el:$,type:E,transition:N,children:O,shapeFlag:L}=m;if(L&6){ot(m.component.subTree,b,R,v);return}if(L&128){m.suspense.move(b,R,v);return}if(L&64){E.move(m,b,R,yt);return}if(E===oe){s($,b,R);for(let G=0;G<O.length;G++)ot(O[G],b,R,v);s(m.anchor,b,R);return}if(E===rs){S(m,b,R);return}if(v!==2&&L&1&&N)if(v===0)N.persisted&&!$[pt]?s($,b,R):(N.beforeEnter($),s($,b,R),Xe(()=>N.enter($),x));else{const{leave:G,delayLeave:q,afterLeave:ee}=N,fe=()=>{m.ctx.isUnmounted?r($):s($,b,R)},be=()=>{const ye=$._isLeaving||!!$[pt];$._isLeaving&&$[pt](!0),N.persisted&&!ye?fe():G($,()=>{fe(),ee&&ee()})};q?q($,fe,be):be()}else s($,b,R)},Fe=(m,b,R,v=!1,x=!1)=>{const{type:$,props:E,ref:N,children:O,dynamicChildren:L,shapeFlag:Y,patchFlag:G,dirs:q,cacheIndex:ee,memo:fe}=m;if(G===-2&&(x=!1),N!=null&&(Vt(),ts(N,null,R,m,!0),qt()),ee!=null&&(b.renderCache[ee]=void 0),Y&256){b.ctx.deactivate(m);return}const be=Y&1&&q,ye=!En(m);let Ie;if(ye&&(Ie=E&&E.onVnodeBeforeUnmount)&&Tt(Ie,b,m),Y&6)ln(m.component,R,v);else{if(Y&128){m.suspense.unmount(R,v);return}be&&cn(m,null,b,"beforeUnmount"),Y&64?m.type.remove(m,b,R,yt,v):L&&!L.hasOnce&&($!==oe||G>0&&G&64)?we(L,b,R,!1,!0):($===oe&&G&384||!x&&Y&16)&&we(O,b,R),v&&Jt(m)}const Ue=fe!=null&&ee==null;(ye&&(Ie=E&&E.onVnodeUnmounted)||be||Ue)&&Xe(()=>{Ie&&Tt(Ie,b,m),be&&cn(m,null,b,"unmounted"),Ue&&(m.el=null)},R)},Jt=m=>{const{type:b,el:R,anchor:v,transition:x}=m;if(b===oe){ft(R,v);return}if(b===rs){A(m);return}const $=()=>{r(R),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(m.shapeFlag&1&&x&&!x.persisted){const{leave:E,delayLeave:N}=x,O=()=>E(R,$);N?N(m.el,$,O):O()}else $()},ft=(m,b)=>{let R;for(;m!==b;)R=h(m),r(m),m=R;r(b)},ln=(m,b,R)=>{const{bum:v,scope:x,job:$,subTree:E,um:N,m:O,a:L}=m;Gi(O),Gi(L),v&&Os(v),x.stop(),$&&($.flags|=8,Fe(E,m,b,R)),N&&Xe(N,b),Xe(()=>{m.isUnmounted=!0},b)},we=(m,b,R,v=!1,x=!1,$=0)=>{for(let E=$;E<m.length;E++)Fe(m[E],b,R,v,x)},P=m=>{if(m.shapeFlag&6)return P(m.component.subTree);if(m.shapeFlag&128)return m.suspense.next();const b=h(m.anchor||m.el),R=b&&b[ka];return R?h(R):b};let X=!1;const Se=(m,b,R)=>{let v;m==null?b._vnode&&(Fe(b._vnode,null,null,!0),v=b._vnode.component):g(b._vnode||null,m,b,null,null,null,R),b._vnode=m,X||(X=!0,$i(v),ga(),X=!1)},yt={p:g,um:Fe,m:ot,r:Jt,mt:te,mc:Z,pc:ce,pbc:V,n:P,o:e};return{render:Se,hydrate:void 0,createApp:Pf(Se)}}function jr({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 un({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Kf(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Zo(e,t,n=!1){const s=e.children,r=t.children;if(J(s)&&J(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]=Bt(r[o]),l.el=i.el),!n&&l.patchFlag!==-2&&Zo(i,l)),l.type===kr&&(l.patchFlag===-1&&(l=r[o]=Bt(l)),l.el=i.el),l.type===Ve&&!l.el&&(l.el=i.el)}}function Yf(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 qa(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:qa(t)}function Gi(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function Ka(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?Ka(t.subTree):null}const Ya=e=>e.__isSuspense;function Jf(e,t){t&&t.pendingBranch?J(e)?t.effects.push(...e):t.effects.push(e):pa(e)}const oe=Symbol.for("v-fgt"),kr=Symbol.for("v-txt"),Ve=Symbol.for("v-cmt"),rs=Symbol.for("v-stc"),Wt=[];let ct=null;function T(e=!1){Wt.push(ct=e?null:[])}function Xo(){Wt.pop(),ct=Wt[Wt.length-1]||null}let fs=1;function Vs(e,t=!1){fs+=e,e<0&&ct&&t&&(ct.hasOnce=!0)}function Ja(e){return e.dynamicChildren=fs>0?ct||Rn:null,Xo(),fs>0&&ct&&ct.push(e),e}function I(e,t,n,s,r,o){return Ja(_(e,t,n,s,r,o,!0))}function $e(e,t,n,s,r){return Ja(ie(e,t,n,s,r,!0))}function hs(e){return e?e.__v_isVNode===!0:!1}function pn(e,t){return e.type===t.type&&e.key===t.key}const Za=({key:e})=>e??null,Ds=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Re(e)||Ye(e)||se(e)?{i:ze,r:e,k:t,f:!!n}:e:null);function _(e,t=null,n=null,s=0,r=null,o=e===oe?0:1,i=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Za(t),ref:t&&Ds(t),scopeId:va,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:ze};return l?(qs(a,n),o&128&&e.normalize(a)):n&&(a.shapeFlag|=Re(n)?8:16),fs>0&&!i&&ct&&(a.patchFlag>0||o&6)&&a.patchFlag!==32&&ct.push(a),a}const ie=Zf;function Zf(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===Pa)&&(e=Ve),hs(e)){const l=sn(e,t,!0);return n&&qs(l,n),fs>0&&!o&&ct&&(l.shapeFlag&6?ct[ct.indexOf(e)]=l:ct.push(l)),l.patchFlag=-2,l}if(ch(e)&&(e=e.__vccOpts),t){t=Xf(t);let{class:l,style:a}=t;l&&!Re(l)&&(t.class=he(l)),ge(a)&&(Ho(a)&&!J(a)&&(a=Ne({},a)),t.style=_s(a))}const i=Re(e)?1:Ya(e)?128:wa(e)?64:ge(e)?4:se(e)?2:0;return _(e,t,n,s,r,i,o,!0)}function Xf(e){return e?Ho(e)||Ua(e)?Ne({},e):e:null}function sn(e,t,n=!1,s=!1){const{props:r,ref:o,patchFlag:i,children:l,transition:a}=e,c=t?eh(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&Za(c),ref:t&&t.ref?n&&o?J(o)?o.concat(Ds(t)):[o,Ds(t)]:Ds(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!==oe?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&&sn(e.ssContent),ssFallback:e.ssFallback&&sn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&s&&bn(u,a.clone(u)),u}function Le(e=" ",t=0){return ie(kr,null,e,t)}function Qf(e,t){const n=ie(rs,null,e);return n.staticCount=t,n}function W(e="",t=!1){return t?(T(),$e(Ve,null,e)):ie(Ve,null,e)}function Lt(e){return e==null||typeof e=="boolean"?ie(Ve):J(e)?ie(oe,null,e.slice()):hs(e)?Bt(e):ie(kr,null,String(e))}function Bt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:sn(e)}function qs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(J(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=ze:r===3&&ze&&(ze.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(se(t)){if(s&65){qs(e,{default:t});return}t={default:t,_ctx:ze},n=32}else t=String(t),s&64?(n=16,t=[Le(t)]):n=8;e.children=t,e.shapeFlag|=n}function eh(...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=he([t.class,s.class]));else if(r==="style")t.style=_s([t.style,s.style]);else if(ur(r)){const o=t[r],i=s[r];i&&o!==i&&!(J(o)&&o.includes(i))?t[r]=o?[].concat(o,i):i:i==null&&o==null&&!fr(r)&&(t[r]=i)}else r!==""&&(t[r]=s[r])}return t}function Tt(e,t,n,s=null){vt(e,t,7,[n,s])}const th=Oa();let nh=0;function sh(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||th,o={uid:nh++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new $u(!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:za(s,r),emitsOptions:Da(s,r),emit:null,emitted:null,propsDefaults:ke,inheritAttrs:s.inheritAttrs,ctx:ke,data:ke,props:ke,attrs:ke,slots:ke,refs:ke,setupState:ke,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=Nf.bind(null,o),e.ce&&e.ce(o),o}let qe=null;const wr=()=>qe||ze;let Ks,ho;{const e=pr(),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)}};Ks=t("__VUE_INSTANCE_SETTERS__",n=>qe=n),ho=t("__VUE_SSR_SETTERS__",n=>ds=n)}const Ss=e=>{const t=qe;return Ks(e),e.scope.on(),()=>{e.scope.off(),Ks(t)}},zi=()=>{qe&&qe.scope.off(),Ks(null)};function Xa(e){return e.vnode.shapeFlag&4}let ds=!1;function rh(e,t=!1,n=!1){t&&ho(t);const{props:s,children:r}=e.vnode,o=Xa(e);Ff(e,s,o,t),Hf(e,r,n||t);const i=o?oh(e,t):void 0;return t&&ho(!1),i}function oh(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cf);const{setup:s}=n;if(s){Vt();const r=e.setupContext=s.length>1?lh(e):null,o=Ss(e),i=ks(s,e,0,[e.props,r]),l=Hl(i);if(qt(),o(),(l||e.sp)&&!En(e)&&$a(e),l){if(i.then(zi,zi),t)return i.then(a=>{Hi(e,a)}).catch(a=>{mr(a,e,0)});e.asyncDep=i}else Hi(e,i)}else Qa(e)}function Hi(e,t,n){se(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ge(t)&&(e.setupState=fa(t)),Qa(e)}function Qa(e,t,n){const s=e.type;e.render||(e.render=s.render||bt);{const r=Ss(e);Vt();try{Tf(e)}finally{qt(),r()}}}const ih={get(e,t){return We(e,"get",""),e[t]}};function lh(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,ih),slots:e.slots,emit:e.emit,expose:t}}function Sr(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(fa(Ku(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in ss)return ss[n](e)},has(t,n){return n in t||n in ss}})):e.proxy}function ah(e,t=!0){return se(e)?e.displayName||e.name:e.name||t&&e.__name}function ch(e){return se(e)&&"__vccOpts"in e}const H=(e,t)=>ef(e,t,ds);function st(e,t,n){try{Vs(-1);const s=arguments.length;return s===2?ge(t)&&!J(t)?hs(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&hs(n)&&(n=[n]),ie(e,t,n))}finally{Vs(1)}}const uh="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 po;const Wi=typeof window<"u"&&window.trustedTypes;if(Wi)try{po=Wi.createPolicy("vue",{createHTML:e=>e})}catch{}const ec=po?e=>po.createHTML(e):e=>e,fh="http://www.w3.org/2000/svg",hh="http://www.w3.org/1998/Math/MathML",Dt=typeof document<"u"?document:null,Vi=Dt&&Dt.createElement("template"),dh={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"?Dt.createElementNS(fh,e):t==="mathml"?Dt.createElementNS(hh,e):n?Dt.createElement(e,{is:n}):Dt.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Dt.createTextNode(e),createComment:e=>Dt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Dt.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{Vi.innerHTML=ec(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const l=Vi.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]}},Zt="transition",zn="animation",Mn=Symbol("_vtc"),tc={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},nc=Ne({},xa,tc),ph=e=>(e.displayName="Transition",e.props=nc,e),sc=ph((e,{slots:t})=>st(df,rc(e),t)),fn=(e,t=[])=>{J(e)?e.forEach(n=>n(...t)):e&&e(...t)},qi=e=>e?J(e)?e.some(t=>t.length>1):e.length>1:!1;function rc(e){const t={};for(const j in e)j in tc||(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:f=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,d=gh(r),g=d&&d[0],k=d&&d[1],{onBeforeEnter:y,onEnter:w,onEnterCancelled:S,onLeave:A,onLeaveCancelled:F,onBeforeAppear:z=y,onAppear:B=w,onAppearCancelled:Z=S}=t,U=(j,Q,te,Ae)=>{j._enterCancelled=Ae,Qt(j,Q?u:l),Qt(j,Q?c:i),te&&te()},V=(j,Q)=>{j._isLeaving=!1,Qt(j,f),Qt(j,p),Qt(j,h),Q&&Q()},re=j=>(Q,te)=>{const Ae=j?B:w,le=()=>U(Q,j,te);fn(Ae,[Q,le]),Ki(()=>{Qt(Q,j?a:o),Rt(Q,j?u:l),qi(Ae)||Yi(Q,s,g,le)})};return Ne(t,{onBeforeEnter(j){fn(y,[j]),Rt(j,o),Rt(j,i)},onBeforeAppear(j){fn(z,[j]),Rt(j,a),Rt(j,c)},onEnter:re(!1),onAppear:re(!0),onLeave(j,Q){j._isLeaving=!0;const te=()=>V(j,Q);Rt(j,f),j._enterCancelled?(Rt(j,h),go(j)):(go(j),Rt(j,h)),Ki(()=>{j._isLeaving&&(Qt(j,f),Rt(j,p),qi(A)||Yi(j,s,k,te))}),fn(A,[j,te])},onEnterCancelled(j){U(j,!1,void 0,!0),fn(S,[j])},onAppearCancelled(j){U(j,!0,void 0,!0),fn(Z,[j])},onLeaveCancelled(j){V(j),fn(F,[j])}})}function gh(e){if(e==null)return null;if(ge(e))return[Fr(e.enter),Fr(e.leave)];{const t=Fr(e);return[t,t]}}function Fr(e){return bu(e)}function Rt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Mn]||(e[Mn]=new Set)).add(t)}function Qt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Mn];n&&(n.delete(t),n.size||(e[Mn]=void 0))}function Ki(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let mh=0;function Yi(e,t,n,s){const r=e._endId=++mh,o=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:i,timeout:l,propCount:a}=oc(e,t);if(!i)return s();const c=i+"end";let u=0;const f=()=>{e.removeEventListener(c,h),o()},h=p=>{p.target===e&&++u>=a&&f()};setTimeout(()=>{u<a&&f()},l+1),e.addEventListener(c,h)}function oc(e,t){const n=window.getComputedStyle(e),s=d=>(n[d]||"").split(", "),r=s(`${Zt}Delay`),o=s(`${Zt}Duration`),i=Ji(r,o),l=s(`${zn}Delay`),a=s(`${zn}Duration`),c=Ji(l,a);let u=null,f=0,h=0;t===Zt?i>0&&(u=Zt,f=i,h=o.length):t===zn?c>0&&(u=zn,f=c,h=a.length):(f=Math.max(i,c),u=f>0?i>c?Zt:zn:null,h=u?u===Zt?o.length:a.length:0);const p=u===Zt&&/\b(?:transform|all)(?:,|$)/.test(s(`${Zt}Property`).toString());return{type:u,timeout:f,propCount:h,hasTransform:p}}function Ji(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Zi(n)+Zi(e[s])))}function Zi(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function go(e){return(e?e.ownerDocument:document).body.offsetHeight}function vh(e,t,n){const s=e[Mn];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Xi=Symbol("_vod"),ic=Symbol("_vsh"),lc=Symbol("");function yh(e){const t=wr();if(!t)return;const n=t.ut=(r=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(o=>Ys(o,r))},s=()=>{const r=e(t.proxy);t.ce?Ys(t.ce,r):mo(t.subTree,r),n(r)};Ea(()=>{pa(s)}),on(()=>{je(s,bt,{flush:"post"});const r=new MutationObserver(s);r.observe(t.subTree.el.parentNode,{childList:!0}),Ko(()=>r.disconnect())})}function mo(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{mo(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Ys(e.el,t);else if(e.type===oe)e.children.forEach(n=>mo(n,t));else if(e.type===rs){let{el:n,anchor:s}=e;for(;n&&(Ys(n,t),n!==s);)n=n.nextSibling}}function Ys(e,t){if(e.nodeType===1){const n=e.style;let s="";for(const r in t){const o=Ru(t[r]);n.setProperty(`--${r}`,o),s+=`--${r}: ${o};`}n[lc]=s}}const bh=/(?:^|;)\s*display\s*:/;function _h(e,t,n){const s=e.style,r=Re(n);let o=!1;if(n&&!r){if(t)if(Re(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();n[l]==null&&Yn(s,l,"")}else for(const i in t)n[i]==null&&Yn(s,i,"");for(const i in n){i==="display"&&(o=!0);const l=n[i];l!=null?wh(e,i,!Re(t)&&t?t[i]:void 0,l)||Yn(s,i,l):Yn(s,i,"")}}else if(r){if(t!==n){const i=s[lc];i&&(n+=";"+i),s.cssText=n,o=bh.test(n)}}else t&&e.removeAttribute("style");Xi in e&&(e[Xi]=o?s.display:"",e[ic]&&(s.display="none"))}const Qi=/\s*!important$/;function Yn(e,t,n){if(J(n))n.forEach(s=>Yn(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=kh(e,t);Qi.test(n)?e.setProperty(rn(s),n.replace(Qi,""),"important"):e[s]=n}}const el=["Webkit","Moz","ms"],Ur={};function kh(e,t){const n=Ur[t];if(n)return n;let s=tt(t);if(s!=="filter"&&s in e)return Ur[t]=s;s=dr(s);for(let r=0;r<el.length;r++){const o=el[r]+s;if(o in e)return Ur[t]=o}return t}function wh(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Re(s)&&n===s}const tl="http://www.w3.org/1999/xlink";function nl(e,t,n,s,r,o=Cu(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(tl,t.slice(6,t.length)):e.setAttributeNS(tl,t,n):n==null||o&&!Kl(n)?e.removeAttribute(t):e.setAttribute(t,o?"":kt(n)?String(n):n)}function sl(e,t,n,s,r){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ec(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=Kl(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 Cn(e,t,n,s){e.addEventListener(t,n,s)}function Sh(e,t,n,s){e.removeEventListener(t,n,s)}const rl=Symbol("_vei");function xh(e,t,n,s,r=null){const o=e[rl]||(e[rl]={}),i=o[t];if(s&&i)i.value=s;else{const[l,a]=Rh(t);if(s){const c=o[t]=Eh(s,r);Cn(e,l,c,a)}else i&&(Sh(e,l,i,a),o[t]=void 0)}}const Ch=/(Once|Passive|Capture)$/,Th=/^on:?(?:Once|Passive|Capture)$/;function Rh(e){let t,n;for(;(n=e.match(Ch))&&!Th.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):rn(e.slice(2)),t]}let Gr=0;const $h=Promise.resolve(),Ah=()=>Gr||($h.then(()=>Gr=0),Gr=Date.now());function Eh(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const r=n.value;if(J(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&&vt(c,t,5,l)}}else vt(r,t,5,[s])};return n.value=e,n.attached=Ah(),n}const ol=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ih=(e,t,n,s,r,o)=>{const i=r==="svg";t==="class"?vh(e,s,i):t==="style"?_h(e,n,s):ur(t)?fr(t)||xh(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ph(e,t,s,i))?(sl(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nl(e,t,s,i,o,t!=="value")):e._isVueCE&&(Lh(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Re(s)))?sl(e,tt(t),s,o,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),nl(e,t,s,i))};function Ph(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&ol(t)&&se(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return ol(t)&&Re(n)?!1:t in e}function Lh(e,t){const n=e._def.props;if(!n)return!1;const s=tt(t);return Array.isArray(n)?n.some(r=>tt(r)===s):Object.keys(n).some(r=>tt(r)===s)}const ac=new WeakMap,cc=new WeakMap,Js=Symbol("_moveCb"),il=Symbol("_enterCb"),Nh=e=>(delete e.props.mode,e),Mh=Nh({name:"TransitionGroup",props:Ne({},nc,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=wr(),s=Sa();let r,o;return Ia(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!jh(r[0].el,n.vnode.el,i)){r=[];return}r.forEach(Oh),r.forEach(Dh);const l=r.filter(Bh);go(n.vnode.el),l.forEach(a=>{const c=a.el,u=c.style;Rt(c,i),u.transform=u.webkitTransform=u.transitionDuration="";const f=c[Js]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",f),c[Js]=null,Qt(c,i))};c.addEventListener("transitionend",f)}),r=[]}),()=>{const i=de(e),l=rc(i);let a=i.tag||oe;if(r=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&!u.el[ic]&&(r.push(u),bn(u,us(u,l,s,n)),ac.set(u,fc(u.el)))}o=t.default?qo(t.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&bn(u,us(u,l,s,n))}return ie(a,null,o)}}}),uc=Mh;function Oh(e){const t=e.el;t[Js]&&t[Js](),t[il]&&t[il]()}function Dh(e){cc.set(e,fc(e.el))}function Bh(e){const t=ac.get(e),n=cc.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 fc(e){const t=e.getBoundingClientRect();return{left:t.left,top:t.top}}function jh(e,t,n){const s=e.cloneNode(),r=e[Mn];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}=oc(s);return o.removeChild(s),i}const ll=e=>{const t=e.props["onUpdate:modelValue"]||!1;return J(t)?n=>Os(t,n):t};function Fh(e){e.target.composing=!0}function al(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const zr=Symbol("_assign");function cl(e,t,n){return t&&(e=e.trim()),n&&(e=Mo(e)),e}const xr={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[zr]=ll(r);const o=s||r.props&&r.props.type==="number";Cn(e,t?"change":"input",i=>{i.target.composing||e[zr](cl(e.value,n,o))}),(n||o)&&Cn(e,"change",()=>{e.value=cl(e.value,n,o)}),t||(Cn(e,"compositionstart",Fh),Cn(e,"compositionend",al),Cn(e,"change",al))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:o}},i){if(e[zr]=ll(i),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Mo(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)}},Uh=["ctrl","shift","alt","meta"],Gh={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)=>Uh.some(n=>e[`${n}Key`]&&!t.includes(n))},Dn=(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=Gh[t[i]];if(l&&l(r,t))return}return e(r,...o)}))},zh={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Qo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(r=>{if(!("key"in r))return;const o=rn(r.key);if(t.some(i=>i===o||zh[i]===o))return e(r)}))},Hh=Ne({patchProp:Ih},dh);let ul;function Wh(){return ul||(ul=Vf(Hh))}const Vh=((...e)=>{const t=Wh().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Kh(s);if(!r)return;const o=t._component;!se(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const i=n(r,!1,qh(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t});function qh(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Kh(e){return Re(e)?document.querySelector(e):e}const ps=K([]);let Yh=0;function Jh(e,t="info",n=3500){const s=`toast_${++Yh}`;ps.value=[...ps.value,{id:s,type:t,message:e}],n>0&&window.setTimeout(()=>hc(s),n)}function hc(e){ps.value=ps.value.filter(t=>t.id!==e)}function dc(){return{toasts:ps,showToast:Jh,removeToast:hc}}const Ot="/api/v1",Zh=2*3e4;function Xh(){const{showToast:e}=dc(),t=K("connecting"),n=K([]),s=K([]),r=K({busy:!1}),o=K(null),i=K(null),l=K(null),a=H(()=>r.value.busy),c=K([]),u=K(null),f=K(null),h=K([]);let p=null,d=null,g=null,k=Date.now(),y=0,w=0,S=0;const A=new Set;function F(){const v=`ws://${window.location.host}`;return u.value?`${v}/?sessionId=${encodeURIComponent(u.value)}`:`${v}/`}function z(v){t.value=v}function B(v){(p==null?void 0:p.readyState)===WebSocket.OPEN&&p.send(JSON.stringify(v))}async function Z(){if(i.value)try{const v=await fetch(`${Ot}/sessions/${i.value}/snapshot`);if(!v.ok)return;const x=await v.json();U(x)}catch{}}function U(v){const x=n.value.filter($=>$.local);n.value=[...v.messages.map($=>({...$,id:$.id??V()})),...x],s.value=v.pendingApprovals,r.value={...v.status,busy:v.busy},l.value=v.workDir}function V(){return`msg_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function re(v){j(),k=Date.now(),d=window.setInterval(()=>{if(Date.now()-k>Zh){p==null||p.close();return}B({type:"ping"})},v)}function j(){d!==null&&(clearInterval(d),d=null)}function Q(){if(g!==null)return;z("reconnecting"),S++;const v=Math.min(1e3*2**S,3e4);g=window.setTimeout(()=>{g=null,ue()},v)}function te(v){switch(v.type){case"server_hello":{const x=v;i.value=x.sessionId,l.value=x.workDir,u.value=x.sessionId,w=x.epoch,re(x.heartbeat_ms),B({type:"client_hello",lastSeq:y,epoch:w}),x.active===!1?ln(x.sessionId).then(()=>{Z(),ft(),we()}):(Z(),ft(),we());break}case"event":{typeof v.seq=="number"&&(y=Math.max(y,v.seq)),typeof v.epoch=="number"&&(w=v.epoch),Ae(v.payload);break}case"user_message":{if(v.clientMessageId&&A.has(v.clientMessageId))break;n.value.push({id:V(),role:"user",content:v.text,tools:[],ts:Date.now()});break}case"approval_request":{s.value=[...s.value,{id:v.id,toolName:v.toolName,action:v.action,display:v.display}];break}case"approval_resolved":{s.value=s.value.filter(x=>x.id!==v.id);break}case"command_result":{const x=v.pendingMsgId?n.value.findIndex($=>$.id===v.pendingMsgId):-1;if(x>=0){const $=n.value[x];n.value[x]={...$,content:v.message,isError:!v.ok,pending:!1}}else n.value.push({id:V(),role:"system",content:v.message,tools:[],isError:!v.ok,ts:Date.now(),local:!0});(v.command==="fork"||v.command==="title")&&ft(),v.ok&&v.command==="compact"&&Z();break}case"resync_required":{y=0,Z();break}case"status":{r.value={...r.value,...v.status};break}case"error":{o.value=v.message;break}}}function Ae(v){var x,$;switch(v.type){case"turn.started":{r.value={...r.value,busy:!0},n.value.push({id:V(),role:"assistant",content:"",tools:[],ts:Date.now()});break}case"assistant.delta":{const E=le();E&&(E.content+=String(v.delta));break}case"thinking.delta":{const E=le();if(E){const N=E.tools.find(O=>O.name==="thinking");N?N.output=(N.output??"")+String(v.delta):E.tools.push({toolCallId:"thinking",name:"thinking",output:String(v.delta)})}break}case"tool.call.started":{const E=le();E&&E.tools.push({toolCallId:String(v.toolCallId),name:String(v.name),args:v.args});break}case"tool.result":{const E=le();if(E){const N=E.tools.find(O=>O.toolCallId===v.toolCallId);N&&(N.output=String(v.output),N.isError=!!v.isError)}break}case"tool.progress":{const E=le();if(E){const N=E.tools.find(O=>O.toolCallId===v.toolCallId);N&&(N.output=String(v.message??v.output))}break}case"turn.ended":{if(r.value={...r.value,busy:!1},v.reason==="failed"){const E=le();E&&(E.isError=!0),o.value=String(((x=v.error)==null?void 0:x.message)??"Turn failed")}ft(),we();break}case"session.meta.updated":{const E={};v.model!==void 0&&(E.model=v.model),v.contextTokens!==void 0&&(E.contextTokens=v.contextTokens),v.maxContextTokens!==void 0&&(E.maxContextTokens=v.maxContextTokens),v.contextUsage!==void 0&&(E.contextUsage=v.contextUsage),r.value={...r.value,...E};break}case"error":{o.value=String((($=v.error)==null?void 0:$.message)??"Unknown error");break}}}function le(){for(let v=n.value.length-1;v>=0;v--)if(n.value[v].role==="assistant")return n.value[v];return null}function ue(){p&&(p.readyState===WebSocket.CONNECTING||p.readyState===WebSocket.OPEN)||(z("connecting"),o.value=null,y=0,w=0,n.value=[],s.value=[],p=new WebSocket(F()),p.onopen=()=>{z("connected"),S=0},p.onclose=()=>{j(),z("disconnected"),Q()},p.onerror=()=>{z("reconnecting")},p.onmessage=v=>{k=Date.now();let x;try{x=JSON.parse(v.data)}catch{return}te(x)})}function ce(v){if(!v||r.value.busy)return;if(t.value!=="connected"){e("连接已断开,正在尝试重连...","error"),ue();return}const x=`client_${Date.now()}_${Math.random().toString(36).slice(2,8)}`;A.add(x),n.value.push({id:V(),role:"user",content:v,tools:[],ts:Date.now()}),B({type:"prompt",text:v,clientMessageId:x})}function Je(){B({type:"abort"})}function ut(v,x){if(r.value.busy&&v!=="btw"){e(`会话忙碌中,无法执行 /${v},请稍后再试。`,"warning");return}const $=["compact","plan","auto","yes","fork","title"];let E=null;$.includes(v)&&(E=V(),n.value.push({id:E,role:"system",content:`正在执行 /${v}${x?` ${x}`:""}...`,tools:[],pending:!0,ts:Date.now(),local:!0})),B({type:"command",command:v,...x?{args:x}:{},...E?{pendingMsgId:E}:{}})}function ot(){n.value=[],s.value=[]}function Fe(v){n.value.push({id:V(),role:"system",content:v,tools:[],ts:Date.now(),local:!0})}function Jt(v,x,$,E){s.value=s.value.filter(N=>N.id!==v),B({type:"approval_response",id:v,decision:x,...$?{feedback:$}:{},...E?{scope:E}:{}})}async function ft(){try{const v=await fetch(`${Ot}/sessions`);if(!v.ok)return;c.value=await v.json()}catch{}}async function ln(v){try{await fetch(`${Ot}/sessions/${v}/activate`,{method:"POST"})}catch{}}async function we(){try{const v=await fetch(`${Ot}/git/status`);if(!v.ok)return;const x=await v.json();f.value=x.isRepo?x:null}catch{}}async function P(){try{const v=await fetch(`${Ot}/models`);if(!v.ok)return;const x=await v.json();h.value=x.models}catch{}}async function X(v,x,$){if(i.value)try{const E=await fetch(`${Ot}/sessions/${i.value}/${v}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(x)}),N=await E.json();if(!E.ok){e(N.message??`请求失败(HTTP ${E.status})`,"error");return}N.status&&(r.value={...r.value,...N.status}),Fe($)}catch(E){e(`请求失败:${E instanceof Error?E.message:String(E)}`,"error")}}async function Se(v){v!==r.value.model&&await X("model",{model:v},`已切换模型:${v}`)}async function yt(v){v!==r.value.thinkingLevel&&await X("thinking",{level:v},`思考强度已切换为 ${v}`)}async function an(){try{const v=await fetch(`${Ot}/sessions`,{method:"POST"});if(!v.ok)return;const x=await v.json();c.value=[x,...c.value],await m(x.sessionId)}catch(v){console.error("Failed to create session",v)}}async function m(v){u.value===v&&t.value==="connected"||(u.value=v,p&&(p.onclose=null,p.close(),p=null),j(),ue())}async function b(v){try{if(!(await fetch(`${Ot}/sessions/${v}`,{method:"DELETE"})).ok)return;if(c.value=c.value.filter($=>$.sessionId!==v),u.value===v){const $=c.value[0];$?await m($.sessionId):await an()}}catch(x){console.error("Failed to delete session",x)}}async function R(v){try{const x=await fetch(`${Ot}/sessions/${v}/export`);if(!x.ok)return;const $=await x.blob(),E=URL.createObjectURL($),N=document.createElement("a");N.href=E,N.download=`${v}.md`,N.click(),URL.revokeObjectURL(E)}catch(x){console.error("Failed to export session",x)}}return ue(),ft(),P(),window.addEventListener("online",()=>ue()),document.addEventListener("visibilitychange",()=>{!document.hidden&&t.value!=="connected"&&ue()}),{connectionStatus:t,messages:n,pendingApprovals:s,status:r,error:o,sessionId:i,workDir:l,isBusy:a,sessions:c,currentSessionId:u,gitStatus:f,models:h,sendPrompt:ce,sendCommand:ut,clearMessages:ot,appendSystemMessage:Fe,abort:Je,resolveApproval:Jt,fetchSessions:ft,fetchGitStatus:we,fetchModels:P,switchModel:Se,switchThinking:yt,createSession:an,switchSession:m,deleteSession:b,exportSession:R,fetchSnapshot:Z}}function Qh(e){const{storageKey:t,defaultWidth:n,min:s,max:r}=e;function o(w){return Number.isFinite(w)?Math.min(Zu(r),Math.max(s,Math.round(w))):n}function i(){try{const w=localStorage.getItem(t);if(w===null)return n;const S=Number(w);return Number.isFinite(S)?o(S):n}catch{return n}}function l(w){try{localStorage.setItem(t,String(w))}catch{}}const a=K(i()),c=K(!1);function u(w){const S=o(w);a.value=S,l(S)}let f=0,h=0,p=null,d=-1;function g(w){if(!c.value)return;const S=w.clientX-f;u(h+S)}function k(){if(c.value){if(c.value=!1,document.body.style.userSelect="",document.body.style.cursor="",p){try{p.releasePointerCapture(d)}catch{}p.removeEventListener("pointermove",g),p.removeEventListener("pointerup",k),p.removeEventListener("pointercancel",k)}p=null,d=-1}}function y(w){w.preventDefault(),c.value=!0,f=w.clientX,h=o(a.value),p=w.currentTarget,d=w.pointerId,document.body.style.userSelect="none",document.body.style.cursor="col-resize";try{p.setPointerCapture(w.pointerId)}catch{}p.addEventListener("pointermove",g),p.addEventListener("pointerup",k),p.addEventListener("pointercancel",k)}return ws(k),{width:a,dragging:c,clamp:o,setWidth:u,onPointerDown:y}}const ei=[{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 ed(e){const t=e.toLowerCase();return ei.filter(n=>{var s;return n.name.startsWith(t)||((s=n.aliases)==null?void 0:s.some(r=>r.startsWith(t)))})}function td(e){const t=e.toLowerCase(),n=ei.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 nd(){return["可用命令:",...ei.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 pc=""+new URL("../icon.ico",import.meta.url).href,sd=["title","aria-label"],rd=["width","height","viewBox"],od=["cx","cy","r"],id=["cx","cy","r","stroke-dasharray","stroke-dashoffset","transform"],Hr=2,ld=Ce({__name:"ContextRing",props:{usage:{default:void 0},size:{default:16}},setup(e){yh(a=>({v1d95ffa8:l.value}));const t=e,n=H(()=>{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=H(()=>Math.round(n.value*100)),r=H(()=>(t.size-Hr)/2),o=H(()=>2*Math.PI*r.value),i=H(()=>o.value*(1-n.value)),l=H(()=>n.value>=.9?"var(--color-danger)":n.value>=.7?"var(--color-warning)":"var(--color-accent)");return(a,c)=>(T(),I("span",{class:"context-ring",role:"img",title:`上下文占用 ${s.value}%`,"aria-label":`上下文占用 ${s.value}%`},[(T(),I("svg",{width:e.size,height:e.size,viewBox:`0 0 ${e.size} ${e.size}`},[_("circle",{class:"ring-track",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":Hr,fill:"none"},null,8,od),_("circle",{class:"ring-value",cx:e.size/2,cy:e.size/2,r:r.value,"stroke-width":Hr,fill:"none","stroke-linecap":"round","stroke-dasharray":o.value,"stroke-dashoffset":i.value,transform:`rotate(-90 ${e.size/2} ${e.size/2})`},null,8,id)],8,rd))],8,sd))}}),Te=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},gc=Te(ld,[["__scopeId","data-v-3ffc343b"]]),ad={key:0,class:"ui-dialog-header"},cd={class:"ui-dialog-title"},ud={class:"ui-dialog-body"},fd={key:1,class:"ui-dialog-footer"},hd=Ce({__name:"Dialog",props:{open:{type:Boolean},title:{},closable:{type:Boolean},maxWidth:{}},emits:["close"],setup(e,{emit:t}){const n=t;return(s,r)=>(T(),$e(Vo,{to:"body"},[ie(sc,{name:"dialog"},{default:Ee(()=>[e.open?(T(),I("div",{key:0,class:"ui-dialog-overlay",onClick:r[1]||(r[1]=Dn(o=>e.closable!==!1&&n("close"),["self"]))},[_("div",{class:"ui-dialog",style:_s(e.maxWidth?{maxWidth:e.maxWidth}:void 0),role:"dialog","aria-modal":"true"},[e.title||s.$slots.header?(T(),I("div",ad,[ns(s.$slots,"header",{},()=>[_("span",cd,D(e.title),1)],!0),e.closable!==!1?(T(),I("button",{key:0,class:"ui-dialog-close","aria-label":"关闭",onClick:r[0]||(r[0]=o=>n("close"))},"✕")):W("",!0)])):W("",!0),_("div",ud,[ns(s.$slots,"default",{},void 0,!0)]),s.$slots.footer?(T(),I("div",fd,[ns(s.$slots,"footer",{},void 0,!0)])):W("",!0)],4)])):W("",!0)]),_:3})]))}}),Cr=Te(hd,[["__scopeId","data-v-0b5973e7"]]),dd={class:"status-bar"},pd={class:"brand"},gd={class:"info"},md=["title"],vd={key:0,class:"info-item model"},yd={key:0,class:"thinking-level"},bd={key:1,class:"info-item plan",title:"计划模式已开启"},_d=["title"],kd=["title"],wd=["title"],Sd={class:"git-branch"},xd={key:0,class:"git-sync"},Cd={key:1,class:"git-diff"},Td={class:"label"},Rd={key:0,class:"diff-body"},$d={key:1,class:"diff-empty"},Ad=Ce({__name:"StatusBar",props:{connectionStatus:{},status:{},sessionId:{default:null},workDir:{default:null},gitStatus:{default:null}},emits:["refresh-git","toggle-sidebar"],setup(e,{emit:t}){const n=e,s=t,r=K(!1);function o(){r.value=!r.value,r.value&&s("refresh-git")}const i={connecting:"连接中…",connected:"已连接",reconnecting:"重连中…",disconnected:"已断开"},l=H(()=>{const d=n.status.contextUsage;return d===void 0?null:Math.round((d>1?d/100:d)*100)});function a(d){return d===void 0?"-":d.toLocaleString()}function c(d){return d?d.slice(0,8):"-"}const u=H(()=>`Tokens: ${a(n.status.contextTokens)} / ${a(n.status.maxContextTokens)}`),f=H(()=>{const d=n.gitStatus;if(!d)return"";const g=[];return d.ahead&&g.push(`↑${d.ahead}`),d.behind&&g.push(`↓${d.behind}`),g.join(" ")}),h=H(()=>{const d=n.gitStatus;if(!d)return"";const g=[];return d.adds&&g.push(`+${d.adds}`),d.dels&&g.push(`-${d.dels}`),g.join(" ")}),p=H(()=>{const d=n.gitStatus;if(!d)return"";const g=[`分支:${d.branch??"(detached)"}`];return d.changed&&g.push(`变更文件:${d.changed}`),d.ahead&&g.push(`领先远端 ${d.ahead} 个提交`),d.behind&&g.push(`落后远端 ${d.behind} 个提交`),g.push("点击查看 diff 统计"),g.join(`
|
|
20
|
-
`)});return(d,g)=>{var k;return T(),I("header",dd,[_("div",pd,[_("button",{class:"hamburger","aria-label":"会话列表",title:"会话列表",onClick:g[0]||(g[0]=y=>s("toggle-sidebar"))},"☰"),g[2]||(g[2]=_("img",{src:pc,alt:"Scream",class:"logo"},null,-1)),g[3]||(g[3]=_("span",{class:"title"},"Scream Web UI",-1))]),_("div",gd,[_("span",{class:"info-item",title:e.sessionId??void 0},"Session "+D(c(e.sessionId)),9,md),e.status.model?(T(),I("span",vd,[Le(D(e.status.model)+" ",1),e.status.thinkingLevel&&e.status.thinkingLevel!=="none"?(T(),I("span",yd," · "+D(e.status.thinkingLevel),1)):W("",!0)])):W("",!0),e.status.planMode?(T(),I("span",bd," 📋 Plan ")):W("",!0),l.value!==null?(T(),I("span",{key:2,class:"info-item context",title:u.value},[ie(gc,{usage:e.status.contextUsage,size:18},null,8,["usage"]),_("span",null,D(l.value)+"%",1)],8,_d)):W("",!0),e.workDir?(T(),I("span",{key:3,class:"info-item workdir",title:e.workDir},D(e.workDir),9,kd)):W("",!0),e.gitStatus?(T(),I("button",{key:4,class:"info-item git",title:p.value,onClick:o},[g[4]||(g[4]=_("span",{class:"git-icon"},"⎇",-1)),_("span",Sd,D(e.gitStatus.branch??"detached"),1),f.value?(T(),I("span",xd,D(f.value),1)):W("",!0),h.value?(T(),I("span",Cd,D(h.value),1)):W("",!0)],8,wd)):W("",!0)]),_("div",{class:he(["connection",e.connectionStatus])},[g[5]||(g[5]=_("span",{class:"dot"},null,-1)),_("span",Td,D(i[e.connectionStatus]),1)],2),ie(Cr,{open:r.value&&!!e.gitStatus,title:`⏇ ${((k=e.gitStatus)==null?void 0:k.branch)??"detached"} - diff 统计`,onClose:g[1]||(g[1]=y=>r.value=!1)},{default:Ee(()=>{var y;return[(y=e.gitStatus)!=null&&y.diffStat?(T(),I("pre",Rd,D(e.gitStatus.diffStat),1)):(T(),I("div",$d,"\\u5de5\\u4f5c\\u533a\\u5e72\\u51c0\\uff0c\\u6ca1\\u6709\\u53d8\\u66f4\\u3002"))]}),_:1},8,["open","title"])])}}}),Ed=Te(Ad,[["__scopeId","data-v-1dca1eb0"]]);function ti(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var kn=ti();function mc(e){kn=e}var os={exec:()=>null};function me(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(et.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,t)};return s}var et={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")},Id=/^(?:[ \t]*(?:\n|$))+/,Pd=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ld=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,xs=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Nd=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ni=/(?:[*+-]|\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=me(vc).replace(/bull/g,ni).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(),Md=me(vc).replace(/bull/g,ni).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(),si=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Od=/^[^\n]+/,ri=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Dd=me(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ri).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Bd=me(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ni).getRegex(),Tr="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",oi=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jd=me("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",oi).replace("tag",Tr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bc=me(si).replace("hr",xs).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",Tr).getRegex(),Fd=me(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bc).getRegex(),ii={blockquote:Fd,code:Pd,def:Dd,fences:Ld,heading:Nd,hr:xs,html:jd,lheading:yc,list:Bd,newline:Id,paragraph:bc,table:os,text:Od},fl=me("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",xs).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",Tr).getRegex(),Ud={...ii,lheading:Md,table:fl,paragraph:me(si).replace("hr",xs).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fl).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",Tr).getRegex()},Gd={...ii,html:me(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",oi).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:os,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:me(si).replace("hr",xs).replace("heading",` *#{1,6} *[^
|
|
21
|
-
]`).replace("lheading",yc).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zd=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Hd=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_c=/^( {2,}|\\)\n(?!\s*$)/,Wd=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Rr=/[\p{P}\p{S}]/u,li=/[\s\p{P}\p{S}]/u,kc=/[^\s\p{P}\p{S}]/u,Vd=me(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,li).getRegex(),wc=/(?!~)[\p{P}\p{S}]/u,qd=/(?!~)[\s\p{P}\p{S}]/u,Kd=/(?:[^\s\p{P}\p{S}]|~)/u,Yd=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Sc=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Jd=me(Sc,"u").replace(/punct/g,Rr).getRegex(),Zd=me(Sc,"u").replace(/punct/g,wc).getRegex(),xc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xd=me(xc,"gu").replace(/notPunctSpace/g,kc).replace(/punctSpace/g,li).replace(/punct/g,Rr).getRegex(),Qd=me(xc,"gu").replace(/notPunctSpace/g,Kd).replace(/punctSpace/g,qd).replace(/punct/g,wc).getRegex(),ep=me("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,kc).replace(/punctSpace/g,li).replace(/punct/g,Rr).getRegex(),tp=me(/\\(punct)/,"gu").replace(/punct/g,Rr).getRegex(),np=me(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),sp=me(oi).replace("(?:-->|$)","-->").getRegex(),rp=me("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",sp).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zs=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,op=me(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Cc=me(/^!?\[(label)\]\[(ref)\]/).replace("label",Zs).replace("ref",ri).getRegex(),Tc=me(/^!?\[(ref)\](?:\[\])?/).replace("ref",ri).getRegex(),ip=me("reflink|nolink(?!\\()","g").replace("reflink",Cc).replace("nolink",Tc).getRegex(),ai={_backpedal:os,anyPunctuation:tp,autolink:np,blockSkip:Yd,br:_c,code:Hd,del:os,emStrongLDelim:Jd,emStrongRDelimAst:Xd,emStrongRDelimUnd:ep,escape:zd,link:op,nolink:Tc,punctuation:Vd,reflink:Cc,reflinkSearch:ip,tag:rp,text:Wd,url:os},lp={...ai,link:me(/^!?\[(label)\]\((.*?)\)/).replace("label",Zs).getRegex(),reflink:me(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zs).getRegex()},vo={...ai,emStrongRDelimAst:Qd,emStrongLDelim:Zd,url:me(/^((?: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.!#$%&'*+\/=?_`{\|}~-]+@)))/},ap={...vo,br:me(_c).replace("{2,}","*").getRegex(),text:me(vo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Is={normal:ii,gfm:Ud,pedantic:Gd},Hn={normal:ai,gfm:vo,breaks:ap,pedantic:lp},cp={"&":"&","<":"<",">":">",'"':""","'":"'"},hl=e=>cp[e];function $t(e,t){if(t){if(et.escapeTest.test(e))return e.replace(et.escapeReplace,hl)}else if(et.escapeTestNoEncode.test(e))return e.replace(et.escapeReplaceNoEncode,hl);return e}function dl(e){try{e=encodeURI(e).replace(et.percentDecode,"%")}catch{return null}return e}function pl(e,t){var o;const n=e.replace(et.findPipe,(i,l,a)=>{let c=!1,u=l;for(;--u>=0&&a[u]==="\\";)c=!c;return c?"|":" |"}),s=n.split(et.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(et.slashPipe,"|");return s}function Wn(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 up(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 gl(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 fp(e,t,n){const s=e.match(n.other.indentCodeCompensation);if(s===null)return t;const r=s[1];return t.split(`
|
|
22
|
-
`).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(`
|
|
23
|
-
`)}var Xs=class{constructor(e){C(this,"options");C(this,"rules");C(this,"lexer");this.options=e||kn}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:Wn(n,`
|
|
24
|
-
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const n=t[0],s=fp(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=Wn(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:Wn(t[0],`
|
|
25
|
-
`)}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let n=Wn(t[0],`
|
|
26
|
-
`).split(`
|
|
27
|
-
`),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(`
|
|
28
|
-
`),u=c.replace(this.rules.other.blockquoteSetextReplace,`
|
|
29
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
30
|
-
${c}`:c,r=r?`${r}
|
|
31
|
-
${u}`:u;const f=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,o,!0),this.lexer.state.top=f,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,d=p.raw+`
|
|
32
|
-
`+n.join(`
|
|
33
|
-
`),g=this.blockquote(d);o[o.length-1]=g,s=s.substring(0,s.length-p.raw.length)+g.raw,r=r.substring(0,r.length-p.text.length)+g.text;break}else if((h==null?void 0:h.type)==="list"){const p=h,d=p.raw+`
|
|
34
|
-
`+n.join(`
|
|
35
|
-
`),g=this.list(d);o[o.length-1]=g,s=s.substring(0,s.length-h.raw.length)+g.raw,r=r.substring(0,r.length-p.raw.length)+g.raw,n=d.substring(o.at(-1).raw.length).split(`
|
|
36
|
-
`);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 f=t[2].split(`
|
|
37
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,y=>" ".repeat(3*y.length)),h=e.split(`
|
|
38
|
-
`,1)[0],p=!f.trim(),d=0;if(this.options.pedantic?(d=2,u=f.trimStart()):p?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,u=f.slice(d),d+=t[1].length),p&&this.rules.other.blankLine.test(h)&&(c+=h+`
|
|
39
|
-
`,e=e.substring(h.length+1),a=!0),!a){const y=this.rules.other.nextBulletRegex(d),w=this.rules.other.hrRegex(d),S=this.rules.other.fencesBeginRegex(d),A=this.rules.other.headingBeginRegex(d),F=this.rules.other.htmlBeginRegex(d);for(;e;){const z=e.split(`
|
|
40
|
-
`,1)[0];let B;if(h=z,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),B=h):B=h.replace(this.rules.other.tabCharGlobal," "),S.test(h)||A.test(h)||F.test(h)||y.test(h)||w.test(h))break;if(B.search(this.rules.other.nonSpaceChar)>=d||!h.trim())u+=`
|
|
41
|
-
`+B.slice(d);else{if(p||f.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||S.test(f)||A.test(f)||w.test(f))break;u+=`
|
|
42
|
-
`+h}!p&&!h.trim()&&(p=!0),c+=z+`
|
|
43
|
-
`,e=e.substring(z.length+1),f=B.slice(d)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(c)&&(i=!0));let g=null,k;this.options.gfm&&(g=this.rules.other.listIsTask.exec(u),g&&(k=g[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:c,task:!!g,checked:k,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(f=>f.type==="space"),u=c.length>0&&c.some(f=>this.rules.other.anyLine.test(f.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=pl(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(`
|
|
44
|
-
`):[],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(pl(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)===`
|
|
45
|
-
`?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=Wn(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{const o=up(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)),gl(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 gl(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 f=[...s[0]][0].length,h=e.slice(0,o+s.index+f+l);if(Math.min(o,l)%2){const d=h.slice(1,-1);return{type:"em",raw:h,text:d,tokens:this.lexer.inlineTokens(d)}}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}}}},zt=class yo{constructor(t){C(this,"tokens");C(this,"options");C(this,"state");C(this,"tokenizer");C(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||kn,this.options.tokenizer=this.options.tokenizer||new Xs,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:et,block:Is.normal,inline:Hn.normal};this.options.pedantic?(n.block=Is.pedantic,n.inline=Hn.pedantic):this.options.gfm&&(n.block=Is.gfm,this.options.breaks?n.inline=Hn.breaks:n.inline=Hn.gfm),this.tokenizer.rules=n}static get rules(){return{block:Is,inline:Hn}}static lex(t,n){return new yo(n).lex(t)}static lexInline(t,n){return new yo(n).inlineTokens(t)}lex(t){t=t.replace(et.carriageReturn,`
|
|
46
|
-
`),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(et.tabCharGlobal," ").replace(et.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+=`
|
|
47
|
-
`: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+=`
|
|
48
|
-
`+l.raw,c.text+=`
|
|
49
|
-
`+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+=`
|
|
50
|
-
`+l.raw,c.text+=`
|
|
51
|
-
`+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 f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},u),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),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+=`
|
|
52
|
-
`+l.raw,c.text+=`
|
|
53
|
-
`+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+=`
|
|
54
|
-
`+l.raw,c.text+=`
|
|
55
|
-
`+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 f=t;if((c=this.options.extensions)!=null&&c.startInline){let h=1/0;const p=t.slice(1);let d;this.options.extensions.startInline.forEach(g=>{d=g.call({lexer:this},p),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(f=t.substring(0,h+1))}if(u=this.tokenizer.inlineText(f)){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}},Qs=class{constructor(e){C(this,"options");C(this,"parser");this.options=e||kn}space(e){return""}code({text:e,lang:t,escaped:n}){var o;const s=(o=(t||"").match(et.notSpaceStart))==null?void 0:o[0],r=e.replace(et.endingNewline,"")+`
|
|
56
|
-
`;return s?'<pre><code class="language-'+$t(s)+'">'+(n?r:$t(r,!0))+`</code></pre>
|
|
57
|
-
`:"<pre><code>"+(n?r:$t(r,!0))+`</code></pre>
|
|
58
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
59
|
-
${this.parser.parse(e)}</blockquote>
|
|
60
|
-
`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
61
|
-
`}hr(e){return`<hr>
|
|
62
|
-
`}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+`>
|
|
63
|
-
`+s+"</"+r+`>
|
|
64
|
-
`}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+" "+$t(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>
|
|
65
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
66
|
-
`}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>
|
|
67
|
-
<thead>
|
|
68
|
-
`+t+`</thead>
|
|
69
|
-
`+s+`</table>
|
|
70
|
-
`}tablerow({text:e}){return`<tr>
|
|
71
|
-
${e}</tr>
|
|
72
|
-
`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
73
|
-
`}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>${$t(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=dl(e);if(r===null)return s;e=r;let o='<a href="'+e+'"';return t&&(o+=' title="'+$t(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=dl(e);if(r===null)return $t(n);e=r;let o=`<img src="${e}" alt="${n}"`;return t&&(o+=` title="${$t(t)}"`),o+=">",o}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:$t(e.text)}},ci=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""}},Ht=class bo{constructor(t){C(this,"options");C(this,"renderer");C(this,"textRenderer");this.options=t||kn,this.options.renderer=this.options.renderer||new Qs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ci}static parse(t,n){return new bo(n).parse(t)}static parseInline(t,n){return new bo(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+=`
|
|
74
|
-
`+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}},eo,Bs=(eo=class{constructor(e){C(this,"options");C(this,"block");this.options=e||kn}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?zt.lex:zt.lexInline}provideParser(){return this.block?Ht.parse:Ht.parseInline}},C(eo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),eo),hp=class{constructor(...e){C(this,"defaults",ti());C(this,"options",this.setOptions);C(this,"parse",this.parseMarkdown(!0));C(this,"parseInline",this.parseMarkdown(!1));C(this,"Parser",Ht);C(this,"Renderer",Qs);C(this,"TextRenderer",ci);C(this,"Lexer",zt);C(this,"Tokenizer",Xs);C(this,"Hooks",Bs);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 Qs(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 Xs(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 Bs;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];Bs.passThroughHooks.has(o)?r[i]=c=>{if(this.defaults.async)return Promise.resolve(l.call(r,c)).then(f=>a.call(r,f));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 zt.lex(e,t??this.defaults)}parser(e,t){return Ht.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?zt.lex:zt.lexInline,a=o.hooks?o.hooks.provideParser():e?Ht.parse:Ht.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+=`
|
|
75
|
-
Please report this to https://github.com/markedjs/marked.`,e){const s="<p>An error occurred:</p><pre>"+$t(n.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(n);throw n}}},_n=new hp;function ve(e,t){return _n.parse(e,t)}ve.options=ve.setOptions=function(e){return _n.setOptions(e),ve.defaults=_n.defaults,mc(ve.defaults),ve};ve.getDefaults=ti;ve.defaults=kn;ve.use=function(...e){return _n.use(...e),ve.defaults=_n.defaults,mc(ve.defaults),ve};ve.walkTokens=function(e,t){return _n.walkTokens(e,t)};ve.parseInline=_n.parseInline;ve.Parser=Ht;ve.parser=Ht.parse;ve.Renderer=Qs;ve.TextRenderer=ci;ve.Lexer=zt;ve.lexer=zt.lex;ve.Tokenizer=Xs;ve.Hooks=Bs;ve.parse=ve;ve.options;ve.setOptions;ve.use;ve.walkTokens;ve.parseInline;Ht.parse;zt.lex;const dp="modulepreload",pp=function(e,t){return new URL(e,t).href},ml={},lt=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){let i=function(u){return Promise.all(u.map(f=>Promise.resolve(f).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=pp(u,s),u in ml)return;ml[u]=!0;const f=u.endsWith(".css"),h=f?'[rel="stylesheet"]':"";if(!!s)for(let g=l.length-1;g>=0;g--){const k=l[g];if(k.href===u&&(!f||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${u}"]${h}`))return;const d=document.createElement("link");if(d.rel=f?"stylesheet":dp,f||(d.as="script"),d.crossOrigin="",d.href=u,c&&d.setAttribute("nonce",c),document.head.appendChild(d),f)return new Promise((g,k)=>{d.addEventListener("load",g),d.addEventListener("error",()=>k(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 Be=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function gp(e){return ui(e)}function ui(e){return Array.isArray(e)?mp(e):e instanceof RegExp?e:typeof e=="object"?vp(e):e}function mp(e){let t=[];for(let n=0,s=e.length;n<s;n++)t[n]=ui(e[n]);return t}function vp(e){let t={};for(let n in e)t[n]=ui(e[n]);return t}function Rc(e,...t){return t.forEach(n=>{for(let s in n)e[s]=n[s]}),e}function $c(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?$c(e.substring(0,e.length-1)):e.substr(~t+1)}var Wr=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Ps=class{static hasCaptures(e){return e===null?!1:(Wr.lastIndex=0,Wr.test(e))}static replaceCaptures(e,t,n){return e.replace(Wr,(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 vl(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 Pc=class{constructor(e){C(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}},er=class{constructor(e,t,n){C(this,"_cachedMatchRoot",new Pc(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(_p(e),t)}static createFromParsedTheme(e,t){return wp(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=>yp(e.parent,r.parentScopes));return s?new Lc(s.fontStyle,s.foreground,s.background):null}},Vr=class js{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const s of n)t=new js(t,s);return t}static from(...t){let n=null;for(let s=0;s<t.length;s++)n=new js(n,t[s]);return n}push(t){return new js(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 yp(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&&!bp(e.scopeName,s);){if(r)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function bp(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var Lc=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function _p(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 f=i.scope;f=f.replace(/^[,]+/,""),f=f.replace(/[,]+$/,""),l=f.split(",")}else Array.isArray(i.scope)?l=i.scope:l=[""];let a=-1;if(typeof i.settings.fontStyle=="string"){a=0;let f=i.settings.fontStyle.split(" ");for(let h=0,p=f.length;h<p;h++)switch(f[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"&&vl(i.settings.foreground)&&(c=i.settings.foreground);let u=null;typeof i.settings.background=="string"&&vl(i.settings.background)&&(u=i.settings.background);for(let f=0,h=l.length;f<h;f++){let d=l[f].trim().split(" "),g=d[d.length-1],k=null;d.length>1&&(k=d.slice(0,d.length-1),k.reverse()),n[s++]=new kp(g,k,r,a,c,u)}}return n}var kp=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}},Ke=(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))(Ke||{});function wp(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 Sp(t),i=new Lc(n,o.getId(s),o.getId(r)),l=new Cp(new _o(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 er(o,i,l)}var Sp=class{constructor(e){C(this,"_isFrozen");C(this,"_lastColorId");C(this,"_id2color");C(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)}},xp=Object.freeze([]),_o=class Nc{constructor(t,n,s,r,o){C(this,"scopeDepth");C(this,"parentScopes");C(this,"fontStyle");C(this,"foreground");C(this,"background");this.scopeDepth=t,this.parentScopes=n||xp,this.fontStyle=s,this.foreground=r,this.background=o}clone(){return new Nc(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)}},Cp=class ko{constructor(t,n=[],s={}){C(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(ko._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 ko(this._mainRule.clone(),_o.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 _o(t,n,s,r,o))}},On=class dt{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=dt.getLanguageId(t),s=dt.getTokenType(t),r=dt.getFontStyle(t),o=dt.getForeground(t),i=dt.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=dt.getLanguageId(t),c=dt.getTokenType(t),u=dt.containsBalancedBrackets(t)?1:0,f=dt.getFontStyle(t),h=dt.getForeground(t),p=dt.getBackground(t);return n!==0&&(a=n),s!==8&&(c=s),r!==null&&(u=r?1:0),o!==-1&&(f=o),i!==0&&(h=i),l!==0&&(p=l),(a<<0|c<<8|u<<10|f<<11|h<<15|p<<24)>>>0}};function tr(e,t){const n=[],s=Tp(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(yl(r)){const a=[];do a.push(r),r=s.next();while(yl(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(f=>f(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(f=>f(u))}}function yl(e){return!!e&&!!e.match(/[\w\.:]+/)}function Tp(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 Mc(e){typeof e.dispose=="function"&&e.dispose()}var gs=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Rp=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},$p=class{constructor(){C(this,"_references",[]);C(this,"_seenReferenceKeys",new Set);C(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))}},Ap=class{constructor(e,t){C(this,"seenFullScopeRequests",new Set);C(this,"seenPartialScopeRequests",new Set);C(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new gs(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new $p;for(const n of e)Ep(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof gs){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 Ep(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 gs?Fs({baseGrammar:o,selfGrammar:r},s):wo(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 gs(l))}function wo(e,t,n){if(t.repository&&t.repository[e]){const s=t.repository[e];nr([s],t,n)}}function Fs(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&nr(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&nr(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function nr(e,t,n){for(const s of e){if(n.visitedRule.has(s))continue;n.visitedRule.add(s);const r=s.repository?Rc({},t.repository,s.repository):t.repository;Array.isArray(s.patterns)&&nr(s.patterns,{...t,repository:r},n);const o=s.include;if(!o)continue;const i=Oc(o);switch(i.kind){case 0:Fs({...t,selfGrammar:t.baseGrammar},n);break;case 1:Fs(t,n);break;case 2:wo(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?wo(i.ruleName,a,n):Fs(a,n)}else i.kind===4?n.add(new Rp(i.scopeName,i.ruleName)):n.add(new gs(i.scopeName));break}}}var Ip=class{constructor(){C(this,"kind",0)}},Pp=class{constructor(){C(this,"kind",1)}},Lp=class{constructor(e){C(this,"kind",2);this.ruleName=e}},Np=class{constructor(e){C(this,"kind",3);this.scopeName=e}},Mp=class{constructor(e,t){C(this,"kind",4);this.scopeName=e,this.ruleName=t}};function Oc(e){if(e==="$base")return new Ip;if(e==="$self")return new Pp;const t=e.indexOf("#");if(t===-1)return new Np(e);if(t===0)return new Lp(e.substring(1));{const n=e.substring(0,t),s=e.substring(t+1);return new Mp(n,s)}}var Op=/\\(\d+)/,bl=/\\(\d+)/g,Dp=-1,Dc=-2;var Cs=class{constructor(e,t,n,s){C(this,"$location");C(this,"id");C(this,"_nameIsCapturing");C(this,"_name");C(this,"_contentNameIsCapturing");C(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Ps.hasCaptures(this._name),this._contentName=s||null,this._contentNameIsCapturing=Ps.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${$c(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:Ps.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Ps.replaceCaptures(this._contentName,e,t)}},Bp=class extends Cs{constructor(t,n,s,r,o){super(t,n,s,r);C(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!")}},jp=class extends Cs{constructor(t,n,s,r,o){super(t,n,s,null);C(this,"_match");C(this,"captures");C(this,"_cachedCompiledPatterns");this._match=new ms(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 vs,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_l=class extends Cs{constructor(t,n,s,r,o){super(t,n,s,r);C(this,"hasMissingPatterns");C(this,"patterns");C(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 vs,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},So=class extends Cs{constructor(t,n,s,r,o,i,l,a,c,u){super(t,n,s,r);C(this,"_begin");C(this,"beginCaptures");C(this,"_end");C(this,"endHasBackReferences");C(this,"endCaptures");C(this,"applyEndPatternLast");C(this,"hasMissingPatterns");C(this,"patterns");C(this,"_cachedCompiledPatterns");this._begin=new ms(o,this.id),this.beginCaptures=i,this._end=new ms(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 vs;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}},sr=class extends Cs{constructor(t,n,s,r,o,i,l,a,c){super(t,n,s,r);C(this,"_begin");C(this,"beginCaptures");C(this,"whileCaptures");C(this,"_while");C(this,"whileHasBackReferences");C(this,"hasMissingPatterns");C(this,"patterns");C(this,"_cachedCompiledPatterns");C(this,"_cachedCompiledWhilePatterns");this._begin=new ms(o,this.id),this.beginCaptures=i,this.whileCaptures=a,this._while=new ms(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 vs;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 vs,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Bc=class He{static createCaptureRule(t,n,s,r,o){return t.registerRule(i=>new Bp(n,i,s,r,o))}static getCompiledRuleId(t,n,s){return t.id||n.registerRule(r=>{if(t.id=r,t.match)return new jp(t.$vscodeTextmateLocation,t.id,t.name,t.match,He._compileCaptures(t.captures,n,s));if(typeof t.begin>"u"){t.repository&&(s=Rc({},s,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new _l(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,He._compilePatterns(o,n,s))}return t.while?new sr(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,He._compileCaptures(t.beginCaptures||t.captures,n,s),t.while,He._compileCaptures(t.whileCaptures||t.captures,n,s),He._compilePatterns(t.patterns,n,s)):new So(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,He._compileCaptures(t.beginCaptures||t.captures,n,s),t.end,He._compileCaptures(t.endCaptures||t.captures,n,s),t.applyEndPatternLast,He._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=He.getCompiledRuleId(t[i],n,s)),r[l]=He.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=He.getCompiledRuleId(s[l.include],n,s);break;case 2:let u=s[c.ruleName];u&&(a=He.getCompiledRuleId(u,n,s));break;case 3:case 4:const f=c.scopeName,h=c.kind===4?c.ruleName:null,p=n.getExternalGrammar(f,s);if(p)if(h){let d=p.repository[h];d&&(a=He.getCompiledRuleId(d,n,p.repository))}else a=He.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else a=He.getCompiledRuleId(l,n,s);if(a!==-1){const c=n.getRule(a);let u=!1;if((c instanceof _l||c instanceof So||c instanceof sr)&&c.hasMissingPatterns&&c.patterns.length===0&&(u=!0),u)continue;r.push(a)}}return{patterns:r,hasMissingPatterns:(t?t.length:0)!==r.length}}},ms=class jc{constructor(t,n){C(this,"source");C(this,"ruleId");C(this,"hasAnchor");C(this,"hasBackReferences");C(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=Op.test(this.source):this.hasBackReferences=!1}clone(){return new jc(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 bl.lastIndex=0,this.source.replace(bl,(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}},vs=class{constructor(){C(this,"_items");C(this,"_hasAnchors");C(this,"_cached");C(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 kl(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 kl(e,s,this._items.map(r=>r.ruleId))}},kl=class{constructor(e,t,n){C(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(`
|
|
76
|
-
`)}findNextMatchSync(e,t,n){const s=this.scanner.findNextMatchSync(e,t,n);return s?{ruleId:this.rules[s.index],captureIndices:s.captureIndices}:null}},qr=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Gt,Fp=(Gt=class{constructor(t,n){C(this,"_defaultAttributes");C(this,"_embeddedLanguagesMatcher");C(this,"_getBasicScopeAttributes",new Pc(t=>{const n=this._scopeToLanguage(t),s=this._toStandardTokenType(t);return new qr(n,s)}));this._defaultAttributes=new qr(t,8),this._embeddedLanguagesMatcher=new Up(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Gt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Gt.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!")}},C(Gt,"_NULL_SCOPE_METADATA",new qr(0,0)),C(Gt,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Gt),Up=class{constructor(e){C(this,"values");C(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])}},wl=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Fc(e,t,n,s,r,o,i,l){const a=t.content.length;let c=!1,u=-1;if(i){const p=Gp(e,t,n,s,r,o);r=p.stack,s=p.linePos,n=p.isFirstLine,u=p.anchorPosition}const f=Date.now();for(;!c;){if(l!==0&&Date.now()-f>l)return new wl(r,!0);h()}return new wl(r,!1);function h(){const p=zp(e,t,n,s,r,u);if(!p){o.produce(r,a),c=!0;return}const d=p.captureIndices,g=p.matchedRuleId,k=d&&d.length>0?d[0].end>s:!1;if(g===Dp){const y=r.getRule(e);o.produce(r,d[0].start),r=r.withContentNameScopesList(r.nameScopesList),Jn(e,t,n,r,o,y.endCaptures,d),o.produce(r,d[0].end);const w=r;if(r=r.parent,u=w.getAnchorPos(),!k&&w.getEnterPos()===s){r=w,o.produce(r,a),c=!0;return}}else{const y=e.getRule(g);o.produce(r,d[0].start);const w=r,S=y.getName(t.content,d),A=r.contentNameScopesList.pushAttributed(S,e);if(r=r.push(g,s,u,d[0].end===a,null,A,A),y instanceof So){const F=y;Jn(e,t,n,r,o,F.beginCaptures,d),o.produce(r,d[0].end),u=d[0].end;const z=F.getContentName(t.content,d),B=A.pushAttributed(z,e);if(r=r.withContentNameScopesList(B),F.endHasBackReferences&&(r=r.withEndRule(F.getEndWithResolvedBackReferences(t.content,d))),!k&&w.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(y instanceof sr){const F=y;Jn(e,t,n,r,o,F.beginCaptures,d),o.produce(r,d[0].end),u=d[0].end;const z=F.getContentName(t.content,d),B=A.pushAttributed(z,e);if(r=r.withContentNameScopesList(B),F.whileHasBackReferences&&(r=r.withEndRule(F.getWhileWithResolvedBackReferences(t.content,d))),!k&&w.hasSameRuleAs(r)){r=r.pop(),o.produce(r,a),c=!0;return}}else if(Jn(e,t,n,r,o,y.captures,d),o.produce(r,d[0].end),r=r.pop(),!k){r=r.safePop(),o.produce(r,a),c=!0;return}}d[0].end>s&&(s=d[0].end,n=!1)}}function Gp(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 sr&&l.push({rule:c,stack:a})}for(let a=l.pop();a;a=l.pop()){const{ruleScanner:c,findOptions:u}=Vp(a.rule,e,a.stack.endRule,n,s===i),f=c.findNextMatchSync(t,s,u);if(f){if(f.ruleId!==Dc){r=a.stack.pop();break}f.captureIndices&&f.captureIndices.length&&(o.produce(a.stack,f.captureIndices[0].start),Jn(e,t,n,a.stack,o,a.rule.whileCaptures,f.captureIndices),o.produce(a.stack,f.captureIndices[0].end),i=f.captureIndices[0].end,f.captureIndices[0].end>s&&(s=f.captureIndices[0].end,n=!1))}else{r=a.stack.pop();break}}return{stack:r,linePos:s,anchorPosition:i,isFirstLine:n}}function zp(e,t,n,s,r,o){const i=Hp(e,t,n,s,r,o),l=e.getInjections();if(l.length===0)return i;const a=Wp(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 Hp(e,t,n,s,r,o){const i=r.getRule(e),{ruleScanner:l,findOptions:a}=Uc(i,e,r.endRule,n,s===o),c=l.findNextMatchSync(t,s,a);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Wp(e,t,n,s,r,o,i){let l=Number.MAX_VALUE,a=null,c,u=0;const f=o.contentNameScopesList.getScopeNames();for(let h=0,p=e.length;h<p;h++){const d=e[h];if(!d.matcher(f))continue;const g=t.getRule(d.ruleId),{ruleScanner:k,findOptions:y}=Uc(g,t,null,s,r===i),w=k.findNextMatchSync(n,r,y);if(!w)continue;const S=w.captureIndices[0].start;if(!(S>=l)&&(l=S,a=w.captureIndices,c=w.ruleId,u=d.priority,l===r))break}return a?{priorityMatch:u===-1,captureIndices:a,matchedRuleId:c}:null}function Uc(e,t,n,s,r){return{ruleScanner:e.compileAG(t,n,s,r),findOptions:0}}function Vp(e,t,n,s,r){return{ruleScanner:e.compileWhileAG(t,n,s,r),findOptions:0}}function Jn(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 f=0;f<a;f++){const h=o[f];if(h===null)continue;const p=i[f];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 g=h.getName(l,i),k=s.contentNameScopesList.pushAttributed(g,e),y=h.getContentName(l,i),w=k.pushAttributed(y,e),S=s.push(h.retokenizeCapturedWithRuleId,p.start,-1,!1,null,k,w),A=e.createOnigString(l.substring(0,p.end));Fc(e,A,n&&p.start===0,p.start,S,r,!1,0),Mc(A);continue}const d=h.getName(l,i);if(d!==null){const k=(c.length>0?c[c.length-1].scopes:s.contentNameScopesList).pushAttributed(d,e);c.push(new qp(k,p.end))}}for(;c.length>0;)r.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var qp=class{constructor(e,t){C(this,"scopes");C(this,"endPos");this.scopes=e,this.endPos=t}};function Kp(e,t,n,s,r,o,i,l){return new Jp(e,t,n,s,r,o,i,l)}function Sl(e,t,n,s,r){const o=tr(t,rr),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 rr(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(Yp(t[r],s))return n=r+1,!0;return!1})}function Yp(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 Jp=class{constructor(e,t,n,s,r,o,i,l){C(this,"_rootId");C(this,"_lastRuleId");C(this,"_ruleId2desc");C(this,"_includedGrammars");C(this,"_grammarRepository");C(this,"_grammar");C(this,"_injections");C(this,"_basicScopeAttributesProvider");C(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=l,this._basicScopeAttributesProvider=new Fp(n,s),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=i,this._grammar=xl(t,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const a of Object.keys(r)){const c=tr(a,rr);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)Sl(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&&Sl(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]=xl(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===xo.NULL){r=!0;const c=this._basicScopeAttributesProvider.getDefaultAttributes(),u=this.themeProvider.getDefaults(),f=On.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=is.createRootAndLookUpScopeName(h,f,this):p=is.createRoot("unknown",f),t=new xo(null,this._rootId,-1,-1,!1,null,p,p)}else r=!1,t.reset();e=e+`
|
|
77
|
-
`;const o=this.createOnigString(e),i=o.content.length,l=new Xp(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),a=Fc(this,o,r,0,t,l,!0,s);return Mc(o),{lineLength:i,lineTokens:l,ruleStack:a.stack,stoppedEarly:a.stoppedEarly}}};function xl(e,t){return e=gp(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 is=class At{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=Vr.push(r,o.scopeNames),s=new At(s,r,o.encodedTokenAttributes);return s}static createRoot(t,n){return new At(null,new Vr(null,t),n)}static createRootAndLookUpScopeName(t,n,s){const r=s.getMetadataForScope(t),o=new Vr(null,t),i=s.themeProvider.themeMatch(o),l=At.mergeAttributes(n,r,i);return new At(null,o,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return At.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),On.set(t,n.languageId,n.tokenType,null,r,o,i)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return At._pushAttributed(this,t,n);const s=t.split(/ /g);let r=this;for(const o of s)r=At._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=At.mergeAttributes(t.tokenAttributes,r,i);return new At(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}},gt,xo=(gt=class{constructor(t,n,s,r,o,i,l,a){C(this,"_stackElementBrand");C(this,"_enterPos");C(this,"_anchorPos");C(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:gt._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?is.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(){gt._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,s,r,o,i,l){return new gt(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 gt(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=is.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new gt(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,s,is.fromExtension(s,n.contentNameScopesList))}},C(gt,"NULL",new gt(null,0,0,0,!1,null,null,null)),gt),Zp=class{constructor(e,t){C(this,"balancedBracketScopes");C(this,"unbalancedBracketScopes");C(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):tr(n,rr).map(s=>s.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>tr(n,rr).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}},Xp=class{constructor(e,t,n,s){C(this,"_emitBinaryTokens");C(this,"_lineText");C(this,"_tokens");C(this,"_binaryTokens");C(this,"_lastTokenEndIndex");C(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=On.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(i))}if(o&&(r=On.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}},Qp=class{constructor(e,t){C(this,"_grammars",new Map);C(this,"_rawGrammars",new Map);C(this,"_injectionGrammars",new Map);C(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,Kp(e,o,t,n,s,r,this,this._onigLib))}return this._grammars.get(e)}},eg=class{constructor(t){C(this,"_options");C(this,"_syncRegistry");C(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new Qp(er.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(er.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 Zp(s.balancedBracketSelectors||[],s.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,s,r,o){const i=new Ap(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)}},Co=xo.NULL;const tg=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ts{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}}Ts.prototype.normal={};Ts.prototype.property={};Ts.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 Ts(n,s,t)}function To(e){return e.toLowerCase()}class rt{constructor(t,n){this.attribute=n,this.property=t}}rt.prototype.attribute="";rt.prototype.booleanish=!1;rt.prototype.boolean=!1;rt.prototype.commaOrSpaceSeparated=!1;rt.prototype.commaSeparated=!1;rt.prototype.defined=!1;rt.prototype.mustUseProperty=!1;rt.prototype.number=!1;rt.prototype.overloadedBoolean=!1;rt.prototype.property="";rt.prototype.spaceSeparated=!1;rt.prototype.space=void 0;let ng=0;const ne=wn(),Pe=wn(),Ro=wn(),M=wn(),_e=wn(),yn=wn(),at=wn();function wn(){return 2**++ng}const $o=Object.freeze(Object.defineProperty({__proto__:null,boolean:ne,booleanish:Pe,commaOrSpaceSeparated:at,commaSeparated:yn,number:M,overloadedBoolean:Ro,spaceSeparated:_e},Symbol.toStringTag,{value:"Module"})),Kr=Object.keys($o);class fi extends rt{constructor(t,n,s,r){let o=-1;if(super(t,n),Cl(this,"space",r),typeof s=="number")for(;++o<Kr.length;){const i=Kr[o];Cl(this,Kr[o],(s&$o[i])===$o[i])}}}fi.prototype.defined=!0;function Cl(e,t,n){n&&(e[t]=n)}function Bn(e){const t={},n={};for(const[s,r]of Object.entries(e.properties)){const o=new fi(s,e.transform(e.attributes||{},s),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[To(s)]=s,n[To(o.attribute)]=s}return new Ts(t,n,e.space)}const zc=Bn({properties:{ariaActiveDescendant:null,ariaAtomic:Pe,ariaAutoComplete:null,ariaBusy:Pe,ariaChecked:Pe,ariaColCount:M,ariaColIndex:M,ariaColSpan:M,ariaControls:_e,ariaCurrent:null,ariaDescribedBy:_e,ariaDetails:null,ariaDisabled:Pe,ariaDropEffect:_e,ariaErrorMessage:null,ariaExpanded:Pe,ariaFlowTo:_e,ariaGrabbed:Pe,ariaHasPopup:null,ariaHidden:Pe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_e,ariaLevel:M,ariaLive:null,ariaModal:Pe,ariaMultiLine:Pe,ariaMultiSelectable:Pe,ariaOrientation:null,ariaOwns:_e,ariaPlaceholder:null,ariaPosInSet:M,ariaPressed:Pe,ariaReadOnly:Pe,ariaRelevant:null,ariaRequired:Pe,ariaRoleDescription:_e,ariaRowCount:M,ariaRowIndex:M,ariaRowSpan:M,ariaSelected:Pe,ariaSetSize:M,ariaSort:null,ariaValueMax:M,ariaValueMin:M,ariaValueNow:M,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 sg=Bn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:yn,acceptCharset:_e,accessKey:_e,action:null,allow:null,allowFullScreen:ne,allowPaymentRequest:ne,allowUserMedia:ne,alpha:ne,alt:null,as:null,async:ne,autoCapitalize:null,autoComplete:_e,autoFocus:ne,autoPlay:ne,blocking:_e,capture:null,charSet:null,checked:ne,cite:null,className:_e,closedBy:null,colorSpace:null,cols:M,colSpan:M,command:null,commandFor:null,content:null,contentEditable:Pe,controls:ne,controlsList:_e,coords:M|yn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ne,defer:ne,dir:null,dirName:null,disabled:ne,download:Ro,draggable:Pe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ne,formTarget:null,headers:_e,height:M,hidden:Ro,high:M,href:null,hrefLang:null,htmlFor:_e,httpEquiv:_e,id:null,imageSizes:null,imageSrcSet:null,inert:ne,inputMode:null,integrity:null,is:null,isMap:ne,itemId:null,itemProp:_e,itemRef:_e,itemScope:ne,itemType:_e,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ne,low:M,manifest:null,max:null,maxLength:M,media:null,method:null,min:null,minLength:M,multiple:ne,muted:ne,name:null,nonce:null,noModule:ne,noValidate:ne,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:ne,optimum:M,pattern:null,ping:_e,placeholder:null,playsInline:ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ne,referrerPolicy:null,rel:_e,required:ne,reversed:ne,rows:M,rowSpan:M,sandbox:_e,scope:null,scoped:ne,seamless:ne,selected:ne,shadowRootClonable:ne,shadowRootCustomElementRegistry:ne,shadowRootDelegatesFocus:ne,shadowRootMode:null,shadowRootSerializable:ne,shape:null,size:M,sizes:null,slot:null,span:M,spellCheck:Pe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:M,step:null,style:null,tabIndex:M,target:null,title:null,translate:null,type:null,typeMustMatch:ne,useMap:null,value:Pe,width:M,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_e,axis:null,background:null,bgColor:null,border:M,borderColor:null,bottomMargin:M,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ne,declare:ne,event:null,face:null,frame:null,frameBorder:null,hSpace:M,leftMargin:M,link:null,longDesc:null,lowSrc:null,marginHeight:M,marginWidth:M,noResize:ne,noHref:ne,noShade:ne,noWrap:ne,object:null,profile:null,prompt:null,rev:null,rightMargin:M,rules:null,scheme:null,scrolling:Pe,standby:null,summary:null,text:null,topMargin:M,valueType:null,version:null,vAlign:null,vLink:null,vSpace:M,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ne,disablePictureInPicture:ne,disableRemotePlayback:ne,exportParts:yn,part:_e,prefix:null,property:null,results:M,security:null,unselectable:null},space:"html",transform:Wc}),rg=Bn({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:at,accentHeight:M,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:M,amplitude:M,arabicForm:null,ascent:M,attributeName:null,attributeType:null,azimuth:M,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:M,by:null,calcMode:null,capHeight:M,className:_e,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:M,diffuseConstant:M,direction:null,display:null,dur:null,divisor:M,dominantBaseline:null,download:ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:M,enableBackground:null,end:null,event:null,exponent:M,externalResourcesRequired:null,fill:null,fillOpacity:M,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:yn,g2:yn,glyphName:yn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:M,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:M,horizOriginX:M,horizOriginY:M,id:null,ideographic:M,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:M,k:M,k1:M,k2:M,k3:M,k4:M,kernelMatrix:at,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:M,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:M,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:M,overlineThickness:M,paintOrder:null,panose1:null,path:null,pathLength:M,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_e,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:M,pointsAtY:M,pointsAtZ:M,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:at,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:at,rev:at,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:at,requiredFeatures:at,requiredFonts:at,requiredFormats:at,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:M,specularExponent:M,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:M,strikethroughThickness:M,string:null,stroke:null,strokeDashArray:at,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:M,strokeOpacity:M,strokeWidth:null,style:null,surfaceScale:M,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:at,tabIndex:M,tableValues:null,target:null,targetX:M,targetY:M,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:at,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:M,underlineThickness:M,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:M,values:null,vAlphabetic:M,vMathematical:M,vectorEffect:null,vHanging:M,vIdeographic:M,version:null,vertAdvY:M,vertOriginX:M,vertOriginY:M,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:M,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Hc}),Vc=Bn({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()}}),qc=Bn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Wc}),Kc=Bn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),og=/[A-Z]/g,Tl=/-[a-z]/g,ig=/^data[-\w.:]+$/i;function lg(e,t){const n=To(t);let s=t,r=rt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ig.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(Tl,cg);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!Tl.test(o)){let i=o.replace(og,ag);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}r=fi}return new r(s,t)}function ag(e){return"-"+e.toLowerCase()}function cg(e){return e.charAt(1).toUpperCase()}const ug=Gc([zc,sg,Vc,qc,Kc],"html"),Yc=Gc([zc,rg,Vc,qc,Kc],"svg"),Rl={}.hasOwnProperty;function fg(e,t){const n=t||{};function s(r,...o){let i=s.invalid;const l=s.handlers;if(r&&Rl.call(r,e)){const a=String(r[e]);i=Rl.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 hg=/["&'<>`]/g,dg=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,pg=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,gg=/[|\\{}()[\]^$+*?.]/g,$l=new WeakMap;function mg(e,t){if(e=e.replace(t.subset?vg(t.subset):hg,s),t.subset||t.escapeOnly)return e;return e.replace(dg,n).replace(pg,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 vg(e){let t=$l.get(e);return t||(t=yg(e),$l.set(e,t)),t}function yg(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(gg,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const bg=/[\dA-Fa-f]/;function _g(e,t,n){const s="&#x"+e.toString(16).toUpperCase();return n&&t&&!bg.test(String.fromCharCode(t))?s:s+";"}const kg=/\d/;function wg(e,t,n){const s="&#"+String(e);return n&&t&&!kg.test(String.fromCharCode(t))?s:s+";"}const Sg=["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"],Yr={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:"€"},xg=["cent","copy","divide","gt","lt","not","para","times"],Jc={}.hasOwnProperty,Ao={};let Ls;for(Ls in Yr)Jc.call(Yr,Ls)&&(Ao[Yr[Ls]]=Ls);const Cg=/[^\dA-Za-z]/;function Tg(e,t,n,s){const r=String.fromCharCode(e);if(Jc.call(Ao,r)){const o=Ao[r],i="&"+o;return n&&Sg.includes(o)&&!xg.includes(o)&&(!s||t&&t!==61&&Cg.test(String.fromCharCode(t)))?i:i+";"}return""}function Rg(e,t,n){let s=_g(e,t,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=Tg(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const o=wg(e,t,n.omitOptionalSemicolons);o.length<s.length&&(s=o)}return r&&(!n.useShortestReferences||r.length<s.length)?r:s}function Pn(e,t){return mg(e,Object.assign({format:Rg},t))}const $g=/^>|^->|<!--|-->|--!>|<!-$/g,Ag=[">"],Eg=["<",">"];function Ig(e,t,n,s){return s.settings.bogusComments?"<?"+Pn(e.value,Object.assign({},s.settings.characterReferences,{subset:Ag}))+">":"<!--"+e.value.replace($g,r)+"-->";function r(o){return Pn(o,Object.assign({},s.settings.characterReferences,{subset:Eg}))}}function Pg(e,t,n,s){return"<!"+(s.settings.upperDoctype?"DOCTYPE":"doctype")+(s.settings.tightDoctype?"":" ")+"html>"}function Al(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 Lg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Ng(e){return e.join(" ").trim()}const Mg=/[ \t\n\f\r]/g;function hi(e){return typeof e=="object"?e.type==="text"?El(e.value):!1:El(e)}function El(e){return e.replace(Mg,"")===""}const Oe=Xc(1),Zc=Xc(-1),Og=[];function Xc(e){return t;function t(n,s,r){const o=n?n.children:Og;let i=(s||0)+e,l=o[i];if(!r)for(;l&&hi(l);)i+=e,l=o[i];return l}}const Dg={}.hasOwnProperty;function Qc(e){return t;function t(n,s,r){return Dg.call(e,n.tagName)&&e[n.tagName](n,s,r)}}const di=Qc({body:jg,caption:Jr,colgroup:Jr,dd:zg,dt:Gg,head:Jr,html:Bg,li:Ug,optgroup:Hg,option:Wg,p:Fg,rp:Il,rt:Il,tbody:qg,td:Pl,tfoot:Kg,th:Pl,thead:Vg,tr:Yg});function Jr(e,t,n){const s=Oe(n,t,!0);return!s||s.type!=="comment"&&!(s.type==="text"&&hi(s.value.charAt(0)))}function Bg(e,t,n){const s=Oe(n,t);return!s||s.type!=="comment"}function jg(e,t,n){const s=Oe(n,t);return!s||s.type!=="comment"}function Fg(e,t,n){const s=Oe(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 Ug(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&s.tagName==="li"}function Gg(e,t,n){const s=Oe(n,t);return!!(s&&s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd"))}function zg(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&(s.tagName==="dt"||s.tagName==="dd")}function Il(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&(s.tagName==="rp"||s.tagName==="rt")}function Hg(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&s.tagName==="optgroup"}function Wg(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&(s.tagName==="option"||s.tagName==="optgroup")}function Vg(e,t,n){const s=Oe(n,t);return!!(s&&s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot"))}function qg(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&(s.tagName==="tbody"||s.tagName==="tfoot")}function Kg(e,t,n){return!Oe(n,t)}function Yg(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&s.tagName==="tr"}function Pl(e,t,n){const s=Oe(n,t);return!s||s.type==="element"&&(s.tagName==="td"||s.tagName==="th")}const Jg=Qc({body:Qg,colgroup:em,head:Xg,html:Zg,tbody:tm});function Zg(e){const t=Oe(e,-1);return!t||t.type!=="comment"}function Xg(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 Qg(e){const t=Oe(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&hi(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function em(e,t,n){const s=Zc(n,t),r=Oe(e,-1,!0);return n&&s&&s.type==="element"&&s.tagName==="colgroup"&&di(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function tm(e,t,n){const s=Zc(n,t),r=Oe(e,-1);return n&&s&&s.type==="element"&&(s.tagName==="thead"||s.tagName==="tbody")&&di(s,n.children.indexOf(s),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const Ns={name:[[`
|
|
78
|
-
\f\r &/=>`.split(""),`
|
|
79
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
80
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
81
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
82
|
-
\f\r &>`.split(""),`\0
|
|
83
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
84
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
85
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function nm(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=Yc);const c=sm(s,e.properties),u=s.all(r.space==="html"&&e.tagName==="template"?e.content:e);return s.schema=r,u&&(i=!1),(c||!o||!Jg(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||!di(e,t,n))&&l.push("</"+e.tagName+">"),l.join("")}function sm(e,t){const n=[];let s=-1,r;if(t){for(r in t)if(t[r]!==null&&t[r]!==void 0){const o=rm(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 rm(e,t,n){const s=lg(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=Pn(s.attribute,Object.assign({},e.settings.characterReferences,{subset:Ns.name[r][o]}));return n===!0||(n=Array.isArray(n)?(s.commaSeparated?Lg:Ng)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?a:(e.settings.preferUnquoted&&(l=Pn(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Ns.unquoted[r][o]}))),l!==n&&(e.settings.quoteSmart&&Al(n,i)>Al(n,e.alternative)&&(i=e.alternative),l=i+Pn(n,Object.assign({},e.settings.characterReferences,{subset:(i==="'"?Ns.single:Ns.double)[r][o],attribute:!0}))+i),a+(l&&"="+l))}const om=["<","&"];function eu(e,t,n,s){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Pn(e.value,Object.assign({},s.settings.characterReferences,{subset:om}))}function im(e,t,n,s){return s.settings.allowDangerousHtml?e.value:eu(e,t,n,s)}function lm(e,t,n,s){return s.all(e)}const am=fg("type",{invalid:cm,unknown:um,handlers:{comment:Ig,doctype:Pg,element:nm,raw:im,root:lm,text:eu}});function cm(e){throw new Error("Expected node, not `"+e+"`")}function um(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const fm={},hm={},dm=[];function pm(e,t){const n=t||fm,s=n.quote||'"',r=s==='"'?"'":'"';if(s!=='"'&&s!=="'")throw new Error("Invalid quote `"+s+"`, expected `'` or `\"`");return{one:gm,all:mm,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||tg,characterReferences:n.characterReferences||hm,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Yc:ug,quote:s,alternative:r}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function gm(e,t,n){return am(e,t,n,this)}function mm(e){const t=[],n=e&&e.children||dm;let s=-1;for(;++s<n.length;)t[s]=this.one(n[s],s,e);return t.join("")}function or(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 nn(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function vm(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 pi(e){return!e||["plaintext","txt","text","plain"].includes(e)}function ym(e){return e==="ansi"||pi(e)}function gi(e){return e==="none"}function bm(e){return gi(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 $r(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 _m(e){const t=$r(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 mi="light-dark()",km=["color","background-color"];function wm(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 Sm(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?wm(r,o):r})):e}function xm(e,t,n,s,r="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},i=t.map(u=>ir(e.variants[u])),l=new Set(i.flatMap(u=>Object.keys(u))),a={},c=(u,f)=>{const h=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+t[u]+(f==="color"?"":h)};return i.forEach((u,f)=>{for(const h of l){const p=u[h]||"inherit";if(f===0&&s&&km.includes(h))if(s===mi&&i.length>1){const d=t.findIndex(w=>w==="light"),g=t.findIndex(w=>w==="dark");if(d===-1||g===-1)throw new Be('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const k=i[d][h]||"inherit",y=i[g][h]||"inherit";a[h]=`light-dark(${k}, ${y})`,r==="css-vars"&&(a[c(f,h)]=p)}else a[h]=p;else r==="css-vars"&&(a[c(f,h)]=p)}}),o.htmlStyle=a,o}function ir(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Ke.Italic&&(t["font-style"]="italic"),e.fontStyle&Ke.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Ke.Underline&&n.push("underline"),e.fontStyle&Ke.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Eo(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const su=new WeakMap;function Ar(e,t){su.set(e,t)}function ys(e){return su.get(e)}class jn{constructor(...t){C(this,"_stacks",{});C(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 jn(Object.fromEntries(vm(n).map(s=>[s,Co])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Cm(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function Cm(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 Tm(e,t){if(!(e instanceof jn))throw new Be("Invalid grammar state");return e.getInternalStack(t)}function Rm(){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 Be(`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 Be(`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 Be(`Invalid decoration position ${JSON.stringify(i)}. Line ${i.line} length: ${l.length}`);return{...i,character:a,offset:r.posToIndex(i.line,a)}}};const r=_m(n.source),o=(n.options.decorations||[]).map(i=>({...i,start:s(i.start),end:s(i.end)}));$m(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 Sm(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(f=>f.type==="element"&&f.tagName==="span");if(r.length!==s.converter.lines.length)throw new Be(`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(f,h,p,d){const g=r[f];let k="",y=-1,w=-1;if(h===0&&(y=0),p===0&&(w=0),p===Number.POSITIVE_INFINITY&&(w=g.children.length),y===-1||w===-1)for(let A=0;A<g.children.length;A++)k+=ru(g.children[A]),y===-1&&k.length===h&&(y=A+1),w===-1&&k.length===p&&(w=A+1);if(y===-1)throw new Be(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(w===-1)throw new Be(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const S=g.children.slice(y,w);if(!d.alwaysWrap&&S.length===g.children.length)l(g,d,"line");else if(!d.alwaysWrap&&S.length===1&&S[0].type==="element")l(S[0],d,"token");else{const A={type:"element",tagName:"span",properties:{},children:S};l(A,d,"wrapper"),g.children.splice(y,S.length,A)}}function i(f,h){r[f]=l(r[f],h,"line")}function l(f,h,p){var k;const d=h.properties||{},g=h.transform||(y=>y);return f.tagName=h.tagName||"span",f.properties={...f.properties,...d,class:f.properties.class},(k=h.properties)!=null&&k.class&&nu(f,h.properties.class),f=g(f,p)||f,f}const a=[],c=s.decorations.sort((f,h)=>h.start.offset-f.start.offset||f.end.offset-h.end.offset);for(const f of c){const{start:h,end:p}=f;if(h.line===p.line)o(h.line,h.character,p.character,f);else if(h.line<p.line){o(h.line,h.character,Number.POSITIVE_INFINITY,f);for(let d=h.line+1;d<p.line;d++)a.unshift(()=>i(d,f));o(p.line,0,p.character,f)}}a.forEach(f=>f())}}}function $m(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Be(`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 Be(`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 Am=[Rm()];function lr(e){const t=Em(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Am]}function Em(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 gn=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Zr={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Im(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 Ll(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 Pm(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)Zr[s]&&t.push({type:"setDecoration",value:Zr[s]});else if(s<=29){const r=Zr[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:gn[s-30]}});else if(s===38){const r=Ll(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:gn[s-40]}});else if(s===48){const r=Ll(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:gn[s-90+8]}}):s>=100&&s<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:gn[s-100+8]}})}return t}function Lm(){let e=null,t=null,n=new Set;return{parse(s){const r=[];let o=0;do{const i=Im(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=Pm(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 Nm={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 Mm(e=Nm){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<gn.length;c++)s.push(t(gn[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 f=0;f<6;f++)s.push(n([l[c],l[u],l[f]]));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 Om={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 Dm(e,t,n){const s=or(e,n),r=$r(t),o=Object.fromEntries(gn.map(a=>{var f;const c=`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`,u=(f=e.colors)==null?void 0:f[c];return[a,u||Om[a]]})),i=Mm(o),l=Lm();return r.map(a=>l.parse(a[0]).map(c=>{let u,f;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,f=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,f=c.background?i.value(c.background):void 0),u=nn(u,s),f=nn(f,s),c.decorations.has("dim")&&(u=Bm(u));let h=Ke.None;return c.decorations.has("bold")&&(h|=Ke.Bold),c.decorations.has("italic")&&(h|=Ke.Italic),c.decorations.has("underline")&&(h|=Ke.Underline),c.decorations.has("strikethrough")&&(h|=Ke.Strikethrough),{content:c.value,offset:a[1],color:u,bgColor:f,fontStyle:h}}))}function Bm(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 vi(e,t,n={}){const{theme:s=e.getLoadedThemes()[0]}=n,r=e.resolveLangAlias(n.lang||"text");if(pi(r)||gi(s))return $r(t).map(a=>[{content:a[0],offset:a[1]}]);const{theme:o,colorMap:i}=e.setTheme(s);if(r==="ansi")return Dm(o,t,n);const l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Be(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Be(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return Fm(t,l,o,i,n)}function jm(...e){if(e.length===2)return ys(e[1]);const[t,n,s={}]=e,{lang:r="text",theme:o=t.getLoadedThemes()[0]}=s;if(pi(r)||gi(o))throw new Be("Plain language does not have grammar state");if(r==="ansi")throw new Be("ANSI language does not have grammar state");const{theme:i,colorMap:l}=t.setTheme(o),a=t.getLanguage(r);return new jn(yi(n,a,i,l,s).stateStack,a.name,i.name)}function Fm(e,t,n,s,r){const o=yi(e,t,n,s,r),i=new jn(o.stateStack,t.name,n.name);return Ar(o.tokens,i),o.tokens}function yi(e,t,n,s,r){const o=or(n,r),{tokenizeMaxLineLength:i=0,tokenizeTimeLimit:l=500}=r,a=$r(e);let c=r.grammarState?Tm(r.grammarState,n.name)??Co:r.grammarContextCode!=null?yi(r.grammarContextCode,t,n,s,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:Co,u=[];const f=[];for(let h=0,p=a.length;h<p;h++){const[d,g]=a[h];if(d===""){u=[],f.push([]);continue}if(i>0&&d.length>=i){u=[],f.push([{content:d,offset:g,color:"",fontStyle:0}]);continue}let k,y,w;r.includeExplanation&&(k=t.tokenizeLine(d,c,l),y=k.tokens,w=0);const S=t.tokenizeLine2(d,c,l),A=S.tokens.length/2;for(let F=0;F<A;F++){const z=S.tokens[2*F],B=F+1<A?S.tokens[2*F+2]:d.length;if(z===B)continue;const Z=S.tokens[2*F+1],U=nn(s[On.getForeground(Z)],o),V=On.getFontStyle(Z),re={content:d.substring(z,B),offset:g+z,color:U,fontStyle:V};if(r.includeExplanation){const j=[];if(r.includeExplanation!=="scopeName")for(const te of n.settings){let Ae;switch(typeof te.scope){case"string":Ae=te.scope.split(/,/).map(le=>le.trim());break;case"object":Ae=te.scope;break;default:continue}j.push({settings:te,selectors:Ae.map(le=>le.split(/ /))})}re.explanation=[];let Q=0;for(;z+Q<B;){const te=y[w],Ae=d.substring(te.startIndex,te.endIndex);Q+=Ae.length,re.explanation.push({content:Ae,scopes:r.includeExplanation==="scopeName"?Um(te.scopes):Gm(j,te.scopes)}),w+=1}}u.push(re)}f.push(u),u=[],c=S.ruleStack}return{tokens:f,stateStack:c}}function Um(e){return e.map(t=>({scopeName:t}))}function Gm(e,t){const n=[];for(let s=0,r=t.length;s<r;s++){const o=t[s];n[s]={scopeName:o,themeMatches:Hm(e,o,t.slice(0,s))}}return n}function Nl(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function zm(e,t,n){if(!Nl(e[e.length-1],t))return!1;let s=e.length-2,r=n.length-1;for(;s>=0&&r>=0;)Nl(e[s],n[r])&&(s-=1),r-=1;return s===-1}function Hm(e,t,n){const s=[];for(const{selectors:r,settings:o}of e)for(const i of r)if(zm(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=vi(e,t,{...n,theme:a.theme}),u=ys(c),f=typeof a.theme=="string"?a.theme:a.theme.name;return{tokens:c,state:u,theme:f}}),o=Wm(...r.map(a=>a.tokens)),i=o[0].map((a,c)=>a.map((u,f)=>{const h={content:u.content,variants:{},offset:u.offset};return"includeExplanation"in n&&n.includeExplanation&&(h.explanation=u.explanation),o.forEach((p,d)=>{const{content:g,explanation:k,offset:y,...w}=p[c][f];h.variants[s[d].color]=w}),h})),l=r[0].state?new jn(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&&Ar(i,l),i}function Wm(...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 ar(e,t,n){let s,r,o,i,l,a;if("themes"in n){const{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,h=Object.entries(n.themes).filter(y=>y[1]).map(y=>({color:y[0],theme:y[1]})).sort((y,w)=>y.color===c?-1:w.color===c?1:0);if(h.length===0)throw new Be("`themes` option must not be empty");const p=ou(e,t,n);if(a=ys(p),c&&mi!==c&&!h.find(y=>y.color===c))throw new Be(`\`themes\` option must contain the defaultColor key \`${c}\``);const d=h.map(y=>e.getTheme(y.theme)),g=h.map(y=>y.color);o=p.map(y=>y.map(w=>xm(w,g,u,c,f))),a&&Ar(o,a);const k=h.map(y=>or(y.theme,n));r=Ml(h,d,k,u,c,"fg",f),s=Ml(h,d,k,u,c,"bg",f),i=`shiki-themes ${d.map(y=>y.name).join(" ")}`,l=c?void 0:[r,s].join(";")}else if("theme"in n){const c=or(n.theme,n);o=vi(e,t,n);const u=e.getTheme(n.theme);s=nn(u.bg,c),r=nn(u.fg,c),i=u.name,a=ys(o)}else throw new Be("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:r,bg:s,themeName:i,rootStyle:l,grammarState:a}}function Ml(e,t,n,s,r,o,i){return e.map((l,a)=>{const c=nn(t[a][o],n[a])||"inherit",u=`${s+l.color}${o==="bg"?"-bg":""}:${c}`;if(a===0&&r){if(r===mi&&e.length>1){const f=e.findIndex(g=>g.color==="light"),h=e.findIndex(g=>g.color==="dark");if(f===-1||h===-1)throw new Be('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const p=nn(t[f][o],n[f])||"inherit",d=nn(t[h][o],n[h])||"inherit";return`light-dark(${p}, ${d});${u}`}return c}return i==="css-vars"?u:null}).filter(l=>!!l).join(";")}function cr(e,t,n,s={meta:{},options:n,codeToHast:(r,o)=>cr(e,r,o),codeToTokens:(r,o)=>ar(e,r,o)}){var d,g;let r=t;for(const k of lr(n))r=((d=k.preprocess)==null?void 0:d.call(s,r,n))||r;let{tokens:o,fg:i,bg:l,themeName:a,rootStyle:c,grammarState:u}=ar(e,r,n);const{mergeWhitespaces:f=!0,mergeSameStyleTokens:h=!1}=n;f===!0?o=qm(o):f==="never"&&(o=Km(o)),h&&(o=Ym(o));const p={...s,get source(){return r}};for(const k of lr(n))o=((g=k.tokens)==null?void 0:g.call(p,o))||o;return Vm(o,{...n,fg:i,bg:l,themeName:a,rootStyle:n.rootStyle===!1?!1:n.rootStyle??c},p,u)}function Vm(e,t,n,s=ys(e)){var g,k,y,w;const r=lr(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[S,A]of Object.entries(t.meta||{}))S.startsWith("_")||(c[S]=A);let u={type:"element",tagName:"pre",properties:c,children:[],data:t.data},f={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 f},get lines(){return h}};if(e.forEach((S,A)=>{var B,Z;A&&(l==="inline"?i.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&o.push({type:"text",value:`
|
|
86
|
-
`}));let F={type:"element",tagName:"span",properties:{class:"line"},children:[]},z=0;for(const U of S){let V={type:"element",tagName:"span",properties:{...U.htmlAttrs},children:[{type:"text",value:U.content}]};const re=Eo(U.htmlStyle||ir(U));re&&(V.properties.style=re);for(const j of r)V=((B=j==null?void 0:j.span)==null?void 0:B.call(p,V,A+1,z,F,U))||V;l==="inline"?i.children.push(V):l==="classic"&&F.children.push(V),z+=U.content.length}if(l==="classic"){for(const U of r)F=((Z=U==null?void 0:U.line)==null?void 0:Z.call(p,F,A+1))||F;h.push(F),o.push(F)}else l==="inline"&&h.push(F)}),l==="classic"){for(const S of r)f=((g=S==null?void 0:S.code)==null?void 0:g.call(p,f))||f;u.children.push(f);for(const S of r)u=((k=S==null?void 0:S.pre)==null?void 0:k.call(p,u))||u;i.children.push(u)}else if(l==="inline"){const S=[];let A={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const B of i.children)B.type==="element"&&B.tagName==="br"?(S.push(A),A={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(B.type==="element"||B.type==="text")&&A.children.push(B);S.push(A);let z={type:"element",tagName:"code",properties:{},children:S};for(const B of r)z=((y=B==null?void 0:B.code)==null?void 0:y.call(p,z))||z;i.children=[];for(let B=0;B<z.children.length;B++){B>0&&i.children.push({type:"element",tagName:"br",properties:{},children:[]});const Z=z.children[B];Z.type==="element"&&i.children.push(...Z.children)}}let d=i;for(const S of r)d=((w=S==null?void 0:S.root)==null?void 0:w.call(p,d))||d;return s&&Ar(d,s),d}function qm(e){return e.map(t=>{const n=[];let s="",r;return t.forEach((o,i)=>{const a=!(o.fontStyle&&(o.fontStyle&Ke.Underline||o.fontStyle&Ke.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 Km(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 Ym(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=Eo(r.htmlStyle||ir(r)),i=Eo(s.htmlStyle||ir(s)),l=r.fontStyle&&(r.fontStyle&Ke.Underline||r.fontStyle&Ke.Strikethrough),a=s.fontStyle&&(s.fontStyle&Ke.Underline||s.fontStyle&Ke.Strikethrough);!l&&!a&&o===i?r.content+=s.content:n.push({...s})}return n})}const Jm=pm;function Zm(e,t,n){var o;const s={meta:{},options:n,codeToHast:(i,l)=>cr(e,i,l),codeToTokens:(i,l)=>ar(e,i,l)};let r=Jm(cr(e,t,n,s));for(const i of lr(n))r=((o=i.postprocess)==null?void 0:o.call(s,r,n))||r;return r}const Ol={light:"#333333",dark:"#bbbbbb"},Dl={light:"#fffffe",dark:"#1e1e1e"},Bl="__shiki_resolved";function bi(e){var l,a,c,u,f;if(e!=null&&e[Bl])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"?Ol.light:Ol.dark),n||(n=t.type==="light"?Dl.light:Dl.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 d;if(o.has(h))return o.get(h);r+=1;const p=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(d=t.colorReplacements)!=null&&d[`#${p}`]?i(h):(o.set(h,p),p)}t.settings=t.settings.map(h=>{var k,y;const p=((k=h.settings)==null?void 0:k.foreground)&&!h.settings.foreground.startsWith("#"),d=((y=h.settings)==null?void 0:y.background)&&!h.settings.background.startsWith("#");if(!p&&!d)return h;const g={...h,settings:{...h.settings}};if(p){const w=i(h.settings.foreground);t.colorReplacements[w]=h.settings.foreground,g.settings.foreground=w}if(d){const w=i(h.settings.background);t.colorReplacements[w]=h.settings.background,g.settings.background=w}return g});for(const h of Object.keys(t.colors||{}))if((h==="editor.foreground"||h==="editor.background"||h.startsWith("terminal.ansi"))&&!((f=t.colors[h])!=null&&f.startsWith("#"))){const p=i(t.colors[h]);t.colorReplacements[p]=t.colors[h],t.colors[h]=p}return Object.defineProperty(t,Bl,{enumerable:!1,writable:!1,value:!0}),t}async function iu(e){return Array.from(new Set((await Promise.all(e.filter(t=>!ym(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=>bm(n)?null:bi(await tu(n))))).filter(n=>!!n)}let Xm=3;function Qm(e,t=3){t>Xm||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Tn=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 Tn(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class ev extends eg{constructor(n,s,r,o={}){super(n);C(this,"_resolvedThemes",new Map);C(this,"_resolvedGrammars",new Map);C(this,"_langMap",new Map);C(this,"_langGraph",new Map);C(this,"_textmateThemeCache",new WeakMap);C(this,"_loadedThemesCache",null);C(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=bi(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=er.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 f;return(f=u.embeddedLangsLazy)==null?void 0:f.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 Tn(`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 tv{constructor(t,n){C(this,"_langs",new Map);C(this,"_scopeToLang",new Map);C(this,"_injections",new Map);C(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 Vn=0;function nv(e){Vn+=1,e.warnings!==!1&&Vn>=10&&Vn%10===0&&console.warn(`[Shiki] ${Vn} 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 Tn("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(bi),r=new tv(e.engine,n),o=new ev(r,s,n,e.langAlias);let i;function l(S){return au(S,e.langAlias)}function a(S){y();const A=o.getGrammar(typeof S=="string"?S:S.name);if(!A)throw new Tn(`Language \`${S}\` not found, you may need to load it first`);return A}function c(S){if(S==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};y();const A=o.getTheme(S);if(!A)throw new Tn(`Theme \`${S}\` not found, you may need to load it first`);return A}function u(S){y();const A=c(S);i!==S&&(o.setTheme(A),i=S);const F=o.getColorMap();return{theme:A,colorMap:F}}function f(){return y(),o.getLoadedThemes()}function h(){return y(),o.getLoadedLanguages()}function p(...S){y(),o.loadLanguages(S.flat(1))}async function d(...S){return p(await iu(S))}function g(...S){y();for(const A of S.flat(1))o.loadTheme(A)}async function k(...S){return y(),g(await lu(S))}function y(){if(t)throw new Tn("Shiki instance has been disposed")}function w(){t||(t=!0,o.dispose(),Vn-=1)}return{setTheme:u,getTheme:c,getLanguage:a,getLoadedThemes:f,getLoadedLanguages:h,resolveLangAlias:l,loadLanguage:d,loadLanguageSync:p,loadTheme:k,loadThemeSync:g,dispose:w,[Symbol.dispose]:w}}async function sv(e){e.engine||Qm("`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 nv({...e,themes:t,langs:n,engine:s})}async function rv(e){const t=await sv(e);return{getLastGrammarState:(...n)=>jm(t,...n),codeToTokensBase:(n,s)=>vi(t,n,s),codeToTokensWithThemes:(n,s)=>ou(t,n,s),codeToTokens:(n,s)=>ar(t,n,s),codeToHast:(n,s)=>cr(t,n,s),codeToHtml:(n,s)=>Zm(t,n,s),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}class _i extends Error{constructor(t){super(t),this.name="ShikiError"}}function ov(){return 2147483648}function iv(){return typeof performance<"u"?performance.now():Date.now()}const lv=(e,t)=>e+(t-e%t)%t;async function av(e){let t,n;const s={};function r(p){n=p,s.HEAPU8=new Uint8Array(p),s.HEAPU32=new Uint32Array(p)}function o(p,d,g){s.HEAPU8.copyWithin(p,d,d+g)}function i(p){try{return t.grow(p-n.byteLength+65535>>>16),r(t.buffer),1}catch{}}function l(p){const d=s.HEAPU8.length;p=p>>>0;const g=ov();if(p>g)return!1;for(let k=1;k<=4;k*=2){let y=d*(1+.2/k);y=Math.min(y,p+100663296);const w=Math.min(g,lv(Math.max(p,y),65536));if(i(w))return!0}return!1}const a=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function c(p,d,g=1024){const k=d+g;let y=d;for(;p[y]&&!(y>=k);)++y;if(y-d>16&&p.buffer&&a)return a.decode(p.subarray(d,y));let w="";for(;d<y;){let S=p[d++];if(!(S&128)){w+=String.fromCharCode(S);continue}const A=p[d++]&63;if((S&224)===192){w+=String.fromCharCode((S&31)<<6|A);continue}const F=p[d++]&63;if((S&240)===224?S=(S&15)<<12|A<<6|F:S=(S&7)<<18|A<<12|F<<6|p[d++]&63,S<65536)w+=String.fromCharCode(S);else{const z=S-65536;w+=String.fromCharCode(55296|z>>10,56320|z&1023)}}return w}function u(p,d){return p?c(s.HEAPU8,p,d):""}const f={emscripten_get_now:iv,emscripten_memcpy_big:o,emscripten_resize_heap:l,fd_write:()=>0};async function h(){const d=await e({env:f,wasi_snapshot_preview1:f});t=d.memory,r(t.buffer),Object.assign(s,d),s.UTF8ToString=u}return await h(),s}var cv=Object.defineProperty,uv=(e,t,n)=>t in e?cv(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Me=(e,t,n)=>uv(e,typeof t!="symbol"?t+"":t,n);let De=null;function fv(e){throw new _i(e.UTF8ToString(e.getLastOnigError()))}class Er{constructor(t){Me(this,"utf16Length"),Me(this,"utf8Length"),Me(this,"utf16Value"),Me(this,"utf8Value"),Me(this,"utf16OffsetToUtf8"),Me(this,"utf8OffsetToUtf16");const n=t.length,s=Er._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 f=u,h=!1;if(u>=55296&&u<=56319&&c+1<n){const p=t.charCodeAt(c+1);p>=56320&&p<=57343&&(f=(u-55296<<10)+65536|p-56320,h=!0)}r&&(o[c]=a,h&&(o[c+1]=a),f<=127?i[a+0]=c:f<=2047?(i[a+0]=c,i[a+1]=c):f<=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)),f<=127?l[a++]=f:f<=2047?(l[a++]=192|(f&1984)>>>6,l[a++]=128|(f&63)>>>0):f<=65535?(l[a++]=224|(f&61440)>>>12,l[a++]=128|(f&4032)>>>6,l[a++]=128|(f&63)>>>0):(l[a++]=240|(f&1835008)>>>18,l[a++]=128|(f&258048)>>>12,l[a++]=128|(f&4032)>>>6,l[a++]=128|(f&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 Ir=class Et{constructor(t){if(Me(this,"id",++Et.LAST_ID),Me(this,"_onigBinding"),Me(this,"content"),Me(this,"utf16Length"),Me(this,"utf8Length"),Me(this,"utf16OffsetToUtf8"),Me(this,"utf8OffsetToUtf16"),Me(this,"ptr"),!De)throw new _i("Must invoke loadWasm first.");this._onigBinding=De,this.content=t;const n=new Er(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Et._sharedPtrInUse?(Et._sharedPtr||(Et._sharedPtr=De.omalloc(1e4)),Et._sharedPtrInUse=!0,De.HEAPU8.set(n.utf8Value,Et._sharedPtr),this.ptr=Et._sharedPtr):this.ptr=n.createString(De)}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===Et._sharedPtr?Et._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Me(Ir,"LAST_ID",0);Me(Ir,"_sharedPtr",0);Me(Ir,"_sharedPtrInUse",!1);let cu=Ir;class hv{constructor(t){if(Me(this,"_onigBinding"),Me(this,"_ptr"),!De)throw new _i("Must invoke loadWasm first.");const n=[],s=[];for(let l=0,a=t.length;l<a;l++){const c=new Er(t[l]);n[l]=c.createString(De),s[l]=c.utf8Length}const r=De.omalloc(4*t.length);De.HEAPU32.set(n,r/4);const o=De.omalloc(4*t.length);De.HEAPU32.set(s,o/4);const i=De.createOnigScanner(r,o,t.length);for(let l=0,a=t.length;l<a;l++)De.ofree(n[l]);De.ofree(o),De.ofree(r),i===0&&fv(De),this._onigBinding=De,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++],f=[];for(let h=0;h<u;h++){const p=t.convertUtf8OffsetToUtf16(l[a++]),d=t.convertUtf8OffsetToUtf16(l[a++]);f[h]={start:p,end:d,length:d-p}}return{index:c,captureIndices:f}}}function dv(e){return typeof e.instantiator=="function"}function pv(e){return typeof e.default=="function"}function gv(e){return typeof e.data<"u"}function mv(e){return typeof Response<"u"&&e instanceof Response}function vv(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 Ms;function yv(e){if(Ms)return Ms;async function t(){De=await av(async n=>{let s=e;return s=await s,typeof s=="function"&&(s=await s(n)),typeof s=="function"&&(s=await s(n)),dv(s)?s=await s.instantiator(n):pv(s)?s=await s.default(n):(gv(s)&&(s=s.data),mv(s)?typeof WebAssembly.instantiateStreaming=="function"?s=await bv(s)(n):s=await _v(s)(n):vv(s)?s=await Xr(s)(n):s instanceof WebAssembly.Module?s=await Xr(s)(n):"default"in s&&s.default instanceof WebAssembly.Module&&(s=await Xr(s.default)(n))),"instance"in s&&(s=s.instance),"exports"in s&&(s=s.exports),s})}return Ms=t(),Ms}function Xr(e){return t=>WebAssembly.instantiate(e,t)}function bv(e){return t=>WebAssembly.instantiateStreaming(e,t)}function _v(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function kv(e){return e&&await yv(e),{createScanner(t){return new hv(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new cu(t)}}}const wv={class:"code-block"},Sv={class:"code-header"},xv={class:"code-lang"},Cv=["innerHTML"],Tv=Ce({__name:"CodeBlock",props:{code:{},lang:{}},setup(e){const t=e,n=es("effectiveTheme",K("dark")),s=K(""),r=K(!1);let o=null;async function i(){if(o)return o;const[u,f,h,p,d,g,k,y,w,S,A,F]=await Promise.all([lt(()=>import("./github-dark-DHJKELXO.js"),[],import.meta.url),lt(()=>import("./github-light-DAi9KRSo.js"),[],import.meta.url),lt(()=>import("./javascript-wDzz0qaB.js"),[],import.meta.url),lt(()=>import("./typescript-BPQ3VLAy.js"),[],import.meta.url),lt(()=>import("./python-B6aJPvgy.js"),[],import.meta.url),lt(()=>import("./bash-Yzrsuije.js"),[],import.meta.url),lt(()=>import("./json-Cp-IABpG.js"),[],import.meta.url),lt(()=>import("./yaml-Buea-lGh.js"),[],import.meta.url),lt(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2]),import.meta.url),lt(()=>import("./css-DPfMkruS.js"),[],import.meta.url),lt(()=>import("./vue-DVfSmUF7.js"),__vite__mapDeps([3,2,1,4,5,0]),import.meta.url),lt(()=>import("./diff-D97Zzqfu.js"),[],import.meta.url)]);return o=await rv({themes:[u.default,f.default],langs:[h.default,p.default,d.default,g.default,k.default,y.default,w.default,S.default,A.default,F.default],engine:kv(()=>lt(()=>import("./wasm-CG6Dc4jp.js"),[],import.meta.url))}),o}async function l(){var d;const u=((d=t.lang)==null?void 0:d.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 g=await i();s.value=g.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,f)=>(T(),I("div",wv,[_("div",Sv,[_("span",xv,D(e.lang||"text"),1),_("button",{class:"code-copy",onClick:c},D(r.value?"已复制":"复制"),1)]),_("div",{class:"code-content",innerHTML:s.value},null,8,Cv)]))}}),Rv=Te(Tv,[["__scopeId","data-v-84cb424e"]]),$v=Ce({props:{content:{type:String,required:!0}},setup(e){const t=H(()=>ve.lexer(e.content).flatMap(s=>Io(s)));return()=>st("div",{class:"markdown-body"},t.value)}});function Io(e){switch(e.type){case"paragraph":return[st("p",{class:"md-p"},Ln(e.tokens))];case"heading":return[st(`h${e.depth}`,{class:`md-h${e.depth}`},Ln(e.tokens))];case"code":return[st(Rv,{code:e.text,lang:e.lang??"text"})];case"blockquote":return[st("blockquote",{class:"md-blockquote"},e.tokens.flatMap(t=>Io(t)))];case"list":{const t=e.items.map(n=>st("li",{class:"md-li"},n.tokens.flatMap(s=>Io(s))));return[st(e.ordered?"ol":"ul",{class:e.ordered?"md-ol":"md-ul"},t)]}case"hr":return[st("hr",{class:"md-hr"})];case"space":return[];case"text":return[st("span",{class:"md-text"},e.tokens?Ln(e.tokens):e.text)];default:return[]}}function Ln(e){return e.map(t=>{switch(t.type){case"text":return t.text;case"codespan":return st("code",{class:"md-code"},t.text);case"strong":return st("strong",{class:"md-strong"},Ln(t.tokens));case"em":return st("em",{class:"md-em"},Ln(t.tokens));case"link":{const n=t.href;return n&&!/^(https?:|mailto:|#|\/)/i.test(n)?t.raw??"":st("a",{class:"md-a",href:n,target:"_blank",rel:"noopener"},Ln(t.tokens))}default:return t.raw??""}})}const Av=Te($v,[["__scopeId","data-v-9c287897"]]),Ev=["onKeydown"],Iv={class:"tool-name"},Pv=["title"],Lv={class:"tool-collapse-inner"},Nv={class:"tool-body"},Mv={key:0,class:"tool-args"},Ov={key:1,class:"tool-result"},Dv={key:2,class:"tool-running-hint"},Bv=Ce({__name:"GenericToolCard",props:{tool:{}},setup(e){const t=e,n=H(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=H(()=>{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=H(()=>{const u=t.tool.args;if(!u||typeof u!="object")return u===void 0?"":String(u);const f=[];for(const[h,p]of Object.entries(u)){let d;if(typeof p=="string")d=p.length>40?`${p.slice(0,40)}…`:p;else{try{d=JSON.stringify(p)}catch{d=String(p)}d.length>40&&(d=`${d.slice(0,40)}…`)}if(f.push(`${h}=${d}`),f.length>=3)break}return f.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,f=4e3){return u?u.length>f?u.slice(0,f)+`
|
|
87
|
-
… (${u.length-f} more chars)`:u:""}return(u,f)=>(T(),I("div",{class:he(["tool-card",`is-${n.value}`])},[_("div",{class:"tool-header",role:"button",tabindex:"0",onClick:i,onKeydown:Qo(Dn(i,["prevent"]),["enter"])},[_("span",{class:he(["status-dot",n.value])},[s.value?(T(),I(oe,{key:0},[Le(D(s.value),1)],64)):W("",!0)],2),_("span",Iv,D(e.tool.name),1),l.value?(T(),I("span",{key:0,class:"tool-params",title:l.value},D(l.value),9,Pv)):W("",!0),_("span",{class:he(["tool-chevron",{open:r.value}])},"▸",2)],40,Ev),_("div",{class:he(["tool-collapse",{open:r.value}])},[_("div",Lv,[_("div",Nv,[a()?(T(),I("pre",Mv,[_("code",null,D(a()),1)])):W("",!0),e.tool.output!==void 0?(T(),I("pre",Ov,[_("code",null,D(c(e.tool.output)||"(无输出)"),1)])):(T(),I("div",Dv,"执行中…"))])])],2)],2))}}),uu=Te(Bv,[["__scopeId","data-v-65acc86e"]]),jv=500;function Fv(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 Uv(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 Gv(e,t){const n=e.split(`
|
|
88
|
-
`),s=t.split(`
|
|
89
|
-
`);if(n.length+s.length>jv){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=Fv(n,s);return Uv(r,n,s,n.length,s.length)}function zv(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 Hv=["old_string","oldString","old_str","old_text","oldText","old","search"],Wv=["new_string","newString","new_str","new_text","newText","new","replace","content"],Vv=["path","file_path","filePath","file","filename"];function Qr(e,t){for(const n of t){const s=e[n];if(typeof s=="string"&&s.length>0)return s}}function qv(e){if(!e||typeof e!="object")return null;const t=e,n=Qr(t,Vv),s=Qr(t,Hv),r=Qr(t,Wv);if(!r&&!s)return null;const o=Gv(s??"",r??""),i=zv(o);return{path:n,diff:o,stats:i}}const Kv={class:"diff-lines"},Yv={class:"dl-gutter old"},Jv={class:"dl-gutter new"},Zv={class:"dl-sign"},Xv={class:"dl-text"},Qv=Ce({__name:"DiffLines",props:{lines:{}},setup(e){return(t,n)=>(T(),I("div",Kv,[(T(!0),I(oe,null,nt(e.lines,(s,r)=>(T(),I("div",{key:r,class:he(["dl",`dl-${s.type}`])},[_("span",Yv,D(s.oldNo??""),1),_("span",Jv,D(s.newNo??""),1),_("span",Zv,D(s.type==="add"?"+":s.type==="del"?"−":" "),1),_("span",Xv,D(s.text),1)],2))),128))]))}}),ey=Te(Qv,[["__scopeId","data-v-147edc06"]]),ty=["onKeydown"],ny={class:"tool-name"},sy=["title"],ry={key:1,class:"diff-chip"},oy={class:"tool-collapse-inner"},iy={class:"tool-body"},ly={key:1,class:"tool-result"},ay={key:2,class:"tool-running-hint"},cy=Ce({__name:"EditToolCard",props:{tool:{}},setup(e){const t=e,n=H(()=>t.tool.suspended?"suspended":t.tool.isError?"error":t.tool.output===void 0?"running":"ok"),s=H(()=>{switch(n.value){case"ok":return"✓";case"error":return"✗";default:return""}}),r=H(()=>qv(t.tool.args)),o=H(()=>{const h=r.value;if(!h||n.value==="error")return"";const{added:p,removed:d}=h.stats;return!p&&!d?"":`+${p} −${d}`}),i=H(()=>{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=H(()=>{var h;return((h=r.value)==null?void 0:h.diff)??[]}),f=H(()=>u.value.length>0);return(h,p)=>(T(),I("div",{class:he(["tool-card",`is-${n.value}`,"edit-tool-card"])},[_("div",{class:"tool-header",role:"button",tabindex:"0",onClick:c,onKeydown:Qo(Dn(c,["prevent"]),["enter"])},[_("span",{class:he(["status-dot",n.value])},[s.value?(T(),I(oe,{key:0},[Le(D(s.value),1)],64)):W("",!0)],2),_("span",ny,D(e.tool.name),1),i.value?(T(),I("span",{key:0,class:"tool-filepath",title:i.value},D(i.value),9,sy)):W("",!0),o.value?(T(),I("span",ry,D(o.value),1)):W("",!0),_("span",{class:he(["tool-chevron",{open:l.value}])},"▸",2)],40,ty),_("div",{class:he(["tool-collapse",{open:l.value}])},[_("div",oy,[_("div",iy,[f.value?(T(),$e(ey,{key:0,lines:u.value},null,8,["lines"])):W("",!0),e.tool.output!==void 0?(T(),I("pre",ly,[_("code",null,D(e.tool.output||"(无输出)"),1)])):(T(),I("div",ay,"执行中…"))])])],2)],2))}}),fu=Te(cy,[["__scopeId","data-v-95ab1624"]]);function uy(e){const t=[];for(const n of e){const s=t.at(-1);s&&s.name===n.name?s.tools.push(n):t.push({name:n.name,tools:[n]})}return t}const fy=new Set(["edit","str_replace","replace","write","multi_edit","create_file","edit_file","apply_patch"]);function hu(e){return fy.has(e.toLowerCase())}function jl(e){return e.suspended?"suspended":e.isError?"error":e.output===void 0?"running":"ok"}function hy(e){return e.some(t=>jl(t)==="running")?"running":e.some(t=>jl(t)==="error")?"error":"ok"}const dy=["aria-expanded"],py={class:"tg-name"},gy={class:"tg-count"},my={class:"tool-group-inner"},vy=Ce({__name:"ToolGroup",props:{name:{},tools:{}},setup(e){const t=e,n=K(!0),s=H(()=>t.tools.length),r=H(()=>hy(t.tools)),o=H(()=>{switch(r.value){case"ok":return"✓";case"error":return"✗";case"running":return"";default:return""}});function i(){n.value=!n.value}return(l,a)=>(T(),I("div",{class:he(["tool-group",{open:n.value}])},[_("button",{class:"tool-group-head",type:"button","aria-expanded":n.value,onClick:i},[_("span",{class:he(["status-dot",r.value])},[o.value?(T(),I(oe,{key:0},[Le(D(o.value),1)],64)):W("",!0)],2),_("span",py,D(e.name),1),_("span",gy,"×"+D(s.value),1),_("span",{class:he(["tg-chevron",{open:n.value}])},"▸",2)],8,dy),_("div",{class:he(["tool-group-body",{open:n.value}])},[_("div",my,[(T(!0),I(oe,null,nt(e.tools,c=>(T(),$e(Sf(ae(hu)(e.name)?fu:uu),{key:c.toolCallId,tool:c},null,8,["tool"]))),128))])],2)],2))}}),yy=Te(vy,[["__scopeId","data-v-7408ac9b"]]),by={class:"thinking-block"},_y={class:"teaser-text"},ky={key:1,class:"thinking-stream"},wy={class:"thinking-panel",role:"dialog","aria-label":"思考过程"},Sy={class:"panel-body"},xy=Ce({__name:"ThinkingBlock",props:{tool:{},active:{type:Boolean,default:!1}},setup(e){const t=e,n=K(!1),s=K(null),r=H(()=>t.tool.output??""),o=H(()=>r.value.split(/\n+/).map(c=>c.trim()).filter(Boolean).at(-1)??"");je(r,()=>{t.active&&Ut(()=>{const a=s.value;a&&(a.scrollTop=a.scrollHeight)})});function i(){n.value=!0}function l(){n.value=!1}return(a,c)=>(T(),I("div",by,[e.active?(T(),I("div",ky,[c[2]||(c[2]=_("div",{class:"stream-header"},[_("span",{class:"stream-icon"},"💭"),_("span",{class:"stream-title"},"思考中…"),_("span",{class:"stream-dot"})],-1)),_("div",{ref_key:"streamRef",ref:s,class:"stream-body"},D(r.value),513)])):(T(),I("button",{key:0,class:"thinking-teaser",title:"点击查看完整思考过程",onClick:i},[c[0]||(c[0]=_("span",{class:"teaser-icon"},"💭",-1)),_("span",_y,D(o.value||"思考过程"),1),c[1]||(c[1]=_("span",{class:"teaser-open"},"展开",-1))])),(T(),$e(Vo,{to:"body"},[n.value?(T(),I("div",{key:0,class:"thinking-overlay",onClick:Dn(l,["self"])},[_("aside",wy,[_("header",{class:"panel-header"},[c[3]||(c[3]=_("span",null,"💭 思考过程",-1)),_("button",{class:"panel-close","aria-label":"关闭",onClick:l},"✕")]),_("div",Sy,D(r.value||"(空)"),1)])])):W("",!0)]))]))}}),Cy=Te(xy,[["__scopeId","data-v-890e0460"]]),Ty={class:"message-body"},Ry={key:0,class:"user-bubble"},$y={key:1,class:"streaming-cursor","aria-label":"正在生成"},Ay={key:2,class:"tools-section"},Ey={class:"message-meta"},Iy={key:0,class:"meta-time"},Py=["title"],Ly=Ce({__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=H(()=>n.message.role==="user"),l=H(()=>n.message.role==="user"?"👤":n.message.role==="system"?"⚙️":"■"),a=H(()=>n.message.tools.filter(g=>g.name==="thinking")),c=H(()=>n.message.tools.filter(g=>g.name!=="thinking")),u=H(()=>uy(c.value)),f=H(()=>{if(!n.message.ts)return"";const g=new Date(n.message.ts),k=y=>String(y).padStart(2,"0");return`${k(g.getHours())}:${k(g.getMinutes())}:${k(g.getSeconds())}`}),h=H(()=>i.value&&n.isLatestUser&&n.idle);async function p(){try{await navigator.clipboard.writeText(n.message.content)}catch{const g=document.createElement("textarea");g.value=n.message.content,document.body.append(g),g.select(),document.execCommand("copy"),g.remove()}r.value=!0,o!==null&&clearTimeout(o),o=window.setTimeout(()=>{r.value=!1},1500)}function d(){s("edit",n.message.content)}return(g,k)=>(T(),I("div",{class:he(["message",e.message.role,{error:e.message.isError}])},[_("div",{class:he(["message-avatar",e.message.role])},D(l.value),3),_("div",Ty,[i.value?(T(),I("div",Ry,D(e.message.content),1)):(T(),I(oe,{key:1},[e.message.content?(T(),$e(Av,{key:0,class:"assistant-content",content:e.message.content},null,8,["content"])):e.streaming?(T(),I("span",$y,"▍")):W("",!0),(T(!0),I(oe,null,nt(a.value,y=>(T(),$e(Cy,{key:y.toolCallId,tool:y,active:e.streaming},null,8,["tool","active"]))),128)),c.value.length?(T(),I("div",Ay,[(T(!0),I(oe,null,nt(u.value,y=>(T(),I(oe,{key:y.tools[0].toolCallId},[y.tools.length>1?(T(),$e(yy,{key:0,name:y.name,tools:y.tools},null,8,["name","tools"])):ae(hu)(y.name)?(T(),$e(fu,{key:1,tool:y.tools[0]},null,8,["tool"])):(T(),$e(uu,{key:2,tool:y.tools[0]},null,8,["tool"]))],64))),128))])):W("",!0)],64)),_("div",Ey,[f.value?(T(),I("span",Iy,D(f.value),1)):W("",!0),e.message.content?(T(),I("button",{key:1,class:"meta-btn copy-btn",title:r.value?"已复制":"复制内容",onClick:p},D(r.value?"✓ 已复制":"复制"),9,Py)):W("",!0),h.value?(T(),I("button",{key:2,class:"meta-btn edit-btn",title:"编辑并重新发送",onClick:d}," 编辑重发 ")):W("",!0)])])],2))}}),Ny=Te(Ly,[["__scopeId","data-v-e826c4b6"]]),My={class:"empty-state"},Oy={class:"suggestions"},Dy=["onClick"],By={class:"suggestion-icon"},jy={class:"suggestion-title"},Fy=["title"],Uy={class:"workdir-path"},Gy=Ce({__name:"EmptyState",props:{workDir:{default:null}},emits:["pick"],setup(e,{emit:t}){const n=t,s=[{icon:"✍️",title:"帮我写一个函数",prompt:"帮我写一个函数"},{icon:"📖",title:"解释这段代码",prompt:"解释这段代码"},{icon:"🐞",title:"调试这个问题",prompt:"调试这个问题"}];return(r,o)=>(T(),I("div",My,[o[1]||(o[1]=_("div",{class:"empty-logo"},[_("img",{src:pc,alt:"Scream",class:"logo-img"})],-1)),o[2]||(o[2]=_("h1",{class:"empty-title"},"Scream Web UI",-1)),o[3]||(o[3]=_("p",{class:"empty-subtitle"},"给 Scream 发消息,开始处理你的任务",-1)),_("div",Oy,[(T(),I(oe,null,nt(s,i=>_("button",{key:i.title,class:"suggestion-card",onClick:l=>n("pick",i.prompt)},[_("span",By,D(i.icon),1),_("span",jy,D(i.title),1)],8,Dy)),64))]),e.workDir?(T(),I("div",{key:0,class:"empty-workdir",title:e.workDir},[o[0]||(o[0]=_("span",{class:"workdir-label"},"工作目录",-1)),_("span",Uy,D(e.workDir),1)],8,Fy)):W("",!0)]))}}),zy=Te(Gy,[["__scopeId","data-v-0d818410"]]),Hy={key:1,class:"message-skeleton","aria-hidden":"true"},Wy=Ce({__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=H(()=>{for(let u=n.messages.length-1;u>=0;u--)if(n.messages[u].role==="user")return n.messages[u].id;return null}),i=H(()=>{var u;return((u=n.messages.at(-1))==null?void 0:u.id)??null}),l=H(()=>{var h;const u=n.messages.at(-1);if(!u)return 0;let f=u.content.length;for(const p of u.tools)f+=((h=p.output)==null?void 0:h.length)??0;return f});function a(){const u=r.value;return u?u.scrollHeight-u.scrollTop-u.clientHeight<80:!0}je(()=>[n.messages.length,l.value],([u],[f])=>{if(!a())return;const h=u!==f;Ut(()=>{const p=r.value;p&&p.scrollTo({top:p.scrollHeight,behavior:h?"smooth":"auto"})})});const c=H(()=>!n.busy||n.messages.length===0?!1:n.messages.at(-1).role==="user");return(u,f)=>(T(),I("div",{ref_key:"listRef",ref:r,class:"message-list"},[e.messages.length===0?(T(),$e(zy,{key:0,"work-dir":e.workDir,onPick:f[0]||(f[0]=h=>s("pick",h))},null,8,["work-dir"])):W("",!0),(T(!0),I(oe,null,nt(e.messages,h=>(T(),$e(Ny,{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:f[1]||(f[1]=p=>s("edit",p))},null,8,["message","is-latest-user","idle","streaming"]))),128)),c.value?(T(),I("div",Hy,[...f[2]||(f[2]=[Qf('<div class="sk-avatar" data-v-719eddd8></div><div class="sk-body" data-v-719eddd8><div class="sk-line sk-w-60" data-v-719eddd8></div><div class="sk-line sk-w-90" data-v-719eddd8></div><div class="sk-line sk-w-40" data-v-719eddd8></div></div>',2)])])):W("",!0)],512))}}),Vy=Te(Wy,[["__scopeId","data-v-719eddd8"]]),qy=["type","disabled"],Ky=Ce({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean},type:{default:"button"}},setup(e){return(t,n)=>(T(),I("button",{class:he(["ui-btn",[`ui-btn--${e.variant}`,`ui-btn--${e.size}`]]),type:e.type,disabled:e.disabled},[ns(t.$slots,"default",{},void 0)],10,qy))}}),tn=Te(Ky,[["__scopeId","data-v-e28e57b8"]]),Yy={class:"model-picker-root"},Jy={class:"picker-list"},Zy={key:0,class:"picker-empty"},Xy={class:"picker-group-title"},Qy=["onClick"],eb={class:"row-main"},tb={class:"row-name"},nb={class:"row-alias"},sb={class:"row-meta"},rb={key:0,class:"row-check"},ob={class:"picker-thinking"},ib={class:"thinking-options"},lb=["onClick"],ab=Ce({__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);on(()=>{var y;(y=l.value)==null||y.focus()});const a=H(()=>{const y=i.value.trim().toLowerCase();return y?n.models.filter(w=>w.alias.toLowerCase().includes(y)||w.provider.toLowerCase().includes(y)||(w.displayName??"").toLowerCase().includes(y)):n.models}),c=H(()=>{const y=new Map;for(const w of a.value){const S=y.get(w.provider)??[];S.push(w),y.set(w.provider,S)}return[...y.entries()].map(([w,S])=>({provider:w,models:S}))}),u=H(()=>n.models.find(y=>y.alias===n.currentModel)),f=H(()=>{var y;return((y=u.value)==null?void 0:y.thinkingLevels)??r});function h(y){return o[y]??y}function p(y){return y>=1e3?`${Math.round(y/1e3)}k`:String(y)}function d(y){return y.displayName??y.model}function g(y){y!==n.currentModel&&s("apply-model",y),s("close")}function k(y){y!==n.currentThinking&&s("apply-thinking",y)}return(y,w)=>(T(),I("div",Yy,[_("div",{class:"picker-backdrop",onClick:w[0]||(w[0]=S=>s("close"))}),_("div",{class:"model-picker",role:"dialog","aria-label":"模型选择",onKeydown:w[2]||(w[2]=Qo(S=>s("close"),["esc"]))},[vr(_("input",{ref_key:"searchRef",ref:l,"onUpdate:modelValue":w[1]||(w[1]=S=>i.value=S),class:"picker-search",type:"text",placeholder:"搜索模型…"},null,512),[[xr,i.value]]),_("div",Jy,[c.value.length===0?(T(),I("div",Zy,"无匹配模型")):W("",!0),(T(!0),I(oe,null,nt(c.value,S=>(T(),I("div",{key:S.provider,class:"picker-group"},[_("div",Xy,D(S.provider),1),(T(!0),I(oe,null,nt(S.models,A=>(T(),I("button",{key:A.alias,class:he(["picker-row",{active:A.alias===e.currentModel}]),onClick:F=>g(A.alias)},[_("span",eb,[_("span",tb,D(d(A)),1),_("span",nb,D(A.alias),1)]),_("span",sb,D(p(A.maxContextSize)),1),A.alias===e.currentModel?(T(),I("span",rb,"✓")):W("",!0)],10,Qy))),128))]))),128))]),_("div",ob,[w[3]||(w[3]=_("span",{class:"thinking-label"},"思考强度",-1)),_("div",ib,[(T(!0),I(oe,null,nt(f.value,S=>(T(),I("button",{key:S,class:he(["thinking-btn",{active:S===e.currentThinking}]),onClick:A=>k(S)},D(h(S)),11,lb))),128))])])],32)]))}}),cb=Te(ab,[["__scopeId","data-v-af964b7d"]]),ub={class:"slash-menu",role:"listbox","aria-label":"斜杠命令"},fb=["aria-selected","onMousedown","onMouseenter"],hb={class:"slash-name"},db={key:0,class:"slash-aliases"},pb={class:"slash-desc"},gb={key:0,class:"slash-badge slash-badge-input"},mb={key:1,class:"slash-badge"},vb=Ce({__name:"SlashMenu",props:{commands:{},activeIndex:{}},emits:["select","hover"],setup(e,{emit:t}){const n=t;return(s,r)=>(T(),I("div",ub,[(T(!0),I(oe,null,nt(e.commands,(o,i)=>{var l;return T(),I("button",{key:o.name,class:he(["slash-item",{active:i===e.activeIndex}]),role:"option","aria-selected":i===e.activeIndex,onMousedown:Dn(a=>n("select",o),["prevent"]),onMouseenter:a=>n("hover",i)},[_("span",hb,[Le("/"+D(o.name),1),(l=o.aliases)!=null&&l.length?(T(),I("span",db,D(o.aliases.map(a=>`/${a}`).join(" ")),1)):W("",!0)]),_("span",pb,D(o.description),1),o.acceptsInput?(T(),I("span",gb,"输入参数")):W("",!0),o.target==="backend"?(T(),I("span",mb,"服务端")):W("",!0)],42,fb)}),128)),r[0]||(r[0]=_("div",{class:"slash-hint"},"↑↓ 选择 · Enter/Tab 执行 · Esc 关闭",-1))]))}}),yb=Te(vb,[["__scopeId","data-v-54d5c512"]]),bb={class:"composer"},_b=["placeholder"],kb={class:"composer-footer"},wb={class:"composer-pills"},Sb=["title"],xb=["title"],Cb=["title"],Tb={key:3,class:"pill pill-ring"},Rb={key:4,class:"pill pill-queue",title:"运行结束后自动发送"},$b={class:"composer-actions"},Ab=Ce({__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=H(()=>{const P=o.value;return!P.startsWith("/")||P.includes(`
|
|
90
|
-
`)||/\s/.test(P.slice(1))?null:P.slice(1)}),u=H(()=>c.value===null?[]:ed(c.value)),f=H(()=>c.value!==null&&u.value.length>0&&!a.value);je(c,()=>{l.value=0,a.value=!1});function h(P){const X=P??u.value[l.value];if(X){if(X.acceptsInput){o.value=`/${X.name} `,a.value=!0,Ut(()=>{var Se;(Se=i.value)==null||Se.focus(),z()});return}S(`/${X.name}`),B(),r("command",X.name)}}const p=K([]);je(()=>s.sessionId,()=>{p.value=[]}),je(()=>s.busy,P=>{if(!P&&p.value.length>0){const[X,...Se]=p.value;p.value=Se,X&&r("send",X)}});const d=K([]),g=K(-1),k=K("");function y(){return`scream-history:${s.sessionId??"default"}`}function w(){try{const P=localStorage.getItem(y());d.value=P?JSON.parse(P):[]}catch{d.value=[]}g.value=-1}function S(P){if(d.value.at(-1)!==P){d.value=[...d.value,P].slice(-50);try{localStorage.setItem(y(),JSON.stringify(d.value))}catch{}}g.value=-1,k.value=""}function A(P,X){const Se=i.value;if(!Se)return;const yt=Se.value.slice(0,Se.selectionStart??0),an=Se.value.slice(Se.selectionEnd??0);if(!(P===-1&&yt.includes(`
|
|
91
|
-
`))&&!(P===1&&an.includes(`
|
|
92
|
-
`))){if(P===-1){if(d.value.length===0)return;X.preventDefault(),g.value===-1?(k.value=o.value,g.value=d.value.length-1):g.value>0&&g.value--,o.value=d.value[g.value]??""}else{if(g.value===-1)return;X.preventDefault(),g.value<d.value.length-1?(g.value++,o.value=d.value[g.value]??""):(g.value=-1,o.value=k.value)}Ut(()=>{Se.selectionStart=Se.selectionEnd=Se.value.length})}}function F(){return`scream-draft:${s.sessionId??"default"}`}je(o,()=>{z();try{o.value?localStorage.setItem(F(),o.value):localStorage.removeItem(F())}catch{}}),je(()=>s.sessionId,()=>{w();let P="";try{P=localStorage.getItem(F())??""}catch{P=""}o.value=P,Ut(z)},{immediate:!0});function z(){const P=i.value;if(!P)return;P.style.height="auto";const X=Math.round(window.innerHeight*.25);P.style.height=`${Math.min(Math.max(P.scrollHeight,36),X)}px`}function B(){o.value="",Ut(()=>{i.value&&(i.value.style.height="auto")})}function Z(){const P=o.value.trim();if(P){if(P.startsWith("/")){const X=P.indexOf(" "),Se=(X===-1?P.slice(1):P.slice(1,X)).toLowerCase(),yt=td(Se),an=X===-1?"":P.slice(X+1).trim();S(P),r("command",yt,an),B();return}if(s.busy){U();return}S(P),r("send",P),B()}}function U(){const P=o.value.trim();P&&(p.value=[...p.value,P],B())}function V(P){if(f.value){if(P.key==="ArrowUp"){P.preventDefault(),l.value=(l.value-1+u.value.length)%u.value.length;return}if(P.key==="ArrowDown"){P.preventDefault(),l.value=(l.value+1)%u.value.length;return}if(P.key==="Tab"||P.key==="Enter"&&!P.shiftKey){if(P.key==="Enter"&&P.isComposing)return;P.preventDefault(),h();return}if(P.key==="Escape"){P.preventDefault(),a.value=!0;return}}if((P.ctrlKey||P.metaKey)&&P.key.toLowerCase()==="s"){P.preventDefault(),U();return}if(P.key==="Enter"&&!P.shiftKey){if(P.isComposing)return;P.preventDefault(),Z();return}P.key==="ArrowUp"?A(-1,P):P.key==="ArrowDown"&&A(1,P)}function re(){p.value=[],r("abort")}function j(P){o.value=P,Ut(()=>{var X;z(),(X=i.value)==null||X.focus()})}t({insertText:j,openModelPicker:ot});const Q=H(()=>{var P;return(P=s.status)==null?void 0:P.model}),te=H(()=>{var P;return(P=s.status)==null?void 0:P.permission}),Ae=H(()=>{var P;return(P=s.status)==null?void 0:P.contextUsage}),le=K(!1),ue={off:"关闭",low:"低",medium:"中",high:"高",xhigh:"超高",max:"最大"},ce=H(()=>{var P;return(P=s.status)==null?void 0:P.thinkingLevel}),Je=H(()=>{const P=ce.value;return!P||P==="none"?"":ue[P]??P}),ut=H(()=>s.models.length>0);function ot(){return ut.value?(le.value=!0,!0):!1}function Fe(){ut.value&&(le.value=!le.value)}function Jt(P){r("switch-model",P)}function ft(P){r("switch-thinking",P)}const ln=H(()=>{switch(te.value){case"auto":return"perm-auto";case"yolo":return"perm-yolo";default:return"perm-manual"}}),we=H(()=>{switch(te.value){case"auto":return"自动";case"yolo":return"YOLO";default:return"手动"}});return(P,X)=>(T(),I("div",bb,[ie(sc,{name:"picker"},{default:Ee(()=>[le.value?(T(),$e(cb,{key:0,models:e.models,"current-model":Q.value,"current-thinking":ce.value,onApplyModel:Jt,onApplyThinking:ft,onClose:X[0]||(X[0]=Se=>le.value=!1)},null,8,["models","current-model","current-thinking"])):W("",!0)]),_:1}),f.value?(T(),$e(yb,{key:0,commands:u.value,"active-index":l.value,onSelect:h,onHover:X[1]||(X[1]=Se=>l.value=Se)},null,8,["commands","active-index"])):W("",!0),vr(_("textarea",{ref_key:"textareaRef",ref:i,"onUpdate:modelValue":X[2]||(X[2]=Se=>o.value=Se),class:"composer-input",rows:"1",placeholder:e.busy?"回合进行中:Enter/Ctrl+S 排队消息,随下一轮注入":"给 Scream 发消息… (Enter 发送, Shift+Enter 换行, / 命令, ↑↓ 历史)",onKeydown:V},null,40,_b),[[xr,o.value]]),_("div",kb,[_("div",wb,[Q.value&&ut.value?(T(),I("button",{key:0,class:"pill pill-model pill-btn",title:`当前模型:${Q.value},点击切换模型 / 思考强度`,onClick:Fe},[Le(" ◆ "+D(Q.value),1),Je.value?(T(),I(oe,{key:0},[Le(" · "+D(Je.value),1)],64)):W("",!0)],8,Sb)):Q.value?(T(),I("span",{key:1,class:"pill pill-model",title:`当前模型:${Q.value}(启动时通过 --model 指定)`}," ◆ "+D(Q.value),9,xb)):W("",!0),te.value?(T(),I("span",{key:2,class:he(["pill",ln.value]),title:`权限模式:${te.value}`},D(we.value),11,Cb)):W("",!0),Ae.value!==void 0?(T(),I("span",Tb,[ie(gc,{usage:Ae.value,size:16},null,8,["usage"]),X[3]||(X[3]=_("span",{class:"ring-label"},"上下文",-1))])):W("",!0),p.value.length?(T(),I("span",Rb," 已排队 "+D(p.value.length)+" 条 ",1)):W("",!0)]),_("div",$b,[e.busy?(T(),$e(tn,{key:0,variant:"danger",onClick:re},{default:Ee(()=>[...X[4]||(X[4]=[Le("■ 停止",-1)])]),_:1})):(T(),$e(tn,{key:1,variant:"primary",disabled:!o.value.trim(),onClick:Z},{default:Ee(()=>[...X[5]||(X[5]=[Le("发送 ⏎",-1)])]),_:1},8,["disabled"]))])])]))}}),Eb=Te(Ab,[["__scopeId","data-v-5b1a69fa"]]),Ib={key:0,class:"approval-card"},Pb={class:"approval-header"},Lb={class:"approval-title"},Nb={class:"tool-name"},Mb={class:"action-summary"},Ob={key:0,class:"approval-count"},Db={class:"approval-action"},Bb={key:0,class:"feedback-area"},jb={class:"approval-buttons"},Fb={key:0,class:"busy-indicator","aria-label":"处理中"},Ub=Ce({__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=H(()=>n.approvals[0]);je(()=>n.approvals.map(d=>d.id).join(","),()=>{o.value=!1,i.value="";const d=new Set(n.approvals.map(g=>g.id));l.value=new Set([...l.value].filter(g=>d.has(g)))});function c(d){return typeof d.display=="string"?d.display:d.display&&typeof d.display=="object"&&"description"in d.display?String(d.display.description??""):d.action??"执行该操作"}function u(d){return l.value.has(d)}function f(d,g,k){const y=a.value;!y||u(y.id)||(l.value=new Set([...l.value,y.id]),s("resolve",y.id,d,g,k))}function h(){const d=i.value.trim();d&&f("rejected",d)}function p(d){if(!a.value||r.value)return;const k=d.target;if(k&&(k.tagName==="TEXTAREA"||k.tagName==="INPUT")){o.value&&d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),h());return}switch(d.key){case"1":d.preventDefault(),f("approved",void 0,"once");break;case"2":d.preventDefault(),f("approved",void 0,"session");break;case"3":d.preventDefault(),f("rejected");break;case"4":d.preventDefault(),o.value=!o.value;break}}return on(()=>window.addEventListener("keydown",p)),ws(()=>window.removeEventListener("keydown",p)),(d,g)=>e.approvals.length?(T(),I("div",Ib,[r.value?(T(),I("button",{key:0,class:"approval-minibar",onClick:g[0]||(g[0]=k=>r.value=!1)}," ⚠ "+D(e.approvals.length)+" 个待审批请求 — 点击展开 ",1)):a.value?(T(),I(oe,{key:1},[_("div",Pb,[g[7]||(g[7]=_("span",{class:"approval-icon"},"⚠",-1)),_("span",Lb,[_("span",Nb,D(a.value.toolName),1),_("span",Mb,D(c(a.value)),1)]),e.approvals.length>1?(T(),I("span",Ob,"+"+D(e.approvals.length-1),1)):W("",!0),_("button",{class:"icon-btn",title:"最小化","aria-label":"最小化",onClick:g[1]||(g[1]=k=>r.value=!0)},"—")]),_("pre",Db,D(c(a.value)),1),o.value?(T(),I("div",Bb,[vr(_("textarea",{"onUpdate:modelValue":g[2]||(g[2]=k=>i.value=k),class:"feedback-input",rows:"2",placeholder:"输入反馈,Enter 提交(将作为拒绝原因反馈给 Agent)"},null,512),[[xr,i.value]])])):W("",!0),_("div",jb,[ie(tn,{variant:"primary",disabled:u(a.value.id),onClick:g[3]||(g[3]=k=>f("approved",void 0,"once"))},{default:Ee(()=>[...g[8]||(g[8]=[_("kbd",null,"1",-1),Le(" 批准 ",-1)])]),_:1},8,["disabled"]),ie(tn,{variant:"secondary",disabled:u(a.value.id),onClick:g[4]||(g[4]=k=>f("approved",void 0,"session"))},{default:Ee(()=>[...g[9]||(g[9]=[_("kbd",null,"2",-1),Le(" 会话批准 ",-1)])]),_:1},8,["disabled"]),ie(tn,{variant:"danger",disabled:u(a.value.id),onClick:g[5]||(g[5]=k=>f("rejected"))},{default:Ee(()=>[...g[10]||(g[10]=[_("kbd",null,"3",-1),Le(" 拒绝 ",-1)])]),_:1},8,["disabled"]),ie(tn,{variant:"secondary",class:he({"feedback-active":o.value}),disabled:u(a.value.id),onClick:g[6]||(g[6]=k=>o.value=!o.value)},{default:Ee(()=>[...g[11]||(g[11]=[_("kbd",null,"4",-1),Le(" 反馈 ",-1)])]),_:1},8,["class","disabled"]),u(a.value.id)?(T(),I("span",Fb,[...g[12]||(g[12]=[_("span",{class:"spinner"},null,-1),Le(" 处理中… ",-1)])])):W("",!0)])],64)):W("",!0)])):W("",!0)}}),Gb=Te(Ub,[["__scopeId","data-v-b031b650"]]),zb=["aria-label","title","disabled"],Hb=Ce({__name:"IconButton",props:{label:{},variant:{default:"default"},size:{default:"sm"},disabled:{type:Boolean,default:!1}},setup(e){return(t,n)=>(T(),I("button",{class:he(["ui-icon-btn",[`ui-icon-btn--${e.variant}`,`ui-icon-btn--${e.size}`]]),"aria-label":e.label,title:e.label,disabled:e.disabled,type:"button"},[ns(t.$slots,"default",{},void 0)],10,zb))}}),Fl=Te(Hb,[["__scopeId","data-v-f84a820a"]]),Wb={class:"sidebar-header"},Vb={class:"sidebar-toprow"},qb=["title","aria-label","aria-expanded"],Kb=["title"],Yb={class:"session-list"},Jb=["title","onClick"],Zb={class:"session-avatar"},Xb={class:"session-info"},Qb={class:"session-title"},e_={class:"session-meta"},t_={key:0,class:"active-dot",title:"活跃"},n_={key:0,class:"empty-sessions"},s_=Ce({__name:"SessionSidebar",props:{sessions:{},currentSessionId:{},collapsed:{type:Boolean},mobileOpen:{type:Boolean}},emits:["create","switch","delete","export","toggle"],setup(e,{emit:t}){const n=t,s=K(null);function r(l){s.value=l}function o(){s.value&&(n("delete",s.value),s.value=null)}function i(l){const a=new Date(l),c=new Date;return a.toDateString()===c.toDateString()?a.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):a.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}return(l,a)=>(T(),I("aside",{class:he(["sidebar",{collapsed:e.collapsed,"mobile-open":e.mobileOpen}])},[_("div",Wb,[_("div",Vb,[a[5]||(a[5]=_("span",{class:"sidebar-brand"},"Scream",-1)),_("button",{class:"collapse-btn",title:e.collapsed?"展开侧边栏":"收起侧边栏","aria-label":e.collapsed?"展开侧边栏":"收起侧边栏","aria-expanded":!e.collapsed,onClick:a[0]||(a[0]=c=>n("toggle"))},[_("span",{class:he(["collapse-icon",{flipped:e.collapsed}])},"«",2)],8,qb)]),_("button",{class:"new-session-btn",title:e.collapsed?"新建会话":void 0,onClick:a[1]||(a[1]=c=>n("create"))},[...a[6]||(a[6]=[_("span",{class:"plus"},"+",-1),Le(),_("span",{class:"new-label"},"新建会话",-1)])],8,Kb)]),_("div",Yb,[ie(uc,{name:"session"},{default:Ee(()=>[(T(!0),I(oe,null,nt(e.sessions,c=>(T(),I("div",{key:c.sessionId,class:he(["session-item",{active:c.sessionId===e.currentSessionId}]),title:e.collapsed?c.title||"New Session":void 0,onClick:u=>n("switch",c.sessionId)},[_("div",Zb,D((c.title||"N").charAt(0).toUpperCase()),1),_("div",Xb,[_("div",Qb,D(c.title||"New Session"),1),_("div",e_,[_("span",null,D(i(c.createdAt)),1),_("span",null,D(c.messageCount)+" 条",1),c.active?(T(),I("span",t_,"●")):W("",!0)])]),_("div",{class:"session-actions",onClick:a[2]||(a[2]=Dn(()=>{},["stop"]))},[ie(Fl,{label:"导出 Markdown",onClick:u=>n("export",c.sessionId)},{default:Ee(()=>[...a[7]||(a[7]=[Le("📥",-1)])]),_:1},8,["onClick"]),ie(Fl,{label:"删除",variant:"danger",onClick:u=>r(c.sessionId)},{default:Ee(()=>[...a[8]||(a[8]=[Le("🗑",-1)])]),_:1},8,["onClick"])])],10,Jb))),128))]),_:1}),e.sessions.length===0?(T(),I("div",n_,[...a[9]||(a[9]=[_("div",{class:"empty-icon"},"💬",-1),_("div",null,"暂无会话",-1),_("div",{class:"empty-hint"},"点击上方按钮开始新会话",-1)])])):W("",!0)]),ie(Cr,{open:s.value!==null,title:"删除会话",onClose:a[4]||(a[4]=c=>s.value=null)},{footer:Ee(()=>[ie(tn,{variant:"ghost",size:"sm",onClick:a[3]||(a[3]=c=>s.value=null)},{default:Ee(()=>[...a[10]||(a[10]=[Le("取消",-1)])]),_:1}),ie(tn,{variant:"danger",size:"sm",onClick:o},{default:Ee(()=>[...a[11]||(a[11]=[Le("删除",-1)])]),_:1})]),default:Ee(()=>[a[12]||(a[12]=_("p",{style:{color:"var(--color-text-muted)","font-size":"var(--font-size-sm)",margin:"0"}},"确定要删除这个会话吗?此操作不可恢复。",-1))]),_:1},8,["open"])],2))}}),r_=Te(s_,[["__scopeId","data-v-9f291670"]]),o_={class:"info-row"},i_={class:"info-val mono"},l_={class:"info-row"},a_={class:"info-val mono"},c_={class:"info-row"},u_={class:"info-val"},f_={class:"info-row"},h_={class:"info-val"},d_={class:"info-row"},p_={class:"info-val"},g_={class:"info-row"},m_={class:"info-val"},v_={class:"info-row"},y_={class:"info-val"},b_={class:"info-row"},__={class:"info-val"},k_={class:"info-row"},w_={class:"info-val"},S_={class:"info-row"},x_={class:"info-val"},C_={key:0,class:"info-row"},T_={class:"info-val"},R_={key:1,class:"info-row"},$_={class:"info-val"},A_={class:"info-val mono"},E_={class:"info-val"},I_={key:3,class:"info-empty"},P_=Ce({__name:"InfoPanel",props:{mode:{},status:{},sessionId:{},workDir:{}},emits:["close"],setup(e,{emit:t}){const n=e,s=t,r=H(()=>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 f(p){return p!=null&&p.byModel?Object.entries(p.byModel).map(([d,g])=>({model:d,tokens:u(g),output:g.output,cacheRead:g.inputCacheRead})):[]}const h=H(()=>l(n.status.usage)||l(n.status.contextTokens));return(p,d)=>(T(),$e(Cr,{open:!0,title:r.value,onClose:d[0]||(d[0]=g=>s("close"))},{default:Ee(()=>{var g,k;return[e.mode==="status"?(T(),I(oe,{key:0},[_("div",o_,[d[1]||(d[1]=_("span",{class:"info-key"},"会话 ID",-1)),_("span",i_,D(e.sessionId??"-"),1)]),_("div",l_,[d[2]||(d[2]=_("span",{class:"info-key"},"工作目录",-1)),_("span",a_,D(e.workDir??"-"),1)]),_("div",c_,[d[3]||(d[3]=_("span",{class:"info-key"},"模型",-1)),_("span",u_,D(e.status.model??"-"),1)]),_("div",f_,[d[4]||(d[4]=_("span",{class:"info-key"},"权限模式",-1)),_("span",h_,D(o(e.status.permission)),1)]),_("div",d_,[d[5]||(d[5]=_("span",{class:"info-key"},"思考级别",-1)),_("span",p_,D(e.status.thinkingLevel??"-"),1)]),_("div",g_,[d[6]||(d[6]=_("span",{class:"info-key"},"计划模式",-1)),_("span",m_,D(i(e.status.planMode)),1)]),_("div",v_,[d[7]||(d[7]=_("span",{class:"info-key"},"WolfPack 模式",-1)),_("span",y_,D(i(e.status.wolfpackMode)),1)]),_("div",b_,[d[8]||(d[8]=_("span",{class:"info-key"},"上下文",-1)),_("span",__,D(a(e.status.contextTokens))+" / "+D(a(e.status.maxContextTokens))+" ("+D(c(e.status.contextUsage))+")",1)])],64)):(T(),I(oe,{key:1},[_("div",k_,[d[9]||(d[9]=_("span",{class:"info-key"},"上下文 Token",-1)),_("span",w_,D(a(e.status.contextTokens))+" / "+D(a(e.status.maxContextTokens)),1)]),_("div",S_,[d[10]||(d[10]=_("span",{class:"info-key"},"上下文占比",-1)),_("span",x_,D(c(e.status.contextUsage)),1)]),(g=e.status.usage)!=null&&g.total?(T(),I("div",C_,[d[11]||(d[11]=_("span",{class:"info-key"},"累计 Token",-1)),_("span",T_,D(a(u(e.status.usage.total))),1)])):W("",!0),(k=e.status.usage)!=null&&k.currentTurn?(T(),I("div",R_,[d[12]||(d[12]=_("span",{class:"info-key"},"当前回合",-1)),_("span",$_,D(a(u(e.status.usage.currentTurn))),1)])):W("",!0),f(e.status.usage).length?(T(),I(oe,{key:2},[d[13]||(d[13]=_("div",{class:"info-subhead"},"按模型",-1)),(T(!0),I(oe,null,nt(f(e.status.usage),y=>(T(),I("div",{key:y.model,class:"info-row info-row-model"},[_("span",A_,D(y.model),1),_("span",E_,D(a(y.tokens))+"(输出 "+D(a(y.output))+" · 缓存读 "+D(a(y.cacheRead))+")",1)]))),128))],64)):W("",!0),h.value?W("",!0):(T(),I("div",I_,"暂无用量数据"))],64))]}),_:1},8,["title"]))}}),L_=Te(P_,[["__scopeId","data-v-407030a3"]]),N_={class:"sd-search-wrap"},M_=["aria-selected","onClick","onMousemove"],O_={class:"sd-title"},D_={class:"sd-meta"},B_={class:"sd-time"},j_={class:"sd-count"},F_={key:0,class:"sd-active"},U_={key:0,class:"sd-empty"},G_=Ce({__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=H(()=>{const g=r.value.trim().toLowerCase();return g?n.sessions.filter(k=>k.title.toLowerCase().includes(g)||k.sessionId.toLowerCase().includes(g)):n.sessions}),a=K(0);je(r,()=>{a.value=0}),je(l,()=>{a.value=0});function c(g){const k=l.value.length;return k===0?0:Math.max(0,Math.min(k-1,g))}async function u(){var k;await Ut();const g=(k=i.value)==null?void 0:k.querySelector('[aria-selected="true"]');g==null||g.scrollIntoView({block:"nearest"})}function f(g){a.value=c(a.value+g),u()}function h(){const g=l.value[a.value];g&&(s("select",g.sessionId),s("close"))}function p(g){g.key==="ArrowDown"?(g.preventDefault(),f(1)):g.key==="ArrowUp"?(g.preventDefault(),f(-1)):g.key==="Enter"&&(g.preventDefault(),h())}function d(g){const k=new Date(g),y=new Date;return k.toDateString()===y.toDateString()?k.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"}):k.toLocaleDateString("zh-CN",{month:"short",day:"numeric"})}return on(()=>{var g;(g=o.value)==null||g.focus()}),(g,k)=>(T(),$e(Cr,{open:!0,onClose:k[1]||(k[1]=y=>s("close"))},{header:Ee(()=>[_("div",N_,[k[2]||(k[2]=_("span",{class:"sd-icon"},"🔍",-1)),vr(_("input",{ref_key:"inputRef",ref:o,"onUpdate:modelValue":k[0]||(k[0]=y=>r.value=y),class:"sd-input",type:"text",placeholder:"搜索会话...",autocomplete:"off",spellcheck:"false",onKeydown:p},null,544),[[xr,r.value]])])]),footer:Ee(()=>[...k[3]||(k[3]=[_("span",{class:"sd-hint"},"↑↓ 导航 · Enter 切换 · Esc 关闭",-1)])]),default:Ee(()=>[_("div",{ref_key:"listRef",ref:i,class:"sd-list",role:"listbox"},[(T(!0),I(oe,null,nt(l.value,(y,w)=>(T(),I("button",{key:y.sessionId,class:he(["sd-row",{on:w===a.value,active:y.sessionId===e.activeId}]),role:"option","aria-selected":w===a.value,onClick:S=>{s("select",y.sessionId),s("close")},onMousemove:S=>a.value=w},[_("span",O_,D(y.title||"New Session"),1),_("span",D_,[_("span",B_,D(d(y.createdAt)),1),_("span",j_,D(y.messageCount)+" 条",1),y.active?(T(),I("span",F_,"●")):W("",!0)])],42,M_))),128)),l.value.length===0?(T(),I("div",U_,"没有匹配的会话")):W("",!0)],512)]),_:1}))}}),z_=Te(G_,[["__scopeId","data-v-0d21c7d7"]]),H_=Ce({__name:"ResizeHandle",props:{dragging:{type:Boolean}},setup(e){return(t,n)=>(T(),I("div",{class:he(["resize-handle",{dragging:e.dragging}]),role:"separator","aria-orientation":"vertical","aria-label":"拖拽调整宽度"},null,2))}}),W_=Te(H_,[["__scopeId","data-v-11060aea"]]),V_={class:"chat-main"},q_={class:"composer-dock"},Ul="scream-sidebar-collapsed",K_=Ce({__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:f,sendPrompt:h,sendCommand:p,clearMessages:d,appendSystemMessage:g,abort:k,resolveApproval:y,createSession:w,switchSession:S,deleteSession:A,exportSession:F,fetchGitStatus:z,fetchSnapshot:B,switchModel:Z,switchThinking:U}=Xh(),V=K(null),re=K(!1),j=K("status"),Q=K(!1),te=K(!1);try{Q.value=localStorage.getItem(Ul)==="1"}catch{}function Ae(){return window.innerWidth<=640}function le(){if(Ae()){te.value=!te.value;return}Q.value=!Q.value;try{localStorage.setItem(Ul,Q.value?"1":"0")}catch{}}function ue(we){te.value=!1,S(we)}const ce=K(!1);function Je(we){(we.metaKey||we.ctrlKey)&&we.key==="k"&&(we.preventDefault(),ce.value=!ce.value)}on(()=>window.addEventListener("keydown",Je)),ws(()=>window.removeEventListener("keydown",Je));const{width:ut,dragging:ot,onPointerDown:Fe}=Qh({storageKey:"scream-sidebar-width",defaultWidth:260,min:180,max:480});function Jt(){te.value=!1,w()}function ft(we){var P;(P=V.value)==null||P.insertText(we)}function ln(we,P){var X;switch(we){case"compact":p("compact");break;case"model":{(((X=V.value)==null?void 0:X.openModelPicker())??!1)||g(`当前模型:${r.value.model??"unknown"}`);break}case"clear":d();break;case"new":w();break;case"help":g(nd());break;case"auto":case"yes":case"plan":case"fork":case"title":case"btw":p(we,P);break;case"status":B(),j.value="status",re.value=!0;break;case"usage":B(),j.value="usage",re.value=!0;break;default:g(`未知命令:/${we}`)}}return(we,P)=>(T(),I("div",{class:"chat-view",style:_s({"--sidebar-width":ae(ut)+"px"})},[ie(r_,{sessions:ae(a),"current-session-id":ae(c),collapsed:Q.value,"mobile-open":te.value,onCreate:Jt,onSwitch:ue,onDelete:ae(A),onExport:ae(F),onToggle:le},null,8,["sessions","current-session-id","collapsed","mobile-open","onDelete","onExport"]),Q.value?W("",!0):(T(),$e(W_,{key:0,dragging:ae(ot),onPointerdown:ae(Fe)},null,8,["dragging","onPointerdown"])),te.value?(T(),I("div",{key:1,class:"sidebar-backdrop","aria-hidden":"true",onClick:P[0]||(P[0]=X=>te.value=!1)})):W("",!0),_("div",V_,[ie(Ed,{"connection-status":ae(t),status:ae(r),"session-id":ae(o),"work-dir":ae(i),"git-status":ae(u),onRefreshGit:ae(z),onToggleSidebar:le},null,8,["connection-status","status","session-id","work-dir","git-status","onRefreshGit"]),ie(Vy,{messages:ae(n),busy:ae(l),"work-dir":ae(i),onEdit:ft,onPick:ae(h)},null,8,["messages","busy","work-dir","onPick"]),re.value?(T(),$e(L_,{key:0,mode:j.value,status:ae(r),"session-id":ae(o),"work-dir":ae(i),onClose:P[1]||(P[1]=X=>re.value=!1)},null,8,["mode","status","session-id","work-dir"])):W("",!0),_("div",q_,[ie(Gb,{approvals:ae(s),onResolve:ae(y)},null,8,["approvals","onResolve"]),ie(Eb,{ref_key:"composerRef",ref:V,busy:ae(l),status:ae(r),"session-id":ae(o),models:ae(f),onSend:ae(h),onAbort:ae(k),onCommand:ln,onSwitchModel:ae(Z),onSwitchThinking:ae(U)},null,8,["busy","status","session-id","models","onSend","onAbort","onSwitchModel","onSwitchThinking"])])]),ce.value?(T(),$e(z_,{key:2,sessions:ae(a),"active-id":ae(c),onSelect:ue,onClose:P[2]||(P[2]=X=>ce.value=!1)},null,8,["sessions","active-id"])):W("",!0)],4))}}),Y_=Te(K_,[["__scopeId","data-v-db1494f1"]]),J_={class:"toast-container"},Z_=["onClick"],X_={class:"toast-icon"},Q_={class:"toast-msg"},ek=Ce({__name:"Toast",setup(e){const{toasts:t,removeToast:n}=dc(),s={info:"ℹ",success:"✓",error:"✗",warning:"⚠"};return(r,o)=>(T(),$e(Vo,{to:"body"},[_("div",J_,[ie(uc,{name:"toast"},{default:Ee(()=>[(T(!0),I(oe,null,nt(ae(t),i=>(T(),I("div",{key:i.id,class:he(["toast",`toast--${i.type}`]),onClick:l=>ae(n)(i.id)},[_("span",X_,D(s[i.type]),1),_("span",Q_,D(i.message),1)],10,Z_))),128))]),_:1})])]))}}),tk=Te(ek,[["__scopeId","data-v-7200727f"]]),nk={class:"app"},sk={class:"theme-switcher"},rk=["title","onClick"],ok=Ce({__name:"App",setup(e){const t=K("system"),n=K("dark");ya("effectiveTheme",n);const s={light:"#ffffff",dark:"#0d1117"};function r(){const l=document.documentElement,a=window.matchMedia("(prefers-color-scheme: dark)").matches,c=t.value==="system"?a?"dark":"light":t.value;n.value=c,l.dataset.theme=c;const u=document.querySelector('meta[name="theme-color"]');u&&u.setAttribute("content",s[c])}let o=null;function i(l){t.value=l,localStorage.setItem("scream-theme",l);const a=document.documentElement;a.classList.add("theme-transition"),r(),o!==null&&clearTimeout(o),o=window.setTimeout(()=>a.classList.remove("theme-transition"),320)}return on(()=>{const l=localStorage.getItem("scream-theme");l&&(t.value=l),r()}),je(t,r),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),(l,a)=>(T(),I("div",nk,[_("div",sk,[(T(),I(oe,null,nt(["light","dark","system"],c=>_("button",{key:c,class:he(["theme-btn",{active:t.value===c}]),title:c==="light"?"浅色":c==="dark"?"深色":"跟随系统",onClick:u=>i(c)},D(c==="light"?"☀️":c==="dark"?"🌙":"⚙️"),11,rk)),64))]),ie(Y_),ie(tk)]))}}),ik=Te(ok,[["__scopeId","data-v-bd94c6f3"]]);function lk(){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})}lk();Vh(ik).mount("#app");
|
|
93
|
-
//# sourceMappingURL=index-Dh3SHY7E.js.map
|