vendor: 4,552 bytes, line 1
1import{b8 as S,b9 as Q,ba as Ye,bb as Ve,bc as fe,bd as xe,be as Je,bf as Ke,bg as T}from"./BDr44Kmt.js";function D(t,r){const n=typeof t=="string"?{}:{...t.colorReplacements},e=typeof t=="string"?t:t.name;for(const[s,a]of Object.entries(r?.colorReplacements||{}))typeof a=="string"?n[s]=a:s===e&&Object.assign(n,a);return n}function v(t,r){return t&&(r?.[t?.toLowerCase()]||t)}function Ze(t){return Array.isArray(t)?t:[t]}async function Ce(t){return Promise.resolve(typeof t=="function"?t():t).then(r=>r.default||r)}function P(t){return!t||["plaintext","txt","text","plain"].includes(t)}function ve(t){return t==="ansi"||P(t)}function H(t){return t==="none"}function _e(t){return H(t)}function q(t,r=!1){if(t.length===0)return[["",0]];const n=t.split(/(\r?\n)/g);let e=0;const s=[];for(let a=0;a<n.length;a+=2){const o=r?n[a]+(n[a+1]||""):n[a];s.push([o,e]),e+=n[a].length,e+=n[a+1]?.length||0}return s}const ge={light:"#333333",dark:"#bbbbbb"},me={light:"#fffffe",dark:"#1e1e1e"},he="__shiki_resolved";function te(t){if(t?.[he])return t;const r={...t};r.tokenColors&&!r.settings&&(r.settings=r.tokenColors,delete r.tokenColors),r.type||="dark",r.colorReplacements={...r.colorReplacements},r.settings||=[];let{bg:n,fg:e}=r;if(!n||!e){const i=r.settings?r.settings.find(c=>!c.name&&!c.scope):void 0;i?.settings?.foreground&&(e=i.settings.foreground),i?.settings?.background&&(n=i.settings.background),!e&&r?.colors?.["editor.foreground"]&&(e=r.colors["editor.foreground"]),!n&&r?.colors?.["editor.background"]&&(n=r.colors["editor.background"]),e||(e=r.type==="light"?ge.light:ge.dark),n||(n=r.type==="light"?me.light:me.dark),r.fg=e,r.bg=n}r.settings[0]&&r.settings[0].settings&&!r.settings[0].scope||r.settings.unshift({settings:{foreground:r.fg,background:r.bg}});let s=0;const a=new Map;function o(i){if(a.has(i))return a.get(i);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return r.colorReplacements?.[`#${c}`]?o(i):(a.set(i,c),c)}r.settings=r.settings.map(i=>{const c=i.settings?.foreground&&!i.settings.foreground.startsWith("#"),l=i.settings?.background&&!i.settings.background.startsWith("#");if(!c&&!l)return i;const u={...i,settings:{...i.settings}};if(c){const f=o(i.settings.foreground);r.colorReplacements[f]=i.settings.foreground,u.settings.foreground=f}if(l){const f=o(i.settings.background);r.colorReplacements[f]=i.settings.background,u.settings.background=f}return u});for(const i of Object.keys(r.colors||{}))if((i==="editor.foreground"||i==="editor.background"||i.startsWith("terminal.ansi"))&&!r.colors[i]?.startsWith("#")){const c=o(r.colors[i]);r.colorReplacements[c]=r.colors[i],r.colors[i]=c}return Object.defineProperty(r,he,{enumerable:!1,writable:!1,value:!0}),r}async function Le(t){return Array.from(new Set((await Promise.all(t.filter(r=>!ve(r)).map(async r=>await Ce(r).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Ee(t){return(await Promise.all(t.map(async r=>_e(r)?null:te(await Ce(r))))).filter(r=>!!r)}function Ae(t,r){if(!r)return t;if(r[t]){const n=new Set([t]);for(;r[t];){if(t=r[t],n.has(t))throw new S(`Circular alias \`${Array.from(n).join(" -> ")} -> ${t}\``);n.add(t)}}return t}var Qe=class extends Ye{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,r,n,e={}){super(t),this._resolver=t,this._themes=r,this._langs=n,this._alias=e,this._themes.map(s=>this.loadTheme(s)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const r=te(t);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(t){let r=this._textmateThemeCache.get(t);r||(r=Ve.createFromRawTheme(t),this._textmateThemeCache.set(t,r)),this._syncRegistry.setTheme(r)}getGrammar(t){return t=Ae(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const r=new Set([...this._langMap.values()].filter(s=>s.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const n={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const e=this.loadGrammarWithConfiguration(t.scopeName,1,n);if(e.name=t.name,this._resolvedGrammars.set(t.name,e),t.aliases&&t.aliases.forEac
1h(s=>{this._alias[s]=t.name}),this._loadedLanguagesCache=null,r.size)for(const s of r)this._resolvedGrammars.delete(s.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(s.scopeName),this._syncRegistry?._grammars?.delete(s.scopeName),this.loadLanguage(this._langMap.get(s.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const e of t)this.resolveEmbeddedLanguages(e);const r=Array.from(this._langGraph.entries()),n=r.filter(([e,s])=>!s);if(n.length){const e=r.filter(([s,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(o=>n.map(([i])=>i).includes(o)):!1).filter(s=>!n.includes(s));throw new S(`Missing languages ${n.map(([s])=>`\`${s}\``).join(", ")}, required by ${e.map(([s])=>`\`${s}\``).join(", ")}`)}for(const[e,s]of r)this._resolver.addLanguage(s);for(const[e,s]of r)this.loadLanguage(s)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const r=t.embeddedLanguages??t.embeddedLangs;if(r)for(const n of r)this._langGraph.set(n,this._langMap.get(n))}},Xe=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,r){this._onigLib={createOnigScanner:n=>t.createScanner(n),createOnigString:n=>t.createString(n)},r.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(r=>{this._langs.set(r,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(r=>{this._injections.get(r)||this._injections.set(r,[]),this._injections.get(r).push(t.scopeName)})}getInjections(t){const r=t.split(".");let n=[];for(let e=1;e<=r.length;e++){const s=r.slice(0,e).join(".");n=[...n,...this._injections.get(s)||[]]}return n}};let $=0;function ne(t){$+=1,t.warnings!==!1&&$>=10&&$%10===0&&console.warn(`[Shiki] ${$} 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 r=!1;if(!t.engine)throw new S("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),e=(t.themes||[]).flat(1).map(te),s=new Qe(new Xe(t.engine,n),e,n,t.langAlias);let a;function o(m){return Ae(m,t.langAlias)}function i(m){b();const y=s.getGrammar(typeof m=="string"?m:m.name);if(!y)throw new S(`Language \`${m}\` not found, you may need to load it first`);return y}function c(m){if(m==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};b();const y=s.getTheme(m);if(!y)throw new S(`Theme \`${m}\` not found, you may need to load it first`);return y}function l(m){b();const y=c(m);return a!==m&&(s.setTheme(y),a=m),{theme:y,colorMap:s.getColorMap()}}function u(){return b(),s.getLoadedThemes()}function f(){return b(),s.getLoadedLanguages()}function g(...m){b(),s.loadLanguages(m.flat(1))}async function d(...m){return g(await Le(m))}function p(...m){b();for(const y of m.flat(1))s.loadTheme(y)}async function w(...m){return b(),p(await Ee(m))}function b(){if(r)throw new S("Shiki instance has been disposed")}function h(){r||(r=!0,s.dispose(),$-=1)}return{setTheme:l,getTheme:c,getLanguage:i,getLoadedThemes:u,getLoadedLanguages:f,resolveLangAlias:o,loadLanguage:d,loadLanguageSync:g,loadTheme:w,loadThemeSync:p,dispose:h,[Symbol.dispose]:h}}const Pn=ne;async function $e(t){t.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[r,n,e]=await Promise.all([Ee(t.themes||[]),Le(t.langs||[]),t.engine]);return ne({...t,themes:r,langs:n,engine:e})}const Hn=$e,Oe=new WeakMap;function W(t,r){Oe.set(t,r)}function O(t){return Oe.get(t)}var z=class Be{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(r,n){return new Be(Object.fromEntries(Ze(n).map(e=>[e,Q])),r)}constructor(...r){if(r.length===2){const[n,e]=r;this.lang=e,this._stacks=n}else{const[n,e,s]=r;this.lang=e,this._stacks={[s]:n}}}getInternalStack(r=this.theme){return this._stacks[r]}getScopes(r=this.theme){return et(this._stacks[r])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function et(t){const r=[],n=new Set;function e(s){if(n.has(s))return;n.add(s);const a=s?.nameScopesList?.scopeName;a&&r.push(a),s.parent&&e(s.parent)}return e(t),r}function tt(t,r){if(!(t instanceof z))throw new S("Invalid grammar state");return t.getInternalStack(r)}function Ie(t,r,n={}){const{theme:e=t.getLoadedThemes()[0]}=n;if(P(t.resolveLangAlias(n.lang||"text"))||H(e))return q(r).map(i=>[{content:i[0],offset:i[1]}]);const{theme:s,colorMap:a}=t.setTheme(e),o=t.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new S(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(s.name))throw new S(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return nt(r,o,s,a,n)}function Re(...t){if(t.length===2)return O(t[1]);const[r,n,e={}]=t,{lang:s="text",theme:a=r.getLoadedThemes()[0]}=e;if(P(s)||H(a))throw new S("Plain language does not have grammar state");if(s==="ansi")throw new S("ANSI language does not have grammar state");
vendor: 5,311 bytes, line 1
1const{theme:o,colorMap:i}=r.setTheme(a),c=r.getLanguage(s);return new z(re(n,c,o,i,e).stateStack,c.name,o.name)}function nt(t,r,n,e,s){const a=re(t,r,n,e,s),o=new z(a.stateStack,r.name,n.name);return W(a.tokens,o),a.tokens}function re(t,r,n,e,s){const a=D(n,s),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:i=500}=s,c=q(t);let l=s.grammarState?tt(s.grammarState,n.name)??Q:s.grammarContextCode!=null?re(s.grammarContextCode,r,n,e,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:Q,u=[];const f=[];for(let g=0,d=c.length;g<d;g++){const[p,w]=c[g];if(p===""){u=[],f.push([]);continue}if(o>0&&p.length>=o){u=[],f.push([{content:p,offset:w,color:"",fontStyle:0}]);continue}let b,h,m;s.includeExplanation&&(b=r.tokenizeLine(p,l,i),h=b.tokens,m=0);const y=r.tokenizeLine2(p,l,i),N=y.tokens.length/2;for(let x=0;x<N;x++){const L=y.tokens[2*x],U=x+1<N?y.tokens[2*x+2]:p.length;if(L===U)continue;const ce=y.tokens[2*x+1],ze=v(e[fe.getForeground(ce)],a),Ue=fe.getFontStyle(ce),Y={content:p.substring(L,U),offset:w+L,color:ze,fontStyle:Ue};if(s.includeExplanation){const le=[];if(s.includeExplanation!=="scopeName")for(const C of n.settings){let E;switch(typeof C.scope){case"string":E=C.scope.split(/,/).map(V=>V.trim());break;case"object":E=C.scope;break;default:continue}le.push({settings:C,selectors:E.map(V=>V.split(/ /))})}Y.explanation=[];let ue=0;for(;L+ue<U;){const C=h[m],E=p.substring(C.startIndex,C.endIndex);ue+=E.length,Y.explanation.push({content:E,scopes:s.includeExplanation==="scopeName"?rt(C.scopes):st(le,C.scopes)}),m+=1}}u.push(Y)}f.push(u),u=[],l=y.ruleStack}return{tokens:f,stateStack:l}}function rt(t){return t.map(r=>({scopeName:r}))}function st(t,r){const n=[];for(let e=0,s=r.length;e<s;e++){const a=r[e];n[e]={scopeName:a,themeMatches:ot(t,a,r.slice(0,e))}}return n}function de(t,r){return t===r||r.substring(0,t.length)===t&&r[t.length]==="."}function at(t,r,n){if(!de(t[t.length-1],r))return!1;let e=t.length-2,s=n.length-1;for(;e>=0&&s>=0;)de(t[e],n[s])&&(e-=1),s-=1;return e===-1}function ot(t,r,n){const e=[];for(const{selectors:s,settings:a}of t)for(const o of s)if(at(o,r,n)){e.push(a);break}return e}function se(t,r,n,e=Ie){const s=Object.entries(n.themes).filter(l=>l[1]).map(l=>({color:l[0],theme:l[1]})),a=s.map(l=>{const u=e(t,r,{...n,theme:l.theme});return{tokens:u,state:O(u),theme:typeof l.theme=="string"?l.theme:l.theme.name}}),o=it(...a.map(l=>l.tokens)),i=o[0].map((l,u)=>l.map((f,g)=>{const d={content:f.content,variants:{},offset:f.offset};return"includeExplanation"in n&&n.includeExplanation&&(d.explanation=f.explanation),o.forEach((p,w)=>{const{content:b,explanation:h,offset:m,...y}=p[u][g];d.variants[s[w].color]=y}),d})),c=a[0].state?new z(Object.fromEntries(a.map(l=>[l.theme,l.state?.getInternalStack(l.theme)])),a[0].state.lang):void 0;return c&&W(i,c),i}function it(...t){const r=t.map(()=>[]),n=t.length;for(let e=0;e<t[0].length;e++){const s=t.map(c=>c[e]),a=r.map(()=>[]);r.forEach((c,l)=>c.push(a[l]));const o=s.map(()=>0),i=s.map(c=>c[0]);for(;i.every(c=>c);){const c=Math.min(...i.map(l=>l.content.length));for(let l=0;l<n;l++){const u=i[l];u.content.length===c?(a[l].push(u),o[l]+=1,i[l]=s[l][o[l]]):(a[l].push({...u,content:u.content.slice(0,c)}),i[l]={...u,content:u.content.slice(c),offset:u.offset+c})}}}return r}const ct=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],pe={}.hasOwnProperty;function lt(t,r){const n=r||{};function e(s,...a){let o=e.invalid;const i=e.handlers;if(s&&pe.call(s,t)){const c=String(s[t]);o=pe.call(i,c)?i[c]:e.unknown}if(o)return o.call(this,s,...a)}return e.handlers=n.handlers||{},e.invalid=n.invalid,e.unknown=n.unknown,e}const ut=/["&'<>`]/g,ft=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gt=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,mt=/[|\\{}()[\]^$+*?.]/g,ye=new WeakMap;function ht(t,r){if(t=t.replace(r.subset?dt(r.subset):ut,e),r.subset||r.escapeOnly)return t;return t.replace(ft,n).replace(gt,e);function n(s,a,o){return r.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,o.charCodeAt(a+2),r)}function e(s,a,o){return r.format(s.charCodeAt(0),o.charCodeAt(a+1),r)}}function dt(t){let r=ye.get(t);return r||(r=pt(t),ye.set(t,r)),r}function pt(t){const r=[];let n=-1;for(;++n<t.length;)r.push(t[n].replace(mt,"\\$&"));return new RegExp("(?:"+r.join("|")+")","g")}const yt=/[\dA-Fa-f]/;function bt(t,r,n){const e="&#x"+t.toString(16).toUpperCase();return n&&r&&!yt.test(String.fromCharCode(r))?e:e+";"}const wt=/\d/;function St(t,r,n){const e="&#"+String(t);return n&&r&&!wt.test(String.fromCharCode(r))?e:e+";"}const kt=["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","oslas
1h","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],J={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
1:"â",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:"â¬"},Tt=["cent","copy","divide","gt","lt","not","para","times"],je={}.hasOwnProperty,X={};let R;for(R in J)je.call(J,R)&&(X[J[R]]=R);const Nt=/[^\dA-Za-z]/;function xt(t,r,n,e){const s=String.fromCharCode(t);if(je.call(X,s)){const a=X[s],o="&"+a;return n&&kt.includes(a)&&!Tt.includes(a)&&(!e||r&&r!==61&&Nt.test(String.fromCharCode(r)))?o:o+";"}return""}function Ct(t,r,n){let e=bt(t,r,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=xt(t,r,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const a=St(t,r,n.omitOptionalSemicolons);a.length<e.length&&(e=a)}return s&&(!n.useShortestReferences||s.length<e.length)?s:e}function A(t,r){return ht(t,Object.assign({format:Ct},r))}const vt=/^>|^->|<!--|-->|--!>|<!-$/g,_t=[">"],Lt=["<",">"];function Et(t,r,n,e){return e.settings.bogusComments?"<?"+A(t.value,Object.assign({},e.settings.characterReferences,{subset:_t}))+">":"<!--"+t.value.replace(vt,s)+"-->";function s(a){return A(a,Object.assign({},e.settings.characterReferences,{subset:Lt}))}}function At(t,r,n,e){return"<!"+(e.settings.upperDoctype?"DOCTYPE":"doctype")+(e.settings.tightDoctype?"":" ")+"html>"}function be(t,r){const n=String(t);if(typeof r!="string")throw new TypeError("Expected character");let e=0,s=n.indexOf(r);for(;s!==-1;)e++,s=n.indexOf(r,s+r.length);return e}function $t(t,r){const n=r||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function Ot(t){return t.join(" ").trim()}const Bt=/[ \t\n\f\r]/g;function ae(t){return typeof t=="object"?t.type==="text"?we(t.value):!1:we(t)}function we(t){return t.replace(Bt,"")===""}const k=Me(1),De=Me(-1),It=[];function Me(t){return r;function r(n,e,s){const a=n?n.children:It;let o=(e||0)+t,i=a[o];if(!s)for(;i&&ae(i);)o+=t,i=a[o];return i}}const Rt={}.hasOwnProperty;function Fe(t){return r;function r(n,e,s){return Rt.call(t,n.tagName)&&t[n.tagName](n,e,s)}}const oe=Fe({body:Dt,caption:K,colgroup:K,dd:Pt,dt:Gt,head:K,html:jt,li:Ft,optgroup:Ht,option:qt,p:Mt,rp:Se,rt:Se,tbody:zt,td:ke,tfoot:Ut,th:ke,thead:Wt,tr:Yt});function K(t,r,n){const e=k(n,r,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&ae(e.value.charAt(0)))}function jt(t,r,n){const e=k(n,r);return!e||e.type!=="comment"}function Dt(t,r,n){const e=k(n,r);return!e||e.type!=="comment"}function Mt(t,r,n){const e=k(n,r);return e?e.type==="element"&&(e.tagName==="address"||e.tagName==="article"||e.tagName==="aside"||e.tagName==="blockquote"||e.tagName==="details"||e.tagName==="div"||e.tagName==="dl"||e.tagName==="fieldset"||e.tagName==="figcaption"||e.tagName==="figure"||e.tagName==="footer"||e.tagName==="form"||e.tagName==="h1"||e.tagName==="h2"||e.tagName==="h3"||e.tagName==="h4"||e.tagName==="h5"||e.tagName==="h6"||e.tagName==="header"||e.tagName==="hgroup"||e.tagName==="hr"||e.tagName==="main"||e.tagName==="menu"||e.tagName==="nav"||e.tagName==="ol"||e.tagName==="p"||e.tagName==="pre"||e.tagName==="section"||e.tagName==="table"||e.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 Ft(t,r,n){const e=k(n,r);return!e||e.type==="element"&&e.tagName==="li"}function Gt(t,r,n){const e=k(n,r);return!!(e&&e.type==="element"&&(e.tagName==="dt"||e.tagName==="dd"))}function Pt(t,r,n){const e=k(n,r);return!e||e.type==="element"&&(e.tagName==="dt"||e.tagName==="dd")}function Se(t,r,n){const e=k(n,r);return!e||e.type==="element"&&(e.tagName==="rp"||e.tagName==="rt")}function Ht(t,r,n){const e=k(n,r);return!e||e.type==="element"&&e.tagName==="optgroup"}function qt(t,r,n){const e=k(n,r);return!e||e.type==="element"&&(e.tagName==="option"||e.tagName==="optgroup")}function Wt(t,r,n){const e=k(n,r);return!!(e&&e.type==="element"&&(e.tagName==="tbody"||e.tagName==="tfoot"))}function zt(t,r,n){const e=k(n,r);return!e||e.type==="element"&&(e.tagName==="tbody"||e.tagName==="tfoot")}function Ut(t,r,n){return!k(n,r)}function Yt(t,r,n){const e=k(n,r);return!e||e.type==="element"&&e.tagName==="tr"}function ke(t,r,n){const e=k(n,r);return!e||e.type==="element"&&(e.tagName==="td"||e.tagName==="th")}const Vt=Fe({body:Zt,colgroup:Qt,head:Kt,html:Jt,tbody:Xt});function Jt(t){const r=k(t,-1);return!r||r.type!=="comment"}function Kt(t){const r=new Set;for(const e of t.children)if(e.type==="element"&&(e.tagName==="base"||e.tagName==="title")){if(r.has(e.tagName))return!1;r.add(e.tagName)}const n=t.children[0];return!n||n.type==="element"}function Zt(t){const r=k(t,-1,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&ae(r.value.charAt(0)))&&!(r.type==="element"&&(r.tagName==="meta"||r.tagName==="link"||r.tagName==="script"||r.tagName==="style"||r.tagName==="template"))}function Qt(t,r,n){const e=De(n,r),s=k(t,-1,!0);return n&&e&&e.type==="element"&&e.tagName==="colgroup"&&oe(e,n.children.indexOf(e),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function Xt(t,r,n){const e=De(n,r),s=k(t,-1);return n&&e&&e.type==="element"&&(e.tagName==="thead"||e.tagName==="tbody")&&oe(e,n.children.indexOf(e),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const j={name:[[` 2\f\r &/=>`.split(""),` 3\f\r "&'/=>
vendor: 18,798 bytes, lines 3-10
3\``.split("")],[`\0 4\f\r "&'/<=>`.split(""),`\0 5\f\r "&'/<=>\``.split("")]],unquoted:[[` 6\f\r &>`.split(""),`\0 7\f\r "&'<=>\``.split("")],[`\0 8\f\r "&'<=>\``.split(""),`\0 9\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function en(t,r,n,e){const s=e.schema,a=s.space==="svg"?!1:e.settings.omitOptionalTags;let o=s.space==="svg"?e.settings.closeEmptyElements:e.settings.voids.includes(t.tagName.toLowerCase());const i=[];let c;s.space==="html"&&t.tagName==="svg"&&(e.schema=xe);const l=tn(e,t.properties),u=e.all(s.space==="html"&&t.tagName==="template"?t.content:t);return e.schema=s,u&&(o=!1),(l||!a||!Vt(t,r,n))&&(i.push("<",t.tagName,l?" "+l:""),o&&(s.space==="svg"||e.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!e.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&i.push(" "),i.push("/")),i.push(">")),i.push(u),!o&&(!a||!oe(t,r,n))&&i.push("</"+t.tagName+">"),i.join("")}function tn(t,r){const n=[];let e=-1,s;if(r){for(s in r)if(r[s]!==null&&r[s]!==void 0){const a=nn(t,s,r[s]);a&&n.push(a)}}for(;++e<n.length;){const a=t.settings.tightAttributes?n[e].charAt(n[e].length-1):void 0;e!==n.length-1&&a!=='"'&&a!=="'"&&(n[e]+=" ")}return n.join("")}function nn(t,r,n){const e=Je(t.schema,r),s=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,a=t.settings.allowDangerousCharacters?0:1;let o=t.quote,i;if(e.overloadedBoolean&&(n===e.attribute||n==="")?n=!0:(e.boolean||e.overloadedBoolean)&&(typeof n!="string"||n===e.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=A(e.attribute,Object.assign({},t.settings.characterReferences,{subset:j.name[s][a]}));return n===!0||(n=Array.isArray(n)?(e.commaSeparated?$t:Ot)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?c:(t.settings.preferUnquoted&&(i=A(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:j.unquoted[s][a]}))),i!==n&&(t.settings.quoteSmart&&be(n,o)>be(n,t.alternative)&&(o=t.alternative),i=o+A(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?j.single:j.double)[s][a],attribute:!0}))+o),c+(i&&"="+i))}const rn=["<","&"];function Ge(t,r,n,e){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:A(t.value,Object.assign({},e.settings.characterReferences,{subset:rn}))}function sn(t,r,n,e){return e.settings.allowDangerousHtml?t.value:Ge(t,r,n,e)}function an(t,r,n,e){return e.all(t)}const on=lt("type",{invalid:cn,unknown:ln,handlers:{comment:Et,doctype:At,element:en,raw:sn,root:an,text:Ge}});function cn(t){throw new Error("Expected node, not `"+t+"`")}function ln(t){const r=t;throw new Error("Cannot compile unknown node `"+r.type+"`")}const un={},fn={},gn=[];function mn(t,r){const n=r||un,e=n.quote||'"',s=e==='"'?"'":'"';if(e!=='"'&&e!=="'")throw new Error("Invalid quote `"+e+"`, expected `'` or `\"`");return{one:hn,all:dn,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||ct,characterReferences:n.characterReferences||fn,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?xe:Ke,quote:e,alternative:s}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function hn(t,r,n){return on(t,r,n,this)}function dn(t){const r=[],n=t&&t.children||gn;let e=-1;for(;++e<n.length;)r[e]=this.one(n[e],e,t);return r.join("")}function Pe(t,r){if(!r)return t;t.properties||={},t.properties.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(r)?r:r.split(/\s+/g);for(const e of n)e&&!t.properties.class.includes(e)&&t.properties.class.push(e);return t}function pn(t){const r=q(t,!0).map(([s])=>s);function n(s){if(s===t.length)return{line:r.length-1,character:r[r.length-1].length};let a=s,o=0;for(const i of r){if(a<i.length)break;a-=i.length,o++}return{line:o,character:a}}function e(s,a){let o=0;for(let i=0;i<s;i++)o+=r[i].length;return o+=a,o}return{lines:r,indexToPos:n,posToIndex:e}}function qn(t,r,n){const e=new Set;for(const a of t.matchAll(/:?lang=["']([^"']+)["']/g)){const o=a[1].toLowerCase().trim();o&&e.add(o)}for(const a of t.matchAll(/(?:```|~~~)([\w-]+)/g)){const o=a[1].toLowerCase().trim();o&&e.add(o)}for(const a of t.matchAll(/\\begin\{([\w-]+)\}/g)){const o=a[1].toLowerCase().trim();o&&e.add(o)}for(const a of t.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const o=a[1].toLowerCase().trim(),i=o.includes("/")?o.split("/").pop():o;i&&e.add(i)}if(!n)return Array.from(e);const s=n.getBundledLanguages();return Array.from(e).filter(a=>a&&s[a])}const ie="light-dark()",yn=["color","background-color"];function bn(t,r){let n=0;const e=[];for(const s of r)s>n&&e.push({...t,content:t.content.slice(n,s),offset:t.offset+n}),n=s;return n<t.content.length&&e.push({...t,content:t.content.slice(n),offset:t.offset+n}),e}function wn(t,r){const n=Array.from(r instanceof Set?r:new Set(r)).sort((e,s)=>e-s);return n.length?t.map(e=>e.flatMap(s=>{const a=n.filter(o=>s.offset<o&&o<s.offset+s.content.length).map(o=>o-s.offset).sort((o,i)=>o-i);return a.length?bn(s,a):s})):t}function Sn(t,r,n,e,s="css-vars"){const a={content:t.content,explanation:t.explanation,offset:t.offset},o=r.map(u=>M(t.variants[u])),i=new Set(o.flatMap(u=>Object.keys(u))),c={},l=(u,f)=>{const g=f==="color"?"":f==="background-color"?"-bg":`-${f}`;return n+r[u]+(f==="color"?"":g)};return o.forEach((u,f)=>{for(const g of i){const d=u[g]||"inherit";if(f===0&&e&&yn.includes(g))if(e===ie&&o.length>1){const p=r.findIndex(b=>b==="light"),w=r.findIndex(b=>b==="dark");if(p===-1||w===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[g]=`light-dark(${o[p][g]||"inherit"}, ${o[w][g]||"inherit"})`,s==="css-vars"&&(c[l(f,g)]=d)}else c[g]=d;else s==="css-vars"&&(c[l(f,g)]=d)}}),a.htmlStyle=c,a}function M(t){const r={};if(t.color&&(r.color=t.color),t.bgColor&&(r["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&T.Italic&&(r["font-style"]="italic"),t.fontStyle&T.Bold&&(r["font-weight"]="bold");const n=[];t.fontStyle&T.Underline&&n.push("underline"),t.fontStyle&T.Strikethrough&&n.push("line-through"),n.length&&(r["text-decoration"]=n.join(" "))}return r}function ee(t){return typeof t=="string"?t:Object.entries(t).map(([r,n])=>`${r}:${n}`).join(";")}function kn(){const t=new WeakMap;function r(n){if(!t.has(n.meta)){let s=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new S(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...e.indexToPos(o),offset:o}}else{const i=e.lines[o.line];if(i===void 0)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${e.lines.length}`);let c=o.character;if(c<0&&(c=i.length+c),c<0||c>i.length)throw new S(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${i.length}`);return{...o,character:c,offset:e.posToIndex(o.line,c)}}};const e=pn(n.source),a=(n.options.decorations||[]).map(o=>({...o,start:s(o.start),end:s(o.end)}));Tn(a),t.set(n.meta,{decorations:a,converter:e,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return wn(n,r(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(n){if(!this.options.decorations?.length)return;const e=r(this),s=Array.from(n.children).filter(u=>u.type==="element"&&u.tagName==="span");if(s.length!==e.converter.lines.length)throw new S(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${e.converter.lines.length}). Failed to apply decorations.`);function a(u,f,g,d){const p=s[u];let w="",b=-1,h=-1;if(f===0&&(b=0),g===0&&(h=0),g===Number.POSITIVE_INFINITY&&(h=p.children.length),b===-1||h===-1)for(let y=0;y<p.children.length;y++)w+=He(p.children[y]),b===-1&&w.length===f&&(b=y+1),h===-1&&w.length===g&&(h=y+1);if(b===-1)throw new S(`Failed to find start index for decoration ${JSON.stringify(d.start)}`);if(h===-1)throw new S(`Failed to find end index for decoration ${JSON.stringify(d.end)}`);const m=p.children.slice(b,h);if(!d.alwaysWrap&&m.length===p.children.length)i(p,d,"line");else if(!d.alwaysWrap&&m.length===1&&m[0].type==="element")i(m[0],d,"token");else{const y={type:"element",tagName:"span",properties:{},children:m};i(y,d,"wrapper"),p.children.splice(b,m.length,y)}}function o(u,f){s[u]=i(s[u],f,"line")}function i(u,f,g){const d=f.properties||{},p=f.transform||(w=>w);return u.tagName=f.tagName||"span",u.properties={...u.properties,...d,class:u.properties.class},f.properties?.class&&Pe(u,f.properties.class),u=p(u,g)||u,u}const c=[],l=e.decorations.sort((u,f)=>f.start.offset-u.start.offset||u.end.offset-f.end.offset);for(const u of l){const{start:f,end:g}=u;if(f.line===g.line)a(f.line,f.character,g.character,u);else if(f.line<g.line){a(f.line,f.character,Number.POSITIVE_INFINITY,u);for(let d=f.line+1;d<g.line;d++)c.unshift(()=>o(d,u));a(g.line,0,g.character,u)}}c.forEach(u=>u())}}}function Tn(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.start.offset>n.end.offset)throw new S(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let e=r+1;e<t.length;e++){const s=t[e],a=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,o=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,i=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,c=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(a||o||i||c){if(a&&o||i&&c||i&&n.start.offset===n.end.offset||o&&s.start.offset===s.end.offset)continue;throw new S(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function He(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(He).join(""):""}const Nn=[kn()];function F(t){const r=xn(t.transformers||[]);return[...r.pre,...r.normal,...r.post,...Nn]}function xn(t){const r=[],n=[],e=[];for(const s of t)switch(s.enforce){case"pre":r.push(s);break;case"post":n.push(s);break;default:e.push(s)}return{pre:r,post:n,normal:e}}var _=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Z={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function Cn(t,r){const n=t.indexOf("\x1B",r);if(n!==-1&&t[n+1]==="["){const e=t.indexOf("m",n);if(e!==-1)return{sequence:t.substring(n+2,e).split(";"),startPosition:n,position:e+1}}return{position:t.length}}function Te(t){const r=t.shift();if(r==="2"){const n=t.splice(0,3).map(e=>Number.parseInt(e));return n.length!==3||n.some(e=>Number.isNaN(e))?void 0:{type:"rgb",rgb:n}}else if(r==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function vn(t){const r=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const e=Number.parseInt(n);if(!Number.isNaN(e))if(e===0)r.push({type:"resetAll"});else if(e<=9)Z[e]&&r.push({type:"setDecoration",value:Z[e]});else if(e<=29){const s=Z[e-20];s&&(r.push({type:"resetDecoration",value:s}),s==="dim"&&r.push({type:"resetDecoration",value:"bold"}))}else if(e<=37)r.push({type:"setForegroundColor",value:{type:"named",name:_[e-30]}});else if(e===38){const s=Te(t);s&&r.push({type:"setForegroundColor",value:s})}else if(e===39)r.push({type:"resetForegroundColor"});else if(e<=47)r.push({type:"setBackgroundColor",value:{type:"named",name:_[e-40]}});else if(e===48){const s=Te(t);s&&r.push({type:"setBackgroundColor",value:s})}else e===49?r.push({type:"resetBackgroundColor"}):e===53?r.push({type:"setDecoration",value:"overline"}):e===55?r.push({type:"resetDecoration",value:"overline"}):e>=90&&e<=97?r.push({type:"setForegroundColor",value:{type:"named",name:_[e-90+8]}}):e>=100&&e<=107&&r.push({type:"setBackgroundColor",value:{type:"named",name:_[e-100+8]}})}return r}function _n(){let t=null,r=null,n=new Set;return{parse(e){const s=[];let a=0;do{const o=Cn(e,a),i=o.sequence?e.substring(a,o.startPosition):e.substring(a);if(i.length>0&&s.push({value:i,foreground:t,background:r,decorations:new Set(n)}),o.sequence){const c=vn(o.sequence);for(const l of c)l.type==="resetAll"?(t=null,r=null,n.clear()):l.type==="resetForegroundColor"?t=null:l.type==="resetBackgroundColor"?r=null:l.type==="resetDecoration"&&n.delete(l.value);for(const l of c)l.type==="setForegroundColor"?t=l.value:l.type==="setBackgroundColor"?r=l.value:l.type==="setDecoration"&&n.add(l.value)}a=o.position}while(a<e.length);return s}}}var Ln={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 En(t=Ln){function r(i){return t[i]}function n(i){return`#${i.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let e;function s(){if(e)return e;e=[];for(let l=0;l<_.length;l++)e.push(r(_[l]));let i=[0,95,135,175,215,255];for(let l=0;l<6;l++)for(let u=0;u<6;u++)for(let f=0;f<6;f++)e.push(n([i[l],i[u],i[f]]));let c=8;for(let l=0;l<24;l++,c+=10)e.push(n([c,c,c]));return e}function a(i){return s()[i]}function o(i){switch(i.type){case"named":return r(i.name);case"rgb":return n(i.rgb);case"table":return a(i.index)}}return{value:o}}const An={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function $n(t,r,n){const e=D(t,n),s=q(r),a=En(Object.fromEntries(_.map(i=>{const c=`terminal.ansi${i[0].toUpperCase()}${i.substring(1)}`;return[i,t.colors?.[c]||An[i]]}))),o=_n();return s.map(i=>o.parse(i[0]).map(c=>{let l,u;c.decorations.has("reverse")?(l=c.background?a.value(c.background):t.bg,u=c.foreground?a.value(c.foreground):t.fg):(l=c.foreground?a.value(c.foreground):t.fg,u=c.background?a.value(c.background):void 0),l=v(l,e),u=v(u,e),c.decorations.has("dim")&&(l=On(l));let f=T.None;return c.decorations.has("bold")&&(f|=T.Bold),c.decorations.has("italic")&&(f|=T.Italic),c.decorations.has("underline")&&(f|=T.Underline),c.decorations.has("strikethrough")&&(f|=T.Strikethrough),{content:c.value,offset:i[1],color:l,bgColor:u,fontStyle:f}}))}function On(t){const r=t.match(/#([0-9a-f]{3,8})/i);if(r){const e=r[1];if(e.length===8){const s=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${s}`}else{if(e.length===6)return`#${e}80`;if(e.length===4){const s=e[0],a=e[1],o=e[2],i=e[3];return`#${s}${s}${a}${a}${o}${o}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0")}`}else if(e.length===3){const s=e[0],a=e[1],o=e[2];return`#${s}${s}${a}${a}${o}${o}80`}}}const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function G(t,r,n={}){const e=t.resolveLangAlias(n.lang||"text"),{theme:s=t.getLoadedThemes()[0]}=n;if(!P(e)&&!H(s)&&e==="ansi"){const{theme:a}=t.setTheme(s);return $n(a,r,n)}return Ie(t,r,n)}function B(t,r,n){let e,s,a,o,i,c;if("themes"in n){const{defaultColor:l="light",cssVariablePrefix:u="--shiki-",colorsRendering:f="css-vars"}=n,g=Object.entries(n.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})).sort((h,m)=>h.color===l?-1:m.color===l?1:0);if(g.length===0)throw new S("`themes` option must not be empty");const d=se(t,r,n,G);if(c=O(d),l&&ie!==l&&!g.find(h=>h.color===l))throw new S(`\`themes\` option must contain the defaultColor key \`${l}\``);const p=g.map(h=>t.getTheme(h.theme)),w=g.map(h=>h.color);a=d.map(h=>h.map(m=>Sn(m,w,u,l,f))),c&&W(a,c);const b=g.map(h=>D(h.theme,n));s=Ne(g,p,b,u,l,"fg",f),e=Ne(g,p,b,u,l,"bg",f),o=`shiki-themes ${p.map(h=>h.name).join(" ")}`,i=l?void 0:[s,e].join(";")}else if("theme"in n){const l=D(n.theme,n);a=G(t,r,n);const u=t.getTheme(n.theme);e=v(u.bg,l),s=v(u.fg,l),o=u.name,c=O(a)}else throw new S("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:s,bg:e,themeName:o,rootStyle:i,grammarState:c}}function Ne(t,r,n,e,s,a,o){return t.map((i,c)=>{const l=v(r[c][a],n[c])||"inherit",u=`${e+i.color}${a==="bg"?"-bg":""}:${l}`;if(c===0&&s){if(s===ie&&t.length>1){const f=t.findIndex(d=>d.color==="light"),g=t.findIndex(d=>d.color==="dark");if(f===-1||g===-1)throw new S('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${v(r[f][a],n[f])||"inherit"}, ${v(r[g][a],n[g])||"inherit"});${u}`}return l}return o==="css-vars"?u:null}).filter(i=>!!i).join(";")}function I(t,r,n,e={meta:{},options:n,codeToHast:(s,a)=>I(t,s,a),codeToTokens:(s,a)=>B(t,s,a)}){let s=r;for(const p of F(n))s=p.preprocess?.call(e,s,n)||s;let{tokens:a,fg:o,bg:i,themeName:c,rootStyle:l,grammarState:u}=B(t,s,n);const{mergeWhitespaces:f=!0,mergeSameStyleTokens:g=!1}=n;f===!0?a=In(a):f==="never"&&(a=Rn(a)),g&&(a=jn(a));const d={...e,get source(){return s}};for(const p of F(n))a=p.tokens?.call(d,a)||a;return Bn(a,{...n,fg:o,bg:i,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},d,u)}function Bn(t,r,n,e=O(t)){const s=F(r),a=[],o={type:"root",children:[]},{structure:i="classic",tabindex:c="0"}=r,l={class:`shiki ${r.themeName||""}`};r.rootStyle!==!1&&(r.rootStyle!=null?l.style=r.rootStyle:l.style=`background-color:${r.bg};color:${r.fg}`),c!==!1&&c!=null&&(l.tabindex=c.toString());for(const[w,b]of Object.entries(r.meta||{}))w.startsWith("_")||(l[w]=b);let u={type:"element",tagName:"pre",properties:l,children:[],data:r.data},f={type:"element",tagName:"code",properties:{},children:a};const g=[],d={...n,structure:i,addClassToHast:Pe,get source(){return n.source},get tokens(){return t},get options(){return r},get root(){return o},get pre(){return u},get code(){return f},get lines(){return g}};if(t.forEach((w,b)=>{b&&(i==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):i==="classic"&&a.push({type:"text",value:` 10`}));let h={type:"element",tagName:"span",properties:{class:"line"}
10,children:[]},m=0;for(const y of w){let N={type:"element",tagName:"span",properties:{...y.htmlAttrs},children:[{type:"text",value:y.content}]};const x=ee(y.htmlStyle||M(y));x&&(N.properties.style=x);for(const L of s)N=L?.span?.call(d,N,b+1,m,h,y)||N;i==="inline"?o.children.push(N):i==="classic"&&h.children.push(N),m+=y.content.length}if(i==="classic"){for(const y of s)h=y?.line?.call(d,h,b+1)||h;g.push(h),a.push(h)}else i==="inline"&&g.push(h)}),i==="classic"){for(const w of s)f=w?.code?.call(d,f)||f;u.children.push(f);for(const w of s)u=w?.pre?.call(d,u)||u;o.children.push(u)}else if(i==="inline"){const w=[];let b={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const m of o.children)m.type==="element"&&m.tagName==="br"?(w.push(b),b={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(m.type==="element"||m.type==="text")&&b.children.push(m);w.push(b);let h={type:"element",tagName:"code",properties:{},children:w};for(const m of s)h=m?.code?.call(d,h)||h;o.children=[];for(let m=0;m<h.children.length;m++){m>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const y=h.children[m];y.type==="element"&&o.children.push(...y.children)}}let p=o;for(const w of s)p=w?.root?.call(d,p)||p;return e&&W(p,e),p}function In(t){return t.map(r=>{const n=[];let e="",s;return r.forEach((a,o)=>{const i=!(a.fontStyle&&(a.fontStyle&T.Underline||a.fontStyle&T.Strikethrough));i&&a.content.match(/^\s+$/)&&r[o+1]?(s===void 0&&(s=a.offset),e+=a.content):e?(i?n.push({...a,offset:s,content:e+a.content}):n.push({content:e,offset:s},a),s=void 0,e=""):n.push(a)}),n})}function Rn(t){return t.map(r=>r.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const e=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!e)return n;const[,s,a,o]=e;if(!s&&!o)return n;const i=[{...n,offset:n.offset+s.length,content:a}];return s&&i.unshift({content:s,offset:n.offset}),o&&i.push({content:o,offset:n.offset+s.length+a.length}),i}))}function jn(t){return t.map(r=>{const n=[];for(const e of r){if(n.length===0){n.push({...e});continue}const s=n[n.length-1],a=ee(s.htmlStyle||M(s)),o=ee(e.htmlStyle||M(e)),i=s.fontStyle&&(s.fontStyle&T.Underline||s.fontStyle&T.Strikethrough),c=e.fontStyle&&(e.fontStyle&T.Underline||e.fontStyle&T.Strikethrough);!i&&!c&&a===o?s.content+=e.content:n.push({...e})}return n})}const Dn=mn;function qe(t,r,n){const e={meta:{},options:n,codeToHast:(a,o)=>I(t,a,o),codeToTokens:(a,o)=>B(t,a,o)};let s=Dn(I(t,r,n,e));for(const a of F(n))s=a.postprocess?.call(e,s,n)||s;return s}async function We(t){const r=await $e(t);return{getLastGrammarState:(...n)=>Re(r,...n),codeToTokensBase:(n,e)=>G(r,n,e),codeToTokensWithThemes:(n,e)=>se(r,n,e),codeToTokens:(n,e)=>B(r,n,e),codeToHast:(n,e)=>I(r,n,e),codeToHtml:(n,e)=>qe(r,n,e),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...r,getInternalContext:()=>r}}function Wn(t){const r=ne(t);return{getLastGrammarState:(...n)=>Re(r,...n),codeToTokensBase:(n,e)=>G(r,n,e),codeToTokensWithThemes:(n,e)=>se(r,n,e),codeToTokens:(n,e)=>B(r,n,e),codeToHast:(n,e)=>I(r,n,e),codeToHtml:(n,e)=>qe(r,n,e),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...r,getInternalContext:()=>r}}function Mn(t){let r;async function n(e){if(r){const s=await r;return await Promise.all([s.loadTheme(...e.themes||[]),s.loadLanguage(...e.langs||[])]),s}else return r=t({...e,themes:e.themes||[],langs:e.langs||[]}),r}return n}const zn=Mn(We);function Un(t){const r=t.langs,n=t.themes,e=t.engine;async function s(a){function o(f){if(typeof f=="string"){if(f=a.langAlias?.[f]||f,ve(f))return[];const g=r[f];if(!g)throw new S(`Language \`${f}\` is not included in this bundle. You may want to load it from external source.`);return g}return f}function i(f){if(_e(f))return"none";if(typeof f=="string"){const g=n[f];if(!g)throw new S(`Theme \`${f}\` is not included in this bundle. You may want to load it from external source.`);return g}return f}const c=(a.themes??[]).map(f=>i(f)),l=(a.langs??[]).map(f=>o(f)),u=await We({engine:a.engine??e(),...a,themes:c,langs:l});return{...u,loadLanguage(...f){return u.loadLanguage(...f.map(o))},loadTheme(...f){return u.loadTheme(...f.map(i))},getBundledLanguages(){return r},getBundledThemes(){return n}}}return s}function Fn(t){let r;async function n(e={}){if(r){const s=await r;return await Promise.all([s.loadTheme(...e.themes||[]),s.loadLanguage(...e.langs||[])]),s}else{r=t({...e,themes:[],langs:[]});const s=await r;return await Promise.all([s.loadTheme(...e.themes||[]),s.loadLanguage(...e.langs||[])]),s}}return n}function Yn(t,r){const n=Fn(t);async function e(s,a){const o=await n({langs:[a.lang],themes:"theme"in a?[a.theme]:Object.values(a.themes)}),i=await r?.guessEmbeddedLanguages?.(s,a.lang,o);return i&&await o.loadLanguage(...i),o}return{getSingletonHighlighter(s){return n(s)},async codeToHtml(s,a){return(await e(s,a)).codeToHtml(s,a)},async codeToHast(s,a){return(await e(s,a)).codeToHast(s,a)},async codeToTokens(s,a){return(await e(s,a)).codeToTokens(s,a)},async codeToTokensBase(s,a){return(await e(s,a)).codeToTokensBase(s,a)},async codeToTokensWithThemes(s,a){return(await e(s,a)).codeToTokensWithThemes(s,a)},async getLastGrammarState(s,a){return(await n({langs:[a.lang],themes:[a.theme]})).getLastGrammarState(s,a)}}}function Vn(t={}){const{name:r="css-variables",variablePrefix:n="--shiki-",fontStyle:e=!0}=t,s=o=>t.variableDefaults?.[o]?`var(${n}${o}, ${t.variableDefaults[o]})`:`var(${n}${o})`,a={name:r,type:"dark",colors:{"editor.foreground":s("foreground"),"editor.background":s("background"),"terminal.ansiBlack":s("ansi-black"),"terminal.ansiRed":s("ansi-red"),"terminal.ansiGreen":s("ansi-green"),"terminal.ansiYellow":s("ansi-yellow"),"terminal.ansiBlue":s("ansi-blue"),"terminal.ansiMagenta":s("ansi-magenta"),"terminal.ansiCyan":s("ansi-cyan"),"terminal.ansiWhite":s("ansi-white"),"terminal.ansiBrightBlack":s("ansi-bright-black"),"terminal.ansiBrightRed":s("ansi-bright-red"),"terminal.ansiBrightGreen":s("ansi-bright-green"),"terminal.ansiBrightYellow":s("ansi-bright-yellow"),"terminal.ansiBrightBlue":s("ansi-bright-blue"),"terminal.ansiBrightMagenta":s("ansi-bright-magenta"),"terminal.ansiBrightCyan":s("ansi-bright-cyan"),"terminal.ansiBrightWhite":s("ansi-bright-white")},tokenColors:[{scope:["keyword.operator.accessor","meta.group.braces.round.function.arguments","meta.template.expression","markup.fenced_code meta.embedded.block"],settings:{foreground:s("foreground")}},{scope:"emphasis",settings:{fontStyle:"italic"}},{scope:["strong","markup.heading.markdown","markup.bold.markdown"],settings:{fontStyle:"bold"}},{scope:["markup.italic.markdown"],settings:{fontStyle:"italic"}},{scope:"meta.link.inline.markdown",settings:{fontStyle:"underline",foreground:s("token-link")}},{scope:["string","markup.fenced_code","markup.inline"],settings:{foreground:s("token-string")}},{scope:["comment","string.quoted.docstring.multi"],settings:{foreground:s("token-comment")}},{scope:["constant.numeric","constant.language","constant.other.placeholder","constant.character.format.placeholder","variable.language.this","variable.other.object","variable.other.class","variable.other.constant","meta.property-name","meta.property-value","support"],settings:{foreground:s("token-constant")}},{scope:["keyword","storage.modifier","storage.type","storage.control.clojure","entity.name.function.clojure","entity.name.tag.yaml","support.function.node","support.type.property-name.json","punctuation.separator.key-value","punctuation.definition.template-expression"],settings:{foreground:s("token-keyword")}},{scope:"variable.parameter.function",settings:{foreground:s("token-parameter")}},{scope:["support.function","entity.name.type","entity.other.inherited-class","meta.function-call","meta.instance.constructor","entity.other.attribute-name","entity.name.function","constant.keyword.clojure"],settings:{foreground:s("token-function")}},{scope:["entity.name.tag","string.quoted","string.regexp","string.interpolated","string.template","string.unquoted.plain.out.yaml","keyword.other.template"],settings:{foreground:s("token-string-expression")}},{scope:["punctuation.definition.arguments","punctuation.definition.dict","punctuation.separator","meta.function-call.arguments"],settings:{foreground:s("token-punctuation")}},{scope:["markup.underline.link","punctuation.definition.metadata.markdown"],settings:{foreground:s("token-link")}},{scope:["beginning.punctuation.definition.list.markdown"],settings:{foreground:s("token-string")}},{scope:["punctuation.definition.string.begin.markdown","punctuation.definition.string.end.markdown","string.other.link.title.markdown","string.other.link.description.markdown"],settings:{foreground:s("token-keyword")}},{scope:["markup.inserted","meta.diff.header.to-file","punctuation.definition.inserted"],settings:{foreground:s("token-inserted")}},{scope:["markup.deleted","meta.diff.header.from-file","punctuation.definition.deleted"],settings:{foreground:s("token-deleted")}},{scope:["markup.changed","punctuation.definition.changed"],settings:{foreground:s("token-changed")}}]};return e||(a.tokenColors=a.tokenColors?.map(o=>(o.settings?.fontStyle&&delete o.settings.fontStyle,o))),a}export{S as ShikiError,Pe as addClassToHast,v as applyColorReplacements,I as codeToHast,qe as codeToHtml,B as codeToTokens,G as codeToTokensBase,se as codeToTokensWithThemes,Un as createBundledHighlighter,Vn as createCssVariablesTheme,We as createHighlighterCore,Wn as createHighlighterCoreSync,pn as createPositionConverter,Hn as createShikiInternal,Pn as createShikiInternalSync,ne as createShikiPrimitive,$e as createShikiPrimitiveAsync,Yn as createSingletonShorthands,Sn as flatTokenVariants,Re as getLastGrammarState,zn as getSingletonHighlighterCore,M as getTokenStyleObject,qn as guessEmbeddedLanguages,Dn as hastToHtml,H as isNoneTheme,P as isPlainLang,ve as isSpecialLang,_e as isSpecialTheme,Fn as makeSingletonHighlighter,Mn as makeSingletonHighlighterCore,Ce as normalizeGetter,te as normalizeTheme,D as resolve
10ColorReplacements,q as splitLines,bn as splitToken,wn as splitTokens,ee as stringifyTokenStyle,Ze as toArray,$n as tokenizeAnsiWithTheme,nt as tokenizeWithTheme,Bn as tokensToHast,kn as transformerDecorations};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.