PageSourceSearch

https://xyc.ai/static/js/async/4003.32f4076689.js

js xyc.ai collected 2026-10-05 14:39:03 UTC 106,513 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[4003],{93294(e,t,n){let r,s,i,a,o,l;n.d(t,{Yz:()=>nb});var c,h,u={};n.r(u),n.d(u,{createOnigurumaEngine:()=>x,getDefaultWasmLoader:()=>L,loadWasm:()=>A,setDefaultWasmLoader:()=>T});var d=Object.defineProperty,p=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,g=Object.prototype.hasOwnProperty,f=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function y(){return"u">typeof performance?performance.now():Date.now()}let b=(e,t)=>e+(t-e%t)%t;async function _(e){let t,n,r={};function s(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}let i="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function a(e,t){return e?function(e,t,n=1024){let r=t+n,s=t;for(;e[s]&&!(s>=r);)++s;if(s-t>16&&e.buffer&&i)return i.decode(e.subarray(t,s));let a="";for(;t<s;){let n=e[t++];if(!(128&n)){a+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){a+=String.fromCharCode((31&n)<<6|r);continue}let s=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|s:(7&n)<<18|r<<12|s<<6|63&e[t++])<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return a}(r.HEAPU8,e,t):""}let o={emscripten_get_now:y,emscripten_memcpy_big:function(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)},emscripten_resize_heap:function(e){let i=r.HEAPU8.length;if((e>>>=0)>0x80000000)return!1;for(let r=1;r<=4;r*=2){let a=i*(1+.2/r);if(a=Math.min(a,e+0x6000000),function(e){try{return t.grow(e-n.byteLength+65535>>>16),s(t.buffer),1}catch{}}(Math.min(0x80000000,b(Math.max(e,a),65536))))return!0}return!1},fd_write:()=>0};async function l(){let n=await e({env:o,wasi_snapshot_preview1:o});s((t=n.memory).buffer),Object.assign(r,n),r.UTF8ToString=a}return await l(),r}var k=Object.defineProperty,S=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?k(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n};let w=null;class N{constructor(e){S(this,"utf16Length"),S(this,"utf8Length"),S(this,"utf16Value"),S(this,"utf8Value"),S(this,"utf16OffsetToUtf8"),S(this,"utf8OffsetToUtf16");const t=e.length,n=N._utf8ByteLength(e),r=n!==t,s=r?new Uint32Array(t+1):null;r&&(s[t]=n);const i=r?new Uint32Array(n+1):null;r&&(i[n]=t);const a=new Uint8Array(n);let o=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let c=l,h=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(c=(l-55296<<10)+65536|t-56320,h=!0)}r&&(s[n]=o,h&&(s[n+1]=o),c<=127?i[o+0]=n:c<=2047?(i[o+0]=n,i[o+1]=n):c<=65535?(i[o+0]=n,i[o+1]=n,i[o+2]=n):(i[o+0]=n,i[o+1]=n,i[o+2]=n,i[o+3]=n)),c<=127?a[o++]=c:(c<=2047?a[o++]=192|(1984&c)>>>6:(c<=65535?a[o++]=224|(61440&c)>>>12:(a[o++]=240|(1835008&c)>>>18,a[o++]=128|(258048&c)>>>12),a[o++]=128|(4032&c)>>>6),a[o++]=128|(63&c)>>>0),h&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=a,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=i}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let s=e.charCodeAt(n),i=s,a=!1;if(s>=55296&&s<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(i=(s-55296<<10)+65536|t-56320,a=!0)}i<=127?t+=1:i<=2047?t+=2:i<=65535?t+=3:t+=4,a&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let C=class e{constructor(t){if(S(this,"id",++e.LAST_ID),S(this,"_onigBinding"),S(this,"content"),S(this,"utf16Length"),S(this,"utf8Length"),S(this,"utf16OffsetToUtf8"),S(this,"utf8OffsetToUtf16"),S(this,"ptr"),!w)throw new f("Must invoke loadWasm first.");this._onigBinding=w,this.content=t;const n=new N(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=w.omalloc(1e4)),e._sharedPtrInUse=!0,w.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(w)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};S(C,"LAST_ID",0),S(C,"_sharedPtr",0),S(C,"_sharedPtrInUse",!1);class v{constructor(e){if(S(this,"_onigBinding"),S(this,"_ptr"),!w)throw new f("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,s=e.length;r<s;r++){const s=new N(e[r]);t[r]=s.createString(w),n[r]=s.utf8Length}const r=w.omalloc(4*e.length);w.HEAPU32.set(t,r/4);const s=w.omalloc(4*e.length);w.HEAPU32.set(n,s/4);const i=w.createOnigScanner(r,s,e.length);for(let n=0,r=e.length;n<r;n++)w.ofree(t[n]);w.ofree(s),w.ofree(r),0===i&&function(e){throw new f(e.UTF8ToString(e.getLastO
1nigError()))}(w),this._onigBinding=w,this._ptr=i}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new C(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let s=this._onigBinding,i=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===i)return null;let a=s.HEAPU32,o=i/4,l=a[o++],c=a[o++],h=[];for(let t=0;t<c;t++){let n=e.convertUtf8OffsetToUtf16(a[o++]),r=e.convertUtf8OffsetToUtf16(a[o++]);h[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:h}}}function A(e){return r||(r=async function(){w=await _(async t=>{let n=e;if("function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),"function"==typeof n.instantiator)n=await n.instantiator(t);else if("function"==typeof n.default)n=await n.default(t);else{var r,s,i,a;if(void 0!==n.data&&(n=n.data),r=n,"u">typeof Response&&r instanceof Response){n="function"==typeof WebAssembly.instantiateStreaming?await (i=n,e=>WebAssembly.instantiateStreaming(i,e))(t):await (a=n,async e=>{let t=await a.arrayBuffer();return WebAssembly.instantiate(t,e)})(t)}else(s=n,"u">typeof ArrayBuffer&&(s instanceof ArrayBuffer||ArrayBuffer.isView(s))||"u">typeof Buffer&&Buffer.isBuffer?.(s)||"u">typeof SharedArrayBuffer&&s instanceof SharedArrayBuffer||"u">typeof Uint32Array&&s instanceof Uint32Array||n instanceof WebAssembly.Module)?n=await P(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await P(n.default)(t))}return"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function P(e){return t=>WebAssembly.instantiate(e,t)}function T(e){s=e}function L(){return s}async function x(e){return e&&await A(e),{createScanner:e=>new v(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new C(e)}}var R=(e=>{let t={};for(var n in e)d(t,n,{get:e[n],enumerable:!0});return d(t,Symbol.toStringTag,{value:"Module"}),t})({});((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var s,i=m(t),a=0,o=i.length;a<o;a++)s=i[a],g.call(e,s)||s===n||d(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=p(t,s))||r.enumerable});return})(R,u,"default");let E=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(2444).then(n.bind(n,89303))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(8573).then(n.bind(n,4588))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(344).then(n.bind(n,30203))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(7142).then(n.bind(n,85205))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(8863).then(n.bind(n,72994))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:()=>n.e(8005).then(n.bind(n,64740))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(6001).then(n.bind(n,41528))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(3496).then(n.bind(n,18107))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(4385).then(n.bind(n,11448))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(9533).then(n.bind(n,876))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(1608).then(n.bind(n,6139))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(3641).then(n.bind(n,7632))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(3414).then(n.bind(n,7861))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(2332).then(n.bind(n,11703))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(7304).then(n.bind(n,91115))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(9492).then(n.bind(n,13135))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(7645).then(n.bind(n,93372))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(408).then(n.bind(n,47691))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(2934).then(n.bind(n,48517))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(2766).then(n.bind(n,88157))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(5742).then(n.bind(n,58445))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(742).then(n.bind(n,33141))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(8300).then(n.bind(n,6631))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(5119).then(n.bind(n,69986))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(2596).then(n.bind(n,64543))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(5926).then(n.bind(n,74837))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(7373).then(n.bind(n,83036))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(7413).then(n.bind(n,44900))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:()=>n.e(9774).then(n.bind(n,48045))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(7268).then(n.bind(n,2383))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(3453).then(n.bind(n,25596))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(279).then(n.bind(n,59098))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(7199).then(n.bind(n,46114))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(8288).then(n.bind(n,87299))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(8619).then(n.bind(n,21926))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(3217).then(n.bind(n,84152))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(8813).then(n.bind(n,40492))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(951).then(n.bind(n,48074))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(4022).then(n.bind(n,52325))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(4822).then(n.bind(n,70405))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(4767).then(n.bind(n,48914))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(6039).then(n.bind(n,73162))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e(8936).then(n.bind(n,61403))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(7983).then(n.bind(n,51250))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(5698).then(n.bind(n,47833))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(2077).then(n.bind(n,53596))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(9525).then(n.bind(n,85748))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(4371).then(n.bind(n,39854))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(3482).then(n.bind(n,28273))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(2854).then(n.bind(n,49269))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(6145).then(n.bind(n,98088))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:()=>n.e(2558).then(n.bind(n,18109))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:()=>n.e(7957).then(n.bind(n,7092))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:()=>n.e(8802).then(n.bind(n,84537))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(8375).then(n.bind(n,954))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(2278).then(n.bind(n,7685))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(9702).then(n.bind(n,2101))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(6814).then(n.bind(n,74749))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(9780).then(n.bind(n,63791))}
1,{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(7574).then(n.bind(n,2805))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(7275).then(n.bind(n,12006))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(9509).then(n.bind(n,19252))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(3335).then(n.bind(n,21034))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(1322).then(n.bind(n,64833))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(7336).then(n.bind(n,26059))}].map(e=>[e.id,e.import]));var I=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function O(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}var G=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,M=class{static hasCaptures(e){return null!==e&&(G.lastIndex=0,G.test(e))}static replaceCaptures(e,t,n){return e.replace(G,(e,r,s,i)=>{let a=n[parseInt(r||s,10)];if(!a)return e;{let e=t.substring(a.start,a.end);for(;"."===e[0];)e=e.substring(1);switch(i){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function $(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){var s,i;let n=(s=e[r],s<(i=t[r])?-1:+(s>i));if(0!==n)return n}return 0}return n-r}function B(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function j(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var D=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},U=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(function(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,s=t.length;e<s;e++){let s,i=t[e];if(!i.settings)continue;if("string"==typeof i.scope){let e=i.scope;s=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else s=Array.isArray(i.scope)?i.scope:[""];let a=-1;if("string"==typeof i.settings.fontStyle){a=0;let e=i.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":a|=1;break;case"bold":a|=2;break;case"underline":a|=4;break;case"strikethrough":a|=8}}let o=null;"string"==typeof i.settings.foreground&&B(i.settings.foreground)&&(o=i.settings.foreground);let l=null;"string"==typeof i.settings.background&&B(i.settings.background)&&(l=i.settings.background);for(let t=0,i=s.length;t<i;t++){let i=s[t].trim().split(" "),c=i[i.length-1],h=null;i.length>1&&(h=i.slice(0,i.length-1)).reverse(),n[r++]=new H(c,h,e,a,o,l)}}return n}(e),t)}static createFromParsedTheme(e,t){return function(e,t){e.sort((e,t)=>{var n,r;let s=(n=e.scope,n<(r=t.scope)?-1:+(n>r));return 0!==s||0!==(s=$(e.parentScopes,t.parentScopes))?s:e.index-t.index});let n=0,r="#000000",s="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(s=t.background)}let i=new z(t),a=new F(n,i.getId(r),i.getId(s)),o=new K(new V(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];o.insert(0,n.scope,n.parentScopes,n.fontStyle,i.getId(n.foreground),i.getId(n.background))}return new U(i,a,o)}(e,t)}_cachedMatchRoot=new D(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>(function(e,t){if(0===t.length)return!0;for(let s=0;s<t.length;s++){var n,r;let i=t[s],a=!1;if(">"===i){if(s===t.length-1)return!1;i=t[++s],a=!0}for(;e&&(n=e.scopeName,!((r=i)===n||n.startsWith(r)&&"."===n[r.length]));){if(a)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0})(e.parent,t.parentScopes));return n?new F(n.fontStyle,n.foreground,n.background):null}},W=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}
1toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}},F=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}},H=class{constructor(e,t,n,r,s,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},q=((c=q||{})[c.NotSet=-1]="NotSet",c[c.None=0]="None",c[c.Italic=1]="Italic",c[c.Bold=2]="Bold",c[c.Underline=4]="Underline",c[c.Strikethrough=8]="Strikethrough",c),z=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},J=Object.freeze([]),V=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,s){this.scopeDepth=e,this.parentScopes=t||J,this.fontStyle=n,this.foreground=r,this.background=s}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e||(this.scopeDepth=e),-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},K=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let s=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==s)return s;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,s,i,a){let o,l,c;if(""===n)return void this._doInsertHere(t,r,s,i,a);let h=n.indexOf(".");-1===h?(o=n,l=""):(o=n.substring(0,h),l=n.substring(h+1)),this._children.hasOwnProperty(o)?c=this._children[o]:(c=new e(this._mainRule.clone(),V.cloneArr(this._rulesWithParentScopes)),this._children[o]=c),c.insert(t+1,l,r,s,i,a)}_doInsertHere(e,t,n,r,s){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,s);for(let i=0,a=this._rulesWithParentScopes.length;i<a;i++){let a=this._rulesWithParentScopes[i];if(0===$(a.parentScopes,t))return void a.acceptOverwrite(e,n,r,s)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===s&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new V(e,t,n,r,s))}},Y=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){e.getLanguageId(t),e.getTokenType(t),e.getFontStyle(t),e.getForeground(t),e.getBackground(t)}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,s,i,a,o){let l=e.getLanguageId(t),c=e.getTokenType(t),h=+!!e.containsBalancedBrackets(t),u=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(c=r),null!==s&&(h=+!!s),-1!==i&&(u=i),0!==a&&(d=a),0!==o&&(p=o),(l|c<<8|h<<10|u<<11|d<<15|p<<24)>>>0}};function Q(e,t){var n;let r,s,i=[],a=(n=e,s=(r=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g).exec(n),{next:()=>{if(!s)return null;let e=s[0];return s=r.exec(n),e}}),o=a.next();for(;null!==o;){let e=0;if(2===o.length&&":"===o.charAt(1)){switch(o.charAt(0)){case"R":e=1;break;case"L":e=-1}o=a.next()}let t=c();if(i.push({matcher:t,priority:e}),","!==o)break;o=a.next()}return i;function l(){if("-"===o){o=a.next();let e=l();return t=>!!e&&!e(t)}if("("===o){o=a.next();let e=function(){let e=[],t=c();for(;t&&(e.push(t),"|"===o||","===o);){do o=a.next();while("|"===o||","===o)t=c()}return t=>e.some(e=>e(t))}();return")"===o&&(o=a.next()),e}if(X(o)){let e=[];do e.push(o),o=a.next();while(X(o))return n=>t(e,n)}return null}function c(){let e=[],t=l();for(;t;)e.push(t),t=l();return t=>e.every(e=>e(t))}}function X(e){return!!e&&!!e.match(/[\w\.:]+/)}function Z(e){"function"==typeof e.dispose&&e.dispose()}var ee=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},et=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},en=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},er=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new ee(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new en;for(let n of e)!function(e,t,n,r){let s=n.lookup(e.scopeName);if(!s){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let i=n.lookup(t);e instanceof ee?ei({baseGrammar:i,selfGrammar:s},r):es(e.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);let a=n.injections(e.scopeName);if(a)for(let e of a)r.add(new ee(e))}(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof ee){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};
1function es(e,t,n){t.repository&&t.repository[e]&&ea([t.repository[e]],t,n)}function ei(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&ea(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&ea(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function ea(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?O({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&ea(r.patterns,{...t,repository:e},n);let s=r.include;if(!s)continue;let i=ed(s);switch(i.kind){case 0:ei({...t,selfGrammar:t.baseGrammar},n);break;case 1:ei(t,n);break;case 2:es(i.ruleName,{...t,repository:e},n);break;case 3:case 4:let a=i.scopeName===t.selfGrammar.scopeName?t.selfGrammar:i.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(a){let r={baseGrammar:t.baseGrammar,selfGrammar:a,repository:e};4===i.kind?es(i.ruleName,r,n):ei(r,n)}else 4===i.kind?n.add(new et(i.scopeName,i.ruleName)):n.add(new ee(i.scopeName))}}}var eo=class{kind=0},el=class{kind=1},ec=class{constructor(e){this.ruleName=e}kind=2},eh=class{constructor(e){this.scopeName=e}kind=3},eu=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};
1function ed(e){if("$base"===e)return new eo;if("$self"===e)return new el;let t=e.indexOf("#");return -1===t?new eh(e):0===t?new ec(e.substring(1)):new eu(e.substring(0,t),e.substring(t+1))}var ep=/\\(\d+)/,em=/\\(\d+)/g;Symbol("RuleId");var eg=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=M.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=M.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${function e(t){let n=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return 0===n?t:~n==t.length-1?e(t.substring(0,t.length-1)):t.substr(~n+1)}(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?M.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?M.replaceCaptures(this._contentName,e,t):this._contentName}},ef=class extends eg{retokenizeCapturedWithRuleId;constructor(e,t,n,r,s){super(e,t,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},ey=class extends eg{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,s){super(e,t,n,null),this._match=new ew(r,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,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eN,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},eb=class extends eg{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,s){super(e,t,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new eN,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},e_=class extends eg{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,s,i,a,o,l,c){super(e,t,n,r),this._begin=new ew(s,this.id),this.beginCaptures=i,this._end=new ew(a||"ï¿¿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=l||!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,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new eN,this.patterns))e.getRule(t).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,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ek=class extends eg{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,s,i,a,o,l){super(e,t,n,r),this._begin=new ew(s,this.id),this.beginCaptures=i,this.whileCaptures=o,this._while=ne
1w ew(a,-2),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.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,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new eN,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new eN,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"ï¿¿"),this._cachedCompiledWhilePatterns}
1},eS=class e{static createCaptureRule(e,t,n,r,s){return e.registerRule(e=>new ef(t,e,n,r,s))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(s=>{if(t.id=s,t.match)return new ey(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=O({},r,t.repository));let s=t.patterns;return void 0===s&&t.include&&(s=[{include:t.include}]),new eb(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(s,n,r))}return t.while?new ek(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new e_(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let s=[];if(t){let i=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>i&&(i=t)}for(let e=0;e<=i;e++)s[e]=null;for(let i in t){if("$vscodeTextmateLocation"===i)continue;let a=parseInt(i,10),o=0;t[i].patterns&&(o=e.getCompiledRuleId(t[i],n,r)),s[a]=e.createCaptureRule(n,t[i].$vscodeTextmateLocation,t[i].name,t[i].contentName,o)}}return s}static _compilePatterns(t,n,r){let s=[];if(t)for(let i=0,a=t.length;i<a;i++){let a=t[i],o=-1;if(a.include){let t=ed(a.include);switch(t.kind){case 0:case 1:o=e.getCompiledRuleId(r[a.include],n,r);break;case 2:let s=r[t.ruleName];s&&(o=e.getCompiledRuleId(s,n,r));break;case 3:case 4:let i=t.scopeName,l=4===t.kind?t.ruleName:null,c=n.getExternalGrammar(i,r);if(c)if(l){let t=c.repository[l];t&&(o=e.getCompiledRuleId(t,n,c.repository))}else o=e.getCompiledRuleId(c.repository.$self,n,c.repository)}}else o=e.getCompiledRuleId(a,n,r);if(-1!==o){let e=n.getRule(o),t=!1;if((e instanceof eb||e instanceof e_||e instanceof ek)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;s.push(o)}}return{patterns:s,hasMissingPatterns:(t?t.length:0)!==s.length}}},ew=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],s=!1;for(let i=0;i<t;i++)if("\\"===e.charAt(i)&&i+1<t){const t=e.charAt(i+1);"z"===t?(r.push(e.substring(n,i)),r.push("$(?!\\n)(?<!\\n)"),n=i+2):("A"===t||"G"===t)&&(s=!0),i++}this.hasAnchor=s,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=ep.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return em.lastIndex=0,this.source.replace(em,(e,t)=>j(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let s=[],i=[],a=[],o=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),s[e]=n,i[e]=n,a[e]=n,o[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(s[e+1]="ï¿¿",i[e+1]="ï¿¿",a[e+1]="A",o[e+1]="A"):"G"===r?(s[e+1]="ï¿¿",i[e+1]="G",a[e+1]="ï¿¿",o[e+1]="G"):(s[e+1]=r,i[e+1]=r,a[e+1]=r,o[e+1]=r),e++);return{A0_G0:s.join(""),A0_G1:i.join(""),A1_G0:a.join(""),A1_G1:o.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},eN=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){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)}
1push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new eC(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new eC(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},eC=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push("   - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},ev=class{constructor(e,t){this.languageId=e,this.tokenType=t}},eA=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new ev(e,8),this._embeddedLanguagesMatcher=new eP(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new ev(0,0);_getBasicScopeAttributes=new D(e=>new ev(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.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 Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},eP=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>j(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};"u">typeof process&&process.env.VSCODE_TEXTMATE_DEBUG;var eT=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function eL(e,t,n,r,s,i,a,o){let l=t.content.length,c=!1,h=-1;if(a){let a=function(e,t,n,r,s,i){let a=s.beginRuleCapturedEOL?0:-1,o=[];for(let t=s;t;t=t.pop()){let n=t.getRule(e);n instanceof ek&&o.push({rule:n,stack:t})}for(let p=o.pop();p;p=o.pop()){var l,c,h,u,d;let{ruleScanner:o,findOptions:m}=(l=p.rule,c=e,h=p.stack.endRule,u=n,d=r===a,{ruleScanner:l.compileWhileAG(c,h,u,d),findOptions:0}),g=o.findNextMatchSync(t,r,m);if(g){if(-2!==g.ruleId){s=p.stack.pop();break}g.captureIndices&&g.captureIndices.length&&(i.produce(p.stack,g.captureIndices[0].start),eR(e,t,n,p.stack,i,p.rule.whileCaptures,g.captureIndices),i.produce(p.stack,g.captureIndices[0].end),a=g.captureIndices[0].end,g.captureIndices[0].end>r&&(r=g.captureIndices[0].end,n=!1))}else{s=p.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:a,isFirstLine:n}}(e,t,n,r,s,i);s=a.stack,r=a.linePos,n=a.isFirstLine,h=a.anchorPosition}let u=Date.now();for(;!c;){if(0!==o&&Date.now()-u>o)return new eT(s,!0);!function(){let a=function(e,t,n,r,s,i){let a=function(e,t,n,r,s,i){let{ruleScanner:a,findOptions:o}=ex(s.getRule(e),e,s.endRule,n,r===i),l=a.findNextMatchSync(t,r,o);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}(e,t,n,r,s,i),o=e.getInjections();if(0===o.length)return a;let l=function(e,t,n,r,s,i,a){let o,l=Number.MAX_VALUE,c=null,h=0,u=i.contentNameScopesList.getScopeNames();for(let i=0,d=e.length;i<d;i++){let d=e[i];if(!d.matcher(u))continue;let{ruleScanner:p,findOptions:m}=ex(t.getRule(d.ruleId),t,null,r,s===a),g=p.findNextMatchSync(n,s,m);if(!g)continue;let f=g.captureIndices[0].start;if(!(f>=l)&&(l=f,c=g.captureIndices,o=g.ruleId,h=d.priority,l===s))break}return c?{priorityMatch:-1===h,captureIndices:c,matchedRuleId:o}:null}(o,e,t,n,r,s,i);if(!l)return a;
1if(!a)return l;let c=a.captureIndices[0].start,h=l.captureIndices[0].start;return h<c||l.priorityMatch&&h===c?l:a}(e,t,n,r,s,h);if(!a){i.produce(s,l),c=!0;return}let o=a.captureIndices,u=a.matchedRuleId,d=!!o&&o.length>0&&o[0].end>r;if(-1===u){let a=s.getRule(e);i.produce(s,o[0].start),s=s.withContentNameScopesList(s.nameScopesList),eR(e,t,n,s,i,a.endCaptures,o),i.produce(s,o[0].end);let u=s;if(s=s.parent,h=u.getAnchorPos(),!d&&u.getEnterPos()===r){s=u,i.produce(s,l),c=!0;return}}else{let a=e.getRule(u);i.produce(s,o[0].start);let p=s,m=a.getName(t.content,o),g=s.contentNameScopesList.pushAttributed(m,e);if(s=s.push(u,r,h,o[0].end===l,null,g,g),a instanceof e_){eR(e,t,n,s,i,a.beginCaptures,o),i.produce(s,o[0].end),h=o[0].end;let r=a.getContentName(t.content,o),u=g.pushAttributed(r,e);if(s=s.withContentNameScopesList(u),a.endHasBackReferences&&(s=s.withEndRule(a.getEndWithResolvedBackReferences(t.content,o))),!d&&p.hasSameRuleAs(s)){s=s.pop(),i.produce(s,l),c=!0;return}}else if(a instanceof ek){eR(e,t,n,s,i,a.beginCaptures,o),i.produce(s,o[0].end),h=o[0].end;let r=a.getContentName(t.content,o),u=g.pushAttributed(r,e);if(s=s.withContentNameScopesList(u),a.whileHasBackReferences&&(s=s.withEndRule(a.getWhileWithResolvedBackReferences(t.content,o))),!d&&p.hasSameRuleAs(s)){s=s.pop(),i.produce(s,l),c=!0;return}}else if(eR(e,t,n,s,i,a.captures,o),i.produce(s,o[0].end),s=s.pop(),!d){s=s.safePop(),i.produce(s,l),c=!0;return}}o[0].end>r&&(r=o[0].end,n=!1)}()}return new eT(s,!1)}function ex(e,t,n,r,s){return{ruleScanner:e.compileAG(t,n,r,s),findOptions:0}}function eR(e,t,n,r,s,i,a){if(0===i.length)return;let o=t.content,l=Math.min(i.length,a.length),c=[],h=a[0].end;for(let t=0;t<l;t++){let l=i[t];if(null===l)continue;let u=a[t];if(0===u.length)continue;if(u.start>h)break;for(;c.length>0&&c[c.length-1].endPos<=u.start;
1)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop();if(c.length>0?s.produceFromScopes(c[c.length-1].scopes,u.start):s.produce(r,u.start),l.retokenizeCapturedWithRuleId){let t=l.getName(o,a),i=r.contentNameScopesList.pushAttributed(t,e),c=l.getContentName(o,a),h=i.pushAttributed(c,e),d=r.push(l.retokenizeCapturedWithRuleId,u.start,-1,!1,null,i,h),p=e.createOnigString(o.substring(0,u.end));eL(e,p,n&&0===u.start,u.start,d,s,!1,0),Z(p);continue}let d=l.getName(o,a);if(null!==d){let t=(c.length>0?c[c.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);c.push(new eE(t,u.end))}}for(;c.length>0;)s.produceFromScopes(c[c.length-1].scopes,c[c.length-1].endPos),c.pop()}var eE=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eI(e,t,n,r,s){let i=Q(t,eO),a=eS.getCompiledRuleId(n,r,s.repository);for(let n of i)e.push({debugSelector:t,matcher:n.matcher,ruleId:a,grammar:s,priority:n.priority})}function eO(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(function(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}(t[r],e))return n=r+1,!0;return!1})}var eG=class{constructor(e,t,n,r,s,i,a,o){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=o,this._basicScopeAttributesProvider=new eA(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=eM(t,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const e of Object.keys(s))for(const t of Q(e,eO))this._tokenTypeMatchers.push({matcher:t.matcher,type:s[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=[],t=this._rootScopeName,n=({lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)}).lookup(t);if(n){let r=n.injections;if(r)for(let t in r)eI(e,t,r[t],this,n);let s=this._grammarRepository.injections(t);s&&s.forEach(t=>{let n=this.getExternalGrammar(t);if(n){let t=n.injectionSelector;t&&eI(e,t,n,this,n)}})}return e.sort((e,t)=>e.priority-t.priority),e}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eM(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let s;if(-1===this._rootId&&(this._rootId=eS.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==eB.NULL)s=!1,t.reset();else{let e;s=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),i=Y.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),a=this.getRule(this._rootId).getName(null,null);e=a?e$.createRootAndLookUpScopeName(a,i,this):e$.createRoot("unknown",i),t=new eB(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let i=this.createOnigString(e),a=i.content.length,o=new eD(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=eL(this,i,s,0,t,o,!0,r);return Z(i),{lineLength:a,lineTokens:o,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eM(e,t){return(e=function e(t){return Array.isArray(t)?function(t){let n=[];for(let r=0,s=t.length;r<s;r++)n[r]=e(t[r]);return n}(t):t instanceof RegExp?t:"object"==typeof t?function(t){let n={};for(let r in t)n[r]=e(t[r]);return n}(t):t}(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName}
1,e.repository.$base=t||e.repository.$self,e}var e$=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,s=t?.scopePath??null;for(let t of n)r=new e(r,s=W.push(s,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new W(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let s=r.getMetadataForScope(t),i=new W(null,t),a=r.themeProvider.themeMatch(i),o=e.mergeAttributes(n,s,a);return new e(null,i,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,s=0,i=0;return null!==n&&(r=n.fontStyle,s=n.foregroundId,i=n.backgroundId),Y.set(e,t.languageId,t.tokenType,null,r,s,i)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),s=this;for(let t of r)s=e._pushAttributed(s,t,n);return s}static _pushAttributed(t,n,r){let s=r.getMetadataForScope(n),i=t.scopePath.push(n),a=r.themeProvider.themeMatch(i),o=e.mergeAttributes(t.tokenAttributes,s,a);return new e(t,i,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},eB=class e{constructor(e,t,n,r,s,i,a,o){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=s,this.endRule=i,this.nameScopesList=a,this.contentNameScopesList=o,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e$.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,s,i,a,o){return new e(this,t,n,r,s,i,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=e$.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,e$.fromExtension(r,n.contentNameScopesList))}},ej=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):Q(e,eO).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>Q(e,eO).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eD=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>
10||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=Y.set(n,0,e.type,null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=Y.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eU=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,s){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,new eG(e,i,t,n,r,s,this,this._onigLib))}return this._grammars.get(e)}},eW=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eU(U.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(U.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new ej(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,s){let i=new er(this._syncRegistry,e);for(;i.Q.length>0;)i.Q.map(e=>this._loadSingleGrammar(e.scopeName)),i.processQueue();return this._grammarForScopeName(e,t,n,r,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,s)}},eF=eB.NULL;function eH(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,s]of Object.entries(t?.colorReplacements||{}))"string"==typeof s?n[e]=s:e===r&&Object.assign(n,s);return n}function eq(e,t){return e&&t?.[e?.toLowerCase()]||e}async function ez(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function eJ(e){return!e||["plaintext","txt","text","plain"].includes(e)}function eV(e){return"ansi"===e||eJ(e)}function eK(e){return"none"===e}let eY=/(\r?\n)/g;function eQ(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(eY),r=0,s=[];for(let e=0;e<n.length;e+=2){let i=t?n[e]+(n[e+1]||""):n[e];s.push([i,r]),r+=n[e].length,r+=n[e+1]?.length||0}return s}let eX="__shiki_resolved";function eZ(e){if(e?.[eX])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?"#333333":"#bbbbbb"),n||(n="light"===t.type?"#fffffe":"#1e1e1e"),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let s=0,i=new Map;function a(e){if(i.has(e))return i.get(e);s+=1;let n=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?a(e):(i.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let s={...e,settings:{...e.settings}};if(n){let n=a(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,s.settings.foreground=n}if(r){let n=a(e.settings.background);t.colorReplacements[n]=e.settings.background,s.settings.background=n}return s}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=a(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,eX,{enumerable:!1,writable:!1,value:!0}),t}async function e0(e){return[...new Set((await Promise.all(e.filter(e=>!eV(e)).map(async e=>await ez(e).then(e=>Array.isArray(e)?e:[e])))).flat())]}async function e1(e){return(await Promise.all(e.map(async e=>eK(e)?null:eZ(await ez(e))))).filter(e=>!!e)}function e2(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new I(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var e6=class extends eW{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=eZ(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=U.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=e2(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEac
1h(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=[...this._langGraph.entries()],n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>!!t&&(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e))).filter(e=>!n.includes(e));throw new I(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},e8=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}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(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}};let e5=0;async function e4(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([e1(e.themes||[]),e0(e.langs||[]),e.engine]);return function(e){let t;e5+=1,!1!==e.warnings&&e5>=10&&e5%10==0&&console.warn(`[Shiki] ${e5} 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 n=!1;if(!e.engine)throw new I("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),s=(e.themes||[]).flat(1).map(eZ),i=new e6(new e8(e.engine,r),s,r,e.langAlias);function a(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};c();let t=i.getTheme(e);if(!t)throw new I(`Theme \`${e}\` not found, you may need to load it first`);return t}function o(...e){c(),i.loadLanguages(e.flat(1))}function l(...e){for(let t of(c(),e.flat(1)))i.loadTheme(t)}function c(){if(n)throw new I("Shiki instance has been disposed")}function h(){n||(n=!0,i.dispose(),e5-=1)}return{setTheme:function(e){c();let n=a(e);return t!==e&&(i.setTheme(n),t=e),{theme:n,colorMap:i.getColorMap()}},getTheme:a,getLanguage:function(e){c();let t=i.getGrammar("string"==typeof e?e:e.name);if(!t)throw new I(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return c(),i.getLoadedThemes()},getLoadedLanguages:function(){return c(),i.getLoadedLanguages()},resolveLangAlias:function(t){return e2(t,e.langAlias)},loadLanguage:async function(...e){return o(await e0(e))},loadLanguageSync:o,loadTheme:async function(...e){return c(),l(await e1(e))},loadThemeSync:l,dispose:h,[Symbol.dispose]:h}}({...e,themes:t,langs:n,engine:r})}let e3=new WeakMap;function e9(e,t){e3.set(e,t)}function e7(e){return e3.get(e)}var te=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries((Array.isArray(n)?n:[n]).map(e=>[e,eF])),t)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){var t;let n,r;return t=this._stacks[e],n=[],r=new Set,!function e(t){if(r.has(t))return;r.add(t);let s=t?.nameScopesList?.scopeName;s&&n.push(s),t.parent&&e(t.parent)}(t),n}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};let tt=/,/,tn=/ /;function tr(e,t,n={}){var r,s;let i,a,{theme:o=e.getLoadedThemes()[0]}=n;if(eJ(e.resolveLangAlias(n.lang||"text"))||eK(o))return eQ(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:l,colorMap:c}=e.setTheme(o),h=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==h.name)throw new I(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${h.name}"`);if(!n.grammarState.themes.includes(l.name))throw new I(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${l.name}"`)}return a=new te((i=ts(t,r=h,s=l,c,n)).stateStack,r.name,s.name),e9(i.tokens,a),i.tokens}
1function ts(e,t,n,r,s){let i=eH(n,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=s,l=eQ(e),c=s.grammarState?function(e,t){if(!(e instanceof te))throw new I("Invalid grammar state");return e.getInternalStack(t)}(s.grammarState,n.name)??eF:null!=s.grammarContextCode?ts(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:eF,h=[],u=[];for(let e=0,d=l.length;e<d;e++){let d,p,[m,g]=l[e];if(""===m){h=[],u.push([]);continue}if(a>0&&m.length>=a){h=[],u.push([{content:m,offset:g,color:"",fontStyle:0}]);continue}s.includeExplanation&&(d=t.tokenizeLine(m,c,o).tokens,p=0);let f=t.tokenizeLine2(m,c,o),y=f.tokens.length/2;for(let e=0;e<y;e++){let t=f.tokens[2*e],a=e+1<y?f.tokens[2*e+2]:m.length;if(t===a)continue;let o=f.tokens[2*e+1],l=eq(r[Y.getForeground(o)],i),c=Y.getFontStyle(o),u={content:m.substring(t,a),offset:g+t,color:l,fontStyle:c};if(s.includeExplanation){let e=[];if("scopeName"!==s.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(tt).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(tn))})}u.explanation=[];let r=0;for(;
1t+r<a;){let t=d[p],n=m.substring(t.startIndex,t.endIndex);r+=n.length,u.explanation.push({content:n,scopes:"scopeName"===s.includeExplanation?t.scopes.map(e=>({scopeName:e})):function(e,t){let n=[];for(let r=0,s=t.length;r<s;r++){let s=t[r];n[r]={scopeName:s,themeMatches:function(e,t,n){let r=[];for(let{selectors:s,settings:i}of e)for(let e of s)if(function(e,t,n){if(!ti(e.at(-1),t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)ti(e[r],n[s])&&(r-=1),s-=1;return -1===r}(e,t,n)){r.push(i);break}return r}(e,s,t.slice(0,r))}}return n}(e,t.scopes)}),p+=1}}h.push(u)}u.push(h),h=[],c=f.ruleStack}return{tokens:u,stateStack:c}}function ti(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function ta(e,t,n,r=tr){let s=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=s.map(s=>{let i=r(e,t,{...n,theme:s.theme});return{tokens:i,state:e7(i),theme:"string"==typeof s.theme?s.theme:s.theme.name}}),a=function(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let s=e.map(e=>e[r]),i=t.map(()=>[]);t.forEach((e,t)=>e.push(i[t]));let a=s.map(()=>0),o=s.map(e=>e[0]);for(;o.every(e=>e);){let e=Math.min(...o.map(e=>e.content.length));for(let t=0;t<n;t++){let n=o[t];n.content.length===e?(i[t].push(n),a[t]+=1,o[t]=s[t][a[t]]):(i[t].push({...n,content:n.content.slice(0,e)}),o[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}(...i.map(e=>e.tokens)),o=a[0].map((e,t)=>e.map((e,r)=>{let i={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(i.explanation=e.explanation),a.forEach((e,n)=>{let{content:a,explanation:o,offset:l,...c}=e[t][r];i.variants[s[n].color]=c}),i})),l=i[0].state?new te(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return l&&e9(o,l),o}var to=n(50899),tl=n(94014),tc=n(48314);let th=/["&'<>`]/g,tu=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,td=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,tp=/[|\\{}()[\]^$+*?.]/g,tm=new WeakMap,tg=/[\dA-Fa-f]/,tf=/\d/,ty=["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","
1sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],tb={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:"€"},t_=["cent","copy","divide","gt","lt","not","para","times"],tk={}.hasOwnProperty,tS={};for(i in tb)tk.call(tb,i)&&(tS[tb[i]]=i);let tw=/[^\dA-Za-z]/;function tN(e,t,n){var r,s;let i,a,o=(r=n.omitOptionalSemicolons,i="&#x"+e.toString(16).toUpperCase(),r&&t&&!tg.test(String.fromCharCode(t))?i:i+";");if((n.useNamedReferences||n.useShortestReferences)&&(a=function(e,t,n,r){let s=String.fromCharCode(e);if(tk.call(tS,s)){let e=tS[s],i="&"+e;return n&&ty.includes(e)&&!t_.includes(e)&&(!r||t&&61!==t&&tw.test(String.fromCharCode(t)))?i:i+";"}return""}(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!a)&&n.useShortestReferences){let r,i=(s=n.omitOptionalSemicolons,r="&#"+String(e),s&&t&&!tf.test(String.fromCharCode(t))?r:r+";");i.length<o.length&&(o=i)}return a&&(!n.useShortestReferences||a.length<o.length)?a:o}function tC(e,t){let n;var r,s=e,i=Object.assign({format:tN},t);if(s=s.replace(i.subset?(r=i.subset,(n=tm.get(r))||(n=function(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(tp,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}(r),tm.set(r,n)),n):th,a),i.subset||i.escapeOnly)return s;return s.replace(tu,function(e,t,n){return i.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,n.charCodeAt(t+2),i)}).replace(td,a);function a(e,t,n){return i.format(e.charCodeAt(0),n.charCodeAt(t+1),i)}}let tv=/^>|^->|<!--|-->|--!>|<!-$/g,tA=[">"],tP=["<",">"];var tT=n(84239),tL=n(62989),tx=n(26854),tR=n(53762),tE=n(80528);let tI=tM(1),tO=tM(-1),tG=[];function tM(e){return function(t,n,r){let s=t?t.children:tG,i=(n||0)+e,a=s[i];if(!r)for(;a&&(0,tE.m)(a);)i+=e,a=s[i];return a}}let t$={}.hasOwnProperty;function tB(e){return function(t,n,r){return t$.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tj=tB({body:function(e,t,n){let r=tI(n,t);return!r||"comment"!==r.type},caption:tD,colgroup:tD,dd:function(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)},dt:function(e,t,n){let r=tI(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))},head:tD,html:function(e,t,n){let r=tI(n,t);return!r||"comment"!==r.type},li:function(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&"li"===r.tagName},optgroup:function(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName},option:function(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)},p:function(e,t,n){let r=tI(n,t);return r?"element"===r.type&&("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"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName},rp:tU,rt:tU,tbody:function(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)},td:tW,tfoot:function(e,t,n){return!tI(n,t)},th:tW,thead:function(e,t,n){let r=tI(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))},tr:function(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&"tr"===r.tagName}});function tD(e,t,n){let r=tI(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,tE.m)(r.value.charAt(0)))}function tU(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tW(e,t,n){let r=tI(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let tF=tB({body:function(e){let t=tI(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,tE.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)},colgroup:function(e,t,n){let r=tO(n,t),s=tI(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tj(r,n.children.indexOf(r),n))&&!!(s&&"element"===s.type&&"col"===s.tagName)},head:function(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type},html:function(e){let t=tI(e,-1);return!t||"comment"!==t.type},tbody:function(e,t,n){let r=tO(n,t),s=tI(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tj(r,n.children.indexOf(r),n))&&!!(s&&"element"===s.type&&"tr"===s.tagName)}}),tH={name:[["	\n\f\r &/=>".split(""),"	\n\f\r \"&'/=>
1`".split("")],["\0	\n\f\r \"&'/<=>".split(""),"\0	\n\f\r \"&'/<=>`".split("")]],unquoted:[["	\n\f\r &>".split(""),"\0	\n\f\r \"&'<=>`".split("")],["\0	\n\f\r \"&'<=>`".split(""),"\0	\n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]},tq=["<","&"];function tz(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:tC(e.value,Object.assign({},r.settings.characterReferences,{subset:tq}))}let tJ=(0,tc.A)("type",{invalid:function(e){throw Error("Expected node, not `"+e+"`")},unknown:function(e){throw Error("Cannot compile unknown node `"+e.type+"`")},handlers:{comment:function(e,t,n,r){return r.settings.bogusComments?"<?"+tC(e.value,Object.assign({},r.settings.characterReferences,{subset:tA}))+">":"\x3c!--"+e.value.replace(tv,function(e){return tC(e,Object.assign({},r.settings.characterReferences,{subset:tP}))})+"--\x3e"},doctype:function(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"},element:function(e,t,n,r){let s,i=r.schema,a="svg"!==i.space&&r.settings.omitOptionalTags,o="svg"===i.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===i.space&&"svg"===e.tagName&&(r.schema=tl.JW);let c=function(e,t){let n,r=[],s=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let s=function(e,t,n){let r,s=(0,tx.I)(e.schema,t),i=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,a=+!e.settings.allowDangerousCharacters,o=e.quote;if(s.overloadedBoolean&&(n===s.attribute||""===n)?n=!0:(s.boolean||s.overloadedBoolean)&&("string"!=typeof n||n===s.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=tC(s.attribute,Object.assign({},e.settings.characterReferences,{subset:tH.name[i][a]}));return!0===n||(n=Array.isArray(n)?(s.commaSeparated?tL.A:tR.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=tC(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tH.unquoted[i][a]}))),r!==n&&(e.settings.quoteSmart&&(0,tT.D)(n,o)>(0,tT.D)(n,e.alternative)&&(o=e.alternative),r=o+tC(n,Object.assign({},e.settings.characterReferences,{subset:("'"===o?tH.single:tH.double)[i][a],attribute:!0}))+o),l+(r?"="+r:r))}(e,n,t[n]);s&&r.push(s)}}for(;++s<r.length;){let t=e.settings.tightAttributes?r[s].charAt(r[s].length-1):void 0;s!==r.length-1&&'"'!==t&&"'"!==t&&(r[s]+=" ")}return r.join("")}(r,e.properties),h=r.all("html"===i.space&&"template"===e.tagName?e.content:e);return r.schema=i,h&&(o=!1),!c&&a&&tF(e,t,n)||(l.push("<",e.tagName,c?" "+c:""),o&&("svg"===i.space||r.settings.closeSelfClosing)&&(s=c.charAt(c.length-1),(!r.settings.tightSelfClosing||"/"===s||s&&'"'!==s&&"'"!==s)&&l.push(" "),l.push("/")),l.push(">")),l.push(h),o||a&&tj(e,t,n)||l.push("</"+e.tagName+">"),l.join("")},raw:function(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tz(e,t,n,r)},root:function(e,t,n,r){return r.all(e)},text:tz}}),tV={},tK={},tY=[];function tQ(e,t,n){return tJ(e,t,n,this)}function tX(e){let t=[],n=e&&e.children||tY,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}let tZ=/\s+/g;function t0(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(tZ)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(tZ)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}let t1=/:?lang=["']([^"']+)["']/g,t2=/(?:```|~~~)([\w-]+)/g,t6=/\\begin\{([\w-]+)\}/g,t8=/<script\s+(?:type|lang)=["']([^"']+)["']/gi,t5=["color","background-color"];function t4(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&q.Italic&&(t["font-style"]="italic"),e.fontStyle&q.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&q.Underline&&n.push("underline"),e.fontStyle&q.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function t3(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let t9=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){var n;let s,i={lines:s=eQ(n=t.source,!0).map(([e])=>e),indexToPos:function(e){if(e===n.length)return{line:s.length-1,character:s.at(-1).length};let t=e,r=0;for(let e of s){if(t<e.length)break;t-=e.length,r++}return{line:r,character:t}},posToIndex:function(e,t){let n=0;for(let t=0;t<e;t++)n+=s[t].length;return n+t}};function r(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new I(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...i.indexToPos(e),offset:e}}{let t=i.lines[e.line];if(void 0===t)throw new I(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${i.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new I(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:i.posToIndex(e.line,n)}}}let a=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));(function(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new I(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],s=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,i=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,a=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,o=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(s||i||a||o){if(s&&i||a&&o||a&&n.start.offset===n.end.offset||i&&t.start.offset===t.end.offset)continue;throw new I(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}})(a),e.set(t.meta,{decorations:a,converter:i,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length){var n;let r;return(r=[...(n=t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))instanceof Set?n:new Set(n)].sort((e,t)=>
1e-t)).length?e.map(e=>e.flatMap(e=>{let t=r.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);if(!t.length)return e;let n=0,s=[];for(let r of t)r>n&&s.push({...e,content:e.content.slice(n,r),offset:e.offset+n}),n=r;return n<e.content.length&&s.push({...e,content:e.content.slice(n),offset:e.offset+n}),s})):e}},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=[...e.children].filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new I(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function s(e,t,n,s){let a=r[e],o="",l=-1,c=-1;if(0===t&&(l=0),0===n&&(c=0),n===1/0&&(c=a.children.length),-1===l||-1===c)for(let e=0;e<a.children.length;e++)o+=function e(t){return"text"===t.type?t.value:"element"===t.type?t.children.map(e).join(""):""}(a.children[e]),-1===l&&o.length===t&&(l=e+1),-1===c&&o.length===n&&(c=e+1);if(-1===l)throw new I(`Failed to find start index for decoration ${JSON.stringify(s.start)}`);if(-1===c)throw new I(`Failed to find end index for decoration ${JSON.stringify(s.end)}`);let h=a.children.slice(l,c);if(s.alwaysWrap||h.length!==a.children.length)if(s.alwaysWrap||1!==h.length||"element"!==h[0].type){let e={type:"element",tagName:"span",properties:{},children:h};i(e,s,"wrapper"),a.children.splice(l,h.length,e)}else i(h[0],s,"token");else i(a,s,"line")}function i(e,t,n){let r=t.properties||{},s=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&t0(e,t.properties.class),e=s(e,n)||e}let a=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)s(t.line,t.character,n.character,e);else if(t.line<n.line){s(t.line,t.character,1/0,e);for(let s=t.line+1;s<n.line;s++)a.unshift(()=>{var t;r[t=s]=i(r[t],e,"line")});s(n.line,0,n.character,e)}}a.forEach(e=>e())}}}()];function t7(e){let t=function(e){let t=[],n=[],r=[];for(let s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...t9]}var ne=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],nt={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nn(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}var nr={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"};let ns=/#([0-9a-f]{3,8})/i,ni=/var\((--[\w-]+-ansi-[\w-]+)\)/,na={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 no(e,t,n={}){let r=e.resolveLangAlias(n.lang||"text"),{theme:s=e.getLoadedThemes()[0]}=n;if(!eJ(r)&&!eK(s)&&"ansi"===r){let r,i,a,o,l,c,h,{theme:u}=e.setTheme(s);return r=eH(u,n),i=eQ(t),a=function(e=nr){let t;function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}return{value:function(r){switch(r.type){case"named":return e[r.name];case"rgb":return n(r.rgb);case"table":var s;return s=r.index,function(){if(t)return t;t=[];for(let n=0;n<ne.length;n++)t.push(e[ne[n]]);let r=[0,95,135,175,215,255];for(let e=0;e<6;e++)for(let s=0;s<6;s++)for(let i=0;i<6;i++)t.push(n([r[e],r[s],r[i]]));let s=8;for(let e=0;e<24;e++,s+=10)t.push(n([s,s,s]));return t}()[s]}}}}(Object.fromEntries(ne.map(e=>{let t=`terminal.ansi${e[0].toUpperCase()}${e.substring(1)}`;return[e,u.colors?.[t]||na[e]]}
1))),o=null,l=null,c=new Set,h={parse(e){let t=[],n=0;do{let r=function(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}(e,n),s=r.sequence?e.substring(n,r.startPosition):e.substring(n);if(s.length>0&&t.push({value:s,foreground:o,background:l,decorations:new Set(c)}),r.sequence){let e=function(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)nt[r]&&t.push({type:"setDecoration",value:nt[r]});else if(r<=29){let e=nt[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:ne[r-30]}});else if(38===r){let n=nn(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:ne[r-40]}});else if(48===r){let n=nn(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:ne[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:ne[r-100+8]}})}return t}(r.sequence);for(let t of e)"resetAll"===t.type?(o=null,l=null,c.clear()):"resetForegroundColor"===t.type?o=null:"resetBackgroundColor"===t.type?l=null:"resetDecoration"===t.type&&c.delete(t.value);for(let t of e)"setForegroundColor"===t.type?o=t.value:"setBackgroundColor"===t.type?l=t.value:"setDecoration"===t.type&&c.add(t.value)}n=r.position}while(n<e.length)return t}},i.map(e=>h.parse(e[0]).map(t=>{let n,s;t.decorations.has("reverse")?(n=t.background?a.value(t.background):u.bg,s=t.foreground?a.value(t.foreground):u.fg):(n=t.foreground?a.value(t.foreground):u.fg,s=t.background?a.value(t.background):void 0),n=eq(n,r),s=eq(s,r),t.decorations.has("dim")&&(n=function(e){let t=e.match(ns);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],s=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${s}${s}`,16)/2).toString(16).padStart(2,"0")}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(ni);return n?`var(${n[1]}-dim)`:e}(n));let i=q.None;return t.decorations.has("bold")&&(i|=q.Bold),t.decorations.has("italic")&&(i|=q.Italic),t.decorations.has("underline")&&(i|=q.Underline),t.decorations.has("strikethrough")&&(i|=q.Strikethrough),{content:t.value,offset:e[1],color:n,bgColor:s,fontStyle:i}}))}return tr(e,t,n)}function nl(e,t,n){let r,s,i,a,o,l;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:h="--shiki-",colorsRendering:u="css-vars"}=n,d=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===d.length)throw new I("`themes` option must not be empty");let p=ta(e,t,n,no);if(l=e7(p),c&&"light-dark()"!==c&&!d.some(e=>e.color===c))throw new I(`\`themes\` option must contain the defaultColor key \`${c}\``);let m=d.map(t=>e.getTheme(t.theme)),g=d.map(e=>e.color);i=p.map(e=>e.map(e=>(function(e,t,n,r,s="css-vars"){let i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(t=>t4(e.variants[t])),o=new Set(a.flatMap(e=>Object.keys(e))),l={},c=(e,r)=>{let s="color"===r?"":"background-color"===r?"-bg":`-${r}`;
1return n+t[e]+("color"===r?"":s)};return a.forEach((e,n)=>{for(let i of o){let o=e[i]||"inherit";if(0===n&&r&&t5.includes(i))if("light-dark()"===r&&a.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');l[i]=`light-dark(${a[e][i]||"inherit"}, ${a[r][i]||"inherit"})`,"css-vars"===s&&(l[c(n,i)]=o)}else l[i]=o;else"css-vars"===s&&(l[c(n,i)]=o)}}),i.htmlStyle=l,i})(e,g,h,c,u))),l&&e9(i,l);let f=d.map(e=>eH(e.theme,n));s=nc(d,m,f,h,c,"fg",u),r=nc(d,m,f,h,c,"bg",u),a=`shiki-themes ${m.map(e=>e.name).join(" ")}`,o=c?void 0:[s,r].join(";")}else if("theme"in n){let o=eH(n.theme,n);i=no(e,t,n);let c=e.getTheme(n.theme);r=eq(c.bg,o),s=eq(c.fg,o),a=c.name,l=e7(i)}else throw new I("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:a,rootStyle:o,grammarState:l}}function nc(e,t,n,r,s,i,a){return e.map((o,l)=>{let c=eq(t[l][i],n[l])||"inherit",h=`${r+o.color}${"bg"===i?"-bg":""}:${c}`;if(0===l&&s){if("light-dark()"===s&&e.length>1){let r=e.findIndex(e=>"light"===e.color),s=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===s)throw new I('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${eq(t[r][i],n[r])||"inherit"}, ${eq(t[s][i],n[s])||"inherit"});${h}`}return c}return"css-vars"===a?h:null}).filter(e=>!!e).join(";")}let nh=/^\s+$/,nu=/^(\s*)(.*?)(\s*)$/;function nd(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nd(e,t,n),codeToTokens:(t,n)=>nl(e,t,n)}){let s=t;for(let e of t7(n))s=e.preprocess?.call(r,s,n)||s;let{tokens:i,fg:a,bg:o,themeName:l,rootStyle:c,grammarState:h}=nl(e,s,n),{mergeWhitespaces:u=!0,mergeSameStyleTokens:d=!1}=n;!0===u?i=i.map(e=>{let t,n=[],r="";return e.forEach((s,i)=>{let a=!(s.fontStyle&&(s.fontStyle&q.Underline||s.fontStyle&q.Strikethrough));a&&nh.test(s.content)&&e[i+1]?(void 0===t&&(t=s.offset),r+=s.content):r?(a?n.push({...s,offset:t,content:r+s.content}):n.push({content:r,offset:t},s),t=void 0,r=""):n.push(s)}),n}):"never"===u&&(i=i.map(e=>e.flatMap(e=>{if(nh.test(e.content))return e;let t=e.content.match(nu);if(!t)return e;let[,n,r,s]=t;if(!n&&!s)return e;let i=[{...e,offset:e.offset+n.length,content:r}];return n&&i.unshift({content:n,offset:e.offset}),s&&i.push({content:s,offset:e.offset+n.length+r.length}),i}))),d&&(i=i.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t.at(-1),r=t3(e.htmlStyle||t4(e)),s=t3(n.htmlStyle||t4(n)),i=e.fontStyle&&(e.fontStyle&q.Underline||e.fontStyle&q.Strikethrough),a=n.fontStyle&&(n.fontStyle&q.Underline||n.fontStyle&q.Strikethrough);i||a||r!==s?t.push({...n}):e.content+=n.content}return t}));let p={...r,get source(){return s}};for(let e of t7(n))i=e.tokens?.call(p,i)||i;return function(e,t,n,r=e7(e)){let s=t7(t),i=[],a={type:"root",children:[]},{structure:o="classic",tabindex:l="0"}=t,c={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?c.style=t.rootStyle:c.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(c.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(c[e]=n);let h={type:"element",tagName:"pre",properties:c,children:[],data:t.data},u={type:"element",tagName:"code",properties:{},children:i},d=[],p={...n,structure:o,addClassToHast:t0,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return h},get code(){return u},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===o?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===o&&i.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let i of e){let e={type:"element",tagName:"span",properties:{...i.htmlAttrs},children:[{type:"text",value:i.content}]},l=t3(i.htmlStyle||t4(i));for(let a of(l&&(e.properties.style=l),s))e=a?.span?.call(p,e,t+1,r,n,i)||e;"inline"===o?a.children.push(e):"classic"===o&&n.children.push(e),r+=i.content.length}if("classic"===o){for(let e of s)n=e?.line?.call(p,n,t+1)||n;d.push(n),i.push(n)}else"inline"===o&&d.push(n)}),"classic"===o){for(let e of s)u=e?.code?.call(p,u)||u;for(let e of(h.children.push(u),s))h=e?.pre?.call(p,h)||h;a.children.push(h)}else if("inline"===o){let e=[],t={type:"element",tagName:"span",properties:{class:"line"}
1,children:[]};for(let n of a.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of s)n=e?.code?.call(p,n)||n;a.children=[];for(let e=0;e<n.children.length;e++){e>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&a.children.push(...t.children)}}let m=a;for(let e of s)m=e?.root?.call(p,m)||m;return r&&e9(m,r),m}(i,{...n,fg:a,bg:o,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??c)},p,h)}let np=function(e,t){let n=t||tV,r=n.quote||'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:tQ,all:tX,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||to.b,characterReferences:n.characterReferences||tK,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?tl.JW:tl.qy,quote:r,alternative:'"'===r?"'":'"'}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)};async function nm(e){let t=await e4(e);return{getLastGrammarState:(...e)=>(function(...e){if(2===e.length)return e7(e[1]);let[t,n,r={}]=e,{lang:s="text",theme:i=t.getLoadedThemes()[0]}=r;if(eJ(s)||eK(i))throw new I("Plain language does not have grammar state");if("ansi"===s)throw new I("ANSI language does not have grammar state");let{theme:a,colorMap:o}=t.setTheme(i),l=t.getLanguage(s);return new te(ts(n,l,a,o,r).stateStack,l.name,a.name)})(t,...e),codeToTokensBase:(e,n)=>no(t,e,n),codeToTokensWithThemes:(e,n)=>ta(t,e,n),codeToTokens:(e,n)=>nl(t,e,n),codeToHast:(e,n)=>nd(t,e,n),codeToHtml:(e,n)=>(function(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nd(e,t,n),codeToTokens:(t,n)=>nl(e,t,n)},s=np(nd(e,t,n,r));for(let e of t7(n))s=e.postprocess?.call(r,s,n)||s;return s})(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}let ng=[{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(8149)]).then(n.bind(n,28132))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(8945),n.e(8149),n.e(5903)]).then(n.bind(n,41842))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(9554),n.e(4405),n.e(1101)]).then(n.bind(n,97473))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(557),n.e(9041),n.e(9755)]).then(n.bind(n,78614))},{id:"c",name:"C",import:()=>n.e(6800).then(n.bind(n,79555))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2906),n.e(9897)]).then(n.bind(n,33408))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(9041),n.e(6800),n.e(6582)]).then(n.bind(n,48677))},{id:"css",name:"CSS",import:()=>n.e(6786).then(n.bind(n,39993))},{id:"csv",name:"CSV",import:()=>n.e(6613).then(n.bind(n,9748))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(6800),n.e(6481)]).then(n.bind(n,18248))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2906),n.e(9554),n.e(4405),n.e(520),n.e(628)]).then(n.bind(n,44639))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(9939)]).then(n.bind(n,80766))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(6577)]).then(n.bind(n,27464))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412)]).then(n.bind(n,92551))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(8408)]).then(n.bind(n,82267))},{id:"http",name:"HTTP",import:()=>
1Promise.all([n.e(2906),n.e(9554),n.e(557),n.e(4405),n.e(520),n.e(628),n.e(1420),n.e(5053)]).then(n.bind(n,75468))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2906),n.e(9554),n.e(557),n.e(4405),n.e(520),n.e(628),n.e(820)]).then(n.bind(n,61615))},{id:"imba",name:"Imba",import:()=>n.e(8050).then(n.bind(n,37705))},{id:"java",name:"Java",import:()=>n.e(557).then(n.bind(n,36572))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2906).then(n.bind(n,40417))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(3552)]).then(n.bind(n,84083))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2906),n.e(3058)]).then(n.bind(n,65721))},{id:"json",name:"JSON",import:()=>n.e(1819).then(n.bind(n,36534))},{id:"json5",name:"JSON5",import:()=>n.e(2608).then(n.bind(n,94083))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(6054).then(n.bind(n,33957))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1983).then(n.bind(n,15186))},{id:"jsx",name:"JSX",import:()=>n.e(520).then(n.bind(n,6811))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2906),n.e(9041),n.e(6800),n.e(6582),n.e(7019),n.e(1256)]).then(n.bind(n,26619))},{id:"less",name:"Less",import:()=>n.e(4736).then(n.bind(n,38256))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(8308).then(n.bind(n,21023))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(6786),n.e(9554),n.e(8945),n.e(4736),n.e(1219)]).then(n.bind(n,28366))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(8308),n.e(9071)]).then(n.bind(n,48290))},{id:"mdx",name:"MDX",import:()=>n.e(2226).then(n.bind(n,48185))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(557),n.e(9041),n.e(953)]).then(n.bind(n,58352))},{id:"postcss",name:"PostCSS",import:()=>n.e(6352).then(n.bind(n,76195))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(6661)]).then(n.bind(n,11252))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(7019).then(n.bind(n,40374))},{id:"r",name:"R",import:()=>n.e(1271).then(n.bind(n,65482))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(6292).then(n.bind(n,34735))},{id:"sass",name:"Sass",import:()=>n.e(1475).then(n.bind(n,24094))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(6786),n.e(8945)]).then(n.bind(n,42232))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(1420).then(n.bind(n,52567))},{id:"sql",name:"SQL",import:()=>n.e(9041).then(n.bind(n,62600))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(7139).then(n.bind(n,69342))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(9554),n.e(3762)]).then(n.bind(n,73609))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(9554),n.e(557),n.e(9041),n.e(6800),n.e(1889)]).then(n.bind(n,92248))},{id:"tsx",name:"TSX",import:()=>n.e(4405).then(n.bind(n,66649))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(9554).then(n.bind(n,82057))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(4412),n.e(9554),n.e(6810)]).then(n.bind(n,65649))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2906),n.e(2711)]).then(n.bind(n,34058))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2906),n.e(6786),n.e(8945),n.e(4736),n.e(7139),n.e(8646)]).then(n.bind(n,28741))},{id:"wasm",name:"WebAssembly",import:()=>n.e(4773).then(n.bind(n,86340))},{id:"wgsl",name:"WGSL",import:()=>n.e(6180).then(n.bind(n,72351))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(2861).then(n.bind(n,57644))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(557),n.e(7164)]).then(n.bind(n,42519))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(9538).then(n.bind(n,27113))}],nf=Object.fromEntries(ng.map(e=>[e.id,e.import])),ny=Object.fromEntries(ng.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),{codeToHtml:nb}=function(e,t){let n,r=async function(t={}){if(n){let e=await n;return await Promise.all([e.loadTheme(...t.themes||[]),e.loadLanguage(...t.langs||[])]),e}{n=e({...t,themes:[],langs:[]});let r=await n;return await Promise.all([r.loadTheme(...t.themes||[]),r.loadLanguage(...t.langs||[])]),r}};async function s(e,n){let s=await r({langs:[n.lang],themes:"theme"in n?[n.theme]:Object.values(n.themes)}),i=await t?.guessEmbeddedLanguages?.(e,n.lang,s);return i&&await s.loadLanguage(...i),s}return{getSingletonHighlighter:e=>r(e),codeToHtml:async(e,t)=>(await s(e,t)).codeToHtml(e,t),codeToHast:async(e,t)=>(await s(e,t)).codeToHast(e,t),codeToTokens:async(e,t)=>(await s(e,t)).codeToTokens(e,t),codeToTokensBase:async(e,t)=>(await s(e,t)).codeToTokensBase(e,t),codeToTokensWithThemes:async(e,t)=>(await s(e,t)).codeToTokensWithThemes(e,t),getLastGrammarState:async(e,t)=>(await r({langs:[t.lang],themes:[t.theme]})).getLastGrammarState(e,t)}}((a=(h={langs:{...nf,...ny},themes:E,engine:()=>(0,R.createOnigurumaEngine)(n.e(9310).then(n.bind(n,68109)))}).langs,o=h.themes,l=h.engine,async function(e){function t(t){if("string"==typeof t){if(eV(t=e.langAlias?.[t]||t))return[];let n=a[t];if(!n)throw new I(`Language \`${t}\` is not included in this bundle. You may want to load it from external source.`);return n}return t}function n(e){if(eK(e))return"none";if("string"==typeof e){let t=o[e];if(!t)throw new I(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let r=(e.themes??[]).map(e=>n(e)),s=(e.langs??[]).map(e=>t(e)),i=await nm({engine:e.engine??l(),...e,themes:r,langs:s});return{...i,loadLanguage:(...e)=>i.loadLanguage(...e.map(t)),loadTheme:(...e)=>i.loadTheme(...e.map(n)),getBundledLanguages:()=>a,getBundledThemes:()=>o}}),{guessEmbeddedLanguages:function(e,t,n){let r=new Set;for(let t of e.matchAll(t1)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(t2)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(t6)){let e=t[1].toLowerCase().trim();e&&r.add(e)}for(let t of e.matchAll(t8)){let e=t[1].toLowerCase().trim(),n=e.includes("/")?e.split("/").pop():e;n&&r.add(n)}if(!n)return[...r];let s=n.getBundledLanguages();return[...r].filter(e=>e&&s[e])}})}}]);

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.