const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-LfdN0zeE.js","assets/html-C2L_23MC.js","assets/javascript-ySlJ1b_l.js","assets/css-BPhBrDlE.js","assets/angular-ts-CKsD7JZE.js","assets/scss-C31hgJw-.js","assets/apl-BBq3IX1j.js","assets/xml-e3z08dGr.js","assets/java-xI-RfyKK.js","assets/json-BQoSv7ci.js","assets/astro-CqkE3fuf.js","assets/typescript-Dj6nwHGl.js","assets/postcss-B3ZDOciz.js","assets/blade-a8OxSdnT.js","assets/sql-COK4E0Yg.js","assets/bsl-Dgyn0ogV.js","assets/sdbl-BLhTXw86.js","assets/cairo--RitsXJZ.js","assets/python-DhUJRlN_.js","assets/cobol-PTqiYgYu.js","assets/coffee-dyiR41kL.js","assets/cpp-BksuvNSY.js","assets/regexp-DWJ3fJO_.js","assets/glsl-DBO2IWDn.js","assets/c-C3t2pwGQ.js","assets/crystal-DtDmRg-F.js","assets/shellscript-atvbtKCR.js","assets/edge-D5gP-w-T.js","assets/html-derivative-CSfWNPLT.js","assets/elixir-CLiX3zqd.js","assets/elm-CmHSxxaM.js","assets/erb-BYTLMnw6.js","assets/ruby-DeZ3UC14.js","assets/haml-B2EZWmdv.js","assets/graphql-cDcHW_If.js","assets/jsx-BAng5TT0.js","assets/tsx-B6W0miNI.js","assets/lua-CvWAzNxB.js","assets/yaml-CVw76BM1.js","assets/fortran-fixed-form-TqA4NnZg.js","assets/fortran-free-form-DKXYxT9g.js","assets/fsharp-XplgxFYe.js","assets/markdown-UIAJJxZW.js","assets/gdresource-BHYsBjWJ.js","assets/gdshader-SKMF96pI.js","assets/gdscript-DfxzS6Rs.js","assets/git-commit-i4q6IMui.js","assets/diff-BgYniUM_.js","assets/git-rebase-B-v9cOL2.js","assets/glimmer-js-D-cwc0-E.js","assets/glimmer-ts-pgjy16dm.js","assets/hack-D1yCygmZ.js","assets/handlebars-BQGss363.js","assets/http-FRrOvY1W.js","assets/hxml-TIA70rKU.js","assets/haxe-C5wWYbrZ.js","assets/imba-bv_oIlVt.js","assets/jinja-DGy0s7-h.js","assets/jison-BqZprYcd.js","assets/julia-BBuGR-5E.js","assets/r-CwjWoCRV.js","assets/latex-C-cWTeAZ.js","assets/tex-rYs2v40G.js","assets/liquid-D3W5UaiH.js","assets/marko-z0MBrx5-.js","assets/less-BfCpw3nA.js","assets/mdc-DB_EDNY_.js","assets/nginx-D_VnBJ67.js","assets/nim-ZlGxZxc3.js","assets/perl-CHQXSrWU.js","assets/php-B5ebYQev.js","assets/pug-CM9l7STV.js","assets/qml-D8XfuvdV.js","assets/razor-CNLDkMZG.js","assets/csharp-D9R-vmeu.js","assets/rst-4NLicBqY.js","assets/cmake-DbXoA79R.js","assets/sas-BmTFh92c.js","assets/shaderlab-B7qAK45m.js","assets/hlsl-ifBTmRxC.js","assets/shellsession-C_rIy8kc.js","assets/soy-C-lX7w71.js","assets/sparql-bYkjHRlG.js","assets/turtle-BMR_PYu6.js","assets/stata-DorPZHa4.js","assets/svelte-MSaWC3Je.js","assets/templ-dwX3ZSMB.js","assets/go-B1SYOhNW.js","assets/ts-tags-CipyTH0X.js","assets/twig-NC5TFiHP.js","assets/vue-BuYVFjOK.js","assets/vue-html-xdeiXROB.js","assets/xsl-Dd0NUgwM.js"])))=>i.map(i=>d[i]);
var ya=Object.defineProperty;var ns=t=>{throw TypeError(t)};var Ea=(t,e,n)=>e in t?ya(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var w=(t,e,n)=>Ea(t,typeof e!="symbol"?e+"":e,n),Xr=(t,e,n)=>e.has(t)||ns("Cannot "+n);var y=(t,e,n)=>(Xr(t,e,"read from private field"),n?n.call(t):e.get(t)),z=(t,e,n)=>e.has(t)?ns("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),j=(t,e,n,r)=>(Xr(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),X=(t,e,n)=>(Xr(t,e,"access private method"),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const ba="5";var Gs;typeof window<"u"&&((Gs=window.__svelte??(window.__svelte={})).v??(Gs.v=new Set)).add(ba);const wa=1,xa=2,Fs=4,Ra=8,Aa=16,Sa=1,Ta=2,de=Symbol("uninitialized"),Pa="http://www.w3.org/1999/xhtml",La="http://www.w3.org/2000/svg",ka="http://www.w3.org/1998/Math/MathML",Us=!1;var $s=Array.isArray,Ca=Array.prototype.indexOf,br=Array.prototype.includes,Fr=Array.from,Ia=Object.defineProperty,jn=Object.getOwnPropertyDescriptor,Oa=Object.prototype,Da=Array.prototype,Na=Object.getPrototypeOf,rs=Object.isExtensible;const Va=()=>{};function Ma(t){for(var e=0;e<t.length;e++)t[e]()}function Hs(){var t,e,n=new Promise((r,i)=>{t=r,e=i});return{promise:n,resolve:t,reject:e}}const we=2,vn=4,Ur=8,zs=1<<24,rt=16,st=32,Vt=64,fi=128,qe=512,pe=1024,ge=2048,_t=4096,Pe=8192,Ke=16384,Rn=32768,pi=1<<25,yn=65536,wr=1<<17,Ba=1<<18,An=1<<19,Ga=1<<20,pt=1<<25,Zt=65536,xr=1<<21,ln=1<<22,It=1<<23,pr=Symbol("$state"),ja=Symbol("attributes"),hi=Symbol("class"),mi=Symbol("style"),Dn=Symbol("text"),hr=Symbol("form reset"),$r=new class extends Error{constructor(){super(...arguments);w(this,"name","StaleReactionError");w(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ws(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Fa(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Ua(t,e,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function $a(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ha(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function za(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Wa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ka(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Ya(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Ja(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function Xa(){console.warn("https://svelte.dev/e/derived_inert")}function Qa(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function qs(t){return t===this.v}function Za(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Ks(t){return!Za(t,this.v)}let el=!1,be=null;function En(t){be=t}function ot(t,e=!1,n){be={p:be,i:!1,c:null,e:null,s:t,x:null,r:Y,l:null}}function at(t){var e=be,n=e.e;if(n!==null){e.e=null;for(var r of n)go(r)}return e.i=!0,be=e.p,{}}function Ys(){return!0}let Gt=[];function Js(){var t=Gt;Gt=[],Ma(t)}function Ot(t){if(Gt.length===0&&!Un){var e=Gt;queueMicrotask(()=>{e===Gt&&Js()})}Gt.push(t)}function tl(){for(;Gt.length>0;)Js()}function Xs(t){var e=Y;if(e===null)return K.f|=It,t;if((e.f&Rn)===0&&(e.f&vn)===0)throw t;kt(t,e)}function kt(t,e){if(!(e!==null&&(e.f&Ke)!==0)){for(;e!==null;){if((e.f&fi)!==0){if((e.f&Rn)===0)throw t;try{e.b.error(t);return}catch(n){t=n}}e=e.parent}throw t}}const nl=-7169;function le(t,e){t.f=t.f&nl|e}function Vi(t){(t.f&qe)!==0||t.deps===null?le(t,pe):le(t,_t)}function Qs(t){if(t!==null)for(const e of t)(e.f&we)===0||(e.f&Zt)===0||(e.f^=Zt,Qs(e.deps))}function Zs(t,e,n){(t.f&ge)!==0?e.add(t):(t.f&_t)!==0&&n.add(t),Qs(t.deps),le(t,pe)}function rl(t){let e=0,n=tn(0),r;return()=>{Fi()&&(g(n),$i(()=>(e===0&&(r=ir(()=>t(()=>$n(n)))),e+=1,()=>{Ot(()=>{e-=1,e===0&&(r==null||r(),r=void 0,$n(n))})})))}}var il=yn|An;function sl(t,e,n,r){new ol(t,e,n,r)}var Ue,Ni,$e,Ht,Le,He,Se,Me,vt,zt,Pt,dn,Xn,Qn,yt,Br,ae,al,ll,ul,_i,mr,_r,gi,vi;class ol{constructor(e,n,r,i){z(this,ae);w(this,"parent");w(this,"is_pending",!1);w(this,"transform_error");z(this,Ue);z(this,Ni,null);z(this,$e);z(this,Ht);z(this,Le);z(this,He,null);z(this,Se,null);z(this,Me,null);z(this,vt,null);z(this,zt,0);z(this,Pt,0);z(this,dn,!1);z(this,Xn,new Set);z(this,Qn,new Set);z(this,yt,null);z(this,Br,rl(()=>(j(this,yt,tn(y(this,zt))),()=>{j(this,yt,null)})));var s;j(this,Ue,e),j(this,$e,n),j(this,Ht,o=>{var a=Y;a.b=this,a.f|=fi,r(o)}),this.parent=Y.b,this.transform_error=i??((s=this.parent)==null?void 0:s.transform_error)??(o=>o),j(this,Le,Hi(()=>{X(this,ae,_i).call(this)},il))}defer_effect(e){Zs(e,y(this,Xn),y(this,Qn))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!y(this,$e).pending}update_pending_count(e,n){X(this,ae,gi).call(this,e,n),j(this,zt,y(this,zt)+e),!(!y(this,yt)||y(this,dn))&&(j(this,dn,!0),Ot(()=>{j(this,dn,!1),y(this,yt)&&bn(y(this,yt),y(this,zt))}))}get_effect_pending(){return y(this,Br).call(this),g(y(this,yt))}error(e){if(!y(this,$e).onerror&&!y(this,$e).failed)throw e;V!=null&&V.is_fork?(y(this,He)&&V.skip_effect(y(this,He)),y(this,Se)&&V.skip_effect(y(this,Se)),y(this,Me)&&V.skip_effect(y(this,Me)),V.oncommit(()=>{X(this,ae,vi).call(this,e)})):X(this,ae,vi).call(this,e)}}Ue=new WeakMap,Ni=new WeakMap,$e=new WeakMap,Ht=new WeakMap,Le=new WeakMap,He=new WeakMap,Se=new WeakMap,Me=new WeakMap,vt=new WeakMap,zt=new WeakMap,Pt=new WeakMap,dn=new WeakMap,Xn=new WeakMap,Qn=new WeakMap,yt=new WeakMap,Br=new WeakMap,ae=new WeakSet,al=function(){try{j(this,He,ze(()=>y(this,Ht).call(this,y(this,Ue))))}catch(e){this.error(e)}},ll=function(e){const n=y(this,$e).failed;n&&j(this,Me,ze(()=>{n(y(this,Ue),()=>e,()=>()=>{})}))},ul=function(){const e=y(this,$e).pending;e&&(this.is_pending=!0,j(this,Se,ze(()=>e(y(this,Ue)))),Ot(()=>{var n=j(this,vt,document.createDocumentFragment()),r=Dt();n.append(r),j(this,He,X(this,ae,_r).call(this,()=>ze(()=>y(this,Ht).call(this,r)))),y(this,Pt)===0&&(y(this,Ue).before(n),j(this,vt,null),Jt(y(this,Se),()=>{j(this,Se,null)}),X(this,ae,mr).call(this,V))}))},_i=function(){try{if(this.is_pending=this.has_pending_snippet(),j(this,Pt,0),j(this,zt,0),j(this,He,ze(()=>{y(this,Ht).call(this,y(this,Ue))})),y(this,Pt)>0){var e=j(this,vt,document.createDocumentFragment());Wi(y(this,He),e);const n=y(this,$e).pending;j(this,Se,ze(()=>n(y(this,Ue))))}else X(this,ae,mr).call(this,V)}catch(n){this.error(n)}},mr=function(e){this.is_pending=!1,e.transfer_effects(y(this,Xn),y(this,Qn))},_r=function(e){var n=Y,r=K,i=be;gt(y(this,Le)),Je(y(this,Le)),En(y(this,Le).ctx);try{return en.ensure(),e()}catch(s){return Xs(s),null}finally{gt(n),Je(r),En(i)}},gi=function(e,n){var r;if(!this.has_pending_snippet()){this.parent&&X(r=this.parent,ae,gi).call(r,e,n);return}j(this,Pt,y(this,Pt)+e),y(this,Pt)===0&&(X(this,ae,mr).call(this,n),y(this,Se)&&Jt(y(this,Se),()=>{j(this,Se,null)}),y(this,vt)&&(y(this,Ue).before(y(this,vt)),j(this,vt,null)))},vi=function(e){y(this,He)&&(Ie(y(this,He)),j(this,He,null)),y(this,Se)&&(Ie(y(this,Se)),j(this,Se,null)),y(this,Me)&&(Ie(y(this,Me)),j(this,Me,null));var n=y(this,$e).onerror;let r=y(this,$e).failed;var i=!1,s=!1;const o=()=>{if(i){Qa();return}i=!0,s&&Ja(),y(this,Me)!==null&&Jt(y(this,Me),()=>{j(this,Me,null)}),X(this,ae,_r).call(this,()=>{X(this,ae,_i).call(this)})},a=l=>{try{s=!0,n==null||n(l,o),s=!1}catch(u){kt(u,y(this,Le)&&y(this,Le).parent)}r&&j(this,Me,X(this,ae,_r).call(this,()=>{try{return ze(()=>{var u=Y;u.b=this,u.f|=fi,r(y(this,Ue),()=>l,()=>o)})}catch(u){return kt(u,y(this,Le).parent),null}}))};Ot(()=>{var l;try{l=this.transform_error(e)}catch(u){kt(u,y(this,Le)&&y(this,Le).parent);return}l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(a,u=>kt(u,y(this,Le)&&y(this,Le).parent)):a(l)})};function cl(t,e,n,r){const i=Mi;var s=t.filter(p=>!p.settled),o=e.map(i);if(n.length===0&&s.length===0){r(o);return}var a=Y,l=dl(),u=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(p=>p.promise)):null;function c(p){if((a.f&Ke)===0){l();try{r([...o,...p])}catch(_){kt(_,a)}Rr()}}var h=eo();if(n.length===0){u.then(()=>c([])).finally(h);return}function d(){Promise.all(n.map(p=>fl(p))).then(c).catch(p=>kt(p,a)).finally(h)}u?u.then(()=>{l(),d(),Rr()}):d()}function dl(){var t=Y,e=K,n=be,r=V;return function(s=!0){gt(t),Je(e),En(n),s&&(t.f&Ke)===0&&(r==null||r.activate(),r==null||r.apply())}}function Rr(t=!0){gt(null),Je(null),En(null),t&&(V==null||V.deactivate())}function eo(){var t=Y,e=t.b,n=V,r=!!(e!=null&&e.is_rendered());return e==null||e.update_pending_count(1,n),n.increment(r,t),()=>{e==null||e.update_pending_count(-1,n),n.decrement(r,t)}}function Mi(t){var e=we|ge;return Y!==null&&(Y.f|=An),{ctx:be,deps:null,effects:null,equals:qs,f:e,fn:t,reactions:null,rv:0,v:de,wv:0,parent:Y,ac:null}}const Nn=Symbol("obsolete");function fl(t,e,n){let r=Y;r===null&&Fa();var i=void 0,s=tn(de),o=!K,a=new Set;return kl(()=>{var p,_;var l=Y,u=Hs();i=u.promise;try{Promise.resolve(t()).then(u.resolve,b=>{b!==$r&&u.reject(b)}).finally(Rr)}catch(b){u.reject(b),Rr()}var c=V;if(o){if((l.f&Rn)!==0)var h=eo();if((p=r.b)!=null&&p.is_rendered())(_=c.async_deriveds.get(l))==null||_.reject(Nn);else for(const b of a.values())b.reject(Nn);a.add(u),c.async_deriveds.set(l,u)}const d=(b,m=void 0)=>{h==null||h(),a.delete(u),m!==Nn&&(c.activate(),m?(s.f|=It,bn(s,m)):((s.f&It)!==0&&(s.f^=It),bn(s,b)),c.deactivate())};u.promise.then(d,b=>d(null,b||"unknown"))}),_o(()=>{for(const l of a)l.reject(Nn)}),new Promise(l=>{function u(c){function h(){c===i?l(s):u(i)}c.then(h,h)}u(i)})}function Hr(t){const e=Mi(t);return xo(e),e}function pl(t){const e=Mi(t);return e.equals=Ks,e}function hl(t){var e=t.effects;if(e!==null){t.effects=null;for(var n=0;n<e.length;n+=1)Ie(e[n])}}function Bi(t){var e,n=Y,r=t.parent;if(!Mt&&r!==null&&t.v!==de&&(r.f&(Ke|Pe))!==0)return Xa(),t.v;gt(r);try{t.f&=~Zt,hl(t),e=To(t)}finally{gt(n)}return e}function to(t){var e=Bi(t);if(!t.equals(e)&&(t.wv=Ao(),(!(V!=null&&V.is_fork)||t.deps===null)&&(V!==null?(V.capture(t,e,!0),Fn==null||Fn.capture(t,e,!0)):t.v=e,t.deps===null))){le(t,pe);return}Mt||(Ee!==null?(Fi()||V!=null&&V.is_fork)&&Ee.set(t,e):Vi(t))}function ml(t){var e,n;if(t.effects!==null)for(const r of t.effects)(r.teardown||r.ac)&&((e=r.teardown)==null||e.call(r),(n=r.ac)==null||n.abort($r),r.fn!==null&&(r.teardown=Va),r.ac=null,zn(r,0),zi(r))}function no(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&wn(e)}let Qr=null,sn=null,V=null,Fn=null,Ee=null,yi=null,Un=!1,Zr=!1,an=null,gr=null;var is=0;let _l=1;var fn,Lt,Wt,pn,hn,mn,Et,_n,ke,Zn,bt,tt,dt,gn,qt,Z,Ei,Vn,bi,ro,io,on,gl,Mn;const Gr=class Gr{constructor(){z(this,Z);w(this,"id",_l++);z(this,fn,!1);w(this,"linked",!0);z(this,Lt,null);z(this,Wt,null);w(this,"async_deriveds",new Map);w(this,"current",new Map);w(this,"previous",new Map);z(this,pn,new Set);z(this,hn,new Set);z(this,mn,0);z(this,Et,new Map);z(this,_n,null);z(this,ke,[]);z(this,Zn,[]);z(this,bt,new Set);z(this,tt,new Set);z(this,dt,new Map);z(this,gn,new Set);w(this,"is_fork",!1);z(this,qt,!1);sn===null?Qr=sn=this:(j(sn,Wt,this),j(this,Lt,sn)),sn=this}skip_effect(e){y(this,dt).has(e)||y(this,dt).set(e,{d:[],m:[]}),y(this,gn).delete(e)}unskip_effect(e,n=r=>this.schedule(r)){var r=y(this,dt).get(e);if(r){y(this,dt).delete(e);for(var i of r.d)le(i,ge),n(i);for(i of r.m)le(i,_t),n(i)}y(this,gn).add(e)}capture(e,n,r=!1){e.v!==de&&!this.previous.has(e)&&this.previous.set(e,e.v),(e.f&It)===0&&(this.current.set(e,[n,r]),Ee==null||Ee.set(e,n)),this.is_fork||(e.v=n)}activate(){V=this}deactivate(){V=null,Ee=null}flush(){try{Zr=!0,V=this,X(this,Z,Vn).call(this)}finally{is=0,yi=null,an=null,gr=null,Zr=!1,V=null,Ee=null,Yt.clear()}}discard(){var e;for(const n of y(this,hn))n(this);y(this,hn).clear();for(const n of this.async_deriveds.values())n.reject(Nn);X(this,Z,Mn).call(this),(e=y(this,_n))==null||e.resolve()}register_created_effect(e){y(this,Zn).push(e)}increment(e,n){if(j(this,mn,y(this,mn)+1),e){let r=y(this,Et).get(n)??0;y(this,Et).set(n,r+1)}}decrement(e,n){if(j(this,mn,y(this,mn)-1),e){let r=y(this,Et).get(n)??0;r===1?y(this,Et).delete(n):y(this,Et).set(n,r-1)}y(this,qt)||(j(this,qt,!0),Ot(()=>{j(this,qt,!1),this.linked&&this.flush()}))}transfer_effects(e,n){for(const r of e)y(this,bt).add(r);for(const r of n)y(this,tt).add(r);e.clear(),n.clear()}oncommit(e){y(this,pn).add(e)}ondiscard(e){y(this,hn).add(e)}settled(){return(y(this,_n)??j(this,_n,Hs())).promise}static ensure(){if(V===null){const e=V=new Gr;!Zr&&!Un&&Ot(()=>{y(e,fn)||e.flush()})}return V}apply(){{Ee=null;return}}schedule(e){var i;if(yi=e,(i=e.b)!=null&&i.is_pending&&(e.f&(vn|Ur|zs))!==0&&(e.f&Rn)===0){e.b.defer_effect(e);return}for(var n=e;n.parent!==null;){n=n.parent;var r=n.f;if(an!==null&&n===Y&&(K===null||(K.f&we)===0))return;if((r&(Vt|st))!==0){if((r&pe)===0)return;n.f^=pe}}y(this,ke).push(n)}};fn=new WeakMap,Lt=new WeakMap,Wt=new WeakMap,pn=new WeakMap,hn=new WeakMap,mn=new WeakMap,Et=new WeakMap,_n=new WeakMap,ke=new WeakMap,Zn=new WeakMap,bt=new WeakMap,tt=new WeakMap,dt=new WeakMap,gn=new WeakMap,qt=new WeakMap,Z=new WeakSet,Ei=function(){if(this.is_fork)return!0;for(const r of y(this,Et).keys()){for(var e=r,n=!1;e.parent!==null;){if(y(this,dt).has(e)){n=!0;break}e=e.parent}if(!n)return!0}return!1},Vn=function(){var l,u,c,h;j(this,fn,!0),is++>1e3&&(X(this,Z,Mn).call(this),yl());for(const d of y(this,bt))y(this,tt).delete(d),le(d,ge),this.schedule(d);for(const d of y(this,tt))le(d,_t),this.schedule(d);const e=y(this,ke);j(this,ke,[]),this.apply();var n=an=[],r=[],i=gr=[];for(const d of e)try{X(this,Z,bi).call(this,d,n,r)}catch(p){throw ao(d),X(this,Z,Ei).call(this)||this.discard(),p}if(V=null,i.length>0){var s=Gr.ensure();for(const d of i)s.schedule(d)}if(an=null,gr=null,X(this,Z,Ei).call(this)){X(this,Z,on).call(this,r),X(this,Z,on).call(this,n);for(const[d,p]of y(this,dt))oo(d,p);i.length>0&&X(l=V,Z,Vn).call(l);return}const o=X(this,Z,ro).call(this);if(o){X(this,Z,on).call(this,r),X(this,Z,on).call(this,n),X(u=o,Z,io).call(u,this);return}y(this,bt).clear(),y(this,tt).clear();for(const d of y(this,pn))d(this);y(this,pn).clear(),Fn=this,ss(r),ss(n),Fn=null,(c=y(this,_n))==null||c.resolve();var a=V;if(y(this,mn)===0&&(y(this,ke).length===0||a!==null)&&X(this,Z,Mn).call(this),y(this,ke).length>0)if(a!==null){const d=a;y(d,ke).push(...y(this,ke).filter(p=>!y(d,ke).includes(p)))}else a=this;a!==null&&X(h=a,Z,Vn).call(h)},bi=function(e,n,r){e.f^=pe;for(var i=e.first;i!==null;){var s=i.f,o=(s&(st|Vt))!==0,a=o&&(s&pe)!==0,l=a||(s&Pe)!==0||y(this,dt).has(i);if(!l&&i.fn!==null){o?i.f^=pe:(s&vn)!==0?n.push(i):rr(i)&&((s&rt)!==0&&y(this,tt).add(i),wn(i));var u=i.first;if(u!==null){i=u;continue}}for(;i!==null;){var c=i.next;if(c!==null){i=c;break}i=i.parent}}},ro=function(){for(var e=y(this,Lt);e!==null;){if(!e.is_fork){for(const[n,[,r]]of this.current)if(e.current.has(n)&&!r)return e}e=y(e,Lt)}return null},io=function(e){var r;for(const[i,s]of e.current)!this.previous.has(i)&&e.previous.has(i)&&this.previous.set(i,e.previous.get(i)),this.current.set(i,s);for(const[i,s]of e.async_deriveds){const o=this.async_deriveds.get(i);o&&s.promise.then(o.resolve).catch(o.reject)}e.async_deriveds.clear(),this.transfer_effects(y(e,bt),y(e,tt));const n=i=>{var s=i.reactions;if(s!==null)for(const l of s){var o=l.f;if((o&we)!==0)n(l);else{var a=l;o&(ln|rt)&&!this.async_deriveds.has(a)&&(y(this,tt).delete(a),le(a,ge),this.schedule(a))}}};for(const i of this.current.keys())n(i);this.oncommit(()=>e.discard()),X(r=e,Z,Mn).call(r),V=this,X(this,Z,Vn).call(this)},on=function(e){for(var n=0;n<e.length;n+=1)Zs(e[n],y(this,bt),y(this,tt))},gl=function(){var h;for(let d=Qr;d!==null;d=y(d,Wt)){var e=d.id<this.id,n=[];for(const[p,[_,b]]of this.current){if(d.current.has(p)){var r=d.current.get(p)[0];if(e&&_!==r)d.current.set(p,[_,b]);else continue}n.push(p)}if(e)for(const[p,_]of this.async_deriveds){const b=d.async_deriveds.get(p);b&&_.promise.then(b.resolve).catch(b.reject)}var i=[...d.current.keys()].filter(p=>!d.current.get(p)[1]);if(!(!y(d,fn)||i.length===0)){var s=i.filter(p=>!this.current.has(p));if(s.length===0)e&&d.discard();else if(n.length>0){if(e)for(const p of y(this,gn))d.unskip_effect(p,_=>{var b;(_.f&(rt|ln))!==0?d.schedule(_):X(b=d,Z,on).call(b,[_])});d.activate();var o=new Set,a=new Map;for(var l of n)so(l,s,o,a);a=new Map;var u=[...d.current].filter(([p,_])=>{const b=this.current.get(p);return b?b[0]!==_[0]||b[1]!==_[1]:!0}).map(([p])=>p);if(u.length>0)for(const p of y(this,Zn))(p.f&(Ke|Pe|wr))===0&&Gi(p,u,a)&&((p.f&(ln|rt))!==0?(le(p,ge),d.schedule(p)):y(d,bt).add(p));if(y(d,ke).length>0&&!y(d,qt)){d.apply();for(var c of y(d,ke))X(h=d,Z,bi).call(h,c,[],[]);j(d,ke,[])}d.deactivate()}}}},Mn=function(){if(this.linked){var e=y(this,Lt),n=y(this,Wt);e===null?Qr=n:j(e,Wt,n),n===null?sn=e:j(n,Lt,e),this.linked=!1}};let en=Gr;function vl(t){var e=Un;Un=!0;try{for(var n;;){if(tl(),V===null)return n;V.flush()}}finally{Un=e}}function yl(){try{Wa()}catch(t){kt(t,yi)}}let et=null;function ss(t){var e=t.length;if(e!==0){for(var n=0;n<e;){var r=t[n++];if((r.f&(Ke|Pe))===0&&rr(r)&&(et=new Set,wn(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Eo(r),(et==null?void 0:et.size)>0)){Yt.clear();for(const i of et){if((i.f&(Ke|Pe))!==0)continue;const s=[i];let o=i.parent;for(;o!==null;)et.has(o)&&(et.delete(o),s.push(o)),o=o.parent;for(let a=s.length-1;a>=0;a--){const l=s[a];(l.f&(Ke|Pe))===0&&wn(l)}}et.clear()}}et=null}}function so(t,e,n,r){if(!n.has(t)&&(n.add(t),t.reactions!==null))for(const i of t.reactions){const s=i.f;(s&we)!==0?so(i,e,n,r):(s&(ln|rt))!==0&&(s&ge)===0&&Gi(i,e,r)&&(le(i,ge),ji(i))}}function Gi(t,e,n){const r=n.get(t);if(r!==void 0)return r;if(t.deps!==null)for(const i of t.deps){if(br.call(e,i))return!0;if((i.f&we)!==0&&Gi(i,e,n))return n.set(i,!0),!0}return n.set(t,!1),!1}function ji(t){V.schedule(t)}function oo(t,e){if(!((t.f&st)!==0&&(t.f&pe)!==0)){(t.f&ge)!==0?e.d.push(t):(t.f&_t)!==0&&e.m.push(t),le(t,pe);for(var n=t.first;n!==null;)oo(n,e),n=n.next}}function ao(t){le(t,pe);for(var e=t.first;e!==null;)ao(e),e=e.next}let Ar=new Set;const Yt=new Map;let lo=!1;function tn(t,e){var n={f:0,v:t,reactions:null,equals:qs,rv:0,wv:0};return n}function W(t,e){const n=tn(t);return xo(n),n}function El(t,e=!1,n=!0){const r=tn(t);return e||(r.equals=Ks),r}function D(t,e,n=!1){K!==null&&(!it||(K.f&wr)!==0)&&Ys()&&(K.f&(we|rt|ln|wr))!==0&&(mt===null||!mt.has(t))&&Ya();let r=n?ht(e):e;return bn(t,r,gr)}function bn(t,e,n=null){if(!t.equals(e)){Yt.set(t,Mt?e:t.v);var r=en.ensure();if(r.capture(t,e),(t.f&we)!==0){const i=t;(t.f&ge)!==0&&Bi(i),Ee===null&&Vi(i)}t.wv=Ao(),uo(t,ge,n),Y!==null&&(Y.f&pe)!==0&&(Y.f&(st|Vt))===0&&(Fe===null?Il([t]):Fe.push(t)),!r.is_fork&&Ar.size>0&&!lo&&bl()}return e}function bl(){lo=!1;for(const t of Ar){(t.f&pe)!==0&&le(t,_t);let e;try{e=rr(t)}catch{e=!0}e&&wn(t)}Ar.clear()}function $n(t){D(t,t.v+1)}function uo(t,e,n){var r=t.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var o=r[s],a=o.f,l=(a&ge)===0;if(l&&le(o,e),(a&wr)!==0)Ar.add(o);else if((a&we)!==0){var u=o;Ee==null||Ee.delete(u),(a&Zt)===0&&(a&qe&&(Y===null||(Y.f&xr)===0)&&(o.f|=Zt),uo(u,_t,n))}else if(l){var c=o;(a&rt)!==0&&et!==null&&et.add(c),n!==null?n.push(c):ji(c)}}}function ht(t){if(typeof t!="object"||t===null||pr in t)return t;const e=Na(t);if(e!==Oa&&e!==Da)return t;var n=new Map,r=$s(t),i=W(0),s=Xt,o=a=>{if(Xt===s)return a();var l=K,u=Xt;Je(null),ls(s);var c=a();return Je(l),ls(u),c};return r&&n.set("length",W(t.length)),new Proxy(t,{defineProperty(a,l,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&qa();var c=n.get(l);return c===void 0?o(()=>{var h=W(u.value);return n.set(l,h),h}):D(c,u.value,!0),!0},deleteProperty(a,l){var u=n.get(l);if(u===void 0){if(l in a){const c=o(()=>W(de));n.set(l,c),$n(i)}}else D(u,de),$n(i);return!0},get(a,l,u){var p;if(l===pr)return t;var c=n.get(l),h=l in a;if(c===void 0&&(!h||(p=jn(a,l))!=null&&p.writable)&&(c=o(()=>{var _=ht(h?a[l]:de),b=W(_);return b}),n.set(l,c)),c!==void 0){var d=g(c);return d===de?void 0:d}return Reflect.get(a,l,u)},getOwnPropertyDescriptor(a,l){var u=Reflect.getOwnPropertyDescriptor(a,l);if(u&&"value"in u){var c=n.get(l);c&&(u.value=g(c))}else if(u===void 0){var h=n.get(l),d=h==null?void 0:h.v;if(h!==void 0&&d!==de)return{enumerable:!0,configurable:!0,value:d,writable:!0}}return u},has(a,l){var d;if(l===pr)return!0;var u=n.get(l),c=u!==void 0&&u.v!==de||Reflect.has(a,l);if(u!==void 0||Y!==null&&(!c||(d=jn(a,l))!=null&&d.writable)){u===void 0&&(u=o(()=>{var p=c?ht(a[l]):de,_=W(p);return _}),n.set(l,u));var h=g(u);if(h===de)return!1}return c},set(a,l,u,c){var E;var h=n.get(l),d=l in a;if(r&&l==="length")for(var p=u;p<h.v;p+=1){var _=n.get(p+"");_!==void 0?D(_,de):p in a&&(_=o(()=>W(de)),n.set(p+"",_))}if(h===void 0)(!d||(E=jn(a,l))!=null&&E.writable)&&(h=o(()=>W(void 0)),D(h,ht(u)),n.set(l,h));else{d=h.v!==de;var b=o(()=>ht(u));D(h,b)}var m=Reflect.getOwnPropertyDescriptor(a,l);if(m!=null&&m.set&&m.set.call(c,u),!d){if(r&&typeof l=="string"){var v=n.get("length"),x=Number(l);Number.isInteger(x)&&x>=v.v&&D(v,x+1)}$n(i)}return!0},ownKeys(a){g(i);var l=Reflect.ownKeys(a).filter(h=>{var d=n.get(h);return d===void 0||d.v!==de});for(var[u,c]of n)c.v!==de&&!(u in a)&&l.push(u);return l},setPrototypeOf(){Ka()}})}var Sr,co,fo,po;function wl(){if(Sr===void 0){Sr=window,co=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;fo=jn(e,"firstChild").get,po=jn(e,"nextSibling").get,rs(t)&&(t[hi]=void 0,t[ja]=null,t[mi]=void 0,t.__e=void 0),rs(n)&&(n[Dn]=void 0)}}function Dt(t=""){return document.createTextNode(t)}function Ct(t){return fo.call(t)}function nr(t){return po.call(t)}function R(t,e){return Ct(t)}function Nt(t,e=!1){{var n=Ct(t);return n instanceof Comment&&n.data===""?nr(n):n}}function C(t,e=1,n=!1){let r=t;for(;e--;)r=nr(r);return r}function xl(t){t.textContent=""}function ho(){return!1}function mo(t,e,n){return e==null||e===Pa?n?document.createElement(t,{is:n}):document.createElement(t):n?document.createElementNS(e,t,{is:n}):document.createElementNS(e,t)}let os=!1;function Rl(){os||(os=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)(e=n[hr])==null||e.call(n)})},{capture:!0}))}function zr(t){var e=K,n=Y;Je(null),gt(null);try{return t()}finally{Je(e),gt(n)}}function Al(t,e,n,r=n){t.addEventListener(e,()=>zr(n));const i=t[hr];i?t[hr]=()=>{i(),r(!0)}:t[hr]=()=>r(!0),Rl()}function Sl(t){Y===null&&(K===null&&za(),Ha()),Mt&&$a()}function Tl(t,e){var n=e.last;n===null?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}function At(t,e){var n=Y;n!==null&&(n.f&Pe)!==0&&(t|=Pe);var r={ctx:be,deps:null,nodes:null,f:t|ge|qe,first:null,fn:e,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};V==null||V.register_created_effect(r);var i=r;if((t&vn)!==0)an!==null?an.push(r):en.ensure().schedule(r);else if(e!==null){try{wn(r)}catch(o){throw Ie(r),o}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&An)===0&&(i=i.first,(t&rt)!==0&&(t&yn)!==0&&i!==null&&(i.f|=yn))}if(i!==null&&(i.parent=n,n!==null&&Tl(i,n),K!==null&&(K.f&we)!==0&&(t&Vt)===0)){var s=K;(s.effects??(s.effects=[])).push(i)}return r}function Fi(){return K!==null&&!it}function _o(t){const e=At(Ur,null);return le(e,pe),e.teardown=t,e}function Ui(t){Sl();var e=Y.f,n=!K&&(e&st)!==0&&be!==null&&!be.i;if(n){var r=be;(r.e??(r.e=[])).push(t)}else return go(t)}function go(t){return At(vn|Ga,t)}function Pl(t){en.ensure();const e=At(Vt|An,t);return(n={})=>new Promise(r=>{n.outro?Jt(e,()=>{Ie(e),r(void 0)}):(Ie(e),r(void 0))})}function Ll(t){return At(vn,t)}function kl(t){return At(ln|An,t)}function $i(t,e=0){return At(Ur|e,t)}function U(t,e=[],n=[],r=[]){cl(r,e,n,i=>{At(Ur,()=>{t(...i.map(g))})})}function Hi(t,e=0){var n=At(rt|e,t);return n}function ze(t){return At(st|An,t)}function vo(t){var e=t.teardown;if(e!==null){const n=Mt,r=K;as(!0),Je(null);try{e.call(null)}finally{as(n),Je(r)}}}function zi(t,e=!1){var n=t.first;for(t.first=t.last=null;n!==null;){const i=n.ac;i!==null&&zr(()=>{i.abort($r)});var r=n.next;(n.f&Vt)!==0?n.parent=null:Ie(n,e),n=r}}function Cl(t){for(var e=t.first;e!==null;){var n=e.next;(e.f&st)===0&&Ie(e),e=n}}function Ie(t,e=!0){var n=!1;(e||(t.f&Ba)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(yo(t.nodes.start,t.nodes.end),n=!0),t.f|=pi,zi(t,e&&!n),zn(t,0);var r=t.nodes&&t.nodes.t;if(r!==null)for(const s of r)s.stop();vo(t),t.f^=pi,t.f|=Ke;var i=t.parent;i!==null&&i.first!==null&&Eo(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function yo(t,e){for(;t!==null;){var n=t===e?null:nr(t);t.remove(),t=n}}function Eo(t){var e=t.parent,n=t.prev,r=t.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),e!==null&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function Jt(t,e,n=!0){var r=[];bo(t,r,!0);var i=()=>{n&&Ie(t),e&&e()},s=r.length;if(s>0){var o=()=>--s||i();for(var a of r)a.out(o)}else i()}function bo(t,e,n){if((t.f&Pe)===0){t.f^=Pe;var r=t.nodes&&t.nodes.t;if(r!==null)for(const a of r)(a.is_global||n)&&e.push(a);for(var i=t.first;i!==null;){var s=i.next;if((i.f&Vt)===0){var o=(i.f&yn)!==0||(i.f&st)!==0&&(t.f&rt)!==0;bo(i,e,o?n:!1)}i=s}}}function Tr(t){wo(t,!0)}function wo(t,e){if((t.f&Pe)!==0){t.f^=Pe,(t.f&pe)===0&&(le(t,ge),en.ensure().schedule(t));for(var n=t.first;n!==null;){var r=n.next,i=(n.f&yn)!==0||(n.f&st)!==0;wo(n,i?e:!1),n=r}var s=t.nodes&&t.nodes.t;if(s!==null)for(const o of s)(o.is_global||e)&&o.in()}}function Wi(t,e){if(t.nodes)for(var n=t.nodes.start,r=t.nodes.end;n!==null;){var i=n===r?null:nr(n);e.append(n),n=i}}let vr=!1,Mt=!1;function as(t){Mt=t}let K=null,it=!1;function Je(t){K=t}let Y=null;function gt(t){Y=t}let mt=null;function xo(t){K!==null&&(mt??(mt=new Set)).add(t)}let Ce=null,Ve=0,Fe=null;function Il(t){Fe=t}let Ro=1,jt=0,Xt=jt;function ls(t){Xt=t}function Ao(){return++Ro}function rr(t){var e=t.f;if((e&ge)!==0)return!0;if(e&we&&(t.f&=~Zt),(e&_t)!==0){for(var n=t.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(rr(s)&&to(s),s.wv>t.wv)return!0}(e&qe)!==0&&Ee===null&&le(t,pe)}return!1}function So(t,e,n=!0){var r=t.reactions;if(r!==null&&!(mt!==null&&mt.has(t)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&we)!==0?So(s,e,!1):e===s&&(n?le(s,ge):(s.f&pe)!==0&&le(s,_t),ji(s))}}function To(t){var b;var e=Ce,n=Ve,r=Fe,i=K,s=mt,o=be,a=it,l=Xt,u=t.f;Ce=null,Ve=0,Fe=null,K=(u&(st|Vt))===0?t:null,mt=null,En(t.ctx),it=!1,Xt=++jt,t.ac!==null&&(zr(()=>{t.ac.abort($r)}),t.ac=null);try{t.f|=xr;var c=t.fn,h=c();t.f|=Rn;var d=t.deps,p=V==null?void 0:V.is_fork;if(Ce!==null){var _;if(p||zn(t,Ve),d!==null&&Ve>0)for(d.length=Ve+Ce.length,_=0;_<Ce.length;_++)d[Ve+_]=Ce[_];else t.deps=d=Ce;if(Fi()&&(t.f&qe)!==0)for(_=Ve;_<d.length;_++)((b=d[_]).reactions??(b.reactions=[])).push(t)}else!p&&d!==null&&Ve<d.length&&(zn(t,Ve),d.length=Ve);if(Ys()&&Fe!==null&&!it&&d!==null&&(t.f&(we|_t|ge))===0)for(_=0;_<Fe.length;_++)So(Fe[_],t);if(i!==null&&i!==t){if(jt++,i.deps!==null)for(let m=0;m<n;m+=1)i.deps[m].rv=jt;if(e!==null)for(const m of e)m.rv=jt;Fe!==null&&(r===null?r=Fe:r.push(...Fe))}return(t.f&It)!==0&&(t.f^=It),h}catch(m){return Xs(m)}finally{t.f^=xr,Ce=e,Ve=n,Fe=r,K=i,mt=s,En(o),it=a,Xt=l}}function Ol(t,e){let n=e.reactions;if(n!==null){var r=Ca.call(n,t);if(r!==-1){var i=n.length-1;i===0?n=e.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(e.f&we)!==0&&(Ce===null||!br.call(Ce,e))){var s=e;(s.f&qe)!==0&&(s.f^=qe,s.f&=~Zt),s.v!==de&&Vi(s),ml(s),zn(s,0)}}function zn(t,e){var n=t.deps;if(n!==null)for(var r=e;r<n.length;r++)Ol(t,n[r])}function wn(t){var e=t.f;if((e&Ke)===0){le(t,pe);var n=Y,r=vr;Y=t,vr=!0;try{(e&(rt|zs))!==0?Cl(t):zi(t),vo(t);var i=To(t);t.teardown=typeof i=="function"?i:null,t.wv=Ro;var s;Us&&el&&(t.f&ge)!==0&&t.deps}finally{vr=r,Y=n}}}async function Dl(){await Promise.resolve(),vl()}function g(t){var e=t.f,n=(e&we)!==0;if(K!==null&&!it){var r=Y!==null&&(Y.f&Ke)!==0;if(!r&&(mt===null||!mt.has(t))){var i=K.deps;if((K.f&xr)!==0)t.rv<jt&&(t.rv=jt,Ce===null&&i!==null&&i[Ve]===t?Ve++:Ce===null?Ce=[t]:Ce.push(t));else{K.deps??(K.deps=[]),br.call(K.deps,t)||K.deps.push(t);var s=t.reactions;s===null?t.reactions=[K]:br.call(s,K)||s.push(K)}}}if(Mt&&Yt.has(t))return Yt.get(t);if(n){var o=t;if(Mt){var a=o.v;return((o.f&pe)===0&&o.reactions!==null||Lo(o))&&(a=Bi(o)),Yt.set(o,a),a}var l=(o.f&qe)===0&&!it&&K!==null&&(vr||(K.f&qe)!==0),u=(o.f&Rn)===0;rr(o)&&(l&&(o.f|=qe),to(o)),l&&!u&&(no(o),Po(o))}if(Ee!=null&&Ee.has(t))return Ee.get(t);if((t.f&It)!==0)throw t.v;return t.v}function Po(t){if(t.f|=qe,t.deps!==null)for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),(e.f&we)!==0&&(e.f&qe)===0&&(no(e),Po(e))}function Lo(t){if(t.v===de)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(Yt.has(e)||(e.f&we)!==0&&Lo(e))return!0;return!1}function ir(t){var e=it;try{return it=!0,t()}finally{it=e}}const Ft=Symbol("events"),ko=new Set,wi=new Set;function Nl(t,e,n,r={}){function i(s){if(r.capture||xi.call(e,s),!s.cancelBubble)return zr(()=>n==null?void 0:n.call(this,s))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Ot(()=>{e.addEventListener(t,i,r)}):e.addEventListener(t,i,r),i}function Co(t,e,n,r,i){var s={capture:r,passive:i},o=Nl(t,e,n,s);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&_o(()=>{e.removeEventListener(t,o,s)})}function Xe(t,e,n){(e[Ft]??(e[Ft]={}))[t]=n}function St(t){for(var e=0;e<t.length;e++)ko.add(t[e]);for(var n of wi)n(t)}let us=null;function xi(t){var b,m;var e=this,n=e.ownerDocument,r=t.type,i=((b=t.composedPath)==null?void 0:b.call(t))||[],s=i[0]||t.target;us=t;var o=0,a=us===t&&t[Ft];if(a){var l=i.indexOf(a);if(l!==-1&&(e===document||e===window)){t[Ft]=e;return}var u=i.indexOf(e);if(u===-1)return;l<=u&&(o=l)}if(s=i[o]||t.target,s!==e){Ia(t,"currentTarget",{configurable:!0,get(){return s||n}});var c=K,h=Y;Je(null),gt(null);try{for(var d,p=[];s!==null&&s!==e;){try{var _=(m=s[Ft])==null?void 0:m[r];_!=null&&(!s.disabled||t.target===s)&&_.call(s,t)}catch(v){d?p.push(v):d=v}if(t.cancelBubble)break;o++,s=o<i.length?i[o]:null}if(d){for(let v of p)queueMicrotask(()=>{throw v});throw d}}finally{t[Ft]=e,delete t.currentTarget,Je(c),gt(h)}}}var js;const ei=((js=globalThis==null?void 0:globalThis.window)==null?void 0:js.trustedTypes)&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Vl(t){return(ei==null?void 0:ei.createHTML(t))??t}function Ml(t){var e=mo("template");return e.innerHTML=Vl(t.replaceAll("<!>","<!---->")),e.content}function Wn(t,e){var n=Y;n.nodes===null&&(n.nodes={start:t,end:e,a:null,t:null})}function O(t,e){var n=(e&Sa)!==0,r=(e&Ta)!==0,i,s=!t.startsWith("<!>");return()=>{i===void 0&&(i=Ml(s?t:"<!>"+t),n||(i=Ct(i)));var o=r||co?document.importNode(i,!0):i.cloneNode(!0);if(n){var a=Ct(o),l=o.lastChild;Wn(a,l)}else Wn(o,o);return o}}function un(){var t=document.createDocumentFragment(),e=document.createComment(""),n=Dt();return t.append(e,n),Wn(e,n),t}function L(t,e){t!==null&&t.before(e)}const Bl=["touchstart","touchmove"];function Gl(t){return Bl.includes(t)}function N(t,e){var n=e==null?"":typeof e=="object"?`${e}`:e;n!==(t[Dn]??(t[Dn]=t.nodeValue))&&(t[Dn]=n,t.nodeValue=`${n}`)}function jl(t,e){return Fl(t,e)}const lr=new Map;function Fl(t,{target:e,anchor:n,props:r={},events:i,context:s,intro:o=!0,transformError:a}){wl();var l=void 0,u=Pl(()=>{var c=n??e.appendChild(Dt());sl(c,{pending:()=>{}},p=>{ot({});var _=be;s&&(_.c=s),i&&(r.$$events=i),l=t(p,r)||{},at()},a);var h=new Set,d=p=>{for(var _=0;_<p.length;_++){var b=p[_];if(!h.has(b)){h.add(b);var m=Gl(b);for(const E of[e,document]){var v=lr.get(E);v===void 0&&(v=new Map,lr.set(E,v));var x=v.get(b);x===void 0?(E.addEventListener(b,xi,{passive:m}),v.set(b,1)):v.set(b,x+1)}}}};return d(Fr(ko)),wi.add(d),()=>{var m;for(var p of h)for(const v of[e,document]){var _=lr.get(v),b=_.get(p);--b==0?(v.removeEventListener(p,xi),_.delete(p),_.size===0&&lr.delete(v)):_.set(p,b)}wi.delete(d),c!==n&&((m=c.parentNode)==null||m.removeChild(c))}});return Ul.set(l,u),l}let Ul=new WeakMap;var nt,ft,Be,Kt,er,tr,jr;class $l{constructor(e,n=!0){w(this,"anchor");z(this,nt,new Map);z(this,ft,new Map);z(this,Be,new Map);z(this,Kt,new Set);z(this,er,!0);z(this,tr,e=>{if(y(this,nt).has(e)){var n=y(this,nt).get(e),r=y(this,ft).get(n);if(r)Tr(r),y(this,Kt).delete(n);else{var i=y(this,Be).get(n);i&&(Tr(i.effect),y(this,ft).set(n,i.effect),y(this,Be).delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,o]of y(this,nt)){if(y(this,nt).delete(s),s===e)break;const a=y(this,Be).get(o);a&&(Ie(a.effect),y(this,Be).delete(o))}for(const[s,o]of y(this,ft)){if(s===n||y(this,Kt).has(s))continue;const a=()=>{if(Array.from(y(this,nt).values()).includes(s)){var u=document.createDocumentFragment();Wi(o,u),u.append(Dt()),y(this,Be).set(s,{effect:o,fragment:u})}else Ie(o);y(this,Kt).delete(s),y(this,ft).delete(s)};y(this,er)||!r?(y(this,Kt).add(s),Jt(o,a,!1)):a()}}});z(this,jr,e=>{y(this,nt).delete(e);const n=Array.from(y(this,nt).values());for(const[r,i]of y(this,Be))n.includes(r)||(Ie(i.effect),y(this,Be).delete(r))});this.anchor=e,j(this,er,n)}ensure(e,n){var r=V,i=ho();if(n&&!y(this,ft).has(e)&&!y(this,Be).has(e))if(i){var s=document.createDocumentFragment(),o=Dt();s.append(o),y(this,Be).set(e,{effect:ze(()=>n(o)),fragment:s})}else y(this,ft).set(e,ze(()=>n(this.anchor)));if(y(this,nt).set(r,e),i){for(const[a,l]of y(this,ft))a===e?r.unskip_effect(l):r.skip_effect(l);for(const[a,l]of y(this,Be))a===e?r.unskip_effect(l.effect):r.skip_effect(l.effect);r.oncommit(y(this,tr)),r.ondiscard(y(this,jr))}else y(this,tr).call(this,r)}}nt=new WeakMap,ft=new WeakMap,Be=new WeakMap,Kt=new WeakMap,er=new WeakMap,tr=new WeakMap,jr=new WeakMap;function nn(t){be===null&&Ws(),Ui(()=>{const e=ir(t);if(typeof e=="function")return e})}function Hl(t){be===null&&Ws(),nn(()=>()=>ir(t))}function q(t,e,n=!1){var r=new $l(t),i=n?yn:0;function s(o,a){r.ensure(o,a)}Hi(()=>{var o=!1;e((a,l=0)=>{o=!0,s(l,a)}),o||s(-1,null)},i)}function Ge(t,e){return e}function zl(t,e,n){for(var r=[],i=e.length,s,o=e.length,a=0;a<i;a++){let h=e[a];Jt(h,()=>{if(s){if(s.pending.delete(h),s.done.add(h),s.pending.size===0){var d=t.outrogroups;Ri(t,Fr(s.done)),d.delete(s),d.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var l=r.length===0&&n!==null;if(l){var u=n,c=u.parentNode;xl(c),c.append(u),t.items.clear()}Ri(t,e,!l)}else s={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(s)}function Ri(t,e,n=!0){var r;if(t.pending.size>0){r=new Set;for(const o of t.pending.values())for(const a of o)r.add(t.items.get(a).e)}for(var i=0;i<e.length;i++){var s=e[i];if(r!=null&&r.has(s)){s.f|=pt;const o=document.createDocumentFragment();Wi(s,o)}else Ie(e[i],n)}}var cs;function _e(t,e,n,r,i,s=null){var o=t,a=new Map,l=(e&Fs)!==0;if(l){var u=t;o=u.appendChild(Dt())}var c=null,h=pl(()=>{var E=n();return $s(E)?E:E==null?[]:Fr(E)}),d,p=new Map,_=!0;function b(E){(x.effect.f&Ke)===0&&(x.pending.delete(E),x.fallback=c,Wl(x,d,o,e,r),c!==null&&(d.length===0?(c.f&pt)===0?Tr(c):(c.f^=pt,Bn(c,null,o)):Jt(c,()=>{c=null})))}function m(E){x.pending.delete(E)}var v=Hi(()=>{d=g(h);for(var E=d.length,A=new Set,P=V,S=ho(),I=0;I<E;I+=1){var k=d[I],$=r(k,I),M=_?null:a.get($);M?(M.v&&bn(M.v,k),M.i&&bn(M.i,I),S&&P.unskip_effect(M.e)):(M=ql(a,_?o:cs??(cs=Dt()),k,$,I,i,e,n),_||(M.e.f|=pt),a.set($,M)),A.add($)}if(E===0&&s&&!c&&(_?c=ze(()=>s(o)):(c=ze(()=>s(cs??(cs=Dt()))),c.f|=pt)),E>A.size&&Ua(),!_)if(p.set(P,A),S){for(const[J,te]of a)A.has(J)||P.skip_effect(te.e);P.oncommit(b),P.ondiscard(m)}else b(P);g(h)}),x={effect:v,items:a,pending:p,outrogroups:null,fallback:c};_=!1}function In(t){for(;t!==null&&(t.f&st)===0;)t=t.next;return t}function Wl(t,e,n,r,i){var M,J,te,ie,Q,ne,se,xe,ue;var s=(r&Ra)!==0,o=e.length,a=t.items,l=In(t.effect.first),u,c=null,h,d=[],p=[],_,b,m,v;if(s)for(v=0;v<o;v+=1)_=e[v],b=i(_,v),m=a.get(b).e,(m.f&pt)===0&&((J=(M=m.nodes)==null?void 0:M.a)==null||J.measure(),(h??(h=new Set)).add(m));for(v=0;v<o;v+=1){if(_=e[v],b=i(_,v),m=a.get(b).e,t.outrogroups!==null)for(const re of t.outrogroups)re.pending.delete(m),re.done.delete(m);if((m.f&Pe)!==0&&(Tr(m),s&&((ie=(te=m.nodes)==null?void 0:te.a)==null||ie.unfix(),(h??(h=new Set)).delete(m))),(m.f&pt)!==0)if(m.f^=pt,m===l)Bn(m,null,n);else{var x=c?c.next:l;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Tt(t,c,m),Tt(t,m,x),Bn(m,x,n),c=m,d=[],p=[],l=In(c.next);continue}if(m!==l){if(u!==void 0&&u.has(m)){if(d.length<p.length){var E=p[0],A;c=E.prev;var P=d[0],S=d[d.length-1];for(A=0;A<d.length;A+=1)Bn(d[A],E,n);for(A=0;A<p.length;A+=1)u.delete(p[A]);Tt(t,P.prev,S.next),Tt(t,c,P),Tt(t,S,E),l=E,c=S,v-=1,d=[],p=[]}else u.delete(m),Bn(m,l,n),Tt(t,m.prev,m.next),Tt(t,m,c===null?t.effect.first:c.next),Tt(t,c,m),c=m;continue}for(d=[],p=[];l!==null&&l!==m;)(u??(u=new Set)).add(l),p.push(l),l=In(l.next);if(l===null)continue}(m.f&pt)===0&&d.push(m),c=m,l=In(m.next)}if(t.outrogroups!==null){for(const re of t.outrogroups)re.pending.size===0&&(Ri(t,Fr(re.done)),(Q=t.outrogroups)==null||Q.delete(re));t.outrogroups.size===0&&(t.outrogroups=null)}if(l!==null||u!==void 0){var I=[];if(u!==void 0)for(m of u)(m.f&Pe)===0&&I.push(m);for(;l!==null;)(l.f&Pe)===0&&l!==t.fallback&&I.push(l),l=In(l.next);var k=I.length;if(k>0){var $=(r&Fs)!==0&&o===0?n:null;if(s){for(v=0;v<k;v+=1)(se=(ne=I[v].nodes)==null?void 0:ne.a)==null||se.measure();for(v=0;v<k;v+=1)(ue=(xe=I[v].nodes)==null?void 0:xe.a)==null||ue.fix()}zl(t,I,$)}}s&&Ot(()=>{var re,G;if(h!==void 0)for(m of h)(G=(re=m.nodes)==null?void 0:re.a)==null||G.apply()})}function ql(t,e,n,r,i,s,o,a){var l=(o&wa)!==0?(o&Aa)===0?El(n,!1,!1):tn(n):null,u=(o&xa)!==0?tn(i):null;return{v:l,i:u,e:ze(()=>(s(e,l??n,u??i,a),()=>{t.delete(r)}))}}function Bn(t,e,n){if(t.nodes)for(var r=t.nodes.start,i=t.nodes.end,s=e&&(e.f&pt)===0?e.nodes.start:n;r!==null;){var o=nr(r);if(s.before(r),r===i)return;r=o}}function Tt(t,e,n){e===null?t.effect.first=n:e.next=n,n===null?t.effect.last=e:n.prev=e}function Kl(t,e,n=!1,r=!1,i=!1,s=!1){var o=t,a="";if(n)var l=t;U(()=>{var u=Y;if(a!==(a=e()??"")){if(n){u.nodes=null,l.innerHTML=a,a!==""&&Wn(Ct(l),l.lastChild);return}if(u.nodes!==null&&(yo(u.nodes.start,u.nodes.end),u.nodes=null),a!==""){var c=r?La:i?ka:void 0,h=mo(r?"svg":i?"math":"template",c);h.innerHTML=a;var d=r||i?h:h.content;if(Wn(Ct(d),d.lastChild),r||i)for(;Ct(d);)o.before(Ct(d));else o.before(d)}}})}const ds=[...`
\r\f \v\uFEFF`];function Yl(t,e,n){var r=t==null?"":""+t;if(e&&(r=r?r+" "+e:e),n){for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var s=i.length,o=0;(o=r.indexOf(i,o))>=0;){var a=o+s;(o===0||ds.includes(r[o-1]))&&(a===r.length||ds.includes(r[a]))?r=(o===0?"":r.substring(0,o))+r.substring(a+1):o=a}}return r===""?null:r}function Jl(t,e){return t==null?null:String(t)}function Ye(t,e,n,r,i,s){var o=t[hi];if(o!==n||o===void 0){var a=Yl(n,r,s);a==null?t.removeAttribute("class"):t.className=a,t[hi]=n}else if(s&&i!==s)for(var l in s){var u=!!s[l];(i==null||u!==!!i[l])&&t.classList.toggle(l,u)}return s}function Xl(t,e,n,r){var i=t[mi];if(i!==e){var s=Jl(e);s==null?t.removeAttribute("style"):t.style.cssText=s,t[mi]=e}return r}function Wr(t,e,n=e){var r=new WeakSet;Al(t,"input",async i=>{var s=i?t.defaultValue:t.value;if(s=ti(t)?ni(s):s,n(s),V!==null&&r.add(V),await Dl(),s!==(s=e())){var o=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=s??"",a!==null){var u=t.value.length;o===a&&a===l&&u>l?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=o,t.selectionEnd=Math.min(a,u))}}}),ir(e)==null&&t.value&&(n(ti(t)?ni(t.value):t.value),V!==null&&r.add(V)),$i(()=>{var i=e();if(t===document.activeElement){var s=V;if(r.has(s))return}ti(t)&&i===ni(t.value)||t.type==="date"&&!i&&!t.value||i!==t.value&&(t.value=i??"")})}function ti(t){var e=t.type;return e==="number"||e==="range"}function ni(t){return t===""?null:+t}function ri(t,e){return t===e||(t==null?void 0:t[pr])===e}function Io(t={},e,n,r){var i=be.r,s=Y;return Ll(()=>{var o,a;return $i(()=>{o=a,a=[],ir(()=>{ri(n(...a),t)||(e(t,...a),o&&ri(n(...o),t)&&e(null,...o))})}),()=>{let l=s;for(;l!==i&&l.parent!==null&&l.parent.fπ)l=l.parent;const u=()=>{a&&ri(n(...a),t)&&e(null,...a)},c=l.teardown;l.teardown=()=>{u(),c==null||c()}}}),t}async function Ze(t){const e=await fetch(t);if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);return e.json()}const Bt={pack:()=>Ze("/api/pack"),glossary:()=>Ze("/api/assets/glossary"),rules:()=>Ze("/api/assets/rules"),chunks:()=>Ze("/api/assets/chunks"),eval:()=>Ze("/api/assets/eval"),ontology:()=>Ze("/api/assets/ontology"),constraints:()=>Ze("/api/assets/constraints"),crossRefs:()=>Ze("/api/assets/cross-refs"),systemPrompt:()=>Ze("/api/assets/system-prompt"),graph:()=>Ze("/api/graph"),search:(t,e=20)=>Ze(`/api/search?q=${encodeURIComponent(t)}&limit=${e}`)};var Ql=O('<p class="text-xs text-accent-blue font-semibold uppercase tracking-widest mb-1">DKP</p> <p class="text-sm font-semibold text-white leading-tight truncate"> </p> <p class="text-xs text-gray-500 mt-0.5"> </p>',1),Zl=O('<div class="h-10 bg-surface-2 rounded animate-pulse"></div>'),eu=O('<button><span class="text-xs text-gray-600 w-3"> </span> </button>'),tu=O('<aside class="w-52 flex-shrink-0 bg-surface-1 border-r border-surface-3 flex flex-col overflow-hidden"><div class="p-4 border-b border-surface-3"><!></div> <nav class="flex-1 overflow-y-auto py-2"></nav> <div class="p-3 border-t border-surface-3"><p class="text-xs text-gray-600">Press 1–7 to switch panels</p></div></aside>');function nu(t,e){ot(e,!0);const n=[{id:"assets",label:"Overview",key:"1",show:()=>!0},{id:"glossary",label:"Glossary",key:"2",show:u=>u.counts.glossary>0},{id:"rules",label:"Rules",key:"3",show:u=>u.counts.rules>0},{id:"chunks",label:"Chunks",key:"4",show:u=>u.counts.chunks>0},{id:"eval",label:"Eval",key:"5",show:u=>u.counts.eval_cases>0},{id:"mcp",label:"MCP",key:"6",show:u=>u.counts.has_mcp_manifest},{id:"graph",label:"Graph",key:"7",show:u=>u.counts.has_graph}];var r=tu(),i=R(r),s=R(i);{var o=u=>{var c=Ql(),h=C(Nt(c),2),d=R(h),p=C(h,2),_=R(p);U(()=>{N(d,e.pack.name),N(_,`${e.pack.version??""} · ${e.pack.domain??""}`)}),L(u,c)},a=u=>{var c=Zl();L(u,c)};q(s,u=>{e.pack?u(o):u(a,-1)})}var l=C(i,2);_e(l,21,()=>n,u=>u.id,(u,c)=>{var h=un(),d=Nt(h);{var p=b=>{var m=eu(),v=R(m),x=R(v),E=C(v);U(()=>{Ye(m,1,`w-full flex items-center gap-3 px-4 py-2 text-sm text-left transition-colors
${e.activePanel===g(c).id?"bg-surface-2 text-white border-r-2 border-accent-blue":"text-gray-400 hover:text-white hover:bg-surface-2/50"}`),N(x,g(c).key),N(E,` ${g(c).label??""}`)}),Xe("click",m,()=>e.onselect(g(c).id)),L(b,m)},_=Hr(()=>!e.pack||g(c).show(e.pack));q(d,b=>{g(_)&&b(p)})}L(u,h)}),L(t,r),at()}St(["click"]);var ru=O('<span class="text-xs text-gray-500 hidden md:block"> </span> <span class="text-gray-700">·</span>',1),iu=O('<span class="text-xs text-gray-500 animate-pulse">…</span>'),su=O('<button class="text-gray-500 hover:text-white">✕</button>'),ou=O('<button class="w-full text-left px-4 py-3 hover:bg-surface-2 cursor-pointer border-b border-surface-3 last:border-0"><div class="flex items-center gap-2 mb-0.5"><span class="text-xs px-1.5 py-0.5 rounded bg-surface-3 text-accent-cyan"> </span> <span class="text-sm font-medium text-white"> </span> <span class="ml-auto text-xs text-gray-600"> </span></div> <p class="text-xs text-gray-500 line-clamp-2"> </p></button>'),au=O(`<div class="absolute top-full mt-1 left-0 right-0 bg-surface-1 border border-surface-3 rounded-lg
shadow-xl z-50 max-h-80 overflow-y-auto"></div>`),lu=O(`<header class="bg-surface-1 border-b border-surface-3 px-6 py-3 flex items-center gap-4"><!> <div class="relative flex-1 max-w-xl"><div class="flex items-center gap-2 bg-surface-2 border border-surface-3 rounded-lg px-3 py-1.5
focus-within:border-accent-blue transition-colors"><svg class="w-4 h-4 text-gray-500 flex-shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg> <input type="text" placeholder="Search pack… (⌘K)" class="flex-1 bg-transparent text-sm text-white placeholder-gray-500 outline-none"/> <!> <!></div> <!></div></header>`);function uu(t,e){ot(e,!0);const n={chunk:"chunks",chunks:"chunks",glossary:"glossary",rule:"rules",rules:"rules",eval:"eval",graph:"graph",mcp:"mcp"};let r=W(""),i=W(ht([])),s=W(!1),o=W(!1),a,l;Ui(()=>{const S=g(r).trim();if(clearTimeout(l),!S){D(i,[],!0),D(o,!1);return}l=setTimeout(async()=>{D(s,!0);try{D(i,await Bt.search(S),!0),D(o,g(i).length>0)}catch{D(i,[],!0)}D(s,!1)},200)});function u(S){(S.metaKey||S.ctrlKey)&&S.key==="k"&&(S.preventDefault(),a==null||a.focus()),S.key==="Escape"&&(D(r,""),D(o,!1),a==null||a.blur())}var c=lu();Co("keydown",Sr,u);var h=R(c);{var d=S=>{var I=ru(),k=Nt(I),$=R(k);U(()=>N($,`${e.pack.name??""} ${e.pack.version??""}`)),L(S,I)};q(h,S=>{e.pack&&S(d)})}var p=C(h,2),_=R(p),b=C(R(_),2);Io(b,S=>a=S,()=>a);var m=C(b,2);{var v=S=>{var I=iu();L(S,I)};q(m,S=>{g(s)&&S(v)})}var x=C(m,2);{var E=S=>{var I=su();Xe("click",I,()=>{D(r,""),D(o,!1)}),L(S,I)};q(x,S=>{!g(s)&&g(r)&&S(E)})}var A=C(_,2);{var P=S=>{var I=au();_e(I,21,()=>g(i),k=>k.id,(k,$)=>{var M=ou(),J=R(M),te=R(J),ie=R(te),Q=C(te,2),ne=R(Q),se=C(Q,2),xe=R(se),ue=C(J,2),re=R(ue);U(G=>{N(ie,g($).asset_type),N(ne,g($).title),N(xe,G),N(re,g($).excerpt)},[()=>g($).score.toFixed(2)]),Xe("click",M,()=>{var F;const G=n[g($).asset_type.toLowerCase()];G&&((F=e.onselect)==null||F.call(e,G)),D(r,""),D(o,!1)}),L(k,M)}),L(S,I)};q(A,S=>{g(o)&&S(P)})}Wr(b,()=>g(r),S=>D(r,S)),L(t,c),at()}St(["click"]);var cu=O('<p class="text-sm text-gray-400 mb-8 max-w-2xl"> </p>'),du=O('<button><p class="text-xs text-gray-500 mb-1"> </p> <p> </p></button>'),fu=O('<div><h1 class="text-xl font-semibold text-white mb-1"> </h1> <p class="text-sm text-gray-500 mb-6"> </p> <!> <h2 class="text-xs font-semibold uppercase tracking-widest text-gray-500 mb-4">Assets</h2> <div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3"></div></div>'),pu=O('<div class="bg-surface-1 border border-surface-3 rounded-lg p-4 h-20 animate-pulse"></div>'),hu=O('<div class="grid grid-cols-4 gap-3"></div>');function mu(t,e){ot(e,!0);const n=[{label:"Glossary terms",panel:"glossary",getValue:a=>a.counts.glossary,accent:"text-accent-blue"},{label:"Rules",panel:"rules",getValue:a=>a.counts.rules,accent:"text-accent-green"},{label:"Retrieval chunks",panel:"chunks",getValue:a=>a.counts.chunks,accent:"text-accent-purple"},{label:"Eval cases",panel:"eval",getValue:a=>a.counts.eval_cases,accent:"text-accent-yellow"},{label:"Knowledge graph",panel:"graph",getValue:a=>a.counts.has_graph?"✓":"—",accent:"text-accent-cyan"},{label:"MCP manifest",panel:"mcp",getValue:a=>a.counts.has_mcp_manifest?"✓":"—",accent:"text-accent-cyan"},{label:"Ontology",getValue:a=>a.counts.has_ontology?"✓":"—",accent:"text-gray-400"},{label:"Constraints",getValue:a=>a.counts.has_constraints?"✓":"—",accent:"text-gray-400"},{label:"System prompt",getValue:a=>a.counts.has_system_prompt?"✓":"—",accent:"text-gray-400"},{label:"Cross-refs",getValue:a=>a.counts.has_cross_refs?"✓":"—",accent:"text-gray-400"}];var r=un(),i=Nt(r);{var s=a=>{var l=fu(),u=R(l),c=R(u),h=C(u,2),d=R(h),p=C(h,2);{var _=m=>{var v=cu(),x=R(v);U(()=>N(x,e.pack.description)),L(m,v)};q(p,m=>{e.pack.description&&m(_)})}var b=C(p,4);_e(b,21,()=>n,Ge,(m,v)=>{var x=du(),E=R(x),A=R(E),P=C(E,2),S=R(P);U(I=>{Ye(x,1,`bg-surface-1 border border-surface-3 rounded-lg p-4 text-left transition-all
${g(v).panel?"hover:border-accent-blue/50 hover:bg-surface-2 cursor-pointer":"cursor-default"}`),N(A,g(v).label),Ye(P,1,`text-2xl font-semibold ${g(v).accent??""}`),N(S,I)},[()=>e.pack?g(v).getValue(e.pack):"—"]),Xe("click",x,()=>g(v).panel&&e.onnavigate(g(v).panel)),L(m,x)}),U(()=>{N(c,e.pack.name),N(d,`${e.pack.domain??""} · v${e.pack.version??""} · updated ${e.pack.update_date??""}`)}),L(a,l)},o=a=>{var l=hu();_e(l,20,()=>Array(8),Ge,(u,c)=>{var h=pu();L(u,h)}),L(a,l)};q(i,a=>{e.pack?a(s):a(o,-1)})}L(t,r),at()}St(["click"]);var _u=O('<div class="h-16 bg-surface-1 rounded-lg animate-pulse"></div>'),fs=O('<div class="space-y-2"></div>'),gu=O('<span class="text-xs px-1.5 py-0.5 rounded bg-surface-3 text-gray-400"> </span>'),vu=O('<span class="text-xs px-1.5 py-0.5 rounded bg-accent-blue/10 text-accent-blue"> </span>'),yu=O('<p class="text-xs text-gray-500">Aliases: <span class="text-gray-300"> </span></p>'),Eu=O('<p class="text-xs text-gray-500">Related: <span class="text-gray-300"> </span></p>'),bu=O('<p class="text-xs text-gray-500">Audience: <span class="text-gray-300"> </span></p>'),wu=O('<div class="px-4 pb-4 border-t border-surface-3 pt-3 space-y-2"><!> <!> <!> <p class="text-xs text-gray-600 font-mono"> </p></div>'),xu=O('<div><button class="w-full flex items-start gap-4 p-4 text-left hover:bg-surface-2 transition-colors"><div class="flex-1 min-w-0"><div class="flex items-center gap-2 mb-1 flex-wrap"><span class="font-medium text-white"> </span> <!> <!></div> <p class="text-sm text-gray-400 line-clamp-2"> </p></div> <span class="text-gray-600 text-xs flex-shrink-0 mt-1"> </span></button> <!></div>'),Ru=O('<div><div class="flex items-center justify-between mb-6"><h2 class="text-lg font-semibold text-white">Glossary <span class="text-gray-500 text-sm ml-1"> </span></h2> <input placeholder="Filter terms…" class="bg-surface-2 border border-surface-3 rounded-lg px-3 py-1.5 text-sm text-white placeholder-gray-500 outline-none focus:border-accent-blue w-48 transition-colors"/></div> <!></div>');function Au(t,e){ot(e,!0);let n=W(ht([])),r=W(""),i=W(null),s=W(!0);nn(async()=>{try{D(n,await Bt.glossary(),!0)}catch{}D(s,!1)});let o=Hr(()=>g(r).trim()?g(n).filter(m=>{var v;return m.term.toLowerCase().includes(g(r).toLowerCase())||m.definition.toLowerCase().includes(g(r).toLowerCase())||((v=m.tags)==null?void 0:v.some(x=>x.toLowerCase().includes(g(r).toLowerCase())))}):g(n));var a=Ru(),l=R(a),u=R(l),c=C(R(u)),h=R(c),d=C(u,2),p=C(l,2);{var _=m=>{var v=fs();_e(v,20,()=>Array(6),Ge,(x,E)=>{var A=_u();L(x,A)}),L(m,v)},b=m=>{var v=fs();_e(v,21,()=>g(o),x=>x.id,(x,E)=>{var A=xu();let P;var S=R(A),I=R(S),k=R(I),$=R(k),M=R($),J=C($,2);{var te=G=>{var F=gu(),H=R(F);U(()=>N(H,g(E).stability)),L(G,F)};q(J,G=>{g(E).stability&&G(te)})}var ie=C(J,2);_e(ie,17,()=>(g(E).tags??[]).slice(0,3),Ge,(G,F)=>{var H=vu(),oe=R(H);U(()=>N(oe,g(F))),L(G,H)});var Q=C(k,2),ne=R(Q),se=C(I,2),xe=R(se),ue=C(S,2);{var re=G=>{var F=wu(),H=R(F);{var oe=Qe=>{var ye=yu(),Ln=C(R(ye)),kn=R(Ln);U(Cn=>N(kn,Cn),[()=>g(E).aliases.join(", ")]),L(Qe,ye)};q(H,Qe=>{var ye;(ye=g(E).aliases)!=null&&ye.length&&Qe(oe)})}var ve=C(H,2);{var De=Qe=>{var ye=Eu(),Ln=C(R(ye)),kn=R(Ln);U(Cn=>N(kn,Cn),[()=>g(E).related.join(", ")]),L(Qe,ye)};q(ve,Qe=>{var ye;(ye=g(E).related)!=null&&ye.length&&Qe(De)})}var Re=C(ve,2);{var lt=Qe=>{var ye=bu(),Ln=C(R(ye)),kn=R(Ln);U(Cn=>N(kn,Cn),[()=>g(E).audience.join(", ")]),L(Qe,ye)};q(Re,Qe=>{var ye;(ye=g(E).audience)!=null&&ye.length&&Qe(lt)})}var Pn=C(Re,2),Jr=R(Pn);U(()=>N(Jr,g(E).id)),L(G,F)};q(ue,G=>{g(i)===g(E).id&&G(re)})}U(()=>{P=Ye(A,1,"bg-surface-1 border border-surface-3 rounded-lg overflow-hidden transition-all",null,P,{"border-accent-blue":g(i)===g(E).id}),N(M,g(E).term),N(ne,g(E).definition),N(xe,g(i)===g(E).id?"▲":"▼")}),Xe("click",S,()=>D(i,g(i)===g(E).id?null:g(E).id,!0)),L(x,A)}),L(m,v)};q(p,m=>{g(s)?m(_):m(b,-1)})}U(()=>N(h,`(${g(n).length??""})`)),Wr(d,()=>g(r),m=>D(r,m)),L(t,a),at()}St(["click"]);var Su=O('<div class="h-16 bg-surface-1 rounded-lg animate-pulse"></div>'),ps=O('<div class="space-y-2"></div>'),Tu=O('<span class="text-xs text-gray-600 flex-shrink-0 mt-1"> </span>'),Pu=O('<span class="inline-block text-xs px-1.5 py-0.5 rounded bg-surface-3 text-gray-400 mr-1"> </span>'),Lu=O('<p class="text-xs text-gray-500 mt-2">Audience: <span class="text-gray-300"> </span></p>'),ku=O('<div class="px-4 pb-4 border-t border-surface-3 pt-3 space-y-2"><!> <!> <p class="text-xs text-gray-600 font-mono mt-1"> </p></div>'),Cu=O('<div><button class="w-full flex items-start gap-4 p-4 text-left hover:bg-surface-2 transition-colors"><span> </span> <div class="flex-1 min-w-0"><p class="font-medium text-white mb-0.5"> </p> <p class="text-sm text-gray-400 line-clamp-2"> </p></div> <!></button> <!></div>'),Iu=O('<div><div class="flex items-center justify-between mb-6"><h2 class="text-lg font-semibold text-white">Rules <span class="text-gray-500 text-sm ml-1"> </span></h2> <input placeholder="Filter rules…" class="bg-surface-2 border border-surface-3 rounded-lg px-3 py-1.5 text-sm text-white placeholder-gray-500 outline-none focus:border-accent-blue w-48 transition-colors"/></div> <!></div>');function Ou(t,e){ot(e,!0);let n=W(ht([])),r=W(""),i=W(!0),s=W(null);nn(async()=>{try{D(n,await Bt.rules(),!0)}catch{}D(i,!1)});let o=Hr(()=>g(r).trim()?g(n).filter(m=>m.title.toLowerCase().includes(g(r).toLowerCase())||m.description.toLowerCase().includes(g(r).toLowerCase())):g(n));var a=Iu(),l=R(a),u=R(l),c=C(R(u)),h=R(c),d=C(u,2),p=C(l,2);{var _=m=>{var v=ps();_e(v,20,()=>Array(5),Ge,(x,E)=>{var A=Su();L(x,A)}),L(m,v)},b=m=>{var v=ps();_e(v,21,()=>g(o),x=>x.id,(x,E)=>{var A=Cu();let P;var S=R(A),I=R(S),k=R(I),$=C(I,2),M=R($),J=R(M),te=C(M,2),ie=R(te),Q=C($,2);{var ne=ue=>{var re=Tu(),G=R(re);U(F=>N(G,`${F??""}%`),[()=>(g(E).confidence*100).toFixed(0)]),L(ue,re)};q(Q,ue=>{g(E).confidence!=null&&ue(ne)})}var se=C(S,2);{var xe=ue=>{var re=ku(),G=R(re);_e(G,17,()=>g(E).tags??[],Ge,(De,Re)=>{var lt=Pu(),Pn=R(lt);U(()=>N(Pn,g(Re))),L(De,lt)});var F=C(G,2);{var H=De=>{var Re=Lu(),lt=C(R(Re)),Pn=R(lt);U(Jr=>N(Pn,Jr),[()=>g(E).audience.join(", ")]),L(De,Re)};q(F,De=>{var Re;(Re=g(E).audience)!=null&&Re.length&&De(H)})}var oe=C(F,2),ve=R(oe);U(()=>N(ve,g(E).id)),L(ue,re)};q(se,ue=>{g(s)===g(E).id&&ue(xe)})}U(()=>{P=Ye(A,1,"bg-surface-1 border border-surface-3 rounded-lg overflow-hidden",null,P,{"border-accent-green":g(s)===g(E).id&&g(E).polarity==="Affirmative","border-accent-red":g(s)===g(E).id&&g(E).polarity==="Prohibitive"}),Ye(I,1,`flex-shrink-0 text-xs px-2 py-0.5 rounded-full font-semibold mt-0.5
${g(E).polarity==="Affirmative"?"bg-accent-green/10 text-accent-green":"bg-accent-red/10 text-accent-red"}`),N(k,g(E).polarity==="Affirmative"?"DO":"DON'T"),N(J,g(E).title),N(ie,g(E).description)}),Xe("click",S,()=>D(s,g(s)===g(E).id?null:g(E).id,!0)),L(x,A)}),L(m,v)};q(p,m=>{g(i)?m(_):m(b,-1)})}U(()=>N(h,`(${g(n).length??""})`)),Wr(d,()=>g(r),m=>D(r,m)),L(t,a),at()}St(["click"]);var Du=O('<div class="h-32 bg-surface-1 rounded-lg animate-pulse"></div>'),hs=O('<div class="grid grid-cols-1 md:grid-cols-2 gap-3"></div>'),Nu=O("<span> </span>"),Vu=O('<span class="text-xs px-1.5 py-0.5 rounded bg-surface-3 text-gray-400"> </span>'),Mu=O('<p class="text-xs text-gray-500 mb-2"> </p>'),Bu=O('<span class="text-xs px-1.5 py-0.5 rounded bg-accent-purple/10 text-accent-purple"> </span>'),Gu=O('<div class="flex flex-wrap gap-1 mt-3"></div>'),ju=O('<div role="button" tabindex="0"><div class="p-4"><div class="flex items-start gap-2 mb-2 flex-wrap"><span class="font-medium text-white text-sm flex-1"> </span> <!> <!></div> <!> <p> </p> <!></div></div>'),Fu=O('<div><div class="flex items-center justify-between mb-6"><h2 class="text-lg font-semibold text-white">Chunks <span class="text-gray-500 text-sm ml-1"> </span></h2> <input placeholder="Filter chunks…" class="bg-surface-2 border border-surface-3 rounded-lg px-3 py-1.5 text-sm text-white placeholder-gray-500 outline-none focus:border-accent-blue w-48 transition-colors"/></div> <!></div>');function Uu(t,e){ot(e,!0);let n=W(ht([])),r=W(""),i=W(null),s=W(!0);nn(async()=>{try{D(n,await Bt.chunks(),!0)}catch{}D(s,!1)});let o=Hr(()=>g(r).trim()?g(n).filter(v=>{var x;return v.title.toLowerCase().includes(g(r).toLowerCase())||v.chunk_text.toLowerCase().includes(g(r).toLowerCase())||((x=v.tags)==null?void 0:x.some(E=>E.toLowerCase().includes(g(r).toLowerCase())))}):g(n));function a(v){return v==null?"bg-gray-600/20 text-gray-400":v>=.8?"bg-accent-green/10 text-accent-green":v>=.5?"bg-accent-yellow/10 text-accent-yellow":"bg-accent-red/10 text-accent-red"}var l=Fu(),u=R(l),c=R(u),h=C(R(c)),d=R(h),p=C(c,2),_=C(u,2);{var b=v=>{var x=hs();_e(x,20,()=>Array(6),Ge,(E,A)=>{var P=Du();L(E,P)}),L(v,x)},m=v=>{var x=hs();_e(x,21,()=>g(o),E=>E.id,(E,A)=>{var P=ju(),S=R(P),I=R(S),k=R(I),$=R(k),M=C(k,2);{var J=G=>{var F=Nu(),H=R(F);U((oe,ve)=>{Ye(F,1,`text-xs px-1.5 py-0.5 rounded ${oe??""} flex-shrink-0`),N(H,`${ve??""}%`)},[()=>a(g(A).confidence),()=>(g(A).confidence*100).toFixed(0)]),L(G,F)};q(M,G=>{g(A).confidence!=null&&G(J)})}var te=C(M,2);{var ie=G=>{var F=Vu(),H=R(F);U(()=>N(H,g(A).retrieval_priority)),L(G,F)};q(te,G=>{g(A).retrieval_priority&&G(ie)})}var Q=C(I,2);{var ne=G=>{var F=Mu(),H=R(F);U(()=>N(H,g(A).summary)),L(G,F)};q(Q,G=>{g(A).summary&&G(ne)})}var se=C(Q,2),xe=R(se),ue=C(se,2);{var re=G=>{var F=Gu();_e(F,21,()=>(g(A).tags??[]).slice(0,5),Ge,(H,oe)=>{var ve=Bu(),De=R(ve);U(()=>N(De,g(oe))),L(H,ve)}),L(G,F)};q(ue,G=>{(g(A).tags??[]).length>0&&G(re)})}U(()=>{Ye(P,1,`bg-surface-1 border border-surface-3 rounded-lg overflow-hidden cursor-pointer
hover:border-surface-3 transition-all ${g(i)===g(A).id?"md:col-span-2 border-accent-purple/50":""}`),N($,g(A).title),Ye(se,1,`text-xs text-gray-400 ${g(i)===g(A).id?"":"line-clamp-3"} font-mono leading-relaxed`),N(xe,g(A).chunk_text)}),Xe("click",P,()=>D(i,g(i)===g(A).id?null:g(A).id,!0)),Xe("keydown",P,G=>G.key==="Enter"&&D(i,g(i)===g(A).id?null:g(A).id,!0)),L(E,P)}),L(v,x)};q(_,v=>{g(s)?v(b):v(m,-1)})}U(()=>N(d,`(${g(n).length??""})`)),Wr(p,()=>g(r),v=>D(r,v)),L(t,l),at()}St(["click","keydown"]);var $u=O('<div class="h-20 bg-surface-1 rounded-lg animate-pulse"></div>'),ms=O('<div class="space-y-2"></div>'),Hu=O('<span class="text-xs px-1.5 py-0.5 rounded bg-accent-yellow/10 text-accent-yellow"> </span>'),zu=O('<li class="text-sm text-gray-300 flex gap-2"><span class="text-accent-green">✓</span> </li>'),Wu=O('<div><p class="text-xs font-semibold text-gray-500 uppercase mb-1">Expected dimensions</p> <ul class="space-y-1"></ul></div>'),qu=O('<li class="text-sm text-gray-300 flex gap-2"><span class="text-accent-red">!</span> </li>'),Ku=O('<div><p class="text-xs font-semibold text-gray-500 uppercase mb-1">Must include</p> <ul class="space-y-1"></ul></div>'),Yu=O('<div><p class="text-xs font-semibold text-gray-500 uppercase mb-1">Scoring rubric</p> <p class="text-sm text-gray-400"> </p></div>'),Ju=O('<div class="px-4 pb-4 border-t border-surface-3 pt-3 space-y-4"><!> <!> <!></div>'),Xu=O('<div><button class="w-full flex items-start gap-4 p-4 text-left hover:bg-surface-2 transition-colors"><span class="text-xs text-gray-600 flex-shrink-0 mt-1 w-6"></span> <div class="flex-1 min-w-0"><p class="font-medium text-white text-sm mb-1"> </p> <div class="flex flex-wrap gap-1"></div></div> <span class="text-gray-600 text-xs flex-shrink-0"> </span></button> <!></div>'),Qu=O('<div><h2 class="text-lg font-semibold text-white mb-6">Eval Cases <span class="text-gray-500 text-sm ml-1"> </span></h2> <!></div>');function Zu(t,e){ot(e,!0);let n=W(ht([])),r=W(!0),i=W(null);nn(async()=>{try{D(n,await Bt.eval(),!0)}catch{}D(r,!1)});var s=Qu(),o=R(s),a=C(R(o)),l=R(a),u=C(o,2);{var c=d=>{var p=ms();_e(p,20,()=>Array(4),Ge,(_,b)=>{var m=$u();L(_,m)}),L(d,p)},h=d=>{var p=ms();_e(p,21,()=>g(n),Ge,(_,b,m)=>{var v=Xu();let x;var E=R(v),A=R(E);A.textContent=`#${m+1}`;var P=C(A,2),S=R(P),I=R(S),k=C(S,2);_e(k,21,()=>(g(b).tags??[]).slice(0,4),Ge,(ie,Q)=>{var ne=Hu(),se=R(ne);U(()=>N(se,g(Q))),L(ie,ne)});var $=C(P,2),M=R($),J=C(E,2);{var te=ie=>{var Q=Ju(),ne=R(Q);{var se=F=>{var H=Wu(),oe=C(R(H),2);_e(oe,21,()=>g(b).expected_dimensions,Ge,(ve,De)=>{var Re=zu(),lt=C(R(Re),1,!0);U(()=>N(lt,g(De))),L(ve,Re)}),L(F,H)};q(ne,F=>{var H;(H=g(b).expected_dimensions)!=null&&H.length&&F(se)})}var xe=C(ne,2);{var ue=F=>{var H=Ku(),oe=C(R(H),2);_e(oe,21,()=>g(b).critical_must_include,Ge,(ve,De)=>{var Re=qu(),lt=C(R(Re),1,!0);U(()=>N(lt,g(De))),L(ve,Re)}),L(F,H)};q(xe,F=>{var H;(H=g(b).critical_must_include)!=null&&H.length&&F(ue)})}var re=C(xe,2);{var G=F=>{var H=Yu(),oe=C(R(H),2),ve=R(oe);U(()=>N(ve,g(b).scoring_rubric)),L(F,H)};q(re,F=>{g(b).scoring_rubric&&F(G)})}L(ie,Q)};q(J,ie=>{g(i)===m&&ie(te)})}U(()=>{x=Ye(v,1,"bg-surface-1 border border-surface-3 rounded-lg overflow-hidden",null,x,{"border-accent-yellow":g(i)===m}),N(I,g(b).query),N(M,g(i)===m?"▲":"▼")}),Xe("click",E,()=>D(i,g(i)===m?null:m,!0)),L(_,v)}),L(d,p)};q(u,d=>{g(r)?d(c):d(h,-1)})}U(()=>N(l,`(${g(n).length??""})`)),L(t,s),at()}St(["click"]);const ec="modulepreload",tc=function(t){return"/"+t},_s={},f=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(u){return Promise.all(u.map(c=>Promise.resolve(c).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=o(n.map(u=>{if(u=tc(u),u in _s)return;_s[u]=!0;const c=u.endsWith(".css"),h=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${h}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":ec,c||(d.as="script"),d.crossOrigin="",d.href=u,l&&d.setAttribute("nonce",l),document.head.appendChild(d),c)return new Promise((p,_)=>{d.addEventListener("load",p),d.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${u}`)))})}))}function s(o){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o}return i.then(o=>{for(const a of o||[])a.status==="rejected"&&s(a.reason);return e().catch(s)})},Oo=[{id:"abap",name:"ABAP",import:()=>f(()=>import("./abap-DsBKuouk.js"),[])},{id:"actionscript-3",name:"ActionScript",import:()=>f(()=>import("./actionscript-3-D_z4Izcz.js"),[])},{id:"ada",name:"Ada",import:()=>f(()=>import("./ada-727ZlQH0.js"),[])},{id:"angular-html",name:"Angular HTML",import:()=>f(()=>import("./angular-html-LfdN0zeE.js").then(t=>t.f),__vite__mapDeps([0,1,2,3]))},{id:"angular-ts",name:"Angular TypeScript",import:()=>f(()=>import("./angular-ts-CKsD7JZE.js"),__vite__mapDeps([4,0,1,2,3,5]))},{id:"apache",name:"Apache Conf",import:()=>f(()=>import("./apache-Dn00JSTd.js"),[])},{id:"apex",name:"Apex",import:()=>f(()=>import("./apex-COJ4H7py.js"),[])},{id:"apl",name:"APL",import:()=>f(()=>import("./apl-BBq3IX1j.js"),__vite__mapDeps([6,1,2,3,7,8,9]))},{id:"applescript",name:"AppleScript",import:()=>f(()=>import("./applescript-Bu5BbsvL.js"),[])},{id:"ara",name:"Ara",import:()=>f(()=>import("./ara-7O62HKoU.js"),[])},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>f(()=>import("./asciidoc-BPT9niGB.js"),[])},{id:"asm",name:"Assembly",import:()=>f(()=>import("./asm-Dhn9LcZ4.js"),[])},{id:"astro",name:"Astro",import:()=>f(()=>import("./astro-CqkE3fuf.js"),__vite__mapDeps([10,9,2,11,3,12]))},{id:"awk",name:"AWK",import:()=>f(()=>import("./awk-eg146-Ew.js"),[])},{id:"ballerina",name:"Ballerina",import:()=>f(()=>import("./ballerina-Du268qiB.js"),[])},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>f(()=>import("./bat-fje9CFhw.js"),[])},{id:"beancount",name:"Beancount",import:()=>f(()=>import("./beancount-BwXTMy5W.js"),[])},{id:"berry",name:"Berry",aliases:["be"],import:()=>f(()=>import("./berry-3xVqZejG.js"),[])},{id:"bibtex",name:"BibTeX",import:()=>f(()=>import("./bibtex-xW4inM5L.js"),[])},{id:"bicep",name:"Bicep",import:()=>f(()=>import("./bicep-DHo0CJ0O.js"),[])},{id:"blade",name:"Blade",import:()=>f(()=>import("./blade-a8OxSdnT.js"),__vite__mapDeps([13,1,2,3,7,8,14,9]))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>f(()=>import("./bsl-Dgyn0ogV.js"),__vite__mapDeps([15,16]))},{id:"c",name:"C",import:()=>f(()=>import("./c-C3t2pwGQ.js"),[])},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>f(()=>import("./cadence-DNquZEk8.js"),[])},{id:"cairo",name:"Cairo",import:()=>f(()=>import("./cairo--RitsXJZ.js"),__vite__mapDeps([17,18]))},{id:"clarity",name:"Clarity",import:()=>f(()=>import("./clarity-BHOwM8T6.js"),[])},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>f(()=>import("./clojure-DxSadP1t.js"),[])},{id:"cmake",name:"CMake",import:()=>f(()=>import("./cmake-DbXoA79R.js"),[])},{id:"cobol",name:"COBOL",import:()=>f(()=>import("./cobol-PTqiYgYu.js"),__vite__mapDeps([19,1,2,3,8]))},{id:"codeowners",name:"CODEOWNERS",import:()=>f(()=>import("./codeowners-Bp6g37R7.js"),[])},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>f(()=>import("./codeql-sacFqUAJ.js"),[])},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>f(()=>import("./coffee-dyiR41kL.js"),__vite__mapDeps([20,2]))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>f(()=>import("./common-lisp-C7gG9l05.js"),[])},{id:"coq",name:"Coq",import:()=>f(()=>import("./coq-Dsg_Bt_b.js"),[])},{id:"cpp",name:"C++",aliases:["c++"],import:()=>f(()=>import("./cpp-BksuvNSY.js"),__vite__mapDeps([21,22,23,24,14]))},{id:"crystal",name:"Crystal",import:()=>f(()=>import("./crystal-DtDmRg-F.js"),__vite__mapDeps([25,1,2,3,14,24,26]))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>f(()=>import("./csharp-D9R-vmeu.js"),[])},{id:"css",name:"CSS",import:()=>f(()=>import("./css-BPhBrDlE.js"),[])},{id:"csv",name:"CSV",import:()=>f(()=>import("./csv-B0qRVHPH.js"),[])},{id:"cue",name:"CUE",import:()=>f(()=>import("./cue-DtFQj3wx.js"),[])},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>f(()=>import("./cypher-m2LEI-9-.js"),[])},{id:"d",name:"D",import:()=>f(()=>import("./d-BoXegm-a.js"),[])},{id:"dart",name:"Dart",import:()=>f(()=>import("./dart-B9wLZaAG.js"),[])},{id:"dax",name:"DAX",import:()=>f(()=>import("./dax-ClGRhx96.js"),[])},{id:"desktop",name:"Desktop",import:()=>f(()=>import("./desktop-DEIpsLCJ.js"),[])},{id:"diff",name:"Diff",import:()=>f(()=>import("./diff-BgYniUM_.js"),[])},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>f(()=>import("./docker-COcR7UxN.js"),[])},{id:"dotenv",name:"dotEnv",import:()=>f(()=>import("./dotenv-BjQB5zDj.js"),[])},{id:"dream-maker",name:"Dream Maker",import:()=>f(()=>import("./dream-maker-C-nORZOA.js"),[])},{id:"edge",name:"Edge",import:()=>f(()=>import("./edge-D5gP-w-T.js"),__vite__mapDeps([27,11,1,2,3,28]))},{id:"elixir",name:"Elixir",import:()=>f(()=>import("./elixir-CLiX3zqd.js"),__vite__mapDeps([29,1,2,3]))},{id:"elm",name:"Elm",import:()=>f(()=>import("./elm-CmHSxxaM.js"),__vite__mapDeps([30,23,24]))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>f(()=>import("./emacs-lisp-BX77sIaO.js"),[])},{id:"erb",name:"ERB",import:()=>f(()=>import("./erb-BYTLMnw6.js"),__vite__mapDeps([31,1,2,3,32,33,7,8,14,34,11,35,36,21,22,23,24,26,37,38]))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>f(()=>import("./erlang-B-DoSBHF.js"),[])},{id:"fennel",name:"Fennel",import:()=>f(()=>import("./fennel-bCA53EVm.js"),[])},{id:"fish",name:"Fish",import:()=>f(()=>import("./fish-w-ucz2PV.js"),[])},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>f(()=>import("./fluent-Dayu4EKP.js"),[])},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>f(()=>import("./fortran-fixed-form-TqA4NnZg.js"),__vite__mapDeps([39,40]))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>f(()=>import("./fortran-free-form-DKXYxT9g.js"),[])},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>f(()=>import("./fsharp-XplgxFYe.js"),__vite__mapDeps([41,42]))},{id:"gdresource",name:"GDResource",import:()=>f(()=>import("./gdresource-BHYsBjWJ.js"),__vite__mapDeps([43,44,45]))},{id:"gdscript",name:"GDScript",import:()=>f(()=>import("./gdscript-DfxzS6Rs.js"),[])},{id:"gdshader",name:"GDShader",import:()=>f(()=>import("./gdshader-SKMF96pI.js"),[])},{id:"genie",name:"Genie",import:()=>f(()=>import("./genie-ajMbGru0.js"),[])},{id:"gherkin",name:"Gherkin",import:()=>f(()=>import("./gherkin--30QC5Em.js"),[])},{id:"git-commit",name:"Git Commit Message",import:()=>f(()=>import("./git-commit-i4q6IMui.js"),__vite__mapDeps([46,47]))},{id:"git-rebase",name:"Git Rebase Message",import:()=>f(()=>import("./git-rebase-B-v9cOL2.js"),__vite__mapDeps([48,26]))},{id:"gleam",name:"Gleam",import:()=>f(()=>import("./gleam-B430Bg39.js"),[])},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>f(()=>import("./glimmer-js-D-cwc0-E.js"),__vite__mapDeps([49,2,11,3,1]))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>f(()=>import("./glimmer-ts-pgjy16dm.js"),__vite__mapDeps([50,11,3,2,1]))},{id:"glsl",name:"GLSL",import:()=>f(()=>import("./glsl-DBO2IWDn.js"),__vite__mapDeps([23,24]))},{id:"gnuplot",name:"Gnuplot",import:()=>f(()=>import("./gnuplot-CM8KxXT1.js"),[])},{id:"go",name:"Go",import:()=>f(()=>import("./go-B1SYOhNW.js"),[])},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>f(()=>import("./graphql-cDcHW_If.js"),__vite__mapDeps([34,2,11,35,36]))},{id:"groovy",name:"Groovy",import:()=>f(()=>import("./groovy-DkBy-JyN.js"),[])},{id:"hack",name:"Hack",import:()=>f(()=>import("./hack-D1yCygmZ.js"),__vite__mapDeps([51,1,2,3,14]))},{id:"haml",name:"Ruby Haml",import:()=>f(()=>import("./haml-B2EZWmdv.js"),__vite__mapDeps([33,2,3]))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>f(()=>import("./handlebars-BQGss363.js"),__vite__mapDeps([52,1,2,3,38]))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>f(()=>import("./haskell-BILxekzW.js"),[])},{id:"haxe",name:"Haxe",import:()=>f(()=>import("./haxe-C5wWYbrZ.js"),[])},{id:"hcl",name:"HashiCorp HCL",import:()=>f(()=>import("./hcl-HzYwdGDm.js"),[])},{id:"hjson",name:"Hjson",import:()=>f(()=>import("./hjson-T-Tgc4AT.js"),[])},{id:"hlsl",name:"HLSL",import:()=>f(()=>import("./hlsl-ifBTmRxC.js"),[])},{id:"html",name:"HTML",import:()=>f(()=>import("./html-C2L_23MC.js"),__vite__mapDeps([1,2,3]))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>f(()=>import("./html-derivative-CSfWNPLT.js"),__vite__mapDeps([28,1,2,3]))},{id:"http",name:"HTTP",import:()=>f(()=>import("./http-FRrOvY1W.js"),__vite__mapDeps([53,26,9,7,8,34,2,11,35,36]))},{id:"hxml",name:"HXML",import:()=>f(()=>import("./hxml-TIA70rKU.js"),__vite__mapDeps([54,55]))},{id:"hy",name:"Hy",import:()=>f(()=>import("./hy-BMj5Y0dO.js"),[])},{id:"imba",name:"Imba",import:()=>f(()=>import("./imba-bv_oIlVt.js"),__vite__mapDeps([56,11]))},{id:"ini",name:"INI",aliases:["properties"],import:()=>f(()=>import("./ini-BjABl1g7.js"),[])},{id:"java",name:"Java",import:()=>f(()=>import("./java-xI-RfyKK.js"),[])},{id:"javascript",name:"JavaScript",aliases:["js"],import:()=>f(()=>import("./javascript-ySlJ1b_l.js"),[])},{id:"jinja",name:"Jinja",import:()=>f(()=>import("./jinja-DGy0s7-h.js"),__vite__mapDeps([57,1,2,3]))},{id:"jison",name:"Jison",import:()=>f(()=>import("./jison-BqZprYcd.js"),__vite__mapDeps([58,2]))},{id:"json",name:"JSON",import:()=>f(()=>import("./json-BQoSv7ci.js"),[])},{id:"json5",name:"JSON5",import:()=>f(()=>import("./json5-w8dY5SsB.js"),[])},{id:"jsonc",name:"JSON with Comments",import:()=>f(()=>import("./jsonc-TU54ms6u.js"),[])},{id:"jsonl",name:"JSON Lines",import:()=>f(()=>import("./jsonl-DREVFZK8.js"),[])},{id:"jsonnet",name:"Jsonnet",import:()=>f(()=>import("./jsonnet-BfivnA6A.js"),[])},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>f(()=>import("./jssm-P4WzXJd0.js"),[])},{id:"jsx",name:"JSX",import:()=>f(()=>import("./jsx-BAng5TT0.js"),[])},{id:"julia",name:"Julia",aliases:["jl"],import:()=>f(()=>import("./julia-BBuGR-5E.js"),__vite__mapDeps([59,21,22,23,24,14,18,2,60]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>f(()=>import("./kotlin-B5lbUyaz.js"),[])},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>f(()=>import("./kusto-mebxcVVE.js"),[])},{id:"latex",name:"LaTeX",import:()=>f(()=>import("./latex-C-cWTeAZ.js"),__vite__mapDeps([61,62,60]))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>f(()=>import("./lean-XBlWyCtg.js"),[])},{id:"less",name:"Less",import:()=>f(()=>import("./less-BfCpw3nA.js"),[])},{id:"liquid",name:"Liquid",import:()=>f(()=>import("./liquid-D3W5UaiH.js"),__vite__mapDeps([63,1,2,3,9]))},{id:"log",name:"Log file",import:()=>f(()=>import("./log-Cc5clBb7.js"),[])},{id:"logo",name:"Logo",import:()=>f(()=>import("./logo-IuBKFhSY.js"),[])},{id:"lua",name:"Lua",import:()=>f(()=>import("./lua-CvWAzNxB.js"),__vite__mapDeps([37,24]))},{id:"luau",name:"Luau",import:()=>f(()=>import("./luau-Du5NY7AG.js"),[])},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>f(()=>import("./make-Bvotw-X0.js"),[])},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>f(()=>import("./markdown-UIAJJxZW.js"),[])},{id:"marko",name:"Marko",import:()=>f(()=>import("./marko-z0MBrx5-.js"),__vite__mapDeps([64,3,65,5,2]))},{id:"matlab",name:"MATLAB",import:()=>f(()=>import("./matlab-D9-PGadD.js"),[])},{id:"mdc",name:"MDC",import:()=>f(()=>import("./mdc-DB_EDNY_.js"),__vite__mapDeps([66,42,38,28,1,2,3]))},{id:"mdx",name:"MDX",import:()=>f(()=>import("./mdx-sdHcTMYB.js"),[])},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>f(()=>import("./mermaid-Ci6OQyBP.js"),[])},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>f(()=>import("./mipsasm-BC5c_5Pe.js"),[])},{id:"mojo",name:"Mojo",import:()=>f(()=>import("./mojo-Tz6hzZYG.js"),[])},{id:"move",name:"Move",import:()=>f(()=>import("./move-DB_GagMm.js"),[])},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>f(()=>import("./narrat-DLbgOhZU.js"),[])},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>f(()=>import("./nextflow-B0XVJmRM.js"),[])},{id:"nginx",name:"Nginx",import:()=>f(()=>import("./nginx-D_VnBJ67.js"),__vite__mapDeps([67,37,24]))},{id:"nim",name:"Nim",import:()=>f(()=>import("./nim-ZlGxZxc3.js"),__vite__mapDeps([68,24,1,2,3,7,8,23,42]))},{id:"nix",name:"Nix",import:()=>f(()=>import("./nix-shcSOmrb.js"),[])},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>f(()=>import("./nushell-D4Tzg5kh.js"),[])},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>f(()=>import("./objective-c-Deuh7S70.js"),[])},{id:"objective-cpp",name:"Objective-C++",import:()=>f(()=>import("./objective-cpp-BUEGK8hf.js"),[])},{id:"ocaml",name:"OCaml",import:()=>f(()=>import("./ocaml-BNioltXt.js"),[])},{id:"pascal",name:"Pascal",import:()=>f(()=>import("./pascal-JqZropPD.js"),[])},{id:"perl",name:"Perl",import:()=>f(()=>import("./perl-CHQXSrWU.js"),__vite__mapDeps([69,1,2,3,7,8,14]))},{id:"php",name:"PHP",import:()=>f(()=>import("./php-B5ebYQev.js"),__vite__mapDeps([70,1,2,3,7,8,14,9]))},{id:"plsql",name:"PL/SQL",import:()=>f(()=>import("./plsql-LKU2TuZ1.js"),[])},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>f(()=>import("./po-BFLt1xDp.js"),[])},{id:"polar",name:"Polar",import:()=>f(()=>import("./polar-DKykz6zU.js"),[])},{id:"postcss",name:"PostCSS",import:()=>f(()=>import("./postcss-B3ZDOciz.js"),[])},{id:"powerquery",name:"PowerQuery",import:()=>f(()=>import("./powerquery-CSHBycmS.js"),[])},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>f(()=>import("./powershell-BIEUsx6d.js"),[])},{id:"prisma",name:"Prisma",import:()=>f(()=>import("./prisma-B48N-Iqd.js"),[])},{id:"prolog",name:"Prolog",import:()=>f(()=>import("./prolog-BY-TUvya.js"),[])},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>f(()=>import("./proto-zocC4JxJ.js"),[])},{id:"pug",name:"Pug",aliases:["jade"],import:()=>f(()=>import("./pug-CM9l7STV.js"),__vite__mapDeps([71,2,3,1]))},{id:"puppet",name:"Puppet",import:()=>f(()=>import("./puppet-Cza_XSSt.js"),[])},{id:"purescript",name:"PureScript",import:()=>f(()=>import("./purescript-Bg-kzb6g.js"),[])},{id:"python",name:"Python",aliases:["py"],import:()=>f(()=>import("./python-DhUJRlN_.js"),[])},{id:"qml",name:"QML",import:()=>f(()=>import("./qml-D8XfuvdV.js"),__vite__mapDeps([72,2]))},{id:"qmldir",name:"QML Directory",import:()=>f(()=>import("./qmldir-C8lEn-DE.js"),[])},{id:"qss",name:"Qt Style Sheets",import:()=>f(()=>import("./qss-DhMKtDLN.js"),[])},{id:"r",name:"R",import:()=>f(()=>import("./r-CwjWoCRV.js"),[])},{id:"racket",name:"Racket",import:()=>f(()=>import("./racket-CzouJOBO.js"),[])},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>f(()=>import("./raku-B1bQXN8T.js"),[])},{id:"razor",name:"ASP.NET Razor",import:()=>f(()=>import("./razor-CNLDkMZG.js"),__vite__mapDeps([73,1,2,3,74]))},{id:"reg",name:"Windows Registry Script",import:()=>f(()=>import("./reg-5LuOXUq_.js"),[])},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>f(()=>import("./regexp-DWJ3fJO_.js"),[])},{id:"rel",name:"Rel",import:()=>f(()=>import("./rel-DJlmqQ1C.js"),[])},{id:"riscv",name:"RISC-V",import:()=>f(()=>import("./riscv-QhoSD0DR.js"),[])},{id:"rst",name:"reStructuredText",import:()=>f(()=>import("./rst-4NLicBqY.js"),__vite__mapDeps([75,28,1,2,3,21,22,23,24,14,18,26,38,76,32,33,7,8,34,11,35,36,37]))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>f(()=>import("./ruby-DeZ3UC14.js"),__vite__mapDeps([32,1,2,3,33,7,8,14,34,11,35,36,21,22,23,24,26,37,38]))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>f(()=>import("./rust-Be6lgOlo.js"),[])},{id:"sas",name:"SAS",import:()=>f(()=>import("./sas-BmTFh92c.js"),__vite__mapDeps([77,14]))},{id:"sass",name:"Sass",import:()=>f(()=>import("./sass-BJ4Li9vH.js"),[])},{id:"scala",name:"Scala",import:()=>f(()=>import("./scala-DQVVAn-B.js"),[])},{id:"scheme",name:"Scheme",import:()=>f(()=>import("./scheme-BJGe-b2p.js"),[])},{id:"scss",name:"SCSS",import:()=>f(()=>import("./scss-C31hgJw-.js"),__vite__mapDeps([5,3]))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>f(()=>import("./sdbl-BLhTXw86.js"),[])},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>f(()=>import("./shaderlab-B7qAK45m.js"),__vite__mapDeps([78,79]))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>f(()=>import("./shellscript-atvbtKCR.js"),[])},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>f(()=>import("./shellsession-C_rIy8kc.js"),__vite__mapDeps([80,26]))},{id:"smalltalk",name:"Smalltalk",import:()=>f(()=>import("./smalltalk-DkLiglaE.js"),[])},{id:"solidity",name:"Solidity",import:()=>f(()=>import("./solidity-C1w2a3ep.js"),[])},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>f(()=>import("./soy-C-lX7w71.js"),__vite__mapDeps([81,1,2,3]))},{id:"sparql",name:"SPARQL",import:()=>f(()=>import("./sparql-bYkjHRlG.js"),__vite__mapDeps([82,83]))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>f(()=>import("./splunk-Cf8iN4DR.js"),[])},{id:"sql",name:"SQL",import:()=>f(()=>import("./sql-COK4E0Yg.js"),[])},{id:"ssh-config",name:"SSH Config",import:()=>f(()=>import("./ssh-config-BknIz3MU.js"),[])},{id:"stata",name:"Stata",import:()=>f(()=>import("./stata-DorPZHa4.js"),__vite__mapDeps([84,14]))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>f(()=>import("./stylus-BeQkCIfX.js"),[])},{id:"svelte",name:"Svelte",import:()=>f(()=>import("./svelte-MSaWC3Je.js"),__vite__mapDeps([85,2,11,3,12]))},{id:"swift",name:"Swift",import:()=>f(()=>import("./swift-BSxZ-RaX.js"),[])},{id:"system-verilog",name:"SystemVerilog",import:()=>f(()=>import("./system-verilog-C7L56vO4.js"),[])},{id:"systemd",name:"Systemd Units",import:()=>f(()=>import("./systemd-CUnW07Te.js"),[])},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>f(()=>import("./talonscript-C1XDQQGZ.js"),[])},{id:"tasl",name:"Tasl",import:()=>f(()=>import("./tasl-CQjiPCtT.js"),[])},{id:"tcl",name:"Tcl",import:()=>f(()=>import("./tcl-DQ1-QYvQ.js"),[])},{id:"templ",name:"Templ",import:()=>f(()=>import("./templ-dwX3ZSMB.js"),__vite__mapDeps([86,87,2,3]))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>f(()=>import("./terraform-BbSNqyBO.js"),[])},{id:"tex",name:"TeX",import:()=>f(()=>import("./tex-rYs2v40G.js"),__vite__mapDeps([62,60]))},{id:"toml",name:"TOML",import:()=>f(()=>import("./toml-CB2ApiWb.js"),[])},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>f(()=>import("./ts-tags-CipyTH0X.js"),__vite__mapDeps([88,11,3,2,23,24,1,14,7,8]))},{id:"tsv",name:"TSV",import:()=>f(()=>import("./tsv-B_m7g4N7.js"),[])},{id:"tsx",name:"TSX",import:()=>f(()=>import("./tsx-B6W0miNI.js"),[])},{id:"turtle",name:"Turtle",import:()=>f(()=>import("./turtle-BMR_PYu6.js"),[])},{id:"twig",name:"Twig",import:()=>f(()=>import("./twig-NC5TFiHP.js"),__vite__mapDeps([89,3,2,5,70,1,7,8,14,9,18,32,33,34,11,35,36,21,22,23,24,26,37,38]))},{id:"typescript",name:"TypeScript",aliases:["ts"],import:()=>f(()=>import("./typescript-Dj6nwHGl.js"),[])},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>f(()=>import("./typespec-BpWG_bgh.js"),[])},{id:"typst",name:"Typst",aliases:["typ"],import:()=>f(()=>import("./typst-BVUVsWT6.js"),[])},{id:"v",name:"V",import:()=>f(()=>import("./v-CAQ2eGtk.js"),[])},{id:"vala",name:"Vala",import:()=>f(()=>import("./vala-BFOHcciG.js"),[])},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>f(()=>import("./vb-CdO5JTpU.js"),[])},{id:"verilog",name:"Verilog",import:()=>f(()=>import("./verilog-CJaU5se_.js"),[])},{id:"vhdl",name:"VHDL",import:()=>f(()=>import("./vhdl-DYoNaHQp.js"),[])},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>f(()=>import("./viml-m4uW47V2.js"),[])},{id:"vue",name:"Vue",import:()=>f(()=>import("./vue-BuYVFjOK.js"),__vite__mapDeps([90,1,2,3,11,9,28]))},{id:"vue-html",name:"Vue HTML",import:()=>f(()=>import("./vue-html-xdeiXROB.js"),__vite__mapDeps([91,90,1,2,3,11,9,28]))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>f(()=>import("./vyper-nyqBNV6O.js"),[])},{id:"wasm",name:"WebAssembly",import:()=>f(()=>import("./wasm-C6j12Q_x.js"),[])},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>f(()=>import("./wenyan-7A4Fjokl.js"),[])},{id:"wgsl",name:"WGSL",import:()=>f(()=>import("./wgsl-CB0Krxn9.js"),[])},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>f(()=>import("./wikitext-DCE3LsBG.js"),[])},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>f(()=>import("./wolfram-C3FkfJm5.js"),[])},{id:"xml",name:"XML",import:()=>f(()=>import("./xml-e3z08dGr.js"),__vite__mapDeps([7,8]))},{id:"xsl",name:"XSL",import:()=>f(()=>import("./xsl-Dd0NUgwM.js"),__vite__mapDeps([92,7,8]))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>f(()=>import("./yaml-CVw76BM1.js"),[])},{id:"zenscript",name:"ZenScript",import:()=>f(()=>import("./zenscript-HnGAYVZD.js"),[])},{id:"zig",name:"Zig",import:()=>f(()=>import("./zig-BVz_zdnA.js"),[])}],nc=Object.fromEntries(Oo.map(t=>[t.id,t.import])),rc=Object.fromEntries(Oo.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(n=>[n,t.import]))||[]})),ic={...nc,...rc},sc=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>f(()=>import("./andromeeda-C3khCPGq.js"),[])},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>f(()=>import("./aurora-x-D-2ljcwZ.js"),[])},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>f(()=>import("./ayu-dark-Cv9koXgw.js"),[])},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>f(()=>import("./catppuccin-frappe-CD_QflpE.js"),[])},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>f(()=>import("./catppuccin-latte-DRW-0cLl.js"),[])},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>f(()=>import("./catppuccin-macchiato-C-_shW-Y.js"),[])},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>f(()=>import("./catppuccin-mocha-LGGdnPYs.js"),[])},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>f(()=>import("./dark-plus-C3mMm8J8.js"),[])},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>f(()=>import("./dracula-BzJJZx-M.js"),[])},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>f(()=>import("./dracula-soft-BXkSAIEj.js"),[])},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>f(()=>import("./everforest-dark-BgDCqdQA.js"),[])},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>f(()=>import("./everforest-light-C8M2exoo.js"),[])},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>f(()=>import("./github-dark-DHJKELXO.js"),[])},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>f(()=>import("./github-dark-default-Cuk6v7N8.js"),[])},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>f(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[])},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>f(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[])},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>f(()=>import("./github-light-DAi9KRSo.js"),[])},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>f(()=>import("./github-light-default-D7oLnXFd.js"),[])},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>f(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[])},{id:"houston",displayName:"Houston",type:"dark",import:()=>f(()=>import("./houston-DnULxvSX.js"),[])},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>f(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[])},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>f(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[])},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>f(()=>import("./kanagawa-wave-DWedfzmr.js"),[])},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>f(()=>import("./laserwave-DUszq2jm.js"),[])},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>f(()=>import("./light-plus-B7mTdjB0.js"),[])},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>f(()=>import("./material-theme-D5KoaKCx.js"),[])},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>f(()=>import("./material-theme-darker-BfHTSMKl.js"),[])},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>f(()=>import("./material-theme-lighter-B0m2ddpp.js"),[])},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>f(()=>import("./material-theme-ocean-CyktbL80.js"),[])},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>f(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[])},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>f(()=>import("./min-dark-CafNBF8u.js"),[])},{id:"min-light",displayName:"Min Light",type:"light",import:()=>f(()=>import("./min-light-CTRr51gU.js"),[])},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>f(()=>import("./monokai-D4h5O-jR.js"),[])},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>f(()=>import("./night-owl-C39BiMTA.js"),[])},{id:"nord",displayName:"Nord",type:"dark",import:()=>f(()=>import("./nord-Ddv68eIx.js"),[])},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>f(()=>import("./one-dark-pro-GBQ2dnAY.js"),[])},{id:"one-light",displayName:"One Light",type:"light",import:()=>f(()=>import("./one-light-PoHY5YXO.js"),[])},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>f(()=>import("./plastic-3e1v2bzS.js"),[])},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>f(()=>import("./poimandres-CS3Unz2-.js"),[])},{id:"red",displayName:"Red",type:"dark",import:()=>f(()=>import("./red-bN70gL4F.js"),[])},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>f(()=>import("./rose-pine-CmCqftbK.js"),[])},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>f(()=>import("./rose-pine-dawn-Ds-gbosJ.js"),[])},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>f(()=>import("./rose-pine-moon-CjDtw9vr.js"),[])},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>f(()=>import("./slack-dark-BthQWCQV.js"),[])},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>f(()=>import("./slack-ochin-DqwNpetd.js"),[])},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>f(()=>import("./snazzy-light-Bw305WKR.js"),[])},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>f(()=>import("./solarized-dark-DXbdFlpD.js"),[])},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>f(()=>import("./solarized-light-L9t79GZl.js"),[])},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>f(()=>import("./synthwave-84-CbfX1IO0.js"),[])},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>f(()=>import("./tokyo-night-DBQeEorK.js"),[])},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>f(()=>import("./vesper-BEBZ7ncR.js"),[])},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>f(()=>import("./vitesse-black-Bkuqu6BP.js"),[])},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>f(()=>import("./vitesse-dark-D0r3Knsf.js"),[])},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>f(()=>import("./vitesse-light-CVO1_9PV.js"),[])}],oc=Object.fromEntries(sc.map(t=>[t.id,t.import]));let Rt=class extends Error{constructor(e){super(e),this.name="ShikiError"}},qi=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function ac(){return 2147483648}function lc(){return typeof performance<"u"?performance.now():Date.now()}const uc=(t,e)=>t+(e-t%e)%e;async function cc(t){let e,n;const r={};function i(p){n=p,r.HEAPU8=new Uint8Array(p),r.HEAPU32=new Uint32Array(p)}function s(p,_,b){r.HEAPU8.copyWithin(p,_,_+b)}function o(p){try{return e.grow(p-n.byteLength+65535>>>16),i(e.buffer),1}catch{}}function a(p){const _=r.HEAPU8.length;p=p>>>0;const b=ac();if(p>b)return!1;for(let m=1;m<=4;m*=2){let v=_*(1+.2/m);v=Math.min(v,p+100663296);const x=Math.min(b,uc(Math.max(p,v),65536));if(o(x))return!0}return!1}const l=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(p,_,b=1024){const m=_+b;let v=_;for(;p[v]&&!(v>=m);)++v;if(v-_>16&&p.buffer&&l)return l.decode(p.subarray(_,v));let x="";for(;_<v;){let E=p[_++];if(!(E&128)){x+=String.fromCharCode(E);continue}const A=p[_++]&63;if((E&224)===192){x+=String.fromCharCode((E&31)<<6|A);continue}const P=p[_++]&63;if((E&240)===224?E=(E&15)<<12|A<<6|P:E=(E&7)<<18|A<<12|P<<6|p[_++]&63,E<65536)x+=String.fromCharCode(E);else{const S=E-65536;x+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return x}function c(p,_){return p?u(r.HEAPU8,p,_):""}const h={emscripten_get_now:lc,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function d(){const _=await t({env:h,wasi_snapshot_preview1:h});e=_.memory,i(e.buffer),Object.assign(r,_),r.UTF8ToString=c}return await d(),r}var dc=Object.defineProperty,fc=(t,e,n)=>e in t?dc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,fe=(t,e,n)=>(fc(t,typeof e!="symbol"?e+"":e,n),n);let me=null;function pc(t){throw new qi(t.UTF8ToString(t.getLastOnigError()))}class qr{constructor(e){fe(this,"utf16Length"),fe(this,"utf8Length"),fe(this,"utf16Value"),fe(this,"utf8Value"),fe(this,"utf16OffsetToUtf8"),fe(this,"utf8OffsetToUtf16");const n=e.length,r=qr._utf8ByteLength(e),i=r!==n,s=i?new Uint32Array(n+1):null;i&&(s[n]=r);const o=i?new Uint32Array(r+1):null;i&&(o[r]=n);const a=new Uint8Array(r);let l=0;for(let u=0;u<n;u++){const c=e.charCodeAt(u);let h=c,d=!1;if(c>=55296&&c<=56319&&u+1<n){const p=e.charCodeAt(u+1);p>=56320&&p<=57343&&(h=(c-55296<<10)+65536|p-56320,d=!0)}i&&(s[u]=l,d&&(s[u+1]=l),h<=127?o[l+0]=u:h<=2047?(o[l+0]=u,o[l+1]=u):h<=65535?(o[l+0]=u,o[l+1]=u,o[l+2]=u):(o[l+0]=u,o[l+1]=u,o[l+2]=u,o[l+3]=u)),h<=127?a[l++]=h:h<=2047?(a[l++]=192|(h&1984)>>>6,a[l++]=128|(h&63)>>>0):h<=65535?(a[l++]=224|(h&61440)>>>12,a[l++]=128|(h&4032)>>>6,a[l++]=128|(h&63)>>>0):(a[l++]=240|(h&1835008)>>>18,a[l++]=128|(h&258048)>>>12,a[l++]=128|(h&4032)>>>6,a[l++]=128|(h&63)>>>0),d&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let r=0,i=e.length;r<i;r++){const s=e.charCodeAt(r);let o=s,a=!1;if(s>=55296&&s<=56319&&r+1<i){const l=e.charCodeAt(r+1);l>=56320&&l<=57343&&(o=(s-55296<<10)+65536|l-56320,a=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,a&&r++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const ut=class{constructor(t){if(fe(this,"id",++ut.LAST_ID),fe(this,"_onigBinding"),fe(this,"content"),fe(this,"utf16Length"),fe(this,"utf8Length"),fe(this,"utf16OffsetToUtf8"),fe(this,"utf8OffsetToUtf16"),fe(this,"ptr"),!me)throw new qi("Must invoke loadWasm first.");this._onigBinding=me,this.content=t;const e=new qr(t);this.utf16Length=e.utf16Length,this.utf8Length=e.utf8Length,this.utf16OffsetToUtf8=e.utf16OffsetToUtf8,this.utf8OffsetToUtf16=e.utf8OffsetToUtf16,this.utf8Length<1e4&&!ut._sharedPtrInUse?(ut._sharedPtr||(ut._sharedPtr=me.omalloc(1e4)),ut._sharedPtrInUse=!0,me.HEAPU8.set(e.utf8Value,ut._sharedPtr),this.ptr=ut._sharedPtr):this.ptr=e.createString(me)}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===ut._sharedPtr?ut._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};let sr=ut;fe(sr,"LAST_ID",0);fe(sr,"_sharedPtr",0);fe(sr,"_sharedPtrInUse",!1);class hc{constructor(e){if(fe(this,"_onigBinding"),fe(this,"_ptr"),!me)throw new qi("Must invoke loadWasm first.");const n=[],r=[];for(let a=0,l=e.length;a<l;a++){const u=new qr(e[a]);n[a]=u.createString(me),r[a]=u.utf8Length}const i=me.omalloc(4*e.length);me.HEAPU32.set(n,i/4);const s=me.omalloc(4*e.length);me.HEAPU32.set(r,s/4);const o=me.createOnigScanner(i,s,e.length);for(let a=0,l=e.length;a<l;a++)me.ofree(n[a]);me.ofree(s),me.ofree(i),o===0&&pc(me),this._onigBinding=me,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof e=="string"){e=new sr(e);const s=this._findNextMatchSync(e,n,!1,i);return e.dispose(),s}return this._findNextMatchSync(e,n,!1,i)}_findNextMatchSync(e,n,r,i){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),i);if(o===0)return null;const a=s.HEAPU32;let l=o/4;const u=a[l++],c=a[l++],h=[];for(let d=0;d<c;d++){const p=e.convertUtf8OffsetToUtf16(a[l++]),_=e.convertUtf8OffsetToUtf16(a[l++]);h[d]={start:p,end:_,length:_-p}}return{index:u,captureIndices:h}}}function mc(t){return typeof t.instantiator=="function"}function _c(t){return typeof t.default=="function"}function gc(t){return typeof t.data<"u"}function vc(t){return typeof Response<"u"&&t instanceof Response}function yc(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let ur;function Ec(t){if(ur)return ur;async function e(){me=await cc(async n=>{let r=t;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),mc(r)?r=await r.instantiator(n):_c(r)?r=await r.default(n):(gc(r)&&(r=r.data),vc(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await bc(r)(n):r=await wc(r)(n):yc(r)?r=await ii(r)(n):r instanceof WebAssembly.Module?r=await ii(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await ii(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return ur=e(),ur}function ii(t){return e=>WebAssembly.instantiate(t,e)}function bc(t){return e=>WebAssembly.instantiateStreaming(t,e)}function wc(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}let xc;function Rc(){return xc}async function Do(t){return t&&await Ec(t),{createScanner(e){return new hc(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new sr(e)}}}function Ac(t){return Ki(t)}function Ki(t){return Array.isArray(t)?Sc(t):t instanceof RegExp?t:typeof t=="object"?Tc(t):t}function Sc(t){let e=[];for(let n=0,r=t.length;n<r;n++)e[n]=Ki(t[n]);return e}function Tc(t){let e={};for(let n in t)e[n]=Ki(t[n]);return e}function No(t,...e){return e.forEach(n=>{for(let r in n)t[r]=n[r]}),t}function Vo(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?Vo(t.substring(0,t.length-1)):t.substr(~e+1)}var si=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,cr=class{static hasCaptures(t){return t===null?!1:(si.lastIndex=0,si.test(t))}static replaceCaptures(t,e,n){return t.replace(si,(r,i,s,o)=>{let a=n[parseInt(i||s,10)];if(a){let l=e.substring(a.start,a.end);for(;l[0]===".";)l=l.substring(1);switch(o){case"downcase":return l.toLowerCase();case"upcase":return l.toUpperCase();default:return l}}else return r})}};function Mo(t,e){return t<e?-1:t>e?1:0}function Bo(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,r=e.length;if(n===r){for(let i=0;i<n;i++){let s=Mo(t[i],e[i]);if(s!==0)return s}return 0}return n-r}function gs(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function Go(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var jo=class{constructor(t){w(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Pr=class{constructor(t,e,n){w(this,"_cachedMatchRoot",new jo(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(kc(t),e)}static createFromParsedTheme(t,e){return Ic(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,r=this._cachedMatchRoot.get(e).find(i=>Pc(t.parent,i.parentScopes));return r?new Fo(r.fontStyle,r.foreground,r.background):null}},oi=class yr{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const r of n)e=new yr(e,r);return e}static from(...e){let n=null;for(let r=0;r<e.length;r++)n=new yr(n,e[r]);return n}push(e){return new yr(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let r=this;for(;r&&r!==e;)n.push(r.scopeName),r=r.parent;return r===e?n.reverse():void 0}};function Pc(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let r=e[n],i=!1;if(r===">"){if(n===e.length-1)return!1;r=e[++n],i=!0}for(;t&&!Lc(t.scopeName,r);){if(i)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function Lc(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var Fo=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function kc(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],r=0;for(let i=0,s=e.length;i<s;i++){let o=e[i];if(!o.settings)continue;let a;if(typeof o.scope=="string"){let h=o.scope;h=h.replace(/^[,]+/,""),h=h.replace(/[,]+$/,""),a=h.split(",")}else Array.isArray(o.scope)?a=o.scope:a=[""];let l=-1;if(typeof o.settings.fontStyle=="string"){l=0;let h=o.settings.fontStyle.split(" ");for(let d=0,p=h.length;d<p;d++)switch(h[d]){case"italic":l=l|1;break;case"bold":l=l|2;break;case"underline":l=l|4;break;case"strikethrough":l=l|8;break}}let u=null;typeof o.settings.foreground=="string"&&gs(o.settings.foreground)&&(u=o.settings.foreground);let c=null;typeof o.settings.background=="string"&&gs(o.settings.background)&&(c=o.settings.background);for(let h=0,d=a.length;h<d;h++){let _=a[h].trim().split(" "),b=_[_.length-1],m=null;_.length>1&&(m=_.slice(0,_.length-1),m.reverse()),n[r++]=new Cc(b,m,i,l,u,c)}}return n}var Cc=class{constructor(t,e,n,r,i,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},xt=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(xt||{});function Ic(t,e){t.sort((l,u)=>{let c=Mo(l.scope,u.scope);return c!==0||(c=Bo(l.parentScopes,u.parentScopes),c!==0)?c:l.index-u.index});let n=0,r="#000000",i="#ffffff";for(;t.length>=1&&t[0].scope==="";){let l=t.shift();l.fontStyle!==-1&&(n=l.fontStyle),l.foreground!==null&&(r=l.foreground),l.background!==null&&(i=l.background)}let s=new Oc(e),o=new Fo(n,s.getId(r),s.getId(i)),a=new Nc(new Ai(0,null,-1,0,0),[]);for(let l=0,u=t.length;l<u;l++){let c=t[l];a.insert(0,c.scope,c.parentScopes,c.fontStyle,s.getId(c.foreground),s.getId(c.background))}return new Pr(s,o,a)}var Oc=class{constructor(t){w(this,"_isFrozen");w(this,"_lastColorId");w(this,"_id2color");w(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},Dc=Object.freeze([]),Ai=class Uo{constructor(e,n,r,i,s){w(this,"scopeDepth");w(this,"parentScopes");w(this,"fontStyle");w(this,"foreground");w(this,"background");this.scopeDepth=e,this.parentScopes=n||Dc,this.fontStyle=r,this.foreground=i,this.background=s}clone(){return new Uo(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let r=0,i=e.length;r<i;r++)n[r]=e[r].clone();return n}acceptOverwrite(e,n,r,i){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},Nc=class Si{constructor(e,n=[],r={}){w(this,"_rulesWithParentScopes");this._mainRule=e,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let r=0,i=0;for(;e.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=e.parentScopes.length||i>=n.parentScopes.length);){const s=n.parentScopes[i].length-e.parentScopes[r].length;if(s!==0)return s;r++,i++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let r=e.indexOf("."),i,s;if(r===-1?(i=e,s=""):(i=e.substring(0,r),s=e.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Si._cmpBySpecificity),n}insert(e,n,r,i,s,o){if(n===""){this._doInsertHere(e,r,i,s,o);return}let a=n.indexOf("."),l,u;a===-1?(l=n,u=""):(l=n.substring(0,a),u=n.substring(a+1));let c;this._children.hasOwnProperty(l)?c=this._children[l]:(c=new Si(this._mainRule.clone(),Ai.cloneArr(this._rulesWithParentScopes)),this._children[l]=c),c.insert(e+1,u,r,i,s,o)}_doInsertHere(e,n,r,i,s){if(n===null){this._mainRule.acceptOverwrite(e,r,i,s);return}for(let o=0,a=this._rulesWithParentScopes.length;o<a;o++){let l=this._rulesWithParentScopes[o];if(Bo(l.parentScopes,n)===0){l.acceptOverwrite(e,r,i,s);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Ai(e,n,r,i,s))}},xn=class je{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=je.getLanguageId(e),r=je.getTokenType(e),i=je.getFontStyle(e),s=je.getForeground(e),o=je.getBackground(e);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,r,i,s,o,a){let l=je.getLanguageId(e),u=je.getTokenType(e),c=je.containsBalancedBrackets(e)?1:0,h=je.getFontStyle(e),d=je.getForeground(e),p=je.getBackground(e);return n!==0&&(l=n),r!==8&&(u=r),i!==null&&(c=i?1:0),s!==-1&&(h=s),o!==0&&(d=o),a!==0&&(p=a),(l<<0|u<<8|c<<10|h<<11|d<<15|p<<24)>>>0}};function Lr(t,e){const n=[],r=Vc(t);let i=r.next();for(;i!==null;){let l=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":l=1;break;case"L":l=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let u=o();if(n.push({matcher:u,priority:l}),i!==",")break;i=r.next()}return n;function s(){if(i==="-"){i=r.next();const l=s();return u=>!!l&&!l(u)}if(i==="("){i=r.next();const l=a();return i===")"&&(i=r.next()),l}if(vs(i)){const l=[];do l.push(i),i=r.next();while(vs(i));return u=>e(l,u)}return null}function o(){const l=[];let u=s();for(;u;)l.push(u),u=s();return c=>l.every(h=>h(c))}function a(){const l=[];let u=o();for(;u&&(l.push(u),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");u=o()}return c=>l.some(h=>h(c))}}function vs(t){return!!t&&!!t.match(/[\w\.:]+/)}function Vc(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const r=n[0];return n=e.exec(t),r}}}function $o(t){typeof t.dispose=="function"&&t.dispose()}var qn=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},Mc=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},Bc=class{constructor(){w(this,"_references",[]);w(this,"_seenReferenceKeys",new Set);w(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},Gc=class{constructor(t,e){w(this,"seenFullScopeRequests",new Set);w(this,"seenPartialScopeRequests",new Set);w(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new qn(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new Bc;for(const n of t)jc(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof qn){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 jc(t,e,n,r){const i=n.lookup(t.scopeName);if(!i){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof qn?Er({baseGrammar:s,selfGrammar:i},r):Ti(t.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);const o=n.injections(t.scopeName);if(o)for(const a of o)r.add(new qn(a))}function Ti(t,e,n){if(e.repository&&e.repository[t]){const r=e.repository[t];kr([r],e,n)}}function Er(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&kr(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&kr(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function kr(t,e,n){for(const r of t){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?No({},e.repository,r.repository):e.repository;Array.isArray(r.patterns)&&kr(r.patterns,{...e,repository:i},n);const s=r.include;if(!s)continue;const o=Ho(s);switch(o.kind){case 0:Er({...e,selfGrammar:e.baseGrammar},n);break;case 1:Er(e,n);break;case 2:Ti(o.ruleName,{...e,repository:i},n);break;case 3:case 4:const a=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(a){const l={baseGrammar:e.baseGrammar,selfGrammar:a,repository:i};o.kind===4?Ti(o.ruleName,l,n):Er(l,n)}else o.kind===4?n.add(new Mc(o.scopeName,o.ruleName)):n.add(new qn(o.scopeName));break}}}var Fc=class{constructor(){w(this,"kind",0)}},Uc=class{constructor(){w(this,"kind",1)}},$c=class{constructor(t){w(this,"kind",2);this.ruleName=t}},Hc=class{constructor(t){w(this,"kind",3);this.scopeName=t}},zc=class{constructor(t,e){w(this,"kind",4);this.scopeName=t,this.ruleName=e}};function Ho(t){if(t==="$base")return new Fc;if(t==="$self")return new Uc;const e=t.indexOf("#");if(e===-1)return new Hc(t);if(e===0)return new $c(t.substring(1));{const n=t.substring(0,e),r=t.substring(e+1);return new zc(n,r)}}var Wc=/\\(\d+)/,ys=/\\(\d+)/g,qc=-1,zo=-2;var or=class{constructor(t,e,n,r){w(this,"$location");w(this,"id");w(this,"_nameIsCapturing");w(this,"_name");w(this,"_contentNameIsCapturing");w(this,"_contentName");this.$location=t,this.id=e,this._name=n||null,this._nameIsCapturing=cr.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=cr.hasCaptures(this._contentName)}get debugName(){const t=this.$location?`${Vo(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${t}`}getName(t,e){return!this._nameIsCapturing||this._name===null||t===null||e===null?this._name:cr.replaceCaptures(this._name,t,e)}getContentName(t,e){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:cr.replaceCaptures(this._contentName,t,e)}},Kc=class extends or{constructor(e,n,r,i,s){super(e,n,r,i);w(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,r,i){throw new Error("Not supported!")}},Yc=class extends or{constructor(e,n,r,i,s){super(e,n,r,null);w(this,"_match");w(this,"captures");w(this,"_cachedCompiledPatterns");this._match=new Kn(i,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Es=class extends or{constructor(e,n,r,i,s){super(e,n,r,i);w(this,"hasMissingPatterns");w(this,"patterns");w(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const r of this.patterns)e.getRule(r).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Yn,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pi=class extends or{constructor(e,n,r,i,s,o,a,l,u,c){super(e,n,r,i);w(this,"_begin");w(this,"beginCaptures");w(this,"_end");w(this,"endHasBackReferences");w(this,"endCaptures");w(this,"applyEndPatternLast");w(this,"hasMissingPatterns");w(this,"patterns");w(this,"_cachedCompiledPatterns");this._begin=new Kn(s,this.id),this.beginCaptures=o,this._end=new Kn(a||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=l,this.applyEndPatternLast=u||!1,this.patterns=c.patterns,this.hasMissingPatterns=c.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(e,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e,n).compileAG(e,r,i)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yn;for(const r of this.patterns)e.getRule(r).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Cr=class extends or{constructor(e,n,r,i,s,o,a,l,u){super(e,n,r,i);w(this,"_begin");w(this,"beginCaptures");w(this,"whileCaptures");w(this,"_while");w(this,"whileHasBackReferences");w(this,"hasMissingPatterns");w(this,"patterns");w(this,"_cachedCompiledPatterns");w(this,"_cachedCompiledWhilePatterns");this._begin=new Kn(s,this.id),this.beginCaptures=o,this.whileCaptures=l,this._while=new Kn(a,zo),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=u.patterns,this.hasMissingPatterns=u.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(e,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,r,i){return this._getCachedCompiledPatterns(e).compileAG(e,r,i)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Yn;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,r,i){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,r,i)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Yn,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},Wo=class Ae{static createCaptureRule(e,n,r,i,s){return e.registerRule(o=>new Kc(n,o,r,i,s))}static getCompiledRuleId(e,n,r){return e.id||n.registerRule(i=>{if(e.id=i,e.match)return new Yc(e.$vscodeTextmateLocation,e.id,e.name,e.match,Ae._compileCaptures(e.captures,n,r));if(typeof e.begin>"u"){e.repository&&(r=No({},r,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new Es(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,Ae._compilePatterns(s,n,r))}return e.while?new Cr(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Ae._compileCaptures(e.beginCaptures||e.captures,n,r),e.while,Ae._compileCaptures(e.whileCaptures||e.captures,n,r),Ae._compilePatterns(e.patterns,n,r)):new Pi(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Ae._compileCaptures(e.beginCaptures||e.captures,n,r),e.end,Ae._compileCaptures(e.endCaptures||e.captures,n,r),e.applyEndPatternLast,Ae._compilePatterns(e.patterns,n,r))}),e.id}static _compileCaptures(e,n,r){let i=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);a>s&&(s=a)}for(let o=0;o<=s;o++)i[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const a=parseInt(o,10);let l=0;e[o].patterns&&(l=Ae.getCompiledRuleId(e[o],n,r)),i[a]=Ae.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,l)}}return i}static _compilePatterns(e,n,r){let i=[];if(e)for(let s=0,o=e.length;s<o;s++){const a=e[s];let l=-1;if(a.include){const u=Ho(a.include);switch(u.kind){case 0:case 1:l=Ae.getCompiledRuleId(r[a.include],n,r);break;case 2:let c=r[u.ruleName];c&&(l=Ae.getCompiledRuleId(c,n,r));break;case 3:case 4:const h=u.scopeName,d=u.kind===4?u.ruleName:null,p=n.getExternalGrammar(h,r);if(p)if(d){let _=p.repository[d];_&&(l=Ae.getCompiledRuleId(_,n,p.repository))}else l=Ae.getCompiledRuleId(p.repository.$self,n,p.repository);break}}else l=Ae.getCompiledRuleId(a,n,r);if(l!==-1){const u=n.getRule(l);let c=!1;if((u instanceof Es||u instanceof Pi||u instanceof Cr)&&u.hasMissingPatterns&&u.patterns.length===0&&(c=!0),c)continue;i.push(l)}}return{patterns:i,hasMissingPatterns:(e?e.length:0)!==i.length}}},Kn=class qo{constructor(e,n){w(this,"source");w(this,"ruleId");w(this,"hasAnchor");w(this,"hasBackReferences");w(this,"_anchorCache");if(e&&typeof e=="string"){const r=e.length;let i=0,s=[],o=!1;for(let a=0;a<r;a++)if(e.charAt(a)==="\\"&&a+1<r){const u=e.charAt(a+1);u==="z"?(s.push(e.substring(i,a)),s.push("$(?!\\n)(?<!\\n)"),i=a+2):(u==="A"||u==="G")&&(o=!0),a++}this.hasAnchor=o,i===0?this.source=e:(s.push(e.substring(i,r)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=Wc.test(this.source):this.hasBackReferences=!1}clone(){return new qo(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>e.substring(i.start,i.end));return ys.lastIndex=0,this.source.replace(ys,(i,s)=>Go(r[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],r=[],i=[],s,o,a,l;for(s=0,o=this.source.length;s<o;s++)a=this.source.charAt(s),e[s]=a,n[s]=a,r[s]=a,i[s]=a,a==="\\"&&s+1<o&&(l=this.source.charAt(s+1),l==="A"?(e[s+1]="",n[s+1]="",r[s+1]="A",i[s+1]="A"):l==="G"?(e[s+1]="",n[s+1]="G",r[s+1]="",i[s+1]="G"):(e[s+1]=l,n[s+1]=l,r[s+1]=l,i[s+1]=l),s++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Yn=class{constructor(){w(this,"_items");w(this,"_hasAnchors");w(this,"_cached");w(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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new bs(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let r=this._items.map(i=>i.resolveAnchors(e,n));return new bs(t,r,this._items.map(i=>i.ruleId))}},bs=class{constructor(t,e,n){w(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
`)}findNextMatchSync(t,e,n){const r=this.scanner.findNextMatchSync(t,e,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ai=class{constructor(t,e){this.languageId=t,this.tokenType=e}},wt,Jc=(wt=class{constructor(e,n){w(this,"_defaultAttributes");w(this,"_embeddedLanguagesMatcher");w(this,"_getBasicScopeAttributes",new jo(e=>{const n=this._scopeToLanguage(e),r=this._toStandardTokenType(e);return new ai(n,r)}));this._defaultAttributes=new ai(e,8),this._embeddedLanguagesMatcher=new Xc(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?wt._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(wt.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!")}},w(wt,"_NULL_SCOPE_METADATA",new ai(0,0)),w(wt,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),wt),Xc=class{constructor(t){w(this,"values");w(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,r])=>Go(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},ws=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function Ko(t,e,n,r,i,s,o,a){const l=e.content.length;let u=!1,c=-1;if(o){const p=Qc(t,e,n,r,i,s);i=p.stack,r=p.linePos,n=p.isFirstLine,c=p.anchorPosition}const h=Date.now();for(;!u;){if(a!==0&&Date.now()-h>a)return new ws(i,!0);d()}return new ws(i,!1);function d(){const p=Zc(t,e,n,r,i,c);if(!p){s.produce(i,l),u=!0;return}const _=p.captureIndices,b=p.matchedRuleId,m=_&&_.length>0?_[0].end>r:!1;if(b===qc){const v=i.getRule(t);s.produce(i,_[0].start),i=i.withContentNameScopesList(i.nameScopesList),Gn(t,e,n,i,s,v.endCaptures,_),s.produce(i,_[0].end);const x=i;if(i=i.parent,c=x.getAnchorPos(),!m&&x.getEnterPos()===r){i=x,s.produce(i,l),u=!0;return}}else{const v=t.getRule(b);s.produce(i,_[0].start);const x=i,E=v.getName(e.content,_),A=i.contentNameScopesList.pushAttributed(E,t);if(i=i.push(b,r,c,_[0].end===l,null,A,A),v instanceof Pi){const P=v;Gn(t,e,n,i,s,P.beginCaptures,_),s.produce(i,_[0].end),c=_[0].end;const S=P.getContentName(e.content,_),I=A.pushAttributed(S,t);if(i=i.withContentNameScopesList(I),P.endHasBackReferences&&(i=i.withEndRule(P.getEndWithResolvedBackReferences(e.content,_))),!m&&x.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),u=!0;return}}else if(v instanceof Cr){const P=v;Gn(t,e,n,i,s,P.beginCaptures,_),s.produce(i,_[0].end),c=_[0].end;const S=P.getContentName(e.content,_),I=A.pushAttributed(S,t);if(i=i.withContentNameScopesList(I),P.whileHasBackReferences&&(i=i.withEndRule(P.getWhileWithResolvedBackReferences(e.content,_))),!m&&x.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),u=!0;return}}else if(Gn(t,e,n,i,s,v.captures,_),s.produce(i,_[0].end),i=i.pop(),!m){i=i.safePop(),s.produce(i,l),u=!0;return}}_[0].end>r&&(r=_[0].end,n=!1)}}function Qc(t,e,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1;const a=[];for(let l=i;l;l=l.pop()){const u=l.getRule(t);u instanceof Cr&&a.push({rule:u,stack:l})}for(let l=a.pop();l;l=a.pop()){const{ruleScanner:u,findOptions:c}=nd(l.rule,t,l.stack.endRule,n,r===o),h=u.findNextMatchSync(e,r,c);if(h){if(h.ruleId!==zo){i=l.stack.pop();break}h.captureIndices&&h.captureIndices.length&&(s.produce(l.stack,h.captureIndices[0].start),Gn(t,e,n,l.stack,s,l.rule.whileCaptures,h.captureIndices),s.produce(l.stack,h.captureIndices[0].end),o=h.captureIndices[0].end,h.captureIndices[0].end>r&&(r=h.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Zc(t,e,n,r,i,s){const o=ed(t,e,n,r,i,s),a=t.getInjections();if(a.length===0)return o;const l=td(a,t,e,n,r,i,s);if(!l)return o;if(!o)return l;const u=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<u||l.priorityMatch&&c===u?l:o}function ed(t,e,n,r,i,s){const o=i.getRule(t),{ruleScanner:a,findOptions:l}=Yo(o,t,i.endRule,n,r===s),u=a.findNextMatchSync(e,r,l);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function td(t,e,n,r,i,s,o){let a=Number.MAX_VALUE,l=null,u,c=0;const h=s.contentNameScopesList.getScopeNames();for(let d=0,p=t.length;d<p;d++){const _=t[d];if(!_.matcher(h))continue;const b=e.getRule(_.ruleId),{ruleScanner:m,findOptions:v}=Yo(b,e,null,r,i===o),x=m.findNextMatchSync(n,i,v);if(!x)continue;const E=x.captureIndices[0].start;if(!(E>=a)&&(a=E,l=x.captureIndices,u=x.ruleId,c=_.priority,a===i))break}return l?{priorityMatch:c===-1,captureIndices:l,matchedRuleId:u}:null}function Yo(t,e,n,r,i){return{ruleScanner:t.compileAG(e,n,r,i),findOptions:0}}function nd(t,e,n,r,i){return{ruleScanner:t.compileWhileAG(e,n,r,i),findOptions:0}}function Gn(t,e,n,r,i,s,o){if(s.length===0)return;const a=e.content,l=Math.min(s.length,o.length),u=[],c=o[0].end;for(let h=0;h<l;h++){const d=s[h];if(d===null)continue;const p=o[h];if(p.length===0)continue;if(p.start>c)break;for(;u.length>0&&u[u.length-1].endPos<=p.start;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?i.produceFromScopes(u[u.length-1].scopes,p.start):i.produce(r,p.start),d.retokenizeCapturedWithRuleId){const b=d.getName(a,o),m=r.contentNameScopesList.pushAttributed(b,t),v=d.getContentName(a,o),x=m.pushAttributed(v,t),E=r.push(d.retokenizeCapturedWithRuleId,p.start,-1,!1,null,m,x),A=t.createOnigString(a.substring(0,p.end));Ko(t,A,n&&p.start===0,p.start,E,i,!1,0),$o(A);continue}const _=d.getName(a,o);if(_!==null){const m=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(_,t);u.push(new rd(m,p.end))}}for(;u.length>0;)i.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var rd=class{constructor(t,e){w(this,"scopes");w(this,"endPos");this.scopes=t,this.endPos=e}};function id(t,e,n,r,i,s,o,a){return new od(t,e,n,r,i,s,o,a)}function xs(t,e,n,r,i){const s=Lr(e,Ir),o=Wo.getCompiledRuleId(n,r,i.repository);for(const a of s)t.push({debugSelector:e,matcher:a.matcher,ruleId:o,grammar:i,priority:a.priority})}function Ir(t,e){if(e.length<t.length)return!1;let n=0;return t.every(r=>{for(let i=n;i<e.length;i++)if(sd(e[i],r))return n=i+1,!0;return!1})}function sd(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var od=class{constructor(t,e,n,r,i,s,o,a){w(this,"_rootId");w(this,"_lastRuleId");w(this,"_ruleId2desc");w(this,"_includedGrammars");w(this,"_grammarRepository");w(this,"_grammar");w(this,"_injections");w(this,"_basicScopeAttributesProvider");w(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new Jc(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Rs(e,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const l of Object.keys(i)){const u=Lr(l,Ir);for(const c of u)this._tokenTypeMatchers.push({matcher:c.matcher,type:i[l]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},e=[],n=this._rootScopeName,r=t.lookup(n);if(r){const i=r.injections;if(i)for(let o in i)xs(e,o,i[o],this,r);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const a=this.getExternalGrammar(o);if(a){const l=a.injectionSelector;l&&xs(e,l,a,this,a)}})}return e.sort((i,s)=>i.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=Rs(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const r=this._tokenize(t,e,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(t,e,n=0){const r=this._tokenize(t,e,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(t,e,n,r){this._rootId===-1&&(this._rootId=Wo.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!e||e===Li.NULL){i=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),c=this.themeProvider.getDefaults(),h=xn.set(0,u.languageId,u.tokenType,null,c.fontStyle,c.foregroundId,c.backgroundId),d=this.getRule(this._rootId).getName(null,null);let p;d?p=Hn.createRootAndLookUpScopeName(d,h,this):p=Hn.createRoot("unknown",h),e=new Li(null,this._rootId,-1,-1,!1,null,p,p)}else i=!1,e.reset();t=t+`
`;const s=this.createOnigString(t),o=s.content.length,a=new ld(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),l=Ko(this,s,i,0,e,a,!0,r);return $o(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function Rs(t,e){return t=Ac(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Hn=class ct{constructor(e,n,r){this.parent=e,this.scopePath=n,this.tokenAttributes=r}static fromExtension(e,n){let r=e,i=(e==null?void 0:e.scopePath)??null;for(const s of n)i=oi.push(i,s.scopeNames),r=new ct(r,i,s.encodedTokenAttributes);return r}static createRoot(e,n){return new ct(null,new oi(null,e),n)}static createRootAndLookUpScopeName(e,n,r){const i=r.getMetadataForScope(e),s=new oi(null,e),o=r.themeProvider.themeMatch(s),a=ct.mergeAttributes(n,i,o);return new ct(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return ct.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,r){let i=-1,s=0,o=0;return r!==null&&(i=r.fontStyle,s=r.foregroundId,o=r.backgroundId),xn.set(e,n.languageId,n.tokenType,null,i,s,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return ct._pushAttributed(this,e,n);const r=e.split(/ /g);let i=this;for(const s of r)i=ct._pushAttributed(i,s,n);return i}static _pushAttributed(e,n,r){const i=r.getMetadataForScope(n),s=e.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=ct.mergeAttributes(e.tokenAttributes,i,o);return new ct(e,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var i;const n=[];let r=this;for(;r&&r!==e;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===e?n.reverse():void 0}},We,Li=(We=class{constructor(e,n,r,i,s,o,a,l){w(this,"_stackElementBrand");w(this,"_enterPos");w(this,"_anchorPos");w(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=a,this.contentNameScopesList=l,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(e){return e===null?!1:We._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Hn.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){We._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,r,i,s,o,a){return new We(this,e,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var r,i;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new We(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const r=Hn.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new We(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Hn.fromExtension(r,n.contentNameScopesList))}},w(We,"NULL",new We(null,0,0,0,!1,null,null,null)),We),ad=class{constructor(t,e){w(this,"balancedBracketScopes");w(this,"unbalancedBracketScopes");w(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Lr(n,Ir).map(r=>r.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>Lr(n,Ir).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},ld=class{constructor(t,e,n,r){w(this,"_emitBinaryTokens");w(this,"_lineText");w(this,"_tokens");w(this,"_binaryTokens");w(this,"_lastTokenEndIndex");w(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var r;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let i=(t==null?void 0:t.tokenAttributes)??0,s=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const a of this._tokenTypeOverrides)a.matcher(o)&&(i=xn.set(i,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(i=xn.set(i,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},ud=class{constructor(t,e){w(this,"_grammars",new Map);w(this,"_rawGrammars",new Map);w(this,"_injectionGrammars",new Map);w(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,r,i){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,id(t,s,e,n,r,i,this,this._onigLib))}return this._grammars.get(t)}},cd=class{constructor(e){w(this,"_options");w(this,"_syncRegistry");w(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new ud(Pr.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(Pr.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,r){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(e,n,r){return this._loadGrammar(e,n,r.embeddedLanguages,r.tokenTypes,new ad(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,r,i,s){const o=new Gc(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(a=>this._loadSingleGrammar(a.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,r,i,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(e,n=[],r=0,i=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,r,i)}_grammarForScopeName(e,n=0,r=null,i=null,s=null){return this._syncRegistry.grammarForScopeName(e,n,r,i,s)}},ki=Li.NULL;const dd=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class ar{constructor(e,n,r){this.normal=n,this.property=e,r&&(this.space=r)}}ar.prototype.normal={};ar.prototype.property={};ar.prototype.space=void 0;function Jo(t,e){const n={},r={};for(const i of t)Object.assign(n,i.property),Object.assign(r,i.normal);return new ar(n,r,e)}function Ci(t){return t.toLowerCase()}class Oe{constructor(e,n){this.attribute=n,this.property=e}}Oe.prototype.attribute="";Oe.prototype.booleanish=!1;Oe.prototype.boolean=!1;Oe.prototype.commaOrSpaceSeparated=!1;Oe.prototype.commaSeparated=!1;Oe.prototype.defined=!1;Oe.prototype.mustUseProperty=!1;Oe.prototype.number=!1;Oe.prototype.overloadedBoolean=!1;Oe.prototype.property="";Oe.prototype.spaceSeparated=!1;Oe.prototype.space=void 0;let fd=0;const B=rn(),ce=rn(),Ii=rn(),T=rn(),ee=rn(),Qt=rn(),Ne=rn();function rn(){return 2**++fd}const Oi=Object.freeze(Object.defineProperty({__proto__:null,boolean:B,booleanish:ce,commaOrSpaceSeparated:Ne,commaSeparated:Qt,number:T,overloadedBoolean:Ii,spaceSeparated:ee},Symbol.toStringTag,{value:"Module"})),li=Object.keys(Oi);class Yi extends Oe{constructor(e,n,r,i){let s=-1;if(super(e,n),As(this,"space",i),typeof r=="number")for(;++s<li.length;){const o=li[s];As(this,li[s],(r&Oi[o])===Oi[o])}}}Yi.prototype.defined=!0;function As(t,e,n){n&&(t[e]=n)}function Sn(t){const e={},n={};for(const[r,i]of Object.entries(t.properties)){const s=new Yi(r,t.transform(t.attributes||{},r),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,n[Ci(r)]=r,n[Ci(s.attribute)]=r}return new ar(e,n,t.space)}const Xo=Sn({properties:{ariaActiveDescendant:null,ariaAtomic:ce,ariaAutoComplete:null,ariaBusy:ce,ariaChecked:ce,ariaColCount:T,ariaColIndex:T,ariaColSpan:T,ariaControls:ee,ariaCurrent:null,ariaDescribedBy:ee,ariaDetails:null,ariaDisabled:ce,ariaDropEffect:ee,ariaErrorMessage:null,ariaExpanded:ce,ariaFlowTo:ee,ariaGrabbed:ce,ariaHasPopup:null,ariaHidden:ce,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ee,ariaLevel:T,ariaLive:null,ariaModal:ce,ariaMultiLine:ce,ariaMultiSelectable:ce,ariaOrientation:null,ariaOwns:ee,ariaPlaceholder:null,ariaPosInSet:T,ariaPressed:ce,ariaReadOnly:ce,ariaRelevant:null,ariaRequired:ce,ariaRoleDescription:ee,ariaRowCount:T,ariaRowIndex:T,ariaRowSpan:T,ariaSelected:ce,ariaSetSize:T,ariaSort:null,ariaValueMax:T,ariaValueMin:T,ariaValueNow:T,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function Qo(t,e){return e in t?t[e]:e}function Zo(t,e){return Qo(t,e.toLowerCase())}const pd=Sn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Qt,acceptCharset:ee,accessKey:ee,action:null,allow:null,allowFullScreen:B,allowPaymentRequest:B,allowUserMedia:B,alpha:B,alt:null,as:null,async:B,autoCapitalize:null,autoComplete:ee,autoFocus:B,autoPlay:B,blocking:ee,capture:null,charSet:null,checked:B,cite:null,className:ee,closedBy:null,colorSpace:null,cols:T,colSpan:T,command:null,commandFor:null,content:null,contentEditable:ce,controls:B,controlsList:ee,coords:T|Qt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:B,defer:B,dir:null,dirName:null,disabled:B,download:Ii,draggable:ce,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:B,formTarget:null,headers:ee,height:T,hidden:Ii,high:T,href:null,hrefLang:null,htmlFor:ee,httpEquiv:ee,id:null,imageSizes:null,imageSrcSet:null,inert:B,inputMode:null,integrity:null,is:null,isMap:B,itemId:null,itemProp:ee,itemRef:ee,itemScope:B,itemType:ee,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:B,low:T,manifest:null,max:null,maxLength:T,media:null,method:null,min:null,minLength:T,multiple:B,muted:B,name:null,nonce:null,noModule:B,noValidate:B,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:B,optimum:T,pattern:null,ping:ee,placeholder:null,playsInline:B,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:B,referrerPolicy:null,rel:ee,required:B,reversed:B,rows:T,rowSpan:T,sandbox:ee,scope:null,scoped:B,seamless:B,selected:B,shadowRootClonable:B,shadowRootCustomElementRegistry:B,shadowRootDelegatesFocus:B,shadowRootMode:null,shadowRootSerializable:B,shape:null,size:T,sizes:null,slot:null,span:T,spellCheck:ce,src:null,srcDoc:null,srcLang:null,srcSet:null,start:T,step:null,style:null,tabIndex:T,target:null,title:null,translate:null,type:null,typeMustMatch:B,useMap:null,value:ce,width:T,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ee,axis:null,background:null,bgColor:null,border:T,borderColor:null,bottomMargin:T,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:B,declare:B,event:null,face:null,frame:null,frameBorder:null,hSpace:T,leftMargin:T,link:null,longDesc:null,lowSrc:null,marginHeight:T,marginWidth:T,noResize:B,noHref:B,noShade:B,noWrap:B,object:null,profile:null,prompt:null,rev:null,rightMargin:T,rules:null,scheme:null,scrolling:ce,standby:null,summary:null,text:null,topMargin:T,valueType:null,version:null,vAlign:null,vLink:null,vSpace:T,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:B,disablePictureInPicture:B,disableRemotePlayback:B,exportParts:Qt,part:ee,prefix:null,property:null,results:T,security:null,unselectable:null},space:"html",transform:Zo}),hd=Sn({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:Ne,accentHeight:T,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:T,amplitude:T,arabicForm:null,ascent:T,attributeName:null,attributeType:null,azimuth:T,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:T,by:null,calcMode:null,capHeight:T,className:ee,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:T,diffuseConstant:T,direction:null,display:null,dur:null,divisor:T,dominantBaseline:null,download:B,dx:null,dy:null,edgeMode:null,editable:null,elevation:T,enableBackground:null,end:null,event:null,exponent:T,externalResourcesRequired:null,fill:null,fillOpacity:T,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:Qt,g2:Qt,glyphName:Qt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:T,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:T,horizOriginX:T,horizOriginY:T,id:null,ideographic:T,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:T,k:T,k1:T,k2:T,k3:T,k4:T,kernelMatrix:Ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:T,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:T,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:T,overlineThickness:T,paintOrder:null,panose1:null,path:null,pathLength:T,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ee,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:T,pointsAtY:T,pointsAtZ:T,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ne,rev:Ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ne,requiredFeatures:Ne,requiredFonts:Ne,requiredFormats:Ne,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:T,specularExponent:T,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:T,strikethroughThickness:T,string:null,stroke:null,strokeDashArray:Ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:T,strokeOpacity:T,strokeWidth:null,style:null,surfaceScale:T,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ne,tabIndex:T,tableValues:null,target:null,targetX:T,targetY:T,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:T,underlineThickness:T,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:T,values:null,vAlphabetic:T,vMathematical:T,vectorEffect:null,vHanging:T,vIdeographic:T,version:null,vertAdvY:T,vertOriginX:T,vertOriginY:T,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:T,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Qo}),ea=Sn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),ta=Sn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zo}),na=Sn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),md=/[A-Z]/g,Ss=/-[a-z]/g,_d=/^data[-\w.:]+$/i;function gd(t,e){const n=Ci(e);let r=e,i=Oe;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&_d.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Ss,yd);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Ss.test(s)){let o=s.replace(md,vd);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Yi}return new i(r,e)}function vd(t){return"-"+t.toLowerCase()}function yd(t){return t.charAt(1).toUpperCase()}const Ed=Jo([Xo,pd,ea,ta,na],"html"),ra=Jo([Xo,hd,ea,ta,na],"svg"),Ts={}.hasOwnProperty;function bd(t,e){const n=e||{};function r(i,...s){let o=r.invalid;const a=r.handlers;if(i&&Ts.call(i,t)){const l=String(i[t]);o=Ts.call(a,l)?a[l]:r.unknown}if(o)return o.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const wd=/["&'<>`]/g,xd=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Rd=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Ad=/[|\\{}()[\]^$+*?.]/g,Ps=new WeakMap;function Sd(t,e){if(t=t.replace(e.subset?Td(e.subset):wd,r),e.subset||e.escapeOnly)return t;return t.replace(xd,n).replace(Rd,r);function n(i,s,o){return e.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function r(i,s,o){return e.format(i.charCodeAt(0),o.charCodeAt(s+1),e)}}function Td(t){let e=Ps.get(t);return e||(e=Pd(t),Ps.set(t,e)),e}function Pd(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(Ad,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const Ld=/[\dA-Fa-f]/;function kd(t,e,n){const r="&#x"+t.toString(16).toUpperCase();return n&&e&&!Ld.test(String.fromCharCode(e))?r:r+";"}const Cd=/\d/;function Id(t,e,n){const r="&#"+String(t);return n&&e&&!Cd.test(String.fromCharCode(e))?r:r+";"}const Od=["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"],ui={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:"€"},Dd=["cent","copy","divide","gt","lt","not","para","times"],ia={}.hasOwnProperty,Di={};let dr;for(dr in ui)ia.call(ui,dr)&&(Di[ui[dr]]=dr);const Nd=/[^\dA-Za-z]/;function Vd(t,e,n,r){const i=String.fromCharCode(t);if(ia.call(Di,i)){const s=Di[i],o="&"+s;return n&&Od.includes(s)&&!Dd.includes(s)&&(!r||e&&e!==61&&Nd.test(String.fromCharCode(e)))?o:o+";"}return""}function Md(t,e,n){let r=kd(t,e,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=Vd(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const s=Id(t,e,n.omitOptionalSemicolons);s.length<r.length&&(r=s)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function cn(t,e){return Sd(t,Object.assign({format:Md},e))}const Bd=/^>|^->|<!--|-->|--!>|<!-$/g,Gd=[">"],jd=["<",">"];function Fd(t,e,n,r){return r.settings.bogusComments?"<?"+cn(t.value,Object.assign({},r.settings.characterReferences,{subset:Gd}))+">":"<!--"+t.value.replace(Bd,i)+"-->";function i(s){return cn(s,Object.assign({},r.settings.characterReferences,{subset:jd}))}}function Ud(t,e,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Ls(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;i!==-1;)r++,i=n.indexOf(e,i+e.length);return r}function $d(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Hd(t){return t.join(" ").trim()}const zd=/[ \t\n\f\r]/g;function Ji(t){return typeof t=="object"?t.type==="text"?ks(t.value):!1:ks(t)}function ks(t){return t.replace(zd,"")===""}const he=oa(1),sa=oa(-1),Wd=[];function oa(t){return e;function e(n,r,i){const s=n?n.children:Wd;let o=(r||0)+t,a=s[o];if(!i)for(;a&&Ji(a);)o+=t,a=s[o];return a}}const qd={}.hasOwnProperty;function aa(t){return e;function e(n,r,i){return qd.call(t,n.tagName)&&t[n.tagName](n,r,i)}}const Xi=aa({body:Yd,caption:ci,colgroup:ci,dd:Zd,dt:Qd,head:ci,html:Kd,li:Xd,optgroup:ef,option:tf,p:Jd,rp:Cs,rt:Cs,tbody:rf,td:Is,tfoot:sf,th:Is,thead:nf,tr:of});function ci(t,e,n){const r=he(n,e,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Ji(r.value.charAt(0)))}function Kd(t,e,n){const r=he(n,e);return!r||r.type!=="comment"}function Yd(t,e,n){const r=he(n,e);return!r||r.type!=="comment"}function Jd(t,e,n){const r=he(n,e);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.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 Xd(t,e,n){const r=he(n,e);return!r||r.type==="element"&&r.tagName==="li"}function Qd(t,e,n){const r=he(n,e);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function Zd(t,e,n){const r=he(n,e);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Cs(t,e,n){const r=he(n,e);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ef(t,e,n){const r=he(n,e);return!r||r.type==="element"&&r.tagName==="optgroup"}function tf(t,e,n){const r=he(n,e);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function nf(t,e,n){const r=he(n,e);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function rf(t,e,n){const r=he(n,e);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function sf(t,e,n){return!he(n,e)}function of(t,e,n){const r=he(n,e);return!r||r.type==="element"&&r.tagName==="tr"}function Is(t,e,n){const r=he(n,e);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const af=aa({body:cf,colgroup:df,head:uf,html:lf,tbody:ff});function lf(t){const e=he(t,-1);return!e||e.type!=="comment"}function uf(t){const e=new Set;for(const r of t.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(e.has(r.tagName))return!1;e.add(r.tagName)}const n=t.children[0];return!n||n.type==="element"}function cf(t){const e=he(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Ji(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function df(t,e,n){const r=sa(n,e),i=he(t,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&Xi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function ff(t,e,n){const r=sa(n,e),i=he(t,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&Xi(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const fr={name:[[`
\f\r &/=>`.split(""),`
\f\r "&'/=>\``.split("")],[`\0
\f\r "&'/<=>`.split(""),`\0
\f\r "&'/<=>\``.split("")]],unquoted:[[`
\f\r &>`.split(""),`\0
\f\r "&'<=>\``.split("")],[`\0
\f\r "&'<=>\``.split(""),`\0
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function pf(t,e,n,r){const i=r.schema,s=i.space==="svg"?!1:r.settings.omitOptionalTags;let o=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(t.tagName.toLowerCase());const a=[];let l;i.space==="html"&&t.tagName==="svg"&&(r.schema=ra);const u=hf(r,t.properties),c=r.all(i.space==="html"&&t.tagName==="template"?t.content:t);return r.schema=i,c&&(o=!1),(u||!s||!af(t,e,n))&&(a.push("<",t.tagName,u?" "+u:""),o&&(i.space==="svg"||r.settings.closeSelfClosing)&&(l=u.charAt(u.length-1),(!r.settings.tightSelfClosing||l==="/"||l&&l!=='"'&&l!=="'")&&a.push(" "),a.push("/")),a.push(">")),a.push(c),!o&&(!s||!Xi(t,e,n))&&a.push("</"+t.tagName+">"),a.join("")}function hf(t,e){const n=[];let r=-1,i;if(e){for(i in e)if(e[i]!==null&&e[i]!==void 0){const s=mf(t,i,e[i]);s&&n.push(s)}}for(;++r<n.length;){const s=t.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&s!=='"'&&s!=="'"&&(n[r]+=" ")}return n.join("")}function mf(t,e,n){const r=gd(t.schema,e),i=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,a;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const l=cn(r.attribute,Object.assign({},t.settings.characterReferences,{subset:fr.name[i][s]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?$d:Hd)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?l:(t.settings.preferUnquoted&&(a=cn(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:fr.unquoted[i][s]}))),a!==n&&(t.settings.quoteSmart&&Ls(n,o)>Ls(n,t.alternative)&&(o=t.alternative),a=o+cn(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?fr.single:fr.double)[i][s],attribute:!0}))+o),l+(a&&"="+a))}const _f=["<","&"];function la(t,e,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:cn(t.value,Object.assign({},r.settings.characterReferences,{subset:_f}))}function gf(t,e,n,r){return r.settings.allowDangerousHtml?t.value:la(t,e,n,r)}function vf(t,e,n,r){return r.all(t)}const yf=bd("type",{invalid:Ef,unknown:bf,handlers:{comment:Fd,doctype:Ud,element:pf,raw:gf,root:vf,text:la}});function Ef(t){throw new Error("Expected node, not `"+t+"`")}function bf(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const wf={},xf={},Rf=[];function Af(t,e){const n=wf,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:Sf,all:Tf,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||dd,characterReferences:n.characterReferences||xf,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?ra:Ed,quote:r,alternative:i}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function Sf(t,e,n){return yf(t,e,n,this)}function Tf(t){const e=[],n=t&&t.children||Rf;let r=-1;for(;++r<n.length;)e[r]=this.one(n[r],r,t);return e.join("")}function Pf(t){return Array.isArray(t)?t:[t]}function Kr(t,e=!1){var s;const n=t.split(/(\r?\n)/g);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const a=e?n[o]+(n[o+1]||""):n[o];i.push([a,r]),r+=n[o].length,r+=((s=n[o+1])==null?void 0:s.length)||0}return i}function Qi(t){return!t||["plaintext","txt","text","plain"].includes(t)}function ua(t){return t==="ansi"||Qi(t)}function Zi(t){return t==="none"}function ca(t){return Zi(t)}function da(t,e){var r;if(!e)return t;t.properties||(t.properties={}),(r=t.properties).class||(r.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const i of n)i&&!t.properties.class.includes(i)&&t.properties.class.push(i);return t}function Lf(t,e){let n=0;const r=[];for(const i of e)i>n&&r.push({...t,content:t.content.slice(n,i),offset:t.offset+n}),n=i;return n<t.content.length&&r.push({...t,content:t.content.slice(n),offset:t.offset+n}),r}function kf(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((r,i)=>r-i);return n.length?t.map(r=>r.flatMap(i=>{const s=n.filter(o=>i.offset<o&&o<i.offset+i.content.length).map(o=>o-i.offset).sort((o,a)=>o-a);return s.length?Lf(i,s):i})):t}async function fa(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function Or(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},r=typeof t=="string"?t:t.name;for(const[i,s]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof s=="string"?n[i]=s:i===r&&Object.assign(n,s);return n}function Ut(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function pa(t){const e={};return t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle&&(t.fontStyle&xt.Italic&&(e["font-style"]="italic"),t.fontStyle&xt.Bold&&(e["font-weight"]="bold"),t.fontStyle&xt.Underline&&(e["text-decoration"]="underline")),e}function Cf(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}function If(t){const e=Kr(t,!0).map(([i])=>i);function n(i){if(i===t.length)return{line:e.length-1,character:e[e.length-1].length};let s=i,o=0;for(const a of e){if(s<a.length)break;s-=a.length,o++}return{line:o,character:s}}function r(i,s){let o=0;for(let a=0;a<i;a++)o+=e[a].length;return o+=s,o}return{lines:e,indexToPos:n,posToIndex:r}}class Te extends Error{constructor(e){super(e),this.name="ShikiError"}}const ha=new WeakMap;function Yr(t,e){ha.set(t,e)}function Jn(t){return ha.get(t)}class Tn{constructor(...e){w(this,"_stacks",{});w(this,"lang");if(e.length===2){const[n,r]=e;this.lang=r,this._stacks=n}else{const[n,r,i]=e;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new Tn(Object.fromEntries(Pf(n).map(r=>[r,ki])),e)}getInternalStack(e=this.theme){return this._stacks[e]}get scopes(){return Os(this._stacks[this.theme])}getScopes(e=this.theme){return Os(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.scopes}}}function Os(t){const e=[],n=new Set;function r(i){var o;if(n.has(i))return;n.add(i);const s=(o=i==null?void 0:i.nameScopesList)==null?void 0:o.scopeName;s&&e.push(s),i.parent&&r(i.parent)}return r(t),e}function Of(t,e){if(!(t instanceof Tn))throw new Te("Invalid grammar state");return t.getInternalStack(e)}function Df(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let r=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new Te(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...i.indexToPos(o),offset:o}}else{const a=i.lines[o.line];if(a===void 0)throw new Te(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${i.lines.length}`);if(o.character<0||o.character>a.length)throw new Te(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${a.length}`);return{...o,offset:i.posToIndex(o.line,o.character)}}};const i=If(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:r(o.start),end:r(o.end)}));Nf(s),t.set(n.meta,{decorations:s,converter:i,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){var o;if(!((o=this.options.decorations)!=null&&o.length))return;const i=e(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return kf(n,i)},code(n){var c;if(!((c=this.options.decorations)!=null&&c.length))return;const r=e(this),i=Array.from(n.children).filter(h=>h.type==="element"&&h.tagName==="span");if(i.length!==r.converter.lines.length)throw new Te(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function s(h,d,p,_){const b=i[h];let m="",v=-1,x=-1;if(d===0&&(v=0),p===0&&(x=0),p===Number.POSITIVE_INFINITY&&(x=b.children.length),v===-1||x===-1)for(let A=0;A<b.children.length;A++)m+=ma(b.children[A]),v===-1&&m.length===d&&(v=A+1),x===-1&&m.length===p&&(x=A+1);if(v===-1)throw new Te(`Failed to find start index for decoration ${JSON.stringify(_.start)}`);if(x===-1)throw new Te(`Failed to find end index for decoration ${JSON.stringify(_.end)}`);const E=b.children.slice(v,x);if(!_.alwaysWrap&&E.length===b.children.length)a(b,_,"line");else if(!_.alwaysWrap&&E.length===1&&E[0].type==="element")a(E[0],_,"token");else{const A={type:"element",tagName:"span",properties:{},children:E};a(A,_,"wrapper"),b.children.splice(v,E.length,A)}}function o(h,d){i[h]=a(i[h],d,"line")}function a(h,d,p){var m;const _=d.properties||{},b=d.transform||(v=>v);return h.tagName=d.tagName||"span",h.properties={...h.properties,..._,class:h.properties.class},(m=d.properties)!=null&&m.class&&da(h,d.properties.class),h=b(h,p)||h,h}const l=[],u=r.decorations.sort((h,d)=>d.start.offset-h.start.offset);for(const h of u){const{start:d,end:p}=h;if(d.line===p.line)s(d.line,d.character,p.character,h);else if(d.line<p.line){s(d.line,d.character,Number.POSITIVE_INFINITY,h);for(let _=d.line+1;_<p.line;_++)l.unshift(()=>o(_,h));s(p.line,0,p.character,h)}}l.forEach(h=>h())}}}function Nf(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Te(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=e+1;r<t.length;r++){const i=t[r],s=n.start.offset<i.start.offset&&i.start.offset<n.end.offset,o=n.start.offset<i.end.offset&&i.end.offset<n.end.offset,a=i.start.offset<n.start.offset&&n.start.offset<i.end.offset,l=i.start.offset<n.end.offset&&n.end.offset<i.end.offset;if(s||o||a||l){if(o&&o||a&&l)continue;throw new Te(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function ma(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(ma).join(""):""}const Vf=[Df()];function Dr(t){return[...t.transformers||[],...Vf]}var $t=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],di={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",9:"strikethrough"};function Mf(t,e){const n=t.indexOf("\x1B[",e);if(n!==-1){const r=t.indexOf("m",n);return{sequence:t.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:t.length}}function Ds(t,e){let n=1;const r=t[e+n++];let i;if(r==="2"){const s=[t[e+n++],t[e+n++],t[e+n]].map(o=>Number.parseInt(o));s.length===3&&!s.some(o=>Number.isNaN(o))&&(i={type:"rgb",rgb:s})}else if(r==="5"){const s=Number.parseInt(t[e+n]);Number.isNaN(s)||(i={type:"table",index:Number(s)})}return[n,i]}function Bf(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n],i=Number.parseInt(r);if(!Number.isNaN(i))if(i===0)e.push({type:"resetAll"});else if(i<=9)di[i]&&e.push({type:"setDecoration",value:di[i]});else if(i<=29){const s=di[i-20];s&&e.push({type:"resetDecoration",value:s})}else if(i<=37)e.push({type:"setForegroundColor",value:{type:"named",name:$t[i-30]}});else if(i===38){const[s,o]=Ds(t,n);o&&e.push({type:"setForegroundColor",value:o}),n+=s}else if(i===39)e.push({type:"resetForegroundColor"});else if(i<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:$t[i-40]}});else if(i===48){const[s,o]=Ds(t,n);o&&e.push({type:"setBackgroundColor",value:o}),n+=s}else i===49?e.push({type:"resetBackgroundColor"}):i>=90&&i<=97?e.push({type:"setForegroundColor",value:{type:"named",name:$t[i-90+8]}}):i>=100&&i<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:$t[i-100+8]}})}return e}function Gf(){let t=null,e=null,n=new Set;return{parse(r){const i=[];let s=0;do{const o=Mf(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const l=Bf(o.sequence);for(const u of l)u.type==="resetAll"?(t=null,e=null,n.clear()):u.type==="resetForegroundColor"?t=null:u.type==="resetBackgroundColor"?e=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of l)u.type==="setForegroundColor"?t=u.value:u.type==="setBackgroundColor"?e=u.value:u.type==="setDecoration"&&n.add(u.value)}s=o.position}while(s<r.length);return i}}}var jf={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 Ff(t=jf){function e(a){return t[a]}function n(a){return`#${a.map(l=>Math.max(0,Math.min(l,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let u=0;u<$t.length;u++)r.push(e($t[u]));let a=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let c=0;c<6;c++)for(let h=0;h<6;h++)r.push(n([a[u],a[c],a[h]]));let l=8;for(let u=0;u<24;u++,l+=10)r.push(n([l,l,l]));return r}function s(a){return i()[a]}function o(a){switch(a.type){case"named":return e(a.name);case"rgb":return n(a.rgb);case"table":return s(a.index)}}return{value:o}}function Uf(t,e,n){const r=Or(t,n),i=Kr(e),s=Ff(Object.fromEntries($t.map(a=>{var l;return[a,(l=t.colors)==null?void 0:l[`terminal.ansi${a[0].toUpperCase()}${a.substring(1)}`]]}))),o=Gf();return i.map(a=>o.parse(a[0]).map(l=>{let u,c;l.decorations.has("reverse")?(u=l.background?s.value(l.background):t.bg,c=l.foreground?s.value(l.foreground):t.fg):(u=l.foreground?s.value(l.foreground):t.fg,c=l.background?s.value(l.background):void 0),u=Ut(u,r),c=Ut(c,r),l.decorations.has("dim")&&(u=$f(u));let h=xt.None;return l.decorations.has("bold")&&(h|=xt.Bold),l.decorations.has("italic")&&(h|=xt.Italic),l.decorations.has("underline")&&(h|=xt.Underline),{content:l.value,offset:a[1],color:u,bgColor:c,fontStyle:h}}))}function $f(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/);if(e)if(e[3]){const r=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${r}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(r=>`${r}${r}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function es(t,e,n={}){const{lang:r="text",theme:i=t.getLoadedThemes()[0]}=n;if(Qi(r)||Zi(i))return Kr(e).map(l=>[{content:l[0],offset:l[1]}]);const{theme:s,colorMap:o}=t.setTheme(i);if(r==="ansi")return Uf(s,e,n);const a=t.getLanguage(r);if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Rt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Rt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return zf(e,a,s,o,n)}function Hf(...t){if(t.length===2)return Jn(t[1]);const[e,n,r={}]=t,{lang:i="text",theme:s=e.getLoadedThemes()[0]}=r;if(Qi(i)||Zi(s))throw new Rt("Plain language does not have grammar state");if(i==="ansi")throw new Rt("ANSI language does not have grammar state");const{theme:o,colorMap:a}=e.setTheme(s),l=e.getLanguage(i);return new Tn(Nr(n,l,o,a,r).stateStack,l.name,o.name)}function zf(t,e,n,r,i){const s=Nr(t,e,n,r,i),o=new Tn(Nr(t,e,n,r,i).stateStack,e.name,n.name);return Yr(s.tokens,o),s.tokens}function Nr(t,e,n,r,i){const s=Or(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=Kr(t);let u=i.grammarState?Of(i.grammarState,n.name)??ki:i.grammarContextCode!=null?Nr(i.grammarContextCode,e,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:ki,c=[];const h=[];for(let d=0,p=l.length;d<p;d++){const[_,b]=l[d];if(_===""){c=[],h.push([]);continue}if(o>0&&_.length>=o){c=[],h.push([{content:_,offset:b,color:"",fontStyle:0}]);continue}let m,v,x;i.includeExplanation&&(m=e.tokenizeLine(_,u),v=m.tokens,x=0);const E=e.tokenizeLine2(_,u,a),A=E.tokens.length/2;for(let P=0;P<A;P++){const S=E.tokens[2*P],I=P+1<A?E.tokens[2*P+2]:_.length;if(S===I)continue;const k=E.tokens[2*P+1],$=Ut(r[xn.getForeground(k)],s),M=xn.getFontStyle(k),J={content:_.substring(S,I),offset:b+S,color:$,fontStyle:M};if(i.includeExplanation){const te=[];if(i.includeExplanation!=="scopeName")for(const Q of n.settings){let ne;switch(typeof Q.scope){case"string":ne=Q.scope.split(/,/).map(se=>se.trim());break;case"object":ne=Q.scope;break;default:continue}te.push({settings:Q,selectors:ne.map(se=>se.split(/ /))})}J.explanation=[];let ie=0;for(;S+ie<I;){const Q=v[x],ne=_.substring(Q.startIndex,Q.endIndex);ie+=ne.length,J.explanation.push({content:ne,scopes:i.includeExplanation==="scopeName"?Wf(Q.scopes):qf(te,Q.scopes)}),x+=1}}c.push(J)}h.push(c),c=[],u=E.ruleStack}return{tokens:h,stateStack:u}}function Wf(t){return t.map(e=>({scopeName:e}))}function qf(t,e){const n=[];for(let r=0,i=e.length;r<i;r++){const s=e[r];n[r]={scopeName:s,themeMatches:Yf(t,s,e.slice(0,r))}}return n}function Ns(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function Kf(t,e,n){if(!Ns(t[t.length-1],e))return!1;let r=t.length-2,i=n.length-1;for(;r>=0&&i>=0;)Ns(t[r],n[i])&&(r-=1),i-=1;return r===-1}function Yf(t,e,n){const r=[];for(const{selectors:i,settings:s}of t)for(const o of i)if(Kf(o,e,n)){r.push(s);break}return r}function _a(t,e,n){const r=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),i=r.map(l=>{const u=es(t,e,{...n,theme:l.theme}),c=Jn(u),h=typeof l.theme=="string"?l.theme:l.theme.name;return{tokens:u,state:c,theme:h}}),s=Jf(...i.map(l=>l.tokens)),o=s[0].map((l,u)=>l.map((c,h)=>{const d={content:c.content,variants:{},offset:c.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=c.explanation),s.forEach((p,_)=>{const{content:b,explanation:m,offset:v,...x}=p[u][h];d.variants[r[_].color]=x}),d})),a=i[0].state?new Tn(Object.fromEntries(i.map(l=>{var u;return[l.theme,(u=l.state)==null?void 0:u.getInternalStack(l.theme)]})),i[0].state.lang):void 0;return a&&Yr(o,a),o}function Jf(...t){const e=t.map(()=>[]),n=t.length;for(let r=0;r<t[0].length;r++){const i=t.map(l=>l[r]),s=e.map(()=>[]);e.forEach((l,u)=>l.push(s[u]));const o=i.map(()=>0),a=i.map(l=>l[0]);for(;a.every(l=>l);){const l=Math.min(...a.map(u=>u.content.length));for(let u=0;u<n;u++){const c=a[u];c.content.length===l?(s[u].push(c),o[u]+=1,a[u]=i[u][o[u]]):(s[u].push({...c,content:c.content.slice(0,l)}),a[u]={...c,content:c.content.slice(l),offset:c.offset+l})}}}return e}function Vr(t,e,n){let r,i,s,o,a,l;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:c="--shiki-"}=n,h=Object.entries(n.themes).filter(m=>m[1]).map(m=>({color:m[0],theme:m[1]})).sort((m,v)=>m.color===u?-1:v.color===u?1:0);if(h.length===0)throw new Rt("`themes` option must not be empty");const d=_a(t,e,n);if(l=Jn(d),u&&!h.find(m=>m.color===u))throw new Rt(`\`themes\` option must contain the defaultColor key \`${u}\``);const p=h.map(m=>t.getTheme(m.theme)),_=h.map(m=>m.color);s=d.map(m=>m.map(v=>Xf(v,_,c,u))),l&&Yr(s,l);const b=h.map(m=>Or(m.theme,n));i=h.map((m,v)=>(v===0&&u?"":`${c+m.color}:`)+(Ut(p[v].fg,b[v])||"inherit")).join(";"),r=h.map((m,v)=>(v===0&&u?"":`${c+m.color}-bg:`)+(Ut(p[v].bg,b[v])||"inherit")).join(";"),o=`shiki-themes ${p.map(m=>m.name).join(" ")}`,a=u?void 0:[i,r].join(";")}else if("theme"in n){const u=Or(n.theme,n);s=es(t,e,n);const c=t.getTheme(n.theme);r=Ut(c.bg,u),i=Ut(c.fg,u),o=c.name,l=Jn(s)}else throw new Rt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:a,grammarState:l}}function Xf(t,e,n,r){const i={content:t.content,explanation:t.explanation,offset:t.offset},s=e.map(l=>pa(t.variants[l])),o=new Set(s.flatMap(l=>Object.keys(l))),a={};return s.forEach((l,u)=>{for(const c of o){const h=l[c]||"inherit";if(u===0&&r)a[c]=h;else{const d=c==="color"?"":c==="background-color"?"-bg":`-${c}`,p=n+e[u]+(c==="color"?"":d);a[p]=h}}}),i.htmlStyle=a,i}function Mr(t,e,n,r={meta:{},options:n,codeToHast:(i,s)=>Mr(t,i,s),codeToTokens:(i,s)=>Vr(t,i,s)}){var p,_;let i=e;for(const b of Dr(n))i=((p=b.preprocess)==null?void 0:p.call(r,i,n))||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:u,grammarState:c}=Vr(t,i,n);const{mergeWhitespaces:h=!0}=n;h===!0?s=Zf(s):h==="never"&&(s=ep(s));const d={...r,get source(){return i}};for(const b of Dr(n))s=((_=b.tokens)==null?void 0:_.call(d,s))||s;return Qf(s,{...n,fg:o,bg:a,themeName:l,rootStyle:u},d,c)}function Qf(t,e,n,r=Jn(t)){var _,b,m;const i=Dr(e),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=e;let u={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...l!==!1&&l!=null?{tabindex:l.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([v])=>!v.startsWith("_")))},children:[]},c={type:"element",tagName:"code",properties:{},children:s};const h=[],d={...n,structure:a,addClassToHast:da,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return u},get code(){return c},get lines(){return h}};if(t.forEach((v,x)=>{var P,S;x&&(a==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):a==="classic"&&s.push({type:"text",value:`
`}));let E={type:"element",tagName:"span",properties:{class:"line"},children:[]},A=0;for(const I of v){let k={type:"element",tagName:"span",properties:{...I.htmlAttrs},children:[{type:"text",value:I.content}]};I.htmlStyle;const $=Cf(I.htmlStyle||pa(I));$&&(k.properties.style=$);for(const M of i)k=((P=M==null?void 0:M.span)==null?void 0:P.call(d,k,x+1,A,E,I))||k;a==="inline"?o.children.push(k):a==="classic"&&E.children.push(k),A+=I.content.length}if(a==="classic"){for(const I of i)E=((S=I==null?void 0:I.line)==null?void 0:S.call(d,E,x+1))||E;h.push(E),s.push(E)}}),a==="classic"){for(const v of i)c=((_=v==null?void 0:v.code)==null?void 0:_.call(d,c))||c;u.children.push(c);for(const v of i)u=((b=v==null?void 0:v.pre)==null?void 0:b.call(d,u))||u;o.children.push(u)}let p=o;for(const v of i)p=((m=v==null?void 0:v.root)==null?void 0:m.call(d,p))||p;return r&&Yr(p,r),p}function Zf(t){return t.map(e=>{const n=[];let r="",i=0;return e.forEach((s,o)=>{const l=!(s.fontStyle&&s.fontStyle&xt.Underline);l&&s.content.match(/^\s+$/)&&e[o+1]?(i||(i=s.offset),r+=s.content):r?(l?n.push({...s,offset:i,content:r+s.content}):n.push({content:r,offset:i},s),i=0,r=""):n.push(s)}),n})}function ep(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,s,o]=r;if(!i&&!o)return n;const a=[{...n,offset:n.offset+i.length,content:s}];return i&&a.unshift({content:i,offset:n.offset}),o&&a.push({content:o,offset:n.offset+i.length+s.length}),a}))}function tp(t,e,n){var s;const r={meta:{},options:n,codeToHast:(o,a)=>Mr(t,o,a),codeToTokens:(o,a)=>Vr(t,o,a)};let i=Af(Mr(t,e,n,r));for(const o of Dr(n))i=((s=o.postprocess)==null?void 0:s.call(r,i,n))||i;return i}const Vs={light:"#333333",dark:"#bbbbbb"},Ms={light:"#fffffe",dark:"#1e1e1e"},Bs="__shiki_resolved";function ts(t){var a,l,u,c,h;if(t!=null&&t[Bs])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:r}=e;if(!n||!r){const d=e.settings?e.settings.find(p=>!p.name&&!p.scope):void 0;(a=d==null?void 0:d.settings)!=null&&a.foreground&&(r=d.settings.foreground),(l=d==null?void 0:d.settings)!=null&&l.background&&(n=d.settings.background),!r&&((u=e==null?void 0:e.colors)!=null&&u["editor.foreground"])&&(r=e.colors["editor.foreground"]),!n&&((c=e==null?void 0:e.colors)!=null&&c["editor.background"])&&(n=e.colors["editor.background"]),r||(r=e.type==="light"?Vs.light:Vs.dark),n||(n=e.type==="light"?Ms.light:Ms.dark),e.fg=r,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let i=0;const s=new Map;function o(d){var _;if(s.has(d))return s.get(d);i+=1;const p=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(_=e.colorReplacements)!=null&&_[`#${p}`]?o(d):(s.set(d,p),p)}e.settings=e.settings.map(d=>{var m,v;const p=((m=d.settings)==null?void 0:m.foreground)&&!d.settings.foreground.startsWith("#"),_=((v=d.settings)==null?void 0:v.background)&&!d.settings.background.startsWith("#");if(!p&&!_)return d;const b={...d,settings:{...d.settings}};if(p){const x=o(d.settings.foreground);e.colorReplacements[x]=d.settings.foreground,b.settings.foreground=x}if(_){const x=o(d.settings.background);e.colorReplacements[x]=d.settings.background,b.settings.background=x}return b});for(const d of Object.keys(e.colors||{}))if((d==="editor.foreground"||d==="editor.background"||d.startsWith("terminal.ansi"))&&!((h=e.colors[d])!=null&&h.startsWith("#"))){const p=o(e.colors[d]);e.colorReplacements[p]=e.colors[d],e.colors[d]=p}return Object.defineProperty(e,Bs,{enumerable:!1,writable:!1,value:!0}),e}async function ga(t){return Array.from(new Set((await Promise.all(t.filter(e=>!ua(e)).map(async e=>await fa(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function va(t){return(await Promise.all(t.map(async n=>ca(n)?null:ts(await fa(n))))).filter(n=>!!n)}class np extends cd{constructor(n,r,i,s={}){super(n);w(this,"_resolvedThemes",new Map);w(this,"_resolvedGrammars",new Map);w(this,"_langMap",new Map);w(this,"_langGraph",new Map);w(this,"_textmateThemeCache",new WeakMap);w(this,"_loadedThemesCache",null);w(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=ts(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Pr.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){if(this._alias[n]){const r=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],r.has(n))throw new Te(`Circular alias \`${Array.from(r).join(" -> ")} -> ${n}\``);r.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var o,a,l,u;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(c=>{var h;return(h=c.embeddedLangsLazy)==null?void 0:h.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(c=>{this._alias[c]=n.name}),this._loadedLanguagesCache=null,r.size)for(const c of r)this._resolvedGrammars.delete(c.name),this._loadedLanguagesCache=null,(a=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||a.delete(c.scopeName),(u=(l=this._syncRegistry)==null?void 0:l._grammars)==null||u.delete(c.scopeName),this.loadLanguage(this._langMap.get(c.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const r=Array.from(this._langGraph.entries()),i=r.filter(([s,o])=>!o);if(i.length){const s=r.filter(([o,a])=>{var l;return a&&((l=a.embeddedLangs)==null?void 0:l.some(u=>i.map(([c])=>c).includes(u)))}).filter(o=>!i.includes(o));throw new Te(`Missing languages ${i.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of r)this._resolver.addLanguage(o);for(const[s,o]of r)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){if(this._langMap.set(n.name,n),this._langGraph.set(n.name,n),n.embeddedLangs)for(const r of n.embeddedLangs)this._langGraph.set(r,this._langMap.get(r))}}class rp{constructor(e,n){w(this,"_langs",new Map);w(this,"_scopeToLang",new Map);w(this,"_injections",new Map);w(this,"_onigLib");this._onigLib={createOnigScanner:r=>e.createScanner(r),createOnigString:r=>e.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let r=[];for(let i=1;i<=n.length;i++){const s=n.slice(0,i).join(".");r=[...r,...this._injections.get(s)||[]]}return r}}let On=0;function ip(t){On+=1,t.warnings!==!1&&On>=10&&On%10===0&&console.warn(`[Shiki] ${On} 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 e=!1;if(!t.engine)throw new Te("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),r=(t.themes||[]).flat(1).map(ts),i=new rp(t.engine,n),s=new np(i,r,n,t.langAlias);let o;function a(x){m();const E=s.getGrammar(typeof x=="string"?x:x.name);if(!E)throw new Te(`Language \`${x}\` not found, you may need to load it first`);return E}function l(x){if(x==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};m();const E=s.getTheme(x);if(!E)throw new Te(`Theme \`${x}\` not found, you may need to load it first`);return E}function u(x){m();const E=l(x);o!==x&&(s.setTheme(E),o=x);const A=s.getColorMap();return{theme:E,colorMap:A}}function c(){return m(),s.getLoadedThemes()}function h(){return m(),s.getLoadedLanguages()}function d(...x){m(),s.loadLanguages(x.flat(1))}async function p(...x){return d(await ga(x))}function _(...x){m();for(const E of x.flat(1))s.loadTheme(E)}async function b(...x){return m(),_(await va(x))}function m(){if(e)throw new Te("Shiki instance has been disposed")}function v(){e||(e=!0,s.dispose(),On-=1)}return{setTheme:u,getTheme:l,getLanguage:a,getLoadedThemes:c,getLoadedLanguages:h,loadLanguage:p,loadLanguageSync:d,loadTheme:b,loadThemeSync:_,dispose:v,[Symbol.dispose]:v}}async function sp(t={}){t.loadWasm;const[e,n,r]=await Promise.all([va(t.themes||[]),ga(t.langs||[]),t.engine||Do(t.loadWasm||Rc())]);return ip({...t,themes:e,langs:n,engine:r})}async function op(t={}){const e=await sp(t);return{getLastGrammarState:(...n)=>Hf(e,...n),codeToTokensBase:(n,r)=>es(e,n,r),codeToTokensWithThemes:(n,r)=>_a(e,n,r),codeToTokens:(n,r)=>Vr(e,n,r),codeToHast:(n,r)=>Mr(e,n,r),codeToHtml:(n,r)=>tp(e,n,r),...e,getInternalContext:()=>e}}function ap(t,e,n){let r,i,s;{const a=t;r=a.langs,i=a.themes,s=a.engine}async function o(a){function l(p){if(typeof p=="string"){if(ua(p))return[];const _=r[p];if(!_)throw new Rt(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return _}return p}function u(p){if(ca(p))return"none";if(typeof p=="string"){const _=i[p];if(!_)throw new Rt(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return _}return p}const c=(a.themes??[]).map(p=>u(p)),h=(a.langs??[]).map(p=>l(p)),d=await op({engine:a.engine??s(),...a,themes:c,langs:h});return{...d,loadLanguage(...p){return d.loadLanguage(...p.map(l))},loadTheme(...p){return d.loadTheme(...p.map(u))}}}return o}const lp=ap({langs:ic,themes:oc,engine:()=>Do(f(()=>import("./wasm-CG6Dc4jp.js"),[]))});var up=O('<div class="h-64 bg-surface-1 rounded-lg animate-pulse"></div>'),cp=O('<pre class="p-4 text-xs text-gray-300 font-mono"> </pre>'),dp=O('<div class="bg-surface-1 border border-surface-3 rounded-lg overflow-auto max-h-[70vh]"><!></div>'),fp=O('<p class="text-gray-500 text-sm">No MCP manifest found.</p>'),pp=O('<div class="bg-surface-1 border border-surface-3 rounded-lg p-4 overflow-auto max-h-[70vh]"><pre class="text-xs text-gray-300 font-mono whitespace-pre-wrap"> </pre></div>'),hp=O('<p class="text-gray-500 text-sm">No system prompt found.</p>'),mp=O('<div><div class="flex items-center gap-4 mb-6"><h2 class="text-lg font-semibold text-white">MCP</h2> <div class="flex gap-1 bg-surface-2 rounded-lg p-0.5"><button>Manifest</button> <button>System Prompt</button></div></div> <!></div>');function _p(t,e){ot(e,!0);let n=W(null),r=W(null),i=W(""),s=W(!0),o=W("manifest");nn(async()=>{try{D(n,await Bt.crossRefs().catch(()=>null),!0);const m=await fetch("/api/assets/system-prompt").catch(()=>null);if(m!=null&&m.ok){const v=await m.json();D(r,v.content??null,!0)}}catch{}try{const m=await fetch("/api/assets/cross-refs");m.ok&&D(n,await m.json(),!0)}catch{}if(g(n))try{const m=await lp({themes:["github-dark"],langs:["json"]});D(i,m.codeToHtml(JSON.stringify(g(n),null,2),{lang:"json",theme:"github-dark"}),!0)}catch{D(i,`<pre class="text-gray-300 text-xs">${JSON.stringify(g(n),null,2)}</pre>`)}D(s,!1)});var a=mp(),l=R(a),u=C(R(l),2),c=R(u),h=C(c,2),d=C(l,2);{var p=m=>{var v=up();L(m,v)},_=m=>{var v=un(),x=Nt(v);{var E=P=>{var S=dp(),I=R(S);{var k=M=>{var J=un(),te=Nt(J);Kl(te,()=>g(i)),L(M,J)},$=M=>{var J=cp(),te=R(J);U(ie=>N(te,ie),[()=>JSON.stringify(g(n),null,2)]),L(M,J)};q(I,M=>{g(i)?M(k):M($,-1)})}L(P,S)},A=P=>{var S=fp();L(P,S)};q(x,P=>{g(n)?P(E):P(A,-1)})}L(m,v)},b=m=>{var v=un(),x=Nt(v);{var E=P=>{var S=pp(),I=R(S),k=R(I);U(()=>N(k,g(r))),L(P,S)},A=P=>{var S=hp();L(P,S)};q(x,P=>{g(r)?P(E):P(A,-1)})}L(m,v)};q(d,m=>{g(s)?m(p):g(o)==="manifest"?m(_,1):m(b,-1)})}U(()=>{Ye(c,1,`px-3 py-1 text-sm rounded-md transition-colors ${g(o)==="manifest"?"bg-surface-3 text-white":"text-gray-500 hover:text-white"}`),Ye(h,1,`px-3 py-1 text-sm rounded-md transition-colors ${g(o)==="prompt"?"bg-surface-3 text-white":"text-gray-500 hover:text-white"}`)}),Xe("click",c,()=>D(o,"manifest")),Xe("click",h,()=>D(o,"prompt")),L(t,a),at()}St(["click"]);var gp=O('<span class="text-gray-500 text-sm ml-1"> </span>'),vp=O('<div class="flex-1 bg-surface-1 rounded-lg animate-pulse" style="min-height: 500px"></div>'),yp=O('<p class="text-accent-red text-sm"> </p>'),Ep=O('<p class="text-gray-500 text-sm">No knowledge graph data found.</p>'),bp=O('<p class="text-xs text-gray-400 leading-relaxed"> </p>'),wp=O('<p class="text-xs text-gray-600 italic">No description</p>'),xp=O('<div class="absolute z-10 pointer-events-none"><div class="bg-surface-0 border border-surface-3 rounded-lg shadow-xl p-3 min-w-48 max-w-72 pointer-events-auto"><button class="absolute top-2 right-2 text-gray-500 hover:text-white text-xs leading-none">✕</button> <div class="flex items-center gap-2 mb-2 pr-4"><span class="text-xs px-1.5 py-0.5 rounded bg-surface-3 text-accent-cyan font-mono"> </span> <span class="text-sm font-semibold text-white truncate"> </span></div> <!> <p class="text-xs text-gray-700 mt-2 font-mono"> </p></div></div>'),Rp=O('<div class="relative flex-1" style="min-height: 500px"><div class="absolute inset-0 bg-surface-1 border border-surface-3 rounded-lg"></div> <!></div>'),Ap=O('<div class="flex flex-col h-full" style="min-height: 600px"><div class="flex items-center justify-between mb-4"><h2 class="text-lg font-semibold text-white">Knowledge Graph <!></h2> <p class="text-xs text-gray-500">Scroll to zoom · drag to pan · click node to select</p></div> <!></div>');function Sp(t,e){ot(e,!0);let n=W(void 0),r=W(null),i=W(!0),s=W(null),o=null,a=W(null);async function l(){try{D(r,await Bt.graph(),!0)}catch(E){D(s,String(E),!0)}finally{D(i,!1)}}l(),Ui(()=>{var P;if(!g(n)||!g(r)||!((P=g(r).nodes)!=null&&P.length))return;o&&typeof o.destroy=="function"&&(o.destroy(),o=null);const E=(g(r).nodes??[]).map(S=>({data:{id:S.id,label:S.label,type:S.node_type,description:S.description??""}})),A=(g(r).edges??[]).map((S,I)=>({data:{id:`e${I}`,source:S.source,target:S.target,label:typeof S.relation=="string"?S.relation:JSON.stringify(S.relation),weight:S.weight??1}}));f(()=>import("./cytoscape.esm-C3TgQFLq.js"),[]).then(S=>{const I=S.default,k=I({container:g(n),elements:{nodes:E,edges:A},style:[{selector:"node",style:{"background-color":"#58a6ff",label:"data(label)",color:"#e6edf3","font-family":"JetBrains Mono, monospace","font-size":"10px","text-valign":"bottom","text-margin-y":4,width:28,height:28,"border-width":1.5,"border-color":"#30363d"}},{selector:"edge",style:{"line-color":"#30363d","target-arrow-color":"#30363d","target-arrow-shape":"triangle","curve-style":"bezier",label:"data(label)","font-size":"8px",color:"#484f58","text-rotation":"autorotate"}},{selector:"node:selected",style:{"background-color":"#bc8cff","border-color":"#bc8cff"}},{selector:"edge:selected",style:{"line-color":"#bc8cff","target-arrow-color":"#bc8cff"}}],layout:{name:"cose",animate:!1,nodeRepulsion:()=>4e5,idealEdgeLength:()=>200,edgeElasticity:()=>100,gravity:5,padding:80}});k.on("tap","node",$=>{const M=$.target,J=M.renderedPosition();D(a,{id:M.data("id"),label:M.data("label"),type:M.data("type"),description:M.data("description"),x:J.x,y:J.y},!0)}),k.on("tap",$=>{$.target===k&&D(a,null)}),o=k})}),Hl(()=>{o&&typeof o.destroy=="function"&&o.destroy()});var u=Ap(),c=R(u),h=R(c),d=C(R(h));{var p=E=>{var A=gp(),P=R(A);U(()=>{var S,I;return N(P,`(${((S=g(r).nodes)==null?void 0:S.length)??0??""} nodes · ${((I=g(r).edges)==null?void 0:I.length)??0??""} edges)`)}),L(E,A)};q(d,E=>{g(r)&&E(p)})}var _=C(c,2);{var b=E=>{var A=vp();L(E,A)},m=E=>{var A=yp(),P=R(A);U(()=>N(P,g(s))),L(E,A)},v=E=>{var A=Ep();L(E,A)},x=E=>{var A=Rp(),P=R(A);Io(P,k=>D(n,k),()=>g(n));var S=C(P,2);{var I=k=>{var $=xp(),M=R($),J=R(M),te=C(J,2),ie=R(te),Q=R(ie),ne=C(ie,2),se=R(ne),xe=C(te,2);{var ue=H=>{var oe=bp(),ve=R(oe);U(()=>N(ve,g(a).description)),L(H,oe)},re=H=>{var oe=wp();L(H,oe)};q(xe,H=>{g(a).description?H(ue):H(re,-1)})}var G=C(xe,2),F=R(G);U((H,oe)=>{Xl($,`left: ${H??""}px; top: ${oe??""}px; transform: translateY(-100%)`),N(Q,g(a).type),N(se,g(a).label),N(F,g(a).id)},[()=>Math.min(g(a).x+16,9999),()=>Math.min(g(a).y-8,9999)]),Xe("click",J,()=>D(a,null)),L(k,$)};q(S,k=>{g(a)&&k(I)})}L(E,A)};q(_,E=>{var A;g(i)?E(b):g(s)?E(m,1):!g(r)||!((A=g(r).nodes)!=null&&A.length)?E(v,2):E(x,-1)})}L(t,u),at()}St(["click"]);var Tp=O('<div class="flex items-center justify-center h-full text-accent-red font-mono p-8"><div><p class="text-lg font-semibold mb-2">Failed to load pack</p> <p class="text-sm opacity-70"> </p></div></div>'),Pp=O('<div class="flex h-full overflow-hidden bg-surface-0"><!> <div class="flex-1 flex flex-col overflow-hidden"><!> <main class="flex-1 overflow-auto p-6"><!></main></div></div>');function Lp(t,e){ot(e,!0);let n=W(null),r=W("assets"),i=W(null);nn(async()=>{try{D(n,await Bt.pack(),!0)}catch(c){D(i,String(c),!0)}});function s(c){if(c.target instanceof HTMLInputElement||c.target instanceof HTMLTextAreaElement)return;const h=["assets","glossary","rules","chunks","eval","mcp","graph"],d=parseInt(c.key);d>=1&&d<=h.length&&D(r,h[d-1],!0)}var o=un();Co("keydown",Sr,s);var a=Nt(o);{var l=c=>{var h=Tp(),d=R(h),p=C(R(d),2),_=R(p);U(()=>N(_,g(i))),L(c,h)},u=c=>{var h=Pp(),d=R(h);nu(d,{get pack(){return g(n)},get activePanel(){return g(r)},onselect:k=>D(r,k,!0)});var p=C(d,2),_=R(p);uu(_,{get pack(){return g(n)},onselect:k=>D(r,k,!0)});var b=C(_,2),m=R(b);{var v=k=>{mu(k,{get pack(){return g(n)},onnavigate:$=>D(r,$,!0)})},x=k=>{Au(k,{})},E=k=>{Ou(k,{})},A=k=>{Uu(k,{})},P=k=>{Zu(k,{})},S=k=>{_p(k,{})},I=k=>{Sp(k,{})};q(m,k=>{g(r)==="assets"?k(v):g(r)==="glossary"?k(x,1):g(r)==="rules"?k(E,2):g(r)==="chunks"?k(A,3):g(r)==="eval"?k(P,4):g(r)==="mcp"?k(S,5):g(r)==="graph"&&k(I,6)})}L(c,h)};q(a,c=>{g(i)?c(l):c(u,-1)})}L(t,o),at()}jl(Lp,{target:document.getElementById("app")});