stylelint-config-inspector 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/cli.mjs +10 -4
- package/dist/nitro.json +1 -1
- package/dist/public/200.html +1 -1
- package/dist/public/404.html +1 -1
- package/dist/public/_nuxt/BGg6a0gq.js +2 -0
- package/dist/public/_nuxt/{D_UhJN5P.js → BIahBmk1.js} +1 -1
- package/dist/public/_nuxt/{D9VMXJyI.js → Bdm1-Non.js} +1 -1
- package/dist/public/_nuxt/{nBUflmkO.js → Bt9z7wWW.js} +1 -1
- package/dist/public/_nuxt/{BwdVnuqT.js → C6S6QGXR.js} +1 -1
- package/dist/public/_nuxt/Cfi2rMnF.js +13 -0
- package/dist/public/_nuxt/{BgZd1qfO.js → CqxBMan9.js} +2 -2
- package/dist/public/_nuxt/{DUtXDOXB.js → CwjCYxLG.js} +1 -1
- package/dist/public/_nuxt/D4trZe01.js +1 -0
- package/dist/public/_nuxt/DKSsXTxC.js +1 -0
- package/dist/public/_nuxt/DNdt0fwf.js +1 -0
- package/dist/public/_nuxt/{BKBBWEz4.js → DsfLgvs3.js} +1 -1
- package/dist/public/_nuxt/IAb5kntx.js +1 -0
- package/dist/public/_nuxt/{DBzO6yCd.js → J03EMu1C.js} +1 -1
- package/dist/public/_nuxt/{Gf5y-pjW.js → Od1p3DBV.js} +1 -1
- package/dist/public/_nuxt/{DJcdwkbC.js → YXPZcA-i.js} +2 -2
- package/dist/public/_nuxt/builds/latest.json +1 -1
- package/dist/public/_nuxt/builds/meta/941aebf2-7c22-4315-95a3-e5b57a2dd759.json +1 -0
- package/dist/public/_nuxt/eZ2skLgE.js +1 -0
- package/dist/public/_nuxt/{3_mkTJ2v.js → pswINk0x.js} +1 -1
- package/dist/public/_nuxt/q_WJf-VC.js +1 -0
- package/dist/public/_nuxt/{CYI4Dqes.js → us1Ri1jC.js} +1 -1
- package/dist/public/index.html +1 -1
- package/package.json +36 -29
- package/dist/public/_nuxt/BFHLvPhn.js +0 -1
- package/dist/public/_nuxt/BiE9LVQS.js +0 -2
- package/dist/public/_nuxt/C62pfWG4.js +0 -1
- package/dist/public/_nuxt/C79VbMUr.js +0 -1
- package/dist/public/_nuxt/DDlp5JcD.js +0 -1
- package/dist/public/_nuxt/DYop16xf.js +0 -1
- package/dist/public/_nuxt/builds/meta/983f1582-17c6-4f54-b47e-9777e04df821.json +0 -1
- package/dist/public/_nuxt/cxyxlHGV.js +0 -13
- package/dist/public/_nuxt/rX12-d6r.js +0 -1
package/README.md
CHANGED
|
@@ -6,16 +6,16 @@ A visual tool for inspecting and understanding your Stylelint configuration.
|
|
|
6
6
|
|
|
7
7
|
## Screenshot
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
>
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="https://raw.githubusercontent.com/Nick2bad4u/Stylelint-Config-Inspector/refs/heads/main/docs/assets/stylelint-inspector-screenshot.svg" alt="Stylelint Config Inspector">
|
|
11
|
+
</p>
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
14
14
|
|
|
15
15
|
From a project that contains a Stylelint config (`stylelint.config.*` or `.stylelintrc*`), run:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
npx
|
|
18
|
+
npx stylelint-config-inspector@latest
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Then open http://localhost:8888/.
|
|
@@ -25,7 +25,7 @@ Then open http://localhost:8888/.
|
|
|
25
25
|
Use a target file so Stylelint resolves context-sensitive options (`overrides`, `customSyntax`, etc.):
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npx
|
|
28
|
+
npx stylelint-config-inspector --file src/styles/app.css
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
If you do not provide `--file` or `--target`, the inspector resolves your config against a synthetic file named `stylelint-inspector-target.css` relative to the resolved base path.
|
|
@@ -37,7 +37,7 @@ If you do not provide `--file` or `--target`, the inspector resolves your config
|
|
|
37
37
|
To generate a static inspector snapshot:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
npx
|
|
40
|
+
npx stylelint-config-inspector build
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
This emits a single-page app in `.stylelint-config-inspector`.
|
|
@@ -47,7 +47,7 @@ This emits a single-page app in `.stylelint-config-inspector`.
|
|
|
47
47
|
When inspecting a package inside a monorepo, set the base path for file glob matching and target resolution:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
npx
|
|
50
|
+
npx stylelint-config-inspector --config stylelint.config.mjs --basePath packages/web --file src/app.css
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Environment aliases are also supported:
|
|
@@ -55,7 +55,7 @@ Environment aliases are also supported:
|
|
|
55
55
|
- `STYLELINT_BASE_PATH` (or legacy `ESLINT_BASE_PATH`)
|
|
56
56
|
- `STYLELINT_TARGET` (or legacy `ESLINT_TARGET`)
|
|
57
57
|
|
|
58
|
-
Run `npx
|
|
58
|
+
Run `npx stylelint-config-inspector --help` for all options.
|
|
59
59
|
|
|
60
60
|
## License
|
|
61
61
|
|
package/dist/cli.mjs
CHANGED
|
@@ -936,6 +936,14 @@ const basename$2 = function(p, extension) {
|
|
|
936
936
|
return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
|
|
937
937
|
};
|
|
938
938
|
//#endregion
|
|
939
|
+
//#region src/build-static-html.ts
|
|
940
|
+
const RE_ABSOLUTE_ASSET_ATTR = /\s(href|src)="\//g;
|
|
941
|
+
const RE_IMPORTMAP_ENTRY = /("#entry"\s*:\s*")\/_nuxt\//g;
|
|
942
|
+
function rewriteStaticHtmlWithBase(content, baseURL) {
|
|
943
|
+
if (baseURL === "/") return content;
|
|
944
|
+
return content.replaceAll(RE_ABSOLUTE_ASSET_ATTR, ` $1="${baseURL}`).replaceAll("baseURL:\"/\"", `baseURL:"${baseURL}"`).replaceAll(RE_IMPORTMAP_ENTRY, `$1${baseURL}_nuxt/`);
|
|
945
|
+
}
|
|
946
|
+
//#endregion
|
|
939
947
|
//#region src/constants.ts
|
|
940
948
|
const stylelintConfigFilenames = [
|
|
941
949
|
"stylelint.config.js",
|
|
@@ -3858,7 +3866,6 @@ new ObjectSchema(filesAndIgnoresSchema);
|
|
|
3858
3866
|
Object.freeze({ status: "external" });
|
|
3859
3867
|
Object.freeze({ status: "ignored" });
|
|
3860
3868
|
Object.freeze({ status: "unconfigured" });
|
|
3861
|
-
Error;
|
|
3862
3869
|
const ConfigArraySymbol = {
|
|
3863
3870
|
isNormalized: Symbol("isNormalized"),
|
|
3864
3871
|
configCache: Symbol("configCache"),
|
|
@@ -3866,7 +3873,7 @@ const ConfigArraySymbol = {
|
|
|
3866
3873
|
finalizeConfig: Symbol("finalizeConfig"),
|
|
3867
3874
|
preprocessConfig: Symbol("preprocessConfig")
|
|
3868
3875
|
};
|
|
3869
|
-
|
|
3876
|
+
ConfigArraySymbol.finalizeConfig, ConfigArraySymbol.preprocessConfig;
|
|
3870
3877
|
//#endregion
|
|
3871
3878
|
//#region shared/configs.ts
|
|
3872
3879
|
const DEFAULT_WORKSPACE_SCAN_GLOBS = ["**/*.{css,scss,sass,less,pcss,sss,styl,stylus,vue,svelte,astro,html}"];
|
|
@@ -5499,7 +5506,6 @@ async function createHostServer(options) {
|
|
|
5499
5506
|
//#endregion
|
|
5500
5507
|
//#region src/cli.ts
|
|
5501
5508
|
const RE_CONSECUTIVE_SLASHES = /\/+/g;
|
|
5502
|
-
const RE_ABSOLUTE_ASSET_ATTR = /\s(href|src)="\//g;
|
|
5503
5509
|
const cli = cac("stylelint-config-inspector");
|
|
5504
5510
|
cli.command("build", "Build inspector with current config file for static hosting").option("--config <configFile>", "Config file path").option("--files", "Include matched file paths in payload", { default: true }).option("--file <filePath>", "Alias of --target").option("--target <filePath>", "Target file path used to resolve effective config").option("--basePath <basePath>", "Base directory for globs to resolve. Default to directory of config file if not provided").option("--base <baseURL>", "Base URL for deployment", { default: "/" }).option("--outDir <dir>", "Output directory", { default: ".stylelint-config-inspector" }).action(async (rawOptions) => {
|
|
5505
5511
|
const options = normalizeCliInspectorOptions(rawOptions);
|
|
@@ -5536,7 +5542,7 @@ cli.command("build", "Build inspector with current config file for static hostin
|
|
|
5536
5542
|
});
|
|
5537
5543
|
if (baseURL !== "/") for (const file of htmlFiles) {
|
|
5538
5544
|
if (!file) continue;
|
|
5539
|
-
const newContent = (await fs$1.readFile(resolve$2(distDir, file), "utf-8")
|
|
5545
|
+
const newContent = rewriteStaticHtmlWithBase(await fs$1.readFile(resolve$2(distDir, file), "utf-8"), baseURL);
|
|
5540
5546
|
await fs$1.writeFile(resolve$2(outDir, file), newContent, "utf-8");
|
|
5541
5547
|
}
|
|
5542
5548
|
await fs$1.mkdir(resolve$2(outDir, "api"), { recursive: true });
|
package/dist/nitro.json
CHANGED
package/dist/public/200.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/YXPZcA-i.js"}}</script><title>Stylelint Config Inspector</title><link rel="stylesheet" href="/_nuxt/entry.BbIOcLZN.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/YXPZcA-i.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DKSsXTxC.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/pswINk0x.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D5CeIdpL.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bdm1-Non.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CwjCYxLG.js"><script type="module" src="/_nuxt/YXPZcA-i.js" crossorigin></script><meta name="theme-color" content="#5B21B6"><meta name="apple-mobile-web-app-title" content="Stylelint Inspector"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="alternate icon" type="image/svg+xml" href="/stylelint/stylelint-icon-black.svg"><link rel="alternate icon" type="image/png" href="/stylelint/stylelint-icon-white-512.png"><link rel="apple-touch-icon" href="/stylelint/stylelint-icon-white-512.png"><script id="unhead:payload" type="application/json">{"title":"Stylelint Config Inspector"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"941aebf2-7c22-4315-95a3-e5b57a2dd759",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1773981098631,false]</script></body></html>
|
package/dist/public/404.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/
|
|
1
|
+
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><script type="importmap">{"imports":{"#entry":"/_nuxt/YXPZcA-i.js"}}</script><title>Stylelint Config Inspector</title><link rel="stylesheet" href="/_nuxt/entry.BbIOcLZN.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/_nuxt/YXPZcA-i.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/DKSsXTxC.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/pswINk0x.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/D5CeIdpL.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/Bdm1-Non.js"><link rel="modulepreload" as="script" crossorigin href="/_nuxt/CwjCYxLG.js"><script type="module" src="/_nuxt/YXPZcA-i.js" crossorigin></script><meta name="theme-color" content="#5B21B6"><meta name="apple-mobile-web-app-title" content="Stylelint Inspector"><link rel="icon" type="image/svg+xml" href="/favicon.svg"><link rel="alternate icon" type="image/svg+xml" href="/stylelint/stylelint-icon-black.svg"><link rel="alternate icon" type="image/png" href="/stylelint/stylelint-icon-white-512.png"><link rel="apple-touch-icon" href="/stylelint/stylelint-icon-white-512.png"><script id="unhead:payload" type="application/json">{"title":"Stylelint Config Inspector"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/",buildId:"941aebf2-7c22-4315-95a3-e5b57a2dd759",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1773981098631,false]</script></body></html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as e,g as t,h as n,m as r,n as i,r as a,s as o,u as s,x as c}from"./DKSsXTxC.js";import{A as l,C as u,D as d,It as f,J as p,L as m,N as h,O as g,Q as _,Rt as v,S as y,W as b,X as x,Y as S,b as C,h as w,nt as T,rt as E,ut as D,x as O,y as k,yt as A,zt as j}from"./pswINk0x.js";import{d as M}from"./Bdm1-Non.js";import{a as ee,i as N,r as te,t as P}from"#entry";import{i as F,n as ne,o as I,r as L,t as re}from"./Cfi2rMnF.js";import{t as ie}from"./BDH0pOV6.js";var R={key:1,class:`flex-none`,op30:``},ae={key:2},z={class:`colorized-rule-name__name`,op75:``},oe=Object.assign(ie(l({__name:`ColorizedRuleName`,props:{name:{},prefix:{},url:{},as:{},deprecated:{type:[Boolean,Object]},borderless:{type:Boolean},break:{type:Boolean},hoverReveal:{type:Boolean},hideCorePrefix:{type:Boolean,default:!0}},setup(e){let t=e,n=/^\/+/,r=k(()=>{let e=t.name.split(`/`),r=e[0]??``;return e.length===1?t.prefix?{scope:t.prefix,name:r.replace(n,``)}:{scope:void 0,name:r}:{scope:r,name:e.slice(1).join(`/`)}}),i=k(()=>{if(r.value.scope&&!(t.hideCorePrefix&&r.value.scope===`stylelint`))return r.value.scope}),a=k(()=>r.value.scope?r.value.scope===`plugin`&&t.prefix?t.prefix:r.value.scope:``),o=k(()=>I(a.value));return(n,a)=>(b(),O(_(e.as||`div`),{title:t.name,class:f([`colorized-rule-name`,[e.as===`button`?`colorized-rule-name--button`:``,e.deprecated?`line-through`:``,e.borderless?``:`badge`,e.hoverReveal?`colorized-rule-name--hoverable`:``]])},{default:T(()=>[i.value?(b(),u(`span`,{key:0,class:`flex-none`,style:v({color:o.value})},j(i.value),5)):y(``,!0),i.value?(b(),u(`span`,R,`/`)):y(``,!0),i.value&&t.break?(b(),u(`br`,ae)):y(``,!0),C(`span`,z,j(r.value.name),1)]),_:1},8,[`title`,`class`]))}}),[[`__scopeId`,`data-v-e8ebe894`]]),{__name:`ColorizedRuleName`}),se=/\[\s*'--',\s*(\S.+),\s*'--'\s*\],?/g,ce=/"(\w+)":/g,B=/"/g;function V(e){let t=`${e}`;return t.endsWith(`1`)&&e!==11?`${t}st`:t.endsWith(`2`)&&e!==12?`${t}nd`:t.endsWith(`3`)&&e!==13?`${t}rd`:`${e}th`}function H(e){return U(e).replace(se,`$1, // [!code muted]`)}function U(e){return JSON.stringify(e,null,2).replace(ce,`$1:`).replace(B,`'`)}var W=[`title`],G=Object.assign(l({__name:`RuleLevelIcon`,props:{level:{},hasOptions:{type:Boolean},hasRedundantOptions:{type:Boolean},configIndex:{},class:{}},setup(e){let t=e,n=k(()=>t.configIndex==null?`Enabled as '${t.level}'`:`Enabled as '${t.level}', in the ${V(t.configIndex+1)} config item`),r=k(()=>({error:`text-red op80`,warn:`text-yellow5 op80 dark:text-yellow4`,off:`text-gray op62`})[t.level]),i=k(()=>({error:`i-ph-warning-circle-duotone`,warn:`i-ph-warning-duotone`,off:`i-ph-circle-half-tilt-duotone`})[t.level]);return(a,o)=>(b(),u(`div`,{relative:``,"inline-flex":``,"items-center":``,"justify-center":``,"leading-none":``,class:f([r.value,t.class]),title:n.value},[C(`div`,{class:f(i.value)},null,2),e.hasOptions?(b(),u(`div`,{key:0,absolute:``,"right--2px":``,"top--2px":``,"h-6px":``,"w-6px":``,"rounded-full":``,"bg-current":``,op75:``,class:f(e.hasRedundantOptions?`text-blue5`:``)},null,2)):y(``,!0)],10,W))}}),{__name:`RuleLevelIcon`}),le=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function K(e,t,n){let r=[];for(let i of e){if(n===`v3`){let e=i.children.flatMap((e,t)=>{if(e.type!==`element`)return e;let n=e.children[0];if(n.type!==`text`)return e;let r=t===i.children.length-1;if(!J(n.value,r))return e;let a=n.value.split(/(\s+\/\/)/);if(a.length<=1)return e;let o=[a[0]];for(let e=1;e<a.length;e+=2)o.push(a[e]+(a[e+1]||``));return o=o.filter(Boolean),o.length<=1?e:o.map(t=>({...e,children:[{type:`text`,value:t}]}))});e.length!==i.children.length&&(i.children=e)}let e=i.children,a=e.length-1;n===`v1`?a=0:t&&(a=e.length-2);for(let n=Math.max(a,0);n<e.length;n++){let a=e[n];if(a.type!==`element`)continue;let o=a.children.at(0);if(o?.type!==`text`)continue;let s=n===e.length-1,c=J(o.value,s);if(!c&&n>0&&o.value.trim().startsWith(`[!code`)){let t=e[n-1];if(t?.type===`element`){let n=t.children.at(0);if(n?.type===`text`&&n.value.includes(`//`)){let l=J(n.value+o.value,s);if(l){c=l,r.push({info:l,line:i,token:t,isLineCommentOnly:e.length===2&&t.children.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:[a]});continue}}}}if(c)if(t&&!s&&n!==0){let t=q(e[n-1],`{`)&&q(e[n+1],`}`);r.push({info:c,line:i,token:a,isLineCommentOnly:e.length===3&&a.children.length===1,isJsxStyle:t,additionalTokens:void 0})}else r.push({info:c,line:i,token:a,isLineCommentOnly:e.length===1&&a.children.length===1,isJsxStyle:!1,additionalTokens:void 0})}}return r}function q(e,t){if(e.type!==`element`)return!1;let n=e.children[0];return n.type===`text`?n.value.trim()===t:!1}function J(e,t){let n=e.trimStart(),r=e.length-n.length;n=n.trimEnd();let i=e.length-n.length-r;for(let[e,a]of le){if(a&&!t)continue;let o=e.exec(n);if(o)return[` `.repeat(r)+o[1],o[2],o[3]?o[3]+` `.repeat(i):void 0]}}function ue(e){let t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function de(e,t,n,r){return r??=`v3`,{name:e,code(e){let i=e.children.filter(e=>e.type===`element`),a=[];e.data??={};let o=e.data;o._shiki_notation??=K(i,[`jsx`,`tsx`].includes(this.options.lang),r);let s=o._shiki_notation;for(let e of s){if(e.info[1].length===0)continue;let o=i.indexOf(e.line);e.isLineCommentOnly&&r!==`v1`&&o++;let s=!1;if(e.info[1]=e.info[1].replace(t,(...t)=>n.call(this,t,e.line,e.token,i,o)?(s=!0,``):t[0]),!s)continue;r===`v1`&&(e.info[1]=ue(e.info[1]));let c=e.info[1].trim().length===0;if(c&&(e.info[1]=``),c&&e.isLineCommentOnly)a.push(e.line);else if(c&&e.isJsxStyle)e.line.children.splice(e.line.children.indexOf(e.token)-1,3);else if(c){if(e.additionalTokens)for(let t=e.additionalTokens.length-1;t>=0;t--){let n=e.additionalTokens[t],r=e.line.children.indexOf(n);r!==-1&&e.line.children.splice(r,1)}e.line.children.splice(e.line.children.indexOf(e.token),1)}else{let t=e.token.children[0];if(t.type===`text`&&(t.value=e.info.join(``),e.additionalTokens))for(let t of e.additionalTokens){let e=t.children[0];e?.type===`text`&&(e.value=``)}}}for(let t of a){let n=e.children.indexOf(t),r=e.children[n+1],i=1;r?.type===`text`&&r?.value===`
|
|
2
|
+
`&&(i=2),e.children.splice(n,i)}}}}function Y(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function fe(e={},t=`@shikijs/transformers:notation-map`){let{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return de(t,RegExp(`#?\\s*\\[!code (${Object.keys(n).map(Y).join(`|`)})(:\\d+)?\\]`,`gi`),function([e,t,a=`:1`],o,s,c,l){let u=Number.parseInt(a.slice(1),10);for(let e=l;e<Math.min(l+u,c.length);e++)this.addClassToHast(c[e],n[t]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}var pe=l({name:`Shiki`,props:{code:{type:String,required:!0},lang:{type:String,required:!0}},setup(e){let t=k(()=>L.value?L.value.codeToHtml(e.code,{lang:e.lang,theme:P.value?`vitesse-dark`:`vitesse-light`,transformers:[{pre(e){e.properties.style=``}},fe({classMap:{muted:`muted`}},`@shikijs/transformers:notation-muted`)]}):ne(e.code));return()=>h(`div`,{class:`filter-hue-rotate-90`,innerHTML:t.value})}}),X;function me(e){return X=!0,[`--`,e,`--`]}function Z(e,t){if(t===void 0||typeof e!=typeof t)return e;if(e===t)return me(e);if(typeof e==`object`&&e&&t!==null){if(Array.isArray(e)&&Array.isArray(t)&&e.length===t.length)return e.length===0?me(e):e.map((e,n)=>Z(e,t[n]));if(!Array.isArray(e)&&!Array.isArray(t))return Object.keys(e).reduce((n,r)=>(n[r]=Z(e[r],t[r]),n),{})}return e}function Q(e,t){return X=!1,{options:e.map((e,n)=>Z(e,n<t.length?t[n]:void 0)),hasRedundantOptions:X}}var he={"min-w-100":``,p4:``,flex:`~ col gap-2`},ge={flex:`~ gap-1 items-center`},_e={key:0,ml1:``,op50:``},ve={key:1,ml1:``,op50:``},ye={key:3,op50:``},be={key:0,flex:`~ gap-2`},xe={flex:`~ col gap-2`},Se={flex:`~ gap-2 items-center wrap`},Ce={"items-center":``,"justify-between":``,"md:flex":``},we={flex:`~ gap-1`,op50:``},Te={key:0,border:`~ base rounded-full`,flex:`~ gap-2 items-center`,"bg-active":``,px2:``,py1:``,"text-sm":``},Ee={key:1,border:`~ base rounded-full`,flex:`~ gap-2 items-center`,"bg-active":``,px2:``,py1:``,"text-sm":``},De={key:0,op50:``},Oe={key:2,op50:``},$=Object.assign(l({__name:`RuleStateItem`,props:{state:{},isLocal:{type:Boolean}},setup(e){let t=e,n={error:`text-red`,warn:`text-amber`,off:`text-gray`},r=k(()=>o.value.configs[t.state.configIndex]),a=k(()=>i(t.state.name)),c=k(()=>Q(t.state.options??[],a.value)),l=k(()=>t.state.primaryOption!==void 0||!!t.state.options?.length),m=k(()=>!!a.value?.length),h=k(()=>l.value&&m.value),_=D({viewType:k(()=>!l.value&&a.value?.length?`default`:`state`).value}),v=M();function x(){s.rule=t.state.name,s.plugins=[],v.push(`/configs`)}return(t,i)=>{let o=G,s=F,v=re,S=pe;return b(),u(`div`,he,[C(`div`,ge,[g(o,{level:e.state.level,"config-index":e.state.configIndex},null,8,[`level`,`config-index`]),e.state.level===`off`?(b(),u(`span`,_e,`Turned `)):(b(),u(`span`,ve,`Set to `)),C(`span`,{"font-mono":``,class:f(n[e.state.level])},j(e.state.level),3),e.isLocal?(b(),u(`div`,ye,` in this config `)):(b(),u(w,{key:2},[i[5]||=C(`span`,{op50:``},`in`,-1),C(`button`,{hover:`!color-base`,"text-gray":``,onClick:i[0]||=e=>x()},[r.value.name?(b(),O(s,{key:0,name:r.value.name,px2:``,"font-mono":``,border:`~ base rounded`},null,8,[`name`])):y(``,!0),i[3]||=C(`span`,{op50:``},` the `,-1),d(` `+j(A(V)(e.state.configIndex+1))+` `,1),i[4]||=C(`span`,{op50:``},` config item `,-1)])],64))]),e.isLocal?y(``,!0):(b(),u(`div`,be,[r.value.files?(b(),u(w,{key:0},[i[7]||=C(`div`,{"i-ph-file-magnifying-glass-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),C(`div`,xe,[i[6]||=C(`div`,{op50:``},` Applies to files matching `,-1),C(`div`,Se,[(b(!0),u(w,null,p(r.value.files?.flat(),(e,t)=>(b(),O(v,{key:t,glob:e},null,8,[`glob`]))),128))])])],64)):r.value.rules?(b(),u(w,{key:1},[i[8]||=C(`div`,{"i-ph-files-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),i[9]||=C(`div`,{op50:``},` Applied generally for all files `,-1)],64)):y(``,!0)])),l.value||a.value?.length?(b(),u(w,{key:1},[C(`div`,Ce,[C(`div`,we,[h.value?(b(),u(w,{key:0},[l.value?(b(),u(`button`,{key:0,"btn-action":``,class:f({"btn-action-active":_.viewType===`state`}),onClick:i[1]||=e=>_.viewType=`state`},[...i[10]||=[C(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Rule options `,-1)]],2)):y(``,!0),m.value?(b(),u(`button`,{key:1,"btn-action":``,class:f({"btn-action-active":_.viewType===`default`}),onClick:i[2]||=e=>_.viewType=`default`},[...i[11]||=[C(`div`,{"i-ph-faders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Option defaults `,-1)]],2)):y(``,!0)],64)):(b(),u(w,{key:1},[l.value?(b(),u(`div`,Te,[...i[12]||=[C(`div`,{"i-ph-sliders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Rule options `,-1)]])):m.value?(b(),u(`div`,Ee,[...i[13]||=[C(`div`,{"i-ph-faders-duotone":``,my1:``,"flex-none":``,op75:``},null,-1),d(` Option defaults `,-1)]])):y(``,!0)],64))])]),_.viewType===`state`?(b(),u(w,{key:0},[e.state.primaryOption===void 0?y(``,!0):(b(),O(S,{key:0,lang:`ts`,code:`configuredPrimaryOption: ${A(H)(e.state.primaryOption)}`,rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`])),(b(!0),u(w,null,p(c.value.options,(e,t)=>(b(),O(S,{key:t,lang:`ts`,code:A(H)(e),rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`]))),128))],64)):y(``,!0),_.viewType===`default`?(b(),u(w,{key:1},[l.value?y(``,!0):(b(),u(`div`,De,` No explicit options are configured in this state; showing Stylelint defaults. `)),(b(!0),u(w,null,p(a.value,(e,t)=>(b(),O(S,{key:t,lang:`ts`,code:A(H)(e),rounded:``,"bg-code":``,p2:``,"text-sm":``},null,8,[`code`]))),128))],64)):y(``,!0)],64)):y(``,!0),_.viewType===`state`&&c.value.hasRedundantOptions?(b(),u(`div`,Oe,[...i[14]||=[d(` Options `,-1),C(`span`,{italic:``,op75:``},`italicized`,-1),d(` match the default for the rule `,-1)]])):y(``,!0)])}}}),{__name:`RuleStateItem`}),ke={border:`~ red/25 rounded`,"select-none":``,"bg-red:5":``,px1:``,"text-xs":``,"text-red":``},Ae={key:0,"p-2":``,"text-sm":``,op75:``},je={key:0,mb1:``,flex:`~ gap-1`,"text-red":``},Me={key:1},Ne={key:2},Pe={mt2:``},Fe=[`href`],Ie=Object.assign(l({__name:`RuleDeprecatedInfo`,props:{deprecated:{type:[Boolean,Object]},invalid:{type:Boolean}},setup(e){let t=k(()=>{if(!(!e.deprecated||typeof e.deprecated==`boolean`))return e.deprecated}),n=k(()=>{if(!t.value)return;let e=``;return t.value.deprecatedSince&&(e+=`was deprecated in v${t.value.deprecatedSince}`),t.value.availableUntil&&(e&&(e+=`, and `),e+=`will be removed in v${t.value.availableUntil}`),`This rule ${e}.`});function r(e){return[`text-blue5 dark:text-blue4`,e?`underline`:``]}return(i,a)=>{let o=te;return b(),O(A(ee),{"inline-block":``,disabled:!t.value},{popper:T(({shown:e})=>[e&&t.value?(b(),u(`div`,Ae,[t.value.message?(b(),u(`p`,je,[a[0]||=C(`span`,{"i-ph-warning-duotone":``,"inline-block":``},null,-1),d(j(t.value.message),1)])):y(``,!0),n.value?(b(),u(`p`,Me,j(n.value),1)):y(``,!0),t.value.replacedBy?.length?(b(),u(`p`,Ne,[a[2]||=d(` Please use the `,-1),(b(!0),u(w,null,p(t.value.replacedBy,({rule:e,plugin:n},i)=>(b(),u(w,null,[e?(b(),O(o,{key:e.name,class:f(r(e.url)),href:e.url,target:`_blank`},{default:T(()=>[d(j(e.name??e.url),1)]),_:2},1032,[`class`,`href`])):y(``,!0),n?(b(),u(w,{key:1},[a[1]||=d(` in `,-1),(b(),O(o,{key:n.name,class:f(r(n.url)),href:n.url,target:`_blank`},{default:T(()=>[d(j(n.name??n.url),1)]),_:2},1032,[`class`,`href`]))],64)):y(``,!0),d(j(i===t.value.replacedBy.length-1?`.`:i===0?``:`, `),1)],64))),256))])):y(``,!0),C(`p`,Pe,[C(`a`,{"text-red":``,underline:``,href:t.value.url},`Learn more`,8,Fe)])])):y(``,!0)]),default:T(()=>[C(`div`,ke,j(e.invalid?`INVALID`:`DEPRECATED`),1)]),_:1},8,[`disabled`])}}}),{__name:`RuleDeprecatedInfo`}),Le={key:2,"h-5":``,"w-5":``,op0:``},Re={"min-w-0":``,"w-full":``,"inline-flex":``,"items-center":``,"gap-1":``},ze={key:0,"max-h":`50vh`,"min-w":`min(32rem,82vw)`,"text-sm":``,"leading-5":``},Be={flex:`~ items-center gap-2`,p3:``},Ve={key:0,"i-ph-magic-wand-duotone":``,op60:``},He={border:`t base`,px3:``,pb3:``,"pt2.5":``},Ue={flex:`~ items-center gap-1.5 wrap`},We={"font-mono":``},Ge={class:`wrap mt2 flex items-center gap-2`},Ke={"text-sm":``,"font-medium":``,op80:``},qe={key:0,class:`inline-flex border border-violet/30 rounded-full bg-violet/8 px2 py0.5 text-xs text-violet7 dark:text-violet3`},Je={key:0,class:`mt2 inline-flex items-start gap-1.5 text-sm op80`},Ye={class:`inline-flex flex-col gap-0.5`},Xe={grid:`~ cols-[repeat(4,1.15rem)]`,"min-h-5":``,"items-center":``,"justify-items-center":``,"gap-x-1.5":``},Ze={key:0,class:`col-start-1`,"i-ph-seal-warning-duotone":``,"text-red5":``,op80:``},Qe={key:1,class:`col-start-2`,"i-ph-check-square-duotone":``,"text-green6":``,op70:``},$e={key:2,class:`col-start-3`,"i-ph-wrench-duotone":``,"text-amber6":``,op70:``},et={key:3,class:`col-start-4`,"i-ph-prohibit-inset-duotone":``,op60:``},tt=[`title`],nt={key:0},rt={key:1,class:`mx-0.5 inline text-[0.94em] text-violet7 font-mono dark:text-violet3`},it={key:0,"i-ph-asterisk":``,"text-2.5":``,"text-amber5":``,op55:``},at={key:1,"i-ph-chat-centered-text-duotone":``,"text-3":``,"text-violet5":``,op55:``},ot={key:1,flex:``,"flex-auto":``,"flex-col":``,"items-start":``,"justify-end":``},st={flex:`~ gap-2`,mt1:``},ct={key:1,"i-ph-check-square-duotone":``,op50:``},lt={key:2,"i-ph-wrench-duotone":``,op50:``},ut=`foo`,dt=`Built-in stylelint rule: Do not use a prefix in your config.`,ft=Object.assign(l({__name:`RuleItem`,props:{rule:{},ruleStates:{},value:{},class:{},gridView:{type:Boolean},dimDisabled:{type:Boolean}},emits:[`badgeClick`,`stateClick`],setup(e,{emit:a}){let o=e,s=a,l=/no more than|at most|at least|specificity|match pattern|to be one of|must be|should be|allowed list|disallowed list/,m=/<value>|‹([^›]+)›/gu;function h(e){let{hasRedundantOptions:t}=Q(e??[],i(o.rule.name));return t}let{copy:_}=c();function D(e){return e&&e[0].toUpperCase()+e.slice(1)}function M(e){if(typeof e==`string`)return e;let t=JSON.stringify(e);return t===void 0?String(e):t}function ee(e){return typeof e==`string`||typeof e==`number`}function P(e,t){let n=e.slice(Math.max(0,t-56),t).toLowerCase();return l.test(n)}function F(e,t){if(!e.includes(`<value>`)||!ee(t))return e;let n=M(t);if(!n.length)return e;let r=`<value>`,i=[],a=e.indexOf(r);for(;a!==-1;)i.push(a),a=e.indexOf(r,a+7);if(!i.length)return e;if(i.length===1)return P(e,i[0])?e.replace(r,n):e;let o=[],s=0,c=!1;for(let t of i)o.push(e.slice(s,t)),P(e,t)?(o.push(n),c=!0):o.push(r),s=t+7;return o.push(e.slice(s)),c?o.join(``):e}let ne=k(()=>{let e=o.ruleStates;if(e?.length)return e.toReversed().find(e=>e.level!==`off`)??e.at(-1)}),L=k(()=>{if(o.value!==void 0)return t(o.value)??n(o.value)?.[0]}),re=k(()=>{if(L.value!==void 0)return L.value;let e=ne.value;if(e)return e.primaryOption??e.options?.[0]}),ie=k(()=>{let e=o.ruleStates;return e?.length?e.every(e=>e.level===`off`):!1}),R=k(()=>{if(o.rule.invalid)return`Invalid rule has no description`;let e=o.rule.docs?.description,t=D(e)??`No description available`,n=re.value;return n===void 0?t:F(t,n)}),ae=k(()=>{let e=R.value,t=[],n=0;for(let r of e.matchAll(m)){let i=r.index??0;n<i&&t.push({type:`text`,value:e.slice(n,i)}),t.push({type:`token`,value:r[1]??ut}),n=i+r[0].length}return n<e.length&&t.push({type:`text`,value:e.slice(n)}),t.length?t:[{type:`text`,value:e}]}),z=k(()=>!!o.rule.docs?.descriptionMissing&&!o.rule.invalid),se=k(()=>o.rule.docs?.descriptionSource),ce=k(()=>se.value===`message`&&!z.value),B=k(()=>o.rule.docs?.urlSource===`inferred`),V=k(()=>B.value?`Docs (inferred from plugin package metadata)`:`Docs`),H=k(()=>o.dimDisabled??!0?o.value===void 0?ie.value:r(o.value)===`off`:!1),U=k(()=>H.value?`op55 hover:op100 transition-opacity`:``),W=k(()=>(o.ruleStates?.length??0)>0),le=k(()=>o.value!==void 0),K=k(()=>o.rule.plugin===`stylelint`?!0:o.rule.name.startsWith(`stylelint/`)),q=k(()=>{if(K.value)return`stylelint`;if(o.rule.pluginPackageName)return o.rule.pluginPackageName;if(o.rule.plugin)return`stylelint-${o.rule.plugin}`}),J=k(()=>K.value?`Rule source`:`Plugin package`),ue=k(()=>q.value?q.value:o.rule.plugin?o.rule.plugin:`unknown`),de=k(()=>{let e=q.value||o.rule.plugin||`stylelint`;return{color:I(e),borderColor:I(e,.5),backgroundColor:I(e,.1)}}),Y=k(()=>{let[e]=o.rule.name.split(`/`);if(e===`plugin`)return q.value?{firstLineBeforePrefix:`This rule is published with a generic`,firstLineAfterPrefix:`prefix.`}:{firstLineBeforePrefix:`This rule uses a generic`,firstLineAfterPrefix:`prefix from its upstream package.`}});return(i,a)=>{let c=G,l=$,m=x(`VDropdown`),D=oe,k=te,M=Ie;return b(),u(w,null,[C(`div`,{class:f([o.class,U.value,e.gridView?`absolute top-2 right-2 flex justify-end items-start`:`w-full flex items-center justify-end`]),"text-lg":``},[W.value?(b(),u(`div`,{key:0,flex:`~ items-center gap-0.5 justify-end`,class:f(e.gridView?`flex-col`:``)},[(b(!0),u(w,null,p(e.ruleStates,(e,t)=>(b(),O(m,{key:t},{popper:T(({shown:t})=>[t?(b(),O(l,{key:0,state:e},null,8,[`state`])):y(``,!0)]),default:T(()=>[g(c,{level:e.level,"config-index":e.configIndex,"has-options":e.primaryOption!==void 0||!!e.options?.length,"has-redundant-options":h(e.options)},null,8,[`level`,`config-index`,`has-options`,`has-redundant-options`])]),_:2},1024))),128))],2)):le.value?(b(),O(c,{key:1,level:A(r)(e.value),"has-options":A(t)(e.value)!==void 0||!!A(n)(e.value)?.length,"has-redundant-options":h(A(n)(e.value))},null,8,[`level`,`has-options`,`has-redundant-options`])):e.gridView?y(``,!0):(b(),u(`div`,Le))],2),C(`div`,{class:f([o.class,U.value]),relative:``,"min-w-0":``,pr2:``},[g(m,null,{popper:T(({shown:t})=>[t?(b(),u(`div`,ze,[C(`div`,Be,[!e.rule.invalid&&e.rule.docs?.url?E((b(),O(k,{key:0,class:`inline-flex items-center gap-1.5 border border-base rounded-full bg-black/8 px3 py1.5 text-sm text-inherit no-underline transition dark:bg-white/6 hover:bg-black/14 dark:hover:bg-white/12`,to:e.rule.docs?.url,target:`_blank`,rel:`noopener noreferrer`,title:V.value},{default:T(()=>[a[3]||=C(`div`,{"i-ph-book-duotone":``},null,-1),a[4]||=d(` Docs `,-1),B.value?(b(),u(`div`,Ve)):y(``,!0)]),_:1},8,[`to`,`title`])),[[A(N),V.value]]):y(``,!0),C(`button`,{class:`inline-flex items-center gap-1.5 border border-base rounded-full bg-black/8 px3 py1.5 text-sm text-inherit transition dark:bg-white/6 hover:bg-black/14 dark:hover:bg-white/12`,title:`Copy`,onClick:a[1]||=t=>A(_)(e.rule.name)},[...a[5]||=[C(`div`,{"i-ph-copy-duotone":``},null,-1),d(` Copy name `,-1)]]),S(i.$slots,`popup-actions`)]),C(`div`,He,[C(`div`,Ue,[a[6]||=C(`span`,{"text-sm":``,op70:``},`Rule name`,-1),C(`code`,We,j(e.rule.name),1)]),C(`div`,Ge,[C(`span`,Ke,j(J.value),1),C(`code`,{class:`inline-flex items-center border rounded-full px2 py0.5 text-sm font-mono`,style:v(de.value)},j(ue.value),5),K.value?(b(),u(`span`,qe,[...a[7]||=[d(` Built-in rule · omit `,-1),C(`span`,{class:`mx1 text-violet8 font-mono dark:text-violet2`},`stylelint/`,-1),d(` in config `,-1)]])):y(``,!0)]),Y.value?(b(),u(`div`,Je,[a[10]||=C(`span`,{"i-ph-info-duotone":``,"mt0.25":``,"text-sm":``},null,-1),C(`span`,Ye,[C(`span`,null,[d(j(Y.value.firstLineBeforePrefix)+` `,1),a[8]||=C(`span`,{class:`mx0.5 text-violet7 font-mono dark:text-violet3`},`plugin/`,-1),d(` `+j(Y.value.firstLineAfterPrefix),1)]),a[9]||=C(`span`,null,[d(` Keep the `),C(`span`,{class:`mx0.5 text-violet7 font-mono dark:text-violet3`},`plugin/`),d(` prefix in your config. `)],-1)])])):y(``,!0)]),S(i.$slots,`popup`)])):y(``,!0)]),default:T(()=>[C(`div`,Re,[K.value?E((b(),u(`span`,{key:0,class:`inline-flex flex-none cursor-help items-center text-violet6 op75 dark:text-violet3`,title:dt},[...a[2]||=[C(`span`,{"i-ph-asterisk":``,class:`text-3 leading-none`},null,-1)]])),[[A(N),dt]]):y(``,!0),g(D,{name:e.rule.name,prefix:e.rule.plugin,deprecated:e.rule.deprecated,borderless:!0,break:e.gridView,"hover-reveal":!1,title:e.rule.name,class:`min-w-0`,"text-start":``,as:`button`,onClick:a[0]||=e=>s(`badgeClick`,e)},null,8,[`name`,`prefix`,`deprecated`,`break`,`title`])])]),_:3})],2),e.gridView?y(``,!0):(b(),u(`div`,{key:0,class:f([o.class,U.value]),mx2:``,"min-w-0":``,flex:``,"justify-center":``},[C(`div`,Xe,[e.rule.invalid?E((b(),u(`div`,Ze,null,512)),[[A(N),`❌ Invalid rule`]]):y(``,!0),e.rule.docs?.recommended?E((b(),u(`div`,Qe,null,512)),[[A(N),`✅ Recommended`]]):y(``,!0),e.rule.fixable?E((b(),u(`div`,$e,null,512)),[[A(N),`🔧 Fixable`]]):y(``,!0),e.rule.deprecated?E((b(),u(`div`,et,null,512)),[[A(N),`🪦 Deprecated`]]):y(``,!0)])],2)),C(`div`,{class:f([o.class,U.value]),"min-w-0":``,flex:`~ gap-2 items-center`,"of-hidden":``},[C(`div`,{title:R.value,class:f([e.rule.deprecated?`line-through`:``,e.rule.invalid?`text-red`:``,e.gridView?`op55 text-sm leading-5`:`op75 text-sm ws-nowrap of-hidden text-ellipsis line-clamp-1`])},[(b(!0),u(w,null,p(ae.value,(e,t)=>(b(),u(w,{key:t},[e.type===`text`?(b(),u(`span`,nt,j(e.value),1)):(b(),u(`code`,rt,j(e.value),1))],64))),128))],10,tt),z.value?E((b(),u(`div`,it,null,512)),[[A(N),`No description metadata found for this rule; showing a generated fallback.`]]):ce.value?E((b(),u(`div`,at,null,512)),[[A(N),`Description derived from plugin message templates because dedicated metadata is missing.`]]):y(``,!0)],2),e.gridView&&(e.rule.invalid||e.rule.deprecated||e.rule.fixable||e.rule.docs?.recommended)?(b(),u(`div`,ot,[C(`div`,st,[e.rule.invalid||e.rule.deprecated?(b(),O(M,{key:0,deprecated:e.rule.deprecated,invalid:e.rule.invalid},null,8,[`deprecated`,`invalid`])):y(``,!0),e.rule.docs?.recommended?E((b(),u(`div`,ct,null,512)),[[A(N),`✅ Recommended`]]):y(``,!0),e.rule.fixable?E((b(),u(`div`,lt,null,512)),[[A(N),`🔧 Fixable`]]):y(``,!0)])])):y(``,!0)],64)}}}),{__name:`RuleItem`}),pt=`42px_minmax(12rem,clamp(12rem,32vw,24rem))_5rem_minmax(0,1fr)`,mt=Object.assign(l({__name:`RuleList`,props:{rules:{},getBind:{type:Function},filter:{type:Function},listColumns:{},dimDisabled:{type:Boolean},showRuleStates:{type:Boolean},gridView:{type:Boolean}},setup(t){let n=t,r=k(()=>n.gridView??e.value),i=k(()=>Array.isArray(n.rules)?n.rules.map(e=>e.name):Object.keys(n.rules)),s=k(()=>n.dimDisabled??!0);function c(e){return Array.isArray(n.rules)?n.rules.find(t=>t.name===e):a(e)}function d(e){return Array.isArray(n.rules)?void 0:n.rules[e]}let _=k(()=>r.value?`grid grid-cols-[repeat(auto-fill,minmax(min(100%,350px),1fr))] gap-2`:`grid max-w-full min-w-0 gap-x-2 gap-y-2 items-center`),x=k(()=>{if(!r.value)return{gridTemplateColumns:(n.listColumns||pt).replaceAll(`_`,` `)}}),C=l({setup(e,{slots:t}){return()=>r.value?h(`div`,{class:`relative border border-base max-w-full rounded-lg p4 py3 flex flex-col gap-2 of-hidden justify-start`},t.default?.()):h(w,t.default?.())}});return(e,a)=>{let l=$,h=ft;return b(),u(`div`,{class:f(_.value),style:v(x.value)},[(b(!0),u(w,null,p(i.value,i=>(b(),u(w,{key:i},[n.filter?.(i)===!1?y(``,!0):(b(),O(A(C),{key:0},{default:T(()=>[g(h,m({rule:c(i),"rule-states":n.showRuleStates!==!1&&Array.isArray(t.rules)?A(o).ruleToState.get(i)||[]:void 0,"grid-view":r.value,value:d(i)},{ref_for:!0},t.getBind?.(i),{"dim-disabled":s.value}),{popup:T(()=>[S(e.$slots,`popup`,{ruleName:i,value:d(i)},()=>[(b(!0),u(w,null,p(A(o).ruleToState.get(i)||[],(e,t)=>(b(),O(l,{key:t,border:`t base`,state:e},null,8,[`state`]))),128))])]),"popup-actions":T(()=>[S(e.$slots,`popup-actions`,{ruleName:i})]),_:2},1040,[`rule`,`rule-states`,`grid-view`,`value`,`dim-disabled`])]),_:2},1024))],64))),128))],6)}}}),{__name:`RuleList`});export{oe as a,U as i,$ as n,G as r,mt as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,D as t,O as n,W as r,b as i,nt as a,zt as o}from"./
|
|
1
|
+
import{C as e,D as t,O as n,W as r,b as i,nt as a,zt as o}from"./pswINk0x.js";import"./D5CeIdpL.js";import"./Bdm1-Non.js";import{t as s}from"./Bt9z7wWW.js";import{r as c}from"#entry";import{t as l}from"./BDH0pOV6.js";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g=l({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(l){let g=l;return s({title:`${g.status} - ${g.statusText} | ${g.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(s,g)=>{let _=c;return r(),e(`div`,u,[i(`div`,d,[i(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:o(l.status)},null,8,f),i(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:o(l.statusText)},null,8,p),i(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:o(l.description)},null,8,m),i(`div`,h,[n(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:a(()=>[t(o(l.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-204d37bf`]]);export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,P as t,_t as n,i as r}from"./
|
|
1
|
+
import{F as e,P as t,_t as n,i as r}from"./pswINk0x.js";import{a as i,c as a,d as o,l as s,n as c,r as l,t as u}from"./D5CeIdpL.js";function d(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function f(e,t,n=`.`,r){if(!d(t))return f(e,{},n,r);let i=Object.assign({},t);for(let t in e){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:d(a)&&d(i[t])?i[t]=f(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function p(e){return(...t)=>t.reduce((t,n)=>f(t,n,``,e),{})}var m=p();function h(e,t){try{return t in e}catch{return!1}}var g=class extends Error{static __h3_error__=!0;statusCode=500;fatal=!1;unhandled=!1;statusMessage;data;cause;constructor(e,t={}){super(e,t),t.cause&&!this.cause&&(this.cause=t.cause)}toJSON(){let e={message:this.message,statusCode:x(this.statusCode,500)};return this.statusMessage&&(e.statusMessage=b(this.statusMessage)),this.data!==void 0&&(e.data=this.data),e}};function _(e){if(typeof e==`string`)return new g(e);if(v(e))return e;let t=new g(e.message??e.statusMessage??``,{cause:e.cause||e});if(h(e,`stack`))try{Object.defineProperty(t,`stack`,{get(){return e.stack}})}catch{try{t.stack=e.stack}catch{}}if(e.data&&(t.data=e.data),e.statusCode?t.statusCode=x(e.statusCode,t.statusCode):e.status&&(t.statusCode=x(e.status,t.statusCode)),e.statusMessage?t.statusMessage=e.statusMessage:e.statusText&&(t.statusMessage=e.statusText),t.statusMessage){let e=t.statusMessage;b(t.statusMessage)!==e&&console.warn("[h3] Please prefer using `message` for longer error messages instead of `statusMessage`. In the future, `statusMessage` will be sanitized by default.")}return e.fatal!==void 0&&(t.fatal=e.fatal),e.unhandled!==void 0&&(t.unhandled=e.unhandled),t}function v(e){return e?.constructor?.__h3_error__===!0}var y=/[^\u0009\u0020-\u007E]/g;function b(e=``){return e.replace(y,``)}function x(e,t=200){return!e||(typeof e==`string`&&(e=Number.parseInt(e,10)),e<100||e>999)?t:e}globalThis.Headers,globalThis.Response;var S=Symbol(`layout-meta`),C=Symbol(`route`),w=()=>r()?.$router,T=()=>t()?e(C,r()._route):r()._route;function E(e){return e}var D=()=>{try{if(r()._processingMiddleware)return!0}catch{return!1}return!1},O=(e,t)=>{e||=`/`;let n=typeof e==`string`?e:`path`in e?k(e):w().resolve(e).href;if(t?.open){let{target:e=`_blank`,windowFeatures:r={}}=t.open,i=[];for(let[e,t]of Object.entries(r))t!==void 0&&i.push(`${e.toLowerCase()}=${t}`);return open(n,e,i.join(`, `)),Promise.resolve()}let o=l(n,{acceptRelative:!0}),c=t?.external||o;if(c){if(!t?.external)throw Error("Navigating to an external URL is not allowed by default. Use `navigateTo(url, { external: true })`.");let{protocol:e}=new URL(n,window.location.href);if(e&&i(e))throw Error(`Cannot navigate to a URL with '${e}' protocol.`)}let u=D();if(!c&&u){if(t?.replace){if(typeof e==`string`){let{pathname:t,search:n,hash:r}=s(e);return{path:t,...n&&{query:a(n)},...r&&{hash:r},replace:!0}}return{...e,replace:!0}}return e}let d=w(),f=r();if(c)return f._scope.stop(),t?.replace?location.replace(n):location.href=n,u?f.isHydrating?new Promise(()=>{}):!1:Promise.resolve();let p=typeof e==`string`?A(e):e;return t?.replace?d.replace(p):d.push(p)};function k(e){return o(e.path||``,e.query||{})+(e.hash||``)}function A(e){let t=s(e);return c(u(t.pathname))+t.search+t.hash}var j=`__nuxt_error`,M=()=>n(r().payload,`error`),N=e=>{let t=I(e);try{let e=M();r().hooks.callHook(`app:error`,t),e.value||=t}catch{throw t}return t},P=async(e={})=>{let t=r(),n=M();t.callHook(`app:error:cleared`,e),e.redirect&&await w().replace(e.redirect),n.value=void 0},F=e=>!!e&&typeof e==`object`&&`__nuxt_error`in e,I=e=>{typeof e!=`string`&&e.statusText&&(e.message??=e.statusText);let t=_(e);return Object.defineProperty(t,j,{value:!0,configurable:!1,writable:!1}),Object.defineProperty(t,`status`,{get:()=>t.statusCode,configurable:!0}),Object.defineProperty(t,`statusText`,{get:()=>t.statusMessage,configurable:!0}),t};export{M as a,O as c,w as d,S as f,N as i,k as l,m,I as n,E as o,C as p,F as r,A as s,P as t,T as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as e,P as t,i as n}from"./
|
|
1
|
+
import{F as e,P as t,i as n}from"./pswINk0x.js";import{c as r}from"#entry";function i(r){let i=r||n();return i.ssrContext?.head||i.runWithContext(()=>{if(t()){let t=e(`usehead`);if(!t)throw Error(`[nuxt] [unhead] Missing Unhead instance.`);return t}})}function a(e,t={}){return r(e,{head:t.head||i(t.nuxt),...t})}export{a as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,W as t,b as n,zt as r}from"./
|
|
1
|
+
import{C as e,W as t,b as n,zt as r}from"./pswINk0x.js";import{t as i}from"./Bt9z7wWW.js";import{t as a}from"./BDH0pOV6.js";var o={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},s={class:`max-w-520px text-center`},c=[`textContent`],l=[`textContent`],u=[`textContent`],d=a({__name:`error-500`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:500},statusText:{type:String,default:`Internal server error`},description:{type:String,default:`This page is temporarily unavailable.`},refresh:{type:String,default:`Refresh this page`}},setup(a){let d=a;return i({title:`${d.status} - ${d.statusText} | ${d.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(i,d)=>(t(),e(`div`,o,[n(`div`,s,[n(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:r(a.status)},null,8,c),n(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:r(a.statusText)},null,8,l),n(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:r(a.description)},null,8,u)])]))}},[[`__scopeId`,`data-v-d349100d`]]);export{d as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./us1Ri1jC.js","./CqxBMan9.js","./Od1p3DBV.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{E as e,s as t,u as n}from"./DKSsXTxC.js";import{A as r,C as i,It as a,J as o,N as s,O as c,Q as l,S as u,W as d,b as f,h as p,ht as m,nt as h,x as g,y as _,yt as v,zt as ee}from"./pswINk0x.js";import{d as te}from"./Bdm1-Non.js";import{a as ne,o as y,t as b}from"#entry";import{n as re}from"./CqxBMan9.js";var ie={ts:200,typescript:200,"@typescript-eslint":200,ignore:`#888888`,ignores:`#888888`,disable:`#888888`,disables:`#888888`,vue:`#41b883`,nuxt:`#41b883`,svelte:`#ff3e00`,react:`#61dafb`,node:110,n:110,js:50,javascript:50,antfu:170,markdown:270,stylelint:270,"@stylistic":285,"stylelint-order":245,"stylelint-scss":300,"stylelint-scales":260,"stylelint-a11y":185,"stylelint-config-tailwindcss":205};function ae(e,t=1){let n=0;for(let t=0;t<e.length;t++)n=e.charCodeAt(t)+((n<<5)-n);return oe(n%360,t)}function oe(e,t=1){return`hsla(${e}, ${b.value?50:65}%, ${b.value?60:40}%, ${t})`}function se(e,t=1){if(ie[e]){let n=ie[e];return typeof n==`number`?oe(n,t):t===1?n:n+Math.floor(t*255).toString(16).padStart(2,`0`)}return ae(e,t)}var ce=[{match:/package\.json$/,icon:`i-file-icons-npm text-red scale-110`},{match:/stylelint\.config\.\w+$|\.stylelintrc(\..+)?$/,icon:`i-simple-icons-stylelint text-primary`},{match:/\.[mc]?jsx?$/,icon:`i-vscode-icons-file-type-js-official`},{match:/\.[mc]?tsx?$/,icon:`i-file-icons-typescript-alt text-blue3`},{match:/\.vue$/,icon:`i-logos-vue`},{match:/\.svelte$/,icon:`i-logos-svelte-icon`},{match:/\.html?$/,icon:`i-devicon-html5`},{match:/\.md$/,icon:`i-simple-icons-markdown text-gray`},{match:/\.json[c5]?$/,icon:`i-simple-icons-json text-gray`},{match:/\.css$/,icon:`i-vscode-icons-file-type-css`}],le={flex:`~ gap-2 items-center`},ue=Object.assign(r({__name:`FileItem`,props:{filepath:{}},setup(e){let t=e,r=_(()=>{for(let e of ce)if(e.match.test(t.filepath))return e.icon;return`i-ph-file-duotone`}),o=te();function s(){n.filepath=t.filepath,n.rule=``,n.plugins=[],o.push(`/configs`)}return(t,n)=>(d(),i(`div`,le,[f(`div`,{class:a(r.value),"flex-none":``,h:`1em`,"translate-y-1px":``},null,2),f(`button`,{"text-gray":``,hover:`underline`,onClick:s},ee(e.filepath),1)]))}}),{__name:`FileItem`}),de=/([:/])/g,fe=r({props:{name:{type:String},index:{type:Number}},setup(e){let t=_(()=>e.name?.split(de).filter(Boolean));return()=>t.value?s(`span`,t.value.map((e,n)=>s(`span`,[`:`,`/`].includes(e)?{style:{opacity:.35,margin:`0 1px`}}:n===t.value.length-1?null:{style:{color:se(e)}},e))):s(`span`,[s(`span`,{class:`op50 italic`},`anonymous`),e.index==null?null:s(`span`,{class:`op50 text-sm`},` #${e.index+1}`)])}}),pe=4294967295,me=class{regexps;constructor(e,t={}){this.patterns=e,this.options=t;let{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw Error("Option `regexConstructor` is not provided");this.regexps=e.map(e=>{if(typeof e!=`string`)return e;let t=r?.get(e);if(t){if(t instanceof RegExp)return t;if(n)return null;throw t}try{let t=i(e);return r?.set(e,t),t}catch(t){if(r?.set(e,t),n)return null;throw t}})}findNextMatchSync(e,t,n){let r=typeof e==`string`?e:e.content,i=[];function a(e,t,n=0){return{index:e,captureIndices:t.indices.map(e=>e==null?{start:pe,end:pe,length:0}:{start:e[0]+n,end:e[1]+n,length:e[1]-e[0]})}}for(let e=0;e<this.regexps.length;e++){let n=this.regexps[e];if(n)try{n.lastIndex=t;let o=n.exec(r);if(!o)continue;if(o.index===t)return a(e,o,0);i.push([e,o,0])}catch(e){if(this.options.forgiving)continue;throw e}}if(i.length){let e=Math.min(...i.map(e=>e[1].index));for(let[t,n,r]of i)if(n.index===e)return a(t,n,r)}return null}};function he(e,t){return re(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function ge(e={}){let t=Object.assign({target:`auto`,cache:new Map},e);return t.regexConstructor||=e=>he(e,{target:t.target}),{createScanner(e){return new me(e,t)},createString(e){return{content:e}}}}var x=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function _e(e){return ve(e)}function ve(e){return Array.isArray(e)?ye(e):e instanceof RegExp?e:typeof e==`object`?be(e):e}function ye(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=ve(e[n]);return t}function be(e){let t={};for(let n in e)t[n]=ve(e[n]);return t}function xe(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Se(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Se(e.substring(0,e.length-1)):e.substr(~t+1)}var Ce=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,we=class{static hasCaptures(e){return e===null?!1:(Ce.lastIndex=0,Ce.test(e))}static replaceCaptures(e,t,n){return e.replace(Ce,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Te(e,t){return e<t?-1:e>t?1:0}function Ee(e,t){if(e===null&&t===null)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++){let n=Te(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function De(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 Oe(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var ke=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}},S=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Pe(e),t)}static createFromParsedTheme(e,t){return Ie(e,t)}_cachedMatchRoot=new ke(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>je(e.parent,t.parentScopes));return n?new Ne(n.fontStyle,n.foreground,n.background):null}},Ae=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}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1: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}};function je(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Me(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Me(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Ne=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Pe(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&De(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&De(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new Fe(l,u,e,o,s,c)}}return n}var Fe=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},C=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(C||{});function Ie(e,t){e.sort((e,t)=>{let n=Te(e.scope,t.scope);return n!==0||(n=Ee(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Le(t),o=new Ne(n,a.getId(r),a.getId(i)),s=new Be(new ze(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new S(a,o,s)}var Le=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(e===null)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)}},Re=Object.freeze([]),ze=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||Re,this.fontStyle=n,this.foreground=r,this.background=i}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?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},Be=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 i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),ze.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(Ee(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new ze(e,t,n,r,i))}},w=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=e.containsBalancedBrackets(t)?1:0,d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=He(r)),i!==null&&(u=i?1:0),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ve(e){return e}function He(e){return e}function T(e,t){let n=[],r=We(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(Ue(i)){let e=[];do e.push(i),i=r.next();while(Ue(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function Ue(e){return!!e&&!!e.match(/[\w\.:]+/)}function We(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Ge(e){typeof e.dispose==`function`&&e.dispose()}var E=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Ke=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},qe=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))}},Je=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new E(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new qe;for(let n of e)Ye(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof E){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)}}};function Ye(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof E?D({baseGrammar:a,selfGrammar:i},r):Xe(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new E(e))}function Xe(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];Ze([r],t,n)}}function D(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Ze(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Ze(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Ze(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?xe({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Ze(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=rt(i);switch(a.kind){case 0:D({...t,selfGrammar:t.baseGrammar},n);break;case 1:D(t,n);break;case 2:Xe(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?Xe(a.ruleName,i,n):D(i,n)}else a.kind===4?n.add(new Ke(a.scopeName,a.ruleName)):n.add(new E(a.scopeName));break}}}var Qe=class{kind=0},$e=class{kind=1},et=class{constructor(e){this.ruleName=e}kind=2},tt=class{constructor(e){this.scopeName=e}kind=3},nt=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function rt(e){if(e===`$base`)return new Qe;if(e===`$self`)return new $e;let t=e.indexOf(`#`);return t===-1?new tt(e):t===0?new et(e.substring(1)):new nt(e.substring(0,t),e.substring(t+1))}var it=/\\(\d+)/,at=/\\(\d+)/g,ot=-1,st=-2;function ct(e){return e}function lt(e){return e}var O=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=we.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=we.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Se(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:we.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:we.replaceCaptures(this._contentName,e,t)}},ut=class extends O{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},dt=class extends O{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new k(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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 A,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ft=class extends O{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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 A,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},pt=class extends O{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new k(i,this.id),this.beginCaptures=a,this._end=new k(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),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){this._cachedCompiledPatterns=new A;for(let t of 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}},mt=class extends O{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new k(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new k(o,st),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),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){this._cachedCompiledPatterns=new A;for(let t of 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 A,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},ht=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ut(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new dt(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=xe({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new ft(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new mt(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 pt(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 i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=rt(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof ft||e instanceof pt||e instanceof mt)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},k=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?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,typeof this.source==`string`?this.hasBackReferences=it.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(typeof this.source!=`string`)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 at.lastIndex=0,this.source.replace(at,(e,t)=>Oe(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},A=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(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){return this._cached||=new gt(e,this._items.map(e=>e.source),this._items.map(e=>e.ruleId)),this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new gt(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},gt=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&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(`
|
|
3
|
+
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},_t=class{constructor(e,t){this.languageId=e,this.tokenType=t}},vt=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new _t(e,8),this._embeddedLanguagesMatcher=new yt(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new _t(0,0);_getBasicScopeAttributes=new ke(e=>new _t(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/},yt=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>Oe(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])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var bt=!1,xt=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function St(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Ct(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new xt(i,!0);f()}return new xt(i,!1);function f(){let o=wt(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===ot){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),j(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof pt){let r=o;j(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof mt){let r=o;j(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(j(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Ct(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof mt&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Ot(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==st){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),j(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function wt(e,t,n,r,i,a){let o=Tt(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=Et(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function Tt(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=Dt(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function Et(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=Dt(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function Dt(e,t,n,r,i){return bt?{ruleScanner:e.compile(t,n),findOptions:kt(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Ot(e,t,n,r,i){return bt?{ruleScanner:e.compileWhile(t,n),findOptions:kt(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function kt(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function j(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));St(e,p,n&&d.start===0,d.start,f,i,!1,0),Ge(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new At(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var At=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function jt(e,t,n,r,i,a,o,s){return new Ft(e,t,n,r,i,a,o,s)}function Mt(e,t,n,r,i){let a=T(t,Nt),o=ht.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Nt(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(Pt(t[r],e))return n=r+1,!0;return!1})}function Pt(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]===`.`}var Ft=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new vt(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=It(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=T(e,Nt);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[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={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)Mt(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&Mt(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(ct(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[lt(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]=It(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){this._rootId===-1&&(this._rootId=ht.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Lt.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=w.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?M.createRootAndLookUpScopeName(a,r,this):M.createRoot(`unknown`,r),t=new Lt(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
4
|
+
`;let a=this.createOnigString(e),o=a.content.length,s=new zt(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=St(this,a,i,0,t,s,!0,r);return Ge(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function It(e,t){return e=_e(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var M=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Ae.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Ae(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Ae(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{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}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),w.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,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}},Lt=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,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 t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?M.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{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}while(!0)}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,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}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:lt(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=M.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ct(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,M.fromExtension(r,n.contentNameScopesList))}},Rt=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):T(e,Nt).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>T(e,Nt).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!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}},zt=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>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=w.set(n,0,Ve(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=w.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(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);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}},Bt=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,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,jt(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Vt=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Bt(S.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(S.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 Rt(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Je(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_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=typeof this._options.getInjections==`function`?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,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Ht=Lt.NULL;function Ut(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function N(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Wt(e){return Array.isArray(e)?e:[e]}async function Gt(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function P(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Kt(e){return e===`ansi`||P(e)}function F(e){return e===`none`}function qt(e){return F(e)}function I(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Jt={light:`#333333`,dark:`#bbbbbb`},Yt={light:`#fffffe`,dark:`#1e1e1e`},Xt=`__shiki_resolved`;function Zt(e){if(e?.[Xt])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||=t.type===`light`?Jt.light:Jt.dark,n||=t.type===`light`?Yt.light:Yt.dark,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 i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}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 i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,Xt,{enumerable:!1,writable:!1,value:!0}),t}async function Qt(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Kt(e)).map(async e=>await Gt(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function $t(e){return(await Promise.all(e.map(async e=>qt(e)?null:Zt(await Gt(e))))).filter(e=>!!e)}function en(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 x(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var tn=class extends Vt{_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 typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=Zt(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=S.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=en(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.forEach(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=Array.from(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)):!1).filter(e=>!n.includes(e));throw new x(`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||=[...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))}},nn=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}},L=0;function rn(e){L+=1,e.warnings!==!1&&L>=10&&L%10==0&&console.warn(`[Shiki] ${L} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new x("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(Zt),i=new tn(new nn(e.engine,n),r,n,e.langAlias),a;function o(t){return en(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new x(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new x(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await Qt(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await $t(e))}function g(){if(t)throw new x(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--L)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function an(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([$t(e.themes||[]),Qt(e.langs||[]),e.engine]);return rn({...e,themes:t,langs:n,engine:r})}var on=new WeakMap;function R(e,t){on.set(e,t)}function z(e){return on.get(e)}var B=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(Wt(n).map(e=>[e,Ht])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return sn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function sn(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function cn(e,t){if(!(e instanceof B))throw new x(`Invalid grammar state`);return e.getInternalStack(t)}function ln(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(P(e.resolveLangAlias(n.lang||`text`))||F(r))return I(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new x(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new x(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return dn(t,o,i,a,n)}function un(...e){if(e.length===2)return z(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(P(i)||F(a))throw new x(`Plain language does not have grammar state`);if(i===`ansi`)throw new x(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new B(fn(n,c,o,s,r).stateStack,c.name,o.name)}function dn(e,t,n,r,i){let a=fn(e,t,n,r,i),o=new B(a.stateStack,t.name,n.name);return R(a.tokens,o),a.tokens}function fn(e,t,n,r,i){let a=Ut(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=I(e),l=i.grammarState?cn(i.grammarState,n.name)??Ht:i.grammarContextCode==null?Ht:fn(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=N(r[w.getForeground(s)],a),l=w.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?pn(t.scopes):mn(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function pn(e){return e.map(e=>({scopeName:e}))}function mn(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:_n(e,i,t.slice(0,r))}}return n}function hn(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function gn(e,t,n){if(!hn(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)hn(e[r],n[i])&&--r,--i;return r===-1}function _n(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(gn(e,t,n)){r.push(a);break}return r}function vn(e,t,n,r=ln){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:z(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=yn(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new B(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&R(s,c),s}function yn(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var bn=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],V=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};V.prototype.normal={},V.prototype.property={},V.prototype.space=void 0;function xn(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new V(n,r,t)}function Sn(e){return e.toLowerCase()}var H=class{constructor(e,t){this.attribute=t,this.property=e}};H.prototype.attribute=``,H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property=``,H.prototype.spaceSeparated=!1,H.prototype.space=void 0;var Cn=e({boolean:()=>U,booleanish:()=>W,commaOrSpaceSeparated:()=>J,commaSeparated:()=>q,number:()=>G,overloadedBoolean:()=>Tn,spaceSeparated:()=>K}),wn=0,U=Y(),W=Y(),Tn=Y(),G=Y(),K=Y(),q=Y(),J=Y();function Y(){return 2**++wn}var En=Object.keys(Cn),Dn=class extends H{constructor(e,t,n,r){let i=-1;if(super(e,t),On(this,`space`,r),typeof n==`number`)for(;++i<En.length;){let e=En[i];On(this,En[i],(n&Cn[e])===Cn[e])}}};Dn.prototype.defined=!0;function On(e,t,n){n&&(e[t]=n)}function X(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Dn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Sn(r)]=r,n[Sn(a.attribute)]=r}return new V(t,n,e.space)}var kn=X({properties:{ariaActiveDescendant:null,ariaAtomic:W,ariaAutoComplete:null,ariaBusy:W,ariaChecked:W,ariaColCount:G,ariaColIndex:G,ariaColSpan:G,ariaControls:K,ariaCurrent:null,ariaDescribedBy:K,ariaDetails:null,ariaDisabled:W,ariaDropEffect:K,ariaErrorMessage:null,ariaExpanded:W,ariaFlowTo:K,ariaGrabbed:W,ariaHasPopup:null,ariaHidden:W,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:K,ariaLevel:G,ariaLive:null,ariaModal:W,ariaMultiLine:W,ariaMultiSelectable:W,ariaOrientation:null,ariaOwns:K,ariaPlaceholder:null,ariaPosInSet:G,ariaPressed:W,ariaReadOnly:W,ariaRelevant:null,ariaRequired:W,ariaRoleDescription:K,ariaRowCount:G,ariaRowIndex:G,ariaRowSpan:G,ariaSelected:W,ariaSetSize:G,ariaSort:null,ariaValueMax:G,ariaValueMin:G,ariaValueNow:G,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function An(e,t){return t in e?e[t]:t}function jn(e,t){return An(e,t.toLowerCase())}var Mn=X({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:q,acceptCharset:K,accessKey:K,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:K,autoFocus:U,autoPlay:U,blocking:K,capture:null,charSet:null,checked:U,cite:null,className:K,cols:G,colSpan:null,content:null,contentEditable:W,controls:U,controlsList:K,coords:G|q,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:Tn,draggable:W,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:K,height:G,hidden:Tn,high:G,href:null,hrefLang:null,htmlFor:K,httpEquiv:K,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:K,itemRef:K,itemScope:U,itemType:K,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:G,manifest:null,max:null,maxLength:G,media:null,method:null,min:null,minLength:G,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:G,pattern:null,ping:K,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:K,required:U,reversed:U,rows:G,rowSpan:G,sandbox:K,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:G,sizes:null,slot:null,span:G,spellCheck:W,src:null,srcDoc:null,srcLang:null,srcSet:null,start:G,step:null,style:null,tabIndex:G,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:W,width:G,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:K,axis:null,background:null,bgColor:null,border:G,borderColor:null,bottomMargin:G,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:G,leftMargin:G,link:null,longDesc:null,lowSrc:null,marginHeight:G,marginWidth:G,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:G,rules:null,scheme:null,scrolling:W,standby:null,summary:null,text:null,topMargin:G,valueType:null,version:null,vAlign:null,vLink:null,vSpace:G,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:G,security:null,unselectable:null},space:`html`,transform:jn}),Nn=X({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:J,accentHeight:G,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:G,amplitude:G,arabicForm:null,ascent:G,attributeName:null,attributeType:null,azimuth:G,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:G,by:null,calcMode:null,capHeight:G,className:K,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:G,diffuseConstant:G,direction:null,display:null,dur:null,divisor:G,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:G,enableBackground:null,end:null,event:null,exponent:G,externalResourcesRequired:null,fill:null,fillOpacity:G,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:q,g2:q,glyphName:q,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:G,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:G,horizOriginX:G,horizOriginY:G,id:null,ideographic:G,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:G,k:G,k1:G,k2:G,k3:G,k4:G,kernelMatrix:J,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:G,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:G,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:G,overlineThickness:G,paintOrder:null,panose1:null,path:null,pathLength:G,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:K,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:G,pointsAtY:G,pointsAtZ:G,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:J,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:J,rev:J,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:J,requiredFeatures:J,requiredFonts:J,requiredFormats:J,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:G,specularExponent:G,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:G,strikethroughThickness:G,string:null,stroke:null,strokeDashArray:J,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:G,strokeOpacity:G,strokeWidth:null,style:null,surfaceScale:G,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:J,tabIndex:G,tableValues:null,target:null,targetX:G,targetY:G,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:J,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:G,underlineThickness:G,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:G,values:null,vAlphabetic:G,vMathematical:G,vectorEffect:null,vHanging:G,vIdeographic:G,version:null,vertAdvY:G,vertOriginX:G,vertOriginY:G,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:G,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:An}),Pn=X({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Fn=X({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:jn}),In=X({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Ln=/[A-Z]/g,Rn=/-[a-z]/g,zn=/^data[-\w.:]+$/i;function Bn(e,t){let n=Sn(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&zn.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Rn,Hn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Rn.test(e)){let n=e.replace(Ln,Vn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Dn}return new i(r,t)}function Vn(e){return`-`+e.toLowerCase()}function Hn(e){return e.charAt(1).toUpperCase()}var Un=xn([kn,Mn,Pn,Fn,In],`html`),Wn=xn([kn,Nn,Pn,Fn,In],`svg`),Gn={}.hasOwnProperty;function Kn(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Gn.call(t,e)){let n=String(t[e]);i=Gn.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var qn=/["&'<>`]/g,Jn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yn=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Xn=/[|\\{}()[\]^$+*?.]/g,Zn=new WeakMap;function Qn(e,t){if(e=e.replace(t.subset?$n(t.subset):qn,r),t.subset||t.escapeOnly)return e;return e.replace(Jn,n).replace(Yn,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function $n(e){let t=Zn.get(e);return t||(t=er(e),Zn.set(e,t)),t}function er(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(Xn,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var tr=/[\dA-Fa-f]/;function nr(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!tr.test(String.fromCharCode(t))?r:r+`;`}var rr=/\d/;function ir(e,t,n){let r=`&#`+String(e);return n&&t&&!rr.test(String.fromCharCode(t))?r:r+`;`}var ar=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),or={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},sr=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],cr={}.hasOwnProperty,lr={},ur;for(ur in or)cr.call(or,ur)&&(lr[or[ur]]=ur);var dr=/[^\dA-Za-z]/;function fr(e,t,n,r){let i=String.fromCharCode(e);if(cr.call(lr,i)){let e=lr[i],a=`&`+e;return n&&ar.includes(e)&&!sr.includes(e)&&(!r||t&&t!==61&&dr.test(String.fromCharCode(t)))?a:a+`;`}return``}function pr(e,t,n){let r=nr(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=fr(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=ir(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Z(e,t){return Qn(e,Object.assign({format:pr},t))}var mr=/^>|^->|<!--|-->|--!>|<!-$/g,hr=[`>`],gr=[`<`,`>`];function _r(e,t,n,r){return r.settings.bogusComments?`<?`+Z(e.value,Object.assign({},r.settings.characterReferences,{subset:hr}))+`>`:`<!--`+e.value.replace(mr,i)+`-->`;function i(e){return Z(e,Object.assign({},r.settings.characterReferences,{subset:gr}))}}function vr(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function yr(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function br(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function xr(e){return e.join(` `).trim()}var Sr=/[ \t\n\f\r]/g;function Cr(e){return typeof e==`object`?e.type===`text`?wr(e.value):!1:wr(e)}function wr(e){return e.replace(Sr,``)===``}var Q=Dr(1),Tr=Dr(-1),Er=[];function Dr(e){return t;function t(t,n,r){let i=t?t.children:Er,a=(n||0)+e,o=i[a];if(!r)for(;o&&Cr(o);)a+=e,o=i[a];return o}}var Or={}.hasOwnProperty;function kr(e){return t;function t(t,n,r){return Or.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Ar=kr({body:Nr,caption:jr,colgroup:jr,dd:Lr,dt:Ir,head:jr,html:Mr,li:Fr,optgroup:zr,option:Br,p:Pr,rp:Rr,rt:Rr,tbody:Hr,td:Gr,tfoot:Ur,th:Gr,thead:Vr,tr:Wr});function jr(e,t,n){let r=Q(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Cr(r.value.charAt(0)))}function Mr(e,t,n){let r=Q(n,t);return!r||r.type!==`comment`}function Nr(e,t,n){let r=Q(n,t);return!r||r.type!==`comment`}function Pr(e,t,n){let r=Q(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function Fr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Ir(e,t,n){let r=Q(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Lr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Rr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function zr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Br(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Vr(e,t,n){let r=Q(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Hr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function Ur(e,t,n){return!Q(n,t)}function Wr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Gr(e,t,n){let r=Q(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Kr=kr({body:Yr,colgroup:Xr,head:Jr,html:qr,tbody:Zr});function qr(e){let t=Q(e,-1);return!t||t.type!==`comment`}function Jr(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function Yr(e){let t=Q(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Cr(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function Xr(e,t,n){let r=Tr(n,t),i=Q(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Ar(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function Zr(e,t,n){let r=Tr(n,t),i=Q(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Ar(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var Qr={name:[[`
|
|
5
|
+
\f\r &/=>`.split(``),`
|
|
6
|
+
\f\r "&'/=>\``.split(``)],[`\0
|
|
7
|
+
\f\r "&'/<=>`.split(``),`\0
|
|
8
|
+
\f\r "&'/<=>\``.split(``)]],unquoted:[[`
|
|
9
|
+
\f\r &>`.split(``),`\0
|
|
10
|
+
\f\r "&'<=>\``.split(``)],[`\0
|
|
11
|
+
\f\r "&'<=>\``.split(``),`\0
|
|
12
|
+
\f\r "&'<=>\``.split(``)]],single:[[`&'`.split(``),`"&'\``.split(``)],[`\0&'`.split(``),`\0"&'\``.split(``)]],double:[[`"&`.split(``),`"&'\``.split(``)],[`\0"&`.split(``),`\0"&'\``.split(``)]]};function $r(e,t,n,r){let i=r.schema,a=i.space===`svg`?!1:r.settings.omitOptionalTags,o=i.space===`svg`?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),s=[],c;i.space===`html`&&e.tagName===`svg`&&(r.schema=Wn);let l=ei(r,e.properties),u=r.all(i.space===`html`&&e.tagName===`template`?e.content:e);return r.schema=i,u&&(o=!1),(l||!a||!Kr(e,t,n))&&(s.push(`<`,e.tagName,l?` `+l:``),o&&(i.space===`svg`||r.settings.closeSelfClosing)&&(c=l.charAt(l.length-1),(!r.settings.tightSelfClosing||c===`/`||c&&c!==`"`&&c!==`'`)&&s.push(` `),s.push(`/`)),s.push(`>`)),s.push(u),!o&&(!a||!Ar(e,t,n))&&s.push(`</`+e.tagName+`>`),s.join(``)}function ei(e,t){let n=[],r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){let r=ti(e,i,t[i]);r&&n.push(r)}}for(;++r<n.length;){let t=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&t!==`"`&&t!==`'`&&(n[r]+=` `)}return n.join(``)}function ti(e,t,n){let r=Bn(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space===`html`?0:1,a=e.settings.allowDangerousCharacters?0:1,o=e.quote,s;if(r.overloadedBoolean&&(n===r.attribute||n===``)?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!=`string`||n===r.attribute||n===``)&&(n=!!n),n==null||n===!1||typeof n==`number`&&Number.isNaN(n))return``;let c=Z(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Qr.name[i][a]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?br:xr)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(s=Z(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Qr.unquoted[i][a]}))),s!==n&&(e.settings.quoteSmart&&yr(n,o)>yr(n,e.alternative)&&(o=e.alternative),s=o+Z(n,Object.assign({},e.settings.characterReferences,{subset:(o===`'`?Qr.single:Qr.double)[i][a],attribute:!0}))+o),c+(s&&`=`+s))}var ni=[`<`,`&`];function ri(e,t,n,r){return n&&n.type===`element`&&(n.tagName===`script`||n.tagName===`style`)?e.value:Z(e.value,Object.assign({},r.settings.characterReferences,{subset:ni}))}function ii(e,t,n,r){return r.settings.allowDangerousHtml?e.value:ri(e,t,n,r)}function ai(e,t,n,r){return r.all(e)}var oi=Kn(`type`,{invalid:si,unknown:ci,handlers:{comment:_r,doctype:vr,element:$r,raw:ii,root:ai,text:ri}});function si(e){throw Error("Expected node, not `"+e+"`")}function ci(e){throw Error("Cannot compile unknown node `"+e.type+"`")}var li={},ui={},di=[];function fi(e,t){let n=t||li,r=n.quote||`"`,i=r===`"`?`'`:`"`;if(r!==`"`&&r!==`'`)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:pi,all:mi,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||bn,characterReferences:n.characterReferences||ui,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space===`svg`?Wn:Un,quote:r,alternative:i}.one(Array.isArray(e)?{type:`root`,children:e}:e,void 0,void 0)}function pi(e,t,n){return oi(e,t,n,this)}function mi(e){let t=[],n=e&&e.children||di,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join(``)}function hi(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class==`string`&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);let n=Array.isArray(t)?t:t.split(/\s+/g);for(let t of n)t&&!e.properties.class.includes(t)&&e.properties.class.push(t);return e}function gi(e){let t=I(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+=n,r}return{lines:t,indexToPos:n,posToIndex:r}}var _i=`light-dark()`,vi=[`color`,`background-color`];function yi(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function bi(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?yi(e,t):e})):e}function xi(e,t,n,r,i=`css-vars`){let a={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>Si(e.variants[t])),s=new Set(o.flatMap(e=>Object.keys(e))),c={},l=(e,r)=>{let i=r===`color`?``:r===`background-color`?`-bg`:`-${r}`;return n+t[e]+(r===`color`?``:i)};return o.forEach((e,n)=>{for(let a of s){let s=e[a]||`inherit`;if(n===0&&r&&vi.includes(a))if(r===_i&&o.length>1){let e=t.findIndex(e=>e===`light`),r=t.findIndex(e=>e===`dark`);if(e===-1||r===-1)throw new x('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[a]=`light-dark(${o[e][a]||`inherit`}, ${o[r][a]||`inherit`})`,i===`css-vars`&&(c[l(n,a)]=s)}else c[a]=s;else i===`css-vars`&&(c[l(n,a)]=s)}}),a.htmlStyle=c,a}function Si(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t[`background-color`]=e.bgColor),e.fontStyle){e.fontStyle&C.Italic&&(t[`font-style`]=`italic`),e.fontStyle&C.Bold&&(t[`font-weight`]=`bold`);let n=[];e.fontStyle&C.Underline&&n.push(`underline`),e.fontStyle&C.Strikethrough&&n.push(`line-through`),n.length&&(t[`text-decoration`]=n.join(` `))}return t}function Ci(e){return typeof e==`string`?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(`;`)}function wi(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=gi(t.source);function r(e){if(typeof e==`number`){if(e<0||e>t.source.length)throw new x(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...n.indexToPos(e),offset:e}}else{let t=n.lines[e.line];if(t===void 0)throw new x(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${n.lines.length}`);let r=e.character;if(r<0&&(r=t.length+r),r<0||r>t.length)throw new x(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:r,offset:n.posToIndex(e.line,r)}}}let i=(t.options.decorations||[]).map(e=>({...e,start:r(e.start),end:r(e.end)}));Ti(i),e.set(t.meta,{decorations:i,converter:n,source:t.source})}return e.get(t.meta)}return{name:`shiki:decorations`,tokens(e){if(this.options.decorations?.length)return bi(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>e.type===`element`&&e.tagName===`span`);if(r.length!==n.converter.lines.length)throw new x(`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 i(e,t,n,i){let a=r[e],s=``,c=-1,l=-1;if(t===0&&(c=0),n===0&&(l=0),n===1/0&&(l=a.children.length),c===-1||l===-1)for(let e=0;e<a.children.length;e++)s+=Ei(a.children[e]),c===-1&&s.length===t&&(c=e+1),l===-1&&s.length===n&&(l=e+1);if(c===-1)throw new x(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(l===-1)throw new x(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=a.children.slice(c,l);if(!i.alwaysWrap&&u.length===a.children.length)o(a,i,`line`);else if(!i.alwaysWrap&&u.length===1&&u[0].type===`element`)o(u[0],i,`token`);else{let e={type:`element`,tagName:`span`,properties:{},children:u};o(e,i,`wrapper`),a.children.splice(c,u.length,e)}}function a(e,t){r[e]=o(r[e],t,`line`)}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||`span`,e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&hi(e,t.properties.class),e=i(e,n)||e,e}let s=[],c=n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset);for(let e of c){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)s.unshift(()=>a(r,e));i(n.line,0,n.character,e)}}s.forEach(e=>e())}}}function Ti(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new x(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,a=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,s=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||a||o||s){if(i&&a||o&&s||o&&n.start.offset===n.end.offset||a&&t.start.offset===t.end.offset)continue;throw new x(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function Ei(e){return e.type===`text`?e.value:e.type===`element`?e.children.map(Ei).join(``):``}var Di=[wi()];function Oi(e){let t=ki(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...Di]}function ki(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case`pre`:t.push(i);break;case`post`:n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var $=[`black`,`red`,`green`,`yellow`,`blue`,`magenta`,`cyan`,`white`,`brightBlack`,`brightRed`,`brightGreen`,`brightYellow`,`brightBlue`,`brightMagenta`,`brightCyan`,`brightWhite`],Ai={1:`bold`,2:`dim`,3:`italic`,4:`underline`,7:`reverse`,8:`hidden`,9:`strikethrough`};function ji(e,t){let n=e.indexOf(`\x1B`,t);if(n!==-1&&e[n+1]===`[`){let t=e.indexOf(`m`,n);if(t!==-1)return{sequence:e.substring(n+2,t).split(`;`),startPosition:n,position:t+1}}return{position:e.length}}function Mi(e){let t=e.shift();if(t===`2`){let t=e.splice(0,3).map(e=>Number.parseInt(e));return t.length!==3||t.some(e=>Number.isNaN(e))?void 0:{type:`rgb`,rgb:t}}else if(t===`5`){let t=e.shift();if(t)return{type:`table`,index:Number(t)}}}function Ni(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:`resetAll`});else if(r<=9)Ai[r]&&t.push({type:`setDecoration`,value:Ai[r]});else if(r<=29){let e=Ai[r-20];e&&(t.push({type:`resetDecoration`,value:e}),e===`dim`&&t.push({type:`resetDecoration`,value:`bold`}))}else if(r<=37)t.push({type:`setForegroundColor`,value:{type:`named`,name:$[r-30]}});else if(r===38){let n=Mi(e);n&&t.push({type:`setForegroundColor`,value:n})}else if(r===39)t.push({type:`resetForegroundColor`});else if(r<=47)t.push({type:`setBackgroundColor`,value:{type:`named`,name:$[r-40]}});else if(r===48){let n=Mi(e);n&&t.push({type:`setBackgroundColor`,value:n})}else r===49?t.push({type:`resetBackgroundColor`}):r===53?t.push({type:`setDecoration`,value:`overline`}):r===55?t.push({type:`resetDecoration`,value:`overline`}):r>=90&&r<=97?t.push({type:`setForegroundColor`,value:{type:`named`,name:$[r-90+8]}}):r>=100&&r<=107&&t.push({type:`setBackgroundColor`,value:{type:`named`,name:$[r-100+8]}})}return t}function Pi(){let e=null,t=null,n=new Set;return{parse(r){let i=[],a=0;do{let o=ji(r,a),s=o.sequence?r.substring(a,o.startPosition):r.substring(a);if(s.length>0&&i.push({value:s,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=Ni(o.sequence);for(let i of r)i.type===`resetAll`?(e=null,t=null,n.clear()):i.type===`resetForegroundColor`?e=null:i.type===`resetBackgroundColor`?t=null:i.type===`resetDecoration`&&n.delete(i.value);for(let i of r)i.type===`setForegroundColor`?e=i.value:i.type===`setBackgroundColor`?t=i.value:i.type===`setDecoration`&&n.add(i.value)}a=o.position}while(a<r.length);return i}}}var Fi={black:`#000000`,red:`#bb0000`,green:`#00bb00`,yellow:`#bbbb00`,blue:`#0000bb`,magenta:`#ff00ff`,cyan:`#00bbbb`,white:`#eeeeee`,brightBlack:`#555555`,brightRed:`#ff5555`,brightGreen:`#00ff00`,brightYellow:`#ffff55`,brightBlue:`#5555ff`,brightMagenta:`#ff55ff`,brightCyan:`#55ffff`,brightWhite:`#ffffff`};function Ii(e=Fi){function t(t){return e[t]}function n(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,`0`)).join(``)}`}let r;function i(){if(r)return r;r=[];for(let e=0;e<$.length;e++)r.push(t($[e]));let e=[0,95,135,175,215,255];for(let t=0;t<6;t++)for(let i=0;i<6;i++)for(let a=0;a<6;a++)r.push(n([e[t],e[i],e[a]]));let i=8;for(let e=0;e<24;e++,i+=10)r.push(n([i,i,i]));return r}function a(e){return i()[e]}function o(e){switch(e.type){case`named`:return t(e.name);case`rgb`:return n(e.rgb);case`table`:return a(e.index)}}return{value:o}}var Li={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 Ri(e,t,n){let r=Ut(e,n),i=I(t),a=Ii(Object.fromEntries($.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||Li[t]]}))),o=Pi();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has(`reverse`)?(i=n.background?a.value(n.background):e.bg,o=n.foreground?a.value(n.foreground):e.fg):(i=n.foreground?a.value(n.foreground):e.fg,o=n.background?a.value(n.background):void 0),i=N(i,r),o=N(o,r),n.decorations.has(`dim`)&&(i=zi(i));let s=C.None;return n.decorations.has(`bold`)&&(s|=C.Bold),n.decorations.has(`italic`)&&(s|=C.Italic),n.decorations.has(`underline`)&&(s|=C.Underline),n.decorations.has(`strikethrough`)&&(s|=C.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:s}}))}function zi(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(e.length===8){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,`0`);return`#${e.slice(0,6)}${t}`}else if(e.length===6)return`#${e}80`;else if(e.length===4){let t=e[0],n=e[1],r=e[2],i=e[3];return`#${t}${t}${n}${n}${r}${r}${Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,`0`)}`}else if(e.length===3){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function Bi(e,t,n={}){let r=e.resolveLangAlias(n.lang||`text`),{theme:i=e.getLoadedThemes()[0]}=n;if(!P(r)&&!F(i)&&r===`ansi`){let{theme:r}=e.setTheme(i);return Ri(r,t,n)}return ln(e,t,n)}function Vi(e,t,n){let r,i,a,o,s,c;if(`themes`in n){let{defaultColor:l=`light`,cssVariablePrefix:u=`--shiki-`,colorsRendering:d=`css-vars`}=n,f=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===l?-1:t.color===l?1:0);if(f.length===0)throw new x("`themes` option must not be empty");let p=vn(e,t,n,Bi);if(c=z(p),l&&_i!==l&&!f.find(e=>e.color===l))throw new x(`\`themes\` option must contain the defaultColor key \`${l}\``);let m=f.map(t=>e.getTheme(t.theme)),h=f.map(e=>e.color);a=p.map(e=>e.map(e=>xi(e,h,u,l,d))),c&&R(a,c);let g=f.map(e=>Ut(e.theme,n));i=Hi(f,m,g,u,l,`fg`,d),r=Hi(f,m,g,u,l,`bg`,d),o=`shiki-themes ${m.map(e=>e.name).join(` `)}`,s=l?void 0:[i,r].join(`;`)}else if(`theme`in n){let s=Ut(n.theme,n);a=Bi(e,t,n);let l=e.getTheme(n.theme);r=N(l.bg,s),i=N(l.fg,s),o=l.name,c=z(a)}else throw new x("Invalid options, either `theme` or `themes` must be provided");return{tokens:a,fg:i,bg:r,themeName:o,rootStyle:s,grammarState:c}}function Hi(e,t,n,r,i,a,o){return e.map((s,c)=>{let l=N(t[c][a],n[c])||`inherit`,u=`${r+s.color}${a===`bg`?`-bg`:``}:${l}`;if(c===0&&i){if(i===_i&&e.length>1){let r=e.findIndex(e=>e.color===`light`),i=e.findIndex(e=>e.color===`dark`);if(r===-1||i===-1)throw new x('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${N(t[r][a],n[r])||`inherit`}, ${N(t[i][a],n[i])||`inherit`});${u}`}return l}return o===`css-vars`?u:null}).filter(e=>!!e).join(`;`)}function Ui(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>Ui(e,t,n),codeToTokens:(t,n)=>Vi(e,t,n)}){let i=t;for(let e of Oi(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:a,fg:o,bg:s,themeName:c,rootStyle:l,grammarState:u}=Vi(e,i,n),{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?a=Gi(a):d===`never`&&(a=Ki(a)),f&&(a=qi(a));let p={...r,get source(){return i}};for(let e of Oi(n))a=e.tokens?.call(p,a)||a;return Wi(a,{...n,fg:o,bg:s,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??l},p,u)}function Wi(e,t,n,r=z(e)){let i=Oi(t),a=[],o={type:`root`,children:[]},{structure:s=`classic`,tabindex:c=`0`}=t,l={class:`shiki ${t.themeName||``}`};t.rootStyle!==!1&&(t.rootStyle==null?l.style=`background-color:${t.bg};color:${t.fg}`:l.style=t.rootStyle),c!==!1&&c!=null&&(l.tabindex=c.toString());for(let[e,n]of Object.entries(t.meta||{}))e.startsWith(`_`)||(l[e]=n);let u={type:`element`,tagName:`pre`,properties:l,children:[],data:t.data},d={type:`element`,tagName:`code`,properties:{},children:a},f=[],p={...n,structure:s,addClassToHast:hi,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return u},get code(){return d},get lines(){return f}};if(e.forEach((e,t)=>{t&&(s===`inline`?o.children.push({type:`element`,tagName:`br`,properties:{},children:[]}):s===`classic`&&a.push({type:`text`,value:`
|
|
13
|
+
`}));let n={type:`element`,tagName:`span`,properties:{class:`line`},children:[]},r=0;for(let a of e){let e={type:`element`,tagName:`span`,properties:{...a.htmlAttrs},children:[{type:`text`,value:a.content}]},c=Ci(a.htmlStyle||Si(a));c&&(e.properties.style=c);for(let o of i)e=o?.span?.call(p,e,t+1,r,n,a)||e;s===`inline`?o.children.push(e):s===`classic`&&n.children.push(e),r+=a.content.length}if(s===`classic`){for(let e of i)n=e?.line?.call(p,n,t+1)||n;f.push(n),a.push(n)}else s===`inline`&&f.push(n)}),s===`classic`){for(let e of i)d=e?.code?.call(p,d)||d;u.children.push(d);for(let e of i)u=e?.pre?.call(p,u)||u;o.children.push(u)}else if(s===`inline`){let e=[],t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]};for(let n of o.children)n.type===`element`&&n.tagName===`br`?(e.push(t),t={type:`element`,tagName:`span`,properties:{class:`line`},children:[]}):(n.type===`element`||n.type===`text`)&&t.children.push(n);e.push(t);let n={type:`element`,tagName:`code`,properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:`element`,tagName:`br`,properties:{},children:[]});let t=n.children[e];t.type===`element`&&o.children.push(...t.children)}}let m=o;for(let e of i)m=e?.root?.call(p,m)||m;return r&&R(m,r),m}function Gi(e){return e.map(e=>{let t=[],n=``,r;return e.forEach((i,a)=>{let o=!(i.fontStyle&&(i.fontStyle&C.Underline||i.fontStyle&C.Strikethrough));o&&i.content.match(/^\s+$/)&&e[a+1]?(r===void 0&&(r=i.offset),n+=i.content):n?(o?t.push({...i,offset:r,content:n+i.content}):t.push({content:n,offset:r},i),r=void 0,n=``):t.push(i)}),t})}function Ki(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let a=[{...e,offset:e.offset+n.length,content:r}];return n&&a.unshift({content:n,offset:e.offset}),i&&a.push({content:i,offset:e.offset+n.length+r.length}),a}))}function qi(e){return e.map(e=>{let t=[];for(let n of e){if(t.length===0){t.push({...n});continue}let e=t[t.length-1],r=Ci(e.htmlStyle||Si(e)),i=Ci(n.htmlStyle||Si(n)),a=e.fontStyle&&(e.fontStyle&C.Underline||e.fontStyle&C.Strikethrough),o=n.fontStyle&&(n.fontStyle&C.Underline||n.fontStyle&C.Strikethrough);!a&&!o&&r===i?e.content+=n.content:t.push({...n})}return t})}var Ji=fi;function Yi(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>Ui(e,t,n),codeToTokens:(t,n)=>Vi(e,t,n)},i=Ji(Ui(e,t,n,r));for(let e of Oi(n))i=e.postprocess?.call(r,i,n)||i;return i}async function Xi(e){let t=await an(e);return{getLastGrammarState:(...e)=>un(t,...e),codeToTokensBase:(e,n)=>Bi(t,e,n),codeToTokensWithThemes:(e,n)=>vn(t,e,n),codeToTokens:(e,n)=>Vi(t,e,n),codeToHast:(e,n)=>Ui(t,e,n),codeToHtml:(e,n)=>Yi(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}var Zi=/</g,Qi=/>/g,$i=m();Xi({themes:[y(()=>import(`./C3ZQgAGz.js`),[],import.meta.url),y(()=>import(`./b9fIUieR.js`),[],import.meta.url)],langs:[y(()=>import(`./us1Ri1jC.js`),__vite__mapDeps([0,1]),import.meta.url),y(()=>import(`./Od1p3DBV.js`),__vite__mapDeps([2,1]),import.meta.url),y(()=>import(`./v8C1EvL9.js`),[],import.meta.url)],engine:ge()}).then(e=>{$i.value=e});function ea(e){return _(()=>$i.value?$i.value.codeToHtml(e(),{lang:`glob`,theme:b.value?`vitesse-dark`:`vitesse-light`,structure:`inline`}):ta(e()))}function ta(e){return e.replace(Zi,`<`).replace(Qi,`>`)}var na=[`innerHTML`],ra={key:0,"max-h":`30vh`,"min-w-80":``,"of-auto":``,p3:``},ia={key:0,flex:`~ col gap-1`},aa={key:1,"text-center":``,italic:``,op50:``},oa={key:1,"max-h":`30vh`,"min-w-80":``,"of-auto":``,p3:``},sa={key:0,flex:`~ col gap-1`},ca=[`onClick`],la={key:1,"text-center":``,italic:``,op50:``},ua=Object.assign(r({__name:`GlobItem`,props:{glob:{},popup:{},active:{type:[Boolean,null],default:null},variant:{default:`default`}},setup(e){let s=e,m=ea(()=>s.glob.toString()),ee=_(()=>s.popup===`files`&&t.value.filesResolved||s.popup===`configs`),y=_(()=>s.popup===`files`?t.value.filesResolved?.globToFiles.get(s.glob):void 0),b=_(()=>s.popup===`configs`?t.value.globToConfigs.get(s.glob):void 0),re=_(()=>({default:`text-gray`,files:`border-sky/35 bg-sky:8 text-sky7 dark:text-sky3`,"ignore-files":`border-purple/35 bg-purple:8 text-purple7 dark:text-purple3`,stylelintignore:`border-fuchsia/35 bg-fuchsia:8 text-fuchsia7 dark:text-fuchsia3`})[s.variant]),ie=te();function ae(e){n.filepath=``,n.rule=``,n.plugins=[],ie.push(`/configs?index=${e+1}`)}let oe=r({setup:(e,{slots:t})=>()=>t.default?.()});return(t,n)=>{let r=ue,s=fe;return d(),g(l(ee.value?v(ne):v(oe)),null,{popper:h(({shown:t,hide:a})=>[t&&e.popup===`files`?(d(),i(`div`,ra,[y.value?.size?(d(),i(`div`,ia,[n[0]||=f(`div`,null,`Files that matches this glob`,-1),(d(!0),i(p,null,o(y.value,e=>(d(),g(r,{key:e,filepath:e,"font-mono":``,onClick:e=>a()},null,8,[`filepath`,`onClick`]))),128))])):(d(),i(`div`,aa,` No files matched this glob. `))])):u(``,!0),t&&e.popup===`configs`?(d(),i(`div`,oa,[b.value?.length?(d(),i(`div`,sa,[n[1]||=f(`div`,null,`Configs that contains this glob`,-1),(d(!0),i(p,null,o(b.value,e=>(d(),i(`div`,{key:e.name,flex:`~ gap-2`},[f(`button`,{"btn-badge":``,onClick:t=>ae(e.index)},[c(s,{name:e.name,index:e.index},null,8,[`name`,`index`])],8,ca)]))),128))])):(d(),i(`div`,la,` No configs matched this glob. `))])):u(``,!0)]),default:h(()=>[(d(),g(l(ee.value?`button`:`div`),{"font-mono":``,class:a([e.active===!0?`badge-active`:e.active===!1?`badge op50`:`badge`,e.active===!0?``:re.value])},{default:h(()=>[f(`span`,{class:`filter-hue-rotate-180`,innerHTML:v(m)},null,8,na)]),_:1},8,[`class`]))]),_:1})}}}),{__name:`GlobItem`});export{ue as a,fe as i,ta as n,se as o,$i as r,ua as t};
|